@absolutejs/absolute 0.19.0-beta.801 → 0.19.0-beta.802
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 +5 -5
- package/dist/{chunk-kvq01j35.js → chunk-0r32762k.js} +13 -3
- package/dist/{chunk-kvq01j35.js.map → chunk-0r32762k.js.map} +3 -3
- package/dist/chunk-26qn7py4.js +20 -0
- package/dist/{chunk-73brtyw5.js.map → chunk-26qn7py4.js.map} +1 -1
- package/dist/{chunk-2g15ak0e.js → chunk-7x4hne4h.js} +6 -6
- package/dist/{chunk-9eab59st.js → chunk-8zz4g25g.js} +10 -9
- package/dist/chunk-8zz4g25g.js.map +14 -0
- package/dist/{chunk-hhqh49fz.js → chunk-by7t1d3r.js} +5 -5
- package/dist/chunk-by7t1d3r.js.map +10 -0
- package/dist/{chunk-1x82dcw0.js → chunk-ccz4x8vr.js} +3 -3
- package/dist/{chunk-86vpx6hc.js → chunk-g8n8v5r8.js} +31 -12
- package/dist/{chunk-86vpx6hc.js.map → chunk-g8n8v5r8.js.map} +4 -4
- package/dist/{chunk-jmfv960b.js → chunk-hf5fjykx.js} +11 -11
- package/dist/{chunk-jmfv960b.js.map → chunk-hf5fjykx.js.map} +3 -3
- package/dist/{chunk-ey5hs6x6.js → chunk-k6km9xnz.js} +46 -3
- package/dist/{chunk-ey5hs6x6.js.map → chunk-k6km9xnz.js.map} +3 -3
- package/dist/{chunk-cs95jp8a.js → chunk-pevt15h0.js} +5 -5
- package/dist/{chunk-8xf58ka4.js → chunk-r0w678ve.js} +2 -2
- package/dist/{chunk-aaa985m2.js → chunk-r8dzkm4s.js} +2 -2
- package/dist/{chunk-77cqkarb.js → chunk-vjhxm8n2.js} +8 -4
- package/dist/{chunk-77cqkarb.js.map → chunk-vjhxm8n2.js.map} +1 -1
- package/dist/{chunk-t81a331y.js → chunk-y84qnsd3.js} +8 -3
- package/dist/chunk-y84qnsd3.js.map +10 -0
- package/dist/{chunk-azqk45e4.js → chunk-z6c8qcmw.js} +2 -2
- package/dist/client/index.js +4 -4
- package/dist/index.js +6 -6
- package/dist/islands/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/src/angular/resolveAngularPackage.d.ts +10 -0
- package/dist/src/build/buildAngularVendor.d.ts +14 -0
- package/dist/src/core/devVendorPaths.d.ts +2 -0
- package/dist/svelte/index.js +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-73brtyw5.js +0 -16
- package/dist/chunk-9eab59st.js.map +0 -14
- package/dist/chunk-hhqh49fz.js.map +0 -10
- package/dist/chunk-t81a331y.js.map +0 -10
- /package/dist/{chunk-2g15ak0e.js.map → chunk-7x4hne4h.js.map} +0 -0
- /package/dist/{chunk-1x82dcw0.js.map → chunk-ccz4x8vr.js.map} +0 -0
- /package/dist/{chunk-cs95jp8a.js.map → chunk-pevt15h0.js.map} +0 -0
- /package/dist/{chunk-8xf58ka4.js.map → chunk-r0w678ve.js.map} +0 -0
- /package/dist/{chunk-aaa985m2.js.map → chunk-r8dzkm4s.js.map} +0 -0
- /package/dist/{chunk-azqk45e4.js.map → chunk-z6c8qcmw.js.map} +0 -0
package/dist/angular/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "../chunk-5fhp1jap.js";
|
|
7
7
|
import {
|
|
8
8
|
handleAngularPageRequest
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-8zz4g25g.js";
|
|
10
10
|
import"../chunk-gd6wmknh.js";
|
|
11
11
|
import"../chunk-mtgf69xn.js";
|
|
12
12
|
import"../chunk-v5vmsxmy.js";
|
|
@@ -31,9 +31,9 @@ import {
|
|
|
31
31
|
import"../chunk-qxq2zcty.js";
|
|
32
32
|
import {
|
|
33
33
|
getCachedRouteData
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import"../chunk-
|
|
36
|
-
import"../chunk-
|
|
34
|
+
} from "../chunk-hf5fjykx.js";
|
|
35
|
+
import"../chunk-r8dzkm4s.js";
|
|
36
|
+
import"../chunk-0r32762k.js";
|
|
37
37
|
import"../chunk-s6defjk2.js";
|
|
38
38
|
import"../chunk-p5504p14.js";
|
|
39
39
|
import {
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
} from "../chunk-25v9t56f.js";
|
|
46
46
|
import {
|
|
47
47
|
renderIslandMarkup
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-z6c8qcmw.js";
|
|
49
49
|
import"../chunk-9ve9jq72.js";
|
|
50
50
|
import"../chunk-7fw6x3js.js";
|
|
51
51
|
import"../chunk-mbazhahf.js";
|
package/dist/angular/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleAngularPageRequest
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-8zz4g25g.js";
|
|
5
5
|
import"../chunk-gd6wmknh.js";
|
|
6
6
|
import"../chunk-mtgf69xn.js";
|
|
7
7
|
import"../chunk-v5vmsxmy.js";
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
withPendingTask
|
|
23
23
|
} from "../chunk-6pdj08z3.js";
|
|
24
24
|
import"../chunk-qxq2zcty.js";
|
|
25
|
-
import"../chunk-
|
|
26
|
-
import"../chunk-
|
|
27
|
-
import"../chunk-
|
|
25
|
+
import"../chunk-hf5fjykx.js";
|
|
26
|
+
import"../chunk-r8dzkm4s.js";
|
|
27
|
+
import"../chunk-0r32762k.js";
|
|
28
28
|
import"../chunk-s6defjk2.js";
|
|
29
29
|
import"../chunk-p5504p14.js";
|
|
30
30
|
import {
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
RESPONSE_INIT,
|
|
35
35
|
buildAbsoluteHttpTransferCacheOptions
|
|
36
36
|
} from "../chunk-25v9t56f.js";
|
|
37
|
-
import"../chunk-
|
|
37
|
+
import"../chunk-z6c8qcmw.js";
|
|
38
38
|
import"../chunk-9ve9jq72.js";
|
|
39
39
|
import"../chunk-7fw6x3js.js";
|
|
40
40
|
import"../chunk-mbazhahf.js";
|
package/dist/build.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
build,
|
|
4
4
|
devBuild
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-g8n8v5r8.js";
|
|
6
6
|
import"./chunk-vkrpm7kc.js";
|
|
7
7
|
import"./chunk-cg95827x.js";
|
|
8
8
|
import"./chunk-hcsmxw1v.js";
|
|
9
9
|
import"./chunk-3g91wb4f.js";
|
|
10
10
|
import"./chunk-4d39r92n.js";
|
|
11
11
|
import"./chunk-93sqk7be.js";
|
|
12
|
-
import"./chunk-
|
|
12
|
+
import"./chunk-k6km9xnz.js";
|
|
13
13
|
import"./chunk-7kjj42xm.js";
|
|
14
14
|
import"./chunk-bxfghpma.js";
|
|
15
15
|
import"./chunk-cdxd7sy2.js";
|
|
@@ -18,9 +18,9 @@ import"./chunk-swrnzs4c.js";
|
|
|
18
18
|
import"./chunk-b3gbnrwe.js";
|
|
19
19
|
import"./chunk-mtxzyxpg.js";
|
|
20
20
|
import"./chunk-hyjs4bqs.js";
|
|
21
|
-
import"./chunk-
|
|
21
|
+
import"./chunk-y84qnsd3.js";
|
|
22
22
|
import"./chunk-85n68sy6.js";
|
|
23
|
-
import"./chunk-
|
|
23
|
+
import"./chunk-r0w678ve.js";
|
|
24
24
|
import"./chunk-d7mwkzry.js";
|
|
25
25
|
import"./chunk-h5bbfn3n.js";
|
|
26
26
|
import"./chunk-11zpfqz6.js";
|
|
@@ -34,7 +34,7 @@ import"./chunk-gf0ygptk.js";
|
|
|
34
34
|
import"./chunk-851whwc7.js";
|
|
35
35
|
import"./chunk-s6defjk2.js";
|
|
36
36
|
import"./chunk-p5504p14.js";
|
|
37
|
-
import"./chunk-
|
|
37
|
+
import"./chunk-z6c8qcmw.js";
|
|
38
38
|
import"./chunk-9ve9jq72.js";
|
|
39
39
|
import"./chunk-7fw6x3js.js";
|
|
40
40
|
import"./chunk-mbazhahf.js";
|
|
@@ -29,8 +29,18 @@ var resolveAngularPackage = (specifier) => {
|
|
|
29
29
|
return resolvePackageEntry(packageDir);
|
|
30
30
|
return specifier;
|
|
31
31
|
};
|
|
32
|
+
var toSafeVendorName = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_");
|
|
33
|
+
var resolveAngularRuntimePath = (specifier) => {
|
|
34
|
+
const buildDir = process.env.ABSOLUTE_BUILD_DIR;
|
|
35
|
+
if (buildDir) {
|
|
36
|
+
const vendorPath = join(buildDir, "angular", "vendor", "server", `${toSafeVendorName(specifier)}.js`);
|
|
37
|
+
if (existsSync(vendorPath))
|
|
38
|
+
return vendorPath;
|
|
39
|
+
}
|
|
40
|
+
return resolveAngularPackage(specifier);
|
|
41
|
+
};
|
|
32
42
|
|
|
33
|
-
export { resolveAngularPackageDir, resolveAngularPackage };
|
|
43
|
+
export { resolveAngularPackageDir, resolveAngularPackage, resolveAngularRuntimePath };
|
|
34
44
|
|
|
35
|
-
//# debugId=
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# debugId=75E2EE6F8A14489264756E2164756E21
|
|
46
|
+
//# sourceMappingURL=chunk-0r32762k.js.map
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/angular/resolveAngularPackage.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { existsSync, readFileSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\n\n/**\n * Resolve Angular package paths from the compiled runtime node_modules first,\n * then the app's process.cwd()/node_modules, falling back to the bare specifier.\n * This prevents Bun's baked import.meta.dir from resolving Angular packages\n * from the absolutejs source tree instead of the consumer's project when\n * running from a published npm package.\n */\nexport const resolveAngularPackageDir = (specifier: string) => {\n\tconst fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR\n\t\t? resolve(process.env.ABSOLUTE_BUILD_DIR, 'node_modules', specifier)\n\t\t: null;\n\tif (fromCompiledRuntime && existsSync(fromCompiledRuntime)) {\n\t\treturn fromCompiledRuntime;\n\t}\n\n\tconst fromProject = resolve(process.cwd(), 'node_modules', specifier);\n\n\tif (existsSync(fromProject)) {\n\t\treturn fromProject;\n\t}\n\n\treturn null;\n};\n\nconst resolvePackageEntry = (packageDir: string) => {\n\ttry {\n\t\tconst pkg = JSON.parse(\n\t\t\treadFileSync(join(packageDir, 'package.json'), 'utf-8')\n\t\t);\n\t\tconst rootExport = pkg.exports?.['.'];\n\t\tconst entry =\n\t\t\t(typeof rootExport === 'string'\n\t\t\t\t? rootExport\n\t\t\t\t: rootExport?.default) ??\n\t\t\tpkg.module ??\n\t\t\tpkg.main ??\n\t\t\t'index.js';\n\n\t\treturn join(packageDir, entry);\n\t} catch {\n\t\treturn packageDir;\n\t}\n};\n\nexport const resolveAngularPackage = (specifier: string) => {\n\tconst packageDir = resolveAngularPackageDir(specifier);\n\tif (packageDir) return resolvePackageEntry(packageDir);\n\n\treturn specifier;\n};\n"
|
|
5
|
+
"import { existsSync, readFileSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\n\n/**\n * Resolve Angular package paths from the compiled runtime node_modules first,\n * then the app's process.cwd()/node_modules, falling back to the bare specifier.\n * This prevents Bun's baked import.meta.dir from resolving Angular packages\n * from the absolutejs source tree instead of the consumer's project when\n * running from a published npm package.\n */\nexport const resolveAngularPackageDir = (specifier: string) => {\n\tconst fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR\n\t\t? resolve(process.env.ABSOLUTE_BUILD_DIR, 'node_modules', specifier)\n\t\t: null;\n\tif (fromCompiledRuntime && existsSync(fromCompiledRuntime)) {\n\t\treturn fromCompiledRuntime;\n\t}\n\n\tconst fromProject = resolve(process.cwd(), 'node_modules', specifier);\n\n\tif (existsSync(fromProject)) {\n\t\treturn fromProject;\n\t}\n\n\treturn null;\n};\n\nconst resolvePackageEntry = (packageDir: string) => {\n\ttry {\n\t\tconst pkg = JSON.parse(\n\t\t\treadFileSync(join(packageDir, 'package.json'), 'utf-8')\n\t\t);\n\t\tconst rootExport = pkg.exports?.['.'];\n\t\tconst entry =\n\t\t\t(typeof rootExport === 'string'\n\t\t\t\t? rootExport\n\t\t\t\t: rootExport?.default) ??\n\t\t\tpkg.module ??\n\t\t\tpkg.main ??\n\t\t\t'index.js';\n\n\t\treturn join(packageDir, entry);\n\t} catch {\n\t\treturn packageDir;\n\t}\n};\n\nexport const resolveAngularPackage = (specifier: string) => {\n\tconst packageDir = resolveAngularPackageDir(specifier);\n\tif (packageDir) return resolvePackageEntry(packageDir);\n\n\treturn specifier;\n};\n\nconst toSafeVendorName = (specifier: string) =>\n\tspecifier.replace(/^@/, '').replace(/\\//g, '_');\n\n/** Prefer the linked Bun-target vendor file built by\n * `buildAngularServerVendor`. The file is at\n * `<ABSOLUTE_BUILD_DIR>/angular/vendor/server/<safe>.js`, which is what every\n * server bundle's `@angular/*` imports get rewritten to point at. Sharing\n * this path keeps SSR's class identity unified — the dual-package hazard\n * that produces NG0201 only appears when the runtime imports a *different*\n * copy from the bundles. Falls back to `resolveAngularPackage` (node_modules)\n * when no vendor file is available — e.g. running tests outside an\n * absolutejs build, or before the vendor pass completes. */\nexport const resolveAngularRuntimePath = (specifier: string) => {\n\tconst buildDir = process.env.ABSOLUTE_BUILD_DIR;\n\tif (buildDir) {\n\t\tconst vendorPath = join(\n\t\t\tbuildDir,\n\t\t\t'angular',\n\t\t\t'vendor',\n\t\t\t'server',\n\t\t\t`${toSafeVendorName(specifier)}.js`\n\t\t);\n\t\tif (existsSync(vendorPath)) return vendorPath;\n\t}\n\n\treturn resolveAngularPackage(specifier);\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";;AAAA;AACA;AASO,IAAM,2BAA2B,CAAC,cAAsB;AAAA,EAC9D,MAAM,sBAAsB,QAAQ,IAAI,qBACrC,QAAQ,QAAQ,I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M,KAAK,MAChB,aAAa,KAAK,YAAY,cAAc,GAAG,OAAO,CACvD;AAAA,IACA,MAAM,aAAa,IAAI,UAAU;AAAA,IACjC,MAAM,SACJ,OAAO,eAAe,WACpB,aACA,YAAY,YACf,IAAI,UACJ,IAAI,QACJ;AAAA,IAED,OAAO,KAAK,YAAY,KAAK;AAAA,IAC5B,MAAM;AAAA,IACP,OAAO;AAAA;AAAA;AAIF,IAAM,wBAAwB,CAAC,cAAsB;AAAA,EAC3D,MAAM,aAAa,yBAAyB,SAAS;AAAA,EACrD,IAAI;AAAA,IAAY,OAAO,oBAAoB,UAAU;AAAA,EAErD,OAAO;AAAA;AAGR,IAAM,mBAAmB,CAAC,cACzB,UAAU,QAAQ,MAAM,EAAE,EAAE,QAAQ,OAAO,GAAG;AAWxC,IAAM,4BAA4B,CAAC,cAAsB;AAAA,EAC/D,MAAM,WAAW,QAAQ,IAAI;AAAA,EAC7B,IAAI,UAAU;AAAA,IACb,MAAM,aAAa,KAClB,UACA,WACA,UACA,UACA,GAAG,iBAAiB,SAAS,MAC9B;AAAA,IACA,IAAI,WAAW,UAAU;AAAA,MAAG,OAAO;AAAA,EACpC;AAAA,EAEA,OAAO,sBAAsB,SAAS;AAAA;",
|
|
8
|
+
"debugId": "75E2EE6F8A14489264756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
buildAngularServerVendor,
|
|
4
|
+
buildAngularVendor,
|
|
5
|
+
computeAngularServerVendorPaths,
|
|
6
|
+
computeAngularVendorPaths,
|
|
7
|
+
computeAngularVendorPathsAsync
|
|
8
|
+
} from "./chunk-k6km9xnz.js";
|
|
9
|
+
import"./chunk-7kjj42xm.js";
|
|
10
|
+
import"./chunk-bmgqm774.js";
|
|
11
|
+
export {
|
|
12
|
+
computeAngularVendorPathsAsync,
|
|
13
|
+
computeAngularVendorPaths,
|
|
14
|
+
computeAngularServerVendorPaths,
|
|
15
|
+
buildAngularVendor,
|
|
16
|
+
buildAngularServerVendor
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//# debugId=6BB45CE7334E2BEE64756E2164756E21
|
|
20
|
+
//# sourceMappingURL=chunk-26qn7py4.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
devBuild
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-g8n8v5r8.js";
|
|
5
5
|
import"./chunk-vkrpm7kc.js";
|
|
6
6
|
import"./chunk-cg95827x.js";
|
|
7
7
|
import"./chunk-hcsmxw1v.js";
|
|
8
8
|
import"./chunk-3g91wb4f.js";
|
|
9
9
|
import"./chunk-4d39r92n.js";
|
|
10
10
|
import"./chunk-93sqk7be.js";
|
|
11
|
-
import"./chunk-
|
|
11
|
+
import"./chunk-k6km9xnz.js";
|
|
12
12
|
import"./chunk-7kjj42xm.js";
|
|
13
13
|
import"./chunk-bxfghpma.js";
|
|
14
14
|
import"./chunk-cdxd7sy2.js";
|
|
@@ -17,9 +17,9 @@ import"./chunk-swrnzs4c.js";
|
|
|
17
17
|
import"./chunk-b3gbnrwe.js";
|
|
18
18
|
import"./chunk-mtxzyxpg.js";
|
|
19
19
|
import"./chunk-hyjs4bqs.js";
|
|
20
|
-
import"./chunk-
|
|
20
|
+
import"./chunk-y84qnsd3.js";
|
|
21
21
|
import"./chunk-85n68sy6.js";
|
|
22
|
-
import"./chunk-
|
|
22
|
+
import"./chunk-r0w678ve.js";
|
|
23
23
|
import"./chunk-d7mwkzry.js";
|
|
24
24
|
import"./chunk-h5bbfn3n.js";
|
|
25
25
|
import"./chunk-11zpfqz6.js";
|
|
@@ -33,7 +33,7 @@ import"./chunk-gf0ygptk.js";
|
|
|
33
33
|
import"./chunk-851whwc7.js";
|
|
34
34
|
import"./chunk-s6defjk2.js";
|
|
35
35
|
import"./chunk-p5504p14.js";
|
|
36
|
-
import"./chunk-
|
|
36
|
+
import"./chunk-z6c8qcmw.js";
|
|
37
37
|
import"./chunk-9ve9jq72.js";
|
|
38
38
|
import"./chunk-7fw6x3js.js";
|
|
39
39
|
import"./chunk-mbazhahf.js";
|
|
@@ -48,4 +48,4 @@ export {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
//# debugId=168CA101CFD7E28A64756E2164756E21
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-7x4hne4h.js.map
|
|
@@ -30,16 +30,17 @@ import {
|
|
|
30
30
|
loadSsrDeps,
|
|
31
31
|
renderAngularApp,
|
|
32
32
|
resolveSelector
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-hf5fjykx.js";
|
|
34
34
|
import {
|
|
35
35
|
setSsrContextGetter
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-r8dzkm4s.js";
|
|
37
37
|
import {
|
|
38
|
-
resolveAngularPackage
|
|
39
|
-
|
|
38
|
+
resolveAngularPackage,
|
|
39
|
+
resolveAngularRuntimePath
|
|
40
|
+
} from "./chunk-0r32762k.js";
|
|
40
41
|
import {
|
|
41
42
|
renderIslandMarkup
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-z6c8qcmw.js";
|
|
43
44
|
import {
|
|
44
45
|
BASE_36_RADIX,
|
|
45
46
|
RANDOM_ID_END_INDEX
|
|
@@ -57,7 +58,7 @@ import { basename, dirname, join, resolve } from "path";
|
|
|
57
58
|
// src/angular/animationProviders.ts
|
|
58
59
|
var noopAnimationProvidersPromise = null;
|
|
59
60
|
var loadNoopAnimationProviders = async () => {
|
|
60
|
-
const animations = await import(
|
|
61
|
+
const animations = await import(resolveAngularRuntimePath("@angular/platform-browser/animations"));
|
|
61
62
|
return animations.provideNoopAnimations();
|
|
62
63
|
};
|
|
63
64
|
var buildServerAnimationProviders = (usesLegacyAnimations) => {
|
|
@@ -282,7 +283,7 @@ var resolvePageComponent = (pageModule) => {
|
|
|
282
283
|
var compilerImportPromise = null;
|
|
283
284
|
var ensureAngularCompiler = () => {
|
|
284
285
|
if (!compilerImportPromise) {
|
|
285
|
-
compilerImportPromise = import(
|
|
286
|
+
compilerImportPromise = import(resolveAngularRuntimePath("@angular/compiler"));
|
|
286
287
|
}
|
|
287
288
|
return compilerImportPromise;
|
|
288
289
|
};
|
|
@@ -424,5 +425,5 @@ var handleAngularPageRequest = async (input) => {
|
|
|
424
425
|
|
|
425
426
|
export { handleAngularPageRequest };
|
|
426
427
|
|
|
427
|
-
//# debugId=
|
|
428
|
-
//# sourceMappingURL=chunk-
|
|
428
|
+
//# debugId=CC58F9C2681B12B164756E2164756E21
|
|
429
|
+
//# sourceMappingURL=chunk-8zz4g25g.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
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,IAA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A,QAClD,MAAM,yBAAyB,uBAC5B,MAAM,0BAA0B,OAAO,IACvC;AAAA,QAEH,MAAM,OAAO,wBACZ,iBACC,wBACA,WACA,mBACA,UACD,GACA,EAAE,YAAY,qBAAqB,CACpC;AAAA,QAEA,OAAO,IAAI,SAAS,MAAM,oBAAoB,YAAY,CAAC;AAAA;AAAA,MAG5D,OAAO,MAAM,iCACZ,MACC,SAAS,0BAA0B,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,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
resolveAngularRuntimePath
|
|
4
|
+
} from "./chunk-0r32762k.js";
|
|
5
5
|
import"./chunk-bmgqm774.js";
|
|
6
6
|
|
|
7
7
|
// src/angular/angularPatch.ts
|
|
@@ -99,7 +99,7 @@ var patchElementLayout = (doc) => {
|
|
|
99
99
|
layoutPatchApplied = true;
|
|
100
100
|
};
|
|
101
101
|
var applyPatches = async () => {
|
|
102
|
-
const { \u{275}DominoAdapter } = await import(
|
|
102
|
+
const { \u{275}DominoAdapter } = await import(resolveAngularRuntimePath("@angular/platform-server"));
|
|
103
103
|
if (!\u{275}DominoAdapter?.prototype) {
|
|
104
104
|
console.warn("[Angular Patch] \u0275DominoAdapter not found, skipping patches");
|
|
105
105
|
return false;
|
|
@@ -145,5 +145,5 @@ export {
|
|
|
145
145
|
applyPatches
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
//# debugId=
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
148
|
+
//# debugId=D59B1B9EA72E3DAF64756E2164756E21
|
|
149
|
+
//# sourceMappingURL=chunk-by7t1d3r.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/angular/angularPatch.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { resolveAngularRuntimePath } from './resolveAngularPackage';\n\n// Patches Angular SSR's DominoAdapter to guard against null doc.head\n\nconst ensureHead = (doc: Document) => {\n\tif (!doc || doc.head || !doc.documentElement) {\n\t\treturn;\n\t}\n\n\tconst head = doc.createElement('head');\n\tdoc.documentElement.insertBefore(head, doc.documentElement.firstChild);\n};\n\n// Domino's Element does not implement layout APIs that browser components\n// (e.g. ngx-datatable, swiper, drag-drop) call eagerly during change detection.\n// Returning a zeroed DOMRect lets those components render in SSR without\n// crashing — the real values get computed once the page hydrates client-side.\nconst SSR_LAYOUT_RECT = Object.freeze({\n\tbottom: 0,\n\theight: 0,\n\tleft: 0,\n\tright: 0,\n\ttop: 0,\n\twidth: 0,\n\tx: 0,\n\ty: 0,\n\ttoJSON() {\n\t\treturn this;\n\t}\n});\nlet layoutPatchApplied = false;\nconst collectPrototypeChain = (instance: object | null) => {\n\tconst protos: object[] = [];\n\tlet current: object | null = instance\n\t\t? Object.getPrototypeOf(instance)\n\t\t: null;\n\twhile (current && current !== Object.prototype) {\n\t\tprotos.push(current);\n\t\tcurrent = Object.getPrototypeOf(current);\n\t}\n\n\treturn protos;\n};\n\nconst patchElementLayout = (doc: Document) => {\n\tif (layoutPatchApplied || !doc) {\n\t\treturn;\n\t}\n\tlet element: Element;\n\ttry {\n\t\telement = doc.createElement('div');\n\t} catch {\n\t\treturn;\n\t}\n\t// Walk the entire prototype chain so HTMLElement → Element → Node all get\n\t// the layout shims. Domino's base Element.prototype is several hops above\n\t// HTMLDivElement.prototype, and 3rd-party libs call methods anywhere along\n\t// the chain.\n\tconst protos = collectPrototypeChain(element);\n\tif (protos.length === 0) return;\n\n\tconst copyLayoutRect = (rect: typeof SSR_LAYOUT_RECT) => ({ ...rect });\n\tconst createLayoutRect = () => copyLayoutRect(SSR_LAYOUT_RECT);\n\tconst getClientRects = () => [];\n\tconst noop = () => undefined;\n\tconst numericProps = [\n\t\t'clientWidth',\n\t\t'clientHeight',\n\t\t'clientLeft',\n\t\t'clientTop',\n\t\t'offsetWidth',\n\t\t'offsetHeight',\n\t\t'offsetLeft',\n\t\t'offsetTop',\n\t\t'scrollWidth',\n\t\t'scrollHeight',\n\t\t'scrollLeft',\n\t\t'scrollTop'\n\t];\n\n\tfor (const proto of protos) {\n\t\tconst define = (name: string, value: unknown) => {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(proto, name);\n\t\t\tif (typeof descriptor?.value === 'function') return;\n\n\t\t\tObject.defineProperty(proto, name, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t};\n\n\t\tdefine('getBoundingClientRect', createLayoutRect);\n\t\tdefine('getClientRects', getClientRects);\n\t\tdefine('scrollTo', noop);\n\t\tdefine('scrollBy', noop);\n\t\tdefine('scrollIntoView', noop);\n\t\tdefine('focus', noop);\n\t\tdefine('blur', noop);\n\n\t\tfor (const prop of numericProps) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(proto, prop);\n\t\t\tif (desc) continue;\n\t\t\tObject.defineProperty(proto, prop, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tget: () => 0\n\t\t\t});\n\t\t}\n\t}\n\n\tlayoutPatchApplied = true;\n};\n\nexport const applyPatches = async () => {\n\tconst { ɵDominoAdapter } = await import(\n\t\tresolveAngularRuntimePath('@angular/platform-server')\n\t);\n\tif (!ɵDominoAdapter?.prototype) {\n\t\tconsole.warn(\n\t\t\t'[Angular Patch] ɵDominoAdapter not found, skipping patches'\n\t\t);\n\n\t\treturn false;\n\t}\n\n\t// Patch the layout shims onto Domino's Element prototypes immediately\n\t// (don't wait for the first createHtmlDocument call). Components that\n\t// hold an ElementRef from the very first change-detection pass call\n\t// these methods before the lazy patch path would have run.\n\ttry {\n\t\tconst adapter = new ɵDominoAdapter();\n\t\tconst seedDoc =\n\t\t\ttypeof adapter.createHtmlDocument === 'function'\n\t\t\t\t? adapter.createHtmlDocument()\n\t\t\t\t: typeof adapter.getDefaultDocument === 'function'\n\t\t\t\t\t? adapter.getDefaultDocument()\n\t\t\t\t\t: null;\n\t\tif (seedDoc) {\n\t\t\tpatchElementLayout(seedDoc);\n\t\t\tconst probe = seedDoc.createElement('div') as Element & {\n\t\t\t\tgetBoundingClientRect?: () => DOMRect;\n\t\t\t};\n\t\t\tif (typeof probe.getBoundingClientRect !== 'function') {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'[Angular Patch] Layout shim did not stick on probe element prototype chain'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tconsole.warn(\n\t\t\t'[Angular Patch] Could not eagerly patch Element prototypes:',\n\t\t\terror\n\t\t);\n\t}\n\n\tconst proto = ɵDominoAdapter.prototype;\n\n\tconst origGetBaseHref = proto.getBaseHref;\n\tproto.getBaseHref = function (doc: Document) {\n\t\tif (!doc || !doc.head || typeof doc.head.children === 'undefined') {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn origGetBaseHref.call(this, doc);\n\t};\n\n\tconst origCreateHtmlDocument = proto.createHtmlDocument;\n\tproto.createHtmlDocument = function () {\n\t\tconst doc = origCreateHtmlDocument.call(this);\n\t\tensureHead(doc);\n\t\tpatchElementLayout(doc);\n\n\t\treturn doc;\n\t};\n\n\tconst origGetDefaultDocument = proto.getDefaultDocument;\n\tproto.getDefaultDocument = function () {\n\t\tconst doc = origGetDefaultDocument.call(this);\n\t\tensureHead(doc);\n\t\tpatchElementLayout(doc);\n\n\t\treturn doc;\n\t};\n\n\treturn true;\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;AAIA,IAAM,aAAa,CAAC,QAAkB;AAAA,EACrC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,iBAAiB;AAAA,IAC7C;AAAA,EACD;AAAA,EAEA,MAAM,OAAO,IAAI,cAAc,MAAM;AAAA,EACrC,IAAI,gBAAgB,aAAa,MAAM,IAAI,gBAAgB,UAAU;AAAA;AAOtE,IAAM,kBAAkB,OAAO,OAAO;AAAA,EACrC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,GAAG;AAAA,IACR,OAAO;AAAA;AAET,CAAC;AACD,IAAI,qBAAqB;AACzB,IAAM,wBAAwB,CAAC,aAA4B;AAAA,EAC1D,MAAM,SAAmB,CAAC;AAAA,EAC1B,IAAI,UAAyB,WAC1B,OAAO,eAAe,QAAQ,IAC9B;AAAA,EACH,OAAO,WAAW,YAAY,OAAO,WAAW;AAAA,IAC/C,OAAO,KAAK,OAAO;AAAA,IACnB,UAAU,OAAO,eAAe,OAAO;AAAA,EACxC;AAAA,EAEA,OAAO;AAAA;AAGR,IAAM,qBAAqB,CAAC,QAAkB;AAAA,EAC7C,IAAI,sBAAsB,CAAC,KAAK;AAAA,IAC/B;AAAA,EACD;AAAA,EACA,IAAI;AAAA,EACJ,IAAI;AAAA,IACH,UAAU,IAAI,cAAc,KAAK;AAAA,IAChC,MAAM;AAAA,IACP;AAAA;AAAA,EAMD,MAAM,SAAS,sBAAsB,OAAO;AAAA,EAC5C,IAAI,OAAO,WAAW;AAAA,IAAG;AAAA,EAEzB,MAAM,iBAAiB,CA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|
|
|
2
2
|
import {
|
|
3
3
|
getAngularDeps,
|
|
4
4
|
withSuppressedAngularDevLogs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-hf5fjykx.js";
|
|
6
6
|
import {
|
|
7
7
|
getSsrContextId
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-r8dzkm4s.js";
|
|
9
9
|
import {
|
|
10
10
|
__require
|
|
11
11
|
} from "./chunk-bmgqm774.js";
|
|
@@ -181,4 +181,4 @@ var renderAngularIslandToHtml = async (component, props, islandId) => {
|
|
|
181
181
|
export { getAngularIslandSelector, mountAngularIsland, renderAngularIslandToHtml };
|
|
182
182
|
|
|
183
183
|
//# debugId=22272B760DC7CB5D64756E2164756E21
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-ccz4x8vr.js.map
|
|
@@ -25,11 +25,13 @@ import {
|
|
|
25
25
|
updateAssetPaths
|
|
26
26
|
} from "./chunk-93sqk7be.js";
|
|
27
27
|
import {
|
|
28
|
+
buildAngularServerVendor,
|
|
28
29
|
buildAngularVendor,
|
|
30
|
+
computeAngularServerVendorPaths,
|
|
29
31
|
computeAngularVendorPaths,
|
|
30
32
|
computeAngularVendorPathsAsync,
|
|
31
33
|
createAngularLinkerPlugin
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-k6km9xnz.js";
|
|
33
35
|
import {
|
|
34
36
|
buildVueVendor,
|
|
35
37
|
computeVueVendorPaths
|
|
@@ -51,15 +53,17 @@ import {
|
|
|
51
53
|
normalizePath
|
|
52
54
|
} from "./chunk-hyjs4bqs.js";
|
|
53
55
|
import {
|
|
56
|
+
getAngularServerVendorPaths,
|
|
54
57
|
getAngularVendorPaths,
|
|
55
58
|
getDevVendorPaths,
|
|
56
59
|
getSvelteVendorPaths,
|
|
57
60
|
getVueVendorPaths,
|
|
61
|
+
setAngularServerVendorPaths,
|
|
58
62
|
setAngularVendorPaths,
|
|
59
63
|
setDevVendorPaths,
|
|
60
64
|
setSvelteVendorPaths,
|
|
61
65
|
setVueVendorPaths
|
|
62
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-y84qnsd3.js";
|
|
63
67
|
import {
|
|
64
68
|
buildReactVendor,
|
|
65
69
|
computeVendorPaths
|
|
@@ -75,7 +79,7 @@ import {
|
|
|
75
79
|
logStartupTimingBlock,
|
|
76
80
|
setCurrentPageIslandMetadata,
|
|
77
81
|
transformStaticPagesWithIslands
|
|
78
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-r0w678ve.js";
|
|
79
83
|
import {
|
|
80
84
|
disposeTailwindCompiler,
|
|
81
85
|
incrementalTailwindBuild
|
|
@@ -1277,10 +1281,16 @@ var build = async ({
|
|
|
1277
1281
|
}
|
|
1278
1282
|
let angularVendorPaths = getAngularVendorPaths();
|
|
1279
1283
|
if (!angularVendorPaths && hmr && angularDir) {
|
|
1280
|
-
const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-
|
|
1284
|
+
const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-26qn7py4.js");
|
|
1281
1285
|
angularVendorPaths = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
|
|
1282
1286
|
setAngularVendorPaths(angularVendorPaths);
|
|
1283
1287
|
}
|
|
1288
|
+
let angularServerVendorPaths = getAngularServerVendorPaths();
|
|
1289
|
+
if (!angularServerVendorPaths && hmr && angularDir) {
|
|
1290
|
+
const { computeAngularServerVendorPaths: computeAngularServerVendorPaths2 } = await import("./chunk-26qn7py4.js");
|
|
1291
|
+
angularServerVendorPaths = computeAngularServerVendorPaths2(buildPath, globalThis.__angularVendorSpecifiers ?? []);
|
|
1292
|
+
setAngularServerVendorPaths(angularServerVendorPaths);
|
|
1293
|
+
}
|
|
1284
1294
|
let vueVendorPaths = getVueVendorPaths();
|
|
1285
1295
|
if (!vueVendorPaths && hmr && vueDir) {
|
|
1286
1296
|
const { computeVueVendorPaths: computeVueVendorPaths2 } = await import("./chunk-6qjbrt0k.js");
|
|
@@ -1486,6 +1496,10 @@ var build = async ({
|
|
|
1486
1496
|
const { rewriteImports } = await import("./chunk-r7jmgqnw.js");
|
|
1487
1497
|
await tracePhase("postprocess/island-vendor-imports", () => rewriteImports(islandClientOutputs.map((artifact) => artifact.path), allIslandVendorPaths));
|
|
1488
1498
|
}
|
|
1499
|
+
if (serverOutputs.length > 0 && angularServerVendorPaths && Object.keys(angularServerVendorPaths).length > 0) {
|
|
1500
|
+
const { rewriteImports } = await import("./chunk-r7jmgqnw.js");
|
|
1501
|
+
await tracePhase("postprocess/server-angular-vendor-imports", () => rewriteImports(serverOutputs.filter((artifact) => artifact.path.endsWith(".js")).map((artifact) => artifact.path), angularServerVendorPaths));
|
|
1502
|
+
}
|
|
1489
1503
|
const cssLogs = [
|
|
1490
1504
|
...globalCssResult?.logs ?? [],
|
|
1491
1505
|
...vueCssResult?.logs ?? []
|
|
@@ -2684,13 +2698,13 @@ var updateServerManifestEntry = (state, artifact) => {
|
|
|
2684
2698
|
var bundleAngularClient = async (state, clientPaths, buildDir) => {
|
|
2685
2699
|
const { build: bunBuild3 } = await Promise.resolve(globalThis.Bun);
|
|
2686
2700
|
const { generateManifest: generateManifest2 } = await import("./chunk-41bf6aqt.js");
|
|
2687
|
-
const { getAngularVendorPaths: getAngularVendorPaths2 } = await import("./chunk-
|
|
2701
|
+
const { getAngularVendorPaths: getAngularVendorPaths2 } = await import("./chunk-vjhxm8n2.js");
|
|
2688
2702
|
const clientRoot = await computeClientRoot(state.resolvedPaths);
|
|
2689
2703
|
const depVendorPaths = globalThis.__depVendorPaths ?? {};
|
|
2690
2704
|
let angVendorPaths = getAngularVendorPaths2();
|
|
2691
2705
|
if (!angVendorPaths) {
|
|
2692
|
-
const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-
|
|
2693
|
-
const { setAngularVendorPaths: setAngularVendorPaths2 } = await import("./chunk-
|
|
2706
|
+
const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-26qn7py4.js");
|
|
2707
|
+
const { setAngularVendorPaths: setAngularVendorPaths2 } = await import("./chunk-vjhxm8n2.js");
|
|
2694
2708
|
angVendorPaths = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
|
|
2695
2709
|
setAngularVendorPaths2(angVendorPaths);
|
|
2696
2710
|
}
|
|
@@ -2825,7 +2839,7 @@ var collectReactEntries = (state, filesToRebuild, reactPagesPath, reactIndexesPa
|
|
|
2825
2839
|
var bundleReactClient = async (state, reactEntries, reactIndexesPath, buildDir) => {
|
|
2826
2840
|
const { build: bunBuild3 } = await Promise.resolve(globalThis.Bun);
|
|
2827
2841
|
const { generateManifest: generateManifest2 } = await import("./chunk-41bf6aqt.js");
|
|
2828
|
-
const { getDevVendorPaths: getDevVendorPaths2 } = await import("./chunk-
|
|
2842
|
+
const { getDevVendorPaths: getDevVendorPaths2 } = await import("./chunk-vjhxm8n2.js");
|
|
2829
2843
|
const { rewriteReactImports: rewriteReactImports2 } = await import("./chunk-6sccb4jr.js");
|
|
2830
2844
|
const clientRoot = await computeClientRoot(state.resolvedPaths);
|
|
2831
2845
|
const depVendorPaths = globalThis.__depVendorPaths ?? {};
|
|
@@ -2836,7 +2850,7 @@ var bundleReactClient = async (state, reactEntries, reactIndexesPath, buildDir)
|
|
|
2836
2850
|
let vendorPaths = getDevVendorPaths2();
|
|
2837
2851
|
if (!vendorPaths) {
|
|
2838
2852
|
const { computeVendorPaths: computeVendorPaths2 } = await import("./chunk-z9nvhm6r.js");
|
|
2839
|
-
const { setDevVendorPaths: setDevVendorPaths2 } = await import("./chunk-
|
|
2853
|
+
const { setDevVendorPaths: setDevVendorPaths2 } = await import("./chunk-vjhxm8n2.js");
|
|
2840
2854
|
vendorPaths = computeVendorPaths2();
|
|
2841
2855
|
setDevVendorPaths2(vendorPaths);
|
|
2842
2856
|
}
|
|
@@ -4217,6 +4231,7 @@ var devBuild = async (config) => {
|
|
|
4217
4231
|
};
|
|
4218
4232
|
let stepStartedAt = performance.now();
|
|
4219
4233
|
const state = createHMRState(config);
|
|
4234
|
+
process.env.ABSOLUTE_BUILD_DIR ??= state.resolvedPaths.buildDir;
|
|
4220
4235
|
recordStep("create HMR state", stepStartedAt);
|
|
4221
4236
|
stepStartedAt = performance.now();
|
|
4222
4237
|
const watchPaths = getWatchPaths(config, state.resolvedPaths);
|
|
@@ -4268,15 +4283,19 @@ var devBuild = async (config) => {
|
|
|
4268
4283
|
const vueVendorDir = resolve10(state.resolvedPaths.buildDir, "vue", "vendor");
|
|
4269
4284
|
const depVendorDir = resolve10(state.resolvedPaths.buildDir, "vendor");
|
|
4270
4285
|
const { buildDepVendor } = await import("./chunk-gytkmthr.js");
|
|
4271
|
-
const [, angularSpecs, , , depPaths] = await Promise.all([
|
|
4286
|
+
const [, angularSpecs, angularServerSpecs, , , depPaths] = await Promise.all([
|
|
4272
4287
|
config.reactDirectory ? buildReactVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
|
|
4273
4288
|
config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir, sourceDirs, true, Object.keys(globalThis.__depVendorPaths ?? {})) : Promise.resolve(undefined),
|
|
4289
|
+
config.angularDirectory ? buildAngularServerVendor(state.resolvedPaths.buildDir, sourceDirs, true) : Promise.resolve(undefined),
|
|
4274
4290
|
config.svelteDirectory ? buildSvelteVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
|
|
4275
4291
|
config.vueDirectory ? buildVueVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
|
|
4276
4292
|
buildDepVendor(state.resolvedPaths.buildDir, sourceDirs)
|
|
4277
4293
|
]);
|
|
4278
4294
|
if (angularSpecs)
|
|
4279
4295
|
globalThis.__angularVendorSpecifiers = angularSpecs;
|
|
4296
|
+
if (angularServerSpecs) {
|
|
4297
|
+
setAngularServerVendorPaths(computeAngularServerVendorPaths(state.resolvedPaths.buildDir, angularServerSpecs));
|
|
4298
|
+
}
|
|
4280
4299
|
globalThis.__depVendorPaths = depPaths;
|
|
4281
4300
|
recordStep("build vendor bundles", stepStartedAt);
|
|
4282
4301
|
stepStartedAt = performance.now();
|
|
@@ -4345,5 +4364,5 @@ var devBuild = async (config) => {
|
|
|
4345
4364
|
|
|
4346
4365
|
export { build, devBuild };
|
|
4347
4366
|
|
|
4348
|
-
//# debugId=
|
|
4349
|
-
//# sourceMappingURL=chunk-
|
|
4367
|
+
//# debugId=96BF9A5B5BA1690B64756E2164756E21
|
|
4368
|
+
//# sourceMappingURL=chunk-g8n8v5r8.js.map
|