one 1.1.295 → 1.1.297
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/Root.native.js.map +1 -1
- package/dist/cjs/Route.native.js.map +1 -1
- package/dist/cjs/cleanUrl.native.js.map +1 -1
- package/dist/cjs/cli/label-process.js +25 -0
- package/dist/cjs/cli/label-process.js.map +6 -0
- package/dist/cjs/cli/label-process.native.js +30 -0
- package/dist/cjs/cli/label-process.native.js.map +6 -0
- package/dist/cjs/cli/main.native.js.map +1 -1
- package/dist/cjs/cli/prebuild.native.js.map +1 -1
- package/dist/cjs/cli/run.js +2 -1
- package/dist/cjs/cli/run.js.map +1 -1
- package/dist/cjs/cli/run.native.js +2 -1
- package/dist/cjs/cli/run.native.js.map +3 -3
- package/dist/cjs/cli.js +15 -7
- package/dist/cjs/cli.js.map +2 -2
- package/dist/cjs/cli.native.js +15 -7
- package/dist/cjs/cli.native.js.map +3 -3
- package/dist/cjs/clientLoaderResolver.native.js.map +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/createApp.native.js.map +1 -1
- package/dist/cjs/createHandleRequest.native.js.map +1 -1
- package/dist/cjs/createRoute.native.js.map +1 -1
- package/dist/cjs/fallbackViews/Sitemap.native.js.map +1 -1
- package/dist/cjs/fallbackViews/Unmatched.native.js.map +1 -1
- package/dist/cjs/fork/NavigationContainer.native.js.map +1 -1
- package/dist/cjs/fork/createMemoryHistory.native.js.map +1 -1
- package/dist/cjs/fork/extractPathFromURL.native.js.map +1 -1
- package/dist/cjs/fork/findFocusedRoute.native.js.map +1 -1
- package/dist/cjs/fork/getPathFromState.native.js.map +1 -1
- package/dist/cjs/fork/getStateFromPath.native.js.map +1 -1
- package/dist/cjs/fork/useLinking.native.js.map +1 -1
- package/dist/cjs/fork/validatePathConfig.native.js.map +1 -1
- package/dist/cjs/getLinkingConfig.native.js.map +1 -1
- package/dist/cjs/getReactNavigationConfig.native.js.map +1 -1
- package/dist/cjs/getRoutes.native.js.map +1 -1
- package/dist/cjs/getURL.native.js.map +1 -1
- package/dist/cjs/head/Head.android.js.map +1 -1
- package/dist/cjs/head/Head.ios.js.map +1 -1
- package/dist/cjs/head/Head.native.js.map +1 -1
- package/dist/cjs/head/HeadModule.native.js.map +1 -1
- package/dist/cjs/head/index.native.js.map +1 -1
- package/dist/cjs/head/types.native.js.map +1 -1
- package/dist/cjs/head/url.native.js.map +1 -1
- package/dist/cjs/hooks.native.js.map +1 -1
- package/dist/cjs/imperative-api.native.js.map +1 -1
- package/dist/cjs/import-mode/index.android.js.map +1 -1
- package/dist/cjs/import-mode/index.ios.js.map +1 -1
- package/dist/cjs/import-mode/index.native.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/interfaces/router.native.js.map +1 -1
- package/dist/cjs/layouts/Drawer.native.js.map +1 -1
- package/dist/cjs/layouts/Stack.native.js.map +1 -1
- package/dist/cjs/layouts/Tabs.native.js.map +1 -1
- package/dist/cjs/layouts/withLayoutContext.native.js.map +1 -1
- package/dist/cjs/link/Link.native.js.map +1 -1
- package/dist/cjs/link/Redirect.native.js.map +1 -1
- package/dist/cjs/link/href.native.js.map +1 -1
- package/dist/cjs/link/linking.native.js.map +1 -1
- package/dist/cjs/link/path.native.js.map +1 -1
- package/dist/cjs/link/useLinkTo.native.js.map +1 -1
- package/dist/cjs/link/useLoadedNavigation.native.js.map +1 -1
- package/dist/cjs/matchers.native.js.map +1 -1
- package/dist/cjs/platform.native.js.map +1 -1
- package/dist/cjs/polyfills-mobile.native.js.map +1 -1
- package/dist/cjs/polyfills-server.native.js.map +1 -1
- package/dist/cjs/render.native.js.map +1 -1
- package/dist/cjs/router/RouterStore.native.js.map +1 -1
- package/dist/cjs/router/constants.native.js.map +1 -1
- package/dist/cjs/router/getNormalizedStatePath.native.js.map +1 -1
- package/dist/cjs/router/lastAction.native.js.map +1 -1
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/router/serverLocationContext.native.js.map +1 -1
- package/dist/cjs/router/useInitializeOneRouter.native.js.map +1 -1
- package/dist/cjs/serve.js +2 -1
- package/dist/cjs/serve.js.map +1 -1
- package/dist/cjs/serve.native.js +4 -2
- package/dist/cjs/serve.native.js.map +3 -3
- package/dist/cjs/server/createRoutesManifest.native.js.map +1 -1
- package/dist/cjs/server/getServerManifest.native.js.map +1 -1
- package/dist/cjs/server-render.native.js.map +1 -1
- package/dist/cjs/sortRoutes.native.js.map +1 -1
- package/dist/cjs/typed-routes/generateRouteTypes.native.js.map +1 -1
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.js.map +1 -1
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/useFocusEffect.native.js.map +1 -1
- package/dist/cjs/useLoader.native.js.map +1 -1
- package/dist/cjs/useNavigation.native.js.map +1 -1
- package/dist/cjs/useScreens.native.js.map +1 -1
- package/dist/cjs/useViteRoutes.native.js.map +1 -1
- package/dist/cjs/utils/assertIsReady.native.js.map +1 -1
- package/dist/cjs/utils/dynamicImport.native.js.map +1 -1
- package/dist/cjs/utils/existsAsync.native.js.map +1 -1
- package/dist/cjs/utils/getPageExport.native.js.map +1 -1
- package/dist/cjs/utils/globDir.native.js.map +1 -1
- package/dist/cjs/utils/hashString.native.js.map +1 -1
- package/dist/cjs/utils/isResponse.native.js.map +1 -1
- package/dist/cjs/utils/isStatus.native.js.map +1 -1
- package/dist/cjs/utils/promiseWithResolvers.native.js.map +1 -1
- package/dist/cjs/utils/rand.native.js.map +1 -1
- package/dist/cjs/utils/redirect.native.js.map +1 -1
- package/dist/cjs/utils/removeSearch.native.js.map +1 -1
- package/dist/cjs/utils/removeUndefined.native.js.map +1 -1
- package/dist/cjs/utils/requireResolve.native.js.map +1 -1
- package/dist/cjs/utils/url.native.js.map +1 -1
- package/dist/cjs/utils/weakKey.native.js.map +1 -1
- package/dist/cjs/utils/weakMemo.native.js.map +1 -1
- package/dist/cjs/views/EmptyRoute.native.js.map +1 -1
- package/dist/cjs/views/ErrorBoundary.native.js.map +1 -1
- package/dist/cjs/views/LoadProgressBar.native.js.map +1 -1
- package/dist/cjs/views/Navigator.native.js.map +1 -1
- package/dist/cjs/views/PreloadLinks.native.js.map +1 -1
- package/dist/cjs/views/RootErrorBoundary.native.js.map +1 -1
- package/dist/cjs/views/Screen.native.js.map +1 -1
- package/dist/cjs/views/ScrollRestoration.native.js.map +1 -1
- package/dist/cjs/views/Try.native.js.map +1 -1
- package/dist/cjs/vite/build.js +9 -4
- package/dist/cjs/vite/build.js.map +1 -1
- package/dist/cjs/vite/build.native.js +12 -6
- package/dist/cjs/vite/build.native.js.map +3 -3
- package/dist/cjs/vite/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/cjs/vite/constants.native.js.map +1 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js.map +1 -1
- package/dist/cjs/vite/customNodeExternals.native.js.map +1 -1
- package/dist/cjs/vite/ensureTsConfig.native.js.map +1 -1
- package/dist/cjs/vite/findDepsToOptimize.native.js.map +1 -1
- package/dist/cjs/vite/fixDependenciesPlugin.native.js.map +1 -1
- package/dist/cjs/vite/generateTypesForRoutes.native.js.map +1 -1
- package/dist/cjs/vite/getManifest.native.js.map +1 -1
- package/dist/cjs/vite/headers.native.js.map +1 -1
- package/dist/cjs/vite/loadEnv.native.js.map +1 -1
- package/dist/cjs/vite/makePluginWebOnly.native.js.map +1 -1
- package/dist/cjs/vite/one.js +3 -3
- package/dist/cjs/vite/one.js.map +1 -1
- package/dist/cjs/vite/one.native.js +3 -3
- package/dist/cjs/vite/one.native.js.map +2 -2
- package/dist/cjs/vite/removeReactNativeWebAnimatedPlugin.native.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
- package/dist/cjs/vite/resolveAPIRequest.native.js.map +1 -1
- package/dist/cjs/vite/server.native.js.map +1 -1
- package/dist/cjs/vite/types.native.js.map +1 -1
- package/dist/cjs/vite/virtualEntryPlugin.native.js.map +1 -1
- package/dist/cjs/vite/vitePluginSsrCss.native.js.map +1 -1
- package/dist/cjs/vite.native.js.map +1 -1
- package/dist/cjs/zero/getQueryKey.native.js.map +1 -1
- package/dist/cjs/zero/isZeroQuery.native.js.map +1 -1
- package/dist/cjs/zero/resolveQuery.native.js.map +1 -1
- package/dist/cjs/zero/subscribeToQuery.native.js.map +1 -1
- package/dist/cjs/zero/types.native.js.map +1 -1
- package/dist/cjs/zero/useQuery.native.js.map +1 -1
- package/dist/cjs/zero/useQueryZero.native.js.map +1 -1
- package/dist/cjs/zero.native.js.map +1 -1
- package/dist/esm/cli/label-process.js +9 -0
- package/dist/esm/cli/label-process.js.map +6 -0
- package/dist/esm/cli/label-process.mjs +8 -0
- package/dist/esm/cli/label-process.mjs.map +1 -0
- package/dist/esm/cli/label-process.native.js +8 -0
- package/dist/esm/cli/label-process.native.js.map +1 -0
- package/dist/esm/cli/run.js +2 -0
- package/dist/esm/cli/run.js.map +1 -1
- package/dist/esm/cli/run.mjs +2 -0
- package/dist/esm/cli/run.mjs.map +1 -1
- package/dist/esm/cli/run.native.js +2 -0
- package/dist/esm/cli/run.native.js.map +1 -1
- package/dist/esm/cli.js +16 -6
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/cli.mjs +16 -6
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +17 -6
- package/dist/esm/cli.native.js.map +1 -1
- package/dist/esm/createApp.native.js.map +1 -1
- package/dist/esm/fork/NavigationContainer.native.js.map +1 -1
- package/dist/esm/fork/useLinking.native.js.map +1 -1
- package/dist/esm/getURL.native.js.map +1 -1
- package/dist/esm/head/Head.android.js.map +1 -1
- package/dist/esm/head/Head.ios.js.map +1 -1
- package/dist/esm/import-mode/index.android.js.map +1 -1
- package/dist/esm/import-mode/index.ios.js.map +1 -1
- package/dist/esm/import-mode/index.native.js.map +1 -1
- package/dist/esm/render.native.js.map +1 -1
- package/dist/esm/serve.js +2 -0
- package/dist/esm/serve.js.map +1 -1
- package/dist/esm/serve.mjs +2 -0
- package/dist/esm/serve.mjs.map +1 -1
- package/dist/esm/serve.native.js +4 -2
- package/dist/esm/serve.native.js.map +1 -1
- package/dist/esm/views/PreloadLinks.native.js.map +1 -1
- package/dist/esm/vite/build.js +15 -4
- package/dist/esm/vite/build.js.map +1 -1
- package/dist/esm/vite/build.mjs +10 -4
- package/dist/esm/vite/build.mjs.map +1 -1
- package/dist/esm/vite/build.native.js +13 -10
- package/dist/esm/vite/build.native.js.map +1 -1
- package/dist/esm/vite/headers.native.js.map +1 -1
- package/dist/esm/vite/one.js +3 -3
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +3 -3
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +3 -3
- package/dist/esm/vite/one.native.js.map +1 -1
- package/package.json +6 -6
- package/src/cli/label-process.ts +7 -0
- package/src/cli/run.ts +2 -0
- package/src/cli.ts +25 -7
- package/src/serve.ts +2 -0
- package/src/vite/build.ts +18 -3
- package/src/vite/one.ts +3 -3
- package/types/cli/label-process.d.ts +2 -0
- package/types/cli/label-process.d.ts.map +1 -0
- package/types/cli/run.d.ts.map +1 -1
- package/types/serve.d.ts.map +1 -1
- package/types/vite/build.d.ts.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"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","__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,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,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,CAAQC,GAAA,CAAI,CAAC,GAGtBH,OAAA,CAAQI,MAAA,EAAQf,cAAA,KAAmB,MAChCA,cAAA,CAAe,GAGtBQ,UAAA,CAAWQ,oBAAA,GAA0BL,OAAA;EAGrC,MAAM;MAAEM;IAAa,IAAIxB,eAAA,CAAgB,OAAO;IAC1CyB,WAAA,GAAcD,YAAA,CAAaE,OAAA;IAC3BC,eAAA,G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a;MAC9B,OAAOxF,gBAAA,CAAiBwF,WAAW;IACrC;IAEA,MAAM5C,UAAUhB,EAAA,EAAI6D,QAAA,GAAW,IAAI;MAGjC,IAFuBhE,eAAA,CAAgBiE,IAAA,CAAKD,QAAQ,GAEhC;QAClB,MAAME,YAAA,GAAehG,OAAA,CAAQD,OAAA,CAAQ+F,QAAQ,GAAG7D,EAAE;UAC5CgE,OAAA,GAAUD,YAAA,CAAa9D,OAAA,CAAQ,WAAW,EAAE,IAAI;QACtD,IAAI+D,OAAA,KAAYhE,EAAA,EAAI;QACpB,IAAI;UACF,MAAMiE,aAAA,GAAgBF,YAAA,GAAe;UACrC,IAAI,MAAM1F,WAAA,CAAY4F,aAAa,GACjC,OAAOA,aAAA;UAET,IAAI,MAAM5F,WAAA,CAAY2F,OAAO,GAC3B,OAAOA,OAAA;QAEX,SAASE,GAAA,EAAK;UACZC,OAAA,CAAQC,IAAA,CAAK,uBAAuBF,GAAG;QACzC;MACF;IACF;EACF,GAEAnF,gBAAA,CAAiB;IACfsF,OAAA,EAAS,CAACvF,cAAc;EAC1B,CAAC,EACH;AACF;AAEA,IAAIO,UAAA,GAAuC;AAE3C,eAAeiF,kBAAkBC,OAAA,EAA6B;EAC5D,IAAI,CAAClF,UAAA,EAAY;IACf,IAAI,CAACkF,OAAA,EAAS,MAAM,IAAIC,KAAA,CAAM,yCAAyC;IACvE,MAAMC,kBAAA,CAAmBF,OAAO;EAClC;EACA,IAAI,CAAClF,UAAA,EACH,MAAM,IAAImF,KAAA,CAAM,
|
1
|
+
{"version":3,"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","__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,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,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,CAAQC,GAAA,CAAI,CAAC,GAGtBH,OAAA,CAAQI,MAAA,EAAQf,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MvG,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":[]}
|
@@ -223,7 +223,7 @@ async function getUserOneOptions(command) {
|
|
223
223
|
if (!command) throw new Error("Options not loaded and no command given");
|
224
224
|
await loadUserOneOptions(command);
|
225
225
|
}
|
226
|
-
if (!oneOptions) throw new Error("No
|
226
|
+
if (!oneOptions) throw new Error("No One options were loaded");
|
227
227
|
return oneOptions;
|
228
228
|
}
|
229
229
|
async function loadUserOneOptions(command) {
|
@@ -231,9 +231,9 @@ async function loadUserOneOptions(command) {
|
|
231
231
|
mode: "prod",
|
232
232
|
command
|
233
233
|
});
|
234
|
-
if (!found) throw new Error(
|
234
|
+
if (!found) throw new Error(`No config found in ${process.cwd()}. Is this the correct directory?`);
|
235
235
|
var foundOptions = getUserOneOptions();
|
236
|
-
if (!foundOptions) throw new Error("No One plugin
|
236
|
+
if (!foundOptions) throw new Error("No One plugin found in this vite.config");
|
237
237
|
return foundOptions;
|
238
238
|
}
|
239
239
|
export { loadUserOneOptions, one };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"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","arguments","length","_options_config","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","_options_config2","_configIncoming_plugins","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","_options_web","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","param","modules","m","relativePath","relative","root","rootDir","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","_options_app","app","sharedNativeConfig","react","ios","android","applyToEnvironment","environment","importer","shouldOptimize","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","found","mode"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,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,IAAA,EAAI;EAClB,IAAAC,OAAA,GAAaC,SAER,CAAAC,MAAQ,QAAQD,SAGjB,QAAQ,SAAQA,SAAA,QAAmB;IAAAE,eAChC;EAMPC,UAAQ,GAAAJ,OAAA,EAA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AsC,KAAO,EAAA5F,cAAA;YACL,WAAc,EAAAA,cAAA;UACZ;QAAK;MACA;MACL,OACA;QAASmE,YACJ;UACL0B,GAAA;YAAA,GAAAF;UAEF;UACFG,OAAA;YACF,GAAAH;UACF;QAEA;MACE;IACA;EAAS;EAGP;EAAmC;IAGrCvD,IAAA,EAAM,mCAA6B;IAGjCiB,OAFuB;IAGrB0C,kBAAMA,CAAAC,WAAe;MAErB,OAAIlG,gBAAgB,CAAAkG,WAAA;IACpB;IACE,MAAAjD,SAAMA,CAAAlB,EAAA;MACN,IAAAoE,QAAI,GAAMlF,SAAA,CAAAC,MAAY,QAAaD,SAAA,iBAAAA,SAAA;QAAAmF,cAAA,GAAAxE,eAAA,CAAAyE,IAAA,CAAAF,QAAA;MACjC,IAAAC,cAAO;QAET,IAAAE,YAAU,GAAA3G,OAAY,CAAAD,OAAO,CAAAyG,QAAA,GAAApE,EAAA;UAAAwE,OAAA,GAAAD,YAAA,CAAAtE,OAAA;QAC3B,IAAAuE,OAAO,KAAAxE,EAAA;QAEX;UACE,IAAAyE,aAAa,GAAAF,YAAA,kBAA0B;UACzC,UAAArG,WAAA,CAAAuG,aAAA,GACF,OAAAA,aAAA;UACF,UAAAvG,WAAA,CAAAsG,OAAA,GACF,OAAAA,OAAA;QAEA,SAAAE,GAAiB;UACfC,OAAU,CAAAC,IAAA,sBAAc,EAAAF,GAAA;QACzB;MACH;IACF;EAEI,GAEJ9F,gBAAe;IACTiG,OAAC,GACClG,cAAU;EAEhB,GACA;AACE;AAEF,IAAAU,UAAO;AACT,eAAAyF,kBAAAC,OAAA;EAEA,KAAA1F,UAAsB;IAKpB,IAJc,CAAA0F,OAAM,YAAAC,KAAmB;IACrC,MAAMC,kBAAA,CAAAF,OAAA;EAAA;EAER,IAAC,CAAA1F,UAAA,EAEC,MAAM,IAAI2F,KAAA,CAAM,
|
1
|
+
{"version":3,"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","arguments","length","_options_config","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","_options_config2","_configIncoming_plugins","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","_options_web","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","param","modules","m","relativePath","relative","root","rootDir","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","_options_app","app","sharedNativeConfig","react","ios","android","applyToEnvironment","environment","importer","shouldOptimize","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","found","mode"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,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,QAA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,eAAAyF,kBAAAC,OAAA;EAEA,KAAA1F,UAAsB;IAKpB,IAJc,CAAA0F,OAAM,YAAAC,KAAmB;IACrC,MAAMC,kBAAA,CAAAF,OAAA;EAAA;EAER,IAAC,CAAA1F,UAAA,EAEC,MAAM,IAAI2F,KAAA,CAAM,4BAAsB;EAExC,OAAM3F,UAAA;AACN;AACE,eAAU4F,kBAAMA,CAAAF,OAAA;EAElB,IAAAG,KAAO,SAAArH,kBAAA;IACTsH,IAAA","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.297",
|
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.
|
93
|
-
"@vxrn/universal-color-scheme": "1.1.
|
94
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
92
|
+
"@vxrn/tslib-lite": "1.1.297",
|
93
|
+
"@vxrn/universal-color-scheme": "1.1.297",
|
94
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.297",
|
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.
|
98
|
+
"create-vxrn": "1.1.297",
|
99
99
|
"dotenv": "^16.4.5",
|
100
100
|
"escape-string-regexp": "^5.0.0",
|
101
101
|
"expo-linking": "~6.3.1",
|
@@ -117,7 +117,7 @@
|
|
117
117
|
"url-parse": "^1.5.10",
|
118
118
|
"vite": "6.0.0-beta.1",
|
119
119
|
"vite-tsconfig-paths": "^5.0.1",
|
120
|
-
"vxrn": "1.1.
|
120
|
+
"vxrn": "1.1.297",
|
121
121
|
"ws": "^8.18.0",
|
122
122
|
"xxhashjs": "^0.2.2"
|
123
123
|
},
|
package/src/cli/run.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { virtualEntryIdNative } from '../vite/virtualEntryPlugin'
|
2
|
+
import { labelProcess } from './label-process'
|
2
3
|
|
3
4
|
export async function run(args: {
|
4
5
|
clean?: boolean
|
@@ -6,6 +7,7 @@ export async function run(args: {
|
|
6
7
|
port?: string
|
7
8
|
https?: boolean
|
8
9
|
}) {
|
10
|
+
labelProcess('dev')
|
9
11
|
const { dev } = await import('vxrn')
|
10
12
|
const { start, stop } = await dev({
|
11
13
|
clean: args.clean,
|
package/src/cli.ts
CHANGED
@@ -1,13 +1,31 @@
|
|
1
1
|
import { defineCommand, runMain } from 'citty'
|
2
2
|
import { loadEnv } from './vite/loadEnv'
|
3
|
-
|
3
|
+
import { readFileSync } from 'node:fs'
|
4
|
+
import path from 'node:path'
|
5
|
+
import { fileURLToPath } from 'node:url'
|
6
|
+
|
7
|
+
function getPackageVersion() {
|
8
|
+
let dirname
|
9
|
+
if (typeof __dirname !== 'undefined') {
|
10
|
+
// CommonJS
|
11
|
+
dirname = __dirname
|
12
|
+
} else {
|
13
|
+
// ESM
|
14
|
+
dirname = path.dirname(fileURLToPath(import.meta.url))
|
15
|
+
}
|
16
|
+
const packagePath = path.join(dirname, '..', '..', 'package.json')
|
17
|
+
const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'))
|
18
|
+
return packageJson.version
|
19
|
+
}
|
20
|
+
|
21
|
+
const version = getPackageVersion()
|
4
22
|
|
5
23
|
void loadEnv(process.cwd())
|
6
24
|
|
7
25
|
const dev = defineCommand({
|
8
26
|
meta: {
|
9
27
|
name: 'dev',
|
10
|
-
|
28
|
+
version: version,
|
11
29
|
description: 'Start the dev server',
|
12
30
|
},
|
13
31
|
args: {
|
@@ -33,7 +51,7 @@ const dev = defineCommand({
|
|
33
51
|
const buildCommand = defineCommand({
|
34
52
|
meta: {
|
35
53
|
name: 'build',
|
36
|
-
version:
|
54
|
+
version: version,
|
37
55
|
description: 'Build your app',
|
38
56
|
},
|
39
57
|
args: {
|
@@ -58,7 +76,7 @@ const buildCommand = defineCommand({
|
|
58
76
|
const serveCommand = defineCommand({
|
59
77
|
meta: {
|
60
78
|
name: 'serve',
|
61
|
-
version:
|
79
|
+
version: version,
|
62
80
|
description: 'Serve a built app for production',
|
63
81
|
},
|
64
82
|
args: {
|
@@ -93,7 +111,7 @@ const serveCommand = defineCommand({
|
|
93
111
|
const prebuild = defineCommand({
|
94
112
|
meta: {
|
95
113
|
name: 'prebuild',
|
96
|
-
version:
|
114
|
+
version: version,
|
97
115
|
description: 'Prebuild native iOS project', // TODO: Android
|
98
116
|
},
|
99
117
|
args: {},
|
@@ -121,8 +139,8 @@ const clean = defineCommand({
|
|
121
139
|
const main = defineCommand({
|
122
140
|
meta: {
|
123
141
|
name: 'main',
|
124
|
-
version:
|
125
|
-
description: 'Welcome to
|
142
|
+
version: version,
|
143
|
+
description: 'Welcome to One',
|
126
144
|
},
|
127
145
|
args: {},
|
128
146
|
async run({ args }) {
|
package/src/serve.ts
CHANGED
@@ -13,12 +13,14 @@ import { removeUndefined } from './utils/removeUndefined'
|
|
13
13
|
import { resolveAPIRequest } from './vite/resolveAPIRequest'
|
14
14
|
import type { One } from './vite/types'
|
15
15
|
import { loadUserOneOptions } from './vite/one'
|
16
|
+
import { labelProcess } from './cli/label-process'
|
16
17
|
|
17
18
|
process.on('uncaughtException', (err) => {
|
18
19
|
console.error(`[one] Uncaught exception`, err?.stack || err)
|
19
20
|
})
|
20
21
|
|
21
22
|
export async function serve(args: VXRNOptions['server'] = {}) {
|
23
|
+
labelProcess('serve')
|
22
24
|
const oneOptions = await loadUserOneOptions('serve')
|
23
25
|
|
24
26
|
// TODO make this better, this ensures we get react 19
|
package/src/vite/build.ts
CHANGED
@@ -5,7 +5,13 @@ import Path, { join, relative } from 'node:path'
|
|
5
5
|
import type { OutputAsset } from 'rollup'
|
6
6
|
import { nodeExternals } from 'rollup-plugin-node-externals'
|
7
7
|
import { mergeConfig, build as viteBuild, type InlineConfig } from 'vite'
|
8
|
-
import {
|
8
|
+
import {
|
9
|
+
fillOptions,
|
10
|
+
getOptimizeDeps,
|
11
|
+
rollupRemoveUnusedImportsPlugin,
|
12
|
+
build as vxrnBuild,
|
13
|
+
type ClientManifestEntry,
|
14
|
+
} from 'vxrn'
|
9
15
|
import { getLoaderPath, getPreloadPath } from '../cleanUrl'
|
10
16
|
import type { RouteInfo } from '../server/createRoutesManifest'
|
11
17
|
import type { LoaderProps, RenderApp } from '../types'
|
@@ -13,6 +19,7 @@ import { getManifest } from './getManifest'
|
|
13
19
|
import { loadUserOneOptions } from './one'
|
14
20
|
import { replaceLoader } from './replaceLoader'
|
15
21
|
import type { One } from './types'
|
22
|
+
import { labelProcess } from '../cli/label-process'
|
16
23
|
|
17
24
|
const { ensureDir, readFile, outputFile } = FSExtra
|
18
25
|
|
@@ -24,6 +31,7 @@ export async function build(args: {
|
|
24
31
|
step?: string
|
25
32
|
only?: string
|
26
33
|
}) {
|
34
|
+
labelProcess('build')
|
27
35
|
const userOptions = await loadUserOneOptions('build')
|
28
36
|
const serverOutputFormat = userOptions.build?.server?.outputFormat ?? 'esm'
|
29
37
|
|
@@ -82,6 +90,7 @@ export async function build(args: {
|
|
82
90
|
}, {}) as Record<string, string>
|
83
91
|
|
84
92
|
const apiOutputFormat = userOptions?.build?.api?.outputFormat ?? serverOutputFormat
|
93
|
+
const treeshake = userOptions?.build?.api?.treeshake
|
85
94
|
|
86
95
|
await viteBuild(
|
87
96
|
mergeConfig(apiBuildConfig, {
|
@@ -112,9 +121,15 @@ export async function build(args: {
|
|
112
121
|
copyPublicDir: false,
|
113
122
|
minify: false,
|
114
123
|
rollupOptions: {
|
115
|
-
treeshake: {
|
116
|
-
moduleSideEffects:
|
124
|
+
treeshake: treeshake ?? {
|
125
|
+
moduleSideEffects: false,
|
117
126
|
},
|
127
|
+
|
128
|
+
plugins: [
|
129
|
+
// otherwise rollup is leaving commonjs-only top level imports...
|
130
|
+
apiOutputFormat === 'esm' ? rollupRemoveUnusedImportsPlugin : null,
|
131
|
+
].filter(Boolean),
|
132
|
+
|
118
133
|
// too many issues
|
119
134
|
// treeshake: {
|
120
135
|
// moduleSideEffects: false,
|
package/src/vite/one.ts
CHANGED
@@ -318,7 +318,7 @@ async function getUserOneOptions(command?: 'serve' | 'build') {
|
|
318
318
|
await loadUserOneOptions(command)
|
319
319
|
}
|
320
320
|
if (!oneOptions) {
|
321
|
-
throw new Error(`No
|
321
|
+
throw new Error(`No One options were loaded`)
|
322
322
|
}
|
323
323
|
return oneOptions
|
324
324
|
}
|
@@ -329,11 +329,11 @@ export async function loadUserOneOptions(command: 'serve' | 'build') {
|
|
329
329
|
command,
|
330
330
|
})
|
331
331
|
if (!found) {
|
332
|
-
throw new Error(`No config found
|
332
|
+
throw new Error(`No config found in ${process.cwd()}. Is this the correct directory?`)
|
333
333
|
}
|
334
334
|
const foundOptions = getUserOneOptions()
|
335
335
|
if (!foundOptions) {
|
336
|
-
throw new Error(`No One plugin
|
336
|
+
throw new Error(`No One plugin found in this vite.config`)
|
337
337
|
}
|
338
338
|
return foundOptions
|
339
339
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"label-process.d.ts","sourceRoot":"","sources":["../../src/cli/label-process.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,QAIzC"}
|
package/types/cli/run.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":"
|
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"}
|
package/types/serve.d.ts.map
CHANGED
@@ -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;
|
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 +1 @@
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/vite/build.ts"],"names":[],"mappings":"
|
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"}
|