@rsdoctor/core 1.1.4 → 1.1.6
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/build-utils/build/chunks/index.d.ts +0 -1
- package/dist/build-utils/build/chunks/index.d.ts.map +1 -1
- package/dist/build-utils/build/chunks/index.js +0 -2
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts.map +1 -1
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.js +4 -26
- package/dist/inner-plugins/utils/config.d.ts.map +1 -1
- package/dist/inner-plugins/utils/config.js +0 -1
- package/package.json +7 -7
- package/dist/build-utils/build/chunks/generateTileGraph.d.ts +0 -12
- package/dist/build-utils/build/chunks/generateTileGraph.d.ts.map +0 -1
- package/dist/build-utils/build/chunks/generateTileGraph.js +0 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/build-utils/build/chunks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/build-utils/build/chunks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
@@ -17,12 +17,10 @@ var chunks_exports = {};
|
|
|
17
17
|
module.exports = __toCommonJS(chunks_exports);
|
|
18
18
|
__reExport(chunks_exports, require("./assetsModules"), module.exports);
|
|
19
19
|
__reExport(chunks_exports, require("./chunkTransform"), module.exports);
|
|
20
|
-
__reExport(chunks_exports, require("./generateTileGraph"), module.exports);
|
|
21
20
|
__reExport(chunks_exports, require("./rspack/transform"), module.exports);
|
|
22
21
|
// Annotate the CommonJS export names for ESM import in node:
|
|
23
22
|
0 && (module.exports = {
|
|
24
23
|
...require("./assetsModules"),
|
|
25
24
|
...require("./chunkTransform"),
|
|
26
|
-
...require("./generateTileGraph"),
|
|
27
25
|
...require("./rspack/transform")
|
|
28
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureModulesChunkGraph.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/ensureModulesChunkGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ensureModulesChunkGraph.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/ensureModulesChunkGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAWhE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aAC3B,MAAM,CAAC,YAAY,SACtB,sBAAsB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,SA+G5E,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,25 +15,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var ensureModulesChunkGraph_exports = {};
|
|
30
20
|
__export(ensureModulesChunkGraph_exports, {
|
|
31
21
|
ensureModulesChunksGraphFn: () => ensureModulesChunksGraphFn
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(ensureModulesChunkGraph_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
24
|
var import_types2 = require("@rsdoctor/types");
|
|
36
25
|
var import_build = require("@rsdoctor/utils/build");
|
|
37
26
|
var import_logger = require("@rsdoctor/utils/logger");
|
|
38
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
39
27
|
var import_build2 = require("../../build-utils/build");
|
|
40
28
|
var import_common = require("../../build-utils/common");
|
|
41
29
|
var import_constants = require("../constants");
|
|
@@ -119,20 +107,10 @@ const ensureModulesChunksGraphFn = (compiler, _this) => {
|
|
|
119
107
|
_this.modulesGraph && await _this.sdk.reportModuleGraph(_this.modulesGraph);
|
|
120
108
|
await _this.sdk.reportChunkGraph(_this.chunkGraph);
|
|
121
109
|
if (_this.options.supports.generateTileGraph) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
import_types2.Constants.RsdoctorOutputFolder,
|
|
127
|
-
import_build2.Chunks.TileGraphReportName
|
|
128
|
-
),
|
|
129
|
-
reportTitle: "bundle-analyzer",
|
|
130
|
-
reportDir: _this.options.output.reportDir
|
|
131
|
-
},
|
|
132
|
-
compiler.outputPath
|
|
133
|
-
);
|
|
134
|
-
reportFilePath && await _this.sdk.reportTileHtml(
|
|
135
|
-
import_fs_extra.default.readFileSync(reportFilePath, "utf-8")
|
|
110
|
+
import_logger.logger.warn(
|
|
111
|
+
import_logger.chalk.yellow(
|
|
112
|
+
"The option generateTileGraph is deprecated. Tile graph is now supported by default."
|
|
113
|
+
)
|
|
136
114
|
);
|
|
137
115
|
}
|
|
138
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,KAAK,EACV,gBAAgB,IAAI,sBAAsB,EAC1C,WAAW,IAAI,iBAAiB,EACjC,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,IAAI,uBAAuB,EAC3C,wBAAwB,IAAI,+BAA+B,EAC3D,WAAW,IAAI,kBAAkB,EAClC,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,eAAe,EACf,2BAA2B,EAC3B,qCAAqC,EACtC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,KAAK,EACV,gBAAgB,IAAI,sBAAsB,EAC1C,WAAW,IAAI,iBAAiB,EACjC,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,IAAI,uBAAuB,EAC3C,wBAAwB,IAAI,+BAA+B,EAC3D,WAAW,IAAI,kBAAkB,EAClC,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,eAAe,EACf,2BAA2B,EAC3B,qCAAqC,EACtC,MAAM,SAAS,CAAC;AA2DjB,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,MAAM,CAAC,cAAc,EAAE,EACvE,MAAM,GAAE,4BAA4B,CAAC,KAAK,CAAM,GAC/C,+BAA+B,CAAC,KAAK,CAAC,CA2ExC;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EACA,sBAAsB,GACtB,+BAA+B,GAC/B,uBAAuB,GACvB,IAAI,QAcT;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EACD,MAAM,CAAC,WAAW,EAAE,GACpB,iBAAiB,CAAC,OAAO,CAAC,GAC1B,kBAAkB,CAAC,OAAO,CAAC,QA+BhC;AAED,eAAO,MAAM,mBAAmB,mBACd,eAAe,QACzB,MAAM,OAAO,GAAG,CAAC,KAAK,KAC3B,GAAG,CAAC,UAqBN,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,KAAK,SAAS,MAAM,CAAC,cAAc,EAAE,EAErC,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAC1C,qCAAqC,CAAC,KAAK,CAAC,CAO9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"semver": "^7.7.2",
|
|
74
74
|
"source-map": "^0.7.4",
|
|
75
75
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
76
|
-
"@rsdoctor/graph": "1.1.
|
|
77
|
-
"@rsdoctor/sdk": "1.1.
|
|
78
|
-
"@rsdoctor/
|
|
79
|
-
"@rsdoctor/
|
|
76
|
+
"@rsdoctor/graph": "1.1.6",
|
|
77
|
+
"@rsdoctor/sdk": "1.1.6",
|
|
78
|
+
"@rsdoctor/utils": "1.1.6",
|
|
79
|
+
"@rsdoctor/types": "1.1.6"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@rspack/core": "1.4.
|
|
82
|
+
"@rspack/core": "1.4.1",
|
|
83
83
|
"@types/fs-extra": "^11.0.4",
|
|
84
|
-
"@types/lodash": "^4.17.
|
|
84
|
+
"@types/lodash": "^4.17.19",
|
|
85
85
|
"@types/node": "^22.8.1",
|
|
86
86
|
"@types/node-fetch": "^2.6.12",
|
|
87
87
|
"@types/path-browserify": "1.0.3",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Plugin } from '@rsdoctor/types';
|
|
2
|
-
export declare const TileGraphReportName = "rsdoctor-tile-graph.html";
|
|
3
|
-
type IGenerateReportOpts = {
|
|
4
|
-
reportFilename: string;
|
|
5
|
-
reportTitle?: string;
|
|
6
|
-
bundleDir?: string;
|
|
7
|
-
openBrowser?: boolean;
|
|
8
|
-
reportDir?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function generateTileGraph(bundleStats: Plugin.BaseStats, opts: IGenerateReportOpts, buildOutputPath: string): Promise<string | null>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=generateTileGraph.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateTileGraph.d.ts","sourceRoot":"","sources":["../../../../src/build-utils/build/chunks/generateTileGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,KAAK,mBAAmB,GAAG;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAiBF,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,CAAC,SAAS,EAC7B,IAAI,EAAE,mBAAmB,EACzB,eAAe,EAAE,MAAM,0BAuBxB"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var generateTileGraph_exports = {};
|
|
30
|
-
__export(generateTileGraph_exports, {
|
|
31
|
-
TileGraphReportName: () => TileGraphReportName,
|
|
32
|
-
generateTileGraph: () => generateTileGraph
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(generateTileGraph_exports);
|
|
35
|
-
var import_path = __toESM(require("path"));
|
|
36
|
-
var import_logger = require("@rsdoctor/utils/logger");
|
|
37
|
-
var import_viewer = require("webpack-bundle-analyzer/lib/viewer");
|
|
38
|
-
const TileGraphReportName = "rsdoctor-tile-graph.html";
|
|
39
|
-
async function generateJSONReportUtil(bundleStats, opts) {
|
|
40
|
-
await (0, import_viewer.generateReport)(bundleStats, {
|
|
41
|
-
...opts,
|
|
42
|
-
logger: {
|
|
43
|
-
warn: () => {
|
|
44
|
-
},
|
|
45
|
-
info: () => {
|
|
46
|
-
},
|
|
47
|
-
error: (e) => {
|
|
48
|
-
import_logger.logger.info(`webpack-bundle-analyzer generateReport has error ${e}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
async function generateTileGraph(bundleStats, opts, buildOutputPath) {
|
|
54
|
-
try {
|
|
55
|
-
const { reportFilename, reportDir } = opts;
|
|
56
|
-
await generateJSONReportUtil(bundleStats, {
|
|
57
|
-
...opts,
|
|
58
|
-
openBrowser: false,
|
|
59
|
-
bundleDir: reportDir || buildOutputPath
|
|
60
|
-
});
|
|
61
|
-
return import_path.default.join(
|
|
62
|
-
reportDir ? import_path.default.resolve(
|
|
63
|
-
buildOutputPath,
|
|
64
|
-
import_path.default.relative(buildOutputPath, reportDir)
|
|
65
|
-
) : buildOutputPath,
|
|
66
|
-
`${reportFilename}`
|
|
67
|
-
);
|
|
68
|
-
} catch (e) {
|
|
69
|
-
(0, import_logger.debug)(() => `Generate webpack-bundle-analyzer tile graph has error:${e}`);
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
-
0 && (module.exports = {
|
|
75
|
-
TileGraphReportName,
|
|
76
|
-
generateTileGraph
|
|
77
|
-
});
|