@absolutejs/absolute 0.20.0-beta.71 → 0.20.0-beta.73

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 (40) hide show
  1. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  2. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  3. package/dist/cli/{add-jy0b6kdf.js → add-kt4qx8sh.js} +5 -5
  4. package/dist/cli/{compile-4mkh7bst.js → compile-bra4g79g.js} +1 -1
  5. package/dist/cli/{dev-rbvkxpj7.js → dev-p7s1ej32.js} +224 -1
  6. package/dist/cli/{doctor-gzhf7nr9.js → doctor-a8afwvf9.js} +1 -1
  7. package/dist/cli/{generate-j3y5qt2d.js → generate-zy3d9bce.js} +4 -4
  8. package/dist/cli/{htmx-nmpbk3wn.js → htmx-63kt9qj1.js} +2 -2
  9. package/dist/cli/{index-jg7m4zpy.js → index-1wgc9e0v.js} +1 -1
  10. package/dist/cli/{index-6sv0rf9w.js → index-6tnpbjc7.js} +4 -0
  11. package/dist/cli/{index-2j5d7vt5.js → index-mxmg15c5.js} +2 -2
  12. package/dist/cli/{index-ybq18wst.js → index-pa3hmzj7.js} +1 -1
  13. package/dist/cli/index-v1k46q3x.js +11 -0
  14. package/dist/cli/{index-g5rwcntp.js → index-wspj2mq3.js} +2 -2
  15. package/dist/cli/index.js +11 -11
  16. package/dist/cli/{mobile-g6xn9270.js → mobile-a0myydjp.js} +1 -1
  17. package/dist/cli/{remove-paz2qmx4.js → remove-pwfv4wsd.js} +4 -4
  18. package/dist/cli/{start-cwy0b5z2.js → start-3nqytx1c.js} +1 -1
  19. package/dist/cli/typecheck-1yj1wfhw.js +1134 -0
  20. package/dist/dev/importCostPreload.js +206 -0
  21. package/dist/dev/importCostReport.js +730 -0
  22. package/dist/dev/serverBootstrap.js +60 -11
  23. package/dist/index.js +19 -1
  24. package/dist/index.js.map +4 -4
  25. package/dist/src/dev/earlyListener.d.ts +32 -0
  26. package/dist/src/dev/importCost/deferability.d.ts +11 -0
  27. package/dist/src/dev/importCost/dominators.d.ts +37 -0
  28. package/dist/src/dev/importCost/format.d.ts +29 -0
  29. package/dist/src/dev/importCost/instrument.d.ts +5 -0
  30. package/dist/src/dev/importCost/moduleGraph.d.ts +13 -0
  31. package/dist/src/dev/importCost/recorder.d.ts +37 -0
  32. package/dist/src/dev/importCost/report.d.ts +3 -0
  33. package/dist/src/dev/importCost/scope.d.ts +10 -0
  34. package/dist/src/dev/importCost/selfTimes.d.ts +17 -0
  35. package/dist/src/dev/importCostPreload.d.ts +1 -0
  36. package/dist/src/dev/importCostReport.d.ts +1 -0
  37. package/dist/types/globals.d.ts +15 -0
  38. package/package.json +7 -7
  39. package/dist/cli/index-fr9x2c4m.js +0 -5
  40. package/dist/cli/typecheck-j0ytazsm.js +0 -302
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-48misY/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-GauEbM/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-48misY/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-GauEbM/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-48misY/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-GauEbM/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  applyAbsoluteConfigEdit
4
- } from "./index-g5rwcntp.js";
4
+ } from "./index-wspj2mq3.js";
5
5
  import {
6
6
  installFrameworkDependencies,
7
7
  installPackages
@@ -12,8 +12,8 @@ import {
12
12
  } from "./index-5xfxd7xa.js";
13
13
  import {
14
14
  generatePage
15
- } from "./index-2j5d7vt5.js";
16
- import"./index-ybq18wst.js";
15
+ } from "./index-mxmg15c5.js";
16
+ import"./index-pa3hmzj7.js";
17
17
  import {
18
18
  configuredFrameworks,
19
19
  frameworks,
@@ -21,8 +21,8 @@ import {
21
21
  isFrameworkKey,
22
22
  readAbsoluteConfigValues,
23
23
  resolveProject
24
- } from "./index-jg7m4zpy.js";
25
- import"./index-fr9x2c4m.js";
24
+ } from "./index-1wgc9e0v.js";
25
+ import"./index-v1k46q3x.js";
26
26
  import {
27
27
  colors
28
28
  } from "./index-8nym68py.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isRecord
