@coze-arch/cli 0.0.26 → 0.0.28-alpha.873784

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.
@@ -1,2 +1,8 @@
1
1
  packages:
2
2
  - 'server'
3
+
4
+ overrides:
5
+ esbuild: 0.27.2
6
+
7
+ patchedDependencies:
8
+ '@tarojs/plugin-mini-ci@4.1.9': patches/@tarojs__plugin-mini-ci@4.1.9.patch
@@ -1,6 +1,10 @@
1
1
 
2
2
 
3
3
 
4
+ import { spawn } from 'child_process';
5
+ import { resolve, join, basename } from 'path';
6
+ import { appendFileSync, openSync, closeSync, mkdirSync } from 'fs';
7
+
4
8
 
5
9
 
6
10
 
@@ -57,6 +61,59 @@ const config = {
57
61
  onAfterRender: async (_context, _outputPath) => {
58
62
  // 输出由 init 命令统一处理
59
63
  },
64
+ onComplete: async (_context, outputPath) => {
65
+ // Skip pnpm update in test environment to avoid monorepo workspace issues
66
+ if (process.env.NODE_ENV === 'test') {
67
+ console.log('⊘ Skipping dependency update in test environment');
68
+ return;
69
+ }
70
+
71
+ const cmd = 'pnpm';
72
+ const args = ['-r', 'up', 'coze-coding-dev-sdk@^0.7.0'];
73
+ console.log(
74
+ `\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
75
+ );
76
+
77
+ try {
78
+ const projectRoot = resolve(outputPath);
79
+
80
+ // Determine log directory
81
+ const logDir = process.env.COZE_LOG_DIR || resolve(__dirname, '../.log');
82
+ mkdirSync(logDir, { recursive: true });
83
+
84
+ // Use project name in log file to avoid conflicts
85
+ const projectName = basename(projectRoot);
86
+ const logFile = join(logDir, `${projectName}-init.log`);
87
+
88
+ // Write log header
89
+ const timestamp = new Date().toISOString();
90
+ appendFileSync(
91
+ logFile,
92
+ `\n=== [${timestamp}] ${cmd} ${args.join(' ')} ===\n`,
93
+ );
94
+
95
+ // Open log file for appending
96
+ const logFd = openSync(logFile, 'a');
97
+
98
+ // Spawn in detached mode
99
+ const child = spawn(cmd, args, {
100
+ cwd: projectRoot,
101
+ detached: true,
102
+ stdio: ['ignore', logFd, logFd],
103
+ });
104
+
105
+ child.unref();
106
+ closeSync(logFd);
107
+
108
+ console.log(
109
+ '✓ coze-coding-dev-sdk update triggered (running in background)',
110
+ );
111
+ console.log(` Log file: ${logFile}`);
112
+ } catch (error) {
113
+ console.error('✗ Failed to trigger coze-coding-dev-sdk update:', error);
114
+ console.log(' You can manually run: pnpm update coze-coding-dev-sdk');
115
+ }
116
+ },
60
117
  };
61
118
 
62
119
  export default config;
@@ -66,5 +66,6 @@ Thumbs.db
66
66
  .vite/
67
67
 
68
68
  .coze-logs
69
+ .codegraph/
69
70
  .cozeproj/reduction
70
71
  .preview
package/lib/cli.js CHANGED
@@ -2107,7 +2107,7 @@ const EventBuilder = {
2107
2107
  };
2108
2108
 
2109
2109
  var name = "@coze-arch/cli";
2110
- var version = "0.0.26";
2110
+ var version = "0.0.28-alpha.873784";
2111
2111
  var description = "coze coding devtools cli";
2112
2112
  var license = "MIT";
2113
2113
  var author = "fanwenjie.fe@bytedance.com";
@@ -2145,14 +2145,14 @@ var scripts = {
2145
2145
  };
2146
2146
  var dependencies = {
2147
2147
  "@iarna/toml": "^2.2.5",
2148
- ajv: "^8.17.1",
2148
+ ajv: "^8.20.0",
2149
2149
  "ajv-formats": "^3.0.1",
2150
2150
  "change-case": "^5.4.4",
2151
2151
  commander: "~12.1.0",
2152
2152
  debug: "^4.4.3",
2153
2153
  ejs: "^3.1.10",
2154
2154
  "fast-glob": "^3.3.3",
2155
- "js-yaml": "^4.1.0",
2155
+ "js-yaml": "^4.2.0",
2156
2156
  minimist: "^1.2.5",
2157
2157
  shelljs: "^0.10.0"
2158
2158
  };
@@ -2166,13 +2166,12 @@ var devDependencies = {
2166
2166
  "@coze-arch/ts-config": "workspace:*",
2167
2167
  "@coze-arch/vitest-config": "workspace:*",
2168
2168
  "@coze-coding/lambda": "workspace:*",
2169
- "@emnapi/runtime": "^1.7.1",
2169
+ "@emnapi/runtime": "^1.10.0",
2170
2170
  "@inquirer/prompts": "^3.2.0",
2171
2171
  "@rollup/plugin-commonjs": "^28.0.2",
2172
2172
  "@rollup/plugin-json": "~6.0.0",
2173
2173
  "@rollup/plugin-node-resolve": "^15.3.0",
2174
- "@rollup/plugin-sucrase": "^5.0.2",
2175
- "@slardar/rd-cli": "^0.10.3",
2174
+ "@rollup/plugin-sucrase": "^5.1.0",
2176
2175
  "@types/debug": "^4.1.13",
2177
2176
  "@types/ejs": "^3.1.5",
2178
2177
  "@types/iarna__toml": "^2.0.5",
@@ -2182,12 +2181,12 @@ var devDependencies = {
2182
2181
  "@types/shelljs": "^0.10.0",
2183
2182
  "@vitest/coverage-v8": "~4.1.7",
2184
2183
  knip: "^5.30.1",
2185
- minimatch: "^10.0.1",
2184
+ minimatch: "^10.2.5",
2186
2185
  playwright: "~1.60.0",
2187
2186
  rollup: "^4.60.1",
2188
2187
  sucrase: "^3.35.1",
2189
2188
  "tree-kill": "^1.2.2",
2190
- tsx: "^4.21.0",
2189
+ tsx: "^4.22.4",
2191
2190
  vitest: "~4.1.7"
2192
2191
  };
2193
2192
  var publishConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.26",
3
+ "version": "0.0.28-alpha.873784",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",
@@ -38,14 +38,14 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@iarna/toml": "^2.2.5",
41
- "ajv": "^8.17.1",
41
+ "ajv": "^8.20.0",
42
42
  "ajv-formats": "^3.0.1",
43
43
  "change-case": "^5.4.4",
44
44
  "commander": "~12.1.0",
45
45
  "debug": "^4.4.3",
46
46
  "ejs": "^3.1.10",
47
47
  "fast-glob": "^3.3.3",
48
- "js-yaml": "^4.1.0",
48
+ "js-yaml": "^4.2.0",
49
49
  "minimist": "^1.2.5",
50
50
  "shelljs": "^0.10.0"
51
51
  },
@@ -59,13 +59,12 @@
59
59
  "@coze-arch/ts-config": "workspace:*",
60
60
  "@coze-arch/vitest-config": "workspace:*",
61
61
  "@coze-coding/lambda": "workspace:*",
62
- "@emnapi/runtime": "^1.7.1",
62
+ "@emnapi/runtime": "^1.10.0",
63
63
  "@inquirer/prompts": "^3.2.0",
64
64
  "@rollup/plugin-commonjs": "^28.0.2",
65
65
  "@rollup/plugin-json": "~6.0.0",
66
66
  "@rollup/plugin-node-resolve": "^15.3.0",
67
- "@rollup/plugin-sucrase": "^5.0.2",
68
- "@slardar/rd-cli": "^0.10.3",
67
+ "@rollup/plugin-sucrase": "^5.1.0",
69
68
  "@types/debug": "^4.1.13",
70
69
  "@types/ejs": "^3.1.5",
71
70
  "@types/iarna__toml": "^2.0.5",
@@ -75,12 +74,12 @@
75
74
  "@types/shelljs": "^0.10.0",
76
75
  "@vitest/coverage-v8": "~4.1.7",
77
76
  "knip": "^5.30.1",
78
- "minimatch": "^10.0.1",
77
+ "minimatch": "^10.2.5",
79
78
  "playwright": "~1.60.0",
80
79
  "rollup": "^4.60.1",
81
80
  "sucrase": "^3.35.1",
82
81
  "tree-kill": "^1.2.2",
83
- "tsx": "^4.21.0",
82
+ "tsx": "^4.22.4",
84
83
  "vitest": "~4.1.7"
85
84
  },
86
85
  "publishConfig": {