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

Method getNodeMetas

plugin/module-mapper.ts:124–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 }
123
124 getNodeMetas(): Record<ModuleUID, ModuleMeta> {
125 const nodeMetas: Record<ModuleUID, ModuleMeta> = {};
126 for (const { uid: metaUid, meta } of Object.values(this.nodeMetas)) {
127 nodeMetas[metaUid] = {
128 ...meta,
129 imported: [...meta.imported].map((rawImport) => {
130 const [uid, dynamic] = rawImport.split(",");
131 const importData: ModuleImport = { uid };
132 if (dynamic === "true") {
133 importData.dynamic = true;
134 }
135 return importData;
136 }),
137 importedBy: [...meta.importedBy].map((rawImport) => {
138 const [uid, dynamic] = rawImport.split(",");
139 const importData: ModuleImport = { uid };
140 if (dynamic === "true") {
141 importData.dynamic = true;
142 }
143 return importData;
144 }),
145 };
146 }
147 return nodeMetas;
148 }
149
150 addImportedByLink(targetId: string, sourceId: string): void {
151 const sourceUid = this.getModuleUid(sourceId);

Callers 1

generateBundleFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected