@absolutejs/absolute 0.19.0-beta.1115 → 0.19.0-beta.1117

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.
Files changed (91) hide show
  1. package/dist/angular/browser.js +53 -47
  2. package/dist/angular/browser.js.map +5 -5
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/hmrPreserveCore.ts +73 -34
  6. package/dist/angular/index.js +63 -58
  7. package/dist/angular/index.js.map +10 -10
  8. package/dist/angular/server.js +20 -38
  9. package/dist/angular/server.js.map +8 -8
  10. package/dist/build.js +601 -547
  11. package/dist/build.js.map +32 -32
  12. package/dist/cli/config/client.js +8 -8
  13. package/dist/cli/config/server.js +87 -75
  14. package/dist/cli/index.js +975 -794
  15. package/dist/client/index.js +1 -19
  16. package/dist/client/index.js.map +3 -3
  17. package/dist/core/streamingSlotRegistrar.js +1 -19
  18. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  19. package/dist/core/streamingSlotRegistry.js +1 -19
  20. package/dist/core/streamingSlotRegistry.js.map +2 -2
  21. package/dist/dev/client/errorOverlay.ts +11 -10
  22. package/dist/dev/client/handlers/angularHmrShim.ts +6 -6
  23. package/dist/dev/client/handlers/angularRemount.ts +64 -44
  24. package/dist/dev/client/hmrClient.ts +31 -26
  25. package/dist/dev/client/hmrToast.ts +2 -4
  26. package/dist/dev/serverBootstrap.js +36 -0
  27. package/dist/index.js +742 -615
  28. package/dist/index.js.map +39 -38
  29. package/dist/islands/browser.js +1 -19
  30. package/dist/islands/browser.js.map +2 -2
  31. package/dist/islands/index.js +1 -19
  32. package/dist/islands/index.js.map +3 -3
  33. package/dist/react/browser.js +1 -19
  34. package/dist/react/browser.js.map +2 -2
  35. package/dist/react/components/index.js +1 -19
  36. package/dist/react/components/index.js.map +2 -2
  37. package/dist/react/hooks/index.js +1 -19
  38. package/dist/react/hooks/index.js.map +2 -2
  39. package/dist/react/index.js +15 -37
  40. package/dist/react/index.js.map +7 -7
  41. package/dist/react/jsxDevRuntimeCompat.js +1 -19
  42. package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
  43. package/dist/react/router/browser.js +1 -19
  44. package/dist/react/router/browser.js.map +2 -2
  45. package/dist/react/router/index.js +1 -19
  46. package/dist/react/router/index.js.map +2 -2
  47. package/dist/react/server.js +15 -37
  48. package/dist/react/server.js.map +6 -6
  49. package/dist/src/angular/hmrPreserveCore.d.ts +2 -2
  50. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +1 -1
  51. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +1 -1
  52. package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +1 -2
  53. package/dist/src/cli/config/schema/fromType.d.ts +1 -2
  54. package/dist/src/cli/config/server.d.ts +2 -2
  55. package/dist/src/cli/scripts/lintProof.d.ts +34 -0
  56. package/dist/src/core/build.d.ts +3 -2
  57. package/dist/src/core/prepare.d.ts +1 -0
  58. package/dist/src/dev/angular/fastHmrCompiler.d.ts +4 -2
  59. package/dist/src/dev/serverBootstrap.d.ts +1 -0
  60. package/dist/src/dev/serverEntryWatcher.d.ts +3 -3
  61. package/dist/src/dev/webSocket.d.ts +1 -1
  62. package/dist/src/plugins/hmr.d.ts +1 -0
  63. package/dist/src/svelte/router/matchPath.d.ts +2 -2
  64. package/dist/src/utils/defineConvention.d.ts +2 -2
  65. package/dist/src/utils/inlinePageCss.d.ts +1 -1
  66. package/dist/src/utils/isTestSourcePath.d.ts +1 -0
  67. package/dist/svelte/browser.js +1 -19
  68. package/dist/svelte/browser.js.map +2 -2
  69. package/dist/svelte/index.js +15 -36
  70. package/dist/svelte/index.js.map +8 -8
  71. package/dist/svelte/router/Link.svelte.d.ts +3 -3
  72. package/dist/svelte/router/Route.svelte.d.ts +5 -5
  73. package/dist/svelte/router/Router.svelte.d.ts +3 -3
  74. package/dist/svelte/router/matchPath.ts +25 -20
  75. package/dist/svelte/router/prefetchCache.ts +6 -4
  76. package/dist/svelte/router/viewTransitions.ts +22 -12
  77. package/dist/svelte/server.js +15 -36
  78. package/dist/svelte/server.js.map +7 -7
  79. package/dist/types/angular.d.ts +1 -1
  80. package/dist/types/globals.d.ts +5 -0
  81. package/dist/vue/browser.js +1 -19
  82. package/dist/vue/browser.js.map +2 -2
  83. package/dist/vue/components/Image.js +1 -19
  84. package/dist/vue/components/Image.js.map +2 -2
  85. package/dist/vue/components/index.js +1 -19
  86. package/dist/vue/components/index.js.map +2 -2
  87. package/dist/vue/index.js +41 -55
  88. package/dist/vue/index.js.map +10 -10
  89. package/dist/vue/server.js +32 -48
  90. package/dist/vue/server.js.map +8 -8
  91. package/package.json +90 -31
