@absolutejs/absolute 0.19.0-beta.970 → 0.19.0-beta.971
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/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +175 -7102
- package/dist/angular/index.js.map +5 -10
- package/dist/angular/server.js +115 -15979
- package/dist/angular/server.js.map +5 -233
- package/dist/build.js +31 -12
- package/dist/build.js.map +5 -5
- package/dist/index.js +31 -12
- package/dist/index.js.map +5 -5
- package/dist/src/angular/loadGlobalProviders.d.ts +7 -0
- package/dist/src/build/emitAngularProvidersFiles.d.ts +7 -1
- package/dist/src/build/runAngularHandlerScan.d.ts +8 -1
- package/dist/src/utils/loadConfig.d.ts +3 -0
- package/dist/types/build.d.ts +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EnvironmentProviders, Provider } from '@angular/core';
|
|
2
|
+
/** Derive the manifest key (PascalCase basename) from the page's
|
|
3
|
+
* resolved source path. Matches `generateManifest`'s convention for
|
|
4
|
+
* Angular `pages/` so `home/home.ts` → `Home`,
|
|
5
|
+
* `portal/portal.ts` → `Portal`, etc. */
|
|
6
|
+
export declare const manifestKeyForPagePath: (pageSourcePath: string) => string;
|
|
7
|
+
export declare const loadPageProviders: (pageSourcePath: string) => Promise<ReadonlyArray<Provider | EnvironmentProviders>>;
|
|
@@ -11,7 +11,13 @@ export type EmittedProvidersFile = {
|
|
|
11
11
|
/** `true` when the call carried a `providers:` argument. */
|
|
12
12
|
hasProviders: boolean;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type EmitAngularProvidersOptions = {
|
|
15
|
+
/** Project-relative path to the global providers module (exports
|
|
16
|
+
* `appProviders`). The emitted files re-import it so each page's
|
|
17
|
+
* generated providers always include the user's global setup. */
|
|
18
|
+
providersImport?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const emitAngularProvidersFiles: (projectRoot: string, calls: AngularHandlerCall[], pageRoutes: AngularPageRoutes[], options?: EmitAngularProvidersOptions) => EmittedProvidersFile[];
|
|
15
21
|
/** Absolute path of the directory the emitter writes to. Exposed so other
|
|
16
22
|
* build steps (`compileAngular`'s client wrapper, the SSR `pageHandler`)
|
|
17
23
|
* can compute relative paths to the generated files without hard-coding
|
|
@@ -9,4 +9,11 @@ export type AngularHandlerScanResult = {
|
|
|
9
9
|
* client bundle can import. */
|
|
10
10
|
manifestKeysWithProviders: Set<string>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type AngularHandlerScanOptions = {
|
|
13
|
+
/** Project-relative path to the user's global Angular providers
|
|
14
|
+
* module (must export `appProviders`). When set, every generated
|
|
15
|
+
* providers file re-imports it so pages and per-handler calls
|
|
16
|
+
* never write providers themselves. */
|
|
17
|
+
providersImport?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const runAngularHandlerScan: (projectRoot: string, angularDirectory: string, options?: AngularHandlerScanOptions) => AngularHandlerScanResult;
|
|
@@ -12,6 +12,9 @@ export declare const loadConfig: (configPath?: string) => Promise<{
|
|
|
12
12
|
reactDirectory?: string;
|
|
13
13
|
vueDirectory?: string;
|
|
14
14
|
angularDirectory?: string;
|
|
15
|
+
angular?: {
|
|
16
|
+
providersImport?: string;
|
|
17
|
+
};
|
|
15
18
|
astroDirectory?: string;
|
|
16
19
|
svelteDirectory?: string;
|
|
17
20
|
emberDirectory?: string;
|
package/dist/types/build.d.ts
CHANGED
|
@@ -135,6 +135,17 @@ export type BaseBuildConfig = {
|
|
|
135
135
|
reactDirectory?: string;
|
|
136
136
|
vueDirectory?: string;
|
|
137
137
|
angularDirectory?: string;
|
|
138
|
+
/** Per-framework Angular config. Currently exposes `providersImport` —
|
|
139
|
+
* a project-relative path to a module that exports `appProviders`
|
|
140
|
+
* (the global default DI providers every page receives at SSR + client
|
|
141
|
+
* bootstrap). The framework imports this module from both the
|
|
142
|
+
* generated client bundle and the SSR handler so the two trees are
|
|
143
|
+
* identical. Per-page additions (e.g. `provideRouter(routes)`) come
|
|
144
|
+
* from page-level `export const routes` and are auto-wired by the
|
|
145
|
+
* build — users never write `provideRouter` themselves. */
|
|
146
|
+
angular?: {
|
|
147
|
+
providersImport?: string;
|
|
148
|
+
};
|
|
138
149
|
astroDirectory?: string;
|
|
139
150
|
svelteDirectory?: string;
|
|
140
151
|
emberDirectory?: string;
|
package/package.json
CHANGED