@chatbi-v/cli 2.0.2 → 2.0.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.
@@ -4,11 +4,11 @@ import {
4
4
  printBox,
5
5
  require_lib,
6
6
  require_picocolors
7
- } from "./chunk-Y24V4GQG.mjs";
7
+ } from "./chunk-2REG4NIZ.mjs";
8
8
  import {
9
9
  __toESM,
10
10
  init_esm_shims
11
- } from "./chunk-TX5M36S5.mjs";
11
+ } from "./chunk-6YO7P2EG.mjs";
12
12
 
13
13
  // src/commands/bench.ts
14
14
  init_esm_shims();
@@ -24,7 +24,7 @@ async function bench() {
24
24
  try {
25
25
  const initSpinner = createSpinner("\u6B63\u5728\u6D4B\u8BD5: \u521D\u59CB\u5316\u63D2\u4EF6\u9879\u76EE (init)...").start();
26
26
  const startInit = Date.now();
27
- const { init } = await import("./init-QFRFYEA5.mjs");
27
+ const { init } = await import("./init-P2UCTRNH.mjs");
28
28
  const testProjDir = path.join(tmpDir, "bench-proj");
29
29
  await init({ name: "bench-proj", projectType: "plugin", cwd: tmpDir });
30
30
  const endInit = Date.now();
@@ -37,7 +37,7 @@ async function bench() {
37
37
  });
38
38
  const syncSpinner = createSpinner("\u6B63\u5728\u6D4B\u8BD5: \u6C99\u7BB1\u73AF\u5883\u540C\u6B65 (sync)...").start();
39
39
  const startSync = Date.now();
40
- const { sync } = await import("./sync-7HPKGVFY.mjs");
40
+ const { sync } = await import("./sync-JWHGYK34.mjs");
41
41
  await sync({ cwd: testProjDir });
42
42
  const endSync = Date.now();
43
43
  const syncTime = (endSync - startSync) / 1e3;
@@ -49,7 +49,7 @@ async function bench() {
49
49
  });
50
50
  const buildSpinner = createSpinner("\u6B63\u5728\u6D4B\u8BD5: \u63D2\u4EF6\u9879\u76EE\u6784\u5EFA (build)...").start();
51
51
  const startBuild = Date.now();
52
- const { build } = await import("./build-UB4D3WNI.mjs");
52
+ const { build } = await import("./build-66EM7X52.mjs");
53
53
  const originalCwd = process.cwd();
54
54
  process.chdir(testProjDir);
55
55
  await build({ watch: false });
@@ -0,0 +1,11 @@
1
+ import {
2
+ build
3
+ } from "./chunk-7DA7PT2X.mjs";
4
+ import "./chunk-AQNFMKFL.mjs";
5
+ import "./chunk-DRBLMVU7.mjs";
6
+ import "./chunk-2IR4PJIP.mjs";
7
+ import "./chunk-2REG4NIZ.mjs";
8
+ import "./chunk-6YO7P2EG.mjs";
9
+ export {
10
+ build
11
+ };
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-TX5M36S5.mjs";
6
+ } from "./chunk-6YO7P2EG.mjs";
7
7
 
8
8
  // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
