@absolutejs/absolute 0.20.0-beta.181 → 0.20.0-beta.183

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/changelog.json +75 -0
  3. package/dist/angular/browser.js +2 -2
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/constants.js +4 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/index.js +520 -84
  9. package/dist/angular/index.js.map +13 -12
  10. package/dist/angular/server.js +520 -84
  11. package/dist/angular/server.js.map +13 -12
  12. package/dist/build.js +452 -85
  13. package/dist/build.js.map +18 -18
  14. package/dist/cli/{add-8gw9mk2b.js → add-jft96bp4.js} +9 -9
  15. package/dist/cli/{analyze-e57zz9x8.js → analyze-5w46d1f0.js} +3 -3
  16. package/dist/cli/{androidEmulatorController-vqc5m2rp.js → androidEmulatorController-gbf9r660.js} +6 -6
  17. package/dist/cli/{androidNativeWatcher-s03aczxv.js → androidNativeWatcher-3astrxxz.js} +6 -6
  18. package/dist/cli/{api-8ppxw487.js → api-zmvnvdsf.js} +8 -8
  19. package/dist/cli/{build-ptx5a72p.js → build-df81wh71.js} +67 -6
  20. package/dist/cli/{build-fz7qbdn3.js → build-mskrk9zb.js} +3 -3
  21. package/dist/cli/{buildDepVendor-qnwfct22.js → buildDepVendor-36d1aa7c.js} +2 -2
  22. package/dist/cli/{buildReactServerComponents-01s87hnk.js → buildReactServerComponents-k6amghrj.js} +5 -5
  23. package/dist/cli/{compile-54rb8szn.js → compile-7mjd739p.js} +10 -6
  24. package/dist/cli/config/server.js +37 -18
  25. package/dist/cli/{db-qbzjw3en.js → db-mpmj37jq.js} +2 -2
  26. package/dist/cli/{dev-6s6g5tnk.js → dev-9d6d7757.js} +14 -14
  27. package/dist/cli/{doctor-m36tmx4d.js → doctor-nng9szw6.js} +3 -3
  28. package/dist/cli/{emulatorDoctor-s1z5tkp7.js → emulatorDoctor-3eszsqs8.js} +5 -5
  29. package/dist/cli/{emulatorInstaller-pgkdswvq.js → emulatorInstaller-1r6cawm0.js} +6 -6
  30. package/dist/cli/{env-5nz1qm8e.js → env-bfa7vs35.js} +3 -3
  31. package/dist/cli/{expoDevController-018anvbm.js → expoDevController-s0msdwbm.js} +6 -6
  32. package/dist/cli/{generate-5vyz1s44.js → generate-xk3a7qnc.js} +8 -8
  33. package/dist/cli/{heapDiff-kncvdtn8.js → heapDiff-3ba8p8wf.js} +3 -3
  34. package/dist/cli/{htmx-26hs6jdm.js → htmx-an2x3gpx.js} +6 -6
  35. package/dist/cli/{index-7854xf0m.js → index-1bszxtdj.js} +1 -1
  36. package/dist/cli/{index-kx2d067c.js → index-3066eqr3.js} +8 -5
  37. package/dist/cli/{index-8khbn8qr.js → index-3a9h87v5.js} +3 -3
  38. package/dist/cli/{index-jkg2h10c.js → index-3dz754hk.js} +3 -3
  39. package/dist/cli/{index-9djrap79.js → index-3pz5sjaz.js} +1 -1
  40. package/dist/cli/{index-50ag35xg.js → index-3ys9tz53.js} +2 -2
  41. package/dist/cli/{index-6f448d7m.js → index-4ynx0cq6.js} +26 -12
  42. package/dist/cli/{index-btp4fyf1.js → index-785hpa2r.js} +2 -2
  43. package/dist/cli/{index-kes8he5s.js → index-9sqqzeq4.js} +1 -1
  44. package/dist/cli/{index-pr1skxen.js → index-akseq9ps.js} +1 -1
  45. package/dist/cli/{index-23hvdyxf.js → index-c6j2727a.js} +1 -1
  46. package/dist/cli/{index-pkw3jktb.js → index-eh786rj4.js} +2 -2
  47. package/dist/cli/{index-aemhvvwb.js → index-eydgkr7w.js} +1 -1
  48. package/dist/cli/{index-rz56x932.js → index-fbmfpqk8.js} +1 -1
  49. package/dist/cli/{index-c8rcfe5a.js → index-fy4th3n0.js} +1 -1
  50. package/dist/cli/{index-prza6tkp.js → index-gx6pjzzk.js} +3 -3
  51. package/dist/cli/{index-125cfzvn.js → index-hker5fs4.js} +2 -2
  52. package/dist/cli/{index-cgmp9d02.js → index-hqkcxa2p.js} +1 -1
  53. package/dist/cli/{index-5w8arh3m.js → index-pq4qqz0r.js} +2 -2
  54. package/dist/cli/{index-enbw9484.js → index-wpgsermq.js} +1 -1
  55. package/dist/cli/{index-0z5fgb80.js → index-wqpg377f.js} +1 -1
  56. package/dist/cli/{index-3sfcmb49.js → index-x7h6w6td.js} +1 -1
  57. package/dist/cli/{index-a6xx0p9e.js → index-ydaxsftq.js} +1 -1
  58. package/dist/cli/{index-3ewt17wm.js → index-yhkg5by0.js} +1 -1
  59. package/dist/cli/{index-aqe25w4h.js → index-zeeep92g.js} +1 -1
  60. package/dist/cli/index.js +32 -32
  61. package/dist/cli/{info-k124sh7g.js → info-5rwsbhe2.js} +4 -4
  62. package/dist/cli/{inspect-n6pcfvfw.js → inspect-nmwb0q5k.js} +5 -5
  63. package/dist/cli/{iosNativeWatcher-wdq2fvj1.js → iosNativeWatcher-7r9gnk87.js} +7 -7
  64. package/dist/cli/{iosSimulatorController-n97dpa8p.js → iosSimulatorController-w963vv9r.js} +7 -7
  65. package/dist/cli/{islands-17tfx8jf.js → islands-w9xrehpk.js} +3 -3
  66. package/dist/cli/{logs-shg23fbt.js → logs-m793x8a7.js} +3 -3
  67. package/dist/cli/{ls-0wr74w0b.js → ls-k31npd5b.js} +3 -3
  68. package/dist/cli/{mem-16sy1707.js → mem-jm6kw6gr.js} +5 -5
  69. package/dist/cli/{migrate-k91k050s.js → migrate-95bjkqkr.js} +2 -2
  70. package/dist/cli/{mobile-hpqpy61f.js → mobile-cpp8vfn7.js} +13 -13
  71. package/dist/cli/prerender-26pzynh4.js +13 -0
  72. package/dist/cli/{prettier-dh5fh786.js → prettier-0ws9pbc1.js} +1 -1
  73. package/dist/cli/{ps-pk7ncjac.js → ps-fx8mz3e3.js} +6 -6
  74. package/dist/cli/{psTui-50wf0b72.js → psTui-0e9c7an6.js} +7 -7
  75. package/dist/cli/{remoteMacProtocol-g10s408w.js → remoteMacProtocol-y7h79gr8.js} +7 -7
  76. package/dist/cli/{remove-x987pvd3.js → remove-xhvph8bz.js} +8 -8
  77. package/dist/cli/{routes-mc3ymp8t.js → routes-hq9yje5z.js} +3 -3
  78. package/dist/cli/{start-mbn2zgs2.js → start-5mjh9hh2.js} +5 -5
  79. package/dist/cli/{typecheck-ynzw2eep.js → typecheck-bvm0ndq4.js} +188 -75
  80. package/dist/cli/{workspace-7sbyyc59.js → workspace-xeb6abxj.js} +5 -5
  81. package/dist/dev/serverBootstrap.js +8 -2
  82. package/dist/index.js +469 -99
  83. package/dist/index.js.map +20 -20
  84. package/dist/islands/index.js +312 -23
  85. package/dist/islands/index.js.map +5 -5
  86. package/dist/mobile/index.js +2 -2
  87. package/dist/mobile/index.js.map +3 -3
  88. package/dist/react/browser.js +18 -1
  89. package/dist/react/browser.js.map +6 -4
  90. package/dist/react/components/index.js +2 -2
  91. package/dist/react/components/index.js.map +3 -3
  92. package/dist/react/index.js +370 -62
  93. package/dist/react/index.js.map +14 -13
  94. package/dist/react/server.js +51 -36
  95. package/dist/react/server.js.map +10 -10
  96. package/dist/src/angular/colocatedRouteMatch.d.ts +23 -0
  97. package/dist/src/angular/components/constants.d.ts +1 -0
  98. package/dist/src/angular/components/defer-slot-payload.d.ts +5 -0
  99. package/dist/src/cli/scripts/manifestKeysEditorHint.d.ts +9 -0
  100. package/dist/src/cli/scripts/typecheck.d.ts +1 -0
  101. package/dist/src/cli/scripts/typecheckDiagnostics.d.ts +41 -0
  102. package/dist/src/constants.d.ts +1 -0
  103. package/dist/src/core/prerender.d.ts +10 -0
  104. package/dist/src/dev/hot/analyze.d.ts +1 -1
  105. package/dist/src/react/browser.d.ts +1 -0
  106. package/dist/src/react/index.d.ts +1 -0
  107. package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +23 -0
  108. package/dist/src/utils/pageCspNonce.d.ts +14 -0
  109. package/dist/src/utils/spaRouteManifest.d.ts +1 -0
  110. package/dist/svelte/index.js +372 -69
  111. package/dist/svelte/index.js.map +11 -11
  112. package/dist/svelte/server.js +363 -60
  113. package/dist/svelte/server.js.map +11 -11
  114. package/dist/types/manifest.d.ts +3 -2
  115. package/dist/types/svelte.d.ts +3 -0
  116. package/dist/vue/components/Image.js +2 -2
  117. package/dist/vue/components/Image.js.map +3 -3
  118. package/dist/vue/components/index.js +2 -2
  119. package/dist/vue/components/index.js.map +3 -3
  120. package/dist/vue/index.js +364 -61
  121. package/dist/vue/index.js.map +11 -11
  122. package/dist/vue/server.js +54 -40
  123. package/dist/vue/server.js.map +9 -9
  124. package/package.json +1 -1
  125. package/dist/cli/prerender-w65xp6h8.js +0 -11
  126. /package/dist/cli/{index-t8jmj8w1.js → index-fm9x6sjs.js} +0 -0
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import"./index-71gchbzt.js";
3
- import"./index-t8jmj8w1.js";
3
+ import"./index-fm9x6sjs.js";
4
4
  import {
5
5
  colors,
6
6
  padLine
7
- } from "./index-9djrap79.js";
7
+ } from "./index-3pz5sjaz.js";
8
8
  import {
9
9
  discoverInstances,
10
10
  enrichInstances
11
- } from "./index-aemhvvwb.js";
11
+ } from "./index-eydgkr7w.js";
12
12
 
