@blocklet/component-studio-cli 0.4.152 → 0.4.154
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
|
@@ -58,15 +58,16 @@ async function createDevServer(projectPath, _options) {
|
|
|
58
58
|
let shouldInstallProjectDeps = await checkShouldInstallDependencies(projectPath);
|
|
59
59
|
// 5. 安装依赖
|
|
60
60
|
if (shouldInstallWorkspaceDeps || shouldInstallProjectDeps) {
|
|
61
|
+
const installDeps = {};
|
|
61
62
|
if (shouldInstallProjectDeps) {
|
|
62
|
-
|
|
63
|
-
Project: projectPath,
|
|
64
|
-
});
|
|
63
|
+
installDeps.Project = projectPath;
|
|
65
64
|
}
|
|
66
65
|
if (shouldInstallWorkspaceDeps) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
installDeps.Workspace = workspacePath;
|
|
67
|
+
}
|
|
68
|
+
const result = await installDependencies(installDeps);
|
|
69
|
+
if (!result) {
|
|
70
|
+
process.exit(1);
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
const devServerSpinner = ora({ text: 'Creating development server...', color: 'blue' }).start();
|
package/dist/utils/helper.js
CHANGED
|
@@ -107,7 +107,7 @@ export async function installDependencies(dirs, operation = 'install') {
|
|
|
107
107
|
let errorOutput = '';
|
|
108
108
|
const process = spawn('pnpm', ['update:deps'], {
|
|
109
109
|
cwd: dirPath,
|
|
110
|
-
stdio:
|
|
110
|
+
stdio: 'inherit',
|
|
111
111
|
});
|
|
112
112
|
// 收集错误输出
|
|
113
113
|
process.stderr?.on('data', (data) => {
|
|
@@ -125,7 +125,7 @@ export async function installDependencies(dirs, operation = 'install') {
|
|
|
125
125
|
resolve();
|
|
126
126
|
}
|
|
127
127
|
else {
|
|
128
|
-
reject(new Error(`${dirType} dependencies install failed with code ${code}
|
|
128
|
+
reject(new Error(`${dirType} dependencies install failed with code ${code}. ${errorOutput ? `\nError details:\n${errorOutput?.trimStart()}` : ''}}`));
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
process.on('error', (error) => {
|
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": "
|
|
19
|
+
"prepare": "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"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
NODE_ENV="development"
|
|
@@ -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": "
|
|
26
|
+
"prepare": "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",
|