@absolutejs/absolute 0.20.0-beta.176 → 0.20.0-beta.178
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/CHANGELOG.md +33 -0
- package/changelog.json +62 -0
- package/dist/angular/browser.js +17 -2
- package/dist/angular/browser.js.map +4 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +57 -33
- package/dist/angular/index.js.map +9 -8
- package/dist/angular/server.js +57 -33
- package/dist/angular/server.js.map +9 -8
- package/dist/build.js +532 -416
- package/dist/build.js.map +15 -15
- package/dist/cli/{compile-w2z6c9vt.js → compile-p5yv6ecp.js} +2 -2
- package/dist/cli/config/server.js +45 -12
- package/dist/cli/{dev-8br5mr7t.js → dev-2hbcsvkp.js} +1 -1
- package/dist/cli/{index-420h9hq7.js → index-1ewba8ye.js} +32 -3
- package/dist/cli/{index-7z1hh3fg.js → index-9dzdbbfc.js} +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{islands-bx67g15t.js → islands-6zgb7501.js} +1 -1
- package/dist/cli/{mobile-we5q51ey.js → mobile-c92dh8s2.js} +2 -2
- package/dist/cli/{start-srs11bm8.js → start-asxb79rc.js} +2 -2
- package/dist/cli/{typecheck-7fvww3b7.js → typecheck-m2j4tkdk.js} +165 -35
- package/dist/client/chunks/{index-8m2qq61n.js → index-58svs66p.js} +13 -3
- package/dist/client/chunks/{index-8m2qq61n.js.map → index-58svs66p.js.map} +5 -4
- package/dist/client/chunks/{islands-mfjmdwnb.js → islands-tcadmgcx.js} +3 -6
- package/dist/client/chunks/{islands-mfjmdwnb.js.map → islands-tcadmgcx.js.map} +3 -4
- package/dist/client/chunks/{react-sprprqzs.js → react-khr6ewhr.js} +2 -2
- package/dist/client/index.js +82 -6
- package/dist/client/index.js.map +7 -6
- package/dist/dev/client/handlers/islands.ts +2 -0
- package/dist/dev/client/handlers/react.ts +92 -111
- package/dist/dev/client/handlers/reactUpdateQueue.ts +153 -0
- package/dist/index.js +506 -389
- package/dist/index.js.map +16 -16
- package/dist/islands/browser.js +2 -2
- package/dist/islands/browser.js.map +3 -3
- package/dist/islands/index.js +13 -6
- package/dist/islands/index.js.map +6 -5
- package/dist/react/browser.js +113 -12
- package/dist/react/browser.js.map +10 -7
- package/dist/react/components/index.js +31 -7
- package/dist/react/components/index.js.map +5 -4
- package/dist/react/components/server/index.js +22 -6
- package/dist/react/index.js +190 -46
- package/dist/react/index.js.map +15 -11
- package/dist/react/server.js +82 -23
- package/dist/react/server.js.map +11 -9
- package/dist/src/build/compileSvelte.d.ts +12 -1
- package/dist/src/build/compileVue.d.ts +1 -0
- package/dist/src/build/islandEntries.d.ts +3 -1
- package/dist/src/cli/scripts/typecheck.d.ts +8 -0
- package/dist/src/cli/scripts/typecheckDiagnostics.d.ts +17 -0
- package/dist/src/client/preserveIslandMarkup.d.ts +4 -0
- package/dist/src/core/islandManifest.d.ts +6 -0
- package/dist/src/core/islandStylesheet.d.ts +17 -0
- package/dist/src/react/Island.d.ts +9 -2
- package/dist/src/react/IslandStyleLink.d.ts +11 -0
- package/dist/src/react/createIsland.d.ts +1 -1
- package/dist/src/react/serverComponents/nodeRendererRef.d.ts +13 -0
- package/dist/src/utils/requestRenderUrl.d.ts +1 -0
- package/dist/src/utils/resolveConvention.d.ts +1 -0
- package/dist/src/vue/Island.browser.d.ts +3 -1
- package/dist/src/vue/Island.d.ts +2 -2
- package/dist/src/vue/createIsland.browser.d.ts +2 -2
- package/dist/src/vue/createIsland.d.ts +2 -2
- package/dist/src/vue/islandStyleLink.d.ts +30 -0
- package/dist/svelte/browser.js +2 -2
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/index.js +51 -49
- package/dist/svelte/index.js.map +9 -8
- package/dist/svelte/server.js +48 -45
- package/dist/svelte/server.js.map +8 -7
- package/dist/types/globals.d.ts +3 -0
- package/dist/vue/browser.js +105 -10
- package/dist/vue/browser.js.map +10 -7
- package/dist/vue/index.js +170 -47
- package/dist/vue/index.js.map +14 -11
- package/dist/vue/server.js +81 -22
- package/dist/vue/server.js.map +9 -7
- package/package.json +1 -1
- /package/dist/cli/{index-6522t968.js → index-yd672jyq.js} +0 -0
- /package/dist/client/chunks/{react-sprprqzs.js.map → react-khr6ewhr.js.map} +0 -0
|
@@ -25,8 +25,8 @@ import"./index-3ewt17wm.js";
|
|
|
25
25
|
import"./index-pr1skxen.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/scripts/typecheck.ts
|
|
28
|
-
import { dirname as dirname3, join as join2, parse as parse3, relative as relative2, resolve as
|
|
29
|
-
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
28
|
+
import { dirname as dirname3, join as join2, parse as parse3, relative as relative2, resolve as resolve4 } from "path";
|
|
29
|
+
import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync3 } from "fs";
|
|
30
30
|
import { mkdir as mkdir2, rm as rm2, writeFile as writeFile2 } from "fs/promises";
|
|
31
31
|
|
|
32
32
|
// node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
@@ -1235,9 +1235,81 @@ var svelteDeclarationRootDirs = (projectRoot, fromDir) => [
|
|
|
1235
1235
|
];
|
|
1236
1236
|
var tsconfigHasSvelteDeclarationRoot = (rootDirs) => Array.isArray(rootDirs) && rootDirs.some((entry) => typeof entry === "string" && entry.replace(/^\.\//, "").replace(/\/$/, "") === SVELTE_DECLARATIONS_ROOT);
|
|
1237
1237
|
|
|
1238
|
+
// src/cli/scripts/typecheckDiagnostics.ts
|
|
1239
|
+
import { resolve as resolve3 } from "path";
|
|
1240
|
+
var ANSI_COLOR_REGEX = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-9;]*m`, "g");
|
|
1241
|
+
var stripAnsi = (text) => text.replace(ANSI_COLOR_REGEX, "");
|
|
1242
|
+
var PAREN_FORMAT = /^(.+?)\((\d+),(\d+)\): error (TS\d+)/;
|
|
1243
|
+
var COLON_FORMAT = /^(.+?):(\d+):(\d+) - error (TS\d+)/;
|
|
1244
|
+
var XML_FORMAT = /^<error file="([^"]+)" line="(\d+)" column="(\d+)" code="(TS\d+)">/;
|
|
1245
|
+
var PRETTY_CODE = /^error: (TS\d+): /;
|
|
1246
|
+
var PRETTY_POSITION = /^\s+at (.+):(\d+):(\d+)$/;
|
|
1247
|
+
var FORMATS = [PAREN_FORMAT, COLON_FORMAT, XML_FORMAT];
|
|
1248
|
+
var keyOf = ({ code, column, file, line }, cwd) => `${resolve3(cwd, file)}:${line}:${column}:${code}`;
|
|
1249
|
+
var matchPosition = (line) => {
|
|
1250
|
+
for (const format of FORMATS) {
|
|
1251
|
+
const match = format.exec(line);
|
|
1252
|
+
if (!match)
|
|
1253
|
+
continue;
|
|
1254
|
+
const [, file = "", row = "", column = "", code = ""] = match;
|
|
1255
|
+
return { code, column, file, line: row };
|
|
1256
|
+
}
|
|
1257
|
+
return null;
|
|
1258
|
+
};
|
|
1259
|
+
var prettyKeys = (lines, cwd) => lines.flatMap((line, index) => {
|
|
1260
|
+
const code = PRETTY_CODE.exec(line)?.[1];
|
|
1261
|
+
if (code === undefined)
|
|
1262
|
+
return [];
|
|
1263
|
+
const position = lines.slice(index + 1).map((next) => PRETTY_POSITION.exec(next)).find((match) => match !== null);
|
|
1264
|
+
if (!position)
|
|
1265
|
+
return [];
|
|
1266
|
+
const [, file = "", row = "", column = ""] = position;
|
|
1267
|
+
return [keyOf({ code, column, file, line: row }, cwd)];
|
|
1268
|
+
});
|
|
1269
|
+
var diagnosticKeys = (output, cwd = process.cwd()) => {
|
|
1270
|
+
const lines = stripAnsi(output).split(`
|
|
1271
|
+
`);
|
|
1272
|
+
const keys = lines.flatMap((line) => {
|
|
1273
|
+
const position = matchPosition(line);
|
|
1274
|
+
return position ? [keyOf(position, cwd)] : [];
|
|
1275
|
+
});
|
|
1276
|
+
return new Set([...keys, ...prettyKeys(lines, cwd)]);
|
|
1277
|
+
};
|
|
1278
|
+
var SUMMARY_LINES = [
|
|
1279
|
+
/^Found \d+ errors?/,
|
|
1280
|
+
/^Errors\s+Files$/,
|
|
1281
|
+
/^\s+\d+\s+\S.*:\d+$/
|
|
1282
|
+
];
|
|
1283
|
+
var isSummary = (line) => SUMMARY_LINES.some((pattern) => pattern.test(stripAnsi(line)));
|
|
1284
|
+
var toBlocks = (output, cwd) => output.split(`
|
|
1285
|
+
`).reduce((blocks, line) => {
|
|
1286
|
+
const position = matchPosition(stripAnsi(line));
|
|
1287
|
+
const last = blocks[blocks.length - 1];
|
|
1288
|
+
if (position)
|
|
1289
|
+
blocks.push({ key: keyOf(position, cwd), lines: [line] });
|
|
1290
|
+
else if (last)
|
|
1291
|
+
last.lines.push(line);
|
|
1292
|
+
else
|
|
1293
|
+
blocks.push({ key: null, lines: [line] });
|
|
1294
|
+
return blocks;
|
|
1295
|
+
}, []);
|
|
1296
|
+
var withoutReported = (output, reported, cwd = process.cwd()) => {
|
|
1297
|
+
const blocks = toBlocks(output, cwd);
|
|
1298
|
+
const kept = blocks.filter((block) => block.key === null || !reported.has(block.key));
|
|
1299
|
+
const remaining = kept.filter((block) => block.key !== null).length;
|
|
1300
|
+
const dropped = blocks.length - kept.length;
|
|
1301
|
+
const lines = kept.flatMap((block) => block.lines).filter((line) => dropped === 0 || !isSummary(line));
|
|
1302
|
+
return {
|
|
1303
|
+
dropped,
|
|
1304
|
+
output: lines.join(`
|
|
1305
|
+
`).trim(),
|
|
1306
|
+
remaining
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1238
1310
|
// src/cli/scripts/typecheck.ts
|
|
1239
1311
|
var isCommandService = (service) => service.kind === "command" || Array.isArray(service.command);
|
|
1240
|
-
var resolveConfigPath = (configPath) =>
|
|
1312
|
+
var resolveConfigPath = (configPath) => resolve4(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
|
|
1241
1313
|
var getTypecheckTargets = async (configPath) => {
|
|
1242
1314
|
if (!existsSync3(resolveConfigPath(configPath))) {
|
|
1243
1315
|
const defaultService = {};
|
|
@@ -1281,25 +1353,25 @@ var run = async (name, command) => {
|
|
|
1281
1353
|
var shellEscape = (value) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
1282
1354
|
var runShell = async (name, command) => run(name, ["/bin/bash", "-lc", command]);
|
|
1283
1355
|
var findBin = (name) => {
|
|
1284
|
-
const local =
|
|
1356
|
+
const local = resolve4("node_modules", ".bin", name);
|
|
1285
1357
|
return existsSync3(local) ? local : null;
|
|
1286
1358
|
};
|
|
1287
|
-
var
|
|
1359
|
+
var ANSI_COLOR_REGEX2 = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-9;]*m`, "g");
|
|
1288
1360
|
var ANSI_PURPLE_REGEX = `${String.fromCharCode(ANSI_ESCAPE_CODE)}[35m`;
|
|
1289
1361
|
var ANSI_CYAN_REGEX = new RegExp(`^${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[36m|\\t`);
|
|
1290
1362
|
var ANSI_TOKEN_END_REGEX = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[3[69]m`);
|
|
1291
|
-
var
|
|
1363
|
+
var stripAnsi2 = (str) => str.replace(ANSI_COLOR_REGEX2, "");
|
|
1292
1364
|
var formatSvelteOutput = (output) => {
|
|
1293
1365
|
const cwd = `${process.cwd()}/`;
|
|
1294
|
-
const summaryMatch =
|
|
1366
|
+
const summaryMatch = stripAnsi2(output).match(/svelte-check found (\d+) error/);
|
|
1295
1367
|
const errorCount = summaryMatch ? parseInt(summaryMatch[1] ?? "0", 10) : 0;
|
|
1296
1368
|
const formatted = output.split(`
|
|
1297
1369
|
`).filter((line) => {
|
|
1298
|
-
const plain =
|
|
1370
|
+
const plain = stripAnsi2(line);
|
|
1299
1371
|
return !plain.startsWith("Loading svelte-check") && !plain.startsWith("Getting Svelte") && !plain.startsWith("====") && !plain.startsWith("svelte-check found") && !/^\d+ (START|COMPLETED)/.test(plain) && plain.trim() !== "";
|
|
1300
1372
|
}).flatMap((line) => {
|
|
1301
1373
|
const result = line.replaceAll(cwd, "");
|
|
1302
|
-
const plain =
|
|
1374
|
+
const plain = stripAnsi2(result);
|
|
1303
1375
|
const pathMatch = plain.match(/^(\S+\.svelte):(\d+:\d+)$/);
|
|
1304
1376
|
if (pathMatch) {
|
|
1305
1377
|
return [
|
|
@@ -1307,9 +1379,9 @@ var formatSvelteOutput = (output) => {
|
|
|
1307
1379
|
];
|
|
1308
1380
|
}
|
|
1309
1381
|
if (result.includes(ANSI_PURPLE_REGEX)) {
|
|
1310
|
-
const plainLine =
|
|
1311
|
-
const before =
|
|
1312
|
-
const token =
|
|
1382
|
+
const plainLine = stripAnsi2(result);
|
|
1383
|
+
const before = stripAnsi2(result.split(ANSI_PURPLE_REGEX)[0] ?? "");
|
|
1384
|
+
const token = stripAnsi2((result.split(ANSI_PURPLE_REGEX)[1] ?? "").split(ANSI_TOKEN_END_REGEX)[0] ?? "");
|
|
1313
1385
|
if (!token)
|
|
1314
1386
|
return [result];
|
|
1315
1387
|
const expanded = before.replace(/\t/g, " ");
|
|
@@ -1341,10 +1413,10 @@ var ABSOLUTE_INTERNAL_EXCLUDES = [
|
|
|
1341
1413
|
];
|
|
1342
1414
|
var resolveAbsoluteTypeFile = (fileName) => {
|
|
1343
1415
|
const candidates = [
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1416
|
+
resolve4("node_modules/@absolutejs/absolute/dist/types", fileName),
|
|
1417
|
+
resolve4(import.meta.dir, "../types", fileName),
|
|
1418
|
+
resolve4(import.meta.dir, "../../types", fileName),
|
|
1419
|
+
resolve4(import.meta.dir, "../../../types", fileName)
|
|
1348
1420
|
];
|
|
1349
1421
|
return candidates.find((candidate) => existsSync3(candidate)) ?? candidates[0];
|
|
1350
1422
|
};
|
|
@@ -1354,7 +1426,7 @@ var ABSOLUTE_TYPECHECK_FILES = [
|
|
|
1354
1426
|
var EMPTY_TSCONFIG = {};
|
|
1355
1427
|
var readProjectTsconfig = () => {
|
|
1356
1428
|
try {
|
|
1357
|
-
const parsed = parse2(readFileSync3(
|
|
1429
|
+
const parsed = parse2(readFileSync3(resolve4("tsconfig.json"), "utf-8"));
|
|
1358
1430
|
return isRecord(parsed) ? parsed : EMPTY_TSCONFIG;
|
|
1359
1431
|
} catch {
|
|
1360
1432
|
return EMPTY_TSCONFIG;
|
|
@@ -1384,6 +1456,33 @@ var toDeclarationGlob = (entry) => {
|
|
|
1384
1456
|
return base.length > 0 ? `${base}/**/*.d.ts` : "**/*.d.ts";
|
|
1385
1457
|
};
|
|
1386
1458
|
var getProjectDeclarationIncludes = () => [...new Set(getProjectSourceEntries().map(toDeclarationGlob))].map(toGeneratedConfigPath);
|
|
1459
|
+
var vueShimPath = null;
|
|
1460
|
+
var VUE_SHIM_FILE = "typecheck-vue-shim.d.ts";
|
|
1461
|
+
var SKIPPED_VUE_SCAN_DIRECTORIES = new Set(["build", "node_modules"]);
|
|
1462
|
+
var collectVueFileNames = (dir) => {
|
|
1463
|
+
if (!existsSync3(dir))
|
|
1464
|
+
return [];
|
|
1465
|
+
return readdirSync2(dir, { withFileTypes: true }).flatMap((entry) => {
|
|
1466
|
+
if (entry.isDirectory())
|
|
1467
|
+
return entry.name.startsWith(".") || SKIPPED_VUE_SCAN_DIRECTORIES.has(entry.name) ? [] : collectVueFileNames(join2(dir, entry.name));
|
|
1468
|
+
return entry.name.endsWith(".vue") ? [entry.name] : [];
|
|
1469
|
+
});
|
|
1470
|
+
};
|
|
1471
|
+
var vueShimSource = (fileNames) => [...new Set(fileNames)].sort().map((fileName) => `declare module ${JSON.stringify(`*/${fileName}`)} {
|
|
1472
|
+
import type { DefineComponent } from 'vue';
|
|
1473
|
+
const component: DefineComponent<{}, {}, any>;
|
|
1474
|
+
export default component;
|
|
1475
|
+
}
|
|
1476
|
+
`).join(`
|
|
1477
|
+
`);
|
|
1478
|
+
var prepareVueShim = async (cacheDir, vueDirs) => {
|
|
1479
|
+
const fileNames = vueDirs.flatMap((dir) => collectVueFileNames(resolve4(dir)));
|
|
1480
|
+
if (fileNames.length === 0)
|
|
1481
|
+
return;
|
|
1482
|
+
const shimPath = resolve4(cacheDir, VUE_SHIM_FILE);
|
|
1483
|
+
await writeFile2(shimPath, vueShimSource(fileNames));
|
|
1484
|
+
vueShimPath = shimPath;
|
|
1485
|
+
};
|
|
1387
1486
|
var svelteDeclarationsReady = false;
|
|
1388
1487
|
var getTypecheckRootDirs = (cacheDir) => {
|
|
1389
1488
|
if (!svelteDeclarationsReady)
|
|
@@ -1394,7 +1493,7 @@ var getTypecheckRootDirs = (cacheDir) => {
|
|
|
1394
1493
|
rootDirs: [
|
|
1395
1494
|
...new Set([
|
|
1396
1495
|
...projectRootDirs,
|
|
1397
|
-
...svelteDeclarationRootDirs(
|
|
1496
|
+
...svelteDeclarationRootDirs(resolve4("."), resolve4(cacheDir))
|
|
1398
1497
|
])
|
|
1399
1498
|
]
|
|
1400
1499
|
};
|
|
@@ -1423,14 +1522,14 @@ var buildVueTscCheck = async (cacheDir) => {
|
|
|
1423
1522
|
...getTypecheckRootDirs(cacheDir)
|
|
1424
1523
|
},
|
|
1425
1524
|
exclude: getProjectTypecheckExcludes(),
|
|
1426
|
-
extends:
|
|
1525
|
+
extends: resolve4("tsconfig.json"),
|
|
1427
1526
|
include: getProjectTypecheckIncludes()
|
|
1428
1527
|
}, null, "\t"));
|
|
1429
1528
|
const base = [
|
|
1430
1529
|
vueTscBin,
|
|
1431
1530
|
"--noEmit",
|
|
1432
1531
|
"--project",
|
|
1433
|
-
|
|
1532
|
+
resolve4(vueTsconfigPath),
|
|
1434
1533
|
"--pretty"
|
|
1435
1534
|
];
|
|
1436
1535
|
const cached = await run("vue-tsc", [
|
|
@@ -1444,14 +1543,14 @@ var buildVueTscCheck = async (cacheDir) => {
|
|
|
1444
1543
|
return run("vue-tsc", base);
|
|
1445
1544
|
};
|
|
1446
1545
|
var buildVueCheck = async (cacheDir) => {
|
|
1447
|
-
const configPath = await writeTypecheckConfig(cacheDir, "
|
|
1546
|
+
const configPath = await writeTypecheckConfig(cacheDir, "vue");
|
|
1448
1547
|
const vueCheck = join2(dirname3(Bun.resolveSync("@absolutejs/vue-check/package.json", import.meta.dir)), "src/cli.ts");
|
|
1449
1548
|
return run("vue-check", [
|
|
1450
1549
|
process.execPath,
|
|
1451
1550
|
vueCheck,
|
|
1452
1551
|
"-p",
|
|
1453
1552
|
configPath,
|
|
1454
|
-
`--out-dir=${
|
|
1553
|
+
`--out-dir=${resolve4(cacheDir, "vue-check")}`
|
|
1455
1554
|
]);
|
|
1456
1555
|
};
|
|
1457
1556
|
var buildAngularCheck = async (cacheDir, angularDir) => {
|
|
@@ -1470,26 +1569,33 @@ var buildAngularCheck = async (cacheDir, angularDir) => {
|
|
|
1470
1569
|
rootDir: ".."
|
|
1471
1570
|
},
|
|
1472
1571
|
exclude: getProjectTypecheckExcludes(),
|
|
1473
|
-
extends:
|
|
1572
|
+
extends: resolve4("tsconfig.json"),
|
|
1474
1573
|
include: [
|
|
1475
1574
|
...getProjectDeclarationIncludes(),
|
|
1476
1575
|
`../${angularDir}/**/*`
|
|
1477
1576
|
]
|
|
1478
1577
|
}, null, "\t"));
|
|
1479
|
-
return runShell("ngc", `${shellEscape(ngcBin)} -p ${shellEscape(
|
|
1578
|
+
return runShell("ngc", `${shellEscape(ngcBin)} -p ${shellEscape(resolve4(angularTsconfigPath))}`);
|
|
1579
|
+
};
|
|
1580
|
+
var TYPECHECK_CONFIG_FILES = {
|
|
1581
|
+
bun: "tsconfig.typecheck.bun.json",
|
|
1582
|
+
tsc: "tsconfig.typecheck.json",
|
|
1583
|
+
vue: "tsconfig.typecheck.vue.json"
|
|
1480
1584
|
};
|
|
1481
1585
|
var writeTypecheckConfig = async (cacheDir, checker) => {
|
|
1482
|
-
const tscConfigPath = join2(cacheDir, checker
|
|
1586
|
+
const tscConfigPath = join2(cacheDir, TYPECHECK_CONFIG_FILES[checker]);
|
|
1587
|
+
const vueShim = checker !== "vue" && vueShimPath !== null ? [vueShimPath] : [];
|
|
1483
1588
|
await writeFile2(tscConfigPath, JSON.stringify({
|
|
1484
1589
|
compilerOptions: {
|
|
1485
|
-
rootDir: checker === "tsc" ? ".." : parse3(
|
|
1590
|
+
rootDir: checker === "tsc" ? ".." : parse3(resolve4(".")).root,
|
|
1486
1591
|
...getTypecheckRootDirs(cacheDir)
|
|
1487
1592
|
},
|
|
1488
1593
|
exclude: getProjectTypecheckExcludes(),
|
|
1489
|
-
extends:
|
|
1490
|
-
include: getProjectTypecheckIncludes()
|
|
1594
|
+
extends: resolve4("tsconfig.json"),
|
|
1595
|
+
include: getProjectTypecheckIncludes(),
|
|
1596
|
+
...vueShim.length > 0 ? { files: vueShim } : {}
|
|
1491
1597
|
}, null, "\t"));
|
|
1492
|
-
return
|
|
1598
|
+
return resolve4(tscConfigPath);
|
|
1493
1599
|
};
|
|
1494
1600
|
var buildTscCheck = async (cacheDir) => {
|
|
1495
1601
|
const tscBin = findBin("tsc");
|
|
@@ -1543,7 +1649,7 @@ var buildSvelteCheck = async (cacheDir, svelteDir) => {
|
|
|
1543
1649
|
const svelteTsconfigPath = join2(cacheDir, "tsconfig.svelte-check.json");
|
|
1544
1650
|
await writeFile2(svelteTsconfigPath, JSON.stringify({
|
|
1545
1651
|
compilerOptions: { allowJs: true },
|
|
1546
|
-
extends:
|
|
1652
|
+
extends: resolve4("tsconfig.json"),
|
|
1547
1653
|
files: ABSOLUTE_TYPECHECK_FILES,
|
|
1548
1654
|
include: [
|
|
1549
1655
|
...getProjectDeclarationIncludes(),
|
|
@@ -1553,7 +1659,7 @@ var buildSvelteCheck = async (cacheDir, svelteDir) => {
|
|
|
1553
1659
|
return run("svelte-check", [
|
|
1554
1660
|
svelteBin,
|
|
1555
1661
|
"--tsconfig",
|
|
1556
|
-
|
|
1662
|
+
resolve4(svelteTsconfigPath),
|
|
1557
1663
|
"--threshold",
|
|
1558
1664
|
"error",
|
|
1559
1665
|
"--compiler-warnings",
|
|
@@ -1566,7 +1672,7 @@ var buildSvelteCheck = async (cacheDir, svelteDir) => {
|
|
|
1566
1672
|
var IMPORT_ADVICE_FLAG = "--import-advice";
|
|
1567
1673
|
var importAdviceRequested = () => process.argv.includes(IMPORT_ADVICE_FLAG) || process.env.ABSOLUTE_IMPORT_ADVICE === "1";
|
|
1568
1674
|
var serverEntryPaths = (targets) => [
|
|
1569
|
-
...new Set(targets.map((target) =>
|
|
1675
|
+
...new Set(targets.map((target) => resolve4(target.cwd ?? ".", target.entry ?? DEFAULT_SERVER_ENTRY)).filter((path) => existsSync3(path)))
|
|
1570
1676
|
];
|
|
1571
1677
|
var adviceFor = (path, detailed) => {
|
|
1572
1678
|
const label = relative2(process.cwd(), path) || path;
|
|
@@ -1590,7 +1696,7 @@ var reportImportAdvice = (targets, detailed, passed) => {
|
|
|
1590
1696
|
var SVELTE_EDITOR_HINT = `\x1B[33mnote\x1B[0m Svelte page props are type-checked in server files by this command. For the same errors in your editor, add "${SVELTE_DECLARATIONS_ROOT}" to compilerOptions.rootDirs in tsconfig.json: "rootDirs": [".", "${SVELTE_DECLARATIONS_ROOT}"]`;
|
|
1591
1697
|
var prepareSvelteDeclarations = async (svelteDirs) => {
|
|
1592
1698
|
const results = await Promise.all(svelteDirs.map((svelteDirectory) => generateSvelteDeclarations({
|
|
1593
|
-
projectRoot:
|
|
1699
|
+
projectRoot: resolve4("."),
|
|
1594
1700
|
svelteDirectory
|
|
1595
1701
|
})));
|
|
1596
1702
|
svelteDeclarationsReady = results.some((result) => result.status !== "unavailable");
|
|
@@ -1604,6 +1710,23 @@ var prepareSvelteDeclarations = async (svelteDirs) => {
|
|
|
1604
1710
|
if (svelteDeclarationsReady && !editorReady)
|
|
1605
1711
|
console.log(SVELTE_EDITOR_HINT);
|
|
1606
1712
|
};
|
|
1713
|
+
var VUE_CHECKERS = new Set(["vue-check", "vue-tsc"]);
|
|
1714
|
+
var PLAIN_CHECKERS = new Set(["bun check", "tsc"]);
|
|
1715
|
+
var dedupeVueResult = (results) => {
|
|
1716
|
+
const plain = results.find((res) => PLAIN_CHECKERS.has(res.name));
|
|
1717
|
+
if (!plain || plain.exitCode === 0)
|
|
1718
|
+
return results;
|
|
1719
|
+
const reported = diagnosticKeys(plain.output);
|
|
1720
|
+
return results.map((res) => {
|
|
1721
|
+
if (!VUE_CHECKERS.has(res.name) || res.exitCode === 0)
|
|
1722
|
+
return res;
|
|
1723
|
+
const { dropped, output, remaining } = withoutReported(res.output, reported);
|
|
1724
|
+
if (dropped === 0)
|
|
1725
|
+
return res;
|
|
1726
|
+
const passed = remaining === 0 && output.length === 0;
|
|
1727
|
+
return { ...res, exitCode: passed ? 0 : res.exitCode, output };
|
|
1728
|
+
});
|
|
1729
|
+
};
|
|
1607
1730
|
var typecheck = async (configPath) => {
|
|
1608
1731
|
const targets = await getTypecheckTargets(configPath);
|
|
1609
1732
|
const hasAngular = targets.some((config) => Boolean(config.angularDirectory));
|
|
@@ -1612,6 +1735,9 @@ var typecheck = async (configPath) => {
|
|
|
1612
1735
|
const svelteDirs = [
|
|
1613
1736
|
...new Set(targets.map((config) => config.svelteDirectory).filter((dir) => typeof dir === "string" && dir.length > 0))
|
|
1614
1737
|
];
|
|
1738
|
+
const vueDirs = [
|
|
1739
|
+
...new Set(targets.map((config) => config.vueDirectory).filter((dir) => typeof dir === "string" && dir.length > 0))
|
|
1740
|
+
];
|
|
1615
1741
|
const angularDirs = [
|
|
1616
1742
|
...new Set(targets.map((config) => config.angularDirectory).filter((dir) => typeof dir === "string" && dir.length > 0))
|
|
1617
1743
|
];
|
|
@@ -1625,14 +1751,18 @@ var typecheck = async (configPath) => {
|
|
|
1625
1751
|
const useBunCheck = bunCheckSupported();
|
|
1626
1752
|
const plainCheck = useBunCheck ? buildBunCheck : buildTscCheck;
|
|
1627
1753
|
const vueCheck = useBunCheck ? buildVueCheck : buildVueTscCheck;
|
|
1628
|
-
|
|
1754
|
+
if (hasVue)
|
|
1755
|
+
await prepareVueShim(cacheDir, vueDirs);
|
|
1756
|
+
checks.push(plainCheck(cacheDir));
|
|
1757
|
+
if (hasVue)
|
|
1758
|
+
checks.push(vueCheck(cacheDir));
|
|
1629
1759
|
for (const svelteDir of hasSvelte ? svelteDirs : []) {
|
|
1630
1760
|
checks.push(buildSvelteCheck(cacheDir, svelteDir));
|
|
1631
1761
|
}
|
|
1632
1762
|
for (const angularDir of hasAngular ? angularDirs : []) {
|
|
1633
1763
|
checks.push(buildAngularCheck(cacheDir, angularDir));
|
|
1634
1764
|
}
|
|
1635
|
-
const results = await Promise.all(checks);
|
|
1765
|
+
const results = dedupeVueResult(await Promise.all(checks));
|
|
1636
1766
|
const failed = results.filter((res) => res.exitCode !== 0);
|
|
1637
1767
|
const detailedAdvice = importAdviceRequested();
|
|
1638
1768
|
if (failed.length === 0) {
|
|
@@ -144,7 +144,17 @@ var prepareBrowserTranslationHydration2 = (root) => {
|
|
|
144
144
|
}, translated.length > 0 || translatedAttributes.length > 0);
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
// src/utils/cspNonceRef.ts
|
|
148
|
+
var GETTER_KEY = Symbol.for("absolutejs.cspNonceGetter");
|
|
149
|
+
var readCspNonce = () => {
|
|
150
|
+
const getter = Reflect.get(globalThis, GETTER_KEY);
|
|
151
|
+
if (typeof getter !== "function")
|
|
152
|
+
return;
|
|
153
|
+
const nonce = getter();
|
|
154
|
+
return typeof nonce === "string" ? nonce : undefined;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export { readCspNonce, TRANSLATABLE_ATTRIBUTES, captureSsrTextBaselines2, prepareBrowserTranslationHydration2 };
|
|
148
158
|
|
|
149
|
-
//# debugId=
|
|
150
|
-
//# sourceMappingURL=index-
|
|
159
|
+
//# debugId=CFA958772C65102064756E2164756E21
|
|
160
|
+
//# sourceMappingURL=index-58svs66p.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/client/browserTranslationAttributes.ts", "../src/client/browserTranslation.ts"],
|
|
3
|
+
"sources": ["../src/client/browserTranslationAttributes.ts", "../src/client/browserTranslation.ts", "../src/utils/cspNonceRef.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/** Human-readable attributes a browser translator may rewrite before hydration. */\nexport const TRANSLATABLE_ATTRIBUTES = [\n\t'alt',\n\t'title',\n\t'placeholder',\n\t'aria-label'\n] as const;\n",
|
|
6
|
-
"import { TRANSLATABLE_ATTRIBUTES } from './browserTranslationAttributes';\n\ntype TextBaseline = ReadonlyMap<number, string>;\ntype SsrTextBaselines = WeakMap<Element, TextBaseline>;\ntype AttributeBaseline = ReadonlyMap<string, string>;\ntype SsrAttributeBaselines = WeakMap<Element, AttributeBaseline>;\n\ndeclare global {\n\t// Window augmentation requires interface declaration merging.\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n\tinterface Window {\n\t\t__ABSOLUTE_SSR_TEXT_BASELINES__?: SsrTextBaselines;\n\t\t__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__?: SsrAttributeBaselines;\n\t}\n}\n\ntype TranslatedText = {\n\tbaseline: string;\n\tindex: number;\n\tpath: number[];\n\ttranslated: string;\n};\n\ntype TranslatedAttribute = {\n\tbaseline: string;\n\tname: string;\n\tpath: number[];\n\ttranslated: string;\n};\n\n// Translate inserts font wrappers around text. Remove only newly inserted,\n// text-only font trees; never flatten authored elements or interactive markup.\nconst translatedFontText = (\n\tnode: Node | undefined,\n\tbaselines: SsrTextBaselines\n) => {\n\tif (!(node instanceof Element) || node.tagName !== 'FONT') return undefined;\n\tconst elements = [node, ...node.querySelectorAll('*')];\n\tif (\n\t\telements.some(\n\t\t\t(element) => element.tagName !== 'FONT' || baselines.has(element)\n\t\t)\n\t)\n\t\treturn undefined;\n\n\treturn node.textContent ?? '';\n};\n\nconst translationRestorer = (restore: () => void, hasTranslation: boolean) =>\n\tObject.assign(restore, { hasTranslation });\n\nconst emptyTranslationRestorer = () =>\n\ttranslationRestorer(() => undefined, false);\n\nconst textNodeAt = (parent: Element, index: number) => {\n\tconst node = parent.childNodes[index];\n\n\treturn node instanceof Text ? node : undefined;\n};\n\nconst prepareTextTranslation = (\n\telement: Element,\n\tindex: number,\n\tbaseline: string,\n\tpath: number[],\n\tbaselines: SsrTextBaselines\n) => {\n\tconst original = element.childNodes[index];\n\tconst wrappedText = translatedFontText(original, baselines);\n\tif (wrappedText !== undefined) {\n\t\toriginal?.replaceWith(document.createTextNode(baseline));\n\n\t\treturn { baseline, index, path, translated: wrappedText };\n\t}\n\tconst node = textNodeAt(element, index);\n\tif (node === undefined || node.data === baseline) return undefined;\n\tconst snapshot: TranslatedText = {\n\t\tbaseline,\n\t\tindex,\n\t\tpath,\n\t\ttranslated: node.data\n\t};\n\tnode.data = baseline;\n\n\treturn snapshot;\n};\n\nconst visitElements = (root: Element, visit: (element: Element) => void) => {\n\tvisit(root);\n\tfor (const element of root.querySelectorAll('*')) visit(element);\n};\n\nconst elementPath = (root: Element, element: Element) => {\n\tconst path: number[] = [];\n\tlet current = element;\n\twhile (current !== root) {\n\t\tconst parent = current.parentElement;\n\t\tif (parent === null) return null;\n\t\tpath.unshift([...parent.children].indexOf(current));\n\t\tcurrent = parent;\n\t}\n\n\treturn path;\n};\n\nconst elementAtPath = (root: Element, path: number[]) => {\n\tlet current = root;\n\tfor (const index of path) {\n\t\tconst child = current.children[index];\n\t\tif (!(child instanceof Element)) return null;\n\t\tcurrent = child;\n\t}\n\n\treturn current;\n};\n\n/** Capture server-authored text before client modules load. Absolute page\n * handlers install the same snapshot inline; this export supports custom\n * documents and non-standard bootstraps. */\nexport const captureSsrTextBaselines = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined') return;\n\tconst baselines: SsrTextBaselines =\n\t\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap();\n\tconst attributes: SsrAttributeBaselines =\n\t\twindow.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__ ?? new WeakMap();\n\tvisitElements(root, (element) => {\n\t\tconst text = new Map<number, string>();\n\t\tfor (const [index, node] of [...element.childNodes].entries()) {\n\t\t\tif (node.nodeType === Node.TEXT_NODE)\n\t\t\t\ttext.set(index, node.nodeValue ?? '');\n\t\t}\n\t\tif (text.size > 0) baselines.set(element, text);\n\t\tconst values = new Map<string, string>();\n\t\tfor (const name of TRANSLATABLE_ATTRIBUTES) {\n\t\t\tconst value = element.getAttribute(name);\n\t\t\tif (value !== null) values.set(name, value);\n\t\t}\n\t\tif (values.size > 0) attributes.set(element, values);\n\t});\n\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;\n\twindow.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__ = attributes;\n};\n\n/** Temporarily restore server text while a framework attaches to SSR DOM,\n * then reapply translated text. Paths preserve translations even when a\n * framework replaces nodes while mounting. Genuine server/client mismatches\n * are left unchanged. */\nexport const prepareBrowserTranslationHydration = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined')\n\t\treturn emptyTranslationRestorer();\n\tconst baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;\n\tif (baselines === undefined) return emptyTranslationRestorer();\n\tconst translated: TranslatedText[] = [];\n\tconst translatedAttributes: TranslatedAttribute[] = [];\n\tconst attributes = window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__;\n\tvisitElements(root, (element) => {\n\t\tconst text = baselines.get(element);\n\t\tconst path = elementPath(root, element);\n\t\tif (path === null) return;\n\t\tfor (const [index, baseline] of text ?? []) {\n\t\t\tconst snapshot = prepareTextTranslation(\n\t\t\t\telement,\n\t\t\t\tindex,\n\t\t\t\tbaseline,\n\t\t\t\tpath,\n\t\t\t\tbaselines\n\t\t\t);\n\t\t\tif (snapshot === undefined) continue;\n\t\t\ttranslated.push(snapshot);\n\t\t}\n\t\tfor (const [name, baseline] of attributes?.get(element) ?? []) {\n\t\t\tconst value = element.getAttribute(name);\n\t\t\tif (value === null || value === baseline) continue;\n\t\t\ttranslatedAttributes.push({\n\t\t\t\tbaseline,\n\t\t\t\tname,\n\t\t\t\tpath,\n\t\t\t\ttranslated: value\n\t\t\t});\n\t\t\telement.setAttribute(name, baseline);\n\t\t}\n\t});\n\n\treturn translationRestorer(\n\t\t() => {\n\t\t\tfor (const snapshot of translated) {\n\t\t\t\tconst parent = elementAtPath(root, snapshot.path);\n\t\t\t\tif (parent === null) continue;\n\t\t\t\tconst node = textNodeAt(parent, snapshot.index);\n\t\t\t\tif (node !== undefined && node.data === snapshot.baseline)\n\t\t\t\t\tnode.data = snapshot.translated;\n\t\t\t}\n\t\t\tfor (const snapshot of translatedAttributes) {\n\t\t\t\tconst element = elementAtPath(root, snapshot.path);\n\t\t\t\tif (element?.getAttribute(snapshot.name) === snapshot.baseline)\n\t\t\t\t\telement.setAttribute(snapshot.name, snapshot.translated);\n\t\t\t}\n\t\t},\n\t\ttranslated.length > 0 || translatedAttributes.length > 0\n\t);\n};\n"
|
|
6
|
+
"import { TRANSLATABLE_ATTRIBUTES } from './browserTranslationAttributes';\n\ntype TextBaseline = ReadonlyMap<number, string>;\ntype SsrTextBaselines = WeakMap<Element, TextBaseline>;\ntype AttributeBaseline = ReadonlyMap<string, string>;\ntype SsrAttributeBaselines = WeakMap<Element, AttributeBaseline>;\n\ndeclare global {\n\t// Window augmentation requires interface declaration merging.\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n\tinterface Window {\n\t\t__ABSOLUTE_SSR_TEXT_BASELINES__?: SsrTextBaselines;\n\t\t__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__?: SsrAttributeBaselines;\n\t}\n}\n\ntype TranslatedText = {\n\tbaseline: string;\n\tindex: number;\n\tpath: number[];\n\ttranslated: string;\n};\n\ntype TranslatedAttribute = {\n\tbaseline: string;\n\tname: string;\n\tpath: number[];\n\ttranslated: string;\n};\n\n// Translate inserts font wrappers around text. Remove only newly inserted,\n// text-only font trees; never flatten authored elements or interactive markup.\nconst translatedFontText = (\n\tnode: Node | undefined,\n\tbaselines: SsrTextBaselines\n) => {\n\tif (!(node instanceof Element) || node.tagName !== 'FONT') return undefined;\n\tconst elements = [node, ...node.querySelectorAll('*')];\n\tif (\n\t\telements.some(\n\t\t\t(element) => element.tagName !== 'FONT' || baselines.has(element)\n\t\t)\n\t)\n\t\treturn undefined;\n\n\treturn node.textContent ?? '';\n};\n\nconst translationRestorer = (restore: () => void, hasTranslation: boolean) =>\n\tObject.assign(restore, { hasTranslation });\n\nconst emptyTranslationRestorer = () =>\n\ttranslationRestorer(() => undefined, false);\n\nconst textNodeAt = (parent: Element, index: number) => {\n\tconst node = parent.childNodes[index];\n\n\treturn node instanceof Text ? node : undefined;\n};\n\nconst prepareTextTranslation = (\n\telement: Element,\n\tindex: number,\n\tbaseline: string,\n\tpath: number[],\n\tbaselines: SsrTextBaselines\n) => {\n\tconst original = element.childNodes[index];\n\tconst wrappedText = translatedFontText(original, baselines);\n\tif (wrappedText !== undefined) {\n\t\toriginal?.replaceWith(document.createTextNode(baseline));\n\n\t\treturn { baseline, index, path, translated: wrappedText };\n\t}\n\tconst node = textNodeAt(element, index);\n\tif (node === undefined || node.data === baseline) return undefined;\n\tconst snapshot: TranslatedText = {\n\t\tbaseline,\n\t\tindex,\n\t\tpath,\n\t\ttranslated: node.data\n\t};\n\tnode.data = baseline;\n\n\treturn snapshot;\n};\n\nconst visitElements = (root: Element, visit: (element: Element) => void) => {\n\tvisit(root);\n\tfor (const element of root.querySelectorAll('*')) visit(element);\n};\n\nconst elementPath = (root: Element, element: Element) => {\n\tconst path: number[] = [];\n\tlet current = element;\n\twhile (current !== root) {\n\t\tconst parent = current.parentElement;\n\t\tif (parent === null) return null;\n\t\tpath.unshift([...parent.children].indexOf(current));\n\t\tcurrent = parent;\n\t}\n\n\treturn path;\n};\n\nconst elementAtPath = (root: Element, path: number[]) => {\n\tlet current = root;\n\tfor (const index of path) {\n\t\tconst child = current.children[index];\n\t\tif (!(child instanceof Element)) return null;\n\t\tcurrent = child;\n\t}\n\n\treturn current;\n};\n\n/** Capture server-authored text before client modules load. Absolute page\n * handlers install the same snapshot inline; this export supports custom\n * documents and non-standard bootstraps. */\nexport const captureSsrTextBaselines = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined') return;\n\tconst baselines: SsrTextBaselines =\n\t\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap();\n\tconst attributes: SsrAttributeBaselines =\n\t\twindow.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__ ?? new WeakMap();\n\tvisitElements(root, (element) => {\n\t\tconst text = new Map<number, string>();\n\t\tfor (const [index, node] of [...element.childNodes].entries()) {\n\t\t\tif (node.nodeType === Node.TEXT_NODE)\n\t\t\t\ttext.set(index, node.nodeValue ?? '');\n\t\t}\n\t\tif (text.size > 0) baselines.set(element, text);\n\t\tconst values = new Map<string, string>();\n\t\tfor (const name of TRANSLATABLE_ATTRIBUTES) {\n\t\t\tconst value = element.getAttribute(name);\n\t\t\tif (value !== null) values.set(name, value);\n\t\t}\n\t\tif (values.size > 0) attributes.set(element, values);\n\t});\n\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;\n\twindow.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__ = attributes;\n};\n\n/** Temporarily restore server text while a framework attaches to SSR DOM,\n * then reapply translated text. Paths preserve translations even when a\n * framework replaces nodes while mounting. Genuine server/client mismatches\n * are left unchanged. */\nexport const prepareBrowserTranslationHydration = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined')\n\t\treturn emptyTranslationRestorer();\n\tconst baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;\n\tif (baselines === undefined) return emptyTranslationRestorer();\n\tconst translated: TranslatedText[] = [];\n\tconst translatedAttributes: TranslatedAttribute[] = [];\n\tconst attributes = window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__;\n\tvisitElements(root, (element) => {\n\t\tconst text = baselines.get(element);\n\t\tconst path = elementPath(root, element);\n\t\tif (path === null) return;\n\t\tfor (const [index, baseline] of text ?? []) {\n\t\t\tconst snapshot = prepareTextTranslation(\n\t\t\t\telement,\n\t\t\t\tindex,\n\t\t\t\tbaseline,\n\t\t\t\tpath,\n\t\t\t\tbaselines\n\t\t\t);\n\t\t\tif (snapshot === undefined) continue;\n\t\t\ttranslated.push(snapshot);\n\t\t}\n\t\tfor (const [name, baseline] of attributes?.get(element) ?? []) {\n\t\t\tconst value = element.getAttribute(name);\n\t\t\tif (value === null || value === baseline) continue;\n\t\t\ttranslatedAttributes.push({\n\t\t\t\tbaseline,\n\t\t\t\tname,\n\t\t\t\tpath,\n\t\t\t\ttranslated: value\n\t\t\t});\n\t\t\telement.setAttribute(name, baseline);\n\t\t}\n\t});\n\n\treturn translationRestorer(\n\t\t() => {\n\t\t\tfor (const snapshot of translated) {\n\t\t\t\tconst parent = elementAtPath(root, snapshot.path);\n\t\t\t\tif (parent === null) continue;\n\t\t\t\tconst node = textNodeAt(parent, snapshot.index);\n\t\t\t\tif (node !== undefined && node.data === snapshot.baseline)\n\t\t\t\t\tnode.data = snapshot.translated;\n\t\t\t}\n\t\t\tfor (const snapshot of translatedAttributes) {\n\t\t\t\tconst element = elementAtPath(root, snapshot.path);\n\t\t\t\tif (element?.getAttribute(snapshot.name) === snapshot.baseline)\n\t\t\t\t\telement.setAttribute(snapshot.name, snapshot.translated);\n\t\t\t}\n\t\t},\n\t\ttranslated.length > 0 || translatedAttributes.length > 0\n\t);\n};\n",
|
|
7
|
+
"/* Dependency-free access to the current request's CSP nonce, for code that\n * also ships to the browser (streaming slots, Angular components) and so\n * can't import the server's request context. `secureHeaders()` registers\n * the getter (src/core/cspNonce.ts); in the browser, or with secure headers\n * off, there is none and these return undefined / ''. */\n\nconst GETTER_KEY = Symbol.for('absolutejs.cspNonceGetter');\n\n/** ` nonce=\"…\"` for an inline <script>/<style> tag, or '' without one. */\nexport const nonceAttr = (nonce: string | undefined = readCspNonce()) =>\n\tnonce ? ` nonce=\"${nonce}\"` : '';\n\n/** Adds the nonce to the <style id=\"svelte-…\"> tags Svelte renders into the\n * head for components compiled with injected CSS. Only those: a <style>\n * that arrived through {@html} stays without one. */\nexport const nonceSvelteHeadStyles = (\n\thead: string,\n\tnonce: string | undefined = readCspNonce()\n) =>\n\tnonce\n\t\t? head.replace(\n\t\t\t\t/<style(?=\\s+id=\"svelte-[^\"]*\")(?![^>]*\\snonce=)/g,\n\t\t\t\t`<style nonce=\"${nonce}\"`\n\t\t\t)\n\t\t: head;\n\nexport const readCspNonce = () => {\n\tconst getter: unknown = Reflect.get(globalThis, GETTER_KEY);\n\tif (typeof getter !== 'function') return undefined;\n\tconst nonce: unknown = getter();\n\n\treturn typeof nonce === 'string' ? nonce : undefined;\n};\n\nexport const registerCspNonceGetter = (getter: () => string | undefined) => {\n\tReflect.set(globalThis, GETTER_KEY, getter);\n};\n"
|
|
7
8
|
],
|
|
8
|
-
"mappings": ";AACO,IAAM,0BAA0B;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;;;AC0BA,IAAM,qBAAqB,CAC1B,MACA,cACI;AAAA,EACJ,IAAI,EAAE,gBAAgB,YAAY,KAAK,YAAY;AAAA,IAAQ;AAAA,EAC3D,MAAM,WAAW,CAAC,MAAM,GAAG,KAAK,iBAAiB,GAAG,CAAC;AAAA,EACrD,IACC,SAAS,KACR,CAAC,YAAY,QAAQ,YAAY,UAAU,UAAU,IAAI,OAAO,CACjE;AAAA,IAEA;AAAA,EAED,OAAO,KAAK,eAAe;AAAA;AAG5B,IAAM,sBAAsB,CAAC,SAAqB,mBACjD,OAAO,OAAO,SAAS,EAAE,eAAe,CAAC;AAE1C,IAAM,2BAA2B,MAChC,oBAAoB,MAAG;AAAA,EAAG;AAAA,GAAW,KAAK;AAE3C,IAAM,aAAa,CAAC,QAAiB,UAAkB;AAAA,EACtD,MAAM,OAAO,OAAO,WAAW;AAAA,EAE/B,OAAO,gBAAgB,OAAO,OAAO;AAAA;A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A,QAChD,KAAK,OAAO,SAAS;AAAA,IACvB;AAAA,IACA,WAAW,YAAY,sBAAsB;AAAA,MAC5C,MAAM,UAAU,cAAc,MAAM,SAAS,IAAI;AAAA,MACjD,IAAI,SAAS,aAAa,SAAS,IAAI,MAAM,SAAS;AAAA,QACrD,QAAQ,aAAa,SAAS,MAAM,SAAS,UAAU;AAAA,IACzD;AAAA,KAED,WAAW,SAAS,KAAK,qBAAqB,SAAS,CACxD;AAAA;;;ACjMD,IAAM,aAAa,OAAO,IAAI,2BAA2B;AAoBlD,IAAM,eAAe,MAAM;AAAA,EACjC,MAAM,SAAkB,QAAQ,IAAI,YAAY,UAAU;AAAA,EAC1D,IAAI,OAAO,WAAW;AAAA,IAAY;AAAA,EAClC,MAAM,QAAiB,OAAO;AAAA,EAE9B,OAAO,OAAO,UAAU,WAAW,QAAQ;AAAA;",
|
|
10
|
+
"debugId": "CFA958772C65102064756E2164756E21",
|
|
10
11
|
"names": []
|
|
11
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TRANSLATABLE_ATTRIBUTES
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-58svs66p.js";
|
|
4
4
|
import {
|
|
5
5
|
readPageNonce
|
|
6
6
|
} from "./index-4j1snyh2.js";
|
|
@@ -328,9 +328,6 @@ var sep = "/";
|
|
|
328
328
|
var delimiter = ":";
|
|
329
329
|
var posix = ((p) => (p.posix = p, p))({ resolve, normalize, isAbsolute, join, relative, _makeLong, dirname, basename, extname, format, parse, sep, delimiter, win32: null, posix: null });
|
|
330
330
|
|
|
331
|
-
// src/utils/cspNonceRef.ts
|
|
332
|
-
var GETTER_KEY = Symbol.for("absolutejs.cspNonceGetter");
|
|
333
|
-
|
|
334
331
|
// src/utils/registerClientScript.ts
|
|
335
332
|
var scriptRegistry = new Map;
|
|
336
333
|
var requestCounter = 0;
|
|
@@ -442,5 +439,5 @@ export {
|
|
|
442
439
|
mountAngularIsland
|
|
443
440
|
};
|
|
444
441
|
|
|
445
|
-
//# debugId=
|
|
446
|
-
//# sourceMappingURL=islands-
|
|
442
|
+
//# debugId=32CA7043C16C7E0064756E2164756E21
|
|
443
|
+
//# sourceMappingURL=islands-tcadmgcx.js.map
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/angular/resolveAngularPackage.ts", "node:path", "../src/utils/
|
|
3
|
+
"sources": ["../src/angular/resolveAngularPackage.ts", "node:path", "../src/utils/registerClientScript.ts", "../src/core/browserTranslation.ts", "../src/angular/ssrRender.ts", "../src/angular/islands.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
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 buildDirs = [\n\t\tprocess.env.ABSOLUTE_BUILD_DIR,\n\t\tresolve(process.cwd(), 'build')\n\t].filter((value): value is string => Boolean(value));\n\n\tfor (const buildDir of buildDirs) {\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
|
"function assertPath(path){if(typeof path!==\"string\")throw TypeError(\"Path must be a string. Received \"+JSON.stringify(path))}function normalizeStringPosix(path,allowAboveRoot){var res=\"\",lastSegmentLength=0,lastSlash=-1,dots=0,code;for(var i=0;i<=path.length;++i){if(i<path.length)code=path.charCodeAt(i);else if(code===47)break;else code=47;if(code===47){if(lastSlash===i-1||dots===1);else if(lastSlash!==i-1&&dots===2){if(res.length<2||lastSegmentLength!==2||res.charCodeAt(res.length-1)!==46||res.charCodeAt(res.length-2)!==46){if(res.length>2){var lastSlashIndex=res.lastIndexOf(\"/\");if(lastSlashIndex!==res.length-1){if(lastSlashIndex===-1)res=\"\",lastSegmentLength=0;else res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf(\"/\");lastSlash=i,dots=0;continue}}else if(res.length===2||res.length===1){res=\"\",lastSegmentLength=0,lastSlash=i,dots=0;continue}}if(allowAboveRoot){if(res.length>0)res+=\"/..\";else res=\"..\";lastSegmentLength=2}}else{if(res.length>0)res+=\"/\"+path.slice(lastSlash+1,i);else res=path.slice(lastSlash+1,i);lastSegmentLength=i-lastSlash-1}lastSlash=i,dots=0}else if(code===46&&dots!==-1)++dots;else dots=-1}return res}function _format(sep,pathObject){var dir=pathObject.dir||pathObject.root,base=pathObject.base||(pathObject.name||\"\")+(pathObject.ext||\"\");if(!dir)return base;if(dir===pathObject.root)return dir+base;return dir+sep+base}function resolve(){var resolvedPath=\"\",resolvedAbsolute=!1,cwd;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path;if(i>=0)path=arguments[i];else{if(cwd===void 0)cwd=process.cwd();path=cwd}if(assertPath(path),path.length===0)continue;resolvedPath=path+\"/\"+resolvedPath,resolvedAbsolute=path.charCodeAt(0)===47}if(resolvedPath=normalizeStringPosix(resolvedPath,!resolvedAbsolute),resolvedAbsolute)if(resolvedPath.length>0)return\"/\"+resolvedPath;else return\"/\";else if(resolvedPath.length>0)return resolvedPath;else return\".\"}function normalize(path){if(assertPath(path),path.length===0)return\".\";var isAbsolute=path.charCodeAt(0)===47,trailingSeparator=path.charCodeAt(path.length-1)===47;if(path=normalizeStringPosix(path,!isAbsolute),path.length===0&&!isAbsolute)path=\".\";if(path.length>0&&trailingSeparator)path+=\"/\";if(isAbsolute)return\"/\"+path;return path}function isAbsolute(path){return assertPath(path),path.length>0&&path.charCodeAt(0)===47}function join(){if(arguments.length===0)return\".\";var joined;for(var i=0;i<arguments.length;++i){var arg=arguments[i];if(assertPath(arg),arg.length>0)if(joined===void 0)joined=arg;else joined+=\"/\"+arg}if(joined===void 0)return\".\";return normalize(joined)}function relative(from,to){if(assertPath(from),assertPath(to),from===to)return\"\";if(from=resolve(from),to=resolve(to),from===to)return\"\";var fromStart=1;for(;fromStart<from.length;++fromStart)if(from.charCodeAt(fromStart)!==47)break;var fromEnd=from.length,fromLen=fromEnd-fromStart,toStart=1;for(;toStart<to.length;++toStart)if(to.charCodeAt(toStart)!==47)break;var toEnd=to.length,toLen=toEnd-toStart,length=fromLen<toLen?fromLen:toLen,lastCommonSep=-1,i=0;for(;i<=length;++i){if(i===length){if(toLen>length){if(to.charCodeAt(toStart+i)===47)return to.slice(toStart+i+1);else if(i===0)return to.slice(toStart+i)}else if(fromLen>length){if(from.charCodeAt(fromStart+i)===47)lastCommonSep=i;else if(i===0)lastCommonSep=0}break}var fromCode=from.charCodeAt(fromStart+i),toCode=to.charCodeAt(toStart+i);if(fromCode!==toCode)break;else if(fromCode===47)lastCommonSep=i}var out=\"\";for(i=fromStart+lastCommonSep+1;i<=fromEnd;++i)if(i===fromEnd||from.charCodeAt(i)===47)if(out.length===0)out+=\"..\";else out+=\"/..\";if(out.length>0)return out+to.slice(toStart+lastCommonSep);else{if(toStart+=lastCommonSep,to.charCodeAt(toStart)===47)++toStart;return to.slice(toStart)}}function _makeLong(path){return path}function dirname(path){if(assertPath(path),path.length===0)return\".\";var code=path.charCodeAt(0),hasRoot=code===47,end=-1,matchedSlash=!0;for(var i=path.length-1;i>=1;--i)if(code=path.charCodeAt(i),code===47){if(!matchedSlash){end=i;break}}else matchedSlash=!1;if(end===-1)return hasRoot?\"/\":\".\";if(hasRoot&&end===1)return\"//\";return path.slice(0,end)}function basename(path,ext){if(ext!==void 0&&typeof ext!==\"string\")throw TypeError('\"ext\" argument must be a string');assertPath(path);var start=0,end=-1,matchedSlash=!0,i;if(ext!==void 0&&ext.length>0&&ext.length<=path.length){if(ext.length===path.length&&ext===path)return\"\";var extIdx=ext.length-1,firstNonSlashEnd=-1;for(i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){start=i+1;break}}else{if(firstNonSlashEnd===-1)matchedSlash=!1,firstNonSlashEnd=i+1;if(extIdx>=0)if(code===ext.charCodeAt(extIdx)){if(--extIdx===-1)end=i}else extIdx=-1,end=firstNonSlashEnd}}if(start===end)end=firstNonSlashEnd;else if(end===-1)end=path.length;return path.slice(start,end)}else{for(i=path.length-1;i>=0;--i)if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1)matchedSlash=!1,end=i+1;if(end===-1)return\"\";return path.slice(start,end)}}function extname(path){assertPath(path);var startDot=-1,startPart=0,end=-1,matchedSlash=!0,preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1)matchedSlash=!1,end=i+1;if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1)preDotState=-1}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1)return\"\";return path.slice(startDot,end)}function format(pathObject){if(pathObject===null||typeof pathObject!==\"object\")throw TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof pathObject);return _format(\"/\",pathObject)}function parse(path){assertPath(path);var ret={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(path.length===0)return ret;var code=path.charCodeAt(0),isAbsolute2=code===47,start;if(isAbsolute2)ret.root=\"/\",start=1;else start=0;var startDot=-1,startPart=0,end=-1,matchedSlash=!0,i=path.length-1,preDotState=0;for(;i>=start;--i){if(code=path.charCodeAt(i),code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1)matchedSlash=!1,end=i+1;if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1)preDotState=-1}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1)if(startPart===0&&isAbsolute2)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end)}else{if(startPart===0&&isAbsolute2)ret.name=path.slice(1,startDot),ret.base=path.slice(1,end);else ret.name=path.slice(startPart,startDot),ret.base=path.slice(startPart,end);ret.ext=path.slice(startDot,end)}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute2)ret.dir=\"/\";return ret}var sep=\"/\",delimiter=\":\",posix=((p)=>(p.posix=p,p))({resolve,normalize,isAbsolute,join,relative,_makeLong,dirname,basename,extname,format,parse,sep,delimiter,win32:null,posix:null});var path_default=posix;export{sep,resolve,relative,posix,parse,normalize,join,isAbsolute,format,extname,dirname,delimiter,path_default as default,basename,_makeLong};",
|
|
7
|
-
"/* Dependency-free access to the current request's CSP nonce, for code that\n * also ships to the browser (streaming slots, Angular components) and so\n * can't import the server's request context. `secureHeaders()` registers\n * the getter (src/core/cspNonce.ts); in the browser, or with secure headers\n * off, there is none and these return undefined / ''. */\n\nconst GETTER_KEY = Symbol.for('absolutejs.cspNonceGetter');\n\n/** ` nonce=\"…\"` for an inline <script>/<style> tag, or '' without one. */\nexport const nonceAttr = (nonce: string | undefined = readCspNonce()) =>\n\tnonce ? ` nonce=\"${nonce}\"` : '';\n\n/** Adds the nonce to the <style id=\"svelte-…\"> tags Svelte renders into the\n * head for components compiled with injected CSS. Only those: a <style>\n * that arrived through {@html} stays without one. */\nexport const nonceSvelteHeadStyles = (\n\thead: string,\n\tnonce: string | undefined = readCspNonce()\n) =>\n\tnonce\n\t\t? head.replace(\n\t\t\t\t/<style(?=\\s+id=\"svelte-[^\"]*\")(?![^>]*\\snonce=)/g,\n\t\t\t\t`<style nonce=\"${nonce}\"`\n\t\t\t)\n\t\t: head;\n\nexport const readCspNonce = () => {\n\tconst getter: unknown = Reflect.get(globalThis, GETTER_KEY);\n\tif (typeof getter !== 'function') return undefined;\n\tconst nonce: unknown = getter();\n\n\treturn typeof nonce === 'string' ? nonce : undefined;\n};\n\nexport const registerCspNonceGetter = (getter: () => string | undefined) => {\n\tReflect.set(globalThis, GETTER_KEY, getter);\n};\n",
|
|
8
7
|
"/**\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\nimport { nonceAttr } from './cspNonceRef';\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${nonceAttr()}>\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",
|
|
9
8
|
"import { nonceAttr } from '../utils/cspNonceRef';\nimport { TRANSLATABLE_ATTRIBUTES } from '../client/browserTranslationAttributes';\n\nconst BASELINE_MARKER = '__ABSOLUTE_SSR_TEXT_BASELINES__';\n\n/** Inline this after SSR markup and before any client entry executes. The\n * snapshot records server-authored text while keeping it out of the DOM, so\n * browser translation remains free to edit the rendered text. */\nexport const BROWSER_TRANSLATION_BASELINE_SCRIPT =\n\t'window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();' +\n\t'window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__=new WeakMap();' +\n\t'{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__,' +\n\t'a=window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__;' +\n\t'if(r)for(const e of [r,...r.querySelectorAll(\"*\")]){' +\n\t'const t=new Map();for(const [i,n]of[...e.childNodes].entries())' +\n\t'if(n.nodeType===3)t.set(i,n.nodeValue??\"\");if(t.size)b.set(e,t);' +\n\t`const v=new Map();for(const k of ${JSON.stringify(TRANSLATABLE_ATTRIBUTES)}){` +\n\t'const s=e.getAttribute(k);if(s!==null)v.set(k,s);}if(v.size)a.set(e,v);}}';\n\nexport const browserTranslationBaselineTag = () =>\n\t`<script${nonceAttr()}>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`;\n\nexport const injectBrowserTranslationBaseline = (html: string) => {\n\tif (html.includes(BASELINE_MARKER)) return html;\n\tconst script = browserTranslationBaselineTag();\n\tconst closingBodyIndex = html.lastIndexOf('</body>');\n\tif (closingBodyIndex < 0) return `${html}${script}`;\n\n\treturn `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;\n};\n",
|
|
10
9
|
"import { escapeScriptContent } from '../utils/escapeScriptContent';\nimport { nonceAttr, readCspNonce } from '../utils/cspNonceRef';\nimport type { EnvironmentProviders, Provider, Type } from '@angular/core';\nimport type { BootstrapContext } from '@angular/platform-browser';\nimport type { AngularDeps, CachedRouteData } from '../../types/angular';\nimport {\n\tgetAndClearClientScripts,\n\tgenerateClientScriptCode\n} from '../utils/registerClientScript';\nimport { browserTranslationBaselineTag } from '../core/browserTranslation';\nimport { buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';\nimport { buildRequestProviders } from './requestProviders';\nimport { isAngularZoneMode } from './zoneRuntime';\n\n// --- Last-used requestContext cache for HMR ---\n// Stores { requestContext, headTag } from the most recent real request per\n// route so HMR re-renders with the same data the user last saw.\n\nconst routeContextCache = new Map<string, CachedRouteData>();\n\nexport const cacheRouteData = (pagePath: string, data: CachedRouteData) => {\n\tconst cacheKey = pagePath.split('?')[0] ?? pagePath;\n\trouteContextCache.set(cacheKey, data);\n};\nexport const getCachedRouteData = (pagePath: string) =>\n\trouteContextCache.get(pagePath);\n\n// --- Selector cache ---\n\nconst selectorCache = new Map<string, string>();\nexport const buildProviders = (\n\tdeps: AngularDeps,\n\tsanitizer: InstanceType<AngularDeps['DomSanitizer']>,\n\trequest: Request | undefined,\n\trequestContext: unknown,\n\tresponseInit: ResponseInit | undefined,\n\tuserProviders: ReadonlyArray<Provider | EnvironmentProviders> = []\n) => [\n\tdeps.provideServerRendering(),\n\tdeps.provideClientHydration(\n\t\tdeps.withHttpTransferCacheOptions(\n\t\t\tbuildAbsoluteHttpTransferCacheOptions()\n\t\t)\n\t),\n\tisAngularZoneMode()\n\t\t? deps.provideZoneChangeDetection({ eventCoalescing: true })\n\t\t: deps.provideZonelessChangeDetection(),\n\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t{ provide: deps.DomSanitizer, useValue: sanitizer },\n\t{ provide: deps.Sanitizer, useValue: sanitizer },\n\t...buildRequestProviders(deps, request, requestContext, responseInit),\n\t...userProviders\n];\nexport const clearSelectorCache = () => selectorCache.clear();\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\trequestContext?: unknown,\n\tbaseHref?: string | null\n) => {\n\tlet result = injectBeforeClose(html, browserTranslationBaselineTag());\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 (requestContext !== undefined) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>window.__ABS_ANGULAR_REQUEST_CONTEXT__ = ${escapeScriptContent(JSON.stringify(requestContext))};</script>`\n\t\t);\n\t}\n\n\t// Read by the generated client bootstrap so the browser router uses\n\t// the same `APP_BASE_HREF` the server rendered with.\n\tif (baseHref) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>window.__ABS_ANGULAR_BASE_HREF__ = ${escapeScriptContent(JSON.stringify(baseHref))};</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${nonceAttr()}>import(${escapeScriptContent(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\t// Angular writes this nonce on its own <style> and event-replay\n\t// scripts when secureHeaders() is on.\n\tconst nonce = readCspNonce();\n\tconst cspProviders = nonce\n\t\t? [{ provide: deps.CSP_NONCE, useValue: nonce }]\n\t\t: [];\n\tconst bootstrap = (context: BootstrapContext) =>\n\t\tdeps.bootstrapApplication(\n\t\t\tPageComponent,\n\t\t\t{ providers: [...providers, ...cspProviders] },\n\t\t\tcontext\n\t\t);\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",
|
|
11
10
|
"import { getAngularDeps } from './angularDeps';\nimport { withSuppressedAngularDevLogs } from './ssrRender';\nimport { getSsrContextId } from '../utils/registerClientScript';\nimport { readPageNonce } from '../dev/client/cspNonce';\n\nconst angularIslandSelector = 'abs-angular-island';\n\nexport const getAngularIslandSelector = (_islandId: string) =>\n\tangularIslandSelector;\nexport const isAngularComponent = (\n\tvalue: unknown\n): value is import('@angular/core').Type<object> => typeof value === 'function';\n\nconst getSelectorFromRenderedIsland = (rootElement: HTMLElement) => {\n\tconst firstChild = rootElement.firstElementChild;\n\tif (!(firstChild instanceof HTMLElement)) {\n\t\treturn null;\n\t}\n\n\tconst selector = firstChild.tagName.toLowerCase();\n\n\treturn selector.length > 0 ? selector : null;\n};\n\nconst getClientAngularComponentSelector = (\n\tcomponent: import('@angular/core').Type<object>\n) => {\n\tconst maybeDef = Reflect.get(component, 'ɵcmp');\n\tif (typeof maybeDef !== 'object' || maybeDef === null) {\n\t\treturn null;\n\t}\n\n\tconst maybeSelectors = Reflect.get(maybeDef, 'selectors');\n\tif (!Array.isArray(maybeSelectors)) {\n\t\treturn null;\n\t}\n\n\tconst [firstSelectorGroup] = maybeSelectors;\n\tif (!Array.isArray(firstSelectorGroup)) {\n\t\treturn null;\n\t}\n\n\tconst [selector] = firstSelectorGroup;\n\n\treturn typeof selector === 'string' && selector.length > 0\n\t\t? selector\n\t\t: null;\n};\n\nconst createAngularIslandApp = async () => {\n\tconst { CSP_NONCE, EnvironmentInjector, provideZonelessChangeDetection } =\n\t\tawait import('@angular/core');\n\tconst { createApplication } = await import('@angular/platform-browser');\n\t// Under secureHeaders(), the <style> elements Angular adds for island\n\t// components need the page's nonce.\n\tconst nonce = readPageNonce();\n\tconst app = await createApplication({\n\t\tproviders: [\n\t\t\tprovideZonelessChangeDetection(),\n\t\t\t...(nonce ? [{ provide: CSP_NONCE, useValue: nonce }] : [])\n\t\t]\n\t});\n\tconst environmentInjector = app.injector.get(EnvironmentInjector);\n\n\treturn { app, environmentInjector };\n};\n\nlet angularIslandAppPromise: Promise<{\n\tapp: import('@angular/core').ApplicationRef;\n\tenvironmentInjector: import('@angular/core').EnvironmentInjector;\n}> | null = null;\n\nconst getAngularIslandApp = async () => {\n\tif (!angularIslandAppPromise) {\n\t\tangularIslandAppPromise = createAngularIslandApp();\n\t}\n\n\treturn angularIslandAppPromise;\n};\n\ntype AngularIslandWrapperMetadata = {\n\tdeps: Awaited<ReturnType<typeof getAngularDeps>>;\n\tpropsToken: import('@angular/core').InjectionToken<Record<string, unknown>>;\n\tselector: string;\n\tWrapperComponent: import('@angular/core').Type<object>;\n};\n\nconst wrapperMetadataCache = new Map<\n\tstring,\n\tPromise<AngularIslandWrapperMetadata>\n>();\nconst requestRenderCache = new Map<string, Map<string, string>>();\n\nconst getRequestRenderCache = () => {\n\tconst requestId = getSsrContextId();\n\tif (!requestId) {\n\t\treturn null;\n\t}\n\n\tconst cached = requestRenderCache.get(requestId);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst renderCache = new Map<string, string>();\n\trequestRenderCache.set(requestId, renderCache);\n\n\treturn renderCache;\n};\n\nconst getAngularIslandWrapperKey = (\n\tcomponent: import('@angular/core').Type<object>,\n\t_islandId: string\n) => {\n\tconst componentName =\n\t\ttypeof component.name === 'string' && component.name.length > 0\n\t\t\t? component.name\n\t\t\t: 'AngularIsland';\n\n\treturn `${componentName}:${angularIslandSelector}`;\n};\n\nconst getIslandRenderCacheKey = (\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Record<string, unknown>\n) => {\n\tconst componentName =\n\t\ttypeof component.name === 'string' && component.name.length > 0\n\t\t\t? component.name\n\t\t\t: 'AngularIsland';\n\n\treturn `${componentName}:${JSON.stringify(props)}`;\n};\n\nconst buildAngularIslandWrapperMetadata = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tislandId: string,\n\twrapperKey: string\n) => {\n\t// Resolve Angular through getAngularDeps so the wrapper is built with the\n\t// SAME Angular instance that renders it. In production server-side imports\n\t// point at the pre-linked Angular vendor bundle; bare `@angular/*` imports\n\t// here would instead resolve to node_modules, giving the wrapper component\n\t// (its decorator, InjectionToken and inject) a different Angular instance\n\t// than the render pipeline's injector — every cross-instance token lookup\n\t// then fails with NG0201. (Dev uses a single node_modules Angular, so this\n\t// only manifests in production.)\n\tconst deps = await getAngularDeps();\n\tconst { Component, InjectionToken, NgComponentOutlet, inject } = deps;\n\tconst selector = getAngularIslandSelector(islandId);\n\tconst propsToken = new InjectionToken<Record<string, unknown>>(\n\t\t`${wrapperKey}:props`\n\t);\n\n\tclass AngularIslandWrapperComponent {\n\t\tcomponent = component;\n\t\tprops = inject(propsToken);\n\t}\n\n\treturn {\n\t\tdeps,\n\t\tpropsToken,\n\t\tselector,\n\t\tWrapperComponent: Component({\n\t\t\timports: [NgComponentOutlet, component],\n\t\t\tselector,\n\t\t\tstandalone: true,\n\t\t\ttemplate:\n\t\t\t\t'<ng-container *ngComponentOutlet=\"component; inputs: props\"></ng-container>'\n\t\t})(AngularIslandWrapperComponent)\n\t};\n};\n\nconst createAngularIslandWrapper = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tislandId: string\n) => {\n\tconst wrapperKey = getAngularIslandWrapperKey(component, islandId);\n\tconst cached = wrapperMetadataCache.get(wrapperKey);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst metadataPromise = buildAngularIslandWrapperMetadata(\n\t\tcomponent,\n\t\tislandId,\n\t\twrapperKey\n\t);\n\n\twrapperMetadataCache.set(wrapperKey, metadataPromise);\n\n\treturn metadataPromise;\n};\n\nconst extractAngularIslandRoot = (html: string, selector: string) => {\n\tconst openTag = `<${selector}`;\n\tconst start = html.indexOf(openTag);\n\tif (start < 0) {\n\t\tthrow new Error(`Could not find Angular island root \"${selector}\".`);\n\t}\n\n\tconst endTag = `</${selector}>`;\n\tconst end = html.indexOf(endTag, start);\n\tif (end < 0) {\n\t\tthrow new Error(`Could not close Angular island root \"${selector}\".`);\n\t}\n\n\treturn html.slice(start, end + endTag.length);\n};\n\nexport const mountAngularIsland = async <Props extends Record<string, unknown>>(\n\tcomponent: import('@angular/core').Type<object>,\n\telement: HTMLElement,\n\tprops: Props,\n\tislandId: string\n) => {\n\tawait import('@angular/compiler');\n\tconst { createComponent, inputBinding } = await import('@angular/core');\n\tconst selector = getAngularIslandSelector(islandId);\n\tconst { app, environmentInjector } = await getAngularIslandApp();\n\n\tlet rootElement = element.querySelector(selector);\n\tif (!(rootElement instanceof HTMLElement)) {\n\t\telement.innerHTML = `<${selector}></${selector}>`;\n\t\trootElement = element.querySelector(selector);\n\t}\n\tif (!(rootElement instanceof HTMLElement)) return app;\n\n\tconst componentSelector =\n\t\tgetClientAngularComponentSelector(component) ??\n\t\tgetSelectorFromRenderedIsland(rootElement);\n\tif (!componentSelector) return app;\n\n\trootElement.innerHTML = `<${componentSelector}></${componentSelector}>`;\n\tconst hostElement = rootElement.querySelector(componentSelector);\n\tif (!(hostElement instanceof HTMLElement)) return app;\n\n\tconst bindings = Object.entries(props).map(([key, value]) =>\n\t\tinputBinding(key, () => value)\n\t);\n\tconst componentRef = createComponent(component, {\n\t\tbindings,\n\t\tenvironmentInjector,\n\t\thostElement\n\t});\n\tapp.attachView(componentRef.hostView);\n\tcomponentRef.changeDetectorRef.detectChanges();\n\twindow.__ABS_ANGULAR_ISLAND_APPS__ ??= [];\n\twindow.__ABS_ANGULAR_ISLAND_APPS__.push(app);\n\n\treturn app;\n};\nexport const renderAngularIslandToHtml = async <\n\tProps extends Record<string, unknown>\n>(\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Props,\n\tislandId: string\n) => {\n\tconst requestCache = getRequestRenderCache();\n\tconst renderCacheKey = getIslandRenderCacheKey(component, props);\n\tconst cachedHtml = requestCache?.get(renderCacheKey);\n\tif (cachedHtml) {\n\t\treturn cachedHtml;\n\t}\n\n\tconst { deps, propsToken, selector, WrapperComponent } =\n\t\tawait createAngularIslandWrapper(component, islandId);\n\n\tconst providers: (\n\t\t| import('@angular/core').Provider\n\t\t| import('@angular/core').EnvironmentProviders\n\t)[] = [\n\t\tdeps.provideServerRendering(),\n\t\tdeps.provideZonelessChangeDetection(),\n\t\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t\t{ provide: propsToken, useValue: props }\n\t];\n\tconst document = `<!DOCTYPE html><html><body><${selector}></${selector}></body></html>`;\n\tconst html = await withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(\n\t\t\t(context) =>\n\t\t\t\tdeps.bootstrapApplication(\n\t\t\t\t\tWrapperComponent,\n\t\t\t\t\t{ providers },\n\t\t\t\t\tcontext\n\t\t\t\t),\n\t\t\t{\n\t\t\t\tdocument,\n\t\t\t\tplatformProviders: [],\n\t\t\t\turl: '/'\n\t\t\t}\n\t\t)\n\t);\n\tconst island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