13
13
  // src/cli/scripts/routes.ts
14
14
  var METHOD_COLOR = {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  start2
4
- } from "./index-kx2d067c.js";
4
+ } from "./index-3066eqr3.js";
5
5
  import"./index-js2hksgv.js";
6
6
  import"./index-42xjh6gg.js";
7
7
  import"./index-w6xsk8cv.js";
@@ -14,10 +14,10 @@ import"./index-0gd30trc.js";
14
14
  import"./index-ycqdxy55.js";
15
15
  import"./index-4j1twret.js";
16
16
  import"./index-pch0v1z6.js";
17
- import"./index-125cfzvn.js";
18
- import"./index-3ewt17wm.js";
19
- import"./index-pr1skxen.js";
20
- import"./index-t8jmj8w1.js";
17
+ import"./index-hker5fs4.js";
18
+ import"./index-yhkg5by0.js";
19
+ import"./index-akseq9ps.js";
20
+ import"./index-fm9x6sjs.js";
21
21
  export {
22
22
  start2 as start
23
23
  };
@@ -10,15 +10,15 @@ import {
10
10
  } from "./index-4j1twret.js";
11
11
  import {
12
12
  ANSI_ESCAPE_CODE
13
- } from "./index-t8jmj8w1.js";
13
+ } from "./index-fm9x6sjs.js";
14
14
  import {
15
15
  ensureFileRouteModule
16
16
  } from "./index-47e8fwha.js";
