diff --git a/libs/native-federation-core/jest.config.ts b/libs/native-federation-core/jest.config.ts deleted file mode 100644 index 042d1157..00000000 --- a/libs/native-federation-core/jest.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'native-federation-core', - preset: '../../jest.preset.js', - testEnvironment: 'node', - transform: { - '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], - }, - moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/libs/native-federation-core', -}; diff --git a/libs/native-federation-core/package.json b/libs/native-federation-core/package.json index 572e1eef..1edb851a 100644 --- a/libs/native-federation-core/package.json +++ b/libs/native-federation-core/package.json @@ -6,6 +6,8 @@ "dependencies": { "json5": "^2.2.0", "chalk": "^5.6.2", + "es-module-lexer": "^1.7.0", + "@jridgewell/sourcemap-codec": "^1.5.0", "@softarc/native-federation-runtime": "~3.5.4", "fast-glob": "^3.3.3", "@softarc/sheriff-core": "^0.19.2" diff --git a/libs/native-federation-core/project.json b/libs/native-federation-core/project.json index 49400c58..86a38b54 100644 --- a/libs/native-federation-core/project.json +++ b/libs/native-federation-core/project.json @@ -17,6 +17,14 @@ ] } }, + "test": { + "executor": "@nx/vitest:test", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "reportsDirectory": "../../coverage/libs/native-federation-core", + "configFile": "libs/native-federation-core/vitest.config.mts" + } + }, "publish": { "dependsOn": ["build"], "executor": "nx:run-commands", diff --git a/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.spec.ts b/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.spec.ts new file mode 100644 index 00000000..bdf5c98a --- /dev/null +++ b/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.spec.ts @@ -0,0 +1,229 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { decode, encode } from '@jridgewell/sourcemap-codec'; +import type { SourceMapMappings } from '@jridgewell/sourcemap-codec'; +import { + rewriteChunkImports, + deriveInternalName, + isSourceFile, + INTERNAL_SCOPE, +} from './rewrite-chunk-imports'; + +describe('rewriteChunkImports', () => { + let dir: string; + + beforeEach(() => { + dir = fs.mkdtempSync(path.join(os.tmpdir(), 'nf-rewrite-')); + }); + + afterEach(() => { + fs.rmSync(dir, { recursive: true, force: true }); + }); + + function writeBundle( + name: string, + code: string, + mappings?: SourceMapMappings, + ): string { + const file = path.join(dir, name); + fs.writeFileSync(file, code, 'utf-8'); + if (mappings) { + fs.writeFileSync( + `${file}.map`, + JSON.stringify({ + version: 3, + file: name, + sourceRoot: 'webpack://app/', + sources: ['src/a.ts', 'src/b.ts'], + sourcesContent: ['let a = 1;\n', 'let b = 2;\n'], + names: ['alpha', 'beta'], + mappings: encode(mappings), + }), + 'utf-8', + ); + } + return file; + } + + const readMap = (file: string) => + JSON.parse(fs.readFileSync(`${file}.map`, 'utf-8')); + + it('should rewrite static imports, re-exports and dynamic imports to the internal scope', () => { + const code = + `import{a}from"./chunk-A.js";` + + `export{b}from"./chunk-B.js";` + + `const p=import("./chunk-C.js");`; + const file = writeBundle('all-forms.js', code); + + rewriteChunkImports(file); + + const out = fs.readFileSync(file, 'utf-8'); + expect(out).toContain(`import{a}from"${INTERNAL_SCOPE}/chunk-A"`); + expect(out).toContain(`export{b}from"${INTERNAL_SCOPE}/chunk-B"`); + expect(out).toContain(`import("${INTERNAL_SCOPE}/chunk-C")`); + expect(out).not.toContain('./chunk-'); + }); + + it('should leave bare specifiers, non-literal dynamic imports and plain strings untouched', () => { + const code = + `import{x}from"@angular/core";` + + `const q=import(base+"/late.js");` + + `const decoy="./chunk-D.js";`; + const file = writeBundle('untouchable.js', code); + const before = fs.statSync(file).mtimeMs; + + rewriteChunkImports(file); + + // nothing rewritable -> the file is not even written + expect(fs.readFileSync(file, 'utf-8')).toBe(code); + expect(fs.statSync(file).mtimeMs).toBe(before); + }); + + it('should not touch the map of a file without chunk imports', () => { + const code = `import{x}from"@angular/core";console.log(x);`; + const file = writeBundle('no-chunks.js', code, [ + [ + [0, 0, 0, 0], + [10, 0, 0, 4, 0], + ], + ]); + const mapBefore = fs.readFileSync(`${file}.map`, 'utf-8'); + + rewriteChunkImports(file); + + expect(fs.readFileSync(`${file}.map`, 'utf-8')).toBe(mapBefore); + }); + + it('should shift only generated columns, accumulating deltas across edits on one line', () => { + // './chunk-A.js' (12 chars) -> '@nf-internal/chunk-A' (20 chars): +8 per edit + const code = `import{a}from"./chunk-A.js";import{b}from"./chunk-B.js";fn(a,b);`; + // segments: before both edits, between them, after both — plus a named one + const file = writeBundle('shift.js', code, [ + [ + [0, 0, 0, 0], // col 0: before edits + [30, 0, 0, 4, 0], // col 30: after edit 1 (+8) + [58, 1, 0, 0, 1], // col 58: after both edits (+16) + ], + ]); + + rewriteChunkImports(file); + + const map = readMap(file); + const decoded = decode(map.mappings); + expect(decoded).toEqual([ + [ + [0, 0, 0, 0], + [38, 0, 0, 4, 0], + [74, 1, 0, 0, 1], + ], + ]); + }); + + it('should preserve every map field except mappings byte-for-byte', () => { + const code = `import{a}from"./chunk-A.js";fn(a);`; + const file = writeBundle('fields.js', code, [ + [ + [0, 0, 0, 0], + [29, 1, 0, 0, 1], + ], + ]); + const before = readMap(file); + + rewriteChunkImports(file); + + const after = readMap(file); + expect(after.names).toEqual(before.names); + expect(after.sources).toEqual(before.sources); + expect(after.sourcesContent).toEqual(before.sourcesContent); + // sourceRoot must come through un-resolved and un-duplicated + expect(after.sourceRoot).toBe('webpack://app/'); + // segment count and every non-column field identical + const a = decode(before.mappings); + const b = decode(after.mappings); + expect(b.length).toBe(a.length); + for (let line = 0; line < a.length; line++) { + expect(b[line].length).toBe(a[line].length); + for (let i = 0; i < a[line].length; i++) { + expect(b[line][i].length).toBe(a[line][i].length); + expect(b[line][i].slice(1)).toEqual(a[line][i].slice(1)); + } + } + }); + + it('should shift lines independently in multi-line files', () => { + const code = `import{a}from"./chunk-A.js";\nimport{b}from"./chunk-B.js";\nfn(a,b);`; + const file = writeBundle('lines.js', code, [ + [ + [0, 0, 0, 0], + [28, 0, 0, 4], + ], + [ + [0, 1, 0, 0], + [28, 1, 0, 4], + ], + [[0, 0, 1, 0]], + ]); + + rewriteChunkImports(file); + + const decoded = decode(readMap(file).mappings); + // trailing segment on each edited line shifts by +8; line 3 untouched + expect(decoded[0]).toEqual([ + [0, 0, 0, 0], + [36, 0, 0, 4], + ]); + expect(decoded[1]).toEqual([ + [0, 1, 0, 0], + [36, 1, 0, 4], + ]); + expect(decoded[2]).toEqual([[0, 0, 1, 0]]); + }); + + it('should derive the rename from the cooked specifier while splicing the raw range', () => { + // c is 'c': cooked name is './chunk-E.js', raw text is longer + const code = `import e from"./\\u0063hunk-E.js";use(e);`; + const file = writeBundle('escaped.js', code); + + rewriteChunkImports(file); + + const out = fs.readFileSync(file, 'utf-8'); + expect(out).toContain(`from"${INTERNAL_SCOPE}/chunk-E"`); + expect(out).not.toContain('u0063'); + }); + + it('should rewrite the code even when no map file exists', () => { + const file = writeBundle('mapless.js', `import{a}from"./chunk-A.js";`); + + expect(() => rewriteChunkImports(file)).not.toThrow(); + expect(fs.readFileSync(file, 'utf-8')).toContain( + `${INTERNAL_SCOPE}/chunk-A`, + ); + expect(fs.existsSync(`${file}.map`)).toBe(false); + }); +}); + +describe('deriveInternalName', () => { + it('should map chunk file names into the internal scope without extension', () => { + expect(deriveInternalName('./chunk-X.js')).toBe( + `${INTERNAL_SCOPE}/chunk-X`, + ); + expect(deriveInternalName('./chunk-Y.mjs')).toBe( + `${INTERNAL_SCOPE}/chunk-Y`, + ); + expect(deriveInternalName('./chunk-Z.cjs')).toBe( + `${INTERNAL_SCOPE}/chunk-Z`, + ); + expect(deriveInternalName('plain.js')).toBe(`${INTERNAL_SCOPE}/plain`); + }); +}); + +describe('isSourceFile', () => { + it('should accept js module files and reject others', () => { + expect(isSourceFile('a.js')).toBe(true); + expect(isSourceFile('a.mjs')).toBe(true); + expect(isSourceFile('a.cjs')).toBe(true); + expect(isSourceFile('a.css')).toBe(false); + expect(isSourceFile('a.js.map')).toBe(false); + }); +}); diff --git a/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.ts b/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.ts index cb06331b..c94f2e57 100644 --- a/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.ts +++ b/libs/native-federation-core/src/lib/utils/rewrite-chunk-imports.ts @@ -1,99 +1,130 @@ -import * as ts from 'typescript'; import * as fs from 'fs'; -import * as path from 'path'; +import { initSync, parse } from 'es-module-lexer'; +import { + decode, + encode, + type SourceMapMappings, +} from '@jridgewell/sourcemap-codec'; export const INTERNAL_SCOPE = '@nf-internal'; +interface SpecifierEdit { + start: number; + end: number; + text: string; +} + +function collectSpecifierEdits( + sourceCode: string, + filePath: string, +): SpecifierEdit[] { + initSync(); + const [imports] = parse(sourceCode, filePath); + const edits: SpecifierEdit[] = []; + for (const imp of imports) { + if (imp.d === -2 || imp.n === undefined || !imp.n.startsWith('./')) { + continue; // import.meta, non-literal dynamic argument, or not a chunk ref + } + let start = imp.s; + let end = imp.e; + if (imp.d > -1) { + // dynamic import: s/e include the quotes — step inside them + const quote = sourceCode[start]; + if (quote !== '"' && quote !== "'") { + continue; + } + start += 1; + end -= 1; + } + edits.push({ start, end, text: deriveInternalName(imp.n) }); + } + return edits.sort((a, b) => a.start - b.start); +} + export function rewriteChunkImports(filePath: string) { const sourceCode = fs.readFileSync(filePath, 'utf-8'); + const edits = collectSpecifierEdits(sourceCode, filePath); + if (edits.length === 0) { + return; + } - const sourceFile = ts.createSourceFile( - path.basename(filePath), - sourceCode, - ts.ScriptTarget.ESNext, - true, - ts.ScriptKind.JS, - ); - - const printer = ts.createPrinter(); + let result = ''; + let last = 0; + for (const e of edits) { + result += sourceCode.slice(last, e.start) + e.text; + last = e.end; + } + result += sourceCode.slice(last); + fs.writeFileSync(filePath, result, 'utf-8'); - function visit(node: ts.Node): ts.Node { - // import ... from '...' - if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) { - const moduleSpecifier = node.moduleSpecifier; - if (moduleSpecifier && ts.isStringLiteral(moduleSpecifier)) { - const text = moduleSpecifier.text; - if (text.startsWith('./')) { - const newModuleSpecifier = ts.factory.createStringLiteral( - deriveInternalName(text), - ); + const mapFile = `${filePath}.map`; + if (fs.existsSync(mapFile)) { + const map = JSON.parse(fs.readFileSync(mapFile, 'utf-8')); + if (map.mappings) { + map.mappings = shiftMappings(map.mappings, sourceCode, edits); + fs.writeFileSync(mapFile, JSON.stringify(map), 'utf-8'); + } + } +} - if (ts.isImportDeclaration(node)) { - return ts.factory.updateImportDeclaration( - node, - node.modifiers, - node.importClause, - newModuleSpecifier, - node.assertClause, - ); - } else { - return ts.factory.updateExportDeclaration( - node, - node.modifiers, - node.isTypeOnly, - node.exportClause, - newModuleSpecifier, - node.assertClause, - ); - } - } - } +function shiftMappings( + mappings: string, + code: string, + edits: SpecifierEdit[], +): string { + const lineStarts = [0]; + for (let i = 0; i < code.length; i++) { + if (code.charCodeAt(i) === 10) { + lineStarts.push(i + 1); } + } + let line = 0; + const byLine = new Map< + number, + { start: number; end: number; delta: number }[] + >(); + for (const e of edits) { + while (line + 1 < lineStarts.length && lineStarts[line + 1] <= e.start) { + line++; + } + const col = e.start - lineStarts[line]; + const list = byLine.get(line) ?? []; + list.push({ + start: col, + end: e.end - lineStarts[line], + delta: e.text.length - (e.end - e.start), + }); + byLine.set(line, list); + } - // import('./...') - if ( - ts.isCallExpression(node) && - node.expression.kind === ts.SyntaxKind.ImportKeyword - ) { - const [arg] = node.arguments; - if (arg && ts.isStringLiteral(arg)) { - const text = arg.text; - if (text.startsWith('./')) { - const newArg = ts.factory.createStringLiteral( - deriveInternalName(text), - ); - return ts.factory.updateCallExpression( - node, - node.expression, - node.typeArguments, - [newArg], - ); + const decoded: SourceMapMappings = decode(mappings); + for (const [editLine, list] of byLine) { + for (const segment of decoded[editLine] ?? []) { + let shift = 0; + for (const e of list) { + if (e.end <= segment[0]) { + shift += e.delta; + } else if (e.start < segment[0]) { + // starts inside the replaced span: clamp to its start (defensive — + // real bundles never map into the middle of a specifier literal) + shift += e.start - segment[0]; } } + segment[0] += shift; } - - return ts.visitEachChild(node, visit, undefined); } - - const transformed = ts.transform(sourceFile, [ - (context) => (node) => ts.visitNode(node as any, visit), - ]); - const updatedSourceFile = transformed.transformed[0]; - - const result = printer.printFile(updatedSourceFile as ts.SourceFile); - - fs.writeFileSync(filePath, result, 'utf-8'); + return encode(decoded); } export function isSourceFile(fileName: string): boolean { return !!fileName.match(/.(m|c)?js$/); } +/** './chunk-X.js' -> '@nf-internal/chunk-X' */ export function deriveInternalName(fileName: string): string { if (fileName.startsWith('./')) { fileName = fileName.slice(2); } - const packageName = fileName.replace(/.(m|c)?js$/, ''); return INTERNAL_SCOPE + '/' + packageName; } diff --git a/libs/native-federation-core/vitest.config.mts b/libs/native-federation-core/vitest.config.mts new file mode 100644 index 00000000..d25fd0ea --- /dev/null +++ b/libs/native-federation-core/vitest.config.mts @@ -0,0 +1,15 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: true, + environment: 'node', + include: ['src/**/*.spec.ts'], + watch: false, + reporters: ['default'], + coverage: { + reportsDirectory: '../../coverage/libs/native-federation-core', + provider: 'v8', + }, + }, +}); diff --git a/libs/native-federation/src/utils/angular-esbuild-adapter.ts b/libs/native-federation/src/utils/angular-esbuild-adapter.ts index 2f6cba0b..ee0ddb8d 100644 --- a/libs/native-federation/src/utils/angular-esbuild-adapter.ts +++ b/libs/native-federation/src/utils/angular-esbuild-adapter.ts @@ -145,6 +145,12 @@ export function createAngularBuildAdapter( async function link(outfile: string, dev: boolean) { const code = fs.readFileSync(outfile, 'utf-8'); + // Nothing left to link: the compiler plugin already processed partial + // declarations. Returning early ships esbuild's source map untouched. + if (!/\u0275\u0275ngDeclare/.test(code)) { + return; + } + try { const linkerEsm = await loadEsmModule<{ default: PluginItem }>( '@angular/compiler-cli/linker/babel', @@ -295,7 +301,11 @@ async function runEsbuild( external, logLevel, bundle: true, - sourcemap: sourcemapOptions.scripts, + sourcemap: sourcemapOptions.scripts + ? sourcemapOptions.hidden + ? 'external' + : true + : false, minify: !dev, supported: { 'async-await': false, diff --git a/package-lock.json b/package-lock.json index 082cde72..a213ff80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,9 +18,11 @@ "@angular/platform-browser-dynamic": "^21.2.0", "@angular/router": "^21.2.0", "@chialab/esbuild-plugin-commonjs": "^0.19.0", + "@jridgewell/sourcemap-codec": "^1.5.0", "@module-federation/enhanced": "^2.2.2", "@module-federation/runtime-core": "^2.2.2", "@rsbuild/core": "^1.1.13", + "es-module-lexer": "^1.7.0", "es-module-shims": "^1.5.12", "rxjs": "^7.8.2", "tslib": "^2.3.0", @@ -7875,7 +7877,6 @@ "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "devOptional": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { @@ -9384,9 +9385,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -9404,9 +9402,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -9424,9 +9419,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -9444,9 +9436,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -9464,9 +9453,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -9484,9 +9470,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -9504,9 +9487,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -9617,8 +9597,10 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz", "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==", - "extraneous": true, + "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">= 20.19.0" }, @@ -10322,9 +10304,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -10339,9 +10318,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -10356,9 +10332,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -10373,9 +10346,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -11668,9 +11638,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -11685,9 +11652,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -11702,9 +11666,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -11719,9 +11680,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -12250,9 +12208,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -12267,9 +12222,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -12284,9 +12236,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -12301,9 +12250,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -12915,9 +12861,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -12934,9 +12877,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -12953,9 +12893,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -12972,9 +12909,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -12991,9 +12925,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13010,9 +12941,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13029,9 +12957,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13048,9 +12973,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13275,9 +13197,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13292,9 +13211,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13309,9 +13225,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13326,9 +13239,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13343,9 +13253,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13360,9 +13267,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13377,9 +13281,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13394,9 +13295,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13647,9 +13545,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13671,9 +13566,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13695,9 +13587,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13719,9 +13608,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13743,9 +13629,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13767,9 +13650,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14195,9 +14075,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14215,9 +14092,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14235,9 +14109,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14255,9 +14126,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14571,9 +14439,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14588,9 +14453,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14605,9 +14467,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14622,9 +14481,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14639,9 +14495,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14656,9 +14509,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14673,9 +14523,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14690,9 +14537,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14707,9 +14551,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14724,9 +14565,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14741,9 +14579,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14758,9 +14593,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14775,9 +14607,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14967,9 +14796,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -14983,9 +14809,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14999,9 +14822,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -15015,9 +14835,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -16064,9 +15881,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -16084,9 +15898,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -16104,9 +15915,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -16124,9 +15932,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -16144,9 +15949,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -16164,9 +15966,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ @@ -17335,9 +17134,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -17352,9 +17148,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -17369,9 +17162,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -17386,9 +17176,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -17403,9 +17190,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -17420,9 +17204,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -17437,9 +17218,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -17454,9 +17232,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -17471,9 +17246,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -17488,9 +17260,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -37074,7 +36843,6 @@ "arm" ], "dev": true, - "libc": "glibc", "license": "MIT", "optional": true, "os": [ @@ -37092,7 +36860,6 @@ "arm64" ], "dev": true, - "libc": "glibc", "license": "MIT", "optional": true, "os": [ @@ -37110,7 +36877,6 @@ "arm" ], "dev": true, - "libc": "musl", "license": "MIT", "optional": true, "os": [ @@ -37128,7 +36894,6 @@ "arm64" ], "dev": true, - "libc": "musl", "license": "MIT", "optional": true, "os": [ @@ -37146,7 +36911,6 @@ "riscv64" ], "dev": true, - "libc": "musl", "license": "MIT", "optional": true, "os": [ @@ -37164,7 +36928,6 @@ "x64" ], "dev": true, - "libc": "musl", "license": "MIT", "optional": true, "os": [ @@ -37182,7 +36945,6 @@ "riscv64" ], "dev": true, - "libc": "glibc", "license": "MIT", "optional": true, "os": [ @@ -37200,7 +36962,6 @@ "x64" ], "dev": true, - "libc": "glibc", "license": "MIT", "optional": true, "os": [ diff --git a/package.json b/package.json index 34dad690..cf654fbe 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,11 @@ "@angular/platform-browser-dynamic": "^21.2.0", "@angular/router": "^21.2.0", "@chialab/esbuild-plugin-commonjs": "^0.19.0", + "@jridgewell/sourcemap-codec": "^1.5.0", "@module-federation/enhanced": "^2.2.2", "@module-federation/runtime-core": "^2.2.2", "@rsbuild/core": "^1.1.13", + "es-module-lexer": "^1.7.0", "es-module-shims": "^1.5.12", "rxjs": "^7.8.2", "tslib": "^2.3.0",