one 1.1.311 → 1.1.312

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) 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 +3 -3
  28. package/dist/cjs/serve.cjs.map +1 -1
  29. package/dist/cjs/serve.native.js +2 -2
  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 +2 -2
  34. package/dist/cjs/vite/build.cjs.map +1 -1
  35. package/dist/cjs/vite/build.native.js +1 -1
  36. package/dist/cjs/vite/build.native.js.map +1 -1
  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 +4 -4
  88. package/dist/esm/serve.js.map +1 -1
  89. package/dist/esm/serve.mjs +4 -4
  90. package/dist/esm/serve.mjs.map +1 -1
  91. package/dist/esm/serve.native.js +4 -4
  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 +1 -1
  97. package/dist/esm/vite/build.js.map +1 -1
  98. package/dist/esm/vite/build.mjs +1 -1
  99. package/dist/esm/vite/build.mjs.map +1 -1
  100. package/dist/esm/vite/build.native.js +1 -1
  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 +5 -3
  131. package/src/useLoader.ts +1 -1
  132. package/src/vite/build.ts +2 -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/virtualEntryPlugin.ts +5 -5
  137. package/src/vite/vitePluginSsrCss.ts +1 -1
  138. package/types/cleanUrl.d.ts.map +1 -1
  139. package/types/constants.d.ts +4 -0
  140. package/types/constants.d.ts.map +1 -1
  141. package/types/createHandleRequest.d.ts.map +1 -1
  142. package/types/serve.d.ts.map +1 -1
  143. package/types/vite/build.d.ts.map +1 -1
  144. package/types/vite/one.d.ts.map +1 -1
  145. package/dist/cjs/router/constants.cjs +0 -26
  146. package/dist/cjs/router/constants.cjs.map +0 -6
  147. package/dist/cjs/router/constants.native.js +0 -26
  148. package/dist/cjs/router/constants.native.js.map +0 -6
  149. package/dist/cjs/vite/loadEnv.cjs +0 -47
  150. package/dist/cjs/vite/loadEnv.cjs.map +0 -6
  151. package/dist/cjs/vite/loadEnv.native.js +0 -44
  152. package/dist/cjs/vite/loadEnv.native.js.map +0 -6
  153. package/dist/esm/router/constants.js +0 -5
  154. package/dist/esm/router/constants.js.map +0 -6
  155. package/dist/esm/router/constants.mjs +0 -3
  156. package/dist/esm/router/constants.mjs.map +0 -1
  157. package/dist/esm/router/constants.native.js +0 -5
  158. package/dist/esm/router/constants.native.js.map +0 -6
  159. package/dist/esm/vite/loadEnv.js +0 -13
  160. package/dist/esm/vite/loadEnv.js.map +0 -6
  161. package/dist/esm/vite/loadEnv.mjs +0 -13
  162. package/dist/esm/vite/loadEnv.mjs.map +0 -1
  163. package/dist/esm/vite/loadEnv.native.js +0 -16
  164. package/dist/esm/vite/loadEnv.native.js.map +0 -6
  165. package/src/router/constants.ts +0 -4
  166. package/src/vite/loadEnv.ts +0 -11
  167. package/types/router/constants.d.ts +0 -2
  168. package/types/router/constants.d.ts.map +0 -1
  169. package/types/vite/loadEnv.d.ts +0 -2
  170. package/types/vite/loadEnv.d.ts.map +0 -1
@@ -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.311",
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.311",
94
- "@vxrn/tslib-lite": "1.1.311",
95
- "@vxrn/universal-color-scheme": "1.1.311",
96
- "@vxrn/use-isomorphic-layout-effect": "1.1.311",
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.311",
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.311",
123
+ "vxrn": "1.1.312",
124
124
  "ws": "^8.18.0",
125
125
  "xxhashjs": "^0.2.2"
126
126
  },
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)
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
package/src/vite/build.ts CHANGED
@@ -13,13 +13,13 @@ import {
13
13
  type ClientManifestEntry,
14
14
  } from 'vxrn'
15
15
  import { getLoaderPath, getPreloadPath } from '../cleanUrl'
16
+ import { labelProcess } from '../cli/label-process'
16
17
  import type { RouteInfo } from '../server/createRoutesManifest'
17
18
  import type { LoaderProps, RenderApp } from '../types'
18
19
  import { getManifest } from './getManifest'
19
20
  import { loadUserOneOptions } from './one'
20
21
  import { replaceLoader } from './replaceLoader'
21
22
  import type { One } from './types'
22
- import { labelProcess } from '../cli/label-process'
23
23
 
24
24
  const { ensureDir, readFile, outputFile } = FSExtra
25
25
 
