@absolutejs/absolute 0.19.0-beta.740 → 0.19.0-beta.742

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.
@@ -520,12 +520,12 @@ var routePropsCache, cacheRouteData = (pagePath, data) => {
520
520
  result = injectBeforeClose(result, `<script>import(${escapedIndexPath});</script>`);
521
521
  }
522
522
  return result;
523
- }, renderAngularApp = async (deps, PageComponent, providers, document2) => {
523
+ }, renderAngularApp = async (deps, PageComponent, providers, document2, url = "/") => {
524
524
  const bootstrap = (context) => deps.bootstrapApplication(PageComponent, { providers }, context);
525
525
  return withSuppressedAngularDevLogs(() => deps.renderApplication(bootstrap, {
526
526
  document: document2,
527
527
  platformProviders: [],
528
- url: "/"
528
+ url
529
529
  }));
530
530
  }, withSuppressedAngularDevLogs = async (render) => {
531
531
  const origLog = console.log;
@@ -5027,6 +5027,16 @@ var handleAngularPageRequest = async (input) => {
5027
5027
  const resolvedPagePath = input.pagePath;
5028
5028
  const maybeProps = input.props;
5029
5029
  const userProviders = input.providers;
5030
+ const resolvedUrl = (() => {
5031
+ if (!input.request)
5032
+ return "/";
5033
+ try {
5034
+ const parsed = new URL(input.request.url);
5035
+ return `${parsed.pathname}${parsed.search}`;
5036
+ } catch {
5037
+ return "/";
5038
+ }
5039
+ })();
5030
5040
  cacheRouteData(resolvedPagePath, {
5031
5041
  headTag: resolvedHeadTag,
5032
5042
  props: maybeProps
@@ -5063,8 +5073,14 @@ var handleAngularPageRequest = async (input) => {
5063
5073
  if (ssrResult?.core)
5064
5074
  resetSsrSanitizer();
5065
5075
  const sanitizer = getSsrSanitizer(deps);
5066
- const providers = buildProviders(deps, sanitizer, maybeProps, tokenMap, userProviders);
5067
- const rawHtml = await renderAngularApp(deps, PageComponent, providers, htmlString);
5076
+ const pageProvidersExport = Reflect.get(pageModule, "providers");
5077
+ const pageProviders = Array.isArray(pageProvidersExport) ? pageProvidersExport : [];
5078
+ const combinedProviders = [
5079
+ ...userProviders ?? [],
5080
+ ...pageProviders
5081
+ ];
5082
+ const providers = buildProviders(deps, sanitizer, maybeProps, tokenMap, combinedProviders);
5083
+ const rawHtml = await renderAngularApp(deps, PageComponent, providers, htmlString, resolvedUrl);
5068
5084
  const shouldProcessIslands = hasIslands || rawHtml.includes("<absolute-island");
5069
5085
  const htmlWithLoweredIslands = shouldProcessIslands ? await lowerAngularServerIslands(rawHtml) : rawHtml;
5070
5086
  const html = injectIslandPageContext(injectSsrScripts(htmlWithLoweredIslands, requestId, resolvedIndexPath, maybeProps), { hasIslands: shouldProcessIslands });
@@ -5090,5 +5106,5 @@ export {
5090
5106
  handleAngularPageRequest
5091
5107
  };
5092
5108
 
5093
- //# debugId=CC06E227EE05A7F464756E2164756E21
5109
+ //# debugId=C559D45965BB1F7964756E2164756E21
5094
5110
  //# sourceMappingURL=server.js.map