@rspack/cli 1.2.5 → 1.2.6

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.ids = [
3
- '737'
3
+ '618'
4
4
  ];
5
5
  exports.modules = {
6
6
  "./src/utils/profile.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@@ -1,5 +1,5 @@
1
1
  export const ids = [
2
- '737'
2
+ '618'
3
3
  ];
4
4
  export const modules = {
5
5
  "./src/utils/profile.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
package/dist/index.js CHANGED
@@ -140,7 +140,7 @@ var __webpack_exports__ = {};
140
140
  string: true,
141
141
  describe: "entry file"
142
142
  },
143
- "output-path": {
143
+ outputPath: {
144
144
  type: "string",
145
145
  describe: "output path dir",
146
146
  alias: "o"
@@ -161,7 +161,7 @@ var __webpack_exports__ = {};
161
161
  string: true,
162
162
  describe: "env passed to config function"
163
163
  },
164
- "node-env": {
164
+ nodeEnv: {
165
165
  string: true,
166
166
  describe: "sets process.env.NODE_ENV to be specified value"
167
167
  },
@@ -176,7 +176,7 @@ var __webpack_exports__ = {};
176
176
  string: true,
177
177
  describe: "Name of the configuration to use."
178
178
  },
179
- "config-loader": {
179
+ configLoader: {
180
180
  type: "string",
181
181
  default: "register",
182
182
  describe: "Specify the loader to load the config file, can be `native` or `register`."
@@ -554,12 +554,12 @@ var __webpack_exports__ = {};
554
554
  if (options.config) {
555
555
  const configPath = external_node_path_default().resolve(cwd, options.config);
556
556
  if (!external_node_fs_default().existsSync(configPath)) throw new Error(`config file "${configPath}" not found.`);
557
- if (isTsFile(configPath) && "register" === options["config-loader"]) await registerLoader(configPath);
557
+ if (isTsFile(configPath) && "register" === options.configLoader) await registerLoader(configPath);
558
558
  return crossImport(configPath, cwd);
559
559
  }
560
560
  const defaultConfig = utils_findConfig(external_node_path_default().resolve(cwd, loadConfig_DEFAULT_CONFIG_NAME));
561
561
  if (defaultConfig) {
562
- if (isTsFile(defaultConfig) && "register" === options["config-loader"]) await registerLoader(defaultConfig);
562
+ if (isTsFile(defaultConfig) && "register" === options.configLoader) await registerLoader(defaultConfig);
563
563
  return crossImport(defaultConfig, cwd);
564
564
  }
565
565
  return {};
@@ -647,7 +647,7 @@ var __webpack_exports__ = {};
647
647
  main: options.entry.map((x)=>external_node_path_default().resolve(process.cwd(), x))[0]
648
648
  };
649
649
  item.output = item.output || {};
650
- if (options["output-path"]) item.output.path = external_node_path_default().resolve(process.cwd(), options["output-path"]);
650
+ if (options.outputPath) item.output.path = external_node_path_default().resolve(process.cwd(), options.outputPath);
651
651
  if (options.analyze) {
652
652
  const { BundleAnalyzerPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "webpack-bundle-analyzer"));
653
653
  (item.plugins ??= []).push({
@@ -661,7 +661,7 @@ var __webpack_exports__ = {};
661
661
  }
662
662
  if (options.profile) item.profile = true;
663
663
  if (process.env.RSPACK_PROFILE) {
664
- const { applyProfile } = await __webpack_require__.e("737").then(__webpack_require__.bind(__webpack_require__, "./src/utils/profile.ts"));
664
+ const { applyProfile } = await __webpack_require__.e("618").then(__webpack_require__.bind(__webpack_require__, "./src/utils/profile.ts"));
665
665
  await applyProfile(process.env.RSPACK_PROFILE, item);
666
666
  }
667
667
  if (options.watch) item.watch = options.watch;
package/dist/index.mjs CHANGED
@@ -116,7 +116,7 @@ const commonOptions = (yargs)=>yargs.options({
116
116
  string: true,
117
117
  describe: "entry file"
118
118
  },
119
- "output-path": {
119
+ outputPath: {
120
120
  type: "string",
121
121
  describe: "output path dir",
122
122
  alias: "o"
@@ -137,7 +137,7 @@ const commonOptions = (yargs)=>yargs.options({
137
137
  string: true,
138
138
  describe: "env passed to config function"
139
139
  },
140
- "node-env": {
140
+ nodeEnv: {
141
141
  string: true,
142
142
  describe: "sets process.env.NODE_ENV to be specified value"
143
143
  },
@@ -152,7 +152,7 @@ const commonOptions = (yargs)=>yargs.options({
152
152
  string: true,
153
153
  describe: "Name of the configuration to use."
154
154
  },
155
- "config-loader": {
155
+ configLoader: {
156
156
  type: "string",
157
157
  default: "register",
158
158
  describe: "Specify the loader to load the config file, can be `native` or `register`."
@@ -530,12 +530,12 @@ async function loadRspackConfig(options, cwd = process.cwd()) {
530
530
  if (options.config) {
531
531
  const configPath = external_node_path_["default"].resolve(cwd, options.config);
532
532
  if (!external_node_fs_["default"].existsSync(configPath)) throw new Error(`config file "${configPath}" not found.`);
533
- if (isTsFile(configPath) && "register" === options["config-loader"]) await registerLoader(configPath);
533
+ if (isTsFile(configPath) && "register" === options.configLoader) await registerLoader(configPath);
534
534
  return crossImport(configPath, cwd);
535
535
  }
536
536
  const defaultConfig = utils_findConfig(external_node_path_["default"].resolve(cwd, loadConfig_DEFAULT_CONFIG_NAME));
537
537
  if (defaultConfig) {
538
- if (isTsFile(defaultConfig) && "register" === options["config-loader"]) await registerLoader(defaultConfig);
538
+ if (isTsFile(defaultConfig) && "register" === options.configLoader) await registerLoader(defaultConfig);
539
539
  return crossImport(defaultConfig, cwd);
540
540
  }
541
541
  return {};
@@ -623,7 +623,7 @@ class RspackCLI {
623
623
  main: options.entry.map((x)=>external_node_path_["default"].resolve(process.cwd(), x))[0]
624
624
  };
625
625
  item.output = item.output || {};
626
- if (options["output-path"]) item.output.path = external_node_path_["default"].resolve(process.cwd(), options["output-path"]);
626
+ if (options.outputPath) item.output.path = external_node_path_["default"].resolve(process.cwd(), options.outputPath);
627
627
  if (options.analyze) {
628
628
  const { BundleAnalyzerPlugin } = await import("webpack-bundle-analyzer");
629
629
  (item.plugins ??= []).push({
@@ -637,7 +637,7 @@ class RspackCLI {
637
637
  }
638
638
  if (options.profile) item.profile = true;
639
639
  if (process.env.RSPACK_PROFILE) {
640
- const { applyProfile } = await __webpack_require__.e("737").then(__webpack_require__.bind(__webpack_require__, "./src/utils/profile.ts"));
640
+ const { applyProfile } = await __webpack_require__.e("618").then(__webpack_require__.bind(__webpack_require__, "./src/utils/profile.ts"));
641
641
  await applyProfile(process.env.RSPACK_PROFILE, item);
642
642
  }
643
643
  if (options.watch) item.watch = options.watch;
package/dist/types.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface RspackCLIOptions {
21
21
  config?: string;
22
22
  argv?: Record<string, any>;
23
23
  configName?: string[];
24
- "config-loader"?: string;
24
+ configLoader?: string;
25
25
  }
26
26
  export interface RspackBuildCLIOptions extends RspackCLIOptions {
27
27
  entry?: string[];
@@ -32,7 +32,7 @@ export interface RspackBuildCLIOptions extends RspackCLIOptions {
32
32
  profile?: boolean;
33
33
  env?: Record<string, any>;
34
34
  nodeEnv?: string;
35
- "output-path"?: string;
35
+ outputPath?: string;
36
36
  }
37
37
  export interface RspackPreviewCLIOptions extends RspackCLIOptions {
38
38
  dir?: string;
@@ -1,5 +1,5 @@
1
1
  import type yargs from "yargs";
2
- export declare const commonOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, "entry" | "devtool" | "mode" | "watch" | "env" | "output-path" | "config" | "node-env" | "configName" | "config-loader"> & yargs.InferredOptionTypes<{
2
+ export declare const commonOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, "entry" | "devtool" | "mode" | "watch" | "env" | "nodeEnv" | "outputPath" | "config" | "configName" | "configLoader"> & yargs.InferredOptionTypes<{
3
3
  config: {
4
4
  g: boolean;
5
5
  type: "string";
@@ -11,7 +11,7 @@ export declare const commonOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit
11
11
  string: true;
12
12
  describe: string;
13
13
  };
14
- "output-path": {
14
+ outputPath: {
15
15
  type: "string";
16
16
  describe: string;
17
17
  alias: string;
@@ -32,7 +32,7 @@ export declare const commonOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit
32
32
  string: true;
33
33
  describe: string;
34
34
  };
35
- "node-env": {
35
+ nodeEnv: {
36
36
  string: true;
37
37
  describe: string;
38
38
  };
@@ -47,7 +47,7 @@ export declare const commonOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit
47
47
  string: true;
48
48
  describe: string;
49
49
  };
50
- "config-loader": {
50
+ configLoader: {
51
51
  type: "string";
52
52
  default: string;
53
53
  describe: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/cli",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "CLI for rspack",
5
5
  "homepage": "https://rspack.dev",
6
6
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@discoveryjs/json-ext": "^0.5.7",
32
32
  "@rspack/dev-server": "1.0.10",
33
- "colorette": "2.0.19",
33
+ "colorette": "2.0.20",
34
34
  "exit-hook": "^4.0.0",
35
35
  "interpret": "^3.1.1",
36
36
  "rechoir": "^0.8.0",
@@ -38,18 +38,18 @@
38
38
  "yargs": "17.7.2"
39
39
  },
40
40
  "devDependencies": {
41
- "@rslib/core": "0.4.0",
41
+ "@rslib/core": "0.5.1",
42
42
  "@types/interpret": "^1.1.3",
43
- "@types/rechoir": "^0.6.1",
44
- "@types/webpack-bundle-analyzer": "^4.6.0",
43
+ "@types/rechoir": "^0.6.4",
44
+ "@types/webpack-bundle-analyzer": "^4.7.0",
45
45
  "@types/yargs": "17.0.33",
46
46
  "concat-stream": "^2.0.0",
47
47
  "cross-env": "^7.0.3",
48
- "execa": "^5.0.0",
48
+ "execa": "^5.1.1",
49
49
  "ts-node": "^10.9.2",
50
50
  "typescript": "^5.7.3",
51
- "@rspack/core": "1.2.5",
52
- "@rspack/tracing": "1.2.5"
51
+ "@rspack/tracing": "1.2.6",
52
+ "@rspack/core": "1.2.6"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@rspack/core": "^1.0.0-alpha || ^1.x",