@rspack/cli 1.0.13 → 1.0.14

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/dist/bootstrap.js CHANGED
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runCLI = void 0;
3
+ exports.runCLI = runCLI;
4
4
  const cli_1 = require("./cli");
5
5
  async function runCLI(argv) {
6
6
  const cli = new cli_1.RspackCLI();
7
7
  await cli.run(argv);
8
8
  }
9
- exports.runCLI = runCLI;
package/dist/cli.js CHANGED
@@ -26,7 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.definePlugin = exports.defineConfig = exports.RspackCLI = void 0;
29
+ exports.RspackCLI = void 0;
30
+ exports.defineConfig = defineConfig;
31
+ exports.definePlugin = definePlugin;
30
32
  const node_path_1 = __importDefault(require("node:path"));
31
33
  const node_util_1 = __importDefault(require("node:util"));
32
34
  const core_1 = require("@rspack/core");
@@ -250,8 +252,6 @@ exports.RspackCLI = RspackCLI;
250
252
  function defineConfig(config) {
251
253
  return config;
252
254
  }
253
- exports.defineConfig = defineConfig;
254
255
  function definePlugin(plugin) {
255
256
  return plugin;
256
257
  }
257
- exports.definePlugin = definePlugin;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.loadRspackConfig = void 0;
6
+ exports.loadRspackConfig = loadRspackConfig;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const interpret_1 = __importDefault(require("interpret"));
@@ -52,4 +52,3 @@ async function loadRspackConfig(options, cwd = process.cwd()) {
52
52
  }
53
53
  return {};
54
54
  }
55
- exports.loadRspackConfig = loadRspackConfig;
@@ -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"> & yargs.InferredOptionTypes<{
2
+ export declare const commonOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{}, "entry" | "devtool" | "mode" | "watch" | "env" | "output-path" | "config" | "node-env" | "configName"> & yargs.InferredOptionTypes<{
3
3
  config: {
4
4
  g: boolean;
5
5
  type: "string";
@@ -48,7 +48,7 @@ export declare const commonOptions: (yargs: yargs.Argv<{}>) => yargs.Argv<yargs.
48
48
  describe: string;
49
49
  };
50
50
  }>>;
51
- export declare const previewOptions: (yargs: yargs.Argv<{}>) => yargs.Argv<yargs.Omit<{
51
+ export declare const previewOptions: (yargs: yargs.Argv) => yargs.Argv<yargs.Omit<{
52
52
  dir: string | undefined;
53
53
  }, "port" | "host" | "open" | "server" | "publicPath" | "config" | "configName"> & yargs.InferredOptionTypes<{
54
54
  publicPath: {
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ensureEnvObject = exports.setBuiltinEnvArg = exports.normalizeEnv = exports.previewOptions = exports.commonOptions = void 0;
3
+ exports.previewOptions = exports.commonOptions = void 0;
4
+ exports.normalizeEnv = normalizeEnv;
5
+ exports.setBuiltinEnvArg = setBuiltinEnvArg;
6
+ exports.ensureEnvObject = ensureEnvObject;
4
7
  const commonOptions = (yargs) => {
5
8
  return yargs
6
9
  .options({
@@ -125,7 +128,6 @@ function normalizeEnv(argv) {
125
128
  const envObj = (argv.env ?? []).reduce(parseValue, {});
126
129
  argv.env = envObj;
127
130
  }
128
- exports.normalizeEnv = normalizeEnv;
129
131
  /**
130
132
  * set builtin env from cli - like `WEBPACK_BUNDLE=true`. also for `RSPACK_` prefixed.
131
133
  * @param env the `argv.env` object
@@ -145,7 +147,6 @@ function setBuiltinEnvArg(env, envNameSuffix, value) {
145
147
  env[envName] = value;
146
148
  }
147
149
  }
148
- exports.setBuiltinEnvArg = setBuiltinEnvArg;
149
150
  /**
150
151
  * infer `argv.env` as an object for it was transformed from array to object after `normalizeEnv` middleware
151
152
  * @returns the reference of `argv.env` object
@@ -158,4 +159,3 @@ function ensureEnvObject(options) {
158
159
  options.env = options.env || {};
159
160
  return options.env;
160
161
  }
161
- exports.ensureEnvObject = ensureEnvObject;
@@ -35,7 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
35
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.applyProfile = void 0;
38
+ exports.applyProfile = applyProfile;
39
39
  const node_fs_1 = __importDefault(require("node:fs"));
40
40
  const node_inspector_1 = __importDefault(require("node:inspector"));
41
41
  const node_path_1 = __importDefault(require("node:path"));
@@ -189,7 +189,6 @@ async function applyProfile(profileValue, item) {
189
189
  }
190
190
  }
191
191
  }
192
- exports.applyProfile = applyProfile;
193
192
  async function ensureFileDir(outputFilePath) {
194
193
  const dir = node_path_1.default.dirname(outputFilePath);
195
194
  await node_fs_1.default.promises.mkdir(dir, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "CLI for rspack",
5
5
  "homepage": "https://rspack.dev",
6
6
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
@@ -45,8 +45,8 @@
45
45
  "execa": "^5.0.0",
46
46
  "internal-ip": "6.2.0",
47
47
  "ts-node": "^10.9.2",
48
- "typescript": "5.0.2",
49
- "@rspack/core": "1.0.13"
48
+ "typescript": "^5.6.3",
49
+ "@rspack/core": "1.0.14"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@rspack/core": "^1.0.0-alpha || ^1.x"