@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/angular/server.js
CHANGED
|
@@ -113,6 +113,10 @@ var init_constants = __esm(() => {
|
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
// src/utils/ssrErrorPage.ts
|
|
116
|
+
var exports_ssrErrorPage = {};
|
|
117
|
+
__export(exports_ssrErrorPage, {
|
|
118
|
+
ssrErrorPage: () => ssrErrorPage
|
|
119
|
+
});
|
|
116
120
|
var ssrErrorPage = (framework, error) => {
|
|
117
121
|
const frameworkColors = {
|
|
118
122
|
angular: "#dd0031",
|
|
@@ -989,7 +993,7 @@ import {
|
|
|
989
993
|
relative,
|
|
990
994
|
resolve as resolve3
|
|
991
995
|
} from "path";
|
|
992
|
-
import { fileURLToPath } from "url";
|
|
996
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
993
997
|
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) => {
|
|
994
998
|
const normalized = filePathOrLanguage.toLowerCase();
|
|
995
999
|
if (normalized === "scss" || normalized.endsWith(".scss"))
|
|
@@ -1223,7 +1227,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1223
1227
|
canonicalize(specifier, options) {
|
|
1224
1228
|
const fromDirectory = options.containingUrl ? dirname(fileURLToPath(options.containingUrl)) : dirname(entryFile);
|
|
1225
1229
|
const resolved = resolveImportPath(specifier, fromDirectory, loadPaths, language, config);
|
|
1226
|
-
return resolved ? new URL(
|
|
1230
|
+
return resolved ? new URL(pathToFileURL(resolve3(resolved)).href) : null;
|
|
1227
1231
|
},
|
|
1228
1232
|
load(canonicalUrl) {
|
|
1229
1233
|
const filePath = fileURLToPath(canonicalUrl);
|
|
@@ -1341,7 +1345,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1341
1345
|
loadPaths,
|
|
1342
1346
|
style: "expanded",
|
|
1343
1347
|
syntax: language === "sass" ? "indented" : "scss",
|
|
1344
|
-
url: new URL(
|
|
1348
|
+
url: new URL(pathToFileURL(resolve3(filePath)).href)
|
|
1345
1349
|
});
|
|
1346
1350
|
const css = await runPostcss(result.css, filePath, config);
|
|
1347
1351
|
const loadedUrls = result.loadedUrls ?? [];
|
|
@@ -1528,7 +1532,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1528
1532
|
loadPaths,
|
|
1529
1533
|
style: "expanded",
|
|
1530
1534
|
syntax: language === "sass" ? "indented" : "scss",
|
|
1531
|
-
url: new URL(
|
|
1535
|
+
url: new URL(pathToFileURL(resolve3(filePath)).href)
|
|
1532
1536
|
});
|
|
1533
1537
|
const loadedUrls = result.loadedUrls ?? [];
|
|
1534
1538
|
for (const url of loadedUrls) {
|
|
@@ -2048,11 +2052,22 @@ var init_renderIslandMarkup = __esm(() => {
|
|
|
2048
2052
|
var exports_devRouteRegistrationCallsite = {};
|
|
2049
2053
|
__export(exports_devRouteRegistrationCallsite, {
|
|
2050
2054
|
patchElysiaRouteRegistrationCallsites: () => patchElysiaRouteRegistrationCallsites,
|
|
2055
|
+
isPageHandler: () => isPageHandler,
|
|
2051
2056
|
getCurrentRouteRegistrationCallsite: () => getCurrentRouteRegistrationCallsite
|
|
2052
2057
|
});
|
|
2053
2058
|
import { AsyncLocalStorage } from "async_hooks";
|
|
2054
2059
|
import { Elysia } from "elysia";
|
|
2055
|
-
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
2060
|
+
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
|
|
2061
|
+
const source = handler.toString();
|
|
2062
|
+
return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
|
|
2063
|
+
}, isPageHandler = (handler) => {
|
|
2064
|
+
if (typeof handler !== "function")
|
|
2065
|
+
return false;
|
|
2066
|
+
const fn = handler;
|
|
2067
|
+
if (pageHandlerWrappers.has(fn))
|
|
2068
|
+
return true;
|
|
2069
|
+
return handlerSourceMentionsPageHelper(fn);
|
|
2070
|
+
}, 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 = () => {
|
|
2056
2071
|
const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
|
|
2057
2072
|
if (value === null || typeof value === "undefined") {
|
|
2058
2073
|
return;
|
|
@@ -2085,13 +2100,13 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
2085
2100
|
return function wrappedRouteHandler(...args) {
|
|
2086
2101
|
return storage.run({ callsite }, () => Reflect.apply(routeHandler, this, args));
|
|
2087
2102
|
};
|
|
2088
|
-
}, createPatchedRouteMethod = (originalMethod) => function patchedRouteMethod(path, handler, ...rest) {
|
|
2103
|
+
}, createPatchedRouteMethod = (originalMethod, methodName) => function patchedRouteMethod(path, handler, ...rest) {
|
|
2089
2104
|
const callsite = captureRouteRegistrationCallsite();
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
]);
|
|
2105
|
+
const wrapped = wrapRouteHandlerWithCallsite(handler, callsite);
|
|
2106
|
+
if (methodName === "get" && typeof handler === "function" && typeof wrapped === "function" && handlerSourceMentionsPageHelper(handler)) {
|
|
2107
|
+
pageHandlerWrappers.add(wrapped);
|
|
2108
|
+
}
|
|
2109
|
+
return Reflect.apply(originalMethod, this, [path, wrapped, ...rest]);
|
|
2095
2110
|
}, getCurrentRouteRegistrationCallsite = () => getRouteCallsiteStorage()?.getStore()?.callsite, patchElysiaRouteRegistrationCallsites = () => {
|
|
2096
2111
|
if (false) {}
|
|
2097
2112
|
if (Reflect.get(globalThis, ROUTE_CALLSITE_PATCHED_KEY) === true) {
|
|
@@ -2102,7 +2117,7 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
2102
2117
|
const originalMethod = Reflect.get(prototype, methodName);
|
|
2103
2118
|
if (!isRouteMethod(originalMethod))
|
|
2104
2119
|
return;
|
|
2105
|
-
Reflect.set(prototype, methodName, createPatchedRouteMethod(originalMethod));
|
|
2120
|
+
Reflect.set(prototype, methodName, createPatchedRouteMethod(originalMethod, methodName));
|
|
2106
2121
|
});
|
|
2107
2122
|
Reflect.set(globalThis, ROUTE_CALLSITE_PATCHED_KEY, true);
|
|
2108
2123
|
};
|
|
@@ -2119,6 +2134,15 @@ var init_devRouteRegistrationCallsite = __esm(() => {
|
|
|
2119
2134
|
"post",
|
|
2120
2135
|
"put"
|
|
2121
2136
|
];
|
|
2137
|
+
PAGE_HANDLER_NAMES = [
|
|
2138
|
+
"handleReactPageRequest",
|
|
2139
|
+
"handleSveltePageRequest",
|
|
2140
|
+
"handleVuePageRequest",
|
|
2141
|
+
"handleAngularPageRequest",
|
|
2142
|
+
"handleHTMLPageRequest",
|
|
2143
|
+
"handleHTMXPageRequest"
|
|
2144
|
+
];
|
|
2145
|
+
pageHandlerWrappers = new WeakSet;
|
|
2122
2146
|
});
|
|
2123
2147
|
|
|
2124
2148
|
// src/client/streamSwap.ts
|
|
@@ -4873,7 +4897,7 @@ import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
|
|
|
4873
4897
|
import { mkdir as mkdir3, symlink } from "fs/promises";
|
|
4874
4898
|
import { tmpdir } from "os";
|
|
4875
4899
|
import { basename as basename4, dirname as dirname5, join as join8, resolve as resolve7 } from "path";
|
|
4876
|
-
import { pathToFileURL } from "url";
|
|
4900
|
+
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
4877
4901
|
|
|
4878
4902
|
// src/core/islandPageContext.ts
|
|
4879
4903
|
init_constants();
|
|
@@ -5795,7 +5819,7 @@ var buildRuntimeModuleSpecifier = (modulePath, cacheBuster) => {
|
|
|
5795
5819
|
if (!cacheBuster) {
|
|
5796
5820
|
return modulePath;
|
|
5797
5821
|
}
|
|
5798
|
-
const moduleUrl = new URL(
|
|
5822
|
+
const moduleUrl = new URL(pathToFileURL2(modulePath).href);
|
|
5799
5823
|
moduleUrl.searchParams.set("t", cacheBuster);
|
|
5800
5824
|
return moduleUrl.href;
|
|
5801
5825
|
};
|
|
@@ -5915,5 +5939,5 @@ export {
|
|
|
5915
5939
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
5916
5940
|
};
|
|
5917
5941
|
|
|
5918
|
-
//# debugId=
|
|
5942
|
+
//# debugId=224B8C8FF03DD1A364756E2164756E21
|
|
5919
5943
|
//# sourceMappingURL=server.js.map
|