@lynx-js/rspeedy-canary 0.10.9-canary-20250826-d65ef500 → 0.11.0-canary-20250826-48c8fc40
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/CHANGELOG.md +9 -1
- package/dist/cli/main.js +12 -73
- package/dist/events-fs-fs_promises-os-path-stream.js +30 -0
- package/dist/index.js +19 -39
- package/dist/node_child_process-node_events-node_fs-node_path.js +22 -0
- package/dist/src_cli_build_ts.js +35 -23
- package/dist/src_cli_commands_ts.js +3 -2
- package/dist/src_cli_dev_ts.js +33 -21
- package/dist/src_cli_exit_ts.js +12 -11
- package/dist/src_cli_inspect_ts.js +25 -16
- package/dist/src_cli_preview_ts.js +25 -16
- package/dist/src_config_validate_ts.js +105 -65
- package/dist/src_plugins_api_plugin_ts.js +4 -3
- package/dist/src_plugins_chunkLoading_plugin_ts.js +6 -5
- package/dist/src_plugins_dev_plugin_ts.js +4 -3
- package/dist/src_plugins_emitOnErrors_plugin_ts.js +1 -0
- package/dist/src_plugins_index_ts.js +3 -2
- package/dist/src_plugins_inspect_plugin_ts.js +16 -15
- package/dist/src_plugins_minify_plugin_ts.js +3 -2
- package/dist/src_plugins_optimization_plugin_ts.js +1 -0
- package/dist/src_plugins_output_plugin_ts.js +3 -2
- package/dist/src_plugins_resolve_plugin_ts.js +1 -0
- package/dist/src_plugins_rsdoctor_plugin_ts.js +8 -13
- package/dist/src_plugins_sourcemap_plugin_ts.js +1 -0
- package/dist/src_plugins_swc_plugin_ts.js +3 -2
- package/dist/src_plugins_target_plugin_ts.js +6 -5
- package/dist/src_version_ts.js +3 -2
- package/dist/vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js +1 -0
- package/dist/vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js +1 -0
- package/dist/vendors-node_modules_pnpm_ipaddr_js_2_2_0_node_modules_ipaddr_js_lib_ipaddr_js.js +1 -0
- package/dist/vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.11.0-canary-20250826161249-48c8fc40f5f33bfeaeb319951d523e08d55cf6ef
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Bump Rsbuild v1.5.0 with Rspack v1.5.0. ([#1591](https://github.com/lynx-family/lynx-stack/pull/1591))
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
11
|
- Support `rspeedy build --watch` ([#1579](https://github.com/lynx-family/lynx-stack/pull/1579))
|
|
8
12
|
|
|
13
|
+
- Updated dependencies [[`1952fc1`](https://github.com/lynx-family/lynx-stack/commit/1952fc1557e5abbdbdf4a2073fd3b6f64dd32c3c)]:
|
|
14
|
+
- @lynx-js/chunk-loading-webpack-plugin@0.3.2-canary-20250826161249-48c8fc40f5f33bfeaeb319951d523e08d55cf6ef
|
|
15
|
+
- @lynx-js/cache-events-webpack-plugin@0.0.1
|
|
16
|
+
|
|
9
17
|
## 0.10.8
|
|
10
18
|
|
|
11
19
|
### Patch Changes
|
package/dist/cli/main.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_cache_events_webpack_plugin_4f60358d__ from "@lynx-js/cache-events-webpack-plugin";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_chunk_loading_webpack_plugin_f5dc50b6__ from "@lynx-js/chunk-loading-webpack-plugin";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_rspeedy_register_78d0d330__ from "@lynx-js/rspeedy/register";
|
|
4
1
|
import * as __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__ from "@rsbuild/core";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_events__ from "events";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_fs_promises_400951f8__ from "fs/promises";
|
|
8
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__ from "node:child_process";
|
|
9
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_events_0a6aefe7__ from "node:events";
|
|
10
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
11
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__ from "node:fs/promises";
|
|
12
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
|
|
13
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
14
2
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
15
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
|
16
|
-
import * as __WEBPACK_EXTERNAL_MODULE_os__ from "os";
|
|
17
|
-
import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
|
|
18
|
-
import * as __WEBPACK_EXTERNAL_MODULE_stream__ from "stream";
|
|
19
3
|
var __webpack_modules__ = {
|
|
20
4
|
"../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": function(module) {
|
|
21
5
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
@@ -177,23 +161,23 @@ var __webpack_modules__ = {
|
|
|
177
161
|
});
|
|
178
162
|
let previousSignal = null;
|
|
179
163
|
const exit_exit = (signal = 0)=>{
|
|
180
|
-
if (null !== previousSignal) (0, debug.
|
|
164
|
+
if (null !== previousSignal) (0, debug.Yz)(`graceful exit called multiple times, current: ${signal}, previous: ${previousSignal}`);
|
|
181
165
|
previousSignal = signal;
|
|
182
|
-
(0, debug.
|
|
166
|
+
(0, debug.Yz)(`graceful exit process with signal: ${signal}`);
|
|
183
167
|
gracefulExit(signal);
|
|
184
168
|
};
|
|
185
169
|
async function exit_onExit(signal) {
|
|
186
170
|
const duration = Date.now() - start;
|
|
187
|
-
(0, debug.
|
|
188
|
-
(0, debug.
|
|
171
|
+
(0, debug.Yz)(`exit hook fired with signal: ${signal}, duration: ${duration}`);
|
|
172
|
+
(0, debug.Yz)(`awaiting exit promises(length: ${exitPromises.length})...`);
|
|
189
173
|
await Promise.allSettled(exitPromises);
|
|
190
174
|
}
|
|
191
175
|
},
|
|
192
176
|
"./src/debug.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
193
177
|
__webpack_require__.d(__webpack_exports__, {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
178
|
+
Iv: ()=>debugList,
|
|
179
|
+
Yz: ()=>debug,
|
|
180
|
+
_o: ()=>isDebug
|
|
197
181
|
});
|
|
198
182
|
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
|
|
199
183
|
var picocolors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -219,59 +203,11 @@ var __webpack_modules__ = {
|
|
|
219
203
|
''
|
|
220
204
|
].concat(messages).join('\n - ')}`);
|
|
221
205
|
},
|
|
222
|
-
"@lynx-js/cache-events-webpack-plugin": function(module) {
|
|
223
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__lynx_js_cache_events_webpack_plugin_4f60358d__;
|
|
224
|
-
},
|
|
225
|
-
"@lynx-js/chunk-loading-webpack-plugin": function(module) {
|
|
226
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__lynx_js_chunk_loading_webpack_plugin_f5dc50b6__;
|
|
227
|
-
},
|
|
228
|
-
"@lynx-js/rspeedy/register": function(module) {
|
|
229
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__lynx_js_rspeedy_register_78d0d330__;
|
|
230
|
-
},
|
|
231
206
|
"@rsbuild/core": function(module) {
|
|
232
207
|
module.exports = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__;
|
|
233
208
|
},
|
|
234
|
-
events: function(module) {
|
|
235
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_events__;
|
|
236
|
-
},
|
|
237
|
-
fs: function(module) {
|
|
238
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;
|
|
239
|
-
},
|
|
240
|
-
"fs/promises": function(module) {
|
|
241
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_fs_promises_400951f8__;
|
|
242
|
-
},
|
|
243
|
-
"node:child_process": function(module) {
|
|
244
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__;
|
|
245
|
-
},
|
|
246
|
-
"node:events": function(module) {
|
|
247
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_events_0a6aefe7__;
|
|
248
|
-
},
|
|
249
|
-
"node:fs": function(module) {
|
|
250
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
|
|
251
|
-
},
|
|
252
|
-
"node:fs/promises": function(module) {
|
|
253
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__;
|
|
254
|
-
},
|
|
255
|
-
"node:module": function(module) {
|
|
256
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__;
|
|
257
|
-
},
|
|
258
|
-
"node:path": function(module) {
|
|
259
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
|
|
260
|
-
},
|
|
261
209
|
"node:process": function(module) {
|
|
262
210
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__;
|
|
263
|
-
},
|
|
264
|
-
"node:url": function(module) {
|
|
265
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__;
|
|
266
|
-
},
|
|
267
|
-
os: function(module) {
|
|
268
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_os__;
|
|
269
|
-
},
|
|
270
|
-
path: function(module) {
|
|
271
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_path__;
|
|
272
|
-
},
|
|
273
|
-
stream: function(module) {
|
|
274
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_stream__;
|
|
275
211
|
}
|
|
276
212
|
};
|
|
277
213
|
var __webpack_module_cache__ = {};
|
|
@@ -396,7 +332,7 @@ function initNodeEnv(argv) {
|
|
|
396
332
|
if (!process.env['NODE_ENV']) {
|
|
397
333
|
const NODE_ENV = argv.includes('dev') || argv.includes('preview') ? 'development' : 'production';
|
|
398
334
|
process.env['NODE_ENV'] = NODE_ENV;
|
|
399
|
-
(0, debug.
|
|
335
|
+
(0, debug.Yz)(`No NODE_ENV found, set to ${NODE_ENV}`);
|
|
400
336
|
}
|
|
401
337
|
}
|
|
402
338
|
async function main(argv) {
|
|
@@ -407,7 +343,10 @@ async function main(argv) {
|
|
|
407
343
|
core_.logger.greet(` Rspeedy v${version} (Rsbuild v${rsbuildVersion}, Rspack v${rspackVersion})\n`);
|
|
408
344
|
try {
|
|
409
345
|
const [{ Command }, { apply }] = await Promise.all([
|
|
410
|
-
|
|
346
|
+
Promise.all([
|
|
347
|
+
__webpack_require__.e("vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs"),
|
|
348
|
+
__webpack_require__.e("node_child_process-node_events-node_fs-node_path")
|
|
349
|
+
]).then(__webpack_require__.bind(__webpack_require__, "../../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/esm.mjs")),
|
|
411
350
|
__webpack_require__.e("src_cli_commands_ts").then(__webpack_require__.bind(__webpack_require__, "./src/cli/commands.ts"))
|
|
412
351
|
]);
|
|
413
352
|
apply(new Command('rspeedy')).parse(argv);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_events__ from "events";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_fs_promises_400951f8__ from "fs/promises";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_os__ from "os";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_stream__ from "stream";
|
|
7
|
+
export const __webpack_id__ = "events-fs-fs_promises-os-path-stream";
|
|
8
|
+
export const __webpack_ids__ = [
|
|
9
|
+
"events-fs-fs_promises-os-path-stream"
|
|
10
|
+
];
|
|
11
|
+
export const __webpack_modules__ = {
|
|
12
|
+
events: function(module) {
|
|
13
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_events__;
|
|
14
|
+
},
|
|
15
|
+
fs: function(module) {
|
|
16
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;
|
|
17
|
+
},
|
|
18
|
+
"fs/promises": function(module) {
|
|
19
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_fs_promises_400951f8__;
|
|
20
|
+
},
|
|
21
|
+
os: function(module) {
|
|
22
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_os__;
|
|
23
|
+
},
|
|
24
|
+
path: function(module) {
|
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_path__;
|
|
26
|
+
},
|
|
27
|
+
stream: function(module) {
|
|
28
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_stream__;
|
|
29
|
+
}
|
|
30
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_cache_events_webpack_plugin_4f60358d__ from "@lynx-js/cache-events-webpack-plugin";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_chunk_loading_webpack_plugin_f5dc50b6__ from "@lynx-js/chunk-loading-webpack-plugin";
|
|
3
1
|
import * as __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__ from "@rsbuild/core";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__ from "node:fs/promises";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
|
|
6
2
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
8
3
|
import node_fs from "node:fs";
|
|
9
4
|
import { pathToFileURL } from "node:url";
|
|
10
5
|
import { register } from "@lynx-js/rspeedy/register";
|
|
@@ -77,9 +72,9 @@ var __webpack_modules__ = {
|
|
|
77
72
|
},
|
|
78
73
|
"./src/debug.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
79
74
|
__webpack_require__.d(__webpack_exports__, {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
Iv: ()=>debugList,
|
|
76
|
+
Yz: ()=>debug,
|
|
77
|
+
_o: ()=>isDebug
|
|
83
78
|
});
|
|
84
79
|
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
|
|
85
80
|
var picocolors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -107,37 +102,22 @@ var __webpack_modules__ = {
|
|
|
107
102
|
},
|
|
108
103
|
"./src/version.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
109
104
|
__webpack_require__.d(__webpack_exports__, {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
f3: ()=>rspackVersion,
|
|
106
|
+
rE: ()=>version,
|
|
107
|
+
y3: ()=>core_.version
|
|
113
108
|
});
|
|
114
109
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
115
110
|
var package_namespaceObject = {
|
|
116
|
-
|
|
111
|
+
rE: "0.10.8"
|
|
117
112
|
};
|
|
118
|
-
const version = package_namespaceObject.
|
|
113
|
+
const version = package_namespaceObject.rE;
|
|
119
114
|
const rspackVersion = core_.rspack.rspackVersion;
|
|
120
115
|
},
|
|
121
|
-
"@lynx-js/cache-events-webpack-plugin": function(module) {
|
|
122
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__lynx_js_cache_events_webpack_plugin_4f60358d__;
|
|
123
|
-
},
|
|
124
|
-
"@lynx-js/chunk-loading-webpack-plugin": function(module) {
|
|
125
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__lynx_js_chunk_loading_webpack_plugin_f5dc50b6__;
|
|
126
|
-
},
|
|
127
116
|
"@rsbuild/core": function(module) {
|
|
128
117
|
module.exports = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__;
|
|
129
118
|
},
|
|
130
|
-
"node:fs/promises": function(module) {
|
|
131
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__;
|
|
132
|
-
},
|
|
133
|
-
"node:module": function(module) {
|
|
134
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__;
|
|
135
|
-
},
|
|
136
119
|
"node:path": function(module) {
|
|
137
120
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
|
|
138
|
-
},
|
|
139
|
-
"node:process": function(module) {
|
|
140
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__;
|
|
141
121
|
}
|
|
142
122
|
};
|
|
143
123
|
var __webpack_module_cache__ = {};
|
|
@@ -271,7 +251,7 @@ function applyDefaultRspeedyConfig(config) {
|
|
|
271
251
|
inlineScripts: !enableChunkSplitting
|
|
272
252
|
},
|
|
273
253
|
performance: {
|
|
274
|
-
profile: (0, debug.
|
|
254
|
+
profile: (0, debug._o)() ? true : void 0
|
|
275
255
|
},
|
|
276
256
|
tools: {
|
|
277
257
|
rsdoctor: {
|
|
@@ -297,13 +277,13 @@ function getFilename(filename) {
|
|
|
297
277
|
const DEFAULT_ENTRY = './src/index.js';
|
|
298
278
|
function toRsbuildEntry(entry) {
|
|
299
279
|
if (void 0 === entry) {
|
|
300
|
-
(0, debug.
|
|
280
|
+
(0, debug.Yz)(`Using default entry ${DEFAULT_ENTRY}`);
|
|
301
281
|
return {
|
|
302
282
|
main: DEFAULT_ENTRY
|
|
303
283
|
};
|
|
304
284
|
}
|
|
305
285
|
if (Array.isArray(entry) || 'string' == typeof entry) {
|
|
306
|
-
(0, debug.
|
|
286
|
+
(0, debug.Yz)(()=>`Using single entry ${[
|
|
307
287
|
''
|
|
308
288
|
].concat(entry).join('\n - ')}`);
|
|
309
289
|
return {
|
|
@@ -312,7 +292,7 @@ function toRsbuildEntry(entry) {
|
|
|
312
292
|
}
|
|
313
293
|
return Object.fromEntries(Object.entries(entry).map(([key, value])=>{
|
|
314
294
|
if (Array.isArray(value) || 'string' == typeof value) {
|
|
315
|
-
(0, debug.
|
|
295
|
+
(0, debug.Iv)(`Using multiple entries - ${key}`, value);
|
|
316
296
|
return [
|
|
317
297
|
key,
|
|
318
298
|
{
|
|
@@ -320,7 +300,7 @@ function toRsbuildEntry(entry) {
|
|
|
320
300
|
}
|
|
321
301
|
];
|
|
322
302
|
}
|
|
323
|
-
(0, debug.
|
|
303
|
+
(0, debug.Iv)(`Using multiple entries - ${key}`, value.import ?? DEFAULT_ENTRY);
|
|
324
304
|
if (void 0 === value.import) return [
|
|
325
305
|
key,
|
|
326
306
|
{
|
|
@@ -448,7 +428,7 @@ var picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1
|
|
|
448
428
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
449
429
|
const resolveConfigPath = (root, customConfig)=>{
|
|
450
430
|
if (customConfig) {
|
|
451
|
-
(0, debug.
|
|
431
|
+
(0, debug.Yz)(`load custom config file ${customConfig} from ${root}`);
|
|
452
432
|
const customConfigPath = (0, external_node_path_.isAbsolute)(customConfig) ? customConfig : (0, external_node_path_.join)(root, customConfig);
|
|
453
433
|
if (node_fs.existsSync(customConfigPath)) return customConfigPath;
|
|
454
434
|
throw new Error(`Cannot find config file: ${picocolors_default().dim(customConfigPath)}`);
|
|
@@ -460,10 +440,10 @@ const resolveConfigPath = (root, customConfig)=>{
|
|
|
460
440
|
'lynx.config.mjs'
|
|
461
441
|
];
|
|
462
442
|
for (const file of CONFIG_FILES){
|
|
463
|
-
(0, debug.
|
|
443
|
+
(0, debug.Yz)(`load default config file ${file} from ${root}`);
|
|
464
444
|
const configFile = (0, external_node_path_.join)(root, file);
|
|
465
445
|
if (node_fs.existsSync(configFile)) {
|
|
466
|
-
(0, debug.
|
|
446
|
+
(0, debug.Yz)(`default config ${configFile} found`);
|
|
467
447
|
return configFile;
|
|
468
448
|
}
|
|
469
449
|
}
|
|
@@ -520,8 +500,8 @@ function isDeno() {
|
|
|
520
500
|
}
|
|
521
501
|
var version = __webpack_require__("./src/version.ts");
|
|
522
502
|
var __webpack_exports__logger = core_.logger;
|
|
523
|
-
var __webpack_exports__rsbuildVersion = version.
|
|
503
|
+
var __webpack_exports__rsbuildVersion = version.y3;
|
|
524
504
|
var __webpack_exports__rspack = core_.rspack;
|
|
525
|
-
var __webpack_exports__rspackVersion = version.
|
|
526
|
-
var __webpack_exports__version = version.
|
|
505
|
+
var __webpack_exports__rspackVersion = version.f3;
|
|
506
|
+
var __webpack_exports__version = version.rE;
|
|
527
507
|
export { createRspeedy, defineConfig, loadConfig, mergeRspeedyConfig, __webpack_exports__logger as logger, __webpack_exports__rsbuildVersion as rsbuildVersion, __webpack_exports__rspack as rspack, __webpack_exports__rspackVersion as rspackVersion, __webpack_exports__version as version };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__ from "node:child_process";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_events_0a6aefe7__ from "node:events";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
5
|
+
export const __webpack_id__ = "node_child_process-node_events-node_fs-node_path";
|
|
6
|
+
export const __webpack_ids__ = [
|
|
7
|
+
"node_child_process-node_events-node_fs-node_path"
|
|
8
|
+
];
|
|
9
|
+
export const __webpack_modules__ = {
|
|
10
|
+
"node:child_process": function(module) {
|
|
11
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__;
|
|
12
|
+
},
|
|
13
|
+
"node:events": function(module) {
|
|
14
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_events_0a6aefe7__;
|
|
15
|
+
},
|
|
16
|
+
"node:fs": function(module) {
|
|
17
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
|
|
18
|
+
},
|
|
19
|
+
"node:path": function(module) {
|
|
20
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
|
|
21
|
+
}
|
|
22
|
+
};
|
package/dist/src_cli_build_ts.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { pathToFileURL } from "node:url";
|
|
2
|
+
import { register } from "@lynx-js/rspeedy/register";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
5
|
+
export const __webpack_id__ = "src_cli_build_ts";
|
|
1
6
|
export const __webpack_ids__ = [
|
|
2
7
|
"src_cli_build_ts"
|
|
3
8
|
];
|
|
@@ -17,14 +22,14 @@ export const __webpack_modules__ = {
|
|
|
17
22
|
var _watch_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/cli/watch.ts");
|
|
18
23
|
var _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/utils/is-ci.ts");
|
|
19
24
|
async function build(cwd, buildOptions) {
|
|
20
|
-
const shouldExit = 'true' !== process.env['RSDOCTOR'] || (0, _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_6__.
|
|
25
|
+
const shouldExit = 'true' !== process.env['RSDOCTOR'] || (0, _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_6__.J)();
|
|
21
26
|
const isWatch = buildOptions.watch ?? false;
|
|
22
27
|
let onBeforeRestart = [];
|
|
23
28
|
try {
|
|
24
|
-
const { rspeedyConfig, configPath, createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_4__.
|
|
29
|
+
const { rspeedyConfig, configPath, createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_4__.T)(cwd, buildOptions);
|
|
25
30
|
if (isWatch) {
|
|
26
|
-
const watchedFiles = (0, _watch_js__WEBPACK_IMPORTED_MODULE_5__.
|
|
27
|
-
await (0, _watch_js__WEBPACK_IMPORTED_MODULE_5__.
|
|
31
|
+
const watchedFiles = (0, _watch_js__WEBPACK_IMPORTED_MODULE_5__.G)(configPath, rspeedyConfig);
|
|
32
|
+
await (0, _watch_js__WEBPACK_IMPORTED_MODULE_5__.N)(watchedFiles.map((filePath)=>node_path__WEBPACK_IMPORTED_MODULE_0__["default"].isAbsolute(filePath) ? filePath : node_path__WEBPACK_IMPORTED_MODULE_0__["default"].join(cwd, filePath)), async (filename)=>{
|
|
28
33
|
_rsbuild_core__WEBPACK_IMPORTED_MODULE_1__.logger.info(`Restart because ${picocolors__WEBPACK_IMPORTED_MODULE_7___default().yellow(filename)} is changed.\n`);
|
|
29
34
|
const cleanup = onBeforeRestart.map((f)=>f());
|
|
30
35
|
onBeforeRestart = [];
|
|
@@ -32,7 +37,7 @@ export const __webpack_modules__ = {
|
|
|
32
37
|
await build.call(this, cwd, buildOptions);
|
|
33
38
|
});
|
|
34
39
|
}
|
|
35
|
-
const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_3__.
|
|
40
|
+
const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_3__.x)(createRspeedyOptions);
|
|
36
41
|
const { close } = await rspeedy.build({
|
|
37
42
|
watch: isWatch
|
|
38
43
|
});
|
|
@@ -47,18 +52,16 @@ export const __webpack_modules__ = {
|
|
|
47
52
|
},
|
|
48
53
|
"./src/cli/init.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
49
54
|
__webpack_require__.d(__webpack_exports__, {
|
|
50
|
-
|
|
55
|
+
T: ()=>init
|
|
51
56
|
});
|
|
52
57
|
var external_node_fs_ = __webpack_require__("node:fs");
|
|
53
58
|
var external_node_path_ = __webpack_require__("node:path");
|
|
54
|
-
var external_node_url_ = __webpack_require__("node:url");
|
|
55
59
|
var picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
56
60
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
57
|
-
var register_ = __webpack_require__("@lynx-js/rspeedy/register");
|
|
58
61
|
var debug = __webpack_require__("./src/debug.ts");
|
|
59
62
|
const resolveConfigPath = (root, customConfig)=>{
|
|
60
63
|
if (customConfig) {
|
|
61
|
-
(0, debug.
|
|
64
|
+
(0, debug.Yz)(`load custom config file ${customConfig} from ${root}`);
|
|
62
65
|
const customConfigPath = (0, external_node_path_.isAbsolute)(customConfig) ? customConfig : (0, external_node_path_.join)(root, customConfig);
|
|
63
66
|
if (external_node_fs_["default"].existsSync(customConfigPath)) return customConfigPath;
|
|
64
67
|
throw new Error(`Cannot find config file: ${picocolors_default().dim(customConfigPath)}`);
|
|
@@ -70,10 +73,10 @@ export const __webpack_modules__ = {
|
|
|
70
73
|
'lynx.config.mjs'
|
|
71
74
|
];
|
|
72
75
|
for (const file of CONFIG_FILES){
|
|
73
|
-
(0, debug.
|
|
76
|
+
(0, debug.Yz)(`load default config file ${file} from ${root}`);
|
|
74
77
|
const configFile = (0, external_node_path_.join)(root, file);
|
|
75
78
|
if (external_node_fs_["default"].existsSync(configFile)) {
|
|
76
|
-
(0, debug.
|
|
79
|
+
(0, debug.Yz)(`default config ${configFile} found`);
|
|
77
80
|
return configFile;
|
|
78
81
|
}
|
|
79
82
|
}
|
|
@@ -85,9 +88,9 @@ export const __webpack_modules__ = {
|
|
|
85
88
|
async function loadConfig(loadConfigOptions) {
|
|
86
89
|
let { configPath } = loadConfigOptions;
|
|
87
90
|
if (!configPath || !(0, external_node_path_.isAbsolute)(configPath)) configPath = resolveConfigPath(loadConfigOptions.cwd ?? process.cwd(), configPath);
|
|
88
|
-
const specifier =
|
|
91
|
+
const specifier = pathToFileURL(configPath).toString();
|
|
89
92
|
let unregister;
|
|
90
|
-
unregister = shouldUseNativeImport(configPath) ? ()=>{} :
|
|
93
|
+
unregister = shouldUseNativeImport(configPath) ? ()=>{} : register({
|
|
91
94
|
load: !hasNativeTSSupport(),
|
|
92
95
|
resolve: true
|
|
93
96
|
});
|
|
@@ -165,11 +168,14 @@ export const __webpack_modules__ = {
|
|
|
165
168
|
},
|
|
166
169
|
"./src/cli/watch.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
167
170
|
__webpack_require__.d(__webpack_exports__, {
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
G: ()=>getWatchedFiles,
|
|
172
|
+
N: ()=>watchFiles
|
|
170
173
|
});
|
|
171
174
|
async function watchFiles(files, callback) {
|
|
172
|
-
const chokidar = await
|
|
175
|
+
const chokidar = await Promise.all([
|
|
176
|
+
__webpack_require__.e("vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js"),
|
|
177
|
+
__webpack_require__.e("events-fs-fs_promises-os-path-stream")
|
|
178
|
+
]).then(__webpack_require__.bind(__webpack_require__, "../../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js"));
|
|
173
179
|
const watcher = chokidar.default.watch(files, {
|
|
174
180
|
ignoreInitial: true,
|
|
175
181
|
ignorePermissionErrors: true
|
|
@@ -207,7 +213,7 @@ export const __webpack_modules__ = {
|
|
|
207
213
|
},
|
|
208
214
|
"./src/create-rspeedy.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
209
215
|
__webpack_require__.d(__webpack_exports__, {
|
|
210
|
-
|
|
216
|
+
x: ()=>createRspeedy
|
|
211
217
|
});
|
|
212
218
|
var external_node_path_ = __webpack_require__("node:path");
|
|
213
219
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
@@ -225,7 +231,7 @@ export const __webpack_modules__ = {
|
|
|
225
231
|
inlineScripts: !enableChunkSplitting
|
|
226
232
|
},
|
|
227
233
|
performance: {
|
|
228
|
-
profile: (0, debug.
|
|
234
|
+
profile: (0, debug._o)() ? true : void 0
|
|
229
235
|
},
|
|
230
236
|
tools: {
|
|
231
237
|
rsdoctor: {
|
|
@@ -251,13 +257,13 @@ export const __webpack_modules__ = {
|
|
|
251
257
|
const DEFAULT_ENTRY = './src/index.js';
|
|
252
258
|
function toRsbuildEntry(entry) {
|
|
253
259
|
if (void 0 === entry) {
|
|
254
|
-
(0, debug.
|
|
260
|
+
(0, debug.Yz)(`Using default entry ${DEFAULT_ENTRY}`);
|
|
255
261
|
return {
|
|
256
262
|
main: DEFAULT_ENTRY
|
|
257
263
|
};
|
|
258
264
|
}
|
|
259
265
|
if (Array.isArray(entry) || 'string' == typeof entry) {
|
|
260
|
-
(0, debug.
|
|
266
|
+
(0, debug.Yz)(()=>`Using single entry ${[
|
|
261
267
|
''
|
|
262
268
|
].concat(entry).join('\n - ')}`);
|
|
263
269
|
return {
|
|
@@ -266,7 +272,7 @@ export const __webpack_modules__ = {
|
|
|
266
272
|
}
|
|
267
273
|
return Object.fromEntries(Object.entries(entry).map(([key, value])=>{
|
|
268
274
|
if (Array.isArray(value) || 'string' == typeof value) {
|
|
269
|
-
(0, debug.
|
|
275
|
+
(0, debug.Iv)(`Using multiple entries - ${key}`, value);
|
|
270
276
|
return [
|
|
271
277
|
key,
|
|
272
278
|
{
|
|
@@ -274,7 +280,7 @@ export const __webpack_modules__ = {
|
|
|
274
280
|
}
|
|
275
281
|
];
|
|
276
282
|
}
|
|
277
|
-
(0, debug.
|
|
283
|
+
(0, debug.Iv)(`Using multiple entries - ${key}`, value.import ?? DEFAULT_ENTRY);
|
|
278
284
|
if (void 0 === value.import) return [
|
|
279
285
|
key,
|
|
280
286
|
{
|
|
@@ -395,10 +401,16 @@ export const __webpack_modules__ = {
|
|
|
395
401
|
},
|
|
396
402
|
"./src/utils/is-ci.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
397
403
|
__webpack_require__.d(__webpack_exports__, {
|
|
398
|
-
|
|
404
|
+
J: ()=>isCI
|
|
399
405
|
});
|
|
400
406
|
function isCI() {
|
|
401
407
|
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
402
408
|
}
|
|
409
|
+
},
|
|
410
|
+
"node:fs": function(module) {
|
|
411
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
|
|
412
|
+
},
|
|
413
|
+
"node:path": function(module) {
|
|
414
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
|
|
403
415
|
}
|
|
404
416
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const __webpack_id__ = "src_cli_commands_ts";
|
|
1
2
|
export const __webpack_ids__ = [
|
|
2
3
|
"src_cli_commands_ts"
|
|
3
4
|
];
|
|
@@ -40,9 +41,9 @@ export const __webpack_modules__ = {
|
|
|
40
41
|
});
|
|
41
42
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
42
43
|
var package_namespaceObject = {
|
|
43
|
-
|
|
44
|
+
rE: "0.10.8"
|
|
44
45
|
};
|
|
45
|
-
const version = package_namespaceObject.
|
|
46
|
+
const version = package_namespaceObject.rE;
|
|
46
47
|
const rspackVersion = core_.rspack.rspackVersion;
|
|
47
48
|
}
|
|
48
49
|
};
|