@rspack-canary/cli 1.6.0-canary-c1ffd5c5-20251016085846 → 1.6.0-canary-beafb11e-20251017173713
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~361.js +5 -5
- package/dist/1~361.mjs +5 -5
- package/dist/cli.d.ts +11 -9
- package/dist/index.js +807 -264
- package/dist/index.mjs +779 -265
- package/dist/types.d.ts +0 -30
- package/dist/utils/loadConfig.d.ts +6 -6
- package/dist/utils/options.d.ts +23 -71
- package/dist/utils/rspackCore.d.ts +2 -0
- package/package.json +7 -8
package/dist/0~361.js
CHANGED
|
@@ -11,9 +11,9 @@ exports.modules = {
|
|
|
11
11
|
var node_fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(node_fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
12
12
|
var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("node:path");
|
|
13
13
|
var node_path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_1__);
|
|
14
|
-
var
|
|
15
|
-
const
|
|
16
|
-
async function applyProfile(filterValue, traceLayer =
|
|
14
|
+
var _rspackCore__WEBPACK_IMPORTED_MODULE_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
17
|
const { asyncExitHook } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "exit-hook"));
|
|
18
18
|
if ("logger" !== traceLayer && "perfetto" !== traceLayer) throw new Error(`unsupported trace layer: ${traceLayer}`);
|
|
19
19
|
const timestamp = Date.now();
|
|
@@ -27,8 +27,8 @@ exports.modules = {
|
|
|
27
27
|
traceOutput = defaultTraceOutput;
|
|
28
28
|
}
|
|
29
29
|
await ensureFileDir(traceOutput);
|
|
30
|
-
await
|
|
31
|
-
asyncExitHook(
|
|
30
|
+
await _rspackCore__WEBPACK_IMPORTED_MODULE_2__.Z.experiments.globalTrace.register(filterValue, traceLayer, traceOutput);
|
|
31
|
+
asyncExitHook(_rspackCore__WEBPACK_IMPORTED_MODULE_2__.Z.experiments.globalTrace.cleanup, {
|
|
32
32
|
wait: 500
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/1~361.mjs
CHANGED
|
@@ -9,9 +9,9 @@ export const __webpack_modules__ = {
|
|
|
9
9
|
});
|
|
10
10
|
var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:fs");
|
|
11
11
|
var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("node:path");
|
|
12
|
-
var
|
|
13
|
-
const
|
|
14
|
-
async function applyProfile(filterValue, traceLayer =
|
|
12
|
+
var _rspackCore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/rspackCore.ts");
|
|
13
|
+
const DEFAULT_RUST_TRACE_LAYER = "perfetto";
|
|
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();
|
|
@@ -25,8 +25,8 @@ export const __webpack_modules__ = {
|
|
|
25
25
|
traceOutput = defaultTraceOutput;
|
|
26
26
|
}
|
|
27
27
|
await ensureFileDir(traceOutput);
|
|
28
|
-
await
|
|
29
|
-
asyncExitHook(
|
|
28
|
+
await _rspackCore__WEBPACK_IMPORTED_MODULE_2__.Z.experiments.globalTrace.register(filterValue, traceLayer, traceOutput);
|
|
29
|
+
asyncExitHook(_rspackCore__WEBPACK_IMPORTED_MODULE_2__.Z.experiments.globalTrace.cleanup, {
|
|
30
30
|
wait: 500
|
|
31
31
|
});
|
|
32
32
|
}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import type { RspackPluginFunction, RspackPluginInstance } from "@rspack/core";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import type { RspackBuildCLIOptions, RspackCLIColors, RspackCLILogger, RspackCLIOptions } from "./types";
|
|
1
|
+
import type { Compiler, MultiCompiler, MultiRspackOptions, MultiStats, RspackOptions, RspackPluginFunction, RspackPluginInstance, Stats } from "@rspack/core";
|
|
2
|
+
import { type CAC } from "cac";
|
|
3
|
+
import type { RspackCLIColors, RspackCLILogger } from "./types";
|
|
4
|
+
import type { CommonOptions, CommonOptionsForBuildAndServe } from "./utils/options";
|
|
6
5
|
type Command = "serve" | "build";
|
|
6
|
+
declare global {
|
|
7
|
+
const RSPACK_CLI_VERSION: string;
|
|
8
|
+
}
|
|
7
9
|
export declare class RspackCLI {
|
|
8
10
|
colors: RspackCLIColors;
|
|
9
|
-
program:
|
|
11
|
+
program: CAC;
|
|
10
12
|
constructor();
|
|
11
|
-
createCompiler(options:
|
|
13
|
+
createCompiler(options: CommonOptionsForBuildAndServe, rspackCommand: Command, callback?: (e: Error | null, res?: Stats | MultiStats) => void): Promise<MultiCompiler | Compiler | null>;
|
|
12
14
|
createColors(useColor?: boolean): RspackCLIColors;
|
|
13
15
|
getLogger(): RspackCLILogger;
|
|
14
16
|
run(argv: string[]): Promise<void>;
|
|
15
17
|
registerCommands(): Promise<void>;
|
|
16
|
-
buildConfig(item: RspackOptions | MultiRspackOptions, pathMap: WeakMap<RspackOptions, string[]>, options:
|
|
17
|
-
loadConfig(options:
|
|
18
|
+
buildConfig(item: RspackOptions | MultiRspackOptions, pathMap: WeakMap<RspackOptions, string[]>, options: CommonOptionsForBuildAndServe, command: Command): Promise<RspackOptions | MultiRspackOptions>;
|
|
19
|
+
loadConfig(options: CommonOptions): Promise<{
|
|
18
20
|
config: RspackOptions | MultiRspackOptions;
|
|
19
21
|
pathMap: WeakMap<RspackOptions, string[]>;
|
|
20
22
|
}>;
|