@absolutejs/absolute 0.20.0-beta.171 → 0.20.0-beta.173
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 +44 -0
- package/README.md +3 -2
- package/changelog.json +73 -0
- package/dist/angular/browser.js +12 -12
- package/dist/angular/browser.js.map +6 -7
- package/dist/angular/components/core/streamingSlotRegistrar.js +2 -6
- package/dist/angular/components/core/streamingSlotRegistry.js +3 -7
- package/dist/angular/components/defer-slot.component.js +12 -7
- package/dist/angular/components/stream-slot.component.js +3 -1
- package/dist/angular/index.js +40 -13
- package/dist/angular/index.js.map +7 -7
- package/dist/angular/server.js +39 -12
- package/dist/angular/server.js.map +6 -6
- package/dist/build/buildWorker.js +135 -57
- package/dist/build.js +1183 -1011
- package/dist/build.js.map +16 -15
- package/dist/cli/config/server.js +43 -12
- package/dist/cli/{doctor-repprx92.js → doctor-m36tmx4d.js} +70 -15
- package/dist/cli/index.js +2 -2
- package/dist/cli/{typecheck-209bemxm.js → typecheck-fag7djt5.js} +21 -6
- package/dist/core/streamingSlotRegistrar.js +2 -5
- package/dist/core/streamingSlotRegistrar.js.map +4 -5
- package/dist/core/streamingSlotRegistry.js +2 -5
- package/dist/core/streamingSlotRegistry.js.map +4 -5
- package/dist/dev/serverBootstrap.js +2 -1
- package/dist/index.js +1116 -940
- package/dist/index.js.map +18 -17
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/mobile/browser.js +2 -2
- package/dist/mobile/browser.js.map +3 -3
- package/dist/mobile/index.js +2 -2
- package/dist/mobile/index.js.map +3 -3
- package/dist/react/components/index.js +2 -5
- package/dist/react/components/index.js.map +5 -6
- package/dist/react/index.js +45 -16
- package/dist/react/index.js.map +8 -8
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +45 -16
- package/dist/react/server.js.map +8 -8
- package/dist/src/angular/components/defer-slot.component.d.ts +1 -0
- package/dist/src/build/missingReactRouter.d.ts +8 -0
- package/dist/src/build/vueModuleOutputPath.d.ts +10 -6
- package/dist/src/cli/scripts/bunCheck.d.ts +3 -1
- package/dist/src/cli/scripts/doctor.d.ts +10 -0
- package/dist/src/core/streamingSlotWarningScope.d.ts +3 -0
- package/dist/src/dev/hot/reload.d.ts +5 -0
- package/dist/src/dev/hot/runtime.d.ts +2 -0
- package/dist/src/dev/srcPath.d.ts +2 -1
- package/dist/src/react/pageHandler.d.ts +5 -0
- package/dist/src/react/router/Link.d.ts +6 -1
- package/dist/src/react/serverComponents/pageHandler.d.ts +2 -0
- package/dist/src/utils/portInUse.d.ts +16 -0
- package/dist/svelte/index.js +39 -12
- package/dist/svelte/index.js.map +6 -6
- package/dist/svelte/server.js +39 -12
- package/dist/svelte/server.js.map +6 -6
- package/dist/vue/components/index.js +2 -5
- package/dist/vue/components/index.js.map +4 -5
- package/dist/vue/index.js +39 -12
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +39 -12
- package/dist/vue/server.js.map +6 -6
- package/package.json +2 -1
package/dist/svelte/server.js
CHANGED
|
@@ -73,7 +73,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
73
73
|
var __require = import.meta.require;
|
|
74
74
|
|
|
75
75
|
// src/utils/runtimeMode.ts
|
|
76
|
-
var ENV_VAR = "NODE_ENV",
|
|
76
|
+
var ENV_VAR = "NODE_ENV", readEnv = () => typeof process === "undefined" ? undefined : process.env?.[ENV_VAR], getNodeEnv = () => readEnv(), isDevelopmentRuntime = () => readEnv() === "development", isProductionRuntime = () => readEnv() === "production";
|
|
77
77
|
|
|
78
78
|
// src/utils/cspNonceRef.ts
|
|
79
79
|
var GETTER_KEY, nonceAttr = (nonce = readCspNonce()) => nonce ? ` nonce="${nonce}"` : "", nonceSvelteHeadStyles = (head, nonce = readCspNonce()) => nonce ? head.replace(/<style(?=\s+id="svelte-[^"]*")(?![^>]*\snonce=)/g, `<style nonce="${nonce}"`) : head, readCspNonce = () => {
|
|
@@ -1559,13 +1559,25 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
1559
1559
|
return;
|
|
1560
1560
|
warnedMissingBootstrap = true;
|
|
1561
1561
|
logWarn("A page contains islands, but the build manifest has no islands bootstrap, so they will render without hydrating. Set `islands.registry` in absolute.config.ts (a default bootstrap is generated from it) or point `islands.bootstrap` at a file that calls startIslands().");
|
|
1562
|
-
},
|
|
1562
|
+
}, MANIFEST_BUILD_DIR_KEY, getManifestBuildDir = () => {
|
|
1563
|
+
const value = Reflect.get(globalThis, MANIFEST_BUILD_DIR_KEY);
|
|
1564
|
+
return typeof value === "string" ? value : undefined;
|
|
1565
|
+
}, WINDOWS_ABSOLUTE_PATH, withTrailingSlash = (path) => path.endsWith("/") ? path : `${path}/`, currentWorkingRoot = () => {
|
|
1566
|
+
try {
|
|
1567
|
+
return withTrailingSlash(process.cwd().replaceAll("\\", "/"));
|
|
1568
|
+
} catch {
|
|
1569
|
+
return;
|
|
1570
|
+
}
|
|
1571
|
+
}, isServerFilePath = (value) => {
|
|
1563
1572
|
if (WINDOWS_ABSOLUTE_PATH.test(value))
|
|
1564
1573
|
return true;
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1574
|
+
const buildDir = getManifestBuildDir();
|
|
1575
|
+
if (buildDir && value.startsWith(withTrailingSlash(buildDir)))
|
|
1576
|
+
return true;
|
|
1577
|
+
const root = currentWorkingRoot();
|
|
1578
|
+
if (root && root !== "/" && value.startsWith(root))
|
|
1579
|
+
return true;
|
|
1580
|
+
return false;
|
|
1569
1581
|
}, toBrowserManifest = (manifest) => {
|
|
1570
1582
|
const browserManifest = {};
|
|
1571
1583
|
for (const [key, value] of Object.entries(manifest)) {
|
|
@@ -1777,12 +1789,13 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
1777
1789
|
return pipeStreamWithIslandMarkerDetection(stream, markup, () => warnIfBootstrapMissing(manifest));
|
|
1778
1790
|
}, setCurrentIslandManifest = (manifest, buildDir) => {
|
|
1779
1791
|
globalThis.__absoluteManifest = manifest;
|
|
1780
|
-
|
|
1792
|
+
Reflect.set(globalThis, MANIFEST_BUILD_DIR_KEY, buildDir?.replaceAll("\\", "/"));
|
|
1781
1793
|
};
|
|
1782
1794
|
var init_islandPageContext = __esm(() => {
|
|
1783
1795
|
init_escapeScriptContent();
|
|
1784
1796
|
init_cspNonceRef();
|
|
1785
1797
|
init_logger();
|
|
1798
|
+
MANIFEST_BUILD_DIR_KEY = Symbol.for("absolutejs.islandManifestBuildDir");
|
|
1786
1799
|
WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
|
|
1787
1800
|
});
|
|
1788
1801
|
|
|
@@ -3704,7 +3717,7 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
3704
3717
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
3705
3718
|
};
|
|
3706
3719
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
3707
|
-
if (
|
|
3720
|
+
if (isStreamingSlotCollectionActive()) {
|
|
3708
3721
|
return;
|
|
3709
3722
|
}
|
|
3710
3723
|
getWarningController()?.maybeWarn(primitiveName);
|
|
@@ -3891,7 +3904,11 @@ var extractCallsiteFromStack = (stack) => {
|
|
|
3891
3904
|
`).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreWarningFrame(frame)).map((frame) => getWarningLocation(frame)).find((frameLocation) => frameLocation !== undefined);
|
|
3892
3905
|
return location ? normalizeCallsitePath2(location) : undefined;
|
|
3893
3906
|
};
|
|
3894
|
-
var buildMissingCollectorWarning = (primitiveName,
|
|
3907
|
+
var buildMissingCollectorWarning = (primitiveName, { explicitlyDisabled, handlerCallsite }) => {
|
|
3908
|
+
const fix = explicitlyDisabled ? "This page handler sets { collectStreamingSlots: false }, so the slot stays on its fallback and never streams. Remove the option (or set it to true) to stream this route." : "The slot stays on its fallback and never streams. Add { collectStreamingSlots: true } to this page handler to enable out-of-order streaming for this route.";
|
|
3909
|
+
return `${primitiveName} rendered during SSR without streaming slot collection enabled. ${fix}${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ""}`;
|
|
3910
|
+
};
|
|
3911
|
+
var productionWarnings = new Set;
|
|
3895
3912
|
setStreamingSlotWarningController({
|
|
3896
3913
|
maybeWarn: (primitiveName) => {
|
|
3897
3914
|
const store = getWarningStorage()?.getStore();
|
|
@@ -3899,7 +3916,13 @@ setStreamingSlotWarningController({
|
|
|
3899
3916
|
return;
|
|
3900
3917
|
}
|
|
3901
3918
|
store.hasWarned = true;
|
|
3902
|
-
|
|
3919
|
+
const message = buildMissingCollectorWarning(primitiveName, store);
|
|
3920
|
+
if (isProductionRuntime()) {
|
|
3921
|
+
if (productionWarnings.has(message))
|
|
3922
|
+
return;
|
|
3923
|
+
productionWarnings.add(message);
|
|
3924
|
+
}
|
|
3925
|
+
logWarn(message);
|
|
3903
3926
|
}
|
|
3904
3927
|
});
|
|
3905
3928
|
var captureStreamingSlotWarningCallsite = () => {
|
|
@@ -3912,7 +3935,11 @@ var captureStreamingSlotWarningCallsite = () => {
|
|
|
3912
3935
|
}
|
|
3913
3936
|
return extractCallsiteFromStack(stack);
|
|
3914
3937
|
};
|
|
3915
|
-
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
3938
|
+
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
3939
|
+
explicitlyDisabled: metadata?.explicitlyDisabled === true,
|
|
3940
|
+
handlerCallsite: metadata?.handlerCallsite,
|
|
3941
|
+
hasWarned: false
|
|
3942
|
+
}, task);
|
|
3916
3943
|
|
|
3917
3944
|
// src/svelte/pageHandler.ts
|
|
3918
3945
|
init_routeAssets();
|
|
@@ -4188,5 +4215,5 @@ export {
|
|
|
4188
4215
|
svelteFileRoute
|
|
4189
4216
|
};
|
|
4190
4217
|
|
|
4191
|
-
//# debugId=
|
|
4218
|
+
//# debugId=2158900F9E52751E64756E2164756E21
|
|
4192
4219
|
//# sourceMappingURL=server.js.map
|