@kevisual/router 0.1.2 → 0.1.3

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/dist/app.js CHANGED
@@ -17248,7 +17248,7 @@ config(en_default());
17248
17248
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
17249
17249
  var zod_default = exports_external;
17250
17250
 
17251
- // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
17251
+ // ../../node_modules/.pnpm/nanoid@5.1.7/node_modules/nanoid/index.js
17252
17252
  import { webcrypto as crypto } from "node:crypto";
17253
17253
  var POOL_SIZE_MULTIPLIER = 128;
17254
17254
  var pool;
@@ -20075,7 +20075,7 @@ app
20075
20075
  10. **中间件找不到会返回 404**,错误信息中会包含找不到的中间件列表。
20076
20076
  `;
20077
20077
  // package.json
20078
- var version2 = "0.1.1";
20078
+ var version2 = "0.1.2";
20079
20079
 
20080
20080
  // agent/routes/route-create.ts
20081
20081
  app.route({
@@ -811,6 +811,7 @@ declare const parse: (opts: {
811
811
  username?: string;
812
812
  id?: string;
813
813
  };
814
+ exitOnEnd?: boolean;
814
815
  }) => Promise<void>;
815
816
 
816
817
  export { createCommand, groupByPath, parse, parseArgs, parseDescription };
package/dist/commander.js CHANGED
@@ -2737,7 +2737,7 @@ var createCommand2 = (opts) => {
2737
2737
  }
2738
2738
  };
2739
2739
  var parse = async (opts) => {
2740
- const { description, parse: parse2 = true, version } = opts;
2740
+ const { description, parse: parse2 = true, version, exitOnEnd = true } = opts;
2741
2741
  const app = opts.app;
2742
2742
  const _program = opts.program || program;
2743
2743
  _program.description(description || "Router 命令行工具");
@@ -2778,7 +2778,10 @@ var parse = async (opts) => {
2778
2778
  return;
2779
2779
  }
2780
2780
  if (parse2) {
2781
- _program.parse(process.argv);
2781
+ await _program.parseAsync(process.argv);
2782
+ if (exitOnEnd) {
2783
+ process.exit(0);
2784
+ }
2782
2785
  }
2783
2786
  };
2784
2787
  export {
package/dist/opencode.js CHANGED
@@ -14774,7 +14774,7 @@ function date4(params) {
14774
14774
 
14775
14775
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
14776
14776
  config(en_default());
14777
- // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
14777
+ // ../../node_modules/.pnpm/nanoid@5.1.7/node_modules/nanoid/index.js
14778
14778
  import { webcrypto as crypto } from "node:crypto";
14779
14779
  var POOL_SIZE_MULTIPLIER = 128;
14780
14780
  var pool;
@@ -32534,7 +32534,7 @@ function date4(params) {
32534
32534
 
32535
32535
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
32536
32536
  config(en_default());
32537
- // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.browser.js
32537
+ // ../../node_modules/.pnpm/nanoid@5.1.7/node_modules/nanoid/index.browser.js
32538
32538
  var random2 = (bytes) => crypto.getRandomValues(new Uint8Array(bytes));
32539
32539
  var customRandom = (alphabet, defaultSize, getRandom) => {
32540
32540
  let mask = (2 << Math.log2(alphabet.length - 1)) - 1;
package/dist/router.js CHANGED
@@ -17245,7 +17245,7 @@ function date4(params) {
17245
17245
 
17246
17246
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
17247
17247
  config(en_default());
17248
- // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
17248
+ // ../../node_modules/.pnpm/nanoid@5.1.7/node_modules/nanoid/index.js
17249
17249
  import { webcrypto as crypto } from "node:crypto";
17250
17250
  var POOL_SIZE_MULTIPLIER = 128;
17251
17251
  var pool;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@kevisual/router",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "description": "",
6
6
  "type": "module",
7
7
  "main": "./dist/router.js",
@@ -30,7 +30,7 @@
30
30
  "@kevisual/query": "^0.0.53",
31
31
  "@kevisual/remote-app": "^0.0.7",
32
32
  "@kevisual/use-config": "^1.0.30",
33
- "@opencode-ai/plugin": "^1.2.26",
33
+ "@opencode-ai/plugin": "^1.2.27",
34
34
  "@types/bun": "^1.3.10",
35
35
  "@types/crypto-js": "^4.2.2",
36
36
  "@types/node": "^25.5.0",
@@ -43,7 +43,7 @@
43
43
  "eventemitter3": "^5.0.4",
44
44
  "fast-glob": "^3.3.3",
45
45
  "hono": "^4.12.8",
46
- "nanoid": "^5.1.6",
46
+ "nanoid": "^5.1.7",
47
47
  "path-to-regexp": "^8.3.0",
48
48
  "send": "^1.2.1",
49
49
  "typescript": "^5.9.3",
package/src/commander.ts CHANGED
@@ -124,9 +124,10 @@ export const parse = async (opts: {
124
124
  token?: string,
125
125
  username?: string,
126
126
  id?: string,
127
- }
127
+ },
128
+ exitOnEnd?: boolean,
128
129
  }) => {
129
- const { description, parse = true, version } = opts;
130
+ const { description, parse = true, version, exitOnEnd = true } = opts;
130
131
  const app = opts.app as App;
131
132
  const _program = opts.program || program;
132
133
  _program.description(description || 'Router 命令行工具');
@@ -167,9 +168,12 @@ export const parse = async (opts: {
167
168
  remoteApp.listenProxy();
168
169
  console.log('已连接到远程应用,正在监听命令...');
169
170
  }
170
- return
171
+ return;
171
172
  }
172
173
  if (parse) {
173
- _program.parse(process.argv);
174
+ await _program.parseAsync(process.argv);
175
+ if (exitOnEnd) {
176
+ process.exit(0);
177
+ }
174
178
  }
175
179
  }