@absolutejs/absolute 0.19.0-beta.793 → 0.19.0-beta.797
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 +4 -4
- package/dist/angular/server.js +4 -4
- package/dist/build.js +3 -3
- package/dist/{chunk-ygzd5s4z.js → chunk-1x82dcw0.js} +3 -3
- package/dist/{chunk-xzm8291n.js → chunk-2ds7qnyw.js} +4 -4
- package/dist/{chunk-3qswe70c.js → chunk-8xf58ka4.js} +2 -2
- package/dist/{chunk-2j2cvn7e.js → chunk-9eab59st.js} +8 -8
- package/dist/{chunk-2j2cvn7e.js.map → chunk-9eab59st.js.map} +1 -1
- package/dist/{chunk-ynb0qx79.js → chunk-a0x4bf8d.js} +3 -2
- package/dist/chunk-a0x4bf8d.js.map +11 -0
- package/dist/chunk-aaa985m2.js +194 -0
- package/dist/chunk-aaa985m2.js.map +11 -0
- package/dist/{chunk-8cyvzcmc.js → chunk-azqk45e4.js} +2 -2
- package/dist/{chunk-hza0n8qm.js → chunk-cs95jp8a.js} +4 -4
- package/dist/{chunk-97572s32.js → chunk-jmfv960b.js} +8 -63
- package/dist/{chunk-97572s32.js.map → chunk-jmfv960b.js.map} +3 -4
- package/dist/{chunk-91cb20rm.js → chunk-xt1p33fr.js} +6 -6
- package/dist/cli/index.js +2 -57
- package/dist/client/index.js +3 -3
- package/dist/index.js +6 -5
- package/dist/index.js.map +2 -2
- package/dist/islands/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/svelte/index.js +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-pnscgw95.js +0 -90
- package/dist/chunk-pnscgw95.js.map +0 -10
- package/dist/chunk-ynb0qx79.js.map +0 -11
- /package/dist/{chunk-ygzd5s4z.js.map → chunk-1x82dcw0.js.map} +0 -0
- /package/dist/{chunk-xzm8291n.js.map → chunk-2ds7qnyw.js.map} +0 -0
- /package/dist/{chunk-3qswe70c.js.map → chunk-8xf58ka4.js.map} +0 -0
- /package/dist/{chunk-8cyvzcmc.js.map → chunk-azqk45e4.js.map} +0 -0
- /package/dist/{chunk-hza0n8qm.js.map → chunk-cs95jp8a.js.map} +0 -0
- /package/dist/{chunk-91cb20rm.js.map → chunk-xt1p33fr.js.map} +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
resolveAngularPackageDir
|
|
4
|
+
} from "./chunk-kvq01j35.js";
|
|
5
|
+
import {
|
|
6
|
+
__require
|
|
7
|
+
} from "./chunk-bmgqm774.js";
|
|
8
|
+
|
|
9
|
+
// src/angular/injectorPatch.ts
|
|
10
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
11
|
+
import { dirname, join } from "path";
|
|
12
|
+
var applyInjectorPatch = (chunkPath, content) => {
|
|
13
|
+
if (content.includes('Symbol.for("angular.currentInjector")')) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const original = [
|
|
17
|
+
"let _currentInjector = undefined;",
|
|
18
|
+
"function getCurrentInjector() {",
|
|
19
|
+
" return _currentInjector;",
|
|
20
|
+
"}",
|
|
21
|
+
"function setCurrentInjector(injector) {",
|
|
22
|
+
" const former = _currentInjector;",
|
|
23
|
+
" _currentInjector = injector;",
|
|
24
|
+
" return former;",
|
|
25
|
+
"}"
|
|
26
|
+
].join(`
|
|
27
|
+
`);
|
|
28
|
+
const replacement = [
|
|
29
|
+
'const _injSym = Symbol.for("angular.currentInjector");',
|
|
30
|
+
"if (!globalThis[_injSym]) globalThis[_injSym] = { v: undefined };",
|
|
31
|
+
"function getCurrentInjector() {",
|
|
32
|
+
" return globalThis[_injSym].v;",
|
|
33
|
+
"}",
|
|
34
|
+
"function setCurrentInjector(injector) {",
|
|
35
|
+
" const former = globalThis[_injSym].v;",
|
|
36
|
+
" globalThis[_injSym].v = injector;",
|
|
37
|
+
" return former;",
|
|
38
|
+
"}"
|
|
39
|
+
].join(`
|
|
40
|
+
`);
|
|
41
|
+
const patched = content.replace(original, replacement);
|
|
42
|
+
if (patched === content) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
writeFileSync(chunkPath, patched, "utf-8");
|
|
46
|
+
};
|
|
47
|
+
var resolveAngularCoreDir = () => {
|
|
48
|
+
const resolved = resolveAngularPackageDir("@angular/core");
|
|
49
|
+
if (resolved && existsSync(join(resolved, "package.json"))) {
|
|
50
|
+
return resolved;
|
|
51
|
+
}
|
|
52
|
+
return dirname(__require.resolve("@angular/core/package.json"));
|
|
53
|
+
};
|
|
54
|
+
var applyCompilerFacadePatch = (chunkPath, content) => {
|
|
55
|
+
const marker = "absolutejs.compilerFacadeAutoload";
|
|
56
|
+
if (content.includes(marker))
|
|
57
|
+
return;
|
|
58
|
+
const original = [
|
|
59
|
+
"function getCompilerFacade(request) {",
|
|
60
|
+
" const globalNg = _global['ng'];",
|
|
61
|
+
" if (globalNg && globalNg.\u0275compilerFacade) {",
|
|
62
|
+
" return globalNg.\u0275compilerFacade;",
|
|
63
|
+
" }"
|
|
64
|
+
].join(`
|
|
65
|
+
`);
|
|
66
|
+
const replacement = [
|
|
67
|
+
"function getCompilerFacade(request) {",
|
|
68
|
+
" let globalNg = _global['ng'];",
|
|
69
|
+
" if (globalNg && globalNg.\u0275compilerFacade) {",
|
|
70
|
+
" return globalNg.\u0275compilerFacade;",
|
|
71
|
+
" }",
|
|
72
|
+
` /* ${marker} */`,
|
|
73
|
+
" try {",
|
|
74
|
+
' const { createRequire } = globalThis.process?.getBuiltinModule?.("module") ?? require("module");',
|
|
75
|
+
' const projectRequire = createRequire(globalThis.process.cwd() + "/package.json");',
|
|
76
|
+
' projectRequire("@angular/compiler");',
|
|
77
|
+
" globalNg = _global['ng'];",
|
|
78
|
+
" if (globalNg && globalNg.\u0275compilerFacade) {",
|
|
79
|
+
" return globalNg.\u0275compilerFacade;",
|
|
80
|
+
" }",
|
|
81
|
+
" } catch {",
|
|
82
|
+
" /* fall through to original error */",
|
|
83
|
+
" }"
|
|
84
|
+
].join(`
|
|
85
|
+
`);
|
|
86
|
+
const patched = content.replace(original, replacement);
|
|
87
|
+
if (patched === content)
|
|
88
|
+
return;
|
|
89
|
+
writeFileSync(chunkPath, patched, "utf-8");
|
|
90
|
+
};
|
|
91
|
+
var tryApplyChunkPatch = (chunkPath, apply) => {
|
|
92
|
+
if (!existsSync(chunkPath))
|
|
93
|
+
return;
|
|
94
|
+
apply(chunkPath, readFileSync(chunkPath, "utf-8"));
|
|
95
|
+
};
|
|
96
|
+
var patchAngularInjectorSingleton = () => {
|
|
97
|
+
try {
|
|
98
|
+
const coreDir = resolveAngularCoreDir();
|
|
99
|
+
const fesmDir = join(coreDir, "fesm2022");
|
|
100
|
+
tryApplyChunkPatch(join(fesmDir, "_not_found-chunk.mjs"), applyInjectorPatch);
|
|
101
|
+
tryApplyChunkPatch(join(fesmDir, "_debug_node-chunk.mjs"), applyCompilerFacadePatch);
|
|
102
|
+
} catch {}
|
|
103
|
+
};
|
|
104
|
+
patchAngularInjectorSingleton();
|
|
105
|
+
|
|
106
|
+
// src/utils/registerClientScript.ts
|
|
107
|
+
var scriptRegistry = new Map;
|
|
108
|
+
var requestCounter = 0;
|
|
109
|
+
var getRequestId = () => `req_${Date.now()}_${++requestCounter}`;
|
|
110
|
+
var ssrContextGetter = null;
|
|
111
|
+
var getSsrContextId = () => ssrContextGetter?.() || Object.getOwnPropertyDescriptor(globalThis, "__absolutejs_requestId")?.value;
|
|
112
|
+
var registerClientScript = (script, requestId) => {
|
|
113
|
+
const id = requestId || getSsrContextId() || getRequestId();
|
|
114
|
+
if (!scriptRegistry.has(id)) {
|
|
115
|
+
scriptRegistry.set(id, new Set);
|
|
116
|
+
}
|
|
117
|
+
scriptRegistry.get(id)?.add(script);
|
|
118
|
+
return id;
|
|
119
|
+
};
|
|
120
|
+
var setSsrContextGetter = (getter) => {
|
|
121
|
+
ssrContextGetter = getter;
|
|
122
|
+
};
|
|
123
|
+
if (typeof globalThis !== "undefined") {
|
|
124
|
+
Object.assign(globalThis, { registerClientScript });
|
|
125
|
+
}
|
|
126
|
+
var clearAllClientScripts = () => {
|
|
127
|
+
scriptRegistry.clear();
|
|
128
|
+
};
|
|
129
|
+
var generateClientScriptCode = (scripts) => {
|
|
130
|
+
if (scripts.length === 0) {
|
|
131
|
+
return "";
|
|
132
|
+
}
|
|
133
|
+
const scriptCode = scripts.map((script, index) => {
|
|
134
|
+
const funcString = script.toString();
|
|
135
|
+
const bodyMatch = funcString.match(/\{([\s\S]*)\}/);
|
|
136
|
+
if (!bodyMatch || !bodyMatch[1]) {
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
139
|
+
const body = bodyMatch[1].trim();
|
|
140
|
+
return `
|
|
141
|
+
(function() {
|
|
142
|
+
var executed = false;
|
|
143
|
+
function executeScript_${index}() {
|
|
144
|
+
if (executed) return;
|
|
145
|
+
executed = true;
|
|
146
|
+
${body}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
150
|
+
executeScript_${index}();
|
|
151
|
+
} else {
|
|
152
|
+
document.addEventListener('DOMContentLoaded', executeScript_${index});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Watch for hydration-added elements
|
|
156
|
+
var observer = new MutationObserver(function() {
|
|
157
|
+
executeScript_${index}();
|
|
158
|
+
if (executed) observer.disconnect();
|
|
159
|
+
});
|
|
160
|
+
if (!executed) {
|
|
161
|
+
observer.observe(document.body || document.documentElement, { childList: true, subtree: true });
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Single fallback timeout
|
|
165
|
+
setTimeout(function() {
|
|
166
|
+
executeScript_${index}();
|
|
167
|
+
observer.disconnect();
|
|
168
|
+
}, 1000);
|
|
169
|
+
})();`;
|
|
170
|
+
}).join(`
|
|
171
|
+
`);
|
|
172
|
+
return `<script>
|
|
173
|
+
(function() {
|
|
174
|
+
${scriptCode}
|
|
175
|
+
})();
|
|
176
|
+
</script>`;
|
|
177
|
+
};
|
|
178
|
+
var getAndClearClientScripts = (requestId) => {
|
|
179
|
+
const id = requestId || ssrContextGetter?.();
|
|
180
|
+
if (!id)
|
|
181
|
+
return [];
|
|
182
|
+
const scripts = scriptRegistry.get(id);
|
|
183
|
+
if (!scripts) {
|
|
184
|
+
return [];
|
|
185
|
+
}
|
|
186
|
+
const scriptArray = Array.from(scripts);
|
|
187
|
+
scriptRegistry.delete(id);
|
|
188
|
+
return scriptArray;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export { patchAngularInjectorSingleton, getSsrContextId, registerClientScript, setSsrContextGetter, clearAllClientScripts, generateClientScriptCode, getAndClearClientScripts };
|
|
192
|
+
|
|
193
|
+
//# debugId=7DE0E2AE7CE02C0664756E2164756E21
|
|
194
|
+
//# sourceMappingURL=chunk-aaa985m2.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/angular/injectorPatch.ts", "../src/utils/registerClientScript.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { existsSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { resolveAngularPackageDir } from './resolveAngularPackage';\n\n// --- Patch Angular injector singleton for HMR compatibility ---\n// Bun's --hot mode can create duplicate Angular module instances during\n// HMR rebuilds. Angular's _currentInjector is a module-level variable in\n// _not_found-chunk.mjs — when duplicated, R3Injector.get() sets it in\n// instance A while the factory's inject() reads from instance B (undefined),\n// causing NG0203. This patch stores _currentInjector on globalThis so all\n// instances share the same value.\n//\n// We additionally patch `_debug_node-chunk.mjs::getCompilerFacade` to\n// auto-require `@angular/compiler` when partial-AOT chunks like\n// `_platform_location-chunk.mjs` invoke `ɵɵngDeclareFactory` *before*\n// userland code has explicitly imported `@angular/compiler`. Without\n// this, partial chunks throw \"JIT compilation failed for [class\n// PlatformLocation]\" the very first time they execute under Bun's\n// `--hot` runtime, because the import order isn't guaranteed.\n\nconst applyInjectorPatch = (chunkPath: string, content: string) => {\n\tif (content.includes('Symbol.for(\"angular.currentInjector\")')) {\n\t\treturn;\n\t}\n\n\tconst original = [\n\t\t'let _currentInjector = undefined;',\n\t\t'function getCurrentInjector() {',\n\t\t' return _currentInjector;',\n\t\t'}',\n\t\t'function setCurrentInjector(injector) {',\n\t\t' const former = _currentInjector;',\n\t\t' _currentInjector = injector;',\n\t\t' return former;',\n\t\t'}'\n\t].join('\\n');\n\n\tconst replacement = [\n\t\t'const _injSym = Symbol.for(\"angular.currentInjector\");',\n\t\t'if (!globalThis[_injSym]) globalThis[_injSym] = { v: undefined };',\n\t\t'function getCurrentInjector() {',\n\t\t' return globalThis[_injSym].v;',\n\t\t'}',\n\t\t'function setCurrentInjector(injector) {',\n\t\t' const former = globalThis[_injSym].v;',\n\t\t' globalThis[_injSym].v = injector;',\n\t\t' return former;',\n\t\t'}'\n\t].join('\\n');\n\n\tconst patched = content.replace(original, replacement);\n\n\tif (patched === content) {\n\t\treturn;\n\t}\n\n\twriteFileSync(chunkPath, patched, 'utf-8');\n};\n\nconst resolveAngularCoreDir = () => {\n\tconst resolved = resolveAngularPackageDir('@angular/core');\n\n\tif (resolved && existsSync(join(resolved, 'package.json'))) {\n\t\treturn resolved;\n\t}\n\n\treturn dirname(require.resolve('@angular/core/package.json'));\n};\n\n/* Make `getCompilerFacade` self-bootstrap. The shipped implementation reads\n `globalThis.ng.ɵcompilerFacade` and throws if it's missing. We rewrite it\n to first attempt a synchronous `require('@angular/compiler')` (which sets\n the facade as a side-effect of its top-level `publishFacade` call) and\n then check again before falling through to the original error path.\n\n Idempotent: if the patched marker is already present we skip. The\n pattern is anchored on the original Angular source so it no-ops if\n Angular changes the function shape in a future minor release. */\nconst applyCompilerFacadePatch = (chunkPath: string, content: string) => {\n\tconst marker = 'absolutejs.compilerFacadeAutoload';\n\tif (content.includes(marker)) return;\n\n\tconst original = [\n\t\t'function getCompilerFacade(request) {',\n\t\t\" const globalNg = _global['ng'];\",\n\t\t' if (globalNg && globalNg.ɵcompilerFacade) {',\n\t\t' return globalNg.ɵcompilerFacade;',\n\t\t' }'\n\t].join('\\n');\n\n\tconst replacement = [\n\t\t'function getCompilerFacade(request) {',\n\t\t\" let globalNg = _global['ng'];\",\n\t\t' if (globalNg && globalNg.ɵcompilerFacade) {',\n\t\t' return globalNg.ɵcompilerFacade;',\n\t\t' }',\n\t\t` /* ${marker} */`,\n\t\t' try {',\n\t\t' const { createRequire } = globalThis.process?.getBuiltinModule?.(\"module\") ?? require(\"module\");',\n\t\t' const projectRequire = createRequire(globalThis.process.cwd() + \"/package.json\");',\n\t\t' projectRequire(\"@angular/compiler\");',\n\t\t\" globalNg = _global['ng'];\",\n\t\t' if (globalNg && globalNg.ɵcompilerFacade) {',\n\t\t' return globalNg.ɵcompilerFacade;',\n\t\t' }',\n\t\t' } catch {',\n\t\t' /* fall through to original error */',\n\t\t' }'\n\t].join('\\n');\n\n\tconst patched = content.replace(original, replacement);\n\tif (patched === content) return;\n\twriteFileSync(chunkPath, patched, 'utf-8');\n};\n\nconst tryApplyChunkPatch = (\n\tchunkPath: string,\n\tapply: (path: string, content: string) => void\n) => {\n\tif (!existsSync(chunkPath)) return;\n\tapply(chunkPath, readFileSync(chunkPath, 'utf-8'));\n};\n\nexport const patchAngularInjectorSingleton = () => {\n\ttry {\n\t\tconst coreDir = resolveAngularCoreDir();\n\t\tconst fesmDir = join(coreDir, 'fesm2022');\n\t\ttryApplyChunkPatch(\n\t\t\tjoin(fesmDir, '_not_found-chunk.mjs'),\n\t\t\tapplyInjectorPatch\n\t\t);\n\t\ttryApplyChunkPatch(\n\t\t\tjoin(fesmDir, '_debug_node-chunk.mjs'),\n\t\t\tapplyCompilerFacadePatch\n\t\t);\n\t} catch {\n\t\t// Non-fatal — HMR may see NG0203 on second+ edits\n\t}\n};\n\n// Apply immediately at module load so the file is patched before any\n// Angular module is first evaluated by Bun's --hot mode or linker plugin.\npatchAngularInjectorSingleton();\n",
|
|
6
|
+
"/**\n * Utility for registering client-side scripts that need to run after Angular SSR hydration.\n *\n * This is necessary because Angular's lifecycle hooks don't always run reliably on the client\n * after SSR hydration, especially for event listeners attached to DOM elements.\n *\n * Usage in Angular components:\n * ```typescript\n * import { registerClientScript } from '@absolutejs/absolute';\n *\n * // Register an event listener script\n * registerClientScript(() => {\n * const element = document.querySelector('.my-element');\n * if (element) {\n * element.addEventListener('click', () => {\n * console.log('Clicked!');\n * });\n * }\n * });\n * ```\n *\n * The script will be automatically injected into the HTML response and executed on the client.\n */\n\n// Request-scoped registry for client scripts\n// Each request gets its own set of scripts to inject\nconst scriptRegistry = new Map<string, Set<() => void>>();\n\n// Generate a unique request ID for tracking scripts per request\nlet requestCounter = 0;\nconst getRequestId = () => `req_${Date.now()}_${++requestCounter}`;\n\n// Allow SSR frameworks to inject a request context getter (e.g. AsyncLocalStorage)\nlet ssrContextGetter: (() => string | undefined) | null = null;\nexport const getSsrContextId = () =>\n\tssrContextGetter?.() ||\n\tObject.getOwnPropertyDescriptor(globalThis, '__absolutejs_requestId')\n\t\t?.value;\nexport const registerClientScript = (\n\tscript: () => void,\n\trequestId?: string\n) => {\n\t// Try to get requestId from explicit arg, then Async Context, then global fallback\n\tconst id = requestId || getSsrContextId() || getRequestId();\n\n\tif (!scriptRegistry.has(id)) {\n\t\tscriptRegistry.set(id, new Set());\n\t}\n\n\tscriptRegistry.get(id)?.add(script);\n\n\treturn id;\n};\nexport const setSsrContextGetter = (getter: () => string | undefined) => {\n\tssrContextGetter = getter;\n};\n\n// Make registerClientScript available globally during SSR for Angular components\n// Using type assertion for globalThis extension\nif (typeof globalThis !== 'undefined') {\n\tObject.assign(globalThis, { registerClientScript });\n}\n\n/**\n * Get all registered scripts for a request and clear them.\n * This is called by the page handler after rendering.\n *\n * @param requestId - The request ID to get scripts for\n * @returns Array of script functions, or empty array if none registered\n */\nexport const clearAllClientScripts = () => {\n\tscriptRegistry.clear();\n};\nexport const generateClientScriptCode = (scripts: (() => void)[]) => {\n\tif (scripts.length === 0) {\n\t\treturn '';\n\t}\n\n\t// Convert functions to strings and wrap in IIFE\n\tconst scriptCode = scripts\n\t\t.map((script, index) => {\n\t\t\t// Get the function body as a string\n\t\t\tconst funcString = script.toString();\n\n\t\t\t// Extract the body (everything between { and })\n\t\t\tconst bodyMatch = funcString.match(/\\{([\\s\\S]*)\\}/);\n\t\t\tif (!bodyMatch || !bodyMatch[1]) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst body = bodyMatch[1].trim();\n\n\t\t\t// Wrap in IIFE with MutationObserver for DOM readiness\n\t\t\treturn `\n\t(function() {\n\t\tvar executed = false;\n\t\tfunction executeScript_${index}() {\n\t\t\tif (executed) return;\n\t\t\texecuted = true;\n\t\t\t${body}\n\t\t}\n\n\t\tif (document.readyState === 'complete' || document.readyState === 'interactive') {\n\t\t\texecuteScript_${index}();\n\t\t} else {\n\t\t\tdocument.addEventListener('DOMContentLoaded', executeScript_${index});\n\t\t}\n\n\t\t// Watch for hydration-added elements\n\t\tvar observer = new MutationObserver(function() {\n\t\t\texecuteScript_${index}();\n\t\t\tif (executed) observer.disconnect();\n\t\t});\n\t\tif (!executed) {\n\t\t\tobserver.observe(document.body || document.documentElement, { childList: true, subtree: true });\n\t\t}\n\n\t\t// Single fallback timeout\n\t\tsetTimeout(function() {\n\t\t\texecuteScript_${index}();\n\t\t\tobserver.disconnect();\n\t\t}, 1000);\n\t})();`;\n\t\t})\n\t\t.join('\\n');\n\n\treturn `<script>\n(function() {\n${scriptCode}\n})();\n</script>`;\n};\nexport const getAndClearClientScripts = (requestId?: string) => {\n\tconst id = requestId || ssrContextGetter?.();\n\tif (!id) return [];\n\n\tconst scripts = scriptRegistry.get(id);\n\tif (!scripts) {\n\t\treturn [];\n\t}\n\n\tconst scriptArray = Array.from(scripts);\n\tscriptRegistry.delete(id);\n\n\treturn scriptArray;\n};\n"
|
|
7
|
+
],
|
|
8
|
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1C,eAAe,MAAM;AAAA;AAEf,IAAM,2BAA2B,CAAC,YAA4B;AAAA,EACpE,IAAI,QAAQ,WAAW,GAAG;AAAA,IACzB,OAAO;AAAA,EACR;AAAA,EAGA,MAAM,aAAa,QACjB,IAAI,CAAC,QAAQ,UAAU;AAAA,IAEvB,MAAM,aAAa,OAAO,SAAS;AAAA,IAGnC,MAAM,YAAY,WAAW,MAAM,eAAe;AAAA,IAClD,IAAI,CAAC,aAAa,CAAC,UAAU,IAAI;AAAA,MAChC,OAAO;AAAA,IACR;AAAA,IAEA,MAAM,OAAO,UAAU,GAAG,KAAK;AAAA,IAG/B,OAAO;AAAA;AAAA;AAAA,2BAGiB;AAAA;AAAA;AAAA,KAGtB;AAAA;AAAA;AAAA;AAAA,mBAIc;AAAA;AAAA,iEAE8C;AAAA;AAAA;AAAA;AAAA;AAAA,mBAK9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBASA;AAAA;AAAA;AAAA;AAAA,GAIhB,EACA,KAAK;AAAA,CAAI;AAAA,EAEX,OAAO;AAAA;AAAA,EAEN;AAAA;AAAA;AAAA;AAIK,IAAM,2BAA2B,CAAC,cAAuB;AAAA,EAC/D,MAAM,KAAK,aAAa,mBAAmB;AAAA,EAC3C,IAAI,CAAC;AAAA,IAAI,OAAO,CAAC;AAAA,EAEjB,MAAM,UAAU,eAAe,IAAI,EAAE;AAAA,EACrC,IAAI,CAAC,SAAS;AAAA,IACb,OAAO,CAAC;AAAA,EACT;AAAA,EAEA,MAAM,cAAc,MAAM,KAAK,OAAO;AAAA,EACtC,eAAe,OAAO,EAAE;AAAA,EAExB,OAAO;AAAA;",
|
|
9
|
+
"debugId": "7DE0E2AE7CE02C0664756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
|
|
17
17
|
// src/core/islandSsr.ts
|
|
18
18
|
var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
|
|
19
|
-
const { renderAngularIslandToHtml } = await import("./chunk-
|
|
19
|
+
const { renderAngularIslandToHtml } = await import("./chunk-cs95jp8a.js");
|
|
20
20
|
return renderAngularIslandToHtml(component, props, islandId);
|
|
21
21
|
};
|
|
22
22
|
var renderAngularIslandToHtml = renderAngularIslandToHtmlInternal;
|
|
@@ -181,4 +181,4 @@ var renderIslandResult = async (registry, props) => {
|
|
|
181
181
|
export { renderIslandMarkup, renderIslandResult };
|
|
182
182
|
|
|
183
183
|
//# debugId=422A05E95D6E1A7B64756E2164756E21
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-azqk45e4.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
getAngularIslandSelector,
|
|
4
4
|
mountAngularIsland,
|
|
5
5
|
renderAngularIslandToHtml
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import"./chunk-
|
|
6
|
+
} from "./chunk-1x82dcw0.js";
|
|
7
|
+
import"./chunk-jmfv960b.js";
|
|
8
|
+
import"./chunk-aaa985m2.js";
|
|
8
9
|
import"./chunk-kvq01j35.js";
|
|
9
|
-
import"./chunk-pnscgw95.js";
|
|
10
10
|
import"./chunk-p5504p14.js";
|
|
11
11
|
import"./chunk-25v9t56f.js";
|
|
12
12
|
import"./chunk-bmgqm774.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
//# debugId=C1AFCC34B998790A64756E2164756E21
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-cs95jp8a.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
resolveAngularPackage,
|
|
4
|
-
resolveAngularPackageDir
|
|
5
|
-
} from "./chunk-kvq01j35.js";
|
|
6
2
|
import {
|
|
7
3
|
generateClientScriptCode,
|
|
8
|
-
getAndClearClientScripts
|
|
9
|
-
|
|
4
|
+
getAndClearClientScripts,
|
|
5
|
+
patchAngularInjectorSingleton
|
|
6
|
+
} from "./chunk-aaa985m2.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveAngularPackage
|
|
9
|
+
} from "./chunk-kvq01j35.js";
|
|
10
10
|
import {
|
|
11
11
|
toScreamingSnake
|
|
12
12
|
} from "./chunk-p5504p14.js";
|
|
@@ -18,61 +18,6 @@ import {
|
|
|
18
18
|
__require
|
|
19
19
|
} from "./chunk-bmgqm774.js";
|
|
20
20
|
|
|
21
|
-
// src/angular/injectorPatch.ts
|
|
22
|
-
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
23
|
-
import { dirname, join } from "path";
|
|
24
|
-
var applyInjectorPatch = (chunkPath, content) => {
|
|
25
|
-
if (content.includes('Symbol.for("angular.currentInjector")')) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const original = [
|
|
29
|
-
"let _currentInjector = undefined;",
|
|
30
|
-
"function getCurrentInjector() {",
|
|
31
|
-
" return _currentInjector;",
|
|
32
|
-
"}",
|
|
33
|
-
"function setCurrentInjector(injector) {",
|
|
34
|
-
" const former = _currentInjector;",
|
|
35
|
-
" _currentInjector = injector;",
|
|
36
|
-
" return former;",
|
|
37
|
-
"}"
|
|
38
|
-
].join(`
|
|
39
|
-
`);
|
|
40
|
-
const replacement = [
|
|
41
|
-
'const _injSym = Symbol.for("angular.currentInjector");',
|
|
42
|
-
"if (!globalThis[_injSym]) globalThis[_injSym] = { v: undefined };",
|
|
43
|
-
"function getCurrentInjector() {",
|
|
44
|
-
" return globalThis[_injSym].v;",
|
|
45
|
-
"}",
|
|
46
|
-
"function setCurrentInjector(injector) {",
|
|
47
|
-
" const former = globalThis[_injSym].v;",
|
|
48
|
-
" globalThis[_injSym].v = injector;",
|
|
49
|
-
" return former;",
|
|
50
|
-
"}"
|
|
51
|
-
].join(`
|
|
52
|
-
`);
|
|
53
|
-
const patched = content.replace(original, replacement);
|
|
54
|
-
if (patched === content) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
writeFileSync(chunkPath, patched, "utf-8");
|
|
58
|
-
};
|
|
59
|
-
var resolveAngularCoreDir = () => {
|
|
60
|
-
const resolved = resolveAngularPackageDir("@angular/core");
|
|
61
|
-
if (resolved && existsSync(join(resolved, "package.json"))) {
|
|
62
|
-
return resolved;
|
|
63
|
-
}
|
|
64
|
-
return dirname(__require.resolve("@angular/core/package.json"));
|
|
65
|
-
};
|
|
66
|
-
var patchAngularInjectorSingleton = () => {
|
|
67
|
-
try {
|
|
68
|
-
const coreDir = resolveAngularCoreDir();
|
|
69
|
-
const chunkPath = join(coreDir, "fesm2022", "_not_found-chunk.mjs");
|
|
70
|
-
const content = readFileSync(chunkPath, "utf-8");
|
|
71
|
-
applyInjectorPatch(chunkPath, content);
|
|
72
|
-
} catch {}
|
|
73
|
-
};
|
|
74
|
-
patchAngularInjectorSingleton();
|
|
75
|
-
|
|
76
21
|
// src/angular/angularDeps.ts
|
|
77
22
|
var initDominoAdapter = (platformServer) => {
|
|
78
23
|
try {
|
|
@@ -258,5 +203,5 @@ var withSuppressedAngularDevLogs = async (render) => {
|
|
|
258
203
|
|
|
259
204
|
export { getAngularDeps, cacheRouteData, getCachedRouteData, buildDeps, buildProviders, clearSelectorCache, discoverTokens, loadSsrDeps, resolveSelector, injectSsrScripts, renderAngularApp, withSuppressedAngularDevLogs };
|
|
260
205
|
|
|
261
|
-
//# debugId=
|
|
262
|
-
//# sourceMappingURL=chunk-
|
|
206
|
+
//# debugId=4564B452FF877EDB64756E2164756E21
|
|
207
|
+
//# sourceMappingURL=chunk-jmfv960b.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/angular/
|
|
3
|
+
"sources": ["../src/angular/angularDeps.ts", "../src/angular/ssrRender.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { existsSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { resolveAngularPackageDir } from './resolveAngularPackage';\n\n// --- Patch Angular injector singleton for HMR compatibility ---\n// Bun's --hot mode can create duplicate Angular module instances during\n// HMR rebuilds. Angular's _currentInjector is a module-level variable in\n// _not_found-chunk.mjs — when duplicated, R3Injector.get() sets it in\n// instance A while the factory's inject() reads from instance B (undefined),\n// causing NG0203. This patch stores _currentInjector on globalThis so all\n// instances share the same value.\n\nconst applyInjectorPatch = (chunkPath: string, content: string) => {\n\tif (content.includes('Symbol.for(\"angular.currentInjector\")')) {\n\t\treturn;\n\t}\n\n\tconst original = [\n\t\t'let _currentInjector = undefined;',\n\t\t'function getCurrentInjector() {',\n\t\t' return _currentInjector;',\n\t\t'}',\n\t\t'function setCurrentInjector(injector) {',\n\t\t' const former = _currentInjector;',\n\t\t' _currentInjector = injector;',\n\t\t' return former;',\n\t\t'}'\n\t].join('\\n');\n\n\tconst replacement = [\n\t\t'const _injSym = Symbol.for(\"angular.currentInjector\");',\n\t\t'if (!globalThis[_injSym]) globalThis[_injSym] = { v: undefined };',\n\t\t'function getCurrentInjector() {',\n\t\t' return globalThis[_injSym].v;',\n\t\t'}',\n\t\t'function setCurrentInjector(injector) {',\n\t\t' const former = globalThis[_injSym].v;',\n\t\t' globalThis[_injSym].v = injector;',\n\t\t' return former;',\n\t\t'}'\n\t].join('\\n');\n\n\tconst patched = content.replace(original, replacement);\n\n\tif (patched === content) {\n\t\treturn;\n\t}\n\n\twriteFileSync(chunkPath, patched, 'utf-8');\n};\n\nconst resolveAngularCoreDir = () => {\n\tconst resolved = resolveAngularPackageDir('@angular/core');\n\n\tif (resolved && existsSync(join(resolved, 'package.json'))) {\n\t\treturn resolved;\n\t}\n\n\treturn dirname(require.resolve('@angular/core/package.json'));\n};\n\nexport const patchAngularInjectorSingleton = () => {\n\ttry {\n\t\tconst coreDir = resolveAngularCoreDir();\n\t\tconst chunkPath = join(coreDir, 'fesm2022', '_not_found-chunk.mjs');\n\t\tconst content = readFileSync(chunkPath, 'utf-8');\n\t\tapplyInjectorPatch(chunkPath, content);\n\t} catch {\n\t\t// Non-fatal — HMR may see NG0203 on second+ edits\n\t}\n};\n\n// Apply immediately at module load so the file is patched before any\n// Angular module is first evaluated by Bun's --hot mode or linker plugin.\npatchAngularInjectorSingleton();\n",
|
|
6
5
|
"import type { AngularDeps, SsrDepsResult } from '../../types/angular';\nimport { patchAngularInjectorSingleton } from './injectorPatch';\nimport { resolveAngularPackage } 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(resolveAngularPackage('@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(resolveAngularPackage('@angular/platform-browser')),\n\t\timport(resolveAngularPackage('@angular/platform-server')),\n\t\timport(resolveAngularPackage('@angular/common')),\n\t\timport(resolveAngularPackage('@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",
|
|
7
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"
|
|
8
7
|
],
|
|
9
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;
|
|
10
|
-
"debugId": "
|
|
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,6BAAsB,mBAAmB;AAAA,EAItD,QAAQ,iBAAiB,MAAa;AAAA,EACtC,MAAM,aAAa;AAAA,EAGnB,OAAO,iBAAiB,gBAAgB,QAAQ,QAAQ,MAAM,QAAQ,IAAI;AAAA,IAClE,6BAAsB,2BAA2B;AAAA,IACjD,6BAAsB,0BAA0B;AAAA,IAChD,6BAAsB,iBAAiB;AAAA,IACvC,6BAAsB,eAAe;AAAA,EAC7C,CAAC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upTimingBlock,
|
|
76
76
|
setCurrentPageIslandMetadata,
|
|
77
77
|
transformStaticPagesWithIslands
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-8xf58ka4.js";
|
|
79
79
|
import {
|
|
80
80
|
disposeTailwindCompiler,
|
|
81
81
|
incrementalTailwindBuild
|
|
@@ -1065,7 +1065,7 @@ var build = async ({
|
|
|
1065
1065
|
vueIndexPaths: [...emptyStringArray],
|
|
1066
1066
|
vueServerPaths: [...emptyStringArray]
|
|
1067
1067
|
},
|
|
1068
|
-
shouldCompileAngular ? tracePhase("compile/angular", () => import("./chunk-
|
|
1068
|
+
shouldCompileAngular ? tracePhase("compile/angular", () => import("./chunk-a0x4bf8d.js").then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig))) : {
|
|
1069
1069
|
clientPaths: [...emptyStringArray],
|
|
1070
1070
|
serverPaths: [...emptyStringArray]
|
|
1071
1071
|
},
|
|
@@ -1075,7 +1075,7 @@ var build = async ({
|
|
|
1075
1075
|
shouldCompileIslandVue ? tracePhase("compile/island-vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
|
|
1076
1076
|
vueClientPaths: [...emptyStringArray]
|
|
1077
1077
|
},
|
|
1078
|
-
shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => import("./chunk-
|
|
1078
|
+
shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => import("./chunk-a0x4bf8d.js").then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
|
|
1079
1079
|
clientPaths: [...emptyStringArray]
|
|
1080
1080
|
}
|
|
1081
1081
|
]);
|
|
@@ -1153,7 +1153,7 @@ var build = async ({
|
|
|
1153
1153
|
tracePhase("compile/convention-react", compileReactConventions),
|
|
1154
1154
|
svelteConventionSources.length > 0 && svelteDir ? tracePhase("compile/convention-svelte", () => import("./chunk-x09cskqd.js").then((mod) => mod.compileSvelte(svelteConventionSources, svelteDir, new Map, false, styleTransformConfig))) : { svelteServerPaths: emptyStringArray },
|
|
1155
1155
|
vueConventionSources.length > 0 && vueDir ? tracePhase("compile/convention-vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig))) : { vueServerPaths: emptyStringArray },
|
|
1156
|
-
angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => import("./chunk-
|
|
1156
|
+
angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => import("./chunk-a0x4bf8d.js").then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
|
|
1157
1157
|
]);
|
|
1158
1158
|
const bundleConventionFiles = async (framework, compiledPaths) => {
|
|
1159
1159
|
const destDir = join2(buildPath, "conventions", framework);
|
|
@@ -2753,7 +2753,7 @@ var broadcastAngularPageUpdates = (state, pagesToUpdate, manifest, startTime) =>
|
|
|
2753
2753
|
});
|
|
2754
2754
|
};
|
|
2755
2755
|
var compileAndBundleAngular = async (state, pageEntries, angularDir) => {
|
|
2756
|
-
const { compileAngular } = await import("./chunk-
|
|
2756
|
+
const { compileAngular } = await import("./chunk-a0x4bf8d.js");
|
|
2757
2757
|
const { clientPaths, serverPaths } = await compileAngular(pageEntries, angularDir, true, getStyleTransformConfig(state.config));
|
|
2758
2758
|
serverPaths.forEach((serverPath) => {
|
|
2759
2759
|
const fileBase = basename4(serverPath, ".js");
|
|
@@ -4347,4 +4347,4 @@ var devBuild = async (config) => {
|
|
|
4347
4347
|
export { build, devBuild };
|
|
4348
4348
|
|
|
4349
4349
|
//# debugId=650FE7B352BAF06964756E2164756E21
|
|
4350
|
-
//# sourceMappingURL=chunk-
|
|
4350
|
+
//# sourceMappingURL=chunk-xt1p33fr.js.map
|
package/dist/cli/index.js
CHANGED
|
@@ -921,7 +921,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
921
921
|
result.push(fullPath);
|
|
922
922
|
}
|
|
923
923
|
return result;
|
|
924
|
-
}, SERVER_RUNTIME_ASSET_RE,
|
|
924
|
+
}, SERVER_RUNTIME_ASSET_RE, SERVER_RUNTIME_SOURCE_EXTENSIONS, SERVER_RUNTIME_SCAN_SKIP_DIRS, hasSourceExtension = (filePath) => SERVER_RUNTIME_SOURCE_EXTENSIONS.has(filePath.slice(filePath.lastIndexOf("."))), collectProjectSourceFiles = (dir) => {
|
|
925
925
|
const result = [];
|
|
926
926
|
let pending = readdirSync2(dir, { withFileTypes: true });
|
|
927
927
|
while (pending.length > 0) {
|
|
@@ -938,64 +938,10 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
940
|
return result;
|
|
941
|
-
}, packageNameFromSpecifier = (specifier) => {
|
|
942
|
-
if (specifier.startsWith("@")) {
|
|
943
|
-
const [scope, name] = specifier.split("/");
|
|
944
|
-
return scope && name ? `${scope}/${name}` : null;
|
|
945
|
-
}
|
|
946
|
-
return specifier.split("/")[0] ?? null;
|
|
947
|
-
}, collectBarePackageNames = (source) => {
|
|
948
|
-
const packages = new Set;
|
|
949
|
-
BARE_IMPORT_RE.lastIndex = 0;
|
|
950
|
-
let match;
|
|
951
|
-
while ((match = BARE_IMPORT_RE.exec(source)) !== null) {
|
|
952
|
-
const packageName = match[1] ? packageNameFromSpecifier(match[1]) : null;
|
|
953
|
-
if (packageName)
|
|
954
|
-
packages.add(packageName);
|
|
955
|
-
}
|
|
956
|
-
return packages;
|
|
957
|
-
}, collectImportedPackageSourceFiles = (entryFiles) => {
|
|
958
|
-
const files = [];
|
|
959
|
-
const seenPackages = new Set;
|
|
960
|
-
const pendingPackages = new Set;
|
|
961
|
-
for (const filePath of entryFiles) {
|
|
962
|
-
const source = readFileSync9(filePath, "utf-8");
|
|
963
|
-
for (const packageName of collectBarePackageNames(source)) {
|
|
964
|
-
pendingPackages.add(packageName);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
while (pendingPackages.size > 0) {
|
|
968
|
-
const [packageName] = pendingPackages;
|
|
969
|
-
if (!packageName)
|
|
970
|
-
break;
|
|
971
|
-
pendingPackages.delete(packageName);
|
|
972
|
-
if (seenPackages.has(packageName))
|
|
973
|
-
continue;
|
|
974
|
-
seenPackages.add(packageName);
|
|
975
|
-
const packageRoot = resolve8(process.cwd(), "node_modules", packageName);
|
|
976
|
-
if (!existsSync9(packageRoot) || !statSync(packageRoot).isDirectory())
|
|
977
|
-
continue;
|
|
978
|
-
const packageFiles = collectProjectSourceFiles(packageRoot);
|
|
979
|
-
files.push(...packageFiles);
|
|
980
|
-
for (const filePath of packageFiles) {
|
|
981
|
-
const source = readFileSync9(filePath, "utf-8");
|
|
982
|
-
for (const importedPackage of collectBarePackageNames(source)) {
|
|
983
|
-
if (!seenPackages.has(importedPackage)) {
|
|
984
|
-
pendingPackages.add(importedPackage);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
return files;
|
|
990
941
|
}, copyServerRuntimeAssetReferences = (outdir) => {
|
|
991
942
|
const copied = new Set;
|
|
992
943
|
const normalizedOutdir = resolve8(outdir);
|
|
993
|
-
const
|
|
994
|
-
const scannedFiles = [
|
|
995
|
-
...projectFiles,
|
|
996
|
-
...collectImportedPackageSourceFiles(projectFiles)
|
|
997
|
-
];
|
|
998
|
-
for (const filePath of scannedFiles) {
|
|
944
|
+
for (const filePath of collectProjectSourceFiles(process.cwd())) {
|
|
999
945
|
const source = readFileSync9(filePath, "utf-8");
|
|
1000
946
|
SERVER_RUNTIME_ASSET_RE.lastIndex = 0;
|
|
1001
947
|
let match;
|
|
@@ -1750,7 +1696,6 @@ var init_compile = __esm(() => {
|
|
|
1750
1696
|
init_telemetryEvent();
|
|
1751
1697
|
init_utils();
|
|
1752
1698
|
SERVER_RUNTIME_ASSET_RE = /new\s+URL\(\s*["'](\.\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
1753
|
-
BARE_IMPORT_RE = /(?:import\s+(?:[^'"]*?\s+from\s+)?|export\s+[^'"]*?\s+from\s+|import\s*\(|require\s*\()\s*["']([^."'/#][^"']*)["']/g;
|
|
1754
1699
|
SERVER_RUNTIME_SOURCE_EXTENSIONS = new Set([
|
|
1755
1700
|
".cjs",
|
|
1756
1701
|
".js",
|
package/dist/client/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
mountAngularIsland
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-1x82dcw0.js";
|
|
5
5
|
import {
|
|
6
6
|
initializeIslandMarkupSnapshot
|
|
7
7
|
} from "../chunk-fak944et.js";
|
|
8
|
-
import"../chunk-
|
|
8
|
+
import"../chunk-jmfv960b.js";
|
|
9
|
+
import"../chunk-aaa985m2.js";
|
|
9
10
|
import"../chunk-kvq01j35.js";
|
|
10
|
-
import"../chunk-pnscgw95.js";
|
|
11
11
|
import {
|
|
12
12
|
getStreamSwapRuntimeScript
|
|
13
13
|
} from "../chunk-s6defjk2.js";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
logStartupTimingBlock,
|
|
15
15
|
setCurrentPageIslandMetadata,
|
|
16
16
|
transformCurrentStaticPageHtml
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-8xf58ka4.js";
|
|
18
18
|
import {
|
|
19
19
|
disposeTailwindCompiler,
|
|
20
20
|
incrementalTailwindBuild,
|
|
@@ -66,13 +66,14 @@ import {
|
|
|
66
66
|
getSsrContextId,
|
|
67
67
|
registerClientScript,
|
|
68
68
|
setSsrContextGetter
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-aaa985m2.js";
|
|
70
|
+
import"./chunk-kvq01j35.js";
|
|
70
71
|
import"./chunk-s6defjk2.js";
|
|
71
72
|
import"./chunk-p5504p14.js";
|
|
72
73
|
import {
|
|
73
74
|
renderIslandMarkup,
|
|
74
75
|
renderIslandResult
|
|
75
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-azqk45e4.js";
|
|
76
77
|
import"./chunk-9ve9jq72.js";
|
|
77
78
|
import"./chunk-7fw6x3js.js";
|
|
78
79
|
import"./chunk-mbazhahf.js";
|
|
@@ -451,7 +452,7 @@ var prepareDev = async (config, buildDir) => {
|
|
|
451
452
|
patchElysiaRouteRegistrationCallsites();
|
|
452
453
|
recordStep("patch route registration", stepStartedAt);
|
|
453
454
|
stepStartedAt = performance.now();
|
|
454
|
-
const { devBuild } = await import("./chunk-
|
|
455
|
+
const { devBuild } = await import("./chunk-2ds7qnyw.js");
|
|
455
456
|
const result = await devBuild(config);
|
|
456
457
|
recordStep("devBuild", stepStartedAt);
|
|
457
458
|
stepStartedAt = performance.now();
|
|
@@ -7281,5 +7282,5 @@ export {
|
|
|
7281
7282
|
ANGULAR_INIT_TIMEOUT_MS
|
|
7282
7283
|
};
|
|
7283
7284
|
|
|
7284
|
-
//# debugId=
|
|
7285
|
+
//# debugId=670FCE2344AB000264756E2164756E21
|
|
7285
7286
|
//# sourceMappingURL=index.js.map
|