one 1.1.310 → 1.1.312

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/dist/cjs/Root.cjs +2 -1
  2. package/dist/cjs/Root.cjs.map +1 -1
  3. package/dist/cjs/Root.native.js +2 -2
  4. package/dist/cjs/Root.native.js.map +2 -2
  5. package/dist/cjs/cleanUrl.cjs +3 -8
  6. package/dist/cjs/cleanUrl.cjs.map +2 -2
  7. package/dist/cjs/cleanUrl.native.js +5 -8
  8. package/dist/cjs/cleanUrl.native.js.map +2 -2
  9. package/dist/cjs/cli.cjs +0 -2
  10. package/dist/cjs/cli.cjs.map +1 -1
  11. package/dist/cjs/cli.native.js +1 -2
  12. package/dist/cjs/cli.native.js.map +2 -2
  13. package/dist/cjs/config.cjs +1 -1
  14. package/dist/cjs/config.native.js +1 -1
  15. package/dist/cjs/config.native.js.map +1 -1
  16. package/dist/cjs/constants.cjs +9 -1
  17. package/dist/cjs/constants.cjs.map +1 -1
  18. package/dist/cjs/constants.native.js +9 -1
  19. package/dist/cjs/constants.native.js.map +2 -2
  20. package/dist/cjs/createApp.native.cjs +1 -1
  21. package/dist/cjs/createApp.native.js +1 -1
  22. package/dist/cjs/createApp.native.js.map +1 -1
  23. package/dist/cjs/createHandleRequest.cjs +3 -1
  24. package/dist/cjs/createHandleRequest.cjs.map +1 -1
  25. package/dist/cjs/createHandleRequest.native.js +3 -2
  26. package/dist/cjs/createHandleRequest.native.js.map +2 -2
  27. package/dist/cjs/getURL.cjs +1 -1
  28. package/dist/cjs/matchers.cjs +1 -1
  29. package/dist/cjs/matchers.cjs.map +1 -1
  30. package/dist/cjs/matchers.native.js +1 -1
  31. package/dist/cjs/matchers.native.js.map +1 -1
  32. package/dist/cjs/serve.cjs +3 -3
  33. package/dist/cjs/serve.cjs.map +1 -1
  34. package/dist/cjs/serve.native.js +2 -2
  35. package/dist/cjs/serve.native.js.map +2 -2
  36. package/dist/cjs/useLoader.cjs +1 -1
  37. package/dist/cjs/useLoader.native.js +1 -1
  38. package/dist/cjs/vite/build.cjs +2 -2
  39. package/dist/cjs/vite/build.cjs.map +1 -1
  40. package/dist/cjs/vite/build.native.js +1 -1
  41. package/dist/cjs/vite/build.native.js.map +1 -1
  42. package/dist/cjs/vite/clientTreeShakePlugin.cjs +1 -1
  43. package/dist/cjs/vite/clientTreeShakePlugin.native.js +1 -1
  44. package/dist/cjs/vite/createFileSystemRouter.cjs +1 -1
  45. package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
  46. package/dist/cjs/vite/one.cjs +43 -14
  47. package/dist/cjs/vite/one.cjs.map +1 -1
  48. package/dist/cjs/vite/one.native.js +39 -12
  49. package/dist/cjs/vite/one.native.js.map +2 -2
  50. package/dist/cjs/vite/virtualEntryPlugin.cjs +5 -5
  51. package/dist/cjs/vite/virtualEntryPlugin.native.js +5 -5
  52. package/dist/cjs/vite/virtualEntryPlugin.native.js.map +1 -1
  53. package/dist/cjs/vite/vitePluginSsrCss.cjs +1 -1
  54. package/dist/cjs/vite/vitePluginSsrCss.native.js +1 -1
  55. package/dist/esm/Root.js +2 -1
  56. package/dist/esm/Root.js.map +1 -1
  57. package/dist/esm/Root.mjs +2 -1
  58. package/dist/esm/Root.mjs.map +1 -1
  59. package/dist/esm/Root.native.js +2 -1
  60. package/dist/esm/Root.native.js.map +2 -2
  61. package/dist/esm/cleanUrl.js +10 -9
  62. package/dist/esm/cleanUrl.js.map +1 -1
  63. package/dist/esm/cleanUrl.mjs +4 -9
  64. package/dist/esm/cleanUrl.mjs.map +1 -1
  65. package/dist/esm/cleanUrl.native.js +5 -9
  66. package/dist/esm/cleanUrl.native.js.map +2 -2
  67. package/dist/esm/cli.js +0 -2
  68. package/dist/esm/cli.js.map +1 -1
  69. package/dist/esm/cli.mjs +0 -2
  70. package/dist/esm/cli.mjs.map +1 -1
  71. package/dist/esm/cli.native.js +0 -2
  72. package/dist/esm/cli.native.js.map +2 -2
  73. package/dist/esm/config.js +1 -1
  74. package/dist/esm/config.mjs +1 -1
  75. package/dist/esm/config.mjs.map +1 -1
  76. package/dist/esm/config.native.js +1 -1
  77. package/dist/esm/config.native.js.map +1 -1
  78. package/dist/esm/constants.js +5 -1
  79. package/dist/esm/constants.js.map +1 -1
  80. package/dist/esm/constants.mjs +6 -2
  81. package/dist/esm/constants.mjs.map +1 -1
  82. package/dist/esm/constants.native.js +5 -1
  83. package/dist/esm/constants.native.js.map +2 -2
  84. package/dist/esm/createApp.native.js +1 -1
  85. package/dist/esm/createApp.native.js.map +1 -1
  86. package/dist/esm/createHandleRequest.js +3 -1
  87. package/dist/esm/createHandleRequest.js.map +1 -1
  88. package/dist/esm/createHandleRequest.mjs +3 -1
  89. package/dist/esm/createHandleRequest.mjs.map +1 -1
  90. package/dist/esm/createHandleRequest.native.js +3 -1
  91. package/dist/esm/createHandleRequest.native.js.map +2 -2
  92. package/dist/esm/getURL.js +1 -1
  93. package/dist/esm/getURL.mjs +1 -1
  94. package/dist/esm/matchers.js +1 -1
  95. package/dist/esm/matchers.js.map +1 -1
  96. package/dist/esm/matchers.mjs +1 -1
  97. package/dist/esm/matchers.mjs.map +1 -1
  98. package/dist/esm/matchers.native.js +1 -1
  99. package/dist/esm/matchers.native.js.map +1 -1
  100. package/dist/esm/serve.js +4 -4
  101. package/dist/esm/serve.js.map +1 -1
  102. package/dist/esm/serve.mjs +4 -4
  103. package/dist/esm/serve.mjs.map +1 -1
  104. package/dist/esm/serve.native.js +4 -4
  105. package/dist/esm/serve.native.js.map +2 -2
  106. package/dist/esm/useLoader.js +1 -1
  107. package/dist/esm/useLoader.mjs +1 -1
  108. package/dist/esm/useLoader.native.js +1 -1
  109. package/dist/esm/vite/build.js +1 -1
  110. package/dist/esm/vite/build.js.map +1 -1
  111. package/dist/esm/vite/build.mjs +1 -1
  112. package/dist/esm/vite/build.mjs.map +1 -1
  113. package/dist/esm/vite/build.native.js +1 -1
  114. package/dist/esm/vite/build.native.js.map +2 -2
  115. package/dist/esm/vite/clientTreeShakePlugin.js +1 -1
  116. package/dist/esm/vite/clientTreeShakePlugin.mjs +1 -1
  117. package/dist/esm/vite/clientTreeShakePlugin.native.js +1 -1
  118. package/dist/esm/vite/createFileSystemRouter.js +1 -1
  119. package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
  120. package/dist/esm/vite/createFileSystemRouter.native.js +1 -1
  121. package/dist/esm/vite/one.js +43 -14
  122. package/dist/esm/vite/one.js.map +1 -1
  123. package/dist/esm/vite/one.mjs +43 -14
  124. package/dist/esm/vite/one.mjs.map +1 -1
  125. package/dist/esm/vite/one.native.js +41 -14
  126. package/dist/esm/vite/one.native.js.map +2 -2
  127. package/dist/esm/vite/virtualEntryPlugin.js +5 -5
  128. package/dist/esm/vite/virtualEntryPlugin.mjs +5 -5
  129. package/dist/esm/vite/virtualEntryPlugin.mjs.map +1 -1
  130. package/dist/esm/vite/virtualEntryPlugin.native.js +5 -5
  131. package/dist/esm/vite/virtualEntryPlugin.native.js.map +1 -1
  132. package/dist/esm/vite/vitePluginSsrCss.js +1 -1
  133. package/dist/esm/vite/vitePluginSsrCss.mjs +1 -1
  134. package/dist/esm/vite/vitePluginSsrCss.native.js +1 -1
  135. package/package.json +8 -8
  136. package/src/Root.tsx +2 -1
  137. package/src/cleanUrl.ts +10 -14
  138. package/src/cli.ts +0 -3
  139. package/src/config.ts +1 -1
  140. package/src/constants.ts +6 -0
  141. package/src/createApp.native.tsx +2 -2
  142. package/src/createHandleRequest.ts +7 -1
  143. package/src/getURL.ts +1 -1
  144. package/src/matchers.ts +1 -1
  145. package/src/serve.ts +5 -3
  146. package/src/useLoader.ts +1 -1
  147. package/src/vite/build.ts +2 -1
  148. package/src/vite/clientTreeShakePlugin.ts +1 -1
  149. package/src/vite/createFileSystemRouter.tsx +1 -1
  150. package/src/vite/one.ts +44 -11
  151. package/src/vite/virtualEntryPlugin.ts +5 -5
  152. package/src/vite/vitePluginSsrCss.ts +1 -1
  153. package/types/Root.d.ts.map +1 -1
  154. package/types/cleanUrl.d.ts.map +1 -1
  155. package/types/constants.d.ts +4 -0
  156. package/types/constants.d.ts.map +1 -1
  157. package/types/createHandleRequest.d.ts.map +1 -1
  158. package/types/serve.d.ts.map +1 -1
  159. package/types/vite/build.d.ts.map +1 -1
  160. package/types/vite/one.d.ts.map +1 -1
  161. package/dist/cjs/router/constants.cjs +0 -26
  162. package/dist/cjs/router/constants.cjs.map +0 -6
  163. package/dist/cjs/router/constants.native.js +0 -26
  164. package/dist/cjs/router/constants.native.js.map +0 -6
  165. package/dist/cjs/vite/loadEnv.cjs +0 -47
  166. package/dist/cjs/vite/loadEnv.cjs.map +0 -6
  167. package/dist/cjs/vite/loadEnv.native.js +0 -44
  168. package/dist/cjs/vite/loadEnv.native.js.map +0 -6
  169. package/dist/esm/router/constants.js +0 -5
  170. package/dist/esm/router/constants.js.map +0 -6
  171. package/dist/esm/router/constants.mjs +0 -3
  172. package/dist/esm/router/constants.mjs.map +0 -1
  173. package/dist/esm/router/constants.native.js +0 -5
  174. package/dist/esm/router/constants.native.js.map +0 -6
  175. package/dist/esm/vite/loadEnv.js +0 -13
  176. package/dist/esm/vite/loadEnv.js.map +0 -6
  177. package/dist/esm/vite/loadEnv.mjs +0 -13
  178. package/dist/esm/vite/loadEnv.mjs.map +0 -1
  179. package/dist/esm/vite/loadEnv.native.js +0 -16
  180. package/dist/esm/vite/loadEnv.native.js.map +0 -6
  181. package/src/router/constants.ts +0 -4
  182. package/src/vite/loadEnv.ts +0 -11
  183. package/types/router/constants.d.ts +0 -2
  184. package/types/router/constants.d.ts.map +0 -1
  185. package/types/vite/loadEnv.d.ts +0 -2
  186. package/types/vite/loadEnv.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","existsAsync","resolvePath","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","loadEnv","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","modules","m","relative","root","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","app","sharedNativeConfig","react","ios","android","applyToEnvironment","environment","importer","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","mode","foundOptions"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAASC,OAAA,QAAe;AACvC,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,WAAA,QAAmB;AAC5B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,OAAA,QAAe;AAExB,SAASC,kBAAA,EAAoBC,cAAA,QAAsB;AACnD,SAASC,gBAAA,QAAwB;AAEjCnB,MAAA,CAAOoB,eAAA,CAAgB,GAAK;AAG5BC,UAAA,CAAWC,qBAAA,GAAwB;AAE5B,SAASC,IAAIC,OAAA,GAA6B,CAAC,GAAiB;EACjEC,UAAA,GAAaD,OAAA,EAERR,OAAA,CAAQU,OAAA,CAAQ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eAAsBoF,mBAAmBF,OAAA,EAA4B;EAKnE,IAAI,EAJU,MAAMvG,kBAAA,CAAmB;IACrC0G,IAAA,EAAM;IACNH;EACF,CAAC,IAEC,MAAM,IAAIC,KAAA,CAAM,sBAAsBlF,OAAA,CAAQC,GAAA,CAAI,CAAC,kCAAkC;EAEvF,MAAMoF,YAAA,GAAeL,iBAAA,CAAkB;EACvC,IAAI,CAACK,YAAA,EACH,MAAM,IAAIH,KAAA,CAAM,yCAAyC;EAE3D,OAAOG,YAAA;AACT","ignoreList":[]}
