@nocobase/build 2.3.0-alpha.1 → 3.0.0-alpha.2
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/lib/build.js +39 -8
- package/package.json +2 -2
package/lib/build.js
CHANGED
|
@@ -128,10 +128,14 @@ async function build(pkgs) {
|
|
|
128
128
|
const appClient = packages.find((item) => item.location === import_constant.CORE_APP);
|
|
129
129
|
if (appClient) {
|
|
130
130
|
await (0, import_utils.runProfiledStage)(profile, "app client shell", async () => {
|
|
131
|
-
await (0, import_utils.runScript)(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
await (0, import_utils.runScript)(
|
|
132
|
+
["rsbuild", "build", "--config", import_path.default.join(import_constant.CORE_APP, "client", "rsbuild.config.ts")],
|
|
133
|
+
import_constant.ROOT_PATH,
|
|
134
|
+
{
|
|
135
|
+
APP_ROOT: import_path.default.join(import_constant.CORE_APP, "client"),
|
|
136
|
+
ANALYZE: process.env.BUILD_ANALYZE === "true" ? "1" : void 0
|
|
137
|
+
}
|
|
138
|
+
);
|
|
135
139
|
});
|
|
136
140
|
await (0, import_utils.runProfiledStage)(profile, "app client-v2 shell", async () => {
|
|
137
141
|
await (0, import_utils.runScript)(
|
|
@@ -142,6 +146,15 @@ async function build(pkgs) {
|
|
|
142
146
|
}
|
|
143
147
|
);
|
|
144
148
|
});
|
|
149
|
+
await (0, import_utils.runProfiledStage)(profile, "app client-settings shell", async () => {
|
|
150
|
+
await (0, import_utils.runScript)(
|
|
151
|
+
["rsbuild", "build", "--config", import_path.default.join(import_constant.CORE_APP, "client-settings", "rsbuild.config.ts")],
|
|
152
|
+
import_constant.ROOT_PATH,
|
|
153
|
+
{
|
|
154
|
+
ANALYZE: process.env.BUILD_ANALYZE === "true" ? "1" : void 0
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
});
|
|
145
158
|
}
|
|
146
159
|
(0, import_utils.writeToCache)(BUILD_ERROR, {});
|
|
147
160
|
} finally {
|
|
@@ -162,7 +175,11 @@ async function buildPackages(packages, targetDir, doBuildPackage, options = {})
|
|
|
162
175
|
await (0, import_utils.runProfiledStage)(profile, `${stageName} source`, async () => {
|
|
163
176
|
for (let index = 0; index < layers.length; index++) {
|
|
164
177
|
const layer = layers[index];
|
|
165
|
-
console.log(
|
|
178
|
+
console.log(
|
|
179
|
+
import_chalk.default.cyan(
|
|
180
|
+
`[@nocobase/build]: ${stageName} source layer ${index + 1}/${layers.length} (${layer.length} packages)`
|
|
181
|
+
)
|
|
182
|
+
);
|
|
166
183
|
const layerStart = (0, import_utils.nowMs)();
|
|
167
184
|
await (0, import_utils.runWithConcurrency)(layer, sourceConcurrency, async (pkg) => {
|
|
168
185
|
await buildPackageSourceLifecycle(pkg, targetDir, doBuildPackage, profile);
|
|
@@ -178,7 +195,13 @@ async function buildPackages(packages, targetDir, doBuildPackage, options = {})
|
|
|
178
195
|
});
|
|
179
196
|
}
|
|
180
197
|
if (ENABLE_BUILD_PROFILE) {
|
|
181
|
-
console.log(
|
|
198
|
+
console.log(
|
|
199
|
+
import_chalk.default.gray(
|
|
200
|
+
`[@nocobase/build]: ${stageName} source layer ${index + 1}/${layers.length} finished in ${(0, import_utils.formatDuration)(
|
|
201
|
+
layerDurationMs
|
|
202
|
+
)}`
|
|
203
|
+
)
|
|
204
|
+
);
|
|
182
205
|
}
|
|
183
206
|
}
|
|
184
207
|
});
|
|
@@ -188,7 +211,11 @@ async function buildPackages(packages, targetDir, doBuildPackage, options = {})
|
|
|
188
211
|
await (0, import_utils.runProfiledStage)(profile, `${stageName} declaration`, async () => {
|
|
189
212
|
for (let index = 0; index < layers.length; index++) {
|
|
190
213
|
const layer = layers[index];
|
|
191
|
-
console.log(
|
|
214
|
+
console.log(
|
|
215
|
+
import_chalk.default.cyan(
|
|
216
|
+
`[@nocobase/build]: ${stageName} declaration layer ${index + 1}/${layers.length} (${layer.length} packages)`
|
|
217
|
+
)
|
|
218
|
+
);
|
|
192
219
|
const layerStart = (0, import_utils.nowMs)();
|
|
193
220
|
await (0, import_utils.runWithConcurrency)(layer, declarationConcurrency, async (pkg) => {
|
|
194
221
|
await buildPackageDeclarationLifecycle(pkg, targetDir, profile);
|
|
@@ -204,7 +231,11 @@ async function buildPackages(packages, targetDir, doBuildPackage, options = {})
|
|
|
204
231
|
});
|
|
205
232
|
}
|
|
206
233
|
if (ENABLE_BUILD_PROFILE) {
|
|
207
|
-
console.log(
|
|
234
|
+
console.log(
|
|
235
|
+
import_chalk.default.gray(
|
|
236
|
+
`[@nocobase/build]: ${stageName} declaration layer ${index + 1}/${layers.length} finished in ${(0, import_utils.formatDuration)(layerDurationMs)}`
|
|
237
|
+
)
|
|
238
|
+
);
|
|
208
239
|
}
|
|
209
240
|
}
|
|
210
241
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/build",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.2",
|
|
4
4
|
"description": "Library build tool based on rollup.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"build": "tsup",
|
|
54
54
|
"build:watch": "tsup --watch"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a3faea21082b30989301de04591ee1b91fd4e6a5"
|
|
57
57
|
}
|