@absolutejs/absolute 0.19.0-beta.955 → 0.19.0-beta.956

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.
@@ -2053,6 +2053,7 @@ var exports_devRouteRegistrationCallsite = {};
2053
2053
  __export(exports_devRouteRegistrationCallsite, {
2054
2054
  patchElysiaRouteRegistrationCallsites: () => patchElysiaRouteRegistrationCallsites,
2055
2055
  isPageHandler: () => isPageHandler,
2056
+ getOriginalPageHandlerSource: () => getOriginalPageHandlerSource,
2056
2057
  getCurrentRouteRegistrationCallsite: () => getCurrentRouteRegistrationCallsite
2057
2058
  });
2058
2059
  import { AsyncLocalStorage } from "async_hooks";
@@ -2067,6 +2068,12 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
2067
2068
  if (pageHandlerWrappers.has(fn))
2068
2069
  return true;
2069
2070
  return handlerSourceMentionsPageHelper(fn);
2071
+ }, getOriginalPageHandlerSource = (handler) => {
2072
+ if (typeof handler !== "function")
2073
+ return;
2074
+ const fn = handler;
2075
+ const info = pageHandlerWrappers.get(fn);
2076
+ return (info?.originalHandler ?? fn).toString();
2070
2077
  }, 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 = () => {
2071
2078
  const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
2072
2079
  if (value === null || typeof value === "undefined") {
@@ -2104,7 +2111,9 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
2104
2111
  const callsite = captureRouteRegistrationCallsite();
2105
2112
  const wrapped = wrapRouteHandlerWithCallsite(handler, callsite);
2106
2113
  if (methodName === "get" && typeof handler === "function" && typeof wrapped === "function" && handlerSourceMentionsPageHelper(handler)) {
2107
- pageHandlerWrappers.add(wrapped);
2114
+ pageHandlerWrappers.set(wrapped, {
2115
+ originalHandler: handler
2116
+ });
2108
2117
  }
2109
2118
  return Reflect.apply(originalMethod, this, [path, wrapped, ...rest]);
2110
2119
  }, getCurrentRouteRegistrationCallsite = () => getRouteCallsiteStorage()?.getStore()?.callsite, patchElysiaRouteRegistrationCallsites = () => {
@@ -2142,7 +2151,7 @@ var init_devRouteRegistrationCallsite = __esm(() => {
2142
2151
  "handleHTMLPageRequest",
2143
2152
  "handleHTMXPageRequest"
2144
2153
  ];
2145
- pageHandlerWrappers = new WeakSet;
2154
+ pageHandlerWrappers = new WeakMap;
2146
2155
  });
2147
2156
 
2148
2157
  // src/client/streamSwap.ts
@@ -5939,5 +5948,5 @@ export {
5939
5948
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
5940
5949
  };
5941
5950
 
5942
- //# debugId=224B8C8FF03DD1A364756E2164756E21
5951
+ //# debugId=398F502574C5F34A64756E2164756E21
5943
5952
  //# sourceMappingURL=server.js.map