17
- import"./index-aqe25w4h.js";
17
+ import"./index-zeeep92g.js";
18
18
  import {
19
19
  MANIFEST_KEYS_DECLARATION,
20
20
  writeManifestKeysDeclaration
21
- } from "./index-jkg2h10c.js";
21
+ } from "./index-3dz754hk.js";
22
22
  import {
23
23
  getString,
24
24
  isRecord
@@ -26,12 +26,12 @@ import {
26
26
  import"./index-w6xsk8cv.js";
27
27
  import {
28
28
  DEFAULT_SERVER_ENTRY
29
- } from "./index-125cfzvn.js";
30
- import"./index-3ewt17wm.js";
31
- import"./index-pr1skxen.js";
29
+ } from "./index-hker5fs4.js";
30
+ import"./index-yhkg5by0.js";
31
+ import"./index-akseq9ps.js";
32
32
 
33
33
  // src/cli/scripts/typecheck.ts
34
- import { dirname as dirname3, join as join2, parse as parse3, relative as relative2, resolve as resolve4 } from "path";
34
+ import { dirname as dirname3, join as join2, parse as parse3, relative as relative3, resolve as resolve4 } from "path";
35
35
  import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync3 } from "fs";
36
36
  import { mkdir as mkdir2, rm as rm2, writeFile as writeFile2 } from "fs/promises";
37
37
 
@@ -1241,8 +1241,33 @@ var svelteDeclarationRootDirs = (projectRoot, fromDir) => [
1241
1241
  ];