4
- } from "./index-fr9x2c4m.js";
4
+ } from "./index-v1k46q3x.js";
5
5
  import {
6
6
  maskLiterals
7
7
  } from "./index-me8nczrw.js";
@@ -786,6 +786,160 @@ var createDevPrescan = (config, projectRoot = process.cwd()) => {
786
786
  };
787
787
  };
788
788
 
789
+ // src/dev/importCost/recorder.ts
790
+ var IMPORT_COST_ENV = "ABSOLUTE_DEV_IMPORT_COST";
791
+ var importCostEnabled = () => process.env[IMPORT_COST_ENV] === "1";
792
+
793
+ // src/dev/bootLifecycle.ts
794
+ var getBootPhase = () => globalThis.__absoluteBootPhase;
795
+
796
+ // src/dev/earlyListener.ts
797
+ var HTTP_SERVICE_UNAVAILABLE = 503;
798
+ var RETRY_AFTER_SECONDS = 2;
799
+ var BIND_RETRY_INTERVAL_MS = 250;
800
+ var BIND_RETRY_LIMIT = 40;
801
+ var POLL_INTERVAL_MS = RETRY_AFTER_SECONDS * MILLISECONDS_IN_A_SECOND;
802
+ var NOSCRIPT_REFRESH_SECONDS = 10;
803
+ var BOOT_STATUS_HEADER = "X-Absolute-Boot";
804
+ var PARENT_HANDOFF_MARKER = "absolute:listening";
805
+ var PARENT_LISTENER_ENV = "ABSOLUTE_PARENT_LISTENER";
806
+ var bindingPlaceholder = false;
807
+ var escapeHtml = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;");
808
+ var bootStatusSnapshot = (startedAt) => {
809
+ const elapsedMs = Math.max(0, Date.now() - startedAt);
810
+ return {
811
+ elapsedMs,
812
+ elapsedSeconds: Math.floor(elapsedMs / MILLISECONDS_IN_A_SECOND),
813
+ phase: getBootPhase() ?? "starting",
814
+ status: "building"
815
+ };
816
+ };
817
+ var buildingPage = (snapshot) => `<!doctype html>
818
+ <html lang="en">
819
+ <head>
820
+ <meta charset="utf-8">
821
+ <meta name="viewport" content="width=device-width, initial-scale=1">
822
+ <meta http-equiv="refresh" content="${NOSCRIPT_REFRESH_SECONDS}">
823
+ <title>Building\u2026</title>
824
+ <style>
825
+ :root{color-scheme:light dark}
826
+ body{margin:0;min-height:100vh;display:grid;place-items:center;font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;background:#0f1115;color:#e6e8ee}
827
+ main{text-align:center;padding:2rem}
828
+ .spin{width:36px;height:36px;margin:0 auto 1rem;border:3px solid rgba(255,255,255,.15);border-top-color:#8ab4ff;border-radius:50%;animation:s 1s linear infinite}
829
+ @keyframes s{to{transform:rotate(360deg)}}
830
+ h1{font-size:1.15rem;font-weight:600;margin:0 0 .25rem}
831
+ p{margin:0;opacity:.6;font-size:.85rem}
832
+ code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
833
+ </style>
834
+ </head>
835
+ <body>
836
+ <main>
837
+ <div class="spin" aria-hidden="true"></div>
838
+ <h1>Building\u2026 <span id="t">${snapshot.elapsedSeconds}</span>s</h1>
839
+ <p>AbsoluteJS dev server \xB7 <code id="p">${escapeHtml(snapshot.phase)}</code></p>
840
+ </main>
841
+ <script>
842
+ (function(){
843
+ var started=Date.now()-${snapshot.elapsedMs};
844
+ var t=document.getElementById('t');
845
+ setInterval(function(){t.textContent=String(Math.floor((Date.now()-started)/1000));},1000);
846
+ function poll(){
847
+ fetch(location.href,{cache:'no-store',headers:{accept:'application/json'}}).then(function(r){
848
+ if(r.headers.get('${BOOT_STATUS_HEADER.toLowerCase()}')!=='building'){location.reload();return;}
849
+ return r.json().then(function(j){if(j&&j.phase){document.getElementById('p').textContent=j.phase;}});
850
+ }).catch(function(){}).then(function(){setTimeout(poll,${POLL_INTERVAL_MS});});
851
+ }
852
+ setTimeout(poll,${POLL_INTERVAL_MS});
853
+ })();
854
+ </script>
855
+ </body>
856
+ </html>
857
+ `;
858
+ var buildingResponse = (request, startedAt) => {
859
+ const snapshot = bootStatusSnapshot(startedAt);
860
+ const headers = {
861
+ "Cache-Control": "no-store",
862
+ "Retry-After": String(RETRY_AFTER_SECONDS),
863
+ "X-Absolute-Boot": "building"
864
+ };
865
+ const isUpgrade = request.headers.get("upgrade")?.toLowerCase() === "websocket";
866
+ const accept = request.headers.get("accept") ?? "";
867
+ if (!isUpgrade && accept.includes("text/html")) {
868
+ headers["Content-Type"] = "text/html; charset=utf-8";
869
+ return new Response(buildingPage(snapshot), {
870
+ headers,
871
+ status: HTTP_SERVICE_UNAVAILABLE
872
+ });
873
+ }
874
+ if (!isUpgrade && accept.includes("application/json")) {
875
+ headers["Content-Type"] = "application/json; charset=utf-8";
876
+ return new Response(JSON.stringify(snapshot), {
877
+ headers,
878
+ status: HTTP_SERVICE_UNAVAILABLE
879
+ });
880
+ }
881
+ headers["Content-Type"] = "text/plain; charset=utf-8";
882
+ return new Response(`AbsoluteJS dev server is building (${snapshot.elapsedSeconds}s, ${snapshot.phase}). Retry shortly.
883
+ `, { headers, status: HTTP_SERVICE_UNAVAILABLE });
884
+ };
885
+ var parentListenerSupported = () => process.platform !== "win32";
886
+ var startEarlyListener = (options) => {
887
+ const startedAt = Date.now();
888
+ let server = null;
889
+ let released = false;
890
+ let attempts = 0;
891
+ let retryTimer;
892
+ const tryBind = () => {
893
+ if (released)
894
+ return;
895
+ attempts += 1;
896
+ bindingPlaceholder = true;
897
+ try {
898
+ server = Bun.serve({
899
+ hostname: options.host,
900
+ port: options.port,
901
+ fetch: (request) => buildingResponse(request, startedAt),
902
+ ...options.reusePort ? { reusePort: true } : {},
903
+ ...options.tls ? { tls: options.tls } : {}
904
+ });
905
+ } catch {
906
+ if (attempts >= BIND_RETRY_LIMIT)
907
+ return;
908
+ retryTimer = setTimeout(tryBind, BIND_RETRY_INTERVAL_MS);
909
+ retryTimer.unref();
910
+ } finally {
911
+ bindingPlaceholder = false;
912
+ }
913
+ };
914
+ const release = () => {
915
+ if (released)
916
+ return;
917
+ released = true;
918
+ if (retryTimer)
919
+ clearTimeout(retryTimer);
920
+ const active = server;
921
+ server = null;
922
+ if (!active)
923
+ return;
924
+ try {
925
+ active.stop(true);
926
+ } catch {}
927
+ };
928
+ tryBind();
929
+ const listener = {
930
+ release,
931
+ startedAt,
932
+ get released() {
933
+ return released;
934
+ },
935
+ get server() {
936
+ return server;
937
+ }
938
+ };
939
+ globalThis.__absoluteEarlyListener = listener;
940
+ return listener;
941
+ };
942
+
789
943
  // src/cli/interactive.ts
