@absolutejs/absolute 0.20.0-beta.170 → 0.20.0-beta.172

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 (143) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +33 -4
  3. package/changelog.json +128 -0
  4. package/dist/angular/browser.js +2 -2
  5. package/dist/angular/browser.js.map +3 -3
  6. package/dist/angular/components/constants.js +1 -0
  7. package/dist/angular/components/core/streamingSlotRegistrar.js +2 -2
  8. package/dist/angular/components/core/streamingSlotRegistry.js +3 -3
  9. package/dist/angular/index.js +184 -29
  10. package/dist/angular/index.js.map +15 -14
  11. package/dist/angular/server.js +184 -29
  12. package/dist/angular/server.js.map +15 -14
  13. package/dist/build.js +1241 -853
  14. package/dist/build.js.map +32 -30
  15. package/dist/cli/{add-6a7pjkn9.js → add-ae6mg79m.js} +10 -10
  16. package/dist/cli/{analyze-606fshwa.js → analyze-e57zz9x8.js} +3 -3
  17. package/dist/cli/{androidEmulatorController-68jjdxmx.js → androidEmulatorController-vqc5m2rp.js} +6 -6
  18. package/dist/cli/{androidNativeWatcher-x032x9yr.js → androidNativeWatcher-s03aczxv.js} +6 -6
  19. package/dist/cli/{api-mshjr4ah.js → api-8ppxw487.js} +8 -8
  20. package/dist/cli/{build-g81xqbb9.js → build-fz7qbdn3.js} +3 -3
  21. package/dist/cli/{buildDepVendor-29d8v9cx.js → buildDepVendor-qvsh6dsj.js} +7 -3
  22. package/dist/cli/{compile-9y1w9zpj.js → compile-ndc36zna.js} +10 -7
  23. package/dist/cli/config/server.js +36 -6
  24. package/dist/cli/{db-5b4s1kvx.js → db-qbzjw3en.js} +2 -2
  25. package/dist/cli/{dev-hyeb89hp.js → dev-x49583aj.js} +43 -15
  26. package/dist/cli/{doctor-h55y9hj1.js → doctor-repprx92.js} +42 -12
  27. package/dist/cli/{emulatorDoctor-p3yt7140.js → emulatorDoctor-s1z5tkp7.js} +5 -5
  28. package/dist/cli/{emulatorInstaller-4pm2kx9w.js → emulatorInstaller-pgkdswvq.js} +6 -6
  29. package/dist/cli/{env-snb0597q.js → env-5nz1qm8e.js} +3 -3
  30. package/dist/cli/{expoDevController-0vj8dvkh.js → expoDevController-018anvbm.js} +6 -6
  31. package/dist/cli/{generate-20x1pkf7.js → generate-brvjesd6.js} +8 -8
  32. package/dist/cli/{heapDiff-wqj8vrq8.js → heapDiff-kncvdtn8.js} +3 -3
  33. package/dist/cli/htmx/htmx.min.js +1 -1
  34. package/dist/cli/{htmx-6mz2h7k1.js → htmx-5twhjz7p.js} +7 -7
  35. package/dist/cli/{index-w09fzs9f.js → index-0z5fgb80.js} +1 -1
  36. package/dist/cli/{index-exfkpjja.js → index-125cfzvn.js} +2 -2
  37. package/dist/cli/{index-32ge2w1f.js → index-25e7k849.js} +16 -8
  38. package/dist/cli/{index-ys2rzqhg.js → index-2shf4aya.js} +1 -1
  39. package/dist/cli/{index-74m7kh8c.js → index-3ewt17wm.js} +1 -1
  40. package/dist/cli/{index-zd3cna19.js → index-3sfcmb49.js} +1 -1
  41. package/dist/cli/{index-14fbvz34.js → index-50ag35xg.js} +2 -2
  42. package/dist/cli/{index-h5qx5jpk.js → index-7854xf0m.js} +1 -1
  43. package/dist/cli/{index-3y57kd7x.js → index-8khbn8qr.js} +3 -3
  44. package/dist/cli/{index-xw1byvzp.js → index-9djrap79.js} +1 -1
  45. package/dist/cli/{index-ppphkyps.js → index-a6xx0p9e.js} +1 -1
  46. package/dist/cli/{index-g4ehq6ev.js → index-aemhvvwb.js} +1 -1
  47. package/dist/cli/{index-z6f43b20.js → index-b1wht4q5.js} +1 -1
  48. package/dist/cli/{index-s3xvccq3.js → index-btp4fyf1.js} +2 -2
  49. package/dist/cli/{index-066qhc6n.js → index-cgmp9d02.js} +1 -1
  50. package/dist/cli/{index-3wz3mktm.js → index-gyjxrnnz.js} +1 -1
  51. package/dist/cli/index-jwfambwe.js +13 -0
  52. package/dist/cli/{index-3wm8p7rg.js → index-n6faa3m3.js} +1 -1
  53. package/dist/cli/{index-kye08pjx.js → index-pr1skxen.js} +1 -1
  54. package/dist/cli/{index-t8cf0zj9.js → index-prza6tkp.js} +3 -3
  55. package/dist/cli/{index-qbrzvmh9.js → index-q3snnhyd.js} +1 -1
  56. package/dist/cli/{index-3vmc30gf.js → index-rz56x932.js} +1 -1
  57. package/dist/cli/{index-9sksd8c8.js → index-vh68jb0e.js} +2 -2
  58. package/dist/cli/index.js +32 -32
  59. package/dist/cli/{info-mn125212.js → info-k124sh7g.js} +4 -4
  60. package/dist/cli/{inspect-c7s117j0.js → inspect-n6pcfvfw.js} +5 -5
  61. package/dist/cli/{iosNativeWatcher-0nm6qad5.js → iosNativeWatcher-wdq2fvj1.js} +7 -7
  62. package/dist/cli/{iosSimulatorController-hza2c3rv.js → iosSimulatorController-n97dpa8p.js} +7 -7
  63. package/dist/cli/{islands-dc54e5y1.js → islands-p4vgx7a2.js} +3 -3
  64. package/dist/cli/{logs-ej1add2b.js → logs-shg23fbt.js} +3 -3
  65. package/dist/cli/{ls-b6zz24nt.js → ls-0hfx323m.js} +3 -3
  66. package/dist/cli/{mem-5q7n3ymb.js → mem-16sy1707.js} +5 -5
  67. package/dist/cli/{migrate-6nm4kdf6.js → migrate-k91k050s.js} +2 -2
  68. package/dist/cli/{mobile-ajnnvqtv.js → mobile-nqdkk3gd.js} +13 -13
  69. package/dist/cli/prerender-010z771p.js +10 -0
  70. package/dist/cli/{prettier-phdtvqef.js → prettier-dh5fh786.js} +1 -1
  71. package/dist/cli/{ps-ezmzyscn.js → ps-pk7ncjac.js} +6 -6
  72. package/dist/cli/{psTui-3x3ykjve.js → psTui-50wf0b72.js} +7 -7
  73. package/dist/cli/{remoteMacProtocol-g09myqt5.js → remoteMacProtocol-g10s408w.js} +7 -7
  74. package/dist/cli/{remove-t8x1mrxg.js → remove-abaf0w6k.js} +8 -8
  75. package/dist/cli/{routes-3xj256gx.js → routes-mc3ymp8t.js} +3 -3
  76. package/dist/cli/{start-d6p831ny.js → start-t3cq57wn.js} +5 -5
  77. package/dist/cli/{typecheck-stbt0qt5.js → typecheck-fag7djt5.js} +38 -10
  78. package/dist/cli/{workspace-61hh6jq1.js → workspace-7sbyyc59.js} +5 -5
  79. package/dist/client/chunks/islands-s2ta5ajb.js.map +1 -1
  80. package/dist/client/navigation.js +2 -1
  81. package/dist/client/navigation.js.map +3 -3
  82. package/dist/dev/client/domTracker.ts +52 -19
  83. package/dist/dev/client/frameworkDetect.ts +11 -0
  84. package/dist/dev/client/handlers/html.ts +6 -1
  85. package/dist/dev/client/handlers/htmx.ts +6 -1
  86. package/dist/dev/client/hmrClient.ts +10 -0
  87. package/dist/dev/serverBootstrap.js +112 -6
  88. package/dist/index.js +1147 -757
  89. package/dist/index.js.map +32 -30
  90. package/dist/islands/index.js +16 -5
  91. package/dist/islands/index.js.map +6 -6
  92. package/dist/mobile/index.js +2 -2
  93. package/dist/mobile/index.js.map +3 -3
  94. package/dist/react/components/index.js +2 -2
  95. package/dist/react/components/index.js.map +3 -3
  96. package/dist/react/index.js +85 -18
  97. package/dist/react/index.js.map +11 -11
  98. package/dist/react/server.js +71 -15
  99. package/dist/react/server.js.map +8 -8
  100. package/dist/src/angular/baseHref.d.ts +2 -0
  101. package/dist/src/angular/components/constants.d.ts +1 -0
  102. package/dist/src/angular/ssrRender.d.ts +1 -1
  103. package/dist/src/build/compileAngular.d.ts +15 -0
  104. package/dist/src/build/resolveBuildMode.d.ts +6 -0
  105. package/dist/src/build/scanAngularHandlerCalls.d.ts +3 -1
  106. package/dist/src/build/verifyAngularCoreUniqueness.d.ts +3 -1
  107. package/dist/src/cli/htmx/install.d.ts +1 -1
  108. package/dist/src/cli/scripts/bunCheck.d.ts +3 -1
  109. package/dist/src/cli/typeGraphCoherence.d.ts +9 -2
  110. package/dist/src/constants.d.ts +1 -0
  111. package/dist/src/core/appErrorHooks.d.ts +8 -0
  112. package/dist/src/core/islandPageContext.d.ts +5 -1
  113. package/dist/src/core/requestContext.d.ts +5 -0
  114. package/dist/src/core/serverOnlyStaticFiles.d.ts +7 -0
  115. package/dist/src/dev/editorTempFiles.d.ts +3 -0
  116. package/dist/src/dev/hot/analyze.d.ts +1 -1
  117. package/dist/src/dev/hot/runtime.d.ts +20 -0
  118. package/dist/src/dev/importCost/instrument.d.ts +1 -1
  119. package/dist/src/dev/rebuildTrigger.d.ts +1 -0
  120. package/dist/src/utils/cleanStaleOutputs.d.ts +4 -1
  121. package/dist/src/utils/logger.d.ts +3 -2
  122. package/dist/src/utils/resolveConvention.d.ts +1 -0
  123. package/dist/src/utils/ssrErrorPage.d.ts +3 -0
  124. package/dist/svelte/index.js +85 -18
  125. package/dist/svelte/index.js.map +11 -11
  126. package/dist/svelte/router/Route.svelte.d.ts +1 -2
  127. package/dist/svelte/router/Router.svelte +2 -4
  128. package/dist/svelte/server.js +73 -16
  129. package/dist/svelte/server.js.map +9 -9
  130. package/dist/types/globals.d.ts +3 -0
  131. package/dist/types/svelteRouter.ts +3 -12
  132. package/dist/vue/components/Image.js +2 -2
  133. package/dist/vue/components/Image.js.map +3 -3
  134. package/dist/vue/components/index.js +2 -2
  135. package/dist/vue/components/index.js.map +3 -3
  136. package/dist/vue/index.js +158 -91
  137. package/dist/vue/index.js.map +12 -12
  138. package/dist/vue/server.js +144 -88
  139. package/dist/vue/server.js.map +9 -9
  140. package/package.json +2 -1
  141. package/dist/cli/prerender-fqpp0m1j.js +0 -10
  142. /package/dist/cli/{index-vtp20gwf.js → index-2bxfhs32.js} +0 -0
  143. /package/dist/cli/{index-fgz435qn.js → index-t8jmj8w1.js} +0 -0
