MCPcopy Create free account
hub / github.com/btd/rollup-plugin-visualizer / getBundleModuleUid

Method getBundleModuleUid

plugin/module-mapper.ts:69–86  ·  view source on GitHub ↗
(bundleId: string, moduleId: string)

Source from the content-addressed store, hash-verified

67 }
68
69 getBundleModuleUid(bundleId: string, moduleId: string): ModuleUID {
70 if (!(moduleId in this.nodeMetas)) {
71 this.nodeMetas[moduleId] = {
72 uid: this.uniqueId(),
73 meta: {
74 id: this.trimProjectRootId(moduleId),
75 moduleParts: {},
76 imported: new Set(),
77 importedBy: new Set(),
78 },
79 };
80 }
81 if (!(bundleId in this.nodeMetas[moduleId].meta.moduleParts)) {
82 this.nodeMetas[moduleId].meta.moduleParts[bundleId] = this.uniqueId();
83 }
84
85 return this.nodeMetas[moduleId].meta.moduleParts[bundleId];
86 }
87
88 setNodePart(bundleId: string, moduleId: string, value: ModuleLengths): ModuleUID {
89 const uid = this.getBundleModuleUid(bundleId, moduleId);

Callers 1

setNodePartMethod · 0.95

Calls 2

uniqueIdMethod · 0.95
trimProjectRootIdMethod · 0.95

Tested by

no test coverage detected