@absolutejs/absolute 0.19.0-beta.1031 → 0.19.0-beta.1033
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 +8 -8
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/hmrPreserveCore.ts +86 -121
- package/dist/angular/index.js +57 -50
- package/dist/angular/index.js.map +17 -17
- package/dist/angular/server.js +42 -35
- package/dist/angular/server.js.map +12 -12
- package/dist/build.js +145 -138
- package/dist/build.js.map +31 -31
- package/dist/cli/config/client.js +1 -1
- package/dist/cli/config/server.js +43 -43
- package/dist/cli/index.js +71 -18
- package/dist/client/index.js +17 -10
- package/dist/client/index.js.map +10 -10
- package/dist/dev/client/errorOverlay.ts +4 -4
- package/dist/dev/client/handlers/angularHmrShim.ts +18 -18
- package/dist/dev/client/handlers/angularRemount.ts +10 -8
- package/dist/dev/client/handlers/angularRemountWiring.ts +2 -2
- package/dist/dev/client/hmrToast.ts +20 -20
- package/dist/index.js +159 -153
- package/dist/index.js.map +38 -38
- package/dist/islands/browser.js.map +1 -1
- package/dist/islands/index.js +13 -6
- package/dist/islands/index.js.map +8 -8
- 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 +29 -22
- package/dist/react/index.js.map +11 -11
- package/dist/react/server.js +17 -17
- package/dist/react/server.js.map +5 -5
- package/dist/src/angular/hmrPreserveCore.d.ts +6 -19
- package/dist/src/angular/islands.d.ts +1 -1
- package/dist/src/angular/ssrRender.d.ts +4 -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/cli/instanceStatus.d.ts +1 -0
- 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/build.d.ts +1 -1
- 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/formatBytes.d.ts +2 -0
- 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/resolveDevPort.d.ts +4 -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 +34 -27
- package/dist/svelte/index.js.map +11 -11
- 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 +17 -21
- package/dist/svelte/server.js +22 -22
- package/dist/svelte/server.js.map +5 -5
- package/dist/types/cli.d.ts +2 -0
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +4 -4
- package/dist/vue/index.js +37 -30
- package/dist/vue/index.js.map +14 -14
- package/dist/vue/server.js +24 -24
- package/dist/vue/server.js.map +7 -7
- 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-Vvlcok/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-Vvlcok/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-Vvlcok/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,128 +24,17 @@ 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
|
|
112
|
-
)
|
|
30
|
+
) => {
|
|
113
31
|
const className = instance.constructor?.name;
|
|
114
32
|
if (!className || className === 'Object') return null;
|
|
115
33
|
const suffix = key === undefined || key === null ? '' : String(key);
|
|
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
|
-
export const captureTrackedInstanceStates = (): void => {
|
|
37
|
+
export const captureTrackedInstanceStates = () => {
|
|
149
38
|
if (!isHmrPreserveDev()) return;
|
|
150
39
|
|
|
151
40
|
const cache = getCache();
|
|
@@ -198,14 +87,7 @@ 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
|
-
export const endHmrReboot = (): void => {
|
|
90
|
+
export const endHmrReboot = () => {
|
|
209
91
|
if (!isHmrPreserveDev()) return;
|
|
210
92
|
getRebootFlag().value = false;
|
|
211
93
|
|
|
@@ -221,3 +103,86 @@ export const endHmrReboot = (): void => {
|
|
|
221
103
|
);
|
|
222
104
|
}
|
|
223
105
|
};
|
|
106
|
+
export const getCache = () => {
|
|
107
|
+
const scope = globalThis as PreserveScope;
|
|
108
|
+
|
|
109
|
+
return (scope.__ABS_HMR_INSTANCE_STATE__ ??= new Map());
|
|
110
|
+
};
|
|
111
|
+
export const getKeyMap = () => {
|
|
112
|
+
const scope = globalThis as PreserveScope;
|
|
113
|
+
|
|
114
|
+
return (scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap());
|
|
115
|
+
};
|
|
116
|
+
export const getRebootFlag = () => {
|
|
117
|
+
const scope = globalThis as PreserveScope;
|
|
118
|
+
|
|
119
|
+
return (scope.__ABS_HMR_REBOOT_IN_PROGRESS__ ??= { value: false });
|
|
120
|
+
};
|
|
121
|
+
export const getRebootStats = () => {
|
|
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 = () => {
|
|
130
|
+
const scope = globalThis as PreserveScope;
|
|
131
|
+
|
|
132
|
+
return (scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set());
|
|
133
|
+
};
|
|
134
|
+
export const isHmrPreserveDev = () => {
|
|
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
|
+
) => {
|
|
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 = {};
|
|
@@ -389,7 +389,14 @@ var ensureHead = (doc) => {
|
|
|
389
389
|
}
|
|
390
390
|
try {
|
|
391
391
|
const adapter = new \u{275}DominoAdapter;
|
|
392
|
-
const
|
|
392
|
+
const resolveSeedDoc = () => {
|
|
393
|
+
if (typeof adapter.createHtmlDocument === "function")
|
|
394
|
+
return adapter.createHtmlDocument();
|
|
395
|
+
if (typeof adapter.getDefaultDocument === "function")
|
|
396
|
+
return adapter.getDefaultDocument();
|
|
397
|
+
return null;
|
|
398
|
+
};
|
|
399
|
+
const seedDoc = resolveSeedDoc();
|
|
393
400
|
if (seedDoc) {
|
|
394
401
|
patchElementLayout(seedDoc);
|
|
395
402
|
const probe = seedDoc.createElement("div");
|
|
@@ -592,7 +599,7 @@ __export(exports_islands, {
|
|
|
592
599
|
isAngularComponent: () => isAngularComponent,
|
|
593
600
|
getAngularIslandSelector: () => getAngularIslandSelector
|
|
594
601
|
});
|
|
595
|
-
var angularIslandSelector = "abs-angular-island", isAngularComponent = (value) => typeof value === "function",
|
|
602
|
+
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
|
|
596
603
|
const firstChild = rootElement.firstElementChild;
|
|
597
604
|
if (!(firstChild instanceof HTMLElement)) {
|
|
598
605
|
return null;
|
|
@@ -2089,8 +2096,8 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
2089
2096
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
2090
2097
|
fs: {
|
|
2091
2098
|
fileExists: existsSync4,
|
|
2092
|
-
|
|
2093
|
-
|
|
2099
|
+
realpath: realpathSync,
|
|
2100
|
+
readFile: (file) => existsSync4(file) ? readFileSync4(file, "utf-8") : undefined
|
|
2094
2101
|
},
|
|
2095
2102
|
id: componentId,
|
|
2096
2103
|
inlineTemplate: false
|
|
@@ -2370,6 +2377,12 @@ import { Elysia } from "elysia";
|
|
|
2370
2377
|
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
|
|
2371
2378
|
const source = handler.toString();
|
|
2372
2379
|
return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
|
|
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();
|
|
2373
2386
|
}, isPageHandler = (handler) => {
|
|
2374
2387
|
if (typeof handler !== "function")
|
|
2375
2388
|
return false;
|
|
@@ -2377,12 +2390,6 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
2377
2390
|
if (pageHandlerWrappers.has(fn))
|
|
2378
2391
|
return true;
|
|
2379
2392
|
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
2393
|
}, 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
2394
|
const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
|
|
2388
2395
|
if (value === null || typeof value === "undefined") {
|
|
@@ -3832,7 +3839,7 @@ __export(exports_generatedDir, {
|
|
|
3832
3839
|
getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
|
|
3833
3840
|
});
|
|
3834
3841
|
import { join as join8 } from "path";
|
|
3835
|
-
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs",
|
|
3842
|
+
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
3843
|
var init_generatedDir = () => {};
|
|
3837
3844
|
|
|
3838
3845
|
// src/build/compileAngular.ts
|
|
@@ -14425,6 +14432,12 @@ var setCurrentIslandManifest = (manifest) => {
|
|
|
14425
14432
|
|
|
14426
14433
|
// src/utils/inlinePageCss.ts
|
|
14427
14434
|
var siblingCssCache = new Map;
|
|
14435
|
+
var injectInlineCss = (headTag, css) => {
|
|
14436
|
+
if (!css)
|
|
14437
|
+
return headTag;
|
|
14438
|
+
const styleBlock = `<style data-absolute-page-css>${css}</style>`;
|
|
14439
|
+
return headTag.replace("</head>", `${styleBlock}</head>`);
|
|
14440
|
+
};
|
|
14428
14441
|
var readSiblingCss = async (siblingJsPath) => {
|
|
14429
14442
|
if (!siblingJsPath)
|
|
14430
14443
|
return "";
|
|
@@ -14444,12 +14457,6 @@ var readSiblingCss = async (siblingJsPath) => {
|
|
|
14444
14457
|
return "";
|
|
14445
14458
|
}
|
|
14446
14459
|
};
|
|
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
14460
|
// src/utils/resolveConvention.ts
|
|
14454
14461
|
import { basename } from "path";
|
|
14455
14462
|
var CONVENTIONS_KEY = "__absoluteConventions";
|
|
@@ -14468,6 +14475,14 @@ var derivePageName = (pagePath) => {
|
|
|
14468
14475
|
return toPascal(name);
|
|
14469
14476
|
};
|
|
14470
14477
|
var normalizeConventionPageName = (name) => toPascal(name).replace(/\d+$/, "");
|
|
14478
|
+
var hasErrorConvention = (framework) => {
|
|
14479
|
+
const conventions = getMap()[framework];
|
|
14480
|
+
if (!conventions)
|
|
14481
|
+
return false;
|
|
14482
|
+
if (conventions.defaults?.error)
|
|
14483
|
+
return true;
|
|
14484
|
+
return Object.values(conventions.pages ?? {}).some((page) => Boolean(page.error));
|
|
14485
|
+
};
|
|
14471
14486
|
var resolveErrorConventionPath = (framework, pageName) => {
|
|
14472
14487
|
const conventions = getMap()[framework];
|
|
14473
14488
|
if (!conventions)
|
|
@@ -14484,14 +14499,6 @@ var resolveErrorConventionPath = (framework, pageName) => {
|
|
|
14484
14499
|
return conventions.defaults?.error;
|
|
14485
14500
|
};
|
|
14486
14501
|
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
14502
|
var setConventions = (map) => {
|
|
14496
14503
|
Reflect.set(globalThis, CONVENTIONS_KEY, map);
|
|
14497
14504
|
};
|
|
@@ -14504,7 +14511,7 @@ var buildErrorProps = (error) => {
|
|
|
14504
14511
|
...isDev() && error.stack ? { stack: error.stack } : {}
|
|
14505
14512
|
};
|
|
14506
14513
|
}
|
|
14507
|
-
return {
|
|
14514
|
+
return { message: String(error), name: "Error" };
|
|
14508
14515
|
};
|
|
14509
14516
|
var renderReactError = async (conventionPath, errorProps) => {
|
|
14510
14517
|
const { createElement } = await import("react");
|
|
@@ -15145,16 +15152,16 @@ var resolveRuntimeAngularModulePath = async (pagePath) => {
|
|
|
15145
15152
|
const { stat } = await import("fs/promises");
|
|
15146
15153
|
const stats = await stat(pagePath);
|
|
15147
15154
|
return {
|
|
15148
|
-
|
|
15149
|
-
|
|
15155
|
+
cacheBuster: stats.mtimeMs.toString(BASE_36_RADIX),
|
|
15156
|
+
path: pagePath
|
|
15150
15157
|
};
|
|
15151
15158
|
} catch {
|
|
15152
|
-
return {
|
|
15159
|
+
return { cacheBuster: undefined, path: pagePath };
|
|
15153
15160
|
}
|
|
15154
15161
|
}
|
|
15155
15162
|
return {
|
|
15156
|
-
|
|
15157
|
-
|
|
15163
|
+
cacheBuster: undefined,
|
|
15164
|
+
path: pagePath
|
|
15158
15165
|
};
|
|
15159
15166
|
}
|
|
15160
15167
|
const outDir = resolveAngularSsrOutDir();
|
|
@@ -15165,8 +15172,8 @@ var resolveRuntimeAngularModulePath = async (pagePath) => {
|
|
|
15165
15172
|
const expectedFileName = basename4(pagePath).replace(/\.ts$/, ".js");
|
|
15166
15173
|
const runtimePagePath = outputs.find((output) => output.endsWith(`/${expectedFileName}`)) ?? outputs.find((output) => output.endsWith(`\\${expectedFileName}`)) ?? outputs[0] ?? pagePath;
|
|
15167
15174
|
return {
|
|
15168
|
-
|
|
15169
|
-
|
|
15175
|
+
cacheBuster,
|
|
15176
|
+
path: runtimePagePath
|
|
15170
15177
|
};
|
|
15171
15178
|
};
|
|
15172
15179
|
var buildRuntimeModuleSpecifier = (modulePath, cacheBuster) => {
|
|
@@ -15382,20 +15389,17 @@ var useTimers = () => {
|
|
|
15382
15389
|
import { ChangeDetectorRef, inject as inject5 } from "@angular/core";
|
|
15383
15390
|
|
|
15384
15391
|
// src/angular/hmrPreserveCore.ts
|
|
15385
|
-
var
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15392
|
+
var buildCacheKey = (instance, key) => {
|
|
15393
|
+
const className = instance.constructor?.name;
|
|
15394
|
+
if (!className || className === "Object")
|
|
15395
|
+
return null;
|
|
15396
|
+
const suffix = key === undefined || key === null ? "" : String(key);
|
|
15397
|
+
return `${className}:${suffix}`;
|
|
15390
15398
|
};
|
|
15391
15399
|
var getCache = () => {
|
|
15392
15400
|
const scope = globalThis;
|
|
15393
15401
|
return scope.__ABS_HMR_INSTANCE_STATE__ ??= new Map;
|
|
15394
15402
|
};
|
|
15395
|
-
var getTracker = () => {
|
|
15396
|
-
const scope = globalThis;
|
|
15397
|
-
return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
|
|
15398
|
-
};
|
|
15399
15403
|
var getKeyMap = () => {
|
|
15400
15404
|
const scope = globalThis;
|
|
15401
15405
|
return scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap;
|
|
@@ -15411,12 +15415,15 @@ var getRebootStats = () => {
|
|
|
15411
15415
|
restoredKeys: new Set
|
|
15412
15416
|
};
|
|
15413
15417
|
};
|
|
15414
|
-
var
|
|
15415
|
-
const
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15418
|
+
var getTracker = () => {
|
|
15419
|
+
const scope = globalThis;
|
|
15420
|
+
return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
|
|
15421
|
+
};
|
|
15422
|
+
var isHmrPreserveDev = () => {
|
|
15423
|
+
if (typeof window === "undefined")
|
|
15424
|
+
return false;
|
|
15425
|
+
const scope = globalThis;
|
|
15426
|
+
return Boolean(scope.__DEV__) || Boolean(scope.ngDevMode);
|
|
15420
15427
|
};
|
|
15421
15428
|
var restoreFromCacheCore = (instance, key) => {
|
|
15422
15429
|
const cache = getCache();
|
|
@@ -15782,5 +15789,5 @@ export {
|
|
|
15782
15789
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
15783
15790
|
};
|
|
15784
15791
|
|
|
15785
|
-
//# debugId=
|
|
15792
|
+
//# debugId=D5F930DBBF98442E64756E2164756E21
|
|
15786
15793
|
//# sourceMappingURL=index.js.map
|