@lynx-js/rspeedy 0.14.5 → 0.15.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/CHANGELOG.md +100 -0
- package/dist/{0~src_plugins_api_plugin_ts.js → 0~api.plugin.js} +3 -4
- package/dist/{0~src_plugins_dev_plugin_ts.js → 0~dev.plugin.js} +19 -13
- package/dist/{0~src_cli_exit_ts.js → 0~exit.js} +4 -3
- package/dist/0~getESVersionTarget.js +33 -0
- package/dist/{0~src_plugins_inspect_plugin_ts.js → 0~inspect.plugin.js} +13 -28
- package/dist/{0~node_modules_pnpm_ipaddr_js_2_3_0_node_modules_ipaddr_js_lib_ipaddr_js.js → 0~ipaddr.js} +2 -1
- package/dist/0~is-lynx.js +5 -0
- package/dist/{1~src_plugins_optimization_plugin_ts.js → 0~optimization.plugin.js} +3 -2
- package/dist/{0~src_plugins_output_plugin_ts.js → 0~output.plugin.js} +14 -3
- package/dist/0~plugins.js +40 -0
- package/dist/{0~src_plugins_rsdoctor_plugin_ts.js → 0~rsdoctor.plugin.js} +1 -1
- package/dist/{1~src_plugins_sourcemap_plugin_ts.js → 0~sourcemap.plugin.js} +19 -2
- package/dist/0~statsJson.plugin.js +26 -0
- package/dist/0~swc.plugin.js +25 -0
- package/dist/{0~src_plugins_target_plugin_ts.js → 0~target.plugin.js} +4 -4
- package/dist/{1~src_config_validate_ts.js → 0~validate.js} +17963 -28527
- package/dist/{1~src_plugins_api_plugin_ts.js → 1~api.plugin.js} +3 -4
- package/dist/{1~src_cli_build_ts.js → 1~build.js} +7 -7
- package/dist/{1~node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js → 1~chokidar.js} +47 -47
- package/dist/{1~src_cli_commands_ts.js → 1~commands.js} +7 -17
- package/dist/{1~src_cli_dev_ts.js → 1~dev.js} +6 -6
- package/dist/{1~src_plugins_dev_plugin_ts.js → 1~dev.plugin.js} +20 -16
- package/dist/{1~node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js → 1~esm.js} +33 -29
- package/dist/1~getESVersionTarget.js +33 -0
- package/dist/{1~src_cli_inspect_ts.js → 1~inspect.js} +2 -1
- package/dist/{1~src_plugins_inspect_plugin_ts.js → 1~inspect.plugin.js} +15 -32
- package/dist/{1~node_modules_pnpm_ipaddr_js_2_3_0_node_modules_ipaddr_js_lib_ipaddr_js.js → 1~ipaddr.js} +2 -1
- package/dist/1~is-lynx.js +5 -0
- package/dist/{1~src_plugins_minify_plugin_ts.js → 1~minify.plugin.js} +2 -1
- package/dist/{0~src_plugins_optimization_plugin_ts.js → 1~optimization.plugin.js} +3 -2
- package/dist/{1~src_plugins_output_plugin_ts.js → 1~output.plugin.js} +14 -3
- package/dist/1~plugins.js +40 -0
- package/dist/{1~src_cli_preview_ts.js → 1~preview.js} +5 -5
- package/dist/{1~src_plugins_rsdoctor_plugin_ts.js → 1~rsdoctor.plugin.js} +2 -2
- package/dist/{0~src_plugins_sourcemap_plugin_ts.js → 1~sourcemap.plugin.js} +19 -2
- package/dist/1~src_cli_init_ts-src_create-rspeedy_ts.js +43 -29
- package/dist/1~statsJson.plugin.js +26 -0
- package/dist/1~swc.plugin.js +25 -0
- package/dist/{1~src_plugins_target_plugin_ts.js → 1~target.plugin.js} +4 -4
- package/dist/{0~src_config_validate_ts.js → 1~validate.js} +17963 -28527
- package/dist/{1~src_cli_watch_ts.js → 1~watch.js} +1 -3
- package/dist/cli/main.js +1 -1
- package/dist/index.d.ts +94 -17
- package/dist/{src_cli_main_ts.js → src_cli_main_ts-node_child_process-node_events-node_fs-node_path-node_process.js} +127 -30
- package/dist/src_index_ts.js +132 -19
- package/package.json +18 -17
- package/dist/0~src_plugins_index_ts.js +0 -64
- package/dist/0~src_plugins_swc_plugin_ts.js +0 -21
- package/dist/0~src_utils_getESVersionTarget_ts.js +0 -4
- package/dist/1~node_fs.js +0 -7
- package/dist/1~node_path.js +0 -7
- package/dist/1~src_plugins_index_ts.js +0 -64
- package/dist/1~src_plugins_swc_plugin_ts.js +0 -21
- package/dist/1~src_utils_getESVersionTarget_ts.js +0 -4
- package/dist/rslib-runtime.js +0 -75
- /package/dist/{0~src_plugins_chunkLoading_plugin_ts.js → 0~chunkLoading.plugin.js} +0 -0
- /package/dist/{0~src_config_output_dist-path_ts.js → 0~dist-path.js} +0 -0
- /package/dist/{0~src_plugins_emitOnErrors_plugin_ts.js → 0~emitOnErrors.plugin.js} +0 -0
- /package/dist/{0~src_plugins_minify_plugin_ts.js → 0~minify.plugin.js} +0 -0
- /package/dist/{0~src_plugins_resolve_plugin_ts.js → 0~resolve.plugin.js} +0 -0
- /package/dist/{1~node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt → 1~chokidar.js.LICENSE.txt} +0 -0
- /package/dist/{1~src_plugins_chunkLoading_plugin_ts.js → 1~chunkLoading.plugin.js} +0 -0
- /package/dist/{1~src_config_output_dist-path_ts.js → 1~dist-path.js} +0 -0
- /package/dist/{1~src_plugins_emitOnErrors_plugin_ts.js → 1~emitOnErrors.plugin.js} +0 -0
- /package/dist/{1~src_utils_is-ci_ts.js → 1~is-ci.js} +0 -0
- /package/dist/{1~src_plugins_resolve_plugin_ts.js → 1~resolve.plugin.js} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
async function watchFiles(files, callback) {
|
|
2
|
-
const chokidar = await import("./1~
|
|
3
|
-
default: mod.chokidar_esm
|
|
4
|
-
}));
|
|
2
|
+
const chokidar = await import("./1~chokidar.js");
|
|
5
3
|
const watcher = chokidar.default.watch(files, {
|
|
6
4
|
ignoreInitial: true,
|
|
7
5
|
ignorePermissionErrors: true
|
package/dist/cli/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { main } from "../src_cli_main_ts.js";
|
|
1
|
+
export { main } from "../src_cli_main_ts-node_child_process-node_events-node_fs-node_path-node_process.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -98,9 +98,50 @@ export declare interface BuildCache {
|
|
|
98
98
|
buildDependencies?: string[] | undefined;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The name of the bundle files.
|
|
103
|
+
*
|
|
104
|
+
* It can be a string with placeholders (`[name]`, `[contenthash]`,
|
|
105
|
+
* `[platform]`), or a function that returns a string based on the
|
|
106
|
+
* {@link BundleFilenameContext}.
|
|
107
|
+
*
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
export declare type BundleFilename = string | ((context: BundleFilenameContext) => string);
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The context passed to the {@link Filename.bundle} function.
|
|
114
|
+
*
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export declare interface BundleFilenameContext {
|
|
118
|
+
/**
|
|
119
|
+
* Whether the filename is being resolved for a lazy bundle (async chunk)
|
|
120
|
+
* instead of the main bundle of an entry.
|
|
121
|
+
*
|
|
122
|
+
* This allows you to control the main bundle and the lazy bundles with a
|
|
123
|
+
* single function, without needing a dedicated `lazyBundle` field.
|
|
124
|
+
*/
|
|
125
|
+
lazyBundle: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* The name of the entry.
|
|
128
|
+
*
|
|
129
|
+
* It is `undefined` for lazy bundles, since a lazy bundle name is resolved
|
|
130
|
+
* per async chunk (use the `[name]` placeholder in the returned string
|
|
131
|
+
* instead).
|
|
132
|
+
*/
|
|
133
|
+
entryName?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* The environment (platform) name, e.g. `'lynx'` or `'web'`.
|
|
136
|
+
*/
|
|
137
|
+
platform: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
101
140
|
/**
|
|
102
141
|
* {@inheritdoc Performance.chunkSplit}
|
|
103
142
|
*
|
|
143
|
+
* @deprecated Use the top-level {@link Config.splitChunks} option instead.
|
|
144
|
+
*
|
|
104
145
|
* @public
|
|
105
146
|
*/
|
|
106
147
|
export declare interface ChunkSplit {
|
|
@@ -195,6 +236,8 @@ export declare interface ChunkSplit {
|
|
|
195
236
|
/**
|
|
196
237
|
* {@inheritdoc Performance.chunkSplit}
|
|
197
238
|
*
|
|
239
|
+
* @deprecated Use the top-level {@link Config.splitChunks} option instead.
|
|
240
|
+
*
|
|
198
241
|
* @public
|
|
199
242
|
*/
|
|
200
243
|
export declare interface ChunkSplitBySize {
|
|
@@ -259,6 +302,8 @@ export declare interface ChunkSplitBySize {
|
|
|
259
302
|
/**
|
|
260
303
|
* {@inheritdoc Performance.chunkSplit}
|
|
261
304
|
*
|
|
305
|
+
* @deprecated Use the top-level {@link Config.splitChunks} option instead.
|
|
306
|
+
*
|
|
262
307
|
* @public
|
|
263
308
|
*/
|
|
264
309
|
export declare interface ChunkSplitCustom {
|
|
@@ -371,7 +416,7 @@ export declare interface Config {
|
|
|
371
416
|
*
|
|
372
417
|
* - Enable HMR and register the {@link https://rspack.rs/plugins/webpack/hot-module-replacement-plugin | HotModuleReplacementPlugin}.
|
|
373
418
|
*
|
|
374
|
-
* - Generate JavaScript source maps,
|
|
419
|
+
* - Generate JavaScript and CSS source maps. In Lynx environments, all `.map` assets are removed before emit. See {@link Output.sourceMap} for details.
|
|
375
420
|
*
|
|
376
421
|
* - The `process.env.NODE_ENV` in the source code will be replaced with `'development'`.
|
|
377
422
|
*
|
|
@@ -391,7 +436,7 @@ export declare interface Config {
|
|
|
391
436
|
*
|
|
392
437
|
* - Generated CSS Modules classnames will be shorter, see {@link CssModules.localIdentName}.
|
|
393
438
|
*
|
|
394
|
-
* -
|
|
439
|
+
* - Generate JavaScript and CSS source maps. In Lynx environments, all `.map` assets are removed before emit. See {@link Output.sourceMap}.
|
|
395
440
|
*
|
|
396
441
|
* - The `process.env.NODE_ENV` in the source code will be replaced with `'production'`.
|
|
397
442
|
*
|
|
@@ -432,6 +477,14 @@ export declare interface Config {
|
|
|
432
477
|
* @defaultValue undefined
|
|
433
478
|
*/
|
|
434
479
|
source?: Source | undefined;
|
|
480
|
+
/**
|
|
481
|
+
* Configure chunk splitting.
|
|
482
|
+
*
|
|
483
|
+
* @defaultValue Rspeedy defaults this to `false`; if configured, Rsbuild handles it with its top-level `splitChunks` option.
|
|
484
|
+
*
|
|
485
|
+
* See {@link https://rsbuild.rs/config/split-chunks | Rsbuild - splitChunks} for details.
|
|
486
|
+
*/
|
|
487
|
+
splitChunks?: RsbuildConfig['splitChunks'] | undefined;
|
|
435
488
|
/**
|
|
436
489
|
* The {@link Tools} options changes the behavior of various building tools.
|
|
437
490
|
*
|
|
@@ -620,16 +673,16 @@ export declare interface CssExtractRspackLoaderOptions {
|
|
|
620
673
|
* You can enable a CommonJS syntax using:
|
|
621
674
|
*
|
|
622
675
|
* ```js
|
|
623
|
-
* import {
|
|
676
|
+
* import {CssExtractRspackPlugin} from "@lynx-js/css-extract-webpack-plugin";
|
|
624
677
|
* export default {
|
|
625
|
-
* plugins: [new
|
|
678
|
+
* plugins: [new CssExtractRspackPlugin()],
|
|
626
679
|
* module: {
|
|
627
680
|
* rules: [
|
|
628
681
|
* {
|
|
629
682
|
* test: /\.css$/i,
|
|
630
683
|
* use: [
|
|
631
684
|
* {
|
|
632
|
-
* loader:
|
|
685
|
+
* loader: CssExtractRspackPlugin.loader,
|
|
633
686
|
* options: {
|
|
634
687
|
* esModule: false,
|
|
635
688
|
* },
|
|
@@ -1601,8 +1654,33 @@ export declare interface Filename {
|
|
|
1601
1654
|
* },
|
|
1602
1655
|
* })
|
|
1603
1656
|
* ```
|
|
1657
|
+
*
|
|
1658
|
+
* @example
|
|
1659
|
+
*
|
|
1660
|
+
* - Using a function to control the main bundle and the lazy bundles
|
|
1661
|
+
* separately (e.g. emit lazy bundles into another directory with a git
|
|
1662
|
+
* commit hash appended):
|
|
1663
|
+
*
|
|
1664
|
+
* ```js
|
|
1665
|
+
* import { execSync } from 'node:child_process'
|
|
1666
|
+
*
|
|
1667
|
+
* import { defineConfig } from '@lynx-js/rspeedy'
|
|
1668
|
+
*
|
|
1669
|
+
* const gitHash = execSync('git rev-parse --short HEAD').toString().trim()
|
|
1670
|
+
*
|
|
1671
|
+
* export default defineConfig({
|
|
1672
|
+
* output: {
|
|
1673
|
+
* filename: {
|
|
1674
|
+
* bundle: ({ lazyBundle, platform }) =>
|
|
1675
|
+
* lazyBundle
|
|
1676
|
+
* ? `my-lazy-bundles/[name].[fullhash]-${gitHash}.bundle`
|
|
1677
|
+
* : `[name].${platform}.bundle`,
|
|
1678
|
+
* },
|
|
1679
|
+
* },
|
|
1680
|
+
* })
|
|
1681
|
+
* ```
|
|
1604
1682
|
*/
|
|
1605
|
-
bundle?:
|
|
1683
|
+
bundle?: BundleFilename | undefined;
|
|
1606
1684
|
/**
|
|
1607
1685
|
* The name of the template files.
|
|
1608
1686
|
*
|
|
@@ -2297,7 +2375,7 @@ export declare interface Output {
|
|
|
2297
2375
|
/**
|
|
2298
2376
|
* The {@link Output.inlineScripts} option controls whether to inline scripts into Lynx bundle (`.lynx.bundle`).
|
|
2299
2377
|
*
|
|
2300
|
-
* @defaultValue Rspeedy defaults this to `true` and only switches it to `false` when the user explicitly
|
|
2378
|
+
* @defaultValue Rspeedy defaults this to `true` and only switches it to `false` when the user explicitly enables the top-level `splitChunks` option.
|
|
2301
2379
|
*
|
|
2302
2380
|
* @remarks
|
|
2303
2381
|
*
|
|
@@ -2362,7 +2440,7 @@ export declare interface Output {
|
|
|
2362
2440
|
/**
|
|
2363
2441
|
* The {@link SourceMap} configures whether and how to generate source-map for outputs.
|
|
2364
2442
|
*
|
|
2365
|
-
* @defaultValue When this option is unset, JavaScript source maps use `'cheap-module-source-map'` in development and
|
|
2443
|
+
* @defaultValue When this option is unset in Lynx builds, JavaScript source maps use `'cheap-module-source-map'` in development and `'source-map'` in production; CSS source maps are also generated. All `.map` assets are removed before emit.
|
|
2366
2444
|
*/
|
|
2367
2445
|
sourceMap?: boolean | SourceMap | undefined;
|
|
2368
2446
|
}
|
|
@@ -2416,10 +2494,12 @@ export declare interface Performance {
|
|
|
2416
2494
|
* {@link Performance.chunkSplit} is used to configure the chunk splitting strategy.
|
|
2417
2495
|
*
|
|
2418
2496
|
* @defaultValue For web builds, Rsbuild currently uses `{ strategy: 'split-by-experience' }` when this option is unset.
|
|
2497
|
+
*
|
|
2498
|
+
* @deprecated Use the top-level {@link Config.splitChunks} option instead.
|
|
2419
2499
|
*/
|
|
2420
2500
|
chunkSplit?: ChunkSplit | ChunkSplitBySize | ChunkSplitCustom | undefined;
|
|
2421
2501
|
/**
|
|
2422
|
-
* Whether capture timing information in
|
|
2502
|
+
* Whether capture timing information in Lynx runtime integrations such as ReactLynx.
|
|
2423
2503
|
*
|
|
2424
2504
|
* @defaultValue Rspeedy sets this to `true` when `DEBUG` contains `rspeedy`; otherwise it leaves the option unset.
|
|
2425
2505
|
*
|
|
@@ -2427,11 +2507,8 @@ export declare interface Performance {
|
|
|
2427
2507
|
*
|
|
2428
2508
|
* Enable profile.
|
|
2429
2509
|
*
|
|
2430
|
-
* - Rsbuild will auto-generate `dist/stats.json` file through bundle analyzer.
|
|
2431
|
-
*
|
|
2432
|
-
* - Rspack will include the build time information when generating `stats.json`.
|
|
2433
|
-
*
|
|
2434
2510
|
* - Frameworks like ReactLynx will include runtime information using `console.profile`.
|
|
2511
|
+
* - Rspeedy will emit `dist/stats.json` after build for bundle analysis compatibility.
|
|
2435
2512
|
*
|
|
2436
2513
|
* ```ts
|
|
2437
2514
|
* import { defineConfig } from '@lynx-js/rspeedy'
|
|
@@ -2957,7 +3034,7 @@ export declare interface Server {
|
|
|
2957
3034
|
/**
|
|
2958
3035
|
* Specify the host that the Rspeedy Server listens to.
|
|
2959
3036
|
*
|
|
2960
|
-
* @defaultValue
|
|
3037
|
+
* @defaultValue "0.0.0.0"
|
|
2961
3038
|
*
|
|
2962
3039
|
* @remarks
|
|
2963
3040
|
* During `rspeedy dev`, if `server.host` is unset, the dev plugin resolves dev-server-related URLs and client host settings with a detected local IPv4 address, such as `192.168.1.50`. If you have multiple network interfaces, set `server.host` explicitly to choose the desired address.
|
|
@@ -3172,7 +3249,7 @@ export declare interface Source {
|
|
|
3172
3249
|
*
|
|
3173
3250
|
* - Notably, if a `typeof` prefix is attached to the key, it will be exclusively defined for `typeof` calls."
|
|
3174
3251
|
*/
|
|
3175
|
-
define?:
|
|
3252
|
+
define?: Rspack.DefinePluginOptions;
|
|
3176
3253
|
/**
|
|
3177
3254
|
* The {@link Entry} option is used to set the entry module.
|
|
3178
3255
|
*
|
|
@@ -3478,7 +3555,7 @@ export declare interface SourceMap {
|
|
|
3478
3555
|
/**
|
|
3479
3556
|
* How the source map should be generated. Setting it to `false` will disable the source map.
|
|
3480
3557
|
*
|
|
3481
|
-
* @defaultValue When `output.sourceMap` is an object and `js` is unset, it defaults to `'cheap-module-source-map'` in development and `false`
|
|
3558
|
+
* @defaultValue When `output.sourceMap` is an object and `js` is unset, it defaults to `'cheap-module-source-map'` in development. In production, it defaults to `'source-map'` for Lynx environments and `false` otherwise.
|
|
3482
3559
|
*
|
|
3483
3560
|
* @remarks
|
|
3484
3561
|
*
|
|
@@ -3540,7 +3617,7 @@ export declare interface SourceMap {
|
|
|
3540
3617
|
*
|
|
3541
3618
|
* @remarks
|
|
3542
3619
|
*
|
|
3543
|
-
* Defaults to `true`.
|
|
3620
|
+
* Defaults to `true`. In Lynx builds, all `.map` assets are removed before emit.
|
|
3544
3621
|
*
|
|
3545
3622
|
* @example
|
|
3546
3623
|
*
|
|
@@ -1,6 +1,106 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { logger, rspack, version } from "@rsbuild/core";
|
|
2
|
+
import node_process from "node:process";
|
|
3
|
+
import { createRequire as __rspack_createRequire } from "node:module";
|
|
4
|
+
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
5
|
+
var __webpack_modules__ = {};
|
|
6
|
+
var __webpack_module_cache__ = {};
|
|
7
|
+
function __webpack_require__(moduleId) {
|
|
8
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
9
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
10
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
11
|
+
exports: {}
|
|
12
|
+
};
|
|
13
|
+
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
14
|
+
return module.exports;
|
|
15
|
+
}
|
|
16
|
+
__webpack_require__.m = __webpack_modules__;
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.n = (module)=>{
|
|
19
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
20
|
+
__webpack_require__.d(getter, {
|
|
21
|
+
a: getter
|
|
22
|
+
});
|
|
23
|
+
return getter;
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
(()=>{
|
|
27
|
+
var getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
|
|
28
|
+
var leafPrototypes;
|
|
29
|
+
__webpack_require__.t = function(value, mode) {
|
|
30
|
+
if (1 & mode) value = this(value);
|
|
31
|
+
if (8 & mode) return value;
|
|
32
|
+
if ('object' == typeof value && value) {
|
|
33
|
+
if (4 & mode && value.__esModule) return value;
|
|
34
|
+
if (16 & mode && 'function' == typeof value.then) return value;
|
|
35
|
+
}
|
|
36
|
+
var ns = Object.create(null);
|
|
37
|
+
__webpack_require__.r(ns);
|
|
38
|
+
var def = {};
|
|
39
|
+
leafPrototypes = leafPrototypes || [
|
|
40
|
+
null,
|
|
41
|
+
getProto({}),
|
|
42
|
+
getProto([]),
|
|
43
|
+
getProto(getProto)
|
|
44
|
+
];
|
|
45
|
+
for(var current = 2 & mode && value; ('object' == typeof current || 'function' == typeof current) && !~leafPrototypes.indexOf(current); current = getProto(current))Object.getOwnPropertyNames(current).forEach((key)=>{
|
|
46
|
+
def[key] = ()=>value[key];
|
|
47
|
+
});
|
|
48
|
+
def['default'] = ()=>value;
|
|
49
|
+
__webpack_require__.d(ns, def);
|
|
50
|
+
return ns;
|
|
51
|
+
};
|
|
52
|
+
})();
|
|
53
|
+
(()=>{
|
|
54
|
+
__webpack_require__.d = (exports, getters, values)=>{
|
|
55
|
+
var define = (defs, kind)=>{
|
|
56
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
[kind]: defs[key]
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
define(getters, "get");
|
|
62
|
+
define(values, "value");
|
|
63
|
+
};
|
|
64
|
+
})();
|
|
65
|
+
(()=>{
|
|
66
|
+
__webpack_require__.add = function(modules) {
|
|
67
|
+
Object.assign(__webpack_require__.m, modules);
|
|
68
|
+
};
|
|
69
|
+
})();
|
|
70
|
+
var __webpack_require__temp = __webpack_require__;
|
|
71
|
+
(()=>{
|
|
72
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
73
|
+
})();
|
|
74
|
+
(()=>{
|
|
75
|
+
__webpack_require__.r = (exports)=>{
|
|
76
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
77
|
+
value: 'Module'
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, '__esModule', {
|
|
80
|
+
value: true
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
})();
|
|
84
|
+
(()=>{
|
|
85
|
+
var installedChunks = {
|
|
86
|
+
"cli/main": 0,
|
|
87
|
+
"src_cli_main_ts-node_child_process-node_events-node_fs-node_path-node_process": 0
|
|
88
|
+
};
|
|
89
|
+
var installChunk = (data)=>{
|
|
90
|
+
var __rspack_esm_ids = data.__rspack_esm_ids;
|
|
91
|
+
var __webpack_modules__ = data.__webpack_modules__;
|
|
92
|
+
var __rspack_esm_runtime = data.__rspack_esm_runtime;
|
|
93
|
+
var moduleId, chunkId, i = 0;
|
|
94
|
+
for(moduleId in __webpack_modules__)if (__webpack_require__.o(__webpack_modules__, moduleId)) __webpack_require__.m[moduleId] = __webpack_modules__[moduleId];
|
|
95
|
+
if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
|
|
96
|
+
for(; i < __rspack_esm_ids.length; i++){
|
|
97
|
+
chunkId = __rspack_esm_ids[i];
|
|
98
|
+
if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) installedChunks[chunkId][0]();
|
|
99
|
+
installedChunks[__rspack_esm_ids[i]] = 0;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
__webpack_require__.C = installChunk;
|
|
103
|
+
})();
|
|
4
104
|
__webpack_require__.add({
|
|
5
105
|
"../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
|
|
6
106
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
@@ -68,11 +168,22 @@ __webpack_require__.add({
|
|
|
68
168
|
module.exports = createColors();
|
|
69
169
|
module.exports.createColors = createColors;
|
|
70
170
|
},
|
|
71
|
-
"node:
|
|
72
|
-
module.exports =
|
|
171
|
+
"node:child_process" (module) {
|
|
172
|
+
module.exports = __rspack_createRequire_require("node:child_process");
|
|
173
|
+
},
|
|
174
|
+
"node:events" (module) {
|
|
175
|
+
module.exports = __rspack_createRequire_require("node:events");
|
|
176
|
+
},
|
|
177
|
+
"node:fs?9592" (module) {
|
|
178
|
+
module.exports = __rspack_createRequire_require("node:fs");
|
|
179
|
+
},
|
|
180
|
+
"node:path?435f" (module) {
|
|
181
|
+
module.exports = __rspack_createRequire_require("node:path");
|
|
182
|
+
},
|
|
183
|
+
"node:process?ecf8" (module) {
|
|
184
|
+
module.exports = __rspack_createRequire_require("node:process");
|
|
73
185
|
}
|
|
74
186
|
});
|
|
75
|
-
const external_node_process_ = __webpack_require__("node:process");
|
|
76
187
|
const asyncCallbacks = new Set();
|
|
77
188
|
const callbacks = new Set();
|
|
78
189
|
let isCalled = false;
|
|
@@ -83,7 +194,7 @@ async function exit(shouldManuallyExit, isSynchronous, signal) {
|
|
|
83
194
|
if (asyncCallbacks.size > 0 && isSynchronous) console.error("SYNCHRONOUS TERMINATION NOTICE: When explicitly exiting the process via process.exit or via a parent process, asynchronous tasks in your exitHooks will not run. Either remove these tasks, use gracefulExit() instead of process.exit(), or ensure your parent process sends a SIGINT to the process running this code.");
|
|
84
195
|
const exitCode = 128 + signal;
|
|
85
196
|
const done = (force = false)=>{
|
|
86
|
-
if (true === force || true === shouldManuallyExit)
|
|
197
|
+
if (true === force || true === shouldManuallyExit) node_process.exit(exitCode);
|
|
87
198
|
};
|
|
88
199
|
for (const callback of callbacks)callback(exitCode);
|
|
89
200
|
if (isSynchronous) return void done();
|
|
@@ -110,11 +221,11 @@ function addHook(options) {
|
|
|
110
221
|
else asyncCallbacks.add(asyncCallbackConfig);
|
|
111
222
|
if (!isRegistered) {
|
|
112
223
|
isRegistered = true;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
224
|
+
node_process.once('beforeExit', exit.bind(void 0, true, false, -128));
|
|
225
|
+
node_process.once('SIGINT', exit.bind(void 0, true, false, 2));
|
|
226
|
+
node_process.once('SIGTERM', exit.bind(void 0, true, false, 15));
|
|
227
|
+
node_process.once('exit', exit.bind(void 0, false, true, 0));
|
|
228
|
+
node_process.on('message', (message)=>{
|
|
118
229
|
if ('shutdown' === message) exit(true, true, -128);
|
|
119
230
|
});
|
|
120
231
|
}
|
|
@@ -192,7 +303,7 @@ async function exit_onExit(signal) {
|
|
|
192
303
|
await Promise.allSettled(exitPromises);
|
|
193
304
|
}
|
|
194
305
|
var package_namespaceObject = {
|
|
195
|
-
rE: "0.
|
|
306
|
+
rE: "0.15.0"
|
|
196
307
|
};
|
|
197
308
|
const version_version = package_namespaceObject.rE;
|
|
198
309
|
const rspackVersion = rspack.rspackVersion;
|
|
@@ -210,26 +321,12 @@ async function main(argv) {
|
|
|
210
321
|
logger.greet(` Rspeedy v${version_version} (Rsbuild v${version}, Rspack v${rspackVersion})\n`);
|
|
211
322
|
try {
|
|
212
323
|
const [{ Command }, { apply }] = await Promise.all([
|
|
213
|
-
import("./1~
|
|
214
|
-
|
|
215
|
-
Command: mod.Command,
|
|
216
|
-
CommanderError: mod.CommanderError,
|
|
217
|
-
Help: mod.Help,
|
|
218
|
-
InvalidArgumentError: mod.InvalidArgumentError,
|
|
219
|
-
InvalidOptionArgumentError: mod.InvalidOptionArgumentError,
|
|
220
|
-
Option: mod.Option,
|
|
221
|
-
createArgument: mod.createArgument,
|
|
222
|
-
createCommand: mod.createCommand,
|
|
223
|
-
createOption: mod.createOption,
|
|
224
|
-
program: mod.program
|
|
225
|
-
})),
|
|
226
|
-
import("./1~src_cli_commands_ts.js").then((mod)=>({
|
|
227
|
-
apply: mod.apply
|
|
228
|
-
}))
|
|
324
|
+
import("./1~esm.js").then((m)=>m.esm_namespaceObject),
|
|
325
|
+
import("./1~commands.js")
|
|
229
326
|
]);
|
|
230
327
|
apply(new Command('rspeedy')).parse(argv);
|
|
231
328
|
} catch {
|
|
232
329
|
return exit_exit(1);
|
|
233
330
|
}
|
|
234
331
|
}
|
|
235
|
-
export {
|
|
332
|
+
export { __webpack_require__temp as __webpack_require__, debug, debugList, exit_exit as exit, isDebug, main, version_version };
|