@rsdoctor/graph 1.0.2-beta.0 → 1.1.0-alpha.0
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.
|
@@ -40,6 +40,7 @@ var import_utils = require("./utils");
|
|
|
40
40
|
let id = 1;
|
|
41
41
|
class Module {
|
|
42
42
|
constructor(webpackId, path2, isEntry = false, kind = import_types.SDK.ModuleKind.Normal, renderId = void 0, layer = "") {
|
|
43
|
+
this.issuerPath = [];
|
|
43
44
|
this.source = {
|
|
44
45
|
source: "",
|
|
45
46
|
transformed: "",
|
|
@@ -249,6 +250,14 @@ class Module {
|
|
|
249
250
|
this.concatenationModules.push(module2);
|
|
250
251
|
}
|
|
251
252
|
}
|
|
253
|
+
addIssuerPath(issuerPath) {
|
|
254
|
+
if (!this.issuerPath?.length) {
|
|
255
|
+
this.issuerPath = issuerPath;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
getIssuerPath() {
|
|
259
|
+
return this.issuerPath;
|
|
260
|
+
}
|
|
252
261
|
getConcatenationModules() {
|
|
253
262
|
return this.concatenationModules.slice();
|
|
254
263
|
}
|
|
@@ -266,7 +275,8 @@ class Module {
|
|
|
266
275
|
chunks: this.chunks.map((item) => item.id),
|
|
267
276
|
size: this.getSize(),
|
|
268
277
|
kind: this.kind,
|
|
269
|
-
...this.layer ? { layer: this.layer } : {}
|
|
278
|
+
...this.layer ? { layer: this.layer } : {},
|
|
279
|
+
issuerPath: this.issuerPath?.filter((issuer) => issuer.moduleId).map((issuer) => issuer.moduleId) || []
|
|
270
280
|
};
|
|
271
281
|
if (this.meta.hasSetEsModuleStatement || this.meta.strictHarmonyModule) {
|
|
272
282
|
data.meta = {};
|
|
@@ -7,6 +7,7 @@ import { getModuleName } from "./utils";
|
|
|
7
7
|
let id = 1;
|
|
8
8
|
class Module {
|
|
9
9
|
constructor(webpackId, path2, isEntry = false, kind = SDK.ModuleKind.Normal, renderId = void 0, layer = "") {
|
|
10
|
+
this.issuerPath = [];
|
|
10
11
|
this.source = {
|
|
11
12
|
source: "",
|
|
12
13
|
transformed: "",
|
|
@@ -216,6 +217,14 @@ class Module {
|
|
|
216
217
|
this.concatenationModules.push(module);
|
|
217
218
|
}
|
|
218
219
|
}
|
|
220
|
+
addIssuerPath(issuerPath) {
|
|
221
|
+
if (!this.issuerPath?.length) {
|
|
222
|
+
this.issuerPath = issuerPath;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
getIssuerPath() {
|
|
226
|
+
return this.issuerPath;
|
|
227
|
+
}
|
|
219
228
|
getConcatenationModules() {
|
|
220
229
|
return this.concatenationModules.slice();
|
|
221
230
|
}
|
|
@@ -233,7 +242,8 @@ class Module {
|
|
|
233
242
|
chunks: this.chunks.map((item) => item.id),
|
|
234
243
|
size: this.getSize(),
|
|
235
244
|
kind: this.kind,
|
|
236
|
-
...this.layer ? { layer: this.layer } : {}
|
|
245
|
+
...this.layer ? { layer: this.layer } : {},
|
|
246
|
+
issuerPath: this.issuerPath?.filter((issuer) => issuer.moduleId).map((issuer) => issuer.moduleId) || []
|
|
237
247
|
};
|
|
238
248
|
if (this.meta.hasSetEsModuleStatement || this.meta.strictHarmonyModule) {
|
|
239
249
|
data.meta = {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SDK } from '@rsdoctor/types';
|
|
1
|
+
import { SDK, Plugin } from '@rsdoctor/types';
|
|
2
2
|
import type { SourceMapConsumer } from 'source-map';
|
|
3
3
|
import type { Program } from 'estree';
|
|
4
4
|
import { Dependency } from './dependency';
|
|
5
5
|
import { Statement } from './statement';
|
|
6
6
|
export declare class Module implements SDK.ModuleInstance {
|
|
7
7
|
static kind: typeof SDK.ModuleKind;
|
|
8
|
+
issuerPath: SDK.ModuleInstance['issuerPath'];
|
|
8
9
|
static init(): void;
|
|
9
10
|
id: number;
|
|
10
11
|
renderId: string | undefined;
|
|
@@ -60,6 +61,8 @@ export declare class Module implements SDK.ModuleInstance {
|
|
|
60
61
|
addNormalModule(module: SDK.ModuleInstance): void;
|
|
61
62
|
getNormalModules(): SDK.ModuleInstance[];
|
|
62
63
|
addConcatenationModule(module: SDK.ModuleInstance): void;
|
|
64
|
+
addIssuerPath(issuerPath: Plugin.StatsModule['issuerPath']): void;
|
|
65
|
+
getIssuerPath(): Plugin.StatsModule['issuerPath'];
|
|
63
66
|
getConcatenationModules(): SDK.ModuleInstance[];
|
|
64
67
|
toData(contextPath?: string): SDK.ModuleData;
|
|
65
68
|
setId(id: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/graph/module-graph/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/graph/module-graph/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,qBAAa,MAAO,YAAW,GAAG,CAAC,cAAc;IAC/C,MAAM,CAAC,IAAI,wBAAkB;IAEtB,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,YAAY,CAAC,CAAM;IAEzD,MAAM,CAAC,IAAI;IAIX,EAAE,EAAE,MAAM,CAAC;IAEX,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,QAAQ,CAAC,IAAI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AS,CAAC,MAAM,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,IAAI;IAI5C,eAAe,CAAC,YAAY,EAAE,GAAG,CAAC,kBAAkB,EAAE,GAAG,IAAI;IAI7D,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,cAAc,EAAE,GAAG,IAAI;IAIjD,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,EAAE,GAAG,IAAI;IAI/C,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,EAAE,GAAG,IAAI;CAG7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/graph",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0-alpha.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"lodash.unionby": "^4.8.0",
|
|
18
18
|
"socket.io": "4.8.1",
|
|
19
19
|
"source-map": "^0.7.4",
|
|
20
|
-
"@rsdoctor/types": "1.0
|
|
21
|
-
"@rsdoctor/utils": "1.0
|
|
20
|
+
"@rsdoctor/types": "1.1.0-alpha.0",
|
|
21
|
+
"@rsdoctor/utils": "1.1.0-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/body-parser": "1.19.5",
|
|
25
25
|
"@types/estree": "1.0.5",
|
|
26
26
|
"@types/lodash.unionby": "^4.8.9",
|
|
27
|
-
"@types/node": "^
|
|
27
|
+
"@types/node": "^22.8.1",
|
|
28
28
|
"fs-extra": "^11.1.1",
|
|
29
29
|
"tslib": "2.8.1",
|
|
30
30
|
"typescript": "^5.2.2"
|