@lynx-js/rspeedy-canary 0.10.8 → 0.10.9-canary-20250826-1952fc15

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +50 -40
  2. package/dist/cli/main.js +12 -73
  3. package/dist/events-fs-fs_promises-os-path-stream.js +30 -0
  4. package/dist/index.js +19 -39
  5. package/dist/node_child_process-node_events-node_fs-node_path.js +22 -0
  6. package/dist/src_cli_build_ts.js +101 -28
  7. package/dist/src_cli_commands_ts.js +4 -3
  8. package/dist/src_cli_dev_ts.js +76 -53
  9. package/dist/src_cli_exit_ts.js +12 -11
  10. package/dist/src_cli_inspect_ts.js +25 -16
  11. package/dist/src_cli_preview_ts.js +25 -16
  12. package/dist/src_config_validate_ts.js +86 -49
  13. package/dist/src_plugins_api_plugin_ts.js +2 -1
  14. package/dist/src_plugins_chunkLoading_plugin_ts.js +6 -5
  15. package/dist/src_plugins_dev_plugin_ts.js +4 -3
  16. package/dist/src_plugins_emitOnErrors_plugin_ts.js +1 -0
  17. package/dist/src_plugins_index_ts.js +3 -2
  18. package/dist/src_plugins_inspect_plugin_ts.js +16 -15
  19. package/dist/src_plugins_minify_plugin_ts.js +3 -2
  20. package/dist/src_plugins_optimization_plugin_ts.js +1 -0
  21. package/dist/src_plugins_output_plugin_ts.js +3 -2
  22. package/dist/src_plugins_resolve_plugin_ts.js +1 -0
  23. package/dist/src_plugins_rsdoctor_plugin_ts.js +3 -2
  24. package/dist/src_plugins_sourcemap_plugin_ts.js +1 -0
  25. package/dist/src_plugins_swc_plugin_ts.js +3 -2
  26. package/dist/src_plugins_target_plugin_ts.js +6 -5
  27. package/dist/src_version_ts.js +3 -2
  28. package/dist/vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js +1 -0
  29. package/dist/vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js +1 -0
  30. package/dist/vendors-node_modules_pnpm_ipaddr_js_2_2_0_node_modules_ipaddr_js_lib_ipaddr_js.js +1 -0
  31. package/dist/vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +1 -0
  32. package/package.json +2 -2
@@ -1,21 +1,24 @@
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_inspect_ts";
1
6
  export const __webpack_ids__ = [
2
7
  "src_cli_inspect_ts"
3
8
  ];