@@ -3,7 +3,6 @@ var __create = Object.create;
3
3
  var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
7
  function __accessProp(key) {
9
8
  return this[key];
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
30
29
  cache.set(mod, to);
31
30
  return to;
32
31
  };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
33
  var __returnValue = (v) => v;
52
34
  function __exportSetter(name, newValue) {
@@ -86,5 +68,5 @@ export {
86
68
  Fragment
87
69
  };
88
70
 
89
- //# debugId=D6695015FE3A1E9264756E2164756E21
71
+ //# debugId=EB16DE1F5202CABA64756E2164756E21
90
72
  //# sourceMappingURL=jsxDevRuntimeCompat.js.map
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "import { Fragment, jsx, jsxs } from 'react/jsx-runtime';\n\ntype JSXType = Parameters<typeof jsx>[0];\ntype JSXKey = Parameters<typeof jsx>[2];\ntype JSXProps = Parameters<typeof jsx>[1] & {\n\tchildren?: unknown;\n};\n\nexport { Fragment };\n\nexport const jsxDEV = (\n\ttype: JSXType,\n\tprops: JSXProps,\n\tkey?: JSXKey,\n\t_isStaticChildren?: boolean,\n\t_source?: unknown,\n\t_self?: unknown\n) =>\n\tArray.isArray(props?.children)\n\t\t? jsxs(type, props, key)\n\t\t: jsx(type, props, key);\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAUO,IAAM,SAAS,CACrB,MACA,OACA,KACA,mBACA,SACA,UAEA,MAAM,QAAQ,OAAO,QAAQ,IAC1B,KAAK,MAAM,OAAO,GAAG,IACrB,IAAI,MAAM,OAAO,GAAG;",
8
- "debugId": "D6695015FE3A1E9264756E2164756E21",
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAUO,IAAM,SAAS,CACrB,MACA,OACA,KACA,mBACA,SACA,UAEA,MAAM,QAAQ,OAAO,QAAQ,IAC1B,KAAK,MAAM,OAAO,GAAG,IACrB,IAAI,MAAM,OAAO,GAAG;",
8
+ "debugId": "EB16DE1F5202CABA64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -3,7 +3,6 @@ var __create = Object.create;
3
3
  var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
7
  function __accessProp(key) {
9
8
  return this[key];
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
30
29
  cache.set(mod, to);
31
30
  return to;
32
31
  };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
33
  var __returnValue = (v) => v;
52
34
  function __exportSetter(name, newValue) {
@@ -91,5 +73,5 @@ export {
91
73
  UniversalRouter
92
74
  };
93
75
 
94
- //# debugId=9785C1C2D083082064756E2164756E21
76
+ //# debugId=83C2A10A433A92F464756E2164756E21
95
77
  //# sourceMappingURL=browser.js.map
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "import { createElement, type ReactNode } from 'react';\nimport { BrowserRouter, StaticRouter } from 'react-router';\n\nexport type UniversalRouterProps = {\n\t/** The request URL to seed `<StaticRouter>` with on the server. Pages\n\t * typically forward `props.url` (auto-injected by handleReactPageRequest\n\t * from `request.url`). Ignored in the browser, where `<BrowserRouter>`\n\t * reads `window.location` directly. Defaults to '/'. */\n\turl?: string;\n\tchildren?: ReactNode;\n};\n\n/** SSR-safe wrapper around react-router that picks `<StaticRouter>` on the\n * server and `<BrowserRouter>` in the browser. Without it, every SPA page\n * has to write its own `typeof window === 'undefined'` branch and import\n * both routers — boilerplate that's the same in every page.\n *\n * Usage:\n *\n * import { UniversalRouter } from '@absolutejs/absolute/react/router';\n *\n * export const MySpa = ({ url }: { url?: string }) => (\n * <html>\n * <Head />\n * <body>\n * <UniversalRouter url={url}>\n * <Routes>\n * <Route path=\"/foo\" element={<Foo />} />\n * </Routes>\n * </UniversalRouter>\n * </body>\n * </html>\n * );\n *\n * This component lives on its own `@absolutejs/absolute/react/router`\n * subpath rather than the main `@absolutejs/absolute/react` barrel so the\n * static `import 'react-router'` below only loads for consumers who\n * actually use the router — importing `Head`/`Image`/`Island` from\n * `@absolutejs/absolute/react` does not pull react-router into the bundle,\n * so projects that don't route aren't forced to install it.\n *\n * `<BrowserRouter>` reads `window.history` at construction, so it throws\n * if instantiated on the server. The `typeof window` check has to live at\n * render time (not import time) because the module is loaded in both\n * environments. */\nexport const UniversalRouter = ({ url, children }: UniversalRouterProps) => {\n\tif (typeof window === 'undefined') {\n\t\treturn createElement(StaticRouter, { location: url ?? '/' }, children);\n\t}\n\n\treturn createElement(BrowserRouter, null, children);\n};\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4CO,IAAM,kBAAkB,GAAG,KAAK,eAAqC;AAAA,EAC3E,IAAI,OAAO,WAAW,aAAa;AAAA,IAClC,OAAO,cAAc,cAAc,EAAE,UAAU,OAAO,IAAI,GAAG,QAAQ;AAAA,EACtE;AAAA,EAEA,OAAO,cAAc,eAAe,MAAM,QAAQ;AAAA;",
8
- "debugId": "9785C1C2D083082064756E2164756E21",
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4CO,IAAM,kBAAkB,GAAG,KAAK,eAAqC;AAAA,EAC3E,IAAI,OAAO,WAAW,aAAa;AAAA,IAClC,OAAO,cAAc,cAAc,EAAE,UAAU,OAAO,IAAI,GAAG,QAAQ;AAAA,EACtE;AAAA,EAEA,OAAO,cAAc,eAAe,MAAM,QAAQ;AAAA;",
8
+ "debugId": "83C2A10A433A92F464756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -3,7 +3,6 @@ var __create = Object.create;
3
3
  var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
7
  function __accessProp(key) {
9
8
  return this[key];
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
30
29
  cache.set(mod, to);
31
30
  return to;
32
31
  };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
33
  var __returnValue = (v) => v;
52
34
  function __exportSetter(name, newValue) {
@@ -91,5 +73,5 @@ export {
91
73
  UniversalRouter
92
74
  };
93
75
 
94
- //# debugId=C66D8416C656662B64756E2164756E21
76
+ //# debugId=72E041D68FC9B52864756E2164756E21
95
77
  //# sourceMappingURL=index.js.map
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "import { createElement, type ReactNode } from 'react';\nimport { BrowserRouter, StaticRouter } from 'react-router';\n\nexport type UniversalRouterProps = {\n\t/** The request URL to seed `<StaticRouter>` with on the server. Pages\n\t * typically forward `props.url` (auto-injected by handleReactPageRequest\n\t * from `request.url`). Ignored in the browser, where `<BrowserRouter>`\n\t * reads `window.location` directly. Defaults to '/'. */\n\turl?: string;\n\tchildren?: ReactNode;\n};\n\n/** SSR-safe wrapper around react-router that picks `<StaticRouter>` on the\n * server and `<BrowserRouter>` in the browser. Without it, every SPA page\n * has to write its own `typeof window === 'undefined'` branch and import\n * both routers — boilerplate that's the same in every page.\n *\n * Usage:\n *\n * import { UniversalRouter } from '@absolutejs/absolute/react/router';\n *\n * export const MySpa = ({ url }: { url?: string }) => (\n * <html>\n * <Head />\n * <body>\n * <UniversalRouter url={url}>\n * <Routes>\n * <Route path=\"/foo\" element={<Foo />} />\n * </Routes>\n * </UniversalRouter>\n * </body>\n * </html>\n * );\n *\n * This component lives on its own `@absolutejs/absolute/react/router`\n * subpath rather than the main `@absolutejs/absolute/react` barrel so the\n * static `import 'react-router'` below only loads for consumers who\n * actually use the router — importing `Head`/`Image`/`Island` from\n * `@absolutejs/absolute/react` does not pull react-router into the bundle,\n * so projects that don't route aren't forced to install it.\n *\n * `<BrowserRouter>` reads `window.history` at construction, so it throws\n * if instantiated on the server. The `typeof window` check has to live at\n * render time (not import time) because the module is loaded in both\n * environments. */\nexport const UniversalRouter = ({ url, children }: UniversalRouterProps) => {\n\tif (typeof window === 'undefined') {\n\t\treturn createElement(StaticRouter, { location: url ?? '/' }, children);\n\t}\n\n\treturn createElement(BrowserRouter, null, children);\n};\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4CO,IAAM,kBAAkB,GAAG,KAAK,eAAqC;AAAA,EAC3E,IAAI,OAAO,WAAW,aAAa;AAAA,IAClC,OAAO,cAAc,cAAc,EAAE,UAAU,OAAO,IAAI,GAAG,QAAQ;AAAA,EACtE;AAAA,EAEA,OAAO,cAAc,eAAe,MAAM,QAAQ;AAAA;",
8
- "debugId": "C66D8416C656662B64756E2164756E21",
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4CO,IAAM,kBAAkB,GAAG,KAAK,eAAqC;AAAA,EAC3E,IAAI,OAAO,WAAW,aAAa;AAAA,IAClC,OAAO,cAAc,cAAc,EAAE,UAAU,OAAO,IAAI,GAAG,QAAQ;AAAA,EACtE;AAAA,EAEA,OAAO,cAAc,eAAe,MAAM,QAAQ;AAAA;",
8
+ "debugId": "72E041D68FC9B52864756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -3,7 +3,6 @@ var __create = Object.create;
3
3
  var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
7
  function __accessProp(key) {
9
8
  return this[key];
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
30
29
  cache.set(mod, to);
31
30
  return to;
32
31
  };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
33
  var __returnValue = (v) => v;
52
34
  function __exportSetter(name, newValue) {
@@ -88,22 +70,20 @@ __export(exports_devRouteRegistrationCallsite, {
88
70
  });
89
71
  import { AsyncLocalStorage } from "async_hooks";
90
72
  import { Elysia } from "elysia";
91
- var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
73
+ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, isPageHandlerFunction = (value) => typeof value === "function", handlerSourceMentionsPageHelper = (handler) => {
92
74
  const source = handler.toString();
93
75
  return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
94
76
  }, getOriginalPageHandlerSource = (handler) => {
95
- if (typeof handler !== "function")
77
+ if (!isPageHandlerFunction(handler))
96
78
  return;
97
- const fn = handler;
98
- const info = pageHandlerWrappers.get(fn);
99
- return (info?.originalHandler ?? fn).toString();
79
+ const info = pageHandlerWrappers.get(handler);
80
+ return (info?.originalHandler ?? handler).toString();
100
81
  }, isPageHandler = (handler) => {
101
- if (typeof handler !== "function")
82
+ if (!isPageHandlerFunction(handler))
102
83
  return false;
103
- const fn = handler;
104
- if (pageHandlerWrappers.has(fn))
84
+ if (pageHandlerWrappers.has(handler))
105
85
  return true;
106
- return handlerSourceMentionsPageHelper(fn);
86
+ return handlerSourceMentionsPageHelper(handler);
107
87
  }, 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 = () => {
108
88
  const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
109
89
  if (value === null || typeof value === "undefined") {
@@ -140,7 +120,7 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
140
120
  }, createPatchedRouteMethod = (originalMethod, methodName) => function patchedRouteMethod(path, handler, ...rest) {
141
121
  const callsite = captureRouteRegistrationCallsite();
142
122
  const wrapped = wrapRouteHandlerWithCallsite(handler, callsite);
143
- if (methodName === "get" && typeof handler === "function" && typeof wrapped === "function" && handlerSourceMentionsPageHelper(handler)) {
123
+ if (methodName === "get" && isPageHandlerFunction(handler) && isPageHandlerFunction(wrapped) && handlerSourceMentionsPageHelper(handler)) {
144
124
  pageHandlerWrappers.set(wrapped, {
145
125
  originalHandler: handler
146
126
  });
@@ -1168,8 +1148,8 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
1168
1148
  }, isDev = () => true, buildErrorProps = (error) => {
1169
1149
  if (error instanceof Error) {
1170
1150
  return {
1171
- name: error.name,
1172
1151
  message: error.message,
1152
+ name: error.name,
1173
1153
  ...isDev() && error.stack ? { stack: error.stack } : {}
1174
1154
  };
1175
1155
  }
@@ -1253,7 +1233,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
1253
1233
  let conventionPath = resolveErrorConventionPath(framework, pageName);
1254
1234
  if (!conventionPath && error instanceof Error && error.stack) {
1255
1235
  for (const match of error.stack.matchAll(/^\s*at\s+([A-Za-z_$][\w$]*)/gm)) {
1256
- const candidate = match[1];
1236
+ const [, candidate] = match;
1257
1237
  if (!candidate)
1258
1238
  continue;
1259
1239
  conventionPath = resolveErrorConventionPath(framework, candidate);
@@ -1401,9 +1381,9 @@ var init_resolveConvention = __esm(() => {
1401
1381
  import { basename as basename2 } from "path";
1402
1382
  var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
1403
1383
  Reflect.set(globalThis, SPA_ROUTES_KEY, hosts);
1404
- }, getSpaRouteManifest = () => {
1384
+ }, isRuntimeSpaHost = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "framework") === "string", getSpaRouteManifest = () => {
1405
1385
  const value = Reflect.get(globalThis, SPA_ROUTES_KEY);
1406
- return Array.isArray(value) ? value : [];
1386
+ return Array.isArray(value) ? value.filter(isRuntimeSpaHost) : [];
1407
1387
  }, normalizePath = (path) => {
1408
1388
  const withLeadingSlash = path.startsWith("/") ? path : `/${path}`;
1409
1389
  const trimmed = withLeadingSlash.replace(/\/+$/, "");
@@ -1910,6 +1890,7 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
1910
1890
  // src/react/pageHandler.ts
1911
1891
  init_spaRouteManifest();
1912
1892
  init_resolveConvention();
1893
+ var withRequestUrl = (props, url) => Object.assign(Object.create(null), props, { url });
1913
1894
  var resolveRequestPathname = (request) => {
1914
1895
  if (!request)
1915
1896
  return;
@@ -1930,10 +1911,7 @@ var handleReactPageRequest = async (input) => {
1930
1911
  const options = input;
1931
1912
  const userProps = input.props;
1932
1913
  const requestPathname = resolveRequestPathname(input.request);
1933
- const maybeProps = requestPathname !== undefined && (!userProps || !("url" in userProps)) ? {
1934
- ...userProps ?? {},
1935
- url: requestPathname
1936
- } : userProps;
1914
+ const maybeProps = requestPathname !== undefined && (!userProps || !("url" in userProps)) ? withRequestUrl(userProps, requestPathname) : userProps;
1937
1915
  const pageName = Page.name || Page.displayName || "";
1938
1916
  try {
1939
1917
  const spaNotFound = await renderSpaNotFound("react", pageName, input.request);
@@ -1984,5 +1962,5 @@ export {
1984
1962
  handleReactPageRequest
1985
1963
  };
1986
1964
 
1987
- //# debugId=C6A90A3BEC2CC84964756E2164756E21
1965
+ //# debugId=685C0C4025F0697E64756E2164756E21
1988
1966
  //# sourceMappingURL=server.js.map