@absolutejs/absolute 0.20.0-beta.127 → 0.20.0-beta.128
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/CHANGELOG.md +9 -0
- package/changelog.json +20 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +54 -7
- package/dist/angular/index.js.map +5 -5
- package/dist/angular/server.js +54 -7
- package/dist/angular/server.js.map +5 -5
- package/dist/build.js +134 -64
- package/dist/build.js.map +10 -9
- package/dist/cli/config/server.js +91 -52
- package/dist/index.js +135 -64
- package/dist/index.js.map +10 -9
- package/dist/react/index.js +105 -58
- package/dist/react/index.js.map +6 -6
- package/dist/react/server.js +105 -58
- package/dist/react/server.js.map +6 -6
- package/dist/src/core/requestContext.d.ts +5 -10
- package/dist/src/dev/restartScope.d.ts +1 -0
- package/dist/src/utils/ssrErrorPage.d.ts +3 -0
- package/dist/svelte/index.js +105 -58
- package/dist/svelte/index.js.map +6 -6
- package/dist/svelte/server.js +105 -58
- package/dist/svelte/server.js.map +6 -6
- package/dist/vue/index.js +105 -58
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +105 -58
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ This file is generated by `absolute-changelog` from the entries in
|
|
|
6
6
|
`changelog/`. Edit an entry, not this file — and add new ones under
|
|
7
7
|
`changelog/unreleased/`.
|
|
8
8
|
|
|
9
|
+
## 0.20.0-beta.128 — 2026-10-03
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **A page that fails to build in development shows the real build error and reloads itself once fixed** (`DeferredPageAssets`, `DevPageWarmer`)
|
|
14
|
+
When a page failed its on-demand build in development, the handler threw `Asset "<Page>" not found in manifest.` and left the response to whichever error handler answered first. An app with its own `onError` (most real apps) showed its generic error page, so the actual cause — a missing import, a syntax error — was only in the terminal. Page handlers for Vue, React, Svelte, Angular and Ember now return a Build Error page themselves, with the build's own error message, and the page reloads by itself once a rebuild lands or the dev server comes back. AbsoluteJS's fallback error page for missing assets shows the same build error.
|
|
15
|
+
- **Editing docs, tests or code the server never loaded no longer restarts the dev server**
|
|
16
|
+
Any changed file no HMR pipeline handled restarted the dev server, including documentation and test files the server never runs. Each restart dropped every open page for seconds and rebuilt them from nothing. Now documents (`.md`, `.txt`, …) and test files never restart it; code modules restart it only when the running server process has loaded them (a module nothing has imported yet loads fresh on first use); config such as `.env`, `package.json` and `tsconfig.json` still does.
|
|
17
|
+
|
|
9
18
|
## 0.20.0-beta.127 — 2026-10-03
|
|
10
19
|
|
|
11
20
|
### Fixed
|
package/changelog.json
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "@absolutejs/absolute",
|
|
4
4
|
"releases": [
|
|
5
|
+
{
|
|
6
|
+
"changes": [
|
|
7
|
+
{
|
|
8
|
+
"detail": "When a page failed its on-demand build in development, the handler threw `Asset \"<Page>\" not found in manifest.` and left the response to whichever error handler answered first. An app with its own `onError` (most real apps) showed its generic error page, so the actual cause — a missing import, a syntax error — was only in the terminal. Page handlers for Vue, React, Svelte, Angular and Ember now return a Build Error page themselves, with the build's own error message, and the page reloads by itself once a rebuild lands or the dev server comes back. AbsoluteJS's fallback error page for missing assets shows the same build error.",
|
|
9
|
+
"kind": "fixed",
|
|
10
|
+
"symbols": [
|
|
11
|
+
"DeferredPageAssets",
|
|
12
|
+
"DevPageWarmer"
|
|
13
|
+
],
|
|
14
|
+
"summary": "A page that fails to build in development shows the real build error and reloads itself once fixed"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"detail": "Any changed file no HMR pipeline handled restarted the dev server, including documentation and test files the server never runs. Each restart dropped every open page for seconds and rebuilt them from nothing. Now documents (`.md`, `.txt`, …) and test files never restart it; code modules restart it only when the running server process has loaded them (a module nothing has imported yet loads fresh on first use); config such as `.env`, `package.json` and `tsconfig.json` still does.",
|
|
18
|
+
"kind": "fixed",
|
|
19
|
+
"summary": "Editing docs, tests or code the server never loaded no longer restarts the dev server"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"date": "2026-10-03",
|
|
23
|
+
"version": "0.20.0-beta.128"
|
|
24
|
+
},
|
|
5
25
|
{
|
|
6
26
|
"changes": [
|
|
7
27
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-hgUVbA/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-hgUVbA/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-hgUVbA/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";
|
package/dist/angular/index.js
CHANGED
|
@@ -371,9 +371,16 @@ var init_inlinePageCss = __esm(() => {
|
|
|
371
371
|
// src/utils/ssrErrorPage.ts
|
|
372
372
|
var exports_ssrErrorPage = {};
|
|
373
373
|
__export(exports_ssrErrorPage, {
|
|
374
|
+
buildErrorPage: () => buildErrorPage,
|
|
374
375
|
ssrErrorPage: () => ssrErrorPage
|
|
375
376
|
});
|
|
376
|
-
var
|
|
377
|
+
var errorPageHtml = ({
|
|
378
|
+
framework,
|
|
379
|
+
hint,
|
|
380
|
+
kind,
|
|
381
|
+
message,
|
|
382
|
+
script = ""
|
|
383
|
+
}) => {
|
|
377
384
|
const frameworkColors = {
|
|
378
385
|
angular: "#dd0031",
|
|
379
386
|
html: "#e34c26",
|
|
@@ -384,7 +391,6 @@ var ssrErrorPage = (framework, error) => {
|
|
|
384
391
|
};
|
|
385
392
|
const accent = frameworkColors[framework] ?? "#94a3b8";
|
|
386
393
|
const label = framework.charAt(0).toUpperCase() + framework.slice(1);
|
|
387
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
388
394
|
return `<!DOCTYPE html>
|
|
389
395
|
<html>
|
|
390
396
|
<head>
|
|
@@ -412,17 +418,31 @@ body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,r
|
|
|
412
418
|
<span class="brand">AbsoluteJS</span>
|
|
413
419
|
<span class="badge">${label}</span>
|
|
414
420
|
</div>
|
|
415
|
-
<span class="kind"
|
|
421
|
+
<span class="kind">${kind}</span>
|
|
416
422
|
</div>
|
|
417
423
|
<div class="content">
|
|
418
424
|
<div class="label">What went wrong</div>
|
|
419
425
|
<pre class="message">${message.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")}</pre>
|
|
420
|
-
<div class="hint"
|
|
426
|
+
<div class="hint">${hint}</div>
|
|
421
427
|
</div>
|
|
422
428
|
</div>
|
|
429
|
+
${script}
|
|
423
430
|
</body>
|
|
424
431
|
</html>`;
|
|
425
|
-
};
|
|
432
|
+
}, RELOAD_ON_REBUILD = `<script>(()=>{const url=(location.protocol==='https:'?'wss://':'ws://')+location.host+'/hmr';let seen=false;const connect=()=>{const socket=new WebSocket(url);socket.onopen=()=>{if(seen)location.reload();seen=true;};socket.onmessage=(event)=>{try{const message=JSON.parse(event.data);const type=message&&typeof message.type==='string'?message.type:'';if(type==='rebuild-complete'||type==='server-entry-reloaded'||type.endsWith('-update'))location.reload();}catch{}};socket.onclose=()=>setTimeout(connect,500);};connect();})();</script>`, buildErrorPage = (framework, pageName, error) => errorPageHtml({
|
|
433
|
+
framework,
|
|
434
|
+
hint: "Fix the file and save. This page reloads by itself when the build succeeds.",
|
|
435
|
+
kind: "Build Error",
|
|
436
|
+
message: `${pageName || "This page"} could not be built.
|
|
437
|
+
|
|
438
|
+
${error ?? "The dev-server terminal has the build output."}`,
|
|
439
|
+
script: RELOAD_ON_REBUILD
|
|
440
|
+
}), ssrErrorPage = (framework, error) => errorPageHtml({
|
|
441
|
+
framework,
|
|
442
|
+
hint: "A component threw during server-side rendering. Check the terminal for the full stack trace.",
|
|
443
|
+
kind: "Server Render Error",
|
|
444
|
+
message: error instanceof Error ? error.message : String(error)
|
|
445
|
+
});
|
|
426
446
|
|
|
427
447
|
// src/utils/stringModifiers.ts
|
|
428
448
|
var normalizeSlug = (str) => str.trim().replace(/\s+/g, "-").replace(/[^A-Za-z0-9\-_]+/g, "").replace(/[-_]{2,}/g, "-"), toKebab = (str) => normalizeSlug(str).replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), toPascal = (str) => {
|
|
@@ -3327,6 +3347,19 @@ var init_devRouteRegistrationCallsite = __esm(() => {
|
|
|
3327
3347
|
});
|
|
3328
3348
|
|
|
3329
3349
|
// src/core/requestContext.ts
|
|
3350
|
+
var exports_requestContext = {};
|
|
3351
|
+
__export(exports_requestContext, {
|
|
3352
|
+
absoluteRequestContext: () => absoluteRequestContext,
|
|
3353
|
+
devBuildErrorResponse: () => devBuildErrorResponse,
|
|
3354
|
+
getCurrentAbsoluteRequest: () => getCurrentAbsoluteRequest,
|
|
3355
|
+
getDevPageWarmer: () => getDevPageWarmer,
|
|
3356
|
+
getMissingAssets: () => getMissingAssets,
|
|
3357
|
+
recordMissingAsset: () => recordMissingAsset,
|
|
3358
|
+
resolveDeferredPageAssets: () => resolveDeferredPageAssets,
|
|
3359
|
+
runWithAbsoluteRequest: () => runWithAbsoluteRequest,
|
|
3360
|
+
setDevPageWarmer: () => setDevPageWarmer,
|
|
3361
|
+
withDeferredStylesheets: () => withDeferredStylesheets
|
|
3362
|
+
});
|
|
3330
3363
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
|
|
3331
3364
|
import { Elysia as Elysia2 } from "elysia";
|
|
3332
3365
|
var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) => typeof value === "object" && value !== null && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", getRequestStorage = () => {
|
|
@@ -3339,7 +3372,17 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
|
|
|
3339
3372
|
const storage = new AsyncLocalStorage2;
|
|
3340
3373
|
Reflect.set(globalThis, REQUEST_STORAGE_KEY, storage);
|
|
3341
3374
|
return storage;
|
|
3342
|
-
}, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function",
|
|
3375
|
+
}, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function", devBuildErrorResponse = (framework, assets) => {
|
|
3376
|
+
if (!assets?.failed)
|
|
3377
|
+
return null;
|
|
3378
|
+
return new Response(buildErrorPage(framework, assets.name, assets.error), {
|
|
3379
|
+
headers: {
|
|
3380
|
+
"cache-control": "no-store",
|
|
3381
|
+
"content-type": "text/html; charset=utf-8"
|
|
3382
|
+
},
|
|
3383
|
+
status: 500
|
|
3384
|
+
});
|
|
3385
|
+
}, getDevPageWarmer = () => {
|
|
3343
3386
|
const value = Reflect.get(globalThis, PAGE_WARMER_KEY);
|
|
3344
3387
|
return isDevPageWarmer(value) ? value : undefined;
|
|
3345
3388
|
}, getMissingAssets = () => {
|
|
@@ -3369,6 +3412,7 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
|
|
|
3369
3412
|
const cssHrefs = () => cssKeys.map(lookup).filter((href) => href.length > 0 && href.startsWith("/"));
|
|
3370
3413
|
const assets = {
|
|
3371
3414
|
cssHrefs,
|
|
3415
|
+
error: failed ? warmer.lastError?.() : undefined,
|
|
3372
3416
|
failed,
|
|
3373
3417
|
lookup,
|
|
3374
3418
|
name: described.name
|
|
@@ -16139,6 +16183,9 @@ var handleAngularPageRequest = async (input) => {
|
|
|
16139
16183
|
const requestId = `angular_${Date.now()}_${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
|
|
16140
16184
|
const request = input.request ?? getCurrentAbsoluteRequest();
|
|
16141
16185
|
const deferredAssets = input.pagePath === "" || input.indexPath === "" ? await resolveDeferredPageAssets() : null;
|
|
16186
|
+
const buildFailure = devBuildErrorResponse("angular", deferredAssets);
|
|
16187
|
+
if (buildFailure)
|
|
16188
|
+
return buildFailure;
|
|
16142
16189
|
const deferredPagePath = deferredAssets && input.pagePath === "" ? deferredAssets.lookup(deferredAssets.name) : input.pagePath;
|
|
16143
16190
|
const deferredIndexPath = deferredAssets && input.indexPath === "" ? deferredAssets.lookup(`${deferredAssets.name}Index`) : input.indexPath;
|
|
16144
16191
|
const pageName = deferredAssets?.name ?? derivePageName(deferredPagePath);
|
|
@@ -16770,5 +16817,5 @@ export {
|
|
|
16770
16817
|
withPendingTask
|
|
16771
16818
|
};
|
|
16772
16819
|
|
|
16773
|
-
//# debugId=
|
|
16820
|
+
//# debugId=4B4A4D8B4E52128064756E2164756E21
|
|
16774
16821
|
//# sourceMappingURL=index.js.map
|