790
944
  import { openSync } from "fs";
791
945
  import { ReadStream } from "tty";
@@ -1198,6 +1352,8 @@ var RESTART_PARK_POLL_MS = 20;
1198
1352
  var NODE_API_IMPORT_ERROR = "To load Node-API modules, use require() or process.dlopen instead of import.";
1199
1353
  var sourceServerBootstrap = resolvePath(import.meta.dir, "../../dev/serverBootstrap.ts");
1200
1354
  var serverBootstrap = existsSync4(sourceServerBootstrap) ? sourceServerBootstrap : resolvePath(import.meta.dir, "../dev/serverBootstrap.js");
1355
+ var sourceImportCostPreload = resolvePath(import.meta.dir, "../../dev/importCostPreload.ts");
1356
+ var importCostPreload = existsSync4(sourceImportCostPreload) ? sourceImportCostPreload : resolvePath(import.meta.dir, "../dev/importCostPreload.js");
1201
1357
  var formatServerBootDiagnostic = (output, serverEntry) => {
1202
1358
  if (!output.includes(NODE_API_IMPORT_ERROR))
1203
1359
  return null;
@@ -1565,6 +1721,54 @@ var dev = async (serverEntry, configPath, options = {}) => {
1565
1721
  }
1566
1722
  markBoot("dev port resolved");
1567
1723
  updateLockMetadata(buildDirectory, { port });
1724
+ const parentListenerAllowed = env.ABSOLUTE_EARLY_LISTEN !== "0" && parentListenerSupported();
1725
+ let parentListener = null;
1726
+ let parentListenerPort = null;
1727
+ let parentListenerTls;
1728
+ const releaseParentListener = () => {
1729
+ const listener = parentListener;
1730
+ parentListener = null;
1731
+ parentListenerPort = null;
1732
+ if (!listener)
1733
+ return;
1734
+ listener.release();
1735
+ if (globalThis.__absoluteEarlyListener === listener) {
1736
+ globalThis.__absoluteEarlyListener = undefined;
1737
+ }
1738
+ };
1739
+ const loadParentListenerTls = async () => {
1740
+ if (!httpsEnabled)
1741
+ return null;
1742
+ try {
1743
+ const { loadDevCert } = await import("./devCert-avr89zf3.js");
1744
+ return loadDevCert();
1745
+ } catch {
1746
+ return null;
1747
+ }
1748
+ };
1749
+ const ensureParentListener = async () => {
1750
+ if (!parentListenerAllowed)
1751
+ return;
1752
+ if (parentListener && parentListenerPort === port)
1753
+ return;
1754
+ releaseParentListener();
1755
+ parentListenerTls ??= await loadParentListenerTls();
1756
+ const listener = startEarlyListener({
1757
+ host: resolvedDev.host,
1758
+ port,
1759
+ reusePort: true,
1760
+ tls: parentListenerTls
1761
+ });
1762
+ if (!listener.server) {
1763
+ listener.release();
1764
+ globalThis.__absoluteEarlyListener = undefined;
1765
+ return;
1766
+ }
1767
+ parentListener = listener;
1768
+ parentListenerPort = port;
1769
+ markBoot("parent listener bound");
1770
+ };
1771
+ await ensureParentListener();
1568
1772
  const instancePid = process.pid;
1569
1773
  const instanceLogFile = instanceLogPath(instancePid);
1570
1774
  const relaunchCommand = [
@@ -2080,6 +2284,7 @@ var dev = async (serverEntry, configPath, options = {}) => {
2080
2284
  if (!chunk.includes("Local:"))
2081
2285
  return;
2082
2286
  serverReady = true;
2287
+ releaseParentListener();
2083
2288
  startTunnelIfConfigured();
2084
2289
  startAndroidDev();
2085
2290
  startIosDev();
@@ -2200,8 +2405,12 @@ var dev = async (serverEntry, configPath, options = {}) => {
2200
2405
  } catch {}
2201
2406
  };
2202
2407
  let prescan = prescanConfig ? createDevPrescan(prescanConfig) : null;
2408
+ let spawnGeneration = 0;
2203
2409
  const spawnServer = async () => {
2410
+ spawnGeneration += 1;
2411
+ const generation = spawnGeneration;
2204
2412
  await refreshDevConfigForSpawn();
2413
+ await ensureParentListener();
2205
2414
  markBoot("dev child spawn requested");
2206
2415
  const prescanForSpawn = prescan;
2207
2416
  prescan = null;
@@ -2209,6 +2418,7 @@ var dev = async (serverEntry, configPath, options = {}) => {
2209
2418
  "--hot",
2210
2419
  "--no-clear-screen",
2211
2420
  ...heapSnapshotEnabled ? ["--preload", heapPreloadPath] : [],
2421
+ ...importCostEnabled() ? ["--preload", importCostPreload] : [],
2212
2422
  serverBootstrap
2213
2423
  ], {
2214
2424
  cwd: process.cwd(),
@@ -2220,6 +2430,7 @@ var dev = async (serverEntry, configPath, options = {}) => {
2220
2430
  ABSOLUTE_INSTANCE_MANAGED: "1",
2221
2431
  ABSOLUTE_PORT: String(port),
2222
2432
  ABSOLUTE_SERVER_ENTRY: resolvePath(serverEntry),
2433
+ ...parentListener ? { [PARENT_LISTENER_ENV]: "1" } : {},
2223
2434
  ...bootTimelineChildEnv(),
2224
2435
  ...prescanForSpawn ? { ABSOLUTE_DEV_PRESCAN: prescanForSpawn.path } : {},
2225
2436
  ...options.eager ? { ABSOLUTE_DEV_EAGER: "1" } : {},
@@ -2230,9 +2441,20 @@ var dev = async (serverEntry, configPath, options = {}) => {
2230
2441
  ...configPath ? { ABSOLUTE_CONFIG: configPath } : {},
2231
2442
  ...httpsEnabled ? { ABSOLUTE_HTTPS: "true" } : {}
2232
2443
  },
2233
- stdio: ["ignore", "pipe", "pipe"]
2444
+ stdio: ["ignore", "pipe", "pipe", "pipe"]
2234
2445
  });
2235
2446
  prescanForSpawn?.start();
2447
+ const [, , , handoffPipe] = proc.stdio;
2448
+ if (handoffPipe && "on" in handoffPipe) {
2449
+ handoffPipe.on("data", (chunk) => {
2450
+ if (generation !== spawnGeneration)
2451
+ return;
2452
+ if (!chunk.toString().includes(PARENT_HANDOFF_MARKER))
2453
+ return;
2454
+ releaseParentListener();
2455
+ });
2456
+ handoffPipe.on("error", () => {});
2457
+ }
2236
2458
  let printedBootDiagnostic = false;
2237
2459
  const forward = (source, dest, sourceName) => {
2238
2460
  if (!source)
@@ -2443,6 +2665,7 @@ var dev = async (serverEntry, configPath, options = {}) => {
2443
2665
  });
2444
2666
  if (interactive)
2445
2667
  interactive.dispose();
2668
+ releaseParentListener();
2446
2669
  tunnelClient?.close();
2447
2670
  androidDevAbort.abort();
2448
2671
  androidNativeWatcher?.close();
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-1cypb2zn.js";
5
5
  import {
6
6
  isRecord
7
- } from "./index-fr9x2c4m.js";
7
+ } from "./index-v1k46q3x.js";
8
8
  import {
9
9
  colors
10
10
  } from "./index-8nym68py.js";
@@ -7,17 +7,17 @@ import {
7
7
  toKebabCase,
8
8
  toPascalCase,
9
9
  toTitleCase
10
- } from "./index-2j5d7vt5.js";
10
+ } from "./index-mxmg15c5.js";
11
11
  import {
12
12
  wirePluginUse
13
- } from "./index-ybq18wst.js";
13
+ } from "./index-pa3hmzj7.js";
14
14
  import {
15
15
  frameworks,
16
16
  resolveProject,
17
17
  selectFramework,
18
18
  toModuleSpecifier
19
- } from "./index-jg7m4zpy.js";
20
- import"./index-fr9x2c4m.js";
19
+ } from "./index-1wgc9e0v.js";
20
+ import"./index-v1k46q3x.js";
21
21
  import {
22
22
  colors
23
23
  } from "./index-8nym68py.js";
