@blocklet/component-studio-cli 0.4.153 → 0.4.155
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/commands/dev.js
CHANGED
package/dist/utils/helper.js
CHANGED
|
@@ -105,22 +105,26 @@ export async function installDependencies(dirs, operation = 'install') {
|
|
|
105
105
|
const installPromises = Object.entries(dirs).map(([dirType, dirPath]) => {
|
|
106
106
|
return new Promise((resolve, reject) => {
|
|
107
107
|
let errorOutput = '';
|
|
108
|
-
const
|
|
108
|
+
const depProcess = spawn('pnpm', ['update:deps'], {
|
|
109
109
|
cwd: dirPath,
|
|
110
110
|
stdio: 'inherit',
|
|
111
|
+
env: {
|
|
112
|
+
...process.env,
|
|
113
|
+
NODE_ENV: 'development',
|
|
114
|
+
},
|
|
111
115
|
});
|
|
112
116
|
// 收集错误输出
|
|
113
|
-
|
|
117
|
+
depProcess.stderr?.on('data', (data) => {
|
|
114
118
|
errorOutput += data.toString();
|
|
115
119
|
});
|
|
116
120
|
// 收集标准输出(可能包含错误信息)
|
|
117
|
-
|
|
121
|
+
depProcess.stdout?.on('data', (data) => {
|
|
118
122
|
const output = data.toString();
|
|
119
123
|
if (output.toLowerCase().includes('error')) {
|
|
120
124
|
errorOutput += output;
|
|
121
125
|
}
|
|
122
126
|
});
|
|
123
|
-
|
|
127
|
+
depProcess.on('close', (code) => {
|
|
124
128
|
if (code === 0) {
|
|
125
129
|
resolve();
|
|
126
130
|
}
|
|
@@ -128,7 +132,7 @@ export async function installDependencies(dirs, operation = 'install') {
|
|
|
128
132
|
reject(new Error(`${dirType} dependencies install failed with code ${code}. ${errorOutput ? `\nError details:\n${errorOutput?.trimStart()}` : ''}}`));
|
|
129
133
|
}
|
|
130
134
|
});
|
|
131
|
-
|
|
135
|
+
depProcess.on('error', (error) => {
|
|
132
136
|
reject(new Error(`${dirType} process error: ${error.message}\n${errorOutput}`));
|
|
133
137
|
});
|
|
134
138
|
});
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint:skip": "echo 'skip lint'",
|
|
17
17
|
"lint:fix": "biome check --apply .",
|
|
18
18
|
"format": "biome format --write .",
|
|
19
|
-
"prepare": "npx simple-git-hooks",
|
|
19
|
+
"prepare": "npx -y simple-git-hooks",
|
|
20
20
|
"bump-version": "zx --quiet scripts/bump-version.mjs",
|
|
21
21
|
"update:deps": "npx -y taze -r -n '/arcblock|ocap|abtnode|blocklet|did-connect|did-comment|nedb/' -w -f && pnpm install && pnpm run deduplicate",
|
|
22
22
|
"deduplicate": "pnpm dedupe"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"clean": "node scripts/build-clean.mjs",
|
|
24
24
|
"bundle": "echo 'skip bundle'",
|
|
25
25
|
"bundle:client": "vite build",
|
|
26
|
-
"prepare": "npx simple-git-hooks",
|
|
26
|
+
"prepare": "npx -y simple-git-hooks",
|
|
27
27
|
"bump-version": "zx --quiet scripts/bump-version.mjs",
|
|
28
28
|
"dev-front": "vite serve .",
|
|
29
29
|
"build-lib": "node -r dotenv-flow/config -e \"require('@blocklet/pages-kit-block-studio/build-lib')\"",
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"cors": "^2.8.5",
|
|
71
71
|
"dotenv-flow": "^4.1.0",
|
|
72
72
|
"express": "^4.19.2",
|
|
73
|
-
"express-async-errors": "^3.1.1"
|
|
73
|
+
"express-async-errors": "^3.1.1",
|
|
74
|
+
"get-port": "^7.1.0"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
77
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -86,7 +87,6 @@
|
|
|
86
87
|
"@vitejs/plugin-react": "^4.3.4",
|
|
87
88
|
"bumpp": "^9.9.3",
|
|
88
89
|
"cross-env": "^7.0.3",
|
|
89
|
-
"get-port": "^5.1.1",
|
|
90
90
|
"import-sort-style-module": "^6.0.0",
|
|
91
91
|
"lint-staged": "^15.3.0",
|
|
92
92
|
"nodemon": "^3.1.9",
|