one 1.1.311 → 1.1.313

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. package/dist/cjs/cleanUrl.cjs +3 -8
  2. package/dist/cjs/cleanUrl.cjs.map +2 -2
  3. package/dist/cjs/cleanUrl.native.js +5 -8
  4. package/dist/cjs/cleanUrl.native.js.map +2 -2
  5. package/dist/cjs/cli.cjs +0 -2
  6. package/dist/cjs/cli.cjs.map +1 -1
  7. package/dist/cjs/cli.native.js +1 -2
  8. package/dist/cjs/cli.native.js.map +2 -2
  9. package/dist/cjs/config.cjs +1 -1
  10. package/dist/cjs/config.native.js +1 -1
  11. package/dist/cjs/config.native.js.map +1 -1
  12. package/dist/cjs/constants.cjs +9 -1
  13. package/dist/cjs/constants.cjs.map +1 -1
  14. package/dist/cjs/constants.native.js +9 -1
  15. package/dist/cjs/constants.native.js.map +2 -2
  16. package/dist/cjs/createApp.native.cjs +1 -1
  17. package/dist/cjs/createApp.native.js +1 -1
  18. package/dist/cjs/createApp.native.js.map +1 -1
  19. package/dist/cjs/createHandleRequest.cjs +2 -1
  20. package/dist/cjs/createHandleRequest.cjs.map +1 -1
  21. package/dist/cjs/createHandleRequest.native.js +2 -2
  22. package/dist/cjs/createHandleRequest.native.js.map +2 -2
  23. package/dist/cjs/matchers.cjs +1 -1
  24. package/dist/cjs/matchers.cjs.map +1 -1
  25. package/dist/cjs/matchers.native.js +1 -1
  26. package/dist/cjs/matchers.native.js.map +1 -1
  27. package/dist/cjs/serve.cjs +36 -22
  28. package/dist/cjs/serve.cjs.map +2 -2
  29. package/dist/cjs/serve.native.js +18 -19
  30. package/dist/cjs/serve.native.js.map +2 -2
  31. package/dist/cjs/useLoader.cjs +1 -1
  32. package/dist/cjs/useLoader.native.js +1 -1
  33. package/dist/cjs/vite/build.cjs +8 -4
  34. package/dist/cjs/vite/build.cjs.map +1 -1
  35. package/dist/cjs/vite/build.native.js +5 -2
  36. package/dist/cjs/vite/build.native.js.map +2 -2
  37. package/dist/cjs/vite/clientTreeShakePlugin.cjs +1 -1
  38. package/dist/cjs/vite/clientTreeShakePlugin.native.js +1 -1
  39. package/dist/cjs/vite/createFileSystemRouter.cjs +1 -1
  40. package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
  41. package/dist/cjs/vite/one.cjs +43 -14
  42. package/dist/cjs/vite/one.cjs.map +1 -1
  43. package/dist/cjs/vite/one.native.js +39 -12
  44. package/dist/cjs/vite/one.native.js.map +2 -2
  45. package/dist/cjs/vite/virtualEntryPlugin.cjs +5 -5
  46. package/dist/cjs/vite/virtualEntryPlugin.native.js +5 -5
  47. package/dist/cjs/vite/virtualEntryPlugin.native.js.map +1 -1
  48. package/dist/cjs/vite/vitePluginSsrCss.cjs +1 -1
  49. package/dist/cjs/vite/vitePluginSsrCss.native.js +1 -1
  50. package/dist/esm/cleanUrl.js +10 -9
  51. package/dist/esm/cleanUrl.js.map +1 -1
  52. package/dist/esm/cleanUrl.mjs +4 -9
  53. package/dist/esm/cleanUrl.mjs.map +1 -1
  54. package/dist/esm/cleanUrl.native.js +5 -9
  55. package/dist/esm/cleanUrl.native.js.map +2 -2
  56. package/dist/esm/cli.js +0 -2
  57. package/dist/esm/cli.js.map +1 -1
  58. package/dist/esm/cli.mjs +0 -2
  59. package/dist/esm/cli.mjs.map +1 -1
  60. package/dist/esm/cli.native.js +0 -2
  61. package/dist/esm/cli.native.js.map +2 -2
  62. package/dist/esm/config.js +1 -1
  63. package/dist/esm/config.mjs +1 -1
  64. package/dist/esm/config.mjs.map +1 -1
  65. package/dist/esm/config.native.js +1 -1
  66. package/dist/esm/config.native.js.map +1 -1
  67. package/dist/esm/constants.js +5 -1
  68. package/dist/esm/constants.js.map +1 -1
  69. package/dist/esm/constants.mjs +6 -2
  70. package/dist/esm/constants.mjs.map +1 -1
  71. package/dist/esm/constants.native.js +5 -1
  72. package/dist/esm/constants.native.js.map +2 -2
  73. package/dist/esm/createApp.native.js +1 -1
  74. package/dist/esm/createApp.native.js.map +1 -1
  75. package/dist/esm/createHandleRequest.js +2 -1
  76. package/dist/esm/createHandleRequest.js.map +1 -1
  77. package/dist/esm/createHandleRequest.mjs +2 -1
  78. package/dist/esm/createHandleRequest.mjs.map +1 -1
  79. package/dist/esm/createHandleRequest.native.js +2 -1
  80. package/dist/esm/createHandleRequest.native.js.map +2 -2
  81. package/dist/esm/matchers.js +1 -1
  82. package/dist/esm/matchers.js.map +1 -1
  83. package/dist/esm/matchers.mjs +1 -1
  84. package/dist/esm/matchers.mjs.map +1 -1
  85. package/dist/esm/matchers.native.js +1 -1
  86. package/dist/esm/matchers.native.js.map +1 -1
  87. package/dist/esm/serve.js +12 -15
  88. package/dist/esm/serve.js.map +1 -1
  89. package/dist/esm/serve.mjs +30 -16
  90. package/dist/esm/serve.mjs.map +1 -1
  91. package/dist/esm/serve.native.js +13 -21
  92. package/dist/esm/serve.native.js.map +2 -2
  93. package/dist/esm/useLoader.js +1 -1
  94. package/dist/esm/useLoader.mjs +1 -1
  95. package/dist/esm/useLoader.native.js +1 -1
  96. package/dist/esm/vite/build.js +4 -2
  97. package/dist/esm/vite/build.js.map +1 -1
  98. package/dist/esm/vite/build.mjs +6 -2
  99. package/dist/esm/vite/build.mjs.map +1 -1
  100. package/dist/esm/vite/build.native.js +6 -2
  101. package/dist/esm/vite/build.native.js.map +2 -2
  102. package/dist/esm/vite/clientTreeShakePlugin.js +1 -1
  103. package/dist/esm/vite/clientTreeShakePlugin.mjs +1 -1
  104. package/dist/esm/vite/clientTreeShakePlugin.native.js +1 -1
  105. package/dist/esm/vite/createFileSystemRouter.js +1 -1
  106. package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
  107. package/dist/esm/vite/createFileSystemRouter.native.js +1 -1
  108. package/dist/esm/vite/one.js +43 -14
  109. package/dist/esm/vite/one.js.map +1 -1
  110. package/dist/esm/vite/one.mjs +43 -14
  111. package/dist/esm/vite/one.mjs.map +1 -1
  112. package/dist/esm/vite/one.native.js +41 -14
  113. package/dist/esm/vite/one.native.js.map +2 -2
  114. package/dist/esm/vite/virtualEntryPlugin.js +5 -5
  115. package/dist/esm/vite/virtualEntryPlugin.mjs +5 -5
  116. package/dist/esm/vite/virtualEntryPlugin.mjs.map +1 -1
  117. package/dist/esm/vite/virtualEntryPlugin.native.js +5 -5
  118. package/dist/esm/vite/virtualEntryPlugin.native.js.map +1 -1
  119. package/dist/esm/vite/vitePluginSsrCss.js +1 -1
  120. package/dist/esm/vite/vitePluginSsrCss.mjs +1 -1
  121. package/dist/esm/vite/vitePluginSsrCss.native.js +1 -1
  122. package/package.json +8 -8
  123. package/src/cleanUrl.ts +10 -14
  124. package/src/cli.ts +0 -3
  125. package/src/config.ts +1 -1
  126. package/src/constants.ts +6 -0
  127. package/src/createApp.native.tsx +2 -2
  128. package/src/createHandleRequest.ts +2 -1
  129. package/src/matchers.ts +1 -1
  130. package/src/serve.ts +31 -16
  131. package/src/useLoader.ts +1 -1
  132. package/src/vite/build.ts +4 -1
  133. package/src/vite/clientTreeShakePlugin.ts +1 -1
  134. package/src/vite/createFileSystemRouter.tsx +1 -1
  135. package/src/vite/one.ts +44 -11
  136. package/src/vite/types.ts +5 -1
  137. package/src/vite/virtualEntryPlugin.ts +5 -5
  138. package/src/vite/vitePluginSsrCss.ts +1 -1
  139. package/types/cleanUrl.d.ts.map +1 -1
  140. package/types/constants.d.ts +4 -0
  141. package/types/constants.d.ts.map +1 -1
  142. package/types/createHandleRequest.d.ts.map +1 -1
  143. package/types/serve.d.ts.map +1 -1
  144. package/types/vite/build.d.ts.map +1 -1
  145. package/types/vite/one.d.ts.map +1 -1
  146. package/types/vite/types.d.ts +5 -1
  147. package/types/vite/types.d.ts.map +1 -1
  148. package/dist/cjs/router/constants.cjs +0 -26
  149. package/dist/cjs/router/constants.cjs.map +0 -6
  150. package/dist/cjs/router/constants.native.js +0 -26
  151. package/dist/cjs/router/constants.native.js.map +0 -6
  152. package/dist/cjs/vite/loadEnv.cjs +0 -47
  153. package/dist/cjs/vite/loadEnv.cjs.map +0 -6
  154. package/dist/cjs/vite/loadEnv.native.js +0 -44
  155. package/dist/cjs/vite/loadEnv.native.js.map +0 -6
  156. package/dist/esm/router/constants.js +0 -5
  157. package/dist/esm/router/constants.js.map +0 -6
  158. package/dist/esm/router/constants.mjs +0 -3
  159. package/dist/esm/router/constants.mjs.map +0 -1
  160. package/dist/esm/router/constants.native.js +0 -5
  161. package/dist/esm/router/constants.native.js.map +0 -6
  162. package/dist/esm/vite/loadEnv.js +0 -13
  163. package/dist/esm/vite/loadEnv.js.map +0 -6
  164. package/dist/esm/vite/loadEnv.mjs +0 -13
  165. package/dist/esm/vite/loadEnv.mjs.map +0 -1
  166. package/dist/esm/vite/loadEnv.native.js +0 -16
  167. package/dist/esm/vite/loadEnv.native.js.map +0 -6
  168. package/src/router/constants.ts +0 -4
  169. package/src/vite/loadEnv.ts +0 -11
  170. package/types/router/constants.d.ts +0 -2
  171. package/types/router/constants.d.ts.map +0 -1
  172. package/types/vite/loadEnv.d.ts +0 -2
  173. package/types/vite/loadEnv.d.ts.map +0 -1
