@rsdoctor/rspack-plugin 1.3.14 → 1.3.16
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/index.cjs +5 -6
- package/dist/index.js +5 -5
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
4
|
"./package.json" (module) {
|
|
5
|
-
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.3.
|
|
5
|
+
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.3.16","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.cjs"}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"1.6.6","@types/node":"^22.8.1","@types/tapable":"2.2.7","tslib":"2.8.1","typescript":"^5.9.2"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
6
6
|
}
|
|
7
7
|
}, __webpack_module_cache__ = {};
|
|
8
8
|
function __webpack_require__(moduleId) {
|
|
@@ -42,9 +42,7 @@ for(var __rspack_i in (()=>{
|
|
|
42
42
|
let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
43
43
|
name: pluginTapName,
|
|
44
44
|
stage: 999
|
|
45
|
-
};
|
|
46
|
-
__webpack_require__("./package.json");
|
|
47
|
-
let graph_namespaceObject = require("@rsdoctor/graph"), common_namespaceObject = require("@rsdoctor/utils/common"), logger_namespaceObject = require("@rsdoctor/utils/logger");
|
|
45
|
+
}, pkg = __webpack_require__("./package.json"), graph_namespaceObject = require("@rsdoctor/graph"), common_namespaceObject = require("@rsdoctor/utils/common"), logger_namespaceObject = require("@rsdoctor/utils/logger");
|
|
48
46
|
class RsdoctorRspackPlugin {
|
|
49
47
|
name = pluginTapName;
|
|
50
48
|
sdk;
|
|
@@ -77,7 +75,8 @@ for(var __rspack_i in (()=>{
|
|
|
77
75
|
apply(compiler) {
|
|
78
76
|
(0, logger_namespaceObject.time)('RsdoctorRspackPlugin.apply');
|
|
79
77
|
try {
|
|
80
|
-
|
|
78
|
+
logger_namespaceObject.logger.greet(`
|
|
79
|
+
\nRsdoctor v${pkg.version}\n`), this._bootstrapTask || (this._bootstrapTask = this.sdk.bootstrap()), compiler.options.name && this.sdk.setName(compiler.options.name), (0, plugins_namespaceObject.setSDK)(this.sdk), compiler.hooks.afterPlugins.tap(pluginTapPostOptions, this.afterPlugins.bind(this, compiler)), compiler.hooks.done.tapPromise({
|
|
81
80
|
...pluginTapPostOptions,
|
|
82
81
|
stage: pluginTapPostOptions.stage + 100
|
|
83
82
|
}, this.done.bind(this, compiler)), new plugins_namespaceObject.InternalSummaryPlugin(this).apply(compiler), this.options.features.loader && (new build_utils_namespaceObject.Loader.ProbeLoaderPlugin().apply(compiler), this.sdk.addClientRoutes([
|
|
@@ -116,7 +115,7 @@ for(var __rspack_i in (()=>{
|
|
|
116
115
|
try {
|
|
117
116
|
await this.sdk.bootstrap(), this.sdk.addClientRoutes([
|
|
118
117
|
types_namespaceObject.Manifest.RsdoctorManifestClientRoutes.Overall
|
|
119
|
-
]), this.outsideInstance && 'parent' in this.sdk && this.sdk.parent.master.setOutputDir(external_path_default().resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] ? '' : `./${types_namespaceObject.Constants.RsdoctorOutputFolder}`)), this.sdk.setOutputDir(external_path_default().resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] ? '' : `./${types_namespaceObject.Constants.RsdoctorOutputFolder}`)), await this.sdk.writeStore(), this.options.disableClientServer || (this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] ? (0, plugins_namespaceObject.handleBriefModeReport)(this.sdk, this.options, this.options.disableClientServer) : await this.sdk.server.openClientPage('homepage')), this.options.disableClientServer && await this.sdk.dispose();
|
|
118
|
+
]), this.outsideInstance && 'parent' in this.sdk && this.sdk.parent.master.setOutputDir(external_path_default().resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] ? '' : `./${types_namespaceObject.Constants.RsdoctorOutputFolder}`)), this.sdk.setOutputDir(external_path_default().resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] ? '' : `./${types_namespaceObject.Constants.RsdoctorOutputFolder}`)), await this.sdk.writeStore(), this.options.disableClientServer || (this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] ? await (0, plugins_namespaceObject.handleBriefModeReport)(this.sdk, this.options, this.options.disableClientServer) : await this.sdk.server.openClientPage('homepage')), (this.options.disableClientServer || this.options.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] && Array.isArray(this.options.output.options?.type) && 1 === this.options.output.options.type.length && 'json' === this.options.output.options.type[0]) && await this.sdk.dispose();
|
|
120
119
|
} finally{
|
|
121
120
|
(0, logger_namespaceObject.timeEnd)('RsdoctorRspackPlugin.done');
|
|
122
121
|
}
|
package/dist/index.js
CHANGED
|
@@ -9,14 +9,13 @@ import { Loader as common_Loader } from "@rsdoctor/utils/common";
|
|
|
9
9
|
import { logger, time, timeEnd } from "@rsdoctor/utils/logger";
|
|
10
10
|
var __webpack_modules__ = {
|
|
11
11
|
"./package.json" (module) {
|
|
12
|
-
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.3.
|
|
12
|
+
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.3.16","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.cjs"}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"1.6.6","@types/node":"^22.8.1","@types/tapable":"2.2.7","tslib":"2.8.1","typescript":"^5.9.2"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
13
13
|
}
|
|
14
14
|
}, __webpack_module_cache__ = {};
|
|
15
15
|
let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
16
16
|
name: pluginTapName,
|
|
17
17
|
stage: 999
|
|
18
|
-
}
|
|
19
|
-
!function __webpack_require__(moduleId) {
|
|
18
|
+
}, pkg = function __webpack_require__(moduleId) {
|
|
20
19
|
var cachedModule = __webpack_module_cache__[moduleId];
|
|
21
20
|
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
22
21
|
var module = __webpack_module_cache__[moduleId] = {
|
|
@@ -56,7 +55,8 @@ class RsdoctorRspackPlugin {
|
|
|
56
55
|
apply(compiler) {
|
|
57
56
|
time('RsdoctorRspackPlugin.apply');
|
|
58
57
|
try {
|
|
59
|
-
|
|
58
|
+
logger.greet(`
|
|
59
|
+
\nRsdoctor v${pkg.version}\n`), this._bootstrapTask || (this._bootstrapTask = this.sdk.bootstrap()), compiler.options.name && this.sdk.setName(compiler.options.name), setSDK(this.sdk), compiler.hooks.afterPlugins.tap(pluginTapPostOptions, this.afterPlugins.bind(this, compiler)), compiler.hooks.done.tapPromise({
|
|
60
60
|
...pluginTapPostOptions,
|
|
61
61
|
stage: pluginTapPostOptions.stage + 100
|
|
62
62
|
}, this.done.bind(this, compiler)), new InternalSummaryPlugin(this).apply(compiler), this.options.features.loader && (new Loader.ProbeLoaderPlugin().apply(compiler), this.sdk.addClientRoutes([
|
|
@@ -95,7 +95,7 @@ class RsdoctorRspackPlugin {
|
|
|
95
95
|
try {
|
|
96
96
|
await this.sdk.bootstrap(), this.sdk.addClientRoutes([
|
|
97
97
|
Manifest.RsdoctorManifestClientRoutes.Overall
|
|
98
|
-
]), this.outsideInstance && 'parent' in this.sdk && this.sdk.parent.master.setOutputDir(path.resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === SDK.IMode[SDK.IMode.brief] ? '' : `./${Constants.RsdoctorOutputFolder}`)), this.sdk.setOutputDir(path.resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === SDK.IMode[SDK.IMode.brief] ? '' : `./${Constants.RsdoctorOutputFolder}`)), await this.sdk.writeStore(), this.options.disableClientServer || (this.options.output.mode === SDK.IMode[SDK.IMode.brief] ? handleBriefModeReport(this.sdk, this.options, this.options.disableClientServer) : await this.sdk.server.openClientPage('homepage')), this.options.disableClientServer && await this.sdk.dispose();
|
|
98
|
+
]), this.outsideInstance && 'parent' in this.sdk && this.sdk.parent.master.setOutputDir(path.resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === SDK.IMode[SDK.IMode.brief] ? '' : `./${Constants.RsdoctorOutputFolder}`)), this.sdk.setOutputDir(path.resolve(this.options.output.reportDir || compiler.outputPath, this.options.output.mode === SDK.IMode[SDK.IMode.brief] ? '' : `./${Constants.RsdoctorOutputFolder}`)), await this.sdk.writeStore(), this.options.disableClientServer || (this.options.output.mode === SDK.IMode[SDK.IMode.brief] ? await handleBriefModeReport(this.sdk, this.options, this.options.disableClientServer) : await this.sdk.server.openClientPage('homepage')), (this.options.disableClientServer || this.options.output.mode === SDK.IMode[SDK.IMode.brief] && Array.isArray(this.options.output.options?.type) && 1 === this.options.output.options.type.length && 'json' === this.options.output.options.type[0]) && await this.sdk.dispose();
|
|
99
99
|
} finally{
|
|
100
100
|
timeEnd('RsdoctorRspackPlugin.done');
|
|
101
101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/rspack-plugin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@rsdoctor/
|
|
25
|
-
"@rsdoctor/
|
|
26
|
-
"@rsdoctor/
|
|
27
|
-
"@rsdoctor/
|
|
28
|
-
"@rsdoctor/
|
|
24
|
+
"@rsdoctor/core": "1.3.16",
|
|
25
|
+
"@rsdoctor/graph": "1.3.16",
|
|
26
|
+
"@rsdoctor/sdk": "1.3.16",
|
|
27
|
+
"@rsdoctor/types": "1.3.16",
|
|
28
|
+
"@rsdoctor/utils": "1.3.16"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@rspack/core": "1.6.6",
|