@absolutejs/absolute 0.19.0-beta.950 → 0.19.0-beta.952
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +39 -15
- package/dist/angular/index.js.map +5 -5
- package/dist/angular/server.js +39 -15
- package/dist/angular/server.js.map +5 -5
- package/dist/build.js +1235 -717
- package/dist/build.js.map +21 -19
- package/dist/cli/index.js +159 -92
- package/dist/index.js +1359 -815
- package/dist/index.js.map +28 -26
- package/dist/islands/index.js +5 -5
- package/dist/islands/index.js.map +3 -3
- package/dist/react/components/browser/index.js +17 -2
- package/dist/react/components/index.js +19 -3
- package/dist/react/components/index.js.map +5 -4
- package/dist/react/index.js +37 -13
- package/dist/react/index.js.map +4 -4
- package/dist/react/server.js +33 -9
- package/dist/react/server.js.map +3 -3
- package/dist/src/build/chainInlineSourcemaps.d.ts +13 -0
- package/dist/src/build/externalAssetPlugin.d.ts +2 -0
- package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +11 -2
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/dev/serverEntryWatcher.d.ts +1 -0
- package/dist/src/react/components/Head.d.ts +1 -1
- package/dist/src/utils/generateHeadElement.d.ts +1 -1
- package/dist/src/utils/jsonLd.d.ts +1 -0
- package/dist/svelte/index.js +37 -13
- package/dist/svelte/index.js.map +4 -4
- package/dist/svelte/server.js +37 -13
- package/dist/svelte/server.js.map +4 -4
- package/dist/types/globals.d.ts +1 -4
- package/dist/types/metadata.d.ts +2 -0
- package/dist/vue/index.js +37 -13
- package/dist/vue/index.js.map +5 -5
- package/dist/vue/server.js +33 -9
- package/dist/vue/server.js.map +4 -4
- package/package.json +17 -1
package/dist/svelte/index.js
CHANGED
|
@@ -308,7 +308,7 @@ import {
|
|
|
308
308
|
relative,
|
|
309
309
|
resolve as resolve2
|
|
310
310
|
} from "path";
|
|
311
|
-
import { fileURLToPath } from "url";
|
|
311
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
312
312
|
var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, requireFromCwd, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less|styl(?:us)?)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less|styl(?:us)?)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
|
|
313
313
|
const normalized = filePathOrLanguage.toLowerCase();
|
|
314
314
|
if (normalized === "scss" || normalized.endsWith(".scss"))
|
|
@@ -542,7 +542,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
542
542
|
canonicalize(specifier, options) {
|
|
543
543
|
const fromDirectory = options.containingUrl ? dirname(fileURLToPath(options.containingUrl)) : dirname(entryFile);
|
|
544
544
|
const resolved = resolveImportPath(specifier, fromDirectory, loadPaths, language, config);
|
|
545
|
-
return resolved ? new URL(
|
|
545
|
+
return resolved ? new URL(pathToFileURL(resolve2(resolved)).href) : null;
|
|
546
546
|
},
|
|
547
547
|
load(canonicalUrl) {
|
|
548
548
|
const filePath = fileURLToPath(canonicalUrl);
|
|
@@ -660,7 +660,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
660
660
|
loadPaths,
|
|
661
661
|
style: "expanded",
|
|
662
662
|
syntax: language === "sass" ? "indented" : "scss",
|
|
663
|
-
url: new URL(
|
|
663
|
+
url: new URL(pathToFileURL(resolve2(filePath)).href)
|
|
664
664
|
});
|
|
665
665
|
const css = await runPostcss(result.css, filePath, config);
|
|
666
666
|
const loadedUrls = result.loadedUrls ?? [];
|
|
@@ -847,7 +847,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
847
847
|
loadPaths,
|
|
848
848
|
style: "expanded",
|
|
849
849
|
syntax: language === "sass" ? "indented" : "scss",
|
|
850
|
-
url: new URL(
|
|
850
|
+
url: new URL(pathToFileURL(resolve2(filePath)).href)
|
|
851
851
|
});
|
|
852
852
|
const loadedUrls = result.loadedUrls ?? [];
|
|
853
853
|
for (const url of loadedUrls) {
|
|
@@ -1066,11 +1066,22 @@ var init_svelteServerModule = __esm(() => {
|
|
|
1066
1066
|
var exports_devRouteRegistrationCallsite = {};
|
|
1067
1067
|
__export(exports_devRouteRegistrationCallsite, {
|
|
1068
1068
|
patchElysiaRouteRegistrationCallsites: () => patchElysiaRouteRegistrationCallsites,
|
|
1069
|
+
isPageHandler: () => isPageHandler,
|
|
1069
1070
|
getCurrentRouteRegistrationCallsite: () => getCurrentRouteRegistrationCallsite
|
|
1070
1071
|
});
|
|
1071
1072
|
import { AsyncLocalStorage } from "async_hooks";
|
|
1072
1073
|
import { Elysia } from "elysia";
|
|
1073
|
-
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
1074
|
+
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
|
|
1075
|
+
const source = handler.toString();
|
|
1076
|
+
return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
|
|
1077
|
+
}, isPageHandler = (handler) => {
|
|
1078
|
+
if (typeof handler !== "function")
|
|
1079
|
+
return false;
|
|
1080
|
+
const fn = handler;
|
|
1081
|
+
if (pageHandlerWrappers.has(fn))
|
|
1082
|
+
return true;
|
|
1083
|
+
return handlerSourceMentionsPageHelper(fn);
|
|
1084
|
+
}, 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 = () => {
|
|
1074
1085
|
const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
|
|
1075
1086
|
if (value === null || typeof value === "undefined") {
|
|
1076
1087
|
return;
|
|
@@ -1103,13 +1114,13 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
1103
1114
|
return function wrappedRouteHandler(...args) {
|
|
1104
1115
|
return storage.run({ callsite }, () => Reflect.apply(routeHandler, this, args));
|
|
1105
1116
|
};
|
|
1106
|
-
}, createPatchedRouteMethod = (originalMethod) => function patchedRouteMethod(path, handler, ...rest) {
|
|
1117
|
+
}, createPatchedRouteMethod = (originalMethod, methodName) => function patchedRouteMethod(path, handler, ...rest) {
|
|
1107
1118
|
const callsite = captureRouteRegistrationCallsite();
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
]);
|
|
1119
|
+
const wrapped = wrapRouteHandlerWithCallsite(handler, callsite);
|
|
1120
|
+
if (methodName === "get" && typeof handler === "function" && typeof wrapped === "function" && handlerSourceMentionsPageHelper(handler)) {
|
|
1121
|
+
pageHandlerWrappers.add(wrapped);
|
|
1122
|
+
}
|
|
1123
|
+
return Reflect.apply(originalMethod, this, [path, wrapped, ...rest]);
|
|
1113
1124
|
}, getCurrentRouteRegistrationCallsite = () => getRouteCallsiteStorage()?.getStore()?.callsite, patchElysiaRouteRegistrationCallsites = () => {
|
|
1114
1125
|
if (false) {}
|
|
1115
1126
|
if (Reflect.get(globalThis, ROUTE_CALLSITE_PATCHED_KEY) === true) {
|
|
@@ -1120,7 +1131,7 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
1120
1131
|
const originalMethod = Reflect.get(prototype, methodName);
|
|
1121
1132
|
if (!isRouteMethod(originalMethod))
|
|
1122
1133
|
return;
|
|
1123
|
-
Reflect.set(prototype, methodName, createPatchedRouteMethod(originalMethod));
|
|
1134
|
+
Reflect.set(prototype, methodName, createPatchedRouteMethod(originalMethod, methodName));
|
|
1124
1135
|
});
|
|
1125
1136
|
Reflect.set(globalThis, ROUTE_CALLSITE_PATCHED_KEY, true);
|
|
1126
1137
|
};
|
|
@@ -1137,6 +1148,15 @@ var init_devRouteRegistrationCallsite = __esm(() => {
|
|
|
1137
1148
|
"post",
|
|
1138
1149
|
"put"
|
|
1139
1150
|
];
|
|
1151
|
+
PAGE_HANDLER_NAMES = [
|
|
1152
|
+
"handleReactPageRequest",
|
|
1153
|
+
"handleSveltePageRequest",
|
|
1154
|
+
"handleVuePageRequest",
|
|
1155
|
+
"handleAngularPageRequest",
|
|
1156
|
+
"handleHTMLPageRequest",
|
|
1157
|
+
"handleHTMXPageRequest"
|
|
1158
|
+
];
|
|
1159
|
+
pageHandlerWrappers = new WeakSet;
|
|
1140
1160
|
});
|
|
1141
1161
|
|
|
1142
1162
|
// src/client/streamSwap.ts
|
|
@@ -1964,6 +1984,10 @@ var init_logger = __esm(() => {
|
|
|
1964
1984
|
});
|
|
1965
1985
|
|
|
1966
1986
|
// src/utils/ssrErrorPage.ts
|
|
1987
|
+
var exports_ssrErrorPage = {};
|
|
1988
|
+
__export(exports_ssrErrorPage, {
|
|
1989
|
+
ssrErrorPage: () => ssrErrorPage
|
|
1990
|
+
});
|
|
1967
1991
|
var ssrErrorPage = (framework, error) => {
|
|
1968
1992
|
const frameworkColors2 = {
|
|
1969
1993
|
angular: "#dd0031",
|
|
@@ -3980,5 +4004,5 @@ export {
|
|
|
3980
4004
|
createTypedIsland
|
|
3981
4005
|
};
|
|
3982
4006
|
|
|
3983
|
-
//# debugId=
|
|
4007
|
+
//# debugId=DBD28BB3223B533264756E2164756E21
|
|
3984
4008
|
//# sourceMappingURL=index.js.map
|