9
9
  var require_windows = __commonJS({
@@ -4,7 +4,7 @@ import {
4
4
  __require,
5
5
  __toESM,
6
6
  init_esm_shims
7
- } from "./chunk-TX5M36S5.mjs";
7
+ } from "./chunk-6YO7P2EG.mjs";
8
8
 
9
9
  // ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
10
10
  var require_picocolors = __commonJS({
@@ -33,12 +33,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
36
+ // ../../../../../../../opt/homebrew/lib/node_modules/@chatbi-v/cli/node_modules/tsup/assets/esm_shims.js
37
37
  import path from "path";
38
38
  import { fileURLToPath } from "url";
39
39
  var getFilename, getDirname, __dirname;
40
40
  var init_esm_shims = __esm({
41
- "../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js"() {
41
+ "../../../../../../../opt/homebrew/lib/node_modules/@chatbi-v/cli/node_modules/tsup/assets/esm_shims.js"() {
42
42
  "use strict";
43
43
  getFilename = () => fileURLToPath(import.meta.url);
44
44
  getDirname = () => path.dirname(getFilename());
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  CoreKit
3
- } from "./chunk-WIVHOK75.mjs";
3
+ } from "./chunk-AQNFMKFL.mjs";
4
4
  import {
5
5
  Sandbox
6
- } from "./chunk-7A54IJI5.mjs";
6
+ } from "./chunk-DRBLMVU7.mjs";
7
7
  import {
8
8
  execa
9
- } from "./chunk-SBGVKO4C.mjs";
9
+ } from "./chunk-2IR4PJIP.mjs";
10
10
  import {
11
11
  createSpinner,
12
12
  logger,
13
13
  printBox,
14
14
  require_lib,
15
15
  require_picocolors
16
- } from "./chunk-Y24V4GQG.mjs";
16
+ } from "./chunk-2REG4NIZ.mjs";
17
17
  import {
18
18
  __toESM,
19
19
  init_esm_shims
20
- } from "./chunk-TX5M36S5.mjs";
20
+ } from "./chunk-6YO7P2EG.mjs";
21
21
 
22
22
  // src/commands/build.ts
23
23
  init_esm_shims();
@@ -77,6 +77,11 @@ async function build(options) {
77
77
  }
78
78
  }
79
79
  const mode = await CoreKit.detectMode(cwd);
80
+ if (mode === "monorepo") {
81
+ logger.info("\u68C0\u6D4B\u5230 Monorepo \u9879\u76EE\uFF0C\u6B63\u5728\u9012\u5F52\u6784\u5EFA\u5B50\u5305...");
82
+ await execa("pnpm", ["-r", "build"], { stdio: "inherit", cwd });
83
+ return;
84
+ }
80
85
  if (mode === "app") {
81
86
  logger.info("\u6B63\u5728\u6784\u5EFA\u5E94\u7528 (Vite)...");
82
87
  const { build: viteBuild } = await import("vite");
@@ -92,7 +97,9 @@ async function build(options) {
92
97
  build: {
93
98
  watch: options.watch ? {} : null,
94
99
  outDir: "dist",
95
- emptyOutDir: true
100
+ emptyOutDir: true,
101
+ minify: !options.watch ? "esbuild" : false
102
+ // 生产环境开启压缩混淆
96
103
  },
97
104
  server: {
98
105
  fs: {
@@ -153,6 +160,8 @@ async function build(options) {
153
160
  target: "esnext",
154
161
  platform: isPlugin ? "browser" : "node",
155
162
  external,
163
+ minify: !options.watch,
164
+ // 生产环境开启压缩混淆
156
165
  watch: options.watch,
157
166
  silent: true,
158
167
  esbuildOptions(options2) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Sandbox
3
- } from "./chunk-7A54IJI5.mjs";
3
+ } from "./chunk-DRBLMVU7.mjs";
4
4
  import {
5
5
  createSpinner,
6
6
  getCliRoot,
@@ -8,13 +8,13 @@ import {
8
8
  printBox,
9
9
  require_lib,
10
10
  require_picocolors
11
- } from "./chunk-Y24V4GQG.mjs";
11
+ } from "./chunk-2REG4NIZ.mjs";
12
12
  import {
13
13
  __commonJS,
14
14
  __require,
15
15
  __toESM,
16
16
  init_esm_shims
17
- } from "./chunk-TX5M36S5.mjs";
17
+ } from "./chunk-6YO7P2EG.mjs";
18
18
 
19
19
  // ../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
20
20
  var require_kleur = __commonJS({
@@ -5023,8 +5023,8 @@ var CoreKit = class {
5023
5023
  }
5024
5024
  if (import_fs_extra2.default.existsSync(path2.join(cwd, "src/index.ts")) || import_fs_extra2.default.existsSync(path2.join(cwd, "src/index.tsx"))) {
5025
5025
  if (pkg.bin) return "lib";
5026
- if (pkg.peerDependencies?.react) return "plugin";
5027
- return "plugin";
5026
+ if (pkg.peerDependencies?.react && !pkg.dependencies?.react) return "plugin";
5027
+ return "lib";
5028
5028
  }
5029
5029
  return "app";
5030
5030
  }
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Sandbox
3
- } from "./chunk-7A54IJI5.mjs";
3
+ } from "./chunk-DRBLMVU7.mjs";
4
4
  import {
5
5
  execa
6
- } from "./chunk-SBGVKO4C.mjs";
6
+ } from "./chunk-2IR4PJIP.mjs";
7
7
  import {
8
8
  createSpinner,
9
9
  logger,
10
10
  printBox,
11
11
  require_picocolors
12
- } from "./chunk-Y24V4GQG.mjs";
12
+ } from "./chunk-2REG4NIZ.mjs";
13
13
  import {
14
14
  __toESM,
15
15
  init_esm_shims
16
- } from "./chunk-TX5M36S5.mjs";
16
+ } from "./chunk-6YO7P2EG.mjs";
17
17
 
