Skip to content

Commit 360cb47

Browse files
committed
fix: update package.json and pnpm-lock.yaml to include Zod dependency and adjust type imports
1 parent fd4b241 commit 360cb47

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

examples/plugin-bi/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build": "tsc"
99
},
1010
"dependencies": {
11-
"@objectstack/spec": "workspace:*"
11+
"@objectstack/spec": "workspace:*",
12+
"zod": "^4.3.6"
1213
},
1314
"devDependencies": {
1415
"typescript": "^5.0.0"

examples/plugin-bi/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PluginDefinition, PluginContextData } from '@objectstack/spec/system';
1+
import { PluginDefinition } from '@objectstack/spec/system';
22

33
export class BiEngine {
44
constructor() {
@@ -19,7 +19,7 @@ const plugin: PluginDefinition = {
1919
id: 'com.objectstack.bi',
2020
version: '1.0.0',
2121

22-
onEnable: async (context: PluginContextData) => {
22+
onEnable: async (context) => {
2323
// 1. Destructure strict APIs
2424
const { logger, ql, os, app, storage, i18n } = context;
2525

packages/cli/src/commands/compile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import fs from 'fs';
44
import { pathToFileURL } from 'url';
55
import chalk from 'chalk';
66
import { bundleRequire } from 'bundle-require';
7+
import { ZodError } from 'zod';
78
import { ObjectStackDefinitionSchema } from '@objectstack/spec';
89

910
export const compileCommand = new Command('compile')
@@ -42,7 +43,8 @@ export const compileCommand = new Command('compile')
4243
if (!result.success) {
4344
console.error(chalk.red(`\n❌ Validation Failed!`));
4445

45-
result.error.errors.forEach(e => {
46+
const error = result.error as ZodError;
47+
error.issues.forEach((e: any) => {
4648
console.error(chalk.red(` - [${e.path.join('.')}] ${e.message}`));
4749
});
4850

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)