@objectstack/cli 0.7.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @objectstack/cli
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - # Upgrade to Zod v4 and Protocol Improvements
8
+
9
+ This release includes a major upgrade to the core validation engine (Zod v4) and aligns all protocol definitions with stricter type safety.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ - @objectstack/spec@1.0.0
15
+ - @objectstack/core@1.0.0
16
+ - @objectstack/plugin-hono-server@1.0.0
17
+
3
18
  ## 0.7.2
4
19
 
5
20
  ### Patch Changes
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  compileCommand
4
- } from "./chunk-RQRAZ23Z.js";
4
+ } from "./chunk-2YXVEYO7.js";
5
5
 
6
6
  // src/bin.ts
7
7
  import { Command as Command5 } from "commander";
@@ -441,9 +441,9 @@ var serveCommand = new Command4("serve").description("Start ObjectStack server w
441
441
  throw new Error(`Default export not found in ${configPath}`);
442
442
  }
443
443
  console.log(chalk4.green(`\u2713 Configuration loaded`));
444
- const { ObjectStackKernel } = await import("@objectstack/core");
444
+ const { ObjectKernel } = await import("@objectstack/core");
445
445
  console.log(chalk4.yellow(`\u{1F527} Initializing ObjectStack kernel...`));
446
- const kernel = new ObjectStackKernel({
446
+ const kernel = new ObjectKernel({
447
447
  metadata: config.metadata || {},
448
448
  objects: config.objects || {}
449
449
  });
@@ -33,7 +33,8 @@ var compileCommand = new Command("compile").description("Compile ObjectStack con
33
33
  if (!result.success) {
34
34
  console.error(chalk.red(`
35
35
  \u274C Validation Failed!`));
36
- result.error.errors.forEach((e) => {
36
+ const error = result.error;
37
+ error.issues.forEach((e) => {
37
38
  console.error(chalk.red(` - [${e.path.join(".")}] ${e.message}`));
38
39
  });
39
40
  process.exit(1);
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  compileCommand
4
- } from "./chunk-RQRAZ23Z.js";
4
+ } from "./chunk-2YXVEYO7.js";
5
5
  export {
6
6
  compileCommand
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/cli",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "Command Line Interface for ObjectStack Protocol",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -21,13 +21,13 @@
21
21
  "chalk": "^5.3.0",
22
22
  "commander": "^11.1.0",
23
23
  "tsx": "^4.7.1",
24
- "zod": "^3.22.4",
25
- "@objectstack/spec": "0.7.2",
26
- "@objectstack/core": "0.7.2",
27
- "@objectstack/plugin-hono-server": "0.7.2"
24
+ "zod": "^4.3.6",
25
+ "@objectstack/spec": "0.8.0",
26
+ "@objectstack/core": "0.8.0",
27
+ "@objectstack/plugin-hono-server": "0.8.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/node": "^20.11.19",
30
+ "@types/node": "^25.1.0",
31
31
  "tsup": "^8.0.2",
32
32
  "typescript": "^5.3.3"
33
33
  },
@@ -4,6 +4,7 @@ import fs from 'fs';
4
4
  import { pathToFileURL } from 'url';
5
5
  import chalk from 'chalk';
6
6
  import { bundleRequire } from 'bundle-require';
7
+ import { ZodError } from 'zod';
7
8
  import { ObjectStackDefinitionSchema } from '@objectstack/spec';
8
9
 
9
10
  export const compileCommand = new Command('compile')
@@ -42,7 +43,8 @@ export const compileCommand = new Command('compile')
42
43
  if (!result.success) {
43
44
  console.error(chalk.red(`\n❌ Validation Failed!`));
44
45
 
45
- result.error.errors.forEach(e => {
46
+ const error = result.error as ZodError;
47
+ error.issues.forEach((e: any) => {
46
48
  console.error(chalk.red(` - [${e.path.join('.')}] ${e.message}`));
47
49
  });
48
50
 
@@ -39,11 +39,11 @@ export const serveCommand = new Command('serve')
39
39
  console.log(chalk.green(`✓ Configuration loaded`));
40
40
 
41
41
  // Import ObjectStack runtime
42
- const { ObjectStackKernel } = await import('@objectstack/core');
42
+ const { ObjectKernel } = await import('@objectstack/core');
43
43
 
44
44
  // Create kernel instance
45
45
  console.log(chalk.yellow(`🔧 Initializing ObjectStack kernel...`));
46
- const kernel = new ObjectStackKernel({
46
+ const kernel = new ObjectKernel({
47
47
  metadata: config.metadata || {},
48
48
  objects: config.objects || {},
49
49
  });