@@ -32,6 +32,7 @@ export async function build(args: {
32
32
  only?: string
33
33
  }) {
34
34
  labelProcess('build')
35
+
35
36
  const userOptions = await loadUserOneOptions('build')
36
37
  const serverOutputFormat = userOptions.build?.server?.outputFormat ?? 'esm'
37
38
 
@@ -10,7 +10,7 @@ const generate = BabelGenerate['default'] as any as typeof BabelGenerate
10
10
 
11
11
  export const clientTreeShakePlugin = (): Plugin => {
12
12
  return {
13
- name: 'one:client-tree-shake',
13
+ name: 'one-client-tree-shake',
14
14
 
15
15
  enforce: 'pre',
16
16
 
@@ -173,7 +173,7 @@ export function createFileSystemRouter(options: One.PluginOptions): Plugin {
173
173
  }
174
174
 
175
175
  return {
176
- name: `router-fs`,
176
+ name: `one-router-fs`,
177
177
  enforce: 'post',
178
178
  apply: 'serve',
179
179
 
package/src/vite/one.ts CHANGED
@@ -1,17 +1,17 @@
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 { type Plugin, type PluginOption, type UserConfig, 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 type { One } from './types'
16
16
  import { createVirtualEntry, virtualEntryId } from './virtualEntryPlugin'
17
17
  import { vitePluginSsrCss } from './vitePluginSsrCss'
@@ -24,8 +24,6 @@ globalThis.__vxrnEnableNativeEnv = true
24
24
  export function one(options: One.PluginOptions = {}): PluginOption {
25
25
  oneOptions = options
26
26
 
27
- void loadEnv(process.cwd())
28
-
29
27
  // ensure tsconfig
30
28
  if (options.config?.ensureTSConfig !== false) {
31
29
  void ensureTSConfig()
@@ -46,7 +44,18 @@ export function one(options: One.PluginOptions = {}): PluginOption {
46
44
 
47
45
  const vxrnOptions = getOptionsFilled()
48
46
 
47
+ const { clientEnvDefine } = loadEnv(vxrnOptions?.mode ?? 'development')
48
+
49
49
  const devAndProdPlugins = [
50
+ {
51
+ name: 'one-define-env',
52
+ config() {
53
+ return {
54
+ define: clientEnvDefine,
55
+ }
56
+ },
57
+ },
58
+
50
59
  // proxy because you cant add a plugin inside a plugin
51
60
  new Proxy(
52
61
  {
@@ -126,16 +135,20 @@ export function one(options: One.PluginOptions = {}): PluginOption {
126
135
  return {
127
136
  define: {
128
137
  ...(options.web?.defaultRenderMode && {
129
- 'process.env.One_DEFAULT_RENDER_MODE': JSON.stringify(options.web.defaultRenderMode),
138
+ 'process.env.ONE_DEFAULT_RENDER_MODE': JSON.stringify(options.web.defaultRenderMode),
139
+ 'import.meta.env.ONE_DEFAULT_RENDER_MODE': JSON.stringify(
140
+ options.web.defaultRenderMode
141
+ ),
130
142
  }),
131
143
 
132
144
  ...(options.setupFile && {
133
- 'process.env.One_SETUP_FILE': JSON.stringify(options.setupFile),
145
+ 'process.env.ONE_SETUP_FILE': JSON.stringify(options.setupFile),
134
146
  }),
135
147
 
136
148
  ...(process.env.NODE_ENV !== 'production' &&
137
149
  vxrnOptions && {
138
150
  'process.env.ONE_SERVER_URL': JSON.stringify(vxrnOptions.server.url),
151
+ 'import.meta.env.ONE_SERVER_URL': JSON.stringify(vxrnOptions.server.url),
139
152
  }),
140
153
  },
141
154
 
@@ -143,12 +156,28 @@ export function one(options: One.PluginOptions = {}): PluginOption {
143
156
  client: {
144
157
  define: {
145
158
  'process.env.VITE_ENVIRONMENT': '"client"',
159
+ 'import.meta.env.VITE_ENVIRONMENT': '"client"',
146
160
  },
147
161
  },
148
162
 
149
163
  ssr: {
150
164
  define: {
151
165
  'process.env.VITE_ENVIRONMENT': '"ssr"',
166
+ 'import.meta.env.VITE_ENVIRONMENT': '"ssr"',
167
+ },
168
+ },
169
+
170
+ ios: {
171
+ define: {
172
+ 'process.env.VITE_ENVIRONMENT': '"ios"',
173
+ 'import.meta.env.VITE_ENVIRONMENT': '"ios"',
174
+ },
175
+ },
176
+
177
+ android: {
178
+ define: {
179
+ 'process.env.VITE_ENVIRONMENT': '"android"',
180
+ 'import.meta.env.VITE_ENVIRONMENT': '"android"',
152
181
  },
153
182
  },
154
183
  },
@@ -232,7 +261,7 @@ export function one(options: One.PluginOptions = {}): PluginOption {
232
261
  }),
233
262
 
234
263
  {
235
- name: 'define-app-key',
264
+ name: 'one-define-environment',
236
265
  config() {
237
266
  if (!options.app?.key) {
238
267
  return
@@ -240,14 +269,18 @@ export function one(options: One.PluginOptions = {}): PluginOption {
240
269
 
241
270
  return {
242
271
  define: {
243
- 'process.env.One_APP_NAME': JSON.stringify(options.app.key),
272
+ 'process.env.ONE_APP_NAME': JSON.stringify(options.app.key),
273
+ 'import.meta.env.ONE_APP_NAME': JSON.stringify(options.app.key),
274
+
275
+ 'process.env.ONE_CACHE_KEY': JSON.stringify(CACHE_KEY),
276
+ 'import.meta.env.ONE_CACHE_KEY': JSON.stringify(CACHE_KEY),
244
277
  },
245
278
  }
246
279
  },
247
280
  } satisfies Plugin,
248
281
 
249
282
  {
250
- name: 'use-react-18-for-native',
283
+ name: 'one-use-react-18-for-native',
251
284
  enforce: 'pre',
252
285
 
253
286
  async config() {
@@ -275,7 +308,7 @@ export function one(options: One.PluginOptions = {}): PluginOption {
275
308
  } satisfies Plugin,
276
309
 
277
310
  {
278
- name: 'optimize-deps-load-web-extensions',
311
+ name: 'one-optimize-deps-load-web-extensions',
279
312
  enforce: 'pre',
280
313
 
281
314
  applyToEnvironment(environment) {
@@ -10,9 +10,9 @@ const virtualEntryIdNativeName = `${virtualEntryIdName}-native`
10
10
  export const virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`
11
11
  const resolvedVirtualEntryIdNative = '\0' + virtualEntryIdNativeName
12
12
 
13
- const USE_One_SETUP_FILE = `
14
- if (process.env.One_SETUP_FILE) {
15
- import(/* @vite-ignore */ process.env.One_SETUP_FILE)
13
+ const USE_ONE_SETUP_FILE = `
14
+ if (process.env.ONE_SETUP_FILE) {
15
+ import(/* @vite-ignore */ process.env.ONE_SETUP_FILE)
16
16
  }
17
17
  `
18
18
 
@@ -36,7 +36,7 @@ export function createVirtualEntry(options: { root: string }): Plugin {
36
36
  if (id === resolvedVirtualEntryId) {
37
37
  const prependCode = isNativeEnvironment(this.environment)
38
38
  ? '' /* `import()` will not work on native */
39
- : USE_One_SETUP_FILE
39
+ : USE_ONE_SETUP_FILE
40
40
  return `
41
41
  ${prependCode}
42
42
 
@@ -52,7 +52,7 @@ export default createApp({
52
52
  if (id === resolvedVirtualEntryIdNative) {
53
53
  const prependCode = isNativeEnvironment(this.environment)
54
54
  ? '' /* `import()` will not work on native */
55
- : USE_One_SETUP_FILE
55
+ : USE_ONE_SETUP_FILE
56
56
  return `
57
57
  ${prependCode}
58
58
 
@@ -12,7 +12,7 @@ export function vitePluginSsrCss(pluginOpts: { entries: string[] }): Plugin {
12
12
  const virtualHref = '/@id/__x00__' + VIRTUAL_ENTRY
13
13
 
14
14
  return {
15
- name: `vite-plugin-ssr-css`,
15
+ name: `one-plugin-ssr-css`,
16
16
  apply: 'serve',
17
17
  configureServer(server_) {
18
18
  server = server_
@@ -1 +1 @@
1
- {"version":3,"file":"cleanUrl.d.ts","sourceRoot":"","sources":["../src/cleanUrl.ts"],"names":[],"mappings":"AAkBA,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,UAEjD;AAED,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EAEnB,UAAU,UAAW,UAWtB;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,UAKvD"}
1
+ {"version":3,"file":"cleanUrl.d.ts","sourceRoot":"","sources":["../src/cleanUrl.ts"],"names":[],"mappings":"AAqBA,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,UAEjD;AAED,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EAEnB,UAAU,UAAW,UAWtB;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,UAMvD"}
@@ -1,4 +1,8 @@
1
1
  export declare const isWebClient: boolean;
2
2
  export declare const isWebServer: boolean;
3
3
  export declare const isNative: boolean;
4
+ export declare const CACHE_KEY: string;
5
+ export declare const LOADER_JS_POSTFIX_UNCACHED = "_vxrn_loader.js";
6
+ export declare const LOADER_JS_POSTFIX: string;
7
+ export declare const PRELOAD_JS_POSTFIX: string;
4
8
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,QAAQ,SAA0C,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,QAAQ,SAA0C,CAAA;AAE/D,eAAO,MAAM,SAAS,QAA4E,CAAA;AAElG,eAAO,MAAM,0BAA0B,oBAAoB,CAAA;AAC3D,eAAO,MAAM,iBAAiB,QAA+C,CAAA;AAC7E,eAAO,MAAM,kBAAkB,QAA6B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAA;CAC5D,CAAA;AAED,KAAK,sBAAsB,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,QAAQ,EAAE;IACR,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACxD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACzD;;uBA4BgD,OAAO,KAAG,OAAO,CAAC,sBAAsB,CAAC;EAsJ3F"}
1
+ {"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAA;CAC5D,CAAA;AAED,KAAK,sBAAsB,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,QAAQ,EAAE;IACR,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACxD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACzD;;uBA4BgD,OAAO,KAAG,OAAO,CAAC,sBAAsB,CAAC;EAsJ3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAK3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAgBvC,wBAAsB,KAAK,CAAC,IAAI,GAAE,WAAW,CAAC,QAAQ,CAAM;mDAfJ,YAC9C;+CAER,YAAY;gDAED,YAAY;iDAElB,YAAW;+CAEW,YAAW;mDAGO,YAAY;GA6B1D"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAK3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAgBvC,wBAAsB,KAAK,CAAC,IAAI,GAAE,WAAW,CAAC,QAAQ,CAAM;mDAfJ,YACvD;+CAC+C,YAChD;gDAEK,YAAY;iDAEV,YAAY;+CAEX,YAAY;mDAGkB,YAAY;GA+BjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/vite/build.ts"],"names":[],"mappings":"AA6BA,wBAAsB,KAAK,CAAC,IAAI,EAAE;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,iBAsgBA"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/vite/build.ts"],"names":[],"mappings":"AA6BA,wBAAsB,KAAK,CAAC,IAAI,EAAE;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,iBAugBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAuC,MAAM,MAAM,CAAA;AAG1F,OAAO,qBAAqB,CAAA;AAS5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AASlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CA+RjE;AAeD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,8BAalE"}
1
+ {"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,YAAY,EAAuC,MAAM,MAAM,CAAA;AAI1F,OAAO,qBAAqB,CAAA;AAO5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AASlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CAgUjE;AAeD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,8BAalE"}
@@ -1,26 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- });
16
- return to;
17
- };
18
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
20
- }), mod);
21
- var constants_exports = {};
22
- __export(constants_exports, {
23
- CACHE_KEY: () => CACHE_KEY
24
- });
25
- module.exports = __toCommonJS(constants_exports);
26
- const CACHE_KEY = `${Math.random()}`.slice(3);
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/router/constants.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,YAAY,GAAG,KAAK,OAAO,CAAC,GAAG,MAAM,CAAC;",
5
- "names": []
6
- }
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
- var constants_exports = {};
17
- __export(constants_exports, {
18
- CACHE_KEY: () => CACHE_KEY
19
- });
20
- module.exports = __toCommonJS(constants_exports);
21
- var CACHE_KEY = `${Math.random()}`.slice(3);
22
- // Annotate the CommonJS export names for ESM import in node:
23
- 0 && (module.exports = {
24
- CACHE_KEY
25
- });
26
- //# 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": ";;;;;;;;;;;;;;;AAAA;;;;;AAGO,IAAMA,YAAY,GAAGC,KAAKC,OAAM,CAAA,GAAKC,MAAM,CAAA;",
5
- "names": ["CACHE_KEY", "Math", "random", "slice"]
6
- }
@@ -1,47 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
32
- var loadEnv_exports = {};
33
- __export(loadEnv_exports, {
34
- loadEnv: () => loadEnv
35
- });
36
- module.exports = __toCommonJS(loadEnv_exports);
37
- var import_node_fs = __toESM(require("node:fs"), 1),
38
- import_node_path = __toESM(require("node:path"), 1);
39
- async function loadEnv(root) {
40
- const envPath = import_node_path.default.join(root, ".env");
41
- if (!import_node_fs.default.existsSync(envPath)) return;
42
- const result = (await import("dotenv")).config({
43
- path: envPath
44
- });
45
- if (result.error) throw result.error;
46
- return !0;
47
- }
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/vite/loadEnv.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAe,gCACf,mBAAiB;AAEjB,eAAsB,QAAQ,MAAc;AAC1C,QAAM,UAAU,iBAAAA,QAAK,KAAK,MAAM,MAAM;AACtC,MAAI,CAAC,eAAAC,QAAG,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": ["path", "fs"]
6
- }