@@ -36,8 +36,7 @@ type LazyRouteProps<
36
36
  };
37
37
 
38
38
  type RouteProps<Path extends string, Props extends Record<string, unknown>> =
39
- | EagerRouteProps<Path>
40
- | LazyRouteProps<Path, Props>;
39
+ EagerRouteProps<Path> | LazyRouteProps<Path, Props>;
41
40
 
42
41
  class Route<
43
42
  Path extends string = string,
@@ -8,11 +8,9 @@
8
8
  registrationOrder: number;
9
9
  // read on demand so a changed prop is always seen
10
10
  getGuard: () =>
11
- | import('../../types/svelteRouter').RouteGuard
12
- | undefined;
11
+ import('../../types/svelteRouter').RouteGuard | undefined;
13
12
  getLoader: () =>
14
- | import('../../types/svelteRouter').LazyRouteLoader
15
- | undefined;
13
+ import('../../types/svelteRouter').LazyRouteLoader | undefined;
16
14
  };
17
15
 
18
16
  type ActiveMatch = {
@@ -90,7 +90,7 @@ var init_cspNonceRef = __esm(() => {
90
90
  });
91
91
 
92
92
  // src/utils/ssrErrorPage.ts
93
- var errorPageHtml = ({
93
+ var GENERIC_ERROR_MESSAGE = "Something went wrong while rendering this page.", errorPageHtml = ({
94
94
  framework,
95
95
  hint,
96
96
  kind,
@@ -153,11 +153,11 @@ ${script}
153
153
 
154
154
  ${error ?? "The dev-server terminal has the build output."}`,
155
155
  script: reloadOnRebuild()
156
- }), ssrErrorPage = (framework, error) => errorPageHtml({
156
+ }), errorMessage = (error) => error instanceof Error ? error.message : String(error), ssrErrorPage = (framework, error) => errorPageHtml({
157
157
  framework,
158
158
  hint: "A component threw during server-side rendering. Check the terminal for the full stack trace.",
159
159
  kind: "Server Render Error",
160
- message: error instanceof Error ? error.message : String(error)
160
+ message: isDevelopmentRuntime() ? errorMessage(error) : GENERIC_ERROR_MESSAGE
161
161
  });
162
162
  var init_ssrErrorPage = __esm(() => {
163
163
  init_cspNonceRef();
@@ -176,7 +176,14 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
176
176
  const storage = new AsyncLocalStorage;
177
177
  Reflect.set(globalThis, REQUEST_STORAGE_KEY, storage);
178
178
  return storage;
179
- }, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function", devBuildErrorResponse = (framework, assets) => {
179
+ }, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, getCurrentAbsoluteRoute = (request) => {
180
+ const store = getRequestStorage()?.getStore();
181
+ if (!store)
182
+ return;
183
+ if (request && store.request !== request)
184
+ return;
185
+ return store.route;
186
+ }, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function", devBuildErrorResponse = (framework, assets) => {
180
187
  if (!assets?.failed)
181
188
  return null;
182
189
  return new Response(buildErrorPage(framework, assets.name, assets.error), {
@@ -242,6 +249,11 @@ var init_requestContext = __esm(() => {
242
249
  name: "absolutejs-request-context"
243
250
  }).onRequest(({ request }) => {
244
251
  ensureRequestStorage().enterWith({ request });
252
+ }).onBeforeHandle(({ request, route }) => {
253
+ const store = getRequestStorage()?.getStore();
254
+ if (store && store.request === request && typeof route === "string") {
255
+ store.route = route;
256
+ }
245
257
  }).as("global");
246
258
  CSS_KEY_RE = /(?:CSS|Css)$/;
247
259
  });
@@ -302,7 +314,7 @@ var resolveExportPath = (entry, conditions) => {
302
314
  var init_resolvePackageImport = () => {};
303
315
 
304
316
  // src/constants.ts
305
- var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
317
+ var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
306
318
  var init_constants = __esm(() => {
307
319
  TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
308
320
  IMAGE_DEFAULT_DEVICE_SIZES = [
@@ -1295,7 +1307,8 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1295
1307
  async: loweredAwaitSource.transformed || loweredSource.transformed
1296
1308
  },
1297
1309
  filename: resolutionSourcePath,
1298
- generate: "server"
1310
+ generate: "server",
1311
+ hmr: isDevelopmentRuntime()
1299
1312
  }).js.code;
1300
1313
  for (const [spec, compiledChildPath] of childModulePaths) {
1301
1314
  compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), compiledChildPath));
@@ -1430,7 +1443,7 @@ var init_startupBanner = __esm(() => {
1430
1443
  });
1431
1444
 
1432
1445
  // src/utils/logger.ts
1433
- var colors2, frameworkColors, formatPath = (filePath) => {
1446
+ var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" : "[absolutejs]", formatPath = (filePath) => {
1434
1447
  const cwd = process.cwd();
1435
1448
  let relative = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
1436
1449
  relative = relative.replace(/\\/g, "/");
@@ -1440,7 +1453,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
1440
1453
  return relative;
1441
1454
  }, getFrameworkColor = (framework) => frameworkColors[framework] || colors2.white, log = (action, options) => {
1442
1455
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
1443
- const tag = `${colors2.cyan}[hmr]${colors2.reset}`;
1456
+ const tag = `${colors2.cyan}${logTag()}${colors2.reset}`;
1444
1457
  let message = action;
1445
1458
  if (options?.path) {
1446
1459
  const pathColor = options.framework ? getFrameworkColor(options.framework) : colors2.white;
@@ -1454,7 +1467,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
1454
1467
  log("css update", { duration, framework: framework ?? "css", path });
1455
1468
  }, logError = (message, error) => {
1456
1469
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
1457
- const tag = `${colors2.red}[hmr]${colors2.reset}`;
1470
+ const tag = `${colors2.red}${logTag()}${colors2.reset}`;
1458
1471
  const errorMsg = error instanceof Error ? error.message : error;
1459
1472
  const fullMessage = `${colors2.red}error${colors2.reset} ${message}${errorMsg ? `: ${errorMsg}` : ""}`;
1460
1473
  console.error(`${timestamp} ${tag} ${fullMessage}`);
@@ -1483,7 +1496,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
1483
1496
  log(`${colors2.cyan}server module reloaded${colors2.reset}`);
1484
1497
  }, logWarn = (message) => {
1485
1498
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
1486
- const tag = `${colors2.yellow}[hmr]${colors2.reset}`;
1499
+ const tag = `${colors2.yellow}${logTag()}${colors2.reset}`;
1487
1500
  console.log(`${timestamp} ${tag} ${colors2.yellow}warning ${message}${colors2.reset}`);
1488
1501
  };
1489
1502
  var init_logger = __esm(() => {
@@ -1546,8 +1559,23 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
1546
1559
  return;
1547
1560
  warnedMissingBootstrap = true;
1548
1561
  logWarn("A page contains islands, but the build manifest has no islands bootstrap, so they will render without hydrating. Set `islands.registry` in absolute.config.ts (a default bootstrap is generated from it) or point `islands.bootstrap` at a file that calls startIslands().");
1562
+ }, manifestBuildDir, WINDOWS_ABSOLUTE_PATH, isServerFilePath = (value) => {
1563
+ if (WINDOWS_ABSOLUTE_PATH.test(value))
1564
+ return true;
1565
+ if (!manifestBuildDir)
1566
+ return false;
1567
+ const root = manifestBuildDir.endsWith("/") ? manifestBuildDir : `${manifestBuildDir}/`;
1568
+ return value.startsWith(root);
1569
+ }, toBrowserManifest = (manifest) => {
1570
+ const browserManifest = {};
1571
+ for (const [key, value] of Object.entries(manifest)) {
1572
+ if (typeof value !== "string" || isServerFilePath(value))
1573
+ continue;
1574
+ browserManifest[key] = value;
1575
+ }
1576
+ return browserManifest;
1549
1577
  }, buildIslandsHeadMarkup = (manifest) => {
1550
- const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(manifest))}</script>`;
1578
+ const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
1551
1579
  const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}</script>`;
1552
1580
  const bootstrapPath = getIslandBootstrapPath(manifest);
1553
1581
  const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
@@ -1747,13 +1775,15 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
1747
1775
  return stream;
1748
1776
  }
1749
1777
  return pipeStreamWithIslandMarkerDetection(stream, markup, () => warnIfBootstrapMissing(manifest));
1750
- }, setCurrentIslandManifest = (manifest) => {
1778
+ }, setCurrentIslandManifest = (manifest, buildDir) => {
1751
1779
  globalThis.__absoluteManifest = manifest;
1780
+ manifestBuildDir = buildDir?.replaceAll("\\", "/");
1752
1781
  };
1753
1782
  var init_islandPageContext = __esm(() => {
1754
1783
  init_escapeScriptContent();
1755
1784
  init_cspNonceRef();
1756
1785
  init_logger();
1786
+ WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
1757
1787
  });
1758
1788
 
1759
1789
  // src/core/devRouteRegistrationCallsite.ts
@@ -3108,14 +3138,17 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3108
3138
  }, resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound, setConventions = (map) => {
3109
3139
  Reflect.set(globalThis, CONVENTIONS_KEY, map);
3110
3140
  }, isDev = () => isDevelopmentRuntime(), buildErrorProps = (error) => {
3141
+ const name = error instanceof Error ? error.name : "Error";
3142
+ if (!isDev())
3143
+ return { message: GENERIC_ERROR_MESSAGE, name };
3111
3144
  if (error instanceof Error) {
3112
3145
  return {
3113
3146
  message: error.message,
3114
- name: error.name,
3115
- ...isDev() && error.stack ? { stack: error.stack } : {}
3147
+ name,
3148
+ ...error.stack ? { stack: error.stack } : {}
3116
3149
  };
3117
3150
  }
3118
- return { message: String(error), name: "Error" };
3151
+ return { message: String(error), name };
3119
3152
  }, renderReactError = async (conventionPath, errorProps) => {
3120
3153
  const { createElement } = await import("react");
3121
3154
  const { renderToReadableStream } = await import("react-dom/server");
@@ -3229,6 +3262,29 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3229
3262
  return htmlResponse;
3230
3263
  }
3231
3264
  return null;
3265
+ }, isPageRequest = (request) => {
3266
+ if (request.headers.get("hx-request") === "true")
3267
+ return true;
3268
+ if (request.headers.get("sec-fetch-dest") === "document")
3269
+ return true;
3270
+ return (request.headers.get("accept") ?? "").includes("text/html");
3271
+ }, renderStaticRouteError = async (request, error) => {
3272
+ if (!isPageRequest(request))
3273
+ return null;
3274
+ const preferHtmx = request.headers.get("hx-request") === "true";
3275
+ const order = preferHtmx ? ["htmx", "html"] : ["html", "htmx"];
3276
+ const frameworks = order.filter((framework) => hasErrorConvention(framework));
3277
+ if (frameworks.length === 0)
3278
+ return null;
3279
+ const errorProps = buildErrorProps(error);
3280
+ const renderNext = async (remaining) => {
3281
+ const [framework, ...rest] = remaining;
3282
+ if (!framework)
3283
+ return null;
3284
+ const response = await tryFrameworkErrorConvention(framework, "", errorProps, error);
3285
+ return response ?? renderNext(rest);
3286
+ };
3287
+ return renderNext(frameworks);
3232
3288
  }, renderReactNotFound = async (conventionPath) => {
3233
3289
  const { createElement } = await import("react");
3234
3290
  const { renderToReadableStream } = await import("react-dom/server");
@@ -3323,6 +3379,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3323
3379
  var init_resolveConvention = __esm(() => {
3324
3380
  init_cspNonceRef();
3325
3381
  init_staticHtmlNonce();
3382
+ init_ssrErrorPage();
3326
3383
  ERROR_RENDERERS = {
3327
3384
  angular: renderAngularError,
3328
3385
  ember: renderEmberError,
@@ -4131,5 +4188,5 @@ export {
4131
4188
  svelteFileRoute
4132
4189
  };
4133
4190
 
4134
- //# debugId=E85559ACF34AD14564756E2164756E21
4191
+ //# debugId=64A8E9C7B96532D764756E2164756E21
4135
4192
  //# sourceMappingURL=server.js.map