@absolutejs/absolute 0.19.0-beta.805 → 0.19.0-beta.807
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/index.js +5 -5
- package/dist/angular/server.js +5 -5
- package/dist/build.js +4 -4
- package/dist/{chunk-gxrsf71e.js → chunk-1rfh7hw9.js} +29 -15
- package/dist/chunk-1rfh7hw9.js.map +11 -0
- package/dist/{chunk-f8k0tb5z.js → chunk-1x4fxm57.js} +5 -5
- package/dist/{chunk-n5a5nxnt.js → chunk-3rea1gam.js} +20 -14
- package/dist/chunk-3rea1gam.js.map +28 -0
- package/dist/{chunk-pevt15h0.js → chunk-629x0yh4.js} +5 -5
- package/dist/{chunk-a0x4bf8d.js → chunk-92fsjfpp.js} +2 -14
- package/dist/{chunk-a0x4bf8d.js.map → chunk-92fsjfpp.js.map} +3 -3
- package/dist/{chunk-z6c8qcmw.js → chunk-9j59emg3.js} +2 -2
- package/dist/{chunk-r0w678ve.js → chunk-bgb8k1qs.js} +2 -2
- package/dist/{chunk-by7t1d3r.js → chunk-cm0g4q6w.js} +2 -2
- package/dist/{chunk-hf5fjykx.js → chunk-jpkjdgsk.js} +13 -53
- package/dist/chunk-jpkjdgsk.js.map +11 -0
- package/dist/{chunk-8zz4g25g.js → chunk-kwgh8rmg.js} +14 -17
- package/dist/chunk-kwgh8rmg.js.map +14 -0
- package/dist/{chunk-0r32762k.js → chunk-m97ze5hz.js} +3 -3
- package/dist/{chunk-0r32762k.js.map → chunk-m97ze5hz.js.map} +1 -1
- package/dist/{chunk-ccz4x8vr.js → chunk-p5zgj77m.js} +3 -3
- package/dist/chunk-pnscgw95.js +90 -0
- package/dist/chunk-pnscgw95.js.map +10 -0
- package/dist/{chunk-0fsxp5gc.js → chunk-r6e8pytx.js} +2 -2
- package/dist/client/index.js +4 -4
- package/dist/index.js +5 -6
- package/dist/index.js.map +2 -2
- package/dist/islands/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/src/angular/ssrRender.d.ts +1 -3
- package/dist/src/build/buildAngularVendor.d.ts +2 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/svelte/index.js +1 -1
- package/dist/types/angular.d.ts +0 -6
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-8zz4g25g.js.map +0 -14
- package/dist/chunk-gxrsf71e.js.map +0 -11
- package/dist/chunk-hf5fjykx.js.map +0 -11
- package/dist/chunk-n5a5nxnt.js.map +0 -28
- package/dist/chunk-r8dzkm4s.js +0 -194
- package/dist/chunk-r8dzkm4s.js.map +0 -11
- package/dist/src/angular/injectorPatch.d.ts +0 -1
- /package/dist/{chunk-f8k0tb5z.js.map → chunk-1x4fxm57.js.map} +0 -0
- /package/dist/{chunk-pevt15h0.js.map → chunk-629x0yh4.js.map} +0 -0
- /package/dist/{chunk-z6c8qcmw.js.map → chunk-9j59emg3.js.map} +0 -0
- /package/dist/{chunk-r0w678ve.js.map → chunk-bgb8k1qs.js.map} +0 -0
- /package/dist/{chunk-by7t1d3r.js.map → chunk-cm0g4q6w.js.map} +0 -0
- /package/dist/{chunk-ccz4x8vr.js.map → chunk-p5zgj77m.js.map} +0 -0
- /package/dist/{chunk-0fsxp5gc.js.map → chunk-r6e8pytx.js.map} +0 -0
package/dist/islands/index.js
CHANGED
package/dist/react/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import"../chunk-s6defjk2.js";
|
|
|
22
22
|
import"../chunk-p5504p14.js";
|
|
23
23
|
import {
|
|
24
24
|
renderIslandResult
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-9j59emg3.js";
|
|
26
26
|
import"../chunk-9ve9jq72.js";
|
|
27
27
|
import"../chunk-7fw6x3js.js";
|
|
28
28
|
import"../chunk-mbazhahf.js";
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { EnvironmentProviders, Provider, Type } from '@angular/core';
|
|
2
|
-
import type { AngularDeps, CachedRouteData
|
|
2
|
+
import type { AngularDeps, CachedRouteData } from '../../types/angular';
|
|
3
3
|
export declare const cacheRouteData: (pagePath: string, data: CachedRouteData) => void;
|
|
4
4
|
export declare const getCachedRouteData: (pagePath: string) => CachedRouteData | undefined;
|
|
5
|
-
export declare const buildDeps: (ssrResult: SsrDepsResult | null, baseDeps: AngularDeps) => AngularDeps;
|
|
6
5
|
export declare const buildProviders: (deps: AngularDeps, sanitizer: InstanceType<AngularDeps["DomSanitizer"]>, maybeProps: Record<string, unknown> | undefined, tokenMap: Map<string, unknown>, request: Request | undefined, requestContext: unknown, responseInit: ResponseInit | undefined, userProviders?: ReadonlyArray<Provider | EnvironmentProviders>) => (Provider | EnvironmentProviders | {
|
|
7
6
|
provide: unknown;
|
|
8
7
|
useValue: unknown;
|
|
9
8
|
})[];
|
|
10
9
|
export declare const clearSelectorCache: () => void;
|
|
11
10
|
export declare const discoverTokens: (pageModule: Record<string, unknown>) => Map<string, unknown>;
|
|
12
|
-
export declare const loadSsrDeps: (pagePath: string) => Promise<SsrDepsResult | null>;
|
|
13
11
|
export declare const resolveSelector: (deps: AngularDeps, pagePath: string, PageComponent: Type<unknown>) => string;
|
|
14
12
|
export declare const injectSsrScripts: (html: string, requestId: string, indexPath: string, props?: Record<string, unknown>) => string;
|
|
15
13
|
export declare const renderAngularApp: (deps: AngularDeps, PageComponent: Type<unknown>, providers: (Provider | EnvironmentProviders)[], document: string | Document, url?: string) => Promise<string>;
|
|
@@ -18,7 +18,7 @@ export declare const computeAngularVendorPaths: (specifiers?: string[]) => Recor
|
|
|
18
18
|
* vendor path map. Use this when the page-bundle build needs the full set of
|
|
19
19
|
* angular specs in its rewrite map (otherwise transitively-discovered subpaths
|
|
20
20
|
* like `@angular/core/rxjs-interop` end up as bare specifiers in the output). */
|
|
21
|
-
export declare const computeAngularVendorPathsAsync: (directories?: string[]) => Promise<Record<string, string>>;
|
|
21
|
+
export declare const computeAngularVendorPathsAsync: (directories?: string[], linkerJitMode?: boolean) => Promise<Record<string, string>>;
|
|
22
22
|
/** Server-side counterpart to `buildAngularVendor`. Outputs fully-linked
|
|
23
23
|
* Bun-target ESM bundles for every @angular/* package the project uses,
|
|
24
24
|
* *plus* `@angular/platform-server` and `@angular/ssr` (excluded from the
|
|
@@ -37,4 +37,4 @@ export declare const computeAngularServerVendorPaths: (buildDir: string, specifi
|
|
|
37
37
|
* produces absolute filesystem paths for every @angular/* spec the project
|
|
38
38
|
* uses (plus the always-vendored server-only specs). Mirrors
|
|
39
39
|
* `computeAngularVendorPathsAsync` but for server-side rewriting. */
|
|
40
|
-
export declare const computeAngularServerVendorPathsAsync: (buildDir: string, directories?: string[]) => Promise<Record<string, string>>;
|
|
40
|
+
export declare const computeAngularServerVendorPathsAsync: (buildDir: string, directories?: string[], linkerJitMode?: boolean) => Promise<Record<string, string>>;
|
package/dist/src/index.d.ts
CHANGED
package/dist/svelte/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import"../chunk-s6defjk2.js";
|
|
|
25
25
|
import"../chunk-p5504p14.js";
|
|
26
26
|
import {
|
|
27
27
|
renderIslandMarkup
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-9j59emg3.js";
|
|
29
29
|
import"../chunk-9ve9jq72.js";
|
|
30
30
|
import"../chunk-7fw6x3js.js";
|
|
31
31
|
import"../chunk-mbazhahf.js";
|
package/dist/types/angular.d.ts
CHANGED
|
@@ -30,9 +30,3 @@ export type CachedRouteData = {
|
|
|
30
30
|
props: Record<string, unknown> | undefined;
|
|
31
31
|
headTag: `<head>${string}</head>`;
|
|
32
32
|
};
|
|
33
|
-
export type SsrDepsResult = {
|
|
34
|
-
common: typeof import('@angular/common');
|
|
35
|
-
core: typeof import('@angular/core');
|
|
36
|
-
platformBrowser: typeof import('@angular/platform-browser');
|
|
37
|
-
platformServer: typeof import('@angular/platform-server');
|
|
38
|
-
};
|
package/dist/vue/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import"../chunk-s6defjk2.js";
|
|
|
33
33
|
import"../chunk-p5504p14.js";
|
|
34
34
|
import {
|
|
35
35
|
renderIslandResult
|
|
36
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-9j59emg3.js";
|
|
37
37
|
import"../chunk-9ve9jq72.js";
|
|
38
38
|
import"../chunk-7fw6x3js.js";
|
|
39
39
|
import"../chunk-mbazhahf.js";
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/angular/pageHandler.ts", "../src/angular/animationProviders.ts", "../src/angular/routerRedirectProviders.ts", "../src/angular/lowerServerIslands.ts", "../src/angular/ssrSanitizer.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { AsyncLocalStorage } from 'node:async_hooks';\nimport { mkdir, symlink } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { basename, dirname, join, resolve } from 'node:path';\nimport type { EnvironmentProviders, Provider, Type } from '@angular/core';\nimport type {\n\tAngularPageDefinition,\n\tAngularPagePropsOf\n} from '../../types/angular';\nimport { BASE_36_RADIX, RANDOM_ID_END_INDEX } from '../constants';\nimport { injectIslandPageContext } from '../core/islandPageContext';\nimport { ssrErrorPage } from '../utils/ssrErrorPage';\nimport {\n\tderivePageName,\n\trenderConventionError\n} from '../utils/resolveConvention';\nimport { setSsrContextGetter } from '../utils/registerClientScript';\nimport { getAngularDeps } from './angularDeps';\nimport { buildServerAnimationProviders } from './animationProviders';\nimport { buildRouterRedirectProviders } from './routerRedirectProviders';\nimport { lowerAngularServerIslands } from './lowerServerIslands';\nimport { getCurrentRouteRegistrationCallsite } from '../core/devRouteRegistrationCallsite';\nimport { getSsrSanitizer, resetSsrSanitizer } from './ssrSanitizer';\nimport {\n\ttype StreamingSlotEnhancerOptions,\n\twithRegisteredStreamingSlots\n} from '../core/responseEnhancers';\nimport {\n\tcaptureStreamingSlotWarningCallsite,\n\trunWithStreamingSlotWarningScope\n} from '../core/streamingSlotWarningScope';\nimport { isSsrCacheDirty, markSsrCacheDirty } from '../core/ssrCache';\nimport {\n\tbuildDeps,\n\tbuildProviders,\n\tcacheRouteData,\n\tclearSelectorCache,\n\tdiscoverTokens,\n\tinjectSsrScripts,\n\tloadSsrDeps,\n\trenderAngularApp,\n\tresolveSelector\n} from './ssrRender';\nimport {\n\tresolveAngularPackage,\n\tresolveAngularRuntimePath\n} from './resolveAngularPackage';\n\nlet lastSelector = 'angular-page';\ntype AngularPageRenderOptions = StreamingSlotEnhancerOptions & {\n\tcollectStreamingSlots?: boolean;\n};\ntype IsAny<T> = 0 extends 1 & T ? true : false;\ntype HasNoRequiredAngularProps<Props> =\n\tIsAny<Props> extends true ? true : keyof Props extends never ? true : false;\ntype AngularPageHasOptionalProps<Page> = Page extends {\n\tpage: AngularPageDefinition<infer Props>;\n}\n\t? HasNoRequiredAngularProps<Props>\n\t: Page extends { default: AngularPageDefinition<infer Props> }\n\t\t? HasNoRequiredAngularProps<Props>\n\t\t: HasNoRequiredAngularProps<AngularPagePropsOf<Page>>;\nexport type AngularPageRequestInput<\n\tPage = { page: AngularPageDefinition<Record<never, never>> }\n> = AngularPageRenderOptions & {\n\theadTag?: `<head>${string}</head>`;\n\tindexPath: string;\n\tpagePath: string;\n\t/** The incoming request. When provided, its URL is forwarded to\n\t * Angular's `renderApplication`, so `LocationStrategy.path()` and\n\t * Angular Router both see the real URL instead of `/`. Without it,\n\t * Router-based pages can't match anything but the root route. */\n\trequest?: Request;\n\t/** Per-request context made available through Angular's REQUEST_CONTEXT token. */\n\trequestContext?: unknown;\n\t/** Mutable response init made available through Angular's RESPONSE_INIT token. */\n\tresponseInit?: ResponseInit;\n} & (AngularPageHasOptionalProps<Page> extends true\n\t\t? { props?: NoInfer<AngularPagePropsOf<Page>> }\n\t\t: { props: NoInfer<AngularPagePropsOf<Page>> });\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\nconst isAngularComponent = (value: unknown): value is Type<unknown> =>\n\ttypeof value === 'function';\n\nconst isAngularPageDefinition = (\n\tvalue: unknown\n): value is AngularPageDefinition<Record<string, unknown>> =>\n\tisRecord(value) && isAngularComponent(value.component);\n\nconst resolvePageComponent = (pageModule: Record<string, unknown>) => {\n\tconst page = Reflect.get(pageModule, 'page');\n\tif (isAngularPageDefinition(page)) {\n\t\treturn page.component;\n\t}\n\n\tconst defaultExport = pageModule.default;\n\tif (isAngularPageDefinition(defaultExport)) {\n\t\treturn defaultExport.component;\n\t}\n\n\tif (isAngularComponent(defaultExport)) {\n\t\treturn defaultExport;\n\t}\n\n\treturn Object.values(pageModule).find((value) => isAngularComponent(value));\n};\n\nlet compilerImportPromise: Promise<unknown> | null = null;\nconst ensureAngularCompiler = () => {\n\tif (!compilerImportPromise) {\n\t\tcompilerImportPromise = import(\n\t\t\tresolveAngularRuntimePath('@angular/compiler')\n\t\t);\n\t}\n\n\treturn compilerImportPromise;\n};\n\nconst readAngularPageModule = (value: unknown) =>\n\tisRecord(value) ? value : null;\n\nconst resolveAngularSsrOutDir = () =>\n\tprocess.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ??\n\tjoin(tmpdir(), 'absolutejs', 'generated', 'angular-ssr');\n\nconst ensureAngularSsrNodeModules = async (outDir: string) => {\n\tconst outRoot = resolve(dirname(dirname(outDir)));\n\tconst nodeModulesLink = join(outRoot, 'node_modules');\n\tif (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {\n\t\treturn;\n\t}\n\tif (nodeModulesLink === resolve(process.cwd(), 'node_modules')) {\n\t\treturn;\n\t}\n\tif (await Bun.file(nodeModulesLink).exists()) {\n\t\treturn;\n\t}\n\n\tawait mkdir(outRoot, { recursive: true });\n\ttry {\n\t\tawait symlink(\n\t\t\tresolve(process.cwd(), 'node_modules'),\n\t\t\tnodeModulesLink,\n\t\t\t'dir'\n\t\t);\n\t} catch (error) {\n\t\tif (\n\t\t\t!(error instanceof Error) ||\n\t\t\t!('code' in error) ||\n\t\t\terror.code !== 'EEXIST'\n\t\t) {\n\t\t\tthrow error;\n\t\t}\n\t}\n};\n\nconst resolveRuntimeAngularModulePath = async (pagePath: string) => {\n\tif (!pagePath.endsWith('.ts')) {\n\t\treturn pagePath;\n\t}\n\n\tconst outDir = resolveAngularSsrOutDir();\n\tawait ensureAngularSsrNodeModules(outDir);\n\tconst { compileAngularFileJIT } = await import('../build/compileAngular');\n\tconst outputs = await compileAngularFileJIT(\n\t\tpagePath,\n\t\toutDir,\n\t\tprocess.cwd()\n\t);\n\tconst expectedFileName = basename(pagePath).replace(/\\.ts$/, '.js');\n\n\treturn (\n\t\toutputs.find((output) => output.endsWith(`/${expectedFileName}`)) ??\n\t\toutputs.find((output) => output.endsWith(`\\\\${expectedFileName}`)) ??\n\t\toutputs[0] ??\n\t\tpagePath\n\t);\n};\n\nconst withHtmlContentType = (responseInit: ResponseInit = {}) => {\n\tconst headers = new Headers(responseInit.headers);\n\tif (!headers.has('Content-Type')) {\n\t\theaders.set('Content-Type', 'text/html');\n\t}\n\n\treturn { ...responseInit, headers };\n};\n\nconst resolveRequestRenderUrl = (request: Request | undefined) => {\n\tif (!request) return '/';\n\n\ttry {\n\t\tconst parsed = new URL(request.url);\n\n\t\treturn `${parsed.pathname}${parsed.search}`;\n\t} catch {\n\t\treturn '/';\n\t}\n};\n\nconst assertNoHandlerProviders = (input: Record<string, unknown>) => {\n\tif (!('providers' in input)) return;\n\n\tthrow new Error(\n\t\t'Angular handler providers are not supported. Export `providers` from the Angular page module, or inject REQUEST / REQUEST_CONTEXT for request-scoped data.'\n\t);\n};\n\nexport const invalidateAngularSsrCache = () => {\n\tmarkSsrCacheDirty('angular');\n\tclearSelectorCache();\n};\n\nconst angularSsrContext = new AsyncLocalStorage<string>();\nsetSsrContextGetter(() => angularSsrContext.getStore());\n\nexport const handleAngularPageRequest = async <\n\tPage = { page: AngularPageDefinition<Record<never, never>> }\n>(\n\tinput: AngularPageRequestInput<Page>\n) => {\n\tconst requestId = `angular_${Date.now()}_${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;\n\n\treturn angularSsrContext.run(requestId, async () => {\n\t\tawait ensureAngularCompiler();\n\n\t\tconst resolvedHeadTag = input.headTag ?? '<head></head>';\n\t\tconst resolvedIndexPath = input.indexPath;\n\t\tconst options = input;\n\t\tconst resolvedPagePath = input.pagePath;\n\t\tconst maybeProps = input.props;\n\t\tconst responseInit = input.responseInit ?? {};\n\t\tconst resolvedUrl = resolveRequestRenderUrl(input.request);\n\n\t\t// Cache props + headTag for HMR replay — strip query strings\n\t\t// so cache-busted HMR paths match the original manifest path.\n\t\tcacheRouteData(resolvedPagePath, {\n\t\t\theadTag: resolvedHeadTag,\n\t\t\tprops: maybeProps\n\t\t});\n\n\t\tif (isSsrCacheDirty('angular')) {\n\t\t\tclearSelectorCache();\n\t\t\tconst script = resolvedIndexPath\n\t\t\t\t? `<script>import(${JSON.stringify(resolvedIndexPath)});</script>`\n\t\t\t\t: '';\n\t\t\tconst html = `<!DOCTYPE html><html>${resolvedHeadTag}<body><${lastSelector}></${lastSelector}>${script}</body></html>`;\n\n\t\t\treturn new Response(html, {\n\t\t\t\theaders: { 'Content-Type': 'text/html' }\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tassertNoHandlerProviders(input);\n\n\t\t\tconst handlerCallsite =\n\t\t\t\toptions?.collectStreamingSlots === true\n\t\t\t\t\t? undefined\n\t\t\t\t\t: (getCurrentRouteRegistrationCallsite() ??\n\t\t\t\t\t\tcaptureStreamingSlotWarningCallsite());\n\t\t\tconst renderPageResponse = async () => {\n\t\t\t\tconst baseDeps = await getAngularDeps();\n\t\t\t\tconst runtimePagePath =\n\t\t\t\t\tawait resolveRuntimeAngularModulePath(resolvedPagePath);\n\t\t\t\tconst importedPageModule: unknown = await import(\n\t\t\t\t\truntimePagePath\n\t\t\t\t);\n\t\t\t\tconst pageModule = readAngularPageModule(importedPageModule);\n\t\t\t\tif (!pageModule) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Invalid Angular page module: ${resolvedPagePath}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst PageComponent = resolvePageComponent(pageModule);\n\t\t\t\tif (!isAngularComponent(PageComponent)) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Angular page module must export an Angular component: ${resolvedPagePath}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst hasIslands =\n\t\t\t\t\ttypeof pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ ===\n\t\t\t\t\t'boolean'\n\t\t\t\t\t\t? pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__\n\t\t\t\t\t\t: false;\n\t\t\t\tconst usesLegacyAnimations =\n\t\t\t\t\tpageModule.__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ ===\n\t\t\t\t\ttrue;\n\n\t\t\t\tconst ssrResult = await loadSsrDeps(runtimePagePath);\n\t\t\t\tconst deps = buildDeps(ssrResult, baseDeps);\n\n\t\t\t\tconst tokenMap = discoverTokens(pageModule);\n\t\t\t\tconst selector = resolveSelector(\n\t\t\t\t\tdeps,\n\t\t\t\t\tresolvedPagePath,\n\t\t\t\t\tPageComponent\n\t\t\t\t);\n\t\t\t\tlastSelector = selector;\n\n\t\t\t\tconst htmlString = `<!DOCTYPE html><html>${resolvedHeadTag}<body><${selector}></${selector}></body></html>`;\n\n\t\t\t\tif (ssrResult?.core) resetSsrSanitizer();\n\t\t\t\tconst sanitizer = getSsrSanitizer(deps);\n\t\t\t\t// The page module's `providers` export is the source of truth\n\t\t\t\t// for page-level DI — `bootstrapApplication` reads it on the\n\t\t\t\t// client (see compileAngular.ts client bootstrap). Mirror that\n\t\t\t\t// on the server so anything that requires `provideRouter`,\n\t\t\t\t// `provideAnimations`, etc. resolves the same way during SSR.\n\t\t\t\tconst pageProvidersExport = Reflect.get(\n\t\t\t\t\tpageModule,\n\t\t\t\t\t'providers'\n\t\t\t\t);\n\t\t\t\tconst pageProviders: ReadonlyArray<\n\t\t\t\t\tProvider | EnvironmentProviders\n\t\t\t\t> = Array.isArray(pageProvidersExport)\n\t\t\t\t\t? pageProvidersExport\n\t\t\t\t\t: [];\n\t\t\t\tconst combinedProviders = [\n\t\t\t\t\t...(await buildRouterRedirectProviders(deps, responseInit)),\n\t\t\t\t\t...pageProviders,\n\t\t\t\t\t...(await buildServerAnimationProviders(\n\t\t\t\t\t\tusesLegacyAnimations\n\t\t\t\t\t))\n\t\t\t\t];\n\t\t\t\tconst providers = buildProviders(\n\t\t\t\t\tdeps,\n\t\t\t\t\tsanitizer,\n\t\t\t\t\tmaybeProps,\n\t\t\t\t\ttokenMap,\n\t\t\t\t\tinput.request,\n\t\t\t\t\tinput.requestContext,\n\t\t\t\t\tresponseInit,\n\t\t\t\t\tcombinedProviders\n\t\t\t\t);\n\n\t\t\t\tconst rawHtml: string = await renderAngularApp(\n\t\t\t\t\tdeps,\n\t\t\t\t\tPageComponent,\n\t\t\t\t\tproviders,\n\t\t\t\t\thtmlString,\n\t\t\t\t\tresolvedUrl\n\t\t\t\t);\n\t\t\t\tconst shouldProcessIslands =\n\t\t\t\t\thasIslands || rawHtml.includes('<absolute-island');\n\t\t\t\tconst htmlWithLoweredIslands = shouldProcessIslands\n\t\t\t\t\t? await lowerAngularServerIslands(rawHtml)\n\t\t\t\t\t: rawHtml;\n\n\t\t\t\tconst html = injectIslandPageContext(\n\t\t\t\t\tinjectSsrScripts(\n\t\t\t\t\t\thtmlWithLoweredIslands,\n\t\t\t\t\t\trequestId,\n\t\t\t\t\t\tresolvedIndexPath,\n\t\t\t\t\t\tmaybeProps\n\t\t\t\t\t),\n\t\t\t\t\t{ hasIslands: shouldProcessIslands }\n\t\t\t\t);\n\n\t\t\t\treturn new Response(html, withHtmlContentType(responseInit));\n\t\t\t};\n\n\t\t\treturn await runWithStreamingSlotWarningScope(\n\t\t\t\t() =>\n\t\t\t\t\toptions?.collectStreamingSlots === true\n\t\t\t\t\t\t? withRegisteredStreamingSlots(\n\t\t\t\t\t\t\t\trenderPageResponse,\n\t\t\t\t\t\t\t\toptions\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: renderPageResponse(),\n\t\t\t\t{ handlerCallsite }\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error('[SSR] Angular render error:', error);\n\n\t\t\tconst pageName = derivePageName(resolvedPagePath);\n\t\t\tconst conventionResponse = await renderConventionError(\n\t\t\t\t'angular',\n\t\t\t\tpageName,\n\t\t\t\terror\n\t\t\t);\n\t\t\tif (conventionResponse) return conventionResponse;\n\n\t\t\treturn new Response(ssrErrorPage('angular', error), {\n\t\t\t\theaders: { 'Content-Type': 'text/html' },\n\t\t\t\tstatus: 500\n\t\t\t});\n\t\t}\n\t});\n};\n",
|
|
6
|
-
"import type { EnvironmentProviders, Provider } from '@angular/core';\nimport { resolveAngularRuntimePath } from './resolveAngularPackage';\n\nlet noopAnimationProvidersPromise: Promise<\n\t(Provider | EnvironmentProviders)[]\n> | null = null;\n\nconst loadNoopAnimationProviders = async () => {\n\tconst animations = await import(\n\t\tresolveAngularRuntimePath('@angular/platform-browser/animations')\n\t);\n\n\treturn animations.provideNoopAnimations();\n};\n\nexport const buildServerAnimationProviders = (\n\tusesLegacyAnimations: boolean\n) => {\n\tif (!usesLegacyAnimations) return Promise.resolve([]);\n\n\tnoopAnimationProvidersPromise ??= loadNoopAnimationProviders();\n\n\treturn noopAnimationProvidersPromise;\n};\n",
|
|
7
|
-
"import type { EnvironmentProviders, Provider } from '@angular/core';\nimport type { AngularDeps } from '../../types/angular';\nimport { resolveAngularPackage } from './resolveAngularPackage';\n\ntype AngularRouterModule = typeof import('@angular/router');\n\nconst DEFAULT_REDIRECT_STATUS = 302;\nconst SUCCESS_STATUS = 200;\n\nconst isRouterRedirectCancel = (\n\tevent: unknown,\n\trouterModule: AngularRouterModule\n) =>\n\tevent instanceof routerModule.NavigationCancel &&\n\tevent.code === routerModule.NavigationCancellationCode.Redirect;\n\nconst getNavigationStartUrl = (\n\tevent: unknown,\n\trouterModule: AngularRouterModule\n) => {\n\tif (!(event instanceof routerModule.NavigationStart)) return null;\n\n\treturn event.url;\n};\n\nconst applyRedirectResponse = (\n\tresponseInit: ResponseInit | undefined,\n\tlocation: string\n) => {\n\tif (!responseInit) return;\n\n\tconst headers = new Headers(responseInit.headers);\n\theaders.set('Location', location);\n\tresponseInit.headers = headers;\n\n\tif (\n\t\ttypeof responseInit.status === 'undefined' ||\n\t\tresponseInit.status === SUCCESS_STATUS\n\t) {\n\t\tresponseInit.status = DEFAULT_REDIRECT_STATUS;\n\t}\n};\n\nconst buildRedirectEventHandler = (\n\tresponseInit: ResponseInit | undefined,\n\trouterModule: AngularRouterModule\n) => {\n\tlet waitingForRedirectTarget = false;\n\n\treturn (event: unknown) => {\n\t\tif (isRouterRedirectCancel(event, routerModule)) {\n\t\t\twaitingForRedirectTarget = true;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!waitingForRedirectTarget) return;\n\n\t\tconst redirectUrl = getNavigationStartUrl(event, routerModule);\n\t\tif (!redirectUrl) return;\n\n\t\tapplyRedirectResponse(responseInit, redirectUrl);\n\t\twaitingForRedirectTarget = false;\n\t};\n};\n\nexport const buildRouterRedirectProviders = async (\n\tdeps: AngularDeps,\n\tresponseInit: ResponseInit | undefined\n) => {\n\tlet routerModule: AngularRouterModule;\n\n\ttry {\n\t\trouterModule = await import(resolveAngularPackage('@angular/router'));\n\t} catch {\n\t\treturn [];\n\t}\n\n\treturn [\n\t\t{\n\t\t\tmulti: true,\n\t\t\tprovide: deps.ENVIRONMENT_INITIALIZER,\n\t\t\tuseValue: () => {\n\t\t\t\tconst router = deps.inject(routerModule.Router, {\n\t\t\t\t\toptional: true\n\t\t\t\t});\n\t\t\t\tif (!router) return;\n\n\t\t\t\trouter.events.subscribe(\n\t\t\t\t\tbuildRedirectEventHandler(responseInit, routerModule)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t] satisfies (Provider | EnvironmentProviders)[];\n};\n",
|
|
8
|
-
"import type {\n\tIslandFramework,\n\tIslandHydrate,\n\tRuntimeIslandRenderProps\n} from '../../types/island';\nimport { requireCurrentIslandRegistry } from '../core/currentIslandRegistry';\nimport { renderIslandMarkup } from '../core/renderIslandMarkup';\n\nconst ANGULAR_ISLAND_TAG_RE =\n\t/<absolute-island\\b([^>]*)>[\\s\\S]*?<\\/absolute-island>/gi;\nconst ATTRIBUTE_RE =\n\t/([A-Za-z_:][-A-Za-z0-9_:.]*)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/g;\n\nconst islandFrameworks: IslandFramework[] = [\n\t'react',\n\t'svelte',\n\t'vue',\n\t'angular'\n];\n\nconst islandHydrationModes: IslandHydrate[] = [\n\t'load',\n\t'idle',\n\t'visible',\n\t'none'\n];\n\nconst decodeHtmlAttribute = (value: string) =>\n\tvalue\n\t\t.replaceAll('"', '\"')\n\t\t.replaceAll('"', '\"')\n\t\t.replaceAll(''', \"'\")\n\t\t.replaceAll(''', \"'\")\n\t\t.replaceAll('&', '&')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>');\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\nconst isIslandFramework = (value: string): value is IslandFramework =>\n\tislandFrameworks.some((framework) => framework === value);\n\nconst isIslandHydrate = (value: string): value is IslandHydrate =>\n\tislandHydrationModes.some((mode) => mode === value);\n\nconst parseAttributes = (attributeString: string) => {\n\tconst attributes = new Map<string, string>();\n\tlet match = ATTRIBUTE_RE.exec(attributeString);\n\n\twhile (match) {\n\t\tconst [, key, doubleQuotedValue, singleQuotedValue] = match;\n\t\tmatch = ATTRIBUTE_RE.exec(attributeString);\n\t\tif (!key) continue;\n\n\t\tattributes.set(\n\t\t\tkey,\n\t\t\tdecodeHtmlAttribute(doubleQuotedValue ?? singleQuotedValue ?? '')\n\t\t);\n\t}\n\n\tATTRIBUTE_RE.lastIndex = 0;\n\n\treturn attributes;\n};\n\nconst parseAngularIslandProps = (\n\tattributeString: string\n): RuntimeIslandRenderProps | null => {\n\tconst attributes = parseAttributes(attributeString);\n\tconst component = attributes.get('component');\n\tconst framework = attributes.get('framework');\n\tconst hydrate = attributes.get('hydrate') ?? 'load';\n\tconst serializedProps = attributes.get('data-abs-props') ?? '{}';\n\n\tif (!component || !framework) {\n\t\treturn null;\n\t}\n\n\tif (!isIslandFramework(framework) || !isIslandHydrate(hydrate)) {\n\t\treturn null;\n\t}\n\n\tlet parsedProps: Record<string, unknown> = {};\n\ttry {\n\t\tconst candidate: unknown = JSON.parse(serializedProps);\n\t\tparsedProps = isRecord(candidate) ? candidate : {};\n\t} catch {\n\t\t// parsedProps remains default {}\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tframework,\n\t\thydrate,\n\t\tprops: parsedProps\n\t};\n};\n\nexport const lowerAngularServerIslands = async (html: string) => {\n\tif (!ANGULAR_ISLAND_TAG_RE.test(html)) {\n\t\treturn html;\n\t}\n\n\tconst registry = requireCurrentIslandRegistry();\n\tANGULAR_ISLAND_TAG_RE.lastIndex = 0;\n\n\tconst segments: {\n\t\tbefore: string;\n\t\tprops: ReturnType<typeof parseAngularIslandProps>;\n\t\tfullMatch: string;\n\t}[] = [];\n\tlet lastIndex = 0;\n\tlet match = ANGULAR_ISLAND_TAG_RE.exec(html);\n\n\twhile (match) {\n\t\tconst [fullMatch, rawAttributeString] = match;\n\t\tconst attributeString = rawAttributeString ?? '';\n\t\tsegments.push({\n\t\t\tbefore: html.slice(lastIndex, match.index),\n\t\t\tfullMatch,\n\t\t\tprops: parseAngularIslandProps(attributeString)\n\t\t});\n\t\tlastIndex = match.index + fullMatch.length;\n\t\tmatch = ANGULAR_ISLAND_TAG_RE.exec(html);\n\t}\n\n\tANGULAR_ISLAND_TAG_RE.lastIndex = 0;\n\n\tconst renderedSegments = await Promise.all(\n\t\tsegments.map(\n\t\t\tasync (segment) =>\n\t\t\t\tsegment.before +\n\t\t\t\t(segment.props\n\t\t\t\t\t? await renderIslandMarkup(registry, segment.props)\n\t\t\t\t\t: segment.fullMatch)\n\t\t)\n\t);\n\n\treturn renderedSegments.join('') + html.slice(lastIndex);\n};\n",
|
|
9
|
-
"import type { SecurityContext } from '@angular/core';\nimport type { SafeValue } from '@angular/platform-browser';\nimport type { AngularDeps } from '../../types/angular';\n\nconst escapeHtml = (str: string) =>\n\tString(str)\n\t\t.replace(/&/g, '&')\n\t\t.replace(/</g, '<')\n\t\t.replace(/>/g, '>')\n\t\t.replace(/\"/g, '"');\n\nconst bypassValue = (value: string): SafeValue => ({\n\tchangingThisBreaksApplicationSecurity: value\n});\n\n// Deferred: SsrSanitizer class is built after deps load because it\n// extends DomSanitizer which comes from the lazy import. We cache the\n// class + singleton instance after the first request.\nlet ssrSanitizer: InstanceType<AngularDeps['DomSanitizer']> | null = null;\n\nexport const getSsrSanitizer = (deps: AngularDeps) => {\n\tif (ssrSanitizer) return ssrSanitizer;\n\n\tconst SsrSanitizerClass = class extends deps.DomSanitizer {\n\t\tsanitize(ctx: SecurityContext, value: SafeValue | string | null) {\n\t\t\tif (value === null) return null;\n\t\t\tlet strValue: string;\n\t\t\tlet isTrustedHtml = false;\n\t\t\tif (typeof value === 'string') {\n\t\t\t\tstrValue = value;\n\t\t\t} else if (\n\t\t\t\ttypeof value === 'object' &&\n\t\t\t\t'changingThisBreaksApplicationSecurity' in value\n\t\t\t) {\n\t\t\t\tstrValue = String(value.changingThisBreaksApplicationSecurity);\n\t\t\t\tisTrustedHtml = true;\n\t\t\t} else {\n\t\t\t\tstrValue = String(value);\n\t\t\t}\n\n\t\t\tif (ctx === deps.SecurityContext.HTML) {\n\t\t\t\tif (isTrustedHtml) {\n\t\t\t\t\treturn strValue;\n\t\t\t\t}\n\n\t\t\t\treturn escapeHtml(strValue);\n\t\t\t}\n\n\t\t\treturn strValue;\n\t\t}\n\t\tbypassSecurityTrustHtml(value: string) {\n\t\t\treturn bypassValue(value);\n\t\t}\n\t\tbypassSecurityTrustStyle(value: string) {\n\t\t\treturn bypassValue(value);\n\t\t}\n\t\tbypassSecurityTrustScript(value: string) {\n\t\t\treturn bypassValue(value);\n\t\t}\n\t\tbypassSecurityTrustUrl(value: string) {\n\t\t\treturn bypassValue(value);\n\t\t}\n\t\tbypassSecurityTrustResourceUrl(value: string) {\n\t\t\treturn bypassValue(value);\n\t\t}\n\t};\n\n\tssrSanitizer = new SsrSanitizerClass();\n\n\treturn ssrSanitizer;\n};\nexport const resetSsrSanitizer = () => {\n\tssrSanitizer = null;\n};\n"
|
|
10
|
-
],
|
|
11
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;;;ACAA,IAAI,gCAEO;AAEX,IAAM,6BAA6B,YAAY;AAAA,EAC9C,MAAM,aAAa,MAClB,iCAA0B,sCAAsC;AAAA,EAGjE,OAAO,WAAW,sBAAsB;AAAA;AAGlC,IAAM,gCAAgC,CAC5C,yBACI;AAAA,EACJ,IAAI,CAAC;AAAA,IAAsB,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAAA,EAEpD,kCAAkC,2BAA2B;AAAA,EAE7D,OAAO;AAAA;;;AChBR,IAAM,0BAA0B;AAChC,IAAM,iBAAiB;AAEvB,IAAM,yBAAyB,CAC9B,OACA,iBAEA,iBAAiB,aAAa,oBAC9B,MAAM,SAAS,aAAa,2BAA2B;AAExD,IAAM,wBAAwB,CAC7B,OACA,iBACI;AAAA,EACJ,IAAI,EAAE,iBAAiB,aAAa;AAAA,IAAkB,OAAO;AAAA,EAE7D,OAAO,MAAM;AAAA;AAGd,IAAM,wBAAwB,CAC7B,cACA,aACI;AAAA,EACJ,IAAI,CAAC;AAAA,IAAc;AAAA,EAEnB,MAAM,UAAU,IAAI,QAAQ,aAAa,OAAO;AAAA,EAChD,QAAQ,IAAI,YAAY,QAAQ;AAAA,EAChC,aAAa,UAAU;AAAA,EAEvB,IACC,OAAO,aAAa,WAAW,eAC/B,aAAa,WAAW,gBACvB;AAAA,IACD,aAAa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BAA0B,OAChC,6BACA,oBACA,OACD,IACC,mBAAmB,GACvB,EAAE,gBAAgB,CACnB;AAAA,MACC,OAAO,OAAO;AAAA,MACf,QAAQ,MAAM,+BAA+B,KAAK;AAAA,MAElD,MAAM,WAAW,eAAe,gBAAgB;AAAA,MAChD,MAAM,qBAAqB,MAAM,sBAChC,WACA,UACA,KACD;AAAA,MACA,IAAI;AAAA,QAAoB,OAAO;AAAA,MAE/B,OAAO,IAAI,SAAS,aAAa,WAAW,KAAK,GAAG;AAAA,QACnD,SAAS,EAAE,gBAAgB,YAAY;AAAA,QACvC,QAAQ;AAAA,MACT,CAAC;AAAA;AAAA,GAEF;AAAA;",
|
|
12
|
-
"debugId": "CC58F9C2681B12B164756E2164756E21",
|
|
13
|
-
"names": []
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/build/buildAngularVendor.ts", "../src/build/angularLinkerPlugin.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { mkdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { rm } from 'node:fs/promises';\nimport { build as bunBuild, Glob } from 'bun';\nimport { createAngularLinkerPlugin } from './angularLinkerPlugin';\nimport { generateVendorEntrySource } from './vendorEntrySource';\n\n/** Always-vendored Angular packages.\n * Required for any Angular page even if not imported in user code: the runtime\n * needs them to bootstrap. Server-only packages (@angular/platform-server) are\n * excluded. Additional @angular/* packages are auto-discovered from source. */\nconst REQUIRED_ANGULAR_SPECIFIERS = [\n\t'@angular/core',\n\t'@angular/compiler',\n\t'@angular/common',\n\t'@angular/common/http',\n\t'@angular/platform-browser'\n];\n\n/** Build-only / server-only specifiers that should never be browser-vendored. */\nconst SERVER_ONLY_ANGULAR_SPECIFIERS = new Set([\n\t'@angular/platform-server',\n\t'@angular/ssr',\n\t'@angular/compiler-cli'\n]);\n\nconst SCAN_SKIP_DIRS = new Set([\n\t'node_modules',\n\t'build',\n\t'dist',\n\t'.absolutejs',\n\t'generated'\n]);\n\nconst isResolvable = (specifier: string) => {\n\ttry {\n\t\tBun.resolveSync(specifier, process.cwd());\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nconst isBareSpecifier = (spec: string) =>\n\t!spec.startsWith('.') && !spec.startsWith('/') && !spec.startsWith('@src/');\n\nconst isAngularBrowserSpecifier = (spec: string) =>\n\tspec.startsWith('@angular/') && !SERVER_ONLY_ANGULAR_SPECIFIERS.has(spec);\n\n/** Scan user source for any imports — both @angular/* (kept) and other bare\n * specs (returned as transitive scan seeds). Finding angular subpaths only\n * reachable through deps (e.g. `@angular/core/rxjs-interop` from\n * `@angular/fire/compat/auth`) requires walking through non-angular roots. */\nconst scanSourceImports = async (directories: string[]) => {\n\tconst angular = new Set<string>();\n\tconst transitiveRoots = new Set<string>();\n\tconst transpiler = new Bun.Transpiler({ loader: 'tsx' });\n\tconst glob = new Glob('**/*.{ts,tsx,js,jsx}');\n\n\tfor (const dir of directories) {\n\t\ttry {\n\t\t\tfor await (const file of glob.scan({ absolute: true, cwd: dir })) {\n\t\t\t\tconst rel = file.slice(dir.length + 1);\n\t\t\t\tconst [first] = rel.split('/');\n\t\t\t\tif (first && SCAN_SKIP_DIRS.has(first)) continue;\n\t\t\t\ttry {\n\t\t\t\t\tconst content = await Bun.file(file).text();\n\t\t\t\t\tfor (const imp of transpiler.scanImports(content)) {\n\t\t\t\t\t\tif (isAngularBrowserSpecifier(imp.path)) {\n\t\t\t\t\t\t\tangular.add(imp.path);\n\t\t\t\t\t\t} else if (isBareSpecifier(imp.path)) {\n\t\t\t\t\t\t\ttransitiveRoots.add(imp.path);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// unreadable file, skip\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// missing dir, skip\n\t\t}\n\t}\n\n\treturn { angular, transitiveRoots };\n};\n\n/** Walk through transitive deps and harvest any @angular/* subpaths reachable\n * via non-angular packages (e.g. firebase imports `@angular/core/rxjs-interop`\n * through @angular/fire). Mirrors buildDepVendor's framework-root traversal. */\nconst collectTransitiveAngularSpecs = async (\n\troots: Iterable<string>,\n\tangularFound: Set<string>\n) => {\n\tconst { readFileSync } = await import('node:fs');\n\tconst transpiler = new Bun.Transpiler({ loader: 'js' });\n\tconst visited = new Set<string>();\n\tconst frontier: string[] = [];\n\tfor (const r of roots) frontier.push(r);\n\n\tconst MAX_PASSES = 5;\n\tfor (let pass = 0; pass < MAX_PASSES; pass++) {\n\t\tconst next: string[] = [];\n\t\tfor (const spec of frontier) {\n\t\t\tif (visited.has(spec)) continue;\n\t\t\tvisited.add(spec);\n\t\t\tlet resolved: string;\n\t\t\ttry {\n\t\t\t\tresolved = Bun.resolveSync(spec, process.cwd());\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet content: string;\n\t\t\ttry {\n\t\t\t\tcontent = readFileSync(resolved, 'utf-8');\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet imports;\n\t\t\ttry {\n\t\t\t\timports = transpiler.scanImports(content);\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const imp of imports) {\n\t\t\t\tconst child = imp.path;\n\t\t\t\tif (!isBareSpecifier(child)) continue;\n\t\t\t\tif (visited.has(child)) continue;\n\t\t\t\tif (isAngularBrowserSpecifier(child)) {\n\t\t\t\t\tangularFound.add(child);\n\t\t\t\t}\n\t\t\t\tnext.push(child);\n\t\t\t}\n\t\t}\n\t\tif (next.length === 0) break;\n\t\tfrontier.length = 0;\n\t\tfor (const s of next) frontier.push(s);\n\t}\n};\n\n/** Convert a bare specifier to a safe filename:\n * @angular/common/http → angular_common_http */\nconst toSafeFileName = (specifier: string) =>\n\tspecifier.replace(/^@/, '').replace(/\\//g, '_');\n\nconst resolveAngularSpecifiers = async (directories: string[]) => {\n\tconst { angular, transitiveRoots } = await scanSourceImports(directories);\n\tfor (const spec of REQUIRED_ANGULAR_SPECIFIERS) angular.add(spec);\n\tawait collectTransitiveAngularSpecs(\n\t\t[...angular, ...transitiveRoots],\n\t\tangular\n\t);\n\n\treturn Array.from(angular).filter(isResolvable);\n};\n\n/** Build vendor bundles for every @angular/* package the project imports.\n * `linkerJitMode` controls whether NgModule definitions retain their\n * declarations/exports — required when consumer (user) components are\n * runtime-compiled by `@angular/compiler` (dev/HMR via compileAngularFileJIT).\n * Production AOT builds set this to false to match AOT'd user components.\n *\n * `depVendorSpecifiers` are non-framework packages that are also vendored\n * separately (by `buildDepVendor`). They MUST be externalized here too —\n * otherwise transitive imports like `@angular/fire/compat/auth` →\n * `firebase/compat/auth` get bundled twice, creating duplicate\n * @firebase/app-compat instances. The angular-vendor copy registers\n * `firebase.auth.*` on its own firebase singleton, leaving the user's\n * `import firebase from 'firebase/compat/app'` with `firebase.auth` undefined.\n * Externalizing forces both pipelines to share the same /vendor chunks. */\nexport const buildAngularVendor = async (\n\tbuildDir: string,\n\tdirectories: string[] = [],\n\tlinkerJitMode = false,\n\tdepVendorSpecifiers: string[] = []\n) => {\n\tconst vendorDir = join(buildDir, 'angular', 'vendor');\n\tmkdirSync(vendorDir, { recursive: true });\n\n\tconst tmpDir = join(buildDir, '_angular_vendor_tmp');\n\tmkdirSync(tmpDir, { recursive: true });\n\n\tconst specifiers = await resolveAngularSpecifiers(directories);\n\n\t// Angular packages are proper ESM. `export *` re-exports only NAMED exports\n\t// per ECMA spec, so we use the namespace-default-fallback pattern that's\n\t// safe regardless of whether the package has a default export.\n\tconst entrypoints = await Promise.all(\n\t\tspecifiers.map(async (specifier) => {\n\t\t\tconst safeName = toSafeFileName(specifier);\n\t\t\tconst entryPath = join(tmpDir, `${safeName}.ts`);\n\t\t\tawait Bun.write(entryPath, generateVendorEntrySource(specifier));\n\n\t\t\treturn entryPath;\n\t\t})\n\t);\n\n\tconst result = await bunBuild({\n\t\tentrypoints,\n\t\texternal: depVendorSpecifiers,\n\t\tformat: 'esm',\n\t\tminify: false,\n\t\tnaming: '[name].[ext]',\n\t\toutdir: vendorDir,\n\t\tplugins: [createAngularLinkerPlugin(linkerJitMode)],\n\t\tsplitting: true,\n\t\ttarget: 'browser',\n\t\tthrow: false\n\t});\n\n\tawait rm(tmpDir, { force: true, recursive: true });\n\n\tif (!result.success) {\n\t\tconsole.warn('⚠️ Angular vendor build had errors:', result.logs);\n\t}\n\n\treturn specifiers;\n};\nexport const computeAngularVendorPaths = (\n\tspecifiers: string[] = REQUIRED_ANGULAR_SPECIFIERS\n) => {\n\tconst paths: Record<string, string> = {};\n\tfor (const specifier of specifiers) {\n\t\tpaths[specifier] = `/angular/vendor/${toSafeFileName(specifier)}.js`;\n\t}\n\n\treturn paths;\n};\n\n/** Async variant that scans source + transitive deps before producing the\n * vendor path map. Use this when the page-bundle build needs the full set of\n * angular specs in its rewrite map (otherwise transitively-discovered subpaths\n * like `@angular/core/rxjs-interop` end up as bare specifiers in the output). */\nexport const computeAngularVendorPathsAsync = async (\n\tdirectories: string[] = []\n) => {\n\tconst specifiers = await resolveAngularSpecifiers(directories);\n\n\treturn computeAngularVendorPaths(specifiers);\n};\n\n/** Server-side counterpart to `buildAngularVendor`. Outputs fully-linked\n * Bun-target ESM bundles for every @angular/* package the project uses,\n * *plus* `@angular/platform-server` and `@angular/ssr` (excluded from the\n * browser vendor). The server bundle and `getAngularDeps()` import from\n * these paths so SSR shares one Angular runtime instance with the page\n * bundles — eliminates the dual-package hazard that produces NG0201.\n *\n * After this build, `@angular/compiler` is no longer required at runtime\n * for AOT-mode builds: every partial `ɵɵngDeclare*` has been linked into\n * final ɵdir/ɵcmp/ɵfac definitions in the vendor output. */\nexport const buildAngularServerVendor = async (\n\tbuildDir: string,\n\tdirectories: string[] = [],\n\tlinkerJitMode = false\n) => {\n\tconst vendorDir = join(buildDir, 'angular', 'vendor', 'server');\n\tmkdirSync(vendorDir, { recursive: true });\n\n\tconst tmpDir = join(buildDir, '_angular_server_vendor_tmp');\n\tmkdirSync(tmpDir, { recursive: true });\n\n\tconst browserSpecs = await resolveAngularSpecifiers(directories);\n\tconst allSpecs = new Set(browserSpecs);\n\tfor (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {\n\t\tif (isResolvable(spec)) allSpecs.add(spec);\n\t}\n\tconst specifiers = Array.from(allSpecs);\n\n\tconst entrypoints = await Promise.all(\n\t\tspecifiers.map(async (specifier) => {\n\t\t\tconst safeName = toSafeFileName(specifier);\n\t\t\tconst entryPath = join(tmpDir, `${safeName}.ts`);\n\t\t\tawait Bun.write(entryPath, generateVendorEntrySource(specifier));\n\n\t\t\treturn entryPath;\n\t\t})\n\t);\n\n\tconst result = await bunBuild({\n\t\tentrypoints,\n\t\tformat: 'esm',\n\t\tminify: false,\n\t\tnaming: '[name].[ext]',\n\t\toutdir: vendorDir,\n\t\tplugins: [createAngularLinkerPlugin(linkerJitMode)],\n\t\tsplitting: true,\n\t\ttarget: 'bun',\n\t\tthrow: false\n\t});\n\n\tawait rm(tmpDir, { force: true, recursive: true });\n\n\tif (!result.success) {\n\t\tconsole.warn(\n\t\t\t'⚠️ Angular server vendor build had errors:',\n\t\t\tresult.logs\n\t\t);\n\t}\n\n\treturn specifiers;\n};\n\n/** Absolute filesystem paths to server vendor files, for `rewriteImports`\n * on server-side bundles and for runtime resolution in `getAngularDeps`. */\nexport const computeAngularServerVendorPaths = (\n\tbuildDir: string,\n\tspecifiers: string[]\n) => {\n\tconst paths: Record<string, string> = {};\n\tconst vendorDir = join(buildDir, 'angular', 'vendor', 'server');\n\tfor (const specifier of specifiers) {\n\t\tpaths[specifier] = join(vendorDir, `${toSafeFileName(specifier)}.js`);\n\t}\n\n\treturn paths;\n};\n\n/** Async server-vendor path map: scans source + transitive deps, then\n * produces absolute filesystem paths for every @angular/* spec the project\n * uses (plus the always-vendored server-only specs). Mirrors\n * `computeAngularVendorPathsAsync` but for server-side rewriting. */\nexport const computeAngularServerVendorPathsAsync = async (\n\tbuildDir: string,\n\tdirectories: string[] = []\n) => {\n\tconst browserSpecs = await resolveAngularSpecifiers(directories);\n\tconst allSpecs = new Set(browserSpecs);\n\tfor (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {\n\t\tif (isResolvable(spec)) allSpecs.add(spec);\n\t}\n\n\treturn computeAngularServerVendorPaths(buildDir, Array.from(allSpecs));\n};\n",
|
|
6
|
-
"import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join, relative, resolve } from 'node:path';\nimport { createHash } from 'node:crypto';\nimport type { BunPlugin } from 'bun';\n\nconst CACHE_ROOT = resolve('.absolutejs', 'cache', 'angular-linker');\n\n/**\n * Bun bundler plugin that runs the Angular Linker on partially compiled\n * Angular libraries at build time. Converts ɵɵngDeclare* declarations\n * into fully linked code.\n *\n * The `linkerJitMode` flag controls whether NgModule definitions retain\n * `declarations`/`exports` (JIT-mode, required when consumer code is\n * runtime-compiled) or strip them (AOT-mode, smaller output but only\n * correct when consumer components have ɵcmp.dependencies baked in by\n * the Angular compiler-cli).\n *\n * In AbsoluteJS dev/HMR, user components are TypeScript-transpiled via\n * `compileAngularFileJIT` and rely on @angular/compiler at runtime —\n * that runtime JIT path reads `NgModule.ɵmod.declarations` to find\n * directives like FormGroupDirective. Linking vendor code in AOT mode\n * (the default) silently breaks dev because declarations get stripped\n * and runtime JIT then can't resolve `[formGroup]`, `[ngIf]`, etc. So\n * dev/HMR builds must use `linkerJitMode: true`. Production AOT builds\n * use `linkerJitMode: false` (matches AOT'd user components).\n *\n * Cache key includes mode so dev and prod artifacts don't collide.\n */\nexport const createAngularLinkerPlugin = (\n\tlinkerJitMode: boolean\n): BunPlugin => ({\n\tname: 'angular-linker',\n\tsetup(bld) {\n\t\tlet needsLinking: ((path: string, source: string) => boolean) | undefined;\n\t\tlet babelTransform: ((source: string, options: Record<string, unknown>) => { code?: string } | null) | undefined;\n\t\tlet linkerPlugin: unknown;\n\n\t\tconst cacheDir = join(CACHE_ROOT, linkerJitMode ? 'jit' : 'aot');\n\n\t\tbld.onLoad(\n\t\t\t{ filter: /[\\\\/]@angular[\\\\/].*\\.m?js$/ },\n\t\t\tasync (args) => {\n\t\t\t\tconst source = await Bun.file(args.path).text();\n\n\t\t\t\tif (!needsLinking) {\n\t\t\t\t\tconst specifier = '@angular/compiler-cli/linker';\n\t\t\t\t\tconst mod = await import(specifier);\n\t\t\t\t\t({ needsLinking } = mod);\n\t\t\t\t}\n\n\t\t\t\tconst checkLink = needsLinking;\n\t\t\t\tif (!checkLink || !checkLink(args.path, source)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst hash = createHash('md5')\n\t\t\t\t\t.update(source)\n\t\t\t\t\t.digest('hex');\n\t\t\t\tconst cachePath = join(cacheDir, `${hash}.js`);\n\n\t\t\t\tif (existsSync(cachePath)) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontents: readFileSync(cachePath, 'utf-8'),\n\t\t\t\t\t\tloader: 'js'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (!babelTransform) {\n\t\t\t\t\tconst babelSpecifier = '@babel/core';\n\t\t\t\t\tconst babel = await import(babelSpecifier);\n\t\t\t\t\tbabelTransform = babel.transformSync;\n\t\t\t\t}\n\t\t\t\tif (!linkerPlugin) {\n\t\t\t\t\tconst linkerSpecifier = '@angular/compiler-cli/linker/babel';\n\t\t\t\t\tconst mod = await import(linkerSpecifier);\n\t\t\t\t\tlinkerPlugin = mod.createEs2015LinkerPlugin({\n\t\t\t\t\t\tfileSystem: {\n\t\t\t\t\t\t\tdirname,\n\t\t\t\t\t\t\texists: existsSync,\n\t\t\t\t\t\t\treadFile: readFileSync,\n\t\t\t\t\t\t\trelative,\n\t\t\t\t\t\t\tresolve\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlinkerJitMode,\n\t\t\t\t\t\tlogger: {\n\t\t\t\t\t\t\terror: console.error,\n\t\t\t\t\t\t\tlevel: 1,\n\t\t\t\t\t\t\twarn: console.warn,\n\t\t\t\t\t\t\tdebug: () => { /* noop */ },\n\t\t\t\t\t\t\tinfo: () => { /* noop */ }\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst transform = babelTransform;\n\t\t\t\tif (!transform) {\n\t\t\t\t\treturn { contents: source, loader: 'js' };\n\t\t\t\t}\n\n\t\t\t\tconst result = transform(source, {\n\t\t\t\t\tcompact: false,\n\t\t\t\t\tfilename: args.path,\n\t\t\t\t\tfilenameRelative: args.path,\n\t\t\t\t\tplugins: [linkerPlugin],\n\t\t\t\t\tsourceMaps: false\n\t\t\t\t});\n\n\t\t\t\tconst linked = result?.code ?? source;\n\n\t\t\t\tmkdirSync(cacheDir, { recursive: true });\n\t\t\t\twriteFileSync(cachePath, linked, 'utf-8');\n\n\t\t\t\treturn { contents: linked, loader: 'js' };\n\t\t\t}\n\t\t);\n\t}\n});\n\n/** Default AOT-mode plugin instance — keep for callers that don't need\n * to choose. Production AOT builds and any callsite that AOT-compiles\n * user components alongside vendor should use this. */\nexport const angularLinkerPlugin: BunPlugin = createAngularLinkerPlugin(false);\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": ";;;;;;;;;AAAA,sBAAS;AACT,iBAAS;AACT;AACA;;;ACHA;AACA;AACA;AAGA,IAAM,aAAa,QAAQ,eAAe,SAAS,gBAAgB;AAwB5D,IAAM,4BAA4B,CACxC,mBACgB;AAAA,EAChB,MAAM;AAAA,EACN,KAAK,CAAC,KAAK;AAAA,IACV,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IAEJ,MAAM,WAAW,KAAK,YAAY,gBAAgB,QAAQ,KAAK;AAAA,IAE/D,IAAI,OACH,EAAE,QAAQ,8BAA8B,GACxC,OAAO,SAAS;AAAA,MACf,MAAM,SAAS,MAAM,IAAI,KAAK,KAAK,IAAI,EAAE,KAAK;AAAA,MAE9C,IAAI,CAAC,cAAc;AAAA,QAClB,MAAM,YAAY;A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AAwB,CAAC,MACrB;AAAA,EACJ,MAAM,eAAe,MAAM,yBAAyB,WAAW;AAAA,EAC/D,MAAM,WAAW,IAAI,IAAI,YAAY;AAAA,EACrC,WAAW,QAAQ,gCAAgC;AAAA,IAClD,IAAI,aAAa,IAAI;AAAA,MAAG,SAAS,IAAI,IAAI;AAAA,EAC1C;AAAA,EAEA,OAAO,gCAAgC,UAAU,MAAM,KAAK,QAAQ,CAAC;AAAA;",
|
|
9
|
-
"debugId": "F45049F8BF9564F964756E2164756E21",
|
|
10
|
-
"names": []
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/angular/angularDeps.ts", "../src/angular/ssrRender.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { AngularDeps, SsrDepsResult } from '../../types/angular';\nimport { patchAngularInjectorSingleton } from './injectorPatch';\nimport { resolveAngularRuntimePath } from './resolveAngularPackage';\n\nconst initDominoAdapter = (platformServer: SsrDepsResult['platformServer']) => {\n\ttry {\n\t\tconst DominoAdapter: { makeCurrent?: () => void } | undefined =\n\t\t\tplatformServer.ɵDominoAdapter;\n\t\tDominoAdapter?.makeCurrent?.();\n\t} catch (err) {\n\t\tconsole.error('Failed to initialize DominoAdapter:', err);\n\t}\n};\n\nconst loadAngularDeps = async () => {\n\t// Patch Angular's _currentInjector to use globalThis BEFORE any\n\t// Angular module is loaded — this prevents NG0203 when Bun's --hot\n\t// mode creates duplicate module instances during HMR rebuilds.\n\tpatchAngularInjectorSingleton();\n\n\t// JIT compiler MUST be fully loaded before any other Angular import.\n\t// Angular packages like @angular/common contain partially compiled\n\t// injectables (e.g. PlatformLocation) that need the JIT compiler\n\t// facade to be registered first.\n\tawait import(resolveAngularRuntimePath('@angular/compiler'));\n\n\t// angularPatch imports @angular/platform-server internally, so it\n\t// must also run after the compiler is available.\n\tconst { applyPatches } = await import('./angularPatch');\n\tawait applyPatches();\n\n\t// Now safe to load all Angular packages in parallel\n\tconst [platformBrowser, platformServer, common, core] = await Promise.all([\n\t\timport(resolveAngularRuntimePath('@angular/platform-browser')),\n\t\timport(resolveAngularRuntimePath('@angular/platform-server')),\n\t\timport(resolveAngularRuntimePath('@angular/common')),\n\t\timport(resolveAngularRuntimePath('@angular/core'))\n\t]);\n\n\tif (process.env.NODE_ENV !== 'development') {\n\t\tcore.enableProdMode();\n\t}\n\n\tinitDominoAdapter(platformServer);\n\n\treturn {\n\t\tAPP_BASE_HREF: common.APP_BASE_HREF,\n\t\tbootstrapApplication: platformBrowser.bootstrapApplication,\n\t\tDomSanitizer: platformBrowser.DomSanitizer,\n\t\tENVIRONMENT_INITIALIZER: core.ENVIRONMENT_INITIALIZER,\n\t\tinject: core.inject,\n\t\tprovideClientHydration: platformBrowser.provideClientHydration,\n\t\tprovideServerRendering: platformServer.provideServerRendering,\n\t\tprovideZonelessChangeDetection: core.provideZonelessChangeDetection,\n\t\treflectComponentType: core.reflectComponentType,\n\t\trenderApplication: platformServer.renderApplication,\n\t\tREQUEST: core.REQUEST,\n\t\tREQUEST_CONTEXT: core.REQUEST_CONTEXT,\n\t\tRESPONSE_INIT: core.RESPONSE_INIT,\n\t\tSanitizer: core.Sanitizer,\n\t\tSecurityContext: core.SecurityContext,\n\t\twithHttpTransferCacheOptions:\n\t\t\tplatformBrowser.withHttpTransferCacheOptions\n\t};\n};\n\nlet angularDeps: Promise<AngularDeps> | null = null;\n\nexport const getAngularDeps = () => {\n\tif (!angularDeps) {\n\t\tangularDeps = loadAngularDeps();\n\t}\n\n\treturn angularDeps;\n};\n",
|
|
6
|
-
"import type { EnvironmentProviders, Provider, Type } from '@angular/core';\nimport type { BootstrapContext } from '@angular/platform-browser';\nimport type {\n\tAngularDeps,\n\tCachedRouteData,\n\tSsrDepsResult\n} from '../../types/angular';\nimport { toScreamingSnake } from '../utils/stringModifiers';\nimport {\n\tgetAndClearClientScripts,\n\tgenerateClientScriptCode\n} from '../utils/registerClientScript';\nimport { buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';\nimport { buildRequestProviders } from './requestProviders';\n\n// --- Last-used props cache for HMR ---\n// Stores { props, headTag } from the most recent real request per route\n// so HMR re-renders with the same data the user last saw (Vite/Next behavior).\n\nconst routePropsCache = new Map<string, CachedRouteData>();\n\nexport const cacheRouteData = (pagePath: string, data: CachedRouteData) => {\n\tconst cacheKey = pagePath.split('?')[0] ?? pagePath;\n\troutePropsCache.set(cacheKey, data);\n};\nexport const getCachedRouteData = (pagePath: string) =>\n\troutePropsCache.get(pagePath);\n\n// --- Selector cache ---\n\nconst selectorCache = new Map<string, string>();\n\nexport const buildDeps = (\n\tssrResult: SsrDepsResult | null,\n\tbaseDeps: AngularDeps\n) => {\n\tif (!ssrResult?.core) {\n\t\treturn baseDeps;\n\t}\n\n\tconst { common, core, platformBrowser, platformServer } = ssrResult;\n\n\treturn {\n\t\tAPP_BASE_HREF: common?.APP_BASE_HREF ?? baseDeps.APP_BASE_HREF,\n\t\tbootstrapApplication:\n\t\t\tplatformBrowser?.bootstrapApplication ??\n\t\t\tbaseDeps.bootstrapApplication,\n\t\tDomSanitizer: platformBrowser?.DomSanitizer ?? baseDeps.DomSanitizer,\n\t\tENVIRONMENT_INITIALIZER:\n\t\t\tcore.ENVIRONMENT_INITIALIZER ?? baseDeps.ENVIRONMENT_INITIALIZER,\n\t\tinject: core.inject ?? baseDeps.inject,\n\t\tprovideClientHydration:\n\t\t\tplatformBrowser?.provideClientHydration ??\n\t\t\tbaseDeps.provideClientHydration,\n\t\tprovideServerRendering:\n\t\t\tplatformServer?.provideServerRendering ??\n\t\t\tbaseDeps.provideServerRendering,\n\t\tprovideZonelessChangeDetection: core.provideZonelessChangeDetection,\n\t\treflectComponentType: core.reflectComponentType,\n\t\trenderApplication:\n\t\t\tplatformServer?.renderApplication ?? baseDeps.renderApplication,\n\t\tREQUEST: core.REQUEST ?? baseDeps.REQUEST,\n\t\tREQUEST_CONTEXT: core.REQUEST_CONTEXT ?? baseDeps.REQUEST_CONTEXT,\n\t\tRESPONSE_INIT: core.RESPONSE_INIT ?? baseDeps.RESPONSE_INIT,\n\t\tSanitizer: core.Sanitizer,\n\t\tSecurityContext: core.SecurityContext,\n\t\twithHttpTransferCacheOptions:\n\t\t\tplatformBrowser?.withHttpTransferCacheOptions ??\n\t\t\tbaseDeps.withHttpTransferCacheOptions\n\t} satisfies AngularDeps;\n};\nexport const buildProviders = (\n\tdeps: AngularDeps,\n\tsanitizer: InstanceType<AngularDeps['DomSanitizer']>,\n\tmaybeProps: Record<string, unknown> | undefined,\n\ttokenMap: Map<string, unknown>,\n\trequest: Request | undefined,\n\trequestContext: unknown,\n\tresponseInit: ResponseInit | undefined,\n\tuserProviders: ReadonlyArray<Provider | EnvironmentProviders> = []\n) => {\n\tconst providers: (Provider | EnvironmentProviders)[] = [\n\t\tdeps.provideServerRendering(),\n\t\tdeps.provideClientHydration(\n\t\t\tdeps.withHttpTransferCacheOptions(\n\t\t\t\tbuildAbsoluteHttpTransferCacheOptions()\n\t\t\t)\n\t\t),\n\t\tdeps.provideZonelessChangeDetection(),\n\t\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t\t{\n\t\t\tprovide: deps.DomSanitizer,\n\t\t\tuseValue: sanitizer\n\t\t},\n\t\t{ provide: deps.Sanitizer, useValue: sanitizer },\n\t\t...buildRequestProviders(deps, request, requestContext, responseInit),\n\t\t...userProviders\n\t];\n\n\tif (!maybeProps) {\n\t\treturn providers;\n\t}\n\n\tconst propProviders = Object.entries(maybeProps)\n\t\t.map(([propName, propValue]) => ({\n\t\t\ttoken: tokenMap.get(toScreamingSnake(propName)),\n\t\t\tvalue: propValue\n\t\t}))\n\t\t.filter((entry) => entry.token)\n\t\t.map((entry) => ({ provide: entry.token, useValue: entry.value }));\n\n\treturn [...providers, ...propProviders];\n};\nexport const clearSelectorCache = () => selectorCache.clear();\n\nconst isInjectionToken = (value: unknown) => {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\t'ngMetadataName' in value && value.ngMetadataName === 'InjectionToken'\n\t);\n};\n\nexport const discoverTokens = (pageModule: Record<string, unknown>) =>\n\tnew Map(\n\t\tObject.entries(pageModule).filter(([, value]) =>\n\t\t\tisInjectionToken(value)\n\t\t)\n\t);\nexport const loadSsrDeps = async (pagePath: string) => {\n\tconst ssrDepsPath = (pagePath.split('?')[0] ?? pagePath).replace(\n\t\t/\\.js$/,\n\t\t'.ssr-deps.js'\n\t);\n\n\ttry {\n\t\tconst ssrDeps = await import(ssrDepsPath);\n\n\t\tconst result: SsrDepsResult = {\n\t\t\tcommon: ssrDeps.__angularCommon,\n\t\t\tcore: ssrDeps.__angularCore,\n\t\t\tplatformBrowser: ssrDeps.__angularPlatformBrowser,\n\t\t\tplatformServer: ssrDeps.__angularPlatformServer\n\t\t};\n\n\t\treturn result;\n\t} catch {\n\t\treturn null;\n\t}\n};\nexport const resolveSelector = (\n\tdeps: AngularDeps,\n\tpagePath: string,\n\tPageComponent: Type<unknown>\n) => {\n\tconst cached = selectorCache.get(pagePath);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst selector =\n\t\tdeps.reflectComponentType(PageComponent)?.selector ?? 'ng-app';\n\tselectorCache.set(pagePath, selector);\n\n\treturn selector;\n};\n\n// --- Inject HTML helper ---\n\nconst injectBeforeClose = (html: string, snippet: string) => {\n\tif (html.includes('</body>')) {\n\t\treturn html.replace('</body>', `${snippet}</body>`);\n\t}\n\tif (html.includes('</html>')) {\n\t\treturn html.replace('</html>', `${snippet}</html>`);\n\t}\n\n\treturn html + snippet;\n};\n\n// --- Post-render HTML injection ---\n\nexport const injectSsrScripts = (\n\thtml: string,\n\trequestId: string,\n\tindexPath: string,\n\tprops?: Record<string, unknown>\n) => {\n\tlet result = html;\n\n\tconst registeredScripts = getAndClearClientScripts(requestId);\n\tif (registeredScripts.length > 0) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\tgenerateClientScriptCode(registeredScripts)\n\t\t);\n\t}\n\n\tif (props) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script>window.__ABS_ANGULAR_PAGE_PROPS__ = ${JSON.stringify(props)};</script>`\n\t\t);\n\t}\n\n\tif (indexPath) {\n\t\tconst escapedIndexPath = JSON.stringify(indexPath);\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script>import(${escapedIndexPath});</script>`\n\t\t);\n\t}\n\n\treturn result;\n};\nexport const renderAngularApp = async (\n\tdeps: AngularDeps,\n\tPageComponent: Type<unknown>,\n\tproviders: (Provider | EnvironmentProviders)[],\n\tdocument: string | Document,\n\turl: string = '/'\n) => {\n\tconst bootstrap = (context: BootstrapContext) =>\n\t\tdeps.bootstrapApplication(PageComponent, { providers }, context);\n\n\treturn withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(bootstrap, {\n\t\t\tdocument,\n\t\t\tplatformProviders: [],\n\t\t\turl\n\t\t})\n\t);\n};\nexport const withSuppressedAngularDevLogs = async <T>(\n\trender: () => Promise<T>\n) => {\n\tconst origLog = console.log;\n\tconsole.log = (...args: unknown[]) => {\n\t\tif (\n\t\t\ttypeof args[0] === 'string' &&\n\t\t\targs[0].includes('development mode')\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\torigLog.apply(console, args);\n\t};\n\n\ttry {\n\t\treturn await render();\n\t} finally {\n\t\tconsole.log = origLog;\n\t}\n};\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,oBAAoB,CAAC,mBAAoD;AAAA,EAC9E,IAAI;AAAA,IACH,MAAM,gBACL,eAAe;AAAA,IAChB,eAAe,cAAc;AAAA,IAC5B,OAAO,KAAK;AAAA,IACb,QAAQ,MAAM,uCAAuC,GAAG;AAAA;AAAA;AAI1D,IAAM,kBAAkB,YAAY;AAAA,EAInC,8BAA8B;AAAA,EAM9B,MAAa,iCAA0B,mBAAmB;AAAA,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