@absolutejs/absolute 0.19.0-beta.807 → 0.19.0-beta.809
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/angular/browser.js +9801 -57
- package/dist/angular/browser.js.map +246 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +14877 -60
- package/dist/angular/index.js.map +281 -4
- package/dist/angular/server.js +5610 -45
- package/dist/angular/server.js.map +51 -3
- package/dist/build.js +18092 -45
- package/dist/build.js.map +99 -3
- package/dist/cli/index.js +317 -86
- package/dist/client/index.js +1091 -70
- package/dist/client/index.js.map +24 -4
- package/dist/core/streamingSlotRegistrar.js +108 -11
- package/dist/core/streamingSlotRegistrar.js.map +4 -3
- package/dist/core/streamingSlotRegistry.js +169 -7
- package/dist/core/streamingSlotRegistry.js.map +5 -3
- package/dist/index.js +19957 -547
- package/dist/index.js.map +116 -3
- package/dist/islands/browser.js +228 -9
- package/dist/islands/browser.js.map +9 -4
- package/dist/islands/index.js +1908 -17
- package/dist/islands/index.js.map +27 -3
- package/dist/react/browser.js +328 -12
- package/dist/react/browser.js.map +12 -4
- package/dist/react/components/index.js +167 -16
- package/dist/react/components/index.js.map +6 -3
- package/dist/react/hooks/index.js +183 -8
- package/dist/react/hooks/index.js.map +7 -3
- package/dist/react/index.js +3627 -36
- package/dist/react/index.js.map +45 -4
- package/dist/react/jsxDevRuntimeCompat.js +61 -2
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +1789 -18
- package/dist/react/server.js.map +21 -3
- package/dist/src/angular/injectorPatch.d.ts +1 -0
- package/dist/src/angular/islands.d.ts +1 -0
- package/dist/src/client/hydrators/react.d.ts +3 -0
- package/dist/src/client/hydrators/svelte.d.ts +2 -0
- package/dist/src/client/hydrators/vue.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/svelte/browser.js +247 -12
- package/dist/svelte/browser.js.map +10 -3
- package/dist/svelte/index.js +3732 -37
- package/dist/svelte/index.js.map +47 -4
- package/dist/svelte/server.js +2794 -21
- package/dist/svelte/server.js.map +27 -3
- package/dist/vue/browser.js +348 -12
- package/dist/vue/browser.js.map +12 -4
- package/dist/vue/components/Image.js +240 -7
- package/dist/vue/components/Image.js.map +6 -3
- package/dist/vue/components/index.js +544 -11
- package/dist/vue/components/index.js.map +9 -3
- package/dist/vue/index.js +4212 -52
- package/dist/vue/index.js.map +50 -4
- package/dist/vue/server.js +1849 -18
- package/dist/vue/server.js.map +21 -3
- package/package.json +1 -1
- package/dist/chunk-0867j0r0.js +0 -136
- package/dist/chunk-0867j0r0.js.map +0 -10
- package/dist/chunk-102fp7xe.js +0 -63
- package/dist/chunk-102fp7xe.js.map +0 -10
- package/dist/chunk-11zpfqz6.js +0 -19
- package/dist/chunk-11zpfqz6.js.map +0 -10
- package/dist/chunk-1rfh7hw9.js +0 -319
- package/dist/chunk-1rfh7hw9.js.map +0 -11
- package/dist/chunk-1x4fxm57.js +0 -51
- package/dist/chunk-1x4fxm57.js.map +0 -9
- package/dist/chunk-25v9t56f.js +0 -29
- package/dist/chunk-25v9t56f.js.map +0 -11
- package/dist/chunk-2f21eenc.js +0 -21
- package/dist/chunk-2f21eenc.js.map +0 -10
- package/dist/chunk-2ga2znex.js +0 -13
- package/dist/chunk-2ga2znex.js.map +0 -9
- package/dist/chunk-30yrw0f6.js +0 -33
- package/dist/chunk-30yrw0f6.js.map +0 -10
- package/dist/chunk-3g91wb4f.js +0 -358
- package/dist/chunk-3g91wb4f.js.map +0 -10
- package/dist/chunk-3rea1gam.js +0 -4403
- package/dist/chunk-3rea1gam.js.map +0 -28
- package/dist/chunk-3yjzpcne.js +0 -34
- package/dist/chunk-3yjzpcne.js.map +0 -10
- package/dist/chunk-41bf6aqt.js +0 -17
- package/dist/chunk-41bf6aqt.js.map +0 -9
- package/dist/chunk-4d39r92n.js +0 -81
- package/dist/chunk-4d39r92n.js.map +0 -10
- package/dist/chunk-5003emhv.js +0 -17
- package/dist/chunk-5003emhv.js.map +0 -10
- package/dist/chunk-5f67rsed.js +0 -466
- package/dist/chunk-5f67rsed.js.map +0 -10
- package/dist/chunk-5fhp1jap.js +0 -9169
- package/dist/chunk-5fhp1jap.js.map +0 -236
- package/dist/chunk-629x0yh4.js +0 -20
- package/dist/chunk-629x0yh4.js.map +0 -9
- package/dist/chunk-6pdj08z3.js +0 -73
- package/dist/chunk-6pdj08z3.js.map +0 -12
- package/dist/chunk-6qjbrt0k.js +0 -13
- package/dist/chunk-6qjbrt0k.js.map +0 -9
- package/dist/chunk-6sccb4jr.js +0 -14
- package/dist/chunk-6sccb4jr.js.map +0 -9
- package/dist/chunk-798spvzv.js +0 -50
- package/dist/chunk-798spvzv.js.map +0 -10
- package/dist/chunk-7fw6x3js.js +0 -131
- package/dist/chunk-7fw6x3js.js.map +0 -11
- package/dist/chunk-7kjj42xm.js +0 -11
- package/dist/chunk-7kjj42xm.js.map +0 -10
- package/dist/chunk-7mtstdqn.js +0 -90
- package/dist/chunk-7mtstdqn.js.map +0 -10
- package/dist/chunk-851whwc7.js +0 -17
- package/dist/chunk-851whwc7.js.map +0 -10
- package/dist/chunk-85n68sy6.js +0 -103
- package/dist/chunk-85n68sy6.js.map +0 -10
- package/dist/chunk-8kcfffry.js +0 -35
- package/dist/chunk-8kcfffry.js.map +0 -10
- package/dist/chunk-92fsjfpp.js +0 -1731
- package/dist/chunk-92fsjfpp.js.map +0 -11
- package/dist/chunk-93sqk7be.js +0 -139
- package/dist/chunk-93sqk7be.js.map +0 -12
- package/dist/chunk-9c5tj4k3.js +0 -130
- package/dist/chunk-9c5tj4k3.js.map +0 -10
- package/dist/chunk-9j59emg3.js +0 -184
- package/dist/chunk-9j59emg3.js.map +0 -11
- package/dist/chunk-9ve9jq72.js +0 -203
- package/dist/chunk-9ve9jq72.js.map +0 -10
- package/dist/chunk-9xrsjeem.js +0 -12
- package/dist/chunk-9xrsjeem.js.map +0 -9
- package/dist/chunk-a9mvyp04.js +0 -87
- package/dist/chunk-a9mvyp04.js.map +0 -10
- package/dist/chunk-b3gbnrwe.js +0 -21
- package/dist/chunk-b3gbnrwe.js.map +0 -10
- package/dist/chunk-bgb8k1qs.js +0 -672
- package/dist/chunk-bgb8k1qs.js.map +0 -15
- package/dist/chunk-bmgqm774.js +0 -65
- package/dist/chunk-bmgqm774.js.map +0 -9
- package/dist/chunk-bxfghpma.js +0 -69
- package/dist/chunk-bxfghpma.js.map +0 -10
- package/dist/chunk-c1jfjnka.js +0 -74
- package/dist/chunk-c1jfjnka.js.map +0 -10
- package/dist/chunk-cbkrwmvh.js +0 -80
- package/dist/chunk-cbkrwmvh.js.map +0 -10
- package/dist/chunk-cdxd7sy2.js +0 -71
- package/dist/chunk-cdxd7sy2.js.map +0 -10
- package/dist/chunk-cg95827x.js +0 -21
- package/dist/chunk-cg95827x.js.map +0 -10
- package/dist/chunk-cm0g4q6w.js +0 -149
- package/dist/chunk-cm0g4q6w.js.map +0 -10
- package/dist/chunk-d7mwkzry.js +0 -261
- package/dist/chunk-d7mwkzry.js.map +0 -10
- package/dist/chunk-d9c0am65.js +0 -12
- package/dist/chunk-d9c0am65.js.map +0 -10
- package/dist/chunk-daqghmg8.js +0 -12
- package/dist/chunk-daqghmg8.js.map +0 -9
- package/dist/chunk-e3r9fxaa.js +0 -149
- package/dist/chunk-e3r9fxaa.js.map +0 -10
- package/dist/chunk-e8eecyrq.js +0 -244
- package/dist/chunk-e8eecyrq.js.map +0 -10
- package/dist/chunk-ex2hxe0v.js +0 -160
- package/dist/chunk-ex2hxe0v.js.map +0 -11
- package/dist/chunk-fak944et.js +0 -91
- package/dist/chunk-fak944et.js.map +0 -10
- package/dist/chunk-fygx2ymm.js +0 -118
- package/dist/chunk-fygx2ymm.js.map +0 -12
- package/dist/chunk-g15qj669.js +0 -271
- package/dist/chunk-g15qj669.js.map +0 -11
- package/dist/chunk-gd6wmknh.js +0 -121
- package/dist/chunk-gd6wmknh.js.map +0 -11
- package/dist/chunk-gf0ygptk.js +0 -85
- package/dist/chunk-gf0ygptk.js.map +0 -11
- package/dist/chunk-gytkmthr.js +0 -220
- package/dist/chunk-gytkmthr.js.map +0 -10
- package/dist/chunk-h5bbfn3n.js +0 -28
- package/dist/chunk-h5bbfn3n.js.map +0 -11
- package/dist/chunk-h6mye9r3.js +0 -93
- package/dist/chunk-h6mye9r3.js.map +0 -10
- package/dist/chunk-hcsmxw1v.js +0 -85
- package/dist/chunk-hcsmxw1v.js.map +0 -10
- package/dist/chunk-hyjs4bqs.js +0 -8
- package/dist/chunk-hyjs4bqs.js.map +0 -10
- package/dist/chunk-jn91vzkh.js +0 -66
- package/dist/chunk-jn91vzkh.js.map +0 -10
- package/dist/chunk-jpkjdgsk.js +0 -167
- package/dist/chunk-jpkjdgsk.js.map +0 -11
- package/dist/chunk-jwxt8gnp.js +0 -13
- package/dist/chunk-jwxt8gnp.js.map +0 -9
- package/dist/chunk-kk8w9rh5.js +0 -195
- package/dist/chunk-kk8w9rh5.js.map +0 -10
- package/dist/chunk-kwgh8rmg.js +0 -426
- package/dist/chunk-kwgh8rmg.js.map +0 -14
- package/dist/chunk-m97ze5hz.js +0 -46
- package/dist/chunk-m97ze5hz.js.map +0 -10
- package/dist/chunk-mbazhahf.js +0 -60
- package/dist/chunk-mbazhahf.js.map +0 -10
- package/dist/chunk-mgfwq18r.js +0 -15
- package/dist/chunk-mgfwq18r.js.map +0 -9
- package/dist/chunk-mtgf69xn.js +0 -88
- package/dist/chunk-mtgf69xn.js.map +0 -10
- package/dist/chunk-mtxzyxpg.js +0 -102
- package/dist/chunk-mtxzyxpg.js.map +0 -10
- package/dist/chunk-nehhtthw.js +0 -225
- package/dist/chunk-nehhtthw.js.map +0 -10
- package/dist/chunk-p5504p14.js +0 -16
- package/dist/chunk-p5504p14.js.map +0 -10
- package/dist/chunk-p5zgj77m.js +0 -184
- package/dist/chunk-p5zgj77m.js.map +0 -10
- package/dist/chunk-pnscgw95.js +0 -90
- package/dist/chunk-pnscgw95.js.map +0 -10
- package/dist/chunk-pvpp4pvs.js +0 -17
- package/dist/chunk-pvpp4pvs.js.map +0 -10
- package/dist/chunk-qh75agse.js +0 -95
- package/dist/chunk-qh75agse.js.map +0 -10
- package/dist/chunk-qxq2zcty.js +0 -52
- package/dist/chunk-qxq2zcty.js.map +0 -10
- package/dist/chunk-r6e8pytx.js +0 -22
- package/dist/chunk-r6e8pytx.js.map +0 -9
- package/dist/chunk-r7jmgqnw.js +0 -114
- package/dist/chunk-r7jmgqnw.js.map +0 -10
- package/dist/chunk-s6defjk2.js +0 -116
- package/dist/chunk-s6defjk2.js.map +0 -10
- package/dist/chunk-sd39p726.js +0 -619
- package/dist/chunk-sd39p726.js.map +0 -10
- package/dist/chunk-swrnzs4c.js +0 -63
- package/dist/chunk-swrnzs4c.js.map +0 -10
- package/dist/chunk-tfe3sb44.js +0 -33
- package/dist/chunk-tfe3sb44.js.map +0 -10
- package/dist/chunk-tjr0kcev.js +0 -41
- package/dist/chunk-tjr0kcev.js.map +0 -9
- package/dist/chunk-tx9edm1x.js +0 -34
- package/dist/chunk-tx9edm1x.js.map +0 -10
- package/dist/chunk-txhm2vb5.js +0 -18
- package/dist/chunk-txhm2vb5.js.map +0 -9
- package/dist/chunk-v5vmsxmy.js +0 -526
- package/dist/chunk-v5vmsxmy.js.map +0 -12
- package/dist/chunk-vjhxm8n2.js +0 -29
- package/dist/chunk-vjhxm8n2.js.map +0 -9
- package/dist/chunk-vkrpm7kc.js +0 -247
- package/dist/chunk-vkrpm7kc.js.map +0 -12
- package/dist/chunk-w3m4m5we.js +0 -4925
- package/dist/chunk-w3m4m5we.js.map +0 -12
- package/dist/chunk-wrxtn9ve.js +0 -18
- package/dist/chunk-wrxtn9ve.js.map +0 -10
- package/dist/chunk-x09cskqd.js +0 -377
- package/dist/chunk-x09cskqd.js.map +0 -10
- package/dist/chunk-xnt8c6h2.js +0 -576
- package/dist/chunk-xnt8c6h2.js.map +0 -10
- package/dist/chunk-xw0tx842.js +0 -13
- package/dist/chunk-xw0tx842.js.map +0 -9
- package/dist/chunk-xx5b6b9m.js +0 -69
- package/dist/chunk-xx5b6b9m.js.map +0 -10
- package/dist/chunk-xz1kdswj.js +0 -21
- package/dist/chunk-xz1kdswj.js.map +0 -9
- package/dist/chunk-y84qnsd3.js +0 -32
- package/dist/chunk-y84qnsd3.js.map +0 -10
- package/dist/chunk-ywjn0rad.js +0 -14
- package/dist/chunk-ywjn0rad.js.map +0 -9
- package/dist/chunk-z9nvhm6r.js +0 -13
- package/dist/chunk-z9nvhm6r.js.map +0 -9
- package/dist/chunk-zhmvdpk6.js +0 -15
- package/dist/chunk-zhmvdpk6.js.map +0 -9
- package/dist/chunk-zrg9d4zw.js +0 -784
- package/dist/chunk-zrg9d4zw.js.map +0 -10
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/build/compileAngular.ts", "../src/angular/lowerDeferSyntax.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { existsSync, readFileSync, promises as fs } from 'fs';\nimport { join, basename, sep, dirname, resolve, relative } from 'path';\nimport type { CompilerOptions } from '@angular/compiler-cli';\nimport ts from 'typescript';\nimport { BASE_36_RADIX } from '../constants';\nimport { toPascal } from '../utils/stringModifiers';\nimport { buildIslandMetadataExports } from '../islands/sourceMetadata';\nimport {\n\tlowerAngularDeferSyntax,\n\ttype LoweredAngularDeferSlot\n} from '../angular/lowerDeferSyntax';\nimport {\n\tcompileStyleFileIfNeeded,\n\tcompileStyleFileIfNeededSync\n} from './stylePreprocessor';\nimport type { StylePreprocessorConfig } from '../../types/build';\n\ntype SyncReadFile = (fileName: string) => string | undefined;\n\ntype BuildTracePhase = <T>(\n\tname: string,\n\tfn: () => Promise<T> | T,\n\tmetadata?: Record<string, unknown>\n) => Promise<T>;\n\nconst traceAngularPhase: BuildTracePhase = async (name, fn, metadata) => {\n\tconst tracePhase = (\n\t\tglobalThis as typeof globalThis & {\n\t\t\t__absoluteBuildTracePhase?: BuildTracePhase;\n\t\t}\n\t).__absoluteBuildTracePhase;\n\n\treturn tracePhase\n\t\t? tracePhase(`compile/angular/${name}`, fn, metadata)\n\t\t: await fn();\n};\n\ntype TsconfigPathAlias = {\n\tpattern: string;\n\treplacements: string[];\n};\n\nconst readTsconfigPathAliases = () => {\n\ttry {\n\t\tconst configPath = resolve(process.cwd(), 'tsconfig.json');\n\t\tconst config = ts.readConfigFile(configPath, ts.sys.readFile).config as\n\t\t\t| {\n\t\t\t\t\tcompilerOptions?: {\n\t\t\t\t\t\tbaseUrl?: string;\n\t\t\t\t\t\tpaths?: Record<string, string[]>;\n\t\t\t\t\t};\n\t\t\t }\n\t\t\t| undefined;\n\t\tconst compilerOptions = config?.compilerOptions ?? {};\n\t\tconst baseUrl = resolve(process.cwd(), compilerOptions.baseUrl ?? '.');\n\t\tconst aliases: TsconfigPathAlias[] = Object.entries(\n\t\t\tcompilerOptions.paths ?? {}\n\t\t).map(([pattern, replacements]) => ({ pattern, replacements }));\n\n\t\treturn { aliases, baseUrl };\n\t} catch {\n\t\treturn { aliases: [] as TsconfigPathAlias[], baseUrl: process.cwd() };\n\t}\n};\n\nconst matchTsconfigAlias = (\n\tspecifier: string,\n\taliases: TsconfigPathAlias[],\n\tbaseUrl: string,\n\tresolveSourceFile: (candidate: string) => string | undefined\n) => {\n\tfor (const alias of aliases) {\n\t\tconst wildcardIndex = alias.pattern.indexOf('*');\n\t\tconst exactMatch = wildcardIndex === -1;\n\t\tif (exactMatch && specifier !== alias.pattern) continue;\n\n\t\tconst prefix = exactMatch\n\t\t\t? alias.pattern\n\t\t\t: alias.pattern.slice(0, wildcardIndex);\n\t\tconst suffix = exactMatch ? '' : alias.pattern.slice(wildcardIndex + 1);\n\t\tif (\n\t\t\t!exactMatch &&\n\t\t\t(!specifier.startsWith(prefix) || !specifier.endsWith(suffix))\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst wildcardValue = exactMatch\n\t\t\t? ''\n\t\t\t: specifier.slice(prefix.length, specifier.length - suffix.length);\n\t\tfor (const replacement of alias.replacements) {\n\t\t\tconst candidate = replacement.replace('*', wildcardValue);\n\t\t\tconst resolved = resolveSourceFile(resolve(baseUrl, candidate));\n\t\t\tif (resolved) return resolved;\n\t\t}\n\t}\n\n\treturn undefined;\n};\n\nconst resolveSourceFile = (candidate: string) => {\n\tconst candidates = candidate.match(/\\.[cm]?[tj]sx?$/)\n\t\t? [candidate]\n\t\t: [\n\t\t\t\t`${candidate}.ts`,\n\t\t\t\t`${candidate}.tsx`,\n\t\t\t\t`${candidate}.js`,\n\t\t\t\t`${candidate}.jsx`,\n\t\t\t\tjoin(candidate, 'index.ts'),\n\t\t\t\tjoin(candidate, 'index.tsx'),\n\t\t\t\tjoin(candidate, 'index.js'),\n\t\t\t\tjoin(candidate, 'index.jsx')\n\t\t\t];\n\n\treturn candidates.find((file) => existsSync(file));\n};\n\nconst createLegacyAngularAnimationUsageResolver = (rootDir: string) => {\n\tconst baseDir = resolve(rootDir);\n\tconst tsconfigAliases = readTsconfigPathAliases();\n\tconst transpiler = new Bun.Transpiler({ loader: 'tsx' });\n\tconst scanCache = new Map<\n\t\tstring,\n\t\tPromise<{ imports: string[]; usesLegacyAnimations: boolean }>\n\t>();\n\n\tconst resolveLocalImport = (specifier: string, fromDir: string) => {\n\t\tif (specifier.startsWith('.') || specifier.startsWith('/')) {\n\t\t\treturn resolveSourceFile(resolve(fromDir, specifier));\n\t\t}\n\n\t\tconst aliased = matchTsconfigAlias(\n\t\t\tspecifier,\n\t\t\ttsconfigAliases.aliases,\n\t\t\ttsconfigAliases.baseUrl,\n\t\t\tresolveSourceFile\n\t\t);\n\t\tif (aliased) return aliased;\n\n\t\ttry {\n\t\t\tconst resolved = Bun.resolveSync(specifier, fromDir);\n\t\t\tif (resolved.includes('/node_modules/')) return undefined;\n\t\t\tconst absolute = resolve(resolved);\n\t\t\tif (!absolute.startsWith(baseDir)) return undefined;\n\n\t\t\treturn resolveSourceFile(absolute);\n\t\t} catch {\n\t\t\treturn undefined;\n\t\t}\n\t};\n\n\tconst scanFile = (filePath: string) => {\n\t\tconst actualPath = resolveSourceFile(filePath);\n\t\tif (!actualPath) {\n\t\t\treturn Promise.resolve({\n\t\t\t\timports: [],\n\t\t\t\tusesLegacyAnimations: false\n\t\t\t});\n\t\t}\n\t\tconst resolved = resolve(actualPath);\n\t\tconst cached = scanCache.get(resolved);\n\t\tif (cached) return cached;\n\n\t\tconst promise = (async () => {\n\t\t\tlet sourceCode: string;\n\t\t\ttry {\n\t\t\t\tsourceCode = await fs.readFile(resolved, 'utf-8');\n\t\t\t} catch {\n\t\t\t\treturn { imports: [], usesLegacyAnimations: false };\n\t\t\t}\n\n\t\t\tlet imports;\n\t\t\ttry {\n\t\t\t\timports = transpiler.scanImports(sourceCode);\n\t\t\t} catch {\n\t\t\t\treturn { imports: [], usesLegacyAnimations: false };\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\timports: imports.map((imp) => imp.path),\n\t\t\t\tusesLegacyAnimations: imports.some(\n\t\t\t\t\t(imp) => imp.path === '@angular/animations'\n\t\t\t\t)\n\t\t\t};\n\t\t})();\n\n\t\tscanCache.set(resolved, promise);\n\n\t\treturn promise;\n\t};\n\n\tconst visit = async (\n\t\tfilePath: string,\n\t\tvisited = new Set<string>()\n\t): Promise<boolean> => {\n\t\tconst actualPath = resolveSourceFile(filePath);\n\t\tif (!actualPath) return false;\n\t\tconst resolved = resolve(actualPath);\n\t\tif (visited.has(resolved)) return false;\n\t\tvisited.add(resolved);\n\n\t\tconst scan = await scanFile(resolved);\n\t\tif (scan.usesLegacyAnimations) return true;\n\n\t\tfor (const specifier of scan.imports) {\n\t\t\tconst importedPath = resolveLocalImport(\n\t\t\t\tspecifier,\n\t\t\t\tdirname(resolved)\n\t\t\t);\n\t\t\tif (importedPath && (await visit(importedPath, visited))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\treturn (entryPath: string) => visit(entryPath);\n};\n\nconst resolveDevClientDir = () => {\n\tconst projectRoot = process.cwd();\n\tconst fromSource = resolve(import.meta.dir, '../dev/client');\n\n\tif (existsSync(fromSource) && fromSource.startsWith(projectRoot)) {\n\t\treturn fromSource;\n\t}\n\n\tconst fromNodeModules = resolve(\n\t\tprojectRoot,\n\t\t'node_modules/@absolutejs/absolute/dist/dev/client'\n\t);\n\tif (existsSync(fromNodeModules)) return fromNodeModules;\n\n\treturn resolve(import.meta.dir, './dev/client');\n};\n\nconst devClientDir = resolveDevClientDir();\n\nconst hmrClientPath = join(devClientDir, 'hmrClient.ts').replace(/\\\\/g, '/');\n\n// Angular HMR Runtime Layer (Level 3) — Path to runtime module\nconst hmrRuntimePath = join(\n\tdevClientDir,\n\t'handlers',\n\t'angularRuntime.ts'\n).replace(/\\\\/g, '/');\n\n/** Angular HMR Runtime Layer (Level 3) — Inject HMR registration calls into compiled component JS.\n * Detects exported Angular component classes and appends register() calls.\n * Only active when hmr=true (dev mode). */\nconst injectHMRRegistration = (content: string, sourceId: string) => {\n\t// Find exported component classes: `export class XxxComponent` or `class XxxComponent`\n\tconst componentClassRegex = /(?:export\\s+)?class\\s+(\\w+Component)\\s/g;\n\tconst componentNames: string[] = [];\n\tlet match;\n\twhile ((match = componentClassRegex.exec(content)) !== null) {\n\t\tif (match[1]) componentNames.push(match[1]);\n\t}\n\n\tif (componentNames.length === 0) return content;\n\n\t// Build registration code block\n\tconst registrations = componentNames\n\t\t.map(\n\t\t\t(name) =>\n\t\t\t\t` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`\n\t\t)\n\t\t.join('\\n');\n\n\tconst hmrBlock = `\\n// Angular HMR Runtime Layer (Level 3) — Auto-registration\\nif (typeof window !== 'undefined' && window.__ANGULAR_HMR__) {\\n${registrations}\\n}\\n`;\n\n\treturn content + hmrBlock;\n};\n\nconst formatDiagnosticMessage = (diagnostic: ts.Diagnostic) => {\n\ttry {\n\t\treturn ts.flattenDiagnosticMessageText(diagnostic.messageText, '\\n');\n\t} catch {\n\t\treturn String(diagnostic.messageText || 'Unknown error');\n\t}\n};\n\nconst throwOnCompilationErrors = (\n\tdiagnostics: readonly ts.Diagnostic[] | undefined\n) => {\n\tif (!diagnostics?.length) return;\n\n\tconst errors = diagnostics.filter(\n\t\t(diag) => diag.category === ts.DiagnosticCategory.Error\n\t);\n\tif (!errors.length) return;\n\n\tconst fullMessage = errors.map(formatDiagnosticMessage).join('\\n');\n\tconsole.error('Angular compilation errors:', fullMessage);\n\tthrow new Error(fullMessage);\n};\n\nconst resolveRelativePath = (\n\tfileName: string,\n\tresolvedOutDir: string,\n\toutDir: string\n) => {\n\tif (fileName.startsWith(resolvedOutDir))\n\t\treturn fileName.substring(resolvedOutDir.length + 1);\n\tif (fileName.startsWith(outDir))\n\t\treturn fileName.substring(outDir.length + 1);\n\n\treturn fileName;\n};\n\nconst hasJsLikeExtension = (path: string) => /\\.(js|ts|mjs|cjs)$/.test(path);\n\nconst rewriteRelativeJsSpecifier = (\n\timporterOutputPath: string,\n\tspecifier: string,\n\toutputFiles?: Set<string>\n) => {\n\tif (specifier.endsWith('.ts')) return specifier.replace(/\\.ts$/, '.js');\n\tif (hasJsLikeExtension(specifier)) return specifier;\n\n\tconst importerDir = dirname(importerOutputPath);\n\tconst fileCandidate = resolve(importerDir, `${specifier}.js`);\n\tif (outputFiles?.has(fileCandidate) || existsSync(fileCandidate)) {\n\t\treturn `${specifier}.js`;\n\t}\n\n\tconst indexCandidate = resolve(importerDir, specifier, 'index.js');\n\tif (outputFiles?.has(indexCandidate) || existsSync(indexCandidate)) {\n\t\treturn `${specifier}/index.js`;\n\t}\n\n\treturn `${specifier}.js`;\n};\n\nconst isRelativeModuleSpecifier = (specifier: string) =>\n\tspecifier.startsWith('./') || specifier.startsWith('../');\n\nconst extractLocalImportSpecifiers = (source: string, fileName: string) => {\n\tconst sourceFile = ts.createSourceFile(\n\t\tfileName,\n\t\tsource,\n\t\tts.ScriptTarget.Latest,\n\t\ttrue,\n\t\tts.ScriptKind.TS\n\t);\n\tconst specifiers: string[] = [];\n\tconst addSpecifier = (node: ts.Node | undefined) => {\n\t\tif (!node || !ts.isStringLiteralLike(node)) return;\n\t\tconst specifier = node.text;\n\t\tif (isRelativeModuleSpecifier(specifier)) specifiers.push(specifier);\n\t};\n\n\tconst visit = (node: ts.Node) => {\n\t\tif (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {\n\t\t\taddSpecifier(node.moduleSpecifier);\n\t\t} else if (\n\t\t\tts.isCallExpression(node) &&\n\t\t\tnode.expression.kind === ts.SyntaxKind.ImportKeyword\n\t\t) {\n\t\t\taddSpecifier(node.arguments[0]);\n\t\t}\n\t\tts.forEachChild(node, visit);\n\t};\n\tvisit(sourceFile);\n\n\treturn specifiers;\n};\n\nconst resolveLocalTsImport = (fromFile: string, specifier: string) => {\n\tif (!isRelativeModuleSpecifier(specifier)) return null;\n\tconst basePath = resolve(dirname(fromFile), specifier);\n\tconst candidates = /\\.[cm]?[tj]sx?$/.test(basePath)\n\t\t? [basePath]\n\t\t: [\n\t\t\t\t`${basePath}.ts`,\n\t\t\t\t`${basePath}.tsx`,\n\t\t\t\t`${basePath}.mts`,\n\t\t\t\t`${basePath}.cts`,\n\t\t\t\tjoin(basePath, 'index.ts'),\n\t\t\t\tjoin(basePath, 'index.tsx'),\n\t\t\t\tjoin(basePath, 'index.mts'),\n\t\t\t\tjoin(basePath, 'index.cts')\n\t\t\t];\n\n\treturn (\n\t\tcandidates\n\t\t\t.map((candidate) => resolve(candidate))\n\t\t\t.find(\n\t\t\t\t(candidate) =>\n\t\t\t\t\texistsSync(candidate) && !candidate.endsWith('.d.ts')\n\t\t\t) ?? null\n\t);\n};\n\nconst readFileForAotTransform = async (\n\tfileName: string,\n\treadFile: SyncReadFile | undefined\n) => {\n\tconst hostSource = readFile?.(fileName);\n\tif (typeof hostSource === 'string') return hostSource;\n\n\treturn fs.readFile(fileName, 'utf-8');\n};\n\ntype AotResourceTransformCacheEntry = {\n\tsource: string;\n\tversion: 1;\n};\n\ntype AotResourceTransformStats = {\n\tcacheHits: number;\n\tcacheMisses: number;\n\tfilesVisited: number;\n\ttransformedFiles: number;\n};\n\nconst safeStableStringify = (value: unknown): string => {\n\tconst seen = new WeakSet<object>();\n\n\treturn JSON.stringify(value, (_key, entry) => {\n\t\tif (typeof entry === 'function') return `[Function:${entry.name}]`;\n\t\tif (!entry || typeof entry !== 'object') return entry;\n\t\tif (seen.has(entry)) return '[Circular]';\n\t\tseen.add(entry);\n\n\t\tif (Array.isArray(entry)) return entry;\n\n\t\treturn Object.fromEntries(\n\t\t\tObject.entries(entry).sort(([left], [right]) =>\n\t\t\t\tleft.localeCompare(right)\n\t\t\t)\n\t\t);\n\t});\n};\n\nconst collectAngularResourcePaths = (source: string, fileDir: string) => {\n\tconst paths: string[] = [];\n\tconst templateUrlMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/templateUrl\\s*:\\s*['\"]([^'\"]+)['\"]/\n\t);\n\tif (templateUrlMatch?.[1]) paths.push(join(fileDir, templateUrlMatch[1]));\n\n\tconst styleUrlMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/styleUrl\\s*:\\s*['\"]([^'\"]+)['\"]/\n\t);\n\tif (styleUrlMatch?.[1]) paths.push(join(fileDir, styleUrlMatch[1]));\n\n\tconst styleUrlsMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/styleUrls\\s*:\\s*\\[([^\\]]+)\\]/\n\t);\n\tconst urlMatches = styleUrlsMatch?.[1]?.match(/['\"]([^'\"]+)['\"]/g);\n\tif (urlMatches) {\n\t\tfor (const urlMatch of urlMatches) {\n\t\t\tpaths.push(join(fileDir, urlMatch.replace(/['\"]/g, '')));\n\t\t}\n\t}\n\n\treturn paths.map((path) => resolve(path));\n};\n\nconst readResourceCacheFile = async (cachePath: string) => {\n\ttry {\n\t\tconst entry = JSON.parse(\n\t\t\tawait fs.readFile(cachePath, 'utf-8')\n\t\t) as AotResourceTransformCacheEntry;\n\t\tif (entry.version !== 1 || typeof entry.source !== 'string') {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn entry;\n\t} catch {\n\t\treturn null;\n\t}\n};\n\nconst writeResourceCacheFile = async (cachePath: string, source: string) => {\n\tawait fs.mkdir(dirname(cachePath), { recursive: true });\n\tawait fs.writeFile(\n\t\tcachePath,\n\t\tJSON.stringify({\n\t\t\tsource,\n\t\t\tversion: 1\n\t\t} satisfies AotResourceTransformCacheEntry),\n\t\t'utf-8'\n\t);\n};\n\nconst resolveResourceTransformCachePath = async (\n\tfilePath: string,\n\tsource: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst resourcePaths = collectAngularResourcePaths(\n\t\tsource,\n\t\tdirname(filePath)\n\t);\n\tconst resourceContents = await Promise.all(\n\t\tresourcePaths.map(async (resourcePath) => {\n\t\t\tconst content = await fs.readFile(resourcePath, 'utf-8');\n\n\t\t\treturn `${resourcePath}\\0${content}`;\n\t\t})\n\t);\n\tconst cacheInput = [\n\t\t'v1',\n\t\tfilePath,\n\t\tsource,\n\t\t...resourceContents,\n\t\tsafeStableStringify(stylePreprocessors ?? null)\n\t].join('\\0');\n\tconst cacheKey = Bun.hash(cacheInput).toString(BASE_36_RADIX);\n\n\treturn join(\n\t\tprocess.cwd(),\n\t\t'.absolutejs',\n\t\t'cache',\n\t\t'angular-resources',\n\t\t`${cacheKey}.json`\n\t);\n};\n\nconst precomputeAotResourceTransforms = async (\n\tinputPaths: string[],\n\treadFile: SyncReadFile | undefined,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst transformedSources = new Map<string, string>();\n\tconst visited = new Set<string>();\n\tconst stats: AotResourceTransformStats = {\n\t\tcacheHits: 0,\n\t\tcacheMisses: 0,\n\t\tfilesVisited: 0,\n\t\ttransformedFiles: 0\n\t};\n\n\tconst transformFile = async (filePath: string) => {\n\t\tconst resolvedPath = resolve(filePath);\n\t\tif (visited.has(resolvedPath)) return;\n\t\tvisited.add(resolvedPath);\n\t\tif (!existsSync(resolvedPath) || resolvedPath.endsWith('.d.ts')) return;\n\t\tstats.filesVisited += 1;\n\n\t\tconst source = await readFileForAotTransform(resolvedPath, readFile);\n\t\tconst cachePath = await resolveResourceTransformCachePath(\n\t\t\tresolvedPath,\n\t\t\tsource,\n\t\t\tstylePreprocessors\n\t\t);\n\t\tconst cached = await readResourceCacheFile(cachePath);\n\t\tlet transformedSource: string;\n\t\tif (cached) {\n\t\t\tstats.cacheHits += 1;\n\t\t\ttransformedSource = cached.source;\n\t\t} else {\n\t\t\tstats.cacheMisses += 1;\n\t\t\tconst transformed = await inlineResources(\n\t\t\t\tsource,\n\t\t\t\tdirname(resolvedPath),\n\t\t\t\tstylePreprocessors\n\t\t\t);\n\t\t\ttransformedSource = transformed.source;\n\t\t\tawait writeResourceCacheFile(cachePath, transformedSource);\n\t\t}\n\t\tif (transformedSource !== source) {\n\t\t\tstats.transformedFiles += 1;\n\t\t\ttransformedSources.set(resolvedPath, transformedSource);\n\t\t}\n\n\t\tconst imports = extractLocalImportSpecifiers(source, resolvedPath);\n\t\tawait Promise.all(\n\t\t\timports.map(async (specifier) => {\n\t\t\t\tconst resolvedImport = resolveLocalTsImport(\n\t\t\t\t\tresolvedPath,\n\t\t\t\t\tspecifier\n\t\t\t\t);\n\t\t\t\tif (resolvedImport) await transformFile(resolvedImport);\n\t\t\t})\n\t\t);\n\t};\n\n\tawait Promise.all(inputPaths.map((inputPath) => transformFile(inputPath)));\n\n\treturn { stats, transformedSources };\n};\n\nexport const compileAngularFiles = async (\n\tinputPaths: string[],\n\toutDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst islandMetadataByOutputPath = await traceAngularPhase(\n\t\t'aot/island-metadata',\n\t\t() =>\n\t\t\tnew Map(\n\t\t\t\tinputPaths.map((inputPath) => {\n\t\t\t\t\tconst outputPath = resolve(\n\t\t\t\t\t\tjoin(\n\t\t\t\t\t\t\toutDir,\n\t\t\t\t\t\t\trelative(process.cwd(), resolve(inputPath)).replace(\n\t\t\t\t\t\t\t\t/\\.[cm]?[tj]sx?$/,\n\t\t\t\t\t\t\t\t'.js'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\toutputPath,\n\t\t\t\t\t\tbuildIslandMetadataExports(\n\t\t\t\t\t\t\treadFileSync(inputPath, 'utf-8')\n\t\t\t\t\t\t)\n\t\t\t\t\t] as const;\n\t\t\t\t})\n\t\t\t),\n\t\t{ entries: inputPaths.length }\n\t);\n\t// Load `@angular/compiler` BEFORE anything that transitively pulls in\n\t// `@angular/common` (which `@angular/compiler-cli` does). The compiler's\n\t// top-level `publishFacade(globalThis)` registers the JIT compiler facade\n\t// on `globalThis.ng` — without that, partial-AOT chunks like\n\t// `_platform_location-chunk.mjs` crash on import with\n\t// \"JIT compilation failed for [class PlatformLocation]\" because they\n\t// call `ɵɵngDeclareFactory` at module load time, which requires the\n\t// facade to be present.\n\tawait traceAngularPhase(\n\t\t'aot/preload-compiler',\n\t\t() => import('@angular/compiler')\n\t);\n\tconst { readConfiguration, performCompilation, EmitFlags } =\n\t\tawait traceAngularPhase(\n\t\t\t'aot/import-compiler-cli',\n\t\t\t() => import('@angular/compiler-cli')\n\t\t);\n\n\tconst tsLibDir = await traceAngularPhase(\n\t\t'aot/resolve-typescript-lib',\n\t\t() => {\n\t\t\t// Resolve TypeScript lib directory dynamically (prevents hardcoded paths)\n\t\t\tconst tsPath = require.resolve('typescript');\n\t\t\tconst tsRootDir = dirname(tsPath);\n\n\t\t\treturn tsRootDir.endsWith('lib')\n\t\t\t\t? tsRootDir\n\t\t\t\t: resolve(tsRootDir, 'lib');\n\t\t}\n\t);\n\n\t// Read configuration from tsconfig.json to get angularCompilerOptions\n\tconst config = await traceAngularPhase('aot/read-configuration', () =>\n\t\treadConfiguration('./tsconfig.json')\n\t);\n\n\t// Build options object with newLine FIRST, then spread config.\n\t// IMPORTANT: target MUST be ES2022 (not ESNext) to avoid hardcoded lib.esnext.full.d.ts path.\n\tconst options: CompilerOptions = {\n\t\temitDecoratorMetadata: true,\n\t\tesModuleInterop: true,\n\t\texperimentalDecorators: true,\n\t\tmodule: ts.ModuleKind.ESNext,\n\t\tmoduleResolution: ts.ModuleResolutionKind.Bundler,\n\t\tnewLine: ts.NewLineKind.LineFeed, // Set FIRST - critical for createCompilerHost\n\t\tnoLib: false,\n\t\toutDir,\n\t\tskipLibCheck: true,\n\t\ttarget: ts.ScriptTarget.ES2022, // Use ES2022 instead of ESNext to avoid hardcoded lib paths\n\t\t...config.options // Spread AFTER to add Angular options\n\t};\n\n\t// CRITICAL: Force target to ES2022 AFTER spread to ensure it's not overwritten.\n\t// ESNext target causes hardcoded lib.esnext.full.d.ts path issues.\n\toptions.target = ts.ScriptTarget.ES2022;\n\n\t// Force TypeScript legacy decorators required by Angular 21's DI system.\n\toptions.experimentalDecorators = true;\n\toptions.emitDecoratorMetadata = true;\n\n\t// Force newLine again after spread to ensure it's not overwritten.\n\toptions.newLine = ts.NewLineKind.LineFeed;\n\n\t// Force outDir after spread — config.options may contain an absolute \"dist\" path\n\t// that overwrites our outDir, causing deeply nested compiled output.\n\toptions.outDir = outDir;\n\n\t// Production examples commonly use noEmit=true for editor/typecheck flows.\n\t// AOT compilation must override that or Angular silently produces no JS.\n\toptions.noEmit = false;\n\n\t// AOT emits into a generated directory that may be cleaned between builds.\n\t// Reusing the project's incremental tsbuildinfo can make TypeScript skip\n\t// files that need to be emitted again.\n\toptions.incremental = false;\n\toptions.tsBuildInfoFile = undefined;\n\n\t// Explicit rootDir prevents TypeScript from computing it from the single entry file,\n\t// which would cause imports from other directories to get absolute-path-based output.\n\toptions.rootDir = process.cwd();\n\n\t// Use TypeScript's createCompilerHost directly. Keep this host local to the\n\t// current AOT pass because the overrides below mutate host methods.\n\tconst host = await traceAngularPhase('aot/create-compiler-host', () =>\n\t\tts.createCompilerHost(options)\n\t);\n\n\t// Override lib resolution to use dynamic paths.\n\tconst originalGetDefaultLibLocation = host.getDefaultLibLocation;\n\thost.getDefaultLibLocation = () =>\n\t\ttsLibDir ||\n\t\t(originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : '');\n\n\tconst originalGetDefaultLibFileName = host.getDefaultLibFileName;\n\thost.getDefaultLibFileName = (opts: ts.CompilerOptions) => {\n\t\tconst fileName = originalGetDefaultLibFileName\n\t\t\t? originalGetDefaultLibFileName(opts)\n\t\t\t: 'lib.d.ts';\n\n\t\treturn basename(fileName);\n\t};\n\n\tconst originalGetSourceFile = host.getSourceFile;\n\thost.getSourceFile = (\n\t\tfileName: string,\n\t\tlanguageVersion: ts.ScriptTarget,\n\t\tonError?: (message: string) => void\n\t) => {\n\t\tif (\n\t\t\tfileName.startsWith('lib.') &&\n\t\t\tfileName.endsWith('.d.ts') &&\n\t\t\ttsLibDir\n\t\t) {\n\t\t\tconst resolvedPath = join(tsLibDir, fileName);\n\n\t\t\treturn originalGetSourceFile?.call(\n\t\t\t\thost,\n\t\t\t\tresolvedPath,\n\t\t\t\tlanguageVersion,\n\t\t\t\tonError\n\t\t\t);\n\t\t}\n\n\t\treturn originalGetSourceFile?.call(\n\t\t\thost,\n\t\t\tfileName,\n\t\t\tlanguageVersion,\n\t\t\tonError\n\t\t);\n\t};\n\n\tconst emitted: Record<string, string> = {};\n\tconst resolvedOutDir = resolve(outDir);\n\thost.writeFile = (fileName, text) => {\n\t\tconst relativePath = resolveRelativePath(\n\t\t\tfileName,\n\t\t\tresolvedOutDir,\n\t\t\toutDir\n\t\t);\n\t\temitted[relativePath] = text;\n\t};\n\tconst originalReadFile = host.readFile;\n\tconst { stats: aotResourceTransformStats, transformedSources } =\n\t\tawait traceAngularPhase(\n\t\t\t'aot/precompute-resources',\n\t\t\t() =>\n\t\t\t\tprecomputeAotResourceTransforms(\n\t\t\t\t\tinputPaths,\n\t\t\t\t\toriginalReadFile?.bind(host),\n\t\t\t\t\tstylePreprocessors\n\t\t\t\t),\n\t\t\t{ entries: inputPaths.length }\n\t\t);\n\tawait traceAngularPhase('aot/resource-cache-summary', () => undefined, {\n\t\tcacheHits: aotResourceTransformStats.cacheHits,\n\t\tcacheMisses: aotResourceTransformStats.cacheMisses,\n\t\tfilesVisited: aotResourceTransformStats.filesVisited,\n\t\ttransformedFiles: aotResourceTransformStats.transformedFiles\n\t});\n\thost.readFile = (fileName: string) => {\n\t\tconst source = originalReadFile\n\t\t\t? originalReadFile.call(host, fileName)\n\t\t\t: undefined;\n\t\tif (typeof source !== 'string') return source;\n\t\tif (!fileName.endsWith('.ts') || fileName.endsWith('.d.ts')) {\n\t\t\treturn source;\n\t\t}\n\t\tconst resolvedPath = resolve(fileName);\n\n\t\treturn transformedSources.get(resolvedPath) ?? source;\n\t};\n\tconst originalGetSourceFileForCompile = host.getSourceFile;\n\thost.getSourceFile = (\n\t\tfileName: string,\n\t\tlanguageVersion: ts.ScriptTarget,\n\t\tonError?: (message: string) => void\n\t) => {\n\t\tconst source = transformedSources.get(resolve(fileName));\n\t\tif (source) {\n\t\t\treturn ts.createSourceFile(fileName, source, languageVersion, true);\n\t\t}\n\n\t\treturn originalGetSourceFileForCompile?.call(\n\t\t\thost,\n\t\t\tfileName,\n\t\t\tlanguageVersion,\n\t\t\tonError\n\t\t);\n\t};\n\n\tlet diagnostics: readonly ts.Diagnostic[] | undefined;\n\ttry {\n\t\t({ diagnostics } = await traceAngularPhase(\n\t\t\t'aot/perform-compilation',\n\t\t\t() =>\n\t\t\t\tperformCompilation({\n\t\t\t\t\temitFlags: EmitFlags.Default,\n\t\t\t\t\thost,\n\t\t\t\t\toptions,\n\t\t\t\t\trootNames: inputPaths\n\t\t\t\t}),\n\t\t\t{ entries: inputPaths.length }\n\t\t));\n\t} finally {\n\t\thost.readFile = originalReadFile;\n\t\thost.getSourceFile = originalGetSourceFileForCompile;\n\t}\n\n\tawait traceAngularPhase('aot/check-diagnostics', () =>\n\t\tthrowOnCompilationErrors(diagnostics)\n\t);\n\n\tconst entries = await traceAngularPhase(\n\t\t'aot/postprocess-emitted-js',\n\t\t() => {\n\t\t\tconst rawEntries = Object.entries(emitted)\n\t\t\t\t.filter(([fileName]) => fileName.endsWith('.js'))\n\t\t\t\t.map(([fileName, content]) => ({\n\t\t\t\t\tcontent,\n\t\t\t\t\ttarget: join(outDir, fileName)\n\t\t\t\t}));\n\t\t\tconst outputFiles = new Set(\n\t\t\t\trawEntries.map(({ target }) => resolve(target))\n\t\t\t);\n\n\t\t\treturn rawEntries.map(({ content, target }) => {\n\t\t\t\t// Post-process the compiled output:\n\t\t\t\t// 1. Add .js extensions to imports\n\t\t\t\tlet processedContent = content.replace(\n\t\t\t\t\t/from\\s+(['\"])(\\.\\.?\\/[^'\"]+)(\\1)/g,\n\t\t\t\t\t(match, quote, path) => {\n\t\t\t\t\t\tconst rewritten = rewriteRelativeJsSpecifier(\n\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\toutputFiles\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (rewritten !== path) {\n\t\t\t\t\t\t\treturn `from ${quote}${rewritten}${quote}`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn match;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// 2. Fix Angular ɵɵdom* functions to standard ɵɵ* functions\n\t\t\t\tprocessedContent = processedContent\n\t\t\t\t\t.replace(/ɵɵdomElementStart/g, 'ɵɵelementStart')\n\t\t\t\t\t.replace(/ɵɵdomElementEnd/g, 'ɵɵelementEnd')\n\t\t\t\t\t.replace(/ɵɵdomElement\\(/g, 'ɵɵelement(')\n\t\t\t\t\t.replace(/ɵɵdomProperty/g, 'ɵɵproperty')\n\t\t\t\t\t.replace(/ɵɵdomListener/g, 'ɵɵlistener');\n\n\t\t\t\t// 3. Fix InjectFlags -> InternalInjectFlags (Angular 21+ compatibility)\n\t\t\t\t// Replace in import statements\n\t\t\t\tprocessedContent = processedContent.replace(\n\t\t\t\t\t/import\\s*{\\s*([^}]*)\\bInjectFlags\\b([^}]*)\\s*}\\s*from\\s*['\"]@angular\\/core['\"]/g,\n\t\t\t\t\t(match, before, after) => {\n\t\t\t\t\t\tconst cleaned = (before + after)\n\t\t\t\t\t\t\t.replace(/,\\s*,/g, ',')\n\t\t\t\t\t\t\t.replace(/^\\s*,\\s*/, '')\n\t\t\t\t\t\t\t.replace(/,\\s*$/, '');\n\n\t\t\t\t\t\treturn cleaned\n\t\t\t\t\t\t\t? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'`\n\t\t\t\t\t\t\t: `import { InternalInjectFlags } from '@angular/core'`;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// Replace usage of InjectFlags\n\t\t\t\tprocessedContent = processedContent.replace(\n\t\t\t\t\t/\\b(?<!Internal)InjectFlags\\b/g,\n\t\t\t\t\t'InternalInjectFlags'\n\t\t\t\t);\n\t\t\t\tprocessedContent +=\n\t\t\t\t\tislandMetadataByOutputPath.get(resolve(target)) ?? '';\n\n\t\t\t\treturn { content: processedContent, target };\n\t\t\t});\n\t\t}\n\t);\n\n\tawait traceAngularPhase(\n\t\t'aot/write-output',\n\t\t() =>\n\t\t\tPromise.all(\n\t\t\t\tentries.map(async ({ target, content }) => {\n\t\t\t\t\tawait fs.mkdir(dirname(target), { recursive: true });\n\t\t\t\t\tawait fs.writeFile(target, content, 'utf-8');\n\t\t\t\t})\n\t\t\t),\n\t\t{ outputs: entries.length }\n\t);\n\n\treturn await traceAngularPhase(\n\t\t'aot/collect-output-paths',\n\t\t() => entries.map(({ target }) => target),\n\t\t{ outputs: entries.length }\n\t);\n};\n\nexport const compileAngularFile = async (\n\tinputPath: string,\n\toutDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => compileAngularFiles([inputPath], outDir, stylePreprocessors);\n\n// Module-level cache: source content hash → compiled output path.\n// Skips re-transpilation of unchanged files during HMR, preventing\n// bun --hot from re-evaluating the growing module graph on each change.\nconst jitContentCache = new Map<string, string>();\n\n// Angular HMR Optimization — Cache the wrapper output (server file content\n// + index file content) so we can skip re-reading, rewriting, and index\n// generation when only transpilation changed but the wrapper output is identical.\nconst wrapperOutputCache = new Map<\n\tstring,\n\t{ serverHash: string; indexHash: string }\n>();\n\nconst escapeTemplateContent = (content: string) =>\n\tcontent\n\t\t.replace(/\\\\/g, '\\\\\\\\')\n\t\t.replace(/`/g, '\\\\`')\n\t\t.replace(/\\$\\{/g, '\\\\${');\n\n/** Find the next templateUrl/styleUrl/styleUrls property reference in `source`\n * whose line is not commented out with a leading `//`. Returns the match data\n * in the same shape RegExp.exec produces, or null if none. Catches the most\n * common case where users prefix the line with `//` to disable inlining\n * (otherwise our regex-based replacement would inline the template inside the\n * comment and the rest of the HTML would leak into source). */\nconst findUncommentedMatch = (source: string, pattern: RegExp) => {\n\tconst re = new RegExp(\n\t\tpattern.source,\n\t\tpattern.flags.includes('g') ? pattern.flags : pattern.flags + 'g'\n\t);\n\tlet match: RegExpExecArray | null;\n\twhile ((match = re.exec(source)) !== null) {\n\t\tconst lineStart = source.lastIndexOf('\\n', match.index - 1) + 1;\n\t\tconst beforeMatch = source.slice(lineStart, match.index);\n\t\tif (!/^\\s*\\/\\//.test(beforeMatch)) return match;\n\t}\n\n\treturn null;\n};\n\nconst resolveAngularDeferImportSpecifier = () => {\n\tconst sourceEntry = resolve(\n\t\timport.meta.dir,\n\t\t'../angular/components/index.ts'\n\t);\n\tif (existsSync(sourceEntry)) {\n\t\treturn sourceEntry.replace(/\\\\/g, '/');\n\t}\n\n\treturn '@absolutejs/absolute/angular/components';\n};\n\nconst ensureDeferSlotImport = (\n\tsource: string,\n\timportSpecifier = '@absolutejs/absolute/angular/components'\n) => {\n\tif (source.includes('DeferSlotComponent')) return source;\n\tconst resolvedImportSpecifier = JSON.stringify(importSpecifier);\n\tconst importLine = `import { DeferErrorTemplateDirective, DeferFallbackTemplateDirective, DeferResolvedTemplateDirective, DeferSlotComponent } from ${resolvedImportSpecifier};\\n`;\n\tconst lastImportMatch = [...source.matchAll(/^import[\\s\\S]*?;$/gm)].pop();\n\tif (!lastImportMatch || lastImportMatch.index === undefined) {\n\t\treturn importLine + source;\n\t}\n\tconst insertAt = lastImportMatch.index + lastImportMatch[0].length;\n\n\treturn `${source.slice(0, insertAt)}\\n${importLine}${source.slice(insertAt)}`;\n};\n\nconst ensureComponentImportsHasDeferSlot = (source: string) => {\n\tconst importListMatch = source.match(/imports\\s*:\\s*\\[([\\s\\S]*?)\\]/);\n\tif (importListMatch) {\n\t\tif (\n\t\t\t/\\bDeferSlotComponent\\b/.test(importListMatch[1] ?? '') &&\n\t\t\t/\\bDeferResolvedTemplateDirective\\b/.test(\n\t\t\t\timportListMatch[1] ?? ''\n\t\t\t) &&\n\t\t\t/\\bDeferFallbackTemplateDirective\\b/.test(\n\t\t\t\timportListMatch[1] ?? ''\n\t\t\t) &&\n\t\t\t/\\bDeferErrorTemplateDirective\\b/.test(importListMatch[1] ?? '')\n\t\t) {\n\t\t\treturn source;\n\t\t}\n\n\t\treturn source.replace(\n\t\t\t/imports\\s*:\\s*\\[([\\s\\S]*?)\\]/,\n\t\t\t(match, importsContent: string) => {\n\t\t\t\tconst trimmed = importsContent.trim();\n\t\t\t\tconst entries = trimmed\n\t\t\t\t\t.split(',')\n\t\t\t\t\t.map((entry) => entry.trim())\n\t\t\t\t\t.filter(Boolean);\n\t\t\t\tfor (const requiredImport of [\n\t\t\t\t\t'DeferSlotComponent',\n\t\t\t\t\t'DeferResolvedTemplateDirective',\n\t\t\t\t\t'DeferFallbackTemplateDirective',\n\t\t\t\t\t'DeferErrorTemplateDirective'\n\t\t\t\t]) {\n\t\t\t\t\tif (!entries.includes(requiredImport)) {\n\t\t\t\t\t\tentries.push(requiredImport);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextContent = entries.join(', ');\n\n\t\t\t\treturn `imports: [${nextContent}]`;\n\t\t\t}\n\t\t);\n\t}\n\n\treturn source.replace(\n\t\t/@Component\\(\\s*{/,\n\t\t'@Component({\\n\\timports: [DeferSlotComponent, DeferResolvedTemplateDirective, DeferFallbackTemplateDirective, DeferErrorTemplateDirective],'\n\t);\n};\n\nconst escapeTemplateLiteralValue = (value: string) =>\n\tvalue.replace(/\\\\/g, '\\\\\\\\').replace(/`/g, '\\\\`').replace(/\\$\\{/g, '\\\\${');\n\nconst skipInterpolatedExpression = (value: string, start: number) => {\n\tconst cursor = start + 2;\n\twhile (cursor < value.length - 1) {\n\t\tconst end = value.indexOf('}}', cursor);\n\t\tif (end < 0) {\n\t\t\treturn value.length;\n\t\t}\n\n\t\treturn end + 2;\n\t}\n\n\treturn value.length;\n};\n\nconst buildResolverTemplateLiteral = (value: string) => {\n\tconst parts: string[] = [];\n\tlet cursor = 0;\n\n\twhile (cursor < value.length) {\n\t\tconst interpolationStart = value.indexOf('{{', cursor);\n\t\tif (interpolationStart < 0) {\n\t\t\tparts.push(escapeTemplateLiteralValue(value.slice(cursor)));\n\n\t\t\tbreak;\n\t\t}\n\n\t\tparts.push(\n\t\t\tescapeTemplateLiteralValue(value.slice(cursor, interpolationStart))\n\t\t);\n\n\t\tconst nextCursor = skipInterpolatedExpression(\n\t\t\tvalue,\n\t\t\tinterpolationStart\n\t\t);\n\t\tif (nextCursor >= value.length) {\n\t\t\tparts.push(\n\t\t\t\tescapeTemplateLiteralValue(value.slice(interpolationStart))\n\t\t\t);\n\n\t\t\tbreak;\n\t\t}\n\n\t\tconst rawExpression = value\n\t\t\t.slice(interpolationStart + 2, nextCursor - 2)\n\t\t\t.trim();\n\t\tconst expression = rawExpression.length === 0 ? \"''\" : rawExpression;\n\t\tconst expressionLiteral = JSON.stringify(expression);\n\n\t\tparts.push(\n\t\t\t`\\${this.__absoluteDeferResolveTemplateExpression(${expressionLiteral})}`\n\t\t);\n\t\tcursor = nextCursor;\n\t}\n\n\treturn parts.join('');\n};\n\nconst buildDeferSlotTemplateResolver = () =>\n\t'\\t__absoluteDeferTemplateExpressionCache = new Map<string, string>();\\n' +\n\t'\\t__absoluteDeferResolveTemplateExpression(expression: string) {\\n' +\n\t'\\t\\tconst cached = this.__absoluteDeferTemplateExpressionCache.get(expression);\\n' +\n\t'\\t\\tif (cached !== undefined) return cached;\\n' +\n\t'\\n' +\n\t'\\t\\tconst scope = new Proxy(this, {\\n' +\n\t'\\t\\t\\tget: (_target, property) => {\\n' +\n\t'\\t\\t\\t\\tconst value = (this as Record<PropertyKey, unknown>)[property];\\n' +\n\t'\\t\\t\\t\\treturn typeof value === \"function\" ? value.bind(this) : value;\\n' +\n\t'\\t\\t\\t}\\n' +\n\t'\\t\\t});\\n' +\n\t\"\\t\\tlet value = '';\\n\" +\n\t'\\t\\ttry {\\n' +\n\t'\\t\\t\\tconst evaluate = new Function(\\n' +\n\t\"\\t\\t\\t\\t'scope',\\n\" +\n\t'\\t\\t\\t\\t\"with (scope) { return (\" + expression + \"); }\"\\n' +\n\t'\\t\\t\\t);\\n' +\n\t'\\n' +\n\t'\\t\\t\\tconst resolvedValue = evaluate(scope);\\n' +\n\t\"\\t\\t\\tvalue = resolvedValue == null ? '' : String(resolvedValue);\\n\" +\n\t'\\t\\t} catch (_error) {\\n' +\n\t\"\\t\\t\\tvalue = '';\\n\" +\n\t'\\t\\t}\\n' +\n\t'\\t\\tthis.__absoluteDeferTemplateExpressionCache.set(expression, value);\\n' +\n\t'\\t\\treturn value;\\n' +\n\t'\\t}\\n\\n';\n\nconst buildDeferSlotFields = (slots: LoweredAngularDeferSlot[]) =>\n\t[\n\t\tbuildDeferSlotTemplateResolver(),\n\t\t...slots.map((slot, index) => {\n\t\t\tconst htmlField = `\\t__absoluteDeferHtml${index} = () => \\`${buildResolverTemplateLiteral(slot.resolvedHtml)}\\`;\\n`;\n\t\t\tconst dataField =\n\t\t\t\tslot.resolvedBindings.length > 0\n\t\t\t\t\t? `\\t__absoluteDeferData${index} = () => ({\\n${slot.resolvedBindings\n\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t(binding) =>\n\t\t\t\t\t\t\t\t\t`\\t\\t\"${binding.key}\": this.__absoluteDeferResolveTemplateExpression(${JSON.stringify(binding.expression)})`\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.join(',\\n')}\\n\\t});\\n`\n\t\t\t\t\t: `\\t__absoluteDeferData${index} = () => ({});\\n`;\n\n\t\t\treturn (\n\t\t\t\t`${\n\t\t\t\t\thtmlField + dataField\n\t\t\t\t}\\t__absoluteDeferResolvePayload${index} = () => new Promise<any>((resolve) => {\\n` +\n\t\t\t\t`\\t\\tsetTimeout(() => resolve({ kind: 'angular-defer', state: 'resolved', html: this.__absoluteDeferHtml${index}(), data: this.__absoluteDeferData${index}() }), ${slot.delayMs});\\n` +\n\t\t\t\t`\\t});\\n`\n\t\t\t);\n\t\t})\n\t].join('\\n');\n\nconst injectDeferSlotFields = (\n\tsource: string,\n\tslots: LoweredAngularDeferSlot[],\n\timportSpecifier = '@absolutejs/absolute/angular'\n) => {\n\tif (slots.length === 0) return source;\n\tlet rewritten = ensureDeferSlotImport(source, importSpecifier);\n\trewritten = ensureComponentImportsHasDeferSlot(rewritten);\n\tconst fields = buildDeferSlotFields(slots);\n\n\treturn rewritten.replace(\n\t\t/export(?:\\s+default)?\\s+class\\s+([A-Za-z_$][\\w$]*)\\s*{/,\n\t\t(match) => `${match}\\n${fields}\\n`\n\t);\n};\n\nconst readAndEscapeFile = async (\n\tfilePath: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tif (!existsSync(filePath)) {\n\t\tthrow new Error(\n\t\t\t`Unable to inline Angular style resource: file not found at ${filePath}`\n\t\t);\n\t}\n\tconst content = await compileStyleFileIfNeeded(\n\t\tfilePath,\n\t\tstylePreprocessors\n\t);\n\n\treturn escapeTemplateContent(content);\n};\n\nconst inlineTemplateAndLowerDefer = async (source: string, fileDir: string) => {\n\tconst templateUrlMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/templateUrl\\s*:\\s*['\"]([^'\"]+)['\"]/\n\t);\n\tif (templateUrlMatch?.[1]) {\n\t\tconst templatePath = join(fileDir, templateUrlMatch[1]);\n\t\tif (!existsSync(templatePath)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unable to inline Angular templateUrl \"${templateUrlMatch[1]}\": file not found at ${templatePath}`\n\t\t\t);\n\t\t}\n\t\tconst templateRaw = await fs.readFile(templatePath, 'utf-8');\n\t\tconst lowered = lowerAngularDeferSyntax(templateRaw);\n\t\tconst escaped = escapeTemplateContent(lowered.template);\n\t\tconst replacedSource =\n\t\t\tsource.slice(0, templateUrlMatch.index) +\n\t\t\t`template: \\`${escaped}\\`` +\n\t\t\tsource.slice(templateUrlMatch.index + templateUrlMatch[0].length);\n\n\t\treturn {\n\t\t\tdeferSlots: lowered.slots,\n\t\t\tsource: injectDeferSlotFields(\n\t\t\t\treplacedSource,\n\t\t\t\tlowered.slots,\n\t\t\t\tresolveAngularDeferImportSpecifier()\n\t\t\t)\n\t\t};\n\t}\n\n\tconst inlineTemplateMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/template\\s*:\\s*(`([\\s\\S]*?)`|'([^']*)'|\"([^\"]*)\")/\n\t);\n\tif (!inlineTemplateMatch) {\n\t\treturn { deferSlots: [] as LoweredAngularDeferSlot[], source };\n\t}\n\tconst templateRaw =\n\t\tinlineTemplateMatch[2] ??\n\t\tinlineTemplateMatch[3] ??\n\t\tinlineTemplateMatch[4] ??\n\t\t'';\n\tconst lowered = lowerAngularDeferSyntax(templateRaw);\n\tif (lowered.slots.length === 0 && lowered.template === templateRaw) {\n\t\treturn { deferSlots: lowered.slots, source };\n\t}\n\tconst escaped = escapeTemplateContent(lowered.template);\n\tconst replacedSource =\n\t\tsource.slice(0, inlineTemplateMatch.index) +\n\t\t`template: \\`${escaped}\\`` +\n\t\tsource.slice(inlineTemplateMatch.index + inlineTemplateMatch[0].length);\n\n\treturn {\n\t\tdeferSlots: lowered.slots,\n\t\tsource: injectDeferSlotFields(\n\t\t\treplacedSource,\n\t\t\tlowered.slots,\n\t\t\tresolveAngularDeferImportSpecifier()\n\t\t)\n\t};\n};\n\nconst inlineTemplateAndLowerDeferSync = (source: string, fileDir: string) => {\n\tconst templateUrlMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/templateUrl\\s*:\\s*['\"]([^'\"]+)['\"]/\n\t);\n\tif (templateUrlMatch?.[1]) {\n\t\tconst templatePath = join(fileDir, templateUrlMatch[1]);\n\t\tif (!existsSync(templatePath)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unable to inline Angular templateUrl \"${templateUrlMatch[1]}\": file not found at ${templatePath}`\n\t\t\t);\n\t\t}\n\t\tconst templateRaw = readFileSync(templatePath, 'utf-8');\n\t\tconst lowered = lowerAngularDeferSyntax(templateRaw);\n\t\tconst escaped = escapeTemplateContent(lowered.template);\n\t\tconst replacedSource =\n\t\t\tsource.slice(0, templateUrlMatch.index) +\n\t\t\t`template: \\`${escaped}\\`` +\n\t\t\tsource.slice(templateUrlMatch.index + templateUrlMatch[0].length);\n\n\t\treturn {\n\t\t\tdeferSlots: lowered.slots,\n\t\t\tsource: injectDeferSlotFields(\n\t\t\t\treplacedSource,\n\t\t\t\tlowered.slots,\n\t\t\t\tresolveAngularDeferImportSpecifier()\n\t\t\t)\n\t\t};\n\t}\n\n\tconst inlineTemplateMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/template\\s*:\\s*(`([\\s\\S]*?)`|'([^']*)'|\"([^\"]*)\")/\n\t);\n\tif (!inlineTemplateMatch) {\n\t\treturn { deferSlots: [] as LoweredAngularDeferSlot[], source };\n\t}\n\tconst templateRaw =\n\t\tinlineTemplateMatch[2] ??\n\t\tinlineTemplateMatch[3] ??\n\t\tinlineTemplateMatch[4] ??\n\t\t'';\n\tconst lowered = lowerAngularDeferSyntax(templateRaw);\n\tif (lowered.slots.length === 0 && lowered.template === templateRaw) {\n\t\treturn { deferSlots: lowered.slots, source };\n\t}\n\tconst escaped = escapeTemplateContent(lowered.template);\n\tconst replacedSource =\n\t\tsource.slice(0, inlineTemplateMatch.index) +\n\t\t`template: \\`${escaped}\\`` +\n\t\tsource.slice(inlineTemplateMatch.index + inlineTemplateMatch[0].length);\n\n\treturn {\n\t\tdeferSlots: lowered.slots,\n\t\tsource: injectDeferSlotFields(\n\t\t\treplacedSource,\n\t\t\tlowered.slots,\n\t\t\tresolveAngularDeferImportSpecifier()\n\t\t)\n\t};\n};\n\nconst readAndEscapeFileSync = (\n\tfilePath: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tif (!existsSync(filePath)) {\n\t\tthrow new Error(\n\t\t\t`Unable to inline Angular style resource: file not found at ${filePath}`\n\t\t);\n\t}\n\tconst content = compileStyleFileIfNeededSync(filePath, stylePreprocessors);\n\n\treturn escapeTemplateContent(content);\n};\n\nconst inlineStyleUrlsSync = (\n\tsource: string,\n\tfileDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst styleUrlsMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/styleUrls\\s*:\\s*\\[([^\\]]+)\\]/\n\t);\n\tif (!styleUrlsMatch?.[1]) return source;\n\n\tconst urlMatches = styleUrlsMatch[1].match(/['\"]([^'\"]+)['\"]/g);\n\tif (!urlMatches) return source;\n\n\tconst inlinedStyles = urlMatches\n\t\t.map((urlMatch) => {\n\t\t\tconst styleUrl = urlMatch.replace(/['\"]/g, '');\n\n\t\t\treturn readAndEscapeFileSync(\n\t\t\t\tjoin(fileDir, styleUrl),\n\t\t\t\tstylePreprocessors\n\t\t\t);\n\t\t})\n\t\t.filter(Boolean)\n\t\t.map((escaped) => `\\`${escaped}\\``);\n\tif (inlinedStyles.length === 0) return source;\n\n\treturn (\n\t\tsource.slice(0, styleUrlsMatch.index) +\n\t\t`styles: [${inlinedStyles.join(', ')}]` +\n\t\tsource.slice(styleUrlsMatch.index + styleUrlsMatch[0].length)\n\t);\n};\n\nconst inlineSingleStyleUrlSync = (\n\tsource: string,\n\tfileDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst styleUrlMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/styleUrl\\s*:\\s*['\"]([^'\"]+)['\"]/\n\t);\n\tif (!styleUrlMatch?.[1]) return source;\n\n\tconst escaped = readAndEscapeFileSync(\n\t\tjoin(fileDir, styleUrlMatch[1]),\n\t\tstylePreprocessors\n\t);\n\tif (!escaped) return source;\n\n\treturn (\n\t\tsource.slice(0, styleUrlMatch.index) +\n\t\t`styles: [\\`${escaped}\\`]` +\n\t\tsource.slice(styleUrlMatch.index + styleUrlMatch[0].length)\n\t);\n};\n\nconst inlineResourcesSync = (\n\tsource: string,\n\tfileDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst inlinedTemplate = inlineTemplateAndLowerDeferSync(source, fileDir);\n\tlet result = inlinedTemplate.source;\n\tresult = inlineStyleUrlsSync(result, fileDir, stylePreprocessors);\n\tresult = inlineSingleStyleUrlSync(result, fileDir, stylePreprocessors);\n\n\treturn {\n\t\tdeferSlots: inlinedTemplate.deferSlots,\n\t\tsource: result\n\t};\n};\n\nconst inlineStyleUrls = async (\n\tsource: string,\n\tfileDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst styleUrlsMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/styleUrls\\s*:\\s*\\[([^\\]]+)\\]/\n\t);\n\tif (!styleUrlsMatch?.[1]) return source;\n\n\tconst urlMatches = styleUrlsMatch[1].match(/['\"]([^'\"]+)['\"]/g);\n\tif (!urlMatches) return source;\n\n\tconst stylePromises = urlMatches.map((urlMatch) => {\n\t\tconst styleUrl = urlMatch.replace(/['\"]/g, '');\n\n\t\treturn readAndEscapeFile(join(fileDir, styleUrl), stylePreprocessors);\n\t});\n\tconst results = await Promise.all(stylePromises);\n\tconst inlinedStyles = results\n\t\t.filter(Boolean)\n\t\t.map((escaped) => `\\`${escaped}\\``);\n\tif (inlinedStyles.length === 0) return source;\n\n\treturn (\n\t\tsource.slice(0, styleUrlsMatch.index) +\n\t\t`styles: [${inlinedStyles.join(', ')}]` +\n\t\tsource.slice(styleUrlsMatch.index + styleUrlsMatch[0].length)\n\t);\n};\n\nconst inlineSingleStyleUrl = async (\n\tsource: string,\n\tfileDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst styleUrlMatch = findUncommentedMatch(\n\t\tsource,\n\t\t/styleUrl\\s*:\\s*['\"]([^'\"]+)['\"]/\n\t);\n\tif (!styleUrlMatch?.[1]) return source;\n\n\tconst escaped = await readAndEscapeFile(\n\t\tjoin(fileDir, styleUrlMatch[1]),\n\t\tstylePreprocessors\n\t);\n\tif (!escaped) return source;\n\n\treturn (\n\t\tsource.slice(0, styleUrlMatch.index) +\n\t\t`styles: [\\`${escaped}\\`]` +\n\t\tsource.slice(styleUrlMatch.index + styleUrlMatch[0].length)\n\t);\n};\n\n/** Inline templateUrl and styleUrls/styleUrl from external files */\nconst inlineResources = async (\n\tsource: string,\n\tfileDir: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst inlinedTemplate = await inlineTemplateAndLowerDefer(source, fileDir);\n\tlet result = inlinedTemplate.source;\n\tresult = await inlineStyleUrls(result, fileDir, stylePreprocessors);\n\tresult = await inlineSingleStyleUrl(result, fileDir, stylePreprocessors);\n\n\treturn {\n\t\tdeferSlots: inlinedTemplate.deferSlots,\n\t\tsource: result\n\t};\n};\n\n/** Angular HMR Runtime Layer (Level 3) — JIT-mode compilation for dev/HMR builds.\n * Uses ts.transpileModule() instead of Angular AOT performCompilation().\n * Inlines templateUrl → template and styleUrls → styles from disk.\n * Recursively transpiles all local imports so Bun's bundler can resolve them.\n * ~50-100ms for a tree of ~10 files vs ~500-700ms for AOT. */\nexport const compileAngularFileJIT = async (\n\tinputPath: string,\n\toutDir: string,\n\trootDir?: string,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst entryPath = resolve(inputPath);\n\tconst allOutputs: string[] = [];\n\tconst visited = new Set<string>();\n\tconst baseDir = resolve(rootDir ?? process.cwd());\n\tlet usesLegacyAnimations = false;\n\n\tconst angularTranspiler = new Bun.Transpiler({\n\t\tloader: 'ts',\n\t\ttsconfig: JSON.stringify({\n\t\t\tcompilerOptions: {\n\t\t\t\temitDecoratorMetadata: true,\n\t\t\t\texperimentalDecorators: true\n\t\t\t}\n\t\t})\n\t});\n\tconst tsconfigAliases = readTsconfigPathAliases();\n\n\tconst resolveSourceFile = (candidate: string) => {\n\t\tconst candidates = candidate.match(/\\.[cm]?[tj]sx?$/)\n\t\t\t? [candidate]\n\t\t\t: [\n\t\t\t\t\t`${candidate}.ts`,\n\t\t\t\t\t`${candidate}.tsx`,\n\t\t\t\t\t`${candidate}.js`,\n\t\t\t\t\t`${candidate}.jsx`,\n\t\t\t\t\tjoin(candidate, 'index.ts'),\n\t\t\t\t\tjoin(candidate, 'index.tsx'),\n\t\t\t\t\tjoin(candidate, 'index.js'),\n\t\t\t\t\tjoin(candidate, 'index.jsx')\n\t\t\t\t];\n\n\t\treturn candidates.find((file) => existsSync(file));\n\t};\n\n\tconst resolveLocalImport = (specifier: string, fromDir: string) => {\n\t\tif (specifier.startsWith('.') || specifier.startsWith('/')) {\n\t\t\treturn resolveSourceFile(resolve(fromDir, specifier));\n\t\t}\n\n\t\tconst aliased = matchTsconfigAlias(\n\t\t\tspecifier,\n\t\t\ttsconfigAliases.aliases,\n\t\t\ttsconfigAliases.baseUrl,\n\t\t\tresolveSourceFile\n\t\t);\n\t\tif (aliased) return aliased;\n\n\t\ttry {\n\t\t\tconst resolved = Bun.resolveSync(specifier, fromDir);\n\t\t\tif (resolved.includes('/node_modules/')) return undefined;\n\t\t\tconst absolute = resolve(resolved);\n\t\t\tif (!absolute.startsWith(baseDir)) return undefined;\n\n\t\t\treturn resolveSourceFile(absolute);\n\t\t} catch {\n\t\t\treturn undefined;\n\t\t}\n\t};\n\n\tconst toOutputPath = (sourcePath: string) => {\n\t\tconst inputDir = dirname(sourcePath);\n\t\tconst relativeDir = inputDir.startsWith(baseDir)\n\t\t\t? inputDir.substring(baseDir.length + 1)\n\t\t\t: inputDir;\n\t\tconst fileBase = basename(sourcePath).replace(/\\.[cm]?[tj]sx?$/, '.js');\n\n\t\treturn join(outDir, relativeDir, fileBase);\n\t};\n\n\tconst transpileAndRewrite = (\n\t\tsourceCode: string,\n\t\trelativeDir: string,\n\t\tactualPath: string,\n\t\timportRewrites: Map<string, string>\n\t) => {\n\t\tlet processedContent = angularTranspiler.transformSync(sourceCode);\n\t\tconst outputPath = toOutputPath(actualPath);\n\t\tconst rewriteBareImport = (\n\t\t\tprefix: string,\n\t\t\tspecifier: string,\n\t\t\tsuffix: string\n\t\t) => {\n\t\t\tconst rewritten = importRewrites.get(specifier);\n\t\t\tif (rewritten) {\n\t\t\t\treturn `${prefix}${rewritten}${suffix}`;\n\t\t\t}\n\t\t\tif (specifier.startsWith('.') || specifier.startsWith('/')) {\n\t\t\t\treturn `${prefix}${specifier}${suffix}`;\n\t\t\t}\n\n\t\t\treturn `${prefix}${specifier}${suffix}`;\n\t\t};\n\n\t\tprocessedContent = processedContent.replace(\n\t\t\t/(from\\s+['\"])([^'\"]+)(['\"])/g,\n\t\t\t(_, prefix, specifier, suffix) =>\n\t\t\t\trewriteBareImport(prefix, specifier, suffix)\n\t\t);\n\t\tprocessedContent = processedContent.replace(\n\t\t\t/(import\\s+['\"])([^'\"]+)(['\"])/g,\n\t\t\t(_, prefix, specifier, suffix) =>\n\t\t\t\trewriteBareImport(prefix, specifier, suffix)\n\t\t);\n\t\tprocessedContent = processedContent.replace(\n\t\t\t/(import\\(\\s*['\"])([^'\"]+)(['\"]\\s*\\))/g,\n\t\t\t(_, prefix, specifier, suffix) =>\n\t\t\t\trewriteBareImport(prefix, specifier, suffix)\n\t\t);\n\n\t\tprocessedContent = processedContent.replace(\n\t\t\t/from\\s+(['\"])(\\.\\.?\\/[^'\"]+)(\\1)/g,\n\t\t\t(match, quote, path) => {\n\t\t\t\tconst rewritten = rewriteRelativeJsSpecifier(outputPath, path);\n\t\t\t\tif (rewritten !== path) {\n\t\t\t\t\treturn `from ${quote}${rewritten}${quote}`;\n\t\t\t\t}\n\n\t\t\t\treturn match;\n\t\t\t}\n\t\t);\n\n\t\tconst relDepth =\n\t\t\trelativeDir === '' || relativeDir === '.'\n\t\t\t\t? 0\n\t\t\t\t: relativeDir.split('/').length;\n\t\tprocessedContent = processedContent.replace(\n\t\t\t/(from\\s+['\"])(\\.\\.\\/(?:\\.\\.\\/)*)/g,\n\t\t\t(_, prefix, dots) => {\n\t\t\t\tconst upCount = dots.split('/').length - 1;\n\t\t\t\tif (upCount <= relDepth) return `${prefix}${dots}`;\n\n\t\t\t\treturn `${prefix}../${dots}`;\n\t\t\t}\n\t\t);\n\t\tif (resolve(actualPath) === entryPath) {\n\t\t\tprocessedContent += buildIslandMetadataExports(sourceCode);\n\t\t}\n\n\t\treturn processedContent;\n\t};\n\n\t/** Transpile a single .ts file and recursively process its local imports */\n\tconst transpileFile = async (filePath: string) => {\n\t\tconst resolved = resolve(filePath);\n\t\tif (visited.has(resolved)) return;\n\t\tvisited.add(resolved);\n\n\t\t// Only transpile .ts files that exist\n\t\tlet actualPath = resolved;\n\t\tif (!actualPath.endsWith('.ts')) actualPath += '.ts';\n\t\tif (!existsSync(actualPath)) return;\n\n\t\tlet sourceCode = await fs.readFile(actualPath, 'utf-8');\n\n\t\t// Angular HMR Runtime Layer (Level 3) — Inline templateUrl and styleUrls\n\t\t// This resolves external resources at transpile time so Angular JIT\n\t\t// doesn't try to fetch them via HTTP (which fails on the server)\n\t\tconst inlined = await inlineResources(\n\t\t\tsourceCode,\n\t\t\tdirname(actualPath),\n\t\t\tstylePreprocessors\n\t\t);\n\t\tsourceCode = inlineTemplateAndLowerDeferSync(\n\t\t\tinlined.source,\n\t\t\tdirname(actualPath)\n\t\t).source;\n\n\t\t// Compute output path preserving directory structure\n\t\tconst inputDir = dirname(actualPath);\n\t\tconst relativeDir = inputDir.startsWith(baseDir)\n\t\t\t? inputDir.substring(baseDir.length + 1)\n\t\t\t: inputDir;\n\t\tconst fileBase = basename(actualPath).replace(/\\.[cm]?[tj]sx?$/, '.js');\n\t\tconst targetDir = join(outDir, relativeDir);\n\t\tconst targetPath = toOutputPath(actualPath);\n\n\t\t// Find all relative imports to process recursively (needed\n\t\t// even when skipping transpilation for cache-hit files).\n\t\t// Catches: import/export ... from './x', export * from './x',\n\t\t// import './x' (side-effect), and dynamic import('./x').\n\t\tconst localImports: string[] = [];\n\t\tconst importRewrites = new Map<string, string>();\n\t\tconst fromRegex =\n\t\t\t/(?:from|import)\\s+['\"]([^'\".][^'\"]*|\\.\\.?\\/[^'\"]+)['\"]/g;\n\t\tconst dynamicImportRegex =\n\t\t\t/import\\(\\s*['\"]([^'\".][^'\"]*|\\.\\.?\\/[^'\"]+)['\"]\\s*\\)/g;\n\t\tlet importMatch;\n\t\twhile ((importMatch = fromRegex.exec(sourceCode)) !== null) {\n\t\t\tif (importMatch[1]) localImports.push(importMatch[1]);\n\t\t}\n\t\twhile ((importMatch = dynamicImportRegex.exec(sourceCode)) !== null) {\n\t\t\tif (importMatch[1]) localImports.push(importMatch[1]);\n\t\t}\n\t\tif (localImports.includes('@angular/animations')) {\n\t\t\tusesLegacyAnimations = true;\n\t\t}\n\t\tconst localImportPaths = localImports\n\t\t\t.map((specifier) => {\n\t\t\t\tconst resolved = resolveLocalImport(specifier, inputDir);\n\t\t\t\tif (!resolved) return null;\n\t\t\t\tconst relativeImport = relative(\n\t\t\t\t\ttargetDir,\n\t\t\t\t\ttoOutputPath(resolved)\n\t\t\t\t)\n\t\t\t\t\t.replace(/\\\\/g, '/')\n\t\t\t\t\t.replace(/\\.js$/, '');\n\t\t\t\timportRewrites.set(\n\t\t\t\t\tspecifier,\n\t\t\t\t\trelativeImport.startsWith('.')\n\t\t\t\t\t\t? relativeImport\n\t\t\t\t\t\t: `./${relativeImport}`\n\t\t\t\t);\n\n\t\t\t\treturn resolved;\n\t\t\t})\n\t\t\t.filter((path): path is string => Boolean(path));\n\n\t\t// Skip transpilation if source content hasn't changed — the\n\t\t// compiled output on disk is already up-to-date. This avoids\n\t\t// unnecessary disk writes that trigger bun --hot re-evaluation\n\t\t// and cause progressively slower compile times.\n\t\tconst contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);\n\t\tconst cacheKey = actualPath;\n\t\tif (\n\t\t\tjitContentCache.get(cacheKey) === contentHash &&\n\t\t\texistsSync(targetPath)\n\t\t) {\n\t\t\tallOutputs.push(targetPath);\n\t\t} else {\n\t\t\tconst processedContent = transpileAndRewrite(\n\t\t\t\tsourceCode,\n\t\t\t\trelativeDir,\n\t\t\t\tactualPath,\n\t\t\t\timportRewrites\n\t\t\t);\n\n\t\t\tawait fs.mkdir(targetDir, { recursive: true });\n\t\t\tawait fs.writeFile(targetPath, processedContent, 'utf-8');\n\t\t\tallOutputs.push(targetPath);\n\t\t\tjitContentCache.set(cacheKey, contentHash);\n\t\t}\n\n\t\t// Recursively transpile local imports\n\t\tawait Promise.all(\n\t\t\tlocalImportPaths.map((importPath) => transpileFile(importPath))\n\t\t);\n\t};\n\n\tawait transpileFile(inputPath);\n\n\tconst entryOutputPath = toOutputPath(entryPath);\n\tif (existsSync(entryOutputPath)) {\n\t\tconst entryOutput = await fs.readFile(entryOutputPath, 'utf-8');\n\t\tconst withoutLegacyFlag = entryOutput.replace(\n\t\t\t/\\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\\n?/g,\n\t\t\t'\\n'\n\t\t);\n\t\tconst nextEntryOutput = usesLegacyAnimations\n\t\t\t? `${withoutLegacyFlag}\\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\\n`\n\t\t\t: withoutLegacyFlag;\n\t\tif (nextEntryOutput !== entryOutput) {\n\t\t\tawait fs.writeFile(entryOutputPath, nextEntryOutput, 'utf-8');\n\t\t}\n\t}\n\n\treturn allOutputs;\n};\n\nexport const compileAngular = async (\n\tentryPoints: string[],\n\toutRoot: string,\n\thmr = false,\n\tstylePreprocessors?: StylePreprocessorConfig\n) => {\n\tconst compiledParent = join(outRoot, 'generated');\n\n\tif (entryPoints.length === 0) {\n\t\tconst emptyPaths: string[] = [];\n\n\t\treturn { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };\n\t}\n\n\t// Compile to .absolutejs/generated/angular/. Server files are bundled by\n\t// Bun's server pass (same as Svelte/Vue) and cleanup() removes generated/\n\t// after bundling. In dev/HMR, a fixed path avoids duplicate Angular\n\t// module instances (different file paths → different ESM cache entries),\n\t// preventing NG0201/NG0203 token identity mismatches.\n\tconst compiledRoot = compiledParent;\n\tconst indexesDir = join(compiledParent, 'indexes');\n\n\tawait traceAngularPhase('setup/create-indexes-dir', () =>\n\t\tfs.mkdir(indexesDir, { recursive: true })\n\t);\n\n\tconst aotOutputs = hmr\n\t\t? []\n\t\t: await traceAngularPhase(\n\t\t\t\t'aot/compile-files',\n\t\t\t\t() =>\n\t\t\t\t\tcompileAngularFiles(\n\t\t\t\t\t\tentryPoints.map((entry) => resolve(entry)),\n\t\t\t\t\t\tcompiledRoot,\n\t\t\t\t\t\tstylePreprocessors\n\t\t\t\t\t),\n\t\t\t\t{ entries: entryPoints.length }\n\t\t\t);\n\tconst usesLegacyAngularAnimations = await traceAngularPhase(\n\t\t'setup/legacy-animation-resolver',\n\t\t() => createLegacyAngularAnimationUsageResolver(outRoot)\n\t);\n\n\tconst compileTasks = entryPoints.map(async (entry) => {\n\t\tconst resolvedEntry = resolve(entry);\n\t\tconst relativeEntry = relative(outRoot, resolvedEntry).replace(\n\t\t\t/\\.[tj]s$/,\n\t\t\t'.js'\n\t\t);\n\t\tconst compileEntry = () =>\n\t\t\tcompileAngularFileJIT(\n\t\t\t\tresolvedEntry,\n\t\t\t\tcompiledRoot,\n\t\t\t\toutRoot,\n\t\t\t\tstylePreprocessors\n\t\t\t);\n\n\t\t// Angular HMR Runtime Layer (Level 3) — Use JIT compilation for dev/HMR builds.\n\t\t// JIT uses ts.transpileModule() with template/style inlining (~50-100ms)\n\t\t// instead of AOT performCompilation() (~500-700ms).\n\t\tlet outputs = hmr\n\t\t\t? await traceAngularPhase('jit/compile-entry', compileEntry, {\n\t\t\t\t\tentry: resolvedEntry\n\t\t\t\t})\n\t\t\t: aotOutputs;\n\t\tconst fileBase = basename(resolvedEntry).replace(/\\.[tj]s$/, '');\n\t\tconst jsName = `${fileBase}.js`;\n\t\tconst compiledFallbackPaths = [\n\t\t\tjoin(compiledRoot, relativeEntry),\n\t\t\tjoin(compiledRoot, 'pages', jsName),\n\t\t\tjoin(compiledRoot, jsName)\n\t\t].map((file) => resolve(file));\n\t\tconst resolveRawServerFile = (candidatePaths: string[]) => {\n\t\t\tconst normalizedCandidates = [\n\t\t\t\t...candidatePaths.map((file) => resolve(file)),\n\t\t\t\t...compiledFallbackPaths\n\t\t\t];\n\t\t\tlet candidate = normalizedCandidates.find(\n\t\t\t\t(file) =>\n\t\t\t\t\texistsSync(file) &&\n\t\t\t\t\tfile.endsWith(`${sep}pages${sep}${jsName}`)\n\t\t\t);\n\t\t\tif (!candidate) {\n\t\t\t\tcandidate = normalizedCandidates.find(\n\t\t\t\t\t(file) =>\n\t\t\t\t\t\texistsSync(file) && file.endsWith(`${sep}${jsName}`)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!candidate) {\n\t\t\t\tcandidate = normalizedCandidates.find((file) =>\n\t\t\t\t\texistsSync(file)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn candidate;\n\t\t};\n\n\t\tlet rawServerFile = await traceAngularPhase(\n\t\t\t'wrapper/resolve-server-output',\n\t\t\t() => resolveRawServerFile(outputs),\n\t\t\t{ entry: resolvedEntry }\n\t\t);\n\t\tif (!rawServerFile) {\n\t\t\trawServerFile = await traceAngularPhase(\n\t\t\t\t'wrapper/resolve-server-output-fallback',\n\t\t\t\t() => resolveRawServerFile([]),\n\t\t\t\t{ entry: resolvedEntry }\n\t\t\t);\n\t\t}\n\t\tif (rawServerFile && !existsSync(rawServerFile)) {\n\t\t\toutputs = hmr ? await compileEntry() : aotOutputs;\n\t\t\trawServerFile = await traceAngularPhase(\n\t\t\t\t'wrapper/resolve-server-output-retry',\n\t\t\t\t() => resolveRawServerFile(outputs),\n\t\t\t\t{ entry: resolvedEntry }\n\t\t\t);\n\t\t}\n\n\t\tif (!rawServerFile || !existsSync(rawServerFile)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[\n\t\t\t\t\t...outputs,\n\t\t\t\t\t...compiledFallbackPaths\n\t\t\t\t].join(', ')}`\n\t\t\t);\n\t\t}\n\n\t\tconst original = await traceAngularPhase(\n\t\t\t'wrapper/read-server-output',\n\t\t\t() => fs.readFile(rawServerFile, 'utf-8'),\n\t\t\t{ entry: resolvedEntry }\n\t\t);\n\n\t\t// Detect the actual exported class so the generated `export default`\n\t\t// (and the client-bundle wrappers below) reference a real symbol.\n\t\t// Without this, files whose class name doesn't follow the\n\t\t// `<Pascal(filename)>Component` convention (e.g. resources.ts\n\t\t// exporting `ContentComponent`, admin-debug.ts exporting\n\t\t// `AdminLogsComponent`) get a dangling `export default\n\t\t// ResourcesComponent` appended, which throws\n\t\t// `ReferenceError: <X> is not defined` at module-evaluation time.\n\t\t//\n\t\t// In Bun ≤1.3.13 this fails only on the first request — sequential\n\t\t// `import()` after an evaluation throw silently returns a\n\t\t// partially-initialized module instead of re-throwing. Fixed on\n\t\t// Bun main in PR oven-sh/bun#29393, awaiting 1.3.14. Tracked as\n\t\t// oven-sh/bun#29791; see UPSTREAM_ISSUES.md.\n\t\tconst detectExportedComponentClass = (\n\t\t\tsource: string,\n\t\t\tfallback: string\n\t\t): string => {\n\t\t\tconst defaultMatch = source.match(\n\t\t\t\t/export\\s+default\\s+([A-Za-z_$][\\w$]*)\\s*;/\n\t\t\t);\n\t\t\tif (defaultMatch) return defaultMatch[1]!;\n\t\t\tconst exportClassMatch = source.match(\n\t\t\t\t/export\\s+(?:default\\s+)?class\\s+([A-Za-z_$][\\w$]*)/\n\t\t\t);\n\t\t\tif (exportClassMatch) return exportClassMatch[1]!;\n\t\t\treturn fallback;\n\t\t};\n\t\tconst componentClassName = await traceAngularPhase(\n\t\t\t'wrapper/detect-component-class',\n\t\t\t() =>\n\t\t\t\tdetectExportedComponentClass(\n\t\t\t\t\toriginal,\n\t\t\t\t\t`${toPascal(fileBase)}Component`\n\t\t\t\t),\n\t\t\t{ entry: resolvedEntry }\n\t\t);\n\t\tconst usesLegacyAnimations = await traceAngularPhase(\n\t\t\t'wrapper/detect-legacy-animations',\n\t\t\t() => usesLegacyAngularAnimations(resolvedEntry),\n\t\t\t{ entry: resolvedEntry }\n\t\t);\n\n\t\t// Angular HMR Optimization — Hash the compiled server file content.\n\t\t// If it hasn't changed since last HMR cycle, skip all the rewriting,\n\t\t// HMR registration injection, SSR deps writing, and index regeneration.\n\t\t// This eliminates ~100-500ms of wrapper overhead on cache hits.\n\t\tconst serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);\n\t\tconst cachedWrapper = wrapperOutputCache.get(resolvedEntry);\n\t\tconst clientFile = join(indexesDir, jsName);\n\t\tif (\n\t\t\thmr &&\n\t\t\tcachedWrapper &&\n\t\t\tcachedWrapper.serverHash === serverContentHash &&\n\t\t\texistsSync(clientFile) &&\n\t\t\t(usesLegacyAnimations ||\n\t\t\t\t!original.includes(\n\t\t\t\t\t'__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__'\n\t\t\t\t)) &&\n\t\t\t(!usesLegacyAnimations ||\n\t\t\t\toriginal.includes('__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__'))\n\t\t) {\n\t\t\treturn {\n\t\t\t\tclientPath: clientFile,\n\t\t\t\tindexUnchanged: true,\n\t\t\t\tserverPath: rawServerFile\n\t\t\t};\n\t\t}\n\n\t\t// Ensure the JIT compiler side effect runs before any Angular package\n\t\t// imports in generated page modules. Consumer pages usually import\n\t\t// @angular/common first, which otherwise trips partial-compile JIT mode.\n\t\tlet rewritten = original;\n\t\trewritten = rewritten.replace(\n\t\t\t/\\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\\n?/g,\n\t\t\t'\\n'\n\t\t);\n\t\tif (!rewritten.includes(`import '@angular/compiler';`)) {\n\t\t\trewritten = `import '@angular/compiler';\\n${rewritten}`;\n\t\t}\n\n\t\t// Replace templateUrl if it exists\n\t\trewritten = rewritten.replace(\n\t\t\tnew RegExp(`templateUrl:\\\\s*['\"]\\\\.\\\\/${fileBase}\\\\.html['\"]`),\n\t\t\t`templateUrl: '../../pages/${fileBase}.html'`\n\t\t);\n\n\t\t// Only add default export if one doesn't already exist\n\t\tif (!rewritten.includes('export default')) {\n\t\t\trewritten += `\\nexport default ${componentClassName};\\n`;\n\t\t}\n\t\tif (usesLegacyAnimations) {\n\t\t\trewritten +=\n\t\t\t\t'\\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\\n';\n\t\t}\n\n\t\t// Angular HMR Runtime Layer (Level 3) — Inject HMR registration in dev mode.\n\t\t// Identity-safe SSR is provided by the angular vendor pipeline:\n\t\t// every @angular/* import (in this file, in handleAngularPageRequest\n\t\t// → getAngularDeps, in the bundled server pages) is rewritten to the\n\t\t// same vendor file path, so Node's ESM cache hands back one module\n\t\t// instance per package across the whole runtime.\n\t\tif (hmr) {\n\t\t\trewritten = injectHMRRegistration(rewritten, resolvedEntry);\n\t\t}\n\n\t\tawait traceAngularPhase(\n\t\t\t'wrapper/write-server-output',\n\t\t\t() => fs.writeFile(rawServerFile, rewritten, 'utf-8'),\n\t\t\t{ entry: resolvedEntry }\n\t\t);\n\n\t\t// Calculate relative path from indexes directory to the server file\n\t\t// This handles deeply nested paths that Angular compiler may create\n\t\tconst relativePath = relative(indexesDir, rawServerFile).replace(\n\t\t\t/\\\\/g,\n\t\t\t'/'\n\t\t);\n\t\t// Ensure it starts with ./ or ../ for relative imports\n\t\tconst normalizedImportPath = relativePath.startsWith('.')\n\t\t\t? relativePath\n\t\t\t: `./${relativePath}`;\n\n\t\t// Angular HMR Runtime Layer (Level 3) — Import runtime before HMR client\n\t\tconst hmrPreamble = hmr\n\t\t\t? `window.__HMR_FRAMEWORK__ = \"angular\";\\nimport \"${hmrRuntimePath}\";\\nimport \"${hmrClientPath}\";\\n`\n\t\t\t: '';\n\t\tconst hydration = hmr\n\t\t\t? `${hmrPreamble}\nimport '@angular/compiler';\nimport { bootstrapApplication } from '@angular/platform-browser';\nimport { provideClientHydration } from '@angular/platform-browser';\nimport { withHttpTransferCacheOptions } from '@angular/platform-browser';\nimport { provideZonelessChangeDetection } from '@angular/core';\nimport * as pageModule from '${normalizedImportPath}';\n\nvar ${componentClassName} = pageModule.default;\nvar toScreamingSnake = function(str) {\n return str.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase();\n};\nvar isInjectionToken = function(value) {\n return Boolean(value) && typeof value === 'object' && value.ngMetadataName === 'InjectionToken';\n};\nvar pageProps = window.__ABS_ANGULAR_PAGE_PROPS__ || {};\nvar pageHasIslands = Boolean(pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__) || Boolean(document.querySelector('[data-island=\"true\"]'));\nvar pageHasRawStreamingSlots = Boolean(document.querySelector('[data-absolute-raw-slot=\"true\"]'));\nvar pageHasStreamingSlots = Boolean(document.querySelector('[data-absolute-slot=\"true\"]'));\nvar propProviders = Object.entries(pageProps).map(function(entry) {\n var propName = entry[0];\n var propValue = entry[1];\n var token = pageModule[toScreamingSnake(propName)];\n return isInjectionToken(token) ? { provide: token, useValue: propValue } : null;\n}).filter(Boolean);\n// Page-level providers, opt-in via \\`export const providers = [...]\\` in the\n// page module. Required so DI tokens that the component (or any service it\n// injects) needs are available client-side too — without these, services\n// that worked in SSR fail with NG0201 after hydration.\nvar maybePageProviders = Reflect.get(pageModule, 'providers');\nvar pageProviders = Array.isArray(maybePageProviders) ? maybePageProviders : [];\nvar absoluteHttpTransferCacheOptions = {\n includePostRequests: false,\n includeRequestsWithAuthHeaders: false,\n filter: function(request) {\n return !request.headers.has('x-skip-transfer-cache');\n }\n};\n\n// Re-export the page module so HMR fast-patch (in handlers/angular.ts) can\n// dynamically import this chunk and discover the freshly-built component\n// classes without needing a separate build artifact.\nexport * from '${normalizedImportPath}';\n\n// Record this evaluation's \\`routes\\` and \\`providers\\` exports for the\n// HMR fast-patch to compare against on the next reload. If they change\n// (a new route was added, a provider was edited), fast-patch falls back\n// to a full re-bootstrap because those values are consumed once at\n// bootstrap and won't propagate to the running router/injector via an\n// in-place component patch.\nif (typeof window !== 'undefined' && window.__ANGULAR_HMR__ && typeof window.__ANGULAR_HMR__.recordPageExports === 'function') {\n var __abs_hmr_routes = Reflect.get(pageModule, 'routes');\n window.__ANGULAR_HMR__.recordPageExports('${resolvedEntry}', __abs_hmr_routes, maybePageProviders);\n}\n\n// Re-Bootstrap HMR with View Transitions API.\n// Skipped during fast-patch: the HMR client sets\n// window.__ANGULAR_HMR_FAST_PATCH__ = true before \\`import()\\`-ing this\n// chunk so it can read the new component classes via \\`export *\\` above\n// without destroying the running app.\nif (!window.__ANGULAR_HMR_FAST_PATCH__) {\n if (window.__ANGULAR_APP__) {\n try { window.__ANGULAR_APP__.destroy(); } catch (_err) { /* ignore */ }\n window.__ANGULAR_APP__ = null;\n }\n\n // Ensure root element exists after destroy (Angular removes it)\n var _sel = ${componentClassName}.ɵcmp?.selectors?.[0]?.[0] || 'ng-app';\n if (!document.querySelector(_sel)) {\n (document.getElementById('root') || document.body).appendChild(document.createElement(_sel));\n }\n\n var providers = [provideZonelessChangeDetection()];\n if (!window.__HMR_SKIP_HYDRATION__ && !pageHasIslands) {\n providers.push(provideClientHydration(withHttpTransferCacheOptions(absoluteHttpTransferCacheOptions)));\n }\n delete window.__HMR_SKIP_HYDRATION__;\n providers.push.apply(providers, pageProviders);\n providers.push.apply(providers, propProviders);\n window.__ABS_SLOT_HYDRATION_PENDING__ = pageHasRawStreamingSlots;\n\n if (pageHasRawStreamingSlots) {\n window.__ABS_SLOT_HYDRATION_PENDING__ = false;\n if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {\n requestAnimationFrame(function() {\n window.__ABS_SLOT_FLUSH__();\n });\n }\n } else {\n bootstrapApplication(${componentClassName}, {\n providers: providers\n }).then(function (appRef) {\n window.__ANGULAR_APP__ = appRef;\n window.__ABS_SLOT_HYDRATION_PENDING__ = false;\n if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {\n requestAnimationFrame(function() {\n window.__ABS_SLOT_FLUSH__();\n });\n }\n });\n }\n}\n`.trim()\n\t\t\t: `\nimport '@angular/compiler';\nimport { bootstrapApplication } from '@angular/platform-browser';\nimport { provideClientHydration } from '@angular/platform-browser';\nimport { withHttpTransferCacheOptions } from '@angular/platform-browser';\nimport { enableProdMode, provideZonelessChangeDetection } from '@angular/core';\nimport * as pageModule from '${normalizedImportPath}';\n\nvar ${componentClassName} = pageModule.default;\nvar toScreamingSnake = function(str) {\n return str.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase();\n};\nvar isInjectionToken = function(value) {\n return Boolean(value) && typeof value === 'object' && value.ngMetadataName === 'InjectionToken';\n};\nvar pageProps = window.__ABS_ANGULAR_PAGE_PROPS__ || {};\nvar pageHasIslands = Boolean(pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__) || Boolean(document.querySelector('[data-island=\"true\"]'));\nvar pageHasRawStreamingSlots = Boolean(document.querySelector('[data-absolute-raw-slot=\"true\"]'));\nvar pageHasStreamingSlots = Boolean(document.querySelector('[data-absolute-slot=\"true\"]'));\nvar propProviders = Object.entries(pageProps).map(function(entry) {\n var propName = entry[0];\n var propValue = entry[1];\n var token = pageModule[toScreamingSnake(propName)];\n return isInjectionToken(token) ? { provide: token, useValue: propValue } : null;\n}).filter(Boolean);\n// Page-level providers, opt-in via \\`export const providers = [...]\\` in the\n// page module. Required so DI tokens that the component (or any service it\n// injects) needs are available client-side too — without these, services\n// that worked in SSR fail with NG0201 after hydration.\nvar maybePageProviders = Reflect.get(pageModule, 'providers');\nvar pageProviders = Array.isArray(maybePageProviders) ? maybePageProviders : [];\nvar absoluteHttpTransferCacheOptions = {\n includePostRequests: false,\n includeRequestsWithAuthHeaders: false,\n filter: function(request) {\n return !request.headers.has('x-skip-transfer-cache');\n }\n};\n\nenableProdMode();\n\nvar providers = [provideZonelessChangeDetection()].concat(pageProviders).concat(propProviders);\nif (!pageHasIslands) {\n providers.unshift(provideClientHydration(withHttpTransferCacheOptions(absoluteHttpTransferCacheOptions)));\n}\nwindow.__ABS_SLOT_HYDRATION_PENDING__ = pageHasRawStreamingSlots;\n\nif (pageHasRawStreamingSlots) {\n window.__ABS_SLOT_HYDRATION_PENDING__ = false;\n if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {\n requestAnimationFrame(function() {\n window.__ABS_SLOT_FLUSH__();\n });\n }\n} else {\n bootstrapApplication(${componentClassName}, {\n providers: providers\n }).then(function (appRef) {\n window.__ANGULAR_APP__ = appRef;\n window.__ABS_SLOT_HYDRATION_PENDING__ = false;\n if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {\n requestAnimationFrame(function() {\n window.__ABS_SLOT_FLUSH__();\n });\n }\n });\n}\n`.trim();\n\n\t\t// Angular HMR Optimization — Hash index content to detect if bundling\n\t\t// can be skipped (index content is deterministic for a given import path).\n\t\tconst indexHash = Bun.hash(hydration).toString(BASE_36_RADIX);\n\t\tconst indexUnchanged = cachedWrapper?.indexHash === indexHash;\n\n\t\tawait traceAngularPhase(\n\t\t\t'wrapper/write-client-index',\n\t\t\t() => fs.writeFile(clientFile, hydration, 'utf-8'),\n\t\t\t{ entry: resolvedEntry }\n\t\t);\n\n\t\t// Update wrapper cache\n\t\twrapperOutputCache.set(resolvedEntry, {\n\t\t\tindexHash,\n\t\t\tserverHash: serverContentHash\n\t\t});\n\n\t\treturn {\n\t\t\tclientPath: clientFile,\n\t\t\tindexUnchanged,\n\t\t\tserverPath: rawServerFile\n\t\t};\n\t});\n\n\tconst results = await traceAngularPhase(\n\t\t'wrapper/process-entries',\n\t\t() => Promise.all(compileTasks),\n\t\t{ entries: entryPoints.length }\n\t);\n\tconst { clientPaths, serverPaths } = await traceAngularPhase(\n\t\t'wrapper/collect-paths',\n\t\t() => ({\n\t\t\tclientPaths: results.map((r) => r.clientPath),\n\t\t\tserverPaths: results.map((r) => r.serverPath)\n\t\t}),\n\t\t{ entries: results.length }\n\t);\n\n\treturn {\n\t\t// Angular HMR Optimization — Signal to rebuildTrigger that bundling\n\t\t// can be skipped when all index files are unchanged.\n\t\tallIndexesUnchanged: hmr && results.every((r) => r.indexUnchanged),\n\t\tclientPaths,\n\t\tserverPaths\n\t};\n};\n",
|
|
6
|
-
"import { BASE_36_RADIX, MILLISECONDS_IN_A_SECOND } from '../constants';\n\nexport type LoweredAngularDeferSlot = {\n\tdelayMs: number;\n\terrorHtml: string | null;\n\tfallbackHtml: string;\n\tid: string;\n\tresolvedBindings: Array<{\n\t\texpression: string;\n\t\tkey: string;\n\t}>;\n\tresolvedHtml: string;\n\tresolvedTemplate: string;\n};\n\nexport type LoweredAngularDeferResult = {\n\tslots: LoweredAngularDeferSlot[];\n\ttemplate: string;\n\ttransformed: boolean;\n};\n\nconst isInterpolatedExpressionStart = (value: string, index: number) =>\n\tvalue[index] === '{' && value[index + 1] === '{';\n\nconst skipInterpolatedExpression = (value: string, start: number) => {\n\tconst cursor = start + 2;\n\twhile (cursor < value.length - 1) {\n\t\tconst end = value.indexOf('}}', cursor);\n\t\tif (end < 0) {\n\t\t\treturn value.length;\n\t\t}\n\n\t\treturn end + 2;\n\t}\n\n\treturn value.length;\n};\n\nconst updateBlockDepth = (char: string, depth: number) => {\n\tif (char === '{') {\n\t\treturn depth + 1;\n\t}\n\n\tif (char === '}') {\n\t\treturn depth - 1;\n\t}\n\n\treturn depth;\n};\n\nconst updateParenthesisDepth = (char: string, depth: number) => {\n\tif (char === '(') {\n\t\treturn depth + 1;\n\t}\n\n\tif (char === ')') {\n\t\treturn depth - 1;\n\t}\n\n\treturn depth;\n};\n\nconst appendResolvedChunk = (\n\tvalue: string,\n\ttemplate: string,\n\tcursor: number,\n\tinterpolationStart: number\n) => {\n\tconst nextTemplate = template + value.slice(cursor, interpolationStart);\n\tconst nextCursor = skipInterpolatedExpression(value, interpolationStart);\n\tif (nextCursor > value.length) {\n\t\treturn {\n\t\t\tbindings: undefined,\n\t\t\tcursor: value.length,\n\t\t\tdone: true,\n\t\t\ttemplate: nextTemplate + value.slice(interpolationStart)\n\t\t};\n\t}\n\n\tconst expression = value\n\t\t.slice(interpolationStart + 2, nextCursor - 2)\n\t\t.trim();\n\n\treturn {\n\t\tbindings: expression,\n\t\tcursor: nextCursor,\n\t\tdone: false,\n\t\ttemplate: nextTemplate\n\t};\n};\n\nconst appendTrailingTemplate = (\n\tvalue: string,\n\ttemplate: string,\n\tcursor: number\n) => template + value.slice(cursor);\n\nconst consumeDeferredAuxiliaryBlock = (input: {\n\tcursorAfterResolved: number;\n\tkeyword: '@error' | '@placeholder';\n\ttemplate: string;\n}) => {\n\tconst parsedBlock = parseDeferredAuxiliaryBlock(\n\t\tinput.template,\n\t\tinput.cursorAfterResolved,\n\t\tinput.keyword\n\t);\n\tif (!parsedBlock) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tcontent: parsedBlock.content.trim(),\n\t\tnextIndex:\n\t\t\tinput.keyword === '@placeholder'\n\t\t\t\t? skipWhitespace(input.template, parsedBlock.nextIndex)\n\t\t\t\t: parsedBlock.nextIndex\n\t};\n};\n\nconst resolveDeferSlotStart = (\n\ttemplate: string,\n\tdeferIndex: number,\n\tmarkerCursor: number\n) => {\n\tconst nextMarkerCursor = skipWhitespace(template, markerCursor);\n\tif (template[nextMarkerCursor] === '{') {\n\t\treturn {\n\t\t\tchanged: false,\n\t\t\tcursor: deferIndex,\n\t\t\tmarkerCursor: nextMarkerCursor,\n\t\t\ttemplatePrefix: ''\n\t\t};\n\t}\n\n\treturn {\n\t\tchanged: true,\n\t\tcursor: deferIndex + '@defer'.length,\n\t\tmarkerCursor: nextMarkerCursor,\n\t\ttemplatePrefix: '@defer'\n\t};\n};\n\nconst consumeBlockCursor = (\n\tvalue: string,\n\tstart: number,\n\tcursor: number,\n\tdepth: number\n) => {\n\tif (isInterpolatedExpressionStart(value, cursor)) {\n\t\treturn {\n\t\t\tcursor: skipInterpolatedExpression(value, cursor),\n\t\t\tdepth,\n\t\t\tresult: null\n\t\t};\n\t}\n\n\tconst char = value[cursor] ?? '';\n\tconst nextDepth = updateBlockDepth(char, depth);\n\tif (char === '}' && nextDepth === 0) {\n\t\treturn {\n\t\t\tcursor,\n\t\t\tdepth,\n\t\t\tresult: {\n\t\t\t\tcontent: value.slice(start + 1, cursor),\n\t\t\t\tnextIndex: cursor + 1\n\t\t\t}\n\t\t};\n\t}\n\n\treturn {\n\t\tcursor: cursor + 1,\n\t\tdepth: nextDepth,\n\t\tresult: null\n\t};\n};\n\nconst consumeResolvedTemplateChunk = (\n\tvalue: string,\n\ttemplate: string,\n\tcursor: number,\n\tbindingsLength: number\n) => {\n\tconst interpolationStart = value.indexOf('{{', cursor);\n\tif (interpolationStart < 0) {\n\t\treturn {\n\t\t\tbinding: null,\n\t\t\tcursor,\n\t\t\tdone: true,\n\t\t\ttemplate: appendTrailingTemplate(value, template, cursor)\n\t\t};\n\t}\n\n\tconst nextChunk = appendResolvedChunk(\n\t\tvalue,\n\t\ttemplate,\n\t\tcursor,\n\t\tinterpolationStart\n\t);\n\tif (nextChunk.done || nextChunk.bindings === undefined) {\n\t\treturn {\n\t\t\tbinding: null,\n\t\t\tcursor,\n\t\t\tdone: true,\n\t\t\ttemplate: nextChunk.template\n\t\t};\n\t}\n\n\tconst key = `e${bindingsLength.toString(BASE_36_RADIX)}`;\n\n\treturn {\n\t\tbinding: {\n\t\t\texpression: nextChunk.bindings,\n\t\t\tkey\n\t\t},\n\t\tcursor: nextChunk.cursor,\n\t\tdone: false,\n\t\ttemplate: `${nextChunk.template}{{ slotData[\"${key}\"] }}`\n\t};\n};\n\nconst readNextDeferBlock = (template: string, cursor: number) => {\n\tconst deferIndex = template.indexOf('@defer', cursor);\n\tif (deferIndex < 0) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tdeferIndex,\n\t\tprefix: template.slice(cursor, deferIndex)\n\t};\n};\n\nconst buildDeferredSlot = (input: {\n\tcursorAfterResolved: number;\n\terrorHtml: string | null;\n\tplaceholderHtml: string;\n\tresolvedBlock: { content: string; nextIndex: number };\n\tslotIndex: number;\n\ttriggerExpression: string | undefined;\n}) => {\n\tconst {\n\t\tcursorAfterResolved,\n\t\terrorHtml,\n\t\tplaceholderHtml,\n\t\tresolvedBlock,\n\t\tslotIndex,\n\t\ttriggerExpression\n\t} = input;\n\tconst resolvedHtml = resolvedBlock.content.trim();\n\tconst transformedResolved = transformResolvedTemplate(resolvedHtml);\n\tconst id = `absolute-angular-defer-${slotIndex.toString(BASE_36_RADIX)}`;\n\tconst slot: LoweredAngularDeferSlot = {\n\t\tdelayMs: parseDelayMs(triggerExpression),\n\t\terrorHtml,\n\t\tfallbackHtml: placeholderHtml,\n\t\tid,\n\t\tresolvedBindings: transformedResolved.bindings,\n\t\tresolvedHtml,\n\t\tresolvedTemplate: transformedResolved.template\n\t};\n\n\treturn {\n\t\tcursorAfterResolved,\n\t\tmarkup: `<abs-defer-slot [id]=\"'${id}'\" [resolve]=\"__absoluteDeferResolvePayload${slotIndex}\">${buildSlotTemplates(slot)}</abs-defer-slot>`,\n\t\tslot\n\t};\n};\n\nconst applyConsumedResolvedTemplateChunk = (\n\tbindings: Array<{ expression: string; key: string }>,\n\tnextChunk: {\n\t\tbinding: { expression: string; key: string } | null;\n\t\tcursor: number;\n\t\tdone: boolean;\n\t\ttemplate: string;\n\t}\n) => {\n\tif (nextChunk.binding) {\n\t\tbindings.push(nextChunk.binding);\n\t}\n\n\treturn {\n\t\tcursor: nextChunk.done ? Number.POSITIVE_INFINITY : nextChunk.cursor,\n\t\tdone: nextChunk.done,\n\t\ttemplate: nextChunk.template\n\t};\n};\n\nconst applyConsumedDeferredBlock = (\n\tcontent: string | null,\n\tparsedBlock: { content: string; nextIndex: number } | null,\n\tcursorAfterResolved: number\n) => {\n\tif (!parsedBlock) {\n\t\treturn {\n\t\t\tcontent,\n\t\t\tcursorAfterResolved\n\t\t};\n\t}\n\n\treturn {\n\t\tcontent: parsedBlock.content || null,\n\t\tcursorAfterResolved: parsedBlock.nextIndex\n\t};\n};\n\nconst applyConsumedPlaceholderBlock = (\n\tplaceholderHtml: string,\n\tparsedBlock: { content: string; nextIndex: number } | null,\n\tcursorAfterResolved: number\n) => {\n\tconst nextState = applyConsumedDeferredBlock(\n\t\tplaceholderHtml,\n\t\tparsedBlock,\n\t\tcursorAfterResolved\n\t);\n\n\treturn {\n\t\tcursorAfterResolved: nextState.cursorAfterResolved,\n\t\tplaceholderHtml: nextState.content ?? ''\n\t};\n};\n\nconst applyConsumedErrorBlock = (\n\terrorHtml: string | null,\n\tparsedBlock: { content: string; nextIndex: number } | null,\n\tcursorAfterResolved: number\n) => {\n\tconst nextState = applyConsumedDeferredBlock(\n\t\terrorHtml,\n\t\tparsedBlock,\n\t\tcursorAfterResolved\n\t);\n\n\treturn {\n\t\tcursorAfterResolved: nextState.cursorAfterResolved,\n\t\terrorHtml: nextState.content\n\t};\n};\n\nconst resolveNextLoweredTemplateChunk = (template: string, cursor: number) => {\n\tconst nextDeferBlock = readNextDeferBlock(template, cursor);\n\tif (nextDeferBlock) {\n\t\treturn nextDeferBlock;\n\t}\n\n\treturn {\n\t\tdeferIndex: -1,\n\t\tprefix: template.slice(cursor)\n\t};\n};\n\nconst applyInvalidDeferSlotStart = (\n\tloweredTemplate: string,\n\tslotStart: {\n\t\tchanged: boolean;\n\t\tcursor: number;\n\t\tmarkerCursor: number;\n\t\ttemplatePrefix: string;\n\t}\n) => {\n\tif (!slotStart.changed) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tchanged: true,\n\t\tcursor: slotStart.cursor,\n\t\ttemplate: loweredTemplate + slotStart.templatePrefix\n\t};\n};\n\nconst applyEmptyResolvedBlock = (\n\tloweredTemplate: string,\n\ttemplate: string,\n\tdeferIndex: number,\n\tresolvedBlock: { content: string; nextIndex: number }\n) => {\n\tif (resolvedBlock.content.trim()) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tcursor: resolvedBlock.nextIndex,\n\t\ttemplate:\n\t\t\tloweredTemplate +\n\t\t\ttemplate.slice(deferIndex, resolvedBlock.nextIndex)\n\t};\n};\n\nconst applyNextLoweredTemplateChunk = (\n\tloweredTemplate: string,\n\tnextDeferBlock: { deferIndex: number; prefix: string }\n) => ({\n\tdeferIndex: nextDeferBlock.deferIndex,\n\tdone: nextDeferBlock.deferIndex < 0,\n\ttemplate: loweredTemplate + nextDeferBlock.prefix\n});\n\nconst applyParsedSlotStart = (\n\tchanged: boolean,\n\tcursor: number,\n\tloweredTemplate: string,\n\tslotStart: {\n\t\tchanged: boolean;\n\t\tcursor: number;\n\t\tmarkerCursor: number;\n\t\ttemplatePrefix: string;\n\t}\n) => {\n\tconst invalidSlotStart = applyInvalidDeferSlotStart(\n\t\tloweredTemplate,\n\t\tslotStart\n\t);\n\tif (!invalidSlotStart) {\n\t\treturn {\n\t\t\tchanged,\n\t\t\tcursor,\n\t\t\ttemplate: loweredTemplate\n\t\t};\n\t}\n\n\treturn {\n\t\tchanged: true,\n\t\tcursor: invalidSlotStart.cursor,\n\t\ttemplate: invalidSlotStart.template\n\t};\n};\n\nconst applyResolvedBlockState = (\n\tcursor: number,\n\tloweredTemplate: string,\n\ttemplate: string,\n\tdeferIndex: number,\n\tresolvedBlock: { content: string; nextIndex: number }\n) => {\n\tconst emptyResolvedBlock = applyEmptyResolvedBlock(\n\t\tloweredTemplate,\n\t\ttemplate,\n\t\tdeferIndex,\n\t\tresolvedBlock\n\t);\n\tif (!emptyResolvedBlock) {\n\t\treturn {\n\t\t\tcursor,\n\t\t\ttemplate: loweredTemplate\n\t\t};\n\t}\n\n\treturn emptyResolvedBlock;\n};\n\nconst consumeResolvedTemplateStep = (\n\tvalue: string,\n\ttemplate: string,\n\tcursor: number,\n\tbindings: Array<{ expression: string; key: string }>\n) => {\n\tconst nextChunk = consumeResolvedTemplateChunk(\n\t\tvalue,\n\t\ttemplate,\n\t\tcursor,\n\t\tbindings.length\n\t);\n\n\treturn applyConsumedResolvedTemplateChunk(bindings, nextChunk);\n};\n\nconst consumeLoweredDeferStep = (input: {\n\tchanged: boolean;\n\tcursor: number;\n\tloweredTemplate: string;\n\tslotIndex: number;\n\tslots: LoweredAngularDeferSlot[];\n\ttemplate: string;\n}) => {\n\tconst { changed, cursor, loweredTemplate, slotIndex, slots, template } =\n\t\tinput;\n\tconst nextDeferBlock = resolveNextLoweredTemplateChunk(template, cursor);\n\tconst nextLoweredChunk = applyNextLoweredTemplateChunk(\n\t\tloweredTemplate,\n\t\tnextDeferBlock\n\t);\n\tif (nextLoweredChunk.done) {\n\t\treturn null;\n\t}\n\n\tconst { deferIndex } = nextLoweredChunk;\n\tlet markerCursor = deferIndex + '@defer'.length;\n\tconst triggerInfo = parseOptionalTriggerExpression(template, markerCursor);\n\tconst { triggerExpression } = triggerInfo;\n\t({ markerCursor } = triggerInfo);\n\tconst slotStart = resolveDeferSlotStart(template, deferIndex, markerCursor);\n\t({ markerCursor } = slotStart);\n\tconst slotStartState = applyParsedSlotStart(\n\t\tchanged,\n\t\tcursor,\n\t\tnextLoweredChunk.template,\n\t\tslotStart\n\t);\n\tif (slotStartState.changed !== changed) {\n\t\treturn {\n\t\t\tchanged: slotStartState.changed,\n\t\t\tcursor: slotStartState.cursor,\n\t\t\tslotIndex,\n\t\t\ttemplate: slotStartState.template\n\t\t};\n\t}\n\n\tconst resolvedBlock = skipMatchingBlock(template, markerCursor);\n\tconst resolvedBlockState = applyResolvedBlockState(\n\t\tcursor,\n\t\tnextLoweredChunk.template,\n\t\ttemplate,\n\t\tdeferIndex,\n\t\tresolvedBlock\n\t);\n\tif (resolvedBlockState.cursor !== cursor) {\n\t\treturn {\n\t\t\tchanged,\n\t\t\tcursor: resolvedBlockState.cursor,\n\t\t\tslotIndex,\n\t\t\ttemplate: resolvedBlockState.template\n\t\t};\n\t}\n\n\tconst blockContent = parsePlaceholderAndErrorBlocks(\n\t\ttemplate,\n\t\tskipWhitespace(template, resolvedBlock.nextIndex)\n\t);\n\tconst builtSlot = buildDeferredSlot({\n\t\tcursorAfterResolved: blockContent.cursorAfterResolved,\n\t\terrorHtml: blockContent.errorHtml,\n\t\tplaceholderHtml: blockContent.placeholderHtml,\n\t\tresolvedBlock,\n\t\tslotIndex,\n\t\ttriggerExpression\n\t});\n\tslots.push(builtSlot.slot);\n\n\treturn {\n\t\tchanged: true,\n\t\tcursor: builtSlot.cursorAfterResolved,\n\t\tslotIndex: slotIndex + 1,\n\t\ttemplate: nextLoweredChunk.template + builtSlot.markup\n\t};\n};\n\nconst skipMatchingBlock = (\n\tvalue: string,\n\tstart: number\n): { content: string; nextIndex: number } => {\n\tif (value[start] !== '{') {\n\t\treturn { content: '', nextIndex: start };\n\t}\n\n\tlet cursor = start + 1;\n\tlet depth = 1;\n\n\twhile (cursor < value.length) {\n\t\tconst consumed = consumeBlockCursor(value, start, cursor, depth);\n\t\tif (consumed.result) {\n\t\t\treturn consumed.result;\n\t\t}\n\n\t\t({ cursor, depth } = consumed);\n\t}\n\n\treturn { content: value.slice(start + 1), nextIndex: value.length };\n};\n\nconst skipWhitespace = (value: string, index: number) => {\n\tlet cursor = index;\n\twhile (cursor < value.length && /\\s/.test(value[cursor] ?? '')) {\n\t\tcursor += 1;\n\t}\n\n\treturn cursor;\n};\n\nconst parseOptionalParenthesizedBlock = (\n\tvalue: string,\n\tindex: number\n): { expression: string; nextIndex: number } | null => {\n\tlet cursor = skipWhitespace(value, index);\n\tif (value[cursor] !== '(') {\n\t\treturn null;\n\t}\n\n\tcursor += 1;\n\tlet depth = 1;\n\tconst start = cursor;\n\n\twhile (cursor < value.length) {\n\t\tconst char = value[cursor] ?? '';\n\t\tconst nextDepth = updateParenthesisDepth(char, depth);\n\t\tif (char === ')' && nextDepth === 0) {\n\t\t\treturn {\n\t\t\t\texpression: value.slice(start, cursor),\n\t\t\t\tnextIndex: cursor + 1\n\t\t\t};\n\t\t}\n\n\t\tdepth = nextDepth;\n\t\tcursor += 1;\n\t}\n\n\treturn { expression: value.slice(start), nextIndex: value.length };\n};\n\nconst parseDelayMs = (triggerExpression: string | undefined) => {\n\tif (!triggerExpression) return 0;\n\tconst timerMsMatch = triggerExpression.match(/timer\\(\\s*(\\d+)\\s*ms\\s*\\)/i);\n\tif (timerMsMatch?.[1]) return Number.parseInt(timerMsMatch[1], 10);\n\tconst timerSecondsMatch = triggerExpression.match(\n\t\t/timer\\(\\s*(\\d+)\\s*s\\s*\\)/i\n\t);\n\tif (timerSecondsMatch?.[1]) {\n\t\treturn (\n\t\t\tNumber.parseInt(timerSecondsMatch[1], 10) * MILLISECONDS_IN_A_SECOND\n\t\t);\n\t}\n\n\tif (/\\bon\\s+immediate\\b/i.test(triggerExpression)) return 0;\n\tif (/\\bon\\s+idle\\b/i.test(triggerExpression)) return 1;\n\n\treturn 0;\n};\n\nconst transformResolvedTemplate = (value: string) => {\n\tconst bindings: Array<{ expression: string; key: string }> = [];\n\tlet template = '';\n\tlet cursor = 0;\n\n\twhile (cursor < value.length) {\n\t\tconst appliedChunk = consumeResolvedTemplateStep(\n\t\t\tvalue,\n\t\t\ttemplate,\n\t\t\tcursor,\n\t\t\tbindings\n\t\t);\n\t\t({ cursor, template } = appliedChunk);\n\t}\n\n\treturn {\n\t\tbindings,\n\t\ttemplate\n\t};\n};\n\nconst parseOptionalTriggerExpression = (\n\ttemplate: string,\n\tmarkerCursor: number\n) => {\n\tconst parsedTrigger = parseOptionalParenthesizedBlock(\n\t\ttemplate,\n\t\tmarkerCursor\n\t);\n\tif (!parsedTrigger) {\n\t\treturn {\n\t\t\tmarkerCursor,\n\t\t\ttriggerExpression: undefined\n\t\t};\n\t}\n\n\treturn {\n\t\tmarkerCursor: parsedTrigger.nextIndex,\n\t\ttriggerExpression: parsedTrigger.expression.trim()\n\t};\n};\n\nconst parseDeferredAuxiliaryBlock = (\n\ttemplate: string,\n\tcursorAfterResolved: number,\n\tkeyword: '@error' | '@placeholder'\n) => {\n\tif (!template.startsWith(keyword, cursorAfterResolved)) {\n\t\treturn null;\n\t}\n\n\tconst blockKeywordCursor = cursorAfterResolved + keyword.length;\n\tconst blockStart = skipWhitespace(template, blockKeywordCursor);\n\tif (template[blockStart] !== '{') {\n\t\treturn null;\n\t}\n\n\treturn skipMatchingBlock(template, blockStart);\n};\n\nconst parsePlaceholderAndErrorBlocks = (\n\ttemplate: string,\n\tstartCursor: number\n) => {\n\tlet cursorAfterResolved = startCursor;\n\tlet placeholderHtml = '';\n\tlet errorHtml: string | null = null;\n\n\tconst parsedPlaceholder = consumeDeferredAuxiliaryBlock({\n\t\tcursorAfterResolved,\n\t\tkeyword: '@placeholder',\n\t\ttemplate\n\t});\n\t({ placeholderHtml, cursorAfterResolved } = applyConsumedPlaceholderBlock(\n\t\tplaceholderHtml,\n\t\tparsedPlaceholder,\n\t\tcursorAfterResolved\n\t));\n\n\tconst parsedError = consumeDeferredAuxiliaryBlock({\n\t\tcursorAfterResolved,\n\t\tkeyword: '@error',\n\t\ttemplate\n\t});\n\t({ errorHtml, cursorAfterResolved } = applyConsumedErrorBlock(\n\t\terrorHtml,\n\t\tparsedError,\n\t\tcursorAfterResolved\n\t));\n\n\treturn {\n\t\tcursorAfterResolved,\n\t\terrorHtml,\n\t\tplaceholderHtml\n\t};\n};\n\nconst buildSlotTemplates = (slot: LoweredAngularDeferSlot) => {\n\tconst templates = [\n\t\t`<ng-template absDeferResolved let-slotData>${slot.resolvedTemplate}</ng-template>`\n\t];\n\n\tif (slot.fallbackHtml.length > 0) {\n\t\ttemplates.push(\n\t\t\t`<ng-template absDeferFallback>${slot.fallbackHtml}</ng-template>`\n\t\t);\n\t}\n\tif (slot.errorHtml) {\n\t\ttemplates.push(\n\t\t\t`<ng-template absDeferError>${slot.errorHtml}</ng-template>`\n\t\t);\n\t}\n\n\treturn templates.join('');\n};\n\nexport const lowerAngularDeferSyntax = (\n\ttemplate: string\n): LoweredAngularDeferResult => {\n\tif (!template.includes('@defer')) {\n\t\treturn {\n\t\t\tslots: [],\n\t\t\ttemplate,\n\t\t\ttransformed: false\n\t\t};\n\t}\n\n\tlet cursor = 0;\n\tlet slotIndex = 0;\n\tconst slots: LoweredAngularDeferSlot[] = [];\n\tlet loweredTemplate = '';\n\tlet changed = false;\n\tlet nextState = consumeLoweredDeferStep({\n\t\tchanged,\n\t\tcursor,\n\t\tloweredTemplate,\n\t\tslotIndex,\n\t\tslots,\n\t\ttemplate\n\t});\n\twhile (nextState) {\n\t\t({ changed, cursor, slotIndex, template: loweredTemplate } = nextState);\n\t\tnextState = consumeLoweredDeferStep({\n\t\t\tchanged,\n\t\t\tcursor,\n\t\t\tloweredTemplate,\n\t\t\tslotIndex,\n\t\t\tslots,\n\t\t\ttemplate\n\t\t});\n\t}\n\n\tconst transformedTemplate =\n\t\tslots.length > 0\n\t\t\t? loweredTemplate + template.slice(cursor)\n\t\t\t: template.replaceAll('@defer', '@defer');\n\n\treturn {\n\t\tslots,\n\t\ttemplate: transformedTemplate,\n\t\ttransformed: slots.length > 0\n\t};\n};\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA,+CAAmC;AACnC;AAEA;;;ACkBA,IAAM,gCAAgC,CAAC,OAAe,UACrD,MAAM,WAAW,OAAO,MAAM,QAAQ,OAAO;AAE9C,IAAM,6BAA6B,CAAC,OAAe,UAAkB;AAAA,EACpE,MAAM,SAAS,QAAQ;AAAA,EACvB,OAAO,SAAS,MAAM,SAAS,GAAG;AAAA,IACjC,MAAM,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA,IACtC,IAAI,MAAM,GAAG;AAAA,MACZ,OAAO,MAAM;AAAA,IACd;AAAA,IAEA,OAAO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ints
|
|
4
|
-
} from "./chunk-11zpfqz6.js";
|
|
5
|
-
import {
|
|
6
|
-
toPascal
|
|
7
|
-
} from "./chunk-p5504p14.js";
|
|
8
|
-
|
|
9
|
-
// src/build/updateAssetPaths.ts
|
|
10
|
-
import { readFile, writeFile } from "fs/promises";
|
|
11
|
-
|
|
12
|
-
// src/cli/telemetryEvent.ts
|
|
13
|
-
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
14
|
-
import { arch, platform } from "os";
|
|
15
|
-
import { dirname, join as join2, parse } from "path";
|
|
16
|
-
|
|
17
|
-
// src/cli/scripts/telemetry.ts
|
|
18
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
19
|
-
import { homedir } from "os";
|
|
20
|
-
import { join } from "path";
|
|
21
|
-
var configDir = join(homedir(), ".absolutejs");
|
|
22
|
-
var configPath = join(configDir, "telemetry.json");
|
|
23
|
-
var getTelemetryConfig = () => {
|
|
24
|
-
try {
|
|
25
|
-
if (!existsSync(configPath))
|
|
26
|
-
return null;
|
|
27
|
-
const raw = readFileSync(configPath, "utf-8");
|
|
28
|
-
const config = JSON.parse(raw);
|
|
29
|
-
return config;
|
|
30
|
-
} catch {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// src/cli/telemetryEvent.ts
|
|
36
|
-
var checkCandidate = (candidate) => {
|
|
37
|
-
if (!existsSync2(candidate)) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
const pkg = JSON.parse(readFileSync2(candidate, "utf-8"));
|
|
41
|
-
if (pkg.name === "@absolutejs/absolute") {
|
|
42
|
-
const ver = pkg.version;
|
|
43
|
-
return ver;
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
};
|
|
47
|
-
var getVersion = () => {
|
|
48
|
-
try {
|
|
49
|
-
return findPackageVersion();
|
|
50
|
-
} catch {
|
|
51
|
-
return "unknown";
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
var findPackageVersion = () => {
|
|
55
|
-
let { dir } = import.meta;
|
|
56
|
-
while (dir !== parse(dir).root) {
|
|
57
|
-
const candidate = join2(dir, "package.json");
|
|
58
|
-
const version = checkCandidate(candidate);
|
|
59
|
-
if (version) {
|
|
60
|
-
return version;
|
|
61
|
-
}
|
|
62
|
-
dir = dirname(dir);
|
|
63
|
-
}
|
|
64
|
-
return "unknown";
|
|
65
|
-
};
|
|
66
|
-
var sendTelemetryEvent = (event, payload) => {
|
|
67
|
-
try {
|
|
68
|
-
if (process.env.TELEMETRY_OFF === "1")
|
|
69
|
-
return;
|
|
70
|
-
const config = getTelemetryConfig();
|
|
71
|
-
if (!config?.enabled)
|
|
72
|
-
return;
|
|
73
|
-
const body = {
|
|
74
|
-
anonymousId: config.anonymousId,
|
|
75
|
-
arch: arch(),
|
|
76
|
-
bunVersion: Bun.version,
|
|
77
|
-
event,
|
|
78
|
-
os: platform(),
|
|
79
|
-
payload,
|
|
80
|
-
timestamp: new Date().toISOString(),
|
|
81
|
-
version: getVersion()
|
|
82
|
-
};
|
|
83
|
-
fetch("https://absolutejs.com/api/telemetry", {
|
|
84
|
-
body: JSON.stringify(body),
|
|
85
|
-
headers: { "Content-Type": "application/json" },
|
|
86
|
-
method: "POST"
|
|
87
|
-
}).catch(() => {
|
|
88
|
-
return;
|
|
89
|
-
});
|
|
90
|
-
} catch {}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// src/build/updateAssetPaths.ts
|
|
94
|
-
var replaceAssetRef = (match, prefix, dir, name, ext, suffix, manifest, filePath) => {
|
|
95
|
-
if (/data-external(?:\s*=\s*["'][^"']*["'])?/i.test(match)) {
|
|
96
|
-
return match;
|
|
97
|
-
}
|
|
98
|
-
const pascal = toPascal(name);
|
|
99
|
-
let key;
|
|
100
|
-
if (ext === ".css") {
|
|
101
|
-
key = `${pascal}CSS`;
|
|
102
|
-
} else if (dir.includes("/indexes/")) {
|
|
103
|
-
key = `${pascal}Index`;
|
|
104
|
-
} else {
|
|
105
|
-
key = pascal;
|
|
106
|
-
}
|
|
107
|
-
const newPath = manifest[key];
|
|
108
|
-
if (!newPath) {
|
|
109
|
-
console.error(`error: no manifest entry for ${ext.slice(1)} "${name}" referenced in ${filePath}`);
|
|
110
|
-
sendTelemetryEvent("build:missing-manifest-entry", {
|
|
111
|
-
assetName: name,
|
|
112
|
-
assetType: ext.slice(1),
|
|
113
|
-
htmlFile: filePath
|
|
114
|
-
});
|
|
115
|
-
return match;
|
|
116
|
-
}
|
|
117
|
-
const isScript = ext === ".js" || ext === ".ts";
|
|
118
|
-
const hasTypeModule = isScript && /type\s*=\s*["']module["']/i.test(match);
|
|
119
|
-
if (isScript && !hasTypeModule) {
|
|
120
|
-
const newSuffix = suffix.replace(/>$/, ' type="module">');
|
|
121
|
-
return `${prefix}${newPath}${newSuffix}`;
|
|
122
|
-
}
|
|
123
|
-
return `${prefix}${newPath}${suffix}`;
|
|
124
|
-
};
|
|
125
|
-
var updateAssetPaths = async (manifest, directory) => {
|
|
126
|
-
const htmlFiles = await scanEntryPoints(directory, "*.html");
|
|
127
|
-
const assetRegex = /((?:<script[^>]+src=|<link[^>]*?rel=["']stylesheet["'][^>]*?href=)["'])(?!\/?(?:.*\/)?htmx\.min\.js)(\/?(?:.*\/)?)([^./"']+)(?:\.[^."'/]+)?(\.(?:js|ts|css))(["'][^>]*>)/g;
|
|
128
|
-
const tasks = htmlFiles.map(async (filePath) => {
|
|
129
|
-
const original = await readFile(filePath, "utf8");
|
|
130
|
-
const updated = original.replace(assetRegex, (match, prefix, dir, name, ext, suffix) => replaceAssetRef(match, prefix, dir, name, ext, suffix, manifest, filePath));
|
|
131
|
-
await writeFile(filePath, updated, "utf8");
|
|
132
|
-
});
|
|
133
|
-
await Promise.all(tasks);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export { sendTelemetryEvent, updateAssetPaths };
|
|
137
|
-
|
|
138
|
-
//# debugId=DE253A6378E03D6264756E2164756E21
|
|
139
|
-
//# sourceMappingURL=chunk-93sqk7be.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/build/updateAssetPaths.ts", "../src/cli/telemetryEvent.ts", "../src/cli/scripts/telemetry.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { readFile, writeFile } from 'node:fs/promises';\nimport { sendTelemetryEvent } from '../cli/telemetryEvent';\nimport { toPascal } from '../utils/stringModifiers';\nimport { scanEntryPoints } from './scanEntryPoints';\n\nconst replaceAssetRef = (\n\tmatch: string,\n\tprefix: string,\n\tdir: string,\n\tname: string,\n\text: string,\n\tsuffix: string,\n\tmanifest: Record<string, string>,\n\tfilePath: string\n) => {\n\tif (/data-external(?:\\s*=\\s*[\"'][^\"']*[\"'])?/i.test(match)) {\n\t\treturn match;\n\t}\n\n\tconst pascal = toPascal(name);\n\n\tlet key;\n\tif (ext === '.css') {\n\t\tkey = `${pascal}CSS`;\n\t} else if (dir.includes('/indexes/')) {\n\t\tkey = `${pascal}Index`;\n\t} else {\n\t\tkey = pascal;\n\t}\n\n\tconst newPath = manifest[key];\n\tif (!newPath) {\n\t\tconsole.error(\n\t\t\t`error: no manifest entry for ${ext.slice(1)} \"${name}\" referenced in ${filePath}`\n\t\t);\n\t\tsendTelemetryEvent('build:missing-manifest-entry', {\n\t\t\tassetName: name,\n\t\t\tassetType: ext.slice(1),\n\t\t\thtmlFile: filePath\n\t\t});\n\n\t\treturn match;\n\t}\n\n\tconst isScript = ext === '.js' || ext === '.ts';\n\tconst hasTypeModule = isScript && /type\\s*=\\s*[\"']module[\"']/i.test(match);\n\n\tif (isScript && !hasTypeModule) {\n\t\tconst newSuffix = suffix.replace(/>$/, ' type=\"module\">');\n\n\t\treturn `${prefix}${newPath}${newSuffix}`;\n\t}\n\n\treturn `${prefix}${newPath}${suffix}`;\n};\n\nexport const updateAssetPaths = async (\n\tmanifest: Record<string, string>,\n\tdirectory: string\n) => {\n\tconst htmlFiles = await scanEntryPoints(directory, '*.html');\n\tconst assetRegex =\n\t\t/((?:<script[^>]+src=|<link[^>]*?rel=[\"']stylesheet[\"'][^>]*?href=)[\"'])(?!\\/?(?:.*\\/)?htmx\\.min\\.js)(\\/?(?:.*\\/)?)([^./\"']+)(?:\\.[^.\"'/]+)?(\\.(?:js|ts|css))([\"'][^>]*>)/g;\n\n\tconst tasks = htmlFiles.map(async (filePath) => {\n\t\tconst original = await readFile(filePath, 'utf8');\n\t\tconst updated = original.replace(\n\t\t\tassetRegex,\n\t\t\t(match, prefix, dir, name, ext, suffix) =>\n\t\t\t\treplaceAssetRef(match, prefix, dir, name, ext, suffix, manifest, filePath)\n\t\t);\n\t\tawait writeFile(filePath, updated, 'utf8');\n\t});\n\n\tawait Promise.all(tasks);\n};\n",
|
|
6
|
-
"import { existsSync, readFileSync } from 'node:fs';\nimport { arch, platform } from 'node:os';\nimport { dirname, join, parse } from 'node:path';\nimport type { TelemetryEvent } from '../../types/telemetry';\nimport { getTelemetryConfig } from './scripts/telemetry';\n\nconst checkCandidate = (candidate: string) => {\n\tif (!existsSync(candidate)) {\n\t\treturn null;\n\t}\n\tconst pkg = JSON.parse(readFileSync(candidate, 'utf-8'));\n\n\tif (pkg.name === '@absolutejs/absolute') {\n\t\tconst ver: string = pkg.version;\n\n\t\treturn ver;\n\t}\n\n\treturn null;\n};\n\nconst getVersion = () => {\n\ttry {\n\t\treturn findPackageVersion();\n\t} catch {\n\t\treturn 'unknown';\n\t}\n};\n\nconst findPackageVersion = () => {\n\tlet { dir } = import.meta;\n\n\twhile (dir !== parse(dir).root) {\n\t\tconst candidate = join(dir, 'package.json');\n\t\tconst version = checkCandidate(candidate);\n\t\tif (version) {\n\t\t\treturn version;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\n\treturn 'unknown';\n};\n\nexport const sendTelemetryEvent = (\n\tevent: string,\n\tpayload: Record<string, unknown>\n) => {\n\ttry {\n\t\tif (process.env.TELEMETRY_OFF === '1') return;\n\t\tconst config = getTelemetryConfig();\n\t\tif (!config?.enabled) return;\n\n\t\tconst body: TelemetryEvent = {\n\t\t\tanonymousId: config.anonymousId,\n\t\t\tarch: arch(),\n\t\t\tbunVersion: Bun.version,\n\t\t\tevent,\n\t\t\tos: platform(),\n\t\t\tpayload,\n\t\t\ttimestamp: new Date().toISOString(),\n\t\t\tversion: getVersion()\n\t\t};\n\n\t\tfetch('https://absolutejs.com/api/telemetry', {\n\t\t\tbody: JSON.stringify(body),\n\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\tmethod: 'POST'\n\t\t}).catch(() => undefined);\n\t} catch {\n\t\t/* silently ignore */\n\t}\n};\n",
|
|
7
|
-
"import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport type { TelemetryConfig } from '../../../types/telemetry';\n\nconst configDir = join(homedir(), '.absolutejs');\nconst configPath = join(configDir, 'telemetry.json');\n\nexport const getTelemetryConfig = () => {\n\ttry {\n\t\tif (!existsSync(configPath)) return null;\n\t\tconst raw = readFileSync(configPath, 'utf-8');\n\n\t\tconst config: TelemetryConfig = JSON.parse(raw);\n\n\t\treturn config;\n\t} catch {\n\t\treturn null;\n\t}\n};\n\nexport const isTelemetryEnabled = () => {\n\tconst config = getTelemetryConfig();\n\n\treturn config?.enabled === true;\n};\n\nexport const saveTelemetryConfig = (config: TelemetryConfig) => {\n\tmkdirSync(configDir, { recursive: true });\n\twriteFileSync(configPath, `${JSON.stringify(config, null, '\\t')}\\n`);\n};\n\nconst enable = () => {\n\tconst existing = getTelemetryConfig();\n\tconst config: TelemetryConfig = {\n\t\tanonymousId: existing?.anonymousId ?? crypto.randomUUID(),\n\t\tcreatedAt: existing?.createdAt ?? new Date().toISOString(),\n\t\tenabled: true\n\t};\n\tsaveTelemetryConfig(config);\n\tconsole.log('Telemetry enabled.');\n\tconsole.log(`Anonymous ID: ${config.anonymousId}`);\n};\n\nconst disable = () => {\n\tconst existing = getTelemetryConfig();\n\tif (existing) {\n\t\tsaveTelemetryConfig({ ...existing, enabled: false });\n\t}\n\tconsole.log('Telemetry disabled.');\n};\n\nconst status = () => {\n\tconst config = getTelemetryConfig();\n\tif (!config || !config.enabled) {\n\t\tconsole.log('Telemetry is disabled.');\n\t} else {\n\t\tconsole.log('Telemetry is enabled.');\n\t\tconsole.log(`Anonymous ID: ${config.anonymousId}`);\n\t}\n};\n\nexport const telemetry = (args: string[]) => {\n\tconst [subcommand] = args;\n\n\tif (subcommand === 'enable') {\n\t\tenable();\n\n\t\treturn;\n\t}\n\tif (subcommand === 'disable') {\n\t\tdisable();\n\n\t\treturn;\n\t}\n\tif (subcommand === 'status') {\n\t\tstatus();\n\n\t\treturn;\n\t}\n\tif (!subcommand) {\n\t\tstatus();\n\t\tconsole.log('');\n\t\tconsole.log('Usage: absolute telemetry <command>');\n\t\tconsole.log('Commands:');\n\t\tconsole.log(' enable Enable anonymous telemetry');\n\t\tconsole.log(' disable Disable telemetry');\n\t\tconsole.log(' status Show current telemetry status');\n\n\t\treturn;\n\t}\n\tconsole.error(`Unknown telemetry command: ${subcommand}`);\n\tconsole.error('Usage: absolute telemetry <enable|disable|status>');\n\tprocess.exit(1);\n};\n"
|
|
8
|
-
],
|
|
9
|
-
"mappings": ";;;;;;;;;AAAA;;;ACAA,uBAAS,6BAAY;AACrB;AACA,0BAAkB;;;ACFlB;AACA;AACA;AAGA,IAAM,YAAY,KAAK,QAAQ,GAAG,aAAa;AAC/C,IAAM,aAAa,KAAK,WAAW,gBAAgB;AAE5C,IAAM,qBAAqB,MAAM;AAAA,EACvC,IAAI;AAAA,IACH,IAAI,CAAC,WAAW,UAAU;AAAA,MAAG,OAAO;AAAA,IACpC,MAAM,MAAM,aAAa,YAAY,OAAO;AAAA,IAE5C,MAAM,SAA0B,KAAK,MAAM,GAAG;AAAA,IAE9C,OAAO;AAAA,IACN,MAAM;AAAA,IACP,OAAO;AAAA;AAAA;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