@absolutejs/absolute 0.19.0-beta.984 → 0.19.0-beta.985
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/browser.js +2 -16
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +4 -16
- package/dist/angular/index.js.map +4 -4
- package/dist/angular/server.js +3 -1
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +295 -391
- package/dist/build.js.map +3 -3
- package/dist/index.js +306 -402
- package/dist/index.js.map +3 -3
- package/dist/src/angular/composables/useSubscription.d.ts +13 -6
- package/dist/src/angular/pageHandler.d.ts +14 -7
- package/dist/src/build/scanAngularHandlerCalls.d.ts +0 -22
- package/package.json +1 -1
|
@@ -11,12 +11,19 @@ export type Observer<T> = {
|
|
|
11
11
|
* collapsed into one call so consumers can't forget the cleanup
|
|
12
12
|
* operator (the most common Angular memory-leak source).
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* constructor
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
14
|
+
* `inject(DestroyRef)` is only legal in an Angular injection context
|
|
15
|
+
* (constructor, field initializer, factory,
|
|
16
|
+
* `runInInjectionContext`). Calling `useSubscription` without a
|
|
17
|
+
* captured `DestroyRef` from `ngOnInit` or any other lifecycle hook
|
|
18
|
+
* will throw `NG0203`. For those call sites, capture the ref once in
|
|
19
|
+
* a field initializer (`private destroyRef = inject(DestroyRef);`)
|
|
20
|
+
* and pass it as the third argument:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* ngOnInit() {
|
|
24
|
+
* useSubscription(this.events$, (event) => { ... }, this.destroyRef);
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
20
27
|
*
|
|
21
28
|
* Note: this composable handles teardown only — it does not trigger
|
|
22
29
|
* change detection on emissions. If the observer mutates state that
|
|
@@ -19,13 +19,20 @@ export type AngularPageRequestInput<Ctx = unknown> = AngularPageRenderOptions &
|
|
|
19
19
|
request?: Request;
|
|
20
20
|
/** Mutable response init made available through Angular's RESPONSE_INIT token. */
|
|
21
21
|
responseInit?: ResponseInit;
|
|
22
|
-
/**
|
|
23
|
-
* `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
22
|
+
/** Extra per-request providers merged in on top of the page
|
|
23
|
+
* module's bundled providers (`appProviders` + `provideRouter` +
|
|
24
|
+
* `APP_BASE_HREF`) at SSR bootstrap. Use for handler-scoped DI
|
|
25
|
+
* values that depend on the request — e.g. a tenant-specific
|
|
26
|
+
* feature-flag service, a per-request HTTP interceptor token,
|
|
27
|
+
* or test-only overrides. The same Angular module instance is
|
|
28
|
+
* shared (the backend resolves `@angular/core` through the same
|
|
29
|
+
* `node_modules` Bun cache key as the rebuilt page bundle), so
|
|
30
|
+
* tokens declared here interop with the bundled providers.
|
|
31
|
+
*
|
|
32
|
+
* **SSR-only.** The browser bundle doesn't see these — the
|
|
33
|
+
* client picks up only the providers baked into the page
|
|
34
|
+
* module. If the same provider must run on both sides, add it
|
|
35
|
+
* to `absolute.config.ts > angular.providers` instead. */
|
|
29
36
|
providers?: ReadonlyArray<Provider | EnvironmentProviders>;
|
|
30
37
|
/** Sitemap metadata for this route. Statically read from the handler
|
|
31
38
|
* source at registration time, so only literal-object values are
|
|
@@ -1,30 +1,8 @@
|
|
|
1
|
-
export type ImportSpec = {
|
|
2
|
-
/** Local name as used inside the providers expression. */
|
|
3
|
-
localName: string;
|
|
4
|
-
/** Original exported name (matches localName unless the source used `as`). */
|
|
5
|
-
importedName: string;
|
|
6
|
-
/** `true` when the import was a default import (`import foo from "..."`). */
|
|
7
|
-
isDefault: boolean;
|
|
8
|
-
/** Module specifier as written in the source — could be a bare package
|
|
9
|
-
* name (`@angular/router`) or a path (`./foo`, `../../utils/x`). The
|
|
10
|
-
* path forms are resolved to absolute file paths by `resolvedAbsPath`. */
|
|
11
|
-
source: string;
|
|
12
|
-
/** Absolute path the source resolves to, or `null` for bare specifiers
|
|
13
|
-
* (`@angular/router`, `firebase/auth`, …) which the generated file
|
|
14
|
-
* will re-import by the same bare specifier. */
|
|
15
|
-
resolvedAbsPath: string | null;
|
|
16
|
-
};
|
|
17
1
|
export type AngularHandlerCall = {
|
|
18
2
|
/** File the call lives in. */
|
|
19
3
|
sourceFile: string;
|
|
20
4
|
/** Manifest key extracted from `pagePath: asset(manifest, "Foo")`. */
|
|
21
5
|
manifestKey: string;
|
|
22
|
-
/** Verbatim source text of the `providers:` argument expression, or
|
|
23
|
-
* `null` if the call didn't include one. */
|
|
24
|
-
providersExpr: string | null;
|
|
25
|
-
/** Imports from the source file that the `providers:` expression refers
|
|
26
|
-
* to. Empty array when `providersExpr` is null. */
|
|
27
|
-
providerImports: ImportSpec[];
|
|
28
6
|
/** Mount path from the surrounding `.get("/path", ...)` / `.post(...)`
|
|
29
7
|
* Elysia chain. `null` when the call isn't directly inside such a
|
|
30
8
|
* registration (rare but possible — e.g. inside a helper function). */
|
package/package.json
CHANGED