@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
@@ -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
  });
@@ -261,7 +273,7 @@ var init_escapeScriptContent = __esm(() => {
261
273
  });
262
274
 
263
275
  // src/constants.ts
264
- 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;
276
+ 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;
265
277
  var init_constants = __esm(() => {
266
278
  TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
267
279
  IMAGE_DEFAULT_DEVICE_SIZES = [
@@ -364,7 +376,7 @@ var init_startupBanner = __esm(() => {
364
376
  });
365
377
 
366
378
  // src/utils/logger.ts
367
- var colors2, frameworkColors, formatPath = (filePath) => {
379
+ var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" : "[absolutejs]", formatPath = (filePath) => {
368
380
  const cwd = process.cwd();
369
381
  let relative = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
370
382
  relative = relative.replace(/\\/g, "/");
@@ -374,7 +386,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
374
386
  return relative;
375
387
  }, getFrameworkColor = (framework) => frameworkColors[framework] || colors2.white, log = (action, options) => {
376
388
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
377
- const tag = `${colors2.cyan}[hmr]${colors2.reset}`;
389
+ const tag = `${colors2.cyan}${logTag()}${colors2.reset}`;
378
390
  let message = action;
379
391
  if (options?.path) {
380
392
  const pathColor = options.framework ? getFrameworkColor(options.framework) : colors2.white;
@@ -388,7 +400,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
388
400
  log("css update", { duration, framework: framework ?? "css", path });
389
401
  }, logError = (message, error) => {
390
402
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
391
- const tag = `${colors2.red}[hmr]${colors2.reset}`;
403
+ const tag = `${colors2.red}${logTag()}${colors2.reset}`;
392
404
  const errorMsg = error instanceof Error ? error.message : error;
393
405
  const fullMessage = `${colors2.red}error${colors2.reset} ${message}${errorMsg ? `: ${errorMsg}` : ""}`;
394
406
  console.error(`${timestamp} ${tag} ${fullMessage}`);
@@ -417,7 +429,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
417
429
  log(`${colors2.cyan}server module reloaded${colors2.reset}`);
418
430
  }, logWarn = (message) => {
419
431
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
420
- const tag = `${colors2.yellow}[hmr]${colors2.reset}`;
432
+ const tag = `${colors2.yellow}${logTag()}${colors2.reset}`;
421
433
  console.log(`${timestamp} ${tag} ${colors2.yellow}warning ${message}${colors2.reset}`);
422
434
  };
423
435
  var init_logger = __esm(() => {
@@ -480,8 +492,23 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
480
492
  return;
481
493
  warnedMissingBootstrap = true;
482
494
  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().");
495
+ }, manifestBuildDir, WINDOWS_ABSOLUTE_PATH, isServerFilePath = (value) => {
496
+ if (WINDOWS_ABSOLUTE_PATH.test(value))
497
+ return true;
498
+ if (!manifestBuildDir)
499
+ return false;
500
+ const root = manifestBuildDir.endsWith("/") ? manifestBuildDir : `${manifestBuildDir}/`;
501
+ return value.startsWith(root);
502
+ }, toBrowserManifest = (manifest) => {
503
+ const browserManifest = {};
504
+ for (const [key, value] of Object.entries(manifest)) {
505
+ if (typeof value !== "string" || isServerFilePath(value))
506
+ continue;
507
+ browserManifest[key] = value;
508
+ }
509
+ return browserManifest;
483
510
  }, buildIslandsHeadMarkup = (manifest) => {
484
- const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(manifest))}</script>`;
511
+ const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
485
512
  const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}</script>`;
486
513
  const bootstrapPath = getIslandBootstrapPath(manifest);
487
514
  const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
@@ -681,13 +708,15 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
681
708
  return stream;
682
709
  }
683
710
  return pipeStreamWithIslandMarkerDetection(stream, markup, () => warnIfBootstrapMissing(manifest));
684
- }, setCurrentIslandManifest = (manifest) => {
711
+ }, setCurrentIslandManifest = (manifest, buildDir) => {
685
712
  globalThis.__absoluteManifest = manifest;
713
+ manifestBuildDir = buildDir?.replaceAll("\\", "/");
686
714
  };
687
715
  var init_islandPageContext = __esm(() => {
688
716
  init_escapeScriptContent();
689
717
  init_cspNonceRef();
690
718
  init_logger();
719
+ WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
691
720
  });
692
721
 
693
722
  // src/core/devRouteRegistrationCallsite.ts
@@ -1973,14 +2002,17 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
1973
2002
  }, resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound, setConventions = (map) => {
1974
2003
  Reflect.set(globalThis, CONVENTIONS_KEY, map);
1975
2004
  }, isDev = () => isDevelopmentRuntime(), buildErrorProps = (error) => {
2005
+ const name = error instanceof Error ? error.name : "Error";
2006
+ if (!isDev())
2007
+ return { message: GENERIC_ERROR_MESSAGE, name };
1976
2008
  if (error instanceof Error) {
1977
2009
  return {
1978
2010
  message: error.message,
1979
- name: error.name,
1980
- ...isDev() && error.stack ? { stack: error.stack } : {}
2011
+ name,
2012
+ ...error.stack ? { stack: error.stack } : {}
1981
2013
  };
1982
2014
  }
1983
- return { message: String(error), name: "Error" };
2015
+ return { message: String(error), name };
1984
2016
  }, renderReactError = async (conventionPath, errorProps) => {
1985
2017
  const { createElement } = await import("react");
1986
2018
  const { renderToReadableStream } = await import("react-dom/server");
@@ -2094,6 +2126,29 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
2094
2126
  return htmlResponse;
2095
2127
  }
2096
2128
  return null;
2129
+ }, isPageRequest = (request) => {
2130
+ if (request.headers.get("hx-request") === "true")
2131
+ return true;
2132
+ if (request.headers.get("sec-fetch-dest") === "document")
2133
+ return true;
2134
+ return (request.headers.get("accept") ?? "").includes("text/html");
2135
+ }, renderStaticRouteError = async (request, error) => {
2136
+ if (!isPageRequest(request))
2137
+ return null;
2138
+ const preferHtmx = request.headers.get("hx-request") === "true";
2139
+ const order = preferHtmx ? ["htmx", "html"] : ["html", "htmx"];
2140
+ const frameworks = order.filter((framework) => hasErrorConvention(framework));
2141
+ if (frameworks.length === 0)
2142
+ return null;
2143
+ const errorProps = buildErrorProps(error);
2144
+ const renderNext = async (remaining) => {
2145
+ const [framework, ...rest] = remaining;
2146
+ if (!framework)
2147
+ return null;
2148
+ const response = await tryFrameworkErrorConvention(framework, "", errorProps, error);
2149
+ return response ?? renderNext(rest);
2150
+ };
2151
+ return renderNext(frameworks);
2097
2152
  }, renderReactNotFound = async (conventionPath) => {
2098
2153
  const { createElement } = await import("react");
2099
2154
  const { renderToReadableStream } = await import("react-dom/server");
@@ -2188,6 +2243,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
2188
2243
  var init_resolveConvention = __esm(() => {
2189
2244
  init_cspNonceRef();
2190
2245
  init_staticHtmlNonce();
2246
+ init_ssrErrorPage();
2191
2247
  ERROR_RENDERERS = {
2192
2248
  angular: renderAngularError,
2193
2249
  ember: renderEmberError,
@@ -2916,5 +2972,5 @@ export {
2916
2972
  reactFileRoute
2917
2973
  };
2918
2974
 
2919
- //# debugId=E1D3F509BEBDEF2C64756E2164756E21
2975
+ //# debugId=AA8E49A512D6498C64756E2164756E21
2920
2976
  //# sourceMappingURL=server.js.map