Skip to content

Commit

Permalink
ci: fixed wrong imports + declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasHaderer committed Feb 2, 2025
1 parent d832cff commit ef88d87
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/client",
"version": "0.1.0",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/common",
"version": "0.1.0",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mocking/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/mocking",
"version": "0.0.1",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-schema/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/openapi-schema",
"version": "0.0.1",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/openapi",
"version": "0.1.0",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/openapi/src/lib/api.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ import {
withServerBase,
} from "@luftschloss/server";
import { ApiRouter } from "./api.router";
import type { Constructor } from "@luftschloss/common";

export class ApiServer extends withServerBase(ApiRouter) implements ServerBase {}
// Workaround for messed up imports
export const ApiServer: Constructor<ApiRouter & ServerBase, []> = withServerBase(ApiRouter);
export type ApiServer = InstanceType<typeof ApiServer>;

export const apiServer = ({ timeout = 5000, maxConnections = Number.MAX_SAFE_INTEGER } = {}) => {
const server = new ApiServer();
Expand Down
2 changes: 1 addition & 1 deletion packages/proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/proxy",
"version": "0.0.1",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "router",
"version": "0.0.1",
"version": "0.2.1",
"dependencies": {
"tslib": "^2.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/server",
"version": "0.1.0",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/lib/core/server-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface ServerBase extends Pick<Subscribable<LuftServerEvents>, "onComp
}

// noinspection JSPotentiallyInvalidUsageOfThis
export const withServerBase = <T extends Router, ARGS extends []>(
export const withServerBase = <T extends Router, ARGS extends any[]>(
clazz: Constructor<T, ARGS>
): Constructor<T & ServerBase, ARGS> =>
class extends (clazz as Constructor<Router, ARGS>) implements ServerBase {
Expand Down
7 changes: 5 additions & 2 deletions packages/server/src/lib/core/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ import {
} from "../path-validator";
import { DefaultRouter } from "../router";
import { DefaultErrorHandler } from "./error-handler";
import { withServerBase } from "./server-base";
import { ServerBase, withServerBase } from "./server-base";
import type { Constructor } from "@luftschloss/common";

export class ServerImpl extends withServerBase(DefaultRouter) {}
// Workaround for messed up imports
export const ServerImpl: Constructor<DefaultRouter & ServerBase, []> = withServerBase(DefaultRouter);
export type ServerImpl = InstanceType<typeof ServerImpl>;

export const luftServer = ({ timeout = 5000, maxConnections = Number.MAX_SAFE_INTEGER } = {}): ServerImpl => {
const server = new ServerImpl();
Expand Down
2 changes: 1 addition & 1 deletion packages/static/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/static",
"version": "0.0.1",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/testing",
"version": "0.0.1",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/validation-interfaces/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@luftschloss/validation-interfaces",
"version": "0.0.1",
"version": "0.2.1",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion packages/validation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luftschloss/validation",
"version": "0.2.0",
"version": "0.2.1",
"engines": {
"node": ">=18"
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
Expand All @@ -21,6 +20,7 @@
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"paths": {
"@luftschloss/client": ["packages/client/src/index.ts"],
"@luftschloss/common": ["packages/common/src/index.ts"],
Expand Down

0 comments on commit ef88d87

Please sign in to comment.