4
9
  export const __webpack_modules__ = {
5
10
  "./src/cli/init.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
11
  __webpack_require__.d(__webpack_exports__, {
7
- S: ()=>init
12
+ T: ()=>init
8
13
  });
9
14
  var external_node_fs_ = __webpack_require__("node:fs");
10
15
  var external_node_path_ = __webpack_require__("node:path");
11
- var external_node_url_ = __webpack_require__("node:url");
12
16
  var picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
13
17
  var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
14
- var register_ = __webpack_require__("@lynx-js/rspeedy/register");
15
18
  var debug = __webpack_require__("./src/debug.ts");
16
19
  const resolveConfigPath = (root, customConfig)=>{
17
20
  if (customConfig) {
18
- (0, debug.fF)(`load custom config file ${customConfig} from ${root}`);
21
+ (0, debug.Yz)(`load custom config file ${customConfig} from ${root}`);
19
22
  const customConfigPath = (0, external_node_path_.isAbsolute)(customConfig) ? customConfig : (0, external_node_path_.join)(root, customConfig);
20
23
  if (external_node_fs_["default"].existsSync(customConfigPath)) return customConfigPath;
21
24
  throw new Error(`Cannot find config file: ${picocolors_default().dim(customConfigPath)}`);
@@ -27,10 +30,10 @@ export const __webpack_modules__ = {
27
30
  'lynx.config.mjs'
28
31
  ];
29
32
  for (const file of CONFIG_FILES){
30
- (0, debug.fF)(`load default config file ${file} from ${root}`);
33
+ (0, debug.Yz)(`load default config file ${file} from ${root}`);
31
34
  const configFile = (0, external_node_path_.join)(root, file);
32
35
  if (external_node_fs_["default"].existsSync(configFile)) {
33
- (0, debug.fF)(`default config ${configFile} found`);
36
+ (0, debug.Yz)(`default config ${configFile} found`);
34
37
  return configFile;
35
38
  }
36
39
  }
@@ -42,9 +45,9 @@ export const __webpack_modules__ = {
42
45
  async function loadConfig(loadConfigOptions) {
43
46
  let { configPath } = loadConfigOptions;
44
47
  if (!configPath || !(0, external_node_path_.isAbsolute)(configPath)) configPath = resolveConfigPath(loadConfigOptions.cwd ?? process.cwd(), configPath);
45
- const specifier = (0, external_node_url_.pathToFileURL)(configPath).toString();
48
+ const specifier = pathToFileURL(configPath).toString();
46
49
  let unregister;
47
- unregister = shouldUseNativeImport(configPath) ? ()=>{} : (0, register_.register)({
50
+ unregister = shouldUseNativeImport(configPath) ? ()=>{} : register({
48
51
  load: !hasNativeTSSupport(),
49
52
  resolve: true
50
53
  });
@@ -131,8 +134,8 @@ export const __webpack_modules__ = {
131
134
  var _init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/cli/init.ts");
132
135
  async function inspect(cwd, inspectOptions) {
133
136
  try {
134
- const { createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_3__.S)(cwd, inspectOptions);
135
- const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_2__.S)(createRspeedyOptions);
137
+ const { createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_3__.T)(cwd, inspectOptions);
138
+ const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_2__.x)(createRspeedyOptions);
136
139
  await rspeedy.inspectConfig({
137
140
  mode: inspectOptions.mode ?? rspeedy.getRspeedyConfig().mode ?? 'development',
138
141
  verbose: inspectOptions.verbose ?? false,
@@ -148,7 +151,7 @@ export const __webpack_modules__ = {
148
151
  },
149
152
  "./src/create-rspeedy.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
150
153
  __webpack_require__.d(__webpack_exports__, {
151
- S: ()=>createRspeedy
154
+ x: ()=>createRspeedy
152
155
  });
153
156
  var external_node_path_ = __webpack_require__("node:path");
154
157
  var core_ = __webpack_require__("@rsbuild/core");
@@ -166,7 +169,7 @@ export const __webpack_modules__ = {
166
169
  inlineScripts: !enableChunkSplitting
167
170
  },
168
171
  performance: {
169
- profile: (0, debug.L1)() ? true : void 0
172
+ profile: (0, debug._o)() ? true : void 0
170
173
  },
171
174
  tools: {
172
175
  rsdoctor: {
@@ -192,13 +195,13 @@ export const __webpack_modules__ = {
192
195
  const DEFAULT_ENTRY = './src/index.js';
193
196
  function toRsbuildEntry(entry) {
194
197
  if (void 0 === entry) {
195
- (0, debug.fF)(`Using default entry ${DEFAULT_ENTRY}`);
198
+ (0, debug.Yz)(`Using default entry ${DEFAULT_ENTRY}`);
196
199
  return {
197
200
  main: DEFAULT_ENTRY
198
201
  };
199
202
  }
200
203
  if (Array.isArray(entry) || 'string' == typeof entry) {
201
- (0, debug.fF)(()=>`Using single entry ${[
204
+ (0, debug.Yz)(()=>`Using single entry ${[
202
205
  ''
203
206
  ].concat(entry).join('\n - ')}`);
204
207
  return {
@@ -207,7 +210,7 @@ export const __webpack_modules__ = {
207
210
  }
208
211
  return Object.fromEntries(Object.entries(entry).map(([key, value])=>{
209
212
  if (Array.isArray(value) || 'string' == typeof value) {
210
- (0, debug.NW)(`Using multiple entries - ${key}`, value);
213
+ (0, debug.Iv)(`Using multiple entries - ${key}`, value);
211
214
  return [
212
215
  key,
213
216
  {
@@ -215,7 +218,7 @@ export const __webpack_modules__ = {
215
218
  }
216
219
  ];
217
220
  }
218
- (0, debug.NW)(`Using multiple entries - ${key}`, value.import ?? DEFAULT_ENTRY);
221
+ (0, debug.Iv)(`Using multiple entries - ${key}`, value.import ?? DEFAULT_ENTRY);
219
222
  if (void 0 === value.import) return [
220
223
  key,
221
224
  {
@@ -333,5 +336,11 @@ export const __webpack_modules__ = {
333
336
  }
334
337
  });
335
338
  }
339
+ },
340
+ "node:fs": function(module) {
341
+ module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
342
+ },
343
+ "node:path": function(module) {
344
+ module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
336
345
  }
337
346
  };
@@ -1,21 +1,24 @@
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_preview_ts";
1
6
  export const __webpack_ids__ = [
2
7
  "src_cli_preview_ts"
3
8
  ];
4
9
  export const __webpack_modules__ = {
5
10
  "./src/cli/init.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
11
  __webpack_require__.d(__webpack_exports__, {
7
- S: ()=>init
12
+ T: ()=>init
8
13
  });
9
14
  var external_node_fs_ = __webpack_require__("node:fs");
10
15
  var external_node_path_ = __webpack_require__("node:path");
11
- var external_node_url_ = __webpack_require__("node:url");
12
16
  var picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
13
17
  var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
14
- var register_ = __webpack_require__("@lynx-js/rspeedy/register");
15
18
  var debug = __webpack_require__("./src/debug.ts");
16
19
  const resolveConfigPath = (root, customConfig)=>{
17
20
  if (customConfig) {
18
- (0, debug.fF)(`load custom config file ${customConfig} from ${root}`);
21
+ (0, debug.Yz)(`load custom config file ${customConfig} from ${root}`);
19
22
  const customConfigPath = (0, external_node_path_.isAbsolute)(customConfig) ? customConfig : (0, external_node_path_.join)(root, customConfig);
20
23
  if (external_node_fs_["default"].existsSync(customConfigPath)) return customConfigPath;
21
24
  throw new Error(`Cannot find config file: ${picocolors_default().dim(customConfigPath)}`);
@@ -27,10 +30,10 @@ export const __webpack_modules__ = {
27
30
  'lynx.config.mjs'
28
31
  ];
29
32
  for (const file of CONFIG_FILES){
30
- (0, debug.fF)(`load default config file ${file} from ${root}`);
33
+ (0, debug.Yz)(`load default config file ${file} from ${root}`);
31
34
  const configFile = (0, external_node_path_.join)(root, file);
32
35
  if (external_node_fs_["default"].existsSync(configFile)) {
33
- (0, debug.fF)(`default config ${configFile} found`);
36
+ (0, debug.Yz)(`default config ${configFile} found`);
34
37
  return configFile;
35
38
  }
36
39
  }
@@ -42,9 +45,9 @@ export const __webpack_modules__ = {
42
45
  async function loadConfig(loadConfigOptions) {
43
46
  let { configPath } = loadConfigOptions;
44
47
  if (!configPath || !(0, external_node_path_.isAbsolute)(configPath)) configPath = resolveConfigPath(loadConfigOptions.cwd ?? process.cwd(), configPath);
45
- const specifier = (0, external_node_url_.pathToFileURL)(configPath).toString();
48
+ const specifier = pathToFileURL(configPath).toString();
46
49
  let unregister;
47
- unregister = shouldUseNativeImport(configPath) ? ()=>{} : (0, register_.register)({
50
+ unregister = shouldUseNativeImport(configPath) ? ()=>{} : register({
48
51
  load: !hasNativeTSSupport(),
49
52
  resolve: true
50
53
  });
@@ -134,8 +137,8 @@ export const __webpack_modules__ = {
134
137
  var _init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/cli/init.ts");
135
138
  async function preview(cwd, previewOptions) {
136
139
  try {
137
- const { createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_4__.S)(cwd, previewOptions);
138
- const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_3__.S)(createRspeedyOptions);
140
+ const { createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_4__.T)(cwd, previewOptions);
141
+ const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_3__.x)(createRspeedyOptions);
139
142
  await rspeedy.initConfigs();
140
143
  const { distPath } = rspeedy.context;
141
144
  if (!node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].existsSync(distPath)) throw new Error(`The output directory ${picocolors__WEBPACK_IMPORTED_MODULE_5___default().yellow(distPath)} does not exist, please build the project before previewing.`);
@@ -150,7 +153,7 @@ export const __webpack_modules__ = {
150
153
  },
151
154
  "./src/create-rspeedy.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
152
155
  __webpack_require__.d(__webpack_exports__, {
153
- S: ()=>createRspeedy
156
+ x: ()=>createRspeedy
154
157
  });
155
158
  var external_node_path_ = __webpack_require__("node:path");
156
159
  var core_ = __webpack_require__("@rsbuild/core");
@@ -168,7 +171,7 @@ export const __webpack_modules__ = {
168
171
  inlineScripts: !enableChunkSplitting
169
172
  },
170
173
  performance: {
171
- profile: (0, debug.L1)() ? true : void 0
174
+ profile: (0, debug._o)() ? true : void 0
172
175
  },
173
176
  tools: {
174
177
  rsdoctor: {
@@ -194,13 +197,13 @@ export const __webpack_modules__ = {
194
197
  const DEFAULT_ENTRY = './src/index.js';
195
198
  function toRsbuildEntry(entry) {
196
199
  if (void 0 === entry) {
197
- (0, debug.fF)(`Using default entry ${DEFAULT_ENTRY}`);
200
+ (0, debug.Yz)(`Using default entry ${DEFAULT_ENTRY}`);
198
201
  return {
199
202
  main: DEFAULT_ENTRY
200
203
  };
201
204
  }
202
205
  if (Array.isArray(entry) || 'string' == typeof entry) {
203
- (0, debug.fF)(()=>`Using single entry ${[
206
+ (0, debug.Yz)(()=>`Using single entry ${[
204
207
  ''
205
208
  ].concat(entry).join('\n - ')}`);
206
209
  return {
@@ -209,7 +212,7 @@ export const __webpack_modules__ = {
209
212
  }
210
213
  return Object.fromEntries(Object.entries(entry).map(([key, value])=>{
211
214
  if (Array.isArray(value) || 'string' == typeof value) {
212
- (0, debug.NW)(`Using multiple entries - ${key}`, value);
215
+ (0, debug.Iv)(`Using multiple entries - ${key}`, value);
213
216
  return [
214
217
  key,
215
218
  {
@@ -217,7 +220,7 @@ export const __webpack_modules__ = {
217
220
  }
218
221
  ];
219
222
  }
220
- (0, debug.NW)(`Using multiple entries - ${key}`, value.import ?? DEFAULT_ENTRY);
223
+ (0, debug.Iv)(`Using multiple entries - ${key}`, value.import ?? DEFAULT_ENTRY);
221
224
  if (void 0 === value.import) return [
222
225
  key,
223
226
  {
@@ -335,5 +338,11 @@ export const __webpack_modules__ = {
335
338
  }
336
339
  });
337
340
  }
341
+ },
342
+ "node:fs": function(module) {
343
+ module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
344
+ },
345
+ "node:path": function(module) {
346
+ module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
338
347
  }
339
348
  };