one 1.1.301 → 1.1.303

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/dist/cjs/cli/main.js +2 -2
  2. package/dist/cjs/cli/main.js.map +1 -1
  3. package/dist/cjs/cli/main.native.js +2 -2
  4. package/dist/cjs/cli/main.native.js.map +1 -1
  5. package/dist/cjs/cli/run.js +1 -0
  6. package/dist/cjs/cli/run.js.map +1 -1
  7. package/dist/cjs/cli/run.native.js +1 -0
  8. package/dist/cjs/cli/run.native.js.map +2 -2
  9. package/dist/cjs/cli.js +48 -16
  10. package/dist/cjs/cli.js.map +2 -2
  11. package/dist/cjs/cli.native.js +46 -23
  12. package/dist/cjs/cli.native.js.map +2 -2
  13. package/dist/cjs/useLoader.js +1 -1
  14. package/dist/cjs/useLoader.js.map +1 -1
  15. package/dist/cjs/useLoader.native.js +1 -1
  16. package/dist/cjs/useLoader.native.js.map +1 -1
  17. package/dist/cjs/vite/one.js.map +1 -1
  18. package/dist/cjs/vite/one.native.js.map +1 -1
  19. package/dist/esm/cli/main.js +2 -2
  20. package/dist/esm/cli/main.js.map +1 -1
  21. package/dist/esm/cli/main.mjs +2 -2
  22. package/dist/esm/cli/main.mjs.map +1 -1
  23. package/dist/esm/cli/main.native.js +2 -2
  24. package/dist/esm/cli/main.native.js.map +1 -1
  25. package/dist/esm/cli/run.js +1 -0
  26. package/dist/esm/cli/run.js.map +1 -1
  27. package/dist/esm/cli/run.mjs +1 -0
  28. package/dist/esm/cli/run.mjs.map +1 -1
  29. package/dist/esm/cli/run.native.js +1 -0
  30. package/dist/esm/cli/run.native.js.map +2 -2
  31. package/dist/esm/cli.js +48 -15
  32. package/dist/esm/cli.js.map +2 -2
  33. package/dist/esm/cli.mjs +54 -15
  34. package/dist/esm/cli.mjs.map +1 -1
  35. package/dist/esm/cli.native.js +46 -22
  36. package/dist/esm/cli.native.js.map +2 -2
  37. package/dist/esm/useLoader.js +1 -1
  38. package/dist/esm/useLoader.js.map +1 -1
  39. package/dist/esm/useLoader.mjs +1 -1
  40. package/dist/esm/useLoader.mjs.map +1 -1
  41. package/dist/esm/useLoader.native.js +1 -1
  42. package/dist/esm/useLoader.native.js.map +2 -2
  43. package/dist/esm/vite/one.js.map +1 -1
  44. package/dist/esm/vite/one.mjs.map +1 -1
  45. package/dist/esm/vite/one.native.js.map +1 -1
  46. package/package.json +7 -6
  47. package/src/cli/main.ts +3 -3
  48. package/src/cli/run.ts +4 -0
  49. package/src/cli.ts +59 -15
  50. package/src/useLoader.ts +1 -3
  51. package/src/vite/one.ts +1 -1
  52. package/types/cli/main.d.ts +3 -1
  53. package/types/cli/main.d.ts.map +1 -1
  54. package/types/cli/run.d.ts +1 -0
  55. package/types/cli/run.d.ts.map +1 -1
  56. package/types/useLoader.d.ts.map +1 -1
