@rspack-canary/cli 1.6.6-canary-0ca7752a-20251125174427 → 1.6.6-canary-5795e26c-20251126174205
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/0~274.js +12 -12
- package/dist/1~274.mjs +10 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +17 -17
- package/package.json +4 -4
package/dist/0~274.js
CHANGED
|
@@ -7,34 +7,34 @@ exports.modules = {
|
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
applyProfile: ()=>applyProfile
|
|
9
9
|
});
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
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
15
|
const DEFAULT_RUST_TRACE_LAYER = "perfetto";
|
|
16
16
|
async function applyProfile(filterValue, traceLayer = DEFAULT_RUST_TRACE_LAYER, traceOutput) {
|
|
17
17
|
const { asyncExitHook } = await import("exit-hook");
|
|
18
18
|
if ("logger" !== traceLayer && "perfetto" !== traceLayer) throw new Error(`unsupported trace layer: ${traceLayer}`);
|
|
19
19
|
const timestamp = Date.now();
|
|
20
|
-
const defaultOutputDir =
|
|
20
|
+
const defaultOutputDir = node_path__rspack_import_1_default().resolve(`.rspack-profile-${timestamp}-${process.pid}`);
|
|
21
21
|
if (traceOutput) {
|
|
22
|
-
if ("stdout" !== traceOutput && "stderr" !== traceOutput) traceOutput =
|
|
22
|
+
if ("stdout" !== traceOutput && "stderr" !== traceOutput) traceOutput = node_path__rspack_import_1_default().resolve(defaultOutputDir, traceOutput);
|
|
23
23
|
} else {
|
|
24
|
-
const defaultRustTracePerfettoOutput =
|
|
24
|
+
const defaultRustTracePerfettoOutput = node_path__rspack_import_1_default().resolve(defaultOutputDir, "rspack.pftrace");
|
|
25
25
|
const defaultRustTraceLoggerOutput = "stdout";
|
|
26
26
|
const defaultTraceOutput = "perfetto" === traceLayer ? defaultRustTracePerfettoOutput : defaultRustTraceLoggerOutput;
|
|
27
27
|
traceOutput = defaultTraceOutput;
|
|
28
28
|
}
|
|
29
29
|
await ensureFileDir(traceOutput);
|
|
30
|
-
await
|
|
31
|
-
asyncExitHook(
|
|
30
|
+
await _rspackCore__rspack_import_2.Z.experiments.globalTrace.register(filterValue, traceLayer, traceOutput);
|
|
31
|
+
asyncExitHook(_rspackCore__rspack_import_2.Z.experiments.globalTrace.cleanup, {
|
|
32
32
|
wait: 500
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
async function ensureFileDir(outputFilePath) {
|
|
36
|
-
const dir =
|
|
37
|
-
await
|
|
36
|
+
const dir = node_path__rspack_import_1_default().dirname(outputFilePath);
|
|
37
|
+
await node_fs__rspack_import_0_default().promises.mkdir(dir, {
|
|
38
38
|
recursive: true
|
|
39
39
|
});
|
|
40
40
|
}
|
package/dist/1~274.mjs
CHANGED
|
@@ -7,32 +7,32 @@ export const __webpack_modules__ = {
|
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
applyProfile: ()=>applyProfile
|
|
9
9
|
});
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var node_fs__rspack_import_0 = __webpack_require__("node:fs");
|
|
11
|
+
var node_path__rspack_import_1 = __webpack_require__("node:path");
|
|
12
|
+
var _rspackCore__rspack_import_2 = __webpack_require__("./src/utils/rspackCore.ts");
|
|
13
13
|
const DEFAULT_RUST_TRACE_LAYER = "perfetto";
|
|
14
14
|
async function applyProfile(filterValue, traceLayer = DEFAULT_RUST_TRACE_LAYER, traceOutput) {
|
|
15
15
|
const { asyncExitHook } = await import("exit-hook");
|
|
16
16
|
if ("logger" !== traceLayer && "perfetto" !== traceLayer) throw new Error(`unsupported trace layer: ${traceLayer}`);
|
|
17
17
|
const timestamp = Date.now();
|
|
18
|
-
const defaultOutputDir =
|
|
18
|
+
const defaultOutputDir = node_path__rspack_import_1["default"].resolve(`.rspack-profile-${timestamp}-${process.pid}`);
|
|
19
19
|
if (traceOutput) {
|
|
20
|
-
if ("stdout" !== traceOutput && "stderr" !== traceOutput) traceOutput =
|
|
20
|
+
if ("stdout" !== traceOutput && "stderr" !== traceOutput) traceOutput = node_path__rspack_import_1["default"].resolve(defaultOutputDir, traceOutput);
|
|
21
21
|
} else {
|
|
22
|
-
const defaultRustTracePerfettoOutput =
|
|
22
|
+
const defaultRustTracePerfettoOutput = node_path__rspack_import_1["default"].resolve(defaultOutputDir, "rspack.pftrace");
|
|
23
23
|
const defaultRustTraceLoggerOutput = "stdout";
|
|
24
24
|
const defaultTraceOutput = "perfetto" === traceLayer ? defaultRustTracePerfettoOutput : defaultRustTraceLoggerOutput;
|
|
25
25
|
traceOutput = defaultTraceOutput;
|
|
26
26
|
}
|
|
27
27
|
await ensureFileDir(traceOutput);
|
|
28
|
-
await
|
|
29
|
-
asyncExitHook(
|
|
28
|
+
await _rspackCore__rspack_import_2.Z.experiments.globalTrace.register(filterValue, traceLayer, traceOutput);
|
|
29
|
+
asyncExitHook(_rspackCore__rspack_import_2.Z.experiments.globalTrace.cleanup, {
|
|
30
30
|
wait: 500
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
async function ensureFileDir(outputFilePath) {
|
|
34
|
-
const dir =
|
|
35
|
-
await
|
|
34
|
+
const dir = node_path__rspack_import_1["default"].dirname(outputFilePath);
|
|
35
|
+
await node_fs__rspack_import_0["default"].promises.mkdir(dir, {
|
|
36
36
|
recursive: true
|
|
37
37
|
});
|
|
38
38
|
}
|
package/dist/index.js
CHANGED
|
@@ -1187,7 +1187,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
1187
1187
|
this.colors = this.createColors();
|
|
1188
1188
|
this.program = program;
|
|
1189
1189
|
program.help();
|
|
1190
|
-
program.version("1.6.6-canary-
|
|
1190
|
+
program.version("1.6.6-canary-5795e26c-20251126174205");
|
|
1191
1191
|
}
|
|
1192
1192
|
async createCompiler(options, rspackCommand, callback) {
|
|
1193
1193
|
let { config, pathMap } = await this.loadConfig(options);
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
1
|
+
import * as __rspack_external_module from "module";
|
|
2
|
+
import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
|
|
3
|
+
import * as __rspack_external_node_path_c5b9b54f from "node:path";
|
|
4
|
+
import * as __rspack_external_path from "path";
|
|
5
|
+
import * as __rspack_external_node_util_1b29d436 from "node:util";
|
|
6
|
+
import * as __rspack_external_events from "events";
|
|
7
|
+
import * as __rspack_external_node_module_ab9f2194 from "node:module";
|
|
8
|
+
import * as __rspack_external_node_url_e96de089 from "node:url";
|
|
9
9
|
var __webpack_modules__ = {
|
|
10
10
|
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": function(module) {
|
|
11
11
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
@@ -137,20 +137,20 @@ var __webpack_modules__ = {
|
|
|
137
137
|
__webpack_require__.d(__webpack_exports__, {
|
|
138
138
|
Z: ()=>rspack
|
|
139
139
|
});
|
|
140
|
-
const rspackCore_require = (0,
|
|
140
|
+
const rspackCore_require = (0, __rspack_external_node_module_ab9f2194.createRequire)(import.meta.url);
|
|
141
141
|
const rspack = rspackCore_require("@rspack/core");
|
|
142
142
|
},
|
|
143
143
|
module: function(module) {
|
|
144
|
-
module.exports =
|
|
144
|
+
module.exports = __rspack_external_module;
|
|
145
145
|
},
|
|
146
146
|
"node:fs": function(module) {
|
|
147
|
-
module.exports =
|
|
147
|
+
module.exports = __rspack_external_node_fs_5ea92f0c;
|
|
148
148
|
},
|
|
149
149
|
"node:path": function(module) {
|
|
150
|
-
module.exports =
|
|
150
|
+
module.exports = __rspack_external_node_path_c5b9b54f;
|
|
151
151
|
},
|
|
152
152
|
path: function(module) {
|
|
153
|
-
module.exports =
|
|
153
|
+
module.exports = __rspack_external_path;
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
var __webpack_module_cache__ = {};
|
|
@@ -553,7 +553,7 @@ class GlobalCommand extends Command {
|
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
var __assign = Object.assign;
|
|
556
|
-
class CAC extends
|
|
556
|
+
class CAC extends __rspack_external_events.EventEmitter {
|
|
557
557
|
constructor(name = ""){
|
|
558
558
|
super();
|
|
559
559
|
this.name = name;
|
|
@@ -1014,7 +1014,7 @@ const isEsmFile = (filePath)=>{
|
|
|
1014
1014
|
};
|
|
1015
1015
|
const crossImport = async (path)=>{
|
|
1016
1016
|
if (isEsmFile(path)) {
|
|
1017
|
-
const url = (0,
|
|
1017
|
+
const url = (0, __rspack_external_node_url_e96de089.pathToFileURL)(path).href;
|
|
1018
1018
|
const { default: config } = await import(url);
|
|
1019
1019
|
return config;
|
|
1020
1020
|
}
|
|
@@ -1174,7 +1174,7 @@ class RspackCLI {
|
|
|
1174
1174
|
this.colors = this.createColors();
|
|
1175
1175
|
this.program = program;
|
|
1176
1176
|
program.help();
|
|
1177
|
-
program.version("1.6.6-canary-
|
|
1177
|
+
program.version("1.6.6-canary-5795e26c-20251126174205");
|
|
1178
1178
|
}
|
|
1179
1179
|
async createCompiler(options, rspackCommand, callback) {
|
|
1180
1180
|
let { config, pathMap } = await this.loadConfig(options);
|
|
@@ -1206,7 +1206,7 @@ class RspackCLI {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
getLogger() {
|
|
1208
1208
|
return {
|
|
1209
|
-
error: (val)=>console.error(`[rspack-cli] ${this.colors.red(
|
|
1209
|
+
error: (val)=>console.error(`[rspack-cli] ${this.colors.red(__rspack_external_node_util_1b29d436["default"].format(val))}`),
|
|
1210
1210
|
warn: (val)=>console.warn(`[rspack-cli] ${this.colors.yellow(val)}`),
|
|
1211
1211
|
info: (val)=>console.info(`[rspack-cli] ${this.colors.cyan(val)}`),
|
|
1212
1212
|
success: (val)=>console.log(`[rspack-cli] ${this.colors.green(val)}`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/cli",
|
|
3
|
-
"version": "1.6.6-canary-
|
|
3
|
+
"version": "1.6.6-canary-5795e26c-20251126174205",
|
|
4
4
|
"description": "CLI for rspack",
|
|
5
5
|
"homepage": "https://rspack.rs",
|
|
6
6
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"webpack-bundle-analyzer": "4.10.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@rslib/core": "0.18.
|
|
37
|
+
"@rslib/core": "0.18.2",
|
|
38
38
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
39
39
|
"cac": "^6.7.14",
|
|
40
40
|
"concat-stream": "^2.0.0",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"pirates": "^4.0.7",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
|
-
"@rspack/core": "npm:@rspack-canary/core@1.6.6-canary-
|
|
48
|
-
"@rspack/test-tools": "npm:@rspack-canary/test-tools@1.6.6-canary-
|
|
47
|
+
"@rspack/core": "npm:@rspack-canary/core@1.6.6-canary-5795e26c-20251126174205",
|
|
48
|
+
"@rspack/test-tools": "npm:@rspack-canary/test-tools@1.6.6-canary-5795e26c-20251126174205"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@rspack/core": "^1.0.0-alpha || ^1.x"
|