@absolutejs/absolute 0.20.0-beta.179 → 0.20.0-beta.180
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 +23 -0
- package/changelog.json +45 -0
- package/dist/angular/browser.js +2 -2
- 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 +21 -6
- package/dist/angular/index.js.map +6 -6
- package/dist/angular/server.js +21 -6
- package/dist/angular/server.js.map +6 -6
- package/dist/build.js +5357 -4945
- package/dist/build.js.map +27 -24
- package/dist/cli/build-fntmf42w.js +495 -0
- package/dist/cli/{buildDepVendor-qvsh6dsj.js → buildDepVendor-qnwfct22.js} +5 -3
- package/dist/cli/buildReactServerComponents-fq6mw10d.js +13 -0
- package/dist/cli/{compile-p5yv6ecp.js → compile-54rb8szn.js} +94 -125
- package/dist/cli/config/server.js +10 -5
- package/dist/cli/{dev-2hbcsvkp.js → dev-6s6g5tnk.js} +13 -14
- package/dist/cli/{expoProject-1qtw97js.js → expoProject-acgfaj3f.js} +2 -1
- package/dist/cli/generatedDir-239r7csr.js +9 -0
- package/dist/cli/{index-cksezef8.js → index-0gd30trc.js} +105 -851
- package/dist/cli/index-2wvysvjc.js +40 -0
- package/dist/cli/index-42xjh6gg.js +282 -0
- package/dist/cli/{index-qw98g1p6.js → index-47e8fwha.js} +4 -1
- package/dist/cli/index-65kqn88a.js +8 -0
- package/dist/cli/{index-2bxfhs32.js → index-6f448d7m.js} +0 -26
- package/dist/cli/index-972xxwgj.js +16 -0
- package/dist/cli/index-aqe25w4h.js +39 -0
- package/dist/cli/index-assqancr.js +51 -0
- package/dist/cli/{index-2shf4aya.js → index-c8rcfe5a.js} +4 -6
- package/dist/cli/index-cba1cemz.js +8 -0
- package/dist/cli/{index-3ff5ztt3.js → index-djkrb7pc.js} +1 -7
- package/dist/cli/index-dkfwkpc8.js +138 -0
- package/dist/cli/{index-92g14j47.js → index-dw44xa4x.js} +2 -1
- package/dist/cli/index-evsnq0n2.js +17 -0
- package/dist/cli/index-fxwf3n2v.js +224 -0
- package/dist/cli/{index-zyd80s3h.js → index-js2hksgv.js} +21 -295
- package/dist/cli/{index-bp60baze.js → index-jyap0bhv.js} +1 -1
- package/dist/cli/{index-9dzdbbfc.js → index-kx2d067c.js} +8 -6
- package/dist/cli/index-pb31zan6.js +9 -0
- package/dist/cli/index-sq0478b0.js +281 -0
- package/dist/cli/index-va274tsf.js +7 -0
- package/dist/cli/{index-yd672jyq.js → index-w6xsk8cv.js} +4 -1
- package/dist/cli/index-w79snsxv.js +461 -0
- package/dist/cli/index-x1vvn549.js +835 -0
- package/dist/cli/index-xf9sfr8a.js +243 -0
- package/dist/cli/index-ycqdxy55.js +754 -0
- package/dist/cli/index-z74cqxz0.js +131 -0
- package/dist/cli/index.js +10 -9
- package/dist/cli/{islands-6zgb7501.js → islands-17tfx8jf.js} +6 -17
- package/dist/cli/{ls-0hfx323m.js → ls-0wr74w0b.js} +10 -58
- package/dist/cli/{mobile-93vaawcz.js → mobile-hpqpy61f.js} +11 -8
- package/dist/cli/{prerender-010z771p.js → prerender-w65xp6h8.js} +2 -1
- package/dist/cli/{rewriteImports-z6629aww.js → rewriteImports-np2d2kvc.js} +4 -11
- package/dist/cli/rewriteImportsPlugin-c6hcb3x6.js +12 -0
- package/dist/cli/{start-asxb79rc.js → start-mbn2zgs2.js} +6 -4
- package/dist/cli/staticAnalyzeSpaRoutes-2nev05m1.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-6vgzp0rs.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-f85q9dqk.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-yakmg22g.js +7 -0
- package/dist/cli/{typecheck-m2j4tkdk.js → typecheck-488txsfc.js} +92 -18
- package/dist/cli/vueCompiler-8bzdmf08.js +7 -0
- package/dist/client/chunks/{react-khr6ewhr.js → react-g8r290b8.js} +37 -2
- package/dist/client/chunks/react-g8r290b8.js.map +10 -0
- package/dist/client/chunks/vue-zcpmka32.js +85 -0
- package/dist/client/chunks/vue-zcpmka32.js.map +10 -0
- package/dist/client/index.js +58 -10
- package/dist/client/index.js.map +4 -4
- package/dist/dev/client/handlers/vue.ts +116 -0
- package/dist/index.js +2472 -2058
- package/dist/index.js.map +26 -23
- package/dist/islands/browser.js +2 -2
- package/dist/islands/browser.js.map +3 -3
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/react/browser.js +2 -2
- package/dist/react/browser.js.map +3 -3
- package/dist/react/index.js +42 -11
- package/dist/react/index.js.map +10 -10
- package/dist/react/server.js +42 -11
- package/dist/react/server.js.map +10 -10
- package/dist/src/angular/ssrRender.d.ts +2 -2
- package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/build/generateManifest.d.ts +15 -0
- package/dist/src/build/manifestKeys.d.ts +22 -0
- package/dist/src/cli/add/dependencies.d.ts +1 -1
- package/dist/src/cli/scripts/typecheck.d.ts +11 -0
- package/dist/src/client/hydrators/react.d.ts +10 -0
- package/dist/src/client/hydrators/vue.d.ts +13 -0
- package/dist/src/client/islandRuntime.d.ts +1 -1
- package/dist/src/core/islandManifest.d.ts +4 -0
- package/dist/src/core/islandPageContext.d.ts +8 -2
- package/dist/src/core/lookup.d.ts +16 -1
- package/dist/src/dev/importCost/instrument.d.ts +1 -1
- package/dist/src/dev/manifestKeysRefresher.d.ts +6 -0
- package/dist/src/dev/spaRouteRefresh.d.ts +13 -0
- package/dist/src/mobile/androidConformance.d.ts +1 -1
- package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +5 -0
- package/dist/src/utils/spaRouteManifest.d.ts +1 -0
- package/dist/src/vue/components/Image.d.ts +4 -4
- package/dist/src/vue/components/StreamSlot.d.ts +1 -1
- package/dist/src/vue/components/SuspenseSlot.d.ts +2 -2
- package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +4 -0
- package/dist/svelte/browser.js +2 -2
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/index.js +25 -9
- package/dist/svelte/index.js.map +8 -8
- package/dist/svelte/server.js +25 -9
- package/dist/svelte/server.js.map +8 -8
- package/dist/types/globals.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/island.d.ts +1 -1
- package/dist/types/manifest.d.ts +25 -0
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +3 -3
- package/dist/vue/index.js +21 -6
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +21 -6
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
- package/dist/client/chunks/react-khr6ewhr.js.map +0 -10
- package/dist/client/chunks/vue-db6ppn1f.js +0 -32
- package/dist/client/chunks/vue-db6ppn1f.js.map +0 -10
package/dist/react/server.js
CHANGED
|
@@ -392,6 +392,8 @@ var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" :
|
|
|
392
392
|
const pathColor = options.framework ? getFrameworkColor(options.framework) : colors2.white;
|
|
393
393
|
message += ` ${pathColor}${formatPath(options.path)}${colors2.reset}`;
|
|
394
394
|
}
|
|
395
|
+
if (options?.detail)
|
|
396
|
+
message += ` ${options.detail}`;
|
|
395
397
|
if (options?.duration !== undefined) {
|
|
396
398
|
message += ` ${colors2.dim}(${options.duration}ms)${colors2.reset}`;
|
|
397
399
|
}
|
|
@@ -423,6 +425,16 @@ var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" :
|
|
|
423
425
|
log(message);
|
|
424
426
|
}, logPageBuild = (path, framework, duration) => {
|
|
425
427
|
log("page build", { duration, framework, path });
|
|
428
|
+
}, logRoutesUpdate = (path, framework, added, removed) => {
|
|
429
|
+
const changes = [
|
|
430
|
+
...added.map((route) => `${colors2.green}+${route}${colors2.reset}`),
|
|
431
|
+
...removed.map((route) => `${colors2.red}-${route}${colors2.reset}`)
|
|
432
|
+
];
|
|
433
|
+
log("routes update", {
|
|
434
|
+
detail: changes.length > 0 ? changes.join(" ") : undefined,
|
|
435
|
+
framework,
|
|
436
|
+
path
|
|
437
|
+
});
|
|
426
438
|
}, logScriptUpdate = (path, framework, duration) => {
|
|
427
439
|
log("script update", { duration, framework, path });
|
|
428
440
|
}, logServerReload = () => {
|
|
@@ -459,7 +471,7 @@ var init_logger = __esm(() => {
|
|
|
459
471
|
});
|
|
460
472
|
|
|
461
473
|
// src/core/islandManifest.ts
|
|
462
|
-
var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOOTSTRAP_MANIFEST_KEY = "BootstrapClient", toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1), collectFrameworkIslands = (manifest, prefix) => {
|
|
474
|
+
var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOOTSTRAP_MANIFEST_KEY = "BootstrapClient", REACT_PAGE_ROOT_EVENT = "absolute:react-page-root", toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1), collectFrameworkIslands = (manifest, prefix) => {
|
|
463
475
|
const entries = {};
|
|
464
476
|
let found = false;
|
|
465
477
|
for (const [key, value] of Object.entries(manifest)) {
|
|
@@ -533,13 +545,15 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
533
545
|
return "";
|
|
534
546
|
const renderedKeys = collectRenderedIslandStyleKeys(html);
|
|
535
547
|
return getIslandStyleManifestEntries(manifest).filter(([key]) => renderedKeys.has(key)).filter(([, href]) => !html.includes(`href="${href}"`)).map(([key, href]) => `<link rel="stylesheet" href="${href}" data-island-style="${key}"${nonceAttr()}>`).join("");
|
|
536
|
-
}, buildIslandsHeadMarkup = (manifest, html) => {
|
|
548
|
+
}, REACT_HOOK_STAND_IN, buildIslandsHeadMarkup = (manifest, html, host) => {
|
|
537
549
|
const styleLinks = buildIslandStyleLinks(manifest, html);
|
|
538
550
|
const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
|
|
539
|
-
const
|
|
551
|
+
const hostAssignment = host ? `;window.__ABS_ISLAND_HOST__ = ${JSON.stringify(host)}` : "";
|
|
552
|
+
const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}${hostAssignment}</script>`;
|
|
553
|
+
const reactHookScript = isProductionRuntime() ? "" : `<script${nonceAttr()}>${REACT_HOOK_STAND_IN}</script>`;
|
|
540
554
|
const bootstrapPath = getIslandBootstrapPath(manifest);
|
|
541
555
|
const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
|
|
542
|
-
return `${styleLinks}${manifestScript}${islandStateScript}${bootstrapScript}`;
|
|
556
|
+
return `${styleLinks}${manifestScript}${islandStateScript}${reactHookScript}${bootstrapScript}`;
|
|
543
557
|
}, injectHeadMarkup = (html, markup) => {
|
|
544
558
|
const closingHeadIndex = html.indexOf("</head>");
|
|
545
559
|
if (closingHeadIndex >= 0) {
|
|
@@ -726,7 +740,7 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
726
740
|
const manifest = globalThis.__absoluteManifest;
|
|
727
741
|
if (!manifest)
|
|
728
742
|
return stream;
|
|
729
|
-
const markup = buildIslandsHeadMarkup(manifest);
|
|
743
|
+
const markup = buildIslandsHeadMarkup(manifest, undefined, options?.host);
|
|
730
744
|
if (options?.hasIslands === true) {
|
|
731
745
|
warnIfBootstrapMissing(manifest);
|
|
732
746
|
return pipeStreamWithHeadInjection(stream, markup);
|
|
@@ -752,6 +766,7 @@ var init_islandPageContext = __esm(() => {
|
|
|
752
766
|
"vue",
|
|
753
767
|
"angular"
|
|
754
768
|
];
|
|
769
|
+
REACT_HOOK_STAND_IN = "if(!window.__REACT_DEVTOOLS_GLOBAL_HOOK__){var n=0;" + "window.__REACT_DEVTOOLS_GLOBAL_HOOK__={renderers:new Map(),supportsFiber:true," + "inject:function(r){n+=1;this.renderers.set(n,r);return n}," + "onScheduleFiberRoot:function(){},onCommitFiberRoot:function(){},onCommitFiberUnmount:function(){}}}";
|
|
755
770
|
});
|
|
756
771
|
|
|
757
772
|
// src/core/devRouteRegistrationCallsite.ts
|
|
@@ -2454,7 +2469,8 @@ var warnDoubledRscKey = (source, name, assetPath) => {
|
|
|
2454
2469
|
warnedDoubledRscKeys.add(name);
|
|
2455
2470
|
console.warn(`[asset] key "${name}" is deprecated: React Server Components pages whose file name ends in RSC no longer get the suffix twice. Use asset(manifest, '${current}').`);
|
|
2456
2471
|
};
|
|
2457
|
-
var asset = (source, name) =>
|
|
2472
|
+
var asset = (source, name) => assetUnchecked(source, name);
|
|
2473
|
+
var assetUnchecked = (source, name) => {
|
|
2458
2474
|
const assetPath = source[name];
|
|
2459
2475
|
if (assetPath === undefined) {
|
|
2460
2476
|
if (isProductionRuntime()) {
|
|
@@ -2834,7 +2850,9 @@ var handleReactPageRequest = async (input) => {
|
|
|
2834
2850
|
console.error("[SSR] React streaming error:", error);
|
|
2835
2851
|
}
|
|
2836
2852
|
});
|
|
2837
|
-
const htmlStream = injectIslandPageContextStream(stream
|
|
2853
|
+
const htmlStream = injectIslandPageContextStream(stream, {
|
|
2854
|
+
host: "react"
|
|
2855
|
+
});
|
|
2838
2856
|
if (resolveErrorConventionPath("react", pageName) || hasErrorConvention("react")) {
|
|
2839
2857
|
const html = await new Response(htmlStream).text();
|
|
2840
2858
|
return new Response(html, {
|
|
@@ -2870,7 +2888,7 @@ var reactFileRoute = (route) => defineFileRouteWith("react", route, async ({ man
|
|
|
2870
2888
|
throw new Error(`File route ${route.source} has no default-exported React component.`);
|
|
2871
2889
|
}
|
|
2872
2890
|
return handleReactPageRequest({
|
|
2873
|
-
index:
|
|
2891
|
+
index: assetUnchecked(manifest, `${route.name}Index`),
|
|
2874
2892
|
Page,
|
|
2875
2893
|
props,
|
|
2876
2894
|
request
|
|
@@ -3025,6 +3043,12 @@ var createNodeRenderer = (pageModule, renderer) => {
|
|
|
3025
3043
|
}));
|
|
3026
3044
|
return render;
|
|
3027
3045
|
};
|
|
3046
|
+
var dropAllStackFrames = () => false;
|
|
3047
|
+
var createDevelopmentDebugChannel = (pageModule) => {
|
|
3048
|
+
if (pageModule.developmentFlight !== true)
|
|
3049
|
+
return;
|
|
3050
|
+
return new TransformStream;
|
|
3051
|
+
};
|
|
3028
3052
|
var createRendererStorage = () => new AsyncLocalStorage5;
|
|
3029
3053
|
var handleReactServerPageRequest = async (input) => {
|
|
3030
3054
|
const request = input.request ?? getCurrentAbsoluteRequest();
|
|
@@ -3041,7 +3065,14 @@ var handleReactServerPageRequest = async (input) => {
|
|
|
3041
3065
|
]);
|
|
3042
3066
|
const renderer = await loadRenderer(runtime.ssr);
|
|
3043
3067
|
const nonce = readCspNonce();
|
|
3044
|
-
const
|
|
3068
|
+
const debugChannel = createDevelopmentDebugChannel(pageModule);
|
|
3069
|
+
const renderFlight = () => pageModule.renderToReadableStream(pageModule.createElement(pageModule.Page, input.props ?? {}), pageModule.clientManifest, debugChannel ? {
|
|
3070
|
+
debugChannel: {
|
|
3071
|
+
writable: debugChannel.writable
|
|
3072
|
+
},
|
|
3073
|
+
filterStackFrame: dropAllStackFrames,
|
|
3074
|
+
onError: logRenderError
|
|
3075
|
+
} : { onError: logRenderError });
|
|
3045
3076
|
const nodeRenderer = createNodeRenderer(pageModule, renderer);
|
|
3046
3077
|
const flight = nodeRenderer ? runWithReactServerNodeRenderer(nodeRenderer, createRendererStorage, renderFlight) : renderFlight();
|
|
3047
3078
|
const [forHtml, forPayload] = flight.tee();
|
|
@@ -3050,7 +3081,7 @@ var handleReactServerPageRequest = async (input) => {
|
|
|
3050
3081
|
bootstrapScriptContent: `${BROWSER_TRANSLATION_BASELINE_SCRIPT}window.__ABS_SLOT_HYDRATION_PENDING__=true;`,
|
|
3051
3082
|
nonce,
|
|
3052
3083
|
onError: logRenderError
|
|
3053
|
-
});
|
|
3084
|
+
}, debugChannel?.readable);
|
|
3054
3085
|
return new Response(injectFlightPayload(html, forPayload, nonce), {
|
|
3055
3086
|
headers: streamingPageHeaders()
|
|
3056
3087
|
});
|
|
@@ -3073,5 +3104,5 @@ export {
|
|
|
3073
3104
|
reactFileRoute
|
|
3074
3105
|
};
|
|
3075
3106
|
|
|
3076
|
-
//# debugId=
|
|
3107
|
+
//# debugId=2F6E800762A29F1864756E2164756E21
|
|
3077
3108
|
//# sourceMappingURL=server.js.map
|