1
+ {"version":3,"names":["resolvePath","events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","loadEnv","CACHE_KEY","existsAsync","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","oneOptions","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","clientEnvDefine","mode","devAndProdPlugins","name","define","Proxy","configIncoming","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","web","defaultRenderMode","JSON","stringify","setupFile","process","env","NODE_ENV","server","url","environments","client","ssr","ios","android","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","modules","m","relative","root","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","app","sharedNativeConfig","react","applyToEnvironment","environment","importer","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","cwd","foundOptions"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,OAAOC,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,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UAAA;AACT;AAEA,eAAsBqF,mBAAmBF,OAAA,EAA4B;EAKnE,IAAI,EAJU,MAAMxG,kBAAA,CAAmB;IACrCoC,IAAA,EAAM;IACNoE;EACF,CAAC,IAEC,MAAM,IAAIC,KAAA,CAAM,sBAAsB1C,OAAA,CAAQ4C,GAAA,CAAI,CAAC,kCAAkC;EAEvF,MAAMC,YAAA,GAAeL,iBAAA,CAAkB;EACvC,IAAI,CAACK,YAAA,EACH,MAAM,IAAIH,KAAA,CAAM,yCAAyC;EAE3D,OAAOG,YAAA;AACT","ignoreList":[]}
@@ -1,31 +1,39 @@
1
+ import { resolvePath } from "@vxrn/resolve";
1
2
  import events from "node:events";
2
3
  import path, { dirname, resolve } from "node:path";
3
4
  import { loadConfigFromFile } from "vite";
4
5
  import tsconfigPaths from "vite-tsconfig-paths";
5
- import { getOptimizeDeps, getOptionsFilled, isWebEnvironment } from "vxrn";
6
+ import { getOptimizeDeps, getOptionsFilled, isWebEnvironment, loadEnv } from "vxrn";
7
+ import { CACHE_KEY } from "../constants";
6
8
  import "../polyfills-server";
7
9
  import { existsAsync } from "../utils/existsAsync";
8
- import { resolvePath } from "@vxrn/resolve";
9
10
  import { clientTreeShakePlugin } from "./clientTreeShakePlugin";
10
11
  import { createFileSystemRouter } from "./createFileSystemRouter";
11
12
  import { ensureTSConfig } from "./ensureTsConfig";
12
13
  import { fixDependenciesPlugin } from "./fixDependenciesPlugin";
13
14
  import { generateTypesForRoutes } from "./generateTypesForRoutes";
14
- import { loadEnv } from "./loadEnv";
15
15
  import { createVirtualEntry, virtualEntryId } from "./virtualEntryPlugin";
16
16
  import { vitePluginSsrCss } from "./vitePluginSsrCss";
17
17
  events.setMaxListeners(1e3);
18
18
  globalThis.__vxrnEnableNativeEnv = !0;
19
19
  function one() {
20
20
  var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _options_config;
21
- oneOptions = options, loadEnv(process.cwd()), ((_options_config = options.config) === null || _options_config === void 0 ? void 0 : _options_config.ensureTSConfig) !== !1 && ensureTSConfig(), globalThis.__vxrnPluginConfig__ = options;
21
+ oneOptions = options, ((_options_config = options.config) === null || _options_config === void 0 ? void 0 : _options_config.ensureTSConfig) !== !1 && ensureTSConfig(), globalThis.__vxrnPluginConfig__ = options;
22
22
  var { optimizeDeps } = getOptimizeDeps("build"), optimizeIds = optimizeDeps.include, optimizeIdRegex = new RegExp(
23
23
  // santize ids for regex
24
24
  // https://stackoverflow.com/questions/6300183/sanitize-string-of-regex-characters-before-regexp-build
25
25
  `${optimizeIds.map(function(id) {
26
26
  return id.replace(/[#-.]|[[-^]|[?|{}]/g, "\\$&");
27
27
  }).join("|")}`
28
- ), tsConfigPathsPlugin = null, vxrnOptions = getOptionsFilled(), devAndProdPlugins = [
28
+ ), tsConfigPathsPlugin = null, vxrnOptions = getOptionsFilled(), _vxrnOptions_mode, { clientEnvDefine } = loadEnv((_vxrnOptions_mode = vxrnOptions?.mode) !== null && _vxrnOptions_mode !== void 0 ? _vxrnOptions_mode : "development"), devAndProdPlugins = [
29
+ {
30
+ name: "one-define-env",
31
+ config() {
32
+ return {
33
+ define: clientEnvDefine
34
+ };
35
+ }
36
+ },
29
37
  // proxy because you cant add a plugin inside a plugin
30
38
  new Proxy({
31
39
  name: "one:tsconfig-paths",
@@ -82,24 +90,40 @@ function one() {
82
90
  return {
83
91
  define: {
84
92
  ...((_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.defaultRenderMode) && {
85
- "process.env.One_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode)
93
+ "process.env.ONE_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode),
94
+ "import.meta.env.ONE_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode)
86
95
  },
87
96
  ...options.setupFile && {
88
- "process.env.One_SETUP_FILE": JSON.stringify(options.setupFile)
97
+ "process.env.ONE_SETUP_FILE": JSON.stringify(options.setupFile)
89
98
  },
90
99
  ...process.env.NODE_ENV !== "production" && vxrnOptions && {
91
- "process.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url)
100
+ "process.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url),
101
+ "import.meta.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url)
92
102
  }
93
103
  },
94
104
  environments: {
95
105
  client: {
96
106
  define: {
97
- "process.env.VITE_ENVIRONMENT": '"client"'
107
+ "process.env.VITE_ENVIRONMENT": '"client"',
108
+ "import.meta.env.VITE_ENVIRONMENT": '"client"'
98
109
  }
99
110
  },
100
111
  ssr: {
101
112
  define: {
102
- "process.env.VITE_ENVIRONMENT": '"ssr"'
113
+ "process.env.VITE_ENVIRONMENT": '"ssr"',
114
+ "import.meta.env.VITE_ENVIRONMENT": '"ssr"'
115
+ }
116
+ },
117
+ ios: {
118
+ define: {
119
+ "process.env.VITE_ENVIRONMENT": '"ios"',
120
+ "import.meta.env.VITE_ENVIRONMENT": '"ios"'
121
+ }
122
+ },
123
+ android: {
124
+ define: {
125
+ "process.env.VITE_ENVIRONMENT": '"android"',
126
+ "import.meta.env.VITE_ENVIRONMENT": '"android"'
103
127
  }
104
128
  }
105
129
  }
@@ -160,19 +184,22 @@ function one() {
160
184
  root: "app"
161
185
  }),
162
186
  {
163
- name: "define-app-key",
187
+ name: "one-define-environment",
164
188
  config() {
165
189
  var _options_app;
166
190
  if (!((_options_app = options.app) === null || _options_app === void 0) && _options_app.key)
167
191
  return {
168
192
  define: {
169
- "process.env.One_APP_NAME": JSON.stringify(options.app.key)
193
+ "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
194
+ "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
195
+ "process.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY),
196
+ "import.meta.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY)
170
197
  }
171
198
  };
172
199
  }
173
200
  },
174
201
  {
175
- name: "use-react-18-for-native",
202
+ name: "one-use-react-18-for-native",
176
203
  enforce: "pre",
177
204
  async config() {
178
205
  var sharedNativeConfig = {
@@ -197,7 +224,7 @@ function one() {
197
224
  },
198
225
  // this started erroring for no reason..
199
226
  {
200
- name: "optimize-deps-load-web-extensions",
227
+ name: "one-optimize-deps-load-web-extensions",
201
228
  enforce: "pre",
202
229
  applyToEnvironment(environment) {
203
230
  return isWebEnvironment(environment);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/one.ts"],
4
- "mappings": "AAAA,OAAOA,YAAY;AACnB,OAAOC,QAAQC,SAASC,eAAe;AACvC,SAA0DC,0BAA0B;AACpF,OAAOC,mBAAmB;AAC1B,SAASC,iBAAiBC,kBAAkBC,wBAAwB;AACpE,OAAO;AACP,SAASC,mBAAmB;AAC5B,SAASC,mBAAmB;AAC5B,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAC/B,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,eAAe;AAExB,SAASC,oBAAoBC,sBAAsB;AACnD,SAASC,wBAAwB;AAEjCnB,OAAOoB,gBAAgB,GAAA;AAGvBC,WAAWC,wBAAwB;AAE5B,SAASC,MAAAA;MAAIC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA6B,CAAC,GAM5CA;AALJC,eAAaD,SAERR,QAAQU,QAAQC,IAAG,CAAA,KAGpBH,kBAAAA,QAAQI,YAAM,QAAdJ,oBAAAA,SAAAA,SAAAA,gBAAgBX,oBAAmB,MAChCA,eAAAA,GAGPQ,WAAW,uBAA0BG;AAGrC,MAAM,EAAEK,aAAY,IAAKvB,gBAAgB,OAAA,GACnCwB,cAAcD,aAAaE,SAC3BC,kBAAkB,IAAIC;;;IAG1B,GAAGH,YAAYI,IAAI,SAACC,IAAAA;aAAOA,GAAGC,QAAQ,uBAAuB,MAAA;OAASC,KAAK,GAAA,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C,SAAOrF;AACT;AAEA,eAAsBsF,mBAAmBF,SAA0B;AACjE,MAAMG,QAAQ,MAAM5G,mBAAmB;IACrC6G,MAAM;IACNJ;EACF,CAAA;AACA,MAAI,CAACG;AACH,UAAM,IAAIF,MAAM,sBAAsBpF,QAAQC,IAAG,CAAA,kCAAoC;AAEvF,MAAMuF,eAAeN,kBAAAA;AACrB,MAAI,CAACM;AACH,UAAM,IAAIJ,MAAM,yCAAyC;AAE3D,SAAOI;AACT;",
5
- "names": ["events", "path", "dirname", "resolve", "loadConfigFromFile", "tsconfigPaths", "getOptimizeDeps", "getOptionsFilled", "isWebEnvironment", "existsAsync", "resolvePath", "clientTreeShakePlugin", "createFileSystemRouter", "ensureTSConfig", "fixDependenciesPlugin", "generateTypesForRoutes", "loadEnv", "createVirtualEntry", "virtualEntryId", "vitePluginSsrCss", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "process", "cwd", "config", "optimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "devAndProdPlugins", "Proxy", "name", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "alias", "tslib", "define", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "__vxrnAddWebPluginsProd", "deps", "app", "sharedNativeConfig", "react", "ios", "android", "applyToEnvironment", "environment", "importer", "shouldOptimize", "test", "absolutePath", "webPath", "directoryPath", "err", "console", "warn", "entries", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "mode", "foundOptions"]
4
+ "mappings": "AAAA,SAASA,mBAAmB;AAC5B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;AAEJ;AAEA,IAAIO,aAAuC;AAE3C,eAAeoF,kBAAkBC,SAA2B;AAC1D,MAAI,CAACrF,YAAY;AACf,QAAI,CAACqF,QAAS,OAAM,IAAIC,MAAM,yCAAyC;AACvE,UAAMC,mBAAmBF,OAAAA;EAC3B;AACA,MAAI,CAACrF;AACH,UAAM,IAAIsF,MAAM,4BAA4B;AAE9C,SAAOtF;AACT;AAEA,eAAsBuF,mBAAmBF,SAA0B;AACjE,MAAMG,QAAQ,MAAM7G,mBAAmB;IACrCmC,MAAM;IACNuE;EACF,CAAA;AACA,MAAI,CAACG;AACH,UAAM,IAAIF,MAAM,sBAAsB7C,QAAQgD,IAAG,CAAA,kCAAoC;AAEvF,MAAMC,eAAeN,kBAAAA;AACrB,MAAI,CAACM;AACH,UAAM,IAAIJ,MAAM,yCAAyC;AAE3D,SAAOI;AACT;",
5
+ "names": ["resolvePath", "events", "path", "dirname", "resolve", "loadConfigFromFile", "tsconfigPaths", "getOptimizeDeps", "getOptionsFilled", "isWebEnvironment", "loadEnv", "CACHE_KEY", "existsAsync", "clientTreeShakePlugin", "createFileSystemRouter", "ensureTSConfig", "fixDependenciesPlugin", "generateTypesForRoutes", "createVirtualEntry", "virtualEntryId", "vitePluginSsrCss", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "config", "optimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "clientEnvDefine", "mode", "devAndProdPlugins", "name", "define", "Proxy", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "alias", "tslib", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "process", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "ios", "android", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "__vxrnAddWebPluginsProd", "deps", "app", "sharedNativeConfig", "react", "applyToEnvironment", "environment", "importer", "shouldOptimize", "test", "absolutePath", "webPath", "directoryPath", "err", "console", "warn", "entries", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "cwd", "foundOptions"]
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import { isNativeEnvironment } from "vxrn";
2
- const virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_One_SETUP_FILE = `
3
- if (process.env.One_SETUP_FILE) {
4
- import(/* @vite-ignore */ process.env.One_SETUP_FILE)
2
+ const virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_ONE_SETUP_FILE = `
3
+ if (process.env.ONE_SETUP_FILE) {
4
+ import(/* @vite-ignore */ process.env.ONE_SETUP_FILE)
5
5
  }
6
6
  `;
7
7
  function createVirtualEntry(options) {
@@ -18,7 +18,7 @@ function createVirtualEntry(options) {
18
18
  load(id) {
19
19
  if (id === resolvedVirtualEntryId)
20
20
  return `
21
- ${isNativeEnvironment(this.environment) ? "" : USE_One_SETUP_FILE}
21
+ ${isNativeEnvironment(this.environment) ? "" : USE_ONE_SETUP_FILE}
22
22
 
23
23
  import { createApp } from 'one'
24
24
 
@@ -29,7 +29,7 @@ export default createApp({
29
29
  `;
30
30
  if (id === resolvedVirtualEntryIdNative)
31
31
  return `
32
- ${isNativeEnvironment(this.environment) ? "" : USE_One_SETUP_FILE}
32
+ ${isNativeEnvironment(this.environment) ? "" : USE_ONE_SETUP_FILE}
33
33
 
34
34
  import { createApp } from 'one'
35
35
 
@@ -6,9 +6,9 @@ const virtualEntryIdName = "one-entry",
6
6
  virtualEntryIdNativeName = `${virtualEntryIdName}-native`,
7
7
  virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`,
8
8
  resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName,
9
- USE_One_SETUP_FILE = `
10
- if (process.env.One_SETUP_FILE) {
11
- import(/* @vite-ignore */ process.env.One_SETUP_FILE)
9
+ USE_ONE_SETUP_FILE = `
10
+ if (process.env.ONE_SETUP_FILE) {
11
+ import(/* @vite-ignore */ process.env.ONE_SETUP_FILE)
12
12
  }
13
13
  `;
14
14
  function createVirtualEntry(options) {
@@ -22,7 +22,7 @@ function createVirtualEntry(options) {
22
22
  },
23
23
  load(id) {
24
24
  if (id === resolvedVirtualEntryId) return `
25
- ${isNativeEnvironment(this.environment) ? "" : USE_One_SETUP_FILE}
25
+ ${isNativeEnvironment(this.environment) ? "" : USE_ONE_SETUP_FILE}
26
26
 
27
27
  import { createApp } from 'one'
28
28
 
@@ -32,7 +32,7 @@ export default createApp({
32
32
  })
33
33
  `;
34
34
  if (id === resolvedVirtualEntryIdNative) return `
35
- ${isNativeEnvironment(this.environment) ? "" : USE_One_SETUP_FILE}
35
+ ${isNativeEnvironment(this.environment) ? "" : USE_ONE_SETUP_FILE}
36
36
 
37
37
  import { createApp } from 'one'
38
38
 
@@ -1 +1 @@
1
- {"version":3,"names":["isNativeEnvironment","virtualEntryIdName","virtualEntryId","virtalEntryIdClient","resolvedVirtualEntryId","virtualEntryIdNativeName","virtualEntryIdNative","resolvedVirtualEntryIdNative","USE_One_SETUP_FILE","createVirtualEntry","options","appDirGlob","root","name","enforce","resolveId","id","load","environment"],"sources":["../../../src/vite/virtualEntryPlugin.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,MAAMC,kBAAA,GAAqB;EACrBC,cAAA,GAAiB,WAAWD,kBAAkB;EAC9CE,mBAAA,GAAsB,uBAAuBF,kBAAkB;EACtEG,sBAAA,GAAyB,OAAOF,cAAA;EAEhCG,wBAAA,GAA2B,GAAGJ,kBAAkB;EACzCK,oBAAA,GAAuB,WAAWD,wBAAwB;EACjEE,4BAAA,GAA+B,OAAOF,wBAAA;EAEtCG,kBAAA,GAAqB;AAAA;AAAA;AAAA;AAAA;AAMpB,SAASC,mBAAmBC,OAAA,EAAmC;EACpE,MAAMC,UAAA,GAAa,IAAID,OAAA,CAAQE,IAAI;EAEnC,OAAO;IACLC,IAAA,EAAM;IACNC,OAAA,EAAS;IAETC,UAAUC,EAAA,EAAI;MACZ,IAAIA,EAAA,KAAOd,cAAA,EACT,OAAOE,sBAAA;MAET,IAAIY,EAAA,KAAOV,oBAAA,EACT,OAAOC,4BAAA;IAEX;IAEAU,KAAKD,EAAA,EAAI;MACP,IAAIA,EAAA,KAAOZ,sBAAA,EAIT,OAAO;AAAA,EAHaJ,mBAAA,CAAoB,KAAKkB,WAAW,IACpD,KACAV,kBAEC;AAAA;AAAA;AAAA;AAAA,cAICG,UAAU;AAAA;AAAA,8BAEMA,UAAU;AAAA;AAAA;MAKlC,IAAIK,EAAA,KAAOT,4BAAA,EAIT,OAAO;AAAA,EAHaP,mBAAA,CAAoB,KAAKkB,WAAW,IACpD,KACAV,kBAEC;AAAA;AAAA;AAAA;AAAA,cAICG,UAAU;AAAA;AAAA,8BAEMA,UAAU;AAAA;AAAA;IAIpC;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["isNativeEnvironment","virtualEntryIdName","virtualEntryId","virtalEntryIdClient","resolvedVirtualEntryId","virtualEntryIdNativeName","virtualEntryIdNative","resolvedVirtualEntryIdNative","USE_ONE_SETUP_FILE","createVirtualEntry","options","appDirGlob","root","name","enforce","resolveId","id","load","environment"],"sources":["../../../src/vite/virtualEntryPlugin.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,MAAMC,kBAAA,GAAqB;EACrBC,cAAA,GAAiB,WAAWD,kBAAkB;EAC9CE,mBAAA,GAAsB,uBAAuBF,kBAAkB;EACtEG,sBAAA,GAAyB,OAAOF,cAAA;EAEhCG,wBAAA,GAA2B,GAAGJ,kBAAkB;EACzCK,oBAAA,GAAuB,WAAWD,wBAAwB;EACjEE,4BAAA,GAA+B,OAAOF,wBAAA;EAEtCG,kBAAA,GAAqB;AAAA;AAAA;AAAA;AAAA;AAMpB,SAASC,mBAAmBC,OAAA,EAAmC;EACpE,MAAMC,UAAA,GAAa,IAAID,OAAA,CAAQE,IAAI;EAEnC,OAAO;IACLC,IAAA,EAAM;IACNC,OAAA,EAAS;IAETC,UAAUC,EAAA,EAAI;MACZ,IAAIA,EAAA,KAAOd,cAAA,EACT,OAAOE,sBAAA;MAET,IAAIY,EAAA,KAAOV,oBAAA,EACT,OAAOC,4BAAA;IAEX;IAEAU,KAAKD,EAAA,EAAI;MACP,IAAIA,EAAA,KAAOZ,sBAAA,EAIT,OAAO;AAAA,EAHaJ,mBAAA,CAAoB,KAAKkB,WAAW,IACpD,KACAV,kBAEC;AAAA;AAAA;AAAA;AAAA,cAICG,UAAU;AAAA;AAAA,8BAEMA,UAAU;AAAA;AAAA;MAKlC,IAAIK,EAAA,KAAOT,4BAAA,EAIT,OAAO;AAAA,EAHaP,mBAAA,CAAoB,KAAKkB,WAAW,IACpD,KACAV,kBAEC;AAAA;AAAA;AAAA;AAAA,cAICG,UAAU;AAAA;AAAA,8BAEMA,UAAU;AAAA;AAAA;IAIpC;EACF;AACF","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import { isNativeEnvironment } from "vxrn";
2
- var virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_One_SETUP_FILE = `
3
- if (process.env.One_SETUP_FILE) {
4
- import(/* @vite-ignore */ process.env.One_SETUP_FILE)
2
+ var virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_ONE_SETUP_FILE = `
3
+ if (process.env.ONE_SETUP_FILE) {
4
+ import(/* @vite-ignore */ process.env.ONE_SETUP_FILE)
5
5
  }
6
6
  `;
7
7
  function createVirtualEntry(options) {
@@ -19,7 +19,7 @@ function createVirtualEntry(options) {
19
19
  if (id === resolvedVirtualEntryId) {
20
20
  var prependCode = isNativeEnvironment(this.environment) ? "" : (
21
21
  /* `import()` will not work on native */
22
- USE_One_SETUP_FILE
22
+ USE_ONE_SETUP_FILE
23
23
  );
24
24
  return `
25
25
  ${prependCode}
@@ -35,7 +35,7 @@ export default createApp({
35
35
  if (id === resolvedVirtualEntryIdNative) {
36
36
  var prependCode1 = isNativeEnvironment(this.environment) ? "" : (
37
37
  /* `import()` will not work on native */
38
- USE_One_SETUP_FILE
38
+ USE_ONE_SETUP_FILE
39
39
  );
40
40
  return `
41
41
  ${prependCode1}
@@ -2,5 +2,5 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/virtualEntryPlugin.ts"],
4
4
  "mappings": "AACA,SAASA,2BAA2B;AAE7B,IAAMC,qBAAqB,aACrBC,iBAAiB,WAAWD,kBAAAA,IAC5BE,sBAAsB,uBAAuBF,kBAAAA,IACpDG,yBAAyB,OAAOF,gBAEhCG,2BAA2B,GAAGJ,kBAAAA,WACvBK,uBAAuB,WAAWD,wBAAAA,IACzCE,+BAA+B,OAAOF,0BAEtCG,qBAAqB;;;;;AAMpB,SAASC,mBAAmBC,SAAyB;AAC1D,MAAMC,aAAa,IAAID,QAAQE,IAAI;AAEnC,SAAO;IACLC,MAAM;IACNC,SAAS;IAETC,UAAUC,IAAE;AACV,UAAIA,OAAOd;AACT,eAAOE;AAET,UAAIY,OAAOV;AACT,eAAOC;IAEX;IAEAU,KAAKD,IAAE;AACL,UAAIA,OAAOZ,wBAAwB;AACjC,YAAMc,cAAclB,oBAAoB,KAAKmB,WAAW,IACpD;;UACAX;;AACJ,eAAO;EACbU,WAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;AAEA,UAAIK,OAAOT,8BAA8B;AACvC,YAAMW,eAAclB,oBAAoB,KAAKmB,WAAW,IACpD;;UACAX;;AACJ,eAAO;EACbU,YAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;IACF;EACF;AACF;",
5
- "names": ["isNativeEnvironment", "virtualEntryIdName", "virtualEntryId", "virtalEntryIdClient", "resolvedVirtualEntryId", "virtualEntryIdNativeName", "virtualEntryIdNative", "resolvedVirtualEntryIdNative", "USE_One_SETUP_FILE", "createVirtualEntry", "options", "appDirGlob", "root", "name", "enforce", "resolveId", "id", "load", "prependCode", "environment"]
5
+ "names": ["isNativeEnvironment", "virtualEntryIdName", "virtualEntryId", "virtalEntryIdClient", "resolvedVirtualEntryId", "virtualEntryIdNativeName", "virtualEntryIdNative", "resolvedVirtualEntryIdNative", "USE_ONE_SETUP_FILE", "createVirtualEntry", "options", "appDirGlob", "root", "name", "enforce", "resolveId", "id", "load", "prependCode", "environment"]
6
6
  }
@@ -3,7 +3,7 @@ function vitePluginSsrCss(pluginOpts) {
3
3
  let server;
4
4
  const virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
5
5
  return {
6
- name: "vite-plugin-ssr-css",
6
+ name: "one-plugin-ssr-css",
7
7
  apply: "serve",
8
8
  configureServer(server_) {
9
9
  server = server_, server.middlewares.use(async (req, res, next) => {
@@ -3,7 +3,7 @@ function vitePluginSsrCss(pluginOpts) {
3
3
  let server;
4
4
  const virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
5
5
  return {
6
- name: "vite-plugin-ssr-css",
6
+ name: "one-plugin-ssr-css",
7
7
  apply: "serve",
8
8
  configureServer(server_) {
9
9
  server = server_, server.middlewares.use(async (req, res, next) => {
@@ -2,7 +2,7 @@ var VIRTUAL_ENTRY = "virtual:ssr-css.css";
2
2
  function vitePluginSsrCss(pluginOpts) {
3
3
  var server, virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
4
4
  return {
5
- name: "vite-plugin-ssr-css",
5
+ name: "one-plugin-ssr-css",
6
6
  apply: "serve",
7
7
  configureServer(server_) {
8
8
  server = server_, server.middlewares.use(async function(req, res, next) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one",
3
- "version": "1.1.310",
3
+ "version": "1.1.312",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "sideEffects": false,
@@ -82,6 +82,7 @@
82
82
  "@babel/parser": "^7.25.4",
83
83
  "@babel/traverse": "^7.25.4",
84
84
  "@radix-ui/react-slot": "^1.0.2",
85
+ "@react-native-masked-view/masked-view": "^0.3.1",
85
86
  "@react-navigation/bottom-tabs": "~6.5.8",
86
87
  "@react-navigation/core": "6.4.17",
87
88
  "@react-navigation/drawer": "~6.6.3",
@@ -90,15 +91,14 @@
90
91
  "@react-navigation/native-stack": "~6.9.13",
91
92
  "@react-navigation/routers": "~6.1.9",
92
93
  "@ungap/structured-clone": "^1.2.0",
93
- "@vxrn/resolve": "1.1.310",
94
- "@vxrn/tslib-lite": "1.1.310",
95
- "@vxrn/universal-color-scheme": "1.1.310",
96
- "@vxrn/use-isomorphic-layout-effect": "1.1.310",
94
+ "@vxrn/resolve": "1.1.312",
95
+ "@vxrn/tslib-lite": "1.1.312",
96
+ "@vxrn/universal-color-scheme": "1.1.312",
97
+ "@vxrn/use-isomorphic-layout-effect": "1.1.312",
97
98
  "babel-dead-code-elimination": "^1.0.6",
98
99
  "citty": "^0.1.6",
99
100
  "core-js": "^3.38.1",
100
- "create-vxrn": "1.1.310",
101
- "dotenv": "^16.4.5",
101
+ "create-vxrn": "1.1.312",
102
102
  "escape-string-regexp": "^5.0.0",
103
103
  "expo-linking": "~6.3.1",
104
104
  "expo-modules-core": "^1.12.24",
@@ -120,7 +120,7 @@
120
120
  "url-parse": "^1.5.10",
121
121
  "vite": "6.0.0-beta.1",
122
122
  "vite-tsconfig-paths": "^5.0.1",
123
- "vxrn": "1.1.310",
123
+ "vxrn": "1.1.312",
124
124
  "ws": "^8.18.0",
125
125
  "xxhashjs": "^0.2.2"
126
126
  },
package/src/Root.tsx CHANGED
@@ -18,6 +18,7 @@ import { PreloadLinks } from './views/PreloadLinks'
18
18
  import { ScrollRestoration } from './views/ScrollRestoration'
19
19
  import type { One } from './vite/types'
20
20
  import { rand } from './utils/rand'
21
+ import { getURL } from './getURL'
21
22
  // import { SplashScreen } from './views/Splash'
22
23
 
23
24
  if (typeof window !== 'undefined') {
@@ -160,7 +161,7 @@ function Contents({ routes, path, wrapper = Fragment, routeOptions, ...props }:
160
161
  const location =
161
162
  typeof window !== 'undefined' && window.location
162
163
  ? new URL(path || window.location.href || '/', window.location.href)
163
- : new URL(path || '/', 'http://localhost')
164
+ : new URL(path || '/', getURL())
164
165
 
165
166
  return <ContextNavigator {...props} location={location} context={context} wrapper={wrapper} />
166
167
  }
package/src/cleanUrl.ts CHANGED
@@ -1,6 +1,10 @@
1
- import { isNative } from './constants'
1
+ import {
2
+ isNative,
3
+ LOADER_JS_POSTFIX,
4
+ LOADER_JS_POSTFIX_UNCACHED,
5
+ PRELOAD_JS_POSTFIX,
6
+ } from './constants'
2
7
  import { getURL } from './getURL'
3
- import { CACHE_KEY } from './router/constants'
4
8
  import { removeSearch } from './utils/removeSearch'
5
9
 
6
10
  function cleanUrl(path: string) {
@@ -13,11 +17,10 @@ function cleanUrl(path: string) {
13
17
  }
14
18
 
15
19
  const isClient = typeof window !== 'undefined'
16
- const clientSideSearch = isClient ? `?cache=${CACHE_KEY}` : ''
17
20
  const clientSideURL = isClient ? getURL() : ''
18
21
 
19
22
  export function getPreloadPath(currentPath: string) {
20
- return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}_preload.js${clientSideSearch}`
23
+ return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}${PRELOAD_JS_POSTFIX}`
21
24
  }
22
25
 
23
26
  export function getLoaderPath(
@@ -33,20 +36,13 @@ export function getLoaderPath(
33
36
  'http://example.com' /* not important, just for `new URL()` to work */
34
37
  )
35
38
 
36
- return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}_vxrn_loader.js${getSearchParams(currentPathUrl.search)}`
39
+ return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}${LOADER_JS_POSTFIX}`
37
40
  }
38
41
 
39
42
  export function getPathFromLoaderPath(loaderPath: string) {
40
43
  return loaderPath
41
- .replace('_vxrn_loader.js', '')
44
+ .replace(LOADER_JS_POSTFIX_UNCACHED, '')
45
+ .replace(/_\d+/, '')
42
46
  .replace(/^(\/_one)?\/assets/, '')
43
47
  .replaceAll(/_/g, '/')
44
48
  }
45
-
46
- function getSearchParams(searchParams) {
47
- if (!searchParams) {
48
- return clientSideSearch
49
- }
50
-
51
- return `${searchParams}&${clientSideSearch.slice(1) /* remove the leading "?" */}`
52
- }
package/src/cli.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { defineCommand, runMain } from 'citty'
2
2
  import colors from 'picocolors'
3
- import { loadEnv } from './vite/loadEnv'
4
3
  import { readFileSync } from 'node:fs'
5
4
  import path from 'node:path'
6
5
  import { fileURLToPath } from 'node:url'
@@ -21,8 +20,6 @@ function getPackageVersion() {
21
20
 
22
21
  const version = getPackageVersion()
23
22
 
24
- void loadEnv(process.cwd())
25
-
26
23
  if (path.sep !== '/') {
27
24
  console.warn(
28
25
  colors.bgYellow('WARNING: UNSUPPORTED OS') +
package/src/config.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isWebServer } from './constants'
2
2
  import type { One } from './vite/types'
3
3
 
4
- const CLIENT_RENDER_MODE = process.env.One_DEFAULT_RENDER_MODE as One.RouteRenderMode | undefined
4
+ const CLIENT_RENDER_MODE = process.env.ONE_DEFAULT_RENDER_MODE as One.RouteRenderMode | undefined
5
5
 
6
6
  // works client or server
7
7
  export const getDefaultRenderMode = () => {
package/src/constants.ts CHANGED
@@ -1,3 +1,9 @@
1
1
  export const isWebClient = process.env.TAMAGUI_TARGET !== 'native' && typeof window !== 'undefined'
2
2
  export const isWebServer = process.env.TAMAGUI_TARGET !== 'native' && typeof window === 'undefined'
3
3
  export const isNative = process.env.TAMAGUI_TARGET === 'native'
4
+
5
+ export const CACHE_KEY = `${process.env.ONE_CACHE_KEY ?? Math.round(Math.random() * 100_000_000)}`
6
+
7
+ export const LOADER_JS_POSTFIX_UNCACHED = `_vxrn_loader.js`
8
+ export const LOADER_JS_POSTFIX = `_${CACHE_KEY}${LOADER_JS_POSTFIX_UNCACHED}`
9
+ export const PRELOAD_JS_POSTFIX = `_${CACHE_KEY}_preload.js`
@@ -15,7 +15,7 @@ export function createApp(options: CreateAppProps): void {
15
15
  // TODO remove once we get a nice setup in tamagui repo for building native app and loading it
16
16
  AppRegistry.registerComponent('tamaguikitchensink', () => App)
17
17
 
18
- if (process.env.One_APP_NAME) {
19
- AppRegistry.registerComponent(process.env.One_APP_NAME, () => App)
18
+ if (process.env.ONE_APP_NAME) {
19
+ AppRegistry.registerComponent(process.env.ONE_APP_NAME, () => App)
20
20
  }
21
21
  }
@@ -1,4 +1,5 @@
1
1
  import { getPathFromLoaderPath } from './cleanUrl'
2
+ import { LOADER_JS_POSTFIX, LOADER_JS_POSTFIX_UNCACHED } from './constants'
2
3
  import type { RouteInfo } from './server/createRoutesManifest'
3
4
  import { isResponse } from './utils/isResponse'
4
5
  import { promiseWithResolvers } from './utils/promiseWithResolvers'
@@ -99,7 +100,7 @@ export function createHandleRequest(
99
100
  }
100
101
 
101
102
  if (handlers.handleLoader) {
102
- const isClientRequestingNewRoute = pathname.endsWith('_vxrn_loader.js')
103
+ const isClientRequestingNewRoute = pathname.endsWith(LOADER_JS_POSTFIX_UNCACHED)
103
104
 
104
105
  if (isClientRequestingNewRoute) {
105
106
  const originalUrl = getPathFromLoaderPath(pathname)
@@ -111,10 +112,15 @@ export function createHandleRequest(
111
112
  // TODO improve/remove when not found is fixed
112
113
  continue
113
114
  }
115
+
114
116
  if (!route.workingRegex.test(finalUrl.pathname)) {
115
117
  continue
116
118
  }
117
119
 
120
+ if (process.env.NODE_ENV === 'development') {
121
+ console.info(` ❶ Running loader for route: ${finalUrl.pathname}`)
122
+ }
123
+
118
124
  const headers = new Headers()
119
125
  headers.set('Content-Type', 'text/javascript')
120
126
 
package/src/getURL.ts CHANGED
@@ -6,5 +6,5 @@ const CLIENT_BASE_URL =
6
6
  export function getURL() {
7
7
  // We should use `CLIENT_BASE_URL` on the client as we can't guarantee how the client is connected to the server - it's possible that the server is listening on `127.0.0.1` and the client is connected via `localhost`. Things might break if URLs don't match due to a JS module being double-loaded via two different URLs.
8
8
  // `process.env.ONE_SERVER_URL` is for the server, where `CLIENT_BASE_URL` will be blank.
9
- return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || ''
9
+ return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || 'http://localhost'
10
10
  }
package/src/matchers.ts CHANGED
@@ -22,7 +22,7 @@ export function matchGroupName(name: string): string | undefined {
22
22
 
23
23
  /** Match the first array group name `(a,b,c)/(d,c)` -> `'a,b,c'` */
24
24
  export function matchArrayGroupName(name: string) {
25
- return name.match(/(?:[^\\(\\)])*?\(([^\\/]+,[^\\/]+)\).*?$/)?.[1]
25
+ return name.match(/(?:[^\\(\\)])*?\(?([^\\/\(\)]+,[^\\/\(\)]+)\)?.*?$/)?.[1]
26
26
  }
27
27
 
28
28
  export function getNameFromFilePath(name: string): string {
package/src/serve.ts CHANGED
@@ -4,16 +4,16 @@ import FSExtra from 'fs-extra'
4
4
  import type { Hono } from 'hono'
5
5
  import Path, { join } from 'node:path'
6
6
  import type { VXRNOptions } from 'vxrn'
7
- import { getServerEntry, serve as vxrnServe } from 'vxrn'
7
+ import { getServerEntry, loadEnv, serve as vxrnServe } from 'vxrn'
8
+ import { labelProcess } from './cli/label-process'
8
9
  import { createHandleRequest } from './createHandleRequest'
9
10
  import type { RenderAppProps } from './types'
10
11
  import { isResponse } from './utils/isResponse'
11
12
  import { isStatusRedirect } from './utils/isStatus'
12
13
  import { removeUndefined } from './utils/removeUndefined'
14
+ import { loadUserOneOptions } from './vite/one'
13
15
  import { resolveAPIRequest } from './vite/resolveAPIRequest'
14
16
  import type { One } from './vite/types'
15
- import { loadUserOneOptions } from './vite/one'
16
- import { labelProcess } from './cli/label-process'
17
17
 
18
18
  process.on('uncaughtException', (err) => {
19
19
  console.error(`[one] Uncaught exception`, err?.stack || err)
@@ -21,6 +21,8 @@ process.on('uncaughtException', (err) => {
21
21
 
22
22
  export async function serve(args: VXRNOptions['server'] = {}) {
23
23
  labelProcess('serve')
24
+ loadEnv('production')
25
+
24
26
  const oneOptions = await loadUserOneOptions('serve')
25
27
 
26
28
  // TODO make this better, this ensures we get react 19
package/src/useLoader.ts CHANGED
@@ -91,7 +91,7 @@ export function useLoader<
91
91
  try {
92
92
  const response = await (async () => {
93
93
  if (isNative) {
94
- const nativeLoaderJSUrl = `${loaderJSUrl}&platform=ios` /* TODO: platform */
94
+ const nativeLoaderJSUrl = `${loaderJSUrl}?platform=ios` /* TODO: platform */
95
95
 
96
96
  try {
97
97
  // On native, we need to fetch the loader code and eval it