@aggroot-team/aggroot 1.7.8 → 1.8.0
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/index.cjs +397 -396
- package/package.json +1 -1
- package/scripts/publish.mjs +7 -9
package/package.json
CHANGED
package/scripts/publish.mjs
CHANGED
|
@@ -32,10 +32,14 @@ const DRY_RUN = process.argv.includes("--dry-run");
|
|
|
32
32
|
function run(cmd, opts = {}) {
|
|
33
33
|
console.log(`[publish] > ${cmd}`);
|
|
34
34
|
try {
|
|
35
|
-
execSync(cmd, {
|
|
35
|
+
execSync(cmd, {
|
|
36
|
+
cwd: ROOT,
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
env: { ...process.env, NODE_OPTIONS: "--max-old-space-size=4096" },
|
|
39
|
+
...opts,
|
|
40
|
+
});
|
|
36
41
|
return true;
|
|
37
42
|
} catch (err) {
|
|
38
|
-
// execSync throws on non-zero exit code
|
|
39
43
|
return false;
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -112,18 +116,12 @@ if (!hasWorkspaceLink()) {
|
|
|
112
116
|
|
|
113
117
|
// ─── Step 3: 构建 ────────────────────────────────────────────
|
|
114
118
|
console.log("\n[publish] ─── Step 3: 构建 ──────────────────────");
|
|
119
|
+
// npm run build includes: tsc + esbuild bundle + vite web UI build
|
|
115
120
|
if (!run("npm run build")) {
|
|
116
121
|
console.log("[publish] ❌ 构建失败");
|
|
117
122
|
process.exit(1);
|
|
118
123
|
}
|
|
119
124
|
|
|
120
|
-
// 构建 web(prepack 里的 vite build 步骤)
|
|
121
|
-
console.log("[publish] 构建 web UI...");
|
|
122
|
-
if (!run("npx vite build", { cwd: join(ROOT, "packages", "web") })) {
|
|
123
|
-
console.log("[publish] ❌ Web UI 构建失败");
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
125
|
// 拷贝 web dist → share/web/dist
|
|
128
126
|
console.log("[publish] 拷贝 web dist → share/web/dist...");
|
|
129
127
|
run(
|