@@ -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,SAAeC,eAAe;AAC7C,SAA0DC,0BAA0B;AACpF,OAAOC,mBAAmB;AAC1B,SAASC,iBAAiBC,kBAAkBC,wBAAwB;AACpE,OAAO;AACP,SAASC,mBAAmB;AAC5B,SAASC,sBAAsB;AAC/B,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,gBAA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;AAEA,IAAIO,aAAuC;AAE3C,eAAemF,kBAAkBC,SAA2B;AAC1D,MAAI,CAACpF,YAAY;AACf,QAAI,CAACoF,QAAS,OAAM,IAAIC,MAAM,yCAAyC;AACvE,UAAMC,mBAAmBF,OAAAA;EAC3B;AACA,MAAI,CAACpF;AACH,UAAM,IAAIqF,MAAM,4BAA4B;AAE9C,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
5
  "names": ["events", "path", "dirname", "resolve", "loadConfigFromFile", "tsconfigPaths", "getOptimizeDeps", "getOptionsFilled", "isWebEnvironment", "existsAsync", "requireResolve", "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"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one",
3
- "version": "1.1.301",
3
+ "version": "1.1.303",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "sideEffects": false,
@@ -89,13 +89,13 @@
89
89
  "@react-navigation/native-stack": "~6.9.13",
90
90
  "@react-navigation/routers": "~6.1.9",
91
91
  "@ungap/structured-clone": "^1.2.0",
92
- "@vxrn/tslib-lite": "1.1.301",
93
- "@vxrn/universal-color-scheme": "1.1.301",
94
- "@vxrn/use-isomorphic-layout-effect": "1.1.301",
92
+ "@vxrn/tslib-lite": "1.1.303",
93
+ "@vxrn/universal-color-scheme": "1.1.303",
94
+ "@vxrn/use-isomorphic-layout-effect": "1.1.303",
95
95
  "babel-dead-code-elimination": "^1.0.6",
96
96
  "citty": "^0.1.6",
97
97
  "core-js": "^3.38.1",
98
- "create-vxrn": "1.1.301",
98
+ "create-vxrn": "1.1.303",
99
99
  "dotenv": "^16.4.5",
100
100
  "escape-string-regexp": "^5.0.0",
101
101
  "expo-linking": "~6.3.1",
@@ -108,6 +108,7 @@
108
108
  "micromatch": "^4.0.7",
109
109
  "nanoid": "^3.3.7",
110
110
  "perfect-debounce": "^1.0.0",
111
+ "picocolors": "^1.0.0",
111
112
  "react": "^18.2.0 || ^19.0.0",
112
113
  "react-dom": "^18.3.1",
113
114
  "react-native-gesture-handler": "^2.18.1",
@@ -117,7 +118,7 @@
117
118
  "url-parse": "^1.5.10",
118
119
  "vite": "6.0.0-beta.1",
119
120
  "vite-tsconfig-paths": "^5.0.1",
120
- "vxrn": "1.1.301",
121
+ "vxrn": "1.1.303",
121
122
  "ws": "^8.18.0",
122
123
  "xxhashjs": "^0.2.2"
123
124
  },
package/src/cli/main.ts CHANGED
@@ -23,16 +23,16 @@ async function getLatestVersion(packageName: string) {
23
23
  }
24
24
  }
25
25
 
