@absolutejs/absolute 0.19.0-beta.1030 → 0.19.0-beta.1032
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 +18 -16
- package/dist/angular/browser.js.map +5 -5
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/hmrPreserveCore.ts +83 -118
- package/dist/angular/index.js +49 -49
- package/dist/angular/index.js.map +12 -12
- package/dist/angular/server.js +34 -34
- package/dist/angular/server.js.map +10 -10
- package/dist/build.js +135 -135
- package/dist/build.js.map +26 -26
- package/dist/cli/config/client.js +1 -1
- package/dist/cli/config/server.js +43 -43
- package/dist/cli/index.js +247 -168
- package/dist/client/index.js +9 -9
- package/dist/client/index.js.map +8 -8
- package/dist/dev/client/errorOverlay.ts +4 -4
- package/dist/dev/client/handlers/angularHmrShim.ts +17 -17
- package/dist/dev/client/handlers/angularRemount.ts +6 -4
- package/dist/dev/client/handlers/angularRemountWiring.ts +1 -1
- package/dist/dev/client/hmrToast.ts +18 -18
- package/dist/index.js +149 -150
- package/dist/index.js.map +31 -31
- package/dist/islands/browser.js.map +1 -1
- package/dist/islands/index.js +5 -5
- package/dist/islands/index.js.map +6 -6
- package/dist/react/browser.js.map +1 -1
- package/dist/react/components/index.js +2 -2
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/index.js +21 -21
- package/dist/react/index.js.map +9 -9
- package/dist/react/server.js +17 -17
- package/dist/react/server.js.map +5 -5
- package/dist/src/angular/hmrPreserveCore.d.ts +5 -18
- package/dist/src/angular/islands.d.ts +1 -1
- package/dist/src/cli/config/packageJson/editPackageJson.d.ts +2 -2
- package/dist/src/cli/config/schema/fromJsonSchema.d.ts +1 -1
- package/dist/src/client/hydrators/react.d.ts +1 -1
- package/dist/src/client/hydrators/svelte.d.ts +1 -1
- package/dist/src/client/hydrators/vue.d.ts +1 -1
- package/dist/src/client/islandStore.d.ts +3 -3
- package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
- package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
- package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
- package/dist/src/svelte/router/hashMode.d.ts +1 -6
- package/dist/src/svelte/router/matchPath.d.ts +2 -22
- package/dist/src/svelte/router/page.svelte.d.ts +1 -10
- package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
- package/dist/src/utils/generatedDir.d.ts +1 -1
- package/dist/src/utils/inlinePageCss.d.ts +1 -3
- package/dist/src/utils/jsonLd.d.ts +1 -1
- package/dist/src/utils/loadConfig.d.ts +2 -3
- package/dist/src/utils/resolveConvention.d.ts +1 -1
- package/dist/src/utils/runtimeMode.d.ts +1 -1
- package/dist/src/vue/defineVuePage.d.ts +1 -11
- package/dist/svelte/browser.js.map +1 -1
- package/dist/svelte/index.js +26 -26
- package/dist/svelte/index.js.map +9 -9
- package/dist/svelte/router/hashMode.ts +6 -12
- package/dist/svelte/router/matchPath.ts +23 -45
- package/dist/svelte/router/page.d.ts +1 -10
- package/dist/svelte/router/page.js +6 -6
- package/dist/svelte/router/prefetchCache.ts +12 -20
- package/dist/svelte/server.js +22 -22
- package/dist/svelte/server.js.map +5 -5
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +4 -4
- package/dist/vue/index.js +29 -29
- package/dist/vue/index.js.map +11 -11
- package/dist/vue/server.js +24 -24
- package/dist/vue/server.js.map +6 -6
- package/package.json +38 -38
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-4NaVQs/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-4NaVQs/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-4NaVQs/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
|
@@ -24,88 +24,6 @@ type PreserveScope = typeof globalThis & {
|
|
|
24
24
|
__ABS_HMR_REBOOT_STATS__?: RebootStats;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export const isHmrPreserveDev = (): boolean => {
|
|
28
|
-
// SSR safety: globalThis on the server is process-wide and shared
|
|
29
|
-
// across requests, so writing to the preservation cache during SSR
|
|
30
|
-
// would leak request state between users. Gate strictly on the
|
|
31
|
-
// presence of a browser `window` *and* a dev signal — neither is
|
|
32
|
-
// true in a production build, so this is a hard no-op there too.
|
|
33
|
-
if (typeof window === 'undefined') return false;
|
|
34
|
-
const scope = globalThis as { __DEV__?: unknown; ngDevMode?: unknown };
|
|
35
|
-
|
|
36
|
-
return Boolean(scope.__DEV__) || Boolean(scope.ngDevMode);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const getCache = (): StateCache => {
|
|
40
|
-
const scope = globalThis as PreserveScope;
|
|
41
|
-
|
|
42
|
-
return (scope.__ABS_HMR_INSTANCE_STATE__ ??= new Map());
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const getTracker = (): InstanceTracker => {
|
|
46
|
-
const scope = globalThis as PreserveScope;
|
|
47
|
-
|
|
48
|
-
return (scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set());
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const getKeyMap = (): InstanceKeyMap => {
|
|
52
|
-
const scope = globalThis as PreserveScope;
|
|
53
|
-
|
|
54
|
-
return (scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap());
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const getRebootFlag = (): RebootFlag => {
|
|
58
|
-
const scope = globalThis as PreserveScope;
|
|
59
|
-
|
|
60
|
-
return (scope.__ABS_HMR_REBOOT_IN_PROGRESS__ ??= { value: false });
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const getRebootStats = (): RebootStats => {
|
|
64
|
-
const scope = globalThis as PreserveScope;
|
|
65
|
-
|
|
66
|
-
return (scope.__ABS_HMR_REBOOT_STATS__ ??= {
|
|
67
|
-
captured: 0,
|
|
68
|
-
restoredKeys: new Set()
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/* Filter for values that are safe to preserve across an HMR full
|
|
73
|
-
re-bootstrap. Snapshots the OLD app's instance state into a cache
|
|
74
|
-
and copies it back onto the NEW instance — but holding references
|
|
75
|
-
to the OLD app's Angular-injected services (HttpClient,
|
|
76
|
-
ApplicationRef, subscriptions tied to the destroyed injector, etc.)
|
|
77
|
-
and restoring them onto the new instance would corrupt the new app:
|
|
78
|
-
the new `HttpClient` from the new injector would be replaced by a
|
|
79
|
-
stale ref pointing at a destroyed graph. So: primitives, plain `{}`
|
|
80
|
-
objects, and arrays of those — covers the common cases (auth tokens,
|
|
81
|
-
cached query results, search queries, pagination state) without
|
|
82
|
-
leaking Angular-injected dependencies, RxJS subjects, DOM nodes, or
|
|
83
|
-
other live references. */
|
|
84
|
-
export const isPreservable = (value: unknown, depth = 0): boolean => {
|
|
85
|
-
if (depth > 8) return false;
|
|
86
|
-
if (value === null || value === undefined) return true;
|
|
87
|
-
const t = typeof value;
|
|
88
|
-
if (t === 'string' || t === 'number' || t === 'boolean' || t === 'bigint')
|
|
89
|
-
return true;
|
|
90
|
-
if (t === 'function' || t === 'symbol') return false;
|
|
91
|
-
if (Array.isArray(value)) {
|
|
92
|
-
return value.every((item) => isPreservable(item, depth + 1));
|
|
93
|
-
}
|
|
94
|
-
if (t === 'object') {
|
|
95
|
-
const proto = Object.getPrototypeOf(value);
|
|
96
|
-
// Only POJOs — class instances (HttpClient, BehaviorSubject, Date,
|
|
97
|
-
// Map, etc.) carry runtime identity that the new instance must
|
|
98
|
-
// get from its own injector / construction.
|
|
99
|
-
if (proto !== Object.prototype && proto !== null) return false;
|
|
100
|
-
|
|
101
|
-
return Object.values(value as object).every((v) =>
|
|
102
|
-
isPreservable(v, depth + 1)
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return false;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
27
|
export const buildCacheKey = (
|
|
110
28
|
instance: object,
|
|
111
29
|
key?: unknown
|
|
@@ -116,35 +34,6 @@ export const buildCacheKey = (
|
|
|
116
34
|
|
|
117
35
|
return `${className}:${suffix}`;
|
|
118
36
|
};
|
|
119
|
-
|
|
120
|
-
/** Copy preservable own properties from the cached snapshot onto the
|
|
121
|
-
* instance. Records the restoration in stats so the end-of-reboot
|
|
122
|
-
* summary can list which classes had state restored. Returns whether
|
|
123
|
-
* anything was actually written. */
|
|
124
|
-
export const restoreFromCacheCore = (
|
|
125
|
-
instance: object,
|
|
126
|
-
key: string
|
|
127
|
-
): boolean => {
|
|
128
|
-
const cache = getCache();
|
|
129
|
-
const stored = cache.get(key);
|
|
130
|
-
if (!stored) return false;
|
|
131
|
-
|
|
132
|
-
for (const [prop, value] of Object.entries(stored)) {
|
|
133
|
-
try {
|
|
134
|
-
(instance as Record<string, unknown>)[prop] = value;
|
|
135
|
-
} catch {
|
|
136
|
-
/* property is non-writable / has a setter that threw — skip */
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
getRebootStats().restoredKeys.add(key);
|
|
141
|
-
|
|
142
|
-
return true;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/** Snapshot every tracked instance's preservable own properties into
|
|
146
|
-
* the shared cache and flip the reboot-in-progress flag on. Called by
|
|
147
|
-
* the dev-client HMR handler right before `destroyAngularApp()`. */
|
|
148
37
|
export const captureTrackedInstanceStates = (): void => {
|
|
149
38
|
if (!isHmrPreserveDev()) return;
|
|
150
39
|
|
|
@@ -198,13 +87,6 @@ export const captureTrackedInstanceStates = (): void => {
|
|
|
198
87
|
|
|
199
88
|
getRebootFlag().value = true;
|
|
200
89
|
};
|
|
201
|
-
|
|
202
|
-
/** Clear the active-reboot flag and emit a one-line summary so
|
|
203
|
-
* developers can see at-a-glance which classes had state preserved.
|
|
204
|
-
* Called by the dev-client HMR handler after the new app has reported
|
|
205
|
-
* stable. After this, `preserveAcrossHmr` calls track but don't
|
|
206
|
-
* restore — so navigating to a route after HMR doesn't resurrect
|
|
207
|
-
* stale state from the last reboot. */
|
|
208
90
|
export const endHmrReboot = (): void => {
|
|
209
91
|
if (!isHmrPreserveDev()) return;
|
|
210
92
|
getRebootFlag().value = false;
|
|
@@ -221,3 +103,86 @@ export const endHmrReboot = (): void => {
|
|
|
221
103
|
);
|
|
222
104
|
}
|
|
223
105
|
};
|
|
106
|
+
export const getCache = (): StateCache => {
|
|
107
|
+
const scope = globalThis as PreserveScope;
|
|
108
|
+
|
|
109
|
+
return (scope.__ABS_HMR_INSTANCE_STATE__ ??= new Map());
|
|
110
|
+
};
|
|
111
|
+
export const getKeyMap = (): InstanceKeyMap => {
|
|
112
|
+
const scope = globalThis as PreserveScope;
|
|
113
|
+
|
|
114
|
+
return (scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap());
|
|
115
|
+
};
|
|
116
|
+
export const getRebootFlag = (): RebootFlag => {
|
|
117
|
+
const scope = globalThis as PreserveScope;
|
|
118
|
+
|
|
119
|
+
return (scope.__ABS_HMR_REBOOT_IN_PROGRESS__ ??= { value: false });
|
|
120
|
+
};
|
|
121
|
+
export const getRebootStats = (): RebootStats => {
|
|
122
|
+
const scope = globalThis as PreserveScope;
|
|
123
|
+
|
|
124
|
+
return (scope.__ABS_HMR_REBOOT_STATS__ ??= {
|
|
125
|
+
captured: 0,
|
|
126
|
+
restoredKeys: new Set()
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
export const getTracker = (): InstanceTracker => {
|
|
130
|
+
const scope = globalThis as PreserveScope;
|
|
131
|
+
|
|
132
|
+
return (scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set());
|
|
133
|
+
};
|
|
134
|
+
export const isHmrPreserveDev = (): boolean => {
|
|
135
|
+
// SSR safety: globalThis on the server is process-wide and shared
|
|
136
|
+
// across requests, so writing to the preservation cache during SSR
|
|
137
|
+
// would leak request state between users. Gate strictly on the
|
|
138
|
+
// presence of a browser `window` *and* a dev signal — neither is
|
|
139
|
+
// true in a production build, so this is a hard no-op there too.
|
|
140
|
+
if (typeof window === 'undefined') return false;
|
|
141
|
+
const scope = globalThis as { __DEV__?: unknown; ngDevMode?: unknown };
|
|
142
|
+
|
|
143
|
+
return Boolean(scope.__DEV__) || Boolean(scope.ngDevMode);
|
|
144
|
+
};
|
|
145
|
+
export const isPreservable = (value: unknown, depth = 0): boolean => {
|
|
146
|
+
if (depth > 8) return false;
|
|
147
|
+
if (value === null || value === undefined) return true;
|
|
148
|
+
const t = typeof value;
|
|
149
|
+
if (t === 'string' || t === 'number' || t === 'boolean' || t === 'bigint')
|
|
150
|
+
return true;
|
|
151
|
+
if (t === 'function' || t === 'symbol') return false;
|
|
152
|
+
if (Array.isArray(value)) {
|
|
153
|
+
return value.every((item) => isPreservable(item, depth + 1));
|
|
154
|
+
}
|
|
155
|
+
if (t === 'object') {
|
|
156
|
+
const proto = Object.getPrototypeOf(value);
|
|
157
|
+
// Only POJOs — class instances (HttpClient, BehaviorSubject, Date,
|
|
158
|
+
// Map, etc.) carry runtime identity that the new instance must
|
|
159
|
+
// get from its own injector / construction.
|
|
160
|
+
if (proto !== Object.prototype && proto !== null) return false;
|
|
161
|
+
|
|
162
|
+
return Object.values(value as object).every((v) =>
|
|
163
|
+
isPreservable(v, depth + 1)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return false;
|
|
168
|
+
};
|
|
169
|
+
export const restoreFromCacheCore = (
|
|
170
|
+
instance: object,
|
|
171
|
+
key: string
|
|
172
|
+
): boolean => {
|
|
173
|
+
const cache = getCache();
|
|
174
|
+
const stored = cache.get(key);
|
|
175
|
+
if (!stored) return false;
|
|
176
|
+
|
|
177
|
+
for (const [prop, value] of Object.entries(stored)) {
|
|
178
|
+
try {
|
|
179
|
+
(instance as Record<string, unknown>)[prop] = value;
|
|
180
|
+
} catch {
|
|
181
|
+
/* property is non-writable / has a setter that threw — skip */
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
getRebootStats().restoredKeys.add(key);
|
|
186
|
+
|
|
187
|
+
return true;
|
|
188
|
+
};
|
package/dist/angular/index.js
CHANGED
|
@@ -297,7 +297,7 @@ var resolveAngularPackageDir = (specifier) => {
|
|
|
297
297
|
var init_resolveAngularPackage = () => {};
|
|
298
298
|
|
|
299
299
|
// src/utils/runtimeMode.ts
|
|
300
|
-
var ENV_VAR = "NODE_ENV",
|
|
300
|
+
var ENV_VAR = "NODE_ENV", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
301
301
|
|
|
302
302
|
// src/angular/angularPatch.ts
|
|
303
303
|
var exports_angularPatch = {};
|
|
@@ -592,7 +592,7 @@ __export(exports_islands, {
|
|
|
592
592
|
isAngularComponent: () => isAngularComponent,
|
|
593
593
|
getAngularIslandSelector: () => getAngularIslandSelector
|
|
594
594
|
});
|
|
595
|
-
var angularIslandSelector = "abs-angular-island", isAngularComponent = (value) => typeof value === "function",
|
|
595
|
+
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
|
|
596
596
|
const firstChild = rootElement.firstElementChild;
|
|
597
597
|
if (!(firstChild instanceof HTMLElement)) {
|
|
598
598
|
return null;
|
|
@@ -2089,8 +2089,8 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
2089
2089
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
2090
2090
|
fs: {
|
|
2091
2091
|
fileExists: existsSync4,
|
|
2092
|
-
|
|
2093
|
-
|
|
2092
|
+
realpath: realpathSync,
|
|
2093
|
+
readFile: (file) => existsSync4(file) ? readFileSync4(file, "utf-8") : undefined
|
|
2094
2094
|
},
|
|
2095
2095
|
id: componentId,
|
|
2096
2096
|
inlineTemplate: false
|
|
@@ -2370,6 +2370,12 @@ import { Elysia } from "elysia";
|
|
|
2370
2370
|
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
|
|
2371
2371
|
const source = handler.toString();
|
|
2372
2372
|
return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
|
|
2373
|
+
}, getOriginalPageHandlerSource = (handler) => {
|
|
2374
|
+
if (typeof handler !== "function")
|
|
2375
|
+
return;
|
|
2376
|
+
const fn = handler;
|
|
2377
|
+
const info = pageHandlerWrappers.get(fn);
|
|
2378
|
+
return (info?.originalHandler ?? fn).toString();
|
|
2373
2379
|
}, isPageHandler = (handler) => {
|
|
2374
2380
|
if (typeof handler !== "function")
|
|
2375
2381
|
return false;
|
|
@@ -2377,12 +2383,6 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
2377
2383
|
if (pageHandlerWrappers.has(fn))
|
|
2378
2384
|
return true;
|
|
2379
2385
|
return handlerSourceMentionsPageHelper(fn);
|
|
2380
|
-
}, getOriginalPageHandlerSource = (handler) => {
|
|
2381
|
-
if (typeof handler !== "function")
|
|
2382
|
-
return;
|
|
2383
|
-
const fn = handler;
|
|
2384
|
-
const info = pageHandlerWrappers.get(fn);
|
|
2385
|
-
return (info?.originalHandler ?? fn).toString();
|
|
2386
2386
|
}, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", isRouteMethod = (value) => typeof value === "function", getRouteCallsiteStorage = () => {
|
|
2387
2387
|
const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
|
|
2388
2388
|
if (value === null || typeof value === "undefined") {
|
|
@@ -3832,7 +3832,7 @@ __export(exports_generatedDir, {
|
|
|
3832
3832
|
getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
|
|
3833
3833
|
});
|
|
3834
3834
|
import { join as join8 } from "path";
|
|
3835
|
-
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs",
|
|
3835
|
+
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join8(getGeneratedRoot(projectRoot), framework), getGeneratedRoot = (projectRoot = process.cwd()) => join8(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME);
|
|
3836
3836
|
var init_generatedDir = () => {};
|
|
3837
3837
|
|
|
3838
3838
|
// src/build/compileAngular.ts
|
|
@@ -14425,6 +14425,12 @@ var setCurrentIslandManifest = (manifest) => {
|
|
|
14425
14425
|
|
|
14426
14426
|
// src/utils/inlinePageCss.ts
|
|
14427
14427
|
var siblingCssCache = new Map;
|
|
14428
|
+
var injectInlineCss = (headTag, css) => {
|
|
14429
|
+
if (!css)
|
|
14430
|
+
return headTag;
|
|
14431
|
+
const styleBlock = `<style data-absolute-page-css>${css}</style>`;
|
|
14432
|
+
return headTag.replace("</head>", `${styleBlock}</head>`);
|
|
14433
|
+
};
|
|
14428
14434
|
var readSiblingCss = async (siblingJsPath) => {
|
|
14429
14435
|
if (!siblingJsPath)
|
|
14430
14436
|
return "";
|
|
@@ -14444,12 +14450,6 @@ var readSiblingCss = async (siblingJsPath) => {
|
|
|
14444
14450
|
return "";
|
|
14445
14451
|
}
|
|
14446
14452
|
};
|
|
14447
|
-
var injectInlineCss = (headTag, css) => {
|
|
14448
|
-
if (!css)
|
|
14449
|
-
return headTag;
|
|
14450
|
-
const styleBlock = `<style data-absolute-page-css>${css}</style>`;
|
|
14451
|
-
return headTag.replace("</head>", `${styleBlock}</head>`);
|
|
14452
|
-
};
|
|
14453
14453
|
// src/utils/resolveConvention.ts
|
|
14454
14454
|
import { basename } from "path";
|
|
14455
14455
|
var CONVENTIONS_KEY = "__absoluteConventions";
|
|
@@ -14468,6 +14468,14 @@ var derivePageName = (pagePath) => {
|
|
|
14468
14468
|
return toPascal(name);
|
|
14469
14469
|
};
|
|
14470
14470
|
var normalizeConventionPageName = (name) => toPascal(name).replace(/\d+$/, "");
|
|
14471
|
+
var hasErrorConvention = (framework) => {
|
|
14472
|
+
const conventions = getMap()[framework];
|
|
14473
|
+
if (!conventions)
|
|
14474
|
+
return false;
|
|
14475
|
+
if (conventions.defaults?.error)
|
|
14476
|
+
return true;
|
|
14477
|
+
return Object.values(conventions.pages ?? {}).some((page) => Boolean(page.error));
|
|
14478
|
+
};
|
|
14471
14479
|
var resolveErrorConventionPath = (framework, pageName) => {
|
|
14472
14480
|
const conventions = getMap()[framework];
|
|
14473
14481
|
if (!conventions)
|
|
@@ -14484,14 +14492,6 @@ var resolveErrorConventionPath = (framework, pageName) => {
|
|
|
14484
14492
|
return conventions.defaults?.error;
|
|
14485
14493
|
};
|
|
14486
14494
|
var resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound;
|
|
14487
|
-
var hasErrorConvention = (framework) => {
|
|
14488
|
-
const conventions = getMap()[framework];
|
|
14489
|
-
if (!conventions)
|
|
14490
|
-
return false;
|
|
14491
|
-
if (conventions.defaults?.error)
|
|
14492
|
-
return true;
|
|
14493
|
-
return Object.values(conventions.pages ?? {}).some((page) => Boolean(page.error));
|
|
14494
|
-
};
|
|
14495
14495
|
var setConventions = (map) => {
|
|
14496
14496
|
Reflect.set(globalThis, CONVENTIONS_KEY, map);
|
|
14497
14497
|
};
|
|
@@ -14504,7 +14504,7 @@ var buildErrorProps = (error) => {
|
|
|
14504
14504
|
...isDev() && error.stack ? { stack: error.stack } : {}
|
|
14505
14505
|
};
|
|
14506
14506
|
}
|
|
14507
|
-
return {
|
|
14507
|
+
return { message: String(error), name: "Error" };
|
|
14508
14508
|
};
|
|
14509
14509
|
var renderReactError = async (conventionPath, errorProps) => {
|
|
14510
14510
|
const { createElement } = await import("react");
|
|
@@ -15145,16 +15145,16 @@ var resolveRuntimeAngularModulePath = async (pagePath) => {
|
|
|
15145
15145
|
const { stat } = await import("fs/promises");
|
|
15146
15146
|
const stats = await stat(pagePath);
|
|
15147
15147
|
return {
|
|
15148
|
-
|
|
15149
|
-
|
|
15148
|
+
cacheBuster: stats.mtimeMs.toString(BASE_36_RADIX),
|
|
15149
|
+
path: pagePath
|
|
15150
15150
|
};
|
|
15151
15151
|
} catch {
|
|
15152
|
-
return {
|
|
15152
|
+
return { cacheBuster: undefined, path: pagePath };
|
|
15153
15153
|
}
|
|
15154
15154
|
}
|
|
15155
15155
|
return {
|
|
15156
|
-
|
|
15157
|
-
|
|
15156
|
+
cacheBuster: undefined,
|
|
15157
|
+
path: pagePath
|
|
15158
15158
|
};
|
|
15159
15159
|
}
|
|
15160
15160
|
const outDir = resolveAngularSsrOutDir();
|
|
@@ -15165,8 +15165,8 @@ var resolveRuntimeAngularModulePath = async (pagePath) => {
|
|
|
15165
15165
|
const expectedFileName = basename4(pagePath).replace(/\.ts$/, ".js");
|
|
15166
15166
|
const runtimePagePath = outputs.find((output) => output.endsWith(`/${expectedFileName}`)) ?? outputs.find((output) => output.endsWith(`\\${expectedFileName}`)) ?? outputs[0] ?? pagePath;
|
|
15167
15167
|
return {
|
|
15168
|
-
|
|
15169
|
-
|
|
15168
|
+
cacheBuster,
|
|
15169
|
+
path: runtimePagePath
|
|
15170
15170
|
};
|
|
15171
15171
|
};
|
|
15172
15172
|
var buildRuntimeModuleSpecifier = (modulePath, cacheBuster) => {
|
|
@@ -15382,20 +15382,17 @@ var useTimers = () => {
|
|
|
15382
15382
|
import { ChangeDetectorRef, inject as inject5 } from "@angular/core";
|
|
15383
15383
|
|
|
15384
15384
|
// src/angular/hmrPreserveCore.ts
|
|
15385
|
-
var
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15385
|
+
var buildCacheKey = (instance, key) => {
|
|
15386
|
+
const className = instance.constructor?.name;
|
|
15387
|
+
if (!className || className === "Object")
|
|
15388
|
+
return null;
|
|
15389
|
+
const suffix = key === undefined || key === null ? "" : String(key);
|
|
15390
|
+
return `${className}:${suffix}`;
|
|
15390
15391
|
};
|
|
15391
15392
|
var getCache = () => {
|
|
15392
15393
|
const scope = globalThis;
|
|
15393
15394
|
return scope.__ABS_HMR_INSTANCE_STATE__ ??= new Map;
|
|
15394
15395
|
};
|
|
15395
|
-
var getTracker = () => {
|
|
15396
|
-
const scope = globalThis;
|
|
15397
|
-
return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
|
|
15398
|
-
};
|
|
15399
15396
|
var getKeyMap = () => {
|
|
15400
15397
|
const scope = globalThis;
|
|
15401
15398
|
return scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap;
|
|
@@ -15411,12 +15408,15 @@ var getRebootStats = () => {
|
|
|
15411
15408
|
restoredKeys: new Set
|
|
15412
15409
|
};
|
|
15413
15410
|
};
|
|
15414
|
-
var
|
|
15415
|
-
const
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15411
|
+
var getTracker = () => {
|
|
15412
|
+
const scope = globalThis;
|
|
15413
|
+
return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
|
|
15414
|
+
};
|
|
15415
|
+
var isHmrPreserveDev = () => {
|
|
15416
|
+
if (typeof window === "undefined")
|
|
15417
|
+
return false;
|
|
15418
|
+
const scope = globalThis;
|
|
15419
|
+
return Boolean(scope.__DEV__) || Boolean(scope.ngDevMode);
|
|
15420
15420
|
};
|
|
15421
15421
|
var restoreFromCacheCore = (instance, key) => {
|
|
15422
15422
|
const cache = getCache();
|
|
@@ -15782,5 +15782,5 @@ export {
|
|
|
15782
15782
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
15783
15783
|
};
|
|
15784
15784
|
|
|
15785
|
-
//# debugId=
|
|
15785
|
+
//# debugId=BF9B9E11A348833064756E2164756E21
|
|
15786
15786
|
//# sourceMappingURL=index.js.map
|