Skip to content

Commit 560ca94

Browse files
committed
feat: update import paths in objectstack.config and add @objectstack/spec to dependencies; adjust type casting in compile command and MSWPlugin
1 parent 86b240b commit 560ca94

5 files changed

Lines changed: 11 additions & 7 deletions

File tree

examples/app-host/objectstack.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { defineStack } from '@objectstack/spec';
22
import { AppPlugin } from '@objectstack/runtime';
3-
import CrmApp from '@example/app-crm/objectstack.config';
4-
import TodoApp from '@example/app-todo/objectstack.config';
5-
import BiPluginManifest from '@example/plugin-bi/objectstack.config';
3+
import CrmApp from '../app-crm/objectstack.config';
4+
import TodoApp from '../app-todo/objectstack.config';
5+
import BiPluginManifest from '../plugin-bi/objectstack.config';
66

77
// App Host Example
88
// This project acts as a "Platform Server" that loads multiple apps and plugins.

examples/app-host/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"@objectstack/objectql": "workspace:*",
1919
"@example/plugin-bi": "workspace:*",
2020
"@objectstack/plugin-hono-server": "workspace:*",
21-
"@objectstack/runtime": "workspace:*"
21+
"@objectstack/runtime": "workspace:*",
22+
"@objectstack/spec": "workspace:*"
2223
},
2324
"devDependencies": {
2425
"ts-node": "^10.9.1",

packages/cli/src/commands/compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const compileCommand = new Command('compile')
4343
if (!result.success) {
4444
console.error(chalk.red(`\n❌ Validation Failed!`));
4545

46-
const error = result.error as ZodError;
46+
const error = result.error as unknown as ZodError;
4747
error.issues.forEach((e: any) => {
4848
console.error(chalk.red(` - [${e.path.join('.')}] ${e.message}`));
4949
});

packages/plugins/plugin-msw/src/msw-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export class MSWPlugin implements Plugin {
457457
http.get(`${baseUrl}/meta/:type`, async ({ params, request }) => {
458458
const url = new URL(request.url);
459459
const query = parseQueryParams(url);
460-
return HttpResponse.json(await protocol.getMetaItems({ type: params.type as string, query }));
460+
return HttpResponse.json(await protocol.getMetaItems({ type: params.type as string, query } as any));
461461
}),
462462

463463
http.get(`${baseUrl}/meta/:type/:name`, async ({ params }) => {
@@ -620,7 +620,7 @@ export class MSWPlugin implements Plugin {
620620
type: params.type as string,
621621
name: params.name as string,
622622
cacheRequest
623-
});
623+
} as any);
624624

625625
if (result.notModified) {
626626
return new HttpResponse(null, { status: 304 });

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)