@absolutejs/absolute 0.20.0-beta.181 → 0.20.0-beta.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/changelog.json +75 -0
- package/dist/angular/browser.js +2 -2
- package/dist/angular/browser.js.map +4 -4
- package/dist/angular/components/constants.js +4 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +520 -84
- package/dist/angular/index.js.map +13 -12
- package/dist/angular/server.js +520 -84
- package/dist/angular/server.js.map +13 -12
- package/dist/build.js +452 -85
- package/dist/build.js.map +18 -18
- package/dist/cli/{add-8gw9mk2b.js → add-jft96bp4.js} +9 -9
- package/dist/cli/{analyze-e57zz9x8.js → analyze-5w46d1f0.js} +3 -3
- package/dist/cli/{androidEmulatorController-vqc5m2rp.js → androidEmulatorController-gbf9r660.js} +6 -6
- package/dist/cli/{androidNativeWatcher-s03aczxv.js → androidNativeWatcher-3astrxxz.js} +6 -6
- package/dist/cli/{api-8ppxw487.js → api-zmvnvdsf.js} +8 -8
- package/dist/cli/{build-ptx5a72p.js → build-df81wh71.js} +67 -6
- package/dist/cli/{build-fz7qbdn3.js → build-mskrk9zb.js} +3 -3
- package/dist/cli/{buildDepVendor-qnwfct22.js → buildDepVendor-36d1aa7c.js} +2 -2
- package/dist/cli/{buildReactServerComponents-01s87hnk.js → buildReactServerComponents-k6amghrj.js} +5 -5
- package/dist/cli/{compile-54rb8szn.js → compile-7mjd739p.js} +10 -6
- package/dist/cli/config/server.js +37 -18
- package/dist/cli/{db-qbzjw3en.js → db-mpmj37jq.js} +2 -2
- package/dist/cli/{dev-6s6g5tnk.js → dev-9d6d7757.js} +14 -14
- package/dist/cli/{doctor-m36tmx4d.js → doctor-nng9szw6.js} +3 -3
- package/dist/cli/{emulatorDoctor-s1z5tkp7.js → emulatorDoctor-3eszsqs8.js} +5 -5
- package/dist/cli/{emulatorInstaller-pgkdswvq.js → emulatorInstaller-1r6cawm0.js} +6 -6
- package/dist/cli/{env-5nz1qm8e.js → env-bfa7vs35.js} +3 -3
- package/dist/cli/{expoDevController-018anvbm.js → expoDevController-s0msdwbm.js} +6 -6
- package/dist/cli/{generate-5vyz1s44.js → generate-xk3a7qnc.js} +8 -8
- package/dist/cli/{heapDiff-kncvdtn8.js → heapDiff-3ba8p8wf.js} +3 -3
- package/dist/cli/{htmx-26hs6jdm.js → htmx-an2x3gpx.js} +6 -6
- package/dist/cli/{index-7854xf0m.js → index-1bszxtdj.js} +1 -1
- package/dist/cli/{index-kx2d067c.js → index-3066eqr3.js} +8 -5
- package/dist/cli/{index-8khbn8qr.js → index-3a9h87v5.js} +3 -3
- package/dist/cli/{index-jkg2h10c.js → index-3dz754hk.js} +3 -3
- package/dist/cli/{index-9djrap79.js → index-3pz5sjaz.js} +1 -1
- package/dist/cli/{index-50ag35xg.js → index-3ys9tz53.js} +2 -2
- package/dist/cli/{index-6f448d7m.js → index-4ynx0cq6.js} +26 -12
- package/dist/cli/{index-btp4fyf1.js → index-785hpa2r.js} +2 -2
- package/dist/cli/{index-kes8he5s.js → index-9sqqzeq4.js} +1 -1
- package/dist/cli/{index-pr1skxen.js → index-akseq9ps.js} +1 -1
- package/dist/cli/{index-23hvdyxf.js → index-c6j2727a.js} +1 -1
- package/dist/cli/{index-pkw3jktb.js → index-eh786rj4.js} +2 -2
- package/dist/cli/{index-aemhvvwb.js → index-eydgkr7w.js} +1 -1
- package/dist/cli/{index-rz56x932.js → index-fbmfpqk8.js} +1 -1
- package/dist/cli/{index-c8rcfe5a.js → index-fy4th3n0.js} +1 -1
- package/dist/cli/{index-prza6tkp.js → index-gx6pjzzk.js} +3 -3
- package/dist/cli/{index-125cfzvn.js → index-hker5fs4.js} +2 -2
- package/dist/cli/{index-cgmp9d02.js → index-hqkcxa2p.js} +1 -1
- package/dist/cli/{index-5w8arh3m.js → index-pq4qqz0r.js} +2 -2
- package/dist/cli/{index-enbw9484.js → index-wpgsermq.js} +1 -1
- package/dist/cli/{index-0z5fgb80.js → index-wqpg377f.js} +1 -1
- package/dist/cli/{index-3sfcmb49.js → index-x7h6w6td.js} +1 -1
- package/dist/cli/{index-a6xx0p9e.js → index-ydaxsftq.js} +1 -1
- package/dist/cli/{index-3ewt17wm.js → index-yhkg5by0.js} +1 -1
- package/dist/cli/{index-aqe25w4h.js → index-zeeep92g.js} +1 -1
- package/dist/cli/index.js +32 -32
- package/dist/cli/{info-k124sh7g.js → info-5rwsbhe2.js} +4 -4
- package/dist/cli/{inspect-n6pcfvfw.js → inspect-nmwb0q5k.js} +5 -5
- package/dist/cli/{iosNativeWatcher-wdq2fvj1.js → iosNativeWatcher-7r9gnk87.js} +7 -7
- package/dist/cli/{iosSimulatorController-n97dpa8p.js → iosSimulatorController-w963vv9r.js} +7 -7
- package/dist/cli/{islands-17tfx8jf.js → islands-w9xrehpk.js} +3 -3
- package/dist/cli/{logs-shg23fbt.js → logs-m793x8a7.js} +3 -3
- package/dist/cli/{ls-0wr74w0b.js → ls-k31npd5b.js} +3 -3
- package/dist/cli/{mem-16sy1707.js → mem-jm6kw6gr.js} +5 -5
- package/dist/cli/{migrate-k91k050s.js → migrate-95bjkqkr.js} +2 -2
- package/dist/cli/{mobile-hpqpy61f.js → mobile-cpp8vfn7.js} +13 -13
- package/dist/cli/prerender-26pzynh4.js +13 -0
- package/dist/cli/{prettier-dh5fh786.js → prettier-0ws9pbc1.js} +1 -1
- package/dist/cli/{ps-pk7ncjac.js → ps-fx8mz3e3.js} +6 -6
- package/dist/cli/{psTui-50wf0b72.js → psTui-0e9c7an6.js} +7 -7
- package/dist/cli/{remoteMacProtocol-g10s408w.js → remoteMacProtocol-y7h79gr8.js} +7 -7
- package/dist/cli/{remove-x987pvd3.js → remove-xhvph8bz.js} +8 -8
- package/dist/cli/{routes-mc3ymp8t.js → routes-hq9yje5z.js} +3 -3
- package/dist/cli/{start-mbn2zgs2.js → start-5mjh9hh2.js} +5 -5
- package/dist/cli/{typecheck-ynzw2eep.js → typecheck-bvm0ndq4.js} +188 -75
- package/dist/cli/{workspace-7sbyyc59.js → workspace-xeb6abxj.js} +5 -5
- package/dist/dev/serverBootstrap.js +8 -2
- package/dist/index.js +469 -99
- package/dist/index.js.map +20 -20
- package/dist/islands/index.js +312 -23
- package/dist/islands/index.js.map +5 -5
- package/dist/mobile/index.js +2 -2
- package/dist/mobile/index.js.map +3 -3
- package/dist/react/browser.js +18 -1
- package/dist/react/browser.js.map +6 -4
- package/dist/react/components/index.js +2 -2
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/index.js +370 -62
- package/dist/react/index.js.map +14 -13
- package/dist/react/server.js +51 -36
- package/dist/react/server.js.map +10 -10
- package/dist/src/angular/colocatedRouteMatch.d.ts +23 -0
- package/dist/src/angular/components/constants.d.ts +1 -0
- package/dist/src/angular/components/defer-slot-payload.d.ts +5 -0
- package/dist/src/cli/scripts/manifestKeysEditorHint.d.ts +9 -0
- package/dist/src/cli/scripts/typecheck.d.ts +1 -0
- package/dist/src/cli/scripts/typecheckDiagnostics.d.ts +41 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/core/prerender.d.ts +10 -0
- package/dist/src/dev/hot/analyze.d.ts +1 -1
- package/dist/src/react/browser.d.ts +1 -0
- package/dist/src/react/index.d.ts +1 -0
- package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +23 -0
- package/dist/src/utils/pageCspNonce.d.ts +14 -0
- package/dist/src/utils/spaRouteManifest.d.ts +1 -0
- package/dist/svelte/index.js +372 -69
- package/dist/svelte/index.js.map +11 -11
- package/dist/svelte/server.js +363 -60
- package/dist/svelte/server.js.map +11 -11
- package/dist/types/manifest.d.ts +3 -2
- package/dist/types/svelte.d.ts +3 -0
- package/dist/vue/components/Image.js +2 -2
- package/dist/vue/components/Image.js.map +3 -3
- package/dist/vue/components/index.js +2 -2
- package/dist/vue/components/index.js.map +3 -3
- package/dist/vue/index.js +364 -61
- package/dist/vue/index.js.map +11 -11
- package/dist/vue/server.js +54 -40
- package/dist/vue/server.js.map +9 -9
- package/package.json +1 -1
- package/dist/cli/prerender-w65xp6h8.js +0 -11
- /package/dist/cli/{index-t8jmj8w1.js → index-fm9x6sjs.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -114,7 +114,7 @@ var resolveAngularPackageDir = (specifier) => {
|
|
|
114
114
|
var init_resolveAngularPackage = () => {};
|
|
115
115
|
|
|
116
116
|
// src/constants.ts
|
|
117
|
-
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
|
117
|
+
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTML_CONTENT_TYPE = "text/html; charset=utf-8", HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
|
118
118
|
var init_constants = __esm(() => {
|
|
119
119
|
TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
|
|
120
120
|
IMAGE_DEFAULT_DEVICE_SIZES = [
|
|
@@ -6199,7 +6199,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6199
6199
|
nonce: readCspNonce()
|
|
6200
6200
|
});
|
|
6201
6201
|
return new Response(stream, {
|
|
6202
|
-
headers: { "Content-Type":
|
|
6202
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6203
6203
|
status: 500
|
|
6204
6204
|
});
|
|
6205
6205
|
}, renderSvelteError = async (conventionPath, errorProps) => {
|
|
@@ -6215,7 +6215,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6215
6215
|
});
|
|
6216
6216
|
const html = `<!DOCTYPE html><html><head>${nonceSvelteHeadStyles(head)}</head><body>${body}</body></html>`;
|
|
6217
6217
|
return new Response(html, {
|
|
6218
|
-
headers: { "Content-Type":
|
|
6218
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6219
6219
|
status: 500
|
|
6220
6220
|
});
|
|
6221
6221
|
}, unescapeVueStyles = (ssrBody) => {
|
|
@@ -6239,7 +6239,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6239
6239
|
const { styles, body } = unescapeVueStyles(rawBody);
|
|
6240
6240
|
const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
|
|
6241
6241
|
return new Response(html, {
|
|
6242
|
-
headers: { "Content-Type":
|
|
6242
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6243
6243
|
status: 500
|
|
6244
6244
|
});
|
|
6245
6245
|
}, renderAngularError = async (conventionPath, errorProps) => {
|
|
@@ -6249,14 +6249,14 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6249
6249
|
return null;
|
|
6250
6250
|
const html = renderFn(errorProps);
|
|
6251
6251
|
return new Response(html, {
|
|
6252
|
-
headers: { "Content-Type":
|
|
6252
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6253
6253
|
status: 500
|
|
6254
6254
|
});
|
|
6255
6255
|
}, escapeHtml = (value) => value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), replaceErrorTokens = (template, errorProps) => template.replace(/\{\{\s*name\s*\}\}/g, escapeHtml(errorProps.name)).replace(/\{\{\s*message\s*\}\}/g, escapeHtml(errorProps.message)).replace(/\{\{\s*stack\s*\}\}/g, errorProps.stack ? escapeHtml(errorProps.stack) : ""), renderHtmlError = async (conventionPath, errorProps) => {
|
|
6256
6256
|
const template = await nonceStaticHtml(await Bun.file(conventionPath).text());
|
|
6257
6257
|
const html = replaceErrorTokens(template, errorProps);
|
|
6258
6258
|
return new Response(html, {
|
|
6259
|
-
headers: { "Content-Type":
|
|
6259
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6260
6260
|
status: 500
|
|
6261
6261
|
});
|
|
6262
6262
|
}, logConventionRenderError = (framework, label, renderError) => {
|
|
@@ -6335,7 +6335,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6335
6335
|
nonce: readCspNonce()
|
|
6336
6336
|
});
|
|
6337
6337
|
return new Response(stream, {
|
|
6338
|
-
headers: { "Content-Type":
|
|
6338
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6339
6339
|
status: 404
|
|
6340
6340
|
});
|
|
6341
6341
|
}, renderSvelteNotFound = async (conventionPath) => {
|
|
@@ -6348,7 +6348,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6348
6348
|
const { head, body } = render(NotFoundComponent, nonce ? { csp: { nonce } } : {});
|
|
6349
6349
|
const html = `<!DOCTYPE html><html><head>${nonceSvelteHeadStyles(head)}</head><body>${body}</body></html>`;
|
|
6350
6350
|
return new Response(html, {
|
|
6351
|
-
headers: { "Content-Type":
|
|
6351
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6352
6352
|
status: 404
|
|
6353
6353
|
});
|
|
6354
6354
|
}, renderVueNotFound = async (conventionPath) => {
|
|
@@ -6365,7 +6365,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6365
6365
|
const { styles, body } = unescapeVueStyles(rawBody);
|
|
6366
6366
|
const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
|
|
6367
6367
|
return new Response(html, {
|
|
6368
|
-
headers: { "Content-Type":
|
|
6368
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6369
6369
|
status: 404
|
|
6370
6370
|
});
|
|
6371
6371
|
}, renderAngularNotFound = async (conventionPath) => {
|
|
@@ -6375,13 +6375,13 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6375
6375
|
return null;
|
|
6376
6376
|
const html = renderFn();
|
|
6377
6377
|
return new Response(html, {
|
|
6378
|
-
headers: { "Content-Type":
|
|
6378
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6379
6379
|
status: 404
|
|
6380
6380
|
});
|
|
6381
6381
|
}, renderHtmlNotFound = async (conventionPath) => {
|
|
6382
6382
|
const html = await nonceStaticHtml(await Bun.file(conventionPath).text());
|
|
6383
6383
|
return new Response(html, {
|
|
6384
|
-
headers: { "Content-Type":
|
|
6384
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
6385
6385
|
status: 404
|
|
6386
6386
|
});
|
|
6387
6387
|
}, NOT_FOUND_RENDERERS, renderConventionNotFound = async (framework) => {
|
|
@@ -6415,6 +6415,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
6415
6415
|
return renderNext(options.preferHtmx ? ["htmx", ...NOT_FOUND_PRIORITY.filter((key) => key !== "htmx")] : NOT_FOUND_PRIORITY);
|
|
6416
6416
|
};
|
|
6417
6417
|
var init_resolveConvention = __esm(() => {
|
|
6418
|
+
init_constants();
|
|
6418
6419
|
init_cspNonceRef();
|
|
6419
6420
|
init_staticHtmlNonce();
|
|
6420
6421
|
init_ssrErrorPage();
|
|
@@ -6607,14 +6608,14 @@ var init_logger = __esm(() => {
|
|
|
6607
6608
|
|
|
6608
6609
|
// src/core/pageResponseCache.ts
|
|
6609
6610
|
import { createHash as createHash2 } from "crypto";
|
|
6610
|
-
var STREAMING_PAGE_HEADER = "x-absolute-stream",
|
|
6611
|
+
var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_MEDIA_TYPE = "text/html", streamingPageHeaders = (extra) => {
|
|
6611
6612
|
const headers = new Headers(extra);
|
|
6612
6613
|
headers.set("content-type", HTML_CONTENT_TYPE);
|
|
6613
6614
|
headers.set(STREAMING_PAGE_HEADER, "1");
|
|
6614
6615
|
return headers;
|
|
6615
6616
|
}, computeEtag = (html) => `W/"${createHash2("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request, options) => {
|
|
6616
6617
|
const contentType = response.headers.get("content-type") ?? "";
|
|
6617
|
-
if (!contentType.includes(
|
|
6618
|
+
if (!contentType.includes(HTML_MEDIA_TYPE))
|
|
6618
6619
|
return response;
|
|
6619
6620
|
const isStreaming = response.headers.get(STREAMING_PAGE_HEADER) === "1";
|
|
6620
6621
|
if (isStreaming && !options?.bufferStreamForEtag || !response.body) {
|
|
@@ -6640,7 +6641,9 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
|
|
|
6640
6641
|
statusText: response.statusText
|
|
6641
6642
|
});
|
|
6642
6643
|
};
|
|
6643
|
-
var init_pageResponseCache = () => {
|
|
6644
|
+
var init_pageResponseCache = __esm(() => {
|
|
6645
|
+
init_constants();
|
|
6646
|
+
});
|
|
6644
6647
|
|
|
6645
6648
|
// src/core/islandManifest.ts
|
|
6646
6649
|
var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOOTSTRAP_MANIFEST_KEY = "BootstrapClient", REACT_PAGE_ROOT_EVENT = "absolute:react-page-root", toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1), collectFrameworkIslands = (manifest, prefix) => {
|
|
@@ -7157,9 +7160,9 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
|
|
|
7157
7160
|
tail: ""
|
|
7158
7161
|
};
|
|
7159
7162
|
};
|
|
7160
|
-
const handleBaseWinner = (controller, winner, baseRead, tail, footer) => {
|
|
7163
|
+
const handleBaseWinner = (controller, winner, baseRead, tail, footer, baseDone) => {
|
|
7161
7164
|
if (winner.kind !== "base") {
|
|
7162
|
-
return { baseDone
|
|
7165
|
+
return { baseDone, baseRead, footer, handled: false, tail };
|
|
7163
7166
|
}
|
|
7164
7167
|
if (winner.done) {
|
|
7165
7168
|
return finalizeCompletedBaseWinner(controller, tail + decoder.decode(), baseRead);
|
|
@@ -7202,7 +7205,7 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
|
|
|
7202
7205
|
return footer;
|
|
7203
7206
|
}
|
|
7204
7207
|
const winner = await Promise.race(racers);
|
|
7205
|
-
const baseWinnerState = applyBaseWinnerState(handleBaseWinner(controller, winner, baseRead, tail, footer), winner, (slotWinner) => {
|
|
7208
|
+
const baseWinnerState = applyBaseWinnerState(handleBaseWinner(controller, winner, baseRead, tail, footer, baseDone), winner, (slotWinner) => {
|
|
7206
7209
|
handleResolvedSlot(controller, slotWinner);
|
|
7207
7210
|
});
|
|
7208
7211
|
({ baseDone, baseRead, footer, tail } = baseWinnerState);
|
|
@@ -8657,23 +8660,247 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
|
|
|
8657
8660
|
index = markup.indexOf("{", end);
|
|
8658
8661
|
}
|
|
8659
8662
|
return tags;
|
|
8660
|
-
}, escapeTemplateLiteral = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${"),
|
|
8661
|
-
|
|
8662
|
-
const
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8663
|
+
}, escapeTemplateLiteral = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${"), HTML_HELPERS = "__absoluteAwaitHtml", AWAIT_SCOPE_CLASS_PLACEHOLDER = "__absoluteAwaitScopeClass__", AWAIT_HTML_HELPERS_SOURCE, applyAwaitScopeClass = (code, scopeClass) => code.replaceAll(AWAIT_SCOPE_CLASS_PLACEHOLDER, scopeClass), createAwaitScopeClassCapture = () => {
|
|
8664
|
+
let scopeClass = "";
|
|
8665
|
+
const cssHash = ({ css, filename, hash }) => {
|
|
8666
|
+
scopeClass = `svelte-${hash(filename === "(unknown)" ? css : filename ?? css)}`;
|
|
8667
|
+
return scopeClass;
|
|
8668
|
+
};
|
|
8669
|
+
const apply = (code) => applyAwaitScopeClass(code, scopeClass);
|
|
8670
|
+
return { apply, cssHash };
|
|
8671
|
+
}, BOOLEAN_ATTRIBUTES, DIRECTIVE_ATTRIBUTE_RE, ATTRIBUTE_NAME_END_RE, RAW_TEXT_ELEMENTS, helperCall = (name, ...args) => `\${${HTML_HELPERS}.${name}(${args.join(", ")})}`, SHADOW_VALUE, END_TAG_RE, isShadowAttribute = (name) => !DIRECTIVE_ATTRIBUTE_RE.test(name) && !/^on/i.test(name), pushText = (scan, text) => {
|
|
8672
|
+
scan.literal += escapeTemplateLiteral(text);
|
|
8673
|
+
}, readExpressionTag = (scan) => {
|
|
8674
|
+
const end = findTagEnd(scan.source, scan.index);
|
|
8675
|
+
if (end === -1) {
|
|
8676
|
+
fail(scan.filePath, `unterminated tag in the ${scan.branch} branch`);
|
|
8677
|
+
}
|
|
8678
|
+
const inner = scan.source.slice(scan.index + 1, end - 1).trim();
|
|
8679
|
+
scan.index = end;
|
|
8680
|
+
return inner;
|
|
8681
|
+
}, failAttribute = (scan, detail) => fail(scan.filePath, `the ${scan.branch} branch of a streamed {#await} has ${detail}`), atValueEnd = (scan, quote) => {
|
|
8682
|
+
const char = scan.source[scan.index] ?? "";
|
|
8683
|
+
if (quote)
|
|
8684
|
+
return char === quote;
|
|
8685
|
+
return /[\s>]/.test(char) || scan.source.startsWith("/>", scan.index);
|
|
8686
|
+
}, readValueText = (scan, quote) => {
|
|
8687
|
+
const start = scan.index;
|
|
8688
|
+
while (scan.index < scan.source.length && scan.source[scan.index] !== "{" && !atValueEnd(scan, quote)) {
|
|
8689
|
+
scan.index += 1;
|
|
8690
|
+
}
|
|
8691
|
+
return scan.source.slice(start, scan.index);
|
|
8692
|
+
}, readAttributeValue = (scan) => {
|
|
8693
|
+
const { source } = scan;
|
|
8694
|
+
const quote = source[scan.index];
|
|
8695
|
+
const chunks = [];
|
|
8696
|
+
const isQuoted = quote === '"' || quote === "'";
|
|
8697
|
+
if (isQuoted)
|
|
8698
|
+
scan.index += 1;
|
|
8699
|
+
if (!isQuoted && source[scan.index] === "{") {
|
|
8700
|
+
chunks.push({ code: readExpressionTag(scan) });
|
|
8701
|
+
return chunks;
|
|
8702
|
+
}
|
|
8703
|
+
const valueQuote = isQuoted ? quote : undefined;
|
|
8704
|
+
while (scan.index < source.length && !atValueEnd(scan, valueQuote)) {
|
|
8705
|
+
chunks.push({ text: readValueText(scan, valueQuote) });
|
|
8706
|
+
if (source[scan.index] === "{")
|
|
8707
|
+
chunks.push({ code: readExpressionTag(scan) });
|
|
8708
|
+
}
|
|
8709
|
+
if (isQuoted)
|
|
8710
|
+
scan.index += 1;
|
|
8711
|
+
return chunks.filter((chunk) => !("text" in chunk) || chunk.text !== "");
|
|
8712
|
+
}, pushDynamicAttribute = (scan, name, chunks) => {
|
|
8713
|
+
if (DIRECTIVE_ATTRIBUTE_RE.test(name) || /^on/i.test(name)) {
|
|
8714
|
+
failAttribute(scan, `an expression in ${name}= (directives and event handlers need Svelte to run them)`);
|
|
8715
|
+
}
|
|
8716
|
+
const tag = chunks.find((chunk) => ("code" in chunk) && /^[#:/@]/.test(chunk.code));
|
|
8717
|
+
if (tag && "code" in tag) {
|
|
8718
|
+
failAttribute(scan, `{${tag.code}} in the ${name}= attribute`);
|
|
8719
|
+
}
|
|
8720
|
+
if (isShadowAttribute(name))
|
|
8721
|
+
scan.shadow += ` ${name}=${SHADOW_VALUE}`;
|
|
8722
|
+
const isClass = name === "class";
|
|
8723
|
+
if (isClass)
|
|
8724
|
+
scan.hasClass = true;
|
|
8725
|
+
const [only] = chunks;
|
|
8726
|
+
const codes = chunks.flatMap((chunk) => ("code" in chunk) ? [`(${chunk.code})`] : []);
|
|
8727
|
+
if (isClass && chunks.length > 1 && codes.length === chunks.length) {
|
|
8728
|
+
scan.literal += helperCall("class", `${HTML_HELPERS}.join(${codes.join(", ")})`);
|
|
8729
|
+
return;
|
|
8730
|
+
}
|
|
8731
|
+
if (chunks.length === 1 && only && "code" in only) {
|
|
8732
|
+
const value = `(${only.code})`;
|
|
8733
|
+
if (name === "class")
|
|
8734
|
+
scan.literal += helperCall("class", value);
|
|
8735
|
+
else if (name === "style")
|
|
8736
|
+
scan.literal += helperCall("style", value);
|
|
8737
|
+
else
|
|
8738
|
+
scan.literal += helperCall("attr", JSON.stringify(name), value, String(BOOLEAN_ATTRIBUTES.has(name)));
|
|
8739
|
+
return;
|
|
8740
|
+
}
|
|
8741
|
+
pushText(scan, ` ${name}="`);
|
|
8742
|
+
for (const chunk of chunks) {
|
|
8743
|
+
if ("code" in chunk)
|
|
8744
|
+
scan.literal += helperCall("part", `(${chunk.code})`);
|
|
8745
|
+
else
|
|
8746
|
+
pushText(scan, chunk.text.replaceAll('"', """));
|
|
8747
|
+
}
|
|
8748
|
+
if (isClass)
|
|
8749
|
+
scan.literal += helperCall("scoped");
|
|
8750
|
+
pushText(scan, '"');
|
|
8751
|
+
}, pushStaticAttribute = (scan, whitespace, name, value) => {
|
|
8752
|
+
if (isShadowAttribute(name))
|
|
8753
|
+
scan.shadow += `${whitespace}${name}=${value}`;
|
|
8754
|
+
if (name !== "class") {
|
|
8755
|
+
pushText(scan, `${whitespace}${name}=${value}`);
|
|
8756
|
+
return;
|
|
8757
|
+
}
|
|
8758
|
+
scan.hasClass = true;
|
|
8759
|
+
const [first = ""] = value;
|
|
8760
|
+
const isQuoted = first === '"' || first === "'";
|
|
8761
|
+
const quote = isQuoted ? first : '"';
|
|
8762
|
+
const classes = isQuoted ? value.slice(1, -1) : value;
|
|
8763
|
+
if (classes === "") {
|
|
8764
|
+
scan.literal += helperCall("class", "''");
|
|
8765
|
+
return;
|
|
8766
|
+
}
|
|
8767
|
+
pushText(scan, `${whitespace}${name}=${quote}${classes}`);
|
|
8768
|
+
scan.literal += helperCall("scoped");
|
|
8769
|
+
pushText(scan, quote);
|
|
8770
|
+
}, readAttributeName = (scan) => {
|
|
8771
|
+
const { source } = scan;
|
|
8772
|
+
const start = scan.index;
|
|
8773
|
+
while (scan.index < source.length && !ATTRIBUTE_NAME_END_RE.test(source[scan.index] ?? "")) {
|
|
8774
|
+
scan.index += 1;
|
|
8775
|
+
}
|
|
8776
|
+
return source.slice(start, scan.index);
|
|
8777
|
+
}, skipWhitespace = (scan) => {
|
|
8778
|
+
const start = scan.index;
|
|
8779
|
+
while (/\s/.test(scan.source[scan.index] ?? ""))
|
|
8780
|
+
scan.index += 1;
|
|
8781
|
+
return scan.source.slice(start, scan.index);
|
|
8782
|
+
}, pushTagExpression = (scan) => {
|
|
8783
|
+
const inner = readExpressionTag(scan);
|
|
8784
|
+
if (!/^[A-Za-z_$][\w$]*$/.test(inner)) {
|
|
8785
|
+
failAttribute(scan, `{${inner}} in a start tag`);
|
|
8786
|
+
}
|
|
8787
|
+
pushDynamicAttribute(scan, inner, [{ code: inner }]);
|
|
8788
|
+
}, pushAttribute = (scan) => {
|
|
8789
|
+
const { source } = scan;
|
|
8790
|
+
const whitespace = skipWhitespace(scan);
|
|
8791
|
+
const closing = source.startsWith("/>", scan.index) ? "/>" : ">";
|
|
8792
|
+
const isEnd = scan.index >= source.length;
|
|
8793
|
+
if (isEnd || source.startsWith(closing, scan.index)) {
|
|
8794
|
+
if (!scan.hasClass)
|
|
8795
|
+
scan.literal += helperCall("scope");
|
|
8796
|
+
const tagEnd = isEnd ? "" : closing;
|
|
8797
|
+
pushText(scan, whitespace + tagEnd);
|
|
8798
|
+
scan.shadow += whitespace + (isEnd ? ">" : closing);
|
|
8799
|
+
scan.index += tagEnd.length;
|
|
8800
|
+
return false;
|
|
8801
|
+
}
|
|
8802
|
+
if (source[scan.index] === "{") {
|
|
8803
|
+
pushTagExpression(scan);
|
|
8804
|
+
return true;
|
|
8805
|
+
}
|
|
8806
|
+
const name = readAttributeName(scan);
|
|
8807
|
+
if (!name) {
|
|
8808
|
+
pushText(scan, whitespace + (source[scan.index] ?? ""));
|
|
8809
|
+
scan.index += 1;
|
|
8810
|
+
return true;
|
|
8669
8811
|
}
|
|
8670
|
-
|
|
8671
|
-
|
|
8812
|
+
const beforeEquals = scan.index;
|
|
8813
|
+
skipWhitespace(scan);
|
|
8814
|
+
if (source[scan.index] !== "=") {
|
|
8815
|
+
scan.index = beforeEquals;
|
|
8816
|
+
pushText(scan, whitespace + name);
|
|
8817
|
+
if (isShadowAttribute(name))
|
|
8818
|
+
scan.shadow += whitespace + name;
|
|
8819
|
+
return true;
|
|
8820
|
+
}
|
|
8821
|
+
scan.index += 1;
|
|
8822
|
+
skipWhitespace(scan);
|
|
8823
|
+
const valueStart = scan.index;
|
|
8824
|
+
const chunks = readAttributeValue(scan);
|
|
8825
|
+
if (chunks.some((chunk) => ("code" in chunk))) {
|
|
8826
|
+
pushDynamicAttribute(scan, name, chunks);
|
|
8827
|
+
return true;
|
|
8828
|
+
}
|
|
8829
|
+
pushStaticAttribute(scan, whitespace, name, source.slice(valueStart, scan.index));
|
|
8830
|
+
return true;
|
|
8831
|
+
}, pushStartTag = (scan) => {
|
|
8832
|
+
const { source } = scan;
|
|
8833
|
+
const nameMatch = source.slice(scan.index + 1).match(/^[^\s/>{]+/);
|
|
8834
|
+
const tagName = nameMatch?.[0] ?? "";
|
|
8835
|
+
pushText(scan, `<${tagName}`);
|
|
8836
|
+
scan.shadow += `<${tagName}`;
|
|
8837
|
+
scan.hasClass = RAW_TEXT_ELEMENTS.has(tagName.toLowerCase());
|
|
8838
|
+
scan.index += 1 + tagName.length;
|
|
8839
|
+
while (pushAttribute(scan))
|
|
8840
|
+
;
|
|
8841
|
+
return tagName.toLowerCase();
|
|
8842
|
+
}, pushRawText = (scan, tagName, shadowStart) => {
|
|
8843
|
+
const { source } = scan;
|
|
8844
|
+
const close = source.toLowerCase().indexOf(`</${tagName}`, scan.index);
|
|
8845
|
+
const closeEnd = close === -1 ? -1 : source.indexOf(">", close);
|
|
8846
|
+
const end = closeEnd === -1 ? source.length : closeEnd + 1;
|
|
8847
|
+
pushText(scan, source.slice(scan.index, end));
|
|
8848
|
+
scan.shadow = scan.shadow.slice(0, shadowStart);
|
|
8849
|
+
scan.index = end;
|
|
8850
|
+
}, pushTextExpression = (scan) => {
|
|
8851
|
+
const inner = readExpressionTag(scan);
|
|
8852
|
+
const rawHtml = inner.match(/^@html\s([\s\S]*)$/);
|
|
8853
|
+
if (rawHtml) {
|
|
8854
|
+
scan.literal += helperCall("html", `(${(rawHtml[1] ?? "").trim()})`);
|
|
8855
|
+
return;
|
|
8856
|
+
}
|
|
8857
|
+
scan.literal += helperCall("text", `(${inner})`);
|
|
8858
|
+
}, pushComment = (scan) => {
|
|
8859
|
+
const close = scan.source.indexOf("-->", scan.index + "<!--".length);
|
|
8860
|
+
const end = close === -1 ? scan.source.length : close + "-->".length;
|
|
8861
|
+
pushText(scan, scan.source.slice(scan.index, end));
|
|
8862
|
+
scan.index = end;
|
|
8863
|
+
}, scanTextPosition = (scan) => {
|
|
8864
|
+
const { index, source } = scan;
|
|
8865
|
+
if (source.startsWith("<!--", index)) {
|
|
8866
|
+
pushComment(scan);
|
|
8867
|
+
return;
|
|
8868
|
+
}
|
|
8869
|
+
if (source[index] === "<" && /[A-Za-z]/.test(source[index + 1] ?? "")) {
|
|
8870
|
+
const shadowStart = scan.shadow.length;
|
|
8871
|
+
const tagName = pushStartTag(scan);
|
|
8872
|
+
if (RAW_TEXT_ELEMENTS.has(tagName))
|
|
8873
|
+
pushRawText(scan, tagName, shadowStart);
|
|
8874
|
+
return;
|
|
8875
|
+
}
|
|
8876
|
+
if (source[index] === "{") {
|
|
8877
|
+
pushTextExpression(scan);
|
|
8878
|
+
return;
|
|
8879
|
+
}
|
|
8880
|
+
const next = source.slice(index + 1).search(/[<{]/);
|
|
8881
|
+
const end = next === -1 ? source.length : index + 1 + next;
|
|
8882
|
+
const text = source.slice(index, end);
|
|
8883
|
+
pushText(scan, text);
|
|
8884
|
+
scan.shadow += (text.match(END_TAG_RE) ?? []).join("");
|
|
8885
|
+
scan.index = end;
|
|
8886
|
+
}, lowerBranch = (markup, branch, filePath) => {
|
|
8887
|
+
const scan = {
|
|
8888
|
+
branch,
|
|
8889
|
+
filePath,
|
|
8890
|
+
hasClass: false,
|
|
8891
|
+
index: 0,
|
|
8892
|
+
literal: "",
|
|
8893
|
+
shadow: "",
|
|
8894
|
+
source: markup.trim()
|
|
8895
|
+
};
|
|
8896
|
+
while (scan.index < scan.source.length)
|
|
8897
|
+
scanTextPosition(scan);
|
|
8898
|
+
return { literal: `\`${scan.literal}\``, shadow: scan.shadow };
|
|
8672
8899
|
}, fail = (filePath, message) => {
|
|
8673
8900
|
throw new Error(`${filePath ? `${filePath}: ` : ""}${message} (${AWAIT_STREAM_DIRECTIVE} streams plain HTML; remove the directive to let Svelte render the block and hydrate it)`);
|
|
8674
8901
|
}, assertPlainHtml = (markup, branch, filePath) => {
|
|
8675
8902
|
const withoutExpressions = topLevelTags(markup).reduceRight((text, { end, start }) => text.slice(0, start) + text.slice(end), markup);
|
|
8676
|
-
const nestedTag = topLevelTags(markup).find(({ text }) => /^\{[
|
|
8903
|
+
const nestedTag = topLevelTags(markup).find(({ text }) => /^\{(?:[#:/]|@(?!html\s))/.test(text));
|
|
8677
8904
|
if (nestedTag || SVELTE_ONLY_MARKUP_RE.test(withoutExpressions)) {
|
|
8678
8905
|
fail(filePath, `the ${branch} branch of a streamed {#await} holds Svelte markup (${nestedTag?.text ?? withoutExpressions.match(SVELTE_ONLY_MARKUP_RE)?.[0]}\u2026)`);
|
|
8679
8906
|
}
|
|
@@ -8717,12 +8944,16 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
|
|
|
8717
8944
|
thenIdentifier: thenMatch?.[2],
|
|
8718
8945
|
thenMarkup
|
|
8719
8946
|
};
|
|
8720
|
-
}, renderSlot = (block, slotId, dynamic) => {
|
|
8947
|
+
}, renderSlot = (block, slotId, dynamic, filePath) => {
|
|
8721
8948
|
const thenValueIdentifier = block.thenIdentifier ?? "__awaitValue";
|
|
8722
8949
|
const catchValueIdentifier = block.catchIdentifier ?? "__awaitError";
|
|
8723
|
-
const
|
|
8724
|
-
|
|
8725
|
-
|
|
8950
|
+
const pending = lowerBranch(block.pendingMarkup, "pending", filePath);
|
|
8951
|
+
const then = lowerBranch(block.thenMarkup, "then", filePath);
|
|
8952
|
+
const caught = block.catchMarkup === undefined ? undefined : lowerBranch(block.catchMarkup, "catch", filePath);
|
|
8953
|
+
const catchBranch = caught ? `catch (${catchValueIdentifier}) { return ${caught.literal}; }` : "catch (_absoluteAwaitError) { throw _absoluteAwaitError; }";
|
|
8954
|
+
const shadows = [pending, then, caught].map((branch) => branch ? `<svelte:element this={'div'} data-absolute-slot="true">${branch.shadow}</svelte:element>` : "").join("");
|
|
8955
|
+
return `<AbsoluteAwaitSlot id="${slotId}"${dynamic ? " dynamic" : ""} fallbackHtml={${pending.literal}} resolve={async () => { try { const ${thenValueIdentifier} = await (${block.expression}); return ${then.literal}; } ${catchBranch} }} />{#if ${HTML_HELPERS}.shadow}${shadows}{/if}`;
|
|
8956
|
+
}, IMPORT_LINE = 'import AbsoluteAwaitSlot from "@absolutejs/absolute/svelte/components/AwaitSlot.svelte";', INJECTED_SCRIPT, lowerSvelteAwaitSlotSyntax = (source, filePath) => {
|
|
8726
8957
|
if (!source.includes("absolute:stream")) {
|
|
8727
8958
|
return { code: source, transformed: false };
|
|
8728
8959
|
}
|
|
@@ -8737,7 +8968,7 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
|
|
|
8737
8968
|
const slotId = `absolute-svelte-await-${awaitIndex.toString(BASE_36_RADIX)}`;
|
|
8738
8969
|
awaitIndex += 1;
|
|
8739
8970
|
lowered += source.slice(cursor, directive.index);
|
|
8740
|
-
lowered += renderSlot(block, slotId, directive[1] !== undefined);
|
|
8971
|
+
lowered += renderSlot(block, slotId, directive[1] !== undefined, filePath);
|
|
8741
8972
|
cursor = block.end;
|
|
8742
8973
|
}
|
|
8743
8974
|
if (awaitIndex === 0) {
|
|
@@ -8747,14 +8978,14 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
|
|
|
8747
8978
|
if (lowered.includes("<script")) {
|
|
8748
8979
|
return {
|
|
8749
8980
|
code: lowered.replace(/<script(\s[^>]*)?>/, (match) => `${match}
|
|
8750
|
-
${
|
|
8981
|
+
${INJECTED_SCRIPT}
|
|
8751
8982
|
`),
|
|
8752
8983
|
transformed: true
|
|
8753
8984
|
};
|
|
8754
8985
|
}
|
|
8755
8986
|
return {
|
|
8756
8987
|
code: `<script lang="ts">
|
|
8757
|
-
${
|
|
8988
|
+
${INJECTED_SCRIPT}
|
|
8758
8989
|
</script>
|
|
8759
8990
|
${lowered}`,
|
|
8760
8991
|
transformed: true
|
|
@@ -8766,6 +8997,64 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
|
|
|
8766
8997
|
BRANCH_TAG_RE = /^\{:(then|catch)(?:\s+([A-Za-z_$][\w$]*))?\s*\}$/;
|
|
8767
8998
|
SVELTE_ONLY_MARKUP_RE = /\{[#:/@]|<[A-Z]|<svelte:/;
|
|
8768
8999
|
QUOTES = new Set(['"', "'", "`"]);
|
|
9000
|
+
AWAIT_HTML_HELPERS_SOURCE = [
|
|
9001
|
+
`const ${HTML_HELPERS} = (() => {`,
|
|
9002
|
+
` const scope = ${JSON.stringify(AWAIT_SCOPE_CLASS_PLACEHOLDER)};`,
|
|
9003
|
+
` const escape = (value, isAttr) => String(value ?? '').replace(isAttr ? /[&"<]/g : /[&<]/g, (char) => char === '&' ? '&' : char === '"' ? '"' : '<');`,
|
|
9004
|
+
"\tconst stringify = (value) => typeof value === 'string' ? value : value == null ? '' : value + '';",
|
|
9005
|
+
"\tconst classNames = (value) => { if (Array.isArray(value)) return value.filter(Boolean).map(classNames).filter(Boolean).join(' '); if (value && typeof value === 'object') return Object.keys(value).filter((key) => value[key]).join(' '); return typeof value === 'string' || typeof value === 'number' ? String(value) : ''; };",
|
|
9006
|
+
"\treturn {",
|
|
9007
|
+
` attr: (name, value, isBoolean) => { const boolean = isBoolean || (name === 'hidden' && value !== 'until-found'); if (value == null || (!value && boolean)) return ''; const normalized = name === 'translate' && typeof value === 'boolean' ? (value ? 'yes' : 'no') : value; return boolean ? ' ' + name + '=""' : ' ' + name + '="' + escape(normalized, true) + '"'; },`,
|
|
9008
|
+
` class: (value) => { const resolved = typeof value === 'object' ? classNames(value) : value ?? ''; let name = '' + resolved; if (scope) name = name ? name + ' ' + scope : scope; return name ? ' class="' + escape(name, true) + '"' : ''; },`,
|
|
9009
|
+
"\t\thtml: (value) => String(value ?? ''),",
|
|
9010
|
+
"\t\tjoin: (...values) => values.map(stringify).join(''),",
|
|
9011
|
+
"\t\tpart: (value) => escape(stringify(value), true),",
|
|
9012
|
+
` scope: () => scope ? ' class="' + scope + '"' : '',`,
|
|
9013
|
+
"\t\tscoped: () => scope ? ' ' + scope : '',",
|
|
9014
|
+
"\t\tshadow: false,",
|
|
9015
|
+
` style: (value) => { const style = value == null ? '' : String(value); return style ? ' style="' + escape(style, true) + '"' : ''; },`,
|
|
9016
|
+
"\t\ttext: (value) => escape(value, false)",
|
|
9017
|
+
"\t};",
|
|
9018
|
+
"})();"
|
|
9019
|
+
].join(`
|
|
9020
|
+
`);
|
|
9021
|
+
BOOLEAN_ATTRIBUTES = new Set([
|
|
9022
|
+
"allowfullscreen",
|
|
9023
|
+
"async",
|
|
9024
|
+
"autofocus",
|
|
9025
|
+
"autoplay",
|
|
9026
|
+
"checked",
|
|
9027
|
+
"controls",
|
|
9028
|
+
"default",
|
|
9029
|
+
"defer",
|
|
9030
|
+
"disabled",
|
|
9031
|
+
"disablepictureinpicture",
|
|
9032
|
+
"disableremoteplayback",
|
|
9033
|
+
"formnovalidate",
|
|
9034
|
+
"indeterminate",
|
|
9035
|
+
"inert",
|
|
9036
|
+
"ismap",
|
|
9037
|
+
"loop",
|
|
9038
|
+
"multiple",
|
|
9039
|
+
"muted",
|
|
9040
|
+
"nomodule",
|
|
9041
|
+
"novalidate",
|
|
9042
|
+
"open",
|
|
9043
|
+
"playsinline",
|
|
9044
|
+
"readonly",
|
|
9045
|
+
"required",
|
|
9046
|
+
"reversed",
|
|
9047
|
+
"seamless",
|
|
9048
|
+
"selected",
|
|
9049
|
+
"webkitdirectory"
|
|
9050
|
+
]);
|
|
9051
|
+
DIRECTIVE_ATTRIBUTE_RE = /^(?:animate|bind|class|in|let|on|out|style|transition|use):/;
|
|
9052
|
+
ATTRIBUTE_NAME_END_RE = /[\s=>/{]/;
|
|
9053
|
+
RAW_TEXT_ELEMENTS = new Set(["script", "style"]);
|
|
9054
|
+
SHADOW_VALUE = `{${HTML_HELPERS}.shadow}`;
|
|
9055
|
+
END_TAG_RE = /<\/[A-Za-z][^\s>]*\s*>/g;
|
|
9056
|
+
INJECTED_SCRIPT = `${IMPORT_LINE}
|
|
9057
|
+
${AWAIT_HTML_HELPERS_SOURCE}`;
|
|
8769
9058
|
});
|
|
8770
9059
|
|
|
8771
9060
|
// src/svelte/router/lazyModule.ts
|
|
@@ -8961,15 +9250,18 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, syncIslandG
|
|
|
8961
9250
|
for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
|
|
8962
9251
|
transpiled = replaceQuotedSpecifier(transpiled, spec, resolvedModuleImport);
|
|
8963
9252
|
}
|
|
8964
|
-
|
|
9253
|
+
const scopeClass = createAwaitScopeClassCapture();
|
|
9254
|
+
const compiledServer = compile(transpiled, {
|
|
8965
9255
|
css: "injected",
|
|
9256
|
+
cssHash: scopeClass.cssHash,
|
|
8966
9257
|
experimental: {
|
|
8967
9258
|
async: loweredAwaitSource.transformed || loweredSource.transformed
|
|
8968
9259
|
},
|
|
8969
9260
|
filename: resolutionSourcePath,
|
|
8970
9261
|
generate: "server",
|
|
8971
9262
|
hmr: isDevelopmentRuntime()
|
|
8972
|
-
})
|
|
9263
|
+
});
|
|
9264
|
+
let compiledCode = scopeClass.apply(compiledServer.js.code);
|
|
8973
9265
|
for (const [spec, compiledChildPath] of childModulePaths) {
|
|
8974
9266
|
compiledCode = replaceQuotedSpecifier(compiledCode, spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), compiledChildPath));
|
|
8975
9267
|
}
|
|
@@ -11262,6 +11554,7 @@ var init_pageMetadata = __esm(() => {
|
|
|
11262
11554
|
});
|
|
11263
11555
|
|
|
11264
11556
|
// src/utils/spaRouteManifest.ts
|
|
11557
|
+
import { NotFound as NotFound2 } from "elysia";
|
|
11265
11558
|
import { basename as basename4 } from "path";
|
|
11266
11559
|
var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
|
|
11267
11560
|
Reflect.set(globalThis, SPA_ROUTES_KEY, hosts);
|
|
@@ -11326,7 +11619,14 @@ var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
|
|
|
11326
11619
|
}, renderSpaNotFound = async (framework, pageName, request) => {
|
|
11327
11620
|
if (isKnownSpaRoute(framework, pageName, request))
|
|
11328
11621
|
return null;
|
|
11329
|
-
return
|
|
11622
|
+
return renderSpaNotFoundResponse(request);
|
|
11623
|
+
}, renderSpaNotFoundResponse = async (request) => {
|
|
11624
|
+
if (request && !isPageRequest(request)) {
|
|
11625
|
+
return new NotFound2().toResponse();
|
|
11626
|
+
}
|
|
11627
|
+
return await renderFirstNotFound({
|
|
11628
|
+
preferHtmx: request?.headers.get("hx-request") === "true"
|
|
11629
|
+
}) ?? new Response("Not found", {
|
|
11330
11630
|
headers: { "Content-Type": "text/plain" },
|
|
11331
11631
|
status: 404
|
|
11332
11632
|
});
|
|
@@ -16822,43 +17122,91 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
|
|
|
16822
17122
|
include chain: ${context.chain.map((path) => describe(path, context.root)).join(" \u2192 ")}`), findTagClose = (html, start) => {
|
|
16823
17123
|
const match = /^<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/.exec(html.slice(start));
|
|
16824
17124
|
return match ? start + match[0].length : -1;
|
|
16825
|
-
},
|
|
16826
|
-
const
|
|
16827
|
-
|
|
16828
|
-
const
|
|
16829
|
-
|
|
17125
|
+
}, readOpeningTag = (html, tag, start) => {
|
|
17126
|
+
const end = findTagClose(html, start);
|
|
17127
|
+
const raw = html.slice(start + tag.length + 1, end === -1 ? html.length : end - 1);
|
|
17128
|
+
const selfClosing = end !== -1 && raw.trimEnd().endsWith("/");
|
|
17129
|
+
const opening = {
|
|
17130
|
+
attributes: selfClosing ? raw.trimEnd().slice(0, -1) : raw,
|
|
17131
|
+
closing: false,
|
|
17132
|
+
end,
|
|
17133
|
+
selfClosing,
|
|
17134
|
+
start
|
|
17135
|
+
};
|
|
17136
|
+
return opening;
|
|
17137
|
+
}, nextTag = (html, tag, from) => {
|
|
17138
|
+
const tokens = new RegExp(`<${tag}(?=[\\s/>])|</${tag}\\s*>`, "gi");
|
|
17139
|
+
tokens.lastIndex = from;
|
|
17140
|
+
const token = tokens.exec(html);
|
|
17141
|
+
if (!token)
|
|
16830
17142
|
return null;
|
|
16831
|
-
|
|
16832
|
-
|
|
17143
|
+
if (!token[0].startsWith("</"))
|
|
17144
|
+
return readOpeningTag(html, tag, token.index);
|
|
17145
|
+
const closing = {
|
|
17146
|
+
attributes: "",
|
|
17147
|
+
closing: true,
|
|
17148
|
+
end: token.index + token[0].length,
|
|
17149
|
+
selfClosing: false,
|
|
17150
|
+
start: token.index
|
|
17151
|
+
};
|
|
17152
|
+
return closing;
|
|
17153
|
+
}, depthChange = (token) => {
|
|
17154
|
+
if (token.selfClosing)
|
|
17155
|
+
return 0;
|
|
17156
|
+
return token.closing ? -1 : 1;
|
|
17157
|
+
}, findElement = (html, tag, from) => {
|
|
17158
|
+
let open = nextTag(html, tag, from);
|
|
17159
|
+
while (open?.closing)
|
|
17160
|
+
open = nextTag(html, tag, open.end);
|
|
17161
|
+
if (!open || open.end === -1)
|
|
16833
17162
|
return null;
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
end: tagEnd,
|
|
17163
|
+
if (open.selfClosing) {
|
|
17164
|
+
const empty = {
|
|
17165
|
+
attributes: open.attributes,
|
|
17166
|
+
end: open.end,
|
|
16839
17167
|
inner: "",
|
|
16840
|
-
start:
|
|
17168
|
+
start: open.start
|
|
16841
17169
|
};
|
|
16842
|
-
return
|
|
17170
|
+
return empty;
|
|
16843
17171
|
}
|
|
16844
|
-
const tokens = new RegExp(`<${tag}(?=[\\s/>])|</${tag}\\s*>`, "gi");
|
|
16845
|
-
tokens.lastIndex = tagEnd;
|
|
16846
17172
|
let depth = 1;
|
|
16847
|
-
let token =
|
|
16848
|
-
while (token &&
|
|
16849
|
-
depth += token
|
|
16850
|
-
if (depth
|
|
16851
|
-
|
|
17173
|
+
let token = nextTag(html, tag, open.end);
|
|
17174
|
+
while (token && token.end !== -1) {
|
|
17175
|
+
depth += depthChange(token);
|
|
17176
|
+
if (depth === 0)
|
|
17177
|
+
break;
|
|
17178
|
+
token = nextTag(html, tag, token.end);
|
|
16852
17179
|
}
|
|
16853
|
-
if (!token)
|
|
17180
|
+
if (!token || token.end === -1)
|
|
16854
17181
|
return null;
|
|
16855
17182
|
const element = {
|
|
16856
|
-
attributes,
|
|
16857
|
-
end: token.
|
|
16858
|
-
inner: html.slice(
|
|
16859
|
-
start:
|
|
17183
|
+
attributes: open.attributes,
|
|
17184
|
+
end: token.end,
|
|
17185
|
+
inner: html.slice(open.end, token.start),
|
|
17186
|
+
start: open.start
|
|
16860
17187
|
};
|
|
16861
17188
|
return element;
|
|
17189
|
+
}, lineOf = (html, index) => html.slice(0, index).split(`
|
|
17190
|
+
`).length, assertBalanced = (html, tag, file, context) => {
|
|
17191
|
+
const open = [];
|
|
17192
|
+
let token = nextTag(html, tag, 0);
|
|
17193
|
+
while (token) {
|
|
17194
|
+
const where = `${describe(file, context.root)}:${lineOf(html, token.start)}`;
|
|
17195
|
+
if (token.end === -1)
|
|
17196
|
+
throw includeError(context, `Unterminated <${tag}> tag in ${where}`);
|
|
17197
|
+
if (token.closing && !open.pop())
|
|
17198
|
+
throw includeError(context, `</${tag}> without a matching <${tag}> in ${where}`);
|
|
17199
|
+
if (!token.closing && !token.selfClosing)
|
|
17200
|
+
open.push(token);
|
|
17201
|
+
token = nextTag(html, tag, token.end);
|
|
17202
|
+
}
|
|
17203
|
+
const [unclosed] = open;
|
|
17204
|
+
if (!unclosed)
|
|
17205
|
+
return;
|
|
17206
|
+
throw includeError(context, `Unclosed <${tag}${unclosed.attributes.trimEnd()}> in ${describe(file, context.root)}:${lineOf(html, unclosed.start)}: close it with </${tag}> or make it self-closing (<${tag} \u2026 />)`);
|
|
17207
|
+
}, INCLUDE_TAGS, assertIncludeTagsBalanced = (html, file, context) => {
|
|
17208
|
+
for (const tag of INCLUDE_TAGS)
|
|
17209
|
+
assertBalanced(html, tag, file, context);
|
|
16862
17210
|
}, readAttribute = (attributes, name) => new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(attributes)?.slice(1).find((value) => value !== undefined), replaceElements = (html, tag, replace) => {
|
|
16863
17211
|
let output = "";
|
|
16864
17212
|
let cursor = 0;
|
|
@@ -16900,6 +17248,7 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
|
|
|
16900
17248
|
throw includeError({ ...context, chain }, `<abs-include src="${src}"> in ${describe(file, context.root)}: file not found (${target})`);
|
|
16901
17249
|
}
|
|
16902
17250
|
context.dependencies.add(target);
|
|
17251
|
+
assertIncludeTagsBalanced(source, target, { ...context, chain });
|
|
16903
17252
|
const values = new Map([...collectSlotValues(element.inner)].map(([name, value]) => [
|
|
16904
17253
|
name,
|
|
16905
17254
|
expandWithin(value, file, context)
|
|
@@ -16924,10 +17273,13 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
|
|
|
16924
17273
|
readFile: options.readFile ?? readUtf8,
|
|
16925
17274
|
root: options.root ?? process.cwd()
|
|
16926
17275
|
};
|
|
17276
|
+
assertIncludeTagsBalanced(html, file, context);
|
|
16927
17277
|
const expanded = expandWithin(html, file, context);
|
|
16928
17278
|
return { dependencies: [...context.dependencies], html: expanded };
|
|
16929
17279
|
};
|
|
16930
|
-
var init_htmlIncludes = () => {
|
|
17280
|
+
var init_htmlIncludes = __esm(() => {
|
|
17281
|
+
INCLUDE_TAGS = ["abs-include", "abs-slot"];
|
|
17282
|
+
});
|
|
16931
17283
|
|
|
16932
17284
|
// src/build/spaSideManifests.ts
|
|
16933
17285
|
import { writeFile as writeFile7 } from "fs/promises";
|
|
@@ -24361,6 +24713,7 @@ var withResolvedSources = (map, sourceFile) => {
|
|
|
24361
24713
|
};
|
|
24362
24714
|
const generate = (mode) => {
|
|
24363
24715
|
const transpiled = mode === "server" ? transpiledServer : transpiledClient;
|
|
24716
|
+
const scopeClass = createAwaitScopeClassCapture();
|
|
24364
24717
|
const compiled = isModule ? compileModule(transpiled, {
|
|
24365
24718
|
dev: mode === "client" && dev,
|
|
24366
24719
|
experimental: {
|
|
@@ -24369,6 +24722,7 @@ var withResolvedSources = (map, sourceFile) => {
|
|
|
24369
24722
|
filename: src
|
|
24370
24723
|
}) : compile(transpiled, {
|
|
24371
24724
|
css: externalCss && mode === "client" ? "external" : "injected",
|
|
24725
|
+
cssHash: scopeClass.cssHash,
|
|
24372
24726
|
dev: mode === "client" && dev,
|
|
24373
24727
|
experimental: {
|
|
24374
24728
|
async: transformedByLowering
|
|
@@ -24378,7 +24732,7 @@ var withResolvedSources = (map, sourceFile) => {
|
|
|
24378
24732
|
hmr: isDev
|
|
24379
24733
|
});
|
|
24380
24734
|
const compiledJs = compiled.js;
|
|
24381
|
-
let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
|
|
24735
|
+
let code = scopeClass.apply(compiledJs.code).replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
|
|
24382
24736
|
if (mode === "client" && isDev) {
|
|
24383
24737
|
const moduleKey = `/@src/${relative24(process.cwd(), src).replace(/\\/g, "/")}`;
|
|
24384
24738
|
code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
|
|
@@ -26648,10 +27002,10 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
|
|
|
26648
27002
|
}
|
|
26649
27003
|
return {
|
|
26650
27004
|
content: parsedBlock.content.trim(),
|
|
26651
|
-
nextIndex: input.keyword === "@placeholder" ?
|
|
27005
|
+
nextIndex: input.keyword === "@placeholder" ? skipWhitespace2(input.template, parsedBlock.nextIndex) : parsedBlock.nextIndex
|
|
26652
27006
|
};
|
|
26653
27007
|
}, resolveDeferSlotStart = (template, deferIndex, markerCursor) => {
|
|
26654
|
-
const nextMarkerCursor =
|
|
27008
|
+
const nextMarkerCursor = skipWhitespace2(template, markerCursor);
|
|
26655
27009
|
if (template[nextMarkerCursor] === "{") {
|
|
26656
27010
|
return {
|
|
26657
27011
|
changed: false,
|
|
@@ -26876,7 +27230,7 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
|
|
|
26876
27230
|
template: resolvedBlockState.template
|
|
26877
27231
|
};
|
|
26878
27232
|
}
|
|
26879
|
-
const blockContent = parsePlaceholderAndErrorBlocks(template,
|
|
27233
|
+
const blockContent = parsePlaceholderAndErrorBlocks(template, skipWhitespace2(template, resolvedBlock.nextIndex));
|
|
26880
27234
|
const builtSlot = buildDeferredSlot({
|
|
26881
27235
|
cursorAfterResolved: blockContent.cursorAfterResolved,
|
|
26882
27236
|
errorHtml: blockContent.errorHtml,
|
|
@@ -26906,14 +27260,14 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
|
|
|
26906
27260
|
({ cursor, depth } = consumed);
|
|
26907
27261
|
}
|
|
26908
27262
|
return { content: value.slice(start + 1), nextIndex: value.length };
|
|
26909
|
-
},
|
|
27263
|
+
}, skipWhitespace2 = (value, index) => {
|
|
26910
27264
|
let cursor = index;
|
|
26911
27265
|
while (cursor < value.length && /\s/.test(value[cursor] ?? "")) {
|
|
26912
27266
|
cursor += 1;
|
|
26913
27267
|
}
|
|
26914
27268
|
return cursor;
|
|
26915
27269
|
}, parseOptionalParenthesizedBlock = (value, index) => {
|
|
26916
|
-
let cursor =
|
|
27270
|
+
let cursor = skipWhitespace2(value, index);
|
|
26917
27271
|
if (value[cursor] !== "(") {
|
|
26918
27272
|
return null;
|
|
26919
27273
|
}
|
|
@@ -26977,7 +27331,7 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
|
|
|
26977
27331
|
return null;
|
|
26978
27332
|
}
|
|
26979
27333
|
const blockKeywordCursor = cursorAfterResolved + keyword.length;
|
|
26980
|
-
const blockStart =
|
|
27334
|
+
const blockStart = skipWhitespace2(template, blockKeywordCursor);
|
|
26981
27335
|
if (template[blockStart] !== "{") {
|
|
26982
27336
|
return null;
|
|
26983
27337
|
}
|
|
@@ -27639,7 +27993,7 @@ ${importLine}${source.slice(insertAt)}`;
|
|
|
27639
27993
|
const rawExpression = value.slice(interpolationStart + 2, nextCursor - 2).trim();
|
|
27640
27994
|
const expression = rawExpression.length === 0 ? "''" : rawExpression;
|
|
27641
27995
|
const expressionLiteral = JSON.stringify(expression);
|
|
27642
|
-
parts.push(`\${this.__absoluteDeferResolveTemplateExpression(${expressionLiteral})}`);
|
|
27996
|
+
parts.push(`\${this.__absoluteDeferEscapeHtml(this.__absoluteDeferResolveTemplateExpression(${expressionLiteral}))}`);
|
|
27643
27997
|
cursor = nextCursor;
|
|
27644
27998
|
}
|
|
27645
27999
|
return parts.join("");
|
|
@@ -27670,6 +28024,10 @@ ${importLine}${source.slice(insertAt)}`;
|
|
|
27670
28024
|
` + ` return value;
|
|
27671
28025
|
` + ` }
|
|
27672
28026
|
|
|
28027
|
+
` + ` __absoluteDeferEscapeHtml(value: string) {
|
|
28028
|
+
` + ` return value.replace(/[&<>"']/g, (char) => char === '&' ? '&' : char === '<' ? '<' : char === '>' ? '>' : char === '"' ? '"' : ''');
|
|
28029
|
+
` + ` }
|
|
28030
|
+
|
|
27673
28031
|
`, buildDeferSlotFields = (slots) => [
|
|
27674
28032
|
buildDeferSlotTemplateResolver(),
|
|
27675
28033
|
...slots.map((slot, index) => {
|
|
@@ -33302,7 +33660,7 @@ var init_assetStore = __esm(() => {
|
|
|
33302
33660
|
".css": "text/css",
|
|
33303
33661
|
".eot": "application/vnd.ms-fontobject",
|
|
33304
33662
|
".gif": "image/gif",
|
|
33305
|
-
".html": "text/html",
|
|
33663
|
+
".html": "text/html; charset=utf-8",
|
|
33306
33664
|
".ico": "image/x-icon",
|
|
33307
33665
|
".jpeg": "image/jpeg",
|
|
33308
33666
|
".jpg": "image/jpeg",
|
|
@@ -34688,8 +35046,10 @@ ${code}`;
|
|
|
34688
35046
|
}).js.code;
|
|
34689
35047
|
}, compileSvelteComponent = (raw, filePath, projectRoot, enableAsync = false) => {
|
|
34690
35048
|
const compiler = getLoadedSvelteCompiler();
|
|
35049
|
+
const scopeClass = createAwaitScopeClassCapture();
|
|
34691
35050
|
const compiled = compiler.compile(raw, {
|
|
34692
35051
|
css: "external",
|
|
35052
|
+
cssHash: scopeClass.cssHash,
|
|
34693
35053
|
dev: true,
|
|
34694
35054
|
experimental: {
|
|
34695
35055
|
async: enableAsync
|
|
@@ -34698,7 +35058,7 @@ ${code}`;
|
|
|
34698
35058
|
generate: "client",
|
|
34699
35059
|
hmr: true
|
|
34700
35060
|
});
|
|
34701
|
-
let
|
|
35061
|
+
let code = scopeClass.apply(compiled.js.code);
|
|
34702
35062
|
if (compiled.css?.code) {
|
|
34703
35063
|
const cssPath = `${filePath}.css`;
|
|
34704
35064
|
svelteExternalCss.set(cssPath, compiled.css.code);
|
|
@@ -35451,6 +35811,7 @@ var emberCacheBuster = 0, invalidateEmberSsrCache = () => {
|
|
|
35451
35811
|
emberCacheBuster = Date.now();
|
|
35452
35812
|
};
|
|
35453
35813
|
var init_pageHandler = __esm(() => {
|
|
35814
|
+
init_constants();
|
|
35454
35815
|
init_escapeScriptContent();
|
|
35455
35816
|
init_cspNonceRef();
|
|
35456
35817
|
init_pageResponseCache();
|
|
@@ -35606,7 +35967,7 @@ var init_backendGraph = __esm(() => {
|
|
|
35606
35967
|
|
|
35607
35968
|
// src/dev/hot/analyze.ts
|
|
35608
35969
|
import { dirname as dirname45, extname as extname23 } from "path";
|
|
35609
|
-
var ANALYZER_VERSION =
|
|
35970
|
+
var ANALYZER_VERSION = 3, hashText = (text) => Bun.hash(text).toString(36), scriptKindFor = (tsc, path) => {
|
|
35610
35971
|
switch (extname23(path)) {
|
|
35611
35972
|
case ".tsx":
|
|
35612
35973
|
return tsc.ScriptKind.TSX;
|
|
@@ -36112,6 +36473,12 @@ var ANALYZER_VERSION = 2, hashText = (text) => Bun.hash(text).toString(36), scri
|
|
|
36112
36473
|
return statement.declares.map((name) => `${statement.id}:${name}`);
|
|
36113
36474
|
return [statement.id];
|
|
36114
36475
|
};
|
|
36476
|
+
const bindingsOf = (statement) => [...new Set(statement.refs.map((reference) => reference.name))].sort().map((name) => {
|
|
36477
|
+
const imported = imports.get(name);
|
|
36478
|
+
if (!imported)
|
|
36479
|
+
return `${name}=local`;
|
|
36480
|
+
return `${name}=${imported.module ?? imported.specifier ?? ""}#${imported.name}`;
|
|
36481
|
+
}).join("\x00");
|
|
36115
36482
|
const plan = planned.map((statement) => {
|
|
36116
36483
|
const deps = new Set;
|
|
36117
36484
|
for (const reference of statement.refs) {
|
|
@@ -36124,7 +36491,7 @@ var ANALYZER_VERSION = 2, hashText = (text) => Bun.hash(text).toString(36), scri
|
|
|
36124
36491
|
always: statement.kind === "untouched",
|
|
36125
36492
|
cell: statement.kind === "let",
|
|
36126
36493
|
deps: [...deps].sort((left, right) => left - right),
|
|
36127
|
-
hash: statement.ownHash,
|
|
36494
|
+
hash: hashText(`${statement.ownHash}\x00${bindingsOf(statement)}`),
|
|
36128
36495
|
ids: idsOf(statement),
|
|
36129
36496
|
imports: evalImports(statement).map((use) => [
|
|
36130
36497
|
use.module,
|
|
@@ -36432,7 +36799,7 @@ var records, recordFor = (path) => {
|
|
|
36432
36799
|
for (const update of updates)
|
|
36433
36800
|
update(value);
|
|
36434
36801
|
}
|
|
36435
|
-
}, managedModulePaths = () => [...records.keys()], moduleRecord = (path) => records.get(path),
|
|
36802
|
+
}, managedModulePaths = () => [...records.keys()], moduleRecord = (path) => records.get(path), nextTag2 = (path) => {
|
|
36436
36803
|
const record = recordFor(path);
|
|
36437
36804
|
record.tag += 1;
|
|
36438
36805
|
return record.tag;
|
|
@@ -36567,7 +36934,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
|
|
|
36567
36934
|
return call === 1 || meta[name]?.kind !== "function";
|
|
36568
36935
|
}));
|
|
36569
36936
|
}, importNextVersion = async (path) => {
|
|
36570
|
-
const namespace = await import(`${path}?absolute-hot=${
|
|
36937
|
+
const namespace = await import(`${path}?absolute-hot=${nextTag2(path)}`);
|
|
36571
36938
|
if (typeof namespace !== "object" || namespace === null)
|
|
36572
36939
|
throw new Error(`${path} did not evaluate to a module`);
|
|
36573
36940
|
return Object.fromEntries(Object.entries(namespace));
|
|
@@ -37078,6 +37445,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
37078
37445
|
state.fileHashes.set(normalizePath2(filePath), currentHash);
|
|
37079
37446
|
return;
|
|
37080
37447
|
}
|
|
37448
|
+
if (framework === "react" && globalThis.__absoluteBackendHmr === true)
|
|
37449
|
+
applyBackendEdit(resolvePath(filePath)).catch((error) => console.error("[hmr] server update for a React file failed:", error));
|
|
37081
37450
|
if (!hasFileChanged(filePath, currentHash, state.fileHashes)) {
|
|
37082
37451
|
return;
|
|
37083
37452
|
}
|
|
@@ -37124,8 +37493,6 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
37124
37493
|
return;
|
|
37125
37494
|
if (await rebuildReactServerComponents(state, config, filePath, currentHash))
|
|
37126
37495
|
return;
|
|
37127
|
-
if (framework === "react" && globalThis.__absoluteBackendHmr === true)
|
|
37128
|
-
applyBackendEdit(resolvePath(filePath)).catch((error) => console.error("[hmr] server update for a React file failed:", error));
|
|
37129
37496
|
if (framework === "unknown") {
|
|
37130
37497
|
invalidate(resolvePath(filePath));
|
|
37131
37498
|
const relPath = relative35(process.cwd(), filePath);
|
|
@@ -42197,7 +42564,7 @@ var init_partialPrerenderServe = __esm(() => {
|
|
|
42197
42564
|
import { createHash as createHash13 } from "crypto";
|
|
42198
42565
|
import { existsSync as existsSync63, readdirSync as readdirSync15, readFileSync as readFileSync59 } from "fs";
|
|
42199
42566
|
import { basename as basename26, join as join81, relative as relative37, resolve as resolvePath4 } from "path";
|
|
42200
|
-
import { Elysia as Elysia16, ElysiaError, InternalServerError, NotFound as
|
|
42567
|
+
import { Elysia as Elysia16, ElysiaError, InternalServerError, NotFound as NotFound3 } from "elysia";
|
|
42201
42568
|
var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
|
|
42202
42569
|
setTimeout(resolve, STATIC_PLUGIN_RETRY_DELAY_MS);
|
|
42203
42570
|
}), retryStaticPlugin = async (createStaticPlugin, options) => {
|
|
@@ -42504,7 +42871,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
42504
42871
|
return new Elysia16({ name: "absolutejs-vitals-disabled" });
|
|
42505
42872
|
const { endpoint } = resolveVitalsConfig(config.vitals);
|
|
42506
42873
|
return endpoint.startsWith("/") ? createVitalsPlugin(endpoint) : new Elysia16({ name: "absolutejs-vitals-remote" });
|
|
42507
|
-
}, createNotFoundPlugin = () => new Elysia16({ name: "absolutejs-not-found" }).onError("global",
|
|
42874
|
+
}, createNotFoundPlugin = () => new Elysia16({ name: "absolutejs-not-found" }).onError("global", NotFound3, async ({ request }) => {
|
|
42508
42875
|
if (!isPageRequest(request))
|
|
42509
42876
|
return;
|
|
42510
42877
|
const response = await renderFirstNotFound({
|
|
@@ -43151,6 +43518,7 @@ var assetUnchecked = (source, name) => {
|
|
|
43151
43518
|
return assetPath;
|
|
43152
43519
|
};
|
|
43153
43520
|
// src/core/fileRoutes.ts
|
|
43521
|
+
init_constants();
|
|
43154
43522
|
init_resolveConvention();
|
|
43155
43523
|
init_logger();
|
|
43156
43524
|
init_ssrErrorPage();
|
|
@@ -43175,7 +43543,7 @@ var renderLoadError = async (route, error) => {
|
|
|
43175
43543
|
console.error(`[file-routes] load failed for ${route.source}:`, error);
|
|
43176
43544
|
const conventionResponse = await renderConventionError(route.framework, route.name, error);
|
|
43177
43545
|
return conventionResponse ?? new Response(ssrErrorPage(route.framework, error), {
|
|
43178
|
-
headers: { "Content-Type":
|
|
43546
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
43179
43547
|
status: 500
|
|
43180
43548
|
});
|
|
43181
43549
|
};
|
|
@@ -43235,6 +43603,7 @@ var fileRoutes2 = (routes, manifest) => (app) => {
|
|
|
43235
43603
|
init_islands();
|
|
43236
43604
|
|
|
43237
43605
|
// src/core/pageHandlers.ts
|
|
43606
|
+
init_constants();
|
|
43238
43607
|
init_staticIslandPages();
|
|
43239
43608
|
init_pageResponseCache();
|
|
43240
43609
|
init_staticStreaming();
|
|
@@ -43466,7 +43835,7 @@ var handleStaticPageRequest = async (pagePath, options = {}, settings = {}) => {
|
|
|
43466
43835
|
const transformedHtml = await transformCurrentStaticPageHtml(html, settings);
|
|
43467
43836
|
const htmlWithTranslationBaseline = htmlContainsIslands(transformedHtml) ? injectBrowserTranslationBaseline(transformedHtml) : transformedHtml;
|
|
43468
43837
|
return withPageCacheHeaders(await withStreamingSlots(new Response(injectIslandPageContext(htmlWithTranslationBaseline), {
|
|
43469
|
-
headers: { "Content-Type":
|
|
43838
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE }
|
|
43470
43839
|
}), {
|
|
43471
43840
|
...options,
|
|
43472
43841
|
streamingSlots: options.streamingSlots ?? []
|
|
@@ -43476,7 +43845,7 @@ var renderStaticPageError = async (framework, pagePath, error) => {
|
|
|
43476
43845
|
console.error(`[SSR] ${framework.toUpperCase()} page error:`, error);
|
|
43477
43846
|
const conventionResponse = await renderConventionError(framework, derivePageName(pagePath), error);
|
|
43478
43847
|
return withPageCacheHeaders(conventionResponse ?? new Response(ssrErrorPage(framework, error), {
|
|
43479
|
-
headers: { "Content-Type":
|
|
43848
|
+
headers: { "Content-Type": HTML_CONTENT_TYPE },
|
|
43480
43849
|
status: 500
|
|
43481
43850
|
}));
|
|
43482
43851
|
};
|
|
@@ -44403,7 +44772,7 @@ init_devtoolsJson();
|
|
|
44403
44772
|
// src/plugins/lazyPlugin.ts
|
|
44404
44773
|
init_constants();
|
|
44405
44774
|
var {env: env5 } = globalThis.Bun;
|
|
44406
|
-
import { Elysia as Elysia18, NotFound as
|
|
44775
|
+
import { Elysia as Elysia18, NotFound as NotFound4 } from "elysia";
|
|
44407
44776
|
import { buildGlobalWSHandler as buildGlobalWSHandler2 } from "elysia/ws";
|
|
44408
44777
|
var MAX_MODULE_UNWRAP_DEPTH = 8;
|
|
44409
44778
|
var MODULE_META_KEYS = new Set(["__esModule"]);
|
|
@@ -44499,7 +44868,7 @@ var lazyPlugin = (options) => {
|
|
|
44499
44868
|
};
|
|
44500
44869
|
const dispatch = async (request) => {
|
|
44501
44870
|
if (mounted)
|
|
44502
|
-
throw new
|
|
44871
|
+
throw new NotFound4;
|
|
44503
44872
|
loading ??= loadPlugin(options, prefix);
|
|
44504
44873
|
let plugin;
|
|
44505
44874
|
try {
|
|
@@ -44557,7 +44926,7 @@ var getRelativeTimeFormat = (locale, options) => cached(relativeTimeFormats, cac
|
|
|
44557
44926
|
var SYNTAX_CHARS = new Set(["{", "}", "#", "|"]);
|
|
44558
44927
|
var WHITESPACE = /\s/;
|
|
44559
44928
|
var isBranchKind = (value) => value === "plural" || value === "select" || value === "selectordinal";
|
|
44560
|
-
var
|
|
44929
|
+
var skipWhitespace3 = (cursor) => {
|
|
44561
44930
|
while (cursor.index < cursor.source.length && WHITESPACE.test(cursor.source.charAt(cursor.index))) {
|
|
44562
44931
|
cursor.index += 1;
|
|
44563
44932
|
}
|
|
@@ -44571,7 +44940,7 @@ var readToken = (cursor, stops) => {
|
|
|
44571
44940
|
return cursor.source.slice(start, cursor.index).trim();
|
|
44572
44941
|
};
|
|
44573
44942
|
var expectChar = (cursor, char) => {
|
|
44574
|
-
|
|
44943
|
+
skipWhitespace3(cursor);
|
|
44575
44944
|
if (cursor.source.charAt(cursor.index) !== char)
|
|
44576
44945
|
throw syntaxError(cursor, `"${char}"`);
|
|
44577
44946
|
cursor.index += 1;
|
|
@@ -44600,7 +44969,7 @@ var readQuoted = (cursor, inPlural) => {
|
|
|
44600
44969
|
cursor.index += 1;
|
|
44601
44970
|
return text;
|
|
44602
44971
|
};
|
|
44603
|
-
var
|
|
44972
|
+
var pushText2 = (nodes, value) => {
|
|
44604
44973
|
const last = nodes[nodes.length - 1];
|
|
44605
44974
|
if (last?.kind === "text") {
|
|
44606
44975
|
last.value += value;
|
|
@@ -44616,7 +44985,7 @@ var parseBranchOption = (cursor, kind, branches) => {
|
|
|
44616
44985
|
const offsetMatch = /^offset:(\d+)$/.exec(selector);
|
|
44617
44986
|
if (offsetMatch && kind !== "select") {
|
|
44618
44987
|
branches.offset = Number(offsetMatch[1]);
|
|
44619
|
-
|
|
44988
|
+
skipWhitespace3(cursor);
|
|
44620
44989
|
return;
|
|
44621
44990
|
}
|
|
44622
44991
|
if (selector === "")
|
|
@@ -44624,11 +44993,11 @@ var parseBranchOption = (cursor, kind, branches) => {
|
|
|
44624
44993
|
expectChar(cursor, "{");
|
|
44625
44994
|
branches.options[selector] = parseNodes(cursor, kind !== "select");
|
|
44626
44995
|
expectChar(cursor, "}");
|
|
44627
|
-
|
|
44996
|
+
skipWhitespace3(cursor);
|
|
44628
44997
|
};
|
|
44629
44998
|
var parseBranchOptions = (cursor, kind) => {
|
|
44630
44999
|
const branches = { offset: 0, options: {} };
|
|
44631
|
-
|
|
45000
|
+
skipWhitespace3(cursor);
|
|
44632
45001
|
while (cursor.source.charAt(cursor.index) !== "}") {
|
|
44633
45002
|
parseBranchOption(cursor, kind, branches);
|
|
44634
45003
|
}
|
|
@@ -44637,7 +45006,7 @@ var parseBranchOptions = (cursor, kind) => {
|
|
|
44637
45006
|
return branches;
|
|
44638
45007
|
};
|
|
44639
45008
|
var parseArgument = (cursor) => {
|
|
44640
|
-
|
|
45009
|
+
skipWhitespace3(cursor);
|
|
44641
45010
|
const name = readToken(cursor, ",}");
|
|
44642
45011
|
if (name === "")
|
|
44643
45012
|
throw syntaxError(cursor, "an argument name");
|
|
@@ -44674,10 +45043,10 @@ var parseNode = (cursor, inPlural, nodes) => {
|
|
|
44674
45043
|
return;
|
|
44675
45044
|
}
|
|
44676
45045
|
if (char === "'") {
|
|
44677
|
-
|
|
45046
|
+
pushText2(nodes, readQuoted(cursor, inPlural));
|
|
44678
45047
|
return;
|
|
44679
45048
|
}
|
|
44680
|
-
|
|
45049
|
+
pushText2(nodes, char);
|
|
44681
45050
|
cursor.index += 1;
|
|
44682
45051
|
};
|
|
44683
45052
|
var parseNodes = (cursor, inPlural) => {
|
|
@@ -49966,6 +50335,7 @@ export {
|
|
|
49966
50335
|
HOOK_SIGNATURE_LENGTH,
|
|
49967
50336
|
HOURS_IN_DAY,
|
|
49968
50337
|
HOURS_IN_HALF_DAY,
|
|
50338
|
+
HTML_CONTENT_TYPE,
|
|
49969
50339
|
HTTP_STATUS_BAD_REQUEST,
|
|
49970
50340
|
HTTP_STATUS_GONE,
|
|
49971
50341
|
HTTP_STATUS_INTERNAL_SERVER_ERROR,
|
|
@@ -50137,5 +50507,5 @@ export {
|
|
|
50137
50507
|
wrapPageHandlerWithStreamingSlots
|
|
50138
50508
|
};
|
|
50139
50509
|
|
|
50140
|
-
//# debugId=
|
|
50510
|
+
//# debugId=16437D806FE96BF764756E2164756E21
|
|
50141
50511
|
//# sourceMappingURL=index.js.map
|