@absolutejs/absolute 0.19.0-beta.704 → 0.19.0-beta.705
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/components/constants.js +21 -0
- package/dist/angular/index.js +53 -73
- package/dist/angular/index.js.map +9 -9
- package/dist/angular/server.js +52 -72
- package/dist/angular/server.js.map +9 -9
- package/dist/build.js +8 -7
- package/dist/build.js.map +7 -7
- package/dist/cli/index.js +312 -285
- package/dist/client/index.js +4 -3
- package/dist/client/index.js.map +3 -3
- package/dist/index.js +88 -64
- package/dist/index.js.map +15 -15
- package/dist/islands/index.js +5 -4
- package/dist/islands/index.js.map +5 -5
- package/dist/react/index.js +49 -69
- package/dist/react/index.js.map +9 -9
- package/dist/react/jsxDevRuntimeCompat.js +1 -6
- package/dist/react/jsxDevRuntimeCompat.js.map +3 -3
- package/dist/react/server.js +43 -64
- package/dist/react/server.js.map +7 -7
- package/dist/src/angular/components/constants.d.ts +21 -0
- package/dist/src/angular/pageHandler.d.ts +6 -1
- package/dist/src/angular/ssrRender.d.ts +1 -1
- package/dist/src/constants.d.ts +21 -0
- package/dist/src/core/ssrCache.d.ts +1 -1
- package/dist/src/core/wrapPageHandlerWithStreamingSlots.d.ts +1 -1
- package/dist/src/react/jsxDevRuntimeCompat.d.ts +3 -6
- package/dist/src/react/pageHandler.d.ts +2 -1
- package/dist/src/svelte/pageHandler.d.ts +2 -2
- package/dist/src/utils/defineConfig.d.ts +2 -2
- package/dist/src/utils/loadConfig.d.ts +38 -2
- package/dist/src/vue/components/Image.d.ts +2 -2
- package/dist/src/vue/components/index.d.ts +1 -1
- package/dist/src/vue/index.d.ts +1 -1
- package/dist/src/vue/pageHandler.d.ts +2 -1
- package/dist/svelte/index.js +34 -49
- package/dist/svelte/index.js.map +9 -9
- package/dist/svelte/server.js +31 -47
- package/dist/svelte/server.js.map +8 -8
- package/dist/vue/components/Image.js +18 -18
- package/dist/vue/components/Image.js.map +3 -3
- package/dist/vue/components/index.js +77 -62
- package/dist/vue/components/index.js.map +5 -5
- package/dist/vue/index.js +119 -133
- package/dist/vue/index.js.map +12 -12
- package/dist/vue/server.js +40 -70
- package/dist/vue/server.js.map +7 -7
- package/package.json +42 -42
|
@@ -54,3 +54,24 @@ export const TIME_PRECISION = 2;
|
|
|
54
54
|
export const TWO_THIRDS = 2 / 3;
|
|
55
55
|
export const UNFOUND_INDEX = -1;
|
|
56
56
|
export const WEBSOCKET_NORMAL_CLOSURE = 1000;
|
|
57
|
+
export const WORKSPACE_COMMAND_ARGS_OFFSET = 3;
|
|
58
|
+
export const WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30;
|
|
59
|
+
export const WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60;
|
|
60
|
+
export const WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5_000;
|
|
61
|
+
export const WORKSPACE_READY_PROBE_INTERVAL_MS = 250;
|
|
62
|
+
export const WORKSPACE_READY_TIMEOUT_MS = 30_000;
|
|
63
|
+
export const WORKSPACE_SHUTDOWN_TIMEOUT_MS = 10_000;
|
|
64
|
+
export const WORKSPACE_TUI_DEFAULT_HEIGHT = 28;
|
|
65
|
+
export const WORKSPACE_TUI_DEFAULT_WIDTH = 100;
|
|
66
|
+
export const WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30;
|
|
67
|
+
export const WORKSPACE_TUI_FOOTER_LINE_COUNT = 3;
|
|
68
|
+
export const WORKSPACE_TUI_MIN_LOG_HEIGHT = 3;
|
|
69
|
+
export const WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7;
|
|
70
|
+
export const WORKSPACE_TUI_MIN_TARGET_WIDTH = 8;
|
|
71
|
+
export const WORKSPACE_TUI_MIN_WRAP_WIDTH = 12;
|
|
72
|
+
export const WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3;
|
|
73
|
+
export const WORKSPACE_TUI_RECENT_LOG_LIMIT = 40;
|
|
74
|
+
export const WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16;
|
|
75
|
+
export const WORKSPACE_TUI_STATUS_WIDTH = 10;
|
|
76
|
+
export const WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6;
|
|
77
|
+
export const WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
package/dist/angular/index.js
CHANGED
|
@@ -79,7 +79,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
79
79
|
var __require = import.meta.require;
|
|
80
80
|
|
|
81
81
|
// src/constants.ts
|
|
82
|
-
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", 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_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, 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, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, 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, 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;
|
|
82
|
+
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", 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_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, 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, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, 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, 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, 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;
|
|
83
83
|
var init_constants = __esm(() => {
|
|
84
84
|
MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
|
|
85
85
|
MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
|
|
@@ -359,7 +359,7 @@ var routePropsCache, cacheRouteData = (pagePath, data) => {
|
|
|
359
359
|
Sanitizer: core.Sanitizer,
|
|
360
360
|
SecurityContext: core.SecurityContext
|
|
361
361
|
};
|
|
362
|
-
}, buildProviders = (deps, sanitizer, maybeProps, tokenMap) => {
|
|
362
|
+
}, buildProviders = (deps, sanitizer, maybeProps, tokenMap, userProviders = []) => {
|
|
363
363
|
const providers = [
|
|
364
364
|
deps.provideServerRendering(),
|
|
365
365
|
deps.provideClientHydration(),
|
|
@@ -369,7 +369,8 @@ var routePropsCache, cacheRouteData = (pagePath, data) => {
|
|
|
369
369
|
provide: deps.DomSanitizer,
|
|
370
370
|
useValue: sanitizer
|
|
371
371
|
},
|
|
372
|
-
{ provide: deps.Sanitizer, useValue: sanitizer }
|
|
372
|
+
{ provide: deps.Sanitizer, useValue: sanitizer },
|
|
373
|
+
...userProviders
|
|
373
374
|
];
|
|
374
375
|
if (!maybeProps) {
|
|
375
376
|
return providers;
|
|
@@ -1652,7 +1653,7 @@ __export(exports_devRouteRegistrationCallsite, {
|
|
|
1652
1653
|
});
|
|
1653
1654
|
import { AsyncLocalStorage } from "async_hooks";
|
|
1654
1655
|
import { Elysia } from "elysia";
|
|
1655
|
-
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", getRouteCallsiteStorage = () => {
|
|
1656
|
+
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", isRouteMethod = (value) => typeof value === "function", getRouteCallsiteStorage = () => {
|
|
1656
1657
|
const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
|
|
1657
1658
|
if (value === null || typeof value === "undefined") {
|
|
1658
1659
|
return;
|
|
@@ -1666,19 +1667,10 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
1666
1667
|
const storage = new AsyncLocalStorage;
|
|
1667
1668
|
Reflect.set(globalThis, ROUTE_CALLSITE_STORAGE_KEY, storage);
|
|
1668
1669
|
return storage;
|
|
1669
|
-
}, normalizeCallsitePath = (value) => value.replace(`${process.cwd()}/`, "").replace(process.cwd(), "").replace(/^\.\/+/, ""), extractRouteRegistrationCallsite = (stack) => {
|
|
1670
|
-
const
|
|
1671
|
-
`).slice(1).map((line) => line.trim());
|
|
1672
|
-
|
|
1673
|
-
if (frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/core/devRouteRegistrationCallsite.")) {
|
|
1674
|
-
continue;
|
|
1675
|
-
}
|
|
1676
|
-
const locationMatch = frame.match(/\((\/[^)]+:\d+:\d+)\)$/) ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/);
|
|
1677
|
-
if (locationMatch?.[1]) {
|
|
1678
|
-
return normalizeCallsitePath(locationMatch[1]);
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
return;
|
|
1670
|
+
}, normalizeCallsitePath = (value) => value.replace(`${process.cwd()}/`, "").replace(process.cwd(), "").replace(/^\.\/+/, ""), shouldIgnoreRouteCallsiteFrame = (frame) => frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/core/devRouteRegistrationCallsite."), getRouteCallsiteLocation = (frame) => frame.match(/\((\/[^)]+:\d+:\d+)\)$/)?.[1] ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/)?.[1], extractRouteRegistrationCallsite = (stack) => {
|
|
1671
|
+
const location = stack.split(`
|
|
1672
|
+
`).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreRouteCallsiteFrame(frame)).map((frame) => getRouteCallsiteLocation(frame)).find((frameLocation) => frameLocation !== undefined);
|
|
1673
|
+
return location ? normalizeCallsitePath(location) : undefined;
|
|
1682
1674
|
}, captureRouteRegistrationCallsite = () => {
|
|
1683
1675
|
const { stack } = new Error;
|
|
1684
1676
|
if (!stack) {
|
|
@@ -1690,29 +1682,29 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
1690
1682
|
return handler;
|
|
1691
1683
|
}
|
|
1692
1684
|
const storage = ensureRouteCallsiteStorage();
|
|
1685
|
+
const routeHandler = handler;
|
|
1693
1686
|
return function wrappedRouteHandler(...args) {
|
|
1694
|
-
return storage.run({ callsite }, () => Reflect.apply(
|
|
1695
|
-
};
|
|
1687
|
+
return storage.run({ callsite }, () => Reflect.apply(routeHandler, this, args));
|
|
1688
|
+
};
|
|
1689
|
+
}, createPatchedRouteMethod = (originalMethod) => function patchedRouteMethod(path, handler, ...rest) {
|
|
1690
|
+
const callsite = captureRouteRegistrationCallsite();
|
|
1691
|
+
return Reflect.apply(originalMethod, this, [
|
|
1692
|
+
path,
|
|
1693
|
+
wrapRouteHandlerWithCallsite(handler, callsite),
|
|
1694
|
+
...rest
|
|
1695
|
+
]);
|
|
1696
1696
|
}, getCurrentRouteRegistrationCallsite = () => getRouteCallsiteStorage()?.getStore()?.callsite, patchElysiaRouteRegistrationCallsites = () => {
|
|
1697
1697
|
if (false) {}
|
|
1698
1698
|
if (Reflect.get(globalThis, ROUTE_CALLSITE_PATCHED_KEY) === true) {
|
|
1699
1699
|
return;
|
|
1700
1700
|
}
|
|
1701
|
-
const prototype = Elysia
|
|
1702
|
-
|
|
1703
|
-
const originalMethod = prototype
|
|
1704
|
-
if (
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
const callsite = captureRouteRegistrationCallsite();
|
|
1709
|
-
return Reflect.apply(originalMethod, this, [
|
|
1710
|
-
path,
|
|
1711
|
-
wrapRouteHandlerWithCallsite(handler, callsite),
|
|
1712
|
-
...rest
|
|
1713
|
-
]);
|
|
1714
|
-
};
|
|
1715
|
-
}
|
|
1701
|
+
const { prototype } = Elysia;
|
|
1702
|
+
ROUTE_METHOD_NAMES.forEach((methodName) => {
|
|
1703
|
+
const originalMethod = Reflect.get(prototype, methodName);
|
|
1704
|
+
if (!isRouteMethod(originalMethod))
|
|
1705
|
+
return;
|
|
1706
|
+
Reflect.set(prototype, methodName, createPatchedRouteMethod(originalMethod));
|
|
1707
|
+
});
|
|
1716
1708
|
Reflect.set(globalThis, ROUTE_CALLSITE_PATCHED_KEY, true);
|
|
1717
1709
|
};
|
|
1718
1710
|
var init_devRouteRegistrationCallsite = __esm(() => {
|
|
@@ -2549,9 +2541,9 @@ var init_logger = __esm(() => {
|
|
|
2549
2541
|
});
|
|
2550
2542
|
|
|
2551
2543
|
// src/core/ssrCache.ts
|
|
2552
|
-
var dirtyFrameworks, markSsrCacheDirty = (framework) => {
|
|
2544
|
+
var dirtyFrameworks, isSsrCacheDirty = (framework) => dirtyFrameworks.has(framework), markSsrCacheDirty = (framework) => {
|
|
2553
2545
|
dirtyFrameworks.add(framework);
|
|
2554
|
-
}
|
|
2546
|
+
};
|
|
2555
2547
|
var init_ssrCache = __esm(() => {
|
|
2556
2548
|
dirtyFrameworks = new Set;
|
|
2557
2549
|
});
|
|
@@ -13750,19 +13742,12 @@ var formatWarningCallsite = (callsite) => {
|
|
|
13750
13742
|
}
|
|
13751
13743
|
return `\x1B[36m${match[1]}\x1B[33m${match[2]}\x1B[0m`;
|
|
13752
13744
|
};
|
|
13745
|
+
var shouldIgnoreWarningFrame = (frame) => frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/react/pageHandler.") || frame.includes("/src/vue/pageHandler.") || frame.includes("/src/svelte/pageHandler.") || frame.includes("/src/angular/pageHandler.") || frame.includes("/src/core/streamingSlotWarningScope.");
|
|
13746
|
+
var getWarningLocation = (frame) => frame.match(/\((\/[^)]+:\d+:\d+)\)$/)?.[1] ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/)?.[1];
|
|
13753
13747
|
var extractCallsiteFromStack = (stack) => {
|
|
13754
|
-
const
|
|
13755
|
-
`).slice(1).map((line) => line.trim());
|
|
13756
|
-
|
|
13757
|
-
if (frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/react/pageHandler.") || frame.includes("/src/vue/pageHandler.") || frame.includes("/src/svelte/pageHandler.") || frame.includes("/src/angular/pageHandler.") || frame.includes("/src/core/streamingSlotWarningScope.")) {
|
|
13758
|
-
continue;
|
|
13759
|
-
}
|
|
13760
|
-
const locationMatch = frame.match(/\((\/[^)]+:\d+:\d+)\)$/) ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/);
|
|
13761
|
-
if (locationMatch?.[1]) {
|
|
13762
|
-
return normalizeCallsitePath2(locationMatch[1]);
|
|
13763
|
-
}
|
|
13764
|
-
}
|
|
13765
|
-
return;
|
|
13748
|
+
const location = stack.split(`
|
|
13749
|
+
`).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreWarningFrame(frame)).map((frame) => getWarningLocation(frame)).find((frameLocation) => frameLocation !== undefined);
|
|
13750
|
+
return location ? normalizeCallsitePath2(location) : undefined;
|
|
13766
13751
|
};
|
|
13767
13752
|
var buildMissingCollectorWarning = (primitiveName, handlerCallsite) => `${primitiveName} rendered during SSR without streaming slot collection enabled. Add { collectStreamingSlots: true } to this page handler to enable out-of-order streaming for this route.${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ""}`;
|
|
13768
13753
|
setStreamingSlotWarningController({
|
|
@@ -13791,6 +13776,13 @@ init_ssrRender();
|
|
|
13791
13776
|
var lastSelector = "angular-page";
|
|
13792
13777
|
var isRecord5 = (value) => typeof value === "object" && value !== null;
|
|
13793
13778
|
var isAngularComponent = (value) => typeof value === "function";
|
|
13779
|
+
var resolvePageComponent = (pageModule) => {
|
|
13780
|
+
if (isAngularComponent(pageModule.default)) {
|
|
13781
|
+
return pageModule.default;
|
|
13782
|
+
}
|
|
13783
|
+
return Object.values(pageModule).find((value) => isAngularComponent(value));
|
|
13784
|
+
};
|
|
13785
|
+
var isAngularPageRequestInput = (value) => typeof value === "object" && value !== null && ("pagePath" in value) && ("indexPath" in value);
|
|
13794
13786
|
var compilerImportPromise = null;
|
|
13795
13787
|
var ensureAngularCompiler = () => {
|
|
13796
13788
|
if (!compilerImportPromise) {
|
|
@@ -13834,29 +13826,17 @@ var resolveRuntimeAngularModulePath = async (pagePath) => {
|
|
|
13834
13826
|
};
|
|
13835
13827
|
var angularSsrContext = new AsyncLocalStorage3;
|
|
13836
13828
|
setSsrContextGetter(() => angularSsrContext.getStore());
|
|
13837
|
-
|
|
13829
|
+
async function handleAngularPageRequest(PageOrInput, pagePath, indexPath, headTag = "<head></head>", ...args) {
|
|
13838
13830
|
const requestId = `angular_${Date.now()}_${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
|
|
13839
13831
|
return angularSsrContext.run(requestId, async () => {
|
|
13840
13832
|
await ensureAngularCompiler();
|
|
13841
|
-
const
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
|
|
13848
|
-
headTag: PageOrInput.headTag ?? "<head></head>",
|
|
13849
|
-
indexPath: PageOrInput.indexPath,
|
|
13850
|
-
options: PageOrInput,
|
|
13851
|
-
pagePath: PageOrInput.pagePath,
|
|
13852
|
-
props: PageOrInput.props
|
|
13853
|
-
} : {
|
|
13854
|
-
headTag,
|
|
13855
|
-
indexPath: indexPath ?? "",
|
|
13856
|
-
options: args[1],
|
|
13857
|
-
pagePath: pagePath ?? "",
|
|
13858
|
-
props: args[0]
|
|
13859
|
-
};
|
|
13833
|
+
const isInput = isAngularPageRequestInput(PageOrInput);
|
|
13834
|
+
const resolvedHeadTag = isInput ? PageOrInput.headTag ?? "<head></head>" : headTag;
|
|
13835
|
+
const resolvedIndexPath = isInput ? PageOrInput.indexPath : indexPath ?? "";
|
|
13836
|
+
const options = isInput ? PageOrInput : args[1];
|
|
13837
|
+
const resolvedPagePath = isInput ? PageOrInput.pagePath : pagePath ?? "";
|
|
13838
|
+
const maybeProps = isInput ? PageOrInput.props : args[0];
|
|
13839
|
+
const userProviders = isInput ? PageOrInput.providers : undefined;
|
|
13860
13840
|
cacheRouteData(resolvedPagePath, {
|
|
13861
13841
|
headTag: resolvedHeadTag,
|
|
13862
13842
|
props: maybeProps
|
|
@@ -13879,9 +13859,9 @@ var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag
|
|
|
13879
13859
|
if (!pageModule) {
|
|
13880
13860
|
throw new Error(`Invalid Angular page module: ${resolvedPagePath}`);
|
|
13881
13861
|
}
|
|
13882
|
-
const PageComponent = pageModule
|
|
13862
|
+
const PageComponent = resolvePageComponent(pageModule);
|
|
13883
13863
|
if (!isAngularComponent(PageComponent)) {
|
|
13884
|
-
throw new Error(`Angular page module must export
|
|
13864
|
+
throw new Error(`Angular page module must export an Angular component: ${resolvedPagePath}`);
|
|
13885
13865
|
}
|
|
13886
13866
|
const hasIslands = typeof pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ === "boolean" ? pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ : false;
|
|
13887
13867
|
const ssrResult = await loadSsrDeps(runtimePagePath);
|
|
@@ -13893,7 +13873,7 @@ var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag
|
|
|
13893
13873
|
if (ssrResult?.core)
|
|
13894
13874
|
resetSsrSanitizer();
|
|
13895
13875
|
const sanitizer = getSsrSanitizer(deps);
|
|
13896
|
-
const providers = buildProviders(deps, sanitizer, maybeProps, tokenMap);
|
|
13876
|
+
const providers = buildProviders(deps, sanitizer, maybeProps, tokenMap, userProviders);
|
|
13897
13877
|
const rawHtml = await renderAngularApp(deps, PageComponent, providers, htmlString);
|
|
13898
13878
|
const shouldProcessIslands = hasIslands || rawHtml.includes("<absolute-island");
|
|
13899
13879
|
const htmlWithLoweredIslands = shouldProcessIslands ? await lowerAngularServerIslands(rawHtml) : rawHtml;
|
|
@@ -13915,7 +13895,7 @@ var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag
|
|
|
13915
13895
|
});
|
|
13916
13896
|
}
|
|
13917
13897
|
});
|
|
13918
|
-
}
|
|
13898
|
+
}
|
|
13919
13899
|
// src/angular/createIsland.ts
|
|
13920
13900
|
init_renderIslandMarkup();
|
|
13921
13901
|
var createTypedIsland = (registry) => (props) => renderIslandMarkup(registry, props);
|
|
@@ -14222,5 +14202,5 @@ export {
|
|
|
14222
14202
|
Island
|
|
14223
14203
|
};
|
|
14224
14204
|
|
|
14225
|
-
//# debugId=
|
|
14205
|
+
//# debugId=E329AE5B4E86408564756E2164756E21
|
|
14226
14206
|
//# sourceMappingURL=index.js.map
|