@absolutejs/absolute 0.19.0-beta.808 → 0.19.0-beta.809
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/browser.js +9801 -57
- package/dist/angular/browser.js.map +246 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +14877 -60
- package/dist/angular/index.js.map +281 -4
- package/dist/angular/server.js +5610 -45
- package/dist/angular/server.js.map +51 -3
- package/dist/build.js +18092 -45
- package/dist/build.js.map +99 -3
- package/dist/cli/index.js +317 -86
- package/dist/client/index.js +1100 -40
- package/dist/client/index.js.map +24 -4
- package/dist/core/streamingSlotRegistrar.js +108 -11
- package/dist/core/streamingSlotRegistrar.js.map +4 -3
- package/dist/core/streamingSlotRegistry.js +169 -7
- package/dist/core/streamingSlotRegistry.js.map +5 -3
- package/dist/index.js +19957 -547
- package/dist/index.js.map +116 -3
- package/dist/islands/browser.js +228 -9
- package/dist/islands/browser.js.map +9 -4
- package/dist/islands/index.js +1908 -17
- package/dist/islands/index.js.map +27 -3
- package/dist/react/browser.js +328 -12
- package/dist/react/browser.js.map +12 -4
- package/dist/react/components/index.js +167 -16
- package/dist/react/components/index.js.map +6 -3
- package/dist/react/hooks/index.js +183 -8
- package/dist/react/hooks/index.js.map +7 -3
- package/dist/react/index.js +3627 -36
- package/dist/react/index.js.map +45 -4
- package/dist/react/jsxDevRuntimeCompat.js +61 -2
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +1789 -18
- package/dist/react/server.js.map +21 -3
- package/dist/src/angular/injectorPatch.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/svelte/browser.js +247 -12
- package/dist/svelte/browser.js.map +10 -3
- package/dist/svelte/index.js +3732 -37
- package/dist/svelte/index.js.map +47 -4
- package/dist/svelte/server.js +2794 -21
- package/dist/svelte/server.js.map +27 -3
- package/dist/vue/browser.js +348 -12
- package/dist/vue/browser.js.map +12 -4
- package/dist/vue/components/Image.js +240 -7
- package/dist/vue/components/Image.js.map +6 -3
- package/dist/vue/components/index.js +544 -11
- package/dist/vue/components/index.js.map +9 -3
- package/dist/vue/index.js +4212 -52
- package/dist/vue/index.js.map +50 -4
- package/dist/vue/server.js +1849 -18
- package/dist/vue/server.js.map +21 -3
- package/package.json +1 -1
- package/dist/chunk-0867j0r0.js +0 -136
- package/dist/chunk-0867j0r0.js.map +0 -10
- package/dist/chunk-0kdc6r16.js +0 -20
- package/dist/chunk-0kdc6r16.js.map +0 -10
- package/dist/chunk-102fp7xe.js +0 -63
- package/dist/chunk-102fp7xe.js.map +0 -10
- package/dist/chunk-11zpfqz6.js +0 -19
- package/dist/chunk-11zpfqz6.js.map +0 -10
- package/dist/chunk-1rfh7hw9.js +0 -319
- package/dist/chunk-1rfh7hw9.js.map +0 -11
- package/dist/chunk-25v9t56f.js +0 -29
- package/dist/chunk-25v9t56f.js.map +0 -11
- package/dist/chunk-2f21eenc.js +0 -21
- package/dist/chunk-2f21eenc.js.map +0 -10
- package/dist/chunk-2ga2znex.js +0 -13
- package/dist/chunk-2ga2znex.js.map +0 -9
- package/dist/chunk-30yrw0f6.js +0 -33
- package/dist/chunk-30yrw0f6.js.map +0 -10
- package/dist/chunk-38jwhqcw.js +0 -4410
- package/dist/chunk-38jwhqcw.js.map +0 -28
- package/dist/chunk-3g91wb4f.js +0 -358
- package/dist/chunk-3g91wb4f.js.map +0 -10
- package/dist/chunk-3yjzpcne.js +0 -34
- package/dist/chunk-3yjzpcne.js.map +0 -10
- package/dist/chunk-41bf6aqt.js +0 -17
- package/dist/chunk-41bf6aqt.js.map +0 -9
- package/dist/chunk-4d39r92n.js +0 -81
- package/dist/chunk-4d39r92n.js.map +0 -10
- package/dist/chunk-5003emhv.js +0 -17
- package/dist/chunk-5003emhv.js.map +0 -10
- package/dist/chunk-5f67rsed.js +0 -466
- package/dist/chunk-5f67rsed.js.map +0 -10
- package/dist/chunk-5fhp1jap.js +0 -9169
- package/dist/chunk-5fhp1jap.js.map +0 -236
- package/dist/chunk-6pdj08z3.js +0 -73
- package/dist/chunk-6pdj08z3.js.map +0 -12
- package/dist/chunk-6qjbrt0k.js +0 -13
- package/dist/chunk-6qjbrt0k.js.map +0 -9
- package/dist/chunk-6sccb4jr.js +0 -14
- package/dist/chunk-6sccb4jr.js.map +0 -9
- package/dist/chunk-798spvzv.js +0 -50
- package/dist/chunk-798spvzv.js.map +0 -10
- package/dist/chunk-7fw6x3js.js +0 -131
- package/dist/chunk-7fw6x3js.js.map +0 -11
- package/dist/chunk-7kjj42xm.js +0 -11
- package/dist/chunk-7kjj42xm.js.map +0 -10
- package/dist/chunk-7mtstdqn.js +0 -90
- package/dist/chunk-7mtstdqn.js.map +0 -10
- package/dist/chunk-851whwc7.js +0 -17
- package/dist/chunk-851whwc7.js.map +0 -10
- package/dist/chunk-85n68sy6.js +0 -103
- package/dist/chunk-85n68sy6.js.map +0 -10
- package/dist/chunk-8kcfffry.js +0 -35
- package/dist/chunk-8kcfffry.js.map +0 -10
- package/dist/chunk-8qqxc1h2.js +0 -426
- package/dist/chunk-8qqxc1h2.js.map +0 -14
- package/dist/chunk-92fsjfpp.js +0 -1731
- package/dist/chunk-92fsjfpp.js.map +0 -11
- package/dist/chunk-93sqk7be.js +0 -139
- package/dist/chunk-93sqk7be.js.map +0 -12
- package/dist/chunk-94gvx0hg.js +0 -28
- package/dist/chunk-94gvx0hg.js.map +0 -10
- package/dist/chunk-9c5tj4k3.js +0 -130
- package/dist/chunk-9c5tj4k3.js.map +0 -10
- package/dist/chunk-9ve9jq72.js +0 -203
- package/dist/chunk-9ve9jq72.js.map +0 -10
- package/dist/chunk-9xrsjeem.js +0 -12
- package/dist/chunk-9xrsjeem.js.map +0 -9
- package/dist/chunk-a9mvyp04.js +0 -87
- package/dist/chunk-a9mvyp04.js.map +0 -10
- package/dist/chunk-b3gbnrwe.js +0 -21
- package/dist/chunk-b3gbnrwe.js.map +0 -10
- package/dist/chunk-bmgqm774.js +0 -65
- package/dist/chunk-bmgqm774.js.map +0 -9
- package/dist/chunk-bxfghpma.js +0 -69
- package/dist/chunk-bxfghpma.js.map +0 -10
- package/dist/chunk-c1jfjnka.js +0 -74
- package/dist/chunk-c1jfjnka.js.map +0 -10
- package/dist/chunk-cbkrwmvh.js +0 -80
- package/dist/chunk-cbkrwmvh.js.map +0 -10
- package/dist/chunk-cdxd7sy2.js +0 -71
- package/dist/chunk-cdxd7sy2.js.map +0 -10
- package/dist/chunk-cg95827x.js +0 -21
- package/dist/chunk-cg95827x.js.map +0 -10
- package/dist/chunk-cm0g4q6w.js +0 -149
- package/dist/chunk-cm0g4q6w.js.map +0 -10
- package/dist/chunk-cwfy538a.js +0 -51
- package/dist/chunk-cwfy538a.js.map +0 -9
- package/dist/chunk-d7mwkzry.js +0 -261
- package/dist/chunk-d7mwkzry.js.map +0 -10
- package/dist/chunk-d8w0qm28.js +0 -184
- package/dist/chunk-d8w0qm28.js.map +0 -11
- package/dist/chunk-d9c0am65.js +0 -12
- package/dist/chunk-d9c0am65.js.map +0 -10
- package/dist/chunk-daqghmg8.js +0 -12
- package/dist/chunk-daqghmg8.js.map +0 -9
- package/dist/chunk-e3r9fxaa.js +0 -149
- package/dist/chunk-e3r9fxaa.js.map +0 -10
- package/dist/chunk-e8eecyrq.js +0 -244
- package/dist/chunk-e8eecyrq.js.map +0 -10
- package/dist/chunk-ex2hxe0v.js +0 -160
- package/dist/chunk-ex2hxe0v.js.map +0 -11
- package/dist/chunk-fak944et.js +0 -91
- package/dist/chunk-fak944et.js.map +0 -10
- package/dist/chunk-ff70rnhd.js +0 -672
- package/dist/chunk-ff70rnhd.js.map +0 -15
- package/dist/chunk-fygx2ymm.js +0 -118
- package/dist/chunk-fygx2ymm.js.map +0 -12
- package/dist/chunk-g15qj669.js +0 -271
- package/dist/chunk-g15qj669.js.map +0 -11
- package/dist/chunk-gd6wmknh.js +0 -121
- package/dist/chunk-gd6wmknh.js.map +0 -11
- package/dist/chunk-gf0ygptk.js +0 -85
- package/dist/chunk-gf0ygptk.js.map +0 -11
- package/dist/chunk-gytkmthr.js +0 -220
- package/dist/chunk-gytkmthr.js.map +0 -10
- package/dist/chunk-h5bbfn3n.js +0 -28
- package/dist/chunk-h5bbfn3n.js.map +0 -11
- package/dist/chunk-h6mye9r3.js +0 -93
- package/dist/chunk-h6mye9r3.js.map +0 -10
- package/dist/chunk-hcsmxw1v.js +0 -85
- package/dist/chunk-hcsmxw1v.js.map +0 -10
- package/dist/chunk-hyjs4bqs.js +0 -8
- package/dist/chunk-hyjs4bqs.js.map +0 -10
- package/dist/chunk-j88z31ep.js +0 -25
- package/dist/chunk-j88z31ep.js.map +0 -10
- package/dist/chunk-jn91vzkh.js +0 -66
- package/dist/chunk-jn91vzkh.js.map +0 -10
- package/dist/chunk-jpkjdgsk.js +0 -167
- package/dist/chunk-jpkjdgsk.js.map +0 -11
- package/dist/chunk-jwxt8gnp.js +0 -13
- package/dist/chunk-jwxt8gnp.js.map +0 -9
- package/dist/chunk-kk8w9rh5.js +0 -195
- package/dist/chunk-kk8w9rh5.js.map +0 -10
- package/dist/chunk-m97ze5hz.js +0 -46
- package/dist/chunk-m97ze5hz.js.map +0 -10
- package/dist/chunk-mbazhahf.js +0 -60
- package/dist/chunk-mbazhahf.js.map +0 -10
- package/dist/chunk-mgfwq18r.js +0 -15
- package/dist/chunk-mgfwq18r.js.map +0 -9
- package/dist/chunk-mtgf69xn.js +0 -88
- package/dist/chunk-mtgf69xn.js.map +0 -10
- package/dist/chunk-mtxzyxpg.js +0 -102
- package/dist/chunk-mtxzyxpg.js.map +0 -10
- package/dist/chunk-nehhtthw.js +0 -225
- package/dist/chunk-nehhtthw.js.map +0 -10
- package/dist/chunk-p5504p14.js +0 -16
- package/dist/chunk-p5504p14.js.map +0 -10
- package/dist/chunk-pnscgw95.js +0 -90
- package/dist/chunk-pnscgw95.js.map +0 -10
- package/dist/chunk-pvpp4pvs.js +0 -17
- package/dist/chunk-pvpp4pvs.js.map +0 -10
- package/dist/chunk-qh75agse.js +0 -95
- package/dist/chunk-qh75agse.js.map +0 -10
- package/dist/chunk-qxq2zcty.js +0 -52
- package/dist/chunk-qxq2zcty.js.map +0 -10
- package/dist/chunk-r6e8pytx.js +0 -22
- package/dist/chunk-r6e8pytx.js.map +0 -9
- package/dist/chunk-r7jmgqnw.js +0 -114
- package/dist/chunk-r7jmgqnw.js.map +0 -10
- package/dist/chunk-s6defjk2.js +0 -116
- package/dist/chunk-s6defjk2.js.map +0 -10
- package/dist/chunk-sd39p726.js +0 -619
- package/dist/chunk-sd39p726.js.map +0 -10
- package/dist/chunk-swrnzs4c.js +0 -63
- package/dist/chunk-swrnzs4c.js.map +0 -10
- package/dist/chunk-tfe3sb44.js +0 -33
- package/dist/chunk-tfe3sb44.js.map +0 -10
- package/dist/chunk-tjr0kcev.js +0 -41
- package/dist/chunk-tjr0kcev.js.map +0 -9
- package/dist/chunk-tx9edm1x.js +0 -34
- package/dist/chunk-tx9edm1x.js.map +0 -10
- package/dist/chunk-txhm2vb5.js +0 -18
- package/dist/chunk-txhm2vb5.js.map +0 -9
- package/dist/chunk-v5vmsxmy.js +0 -526
- package/dist/chunk-v5vmsxmy.js.map +0 -12
- package/dist/chunk-vjhxm8n2.js +0 -29
- package/dist/chunk-vjhxm8n2.js.map +0 -9
- package/dist/chunk-vkrpm7kc.js +0 -247
- package/dist/chunk-vkrpm7kc.js.map +0 -12
- package/dist/chunk-w3m4m5we.js +0 -4925
- package/dist/chunk-w3m4m5we.js.map +0 -12
- package/dist/chunk-wrxtn9ve.js +0 -18
- package/dist/chunk-wrxtn9ve.js.map +0 -10
- package/dist/chunk-wwzvp0zn.js +0 -192
- package/dist/chunk-wwzvp0zn.js.map +0 -10
- package/dist/chunk-x09cskqd.js +0 -377
- package/dist/chunk-x09cskqd.js.map +0 -10
- package/dist/chunk-xnt8c6h2.js +0 -576
- package/dist/chunk-xnt8c6h2.js.map +0 -10
- package/dist/chunk-xw0tx842.js +0 -13
- package/dist/chunk-xw0tx842.js.map +0 -9
- package/dist/chunk-xx5b6b9m.js +0 -69
- package/dist/chunk-xx5b6b9m.js.map +0 -10
- package/dist/chunk-xz1kdswj.js +0 -21
- package/dist/chunk-xz1kdswj.js.map +0 -9
- package/dist/chunk-y84qnsd3.js +0 -32
- package/dist/chunk-y84qnsd3.js.map +0 -10
- package/dist/chunk-ywjn0rad.js +0 -14
- package/dist/chunk-ywjn0rad.js.map +0 -9
- package/dist/chunk-z9nvhm6r.js +0 -13
- package/dist/chunk-z9nvhm6r.js.map +0 -9
- package/dist/chunk-zhmvdpk6.js +0 -15
- package/dist/chunk-zhmvdpk6.js.map +0 -9
- package/dist/chunk-zrg9d4zw.js +0 -784
- package/dist/chunk-zrg9d4zw.js.map +0 -10
package/dist/react/server.js.map
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
3
|
+
"sources": ["../src/constants.ts", "../src/core/devRouteRegistrationCallsite.ts", "../src/client/streamSwap.ts", "../src/utils/escapeScriptContent.ts", "../src/utils/streamingSlots.ts", "../src/utils/getDurationString.ts", "../src/utils/startupBanner.ts", "../src/utils/logger.ts", "../src/core/ssrCache.ts", "../src/utils/stringModifiers.ts", "../src/core/streamingSlotRegistrar.ts", "../src/core/streamingSlotRegistry.ts", "../src/core/islandPageContext.ts", "../src/react/pageHandler.ts", "../src/core/responseEnhancers.ts", "../src/core/streamingSlotWarningScope.ts", "../src/utils/ssrErrorPage.ts", "../src/utils/resolveConvention.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"export const ANGULAR_INIT_TIMEOUT_MS = 500;\nexport const ANSI_ESCAPE_CODE = 27;\nexport const ANSI_ESCAPE_LENGTH = 3;\nexport const ASCII_SPACE = 32;\nexport const BASE_36_RADIX = 36;\nexport const BUN_BUILD_WARNING_SUPPRESSION =\n\t'wildcard sideEffects are not supported yet';\nexport const BODY_SLICE_LENGTH = 2000;\nexport const BYTES_PER_KILOBYTE = 1024;\nexport const CLI_ARGS_OFFSET = 3;\nexport const CSS_ERROR_RESOLVE_DELAY_MS = 50;\nexport const CSS_MAX_CHECK_ATTEMPTS = 10;\nexport const CSS_MAX_PARSE_TIMEOUT_MS = 500;\nexport const CSS_SHEET_READY_TIMEOUT_MS = 100;\nexport const DEFAULT_CHUNK_SIZE = 16_384;\nexport const DEFAULT_DEBOUNCE_MS = 15;\nexport const DEFAULT_PORT = 3000;\nexport const DEV_SERVER_RESTART_DEBOUNCE_MS = 100;\nexport const DOM_UPDATE_DELAY_MS = 50;\nexport const FILE_PROTOCOL_PREFIX_LENGTH = 7;\nexport const FOCUS_ID_PREFIX_LENGTH = 3;\nexport const FOCUS_IDX_PREFIX_LENGTH = 4;\nexport const FOCUS_NAME_PREFIX_LENGTH = 5;\nexport const HMR_UPDATE_TIMEOUT_MS = 2000;\nexport const HOOK_SIGNATURE_LENGTH = 12;\nexport const EXCLUDE_LAST_OFFSET = -1;\nexport const HTTP_STATUS_OK = 200;\nexport const HTTP_STATUS_BAD_REQUEST = 400;\nexport const HTTP_STATUS_NOT_FOUND = 404;\nexport const HOURS_IN_DAY = 24;\nexport const HOURS_IN_HALF_DAY = 12;\nexport const IMAGE_DEFAULT_DEVICE_SIZES = [\n\t640, 750, 828, 1080, 1200, 1920, 2048, 3840\n];\nexport const IMAGE_DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];\nexport const IMAGE_DEFAULT_QUALITY = 75;\nexport const IMAGE_GLOB_SUFFIX_LENGTH = 2;\nexport const MAX_ERROR_LENGTH = 200;\nexport const MAX_RECONNECT_ATTEMPTS = 60;\nexport const MILLISECONDS_IN_A_SECOND = 1000;\nexport const MINUTES_IN_AN_HOUR = 60;\nexport const SECONDS_IN_A_MINUTE = 60;\nexport const MILLISECONDS_IN_A_MINUTE =\n\tMILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;\nexport const MILLISECONDS_IN_A_DAY =\n\tMILLISECONDS_IN_A_SECOND *\n\tSECONDS_IN_A_MINUTE *\n\tMINUTES_IN_AN_HOUR *\n\tHOURS_IN_DAY;\nexport const OVERLAY_FADE_DURATION_MS = 150;\nexport const PING_INTERVAL_MS = 30_000;\nexport const RAF_BATCH_COUNT = 3;\nexport const RANDOM_ID_END_INDEX = 11;\nexport const REBUILD_BATCH_DELAY_MS = 10;\nexport const REBUILD_RELOAD_DELAY_MS = 200;\nexport const RECONNECT_INITIAL_DELAY_MS = 500;\nexport const RECONNECT_POLL_INTERVAL_MS = 300;\nexport const REACT_STREAM_SLOT_FAST_DELAY_MS = 5;\nexport const REACT_STREAM_SLOT_SLOW_DELAY_MS = 20;\nexport const SIGINT_EXIT_CODE = 130;\nexport const SIGTERM_EXIT_CODE = 143;\nexport const SVELTE_CSS_LOAD_TIMEOUT_MS = 500;\nexport const TIME_PRECISION = 2;\nexport const TWO_THIRDS = 2 / 3;\nexport const UNFOUND_INDEX = -1;\nexport const WEBSOCKET_NORMAL_CLOSURE = 1000;\nexport const WORKSPACE_COMMAND_ARGS_OFFSET = 3;\nexport const WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30;\nexport const WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60;\nexport const WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5_000;\nexport const WORKSPACE_READY_PROBE_INTERVAL_MS = 250;\nexport const WORKSPACE_READY_TIMEOUT_MS = 30_000;\nexport const WORKSPACE_SHUTDOWN_TIMEOUT_MS = 10_000;\nexport const WORKSPACE_TUI_DEFAULT_HEIGHT = 28;\nexport const WORKSPACE_TUI_DEFAULT_WIDTH = 100;\nexport const WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30;\nexport const WORKSPACE_TUI_FOOTER_LINE_COUNT = 3;\nexport const WORKSPACE_TUI_MIN_LOG_HEIGHT = 3;\nexport const WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7;\nexport const WORKSPACE_TUI_MIN_TARGET_WIDTH = 8;\nexport const WORKSPACE_TUI_MIN_WRAP_WIDTH = 12;\nexport const WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3;\nexport const WORKSPACE_TUI_RECENT_LOG_LIMIT = 40;\nexport const WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16;\nexport const WORKSPACE_TUI_STATUS_WIDTH = 10;\nexport const WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6;\nexport const WORKSPACE_TUI_VISIBILITY_WIDTH = 8;\n",
|
|
6
|
+
"import { AsyncLocalStorage } from 'node:async_hooks';\nimport { Elysia } from 'elysia';\n\ntype RouteCallsiteStore = { callsite?: string };\ntype RouteCallsiteStorage = AsyncLocalStorage<RouteCallsiteStore>;\ntype RouteMethod = (this: unknown, ...args: unknown[]) => unknown;\n\nconst ROUTE_CALLSITE_STORAGE_KEY = Symbol.for(\n\t'absolutejs.devRouteRegistrationCallsiteStorage'\n);\nconst ROUTE_CALLSITE_PATCHED_KEY = Symbol.for(\n\t'absolutejs.devRouteRegistrationCallsitePatched'\n);\n\nconst ROUTE_METHOD_NAMES = [\n\t'all',\n\t'delete',\n\t'get',\n\t'head',\n\t'options',\n\t'patch',\n\t'post',\n\t'put'\n] as const;\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isAsyncLocalStorage = (value: unknown): value is RouteCallsiteStorage =>\n\tisObjectRecord(value) &&\n\t'getStore' in value &&\n\ttypeof value.getStore === 'function' &&\n\t'run' in value &&\n\ttypeof value.run === 'function';\n\nconst isRouteMethod = (value: unknown): value is RouteMethod =>\n\ttypeof value === 'function';\n\nconst getRouteCallsiteStorage = () => {\n\tconst value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') {\n\t\treturn undefined;\n\t}\n\n\treturn isAsyncLocalStorage(value) ? value : undefined;\n};\n\nconst ensureRouteCallsiteStorage = () => {\n\tconst existing = getRouteCallsiteStorage();\n\tif (existing) {\n\t\treturn existing;\n\t}\n\n\tconst storage = new AsyncLocalStorage<RouteCallsiteStore>();\n\tReflect.set(globalThis, ROUTE_CALLSITE_STORAGE_KEY, storage);\n\n\treturn storage;\n};\n\nconst normalizeCallsitePath = (value: string) =>\n\tvalue\n\t\t.replace(`${process.cwd()}/`, '')\n\t\t.replace(process.cwd(), '')\n\t\t.replace(/^\\.\\/+/, '');\n\nconst shouldIgnoreRouteCallsiteFrame = (frame: string) =>\n\tframe.includes('/node_modules/') ||\n\tframe.includes('/dist/') ||\n\tframe.includes('/src/core/devRouteRegistrationCallsite.');\n\nconst getRouteCallsiteLocation = (frame: string) =>\n\tframe.match(/\\((\\/[^)]+:\\d+:\\d+)\\)$/)?.[1] ??\n\tframe.match(/at (\\/[^ ]+:\\d+:\\d+)$/)?.[1];\n\nconst extractRouteRegistrationCallsite = (stack: string) => {\n\tconst location = stack\n\t\t.split('\\n')\n\t\t.slice(1)\n\t\t.map((line) => line.trim())\n\t\t.filter((frame) => !shouldIgnoreRouteCallsiteFrame(frame))\n\t\t.map((frame) => getRouteCallsiteLocation(frame))\n\t\t.find((frameLocation) => frameLocation !== undefined);\n\n\treturn location ? normalizeCallsitePath(location) : undefined;\n};\n\nconst captureRouteRegistrationCallsite = () => {\n\tconst { stack } = new Error();\n\tif (!stack) {\n\t\treturn undefined;\n\t}\n\n\treturn extractRouteRegistrationCallsite(stack);\n};\n\nconst wrapRouteHandlerWithCallsite = (handler: unknown, callsite?: string) => {\n\tif (typeof handler !== 'function' || !callsite) {\n\t\treturn handler;\n\t}\n\n\tconst storage = ensureRouteCallsiteStorage();\n\tconst routeHandler = handler;\n\n\treturn function wrappedRouteHandler(this: unknown, ...args: unknown[]) {\n\t\treturn storage.run({ callsite }, () =>\n\t\t\tReflect.apply(routeHandler, this, args)\n\t\t);\n\t};\n};\n\nconst createPatchedRouteMethod = (originalMethod: RouteMethod) =>\n\tfunction patchedRouteMethod(\n\t\tthis: unknown,\n\t\tpath: unknown,\n\t\thandler: unknown,\n\t\t...rest: unknown[]\n\t) {\n\t\tconst callsite = captureRouteRegistrationCallsite();\n\n\t\treturn Reflect.apply(originalMethod, this, [\n\t\t\tpath,\n\t\t\twrapRouteHandlerWithCallsite(handler, callsite),\n\t\t\t...rest\n\t\t]);\n\t};\n\nexport const getCurrentRouteRegistrationCallsite = () =>\n\tgetRouteCallsiteStorage()?.getStore()?.callsite;\nexport const patchElysiaRouteRegistrationCallsites = () => {\n\tif (process.env.NODE_ENV === 'production') {\n\t\treturn;\n\t}\n\n\tif (Reflect.get(globalThis, ROUTE_CALLSITE_PATCHED_KEY) === true) {\n\t\treturn;\n\t}\n\n\tconst { prototype } = Elysia;\n\tROUTE_METHOD_NAMES.forEach((methodName) => {\n\t\tconst originalMethod = Reflect.get(prototype, methodName);\n\t\tif (!isRouteMethod(originalMethod)) return;\n\t\tReflect.set(\n\t\t\tprototype,\n\t\t\tmethodName,\n\t\t\tcreatePatchedRouteMethod(originalMethod)\n\t\t);\n\t});\n\n\tReflect.set(globalThis, ROUTE_CALLSITE_PATCHED_KEY, true);\n};\n",
|
|
7
|
+
"type AbsoluteSlotWindow = Window & {\n\t__ABS_SLOT_ENQUEUE__?: (id: string, payload: unknown) => void;\n\t__ABS_SLOT_FLUSH__?: () => void;\n\t__ABS_SLOT_CONSUMERS__?: Record<\n\t\tstring,\n\t\t((payload: unknown) => boolean | void) | undefined\n\t>;\n\t__ABS_SLOT_HYDRATION_PENDING__?: boolean;\n\t__ABS_SLOT_PENDING__?: Record<string, unknown>;\n\t__ABS_SLOT_RUNTIME__?: boolean;\n};\n\nconst streamSwapRuntime = () => {\n\tconst absoluteWindow: AbsoluteSlotWindow = window;\n\tconst SLOT_PATCH_EVENT = 'absolutejs:slot-patch';\n\tif (absoluteWindow.__ABS_SLOT_RUNTIME__ === true) return;\n\tabsoluteWindow.__ABS_SLOT_RUNTIME__ = true;\n\tabsoluteWindow.__ABS_SLOT_CONSUMERS__ =\n\t\tabsoluteWindow.__ABS_SLOT_CONSUMERS__ ?? {};\n\tabsoluteWindow.__ABS_SLOT_PENDING__ =\n\t\tabsoluteWindow.__ABS_SLOT_PENDING__ ?? {};\n\tconst consumers = absoluteWindow.__ABS_SLOT_CONSUMERS__;\n\tconst pending = absoluteWindow.__ABS_SLOT_PENDING__;\n\tconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\t\tBoolean(value) && typeof value === 'object';\n\tconst isPatchedPendingEntry = (\n\t\tvalue: unknown\n\t): value is {\n\t\tdomPatched: true;\n\t\tpayload: unknown;\n\t} => {\n\t\tif (!isObjectRecord(value)) return false;\n\n\t\treturn value.domPatched === true && 'payload' in value;\n\t};\n\tconst unwrapPendingPayload = (value: unknown) =>\n\t\tisPatchedPendingEntry(value) ? value.payload : value;\n\tconst canApplyImmediately = () =>\n\t\tabsoluteWindow.__ABS_SLOT_HYDRATION_PENDING__ !== true;\n\tconst isAngularDeferPayload = (payload: unknown) => {\n\t\tif (!isObjectRecord(payload)) return false;\n\n\t\treturn payload.kind === 'angular-defer';\n\t};\n\tconst isVueSuspensePayload = (payload: unknown) => {\n\t\tif (!isObjectRecord(payload)) return false;\n\n\t\treturn payload.kind === 'vue-suspense';\n\t};\n\tconst resolveHtml = (payload: unknown) => {\n\t\tif (!isObjectRecord(payload)) {\n\t\t\treturn typeof payload === 'string' ? payload : '';\n\t\t}\n\t\tif (typeof payload.html === 'string') {\n\t\t\treturn payload.html;\n\t\t}\n\n\t\treturn '';\n\t};\n\n\tconst apply = (id: string, pendingEntry: unknown) => {\n\t\tconst payload = unwrapPendingPayload(pendingEntry);\n\t\tif (!canApplyImmediately()) {\n\t\t\tpending[id] = payload;\n\n\t\t\treturn;\n\t\t}\n\t\tconst consumer = consumers[id];\n\t\tif (typeof consumer !== 'function') {\n\t\t\tapplyToDom(id, payload, pendingEntry);\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst handled = consumer(payload);\n\t\tif (handled !== false) {\n\t\t\tdelete pending[id];\n\n\t\t\treturn;\n\t\t}\n\n\t\tapplyToDom(id, payload, pendingEntry);\n\t};\n\tconst applyToDom = (\n\t\tid: string,\n\t\tpayload: unknown,\n\t\tpendingEntry: unknown\n\t) => {\n\t\tif (isAngularDeferPayload(payload)) {\n\t\t\tpending[id] = payload;\n\n\t\t\treturn;\n\t\t}\n\t\tconst node = document.getElementById(id);\n\t\tif (!node) {\n\t\t\tpending[id] = payload;\n\n\t\t\treturn;\n\t\t}\n\t\tconst html = resolveHtml(payload);\n\t\tif (\n\t\t\tisVueSuspensePayload(payload) &&\n\t\t\tisPatchedPendingEntry(pendingEntry)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tnode.innerHTML = html;\n\t\tnode.setAttribute('data-absolute-slot-state', 'resolved');\n\t\twindow.dispatchEvent(\n\t\t\tnew CustomEvent(SLOT_PATCH_EVENT, {\n\t\t\t\tdetail: { html, id, payload }\n\t\t\t})\n\t\t);\n\t\tif (isVueSuspensePayload(payload)) {\n\t\t\tpending[id] = { domPatched: true, payload };\n\n\t\t\treturn;\n\t\t}\n\t\tdelete pending[id];\n\t};\n\n\tconst flush = () => {\n\t\tfor (const id in pending) {\n\t\t\tif (!Object.prototype.hasOwnProperty.call(pending, id)) continue;\n\t\t\tapply(id, pending[id] ?? '');\n\t\t}\n\t};\n\n\tabsoluteWindow.__ABS_SLOT_FLUSH__ = flush;\n\tabsoluteWindow.__ABS_SLOT_ENQUEUE__ = (id: string, payload: unknown) => {\n\t\tapply(id, payload);\n\t};\n\n\tif (typeof MutationObserver === 'function') {\n\t\tconst observer = new MutationObserver(flush);\n\t\tconst root = document.documentElement ?? document.body ?? document;\n\t\tobserver.observe(root, { childList: true, subtree: true });\n\t}\n\n\tif (document.readyState === 'loading') {\n\t\tdocument.addEventListener('DOMContentLoaded', flush, { once: true });\n\t}\n\tflush();\n};\n\nconst stripFunctionWrapper = (value: string) => {\n\tconst start = value.indexOf('{');\n\tconst end = value.lastIndexOf('}');\n\tif (start < 0 || end <= start) return '';\n\n\treturn value.slice(start + 1, end);\n};\n\nexport const getStreamSwapRuntimeScript = () =>\n\t`(function(){${stripFunctionWrapper(streamSwapRuntime.toString())}})();`;\n",
|
|
8
|
+
"const ESCAPE_LOOKUP: Record<string, string> = {\n\t'\\u2028': '\\\\u2028',\n\t'\\u2029': '\\\\u2029',\n\t'<': '\\\\u003C'\n};\n\nconst ESCAPE_REGEX = /[<\\u2028\\u2029]/g;\n\nexport const escapeScriptContent = (content: string) =>\n\tcontent.replace(ESCAPE_REGEX, (char) => {\n\t\tconst escaped = ESCAPE_LOOKUP[char];\n\n\t\treturn escaped !== undefined ? escaped : char;\n\t});\n",
|
|
9
|
+
"import { getStreamSwapRuntimeScript } from '../client/streamSwap';\nimport { BASE_36_RADIX, RANDOM_ID_END_INDEX } from '../constants';\nimport { escapeScriptContent } from './escapeScriptContent';\n\nconst SLOT_ID_PREFIX = 'abs-slot-';\nconst CLOSING_BODY_TAG = '</body>';\nconst CLOSING_HEAD_TAG = '</head>';\nconst CLOSING_BODY_TAG_LENGTH = CLOSING_BODY_TAG.length;\nconst CLOSING_HEAD_TAG_LENGTH = CLOSING_HEAD_TAG.length;\nconst CLOSING_PAGE_TAG_REGEX = /<\\/body>\\s*<\\/html>\\s*$/i;\nconst STREAMING_RUNTIME_GLOBAL = '__ABS_SLOT_ENQUEUE__';\nconst STREAMING_PENDING_GLOBAL = '__ABS_SLOT_PENDING__';\nconst STREAM_TAIL_LOOKBEHIND = 128;\nconst STREAMING_SLOT_TIMEOUT_MS = 5_000;\nconst STREAMING_SLOT_MAX_PER_RESPONSE = 128;\nconst STREAMING_SLOT_MAX_HTML_BYTES = 64_000;\n\ntype SlotResolver = () => Promise<unknown> | unknown;\ntype SlotErrorHandler = (error: unknown, slot: StreamingSlot) => void;\ntype StreamReader = ReadableStreamDefaultReader<string | Uint8Array>;\ntype StreamReadPromise = ReturnType<StreamReader['read']>;\nexport type StreamingSlotMetricType =\n\t| 'prepared'\n\t| 'dropped'\n\t| 'resolved'\n\t| 'patched'\n\t| 'timeout'\n\t| 'size_exceeded'\n\t| 'error';\nexport type StreamingSlotMetric = {\n\ttype: StreamingSlotMetricType;\n\tslotId: string;\n\tdurationMs?: number;\n\tbytes?: number;\n\treason?: string;\n\terror?: unknown;\n};\nexport type StreamingSlotMetricHandler = (metric: StreamingSlotMetric) => void;\n\nexport type StreamingSlotPolicy = {\n\ttimeoutMs?: number;\n\tfallbackHtml?: unknown;\n\terrorHtml?: unknown;\n\tmaxSlotsPerResponse?: number;\n\tmaxSlotHtmlSizeBytes?: number;\n\tonError?: SlotErrorHandler;\n\tonSlotMetric?: StreamingSlotMetricHandler;\n};\n\ntype StreamingSlotPolicyValue = {\n\ttimeoutMs: number;\n\tfallbackHtml: string;\n\terrorHtml?: string;\n\tmaxSlotsPerResponse: number;\n\tmaxSlotHtmlSizeBytes: number;\n\tonError?: SlotErrorHandler;\n\tonSlotMetric?: StreamingSlotMetricHandler;\n};\n\nexport type StreamingSlot = {\n\terrorHtml?: unknown;\n\tfallbackHtml?: unknown;\n\tid: string;\n\ttimeoutMs?: number;\n\tresolve: SlotResolver;\n};\n\nexport type StreamingSlotPatchPayload =\n\t| string\n\t| {\n\t\t\t[key: string]: unknown;\n\t\t\thtml: string;\n\t };\n\ntype DeferredStreamingSlot = Omit<StreamingSlot, 'id'> & { id?: string };\n\nexport type AppendStreamingSlotsOptions = {\n\tinjectRuntime?: boolean;\n\tnonce?: string;\n\truntimePreludeScript?: string;\n\tpolicy?: StreamingSlotPolicy;\n\tonSlotMetric?: StreamingSlotMetricHandler;\n\tonError?: (error: unknown, slot: StreamingSlot) => void;\n\truntimePlacement?: 'body' | 'head';\n};\n\nexport type StreamOutOfOrderSlotsOptions = {\n\tfooterHtml?: string;\n\theaderHtml?: string;\n\tnonce?: string;\n\tpolicy?: StreamingSlotPolicy;\n\tonSlotMetric?: StreamingSlotMetricHandler;\n\tonError?: (error: unknown, slot: StreamingSlot) => void;\n\tslots: DeferredStreamingSlot[];\n};\n\nconst createSlotPatchStatement = (\n\tid: string,\n\tpayload: StreamingSlotPatchPayload\n) =>\n\t`(window.${STREAMING_RUNTIME_GLOBAL}||function(i,p){window.${STREAMING_PENDING_GLOBAL}=window.${STREAMING_PENDING_GLOBAL}||{};window.${STREAMING_PENDING_GLOBAL}[i]=p;})(${JSON.stringify(id)},${JSON.stringify(payload)});`;\n\nconst createNonceAttr = (nonce?: string) => (nonce ? ` nonce=\"${nonce}\"` : '');\n\nexport const createStreamingSlotId = () =>\n\t`${SLOT_ID_PREFIX}${Math.random().toString(BASE_36_RADIX).slice(2, RANDOM_ID_END_INDEX)}`;\nexport const getStreamingSlotsRuntimeScript = () =>\n\tgetStreamSwapRuntimeScript();\nexport const injectHtmlIntoBody = (html: string, injection: string) => {\n\tconst closingBodyIndex = html.indexOf(CLOSING_BODY_TAG);\n\tif (closingBodyIndex >= 0) {\n\t\treturn `${html.slice(0, closingBodyIndex)}${injection}${html.slice(closingBodyIndex)}`;\n\t}\n\n\treturn `${html}${injection}`;\n};\nexport const injectHtmlIntoHead = (html: string, injection: string) => {\n\tconst closingHeadIndex = html.indexOf(CLOSING_HEAD_TAG);\n\tif (closingHeadIndex >= 0) {\n\t\treturn `${html.slice(0, closingHeadIndex)}${injection}${html.slice(closingHeadIndex)}`;\n\t}\n\n\treturn `${html}${injection}`;\n};\nexport const renderStreamingSlotPatchTag = (\n\tid: string,\n\tpayload: StreamingSlotPatchPayload,\n\tnonce?: string\n) =>\n\t`<script${createNonceAttr(nonce)}>${escapeScriptContent(\n\t\tcreateSlotPatchStatement(id, payload)\n\t)}</script>`;\nexport const renderStreamingSlotPlaceholder = (id: string, fallbackHtml = '') =>\n\t`<div id=\"${id}\" data-absolute-slot=\"true\" data-absolute-slot-state=\"fallback\">${fallbackHtml}</div>`;\nexport const renderStreamingSlotsRuntimeTag = (\n\tnonce?: string,\n\truntimePreludeScript?: string\n) => {\n\tconst runtimeBody = [\n\t\truntimePreludeScript?.trim() ? runtimePreludeScript.trim() : '',\n\t\tgetStreamingSlotsRuntimeScript()\n\t]\n\t\t.filter(Boolean)\n\t\t.join(';');\n\n\treturn `<script${createNonceAttr(nonce)}>${escapeScriptContent(runtimeBody)}</script>`;\n};\n\nconst toUint8 = (value: string, encoder: TextEncoder) => encoder.encode(value);\n\ntype SafeHtmlLike = {\n\tchangingThisBreaksApplicationSecurity: string;\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isSafeHtmlLike = (value: unknown): value is SafeHtmlLike =>\n\tisRecord(value) &&\n\ttypeof value.changingThisBreaksApplicationSecurity === 'string';\n\nconst normalizeSafeHtml = (value: unknown) => {\n\tif (isSafeHtmlLike(value)) {\n\t\treturn value.changingThisBreaksApplicationSecurity;\n\t}\n\n\treturn value;\n};\n\nlet currentStreamingSlotPolicy: StreamingSlotPolicyValue = {\n\terrorHtml: undefined,\n\tfallbackHtml: '',\n\tmaxSlotHtmlSizeBytes: STREAMING_SLOT_MAX_HTML_BYTES,\n\tmaxSlotsPerResponse: STREAMING_SLOT_MAX_PER_RESPONSE,\n\ttimeoutMs: STREAMING_SLOT_TIMEOUT_MS\n};\n\nconst clonePolicy = (\n\tpolicy: StreamingSlotPolicyValue\n): StreamingSlotPolicyValue => ({\n\t...policy\n});\n\nconst normalizeSlotBytes = (value: unknown, fallback: number) => {\n\tif (typeof value === 'number' && Number.isFinite(value) && value >= 0) {\n\t\treturn Math.floor(value);\n\t}\n\n\treturn fallback;\n};\n\nconst normalizeSlotText = (value: unknown, fallback: string) => {\n\tconst normalizedValue = normalizeSafeHtml(value);\n\n\treturn typeof normalizedValue === 'string' ? normalizedValue : fallback;\n};\nconst normalizeSlotError = (\n\tvalue: unknown,\n\tfallback: string | undefined = undefined\n) => {\n\tconst safeValue = normalizeSafeHtml(value);\n\tif (typeof safeValue === 'string') return safeValue;\n\n\treturn fallback;\n};\nconst hasPolicyValue = (\n\tpolicy: StreamingSlotPolicy,\n\tkey: keyof StreamingSlotPolicy\n) => Object.prototype.hasOwnProperty.call(policy, key);\n\nconst applyStreamingSlotPolicyOverrides = (\n\tbase: StreamingSlotPolicyValue,\n\toverridePolicy: StreamingSlotPolicy = {}\n) => ({\n\terrorHtml: hasPolicyValue(overridePolicy, 'errorHtml')\n\t\t? normalizeSlotError(overridePolicy.errorHtml)\n\t\t: base.errorHtml,\n\tfallbackHtml: hasPolicyValue(overridePolicy, 'fallbackHtml')\n\t\t? normalizeSlotText(overridePolicy.fallbackHtml, '')\n\t\t: base.fallbackHtml,\n\tmaxSlotHtmlSizeBytes: hasPolicyValue(overridePolicy, 'maxSlotHtmlSizeBytes')\n\t\t? normalizeSlotBytes(\n\t\t\t\toverridePolicy.maxSlotHtmlSizeBytes,\n\t\t\t\tbase.maxSlotHtmlSizeBytes\n\t\t\t)\n\t\t: base.maxSlotHtmlSizeBytes,\n\tmaxSlotsPerResponse: hasPolicyValue(overridePolicy, 'maxSlotsPerResponse')\n\t\t? normalizeSlotBytes(\n\t\t\t\toverridePolicy.maxSlotsPerResponse,\n\t\t\t\tbase.maxSlotsPerResponse\n\t\t\t)\n\t\t: base.maxSlotsPerResponse,\n\tonError: hasPolicyValue(overridePolicy, 'onError')\n\t\t? overridePolicy.onError\n\t\t: base.onError,\n\tonSlotMetric: hasPolicyValue(overridePolicy, 'onSlotMetric')\n\t\t? overridePolicy.onSlotMetric\n\t\t: base.onSlotMetric,\n\ttimeoutMs: hasPolicyValue(overridePolicy, 'timeoutMs')\n\t\t? normalizeSlotBytes(overridePolicy.timeoutMs, base.timeoutMs)\n\t\t: base.timeoutMs\n});\n\nconst createCombinedSlotErrorHandler = (\n\tpolicyOnError?: SlotErrorHandler,\n\tenhancerOnError?: SlotErrorHandler\n) => {\n\tif (!policyOnError && !enhancerOnError) return undefined;\n\n\treturn (error: unknown, slot: StreamingSlot) => {\n\t\tpolicyOnError?.(error, slot);\n\t\tenhancerOnError?.(error, slot);\n\t};\n};\n\nconst createCombinedSlotMetricHandler = (\n\tpolicyOnSlotMetric?: StreamingSlotMetricHandler,\n\tcallOnSlotMetric?: StreamingSlotMetricHandler\n) => {\n\tif (!policyOnSlotMetric && !callOnSlotMetric) return undefined;\n\n\treturn (metric: StreamingSlotMetric) => {\n\t\tpolicyOnSlotMetric?.(metric);\n\t\tcallOnSlotMetric?.(metric);\n\t};\n};\n\nconst resolveStreamingSlotPolicy = (\n\toverridePolicy: StreamingSlotPolicy = {}\n) => {\n\tconst base = getStreamingSlotPolicy();\n\n\treturn applyStreamingSlotPolicyOverrides(base, overridePolicy);\n};\n\nexport const getStreamingSlotPolicy = () =>\n\tclonePolicy(currentStreamingSlotPolicy);\n\nexport const setStreamingSlotPolicy = (policy: StreamingSlotPolicy = {}) => {\n\tconst base = getStreamingSlotPolicy();\n\n\tcurrentStreamingSlotPolicy = applyStreamingSlotPolicyOverrides(\n\t\tbase,\n\t\tpolicy\n\t);\n};\n\nexport const withStreamingSlotPolicy = async <T>(\n\tpolicy: StreamingSlotPolicy,\n\tcallback: () => Promise<T> | T\n) => {\n\tconst previous = getStreamingSlotPolicy();\n\n\tsetStreamingSlotPolicy(policy);\n\ttry {\n\t\treturn await callback();\n\t} finally {\n\t\tcurrentStreamingSlotPolicy = previous;\n\t}\n};\n\nconst emitSlotMetric = (\n\tmetric: StreamingSlotMetric,\n\tonSlotMetric?: StreamingSlotMetricHandler\n) => {\n\tonSlotMetric?.(metric);\n};\n\nconst createTimeoutError = (slot: StreamingSlot, timeoutMs: number) => {\n\tconst error = Object.assign(\n\t\tnew Error(`Streaming slot \"${slot.id}\" timed out after ${timeoutMs}ms`),\n\t\t{ __absTimeout: true }\n\t);\n\n\treturn error;\n};\n\nconst isSlotPatchPayloadObject = (\n\tvalue: unknown\n): value is Record<string, unknown> & { html: unknown } =>\n\tisRecord(value) && 'html' in value;\n\nconst isTimeoutError = (\n\terror: unknown\n): error is Error & { __absTimeout: true } =>\n\tisRecord(error) && error.__absTimeout === true;\n\nconst toStreamingSlot = (\n\tslot: DeferredStreamingSlot,\n\tpolicy: StreamingSlotPolicyValue\n): StreamingSlot => ({\n\terrorHtml: slot.errorHtml === undefined ? policy.errorHtml : slot.errorHtml,\n\tfallbackHtml: normalizeSlotText(slot.fallbackHtml, policy.fallbackHtml),\n\tid: slot.id ?? createStreamingSlotId(),\n\tresolve: slot.resolve,\n\ttimeoutMs: normalizeSlotBytes(slot.timeoutMs, policy.timeoutMs)\n});\n\nconst prepareSlots = ({\n\tpolicy,\n\tslots,\n\tonError,\n\tonSlotMetric\n}: {\n\tpolicy: StreamingSlotPolicyValue;\n\tslots: DeferredStreamingSlot[];\n\tonError?: SlotErrorHandler;\n\tonSlotMetric?: StreamingSlotMetricHandler;\n}) => {\n\tconst preparedSlots = slots.map((slot) => toStreamingSlot(slot, policy));\n\tconst emitPreparedSlotMetric = (slot: StreamingSlot) => {\n\t\temitSlotMetric(\n\t\t\t{\n\t\t\t\tslotId: slot.id,\n\t\t\t\ttype: 'prepared'\n\t\t\t},\n\t\t\tonSlotMetric\n\t\t);\n\t};\n\tconst dropPreparedSlot = (slot: StreamingSlot, reason: string) => {\n\t\tonError?.(new Error(reason), slot);\n\t\temitSlotMetric(\n\t\t\t{\n\t\t\t\treason,\n\t\t\t\tslotId: slot.id,\n\t\t\t\ttype: 'dropped'\n\t\t\t},\n\t\t\tonSlotMetric\n\t\t);\n\t};\n\n\tconst { maxSlotsPerResponse } = policy;\n\tif (maxSlotsPerResponse === 0) {\n\t\tpreparedSlots.forEach((slot) =>\n\t\t\tdropPreparedSlot(slot, 'maxSlotsPerResponse is 0')\n\t\t);\n\n\t\treturn [];\n\t}\n\n\tif (preparedSlots.length <= maxSlotsPerResponse) {\n\t\tpreparedSlots.forEach(emitPreparedSlotMetric);\n\n\t\treturn preparedSlots;\n\t}\n\n\tconst keptSlots = preparedSlots.slice(0, maxSlotsPerResponse);\n\tconst droppedSlots = preparedSlots.slice(maxSlotsPerResponse);\n\tdroppedSlots.forEach((slot) => {\n\t\tdropPreparedSlot(\n\t\t\tslot,\n\t\t\t`Streaming slot \"${slot.id}\" dropped because ${maxSlotsPerResponse} slots is the configured maximum`\n\t\t);\n\t});\n\tkeptSlots.forEach(emitPreparedSlotMetric);\n\n\treturn keptSlots;\n};\n\nconst htmlByteLength = (value: string, encoder: TextEncoder) =>\n\tencoder.encode(value).length;\n\ntype ResolvedStreamingSlot = {\n\tpayload: StreamingSlotPatchPayload | null;\n\tid: string;\n\tdurationMs: number;\n\tbytes: number;\n};\n\nconst normalizeSlotPatchPayload = (value: unknown) => {\n\tconst safeValue = normalizeSafeHtml(value);\n\tif (\n\t\tisSlotPatchPayloadObject(safeValue) &&\n\t\ttypeof safeValue.html === 'string'\n\t) {\n\t\treturn {\n\t\t\t...safeValue,\n\t\t\thtml: normalizeSlotText(safeValue.html, '')\n\t\t};\n\t}\n\n\treturn typeof safeValue === 'string' ? safeValue : `${safeValue}`;\n};\n\nconst getPayloadHtml = (payload: StreamingSlotPatchPayload) =>\n\ttypeof payload === 'string' ? payload : payload.html;\n\nconst enqueueEncodedText = (\n\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\tencoder: TextEncoder,\n\tvalue: string\n) => {\n\tif (value.length === 0) {\n\t\treturn;\n\t}\n\n\tcontroller.enqueue(encoder.encode(value));\n};\n\nconst readStreamingRuntimeChunk = async (\n\treader: ReadableStreamDefaultReader<string | Uint8Array>\n) => {\n\tconst { done, value } = await reader.read();\n\tif (done || !value) {\n\t\treturn { done, value: undefined };\n\t}\n\n\treturn { done, value };\n};\n\nconst applyBaseWinnerState = (\n\tstate: {\n\t\tbaseDone: boolean;\n\t\tbaseRead: StreamReadPromise;\n\t\tfooter: string;\n\t\thandled: boolean;\n\t\ttail: string;\n\t},\n\twinner:\n\t\t| {\n\t\t\t\tdone: boolean;\n\t\t\t\tkind: 'base';\n\t\t\t\tvalue?: string | Uint8Array;\n\t\t }\n\t\t| {\n\t\t\t\tkind: 'slot';\n\t\t\t\toriginal: Promise<{\n\t\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\t\tid: string;\n\t\t\t\t\tdurationMs: number;\n\t\t\t\t\tbytes: number;\n\t\t\t\t}>;\n\t\t\t\tresult: {\n\t\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\t\tid: string;\n\t\t\t\t\tdurationMs: number;\n\t\t\t\t\tbytes: number;\n\t\t\t\t};\n\t\t },\n\thandleResolved: (winner: {\n\t\tkind: 'slot';\n\t\toriginal: Promise<{\n\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\tid: string;\n\t\t\tdurationMs: number;\n\t\t\tbytes: number;\n\t\t}>;\n\t\tresult: {\n\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\tid: string;\n\t\t\tdurationMs: number;\n\t\t\tbytes: number;\n\t\t};\n\t}) => void\n) => {\n\tif (!state.handled && winner.kind === 'slot') {\n\t\thandleResolved(winner);\n\t}\n\n\treturn state;\n};\n\nconst resolveOversizedSlotPayload = (input: {\n\tencoder: TextEncoder;\n\thtml: string;\n\tmaxSlotHtmlSizeBytes: number;\n\tonError?: SlotErrorHandler;\n\tonSlotMetric?: StreamingSlotMetricHandler;\n\tslot: StreamingSlot;\n\tstart: number;\n}) => {\n\tconst {\n\t\tencoder,\n\t\thtml,\n\t\tmaxSlotHtmlSizeBytes,\n\t\tonError,\n\t\tonSlotMetric,\n\t\tslot,\n\t\tstart\n\t} = input;\n\tconst bytes = htmlByteLength(html, encoder);\n\tif (bytes <= maxSlotHtmlSizeBytes) {\n\t\treturn null;\n\t}\n\n\tconst error = new Error(\n\t\t`Streaming slot \"${slot.id}\" exceeded max payload size of ${maxSlotHtmlSizeBytes} bytes`\n\t);\n\tconst durationMs = Date.now() - start;\n\tonError?.(error, slot);\n\temitSlotMetric(\n\t\t{\n\t\t\tbytes,\n\t\t\tdurationMs,\n\t\t\terror,\n\t\t\tslotId: slot.id,\n\t\t\ttype: 'size_exceeded'\n\t\t},\n\t\tonSlotMetric\n\t);\n\n\tconst fallbackHtml = normalizeSlotError(slot.errorHtml, undefined);\n\n\treturn {\n\t\tbytes:\n\t\t\tfallbackHtml === undefined\n\t\t\t\t? 0\n\t\t\t\t: htmlByteLength(fallbackHtml, encoder),\n\t\tdurationMs,\n\t\tid: slot.id,\n\t\tpayload: fallbackHtml === undefined ? null : fallbackHtml\n\t};\n};\n\nconst raceWithTimeout = (promise: Promise<unknown>, slot: StreamingSlot) => {\n\tconst { timeoutMs } = slot;\n\tif (typeof timeoutMs !== 'number' || timeoutMs <= 0) {\n\t\treturn promise;\n\t}\n\n\tconst { promise: timeoutPromise, reject } =\n\t\tPromise.withResolvers<StreamingSlotPatchPayload>();\n\n\tsetTimeout(() => {\n\t\treject(createTimeoutError(slot, timeoutMs));\n\t}, timeoutMs);\n\n\treturn Promise.race([promise, timeoutPromise]);\n};\n\nconst resolveSlot = async (\n\tslot: StreamingSlot,\n\tonError?: SlotErrorHandler,\n\tpolicy?: StreamingSlotPolicyValue,\n\tonSlotMetric?: StreamingSlotMetricHandler\n) => {\n\tconst safePolicy = policy ?? getStreamingSlotPolicy();\n\tconst encoder = new TextEncoder();\n\tconst start = Date.now();\n\ttry {\n\t\tconst maybeAsyncValue = Promise.resolve(slot.resolve());\n\t\tconst resolved = await raceWithTimeout(maybeAsyncValue, slot);\n\t\tconst payload = normalizeSlotPatchPayload(resolved);\n\t\tconst html = getPayloadHtml(payload);\n\t\tconst oversizedResult =\n\t\t\tsafePolicy.maxSlotHtmlSizeBytes > 0\n\t\t\t\t? resolveOversizedSlotPayload({\n\t\t\t\t\t\tencoder,\n\t\t\t\t\t\thtml,\n\t\t\t\t\t\tmaxSlotHtmlSizeBytes: safePolicy.maxSlotHtmlSizeBytes,\n\t\t\t\t\t\tonError,\n\t\t\t\t\t\tonSlotMetric,\n\t\t\t\t\t\tslot,\n\t\t\t\t\t\tstart\n\t\t\t\t\t})\n\t\t\t\t: null;\n\t\tif (oversizedResult) {\n\t\t\treturn oversizedResult;\n\t\t}\n\t\tconst durationMs = Date.now() - start;\n\t\tconst bytes = htmlByteLength(html, encoder);\n\t\temitSlotMetric(\n\t\t\t{\n\t\t\t\tbytes,\n\t\t\t\tdurationMs,\n\t\t\t\tslotId: slot.id,\n\t\t\t\ttype: 'resolved'\n\t\t\t},\n\t\t\tonSlotMetric\n\t\t);\n\n\t\treturn {\n\t\t\tbytes,\n\t\t\tdurationMs,\n\t\t\tid: slot.id,\n\t\t\tpayload\n\t\t};\n\t} catch (error) {\n\t\tconst durationMs = Date.now() - start;\n\t\tonError?.(error, slot);\n\t\temitSlotMetric(\n\t\t\t{\n\t\t\t\tdurationMs,\n\t\t\t\terror,\n\t\t\t\tslotId: slot.id,\n\t\t\t\ttype: isTimeoutError(error) ? 'timeout' : 'error'\n\t\t\t},\n\t\t\tonSlotMetric\n\t\t);\n\t\tconst html = normalizeSlotError(slot.errorHtml, undefined);\n\t\tif (html) {\n\t\t\treturn {\n\t\t\t\tbytes: htmlByteLength(html, encoder),\n\t\t\t\tdurationMs,\n\t\t\t\tid: slot.id,\n\t\t\t\tpayload: html\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tbytes: 0,\n\t\t\tdurationMs,\n\t\t\tid: slot.id,\n\t\t\tpayload: null\n\t\t};\n\t}\n};\n\nconst nextResolvedSlot = async (\n\tpending: Array<Promise<ResolvedStreamingSlot>>\n) => {\n\tconst wrapped = pending.map((promise) =>\n\t\tpromise.then((result) => ({\n\t\t\toriginal: promise,\n\t\t\tresult\n\t\t}))\n\t);\n\n\treturn Promise.race(wrapped);\n};\n\nconst streamChunkToString = (\n\tvalue: string | Uint8Array,\n\tdecoder: TextDecoder\n) =>\n\ttypeof value === 'string' ? value : decoder.decode(value, { stream: true });\n\nexport const appendStreamingSlotPatchesToStream = (\n\tstream: ReadableStream<string | Uint8Array>,\n\tslots: DeferredStreamingSlot[] = [],\n\t{\n\t\tinjectRuntime = true,\n\t\tnonce,\n\t\tonError,\n\t\tonSlotMetric,\n\t\tpolicy,\n\t\truntimePreludeScript,\n\t\truntimePlacement = 'head'\n\t}: AppendStreamingSlotsOptions = {}\n) => {\n\tconst resolvedPolicy = resolveStreamingSlotPolicy(policy);\n\tconst combinedOnError = createCombinedSlotErrorHandler(\n\t\tresolvedPolicy.onError,\n\t\tonError\n\t);\n\tconst combinedOnSlotMetric = createCombinedSlotMetricHandler(\n\t\tresolvedPolicy.onSlotMetric,\n\t\tonSlotMetric\n\t);\n\tconst effectivePolicy: StreamingSlotPolicyValue = {\n\t\t...resolvedPolicy,\n\t\tonSlotMetric: combinedOnSlotMetric\n\t};\n\tconst preparedSlots = prepareSlots({\n\t\tonError: combinedOnError,\n\t\tonSlotMetric: combinedOnSlotMetric,\n\t\tpolicy: effectivePolicy,\n\t\tslots\n\t});\n\tif (preparedSlots.length === 0) return stream;\n\n\tconst source = injectRuntime\n\t\t? injectStreamingRuntimeIntoStream(\n\t\t\t\tstream,\n\t\t\t\tnonce,\n\t\t\t\truntimePlacement,\n\t\t\t\truntimePreludeScript\n\t\t\t)\n\t\t: stream;\n\tconst encoder = new TextEncoder();\n\tconst decoder = new TextDecoder();\n\tconst reader = source.getReader();\n\tconst pending: Array<Promise<ResolvedStreamingSlot>> = preparedSlots.map(\n\t\t(slot) =>\n\t\t\tresolveSlot(\n\t\t\t\tslot,\n\t\t\t\tcombinedOnError,\n\t\t\t\teffectivePolicy,\n\t\t\t\tcombinedOnSlotMetric\n\t\t\t)\n\t);\n\tconst createRaceCandidates = (\n\t\tbaseDone: boolean,\n\t\tbaseRead: StreamReadPromise\n\t) => {\n\t\tconst racers: Array<\n\t\t\tPromise<\n\t\t\t\t| {\n\t\t\t\t\t\tdone: boolean;\n\t\t\t\t\t\tkind: 'base';\n\t\t\t\t\t\tvalue?: string | Uint8Array;\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\tkind: 'slot';\n\t\t\t\t\t\toriginal: Promise<{\n\t\t\t\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tdurationMs: number;\n\t\t\t\t\t\t\tbytes: number;\n\t\t\t\t\t\t}>;\n\t\t\t\t\t\tresult: {\n\t\t\t\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tdurationMs: number;\n\t\t\t\t\t\t\tbytes: number;\n\t\t\t\t\t\t};\n\t\t\t\t }\n\t\t\t>\n\t\t> = [];\n\n\t\tif (!baseDone) {\n\t\t\tracers.push(\n\t\t\t\tbaseRead.then(({ done, value }) => ({\n\t\t\t\t\tdone,\n\t\t\t\t\tkind: 'base' as const,\n\t\t\t\t\tvalue\n\t\t\t\t}))\n\t\t\t);\n\t\t}\n\t\tif (pending.length > 0) {\n\t\t\tracers.push(\n\t\t\t\tnextResolvedSlot(pending).then((resolved) => ({\n\t\t\t\t\tkind: 'slot' as const,\n\t\t\t\t\t...resolved\n\t\t\t\t}))\n\t\t\t);\n\t\t}\n\n\t\treturn racers;\n\t};\n\tconst flushTailLookbehind = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\ttail: string\n\t) => {\n\t\tif (tail.length <= STREAM_TAIL_LOOKBEHIND) {\n\t\t\treturn tail;\n\t\t}\n\n\t\tconst content = tail.slice(0, tail.length - STREAM_TAIL_LOOKBEHIND);\n\t\tcontroller.enqueue(encoder.encode(content));\n\n\t\treturn tail.slice(-STREAM_TAIL_LOOKBEHIND);\n\t};\n\tconst finalizeCompletedBaseWinner = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tdecodedTail: string,\n\t\tbaseRead: StreamReadPromise\n\t) => {\n\t\tconst footerStart = decodedTail.search(CLOSING_PAGE_TAG_REGEX);\n\t\tif (footerStart < 0) {\n\t\t\tenqueueEncodedText(controller, encoder, decodedTail);\n\n\t\t\treturn {\n\t\t\t\tbaseDone: true,\n\t\t\t\tbaseRead,\n\t\t\t\tfooter: '',\n\t\t\t\thandled: true,\n\t\t\t\ttail: ''\n\t\t\t};\n\t\t}\n\n\t\tconst content = decodedTail.slice(0, footerStart);\n\t\tconst nextFooter = decodedTail.slice(footerStart);\n\t\tenqueueEncodedText(controller, encoder, content);\n\n\t\treturn {\n\t\t\tbaseDone: true,\n\t\t\tbaseRead,\n\t\t\tfooter: nextFooter,\n\t\t\thandled: true,\n\t\t\ttail: ''\n\t\t};\n\t};\n\tconst handleBaseWinner = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\twinner:\n\t\t\t| {\n\t\t\t\t\tdone: boolean;\n\t\t\t\t\tkind: 'base';\n\t\t\t\t\tvalue?: string | Uint8Array;\n\t\t\t }\n\t\t\t| {\n\t\t\t\t\tkind: 'slot';\n\t\t\t\t\toriginal: Promise<{\n\t\t\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\t\t\tid: string;\n\t\t\t\t\t\tdurationMs: number;\n\t\t\t\t\t\tbytes: number;\n\t\t\t\t\t}>;\n\t\t\t\t\tresult: {\n\t\t\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\t\t\tid: string;\n\t\t\t\t\t\tdurationMs: number;\n\t\t\t\t\t\tbytes: number;\n\t\t\t\t\t};\n\t\t\t },\n\t\tbaseRead: StreamReadPromise,\n\t\ttail: string,\n\t\tfooter: string\n\t) => {\n\t\tif (winner.kind !== 'base') {\n\t\t\treturn { baseDone: false, baseRead, footer, handled: false, tail };\n\t\t}\n\n\t\tif (winner.done) {\n\t\t\treturn finalizeCompletedBaseWinner(\n\t\t\t\tcontroller,\n\t\t\t\ttail + decoder.decode(),\n\t\t\t\tbaseRead\n\t\t\t);\n\t\t}\n\n\t\tif (!winner.value) {\n\t\t\treturn { baseDone: false, baseRead, footer, handled: true, tail };\n\t\t}\n\n\t\tconst nextTail = flushTailLookbehind(\n\t\t\tcontroller,\n\t\t\ttail + streamChunkToString(winner.value, decoder)\n\t\t);\n\n\t\treturn {\n\t\t\tbaseDone: false,\n\t\t\tbaseRead: reader.read(),\n\t\t\tfooter,\n\t\t\thandled: true,\n\t\t\ttail: nextTail\n\t\t};\n\t};\n\tconst handleResolvedSlot = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\twinner: {\n\t\t\tkind: 'slot';\n\t\t\toriginal: Promise<{\n\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\tid: string;\n\t\t\t\tdurationMs: number;\n\t\t\t\tbytes: number;\n\t\t\t}>;\n\t\t\tresult: {\n\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\tid: string;\n\t\t\t\tdurationMs: number;\n\t\t\t\tbytes: number;\n\t\t\t};\n\t\t}\n\t) => {\n\t\tconst index = pending.indexOf(winner.original);\n\t\tif (index >= 0) pending.splice(index, 1);\n\t\tif (winner.result.payload === null) {\n\t\t\treturn;\n\t\t}\n\n\t\temitSlotMetric(\n\t\t\t{\n\t\t\t\tbytes: winner.result.bytes,\n\t\t\t\tdurationMs: winner.result.durationMs,\n\t\t\t\tslotId: winner.result.id,\n\t\t\t\ttype: 'patched'\n\t\t\t},\n\t\t\tcombinedOnSlotMetric\n\t\t);\n\n\t\tcontroller.enqueue(\n\t\t\tencoder.encode(\n\t\t\t\trenderStreamingSlotPatchTag(\n\t\t\t\t\twinner.result.id,\n\t\t\t\t\twinner.result.payload,\n\t\t\t\t\tnonce\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t};\n\n\tconst runPatchedStreamLoop = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>\n\t) => {\n\t\tlet baseDone = false;\n\t\tlet baseRead = reader.read();\n\t\tlet tail = '';\n\t\tlet footer = '';\n\t\tconst readNextRaceWinner = async () => {\n\t\t\tconst racers = createRaceCandidates(baseDone, baseRead);\n\t\t\tif (racers.length === 0) {\n\t\t\t\treturn footer;\n\t\t\t}\n\n\t\t\tconst winner = await Promise.race(racers);\n\t\t\tconst baseWinnerState = applyBaseWinnerState(\n\t\t\t\thandleBaseWinner(controller, winner, baseRead, tail, footer),\n\t\t\t\twinner,\n\t\t\t\t(slotWinner) => {\n\t\t\t\t\thandleResolvedSlot(controller, slotWinner);\n\t\t\t\t}\n\t\t\t);\n\t\t\t({ baseDone, baseRead, footer, tail } = baseWinnerState);\n\t\t\tif (baseDone && pending.length === 0) {\n\t\t\t\treturn footer;\n\t\t\t}\n\n\t\t\treturn readNextRaceWinner();\n\t\t};\n\n\t\treturn readNextRaceWinner();\n\t};\n\n\treturn new ReadableStream<Uint8Array>({\n\t\tasync start(controller) {\n\t\t\ttry {\n\t\t\t\tconst footer = await runPatchedStreamLoop(controller);\n\t\t\t\tenqueueEncodedText(controller, encoder, footer);\n\t\t\t\tcontroller.close();\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t}\n\t});\n};\nexport const injectStreamingRuntimeIntoStream = (\n\tstream: ReadableStream<string | Uint8Array>,\n\tnonce?: string,\n\truntimePlacement: 'body' | 'head' = 'head',\n\truntimePreludeScript?: string\n) => {\n\tconst runtimeTag = renderStreamingSlotsRuntimeTag(\n\t\tnonce,\n\t\truntimePreludeScript\n\t);\n\tconst encoder = new TextEncoder();\n\tconst decoder = new TextDecoder();\n\tconst closingTag =\n\t\truntimePlacement === 'body' ? CLOSING_BODY_TAG : CLOSING_HEAD_TAG;\n\tconst lookbehind =\n\t\t(runtimePlacement === 'body'\n\t\t\t? CLOSING_BODY_TAG_LENGTH\n\t\t\t: CLOSING_HEAD_TAG_LENGTH) - 1;\n\tconst flushRuntimeLookbehind = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: string\n\t) => {\n\t\tif (pending.length <= lookbehind) {\n\t\t\treturn pending;\n\t\t}\n\n\t\tconst safeText = pending.slice(0, pending.length - lookbehind);\n\t\tcontroller.enqueue(encoder.encode(safeText));\n\n\t\treturn pending.slice(-lookbehind);\n\t};\n\tconst injectRuntimeIntoPending = (pending: string) =>\n\t\truntimePlacement === 'body'\n\t\t\t? injectHtmlIntoBody(pending, runtimeTag)\n\t\t\t: injectHtmlIntoHead(pending, runtimeTag);\n\tconst processRuntimePending = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: string,\n\t\tinjected: boolean\n\t) => {\n\t\tif (injected) {\n\t\t\tcontroller.enqueue(encoder.encode(pending));\n\n\t\t\treturn { injected, pending: '' };\n\t\t}\n\n\t\tconst closingTagIndex = pending.indexOf(closingTag);\n\t\tif (closingTagIndex >= 0) {\n\t\t\tconst withRuntime = `${pending.slice(0, closingTagIndex)}${runtimeTag}${pending.slice(closingTagIndex)}`;\n\t\t\tcontroller.enqueue(encoder.encode(withRuntime));\n\n\t\t\treturn { injected: true, pending: '' };\n\t\t}\n\n\t\treturn {\n\t\t\tinjected,\n\t\t\tpending: flushRuntimeLookbehind(controller, pending)\n\t\t};\n\t};\n\n\treturn new ReadableStream<Uint8Array>({\n\t\tasync start(controller) {\n\t\t\tconst reader = stream.getReader();\n\t\t\tlet injected = false;\n\t\t\tlet pending = '';\n\t\t\tconst enqueuePending = () =>\n\t\t\t\tenqueueEncodedText(controller, encoder, pending);\n\t\t\tconst consumeRuntimeChunk = async () => {\n\t\t\t\tconst { done, value } = await readStreamingRuntimeChunk(reader);\n\t\t\t\tif (done || !value) {\n\t\t\t\t\treturn done;\n\t\t\t\t}\n\n\t\t\t\tpending += streamChunkToString(value, decoder);\n\t\t\t\t({ injected, pending } = processRuntimePending(\n\t\t\t\t\tcontroller,\n\t\t\t\t\tpending,\n\t\t\t\t\tinjected\n\t\t\t\t));\n\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tconst runRuntimeInjectionLoop = async () => {\n\t\t\t\tconst done = await consumeRuntimeChunk();\n\t\t\t\tif (done) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tawait runRuntimeInjectionLoop();\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\tawait runRuntimeInjectionLoop();\n\n\t\t\t\tpending += decoder.decode();\n\t\t\t\tpending = injected\n\t\t\t\t\t? pending\n\t\t\t\t\t: injectRuntimeIntoPending(pending);\n\t\t\t\tenqueuePending();\n\t\t\t\tcontroller.close();\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t}\n\t});\n};\nexport const streamOutOfOrderSlots = ({\n\tfooterHtml = '',\n\theaderHtml = '',\n\tnonce,\n\tpolicy,\n\tonSlotMetric,\n\tonError,\n\tslots\n}: StreamOutOfOrderSlotsOptions) => {\n\tconst resolvedPolicy = resolveStreamingSlotPolicy(policy);\n\tconst combinedOnError = createCombinedSlotErrorHandler(\n\t\tresolvedPolicy.onError,\n\t\tonError\n\t);\n\tconst combinedOnSlotMetric = createCombinedSlotMetricHandler(\n\t\tresolvedPolicy.onSlotMetric,\n\t\tonSlotMetric\n\t);\n\tconst effectivePolicy: StreamingSlotPolicyValue = {\n\t\t...resolvedPolicy,\n\t\tonSlotMetric: combinedOnSlotMetric\n\t};\n\tconst preparedSlots = prepareSlots({\n\t\tonError: combinedOnError,\n\t\tonSlotMetric: combinedOnSlotMetric,\n\t\tpolicy: effectivePolicy,\n\t\tslots\n\t});\n\tconst encoder = new TextEncoder();\n\tconst createPendingSlots = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>\n\t) =>\n\t\tpreparedSlots.map((slot) => {\n\t\t\tconst fallback = renderStreamingSlotPlaceholder(\n\t\t\t\tslot.id,\n\t\t\t\tnormalizeSlotText(slot.fallbackHtml, '')\n\t\t\t);\n\t\t\tcontroller.enqueue(toUint8(fallback, encoder));\n\n\t\t\treturn resolveSlot(\n\t\t\t\tslot,\n\t\t\t\tcombinedOnError,\n\t\t\t\teffectivePolicy,\n\t\t\t\tcombinedOnSlotMetric\n\t\t\t);\n\t\t});\n\tconst handleResolvedPreparedSlot = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: Array<\n\t\t\tPromise<{\n\t\t\t\tpayload: StreamingSlotPatchPayload | null;\n\t\t\t\tid: string;\n\t\t\t\tdurationMs: number;\n\t\t\t\tbytes: number;\n\t\t\t}>\n\t\t>\n\t) => {\n\t\tconst { original, result } = await nextResolvedSlot(pending);\n\t\tconst index = pending.indexOf(original);\n\t\tif (index >= 0) pending.splice(index, 1);\n\t\tif (result.payload === null) {\n\t\t\treturn;\n\t\t}\n\n\t\temitSlotMetric(\n\t\t\t{\n\t\t\t\tbytes: result.bytes,\n\t\t\t\tdurationMs: result.durationMs,\n\t\t\t\tslotId: result.id,\n\t\t\t\ttype: 'patched'\n\t\t\t},\n\t\t\tcombinedOnSlotMetric\n\t\t);\n\t\tcontroller.enqueue(\n\t\t\ttoUint8(\n\t\t\t\trenderStreamingSlotPatchTag(result.id, result.payload, nonce),\n\t\t\t\tencoder\n\t\t\t)\n\t\t);\n\t};\n\n\tconst streamPreparedSlots = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>\n\t) => {\n\t\tconst pending = createPendingSlots(controller);\n\t\tconst streamNextPreparedSlot = async () => {\n\t\t\tif (pending.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait handleResolvedPreparedSlot(controller, pending);\n\n\t\t\tawait streamNextPreparedSlot();\n\t\t};\n\n\t\tawait streamNextPreparedSlot();\n\t};\n\tconst resolveHeaderHtml = () => {\n\t\tconst needsRuntimeTag =\n\t\t\tpreparedSlots.length > 0 &&\n\t\t\t!headerHtml.includes(STREAMING_RUNTIME_GLOBAL);\n\t\tif (!needsRuntimeTag) {\n\t\t\treturn headerHtml;\n\t\t}\n\n\t\treturn injectHtmlIntoHead(\n\t\t\theaderHtml,\n\t\t\trenderStreamingSlotsRuntimeTag(nonce)\n\t\t);\n\t};\n\n\treturn new ReadableStream<Uint8Array>({\n\t\tasync start(controller) {\n\t\t\ttry {\n\t\t\t\tconst header = resolveHeaderHtml();\n\t\t\t\tcontroller.enqueue(toUint8(header, encoder));\n\t\t\t\tawait streamPreparedSlots(controller);\n\n\t\t\t\tenqueueEncodedText(controller, encoder, footerHtml);\n\t\t\t\tcontroller.close();\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t}\n\t});\n};\n",
|
|
10
|
+
"import {\n\tMILLISECONDS_IN_A_SECOND,\n\tTIME_PRECISION,\n\tMILLISECONDS_IN_A_MINUTE\n} from '../constants';\n\nexport const getDurationString = (duration: number) => {\n\tlet durationString;\n\n\tif (duration < MILLISECONDS_IN_A_SECOND) {\n\t\tdurationString = `${duration.toFixed(TIME_PRECISION)}ms`;\n\t} else if (duration < MILLISECONDS_IN_A_MINUTE) {\n\t\tdurationString = `${(duration / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;\n\t} else {\n\t\tconst totalSeconds = Math.round(duration / MILLISECONDS_IN_A_SECOND);\n\t\tconst minutes = Math.floor(totalSeconds / 60);\n\t\tconst seconds = totalSeconds % 60;\n\t\tdurationString =\n\t\t\tseconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;\n\t}\n\n\treturn durationString;\n};\n",
|
|
11
|
+
"import { HOURS_IN_HALF_DAY } from '../constants';\nimport { getDurationString } from './getDurationString';\n\nconst colors = {\n\tbold: '\\x1b[1m',\n\tcyan: '\\x1b[36m',\n\tdim: '\\x1b[2m',\n\tgreen: '\\x1b[32m',\n\treset: '\\x1b[0m'\n} as const;\n\nconst MONTHS = [\n\t'Jan',\n\t'Feb',\n\t'Mar',\n\t'Apr',\n\t'May',\n\t'Jun',\n\t'Jul',\n\t'Aug',\n\t'Sep',\n\t'Oct',\n\t'Nov',\n\t'Dec'\n] as const;\n\nexport const formatTimestamp = () => {\n\tconst now = new Date();\n\tconst month = MONTHS[now.getMonth()];\n\tconst day = now.getDate().toString().padStart(2, '0');\n\tlet hours = now.getHours();\n\tconst minutes = now.getMinutes().toString().padStart(2, '0');\n\tconst seconds = now.getSeconds().toString().padStart(2, '0');\n\tconst ampm = hours >= HOURS_IN_HALF_DAY ? 'PM' : 'AM';\n\thours = hours % HOURS_IN_HALF_DAY || HOURS_IN_HALF_DAY;\n\n\treturn `${month} ${day} ${hours}:${minutes}:${seconds} ${ampm}`;\n};\n\nexport const startupBanner = (options: {\n\tversion: string;\n\treadyDuration: number;\n\tbuildDuration?: number;\n\tport: string | number;\n\thost: string;\n\tnetworkUrl?: string;\n\tprotocol?: string;\n}) => {\n\tconst {\n\t\tversion,\n\t\treadyDuration,\n\t\tbuildDuration,\n\t\tport,\n\t\thost,\n\t\tnetworkUrl,\n\t\tprotocol = 'http'\n\t} = options;\n\tconst name = `${colors.cyan}${colors.bold}ABSOLUTEJS${colors.reset}`;\n\tconst ver = `${colors.dim}v${version}${colors.reset}`;\n\tconst time = `${colors.dim}ready in${colors.reset} ${colors.bold}${getDurationString(readyDuration)}${colors.reset}`;\n\tconst build =\n\t\ttypeof buildDuration === 'number' && Number.isFinite(buildDuration)\n\t\t\t? ` ${colors.dim}(build ${getDurationString(buildDuration)})${colors.reset}`\n\t\t\t: '';\n\tconsole.log('');\n\tconsole.log(` ${name} ${ver} ${time}${build}`);\n\tconsole.log('');\n\tconsole.log(\n\t\t` ${colors.green}➜${colors.reset} ${colors.bold}Local:${colors.reset} ${protocol}://${host === '0.0.0.0' ? 'localhost' : host}:${port}/`\n\t);\n\tif (networkUrl) {\n\t\tconsole.log(\n\t\t\t` ${colors.green}➜${colors.reset} ${colors.bold}Network:${colors.reset} ${networkUrl}`\n\t\t);\n\t}\n\tconsole.log('');\n};\n",
|
|
12
|
+
"/**\n * Centralized logger utility for AbsoluteJS\n * Provides formatted output with ANSI colors and timestamps\n */\n\nimport { formatTimestamp, startupBanner } from './startupBanner';\n\nexport { formatTimestamp };\n\n// ANSI color codes\nconst colors = {\n\tblue: '\\x1b[34m',\n\tbold: '\\x1b[1m',\n\t// Core colors\n\tcyan: '\\x1b[36m',\n\tdim: '\\x1b[2m',\n\tgreen: '\\x1b[32m',\n\tmagenta: '\\x1b[35m',\n\tred: '\\x1b[31m',\n\treset: '\\x1b[0m',\n\twhite: '\\x1b[37m',\n\tyellow: '\\x1b[33m'\n} as const;\n\n// Framework color mapping\nconst frameworkColors: Record<string, string> = {\n\tangular: colors.magenta,\n\tassets: colors.dim,\n\tcss: colors.cyan,\n\thtml: colors.white,\n\thtmx: colors.white,\n\treact: colors.blue,\n\tsvelte: colors.yellow,\n\tvue: colors.green\n};\n\n/**\n * Format a file path for display (relative, clean)\n */\nconst formatPath = (filePath: string) => {\n\tconst cwd = process.cwd();\n\tlet relative = filePath.startsWith(cwd)\n\t\t? filePath.slice(cwd.length + 1)\n\t\t: filePath;\n\t// Normalize slashes\n\trelative = relative.replace(/\\\\/g, '/');\n\t// Ensure it starts with /\n\tif (!relative.startsWith('/')) {\n\t\trelative = `/${relative}`;\n\t}\n\n\treturn relative;\n};\n\n/**\n * Get color for a framework\n */\nconst getFrameworkColor = (framework: string) =>\n\tframeworkColors[framework] || colors.white;\n\n/**\n * Core logging function\n */\nconst log = (\n\taction: string,\n\toptions?: {\n\t\tframework?: string;\n\t\tduration?: number;\n\t\tpath?: string;\n\t\tcolor?: string;\n\t}\n) => {\n\tconst timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;\n\tconst tag = `${colors.cyan}[hmr]${colors.reset}`;\n\n\tlet message = action;\n\n\t// Apply framework color to path if present\n\tif (options?.path) {\n\t\tconst pathColor = options.framework\n\t\t\t? getFrameworkColor(options.framework)\n\t\t\t: colors.white;\n\t\tmessage += ` ${pathColor}${formatPath(options.path)}${colors.reset}`;\n\t}\n\n\t// Add duration if present\n\tif (options?.duration !== undefined) {\n\t\tmessage += ` ${colors.dim}(${options.duration}ms)${colors.reset}`;\n\t}\n\n\tconsole.log(`${timestamp} ${tag} ${message}`);\n};\n\n/**\n * Startup banner\n */\nexport const logReady = startupBanner;\n\n/**\n * CSS update message\n * Format: \"10:30:45 AM [hmr] css update /styles/main.css (125ms)\"\n */\nexport const logCssUpdate = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('css update', { duration, framework: framework ?? 'css', path });\n};\n\n/**\n * Build error\n * Format: \"10:30:45 AM [hmr] error Build failed: ...\"\n */\nexport const logError = (message: string, error?: Error | string) => {\n\tconst timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;\n\tconst tag = `${colors.red}[hmr]${colors.reset}`;\n\tconst errorMsg = error instanceof Error ? error.message : error;\n\tconst fullMessage = `${colors.red}error${colors.reset} ${message}${errorMsg ? `: ${errorMsg}` : ''}`;\n\tconsole.error(`${timestamp} ${tag} ${fullMessage}`);\n};\n\n/**\n * HMR update message\n * Format: \"10:30:45 AM [hmr] hmr update /pages/App.tsx\"\n */\nexport const logHmrUpdate = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('hmr update', { duration, framework, path });\n};\n\n/**\n * Generic info message\n */\nexport const logInfo = (message: string) => {\n\tlog(message);\n};\n\n/**\n * Page reload message\n * Format: \"10:30:45 AM [hmr] page reload /src/App.tsx (125ms)\"\n */\nexport const logPageReload = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('page reload', { duration, framework, path });\n};\n\n/**\n * Script update message\n * Format: \"10:30:45 AM [hmr] script update /scripts/counter.ts (125ms)\"\n */\nexport const logScriptUpdate = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('script update', { duration, framework, path });\n};\n\n/**\n * Server module reloaded (Bun --hot triggered a server-side change)\n */\nexport const logServerReload = () => {\n\tlog(`${colors.cyan}server module reloaded${colors.reset}`);\n};\n\n/**\n * Warning message\n * Format: \"10:30:45 AM [hmr] warning ...\"\n */\nexport const logWarn = (message: string) => {\n\tconst timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;\n\tconst tag = `${colors.yellow}[hmr]${colors.reset}`;\n\tconsole.log(\n\t\t`${timestamp} ${tag} ${colors.yellow}warning ${message}${colors.reset}`\n\t);\n};\n",
|
|
13
|
+
"import type { IslandFramework } from '../../types/island';\n\nconst dirtyFrameworks = new Set<IslandFramework>();\n\nexport const isSsrCacheDirty = (framework: IslandFramework) =>\n\tdirtyFrameworks.has(framework);\nexport const markSsrCacheDirty = (framework: IslandFramework) => {\n\tdirtyFrameworks.add(framework);\n};\n",
|
|
14
|
+
"const normalizeSlug = (str: string) =>\n\tstr\n\t\t.trim()\n\t\t.replace(/\\s+/g, '-')\n\t\t.replace(/[^A-Za-z0-9\\-_]+/g, '')\n\t\t.replace(/[-_]{2,}/g, '-');\n\nexport const toKebab = (str: string) =>\n\tnormalizeSlug(str)\n\t\t.replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n\t\t.toLowerCase();\nexport const toPascal = (str: string) => {\n\tif (!str.includes('-') && !str.includes('_')) {\n\t\treturn str.charAt(0).toUpperCase() + str.slice(1);\n\t}\n\n\treturn normalizeSlug(str)\n\t\t.split(/[-_]/)\n\t\t.filter(Boolean)\n\t\t.map(\n\t\t\t(segment) =>\n\t\t\t\tsegment.charAt(0).toUpperCase() + segment.slice(1).toLowerCase()\n\t\t)\n\t\t.join('');\n};\nexport const toScreamingSnake = (str: string) =>\n\tstr.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase();\n",
|
|
15
|
+
"import type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\ntype StreamingSlotWarningController = {\n\tmaybeWarn(primitiveName: string): void;\n};\ntype StreamingSlotCollectionController = {\n\tisCollecting(): boolean;\n};\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningController'\n);\nconst STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotCollectionController'\n);\n\nconst getRegisteredStreamingSlotRegistrar = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_REGISTRAR_KEY);\n\tif (typeof value === 'function' || value === null) {\n\t\treturn value;\n\t}\n\n\treturn undefined;\n};\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isStreamingSlotWarningController = (\n\tvalue: unknown\n): value is StreamingSlotWarningController =>\n\tisObjectRecord(value) &&\n\t'maybeWarn' in value &&\n\ttypeof value.maybeWarn === 'function';\n\nconst isStreamingSlotCollectionController = (\n\tvalue: unknown\n): value is StreamingSlotCollectionController =>\n\tisObjectRecord(value) &&\n\t'isCollecting' in value &&\n\ttypeof value.isCollecting === 'function';\n\nconst getWarningController = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotWarningController(value) ? value : undefined;\n};\n\nconst getCollectionController = () => {\n\tconst value = Reflect.get(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_COLLECTION_STORAGE_KEY\n\t);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotCollectionController(value) ? value : undefined;\n};\n\nexport const hasRegisteredStreamingSlotRegistrar = () =>\n\ttypeof getRegisteredStreamingSlotRegistrar() === 'function';\nexport const isStreamingSlotCollectionActive = () =>\n\tgetCollectionController()?.isCollecting() === true;\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegisteredStreamingSlotRegistrar()?.(slot);\n};\nexport const setStreamingSlotCollectionController = (\n\tcontroller: StreamingSlotCollectionController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_COLLECTION_STORAGE_KEY, controller);\n};\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_REGISTRAR_KEY, nextRegistrar);\n};\nexport const setStreamingSlotWarningController = (\n\tcontroller: StreamingSlotWarningController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);\n};\nexport const warnMissingStreamingSlotCollector = (primitiveName: string) => {\n\tif (\n\t\tprocess.env.NODE_ENV === 'production' ||\n\t\tisStreamingSlotCollectionActive()\n\t) {\n\t\treturn;\n\t}\n\n\tgetWarningController()?.maybeWarn(primitiveName);\n};\n",
|
|
16
|
+
"import type { StreamingSlot } from '../utils/streamingSlots';\nimport {\n\tsetStreamingSlotCollectionController,\n\tsetStreamingSlotRegistrar\n} from './streamingSlotRegistrar';\n\ntype SlotStore = Map<string, StreamingSlot>;\ntype AsyncLocalStorageType =\n\timport('node:async_hooks').AsyncLocalStorage<SlotStore>;\n\nconst STREAMING_SLOT_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotAsyncLocalStorage'\n);\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isAsyncLocalStorage = (value: unknown): value is AsyncLocalStorageType =>\n\tisObjectRecord(value) &&\n\t'getStore' in value &&\n\ttypeof value.getStore === 'function' &&\n\t'run' in value &&\n\ttypeof value.run === 'function';\n\nconst getStorageGlobal = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') {\n\t\treturn value;\n\t}\n\n\treturn isAsyncLocalStorage(value) ? value : undefined;\n};\n\nconst isServerRuntime = () =>\n\ttypeof process !== 'undefined' &&\n\ttypeof process.versions?.node === 'string';\n\nconst ensureAsyncLocalStorage = async () => {\n\tconst storage = getStorageGlobal();\n\tif (typeof storage !== 'undefined') {\n\t\treturn storage;\n\t}\n\tif (!isServerRuntime()) {\n\t\tReflect.set(globalThis, STREAMING_SLOT_STORAGE_KEY, null);\n\n\t\treturn getStorageGlobal();\n\t}\n\n\tconst mod = await import('node:async_hooks');\n\tReflect.set(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_STORAGE_KEY,\n\t\tnew mod.AsyncLocalStorage<SlotStore>()\n\t);\n\n\treturn getStorageGlobal();\n};\n\nconst getActiveSlotStore = () => {\n\tconst storage = getStorageGlobal();\n\tif (!storage) return undefined;\n\n\treturn storage.getStore();\n};\n\nconst registerStreamingSlot = (slot: StreamingSlot) => {\n\tconst store = getActiveSlotStore();\n\tif (!store) return;\n\tstore.set(slot.id, slot);\n};\n\nsetStreamingSlotRegistrar(registerStreamingSlot);\nsetStreamingSlotCollectionController({\n\tisCollecting: () => getActiveSlotStore() !== undefined\n});\n\nexport const hasActiveStreamingSlotRegistry = () =>\n\tgetActiveSlotStore() !== undefined;\n\nexport const runWithStreamingSlotRegistry = async <T>(\n\ttask: () => Promise<T> | T\n) => {\n\tconst storage = await ensureAsyncLocalStorage();\n\tif (!storage) {\n\t\tconst slots: StreamingSlot[] = [];\n\n\t\treturn {\n\t\t\tresult: await task(),\n\t\t\tslots\n\t\t};\n\t}\n\n\treturn storage.run(new Map<string, StreamingSlot>(), async () => {\n\t\tconst result = await task();\n\t\tconst store = storage.getStore();\n\n\t\treturn {\n\t\t\tresult,\n\t\t\tslots: store ? [...store.values()] : []\n\t\t};\n\t});\n};\n",
|
|
17
|
+
"import { BYTES_PER_KILOBYTE } from '../constants';\n\nconst BOOTSTRAP_MANIFEST_KEY = 'BootstrapClient';\nconst ISLAND_MARKER = 'data-island=\"true\"';\nconst MANIFEST_MARKER = '__ABSOLUTE_MANIFEST__';\nconst ISLAND_STATE_MARKER = '__ABS_ISLAND_STATE__';\nconst CLOSING_HEAD_TAG = '</head>';\n\ndeclare global {\n\tvar __absoluteManifest: Record<string, string> | undefined;\n\tvar __ABS_ISLAND_STATE__:\n\t\t| Record<string, Record<string, unknown>>\n\t\t| undefined;\n}\n\nconst buildIslandsHeadMarkup = (manifest: Record<string, string>) => {\n\tconst manifestScript = `<script>window.__ABSOLUTE_MANIFEST__ = ${JSON.stringify(manifest)}</script>`;\n\tconst islandStateScript = `<script>window.__ABS_ISLAND_STATE__ = ${JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {})}</script>`;\n\tconst bootstrapPath = manifest[BOOTSTRAP_MANIFEST_KEY];\n\tconst bootstrapScript = bootstrapPath\n\t\t? `<script type=\"module\" src=\"${bootstrapPath}\"></script>`\n\t\t: '';\n\n\treturn `${manifestScript}${islandStateScript}${bootstrapScript}`;\n};\n\nconst injectHeadMarkup = (html: string, markup: string) => {\n\tconst closingHeadIndex = html.indexOf('</head>');\n\tif (closingHeadIndex >= 0) {\n\t\treturn `${html.slice(0, closingHeadIndex)}${markup}${html.slice(closingHeadIndex)}`;\n\t}\n\n\tconst openingBodyIndex = html.indexOf('<body');\n\tif (openingBodyIndex >= 0) {\n\t\tconst bodyStart = html.indexOf('>', openingBodyIndex);\n\t\tif (bodyStart >= 0) {\n\t\t\treturn `${html.slice(0, openingBodyIndex)}<head>${markup}</head>${html.slice(openingBodyIndex)}`;\n\t\t}\n\t}\n\n\treturn `<!DOCTYPE html><html><head>${markup}</head><body>${html}</body></html>`;\n};\n\nconst streamChunkToString = (\n\tvalue: string | Uint8Array,\n\tdecoder: TextDecoder\n) =>\n\ttypeof value === 'string' ? value : decoder.decode(value, { stream: true });\n\nconst flushSafePendingText = (\n\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\tencoder: TextEncoder,\n\tpending: string,\n\tlookbehind: number\n) => {\n\tif (pending.length <= lookbehind) {\n\t\treturn pending;\n\t}\n\n\tconst safeText = pending.slice(0, pending.length - lookbehind);\n\tcontroller.enqueue(encoder.encode(safeText));\n\n\treturn pending.slice(-lookbehind);\n};\n\nconst updateInjectedState = (\n\tconsumed: { done: boolean; injected: boolean; pending: string },\n\tinjected: boolean,\n\tpending: string\n) => {\n\tif (consumed.done) {\n\t\treturn { done: true, injected, pending };\n\t}\n\n\treturn {\n\t\tdone: false,\n\t\tinjected: consumed.injected,\n\t\tpending: consumed.pending\n\t};\n};\n\nconst readStreamChunk = async (\n\treader: ReadableStreamDefaultReader<string | Uint8Array>\n) => {\n\tconst { done, value } = await reader.read();\n\tif (done || !value) {\n\t\treturn { done, value: undefined };\n\t}\n\n\treturn { done, value };\n};\n\nconst pipeStreamWithHeadInjection = (\n\tstream: ReadableStream<string | Uint8Array>,\n\tmarkup: string\n) => {\n\tconst encoder = new TextEncoder();\n\tconst decoder = new TextDecoder();\n\tconst lookbehind = CLOSING_HEAD_TAG.length - 1;\n\tconst processPending = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: string,\n\t\tinjected: boolean\n\t) => {\n\t\tif (injected) {\n\t\t\tcontroller.enqueue(encoder.encode(pending));\n\n\t\t\treturn { injected, pending: '' };\n\t\t}\n\n\t\tconst headIndex = pending.indexOf(CLOSING_HEAD_TAG);\n\t\tif (headIndex >= 0) {\n\t\t\tconst next = `${pending.slice(0, headIndex)}${markup}${pending.slice(headIndex)}`;\n\t\t\tcontroller.enqueue(encoder.encode(next));\n\n\t\t\treturn { injected: true, pending: '' };\n\t\t}\n\n\t\treturn {\n\t\t\tinjected,\n\t\t\tpending: flushSafePendingText(\n\t\t\t\tcontroller,\n\t\t\t\tencoder,\n\t\t\t\tpending,\n\t\t\t\tlookbehind\n\t\t\t)\n\t\t};\n\t};\n\tconst finishHeadInjectionStream = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: string,\n\t\tinjected: boolean\n\t) => {\n\t\tlet finalPending = pending + decoder.decode();\n\t\tif (!injected) {\n\t\t\tfinalPending = injectHeadMarkup(finalPending, markup);\n\t\t}\n\t\tif (finalPending.length > 0) {\n\t\t\tcontroller.enqueue(encoder.encode(finalPending));\n\t\t}\n\t\tcontroller.close();\n\t};\n\tconst consumeHeadChunk = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\treader: ReadableStreamDefaultReader<string | Uint8Array>,\n\t\tpending: string,\n\t\tinjected: boolean\n\t) => {\n\t\tconst { done, value } = await readStreamChunk(reader);\n\t\tif (done || !value) {\n\t\t\treturn { done, injected, pending };\n\t\t}\n\n\t\tconst processed = processPending(\n\t\t\tcontroller,\n\t\t\tpending + streamChunkToString(value, decoder),\n\t\t\tinjected\n\t\t);\n\n\t\treturn {\n\t\t\tdone,\n\t\t\tinjected: processed.injected,\n\t\t\tpending: processed.pending\n\t\t};\n\t};\n\tconst runHeadInjectionLoop = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\treader: ReadableStreamDefaultReader<string | Uint8Array>\n\t) => {\n\t\tconst consumeNextHeadChunk = async (\n\t\t\tinjected: boolean,\n\t\t\tpending: string\n\t\t) => {\n\t\t\tconst consumed = await consumeHeadChunk(\n\t\t\t\tcontroller,\n\t\t\t\treader,\n\t\t\t\tpending,\n\t\t\t\tinjected\n\t\t\t);\n\t\t\tconst nextState = updateInjectedState(consumed, injected, pending);\n\t\t\tif (nextState.done) {\n\t\t\t\treturn { injected, pending };\n\t\t\t}\n\n\t\t\treturn consumeNextHeadChunk(nextState.injected, nextState.pending);\n\t\t};\n\n\t\treturn consumeNextHeadChunk(false, '');\n\t};\n\n\treturn new ReadableStream<Uint8Array>({\n\t\tasync start(controller) {\n\t\t\tconst reader = stream.getReader();\n\n\t\t\ttry {\n\t\t\t\tconst { injected, pending } = await runHeadInjectionLoop(\n\t\t\t\t\tcontroller,\n\t\t\t\t\treader\n\t\t\t\t);\n\t\t\t\tfinishHeadInjectionStream(controller, pending, injected);\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t}\n\t});\n};\n\nconst pipeStreamWithIslandMarkerDetection = (\n\tstream: ReadableStream<string | Uint8Array>,\n\tmarkup: string\n) => {\n\tconst encoder = new TextEncoder();\n\tconst decoder = new TextDecoder();\n\t// Keep enough context to catch split markers and find the start tag.\n\tconst lookbehind = Math.max(ISLAND_MARKER.length, BYTES_PER_KILOBYTE);\n\tconst processPending = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: string,\n\t\tinjected: boolean\n\t) => {\n\t\tif (injected) {\n\t\t\tcontroller.enqueue(encoder.encode(pending));\n\n\t\t\treturn { injected, pending: '' };\n\t\t}\n\n\t\tconst markerIndex = pending.indexOf(ISLAND_MARKER);\n\t\tif (markerIndex >= 0) {\n\t\t\tconst tagStart = pending.lastIndexOf('<', markerIndex);\n\t\t\tconst injectAt = tagStart >= 0 ? tagStart : markerIndex;\n\t\t\tconst next = `${pending.slice(0, injectAt)}${markup}${pending.slice(injectAt)}`;\n\t\t\tcontroller.enqueue(encoder.encode(next));\n\n\t\t\treturn { injected: true, pending: '' };\n\t\t}\n\n\t\treturn {\n\t\t\tinjected,\n\t\t\tpending: flushSafePendingText(\n\t\t\t\tcontroller,\n\t\t\t\tencoder,\n\t\t\t\tpending,\n\t\t\t\tlookbehind\n\t\t\t)\n\t\t};\n\t};\n\tconst finishIslandMarkerStream = (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\tpending: string\n\t) => {\n\t\tconst finalPending = pending + decoder.decode();\n\t\tif (finalPending.length > 0) {\n\t\t\tcontroller.enqueue(encoder.encode(finalPending));\n\t\t}\n\t\tcontroller.close();\n\t};\n\tconst consumeIslandChunk = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\treader: ReadableStreamDefaultReader<string | Uint8Array>,\n\t\tpending: string,\n\t\tinjected: boolean\n\t) => {\n\t\tconst { done, value } = await readStreamChunk(reader);\n\t\tif (done || !value) {\n\t\t\treturn { done, injected, pending };\n\t\t}\n\n\t\tconst processed = processPending(\n\t\t\tcontroller,\n\t\t\tpending + streamChunkToString(value, decoder),\n\t\t\tinjected\n\t\t);\n\n\t\treturn {\n\t\t\tdone,\n\t\t\tinjected: processed.injected,\n\t\t\tpending: processed.pending\n\t\t};\n\t};\n\tconst runIslandMarkerLoop = async (\n\t\tcontroller: ReadableStreamDefaultController<Uint8Array>,\n\t\treader: ReadableStreamDefaultReader<string | Uint8Array>\n\t) => {\n\t\tconst consumeNextIslandChunk = async (\n\t\t\tinjected: boolean,\n\t\t\tpending: string\n\t\t) => {\n\t\t\tconst consumed = await consumeIslandChunk(\n\t\t\t\tcontroller,\n\t\t\t\treader,\n\t\t\t\tpending,\n\t\t\t\tinjected\n\t\t\t);\n\t\t\tconst nextState = updateInjectedState(consumed, injected, pending);\n\t\t\tif (nextState.done) {\n\t\t\t\treturn { injected, pending };\n\t\t\t}\n\n\t\t\treturn consumeNextIslandChunk(\n\t\t\t\tnextState.injected,\n\t\t\t\tnextState.pending\n\t\t\t);\n\t\t};\n\n\t\treturn consumeNextIslandChunk(false, '');\n\t};\n\n\treturn new ReadableStream<Uint8Array>({\n\t\tasync start(controller) {\n\t\t\tconst reader = stream.getReader();\n\n\t\t\ttry {\n\t\t\t\tconst { pending } = await runIslandMarkerLoop(\n\t\t\t\t\tcontroller,\n\t\t\t\t\treader\n\t\t\t\t);\n\t\t\t\tfinishIslandMarkerStream(controller, pending);\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t}\n\t});\n};\n\nexport const htmlContainsIslands = (html: string) =>\n\thtml.includes(ISLAND_MARKER);\nexport const injectIslandPageContext = (\n\thtml: string,\n\toptions?: { hasIslands?: boolean }\n) => {\n\tconst manifest = globalThis.__absoluteManifest;\n\tconst hasIslands = options?.hasIslands ?? htmlContainsIslands(html);\n\tif (!manifest || !hasIslands) {\n\t\treturn html;\n\t}\n\n\tif (html.includes(MANIFEST_MARKER) || html.includes(ISLAND_STATE_MARKER)) {\n\t\treturn html;\n\t}\n\n\treturn injectHeadMarkup(html, buildIslandsHeadMarkup(manifest));\n};\n\nexport const injectIslandPageContextStream = (\n\tstream: ReadableStream<string | Uint8Array>,\n\toptions?: { hasIslands?: boolean }\n) => {\n\tconst manifest = globalThis.__absoluteManifest;\n\tif (!manifest) return stream;\n\tconst markup = buildIslandsHeadMarkup(manifest);\n\n\tif (options?.hasIslands === true) {\n\t\treturn pipeStreamWithHeadInjection(stream, markup);\n\t}\n\tif (options?.hasIslands === false) {\n\t\treturn stream;\n\t}\n\n\treturn pipeStreamWithIslandMarkerDetection(stream, markup);\n};\nexport const setCurrentIslandManifest = (manifest: Record<string, string>) => {\n\tglobalThis.__absoluteManifest = manifest;\n};\n",
|
|
18
|
+
"import type { ComponentType as ReactComponent } from 'react';\nimport { injectIslandPageContextStream } from '../core/islandPageContext';\nimport { getCurrentRouteRegistrationCallsite } from '../core/devRouteRegistrationCallsite';\nimport {\n\ttype StreamingSlotEnhancerOptions,\n\twithRegisteredStreamingSlots\n} from '../core/responseEnhancers';\nimport {\n\tcaptureStreamingSlotWarningCallsite,\n\trunWithStreamingSlotWarningScope\n} from '../core/streamingSlotWarningScope';\nimport { isSsrCacheDirty, markSsrCacheDirty } from '../core/ssrCache';\nimport { ssrErrorPage } from '../utils/ssrErrorPage';\nimport {\n\thasErrorConvention,\n\trenderConventionError,\n\tresolveErrorConventionPath\n} from '../utils/resolveConvention';\n\ntype ReactPageRenderOptions = StreamingSlotEnhancerOptions & {\n\tcollectStreamingSlots?: boolean;\n};\nexport type ReactPageRequestInput<\n\tProps extends Record<string, unknown> = Record<never, never>\n> = ReactPageRenderOptions & {\n\tPage: ReactComponent<Props>;\n\tindex: string;\n} & (keyof Props extends never\n\t\t? { props?: NoInfer<Props> }\n\t\t: { props: NoInfer<Props> });\n\nconst buildRefreshSetup = () => {\n\tif (process.env.NODE_ENV === 'production') {\n\t\treturn '';\n\t}\n\n\treturn (\n\t\t'window.__REFRESH_BUFFER__=[];' +\n\t\t'window.$RefreshReg$=function(t,i){window.__REFRESH_BUFFER__.push([t,i])};' +\n\t\t'window.$RefreshSig$=function(){return function(t){return t}};'\n\t);\n};\n\nconst buildDirtyResponse = (\n\tindex: string,\n\tmaybeProps: Record<string, unknown> | undefined\n) => {\n\tconst propsScript = maybeProps\n\t\t? `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps)};`\n\t\t: '';\n\tconst dirtyFlag = 'window.__SSR_DIRTY__=true;';\n\tconst refreshSetup = buildRefreshSetup();\n\tconst inlineScript = `${propsScript}${dirtyFlag}${refreshSetup}`;\n\tconst html =\n\t\t`<!DOCTYPE html><html><head></head><body>` +\n\t\t`<script>${inlineScript}</script>` +\n\t\t`<script type=\"module\" src=\"${index}\"></script>` +\n\t\t`</body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' }\n\t});\n};\n\nexport const handleReactPageRequest = async <\n\tProps extends Record<string, unknown> = Record<never, never>\n>(\n\tinput: ReactPageRequestInput<Props>\n) => {\n\tconst Page = input.Page;\n\tconst resolvedIndex = input.index;\n\tconst options = input;\n\tconst maybeProps = input.props;\n\tconst pageName = Page.name || Page.displayName || '';\n\n\tif (isSsrCacheDirty('react')) {\n\t\treturn buildDirtyResponse(resolvedIndex, maybeProps);\n\t}\n\n\ttry {\n\t\tconst handlerCallsite =\n\t\t\toptions?.collectStreamingSlots === true\n\t\t\t\t? undefined\n\t\t\t\t: (getCurrentRouteRegistrationCallsite() ??\n\t\t\t\t\tcaptureStreamingSlotWarningCallsite());\n\t\tconst renderPageResponse = async () => {\n\t\t\tconst { createElement } = await import('react');\n\t\t\tconst { renderToReadableStream } = await import('react-dom/server');\n\n\t\t\tconst element =\n\t\t\t\tmaybeProps !== undefined\n\t\t\t\t\t? createElement(Page, maybeProps)\n\t\t\t\t\t: createElement(Page);\n\n\t\t\tconst propsScript = maybeProps\n\t\t\t\t? `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps)};`\n\t\t\t\t: '';\n\n\t\t\t// Buffer React Refresh registrations until the runtime loads.\n\t\t\t// Bun.build injects $RefreshReg$ calls in the bundle, but the\n\t\t\t// real runtime isn't ready yet. This buffering function captures\n\t\t\t// all registrations, then replays them when the runtime is set up.\n\t\t\tconst refreshSetup = buildRefreshSetup();\n\n\t\t\tconst stream = await renderToReadableStream(element, {\n\t\t\t\tbootstrapModules: [resolvedIndex],\n\t\t\t\tbootstrapScriptContent: propsScript + refreshSetup || undefined,\n\t\t\t\tonError(error: unknown) {\n\t\t\t\t\tconsole.error('[SSR] React streaming error:', error);\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst htmlStream = injectIslandPageContextStream(stream);\n\t\t\tif (\n\t\t\t\tresolveErrorConventionPath('react', pageName) ||\n\t\t\t\thasErrorConvention('react')\n\t\t\t) {\n\t\t\t\tconst html = await new Response(htmlStream).text();\n\n\t\t\t\treturn new Response(html, {\n\t\t\t\t\theaders: { 'Content-Type': 'text/html' }\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn new Response(htmlStream, {\n\t\t\t\theaders: { 'Content-Type': 'text/html' }\n\t\t\t});\n\t\t};\n\n\t\treturn await runWithStreamingSlotWarningScope(\n\t\t\t() =>\n\t\t\t\toptions?.collectStreamingSlots === true\n\t\t\t\t\t? withRegisteredStreamingSlots(renderPageResponse, options)\n\t\t\t\t\t: renderPageResponse(),\n\t\t\t{ handlerCallsite }\n\t\t);\n\t} catch (error) {\n\t\tconsole.error('[SSR] React render error:', error);\n\n\t\tconst conventionResponse = await renderConventionError(\n\t\t\t'react',\n\t\t\tpageName,\n\t\t\terror\n\t\t);\n\t\tif (conventionResponse) return conventionResponse;\n\n\t\treturn new Response(ssrErrorPage('react', error), {\n\t\t\theaders: { 'Content-Type': 'text/html' },\n\t\t\tstatus: 500\n\t\t});\n\t}\n};\n\nexport const invalidateReactSsrCache = () => {\n\tmarkSsrCacheDirty('react');\n};\n",
|
|
19
|
+
"import {\n\tappendStreamingSlotPatchesToStream,\n\ttype AppendStreamingSlotsOptions,\n\ttype StreamingSlotPolicy,\n\ttype StreamingSlot\n} from '../utils/streamingSlots';\nimport { runWithStreamingSlotRegistry } from './streamingSlotRegistry';\n\ntype ResponseLike = Response | Promise<Response>;\n\nexport type StreamingSlotEnhancerOptions = Omit<\n\tAppendStreamingSlotsOptions,\n\t'injectRuntime'\n> & {\n\tstreamingSlots?: StreamingSlot[];\n\tpolicy?: StreamingSlotPolicy;\n};\n\nconst toResponse = async (responseLike: ResponseLike) => responseLike;\n\nconst cloneHeaders = (response: Response) => {\n\tconst headers = new Headers(response.headers);\n\n\treturn headers;\n};\n\nexport const enhanceHtmlResponseWithStreamingSlots = (\n\tresponse: Response,\n\t{\n\t\tnonce,\n\t\tonError,\n\t\truntimePlacement,\n\t\truntimePreludeScript,\n\t\tstreamingSlots = [],\n\t\tpolicy\n\t}: StreamingSlotEnhancerOptions = {}\n) => {\n\tif (!response.body || streamingSlots.length === 0) {\n\t\treturn response;\n\t}\n\n\tconst body = appendStreamingSlotPatchesToStream(\n\t\tresponse.body,\n\t\tstreamingSlots,\n\t\t{\n\t\t\tnonce,\n\t\t\tonError,\n\t\t\tpolicy,\n\t\t\truntimePlacement,\n\t\t\truntimePreludeScript\n\t\t}\n\t);\n\n\treturn new Response(body, {\n\t\theaders: cloneHeaders(response),\n\t\tstatus: response.status,\n\t\tstatusText: response.statusText\n\t});\n};\n\nexport const withStreamingSlots = async (\n\tresponseLike: ResponseLike,\n\toptions: StreamingSlotEnhancerOptions = {}\n) =>\n\tenhanceHtmlResponseWithStreamingSlots(\n\t\tawait toResponse(responseLike),\n\t\toptions\n\t);\n\nconst mergeStreamingSlots = (\n\tregistered: StreamingSlot[],\n\texplicit: StreamingSlot[]\n) => {\n\tconst merged = new Map<string, StreamingSlot>();\n\tfor (const slot of registered) merged.set(slot.id, slot);\n\tfor (const slot of explicit) merged.set(slot.id, slot);\n\n\treturn [...merged.values()];\n};\n\nexport const withRegisteredStreamingSlots = async (\n\trenderResponse: () => ResponseLike,\n\toptions: StreamingSlotEnhancerOptions = {}\n) => {\n\tconst { result, slots } =\n\t\tawait runWithStreamingSlotRegistry(renderResponse);\n\tconst explicit = options.streamingSlots ?? [];\n\n\treturn withStreamingSlots(result, {\n\t\t...options,\n\t\tstreamingSlots: mergeStreamingSlots(slots, explicit)\n\t});\n};\n",
|
|
20
|
+
"import { AsyncLocalStorage } from 'node:async_hooks';\nimport { logWarn } from '../utils/logger';\nimport { setStreamingSlotWarningController } from './streamingSlotRegistrar';\n\ntype WarningStore = {\n\thandlerCallsite?: string;\n\thasWarned: boolean;\n};\n\ntype WarningStorage = AsyncLocalStorage<WarningStore>;\n\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningAsyncLocalStorage'\n);\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isAsyncLocalStorage = (value: unknown): value is WarningStorage =>\n\tisObjectRecord(value) &&\n\t'getStore' in value &&\n\ttypeof value.getStore === 'function' &&\n\t'run' in value &&\n\ttypeof value.run === 'function';\n\nconst getWarningStorage = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') {\n\t\treturn undefined;\n\t}\n\n\treturn isAsyncLocalStorage(value) ? value : undefined;\n};\n\nconst ensureWarningStorage = () => {\n\tconst existing = getWarningStorage();\n\tif (existing) {\n\t\treturn existing;\n\t}\n\n\tconst storage = new AsyncLocalStorage<WarningStore>();\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, storage);\n\n\treturn storage;\n};\n\nconst normalizeCallsitePath = (value: string) =>\n\tvalue\n\t\t.replace(`${process.cwd()}/`, '')\n\t\t.replace(process.cwd(), '')\n\t\t.replace(/^\\.\\/+/, '');\n\nconst formatWarningCallsite = (callsite: string) => {\n\tconst match = callsite.match(/^(.*?)(:\\d+:\\d+)$/);\n\tif (!match) {\n\t\treturn `\\x1b[36m${callsite}\\x1b[0m`;\n\t}\n\n\treturn `\\x1b[36m${match[1]}\\x1b[33m${match[2]}\\x1b[0m`;\n};\n\nconst shouldIgnoreWarningFrame = (frame: string) =>\n\tframe.includes('/node_modules/') ||\n\tframe.includes('/dist/') ||\n\tframe.includes('/src/react/pageHandler.') ||\n\tframe.includes('/src/vue/pageHandler.') ||\n\tframe.includes('/src/svelte/pageHandler.') ||\n\tframe.includes('/src/angular/pageHandler.') ||\n\tframe.includes('/src/core/streamingSlotWarningScope.');\n\nconst getWarningLocation = (frame: string) =>\n\tframe.match(/\\((\\/[^)]+:\\d+:\\d+)\\)$/)?.[1] ??\n\tframe.match(/at (\\/[^ ]+:\\d+:\\d+)$/)?.[1];\n\nconst extractCallsiteFromStack = (stack: string) => {\n\tconst location = stack\n\t\t.split('\\n')\n\t\t.slice(1)\n\t\t.map((line) => line.trim())\n\t\t.filter((frame) => !shouldIgnoreWarningFrame(frame))\n\t\t.map((frame) => getWarningLocation(frame))\n\t\t.find((frameLocation) => frameLocation !== undefined);\n\n\treturn location ? normalizeCallsitePath(location) : undefined;\n};\n\nconst buildMissingCollectorWarning = (\n\tprimitiveName: string,\n\thandlerCallsite?: string\n) =>\n\t`${primitiveName} rendered during SSR without streaming slot collection enabled. Add { collectStreamingSlots: true } to this page handler to enable out-of-order streaming for this route.${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ''}`;\n\nsetStreamingSlotWarningController({\n\tmaybeWarn: (primitiveName: string) => {\n\t\tconst store = getWarningStorage()?.getStore();\n\t\tif (!store || store.hasWarned) {\n\t\t\treturn;\n\t\t}\n\n\t\tstore.hasWarned = true;\n\t\tlogWarn(\n\t\t\tbuildMissingCollectorWarning(primitiveName, store.handlerCallsite)\n\t\t);\n\t}\n});\n\nexport const captureStreamingSlotWarningCallsite = () => {\n\tif (process.env.NODE_ENV === 'production') {\n\t\treturn undefined;\n\t}\n\n\tconst { stack } = new Error();\n\tif (!stack) {\n\t\treturn undefined;\n\t}\n\n\treturn extractCallsiteFromStack(stack);\n};\n\nexport const runWithStreamingSlotWarningScope = <T>(\n\ttask: () => Promise<T> | T,\n\tmetadata?: {\n\t\thandlerCallsite?: string;\n\t}\n) =>\n\tensureWarningStorage().run(\n\t\t{ handlerCallsite: metadata?.handlerCallsite, hasWarned: false },\n\t\ttask\n\t);\n",
|
|
21
|
+
"export const ssrErrorPage = (framework: string, error: unknown) => {\n\tconst frameworkColors: Record<string, string> = {\n\t\tangular: '#dd0031',\n\t\thtml: '#e34c26',\n\t\thtmx: '#1a365d',\n\t\treact: '#61dafb',\n\t\tsvelte: '#ff3e00',\n\t\tvue: '#42b883'\n\t};\n\n\tconst accent = frameworkColors[framework] ?? '#94a3b8';\n\tconst label = framework.charAt(0).toUpperCase() + framework.slice(1);\n\tconst message = error instanceof Error ? error.message : String(error);\n\n\treturn `<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>SSR Error - AbsoluteJS</title>\n<style>\n*{margin:0;padding:0;box-sizing:border-box}\nbody{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,rgba(30,41,59,0.98) 100%);color:#e2e8f0;font-family:\"JetBrains Mono\",\"Fira Code\",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;line-height:1.6;display:flex;align-items:flex-start;justify-content:center;padding:32px}\n.card{max-width:720px;width:100%;background:rgba(30,41,59,0.6);border:1px solid rgba(71,85,105,0.5);border-radius:16px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.5),0 0 0 1px rgba(255,255,255,0.05);overflow:hidden}\n.header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:rgba(15,23,42,0.5);border-bottom:1px solid rgba(71,85,105,0.4)}\n.brand{font-weight:700;font-size:20px;color:#fff;letter-spacing:-0.02em}\n.badge{padding:5px 10px;border-radius:8px;font-size:12px;font-weight:600;background:${accent};color:#fff;opacity:0.95;box-shadow:0 2px 4px rgba(0,0,0,0.2)}\n.kind{color:#94a3b8;font-size:13px;font-weight:500}\n.content{padding:24px}\n.label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:#94a3b8;margin-bottom:8px}\n.message{margin:0;padding:16px 20px;background:rgba(239,68,68,0.12);border:1px solid rgba(239,68,68,0.25);border-radius:10px;overflow-x:auto;white-space:pre-wrap;word-break:break-word;color:#fca5a5;font-size:13px;line-height:1.5}\n.hint{margin-top:20px;padding:12px 20px;background:rgba(71,85,105,0.3);border-radius:10px;border:1px solid rgba(71,85,105,0.4);color:#cbd5e1;font-size:13px}\n</style>\n</head>\n<body>\n<div class=\"card\">\n<div class=\"header\">\n<div style=\"display:flex;align-items:center;gap:12px\">\n<span class=\"brand\">AbsoluteJS</span>\n<span class=\"badge\">${label}</span>\n</div>\n<span class=\"kind\">Server Render Error</span>\n</div>\n<div class=\"content\">\n<div class=\"label\">What went wrong</div>\n<pre class=\"message\">${message.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}</pre>\n<div class=\"hint\">A component threw during server-side rendering. Check the terminal for the full stack trace.</div>\n</div>\n</div>\n</body>\n</html>`;\n};\n",
|
|
22
|
+
"import { basename } from 'node:path';\nimport type { ConventionsMap } from '../../types/conventions';\nimport { toPascal } from './stringModifiers';\n\n// Use globalThis so the conventions map is shared across all bundles.\n// The main bundle (dist/index.js) calls setConventions, but framework\n// bundles (dist/svelte/index.js, etc.) need to read the same map.\nconst CONVENTIONS_KEY = '__absoluteConventions';\n\nconst isConventionsMap = (value: unknown): value is ConventionsMap =>\n\tBoolean(value) && typeof value === 'object';\n\nconst getMap = () => {\n\tconst value: unknown = Reflect.get(globalThis, CONVENTIONS_KEY);\n\tif (isConventionsMap(value)) return value;\n\n\tconst empty: ConventionsMap = {};\n\n\treturn empty;\n};\n\nexport const derivePageName = (pagePath: string) => {\n\tconst base = basename(pagePath);\n\t// Strip hash and extension: \"SvelteExample.abc123.js\" → \"SvelteExample\"\n\tconst dotIndex = base.indexOf('.');\n\tconst name = dotIndex > 0 ? base.slice(0, dotIndex) : base;\n\n\treturn toPascal(name);\n};\nexport const getConventions = () => getMap();\n\nconst normalizeConventionPageName = (name: string) =>\n\ttoPascal(name).replace(/\\d+$/, '');\n\nexport const resolveErrorConventionPath = (\n\tframework: keyof ConventionsMap,\n\tpageName: string\n) => {\n\tconst conventions = getMap()[framework];\n\tif (!conventions) return undefined;\n\n\tconst exact = conventions.pages?.[pageName]?.error;\n\tif (exact) return exact;\n\n\tconst normalizedPageName = normalizeConventionPageName(pageName);\n\tfor (const [candidate, page] of Object.entries(conventions.pages ?? {})) {\n\t\tif (normalizeConventionPageName(candidate) === normalizedPageName) {\n\t\t\treturn page.error ?? conventions.defaults?.error;\n\t\t}\n\t}\n\n\treturn conventions.defaults?.error;\n};\nexport const resolveNotFoundConventionPath = (\n\tframework: keyof ConventionsMap\n) => getMap()[framework]?.defaults?.notFound;\n\nexport const hasErrorConvention = (framework: keyof ConventionsMap) => {\n\tconst conventions = getMap()[framework];\n\tif (!conventions) return false;\n\tif (conventions.defaults?.error) return true;\n\n\treturn Object.values(conventions.pages ?? {}).some((page) =>\n\t\tBoolean(page.error)\n\t);\n};\n\nexport const setConventions = (map: ConventionsMap) => {\n\tReflect.set(globalThis, CONVENTIONS_KEY, map);\n};\n\nconst isDev = () => process.env.NODE_ENV === 'development';\n\nconst buildErrorProps = (error: unknown) => {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconst stack = isDev() && error instanceof Error ? error.stack : undefined;\n\n\treturn { error: { message, stack } };\n};\n\nconst renderReactError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\tconst { createElement } = await import('react');\n\tconst { renderToReadableStream } = await import('react-dom/server');\n\tconst mod = await import(conventionPath);\n\tconst [firstKey] = Object.keys(mod);\n\tconst ErrorComponent =\n\t\tmod.default ?? (firstKey ? mod[firstKey] : undefined);\n\tconst element = createElement(ErrorComponent, errorProps);\n\tconst stream = await renderToReadableStream(element);\n\n\treturn new Response(stream, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst renderSvelteError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\tconst { render } = await import('svelte/server');\n\tconst mod = await import(conventionPath);\n\tconst ErrorComponent = mod.default;\n\tconst { head, body } = render(ErrorComponent, {\n\t\tprops: errorProps\n\t});\n\tconst html = `<!DOCTYPE html><html><head>${head}</head><body>${body}</body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst unescapeVueStyles = (ssrBody: string) => {\n\tlet styles = '';\n\tconst body = ssrBody.replace(\n\t\t/<style>([\\s\\S]*?)<\\/style>/g,\n\t\t(_, css: string) => {\n\t\t\tstyles += `<style>${css\n\t\t\t\t.replace(/"/g, '\"')\n\t\t\t\t.replace(/&/g, '&')\n\t\t\t\t.replace(/</g, '<')\n\t\t\t\t.replace(/>/g, '>')}</style>`;\n\n\t\t\treturn '';\n\t\t}\n\t);\n\n\treturn { body, styles };\n};\n\nconst renderVueError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\tconst { createSSRApp, h } = await import('vue');\n\tconst { renderToString } = await import('vue/server-renderer');\n\tconst mod = await import(conventionPath);\n\tconst ErrorComponent = mod.default;\n\tconst app = createSSRApp({\n\t\trender: () => h(ErrorComponent, errorProps)\n\t});\n\tconst rawBody = await renderToString(app);\n\n\t// Vue SSR escapes quotes inside <component is=\"style\"> tags.\n\t// Extract style content, unescape it, and move to <head>.\n\tconst { styles, body } = unescapeVueStyles(rawBody);\n\tconst html = `<!DOCTYPE html><html><head>${styles}</head><body><div id=\"root\">${body}</div></body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst renderAngularError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\t// Angular error pages are rendered as plain HTML templates\n\t// since the full Angular SSR pipeline is too heavy for error pages\n\tconst mod = await import(conventionPath);\n\tconst renderError = mod.default ?? mod.renderError;\n\tif (typeof renderError !== 'function') return null;\n\n\tconst html = renderError(errorProps);\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst logConventionRenderError = (\n\tframework: keyof ConventionsMap,\n\tlabel: string,\n\trenderError: unknown\n) => {\n\tconst message = renderError instanceof Error ? renderError.message : '';\n\tif (\n\t\tmessage.includes('Cannot find module') ||\n\t\tmessage.includes('Cannot find package') ||\n\t\tmessage.includes('not found in module')\n\t) {\n\t\tconsole.error(\n\t\t\t`[SSR] Convention ${label} page for ${framework} failed: missing framework package. ` +\n\t\t\t\t`Ensure the ${framework} runtime is installed (e.g. bun add ${framework === 'react' ? 'react react-dom' : framework}).`\n\t\t);\n\n\t\treturn;\n\t}\n\n\tconsole.error(\n\t\t`[SSR] Failed to render ${framework} convention ${label} page:`,\n\t\trenderError\n\t);\n};\n\nconst ERROR_RENDERERS: Record<\n\tkeyof ConventionsMap,\n\t(\n\t\tconventionPath: string,\n\t\terrorProps: ReturnType<typeof buildErrorProps>\n\t) => Promise<Response | null>\n> = {\n\tangular: renderAngularError,\n\treact: renderReactError,\n\tsvelte: renderSvelteError,\n\tvue: renderVueError\n};\n\nexport const renderConventionError = async (\n\tframework: keyof ConventionsMap,\n\tpageName: string,\n\terror: unknown\n) => {\n\tlet conventionPath = resolveErrorConventionPath(framework, pageName);\n\tif (!conventionPath && error instanceof Error && error.stack) {\n\t\tfor (const match of error.stack.matchAll(\n\t\t\t/^\\s*at\\s+([A-Za-z_$][\\w$]*)/gm\n\t\t)) {\n\t\t\tconst candidate = match[1];\n\t\t\tif (!candidate) continue;\n\n\t\t\tconventionPath = resolveErrorConventionPath(framework, candidate);\n\t\t\tif (conventionPath) break;\n\t\t}\n\t}\n\tif (!conventionPath) return null;\n\n\tconst errorProps = buildErrorProps(error);\n\tconst renderer = ERROR_RENDERERS[framework];\n\tif (!renderer) return null;\n\n\ttry {\n\t\treturn await renderer(conventionPath, errorProps);\n\t} catch (renderError) {\n\t\tlogConventionRenderError(framework, 'error', renderError);\n\t}\n\n\treturn null;\n};\n\nconst renderReactNotFound = async (conventionPath: string) => {\n\tconst { createElement } = await import('react');\n\tconst { renderToReadableStream } = await import('react-dom/server');\n\tconst mod = await import(conventionPath);\n\tconst [nfKey] = Object.keys(mod);\n\tconst NotFoundComponent = mod.default ?? (nfKey ? mod[nfKey] : undefined);\n\tconst element = createElement(NotFoundComponent);\n\tconst stream = await renderToReadableStream(element);\n\n\treturn new Response(stream, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst renderSvelteNotFound = async (conventionPath: string) => {\n\tconst { render } = await import('svelte/server');\n\tconst mod = await import(conventionPath);\n\tconst NotFoundComponent = mod.default;\n\tconst { head, body } = render(NotFoundComponent);\n\tconst html = `<!DOCTYPE html><html><head>${head}</head><body>${body}</body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst renderVueNotFound = async (conventionPath: string) => {\n\tconst { createSSRApp, h } = await import('vue');\n\tconst { renderToString } = await import('vue/server-renderer');\n\tconst mod = await import(conventionPath);\n\tconst NotFoundComponent = mod.default;\n\tconst app = createSSRApp({\n\t\trender: () => h(NotFoundComponent)\n\t});\n\tconst rawBody = await renderToString(app);\n\n\tconst { styles, body } = unescapeVueStyles(rawBody);\n\tconst html = `<!DOCTYPE html><html><head>${styles}</head><body><div id=\"root\">${body}</div></body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst renderAngularNotFound = async (conventionPath: string) => {\n\tconst mod = await import(conventionPath);\n\tconst renderNotFound = mod.default ?? mod.renderNotFound;\n\tif (typeof renderNotFound !== 'function') return null;\n\n\tconst html = renderNotFound();\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst NOT_FOUND_RENDERERS: Record<\n\tkeyof ConventionsMap,\n\t(conventionPath: string) => Promise<Response | null>\n> = {\n\tangular: renderAngularNotFound,\n\treact: renderReactNotFound,\n\tsvelte: renderSvelteNotFound,\n\tvue: renderVueNotFound\n};\n\nexport const renderConventionNotFound = async (\n\tframework: keyof ConventionsMap\n) => {\n\tconst conventionPath = resolveNotFoundConventionPath(framework);\n\tif (!conventionPath) return null;\n\n\tconst renderer = NOT_FOUND_RENDERERS[framework];\n\tif (!renderer) return null;\n\n\ttry {\n\t\treturn await renderer(conventionPath);\n\t} catch (renderError) {\n\t\tlogConventionRenderError(framework, 'not-found', renderError);\n\t}\n\n\treturn null;\n};\n\nconst NOT_FOUND_PRIORITY: (keyof ConventionsMap)[] = [\n\t'react',\n\t'svelte',\n\t'vue',\n\t'angular'\n];\n\nexport const renderFirstNotFound = async () => {\n\tconst renderNext = async (frameworks: (keyof ConventionsMap)[]) => {\n\t\tconst [framework, ...remaining] = frameworks;\n\t\tif (!framework) {\n\t\t\treturn null;\n\t\t}\n\t\tif (!getMap()[framework]?.defaults?.notFound) {\n\t\t\treturn renderNext(remaining);\n\t\t}\n\n\t\tconst response = await renderConventionNotFound(framework);\n\t\tif (response) {\n\t\t\treturn response;\n\t\t}\n\n\t\treturn renderNext(remaining);\n\t};\n\n\treturn renderNext(NOT_FOUND_PRIORITY);\n};\n"
|
|
5
23
|
],
|
|
6
|
-
"mappings": "",
|
|
7
|
-
"debugId": "
|
|
24
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAa,0BAA0B,KAC1B,mBAAmB,IACnB,qBAAqB,GACrB,cAAc,IACd,gBAAgB,IAChB,gCACZ,8CACY,oBAAoB,MACpB,qBAAqB,MACrB,kBAAkB,GAClB,6BAA6B,IAC7B,yBAAyB,IACzB,2BAA2B,KAC3B,6BAA6B,KAC7B,qBAAqB,OACrB,sBAAsB,IACtB,eAAe,MACf,iCAAiC,KACjC,sBAAsB,IACtB,8BAA8B,GAC9B,yBAAyB,GACzB,0BAA0B,GAC1B,2BAA2B,GAC3B,wBAAwB,MACxB,wBAAwB,IACxB,sBAAsB,IACtB,iBAAiB,KACjB,0BAA0B,KAC1B,wBAAwB,KACxB,eAAe,IACf,oBAAoB,IACpB,4BAGA,2BACA,wBAAwB,IAC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CAAC;AAAA;AAAA;",
|
|
25
|
+
"debugId": "08DBE3AAFC30698F64756E2164756E21",
|
|
8
26
|
"names": []
|
|
9
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const patchAngularCompilerFacade: () => void;
|
package/dist/src/index.d.ts
CHANGED