18
18
  // src/commands/fetch.ts
19
19
  init_esm_shims();
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  sync
3
- } from "./chunk-4OD6C56P.mjs";
3
+ } from "./chunk-WUWYFYMG.mjs";
4
4
  import {
5
5
  require_prompts
6
- } from "./chunk-WIVHOK75.mjs";
6
+ } from "./chunk-AQNFMKFL.mjs";
7
7
  import {
8
8
  require_lib as require_lib2
9
- } from "./chunk-7A54IJI5.mjs";
9
+ } from "./chunk-DRBLMVU7.mjs";
10
10
  import {
11
11
  createSpinner,
12
12
  getCliRoot,
@@ -14,11 +14,11 @@ import {
14
14
  printBox,
15
15
  require_lib,
16
16
  require_picocolors
17
- } from "./chunk-Y24V4GQG.mjs";
17
+ } from "./chunk-2REG4NIZ.mjs";
18
18
  import {
19
19
  __toESM,
20
20
  init_esm_shims
21
- } from "./chunk-TX5M36S5.mjs";
21
+ } from "./chunk-6YO7P2EG.mjs";
22
22
 
23
23
  // src/commands/init.ts
24
24
  init_esm_shims();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  execa
3
- } from "./chunk-SBGVKO4C.mjs";
3
+ } from "./chunk-2IR4PJIP.mjs";
4
4
  import {
5
5
  createSpinner,
6
6
  getCliRoot,
@@ -8,13 +8,13 @@ import {
8
8
  printBox,
9
9
  require_lib,
10
10
  require_picocolors
11
- } from "./chunk-Y24V4GQG.mjs";
11
+ } from "./chunk-2REG4NIZ.mjs";
12
12
  import {
13
13
  __commonJS,
14
14
  __require,
15
15
  __toESM,
16
16
  init_esm_shims
17
- } from "./chunk-TX5M36S5.mjs";
17
+ } from "./chunk-6YO7P2EG.mjs";
18
18
 
19
19
  // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js
20
20
  var require_utils = __commonJS({
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  CoreKit
3
- } from "./chunk-WIVHOK75.mjs";
3
+ } from "./chunk-AQNFMKFL.mjs";
4
4
  import {
5
5
  Sandbox
6
- } from "./chunk-7A54IJI5.mjs";
6
+ } from "./chunk-DRBLMVU7.mjs";
7
7
  import {
8
8
  createSpinner,
9
9
  logger,
10
10
  printBox,
11
11
  require_lib,
12
12
  require_picocolors
13
- } from "./chunk-Y24V4GQG.mjs";
13
+ } from "./chunk-2REG4NIZ.mjs";
14
14
  import {
15
15
  __toESM,
16
16
  init_esm_shims
17
- } from "./chunk-TX5M36S5.mjs";
17
+ } from "./chunk-6YO7P2EG.mjs";
18
18
 
19
19
  // src/commands/sync.ts
20
20
  init_esm_shims();
@@ -101,6 +101,11 @@ async function build(options) {
101
101
  }
102
102
  // 3. 模式识别
103
103
  const mode = await corekit_1.CoreKit.detectMode(cwd);