@@ -1,5 +1,9 @@
1
1
  const isWebClient = typeof window < "u",
2
2
  isWebServer = typeof window > "u",
3
- isNative = !1;
4
- export { isNative, isWebClient, isWebServer };
3
+ isNative = !1,
4
+ CACHE_KEY = `${process.env.ONE_CACHE_KEY ?? Math.round(Math.random() * 1e8)}`,
5
+ LOADER_JS_POSTFIX_UNCACHED = "_vxrn_loader.js",
6
+ LOADER_JS_POSTFIX = `_${CACHE_KEY}${LOADER_JS_POSTFIX_UNCACHED}`,
7
+ PRELOAD_JS_POSTFIX = `_${CACHE_KEY}_preload.js`;
8
+ export { CACHE_KEY, LOADER_JS_POSTFIX, LOADER_JS_POSTFIX_UNCACHED, PRELOAD_JS_POSTFIX, isNative, isWebClient, isWebServer };
5
9
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["isWebClient","window","isWebServer","isNative"],"sources":["../../src/constants.ts"],"sourcesContent":[null],"mappings":"AAAO,MAAMA,WAAA,GAAyD,OAAOC,MAAA,GAAW;EAC3EC,WAAA,GAAyD,OAAOD,MAAA,GAAW;EAC3EE,QAAA,GAAW","ignoreList":[]}
1
+ {"version":3,"names":["isWebClient","window","isWebServer","isNative","CACHE_KEY","process","env","ONE_CACHE_KEY","Math","round","random","LOADER_JS_POSTFIX_UNCACHED","LOADER_JS_POSTFIX","PRELOAD_JS_POSTFIX"],"sources":["../../src/constants.ts"],"sourcesContent":[null],"mappings":"AAAO,MAAMA,WAAA,GAAyD,OAAOC,MAAA,GAAW;EAC3EC,WAAA,GAAyD,OAAOD,MAAA,GAAW;EAC3EE,QAAA,GAAW;EAEXC,SAAA,GAAY,GAAGC,OAAA,CAAQC,GAAA,CAAIC,aAAA,IAAiBC,IAAA,CAAKC,KAAA,CAAMD,IAAA,CAAKE,MAAA,CAAO,IAAI,GAAW,CAAC;EAEnFC,0BAAA,GAA6B;EAC7BC,iBAAA,GAAoB,IAAIR,SAAS,GAAGO,0BAA0B;EAC9DE,kBAAA,GAAqB,IAAIT,SAAS","ignoreList":[]}
@@ -1,5 +1,9 @@
1
- var isWebClient = !1, isWebServer = !1, isNative = !0;
1
+ var isWebClient = !1, isWebServer = !1, isNative = !0, _process_env_ONE_CACHE_KEY, CACHE_KEY = `${(_process_env_ONE_CACHE_KEY = process.env.ONE_CACHE_KEY) !== null && _process_env_ONE_CACHE_KEY !== void 0 ? _process_env_ONE_CACHE_KEY : Math.round(Math.random() * 1e8)}`, LOADER_JS_POSTFIX_UNCACHED = "_vxrn_loader.js", LOADER_JS_POSTFIX = `_${CACHE_KEY}${LOADER_JS_POSTFIX_UNCACHED}`, PRELOAD_JS_POSTFIX = `_${CACHE_KEY}_preload.js`;
2
2
  export {
3
+ CACHE_KEY,
4
+ LOADER_JS_POSTFIX,
5
+ LOADER_JS_POSTFIX_UNCACHED,
6
+ PRELOAD_JS_POSTFIX,
3
7
  isNative,
4
8
  isWebClient,
5
9
  isWebServer
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/constants.ts"],
4
- "mappings": "AAAO,IAAMA,cAAcC,IACdC,cAAcD,IACdE,WAAWF;",
5
- "names": ["isWebClient", "process", "isWebServer", "isNative"]
4
+ "mappings": "AAAO,IAAMA,cAAcC,IACdC,cAAcD,IACdE,WAAWF,IAEIA,4BAAfG,YAAY,IAAGH,6BAAAA,QAAQI,IAAIC,mBAAa,QAAzBL,+BAAAA,SAAAA,6BAA6BM,KAAKC,MAAMD,KAAKE,OAAM,IAAK,GAAA,CAAA,IAEvEC,6BAA6B,mBAC7BC,oBAAoB,IAAIP,SAAAA,GAAYM,0BAAAA,IACpCE,qBAAqB,IAAIR,SAAAA;",
5
+ "names": ["isWebClient", "process", "isWebServer", "isNative", "CACHE_KEY", "env", "ONE_CACHE_KEY", "Math", "round", "random", "LOADER_JS_POSTFIX_UNCACHED", "LOADER_JS_POSTFIX", "PRELOAD_JS_POSTFIX"]
6
6
  }
@@ -17,7 +17,7 @@ function createApp(options) {
17
17
  return App;
18
18
  }), AppRegistry.registerComponent("tamaguikitchensink", function() {
19
19
  return App;
20
- }), process.env.One_APP_NAME && AppRegistry.registerComponent(process.env.One_APP_NAME, function() {
20
+ }), process.env.ONE_APP_NAME && AppRegistry.registerComponent(process.env.ONE_APP_NAME, function() {
21
21
  return App;
22
22
  });
23
23
  }
@@ -2,5 +2,5 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/createApp.native.tsx"],
4
4
  "mappings": ";AAAA,OAAO;AACP,SAASA,YAAY;AACrB,SAASC,aAAaC,cAAc;AAKpCA,OAAOC,WAAW;EAAC;CAA0C;AAEtD,SAASC,UAAUC,SAAuB;AAC/C,MAAMC,MAAM,WAAA;WAAM,qBAACN,MAAAA;MAAKO,UAAQ;MAACC,QAAQH,QAAQG;MAAQC,MAAK;;;AAE9DR,cAAYS,kBAAkB,QAAQ,WAAA;WAAMJ;MAG5CL,YAAYS,kBAAkB,sBAAsB,WAAA;WAAMJ;MAEtDK,QAAQC,IAAIC,gBACdZ,YAAYS,kBAAkBC,QAAQC,IAAIC,cAAc,WAAA;WAAMP;;AAElE;",
