@absolutejs/absolute 0.19.0-beta.952 → 0.19.0-beta.954

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.
@@ -0,0 +1,26 @@
1
+ export type AngularSpaRoute = {
2
+ /** Path segment as declared in the Angular `Routes` config — already
3
+ * stripped of any leading/trailing slashes. */
4
+ path: string;
5
+ /** True when the segment contains `:param`, `*`, or `**`. */
6
+ dynamic: boolean;
7
+ /** True when the route is a `redirectTo` — sitemap should skip. */
8
+ redirected: boolean;
9
+ /** True when the route has `data: { sitemap: 'exclude' }`. */
10
+ sitemapExcluded: boolean;
11
+ };
12
+ export type AngularSpaPage = {
13
+ /** Absolute path of the source file the routes were read from. */
14
+ sourceFile: string;
15
+ /** `APP_BASE_HREF` useValue — the mount path the page expects to be
16
+ * served at (e.g. `'/portal/'`). */
17
+ baseHref: string;
18
+ /** Leaf routes extracted from the page's `Routes` array. */
19
+ routes: AngularSpaRoute[];
20
+ };
21
+ /** Statically scan an Angular page-source directory for SPA hosts —
22
+ * files that both import `APP_BASE_HREF`/`provideRouter` and declare
23
+ * an `APP_BASE_HREF` provider plus a literal `Routes` array. Returns
24
+ * one entry per host with the mount path and leaf routes. Does not
25
+ * load or execute user code. */
26
+ export declare const analyzeAngularSpaRoutes: (angularDirectory: string) => Promise<AngularSpaPage[]>;
@@ -1,6 +1,11 @@
1
1
  import type { SitemapConfig } from '../../types/sitemap';
2
- export declare const generateSitemap: (routes: {
2
+ type AppRoute = {
3
3
  method: string;
4
4
  path: string;
5
5
  handler?: unknown;
6
- }[], serverUrl: string, outDir: string, config?: SitemapConfig) => Promise<void>;
6
+ };
7
+ export type SitemapPipelineConfig = {
8
+ angularDirectory?: string;
9
+ };
10
+ export declare const generateSitemap: (routes: AppRoute[], serverUrl: string, outDir: string, config?: SitemapConfig, pipelineConfig?: SitemapPipelineConfig) => Promise<void>;
11
+ export {};
@@ -18,6 +18,15 @@ export type AngularDeps = {
18
18
  };
19
19
  export type AngularPageDefinition<Props extends Record<string, unknown> = Record<never, never>> = {
20
20
  component: import('@angular/core').Type<unknown>;
21
+ /**
22
+ * Optional SPA route configuration for this page. When provided,
23
+ * the sitemap pipeline walks it (eagerly resolving `loadChildren`)
24
+ * and emits one entry per non-dynamic leaf, prefixed by the
25
+ * Elysia mount path. Pass the same `Routes` array given to
26
+ * `provideRouter(...)` so the single source of truth stays in
27
+ * user code.
28
+ */
29
+ routes?: import('@angular/router').Routes;
21
30
  /** Type-only marker used by handleAngularPageRequest to infer route props. */
22
31
  __absoluteAngularPageProps?: Props;
23
32
  };
package/package.json CHANGED
@@ -401,5 +401,5 @@
401
401
  ]
402
402
  }
403
403
  },
404
- "version": "0.19.0-beta.952"
404
+ "version": "0.19.0-beta.954"
405
405
  }