@absolutejs/absolute 0.20.0-beta.182 → 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 +14 -0
- package/changelog.json +21 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +177 -37
- package/dist/angular/index.js.map +6 -5
- package/dist/angular/server.js +177 -37
- package/dist/angular/server.js.map +6 -5
- package/dist/build.js +22 -8
- package/dist/build.js.map +5 -5
- package/dist/cli/{build-p3qra1nj.js → build-df81wh71.js} +5 -2
- package/dist/cli/{buildReactServerComponents-vc9hh2rd.js → buildReactServerComponents-k6amghrj.js} +1 -1
- package/dist/cli/config/server.js +19 -1
- package/dist/cli/{index-mmm6d3k5.js → index-3dz754hk.js} +2 -2
- package/dist/cli/{index-7zwzyymv.js → index-pq4qqz0r.js} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/{typecheck-yjme4fv1.js → typecheck-bvm0ndq4.js} +153 -62
- package/dist/dev/serverBootstrap.js +8 -2
- package/dist/index.js +24 -10
- package/dist/index.js.map +5 -5
- package/dist/react/index.js +10 -2
- package/dist/react/index.js.map +3 -3
- package/dist/react/server.js +10 -2
- package/dist/react/server.js.map +3 -3
- package/dist/src/angular/colocatedRouteMatch.d.ts +23 -0
- package/dist/src/cli/scripts/typecheck.d.ts +1 -0
- package/dist/src/cli/scripts/typecheckDiagnostics.d.ts +41 -0
- package/dist/src/dev/hot/analyze.d.ts +1 -1
- package/dist/src/utils/spaRouteManifest.d.ts +1 -0
- package/dist/svelte/index.js +10 -2
- package/dist/svelte/index.js.map +3 -3
- package/dist/svelte/server.js +10 -2
- package/dist/svelte/server.js.map +3 -3
- package/dist/vue/index.js +10 -2
- package/dist/vue/index.js.map +3 -3
- package/dist/vue/server.js +10 -2
- package/dist/vue/server.js.map +3 -3
- package/package.json +1 -1
package/dist/angular/server.js
CHANGED
|
@@ -1437,6 +1437,7 @@ var init_angularDeps = __esm(() => {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
|
|
1439
1439
|
// src/utils/spaRouteManifest.ts
|
|
1440
|
+
import { NotFound } from "elysia";
|
|
1440
1441
|
import { basename as basename2 } from "path";
|
|
1441
1442
|
var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
|
|
1442
1443
|
Reflect.set(globalThis, SPA_ROUTES_KEY, hosts);
|
|
@@ -1501,7 +1502,14 @@ var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
|
|
|
1501
1502
|
}, renderSpaNotFound = async (framework, pageName, request) => {
|
|
1502
1503
|
if (isKnownSpaRoute(framework, pageName, request))
|
|
1503
1504
|
return null;
|
|
1504
|
-
return
|
|
1505
|
+
return renderSpaNotFoundResponse(request);
|
|
1506
|
+
}, renderSpaNotFoundResponse = async (request) => {
|
|
1507
|
+
if (request && !isPageRequest(request)) {
|
|
1508
|
+
return new NotFound().toResponse();
|
|
1509
|
+
}
|
|
1510
|
+
return await renderFirstNotFound({
|
|
1511
|
+
preferHtmx: request?.headers.get("hx-request") === "true"
|
|
1512
|
+
}) ?? new Response("Not found", {
|
|
1505
1513
|
headers: { "Content-Type": "text/plain" },
|
|
1506
1514
|
status: 404
|
|
1507
1515
|
});
|
|
@@ -1558,8 +1566,8 @@ var buildRequestProviders = (deps, request, requestContext, responseInit) => [
|
|
|
1558
1566
|
// src/angular/zoneRuntime.ts
|
|
1559
1567
|
var ZONE_NODE_SPECIFIER = "zone.js/node", MISSING_ZONE_MESSAGE = 'angular.changeDetection is "zone" but zone.js could not be loaded. Install it in your app (bun add zone.js).', isAngularZoneMode = () => globalThis.__absoluteAngularChangeDetection === "zone", setAngularChangeDetection = (mode) => {
|
|
1560
1568
|
globalThis.__absoluteAngularChangeDetection = mode ?? "zoneless";
|
|
1561
|
-
},
|
|
1562
|
-
if (value instanceof NativePromise || !
|
|
1569
|
+
}, isRecord3 = (value) => typeof value === "object" && value !== null, adoptIntoNativePromise = (NativePromise, value) => {
|
|
1570
|
+
if (value instanceof NativePromise || !isRecord3(value))
|
|
1563
1571
|
return value;
|
|
1564
1572
|
const { then } = value;
|
|
1565
1573
|
if (typeof then !== "function")
|
|
@@ -1576,28 +1584,28 @@ var ZONE_NODE_SPECIFIER = "zone.js/node", MISSING_ZONE_MESSAGE = 'angular.change
|
|
|
1576
1584
|
}, wrapRoute = (NativePromise, route) => {
|
|
1577
1585
|
if (typeof route === "function")
|
|
1578
1586
|
return wrapHandler(NativePromise, route);
|
|
1579
|
-
if (!
|
|
1587
|
+
if (!isRecord3(route) || route instanceof Response || route instanceof Blob)
|
|
1580
1588
|
return route;
|
|
1581
1589
|
return Object.fromEntries(Object.entries(route).map(([method, handler]) => [
|
|
1582
1590
|
method,
|
|
1583
1591
|
wrapHandler(NativePromise, handler)
|
|
1584
1592
|
]));
|
|
1585
1593
|
}, wrapServeOptions = (NativePromise, options) => {
|
|
1586
|
-
if (!
|
|
1594
|
+
if (!isRecord3(options))
|
|
1587
1595
|
return options;
|
|
1588
1596
|
const wrapped = { ...options };
|
|
1589
1597
|
if (options.fetch)
|
|
1590
1598
|
wrapped.fetch = wrapHandler(NativePromise, options.fetch);
|
|
1591
1599
|
if (options.error)
|
|
1592
1600
|
wrapped.error = wrapHandler(NativePromise, options.error);
|
|
1593
|
-
if (
|
|
1601
|
+
if (isRecord3(options.routes))
|
|
1594
1602
|
wrapped.routes = Object.fromEntries(Object.entries(options.routes).map(([path, route]) => [
|
|
1595
1603
|
path,
|
|
1596
1604
|
wrapRoute(NativePromise, route)
|
|
1597
1605
|
]));
|
|
1598
1606
|
return wrapped;
|
|
1599
1607
|
}, wrapServerReload = (NativePromise, server) => {
|
|
1600
|
-
if (!
|
|
1608
|
+
if (!isRecord3(server))
|
|
1601
1609
|
return;
|
|
1602
1610
|
const { reload } = server;
|
|
1603
1611
|
if (typeof reload !== "function")
|
|
@@ -3475,15 +3483,15 @@ var init_stylePreprocessor = __esm(() => {
|
|
|
3475
3483
|
});
|
|
3476
3484
|
|
|
3477
3485
|
// src/svelte/router/lazyModule.ts
|
|
3478
|
-
var LAZY_RESOLVED_KEY, LAZY_SOURCE_EXPORT = "__ABSOLUTE_SVELTE_SOURCE__",
|
|
3486
|
+
var LAZY_RESOLVED_KEY, LAZY_SOURCE_EXPORT = "__ABSOLUTE_SVELTE_SOURCE__", isRecord4 = (value) => typeof value === "object" && value !== null, isComponent = (value) => typeof value === "function", toLazyComponent = (value) => {
|
|
3479
3487
|
if (isComponent(value))
|
|
3480
3488
|
return value;
|
|
3481
|
-
if (!
|
|
3489
|
+
if (!isRecord4(value))
|
|
3482
3490
|
return;
|
|
3483
3491
|
const fallback = value.default;
|
|
3484
3492
|
return isComponent(fallback) ? fallback : undefined;
|
|
3485
3493
|
}, readSourceFrom = (value) => {
|
|
3486
|
-
if (!
|
|
3494
|
+
if (!isRecord4(value) && !isComponent(value))
|
|
3487
3495
|
return;
|
|
3488
3496
|
const source = Reflect.get(value, LAZY_SOURCE_EXPORT);
|
|
3489
3497
|
return typeof source === "string" ? source : undefined;
|
|
@@ -3492,7 +3500,7 @@ var LAZY_RESOLVED_KEY, LAZY_SOURCE_EXPORT = "__ABSOLUTE_SVELTE_SOURCE__", isReco
|
|
|
3492
3500
|
const fromValue = readSourceFrom(value);
|
|
3493
3501
|
if (fromValue !== undefined)
|
|
3494
3502
|
return fromValue;
|
|
3495
|
-
if (!
|
|
3503
|
+
if (!isRecord4(value))
|
|
3496
3504
|
return;
|
|
3497
3505
|
return readSourceFrom(value.default);
|
|
3498
3506
|
};
|
|
@@ -3876,14 +3884,14 @@ var defineIslandComponent = (component, options) => ({
|
|
|
3876
3884
|
component,
|
|
3877
3885
|
export: options.export,
|
|
3878
3886
|
source: options.source
|
|
3879
|
-
}), defineIslandRegistry = (registry) => registry,
|
|
3887
|
+
}), defineIslandRegistry = (registry) => registry, isRecord5 = (value) => typeof value === "object" && value !== null, getIslandBuildReference = (component) => {
|
|
3880
3888
|
if (!isIslandComponentDefinition(component))
|
|
3881
3889
|
return null;
|
|
3882
3890
|
return {
|
|
3883
3891
|
export: component.export,
|
|
3884
3892
|
source: component.source
|
|
3885
3893
|
};
|
|
3886
|
-
}, isIslandComponentDefinition = (value) =>
|
|
3894
|
+
}, isIslandComponentDefinition = (value) => isRecord5(value) && ("component" in value) && ("source" in value) && typeof value.source === "string", parseIslandProps = (rawProps) => {
|
|
3887
3895
|
if (!rawProps)
|
|
3888
3896
|
return {};
|
|
3889
3897
|
return JSON.parse(rawProps);
|
|
@@ -3907,7 +3915,7 @@ var init_islandMarkupAttributes = __esm(() => {
|
|
|
3907
3915
|
var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildComponentCache, syncIslandGeneration3, nextIslandId = () => {
|
|
3908
3916
|
islandSequence += 1;
|
|
3909
3917
|
return `island-${islandSequence}`;
|
|
3910
|
-
},
|
|
3918
|
+
}, isRecord6 = (value) => typeof value === "object" && value !== null, isReactServerIslandComponent = (value) => typeof value === "function", isSvelteServerIslandComponent = (value) => typeof value === "function", isVueServerIslandComponent = (value) => typeof value === "function" || isRecord6(value), isAngularServerIslandComponent = (value) => typeof value === "function", resolveBuildReferencePath = (source, registryPath) => {
|
|
3911
3919
|
if (source.startsWith("file://"))
|
|
3912
3920
|
return new URL(source).pathname;
|
|
3913
3921
|
if (source.startsWith("."))
|
|
@@ -4376,13 +4384,13 @@ var ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE = "application/vnd.absolute.page+json", ABSO
|
|
|
4376
4384
|
}, headerVaryValues, envelopeResponse = (response, status) => new Response(JSON.stringify({
|
|
4377
4385
|
protocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
|
|
4378
4386
|
response
|
|
4379
|
-
}), { headers: responseHeaders(), status }),
|
|
4387
|
+
}), { headers: responseHeaders(), status }), isRecord8 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), normalizeJsonValue = (value) => {
|
|
4380
4388
|
const serialized = JSON.stringify(value);
|
|
4381
4389
|
if (serialized === undefined) {
|
|
4382
4390
|
throw new TypeError("Mobile page props must be JSON-serializable.");
|
|
4383
4391
|
}
|
|
4384
4392
|
const parsed = JSON.parse(serialized);
|
|
4385
|
-
if (!
|
|
4393
|
+
if (!isRecord8(parsed)) {
|
|
4386
4394
|
throw new TypeError("Mobile page props must serialize to an object.");
|
|
4387
4395
|
}
|
|
4388
4396
|
return parsed;
|
|
@@ -4784,7 +4792,7 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
|
|
|
4784
4792
|
getStreamingSlotsRuntimeScript()
|
|
4785
4793
|
].filter(Boolean).join(";");
|
|
4786
4794
|
return `<script${createNonceAttr(nonce)}>${escapeScriptContent(runtimeBody)}</script>`;
|
|
4787
|
-
}, toUint8 = (value, encoder) => encoder.encode(value),
|
|
4795
|
+
}, toUint8 = (value, encoder) => encoder.encode(value), isRecord9 = (value) => Boolean(value) && typeof value === "object", isSafeHtmlLike = (value) => isRecord9(value) && typeof value.changingThisBreaksApplicationSecurity === "string", normalizeSafeHtml = (value) => {
|
|
4788
4796
|
if (isSafeHtmlLike(value)) {
|
|
4789
4797
|
return value.changingThisBreaksApplicationSecurity;
|
|
4790
4798
|
}
|
|
@@ -4845,7 +4853,7 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
|
|
|
4845
4853
|
}, createTimeoutError = (slot, timeoutMs) => {
|
|
4846
4854
|
const error = Object.assign(new Error(`Streaming slot "${slot.id}" timed out after ${timeoutMs}ms`), { __absTimeout: true });
|
|
4847
4855
|
return error;
|
|
4848
|
-
}, isSlotPatchPayloadObject = (value) =>
|
|
4856
|
+
}, isSlotPatchPayloadObject = (value) => isRecord9(value) && ("html" in value), isTimeoutError = (error) => isRecord9(error) && error.__absTimeout === true, toStreamingSlot = (slot, policy) => ({
|
|
4849
4857
|
dynamic: slot.dynamic,
|
|
4850
4858
|
errorHtml: slot.errorHtml === undefined ? policy.errorHtml : slot.errorHtml,
|
|
4851
4859
|
fallbackHtml: normalizeSlotText(slot.fallbackHtml, policy.fallbackHtml),
|
|
@@ -7569,6 +7577,129 @@ var resolveRequestBaseHref = (route, request) => deriveAngularBaseHref(route, re
|
|
|
7569
7577
|
// src/angular/pageHandler.ts
|
|
7570
7578
|
init_spaRouteManifest();
|
|
7571
7579
|
|
|
7580
|
+
// src/angular/colocatedRouteMatch.ts
|
|
7581
|
+
var MAX_ROUTE_DEPTH = 32;
|
|
7582
|
+
var isRecord2 = (value) => typeof value === "object" && value !== null;
|
|
7583
|
+
var PRIMARY_OUTLET = "primary";
|
|
7584
|
+
var routeOutlet = (route) => typeof route.outlet === "string" ? route.outlet : PRIMARY_OUTLET;
|
|
7585
|
+
var matchRoute = (route, segments) => {
|
|
7586
|
+
if (!isRecord2(route))
|
|
7587
|
+
return true;
|
|
7588
|
+
if (routeOutlet(route) !== PRIMARY_OUTLET)
|
|
7589
|
+
return false;
|
|
7590
|
+
if (typeof route.matcher === "function")
|
|
7591
|
+
return true;
|
|
7592
|
+
if (typeof route.path !== "string")
|
|
7593
|
+
return true;
|
|
7594
|
+
const { path } = route;
|
|
7595
|
+
const parts = path.split("/").filter((part) => part !== "");
|
|
7596
|
+
if (parts.includes("**"))
|
|
7597
|
+
return true;
|
|
7598
|
+
const isFull = route.pathMatch === "full";
|
|
7599
|
+
if (parts.length > segments.length)
|
|
7600
|
+
return false;
|
|
7601
|
+
if (isFull && parts.length < segments.length)
|
|
7602
|
+
return false;
|
|
7603
|
+
const consumed = parts.every((part, index) => part.startsWith(":") || part === segments[index]);
|
|
7604
|
+
if (!consumed)
|
|
7605
|
+
return false;
|
|
7606
|
+
const rest = segments.slice(parts.length);
|
|
7607
|
+
if (route.redirectTo !== undefined)
|
|
7608
|
+
return true;
|
|
7609
|
+
if (route.loadChildren !== undefined)
|
|
7610
|
+
return true;
|
|
7611
|
+
if (route.children !== undefined)
|
|
7612
|
+
return { children: route.children, rest };
|
|
7613
|
+
return rest.length === 0;
|
|
7614
|
+
};
|
|
7615
|
+
var matchRoutes = (routes, segments, depth) => {
|
|
7616
|
+
if (!Array.isArray(routes) || depth > MAX_ROUTE_DEPTH)
|
|
7617
|
+
return true;
|
|
7618
|
+
if (segments.length === 0)
|
|
7619
|
+
return true;
|
|
7620
|
+
return routes.some((route) => {
|
|
7621
|
+
const result = matchRoute(route, segments);
|
|
7622
|
+
if (typeof result === "boolean")
|
|
7623
|
+
return result;
|
|
7624
|
+
return matchRoutes(result.children, result.rest, depth + 1);
|
|
7625
|
+
});
|
|
7626
|
+
};
|
|
7627
|
+
var decodeSegment = (segment) => {
|
|
7628
|
+
try {
|
|
7629
|
+
return decodeURIComponent(segment);
|
|
7630
|
+
} catch {
|
|
7631
|
+
return null;
|
|
7632
|
+
}
|
|
7633
|
+
};
|
|
7634
|
+
var toUrlSegments = (path) => {
|
|
7635
|
+
if (path.includes("(") || path.includes(")"))
|
|
7636
|
+
return null;
|
|
7637
|
+
const decoded = path.split("/").map((raw) => raw.split(";")[0] ?? "").filter((segment) => segment !== "").map(decodeSegment);
|
|
7638
|
+
if (decoded.some((segment) => segment === null))
|
|
7639
|
+
return null;
|
|
7640
|
+
return decoded.filter((segment) => segment !== null);
|
|
7641
|
+
};
|
|
7642
|
+
var matchesAngularColocatedRoutes = (routes, path) => {
|
|
7643
|
+
const segments = toUrlSegments(path);
|
|
7644
|
+
if (segments === null)
|
|
7645
|
+
return true;
|
|
7646
|
+
return matchRoutes(routes, segments, 0);
|
|
7647
|
+
};
|
|
7648
|
+
var pathBelowBaseHref = (pathname, baseHref) => {
|
|
7649
|
+
const collapsed = pathname.replace(/\/{2,}/g, "/");
|
|
7650
|
+
const base = baseHref.endsWith("/") ? baseHref : `${baseHref}/`;
|
|
7651
|
+
if (`${collapsed}/` === base)
|
|
7652
|
+
return "";
|
|
7653
|
+
if (!collapsed.startsWith(base))
|
|
7654
|
+
return null;
|
|
7655
|
+
return collapsed.slice(base.length);
|
|
7656
|
+
};
|
|
7657
|
+
var WILDCARD_SUFFIX2 = "/*";
|
|
7658
|
+
var ROOT_WILDCARD = "/*";
|
|
7659
|
+
var MAX_PROVIDER_DEPTH = 8;
|
|
7660
|
+
var providesBaseHref = (provider, depth = 0) => {
|
|
7661
|
+
if (depth > MAX_PROVIDER_DEPTH)
|
|
7662
|
+
return true;
|
|
7663
|
+
if (Array.isArray(provider))
|
|
7664
|
+
return provider.some((entry) => providesBaseHref(entry, depth + 1));
|
|
7665
|
+
if (!isRecord2(provider))
|
|
7666
|
+
return false;
|
|
7667
|
+
const nested = Reflect.get(provider, "\u0275providers");
|
|
7668
|
+
if (Array.isArray(nested))
|
|
7669
|
+
return providesBaseHref(nested, depth + 1);
|
|
7670
|
+
if (!("provide" in provider))
|
|
7671
|
+
return false;
|
|
7672
|
+
return String(provider.provide).includes("appBaseHref");
|
|
7673
|
+
};
|
|
7674
|
+
var isUnmatchedColocatedRoute = ({
|
|
7675
|
+
handlerProviders,
|
|
7676
|
+
pageModule,
|
|
7677
|
+
request,
|
|
7678
|
+
route,
|
|
7679
|
+
runtimeBaseHref
|
|
7680
|
+
}) => {
|
|
7681
|
+
if (!request || !route?.endsWith(WILDCARD_SUFFIX2))
|
|
7682
|
+
return false;
|
|
7683
|
+
const { providers, routes } = pageModule;
|
|
7684
|
+
if (!Array.isArray(routes) || !Array.isArray(providers))
|
|
7685
|
+
return false;
|
|
7686
|
+
if (providesBaseHref(handlerProviders))
|
|
7687
|
+
return false;
|
|
7688
|
+
const baseHref = runtimeBaseHref ?? (route === ROOT_WILDCARD ? "/" : null);
|
|
7689
|
+
if (baseHref === null)
|
|
7690
|
+
return false;
|
|
7691
|
+
let pathname;
|
|
7692
|
+
try {
|
|
7693
|
+
({ pathname } = new URL(request.url));
|
|
7694
|
+
} catch {
|
|
7695
|
+
return false;
|
|
7696
|
+
}
|
|
7697
|
+
const path = pathBelowBaseHref(pathname, baseHref);
|
|
7698
|
+
if (path === null)
|
|
7699
|
+
return false;
|
|
7700
|
+
return !matchesAngularColocatedRoutes(routes, path);
|
|
7701
|
+
};
|
|
7702
|
+
|
|
7572
7703
|
// src/angular/lowerServerIslands.ts
|
|
7573
7704
|
init_renderIslandMarkup();
|
|
7574
7705
|
var ANGULAR_ISLAND_TAG_RE = /<absolute-island\b([^>]*)>[\s\S]*?<\/absolute-island>/gi;
|
|
@@ -7586,7 +7717,7 @@ var islandHydrationModes = [
|
|
|
7586
7717
|
"none"
|
|
7587
7718
|
];
|
|
7588
7719
|
var decodeHtmlAttribute = (value) => value.replaceAll(""", '"').replaceAll(""", '"').replaceAll("'", "'").replaceAll("'", "'").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
7589
|
-
var
|
|
7720
|
+
var isRecord7 = (value) => typeof value === "object" && value !== null;
|
|
7590
7721
|
var isIslandFramework = (value) => islandFrameworks.some((framework) => framework === value);
|
|
7591
7722
|
var isIslandHydrate = (value) => islandHydrationModes.some((mode) => mode === value);
|
|
7592
7723
|
var parseAttributes = (attributeString) => {
|
|
@@ -7617,7 +7748,7 @@ var parseAngularIslandProps = (attributeString) => {
|
|
|
7617
7748
|
let parsedProps = {};
|
|
7618
7749
|
try {
|
|
7619
7750
|
const candidate = JSON.parse(serializedProps);
|
|
7620
|
-
parsedProps =
|
|
7751
|
+
parsedProps = isRecord7(candidate) ? candidate : {};
|
|
7621
7752
|
} catch {}
|
|
7622
7753
|
return {
|
|
7623
7754
|
component,
|
|
@@ -7986,11 +8117,11 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
|
|
|
7986
8117
|
|
|
7987
8118
|
// src/angular/pageHandler.ts
|
|
7988
8119
|
init_ssrRender();
|
|
7989
|
-
var
|
|
8120
|
+
var isRecord10 = (value) => typeof value === "object" && value !== null;
|
|
7990
8121
|
var isAngularComponent = (value) => typeof value === "function";
|
|
7991
8122
|
var componentHostsRouterOutlet = (component) => {
|
|
7992
8123
|
const componentDef = Reflect.get(component, "\u0275cmp");
|
|
7993
|
-
if (!
|
|
8124
|
+
if (!isRecord10(componentDef))
|
|
7994
8125
|
return false;
|
|
7995
8126
|
const rawDependencies = componentDef.dependencies;
|
|
7996
8127
|
const dependencies = typeof rawDependencies === "function" ? Reflect.apply(rawDependencies, undefined, []) : rawDependencies;
|
|
@@ -8000,7 +8131,7 @@ var componentHostsRouterOutlet = (component) => {
|
|
|
8000
8131
|
if (dependency === null || typeof dependency !== "object" && typeof dependency !== "function")
|
|
8001
8132
|
return false;
|
|
8002
8133
|
const directiveDef = Reflect.get(dependency, "\u0275dir") ?? dependency;
|
|
8003
|
-
if (!
|
|
8134
|
+
if (!isRecord10(directiveDef))
|
|
8004
8135
|
return false;
|
|
8005
8136
|
const { selectors } = directiveDef;
|
|
8006
8137
|
return Array.isArray(selectors) && JSON.stringify(selectors).includes("router-outlet");
|
|
@@ -8030,7 +8161,7 @@ var ensureAngularCompiler = () => {
|
|
|
8030
8161
|
}
|
|
8031
8162
|
return compilerImportPromise;
|
|
8032
8163
|
};
|
|
8033
|
-
var readAngularPageModule = (value) =>
|
|
8164
|
+
var readAngularPageModule = (value) => isRecord10(value) ? value : null;
|
|
8034
8165
|
var resolveAngularSsrOutDir = (projectRoot = process.cwd(), configuredOutDir = process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) => configuredOutDir ?? join10(projectRoot, ".absolutejs", "runtime", "angular-ssr");
|
|
8035
8166
|
var createAngularRuntimeCacheBuster = () => `${Date.now().toString(BASE_36_RADIX)}.${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
|
|
8036
8167
|
var existingNodeModulesLinkMatches = async (nodeModulesLink, expectedTarget) => {
|
|
@@ -8148,7 +8279,7 @@ var handleAngularPageRequest = async (input) => {
|
|
|
8148
8279
|
],
|
|
8149
8280
|
runtimes: [String(ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION)]
|
|
8150
8281
|
},
|
|
8151
|
-
props:
|
|
8282
|
+
props: isRecord10(input.requestContext) ? input.requestContext : Object.create(null),
|
|
8152
8283
|
request,
|
|
8153
8284
|
status: input.responseInit?.status,
|
|
8154
8285
|
route: () => {
|
|
@@ -8185,18 +8316,27 @@ var handleAngularPageRequest = async (input) => {
|
|
|
8185
8316
|
});
|
|
8186
8317
|
try {
|
|
8187
8318
|
const handlerCallsite = options?.collectStreamingSlots === true ? undefined : getCurrentRouteRegistrationCallsite() ?? captureStreamingSlotWarningCallsite();
|
|
8319
|
+
const baseDeps = await getAngularDeps();
|
|
8320
|
+
const runtimePagePath = await resolveRuntimeAngularModulePath(resolvedPagePath);
|
|
8321
|
+
const importedPageModule = await import(buildRuntimeModuleSpecifier(runtimePagePath.path, runtimePagePath.cacheBuster));
|
|
8322
|
+
const pageModule = readAngularPageModule(importedPageModule);
|
|
8323
|
+
if (!pageModule) {
|
|
8324
|
+
throw new Error(`Invalid Angular page module: ${resolvedPagePath}`);
|
|
8325
|
+
}
|
|
8326
|
+
const PageComponent = resolvePageComponent(pageModule);
|
|
8327
|
+
if (!isAngularComponent(PageComponent)) {
|
|
8328
|
+
throw new Error(`Angular page module must export an Angular component: ${resolvedPagePath}`);
|
|
8329
|
+
}
|
|
8330
|
+
if (isUnmatchedColocatedRoute({
|
|
8331
|
+
handlerProviders: input.providers,
|
|
8332
|
+
pageModule,
|
|
8333
|
+
request,
|
|
8334
|
+
route: getCurrentAbsoluteRoute(request),
|
|
8335
|
+
runtimeBaseHref
|
|
8336
|
+
})) {
|
|
8337
|
+
return withPageCacheHeaders(await renderSpaNotFoundResponse(request), request);
|
|
8338
|
+
}
|
|
8188
8339
|
const renderPageResponse = async () => {
|
|
8189
|
-
const baseDeps = await getAngularDeps();
|
|
8190
|
-
const runtimePagePath = await resolveRuntimeAngularModulePath(resolvedPagePath);
|
|
8191
|
-
const importedPageModule = await import(buildRuntimeModuleSpecifier(runtimePagePath.path, runtimePagePath.cacheBuster));
|
|
8192
|
-
const pageModule = readAngularPageModule(importedPageModule);
|
|
8193
|
-
if (!pageModule) {
|
|
8194
|
-
throw new Error(`Invalid Angular page module: ${resolvedPagePath}`);
|
|
8195
|
-
}
|
|
8196
|
-
const PageComponent = resolvePageComponent(pageModule);
|
|
8197
|
-
if (!isAngularComponent(PageComponent)) {
|
|
8198
|
-
throw new Error(`Angular page module must export an Angular component: ${resolvedPagePath}`);
|
|
8199
|
-
}
|
|
8200
8340
|
const hasIslands = typeof pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ === "boolean" ? pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ : false;
|
|
8201
8341
|
const usesLegacyAnimations = pageModule.__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ === true;
|
|
8202
8342
|
const deps = baseDeps;
|
|
@@ -8264,5 +8404,5 @@ export {
|
|
|
8264
8404
|
withPendingTask
|
|
8265
8405
|
};
|
|
8266
8406
|
|
|
8267
|
-
//# debugId=
|
|
8407
|
+
//# debugId=FE97DE05426DDF8964756E2164756E21
|
|
8268
8408
|
//# sourceMappingURL=server.js.map
|