@absolutejs/absolute 0.20.0-beta.170 → 0.20.0-beta.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/README.md +33 -4
- package/changelog.json +128 -0
- package/dist/angular/browser.js +2 -2
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/constants.js +1 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +2 -2
- package/dist/angular/components/core/streamingSlotRegistry.js +3 -3
- package/dist/angular/index.js +184 -29
- package/dist/angular/index.js.map +15 -14
- package/dist/angular/server.js +184 -29
- package/dist/angular/server.js.map +15 -14
- package/dist/build.js +1241 -853
- package/dist/build.js.map +32 -30
- package/dist/cli/{add-6a7pjkn9.js → add-ae6mg79m.js} +10 -10
- package/dist/cli/{analyze-606fshwa.js → analyze-e57zz9x8.js} +3 -3
- package/dist/cli/{androidEmulatorController-68jjdxmx.js → androidEmulatorController-vqc5m2rp.js} +6 -6
- package/dist/cli/{androidNativeWatcher-x032x9yr.js → androidNativeWatcher-s03aczxv.js} +6 -6
- package/dist/cli/{api-mshjr4ah.js → api-8ppxw487.js} +8 -8
- package/dist/cli/{build-g81xqbb9.js → build-fz7qbdn3.js} +3 -3
- package/dist/cli/{buildDepVendor-29d8v9cx.js → buildDepVendor-qvsh6dsj.js} +7 -3
- package/dist/cli/{compile-9y1w9zpj.js → compile-ndc36zna.js} +10 -7
- package/dist/cli/config/server.js +36 -6
- package/dist/cli/{db-5b4s1kvx.js → db-qbzjw3en.js} +2 -2
- package/dist/cli/{dev-hyeb89hp.js → dev-x49583aj.js} +43 -15
- package/dist/cli/{doctor-h55y9hj1.js → doctor-repprx92.js} +42 -12
- package/dist/cli/{emulatorDoctor-p3yt7140.js → emulatorDoctor-s1z5tkp7.js} +5 -5
- package/dist/cli/{emulatorInstaller-4pm2kx9w.js → emulatorInstaller-pgkdswvq.js} +6 -6
- package/dist/cli/{env-snb0597q.js → env-5nz1qm8e.js} +3 -3
- package/dist/cli/{expoDevController-0vj8dvkh.js → expoDevController-018anvbm.js} +6 -6
- package/dist/cli/{generate-20x1pkf7.js → generate-brvjesd6.js} +8 -8
- package/dist/cli/{heapDiff-wqj8vrq8.js → heapDiff-kncvdtn8.js} +3 -3
- package/dist/cli/htmx/htmx.min.js +1 -1
- package/dist/cli/{htmx-6mz2h7k1.js → htmx-5twhjz7p.js} +7 -7
- package/dist/cli/{index-w09fzs9f.js → index-0z5fgb80.js} +1 -1
- package/dist/cli/{index-exfkpjja.js → index-125cfzvn.js} +2 -2
- package/dist/cli/{index-32ge2w1f.js → index-25e7k849.js} +16 -8
- package/dist/cli/{index-ys2rzqhg.js → index-2shf4aya.js} +1 -1
- package/dist/cli/{index-74m7kh8c.js → index-3ewt17wm.js} +1 -1
- package/dist/cli/{index-zd3cna19.js → index-3sfcmb49.js} +1 -1
- package/dist/cli/{index-14fbvz34.js → index-50ag35xg.js} +2 -2
- package/dist/cli/{index-h5qx5jpk.js → index-7854xf0m.js} +1 -1
- package/dist/cli/{index-3y57kd7x.js → index-8khbn8qr.js} +3 -3
- package/dist/cli/{index-xw1byvzp.js → index-9djrap79.js} +1 -1
- package/dist/cli/{index-ppphkyps.js → index-a6xx0p9e.js} +1 -1
- package/dist/cli/{index-g4ehq6ev.js → index-aemhvvwb.js} +1 -1
- package/dist/cli/{index-z6f43b20.js → index-b1wht4q5.js} +1 -1
- package/dist/cli/{index-s3xvccq3.js → index-btp4fyf1.js} +2 -2
- package/dist/cli/{index-066qhc6n.js → index-cgmp9d02.js} +1 -1
- package/dist/cli/{index-3wz3mktm.js → index-gyjxrnnz.js} +1 -1
- package/dist/cli/index-jwfambwe.js +13 -0
- package/dist/cli/{index-3wm8p7rg.js → index-n6faa3m3.js} +1 -1
- package/dist/cli/{index-kye08pjx.js → index-pr1skxen.js} +1 -1
- package/dist/cli/{index-t8cf0zj9.js → index-prza6tkp.js} +3 -3
- package/dist/cli/{index-qbrzvmh9.js → index-q3snnhyd.js} +1 -1
- package/dist/cli/{index-3vmc30gf.js → index-rz56x932.js} +1 -1
- package/dist/cli/{index-9sksd8c8.js → index-vh68jb0e.js} +2 -2
- package/dist/cli/index.js +32 -32
- package/dist/cli/{info-mn125212.js → info-k124sh7g.js} +4 -4
- package/dist/cli/{inspect-c7s117j0.js → inspect-n6pcfvfw.js} +5 -5
- package/dist/cli/{iosNativeWatcher-0nm6qad5.js → iosNativeWatcher-wdq2fvj1.js} +7 -7
- package/dist/cli/{iosSimulatorController-hza2c3rv.js → iosSimulatorController-n97dpa8p.js} +7 -7
- package/dist/cli/{islands-dc54e5y1.js → islands-p4vgx7a2.js} +3 -3
- package/dist/cli/{logs-ej1add2b.js → logs-shg23fbt.js} +3 -3
- package/dist/cli/{ls-b6zz24nt.js → ls-0hfx323m.js} +3 -3
- package/dist/cli/{mem-5q7n3ymb.js → mem-16sy1707.js} +5 -5
- package/dist/cli/{migrate-6nm4kdf6.js → migrate-k91k050s.js} +2 -2
- package/dist/cli/{mobile-ajnnvqtv.js → mobile-nqdkk3gd.js} +13 -13
- package/dist/cli/prerender-010z771p.js +10 -0
- package/dist/cli/{prettier-phdtvqef.js → prettier-dh5fh786.js} +1 -1
- package/dist/cli/{ps-ezmzyscn.js → ps-pk7ncjac.js} +6 -6
- package/dist/cli/{psTui-3x3ykjve.js → psTui-50wf0b72.js} +7 -7
- package/dist/cli/{remoteMacProtocol-g09myqt5.js → remoteMacProtocol-g10s408w.js} +7 -7
- package/dist/cli/{remove-t8x1mrxg.js → remove-abaf0w6k.js} +8 -8
- package/dist/cli/{routes-3xj256gx.js → routes-mc3ymp8t.js} +3 -3
- package/dist/cli/{start-d6p831ny.js → start-t3cq57wn.js} +5 -5
- package/dist/cli/{typecheck-stbt0qt5.js → typecheck-fag7djt5.js} +38 -10
- package/dist/cli/{workspace-61hh6jq1.js → workspace-7sbyyc59.js} +5 -5
- package/dist/client/chunks/islands-s2ta5ajb.js.map +1 -1
- package/dist/client/navigation.js +2 -1
- package/dist/client/navigation.js.map +3 -3
- package/dist/dev/client/domTracker.ts +52 -19
- package/dist/dev/client/frameworkDetect.ts +11 -0
- package/dist/dev/client/handlers/html.ts +6 -1
- package/dist/dev/client/handlers/htmx.ts +6 -1
- package/dist/dev/client/hmrClient.ts +10 -0
- package/dist/dev/serverBootstrap.js +112 -6
- package/dist/index.js +1147 -757
- package/dist/index.js.map +32 -30
- package/dist/islands/index.js +16 -5
- package/dist/islands/index.js.map +6 -6
- package/dist/mobile/index.js +2 -2
- package/dist/mobile/index.js.map +3 -3
- package/dist/react/components/index.js +2 -2
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/index.js +85 -18
- package/dist/react/index.js.map +11 -11
- package/dist/react/server.js +71 -15
- package/dist/react/server.js.map +8 -8
- package/dist/src/angular/baseHref.d.ts +2 -0
- package/dist/src/angular/components/constants.d.ts +1 -0
- package/dist/src/angular/ssrRender.d.ts +1 -1
- package/dist/src/build/compileAngular.d.ts +15 -0
- package/dist/src/build/resolveBuildMode.d.ts +6 -0
- package/dist/src/build/scanAngularHandlerCalls.d.ts +3 -1
- package/dist/src/build/verifyAngularCoreUniqueness.d.ts +3 -1
- package/dist/src/cli/htmx/install.d.ts +1 -1
- package/dist/src/cli/scripts/bunCheck.d.ts +3 -1
- package/dist/src/cli/typeGraphCoherence.d.ts +9 -2
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/core/appErrorHooks.d.ts +8 -0
- package/dist/src/core/islandPageContext.d.ts +5 -1
- package/dist/src/core/requestContext.d.ts +5 -0
- package/dist/src/core/serverOnlyStaticFiles.d.ts +7 -0
- package/dist/src/dev/editorTempFiles.d.ts +3 -0
- package/dist/src/dev/hot/analyze.d.ts +1 -1
- package/dist/src/dev/hot/runtime.d.ts +20 -0
- package/dist/src/dev/importCost/instrument.d.ts +1 -1
- package/dist/src/dev/rebuildTrigger.d.ts +1 -0
- package/dist/src/utils/cleanStaleOutputs.d.ts +4 -1
- package/dist/src/utils/logger.d.ts +3 -2
- package/dist/src/utils/resolveConvention.d.ts +1 -0
- package/dist/src/utils/ssrErrorPage.d.ts +3 -0
- package/dist/svelte/index.js +85 -18
- package/dist/svelte/index.js.map +11 -11
- package/dist/svelte/router/Route.svelte.d.ts +1 -2
- package/dist/svelte/router/Router.svelte +2 -4
- package/dist/svelte/server.js +73 -16
- package/dist/svelte/server.js.map +9 -9
- package/dist/types/globals.d.ts +3 -0
- package/dist/types/svelteRouter.ts +3 -12
- 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 +158 -91
- package/dist/vue/index.js.map +12 -12
- package/dist/vue/server.js +144 -88
- package/dist/vue/server.js.map +9 -9
- package/package.json +2 -1
- package/dist/cli/prerender-fqpp0m1j.js +0 -10
- /package/dist/cli/{index-vtp20gwf.js → index-2bxfhs32.js} +0 -0
- /package/dist/cli/{index-fgz435qn.js → index-t8jmj8w1.js} +0 -0
|
@@ -39,6 +39,7 @@ export const HTTP_STATUS_OK = 200;
|
|
|
39
39
|
export const HTTP_STATUS_BAD_REQUEST = 400;
|
|
40
40
|
export const HTTP_STATUS_NOT_FOUND = 404;
|
|
41
41
|
export const HTTP_STATUS_GONE = 410;
|
|
42
|
+
export const HTTP_STATUS_INTERNAL_SERVER_ERROR = 500;
|
|
42
43
|
export const HOURS_IN_DAY = 24;
|
|
43
44
|
export const HOURS_IN_HALF_DAY = 12;
|
|
44
45
|
export const IMAGE_DEFAULT_DEVICE_SIZES = [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// .angular-partial-tmp-
|
|
2
|
+
// .angular-partial-tmp-a5Gf1s/src/utils/runtimeMode.ts
|
|
3
3
|
var ENV_VAR = "NODE_ENV";
|
|
4
4
|
var isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
5
5
|
|
|
6
|
-
// .angular-partial-tmp-
|
|
6
|
+
// .angular-partial-tmp-a5Gf1s/src/core/streamingSlotRegistrar.ts
|
|
7
7
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
8
8
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
9
9
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// .angular-partial-tmp-
|
|
2
|
+
// .angular-partial-tmp-a5Gf1s/src/utils/runtimeMode.ts
|
|
3
3
|
var ENV_VAR = "NODE_ENV";
|
|
4
4
|
var isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
5
5
|
|
|
6
|
-
// .angular-partial-tmp-
|
|
6
|
+
// .angular-partial-tmp-a5Gf1s/src/core/streamingSlotRegistrar.ts
|
|
7
7
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
8
8
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
9
9
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -50,7 +50,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
50
50
|
getWarningController()?.maybeWarn(primitiveName);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
// .angular-partial-tmp-
|
|
53
|
+
// .angular-partial-tmp-a5Gf1s/src/core/streamingSlotRegistry.ts
|
|
54
54
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
55
55
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
56
56
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/angular/index.js
CHANGED
|
@@ -88,7 +88,7 @@ var ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER = "x-skip-transfer-cache", buildAbs
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
// src/constants.ts
|
|
91
|
-
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
|
91
|
+
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;
|
|
92
92
|
var init_constants = __esm(() => {
|
|
93
93
|
TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
|
|
94
94
|
IMAGE_DEFAULT_DEVICE_SIZES = [
|
|
@@ -222,7 +222,7 @@ var init_startupBanner = __esm(() => {
|
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
// src/utils/logger.ts
|
|
225
|
-
var colors2, frameworkColors, formatPath = (filePath) => {
|
|
225
|
+
var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" : "[absolutejs]", formatPath = (filePath) => {
|
|
226
226
|
const cwd = process.cwd();
|
|
227
227
|
let relative = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
|
|
228
228
|
relative = relative.replace(/\\/g, "/");
|
|
@@ -232,7 +232,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
|
|
|
232
232
|
return relative;
|
|
233
233
|
}, getFrameworkColor = (framework) => frameworkColors[framework] || colors2.white, log = (action, options) => {
|
|
234
234
|
const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
|
|
235
|
-
const tag = `${colors2.cyan}
|
|
235
|
+
const tag = `${colors2.cyan}${logTag()}${colors2.reset}`;
|
|
236
236
|
let message = action;
|
|
237
237
|
if (options?.path) {
|
|
238
238
|
const pathColor = options.framework ? getFrameworkColor(options.framework) : colors2.white;
|
|
@@ -246,7 +246,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
|
|
|
246
246
|
log("css update", { duration, framework: framework ?? "css", path });
|
|
247
247
|
}, logError = (message, error) => {
|
|
248
248
|
const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
|
|
249
|
-
const tag = `${colors2.red}
|
|
249
|
+
const tag = `${colors2.red}${logTag()}${colors2.reset}`;
|
|
250
250
|
const errorMsg = error instanceof Error ? error.message : error;
|
|
251
251
|
const fullMessage = `${colors2.red}error${colors2.reset} ${message}${errorMsg ? `: ${errorMsg}` : ""}`;
|
|
252
252
|
console.error(`${timestamp} ${tag} ${fullMessage}`);
|
|
@@ -275,7 +275,7 @@ var colors2, frameworkColors, formatPath = (filePath) => {
|
|
|
275
275
|
log(`${colors2.cyan}server module reloaded${colors2.reset}`);
|
|
276
276
|
}, logWarn = (message) => {
|
|
277
277
|
const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
|
|
278
|
-
const tag = `${colors2.yellow}
|
|
278
|
+
const tag = `${colors2.yellow}${logTag()}${colors2.reset}`;
|
|
279
279
|
console.log(`${timestamp} ${tag} ${colors2.yellow}warning ${message}${colors2.reset}`);
|
|
280
280
|
};
|
|
281
281
|
var init_logger = __esm(() => {
|
|
@@ -338,8 +338,23 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
338
338
|
return;
|
|
339
339
|
warnedMissingBootstrap = true;
|
|
340
340
|
logWarn("A page contains islands, but the build manifest has no islands bootstrap, so they will render without hydrating. Set `islands.registry` in absolute.config.ts (a default bootstrap is generated from it) or point `islands.bootstrap` at a file that calls startIslands().");
|
|
341
|
+
}, manifestBuildDir, WINDOWS_ABSOLUTE_PATH, isServerFilePath = (value) => {
|
|
342
|
+
if (WINDOWS_ABSOLUTE_PATH.test(value))
|
|
343
|
+
return true;
|
|
344
|
+
if (!manifestBuildDir)
|
|
345
|
+
return false;
|
|
346
|
+
const root = manifestBuildDir.endsWith("/") ? manifestBuildDir : `${manifestBuildDir}/`;
|
|
347
|
+
return value.startsWith(root);
|
|
348
|
+
}, toBrowserManifest = (manifest) => {
|
|
349
|
+
const browserManifest = {};
|
|
350
|
+
for (const [key, value] of Object.entries(manifest)) {
|
|
351
|
+
if (typeof value !== "string" || isServerFilePath(value))
|
|
352
|
+
continue;
|
|
353
|
+
browserManifest[key] = value;
|
|
354
|
+
}
|
|
355
|
+
return browserManifest;
|
|
341
356
|
}, buildIslandsHeadMarkup = (manifest) => {
|
|
342
|
-
const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(manifest))}</script>`;
|
|
357
|
+
const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
|
|
343
358
|
const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}</script>`;
|
|
344
359
|
const bootstrapPath = getIslandBootstrapPath(manifest);
|
|
345
360
|
const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
|
|
@@ -539,13 +554,15 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
539
554
|
return stream;
|
|
540
555
|
}
|
|
541
556
|
return pipeStreamWithIslandMarkerDetection(stream, markup, () => warnIfBootstrapMissing(manifest));
|
|
542
|
-
}, setCurrentIslandManifest = (manifest) => {
|
|
557
|
+
}, setCurrentIslandManifest = (manifest, buildDir) => {
|
|
543
558
|
globalThis.__absoluteManifest = manifest;
|
|
559
|
+
manifestBuildDir = buildDir?.replaceAll("\\", "/");
|
|
544
560
|
};
|
|
545
561
|
var init_islandPageContext = __esm(() => {
|
|
546
562
|
init_escapeScriptContent();
|
|
547
563
|
init_cspNonceRef();
|
|
548
564
|
init_logger();
|
|
565
|
+
WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
|
|
549
566
|
});
|
|
550
567
|
|
|
551
568
|
// src/core/routeAssets.ts
|
|
@@ -618,7 +635,7 @@ var init_inlinePageCss = __esm(() => {
|
|
|
618
635
|
});
|
|
619
636
|
|
|
620
637
|
// src/utils/ssrErrorPage.ts
|
|
621
|
-
var errorPageHtml = ({
|
|
638
|
+
var GENERIC_ERROR_MESSAGE = "Something went wrong while rendering this page.", errorPageHtml = ({
|
|
622
639
|
framework,
|
|
623
640
|
hint,
|
|
624
641
|
kind,
|
|
@@ -681,11 +698,11 @@ ${script}
|
|
|
681
698
|
|
|
682
699
|
${error ?? "The dev-server terminal has the build output."}`,
|
|
683
700
|
script: reloadOnRebuild()
|
|
684
|
-
}), ssrErrorPage = (framework, error) => errorPageHtml({
|
|
701
|
+
}), errorMessage = (error) => error instanceof Error ? error.message : String(error), ssrErrorPage = (framework, error) => errorPageHtml({
|
|
685
702
|
framework,
|
|
686
703
|
hint: "A component threw during server-side rendering. Check the terminal for the full stack trace.",
|
|
687
704
|
kind: "Server Render Error",
|
|
688
|
-
message:
|
|
705
|
+
message: isDevelopmentRuntime() ? errorMessage(error) : GENERIC_ERROR_MESSAGE
|
|
689
706
|
});
|
|
690
707
|
var init_ssrErrorPage = __esm(() => {
|
|
691
708
|
init_cspNonceRef();
|
|
@@ -775,14 +792,17 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
775
792
|
}, resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound, setConventions = (map) => {
|
|
776
793
|
Reflect.set(globalThis, CONVENTIONS_KEY, map);
|
|
777
794
|
}, isDev = () => isDevelopmentRuntime(), buildErrorProps = (error) => {
|
|
795
|
+
const name = error instanceof Error ? error.name : "Error";
|
|
796
|
+
if (!isDev())
|
|
797
|
+
return { message: GENERIC_ERROR_MESSAGE, name };
|
|
778
798
|
if (error instanceof Error) {
|
|
779
799
|
return {
|
|
780
800
|
message: error.message,
|
|
781
|
-
name
|
|
782
|
-
...
|
|
801
|
+
name,
|
|
802
|
+
...error.stack ? { stack: error.stack } : {}
|
|
783
803
|
};
|
|
784
804
|
}
|
|
785
|
-
return { message: String(error), name
|
|
805
|
+
return { message: String(error), name };
|
|
786
806
|
}, renderReactError = async (conventionPath, errorProps) => {
|
|
787
807
|
const { createElement } = await import("react");
|
|
788
808
|
const { renderToReadableStream } = await import("react-dom/server");
|
|
@@ -896,6 +916,29 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
896
916
|
return htmlResponse;
|
|
897
917
|
}
|
|
898
918
|
return null;
|
|
919
|
+
}, isPageRequest = (request) => {
|
|
920
|
+
if (request.headers.get("hx-request") === "true")
|
|
921
|
+
return true;
|
|
922
|
+
if (request.headers.get("sec-fetch-dest") === "document")
|
|
923
|
+
return true;
|
|
924
|
+
return (request.headers.get("accept") ?? "").includes("text/html");
|
|
925
|
+
}, renderStaticRouteError = async (request, error) => {
|
|
926
|
+
if (!isPageRequest(request))
|
|
927
|
+
return null;
|
|
928
|
+
const preferHtmx = request.headers.get("hx-request") === "true";
|
|
929
|
+
const order = preferHtmx ? ["htmx", "html"] : ["html", "htmx"];
|
|
930
|
+
const frameworks = order.filter((framework) => hasErrorConvention(framework));
|
|
931
|
+
if (frameworks.length === 0)
|
|
932
|
+
return null;
|
|
933
|
+
const errorProps = buildErrorProps(error);
|
|
934
|
+
const renderNext = async (remaining) => {
|
|
935
|
+
const [framework, ...rest] = remaining;
|
|
936
|
+
if (!framework)
|
|
937
|
+
return null;
|
|
938
|
+
const response = await tryFrameworkErrorConvention(framework, "", errorProps, error);
|
|
939
|
+
return response ?? renderNext(rest);
|
|
940
|
+
};
|
|
941
|
+
return renderNext(frameworks);
|
|
899
942
|
}, renderReactNotFound = async (conventionPath) => {
|
|
900
943
|
const { createElement } = await import("react");
|
|
901
944
|
const { renderToReadableStream } = await import("react-dom/server");
|
|
@@ -990,6 +1033,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
|
|
|
990
1033
|
var init_resolveConvention = __esm(() => {
|
|
991
1034
|
init_cspNonceRef();
|
|
992
1035
|
init_staticHtmlNonce();
|
|
1036
|
+
init_ssrErrorPage();
|
|
993
1037
|
ERROR_RENDERERS = {
|
|
994
1038
|
angular: renderAngularError,
|
|
995
1039
|
ember: renderEmberError,
|
|
@@ -1559,7 +1603,7 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
|
|
|
1559
1603
|
return html.replace("</html>", `${snippet}</html>`);
|
|
1560
1604
|
}
|
|
1561
1605
|
return html + snippet;
|
|
1562
|
-
}, injectSsrScripts = (html, requestId, indexPath, requestContext) => {
|
|
1606
|
+
}, injectSsrScripts = (html, requestId, indexPath, requestContext, baseHref) => {
|
|
1563
1607
|
let result = injectBeforeClose(html, browserTranslationBaselineTag());
|
|
1564
1608
|
const registeredScripts = getAndClearClientScripts(requestId);
|
|
1565
1609
|
if (registeredScripts.length > 0) {
|
|
@@ -1568,6 +1612,9 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
|
|
|
1568
1612
|
if (requestContext !== undefined) {
|
|
1569
1613
|
result = injectBeforeClose(result, `<script${nonceAttr()}>window.__ABS_ANGULAR_REQUEST_CONTEXT__ = ${escapeScriptContent(JSON.stringify(requestContext))};</script>`);
|
|
1570
1614
|
}
|
|
1615
|
+
if (baseHref) {
|
|
1616
|
+
result = injectBeforeClose(result, `<script${nonceAttr()}>window.__ABS_ANGULAR_BASE_HREF__ = ${escapeScriptContent(JSON.stringify(baseHref))};</script>`);
|
|
1617
|
+
}
|
|
1571
1618
|
if (indexPath) {
|
|
1572
1619
|
const escapedIndexPath = JSON.stringify(indexPath);
|
|
1573
1620
|
result = injectBeforeClose(result, `<script${nonceAttr()}>import(${escapeScriptContent(escapedIndexPath)});</script>`);
|
|
@@ -1712,7 +1759,14 @@ var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
|
|
|
1712
1759
|
match = LEADING_HOISTED_RESOURCE_RE.exec(result);
|
|
1713
1760
|
}
|
|
1714
1761
|
return result.trimStart();
|
|
1715
|
-
}, renderReactIslandToHtml =
|
|
1762
|
+
}, renderReactIslandToHtml = async (component, props) => {
|
|
1763
|
+
const { createElement } = await import("react");
|
|
1764
|
+
const { renderToReadableStream } = await import("react-dom/server");
|
|
1765
|
+
const stream = await renderToReadableStream(createElement(component, props));
|
|
1766
|
+
await stream.allReady;
|
|
1767
|
+
const html = await new Response(stream).text();
|
|
1768
|
+
return stripLeadingHoistedResources(html);
|
|
1769
|
+
}, renderSvelteIslandToHtml = (component, props) => import("svelte/server").then(({ render }) => {
|
|
1716
1770
|
const { body } = render(component, { props });
|
|
1717
1771
|
return body;
|
|
1718
1772
|
}), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h: createVueVNode }) => {
|
|
@@ -3243,7 +3297,8 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, transpiler,
|
|
|
3243
3297
|
async: loweredAwaitSource.transformed || loweredSource.transformed
|
|
3244
3298
|
},
|
|
3245
3299
|
filename: resolutionSourcePath,
|
|
3246
|
-
generate: "server"
|
|
3300
|
+
generate: "server",
|
|
3301
|
+
hmr: isDevelopmentRuntime()
|
|
3247
3302
|
}).js.code;
|
|
3248
3303
|
for (const [spec, compiledChildPath] of childModulePaths) {
|
|
3249
3304
|
compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), compiledChildPath));
|
|
@@ -3709,7 +3764,14 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
|
|
|
3709
3764
|
const storage = new AsyncLocalStorage2;
|
|
3710
3765
|
Reflect.set(globalThis, REQUEST_STORAGE_KEY, storage);
|
|
3711
3766
|
return storage;
|
|
3712
|
-
}, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request,
|
|
3767
|
+
}, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, getCurrentAbsoluteRoute = (request) => {
|
|
3768
|
+
const store = getRequestStorage()?.getStore();
|
|
3769
|
+
if (!store)
|
|
3770
|
+
return;
|
|
3771
|
+
if (request && store.request !== request)
|
|
3772
|
+
return;
|
|
3773
|
+
return store.route;
|
|
3774
|
+
}, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function", devBuildErrorResponse = (framework, assets) => {
|
|
3713
3775
|
if (!assets?.failed)
|
|
3714
3776
|
return null;
|
|
3715
3777
|
return new Response(buildErrorPage(framework, assets.name, assets.error), {
|
|
@@ -3775,6 +3837,11 @@ var init_requestContext = __esm(() => {
|
|
|
3775
3837
|
name: "absolutejs-request-context"
|
|
3776
3838
|
}).onRequest(({ request }) => {
|
|
3777
3839
|
ensureRequestStorage().enterWith({ request });
|
|
3840
|
+
}).onBeforeHandle(({ request, route }) => {
|
|
3841
|
+
const store = getRequestStorage()?.getStore();
|
|
3842
|
+
if (store && store.request === request && typeof route === "string") {
|
|
3843
|
+
store.route = route;
|
|
3844
|
+
}
|
|
3778
3845
|
}).as("global");
|
|
3779
3846
|
CSS_KEY_RE = /(?:CSS|Css)$/;
|
|
3780
3847
|
});
|
|
@@ -6404,6 +6471,41 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
6404
6471
|
}
|
|
6405
6472
|
}
|
|
6406
6473
|
return allOutputs;
|
|
6474
|
+
}, ROUTER_OUTLET_PATTERN, COMPONENT_MARKER_PATTERN, isExportedClass = (statement) => ts2.isClassDeclaration(statement) && statement.name !== undefined && (ts2.getModifiers(statement) ?? []).some((modifier) => modifier.kind === ts2.SyntaxKind.ExportKeyword), statementReferencesClass = (statement, className, sourceFile) => {
|
|
6475
|
+
if (!ts2.isExpressionStatement(statement))
|
|
6476
|
+
return false;
|
|
6477
|
+
const text = statement.getText(sourceFile);
|
|
6478
|
+
return new RegExp(`^\\s*${className}\\s*=`).test(text) || new RegExp(`\u0275setClassMetadata\\(\\s*${className}\\b`).test(text);
|
|
6479
|
+
}, detectAngularPageComponentClass = (source) => {
|
|
6480
|
+
const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
|
|
6481
|
+
if (defaultMatch)
|
|
6482
|
+
return defaultMatch[1] ?? null;
|
|
6483
|
+
const sourceFile = ts2.createSourceFile("page.js", source, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
|
|
6484
|
+
const exportedNames = new Set;
|
|
6485
|
+
for (const statement of sourceFile.statements) {
|
|
6486
|
+
if (!ts2.isExportDeclaration(statement) || statement.moduleSpecifier || !statement.exportClause || !ts2.isNamedExports(statement.exportClause))
|
|
6487
|
+
continue;
|
|
6488
|
+
for (const element of statement.exportClause.elements) {
|
|
6489
|
+
exportedNames.add((element.propertyName ?? element.name).text);
|
|
6490
|
+
}
|
|
6491
|
+
}
|
|
6492
|
+
const candidates = sourceFile.statements.filter(ts2.isClassDeclaration).filter((statement) => isExportedClass(statement) || exportedNames.has(statement.name?.text ?? "")).map((statement) => {
|
|
6493
|
+
const className = statement.name?.text ?? "";
|
|
6494
|
+
const related = sourceFile.statements.filter((other) => statementReferencesClass(other, className, sourceFile)).map((other) => other.getText(sourceFile));
|
|
6495
|
+
const text = [statement.getText(sourceFile), ...related].join(`
|
|
6496
|
+
`);
|
|
6497
|
+
return {
|
|
6498
|
+
className,
|
|
6499
|
+
hostsOutlet: ROUTER_OUTLET_PATTERN.test(text),
|
|
6500
|
+
isComponent: COMPONENT_MARKER_PATTERN.test(text)
|
|
6501
|
+
};
|
|
6502
|
+
}).filter((candidate) => candidate.className.length > 0);
|
|
6503
|
+
const components = candidates.filter((candidate) => candidate.isComponent);
|
|
6504
|
+
const outletHosts = components.filter((candidate) => candidate.hostsOutlet);
|
|
6505
|
+
const outletHost = outletHosts.at(-1);
|
|
6506
|
+
if (outletHost)
|
|
6507
|
+
return outletHost.className;
|
|
6508
|
+
return components.at(-1)?.className ?? candidates[0]?.className ?? null;
|
|
6407
6509
|
}, compileAngular = async (entryPoints, outRoot, hmr = false, stylePreprocessors, providersInjection) => {
|
|
6408
6510
|
const compiledParent = getFrameworkGeneratedDir("angular");
|
|
6409
6511
|
if (entryPoints.length === 0) {
|
|
@@ -6480,16 +6582,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
6480
6582
|
].join(", ")}`);
|
|
6481
6583
|
}
|
|
6482
6584
|
const original = await traceAngularPhase("wrapper/read-server-output", () => fs.readFile(rawServerFile, "utf-8"), { entry: resolvedEntry });
|
|
6483
|
-
const
|
|
6484
|
-
const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
|
|
6485
|
-
if (defaultMatch)
|
|
6486
|
-
return defaultMatch[1];
|
|
6487
|
-
const exportClassMatch = source.match(/export\s+(?:default\s+)?class\s+([A-Za-z_$][\w$]*)/);
|
|
6488
|
-
if (exportClassMatch)
|
|
6489
|
-
return exportClassMatch[1];
|
|
6490
|
-
return null;
|
|
6491
|
-
};
|
|
6492
|
-
const detectedClassName = await traceAngularPhase("wrapper/detect-component-class", () => detectExportedComponentClass(original), { entry: resolvedEntry });
|
|
6585
|
+
const detectedClassName = await traceAngularPhase("wrapper/detect-component-class", () => detectAngularPageComponentClass(original), { entry: resolvedEntry });
|
|
6493
6586
|
const componentClassName = detectedClassName ?? `${toPascal(fileBase)}Component`;
|
|
6494
6587
|
const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
|
|
6495
6588
|
const pageInjectionForHash = providersInjection?.pagesByFile.get(resolvedEntry);
|
|
@@ -6587,6 +6680,7 @@ import { bootstrapApplication } from '@angular/platform-browser';
|
|
|
6587
6680
|
import { provideClientHydration } from '@angular/platform-browser';
|
|
6588
6681
|
import { withHttpTransferCacheOptions } from '@angular/platform-browser';
|
|
6589
6682
|
import { ${changeDetectionImport}, REQUEST_CONTEXT } from '@angular/core';
|
|
6683
|
+
import { APP_BASE_HREF as __abs_APP_BASE_HREF } from '@angular/common';
|
|
6590
6684
|
import { prepareBrowserTranslationHydration } from '@absolutejs/absolute/client';
|
|
6591
6685
|
import * as pageModule from '${normalizedImportPath}';
|
|
6592
6686
|
var ${componentClassName} = pageModule.default;
|
|
@@ -6610,6 +6704,15 @@ var contextProviders = [{ provide: REQUEST_CONTEXT, useValue: requestContext }];
|
|
|
6610
6704
|
// and client bundle.
|
|
6611
6705
|
var pageProvidersExport = Reflect.get(pageModule, 'providers');
|
|
6612
6706
|
var pageProviders = Array.isArray(pageProvidersExport) ? pageProvidersExport : [];
|
|
6707
|
+
// The server derives APP_BASE_HREF from the matched route at request time
|
|
6708
|
+
// (\`/portal/*\` \u2192 \`/portal/\`) and ships it here, so it overrides the
|
|
6709
|
+
// build-time inferred value and works for handlers called from helpers.
|
|
6710
|
+
var runtimeBaseHref = typeof window.__ABS_ANGULAR_BASE_HREF__ === 'string'
|
|
6711
|
+
? window.__ABS_ANGULAR_BASE_HREF__
|
|
6712
|
+
: null;
|
|
6713
|
+
if (runtimeBaseHref) {
|
|
6714
|
+
pageProviders = pageProviders.concat([{ provide: __abs_APP_BASE_HREF, useValue: runtimeBaseHref }]);
|
|
6715
|
+
}
|
|
6613
6716
|
var absoluteHttpTransferCacheOptions = {
|
|
6614
6717
|
includePostRequests: false,
|
|
6615
6718
|
includeRequestsWithAuthHeaders: false,
|
|
@@ -6697,6 +6800,7 @@ import { bootstrapApplication } from '@angular/platform-browser';
|
|
|
6697
6800
|
import { provideClientHydration } from '@angular/platform-browser';
|
|
6698
6801
|
import { withHttpTransferCacheOptions } from '@angular/platform-browser';
|
|
6699
6802
|
import { enableProdMode, ${changeDetectionImport}, REQUEST_CONTEXT } from '@angular/core';
|
|
6803
|
+
import { APP_BASE_HREF as __abs_APP_BASE_HREF } from '@angular/common';
|
|
6700
6804
|
import { prepareBrowserTranslationHydration } from '@absolutejs/absolute/client';
|
|
6701
6805
|
import * as pageModule from '${normalizedImportPath}';
|
|
6702
6806
|
var ${componentClassName} = pageModule.default;
|
|
@@ -6720,6 +6824,15 @@ var contextProviders = [{ provide: REQUEST_CONTEXT, useValue: requestContext }];
|
|
|
6720
6824
|
// and client bundle.
|
|
6721
6825
|
var pageProvidersExport = Reflect.get(pageModule, 'providers');
|
|
6722
6826
|
var pageProviders = Array.isArray(pageProvidersExport) ? pageProvidersExport : [];
|
|
6827
|
+
// The server derives APP_BASE_HREF from the matched route at request time
|
|
6828
|
+
// (\`/portal/*\` \u2192 \`/portal/\`) and ships it here, so it overrides the
|
|
6829
|
+
// build-time inferred value and works for handlers called from helpers.
|
|
6830
|
+
var runtimeBaseHref = typeof window.__ABS_ANGULAR_BASE_HREF__ === 'string'
|
|
6831
|
+
? window.__ABS_ANGULAR_BASE_HREF__
|
|
6832
|
+
: null;
|
|
6833
|
+
if (runtimeBaseHref) {
|
|
6834
|
+
pageProviders = pageProviders.concat([{ provide: __abs_APP_BASE_HREF, useValue: runtimeBaseHref }]);
|
|
6835
|
+
}
|
|
6723
6836
|
var absoluteHttpTransferCacheOptions = {
|
|
6724
6837
|
includePostRequests: false,
|
|
6725
6838
|
includeRequestsWithAuthHeaders: false,
|
|
@@ -6814,6 +6927,8 @@ var init_compileAngular = __esm(() => {
|
|
|
6814
6927
|
jitContentCache = new Map;
|
|
6815
6928
|
wrapperOutputCache = new Map;
|
|
6816
6929
|
PROVIDERS_INJECTION_BLOCK_RE = /\n\/\* __ABS_PROVIDERS_INJECTION_START \*\/[\s\S]*?\/\* __ABS_PROVIDERS_INJECTION_END \*\/\n?/;
|
|
6930
|
+
ROUTER_OUTLET_PATTERN = /router-outlet|\bRouterOutlet\b/;
|
|
6931
|
+
COMPONENT_MARKER_PATTERN = /\u0275cmp|\u0275\u0275ngDeclareComponent|\bComponent\s*\(/;
|
|
6817
6932
|
});
|
|
6818
6933
|
|
|
6819
6934
|
// node_modules/rxjs/dist/cjs/internal/util/isFunction.js
|
|
@@ -15897,6 +16012,38 @@ var buildRouterRedirectProviders = async (deps, responseInit) => {
|
|
|
15897
16012
|
];
|
|
15898
16013
|
};
|
|
15899
16014
|
|
|
16015
|
+
// src/angular/baseHref.ts
|
|
16016
|
+
var WILDCARD_SUFFIX = "/*";
|
|
16017
|
+
var deriveAngularBaseHref = (route, pathname) => {
|
|
16018
|
+
if (!route || !route.endsWith(WILDCARD_SUFFIX))
|
|
16019
|
+
return null;
|
|
16020
|
+
const prefixSegments = route.slice(0, route.length - WILDCARD_SUFFIX.length).split("/").filter(Boolean);
|
|
16021
|
+
if (prefixSegments.length === 0)
|
|
16022
|
+
return null;
|
|
16023
|
+
const hasParams = prefixSegments.some((segment) => segment.startsWith(":"));
|
|
16024
|
+
if (!hasParams)
|
|
16025
|
+
return `/${prefixSegments.join("/")}/`;
|
|
16026
|
+
if (!pathname)
|
|
16027
|
+
return null;
|
|
16028
|
+
const pathSegments = pathname.split("/").filter(Boolean);
|
|
16029
|
+
if (pathSegments.length < prefixSegments.length)
|
|
16030
|
+
return null;
|
|
16031
|
+
const resolved = prefixSegments.map((segment, index) => segment.startsWith(":") ? pathSegments[index] : segment);
|
|
16032
|
+
if (resolved.some((segment, index) => segment !== pathSegments[index]))
|
|
16033
|
+
return null;
|
|
16034
|
+
return `/${resolved.join("/")}/`;
|
|
16035
|
+
};
|
|
16036
|
+
var readRequestPathname = (request) => {
|
|
16037
|
+
if (!request)
|
|
16038
|
+
return;
|
|
16039
|
+
try {
|
|
16040
|
+
return new URL(request.url).pathname;
|
|
16041
|
+
} catch {
|
|
16042
|
+
return;
|
|
16043
|
+
}
|
|
16044
|
+
};
|
|
16045
|
+
var resolveRequestBaseHref = (route, request) => deriveAngularBaseHref(route, readRequestPathname(request));
|
|
16046
|
+
|
|
15900
16047
|
// src/angular/pageHandler.ts
|
|
15901
16048
|
init_spaRouteManifest();
|
|
15902
16049
|
|
|
@@ -16451,6 +16598,7 @@ setSsrContextGetter(() => angularSsrContext.getStore());
|
|
|
16451
16598
|
var handleAngularPageRequest = async (input) => {
|
|
16452
16599
|
const requestId = `angular_${Date.now()}_${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
|
|
16453
16600
|
const request = input.request ?? getCurrentAbsoluteRequest();
|
|
16601
|
+
const runtimeBaseHref = resolveRequestBaseHref(getCurrentAbsoluteRoute(request), request);
|
|
16454
16602
|
const deferredAssets = input.pagePath === "" || input.indexPath === "" ? await resolveDeferredPageAssets() : null;
|
|
16455
16603
|
const buildFailure = devBuildErrorResponse("angular", deferredAssets);
|
|
16456
16604
|
if (buildFailure)
|
|
@@ -16532,9 +16680,16 @@ var handleAngularPageRequest = async (input) => {
|
|
|
16532
16680
|
const pageProvidersExport = Reflect.get(pageModule, "providers");
|
|
16533
16681
|
const pageProviders = Array.isArray(pageProvidersExport) ? pageProvidersExport : [];
|
|
16534
16682
|
const handlerCallProviders = Array.isArray(input.providers) ? input.providers : [];
|
|
16683
|
+
const baseHrefProviders = runtimeBaseHref ? [
|
|
16684
|
+
{
|
|
16685
|
+
provide: deps.APP_BASE_HREF,
|
|
16686
|
+
useValue: runtimeBaseHref
|
|
16687
|
+
}
|
|
16688
|
+
] : [];
|
|
16535
16689
|
const combinedProviders = [
|
|
16536
16690
|
...await buildRouterRedirectProviders(deps, responseInit),
|
|
16537
16691
|
...pageProviders,
|
|
16692
|
+
...baseHrefProviders,
|
|
16538
16693
|
...handlerCallProviders,
|
|
16539
16694
|
...await buildServerAnimationProviders(usesLegacyAnimations)
|
|
16540
16695
|
];
|
|
@@ -16542,7 +16697,7 @@ var handleAngularPageRequest = async (input) => {
|
|
|
16542
16697
|
const rawHtml = await renderAngularApp(deps, PageComponent, providers, htmlString, resolvedUrl);
|
|
16543
16698
|
const shouldProcessIslands = hasIslands || rawHtml.includes("<absolute-island");
|
|
16544
16699
|
const htmlWithLoweredIslands = shouldProcessIslands ? await lowerAngularServerIslands(rawHtml) : rawHtml;
|
|
16545
|
-
const html = injectIslandPageContext(injectSsrScripts(htmlWithLoweredIslands, requestId, resolvedIndexPath, maybeRequestContext), { hasIslands: shouldProcessIslands });
|
|
16700
|
+
const html = injectIslandPageContext(injectSsrScripts(htmlWithLoweredIslands, requestId, resolvedIndexPath, maybeRequestContext, runtimeBaseHref), { hasIslands: shouldProcessIslands });
|
|
16546
16701
|
return new Response(html, withHtmlContentType(responseInit));
|
|
16547
16702
|
};
|
|
16548
16703
|
const pageResponse = await runWithStreamingSlotWarningScope(() => options?.collectStreamingSlots === true ? withRegisteredStreamingSlots(renderPageResponse, options) : renderPageResponse(), { handlerCallsite });
|
|
@@ -17086,5 +17241,5 @@ export {
|
|
|
17086
17241
|
withPendingTask
|
|
17087
17242
|
};
|
|
17088
17243
|
|
|
17089
|
-
//# debugId=
|
|
17244
|
+
//# debugId=96BECAFAC25D711264756E2164756E21
|
|
17090
17245
|
//# sourceMappingURL=index.js.map
|