@absolutejs/absolute 0.19.0-beta.971 → 0.19.0-beta.973
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 +8 -2
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +8 -2
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +874 -779
- package/dist/build.js.map +7 -6
- package/dist/index.js +916 -821
- package/dist/index.js.map +7 -6
- package/dist/src/angular/loadGlobalProviders.d.ts +0 -4
- package/dist/src/build/emitAngularProvidersFiles.d.ts +8 -4
- package/dist/src/build/parseAngularConfigImports.d.ts +9 -0
- package/dist/src/build/runAngularHandlerScan.d.ts +1 -8
- package/dist/src/utils/loadConfig.d.ts +1 -1
- package/dist/types/build.d.ts +11 -9
- package/package.json +1 -1
|
@@ -1,7 +1,3 @@
|
|
|
1
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
2
|
export declare const manifestKeyForPagePath: (pageSourcePath: string) => string;
|
|
7
3
|
export declare const loadPageProviders: (pageSourcePath: string) => Promise<ReadonlyArray<Provider | EnvironmentProviders>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AngularProvidersImport } from './parseAngularConfigImports';
|
|
1
2
|
import type { AngularHandlerCall } from './scanAngularHandlerCalls';
|
|
2
3
|
import { type AngularPageRoutes } from './scanAngularPageRoutes';
|
|
3
4
|
export type EmittedProvidersFile = {
|
|
@@ -12,10 +13,13 @@ export type EmittedProvidersFile = {
|
|
|
12
13
|
hasProviders: boolean;
|
|
13
14
|
};
|
|
14
15
|
export type EmitAngularProvidersOptions = {
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
16
|
+
/** AST-extracted import info for the user's `angular.providers`
|
|
17
|
+
* binding (from absolute.config.ts). Each emitted file re-imports
|
|
18
|
+
* the same binding by its source path so pages and per-handler
|
|
19
|
+
* calls never write providers themselves. Null when the config
|
|
20
|
+
* doesn't set `angular.providers` — the emitter skips the global
|
|
21
|
+
* import. */
|
|
22
|
+
providersImport?: AngularProvidersImport | null;
|
|
19
23
|
};
|
|
20
24
|
export declare const emitAngularProvidersFiles: (projectRoot: string, calls: AngularHandlerCall[], pageRoutes: AngularPageRoutes[], options?: EmitAngularProvidersOptions) => EmittedProvidersFile[];
|
|
21
25
|
/** Absolute path of the directory the emitter writes to. Exposed so other
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type AngularProvidersImport = {
|
|
2
|
+
/** Local binding name as referenced in the config (e.g. `appProviders`). */
|
|
3
|
+
bindingName: string;
|
|
4
|
+
/** Original exported name on the source module. */
|
|
5
|
+
importedName: string;
|
|
6
|
+
/** Resolved absolute path to the providers module (no extension). */
|
|
7
|
+
absolutePath: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const parseAngularProvidersImport: (projectRoot: string) => AngularProvidersImport | null;
|
|
@@ -9,11 +9,4 @@ export type AngularHandlerScanResult = {
|
|
|
9
9
|
* client bundle can import. */
|
|
10
10
|
manifestKeysWithProviders: Set<string>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
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
|
+
export declare const runAngularHandlerScan: (projectRoot: string, angularDirectory: string) => AngularHandlerScanResult;
|
|
@@ -13,7 +13,7 @@ export declare const loadConfig: (configPath?: string) => Promise<{
|
|
|
13
13
|
vueDirectory?: string;
|
|
14
14
|
angularDirectory?: string;
|
|
15
15
|
angular?: {
|
|
16
|
-
|
|
16
|
+
providers?: ReadonlyArray<import("@angular/core").Provider | import("@angular/core").EnvironmentProviders>;
|
|
17
17
|
};
|
|
18
18
|
astroDirectory?: string;
|
|
19
19
|
svelteDirectory?: string;
|
package/dist/types/build.d.ts
CHANGED
|
@@ -135,16 +135,18 @@ export type BaseBuildConfig = {
|
|
|
135
135
|
reactDirectory?: string;
|
|
136
136
|
vueDirectory?: string;
|
|
137
137
|
angularDirectory?: string;
|
|
138
|
-
/** Per-framework Angular config.
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
138
|
+
/** Per-framework Angular config. `providers` is the global default
|
|
139
|
+
* DI provider array every page gets at SSR + client bootstrap.
|
|
140
|
+
* Write it as a real typed value (`providers: appProviders`) so
|
|
141
|
+
* TypeScript catches a missing import or renamed binding at
|
|
142
|
+
* compile time. The framework AST-parses absolute.config.ts at
|
|
143
|
+
* build time to find the import path of the binding referenced
|
|
144
|
+
* here, then bakes a matching import into every per-page generated
|
|
145
|
+
* providers file. Per-page additions (e.g. `provideRouter(routes)`)
|
|
146
|
+
* come from page-level `export const routes` and are auto-wired by
|
|
147
|
+
* the build — users never write `provideRouter` themselves. */
|
|
146
148
|
angular?: {
|
|
147
|
-
|
|
149
|
+
providers?: ReadonlyArray<import('@angular/core').Provider | import('@angular/core').EnvironmentProviders>;
|
|
148
150
|
};
|
|
149
151
|
astroDirectory?: string;
|
|
150
152
|
svelteDirectory?: string;
|
package/package.json
CHANGED