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 +0,0 @@
1
- {"version":3,"names":["CACHE_KEY","Math","random","slice"],"sources":["../../../src/router/constants.ts"],"sourcesContent":[null],"mappings":"AAGO,MAAMA,SAAA,GAAY,GAAGC,IAAA,CAAKC,MAAA,CAAO,CAAC,GAAGC,KAAA,CAAM,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- var CACHE_KEY = `${Math.random()}`.slice(3);
2
- export {
3
- CACHE_KEY
4
- };
5
- //# sourceMappingURL=constants.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/router/Users/n8/one/packages/one/src/router/constants.ts"],
4
- "mappings": "AAGO,IAAMA,YAAY,GAAGC,KAAKC,OAAM,CAAA,GAAKC,MAAM,CAAA;",
5
- "names": ["CACHE_KEY", "Math", "random", "slice"]
6
- }
@@ -1,13 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- async function loadEnv(root) {
4
- const envPath = path.join(root, ".env");
5
- if (!fs.existsSync(envPath)) return;
6
- const result = (await import("dotenv")).config({ path: envPath });
7
- if (result.error) throw result.error;
8
- return !0;
9
- }
10
- export {
11
- loadEnv
12
- };
13
- //# sourceMappingURL=loadEnv.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/vite/loadEnv.ts"],
4
- "mappings": "AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAEjB,eAAsB,QAAQ,MAAc;AAC1C,QAAM,UAAU,KAAK,KAAK,MAAM,MAAM;AACtC,MAAI,CAAC,GAAG,WAAW,OAAO,EAAG;AAE7B,QAAM,UADS,MAAM,OAAO,QAAQ,GACd,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC9C,MAAI,OAAO,MAAO,OAAM,OAAO;AAC/B,SAAO;AACT;",
5
- "names": []
6
- }
@@ -1,13 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- async function loadEnv(root) {
4
- const envPath = path.join(root, ".env");
5
- if (!fs.existsSync(envPath)) return;
6
- const result = (await import("dotenv")).config({
7
- path: envPath
8
- });
9
- if (result.error) throw result.error;
10
- return !0;
11
- }
12
- export { loadEnv };
13
- //# sourceMappingURL=loadEnv.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["fs","path","loadEnv","root","envPath","join","existsSync","result","config","error"],"sources":["../../../src/vite/loadEnv.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,EAAA,MAAQ;AACf,OAAOC,IAAA,MAAU;AAEjB,eAAsBC,QAAQC,IAAA,EAAc;EAC1C,MAAMC,OAAA,GAAUH,IAAA,CAAKI,IAAA,CAAKF,IAAA,EAAM,MAAM;EACtC,IAAI,CAACH,EAAA,CAAGM,UAAA,CAAWF,OAAO,GAAG;EAE7B,MAAMG,MAAA,IADS,MAAM,OAAO,QAAQ,GACdC,MAAA,CAAO;IAAEP,IAAA,EAAMG;EAAQ,CAAC;EAC9C,IAAIG,MAAA,CAAOE,KAAA,EAAO,MAAMF,MAAA,CAAOE,KAAA;EAC/B,OAAO;AACT","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- async function loadEnv(root) {
4
- var envPath = path.join(root, ".env");
5
- if (fs.existsSync(envPath)) {
6
- var dotenv = await import("dotenv"), result = dotenv.config({
7
- path: envPath
8
- });
9
- if (result.error) throw result.error;
10
- return !0;
11
- }
12
- }
13
- export {
14
- loadEnv
15
- };
16
- //# sourceMappingURL=loadEnv.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/loadEnv.ts"],
4
- "mappings": "AAAA,OAAOA,QAAQ;AACf,OAAOC,UAAU;AAEjB,eAAsBC,QAAQC,MAAY;AACxC,MAAMC,UAAUH,KAAKI,KAAKF,MAAM,MAAA;AAChC,MAAKH,GAAGM,WAAWF,OAAAA,GACnB;QAAMG,SAAS,MAAM,OAAO,QAAA,GACtBC,SAASD,OAAOE,OAAO;MAAER,MAAMG;IAAQ,CAAA;AAC7C,QAAII,OAAOE,MAAO,OAAMF,OAAOE;AAC/B,WAAO;;AACT;",
5
- "names": ["fs", "path", "loadEnv", "root", "envPath", "join", "existsSync", "dotenv", "result", "config", "error"]
6
- }
@@ -1,4 +0,0 @@
1
- // for example we have loaders like _vxrn_loader.js safari caches things
2
- // aggressively so we want to have a search params that clears that cache
3
- // uniquely across deploys this will be unique per-deploy nicely:
4
- export const CACHE_KEY = `${Math.random()}`.slice(3)
@@ -1,11 +0,0 @@
1
- import fs from 'node:fs'
2
- import path from 'node:path'
3
-
4
- export async function loadEnv(root: string) {
5
- const envPath = path.join(root, '.env')
6
- if (!fs.existsSync(envPath)) return
7
- const dotenv = await import('dotenv')
8
- const result = dotenv.config({ path: envPath })
9
- if (result.error) throw result.error
10
- return true
11
- }
@@ -1,2 +0,0 @@
1
- export declare const CACHE_KEY: string;
2
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/router/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAA8B,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function loadEnv(root: string): Promise<true | undefined>;
2
- //# sourceMappingURL=loadEnv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadEnv.d.ts","sourceRoot":"","sources":["../../src/vite/loadEnv.ts"],"names":[],"mappings":"AAGA,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,6BAOzC"}