26
- export async function cliMain(args = {}) {
26
+ export async function cliMain(args: { name?: string } = {}) {
27
27
  // async as the flow takes a minute anyway
28
28
  void getLatestVersion('one')
29
29
 
30
30
  if (existsSync('vite.config.ts')) {
31
31
  // Inside existing app, let's just run the damn thing
32
- await run(args)
32
+ await run({})
33
33
  process.exit(0)
34
34
  }
35
35
 
36
36
  const { create } = await import('create-vxrn/create')
37
- await create({})
37
+ await create(args)
38
38
  }
package/src/cli/run.ts CHANGED
@@ -6,10 +6,14 @@ export async function run(args: {
6
6
  host?: string
7
7
  port?: string
8
8
  https?: boolean
9
+ mode?: 'development' | 'production'
9
10
  }) {
10
11
  labelProcess('dev')
12
+
11
13
  const { dev } = await import('vxrn')
14
+
12
15
  const { start, stop } = await dev({
16
+ mode: args.mode,
13
17
  clean: args.clean,
14
18
  root: process.cwd(),
15
19
  server: {
package/src/cli.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { defineCommand, runMain } from 'citty'
2
+ import colors from 'picocolors'
2
3
  import { loadEnv } from './vite/loadEnv'
3
4
  import { readFileSync } from 'node:fs'
4
5
  import path from 'node:path'
@@ -22,6 +23,20 @@ const version = getPackageVersion()
22
23
 
23
24
  void loadEnv(process.cwd())
24
25
 
26
+ if (path.sep !== '/') {
27
+ console.warn(
28
+ colors.bgYellow('WARNING: UNSUPPORTED OS') +
29
+ colors.yellow(
30
+ ' - It appears you’re using Windows, which is currently not supported. You may experience unexpected issues.'
31
+ )
32
+ )
33
+ }
34
+
35
+ const modes = {
36
+ development: 'development',
37
+ production: 'production',
38
+ } as const
39
+
25
40
  const dev = defineCommand({
26
41
  meta: {
27
42
  name: 'dev',
@@ -41,10 +56,21 @@ const dev = defineCommand({
41
56
  https: {
42
57
  type: 'boolean',
43
58
  },
59
+ mode: {
60
+ type: 'string',
61
+ description:
62
+ 'If set to "production" you can run the development server but serve the production bundle',
63
+ },
44
64
  },
45
- async run({ args }) {
65
+ async run({ args: { clean, host, https, mode, port } }) {
46
66
  const { run } = await import('./cli/run')
47
- await run(args)
67
+ await run({
68
+ clean,
69
+ host,
70
+ https,
71
+ mode: modes[mode],
72
+ port,
73
+ })
48
74
  },
49
75
  })
50
76
 
@@ -135,7 +161,7 @@ const runIos = defineCommand({
135
161
 
136
162
  const runAndroid = defineCommand({
137
163
  meta: {
138
- name: 'run:ios',
164
+ name: 'run:android',
139
165
  version: version,
140
166
  },
141
167
  args: {},
@@ -160,31 +186,49 @@ const clean = defineCommand({
160
186
  },
161
187
  })
162
188
 
189
+ const subCommands = {
190
+ dev,
191
+ clean,
192
+ build: buildCommand,
193
+ prebuild,
194
+ 'run:ios': runIos,
195
+ 'run:android': runAndroid,
196
+ serve: serveCommand,
197
+ }
198
+
199
+ // workaround for having sub-commands but also positional arg for naming in the create flow
200
+ const subMain = defineCommand({
201
+ meta: {
202
+ name: 'main',
203
+ version: version,
204
+ description: 'Welcome to One',
205
+ },
206
+ subCommands,
207
+ })
208
+
163
209
  const main = defineCommand({
164
210
  meta: {
165
211
  name: 'main',
166
212
  version: version,
167
213
  description: 'Welcome to One',
168
214
  },
169
- args: {},
215
+ args: {
216
+ name: {
217
+ type: 'positional',
218
+ description: 'Folder name to place the app into',
219
+ required: false,
220
+ },
221
+ },
170
222
  async run({ args }) {
171
- if (['clean', 'prebuild', 'run:ios', 'run:android'].includes(args._[0])) {
172
- // IDK why we're getting into here after a subcommand has been run
223
+ if (subCommands[args.name]) {
224
+ // run sub command ourselves
225
+ runMain(subMain)
173
226
  return
174
227
  }
175
228
 
176
229
  const { cliMain } = await import('./cli/main')
177
230
  await cliMain(args)
178
231
  },
179
- subCommands: {
180
- dev,
181
- clean,
182
- build: buildCommand,
183
- prebuild,
184
- 'run:ios': runIos,
185
- 'run:android': runAndroid,
186
- serve: serveCommand,
187
- },
188
232
  })
189
233
 
190
234
  runMain(main)
package/src/useLoader.ts CHANGED
@@ -1,15 +1,13 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
  import { useEffect, useRef } from 'react'
3
- import { getURL } from './getURL'
3
+ import { getLoaderPath } from './cleanUrl'
4
4
  import { useActiveParams, useParams } from './hooks'
5
5
  import { resolveHref } from './link/href'
6
6
  import { useRouteNode } from './Route'
7
- import { CACHE_KEY } from './router/constants'
8
7
  import { preloadingLoader } from './router/router'
9
8
  import type { LoaderProps } from './types'
10
9
  import { dynamicImport } from './utils/dynamicImport'
11
10
  import { weakKey } from './utils/weakKey'
12
- import { getLoaderPath } from './cleanUrl'
13
11
 
14
12
  const promises: Record<string, undefined | Promise<void>> = {}
15
13
  const errors = {}
package/src/vite/one.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import events from 'node:events'
2
- import path, { dirname, join, resolve } from 'node:path'
2
+ import path, { dirname, resolve } from 'node:path'
3
3
  import { type Plugin, type PluginOption, type UserConfig, loadConfigFromFile } from 'vite'
4
4
  import tsconfigPaths from 'vite-tsconfig-paths'
5
5
  import { getOptimizeDeps, getOptionsFilled, isWebEnvironment } from 'vxrn'
@@ -1,2 +1,4 @@
1
- export declare function cliMain(args?: {}): Promise<void>;
1
+ export declare function cliMain(args?: {
2
+ name?: string;
3
+ }): Promise<void>;
2
4
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAyBA,wBAAsB,OAAO,CAAC,IAAI,KAAK,iBAYtC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAyBA,wBAAsB,OAAO,CAAC,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,iBAYzD"}
@@ -3,5 +3,6 @@ export declare function run(args: {
3
3
  host?: string;
4
4
  port?: string;
5
5
  https?: boolean;
6
+ mode?: 'development' | 'production';
6
7
  }): Promise<void>;
7
8
  //# sourceMappingURL=run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":"AAGA,wBAAsB,GAAG,CAAC,IAAI,EAAE;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,iBA+BA"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":"AAGA,wBAAsB,GAAG,CAAC,IAAI,EAAE;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,CAAA;CACpC,iBAkCA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLoader.d.ts","sourceRoot":"","sources":["../src/useLoader.ts"],"names":[],"mappings":"AAiBA,wBAAgB,SAAS,CACvB,MAAM,SAAS,QAAQ,EACvB,QAAQ,GAAG,MAAM,SAAS,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,OAAO,EACxE,MAAM,EAAE,MAAM,GAAG,QAAQ,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAwH9E"}
1
+ {"version":3,"file":"useLoader.d.ts","sourceRoot":"","sources":["../src/useLoader.ts"],"names":[],"mappings":"AAeA,wBAAgB,SAAS,CACvB,MAAM,SAAS,QAAQ,EACvB,QAAQ,GAAG,MAAM,SAAS,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,OAAO,EACxE,MAAM,EAAE,MAAM,GAAG,QAAQ,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAwH9E"}