@@ -8,8 +8,8 @@ import {
8
8
  } from "./index-5xfxd7xa.js";
9
9
  import {
10
10
  resolveProject
11
- } from "./index-jg7m4zpy.js";
12
- import"./index-fr9x2c4m.js";
11
+ } from "./index-1wgc9e0v.js";
12
+ import"./index-v1k46q3x.js";
13
13
  import {
14
14
  colors
15
15
  } from "./index-8nym68py.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isRecord
4
- } from "./index-fr9x2c4m.js";
4
+ } from "./index-v1k46q3x.js";
5
5
  import {
6
6
  loadConfig
7
7
  } from "./index-06cmrcdq.js";
@@ -339,6 +339,10 @@ var start = async (serverEntry, outdir, configPath, options = {}) => {
339
339
  contents: "export const startServerEntryWatcher = () => {}; export const isAtomicWriteTemp = () => false;",
340
340
  loader: "js"
341
341
  }));
342
+ bld.onLoad({ filter: /dev\/rebuildTrigger\.ts$/ }, () => ({
343
+ contents: "export const triggerRebuild = () => {}; export const queueFileChange = () => {}; export const drainPendingQueue = () => {};",
344
+ loader: "js"
345
+ }));
342
346
  bld.onLoad({ filter: /cli\/(telemetryEvent|scripts\/telemetry)\.ts$/ }, () => ({
343
347
  contents: "export const sendTelemetryEvent = () => {}; export const getTelemetryConfig = () => null; export const telemetry = () => {};",
344
348
  loader: "js"
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  findRoutingFile,
4
4
  wireRoute
5
- } from "./index-ybq18wst.js";
5
+ } from "./index-pa3hmzj7.js";
6
6
  import {
7
7
  frameworks,
8
8
  sharedDirFor,
9
9
  toModuleSpecifier
10
- } from "./index-jg7m4zpy.js";
10
+ } from "./index-1wgc9e0v.js";
11
11
 
