@absolutejs/absolute 0.20.0-beta.172 → 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 +32 -0
- package/README.md +3 -2
- package/changelog.json +57 -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 +1 -1
- 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/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 +1 -1
package/dist/vue/server.js
CHANGED
|
@@ -101,7 +101,7 @@ var init_cspNonceRef = __esm(() => {
|
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
// src/utils/runtimeMode.ts
|
|
104
|
-
var ENV_VAR = "NODE_ENV",
|
|
104
|
+
var ENV_VAR = "NODE_ENV", readEnv = () => typeof process === "undefined" ? undefined : process.env?.[ENV_VAR], getNodeEnv = () => readEnv(), isDevelopmentRuntime = () => readEnv() === "development", isProductionRuntime = () => readEnv() === "production";
|
|
105
105
|
|
|
106
106
|
// src/utils/inlinePageCss.ts
|
|
107
107
|
var siblingCssCache, clearSiblingCssCache = () => {
|
|
@@ -937,13 +937,25 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
937
937
|
return;
|
|
938
938
|
warnedMissingBootstrap = true;
|
|
939
939
|
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().");
|
|
940
|
-
},
|
|
940
|
+
}, MANIFEST_BUILD_DIR_KEY, getManifestBuildDir = () => {
|
|
941
|
+
const value = Reflect.get(globalThis, MANIFEST_BUILD_DIR_KEY);
|
|
942
|
+
return typeof value === "string" ? value : undefined;
|
|
943
|
+
}, WINDOWS_ABSOLUTE_PATH, withTrailingSlash = (path) => path.endsWith("/") ? path : `${path}/`, currentWorkingRoot = () => {
|
|
944
|
+
try {
|
|
945
|
+
return withTrailingSlash(process.cwd().replaceAll("\\", "/"));
|
|
946
|
+
} catch {
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
}, isServerFilePath = (value) => {
|
|
941
950
|
if (WINDOWS_ABSOLUTE_PATH.test(value))
|
|
942
951
|
return true;
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
952
|
+
const buildDir = getManifestBuildDir();
|
|
953
|
+
if (buildDir && value.startsWith(withTrailingSlash(buildDir)))
|
|
954
|
+
return true;
|
|
955
|
+
const root = currentWorkingRoot();
|
|
956
|
+
if (root && root !== "/" && value.startsWith(root))
|
|
957
|
+
return true;
|
|
958
|
+
return false;
|
|
947
959
|
}, toBrowserManifest = (manifest) => {
|
|
948
960
|
const browserManifest = {};
|
|
949
961
|
for (const [key, value] of Object.entries(manifest)) {
|
|
@@ -1155,12 +1167,13 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
1155
1167
|
return pipeStreamWithIslandMarkerDetection(stream, markup, () => warnIfBootstrapMissing(manifest));
|
|
1156
1168
|
}, setCurrentIslandManifest = (manifest, buildDir) => {
|
|
1157
1169
|
globalThis.__absoluteManifest = manifest;
|
|
1158
|
-
|
|
1170
|
+
Reflect.set(globalThis, MANIFEST_BUILD_DIR_KEY, buildDir?.replaceAll("\\", "/"));
|
|
1159
1171
|
};
|
|
1160
1172
|
var init_islandPageContext = __esm(() => {
|
|
1161
1173
|
init_escapeScriptContent();
|
|
1162
1174
|
init_cspNonceRef();
|
|
1163
1175
|
init_logger();
|
|
1176
|
+
MANIFEST_BUILD_DIR_KEY = Symbol.for("absolutejs.islandManifestBuildDir");
|
|
1164
1177
|
WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
|
|
1165
1178
|
});
|
|
1166
1179
|
|
|
@@ -2702,7 +2715,7 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
2702
2715
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
2703
2716
|
};
|
|
2704
2717
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
2705
|
-
if (
|
|
2718
|
+
if (isStreamingSlotCollectionActive()) {
|
|
2706
2719
|
return;
|
|
2707
2720
|
}
|
|
2708
2721
|
getWarningController()?.maybeWarn(primitiveName);
|
|
@@ -2889,7 +2902,11 @@ var extractCallsiteFromStack = (stack) => {
|
|
|
2889
2902
|
`).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreWarningFrame(frame)).map((frame) => getWarningLocation(frame)).find((frameLocation) => frameLocation !== undefined);
|
|
2890
2903
|
return location ? normalizeCallsitePath2(location) : undefined;
|
|
2891
2904
|
};
|
|
2892
|
-
var buildMissingCollectorWarning = (primitiveName,
|
|
2905
|
+
var buildMissingCollectorWarning = (primitiveName, { explicitlyDisabled, handlerCallsite }) => {
|
|
2906
|
+
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.";
|
|
2907
|
+
return `${primitiveName} rendered during SSR without streaming slot collection enabled. ${fix}${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ""}`;
|
|
2908
|
+
};
|
|
2909
|
+
var productionWarnings = new Set;
|
|
2893
2910
|
setStreamingSlotWarningController({
|
|
2894
2911
|
maybeWarn: (primitiveName) => {
|
|
2895
2912
|
const store = getWarningStorage()?.getStore();
|
|
@@ -2897,7 +2914,13 @@ setStreamingSlotWarningController({
|
|
|
2897
2914
|
return;
|
|
2898
2915
|
}
|
|
2899
2916
|
store.hasWarned = true;
|
|
2900
|
-
|
|
2917
|
+
const message = buildMissingCollectorWarning(primitiveName, store);
|
|
2918
|
+
if (isProductionRuntime()) {
|
|
2919
|
+
if (productionWarnings.has(message))
|
|
2920
|
+
return;
|
|
2921
|
+
productionWarnings.add(message);
|
|
2922
|
+
}
|
|
2923
|
+
logWarn(message);
|
|
2901
2924
|
}
|
|
2902
2925
|
});
|
|
2903
2926
|
var captureStreamingSlotWarningCallsite = () => {
|
|
@@ -2910,7 +2933,11 @@ var captureStreamingSlotWarningCallsite = () => {
|
|
|
2910
2933
|
}
|
|
2911
2934
|
return extractCallsiteFromStack(stack);
|
|
2912
2935
|
};
|
|
2913
|
-
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
2936
|
+
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
2937
|
+
explicitlyDisabled: metadata?.explicitlyDisabled === true,
|
|
2938
|
+
handlerCallsite: metadata?.handlerCallsite,
|
|
2939
|
+
hasWarned: false
|
|
2940
|
+
}, task);
|
|
2914
2941
|
|
|
2915
2942
|
// src/vue/pageHandler.ts
|
|
2916
2943
|
init_ssrErrorPage();
|
|
@@ -3277,5 +3304,5 @@ export {
|
|
|
3277
3304
|
handleVuePageRequest
|
|
3278
3305
|
};
|
|
3279
3306
|
|
|
3280
|
-
//# debugId=
|
|
3307
|
+
//# debugId=1FF8E0EE26DF46A564756E2164756E21
|
|
3281
3308
|
//# sourceMappingURL=server.js.map
|