104
+ if (mode === 'monorepo') {
105
+ utils_1.logger.info('检测到 Monorepo 项目,正在递归构建子包...');
106
+ await (0, execa_1.execa)('pnpm', ['-r', 'build'], { stdio: 'inherit', cwd });
107
+ return;
108
+ }
104
109
  if (mode === 'app') {
105
110
  // === App 模式构建 (Vite) ===
106
111
  utils_1.logger.info('正在构建应用 (Vite)...');
@@ -117,7 +122,8 @@ async function build(options) {
117
122
  build: {
118
123
  watch: options.watch ? {} : null,
119
124
  outDir: 'dist',
120
- emptyOutDir: true
125
+ emptyOutDir: true,
126
+ minify: !options.watch ? 'esbuild' : false // 生产环境开启压缩混淆
121
127
  },
122
128
  server: {
123
129
  fs: {
@@ -180,6 +186,7 @@ async function build(options) {
180
186
  target: 'esnext',
181
187
  platform: (isPlugin ? 'browser' : 'node'),
182
188
  external,
189
+ minify: !options.watch, // 生产环境开启压缩混淆
183
190
  watch: options.watch,
184
191
  silent: true,
185
192
  esbuildOptions(options) {
package/dist/corekit.js CHANGED
@@ -85,10 +85,11 @@ class CoreKit {
85
85
  // 如果有 bin 字段,通常是 Node 命令行工具或库
86
86
  if (pkg.bin)
87
87
  return 'lib';
88
- // 如果有 peerDependencies.react,通常是插件
89
- if (pkg.peerDependencies?.react)
88
+ // 如果有 peerDependencies.react 且没有 dependencies.react (或者显式声明了 plugin)
89
+ // 在 core/mocks 等基础包中,我们通常不希望它们被识别为 plugin
90
+ if (pkg.peerDependencies?.react && !pkg.dependencies?.react)
90
91
  return 'plugin';
91
- return 'plugin'; // 默认视为 plugin (即 lib 模式)
92
+ return 'lib'; // 默认视为 lib 模式,防止 core/mocks 等包被误判为 plugin
92
93
  }
93
94
  return 'app'; // 默认为 App 模式
94
95
  }
@@ -5,8 +5,8 @@ import {
5
5
  execaCommandSync,
6
6
  execaNode,
7
7
  execaSync
8
- } from "./chunk-SBGVKO4C.mjs";
9
- import "./chunk-TX5M36S5.mjs";
8
+ } from "./chunk-2IR4PJIP.mjs";
9
+ import "./chunk-6YO7P2EG.mjs";
10
10
  export {
11
11
  $,
12
12
  execa,
@@ -0,0 +1,10 @@
1
+ import {
2
+ fetch
3
+ } from "./chunk-B6J5VVNN.mjs";
4
+ import "./chunk-DRBLMVU7.mjs";
5
+ import "./chunk-2IR4PJIP.mjs";
6
+ import "./chunk-2REG4NIZ.mjs";
7
+ import "./chunk-6YO7P2EG.mjs";
8
+ export {
9
+ fetch
10
+ };
package/dist/index.cjs CHANGED
@@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  mod
33
33
  ));
34
34
 
35
- // ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
35
+ // ../../../../../../../opt/homebrew/lib/node_modules/@chatbi-v/cli/node_modules/tsup/assets/cjs_shims.js
36
36
  var init_cjs_shims = __esm({
37
- "../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js"() {
37
+ "../../../../../../../opt/homebrew/lib/node_modules/@chatbi-v/cli/node_modules/tsup/assets/cjs_shims.js"() {
38
38
  "use strict";
39
39
  }
40
40
  });
@@ -24820,8 +24820,8 @@ var init_corekit = __esm({
24820
24820
  }
24821
24821
  if (import_fs_extra4.default.existsSync(import_path4.default.join(cwd, "src/index.ts")) || import_fs_extra4.default.existsSync(import_path4.default.join(cwd, "src/index.tsx"))) {
24822
24822
  if (pkg.bin) return "lib";
24823
- if (pkg.peerDependencies?.react) return "plugin";
24824
- return "plugin";
24823
+ if (pkg.peerDependencies?.react && !pkg.dependencies?.react) return "plugin";
24824
+ return "lib";
24825
24825
  }
24826
24826
  return "app";
24827
24827
  }
@@ -25141,6 +25141,11 @@ async function build(options) {
25141
25141
  }
25142
25142
  }
25143
25143
  const mode = await CoreKit.detectMode(cwd);
25144
+ if (mode === "monorepo") {
25145
+ logger.info("\u68C0\u6D4B\u5230 Monorepo \u9879\u76EE\uFF0C\u6B63\u5728\u9012\u5F52\u6784\u5EFA\u5B50\u5305...");
25146
+ await execa("pnpm", ["-r", "build"], { stdio: "inherit", cwd });
25147
+ return;
25148
+ }
25144
25149
  if (mode === "app") {
25145
25150
  logger.info("\u6B63\u5728\u6784\u5EFA\u5E94\u7528 (Vite)...");
25146
25151
  const { build: viteBuild } = await import("vite");
@@ -25156,7 +25161,9 @@ async function build(options) {
25156
25161
  build: {
25157
25162
  watch: options.watch ? {} : null,
25158
25163
  outDir: "dist",
25159
- emptyOutDir: true
25164
+ emptyOutDir: true,
25165
+ minify: !options.watch ? "esbuild" : false
25166
+ // 生产环境开启压缩混淆
25160
25167
  },
25161
25168
  server: {
25162
25169
  fs: {
@@ -25217,6 +25224,8 @@ async function build(options) {
25217
25224
  target: "esnext",
25218
25225
  platform: isPlugin ? "browser" : "node",
25219
25226
  external,
25227
+ minify: !options.watch,
25228
+ // 生产环境开启压缩混淆
25220
25229
  watch: options.watch,
25221
25230
  silent: true,
25222
25231
  esbuildOptions(options2) {
@@ -27143,7 +27152,7 @@ async function install(target) {
27143
27152
  // package.json
27144
27153
  var package_default = {
27145
27154
  name: "@chatbi-v/cli",
27146
- version: "2.0.2",
27155
+ version: "2.0.3",
27147
27156
  description: "Standardized CLI tooling for ChatBI Monorepo",
27148
27157
  main: "dist/index.js",
27149
27158
  bin: {
package/dist/index.mjs CHANGED
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-WCPZB47I.mjs";
3
+ } from "./chunk-7DA7PT2X.mjs";
4
4
  import {
5
5
  init
6
- } from "./chunk-LJFX6MNO.mjs";
6
+ } from "./chunk-BMUJH4OW.mjs";
7
7
  import {
8
8
  sync
9
- } from "./chunk-4OD6C56P.mjs";
9
+ } from "./chunk-WUWYFYMG.mjs";
10
10
  import {
11
11
  ConfigManager,
12
12
  CoreKit,
13
13
  require_prompts
14
- } from "./chunk-WIVHOK75.mjs";
14
+ } from "./chunk-AQNFMKFL.mjs";
15
15
  import {
16
16
  fetch
17
- } from "./chunk-V7IEPMC4.mjs";
17
+ } from "./chunk-B6J5VVNN.mjs";
18
18
  import {
19
19
  Sandbox,
20
20
  require_lib as require_lib2
21
- } from "./chunk-7A54IJI5.mjs";
21
+ } from "./chunk-DRBLMVU7.mjs";
22
22
  import {
23
23
  execa
24
- } from "./chunk-SBGVKO4C.mjs";
24
+ } from "./chunk-2IR4PJIP.mjs";
25
25
  import {
26
26
  boxen,
27
27
  createSpinner,
@@ -31,12 +31,12 @@ import {
31
31
  require_lib,
32
32
  require_picocolors,
33
33
  source_default
34
- } from "./chunk-Y24V4GQG.mjs";
34
+ } from "./chunk-2REG4NIZ.mjs";
35
35
  import {
36
36
  __commonJS,
37
37
  __toESM,
38
38
  init_esm_shims
39
- } from "./chunk-TX5M36S5.mjs";
39
+ } from "./chunk-6YO7P2EG.mjs";
40
40
 
41
41
  // ../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/cjs/tinycolor.js
42
42
  var require_tinycolor = __commonJS({
@@ -2359,7 +2359,7 @@ async function doctor(options = {}) {
2359
2359
  logger.success(`Node.js \u7248\u672C: ${nodeVersion}`);
2360
2360
  }
2361
2361
  try {
2362
- const { execa: execa2 } = await import("./execa-METROS6Z.mjs");
2362
+ const { execa: execa2 } = await import("./execa-GD72AH35.mjs");
2363
2363
  const { stdout: pnpmVer } = await execa2("pnpm", ["-v"]);
2364
2364
  logger.success(`pnpm \u7248\u672C: ${pnpmVer}`);
2365
2365
  } catch (e) {
@@ -2506,7 +2506,7 @@ ${import_picocolors3.default.cyan("\u5EFA\u8BAE\u6839\u636E\u63D0\u793A\u8FDB\u8
2506
2506
  fixSpinner.succeed("\u4EE3\u7801\u4FEE\u590D\u5B8C\u6210");
2507
2507
  }
2508
2508
  logger.info("\u6B63\u5728\u4FEE\u590D\u73AF\u5883\u914D\u7F6E...");
2509
- const { sync: sync2 } = await import("./sync-7HPKGVFY.mjs");
2509
+ const { sync: sync2 } = await import("./sync-JWHGYK34.mjs");
2510
2510
  await sync2({ force: true });
2511
2511
  logger.success("\u81EA\u52A8\u4FEE\u590D\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u8FD0\u884C\u8BCA\u65AD\u3002");
2512
2512
  }
@@ -2632,7 +2632,7 @@ async function install(target) {
2632
2632
  throw e;
2633
2633
  }
2634
2634
  } else {
2635
- const { fetch: fetch2 } = await import("./fetch-7X2UFWIV.mjs");
2635
+ const { fetch: fetch2 } = await import("./fetch-4EUKQD7S.mjs");
2636
2636
  await fetch2(target);
2637
2637
  }
2638
2638
  }
@@ -2640,7 +2640,7 @@ async function install(target) {
2640
2640
  // package.json
2641
2641
  var package_default = {
2642
2642
  name: "@chatbi-v/cli",
2643
- version: "2.0.2",
2643
+ version: "2.0.3",
2644
2644
  description: "Standardized CLI tooling for ChatBI Monorepo",
2645
2645
  main: "dist/index.js",
2646
2646
  bin: {
@@ -2739,7 +2739,7 @@ cli.command("add [name]", "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u6DFB\u52A0\u4E0
2739
2739
  });
2740
2740
  }, "add"));
2741
2741
  cli.command("update [targetVersion]", "\u66F4\u65B0\u5185\u6838\u7248\u672C").alias("up").action(wrapAction(async (targetVersion) => {
2742
- const { sync: sync2 } = await import("./sync-7HPKGVFY.mjs");
2742
+ const { sync: sync2 } = await import("./sync-JWHGYK34.mjs");
2743
2743
  await sync2({ version: targetVersion, force: true });
2744
2744
  logger.success("\u66F4\u65B0\u5B8C\u6210\uFF01");
2745
2745
  }, "update"));
@@ -2754,7 +2754,7 @@ cli.command("use <version>", "\u5207\u6362\u5F53\u524D\u9879\u76EE\u4F7F\u7528\u
2754
2754
  cli.command("gl", "\u4F7F\u7528 AI \u811A\u624B\u67B6\u751F\u6210\u4EE3\u7801\u6216\u6587\u6863").option("-t, --type <type>", "\u751F\u6210\u7C7B\u578B (plugin|util|doc|component)").option("-p, --prompt <prompt>", "AI \u9700\u6C42\u63CF\u8FF0").action(wrapAction(gl, "gl"));
2755
2755
  cli.command("discover", "\u626B\u63CF\u5E76\u53D1\u73B0\u5F53\u524D\u9879\u76EE\u4E2D\u7684\u63D2\u4EF6").action(wrapAction(discover, "discover"));
2756
2756
  cli.command("bench", "\u8FD0\u884C CLI \u6027\u80FD\u57FA\u51C6\u6D4B\u8BD5").action(wrapAction(async () => {
2757
- const { bench } = await import("./bench-ACSHVGHE.mjs");
2757
+ const { bench } = await import("./bench-NMQTZVQF.mjs");
2758
2758
  await bench();
2759
2759
  }, "bench"));
2760
2760
  cli.help((sections) => {
@@ -0,0 +1,12 @@
1
+ import {
2
+ init
3
+ } from "./chunk-BMUJH4OW.mjs";
4
+ import "./chunk-WUWYFYMG.mjs";
5
+ import "./chunk-AQNFMKFL.mjs";
6
+ import "./chunk-DRBLMVU7.mjs";
7
+ import "./chunk-2IR4PJIP.mjs";
8
+ import "./chunk-2REG4NIZ.mjs";
9
+ import "./chunk-6YO7P2EG.mjs";
10
+ export {
11
+ init
12
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ sync
3
+ } from "./chunk-WUWYFYMG.mjs";
4
+ import "./chunk-AQNFMKFL.mjs";
5
+ import "./chunk-DRBLMVU7.mjs";
6
+ import "./chunk-2IR4PJIP.mjs";
7
+ import "./chunk-2REG4NIZ.mjs";
8
+ import "./chunk-6YO7P2EG.mjs";
9
+ export {
10
+ sync
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbi-v/cli",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Standardized CLI tooling for ChatBI Monorepo",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -12,8 +12,8 @@
12
12
  "dependencies": {
13
13
  "@ant-design/icons": "^5.2.6",
14
14
  "@ant-design/x": "^2.1.1",
15
- "@chatbi-v/core":"^2.0.2",
16
- "@chatbi-v/mocks":"^2.0.2",
15
+ "@chatbi-v/core": "^2.0.3",
16
+ "@chatbi-v/mocks": "^2.0.3",
17
17
  "antd": "^5.29.3",
18
18
  "react": "^18.3.1",
19
19
  "react-dom": "^18.3.1",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "plugin": true,
23
23
  "peerDependencies": {
24
- "@chatbi-v/core": "^2.0.2",
24
+ "@chatbi-v/core": "^2.0.3",
25
25
  "antd": "^5.20.0",
26
- "react": "^18.3.1",
27
- "react-dom": "^18.3.1"
26
+ "react": ">=18.0.0",
27
+ "react-dom": ">=18.0.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@chatbi-v/core": "^2.0.2",
31
- "@chatbi-v/tsconfig": "^2.0.2",
30
+ "@chatbi-v/core": "^2.0.3",
31
+ "@chatbi-v/tsconfig": "^2.0.3",
32
32
  "tsup": "^8.5.1",
33
33
  "vite": "^5.0.0"
34
34
  }
@@ -3,7 +3,7 @@
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "rootDir": "./src",
6
- "moduleResolution": "node",
6
+ "moduleResolution": "bundler",
7
7
  "composite": true
8
8
  },
9
9
  "include": ["src"]
@@ -1,11 +0,0 @@
1
- import {
2
- build
3
- } from "./chunk-WCPZB47I.mjs";
4
- import "./chunk-WIVHOK75.mjs";
5
- import "./chunk-7A54IJI5.mjs";
6
- import "./chunk-SBGVKO4C.mjs";
7
- import "./chunk-Y24V4GQG.mjs";
8
- import "./chunk-TX5M36S5.mjs";
9
- export {
10
- build
11
- };
@@ -1,10 +0,0 @@
1
- import {
2
- fetch
3
- } from "./chunk-V7IEPMC4.mjs";
4
- import "./chunk-7A54IJI5.mjs";
5
- import "./chunk-SBGVKO4C.mjs";
6
- import "./chunk-Y24V4GQG.mjs";
7
- import "./chunk-TX5M36S5.mjs";
8
- export {
9
- fetch
10
- };
@@ -1,12 +0,0 @@
1
- import {
2
- init
3
- } from "./chunk-LJFX6MNO.mjs";
4
- import "./chunk-4OD6C56P.mjs";
5
- import "./chunk-WIVHOK75.mjs";
6
- import "./chunk-7A54IJI5.mjs";
7
- import "./chunk-SBGVKO4C.mjs";
8
- import "./chunk-Y24V4GQG.mjs";
9
- import "./chunk-TX5M36S5.mjs";
10
- export {
11
- init
12
- };
@@ -1,11 +0,0 @@
1
- import {
2
- sync
3
- } from "./chunk-4OD6C56P.mjs";
4
- import "./chunk-WIVHOK75.mjs";
5
- import "./chunk-7A54IJI5.mjs";
6
- import "./chunk-SBGVKO4C.mjs";
7
- import "./chunk-Y24V4GQG.mjs";
8
- import "./chunk-TX5M36S5.mjs";
9
- export {
10
- sync
11
- };