@chatbi-v/cli 2.0.5 → 2.0.6

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -20
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1,11 +1,5 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
- }) : x)(function(x) {
6
- if (typeof require !== "undefined") return require.apply(this, arguments);
7
- throw Error('Dynamic require of "' + x + '" is not supported');
8
- });
9
3
  var __esm = (fn, res) => function __init() {
10
4
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
5
  };
@@ -14,32 +8,31 @@ var __export = (target, all) => {
14
8
  __defProp(target, name, { get: all[name], enumerable: true });
15
9
  };
16
10
 
17
- // ../../../chatbi-v/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
11
+ // ../../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
18
12
  import path from "path";
19
13
  import { fileURLToPath } from "url";
20
- var getFilename, getDirname, __dirname;
21
14
  var init_esm_shims = __esm({
22
- "../../../chatbi-v/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"() {
15
+ "../../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"() {
23
16
  "use strict";
24
- getFilename = () => fileURLToPath(import.meta.url);
25
- getDirname = () => path.dirname(getFilename());
26
- __dirname = /* @__PURE__ */ getDirname();
27
17
  }
28
18
  });
29
19
 
30
20
  // src/utils.ts
31
21
  import path2 from "path";
22
+ import { createRequire } from "module";
23
+ import { fileURLToPath as fileURLToPath2 } from "url";
32
24
  import fs from "fs-extra";
33
25
  import pc from "picocolors";
34
26
  import ora from "ora";
35
27
  import boxen from "boxen";
36
- var _require, _dirname, logger, createSpinner, printBox, findPackageRoot, getCliRoot;
28
+ var _require, _filename, _dirname, logger, createSpinner, printBox, findPackageRoot, getCliRoot;
37
29
  var init_utils = __esm({
38
30
  "src/utils.ts"() {
39
31
  "use strict";
40
32
  init_esm_shims();
41
- _require = __require;
42
- _dirname = __dirname;
33
+ _require = createRequire(import.meta.url);
34
+ _filename = fileURLToPath2(import.meta.url);
35
+ _dirname = path2.dirname(_filename);
43
36
  logger = {
44
37
  info: (msg) => console.log(pc.cyan(`\u2139 ${msg}`)),
45
38
  success: (msg) => console.log(pc.green(`\u2714 ${msg}`)),
@@ -927,12 +920,13 @@ var init_config = __esm({
927
920
  });
928
921
 
929
922
  // src/corekit.ts
923
+ import { createRequire as createRequire2 } from "module";
930
924
  import path10 from "path";
931
925
  import fs8 from "fs-extra";
932
926
  import pc4 from "picocolors";
933
927
  import prompts from "prompts";
934
928
  import fg3 from "fast-glob";
935
- var CoreKit;
929
+ var nativeRequire, CoreKit;
936
930
  var init_corekit = __esm({
937
931
  "src/corekit.ts"() {
938
932
  "use strict";
@@ -940,6 +934,7 @@ var init_corekit = __esm({
940
934
  init_utils();
941
935
  init_sandbox();
942
936
  init_config();
937
+ nativeRequire = createRequire2(import.meta.url);
943
938
  CoreKit = class {
944
939
  /**
945
940
  * 解析项目模式
@@ -1119,8 +1114,8 @@ ${pc4.gray("Root: ")} ${pc4.white(cwd)}`,
1119
1114
  css: {
1120
1115
  postcss: {
1121
1116
  plugins: [
1122
- __require(tailwindPath)({
1123
- presets: [__require(path10.join(sandboxNodeModules, "@chatbi-v/tailwind-config"))],
1117
+ nativeRequire(tailwindPath)({
1118
+ presets: [nativeRequire(path10.join(sandboxNodeModules, "@chatbi-v/tailwind-config"))],
1124
1119
  darkMode: "class",
1125
1120
  content: [
1126
1121
  path10.join(shellDir, "index.html"),
@@ -1128,7 +1123,7 @@ ${pc4.gray("Root: ")} ${pc4.white(cwd)}`,
1128
1123
  path10.join(pluginDir, "src/**/*.{ts,tsx}")
1129
1124
  ]
1130
1125
  }),
1131
- __require(autoprefixerPath)
1126
+ nativeRequire(autoprefixerPath)
1132
1127
  ]
1133
1128
  }
1134
1129
  },
@@ -1936,6 +1931,11 @@ import fs12 from "fs-extra";
1936
1931
  import path14 from "path";
1937
1932
  import pc8 from "picocolors";
1938
1933
  import prompts3 from "prompts";
1934
+ import { createRequire as createRequire3 } from "module";
1935
+ import { fileURLToPath as fileURLToPath3 } from "url";
1936
+ var _require2 = createRequire3(import.meta.url);
1937
+ var _filename2 = fileURLToPath3(import.meta.url);
1938
+ var _dirname2 = path14.dirname(_filename2);
1939
1939
  async function add(options) {
1940
1940
  let { name, type, displayName, description } = options;
1941
1941
  const cwd = process.cwd();
@@ -2523,7 +2523,7 @@ async function clean(options) {
2523
2523
  // package.json
2524
2524
  var package_default = {
2525
2525
  name: "@chatbi-v/cli",
2526
- version: "2.0.5",
2526
+ version: "2.0.6",
2527
2527
  description: "Standardized CLI tooling for ChatBI Monorepo",
2528
2528
  type: "module",
2529
2529
  main: "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbi-v/cli",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Standardized CLI tooling for ChatBI Monorepo",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,6 +17,11 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
+ "scripts": {
21
+ "build": "tsup",
22
+ "dev": "tsup --watch",
23
+ "test": "vitest"
24
+ },
20
25
  "dependencies": {
21
26
  "boxen": "^8.0.1",
22
27
  "cac": "^6.7.14",
@@ -44,10 +49,5 @@
44
49
  "@vitest/coverage-v8": "1.6.1",
45
50
  "tsup": "^8.5.1",
46
51
  "vitest": "^1.0.0"
47
- },
48
- "scripts": {
49
- "build": "tsup",
50
- "dev": "tsup --watch",
51
- "test": "vitest"
52
52
  }
53
- }
53
+ }