@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.
@@ -1067,6 +1067,7 @@ var exports_devRouteRegistrationCallsite = {};
1067
1067
  __export(exports_devRouteRegistrationCallsite, {
1068
1068
  patchElysiaRouteRegistrationCallsites: () => patchElysiaRouteRegistrationCallsites,
1069
1069
  isPageHandler: () => isPageHandler,
1070
+ getOriginalPageHandlerSource: () => getOriginalPageHandlerSource,
1070
1071
  getCurrentRouteRegistrationCallsite: () => getCurrentRouteRegistrationCallsite
1071
1072
  });
1072
1073
  import { AsyncLocalStorage } from "async_hooks";
@@ -1081,6 +1082,12 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
1081
1082
  if (pageHandlerWrappers.has(fn))
1082
1083
  return true;
1083
1084
  return handlerSourceMentionsPageHelper(fn);
1085
+ }, getOriginalPageHandlerSource = (handler) => {
1086
+ if (typeof handler !== "function")
1087
+ return;
1088
+ const fn = handler;
1089
+ const info = pageHandlerWrappers.get(fn);
1090
+ return (info?.originalHandler ?? fn).toString();
1084
1091
  }, 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 = () => {
1085
1092
  const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
1086
1093
  if (value === null || typeof value === "undefined") {
@@ -1118,7 +1125,9 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
1118
1125
  const callsite = captureRouteRegistrationCallsite();
1119
1126
  const wrapped = wrapRouteHandlerWithCallsite(handler, callsite);
1120
1127
  if (methodName === "get" && typeof handler === "function" && typeof wrapped === "function" && handlerSourceMentionsPageHelper(handler)) {
1121
- pageHandlerWrappers.add(wrapped);
1128
+ pageHandlerWrappers.set(wrapped, {
1129
+ originalHandler: handler
1130
+ });
1122
1131
  }
1123
1132
  return Reflect.apply(originalMethod, this, [path, wrapped, ...rest]);
1124
1133
  }, getCurrentRouteRegistrationCallsite = () => getRouteCallsiteStorage()?.getStore()?.callsite, patchElysiaRouteRegistrationCallsites = () => {
@@ -1156,7 +1165,7 @@ var init_devRouteRegistrationCallsite = __esm(() => {
1156
1165
  "handleHTMLPageRequest",
1157
1166
  "handleHTMXPageRequest"
1158
1167
  ];
1159
- pageHandlerWrappers = new WeakSet;
1168
+ pageHandlerWrappers = new WeakMap;
1160
1169
  });
1161
1170
 
1162
1171
  // src/client/streamSwap.ts
@@ -4004,5 +4013,5 @@ export {
4004
4013
  createTypedIsland
4005
4014
  };
4006
4015
 
4007
- //# debugId=DBD28BB3223B533264756E2164756E21
4016
+ //# debugId=FE605B696293584564756E2164756E21
4008
4017
  //# sourceMappingURL=index.js.map