5
- "names": ["Root", "AppRegistry", "LogBox", "ignoreLogs", "createApp", "options", "App", "isClient", "routes", "path", "registerComponent", "process", "env", "One_APP_NAME"]
5
+ "names": ["Root", "AppRegistry", "LogBox", "ignoreLogs", "createApp", "options", "App", "isClient", "routes", "path", "registerComponent", "process", "env", "ONE_APP_NAME"]
6
6
  }
@@ -1,4 +1,5 @@
1
1
  import { getPathFromLoaderPath } from "./cleanUrl";
2
+ import { LOADER_JS_POSTFIX_UNCACHED } from "./constants";
2
3
  import { isResponse } from "./utils/isResponse";
3
4
  import { promiseWithResolvers } from "./utils/promiseWithResolvers";
4
5
  import { getManifest } from "./vite/getManifest";
@@ -44,7 +45,7 @@ function createHandleRequest(options, handlers) {
44
45
  }
45
46
  if (request.method !== "GET")
46
47
  return null;
47
- if (handlers.handleLoader && pathname.endsWith("_vxrn_loader.js")) {
48
+ if (handlers.handleLoader && pathname.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {
48
49
  const originalUrl = getPathFromLoaderPath(pathname), finalUrl = new URL(originalUrl, url.origin);
49
50
  for (const route of pageRoutes) {
50
51
  if (route.file === "" || !route.workingRegex.test(finalUrl.pathname))
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createHandleRequest.ts"],
4
- "mappings": "AAAA,SAAS,6BAA6B;AAEtC,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAYrB,SAAS,oBACd,SACA,UAKA;AACA,QAAM,WAAW,YAAY;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oBAAoB;AAGtC,QAAM,eACJ,SAAS,UAAU,OAAO,CAAC,KAAK,SAC9B,IAAI,IAAI,IAAI,IAAI,EAAE,GAAG,KAAK,eAAe,IAAI,OAAO,IAAI,UAAU,EAAE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,MAAM,MAAM,GAAG;AACvD,YAAM,WAAW,OAAO,UAAU,GAAG;AACrC,aAAO,QAAQ,IAAI;AAAA,IACrB;AAEF,SAAO;AACT;AAGA,SAAS,eAAe,UAAkB,OAA0B;AAElE,QAAM,QADQ,IAAI,OAAO,MAAM,UAAU,EACrB,KAAK,QAAQ;AACjC,SAAK,QACE,OAAO;AAAA,IACZ,OAAO,QAAQ,MAAM,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,CAAC,CAAC;AAAA,EACpF,IAHmB,CAAC;AAItB;",
5
5
  "names": []
6
6
  }
@@ -1,4 +1,5 @@
1
1
  import { getPathFromLoaderPath } from "./cleanUrl.mjs";
2
+ import { LOADER_JS_POSTFIX_UNCACHED } from "./constants.mjs";
2
3
  import { isResponse } from "./utils/isResponse.mjs";
3
4
  import { promiseWithResolvers } from "./utils/promiseWithResolvers.mjs";
4
5
  import { getManifest } from "./vite/getManifest.mjs";
@@ -47,7 +48,7 @@ function createHandleRequest(options, handlers) {
47
48
  }
48
49
  }
49
50
  if (request.method !== "GET") return null;
50
- if (handlers.handleLoader && pathname.endsWith("_vxrn_loader.js")) {
51
+ if (handlers.handleLoader && pathname.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {
51
52
  const originalUrl = getPathFromLoaderPath(pathname),
52
53
  finalUrl = new URL(originalUrl, url.origin);
53
54
  for (const route of pageRoutes) {
@@ -1 +1 @@
1
- {"version":3,"names":["getPathFromLoaderPath","isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","manifest","Error","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","env","NODE_ENV","startsWith","handleAPI","apiRoute","find","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","endsWith","originalUrl","finalUrl","origin","file","console","info","Headers","set","loaderResponse","getLoaderParams","Response","error","routes","handleSSR","promise","reject","resolve","ssrResponse","config","match","exec","groups","key","value","entries","namedKey","routeKeys","fromEntries"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,qBAAA,QAA6B;AAEtC,SAASC,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;EACA,MAAMC,QAAA,GAAWJ,WAAA,CAAY;EAC7B,IAAI,CAACI,QAAA,EACH,MAAM,IAAIC,KAAA,CAAM,oBAAoB;EAGtC,MAAMC,YAAA,GACJF,QAAA,CAASG,SAAA,CAAUC,MAAA,CAAO,CAACC,GAAA,EAAKC,GAAA,MAC9BD,GAAA,CAAIC,GAAA,CAAIC,IAAI,IAAI;MAAE,GAAGD,GAAA;MAAKE,aAAA,EAAe,IAAIC,MAAA,CAAOH,GAAA,CAAII,UAAU;IAAE,GAC7DL,GAAA,GACN,CAAC,CAAC;IAEDM,aAAA,GAAgBC,MAAA,CAAOC,MAAA,CAAOX,YAAY;IAK1CY,cAAA,GAAiB,CAAC;IAGlBC,UAAA,GAAaf,QAAA,CAASe,UAAA,CAAWC,GAAA,CAAKC,KAAA,KAAW;MACrD,GAAGA,KAAA;MACHC,YAAA,EAAc,IAAIT,MAAA,CAAOQ,KAAA,CAAMP,UAAU;IAC3C,EAAE;EAEF,OAAO;IACLV,QAAA;IACAmB,OAAA,EAAS,eAAAA,CAA6BC,OAAA,EAAmD;MACvF,MAAMC,SAAA,GAAYD,OAAA,CAAQE,GAAA,IAAO;QAC3BA,GAAA,GAAM,IAAIC,GAAA,CACdF,SAAA,IAAa,IACbD,OAAA,CAAQI,OAAA,CAAQC,GAAA,CAAI,MAAM,IAAI,UAAUL,OAAA,CAAQI,OAAA,CAAQC,GAAA,CAAI,MAAM,CAAC,KAAK,EAC1E;QACM;UAAEC,QAAA;UAAUC;QAAO,IAAIL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NCACHED","isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","manifest","Error","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","env","NODE_ENV","startsWith","handleAPI","apiRoute","find","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","endsWith","originalUrl","finalUrl","origin","file","console","info","Headers","set","loaderResponse","getLoaderParams","Response","error","routes","handleSSR","promise","reject","resolve","ssrResponse","config","match","exec","groups","key","value","entries","namedKey","routeKeys","fromEntries"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,qBAAA,QAA6B;AACtC,SAA4BC,0BAAA,QAAkC;AAE9D,SAASC,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;EACA,MAAMC,QAAA,GAAWJ,WAAA,CAAY;EAC7B,IAAI,CAACI,QAAA,EACH,MAAM,IAAIC,KAAA,CAAM,oBAAoB;EAGtC,MAAMC,YAAA,GACJF,QAAA,CAASG,SAAA,CAAUC,MAAA,CAAO,CAACC,GAAA,EAAKC,GAAA,MAC9BD,GAAA,CAAIC,GAAA,CAAIC,IAAI,IAAI;MAAE,GAAGD,GAAA;MAAKE,aAAA,EAAe,IAAIC,MAAA,CAAOH,GAAA,CAAII,UAAU;IAAE,GAC7DL,GAAA,GACN,CAAC,CAAC;IAEDM,aAAA,GAAgBC,MAAA,CAAOC,MAAA,CAAOX,YAAY;IAK1CY,cAAA,GAAiB,CAAC;IAGlBC,UAAA,GAAaf,QAAA,CAASe,UAAA,CAAWC,GAAA,CAAKC,KAAA,KAAW;MACrD,GAAGA,KAAA;MACHC,YAAA,EAAc,IAAIT,MAAA,CAAOQ,KAAA,CAAMP,UAAU;IAC3C,EAAE;EAEF,OAAO;IACL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KtC,QAAQ;EACjC,OAAKqC,KAAA,GACEnD,MAAA,CAAO2D,WAAA,CACZ3D,MAAA,CAAOwD,OAAA,CAAQnD,KAAA,CAAMqD,SAAS,EAAEtD,GAAA,CAAI,CAAC,CAACkD,GAAA,EAAKC,KAAK,MAAM,CAACA,KAAA,EAAOJ,KAAA,CAAME,MAAA,GAASC,GAAG,CAAC,CAAC,CACpF,IAHmB,CAAC;AAItB","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  import { getPathFromLoaderPath } from "./cleanUrl";
2
+ import { LOADER_JS_POSTFIX_UNCACHED } from "./constants";
2
3
  import { isResponse } from "./utils/isResponse";
3
4
  import { promiseWithResolvers } from "./utils/promiseWithResolvers";
4
5
  import { getManifest } from "./vite/getManifest";
@@ -52,7 +53,7 @@ function createHandleRequest(options, handlers) {
52
53
  if (request.method !== "GET")
53
54
  return null;
54
55
  if (handlers.handleLoader) {
55
- var isClientRequestingNewRoute = pathname.endsWith("_vxrn_loader.js");
56
+ var isClientRequestingNewRoute = pathname.endsWith(LOADER_JS_POSTFIX_UNCACHED);
56
57
  if (isClientRequestingNewRoute) {
57
58
  var originalUrl = getPathFromLoaderPath(pathname), finalUrl = new URL(originalUrl, url.origin), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
58
59
  try {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/createHandleRequest.ts"],
4
- "mappings": "AAAA,SAASA,6BAA6B;AAEtC,SAASC,kBAAkB;AAC3B,SAASC,4BAA4B;AACrC,SAASC,mBAAmB;AAYrB,SAASC,oBACdC,SACAC,UAIC;AAED,MAAMC,WAAWJ,YAAAA;AACjB,MAAI,CAACI;AACH,UAAM,IAAIC,MAAM,oBAAoB;AAGtC,MAAMC,eACJF,SAASG,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eA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P;AACA,SAAOjC;AACT;AAGA,SAASC,eAAeZ,UAAkBT,OAAwB;AAChE,MAAMkB,QAAQ,IAAI1B,OAAOQ,MAAMP,UAAU,GACnCuD,QAAQ9B,MAAM+B,KAAKxC,QAAAA;AACzB,SAAKuC,QACErD,OAAO6D,YACZ7D,OAAOwD,QAAQnD,MAAMuD,SAAS,EAAExD,IAAI,SAAA,OAAA;QAAC,CAACqD,KAAKC,KAAAA,IAAM,OAAaL;WAAR;MAACK;OAAOL,gBAAAA,MAAME,YAAM,QAAZF,kBAAAA,SAAAA,SAAAA,cAAeI,GAAAA;;QAF5D,CAAC;AAItB;",
5
- "names": ["getPathFromLoaderPath", "isResponse", "promiseWithResolvers", "getManifest", "createHandleRequest", "options", "handlers", "manifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "ssrResponse", "config", "match", "exec", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
4
+ "mappings": "AAAA,SAASA,6BAA6B;AACtC,SAA4BC,kCAAkC;AAE9D,SAASC,kBAAkB;AAC3B,SAASC,4BAA4B;AACrC,SAASC,mBAAmB;AAYrB,SAASC,oBACdC,SACAC,UAIC;AAED,MAAMC,WAAWJ,YAAAA;AACjB,MAAI,CAACI;AACH,UAAM,IAAIC,MAAM,oBAAoB;AAGtC,MAAMC,eACJF,SAASG,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,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AA,UAAA,OAAA;;YAAA;gBAAA;;;EAIP;AACA,SAAOjC;AACT;AAGA,SAASC,eAAeZ,UAAkBT,OAAwB;AAChE,MAAMkB,QAAQ,IAAI1B,OAAOQ,MAAMP,UAAU,GACnCuD,QAAQ9B,MAAM+B,KAAKxC,QAAAA;AACzB,SAAKuC,QACErD,OAAO6D,YACZ7D,OAAOwD,QAAQnD,MAAMuD,SAAS,EAAExD,IAAI,SAAA,OAAA;QAAC,CAACqD,KAAKC,KAAAA,IAAM,OAAaL;WAAR;MAACK;OAAOL,gBAAAA,MAAME,YAAM,QAAZF,kBAAAA,SAAAA,SAAAA,cAAeI,GAAAA;;QAF5D,CAAC;AAItB;",
5
+ "names": ["getPathFromLoaderPath", "LOADER_JS_POSTFIX_UNCACHED", "isResponse", "promiseWithResolvers", "getManifest", "createHandleRequest", "options", "handlers", "manifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "ssrResponse", "config", "match", "exec", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
6
6
  }
@@ -11,7 +11,7 @@ function matchGroupName(name) {
11
11
  return name.match(/^(?:[^\\(\\)])*?\(([^\\/]+)\).*?$/)?.[1];
12
12
  }
13
13
  function matchArrayGroupName(name) {
14
- return name.match(/(?:[^\\(\\)])*?\(([^\\/]+,[^\\/]+)\).*?$/)?.[1];
14
+ return name.match(/(?:[^\\(\\)])*?\(?([^\\/\(\)]+,[^\\/\(\)]+)\)?.*?$/)?.[1];
15
15
  }
16
16
  function getNameFromFilePath(name) {
17
17
  return removeSupportedExtensions(removeFileSystemDots(name));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/matchers.ts"],
4
- "mappings": "AACO,SAAS,iBAAiB,MAAkC;AAGjE,SAAO,KAAK,MAAM,4BAA4B,IAAI,CAAC;AACrD;AAGO,SAAS,0BAA0B,MAAkC;AAC1E,SAAO,KAAK,MAAM,sBAAsB,IAAI,CAAC;AAC/C;AAGO,SAAS,aAAa,MAAuB;AAClD,SAAO,eAAe,KAAK,IAAI;AACjC;AAGO,SAAS,eAAe,MAAkC;AAC/D,SAAO,KAAK,MAAM,mCAAmC,IAAI,CAAC;AAC5D;AAGO,SAAS,oBAAoB,MAAc;AAChD,SAAO,KAAK,MAAM,0CAA0C,IAAI,CAAC;AACnE;AAEO,SAAS,oBAAoB,MAAsB;AACxD,SAAO,0BAA0B,qBAAqB,IAAI,CAAC;AAC7D;AAEO,SAAS,cAAc,MAAsB;AAGlD,QAAM,SAAS,MAAM,oBAAoB,IAAI;AAC7C,SAAK,OAAO,SAAS,SAAS,IAGvB,OAAO,QAAQ,eAAe,EAAE,IAF9B;AAGX;AAGO,SAAS,0BAA0B,MAAsB;AAC9D,SAAO,KAAK,QAAQ,qCAAqC,EAAE;AAC7D;AAGO,SAAS,qBAAqB,UAA0B;AAC7D,SAAO,SAAS,QAAQ,kBAAkB,EAAE;AAC9C;AAEO,SAAS,2BAA2B,MAAsB;AAC/D,SAAO,KACJ,MAAM,GAAG,EACT,OAAO,CAAC,KAAK,OACR,eAAe,CAAC,KAAK,QACvB,IAAI,KAAK,CAAC,GAEL,MACN,CAAC,CAAa,EAChB,KAAK,GAAG;AACb;AAEO,SAAS,+BAA+B,MAAsB;AACnE,SAAO,2BAA2B,IAAI,EAAE,QAAQ,aAAa,EAAE;AACjE;AAOO,SAAS,aAAa,MAAc;AACzC,SAAO,CAAC,KAAK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  return name.match(/^(?:[^\\(\\)])*?\(([^\\/]+)\).*?$/)?.[1];
12
12
  }
13
13
  function matchArrayGroupName(name) {
14
- return name.match(/(?:[^\\(\\)])*?\(([^\\/]+,[^\\/]+)\).*?$/)?.[1];
14
+ return name.match(/(?:[^\\(\\)])*?\(?([^\\/\(\)]+,[^\\/\(\)]+)\)?.*?$/)?.[1];
15
15
  }
16
16
  function getNameFromFilePath(name) {
17
17
  return removeSupportedExtensions(removeFileSystemDots(name));
@@ -1 +1 @@
1
- {"version":3,"names":["matchDynamicName","name","match","matchDeepDynamicRouteName","testNotFound","test","matchGroupName","matchArrayGroupName","getNameFromFilePath","removeSupportedExtensions","removeFileSystemDots","getContextKey","normal","endsWith","replace","filePath","stripGroupSegmentsFromPath","path","split","reduce","acc","v","push","join","stripInvisibleSegmentsFromPath","isTypedRoute","startsWith"],"sources":["../../src/matchers.ts"],"sourcesContent":[null],"mappings":"AACO,SAASA,iBAAiBC,IAAA,EAAkC;EAGjE,OAAOA,IAAA,CAAKC,KAAA,CAAM,4BAA4B,IAAI,CAAC;AACrD;AAGO,SAASC,0BAA0BF,IAAA,EAAkC;EAC1E,OAAOA,IAAA,CAAKC,KAAA,CAAM,sBAAsB,IAAI,CAAC;AAC/C;AAGO,SAASE,aAAaH,IAAA,EAAuB;EAClD,OAAO,eAAeI,IAAA,CAAKJ,IAAI;AACjC;AAGO,SAASK,eAAeL,IAAA,EAAkC;EAC/D,OAAOA,IAAA,CAAKC,KAAA,CAAM,mCAAmC,IAAI,CAAC;AAC5D;AAGO,SAASK,oBAAoBN,IAAA,EAAc;EAChD,OAAOA,IAAA,CAAKC,KAAA,CAAM,0CAA0C,IAAI,CAAC;AACnE;AAEO,SAASM,oBAAoBP,IAAA,EAAsB;EACxD,OAAOQ,yBAAA,CAA0BC,oBAAA,CAAqBT,IAAI,CAAC;AAC7D;AAEO,SAASU,cAAcV,IAAA,EAAsB;EAGlD,MAAMW,MAAA,GAAS,MAAMJ,mBAAA,CAAoBP,IAAI;EAC7C,OAAKW,MAAA,CAAOC,QAAA,CAAS,SAAS,IAGvBD,MAAA,CAAOE,OAAA,CAAQ,eAAe,EAAE,IAF9BF,MAAA;AAGX;AAGO,SAASH,0BAA0BR,IAAA,EAAsB;EAC9D,OAAOA,IAAA,CAAKa,OAAA,CAAQ,qCAAqC,EAAE;AAC7D;AAGO,SAASJ,qBAAqBK,QAAA,EAA0B;EAC7D,OAAOA,QAAA,CAASD,OAAA,CAAQ,kBAAkB,EAAE;AAC9C;AAEO,SAASE,2BAA2BC,IAAA,EAAsB;EAC/D,OAAOA,IAAA,CACJC,KAAA,CAAM,GAAG,EACTC,MAAA,CAAO,CAACC,GAAA,EAAKC,CAAA,MACRf,cAAA,CAAee,CAAC,KAAK,QACvBD,GAAA,CAAIE,IAAA,CAAKD,CAAC,GAELD,GAAA,GACN,EAAc,EAChBG,IAAA,CAAK,GAAG;AACb;AAEO,SAASC,+BAA+BP,IAAA,EAAsB;EACnE,OAAOD,0BAAA,CAA2BC,IAAI,EAAEH,OAAA,CAAQ,aAAa,EAAE;AACjE;AAOO,SAASW,aAAaxB,IAAA,EAAc;EACzC,OAAO,CAACA,IAAA,CAAKyB,UAAA,CAAW,GAAG,KAAKzB,IAAA,CAAKC,KAAA,CAAM,oCAAoC,MAAM;AACvF","ignoreList":[]}
1
+ {"version":3,"names":["matchDynamicName","name","match","matchDeepDynamicRouteName","testNotFound","test","matchGroupName","matchArrayGroupName","getNameFromFilePath","removeSupportedExtensions","removeFileSystemDots","getContextKey","normal","endsWith","replace","filePath","stripGroupSegmentsFromPath","path","split","reduce","acc","v","push","join","stripInvisibleSegmentsFromPath","isTypedRoute","startsWith"],"sources":["../../src/matchers.ts"],"sourcesContent":[null],"mappings":"AACO,SAASA,iBAAiBC,IAAA,EAAkC;EAGjE,OAAOA,IAAA,CAAKC,KAAA,CAAM,4BAA4B,IAAI,CAAC;AACrD;AAGO,SAASC,0BAA0BF,IAAA,EAAkC;EAC1E,OAAOA,IAAA,CA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AKyB,UAAA,CAAW,GAAG,KAAKzB,IAAA,CAAKC,KAAA,CAAM,oCAAoC,MAAM;AACvF","ignoreList":[]}
@@ -15,7 +15,7 @@ function matchGroupName(name) {
15
15
  }
16
16
  function matchArrayGroupName(name) {
17
17
  var _name_match;
18
- return (_name_match = name.match(/(?:[^\\(\\)])*?\(([^\\/]+,[^\\/]+)\).*?$/)) === null || _name_match === void 0 ? void 0 : _name_match[1];
18
+ return (_name_match = name.match(/(?:[^\\(\\)])*?\(?([^\\/\(\)]+,[^\\/\(\)]+)\)?.*?$/)) === null || _name_match === void 0 ? void 0 : _name_match[1];
19
19
  }
20
20
  function getNameFromFilePath(name) {
21
21
  return removeSupportedExtensions(removeFileSystemDots(name));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/matchers.ts"],
4
- "mappings": "AACO,SAASA,iBAAiBC,MAAY;MAGpCA;AAAP,UAAOA,cAAAA,KAAKC,MAAM,4BAAA,OAAA,QAAXD,gBAAAA,SAAAA,SAAAA,YAA2C,CAAA;AACpD;AAGO,SAASE,0BAA0BF,MAAY;MAC7CA;AAAP,UAAOA,cAAAA,KAAKC,MAAM,sBAAA,OAAA,QAAXD,gBAAAA,SAAAA,SAAAA,YAAqC,CAAA;AAC9C;AAGO,SAASG,aAAaH,MAAY;AACvC,SAAO,eAAeI,KAAKJ,IAAAA;AAC7B;AAGO,SAASK,eAAeL,MAAY;MAClCA;AAAP,UAAOA,cAAAA,KAAKC,MAAM,mCAAA,OAAA,QAAXD,gBAAAA,SAAAA,SAAAA,YAAkD,CAAA;AAC3D;AAGO,SAASM,oBAAoBN,MAAY;MACvCA;AAAP,UAAOA,cAAAA,KAAKC,MAAM,0CAAA,OAAA,QAAXD,gBAAAA,SAAAA,SAAAA,YAAyD,CAAA;AAClE;AAEO,SAASO,oBAAoBP,MAAY;AAC9C,SAAOQ,0BAA0BC,qBAAqBT,IAAAA,CAAAA;AACxD;AAEO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AAAA,KAAKC,MAAM,oDAAA,OAAA,QAAXD,gBAAAA,SAAAA,SAAAA,YAAmE,CAAA;AAC5E;AAEO,SAASO,oBAAoBP,MAAY;AAC9C,SAAOQ,0BAA0BC,qBAAqBT,IAAAA,CAAAA;AACxD;AAEO,SAASU,cAAcV,MAAY;AAGxC,MAAMW,SAAS,MAAMJ,oBAAoBP,IAAAA;AACzC,SAAKW,OAAOC,SAAS,SAAA,IAGdD,OAAOE,QAAQ,eAAe,EAAA,IAF5BF;AAGX;AAGO,SAASH,0BAA0BR,MAAY;AACpD,SAAOA,KAAKa,QAAQ,qCAAqC,EAAA;AAC3D;AAGO,SAASJ,qBAAqBK,UAAgB;AACnD,SAAOA,SAASD,QAAQ,kBAAkB,EAAA;AAC5C;AAEO,SAASE,2BAA2BC,MAAY;AACrD,SAAOA,KACJC,MAAM,GAAA,EACNC,OAAO,SAACC,KAAKC,GAAAA;AACZ,WAAIf,eAAee,CAAAA,KAAM,QACvBD,IAAIE,KAAKD,CAAAA,GAEJD;EACT,GAAG,CAAA,CAAE,EACJG,KAAK,GAAA;AACV;AAEO,SAASC,+BAA+BP,MAAY;AACzD,SAAOD,2BAA2BC,IAAAA,EAAMH,QAAQ,aAAa,EAAA;AAC/D;AAOO,SAASW,aAAaxB,MAAY;AACvC,SAAO,CAACA,KAAKyB,WAAW,GAAA,KAAQzB,KAAKC,MAAM,oCAAA,MAA0C;AACvF;",
5
5
  "names": ["matchDynamicName", "name", "match", "matchDeepDynamicRouteName", "testNotFound", "test", "matchGroupName", "matchArrayGroupName", "getNameFromFilePath", "removeSupportedExtensions", "removeFileSystemDots", "getContextKey", "normal", "endsWith", "replace", "filePath", "stripGroupSegmentsFromPath", "path", "split", "reduce", "acc", "v", "push", "join", "stripInvisibleSegmentsFromPath", "isTypedRoute", "startsWith"]
6
6
  }
package/dist/esm/serve.js CHANGED
@@ -1,19 +1,15 @@
1
1
  import "./polyfills-server";
2
2
  import FSExtra from "fs-extra";
3
- import Path, { join } from "node:path";
4
- import { getServerEntry, serve as vxrnServe } from "vxrn";
5
- import { createHandleRequest } from "./createHandleRequest";
6
- import { isResponse } from "./utils/isResponse";
7
- import { isStatusRedirect } from "./utils/isStatus";
8
- import { removeUndefined } from "./utils/removeUndefined";
9
- import { resolveAPIRequest } from "./vite/resolveAPIRequest";
10
- import { loadUserOneOptions } from "./vite/one";
11
- import { labelProcess } from "./cli/label-process";
3
+ import { join } from "node:path";
4
+ import { getServerEntry, loadEnv, serve as vxrnServe } from "vxrn";
12
5
  process.on("uncaughtException", (err) => {
13
6
  console.error("[one] Uncaught exception", err?.stack || err);
14
7
  });
15
8
  async function serve(args = {}) {
16
- labelProcess("serve");
9
+ const buildInfo = await FSExtra.readJSON("dist/buildInfo.json");
10
+ process.env.ONE_CACHE_KEY = buildInfo.constants.CACHE_KEY;
11
+ const { labelProcess } = await import("./cli/label-process"), { removeUndefined } = await import("./utils/removeUndefined"), { loadUserOneOptions } = await import("./vite/one");
12
+ labelProcess("serve"), loadEnv("production");
17
13
  const oneOptions = await loadUserOneOptions("serve");
18
14
  return process.env.VXRN_REACT_19 = "1", await vxrnServe({
19
15
  server: {
@@ -28,13 +24,13 @@ async function serve(args = {}) {
28
24
  cacheHeaders: args.cacheHeaders
29
25
  }),
30
26
  async beforeStart(options, app) {
31
- await oneOptions.server?.beforeStart?.(options, app), await oneServe(oneOptions, options, app);
27
+ await oneOptions.server?.beforeStart?.(options, app), await oneServe(oneOptions, options, buildInfo, app);
32
28
  }
33
29
  }
34
30
  });
35
31
  }
36
- async function oneServe(options, vxrnOptions, app) {
37
- const root = options.root || vxrnOptions.root || ".", isAPIRequest = /* @__PURE__ */ new WeakMap(), toAbsolute = (p) => Path.resolve(root, p), redirects = options.web?.redirects;
32
+ async function oneServe(options, vxrnOptions, buildInfo, app) {
33
+ const { createHandleRequest } = await import("./createHandleRequest"), { isResponse } = await import("./utils/isResponse"), { isStatusRedirect } = await import("./utils/isStatus"), { resolveAPIRequest } = await import("./vite/resolveAPIRequest"), isAPIRequest = /* @__PURE__ */ new WeakMap(), root = vxrnOptions.root || ".", redirects = options.web?.redirects;
38
34
  if (redirects)
39
35
  for (const redirect of redirects)
40
36
  app.get(redirect.source, (context) => {
@@ -44,7 +40,6 @@ async function oneServe(options, vxrnOptions, app) {
44
40
  });
45
41
  return context.redirect(destinationUrl, redirect.permanent ? 301 : 302);
46
42
  });
47
- const buildInfo = await FSExtra.readJSON(toAbsolute("dist/buildInfo.json"));
48
43
  if (!buildInfo)
49
44
  throw new Error("No build info found, have you run build?");
50
45
  const { routeMap, builtRoutes } = buildInfo, routeToBuildInfo = {};
@@ -91,7 +86,9 @@ async function oneServe(options, vxrnOptions, app) {
91
86
  if (route.type === "ssr") {
92
87
  const buildInfo2 = routeToBuildInfo[route.page];
93
88
  if (!buildInfo2)
94
- throw new Error(`No buildinfo found for ${url}, route: ${route.page}`);
89
+ throw new Error(
90
+ `No buildinfo found for ${url}, route: ${route.page}, in keys: ${Object.keys(routeToBuildInfo)}`
91
+ );
95
92
  try {
96
93
  const loaderData = await (await import(buildInfo2.serverJsPath)).loader?.(loaderProps), preloads = buildInfo2.preloads, headers = new Headers();
97
94
  return headers.set("content-type", "text/html"), new Response(
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/serve.ts"],
4
- "mappings": "AAAA,OAAO;AAEP,OAAO,aAAa;AAEpB,OAAO,QAAQ,YAAY;AAE3B,SAAS,gBAAgB,SAAS,iBAAiB;AACnD,SAAS,2BAA2B;AAEpC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAElC,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAE7B,QAAQ,GAAG,qBAAqB,CAAC,QAAQ;AACvC,UAAQ,MAAM,4BAA4B,KAAK,SAAS,GAAG;AAC7D,CAAC;AAED,eAAsB,MAAM,OAA8B,CAAC,GAAG;AAC5D,eAAa,OAAO;AACpB,QAA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Q,IAAI,KACtB,WAAW,MAAM,cAAc,QAAQ,OAAO;AAEpD,UAAI,UAAU;AACZ,YAAI,WAAW,QAAQ,GAAG;AACxB,cAAI,iBAAiB,SAAS,MAAM,GAAG;AACrC,kBAAM,WAAW,GAAG,SAAS,QAAQ,IAAI,UAAU,KAAK,EAAE;AAC1D,mBAAO,QAAQ,SAAS,UAAU,SAAS,MAAM;AAAA,UACnD;AAEA,cAAI,aAAa,IAAI,OAAO;AAC1B,gBAAI;AAEF,uBAAS,QAAQ,IAAI,iBAAiB,UAAU;AAAA,YAClD,SAAS,KAAK;AACZ,sBAAQ;AAAA,gBACN,6CACE,QAAQ,IAAI,IACd,wBAAwB,SAAS,QAAQ,IAAI,eAAe,CAAC;AAAA,gBAC7D;AAAA,cACF;AAAA,YACF;AAGF,iBAAO;AAAA,QACT;AAEA,eAAO,QAAQ;AAAA,UACb;AAAA,UACA;AAAA,UACA,aAAa,IAAI,OAAO,IACpB;AAAA,YACE,iBAAiB;AAAA,UACnB,IACA;AAAA,QACN;AAAA,MACF;AAAA,IACF,SAAS,KAAK;AACZ,cAAQ,MAAM,kCAAmC,IAAY,KAAQ,EAAE;AAAA,IACzE;AAEA,UAAM,KAAK;AAAA,EACb,CAAC;AACH;",
5
5
  "names": ["buildInfo"]
6
6
  }
@@ -1,19 +1,23 @@
1
1
  import "./polyfills-server.mjs";
2
2
  import FSExtra from "fs-extra";
3
- import Path, { join } from "node:path";
4
- import { getServerEntry, serve as vxrnServe } from "vxrn";
5
- import { createHandleRequest } from "./createHandleRequest.mjs";
6
- import { isResponse } from "./utils/isResponse.mjs";
7
- import { isStatusRedirect } from "./utils/isStatus.mjs";
8
- import { removeUndefined } from "./utils/removeUndefined.mjs";
9
- import { resolveAPIRequest } from "./vite/resolveAPIRequest.mjs";
10
- import { loadUserOneOptions } from "./vite/one.mjs";
11
- import { labelProcess } from "./cli/label-process.mjs";
3
+ import { join } from "node:path";
4
+ import { getServerEntry, loadEnv, serve as vxrnServe } from "vxrn";
12
5
  process.on("uncaughtException", err => {
13
6
  console.error("[one] Uncaught exception", err?.stack || err);
14
7
  });
15
8
  async function serve(args = {}) {
16
- labelProcess("serve");
9
+ const buildInfo = await FSExtra.readJSON("dist/buildInfo.json");
10
+ process.env.ONE_CACHE_KEY = buildInfo.constants.CACHE_KEY;
11
+ const {
12
+ labelProcess
13
+ } = await import("./cli/label-process.mjs"),
14
+ {
15
+ removeUndefined
16
+ } = await import("./utils/removeUndefined.mjs"),
17
+ {
18
+ loadUserOneOptions
19
+ } = await import("./vite/one.mjs");
20
+ labelProcess("serve"), loadEnv("production");
17
21
  const oneOptions = await loadUserOneOptions("serve");
18
22
  return process.env.VXRN_REACT_19 = "1", await vxrnServe({
19
23
  server: {
@@ -28,15 +32,26 @@ async function serve(args = {}) {
28
32
  cacheHeaders: args.cacheHeaders
29
33
  }),
30
34
  async beforeStart(options, app) {
31
- await oneOptions.server?.beforeStart?.(options, app), await oneServe(oneOptions, options, app);
35
+ await oneOptions.server?.beforeStart?.(options, app), await oneServe(oneOptions, options, buildInfo, app);
32
36
  }
33
37
  }
34
38
  });
35
39
  }
36
- async function oneServe(options, vxrnOptions, app) {
37
- const root = options.root || vxrnOptions.root || ".",
40
+ async function oneServe(options, vxrnOptions, buildInfo, app) {
41
+ const {
42
+ createHandleRequest
43
+ } = await import("./createHandleRequest.mjs"),
44
+ {
45
+ isResponse
46
+ } = await import("./utils/isResponse.mjs"),
47
+ {
48
+ isStatusRedirect
49
+ } = await import("./utils/isStatus.mjs"),
50
+ {
51
+ resolveAPIRequest
52
+ } = await import("./vite/resolveAPIRequest.mjs"),
38
53
  isAPIRequest = /* @__PURE__ */new WeakMap(),
39
- toAbsolute = p => Path.resolve(root, p),
54
+ root = vxrnOptions.root || ".",
40
55
  redirects = options.web?.redirects;
41
56
  if (redirects) for (const redirect of redirects) app.get(redirect.source, context => {
42
57
  const destinationUrl = redirect.destination.replace(/:\w+/g, param => {
@@ -45,7 +60,6 @@ async function oneServe(options, vxrnOptions, app) {
45
60
  });
46
61
  return context.redirect(destinationUrl, redirect.permanent ? 301 : 302);
47
62
  });
48
- const buildInfo = await FSExtra.readJSON(toAbsolute("dist/buildInfo.json"));
49
63
  if (!buildInfo) throw new Error("No build info found, have you run build?");
50
64
  const {
51
65
  routeMap,
@@ -93,7 +107,7 @@ async function oneServe(options, vxrnOptions, app) {
93
107
  }) {
94
108
  if (route.type === "ssr") {
95
109
  const buildInfo2 = routeToBuildInfo[route.page];
96
- if (!buildInfo2) throw new Error(`No buildinfo found for ${url}, route: ${route.page}`);
110
+ if (!buildInfo2) throw new Error(`No buildinfo found for ${url}, route: ${route.page}, in keys: ${Object.keys(routeToBuildInfo)}`);
97
111
  try {
98
112
  const loaderData = await (await import(buildInfo2.serverJsPath)).loader?.(loaderProps),
99
113
  preloads = buildInfo2.preloads,
@@ -1 +1 @@
1
- {"version":3,"names":["FSExtra","Path","join","getServerEntry","serve","vxrnServe","createHandleRequest","isResponse","isStatusRedirect","removeUndefined","resolveAPIRequest","loadUserOneOptions","labelProcess","process","on","err","console","error","stack","args","oneOptions","env","VXRN_REACT_19","server","port","host","compress","platform","cacheHeaders","beforeStart","options","app","oneServe","vxrnOptions","root","isAPIRequest","WeakMap","toAbsolute","p","resolve","redirects","web","redirect","get","source","context","destinationUrl","destination","replace","param","paramName","substring","req","permanent","buildInfo","readJSON","Error","routeMap","builtRoutes","routeToBuildInfo","route","cleanPath","serverOptions","render","default","apiCJS","build","api","outputFormat","handleRequest","handleAPI","request","loaderProps","apiFile","cwd","page","set","params","handleSSR","url","type","buildInfo2","loaderData","serverJsPath","loader","preloads","headers","Headers","Response","path","htmlFiles","key","readFile","use","next","html","raw","response","handler","status","location","info","json"],"sources":["../../src/serve.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO;AAEP,OAAOA,OAAA,MAAa;AAEpB,OAAOC,IAAA,IAAQC,IAAA,QAAY;AAE3B,SAASC,cAAA,EAAgBC,KAAA,IAASC,SAAA,QAAiB;AACnD,S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AQV,GAAA,CAAI,iBAAiB,UAAU;UAClD,SAAS7D,GAAA,EAAK;YACZC,OAAA,CAAQqF,IAAA,CACN,6CACExD,OAAA,CAAQO,GAAA,CAAIqC,IACd,wBAAwBQ,QAAA,CAASX,OAAA,CAAQ3C,GAAA,CAAI,eAAe,CAAC,cAC7D5B,GACF;UACF;UAGF,OAAOkF,QAAA;QACT;QAEA,OAAOpD,OAAA,CAAQyD,IAAA,CACbL,QAAA,EACA,KACA9D,YAAA,CAAaQ,GAAA,CAAI4B,OAAO,IACpB;UACE,iBAAiB;QACnB,IACA,MACN;MACF;IACF,SAASxD,GAAA,EAAK;MACZC,OAAA,CAAQC,KAAA,CAAM,kCAAmCF,GAAA,CAAYG,KAAQ,EAAE;IACzE;IAEA,MAAM4E,IAAA,CAAK;EACb,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["FSExtra","join","getServerEntry","loadEnv","serve","vxrnServe","process","on","err","console","error","stack","args","buildInfo","readJSON","env","ONE_CACHE_KEY","constants","CACHE_KEY","labelProcess","removeUndefined","loadUserOneOptions","oneOptions","VXRN_REACT_19","server","port","host","compress","platform","cacheHeaders","beforeStart","options","app","oneServe","vxrnOptions","createHandleRequest","isResponse","isStatusRedirect","resolveAPIRequest","isAPIRequest","WeakMap","root","redirects","web","redirect","get","source","context","destinationUrl","destination","replace","param","paramName","substring","req","permanent","Error","routeMap","builtRoutes","routeToBuildInfo","route","cleanPath","serverOptions","render","default","apiCJS","build","api","outputFormat","handleRequest","handleAPI","request","loaderProps","apiFile","cwd","page","set","params","handleSSR","url","type","buildInfo2","Object","keys","loaderData","serverJsPath","loader","preloads","headers","Headers","Response","path","htmlFiles","key","readFile","use","next","html","raw","response","handler","status","location","info","json"],"sources":["../../src/serve.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO;AAEP,OAAOA,OAAA,MAAa;AAEpB,SAASC,IAAA,QAAY;AAErB,SAASC,cAAA,EAAgBC,OAAA,EAASC,KAAA,IAASC,SAAA,QA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,OAAA,CAAQ3C,GAAA,CAAI,UAAU,KAAK,EAAE;YAC1D,OAAOE,OAAA,CAAQH,QAAA,CAAS0D,QAAA,EAAUH,QAAA,CAASE,MAAM;UACnD;UAEA,IAAI9D,YAAA,CAAaM,GAAA,CAAI0B,OAAO,GAC1B,IAAI;YAEF4B,QAAA,CAASX,OAAA,CAAQZ,GAAA,CAAI,iBAAiB,UAAU;UAClD,SAASpE,GAAA,EAAK;YACZC,OAAA,CAAQ8F,IAAA,CACN,6CACExD,OAAA,CAAQO,GAAA,CAAIqC,IACd,wBAAwBQ,QAAA,CAASX,OAAA,CAAQ3C,GAAA,CAAI,eAAe,CAAC,cAC7DrC,GACF;UACF;UAGF,OAAO2F,QAAA;QACT;QAEA,OAAOpD,OAAA,CAAQyD,IAAA,CACbL,QAAA,EACA,KACA5D,YAAA,CAAaM,GAAA,CAAI0B,OAAO,IACpB;UACE,iBAAiB;QACnB,IACA,MACN;MACF;IACF,SAAS/D,GAAA,EAAK;MACZC,OAAA,CAAQC,KAAA,CAAM,kCAAmCF,GAAA,CAAYG,KAAQ,EAAE;IACzE;IAEA,MAAMqF,IAAA,CAAK;EACb,CAAC;AACH","ignoreList":[]}
@@ -1,20 +1,15 @@
1
1
  import "./polyfills-server";
2
2
  import FSExtra from "fs-extra";
3
- import Path, { join } from "node:path";
4
- import { getServerEntry, serve as vxrnServe } from "vxrn";
5
- import { createHandleRequest } from "./createHandleRequest";
6
- import { isResponse } from "./utils/isResponse";
7
- import { isStatusRedirect } from "./utils/isStatus";
8
- import { removeUndefined } from "./utils/removeUndefined";
9
- import { resolveAPIRequest } from "./vite/resolveAPIRequest";
10
- import { loadUserOneOptions } from "./vite/one";
11
- import { labelProcess } from "./cli/label-process";
3
+ import { join } from "node:path";
4
+ import { getServerEntry, loadEnv, serve as vxrnServe } from "vxrn";
12
5
  process.on("uncaughtException", function(err) {
13
6
  console.error("[one] Uncaught exception", err?.stack || err);
14
7
  });
15
8
  async function serve() {
16
- var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
17
- labelProcess("serve");
9
+ var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, buildInfo = await FSExtra.readJSON("dist/buildInfo.json");
10
+ process.env.ONE_CACHE_KEY = buildInfo.constants.CACHE_KEY;
11
+ var { labelProcess } = await import("./cli/label-process"), { removeUndefined } = await import("./utils/removeUndefined"), { loadUserOneOptions } = await import("./vite/one");
12
+ labelProcess("serve"), loadEnv("production");
18
13
  var oneOptions = await loadUserOneOptions("serve");
19
14
  return process.env.VXRN_REACT_19 = "1", await vxrnServe({
20
15
  server: {
@@ -30,15 +25,13 @@ async function serve() {
30
25
  }),
31
26
  async beforeStart(options, app) {
32
27
  var _oneOptions_server_beforeStart, _oneOptions_server;
33
- await ((_oneOptions_server = oneOptions.server) === null || _oneOptions_server === void 0 || (_oneOptions_server_beforeStart = _oneOptions_server.beforeStart) === null || _oneOptions_server_beforeStart === void 0 ? void 0 : _oneOptions_server_beforeStart.call(_oneOptions_server, options, app)), await oneServe(oneOptions, options, app);
28
+ await ((_oneOptions_server = oneOptions.server) === null || _oneOptions_server === void 0 || (_oneOptions_server_beforeStart = _oneOptions_server.beforeStart) === null || _oneOptions_server_beforeStart === void 0 ? void 0 : _oneOptions_server_beforeStart.call(_oneOptions_server, options, app)), await oneServe(oneOptions, options, buildInfo, app);
34
29
  }
35
30
  }
36
31
  });
37
32
  }
38
- async function oneServe(options, vxrnOptions, app) {
39
- var _options_web, _options_build_api, _options_build, root = options.root || vxrnOptions.root || ".", isAPIRequest = /* @__PURE__ */ new WeakMap(), toAbsolute = function(p) {
40
- return Path.resolve(root, p);
41
- }, redirects = (_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.redirects;
33
+ async function oneServe(options, vxrnOptions, buildInfo, app) {
34
+ var _options_web, _options_build_api, _options_build, { createHandleRequest } = await import("./createHandleRequest"), { isResponse } = await import("./utils/isResponse"), { isStatusRedirect } = await import("./utils/isStatus"), { resolveAPIRequest } = await import("./vite/resolveAPIRequest"), isAPIRequest = /* @__PURE__ */ new WeakMap(), root = vxrnOptions.root || ".", redirects = (_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.redirects;
42
35
  if (redirects) {
43
36
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
44
37
  try {
@@ -63,7 +56,6 @@ async function oneServe(options, vxrnOptions, app) {
63
56
  }
64
57
  }
65
58
  }
66
- var buildInfo = await FSExtra.readJSON(toAbsolute("dist/buildInfo.json"));
67
59
  if (!buildInfo)
68
60
  throw new Error("No build info found, have you run build?");
69
61
  var { routeMap, builtRoutes } = buildInfo, routeToBuildInfo = {}, _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
@@ -111,11 +103,11 @@ async function oneServe(options, vxrnOptions, app) {
111
103
  async handleSSR(param) {
112
104
  var { route: route2, url, loaderProps } = param;
113
105
  if (route2.type === "ssr") {
114
- var buildInfo2 = routeToBuildInfo[route2.page];
115
- if (!buildInfo2)
116
- throw new Error(`No buildinfo found for ${url}, route: ${route2.page}`);
106
+ var _$buildInfo = routeToBuildInfo[route2.page];
107
+ if (!_$buildInfo)
108
+ throw new Error(`No buildinfo found for ${url}, route: ${route2.page}, in keys: ${Object.keys(routeToBuildInfo)}`);
117
109
  try {
118
- var _exported_loader, exported = await import(buildInfo2.serverJsPath), loaderData = await ((_exported_loader = exported.loader) === null || _exported_loader === void 0 ? void 0 : _exported_loader.call(exported, loaderProps)), preloads = buildInfo2.preloads, headers = new Headers();
110
+ var _exported_loader, exported = await import(_$buildInfo.serverJsPath), loaderData = await ((_exported_loader = exported.loader) === null || _exported_loader === void 0 ? void 0 : _exported_loader.call(exported, loaderProps)), preloads = _$buildInfo.preloads, headers = new Headers();
119
111
  return headers.set("content-type", "text/html"), new Response(await render({
120
112
  loaderData,
121
113
  loaderProps,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one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ASZ,QAAQ7C,IAAI,eAAA,CAAA,cAC7C7B,GAAAA;YAEJ;AAGF,iBAAOsF;QACT;AAEA,eAAOvD,QAAQ2D,KACbJ,UACA,KACAjE,aAAaQ,IAAI8B,OAAAA,IACb;UACE,iBAAiB;QACnB,IACAjD,MAAAA;MAER;IACF,SAASV,KAAK;AACZC,cAAQC,MAAM,kCAAmCF,IAAY,KAAQ,EAAE;IACzE;AAEA,UAAMmF,KAAAA;EACR,CAAA;AACF;",
5
- "names": ["FSExtra", "Path", "join", "getServerEntry", "serve", "vxrnServe", "createHandleRequest", "isResponse", "isStatusRedirect", "removeUndefined", "resolveAPIRequest", "loadUserOneOptions", "labelProcess", "process", "on", "err", "console", "error", "stack", "args", "oneOptions", "env", "VXRN_REACT_19", "server", "port", "undefined", "host", "compress", "platform", "cacheHeaders", "beforeStart", "options", "app", "oneServe", "vxrnOptions", "root", "isAPIRequest", "WeakMap", "toAbsolute", "p", "resolve", "redirects", "web", "redirect", "get", "source", "context", "destinationUrl", "destination", "replace", "param", "paramName", "substring", "req", "permanent", "buildInfo", "readJSON", "Error", "routeMap", "builtRoutes", "routeToBuildInfo", "route", "cleanPath", "serverOptions", "entryServer", "entry", "render", "default", "apiCJS", "build", "api", "outputFormat", "handleRequest", "handleAPI", "request", "loaderProps", "apiFile", "cwd", "page", "set", "params", "handleSSR", "url", "type", "exported", "serverJsPath", "loaderData", "loader", "preloads", "headers", "Headers", "Response", "path", "htmlFiles", "key", "info", "readFile", "use", "next", "html", "raw", "response", "handler", "status", "location", "json"]
4
+ "mappings": "AAAA,OAAO;AAEP,OAAOA,aAAa;AAEpB,SAASC,YAAY;AAErB,SAASC,gBAAgBC,SAASC,SAASC,iBAAiB;AAK5DC,QAAQC,GAAG,qBAAqB,SAACC,KAAAA;AAC/BC,UAAQC,MAAM,4BAA4BF,KAAKG,SAASH,GAAAA;AAC1D,CAAA;AAEA,eAAsBJ,QAAAA;MAAMQ,OAAAA,UAAAA,SAAAA,KAAAA,UAAAA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OvD,QAAQ2D,KACbJ,UACA,KACA/D,aAAaM,IAAI4B,OAAAA,IACb;UACE,iBAAiB;QACnB,IACAhD,MAAAA;MAER;IACF,SAASlB,KAAK;AACZC,cAAQC,MAAM,kCAAmCF,IAAY,KAAQ,EAAE;IACzE;AAEA,UAAM4F,KAAAA;EACR,CAAA;AACF;",
5
+ "names": ["FSExtra", "join", "getServerEntry", "loadEnv", "serve", "vxrnServe", "process", "on", "err", "console", "error", "stack", "args", "buildInfo", "readJSON", "env", "ONE_CACHE_KEY", "constants", "CACHE_KEY", "labelProcess", "removeUndefined", "loadUserOneOptions", "oneOptions", "VXRN_REACT_19", "server", "port", "undefined", "host", "compress", "platform", "cacheHeaders", "beforeStart", "options", "app", "oneServe", "vxrnOptions", "createHandleRequest", "isResponse", "isStatusRedirect", "resolveAPIRequest", "isAPIRequest", "WeakMap", "root", "redirects", "web", "redirect", "get", "source", "context", "destinationUrl", "destination", "replace", "param", "paramName", "substring", "req", "permanent", "Error", "routeMap", "builtRoutes", "routeToBuildInfo", "route", "cleanPath", "serverOptions", "entryServer", "entry", "render", "default", "apiCJS", "build", "api", "outputFormat", "handleRequest", "handleAPI", "request", "loaderProps", "apiFile", "cwd", "page", "set", "params", "handleSSR", "url", "type", "Object", "keys", "exported", "serverJsPath", "loaderData", "loader", "preloads", "headers", "Headers", "Response", "path", "htmlFiles", "key", "info", "readFile", "use", "next", "html", "raw", "response", "handler", "status", "location", "json"]
6
6
  }