1242
1242
  var tsconfigHasSvelteDeclarationRoot = (rootDirs) => Array.isArray(rootDirs) && rootDirs.some((entry) => typeof entry === "string" && entry.replace(/^\.\//, "").replace(/\/$/, "") === SVELTE_DECLARATIONS_ROOT);
1243
1243
 
1244
+ // src/cli/scripts/manifestKeysEditorHint.ts
1245
+ var toEntries = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string").map((entry) => entry.trim().replace(/\\/g, "/").replace(/^(?:\.\/)+/, "").replace(/\/+$/, "")) : [];
1246
+ var escapeRegex = (text) => text.replace(/[.+^${}()|[\]\\]/g, "\\$&");
1247
+ var patternMatches = (pattern, path) => {
1248
+ const source = pattern.split("/").map((segment) => {
1249
+ if (segment === "**")
1250
+ return "(?:[^./][^/]*/)*";
1251
+ const body = escapeRegex(segment).replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]");
1252
+ return /^[*?]/.test(segment) ? `(?!\\.)${body}/` : `${body}/`;
1253
+ }).join("");
1254
+ return new RegExp(`^${source}`).test(`${path}/`);
1255
+ };
1256
+ var manifestKeysEditorHint = (config) => {
1257
+ const path = MANIFEST_KEYS_DECLARATION;
1258
+ const files = toEntries(config.files);
1259
+ if (files.includes(path))
1260
+ return null;
1261
+ const excluded = toEntries(config.exclude).some((pattern) => patternMatches(pattern, path));
1262
+ const included = toEntries(config.include).some((pattern) => patternMatches(pattern, path));
1263
+ if (included && !excluded)
1264
+ return null;
1265
+ const where = excluded ? `to "files" in tsconfig.json ("exclude" removes it from "include", but not from "files"): "files": ["${path}"]` : `to "include" in tsconfig.json`;
1266
+ return `\x1B[33mnote\x1B[0m asset(manifest, key) keys are checked by this command. For the same check in your editor, add "${path}" ${where}.`;
1267
+ };
1268
+
1244
1269
  // src/cli/scripts/typecheckDiagnostics.ts
1245
- import { resolve as resolve3 } from "path";
1270
+ import { relative as relative2, resolve as resolve3 } from "path";
1246
1271
  var ANSI_COLOR_REGEX = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-9;]*m`, "g");
1247
1272
  var stripAnsi = (text) => text.replace(ANSI_COLOR_REGEX, "");
1248
1273
  var PAREN_FORMAT = /^(.+?)\((\d+),(\d+)\): error ((?:TS|NG)\d+)/;
@@ -1312,6 +1337,130 @@ var withoutReported = (output, reported, cwd = process.cwd()) => {
1312
1337
  remaining
1313
1338
  };
1314
1339
  };
1340
+ var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1341
+ var toPosition = (value) => isObject(value) && typeof value.line === "number" && typeof value.character === "number" ? { character: value.character, line: value.line } : null;
1342
+ var toDiagnostic = (value) => {
1343
+ if (!isObject(value))
1344
+ return null;
1345
+ const { code, filename, message, source, type } = value;
1346
+ const start = toPosition(value.start);
1347
+ const end = toPosition(value.end) ?? start;
1348
+ if (type !== "ERROR" && type !== "WARNING" || typeof filename !== "string" || typeof message !== "string" || start === null || end === null)
1349
+ return null;
1350
+ return {
1351
+ code: typeof code === "number" || typeof code === "string" ? code : undefined,
1352
+ end,
1353
+ filename,
1354
+ message,
1355
+ source: typeof source === "string" ? source : undefined,
1356
+ start,
1357
+ type
1358
+ };
1359
+ };
1360
+ var parseJson = (text) => {
1361
+ try {
1362
+ return JSON.parse(text);
1363
+ } catch {
1364
+ return null;
1365
+ }
1366
+ };
1367
+ var parseFailure = (text) => {
1368
+ const parsed = parseJson(text);
1369
+ return typeof parsed === "string" ? parsed : text;
1370
+ };
1371
+ var MACHINE_LINE = /^\d+ (.*)$/;
1372
+ var IGNORED_EVENTS = ["START ", "COMPLETED "];
1373
+ var parseSvelteCheckOutput = (output) => {
1374
+ const diagnostics = [];
1375
+ const failures = [];
1376
+ const other = [];
1377
+ for (const line of stripAnsi(output).split(`
1378
+ `)) {
1379
+ if (line.trim() === "")
1380
+ continue;
1381
+ const event = MACHINE_LINE.exec(line)?.[1] ?? "";
1382
+ const diagnostic = event.startsWith("{") ? toDiagnostic(parseJson(event)) : null;
1383
+ if (diagnostic?.type === "ERROR")
1384
+ diagnostics.push(diagnostic);
1385
+ else if (diagnostic !== null)
1386
+ continue;
1387
+ else if (event.startsWith("FAILURE "))
1388
+ failures.push(parseFailure(event.slice("FAILURE ".length)));
1389
+ else if (!IGNORED_EVENTS.some((prefix) => event.startsWith(prefix)))
1390
+ other.push(line);
1391
+ }
1392
+ return { diagnostics, failures, other };
1393
+ };
1394
+ var TS_SOURCES = new Set([undefined, "js", "ts"]);
1395
+ var isTypeScriptDiagnostic = ({ code, source }) => typeof code === "number" && TS_SOURCES.has(source);
1396
+ var svelteDiagnosticKey = (diagnostic, cwd = process.cwd()) => isTypeScriptDiagnostic(diagnostic) ? keyOf({
1397
+ code: `TS${diagnostic.code}`,
1398
+ column: String(diagnostic.start.character + 1),
1399
+ file: diagnostic.filename,
1400
+ line: String(diagnostic.start.line + 1)
1401
+ }, cwd) : null;
1402
+ var codeLabel = (diagnostic) => {
1403
+ if (diagnostic.code === undefined)
1404
+ return "";
1405
+ if (isTypeScriptDiagnostic(diagnostic))
1406
+ return ` TS${diagnostic.code}`;
1407
+ return ` ${diagnostic.code}`;
1408
+ };
1409
+ var codeFrame = (diagnostic, sourceText) => {
1410
+ const text = sourceText?.split(`
1411
+ `)[diagnostic.start.line];
1412
+ if (text === undefined)
1413
+ return [];
1414
+ const line = text.replace(/\r$/, "");
1415
+ const { end, start } = diagnostic;
1416
+ const from = Math.min(start.character, line.length);
1417
+ const until = end.line === start.line ? end.character : line.length;
1418
+ const width = Math.max(1, Math.min(until, line.length) - from);
1419
+ const gutter = String(start.line + 1);
1420
+ const indent = line.slice(0, from).replace(/[^\t]/g, " ");
1421
+ return [
1422
+ `\x1B[7m${gutter}\x1B[0m ${line}`,
1423
+ `\x1B[7m${" ".repeat(gutter.length)}\x1B[0m ${indent}\x1B[91m${"~".repeat(width)}\x1B[0m`
1424
+ ];
1425
+ };
1426
+ var formatSvelteDiagnostics = (diagnostics, readSource, cwd = process.cwd()) => {
1427
+ const blocks = diagnostics.map((diagnostic) => {
1428
+ const absolute = resolve3(cwd, diagnostic.filename);
1429
+ const file = relative2(cwd, absolute) || diagnostic.filename;
1430
+ const line = diagnostic.start.line + 1;
1431
+ const column = diagnostic.start.character + 1;
1432
+ const header = `\x1B[96m${file}\x1B[0m:\x1B[93m${line}\x1B[0m:\x1B[93m${column}\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m${codeLabel(diagnostic)}: \x1B[0m${diagnostic.message}`;
1433
+ const frame = codeFrame(diagnostic, readSource(absolute));
1434
+ return [header, ...frame.length > 0 ? ["", ...frame] : []].join(`
1435
+ `);
1436
+ });
1437
+ if (blocks.length === 0)
1438
+ return "";
1439
+ const suffix = blocks.length === 1 ? "" : "s";
1440
+ return `${blocks.join(`
1441
+
1442
+ `)}
1443
+
1444
+ Found ${blocks.length} error${suffix}.`;
1445
+ };
1446
+ var svelteCheckReport = (output, reported, readSource, cwd = process.cwd()) => {
1447
+ const { diagnostics, failures, other } = parseSvelteCheckOutput(output);
1448
+ const kept = diagnostics.filter((diagnostic) => {
1449
+ const key = svelteDiagnosticKey(diagnostic, cwd);
1450
+ return key === null || !reported.has(key);
1451
+ });
1452
+ const sections = [
1453
+ ...other,
1454
+ ...failures.map((failure) => `\x1B[91merror\x1B[0m svelte-check failed: ${failure}`),
1455
+ formatSvelteDiagnostics(kept, readSource, cwd)
1456
+ ].filter((section) => section.length > 0);
1457
+ return {
1458
+ dropped: diagnostics.length - kept.length,
1459
+ output: sections.join(`
1460
+ `),
1461
+ remaining: kept.length + failures.length + other.length
1462
+ };
1463
+ };
1315
1464
 
1316
1465
  // src/cli/scripts/typecheck.ts
1317
1466
  var isCommandService = (service) => service.kind === "command" || Array.isArray(service.command);
@@ -1362,56 +1511,6 @@ var findBin = (name) => {
1362
1511
  const local = resolve4("node_modules", ".bin", name);
1363
1512
  return existsSync3(local) ? local : null;
1364
1513
  };
1365
- var ANSI_COLOR_REGEX2 = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-9;]*m`, "g");
1366
- var ANSI_PURPLE_REGEX = `${String.fromCharCode(ANSI_ESCAPE_CODE)}[35m`;
1367
- var ANSI_CYAN_REGEX = new RegExp(`^${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[36m|\\t`);
1368
- var ANSI_TOKEN_END_REGEX = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[3[69]m`);
1369
- var stripAnsi2 = (str) => str.replace(ANSI_COLOR_REGEX2, "");
1370
- var formatSvelteOutput = (output) => {
1371
- const cwd = `${process.cwd()}/`;
1372
- const summaryMatch = stripAnsi2(output).match(/svelte-check found (\d+) error/);
1373
- const errorCount = summaryMatch ? parseInt(summaryMatch[1] ?? "0", 10) : 0;
1374
- const formatted = output.split(`
1375
- `).filter((line) => {
1376
- const plain = stripAnsi2(line);
1377
- return !plain.startsWith("Loading svelte-check") && !plain.startsWith("Getting Svelte") && !plain.startsWith("====") && !plain.startsWith("svelte-check found") && !/^\d+ (START|COMPLETED)/.test(plain) && plain.trim() !== "";
1378
- }).flatMap((line) => {
1379
- const result = line.replaceAll(cwd, "");
1380
- const plain = stripAnsi2(result);
1381
- const pathMatch = plain.match(/^(\S+\.svelte):(\d+:\d+)$/);
1382
- if (pathMatch) {
1383
- return [
1384
- `\x1B[96m${pathMatch[1]}\x1B[0m:\x1B[93m${pathMatch[2]}\x1B[0m`
1385
- ];
1386
- }
1387
- if (result.includes(ANSI_PURPLE_REGEX)) {
1388
- const plainLine = stripAnsi2(result);
1389
- const before = stripAnsi2(result.split(ANSI_PURPLE_REGEX)[0] ?? "");
1390
- const token = stripAnsi2((result.split(ANSI_PURPLE_REGEX)[1] ?? "").split(ANSI_TOKEN_END_REGEX)[0] ?? "");
1391
- if (!token)
1392
- return [result];
1393
- const expanded = before.replace(/\t/g, " ");
1394
- const expandedLine = plainLine.replace(/\t/g, " ");
1395
- const underline = "~".repeat(token.length);
1396
- return [
1397
- `\x1B[0m${expandedLine}`,
1398
- `${" ".repeat(expanded.length)}\x1B[91m${underline}\x1B[0m`
1399
- ];
1400
- }
1401
- if (ANSI_CYAN_REGEX.test(result) && !result.includes("Error") && !result.includes(ANSI_PURPLE_REGEX)) {
1402
- return [];
1403
- }
1404
- return [result];
1405
- }).join(`
1406
- `);
1407
- if (errorCount > 0) {
1408
- const suffix = errorCount === 1 ? "" : "s";
1409
- return `${formatted}
1410
-
1411
- Found ${errorCount} error${suffix}.`;
1412
- }
1413
- return formatted;
1414
- };
1415
1514
  var ABSOLUTE_INTERNAL_EXCLUDES = [
1416
1515
  ".absolutejs/**/*",
1417
1516
  "**/build/**/*",
@@ -1522,7 +1621,7 @@ var prepareSvelteShim = async (cacheDir, svelteFiles) => {
1522
1621
  svelteShimPath = shimPath;
1523
1622
  };
1524
1623
  var isWithin = (dir, path) => {
1525
- const rel = relative2(dir, path);
1624
+ const rel = relative3(dir, path);
1526
1625
  return rel === "" || !rel.startsWith("..") && !rel.startsWith("/");
1527
1626
  };
1528
1627
  var svelteRoots = (projectRoot, svelteDirs, svelteFiles) => {
@@ -1530,10 +1629,9 @@ var svelteRoots = (projectRoot, svelteDirs, svelteFiles) => {
1530
1629
  const strays = svelteFiles.filter((file) => !configured.some((dir) => isWithin(dir, file))).map((file) => dirname3(file));
1531
1630
  const candidates = [...new Set([...configured, ...strays])].sort((left, right) => left.length - right.length);
1532
1631
  const roots = candidates.reduce((kept, dir) => kept.some((root) => isWithin(root, dir)) ? kept : [...kept, dir], []);
1533
- return roots.map((dir) => relative2(projectRoot, dir) || ".");
1632
+ return roots.map((dir) => relative3(projectRoot, dir) || ".");
1534
1633
  };
1535
1634
  var manifestKeyDeclarations = [];
1536
- var MANIFEST_KEYS_EDITOR_HINT = `\x1B[33mnote\x1B[0m asset(manifest, key) keys are checked by this command. For the same check in your editor, add "${MANIFEST_KEYS_DECLARATION}" to include in tsconfig.json.`;
1537
1635
  var prepareManifestKeys = async (targets) => {
1538
1636
  const byRoot = new Map;
1539
1637
  for (const target of targets) {
@@ -1542,13 +1640,11 @@ var prepareManifestKeys = async (targets) => {
1542
1640
  }
1543
1641
  const written = await Promise.all([...byRoot].map(([root, configs]) => writeManifestKeysDeclaration(configs, root)));
1544
1642
  manifestKeyDeclarations = written.filter((path) => path !== null);
1545
- const config = readProjectTsconfig();
1546
- const listed = [
1547
- ...toStringArray(config.include),
1548
- ...toStringArray(config.files)
1549
- ].some((entry) => entry.replace(/^\.\//, "").startsWith(".absolutejs"));
1550
- if (manifestKeyDeclarations.length > 0 && !listed)
1551
- console.log(MANIFEST_KEYS_EDITOR_HINT);
1643
+ if (manifestKeyDeclarations.length === 0)
1644
+ return;
1645
+ const hint = manifestKeysEditorHint(readProjectTsconfig());
1646
+ if (hint)
1647
+ console.log(hint);
1552
1648
  };
1553
1649
  var svelteDeclarationsReady = false;
1554
1650
  var getTypecheckRootDirs = (cacheDir) => {
@@ -1716,7 +1812,7 @@ var svelteCheckIncludes = (projectRoot, configuredDirs, roots) => {
1716
1812
  const configured = configuredDirs.map((dir) => resolve4(projectRoot, dir));
1717
1813
  const strays = roots.filter((root) => !configured.some((dir) => isWithin(dir, resolve4(projectRoot, root))));
1718
1814
  return [
1719
- ...configured.map((dir) => `../${relative2(projectRoot, dir) || "."}/**/*`),
1815
+ ...configured.map((dir) => `../${relative3(projectRoot, dir) || "."}/**/*`),
1720
1816
  ...strays.map((root) => `../${root}/**/*.svelte`)
1721
1817
  ];
1722
1818
  };
@@ -1746,8 +1842,7 @@ var buildSvelteCheck = async (cacheDir, includes) => {
1746
1842
  "--compiler-warnings",
1747
1843
  "css-unused-selector:ignore",
1748
1844
  "--output",
1749
- "human-verbose",
1750
- "--color"
1845
+ "machine-verbose"
1751
1846
  ]);
1752
1847
  };
1753
1848
  var IMPORT_ADVICE_FLAG = "--import-advice";
@@ -1756,7 +1851,7 @@ var serverEntryPaths = (targets) => [
1756
1851
  ...new Set(targets.map((target) => resolve4(target.cwd ?? ".", target.entry ?? DEFAULT_SERVER_ENTRY)).filter((path) => existsSync3(path)))
1757
1852
  ];
1758
1853
  var adviceFor = (path, detailed) => {
1759
- const label = relative2(process.cwd(), path) || path;
1854
+ const label = relative3(process.cwd(), path) || path;
1760
1855
  const entries = deferrableEntryImports(readFileSync3(path, "utf-8"), path);
1761
1856
  return detailed ? formatImportAdvice(entries, label) : summarizeImportAdvice(entries, label);
1762
1857
  };
@@ -1811,6 +1906,25 @@ var dedupeAgainstPlain = (results, checkers, checkerCwd = process.cwd()) => {
1811
1906
  };
1812
1907
  var dedupeAngularResult = (results, cacheDir) => dedupeAgainstPlain(results, ANGULAR_CHECKERS, resolve4(cacheDir));
1813
1908
  var dedupeVueResult = (results) => dedupeAgainstPlain(results, VUE_CHECKERS);
1909
+ var readSource = (file) => {
1910
+ try {
1911
+ return readFileSync3(file, "utf-8");
1912
+ } catch {
1913
+ return null;
1914
+ }
1915
+ };
1916
+ var dedupeSvelteResult = (results, read = readSource) => {
1917
+ const plain = results.find((res) => PLAIN_CHECKERS.has(res.name));
1918
+ const reported = plain && plain.exitCode !== 0 ? diagnosticKeys(plain.output) : new Set;
1919
+ return results.map((res) => {
1920
+ if (res.name !== "svelte-check" || res.exitCode === 0)
1921
+ return res;
1922
+ const { dropped, output, remaining } = svelteCheckReport(res.output, reported, read);
1923
+ if (remaining === 0 && dropped === 0)
1924
+ return res;
1925
+ return { ...res, exitCode: remaining === 0 ? 0 : res.exitCode, output };
1926
+ });
1927
+ };
1814
1928
  var typecheck = async (configPath) => {
1815
1929
  const targets = await getTypecheckTargets(configPath);
1816
1930
  const hasAngular = targets.some((config) => Boolean(config.angularDirectory));
@@ -1850,7 +1964,7 @@ var typecheck = async (configPath) => {
1850
1964
  checks.push(buildSvelteCheck(cacheDir, svelteCheckIncludes(resolve4("."), configuredSvelteDirs, svelteDirs)));
1851
1965
  if (hasAngular && angularDirs.length > 0)
1852
1966
  checks.push(buildAngularCheck(cacheDir, angularDirs));
1853
- const results = dedupeAngularResult(dedupeVueResult(await Promise.all(checks)), cacheDir);
1967
+ const results = dedupeAngularResult(dedupeSvelteResult(dedupeVueResult(await Promise.all(checks))), cacheDir);
1854
1968
  const failed = results.filter((res) => res.exitCode !== 0);
1855
1969
  const detailedAdvice = importAdviceRequested();
1856
1970
  if (failed.length === 0) {
@@ -1863,8 +1977,7 @@ var typecheck = async (configPath) => {
1863
1977
  for (const result of failed) {
1864
1978
  console.error(`
1865
1979
  \x1B[31m[${result.name}]\x1B[0m`);
1866
- const output = result.name === "svelte-check" ? formatSvelteOutput(result.output) : result.output;
1867
- console.error(output);
1980
+ console.error(result.output);
1868
1981
  }
1869
1982
  console.error(`
1870
1983
  \x1B[31m\u2717\x1B[0m Typecheck failed: ${failed.map((res) => res.name).join(", ")}`);
@@ -25,7 +25,7 @@ import {
25
25
  WORKSPACE_TUI_STATUS_WIDTH,
26
26
  WORKSPACE_TUI_TARGET_PADDING_WIDTH,
27
27
  WORKSPACE_TUI_VISIBILITY_WIDTH
28
- } from "./index-t8jmj8w1.js";
28
+ } from "./index-fm9x6sjs.js";
29
29
  import {
30
30
  getWorkspaceServices,
31
31
  loadRawConfig
@@ -45,16 +45,16 @@ import {
45
45
  stripAnsi,
46
46
  truncateText,
47
47
  wrapText
48
- } from "./index-9djrap79.js";
48
+ } from "./index-3pz5sjaz.js";
49
49
  import {
50
50
  DEFAULT_SERVER_ENTRY,
51
51
  isWSLEnvironment,
52
52
  killStaleProcesses
53
- } from "./index-125cfzvn.js";
54
- import"./index-3ewt17wm.js";
53
+ } from "./index-hker5fs4.js";
54
+ import"./index-yhkg5by0.js";
55
55
  import {
56
56
  getDurationString
57
- } from "./index-pr1skxen.js";
57
+ } from "./index-akseq9ps.js";
58
58
 
59
59
  // src/cli/scripts/workspace.ts
60
60
  import {
@@ -739,7 +739,7 @@ var init_workspacePackages = __esm(() => {
739
739
 
740
740
  // src/dev/hot/analyze.ts
741
741
  import { dirname, extname } from "path";
742
- var ANALYZER_VERSION = 2, hashText = (text) => Bun.hash(text).toString(36), scriptKindFor = (tsc, path) => {
742
+ var ANALYZER_VERSION = 3, hashText = (text) => Bun.hash(text).toString(36), scriptKindFor = (tsc, path) => {
743
743
  switch (extname(path)) {
744
744
  case ".tsx":
745
745
  return tsc.ScriptKind.TSX;
@@ -1245,6 +1245,12 @@ var ANALYZER_VERSION = 2, hashText = (text) => Bun.hash(text).toString(36), scri
1245
1245
  return statement.declares.map((name) => `${statement.id}:${name}`);
1246
1246
  return [statement.id];
1247
1247
  };
1248
+ const bindingsOf = (statement) => [...new Set(statement.refs.map((reference) => reference.name))].sort().map((name) => {
1249
+ const imported = imports.get(name);
1250
+ if (!imported)
1251
+ return `${name}=local`;
1252
+ return `${name}=${imported.module ?? imported.specifier ?? ""}#${imported.name}`;
1253
+ }).join("\x00");
1248
1254
  const plan = planned.map((statement) => {
1249
1255
  const deps = new Set;
1250
1256
  for (const reference of statement.refs) {
@@ -1257,7 +1263,7 @@ var ANALYZER_VERSION = 2, hashText = (text) => Bun.hash(text).toString(36), scri
1257
1263
  always: statement.kind === "untouched",
1258
1264
  cell: statement.kind === "let",
1259
1265
  deps: [...deps].sort((left, right) => left - right),
1260
- hash: statement.ownHash,
1266
+ hash: hashText(`${statement.ownHash}\x00${bindingsOf(statement)}`),
1261
1267
  ids: idsOf(statement),
1262
1268
  imports: evalImports(statement).map((use) => [
1263
1269
  use.module,