@rspack/cli 1.7.1 → 2.0.0-canary-20260116
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/README.md +24 -0
- package/bin/rspack.js +2 -2
- package/dist/{131.mjs → 131.js} +32 -26
- package/dist/{1~274.mjs → 274.js} +1 -1
- package/dist/index.js +1 -1375
- package/dist/utils/options.d.ts +0 -2
- package/package.json +15 -12
- package/dist/0~274.js +0 -42
- package/dist/index.mjs +0 -1
- package/dist/utils/rspackCore.d.ts +0 -2
- /package/dist/{rslib-runtime.mjs → rslib-runtime.js} +0 -0
package/dist/utils/options.d.ts
CHANGED
|
@@ -16,12 +16,10 @@ export declare const normalizeCommonOptions: (options: CommonOptions | CommonOpt
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const commonOptionsForBuildAndServe: (command: Command) => Command;
|
|
18
18
|
export type CommonOptionsForBuildAndServe = CommonOptions & {
|
|
19
|
-
analyze?: boolean;
|
|
20
19
|
devtool?: string | boolean;
|
|
21
20
|
entry?: string[];
|
|
22
21
|
mode?: string;
|
|
23
22
|
outputPath?: string;
|
|
24
|
-
profile?: boolean;
|
|
25
23
|
watch?: boolean;
|
|
26
24
|
};
|
|
27
25
|
export declare function setDefaultNodeEnv(options: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-canary-20260116",
|
|
4
4
|
"description": "CLI for rspack",
|
|
5
5
|
"homepage": "https://rspack.rs",
|
|
6
6
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
@@ -10,15 +10,14 @@
|
|
|
10
10
|
"directory": "packages/rspack-cli"
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
|
+
"type": "module",
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
15
16
|
"types": "./dist/index.d.ts",
|
|
16
|
-
"
|
|
17
|
-
"require": "./dist/index.js"
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
21
|
"types": "./dist/index.d.ts",
|
|
23
22
|
"bin": {
|
|
24
23
|
"rspack": "./bin/rspack.js"
|
|
@@ -29,13 +28,11 @@
|
|
|
29
28
|
],
|
|
30
29
|
"dependencies": {
|
|
31
30
|
"@discoveryjs/json-ext": "^0.5.7",
|
|
32
|
-
"
|
|
33
|
-
"exit-hook": "^4.0.0",
|
|
34
|
-
"webpack-bundle-analyzer": "4.10.2"
|
|
31
|
+
"exit-hook": "^4.0.0"
|
|
35
32
|
},
|
|
36
33
|
"devDependencies": {
|
|
37
|
-
"@rslib/core": "0.19.
|
|
38
|
-
"@
|
|
34
|
+
"@rslib/core": "0.19.1",
|
|
35
|
+
"@rspack/dev-server": "~1.1.5",
|
|
39
36
|
"cac": "^6.7.14",
|
|
40
37
|
"concat-stream": "^2.0.0",
|
|
41
38
|
"cross-env": "^10.1.0",
|
|
@@ -44,11 +41,17 @@
|
|
|
44
41
|
"pirates": "^4.0.7",
|
|
45
42
|
"ts-node": "^10.9.2",
|
|
46
43
|
"typescript": "^5.9.3",
|
|
47
|
-
"@rspack/
|
|
48
|
-
"@rspack/
|
|
44
|
+
"@rspack/test-tools": "2.0.0-canary-20260116",
|
|
45
|
+
"@rspack/core": "2.0.0-canary-20260116"
|
|
49
46
|
},
|
|
50
47
|
"peerDependencies": {
|
|
51
|
-
"@rspack/core": "^1.0.0-alpha || ^1.x"
|
|
48
|
+
"@rspack/core": "^1.0.0-alpha || ^1.x",
|
|
49
|
+
"@rspack/dev-server": "~1.1.5"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"@rspack/dev-server": {
|
|
53
|
+
"optional": true
|
|
54
|
+
}
|
|
52
55
|
},
|
|
53
56
|
"publishConfig": {
|
|
54
57
|
"access": "public",
|
package/dist/0~274.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.ids = [
|
|
3
|
-
"274"
|
|
4
|
-
];
|
|
5
|
-
exports.modules = {
|
|
6
|
-
"./src/utils/profile.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
applyProfile: ()=>applyProfile
|
|
9
|
-
});
|
|
10
|
-
var node_fs__rspack_import_0 = __webpack_require__("node:fs");
|
|
11
|
-
var node_fs__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(node_fs__rspack_import_0);
|
|
12
|
-
var node_path__rspack_import_1 = __webpack_require__("node:path");
|
|
13
|
-
var node_path__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(node_path__rspack_import_1);
|
|
14
|
-
var _rspackCore__rspack_import_2 = __webpack_require__("./src/utils/rspackCore.ts");
|
|
15
|
-
const DEFAULT_RUST_TRACE_LAYER = 'perfetto';
|
|
16
|
-
async function applyProfile(filterValue, traceLayer = DEFAULT_RUST_TRACE_LAYER, traceOutput) {
|
|
17
|
-
const { asyncExitHook } = await import("exit-hook");
|
|
18
|
-
if ('logger' !== traceLayer && 'perfetto' !== traceLayer) throw new Error(`unsupported trace layer: ${traceLayer}`);
|
|
19
|
-
const timestamp = Date.now();
|
|
20
|
-
const defaultOutputDir = node_path__rspack_import_1_default().resolve(`.rspack-profile-${timestamp}-${process.pid}`);
|
|
21
|
-
if (traceOutput) {
|
|
22
|
-
if ('stdout' !== traceOutput && 'stderr' !== traceOutput) traceOutput = node_path__rspack_import_1_default().resolve(defaultOutputDir, traceOutput);
|
|
23
|
-
} else {
|
|
24
|
-
const defaultRustTracePerfettoOutput = node_path__rspack_import_1_default().resolve(defaultOutputDir, 'rspack.pftrace');
|
|
25
|
-
const defaultRustTraceLoggerOutput = 'stdout';
|
|
26
|
-
const defaultTraceOutput = 'perfetto' === traceLayer ? defaultRustTracePerfettoOutput : defaultRustTraceLoggerOutput;
|
|
27
|
-
traceOutput = defaultTraceOutput;
|
|
28
|
-
}
|
|
29
|
-
await ensureFileDir(traceOutput);
|
|
30
|
-
await _rspackCore__rspack_import_2.Z.experiments.globalTrace.register(filterValue, traceLayer, traceOutput);
|
|
31
|
-
asyncExitHook(_rspackCore__rspack_import_2.Z.experiments.globalTrace.cleanup, {
|
|
32
|
-
wait: 500
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
async function ensureFileDir(outputFilePath) {
|
|
36
|
-
const dir = node_path__rspack_import_1_default().dirname(outputFilePath);
|
|
37
|
-
await node_fs__rspack_import_0_default().promises.mkdir(dir, {
|
|
38
|
-
recursive: true
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { RspackCLI, defineConfig, definePlugin } from "./131.mjs";
|
|
File without changes
|