12
12
  // src/cli/generate/naming.ts
13
13
  var tokenize = (raw) => raw.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[^a-zA-Z0-9]+/).filter((token) => token.length > 0).map((token) => token.toLowerCase());
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  toModuleSpecifier
4
- } from "./index-jg7m4zpy.js";
4
+ } from "./index-1wgc9e0v.js";
5
5
 
6
6
  // src/cli/generate/routeWiring.ts
7
7
  import ts from "typescript";
@@ -0,0 +1,11 @@
1
+ // @bun
2
+ // src/cli/config/guards.ts
3
+ var getString = (value, key) => {
4
+ if (!isRecord(value))
5
+ return null;
6
+ const found = value[key];
7
+ return typeof found === "string" ? found : null;
8
+ };
9
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
10
+
11
+ export { getString, isRecord };
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  findConfigObject
4
- } from "./index-jg7m4zpy.js";
4
+ } from "./index-1wgc9e0v.js";
5
5
  import {
6
6
  isRecord
7
- } from "./index-fr9x2c4m.js";
7
+ } from "./index-v1k46q3x.js";
8
8
 
9
9
  // src/cli/config/absolute/editAbsoluteConfig.ts
10
10
  import ts from "typescript";
package/dist/cli/index.js CHANGED
@@ -58,7 +58,7 @@ if (command === "dev") {
58
58
  }
59
59
  const positionalArgs = stripNamedArgs("--config", "--android-device", "--ios-device").filter((arg) => arg !== "--no-mobile" && arg !== "--eager");
60
60
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
61
- const { dev } = await import("./dev-rbvkxpj7.js");
61
+ const { dev } = await import("./dev-p7s1ej32.js");
62
62
  await dev(serverEntry, configPath, {
63
63
  androidDevice,
64
64
  eager: args.includes("--eager"),
@@ -71,7 +71,7 @@ if (command === "dev") {
71
71
  const configPath = parseNamedArg("--config");
72
72
  const positionalArgs = stripNamedArgs("--outdir", "--config").filter((arg) => arg !== "--prebuilt");
73
73
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
74
- const { start } = await import("./start-cwy0b5z2.js");
74
+ const { start } = await import("./start-3nqytx1c.js");
75
75
  await start(serverEntry, outdir, configPath, {
76
76
  prebuilt: args.includes("--prebuilt")
77
77
  });
@@ -81,7 +81,7 @@ if (command === "dev") {
81
81
  const configPath = parseNamedArg("--config");
82
82
  const positionalArgs = stripNamedArgs("--outdir", "--config");
83
83
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
84
- const { start } = await import("./start-cwy0b5z2.js");
84
+ const { start } = await import("./start-3nqytx1c.js");
85
85
  await start(serverEntry, outdir, configPath, { prepareOnly: true });
86
86
  } else if (command === "build") {
87
87
  sendTelemetryEvent("cli:command", { command });
@@ -130,11 +130,11 @@ if (command === "dev") {
130
130
  await runMem(args);
131
131
  } else if (command === "generate" || command === "g") {
132
132
  sendTelemetryEvent("cli:command", { command: "generate" });
133
- const { runGenerate } = await import("./generate-j3y5qt2d.js");
133
+ const { runGenerate } = await import("./generate-zy3d9bce.js");
134
134
  await runGenerate(args);
135
135
  } else if (command === "add") {
136
136
  sendTelemetryEvent("cli:command", { command: "add" });
137
- const { runAdd } = await import("./add-jy0b6kdf.js");
137
+ const { runAdd } = await import("./add-kt4qx8sh.js");
138
138
  await runAdd(args);
139
139
  } else if (command === "analyze") {
140
140
  sendTelemetryEvent("cli:command", { command: "analyze" });
@@ -146,11 +146,11 @@ if (command === "dev") {
146
146
  await runApi(args);
147
147
  } else if (command === "remove") {
148
148
  sendTelemetryEvent("cli:command", { command: "remove" });
149
- const { runRemove } = await import("./remove-paz2qmx4.js");
149
+ const { runRemove } = await import("./remove-pwfv4wsd.js");
150
150
  await runRemove(args);
151
151
  } else if (command === "htmx") {
152
152
  sendTelemetryEvent("cli:command", { command: "htmx" });
153
- const { runHtmx } = await import("./htmx-nmpbk3wn.js");
153
+ const { runHtmx } = await import("./htmx-63kt9qj1.js");
154
154
  await runHtmx(args);
155
155
  } else if (command === "env") {
156
156
  sendTelemetryEvent("cli:command", { command: "env" });
@@ -168,7 +168,7 @@ if (command === "dev") {
168
168
  await runLogs(args);
169
169
  } else if (command === "doctor") {
170
170
  sendTelemetryEvent("cli:command", { command: "doctor" });
171
- const { runDoctor } = await import("./doctor-gzhf7nr9.js");
171
+ const { runDoctor } = await import("./doctor-a8afwvf9.js");
172
172
  await runDoctor(args);
173
173
  } else if (command === "routes") {
174
174
  sendTelemetryEvent("cli:command", { command: "routes" });
@@ -197,13 +197,13 @@ if (command === "dev") {
197
197
  const configPath = parseNamedArg("--config");
198
198
  const positionalArgs = stripNamedArgs("--outdir", "--outfile", "--config");
199
199
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
200
- const { compile } = await import("./compile-4mkh7bst.js");
200
+ const { compile } = await import("./compile-bra4g79g.js");
201
201
  await compile(serverEntry, outdir, outfile, configPath);
202
202
  } else if (command === "mobile") {
203
203
  sendTelemetryEvent("cli:command", {
204
204
  command: `mobile:${workspaceCommand ?? "unknown"}`
205
205
  });
206
- const { runMobile } = await import("./mobile-g6xn9270.js");
206
+ const { runMobile } = await import("./mobile-a0myydjp.js");
207
207
  try {
208
208
  await runMobile(args);
209
209
  } catch (error) {
@@ -213,7 +213,7 @@ if (command === "dev") {
213
213
  } else if (command === "typecheck") {
214
214
  sendTelemetryEvent("cli:command", { command });
215
215
  const configPath = parseNamedArg("--config");
216
- const { typecheck } = await import("./typecheck-j0ytazsm.js");
216
+ const { typecheck } = await import("./typecheck-1yj1wfhw.js");
217
217
  await typecheck(configPath);
218
218
  } else if (command === "mkcert") {
219
219
  sendTelemetryEvent("cli:command", { command });
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-zh6hhrwy.js";
5
5
  import {
6
6
  start
7
- } from "./index-6sv0rf9w.js";
7
+ } from "./index-6tnpbjc7.js";
8
8
  import {
9
9
  ABSOLUTE_MOBILE_CLIENT_MANIFEST_FORMAT,
10
10
  ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
@@ -1,19 +1,19 @@
1
1
  // @bun
2
2
  import {
3
3
  applyAbsoluteConfigEdit
4
- } from "./index-g5rwcntp.js";
4
+ } from "./index-wspj2mq3.js";
5
5
  import {
6
6
  frameworkDependencyNames
7
7
  } from "./index-zh6hhrwy.js";
8
8
  import {
9
9
  findRoutingFile
10
- } from "./index-ybq18wst.js";
10
+ } from "./index-pa3hmzj7.js";
11
11
  import {
12
12
  frameworks,
13
13
  isFrameworkKey,
14
14
  resolveProject
15
- } from "./index-jg7m4zpy.js";
16
- import"./index-fr9x2c4m.js";
15
+ } from "./index-1wgc9e0v.js";
16
+ import"./index-v1k46q3x.js";
17
17
  import {
18
18
  colors
19
19
  } from "./index-8nym68py.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  start
4
- } from "./index-6sv0rf9w.js";
4
+ } from "./index-6tnpbjc7.js";
5
5
  import"./index-sghxp2cp.js";
6
6
  import"./index-bzs19w3r.js";
7
7
  import"./index-s2tazax7.js";