one 1.1.298 → 1.1.300
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/cleanUrl.js +1 -1
- package/dist/cjs/cleanUrl.js.map +1 -1
- package/dist/cjs/cleanUrl.native.js +1 -1
- package/dist/cjs/cleanUrl.native.js.map +1 -1
- package/dist/cjs/cli/runAndroid.js +34 -0
- package/dist/cjs/cli/runAndroid.js.map +6 -0
- package/dist/cjs/cli/runAndroid.native.js +39 -0
- package/dist/cjs/cli/runAndroid.native.js.map +6 -0
- package/dist/cjs/cli/runIos.js +34 -0
- package/dist/cjs/cli/runIos.js.map +6 -0
- package/dist/cjs/cli/runIos.native.js +39 -0
- package/dist/cjs/cli/runIos.native.js.map +6 -0
- package/dist/cjs/cli.js +23 -1
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/cli.native.js +25 -1
- package/dist/cjs/cli.native.js.map +2 -2
- package/dist/cjs/createHandleRequest.js +2 -2
- package/dist/cjs/createHandleRequest.js.map +1 -1
- package/dist/cjs/createHandleRequest.native.js +2 -2
- package/dist/cjs/createHandleRequest.native.js.map +2 -2
- package/dist/cjs/vite/createFileSystemRouter.js +1 -1
- package/dist/cjs/vite/createFileSystemRouter.js.map +1 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.js +7 -1
- package/dist/cjs/vite/replaceLoader.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.native.js +7 -1
- package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
- package/dist/esm/Root.native.js +110 -104
- package/dist/esm/Root.native.js.map +6 -1
- package/dist/esm/Route.native.js +12 -10
- package/dist/esm/Route.native.js.map +6 -1
- package/dist/esm/cleanUrl.js +1 -1
- package/dist/esm/cleanUrl.js.map +1 -1
- package/dist/esm/cleanUrl.mjs +1 -1
- package/dist/esm/cleanUrl.mjs.map +1 -1
- package/dist/esm/cleanUrl.native.js +13 -14
- package/dist/esm/cleanUrl.native.js.map +6 -1
- package/dist/esm/cli/label-process.native.js +5 -4
- package/dist/esm/cli/label-process.native.js.map +6 -1
- package/dist/esm/cli/main.native.js +8 -13
- package/dist/esm/cli/main.native.js.map +6 -1
- package/dist/esm/cli/prebuild.native.js +5 -5
- package/dist/esm/cli/prebuild.native.js.map +6 -1
- package/dist/esm/cli/run.native.js +21 -28
- package/dist/esm/cli/run.native.js.map +6 -1
- package/dist/esm/cli/runAndroid.js +10 -0
- package/dist/esm/cli/runAndroid.js.map +6 -0
- package/dist/esm/cli/runAndroid.mjs +10 -0
- package/dist/esm/cli/runAndroid.mjs.map +1 -0
- package/dist/esm/cli/runAndroid.native.js +10 -0
- package/dist/esm/cli/runAndroid.native.js.map +6 -0
- package/dist/esm/cli/runIos.js +10 -0
- package/dist/esm/cli/runIos.js.map +6 -0
- package/dist/esm/cli/runIos.mjs +10 -0
- package/dist/esm/cli/runIos.mjs.map +1 -0
- package/dist/esm/cli/runIos.native.js +10 -0
- package/dist/esm/cli/runIos.native.js.map +6 -0
- package/dist/esm/cli.js +23 -1
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/cli.mjs +33 -1
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +143 -148
- package/dist/esm/cli.native.js.map +6 -1
- package/dist/esm/clientLoaderResolver.native.js +9 -6
- package/dist/esm/clientLoaderResolver.native.js.map +6 -1
- package/dist/esm/config.native.js +12 -11
- package/dist/esm/config.native.js.map +6 -1
- package/dist/esm/constants.native.js +7 -5
- package/dist/esm/constants.native.js.map +6 -1
- package/dist/esm/createApp.native.js +13 -9
- package/dist/esm/createApp.native.js.map +6 -1
- package/dist/esm/createHandleRequest.js +2 -2
- package/dist/esm/createHandleRequest.js.map +1 -1
- package/dist/esm/createHandleRequest.mjs +2 -2
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +57 -66
- package/dist/esm/createHandleRequest.native.js.map +6 -1
- package/dist/esm/createRoute.native.js +16 -16
- package/dist/esm/createRoute.native.js.map +6 -1
- package/dist/esm/fallbackViews/Sitemap.native.js +6 -3
- package/dist/esm/fallbackViews/Sitemap.native.js.map +6 -1
- package/dist/esm/fallbackViews/Unmatched.native.js +5 -3
- package/dist/esm/fallbackViews/Unmatched.native.js.map +6 -1
- package/dist/esm/fork/NavigationContainer.native.js +24 -31
- package/dist/esm/fork/NavigationContainer.native.js.map +6 -1
- package/dist/esm/fork/createMemoryHistory.native.js +99 -115
- package/dist/esm/fork/createMemoryHistory.native.js.map +6 -1
- package/dist/esm/fork/extractPathFromURL.native.js +16 -15
- package/dist/esm/fork/extractPathFromURL.native.js.map +6 -1
- package/dist/esm/fork/findFocusedRoute.native.js +6 -5
- package/dist/esm/fork/findFocusedRoute.native.js.map +6 -1
- package/dist/esm/fork/getPathFromState.native.js +127 -140
- package/dist/esm/fork/getPathFromState.native.js.map +6 -1
- package/dist/esm/fork/getStateFromPath.native.js +292 -288
- package/dist/esm/fork/getStateFromPath.native.js.map +6 -1
- package/dist/esm/fork/useLinking.native.js +70 -61
- package/dist/esm/fork/useLinking.native.js.map +6 -1
- package/dist/esm/fork/validatePathConfig.native.js +15 -9
- package/dist/esm/fork/validatePathConfig.native.js.map +6 -1
- package/dist/esm/getLinkingConfig.native.js +11 -6
- package/dist/esm/getLinkingConfig.native.js.map +6 -1
- package/dist/esm/getReactNavigationConfig.native.js +28 -20
- package/dist/esm/getReactNavigationConfig.native.js.map +6 -1
- package/dist/esm/getRoutes.native.js +249 -229
- package/dist/esm/getRoutes.native.js.map +6 -1
- package/dist/esm/getURL.native.js +4 -4
- package/dist/esm/getURL.native.js.map +6 -1
- package/dist/esm/head/Head.android.js +5 -3
- package/dist/esm/head/Head.android.js.map +6 -1
- package/dist/esm/head/Head.ios.js +144 -132
- package/dist/esm/head/Head.ios.js.map +6 -1
- package/dist/esm/head/Head.native.js +7 -7
- package/dist/esm/head/Head.native.js.map +6 -1
- package/dist/esm/head/HeadModule.native.js +6 -6
- package/dist/esm/head/HeadModule.native.js.map +6 -1
- package/dist/esm/head/index.native.js +2 -2
- package/dist/esm/head/index.native.js.map +6 -1
- package/dist/esm/head/types.native.js +1 -2
- package/dist/esm/head/types.native.js.map +6 -1
- package/dist/esm/head/url.native.js +10 -8
- package/dist/esm/head/url.native.js.map +6 -1
- package/dist/esm/hooks.native.js +53 -34
- package/dist/esm/hooks.native.js.map +6 -1
- package/dist/esm/imperative-api.native.js +9 -6
- package/dist/esm/imperative-api.native.js.map +6 -1
- package/dist/esm/import-mode/index.android.js +4 -3
- package/dist/esm/import-mode/index.android.js.map +6 -1
- package/dist/esm/import-mode/index.ios.js +4 -3
- package/dist/esm/import-mode/index.ios.js.map +6 -1
- package/dist/esm/import-mode/index.native.js +3 -1
- package/dist/esm/import-mode/index.native.js.map +6 -1
- package/dist/esm/index.native.js +65 -27
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/interfaces/router.native.js +4 -2
- package/dist/esm/interfaces/router.native.js.map +6 -1
- package/dist/esm/layouts/Drawer.native.js +7 -6
- package/dist/esm/layouts/Drawer.native.js.map +6 -1
- package/dist/esm/layouts/Stack.native.js +7 -6
- package/dist/esm/layouts/Stack.native.js.map +6 -1
- package/dist/esm/layouts/Tabs.native.js +42 -39
- package/dist/esm/layouts/Tabs.native.js.map +6 -1
- package/dist/esm/layouts/withLayoutContext.native.js +51 -48
- package/dist/esm/layouts/withLayoutContext.native.js.map +6 -1
- package/dist/esm/link/Link.native.js +62 -53
- package/dist/esm/link/Link.native.js.map +6 -1
- package/dist/esm/link/Redirect.native.js +8 -9
- package/dist/esm/link/Redirect.native.js.map +6 -1
- package/dist/esm/link/href.native.js +28 -27
- package/dist/esm/link/href.native.js.map +6 -1
- package/dist/esm/link/linking.native.js +51 -40
- package/dist/esm/link/linking.native.js.map +6 -1
- package/dist/esm/link/path.native.js +28 -19
- package/dist/esm/link/path.native.js.map +6 -1
- package/dist/esm/link/useLinkTo.native.js +22 -20
- package/dist/esm/link/useLinkTo.native.js.map +6 -1
- package/dist/esm/link/useLoadedNavigation.native.js +30 -23
- package/dist/esm/link/useLoadedNavigation.native.js.map +6 -1
- package/dist/esm/matchers.native.js +16 -3
- package/dist/esm/matchers.native.js.map +6 -1
- package/dist/esm/platform.native.js +4 -2
- package/dist/esm/platform.native.js.map +6 -1
- package/dist/esm/polyfills-mobile.native.js +4 -5
- package/dist/esm/polyfills-mobile.native.js.map +6 -1
- package/dist/esm/polyfills-server.native.js +1 -1
- package/dist/esm/polyfills-server.native.js.map +6 -1
- package/dist/esm/render.native.js +3 -1
- package/dist/esm/render.native.js.map +6 -1
- package/dist/esm/router/RouterStore.native.js +1 -2
- package/dist/esm/router/RouterStore.native.js.map +6 -1
- package/dist/esm/router/constants.native.js +4 -2
- package/dist/esm/router/constants.native.js.map +6 -1
- package/dist/esm/router/getNormalizedStatePath.native.js +18 -17
- package/dist/esm/router/getNormalizedStatePath.native.js.map +6 -1
- package/dist/esm/router/lastAction.native.js +10 -9
- package/dist/esm/router/lastAction.native.js.map +6 -1
- package/dist/esm/router/router.native.js +135 -114
- package/dist/esm/router/router.native.js.map +6 -1
- package/dist/esm/router/serverLocationContext.native.js +4 -2
- package/dist/esm/router/serverLocationContext.native.js.map +6 -1
- package/dist/esm/router/useInitializeOneRouter.native.js +8 -5
- package/dist/esm/router/useInitializeOneRouter.native.js.map +6 -1
- package/dist/esm/serve.native.js +77 -104
- package/dist/esm/serve.native.js.map +6 -1
- package/dist/esm/server/createRoutesManifest.native.js +14 -11
- package/dist/esm/server/createRoutesManifest.native.js.map +6 -1
- package/dist/esm/server/getServerManifest.native.js +61 -67
- package/dist/esm/server/getServerManifest.native.js.map +6 -1
- package/dist/esm/server-render.native.js +9 -10
- package/dist/esm/server-render.native.js.map +6 -1
- package/dist/esm/sortRoutes.native.js +27 -17
- package/dist/esm/sortRoutes.native.js.map +6 -1
- package/dist/esm/typed-routes/generateRouteTypes.native.js +10 -11
- package/dist/esm/typed-routes/generateRouteTypes.native.js.map +6 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +38 -37
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +6 -1
- package/dist/esm/types.native.js +1 -2
- package/dist/esm/types.native.js.map +6 -1
- package/dist/esm/useFocusEffect.native.js +25 -22
- package/dist/esm/useFocusEffect.native.js.map +6 -1
- package/dist/esm/useLoader.native.js +50 -50
- package/dist/esm/useLoader.native.js.map +6 -1
- package/dist/esm/useNavigation.native.js +23 -19
- package/dist/esm/useNavigation.native.js.map +6 -1
- package/dist/esm/useScreens.native.js +143 -160
- package/dist/esm/useScreens.native.js.map +6 -1
- package/dist/esm/useViteRoutes.native.js +25 -28
- package/dist/esm/useViteRoutes.native.js.map +6 -1
- package/dist/esm/utils/assertIsReady.native.js +6 -3
- package/dist/esm/utils/assertIsReady.native.js.map +6 -1
- package/dist/esm/utils/dynamicImport.native.js +5 -3
- package/dist/esm/utils/dynamicImport.native.js.map +6 -1
- package/dist/esm/utils/existsAsync.native.js +6 -4
- package/dist/esm/utils/existsAsync.native.js.map +6 -1
- package/dist/esm/utils/getPageExport.native.js +12 -11
- package/dist/esm/utils/getPageExport.native.js.map +6 -1
- package/dist/esm/utils/globDir.native.js +5 -3
- package/dist/esm/utils/globDir.native.js.map +6 -1
- package/dist/esm/utils/hashString.native.js +4 -2
- package/dist/esm/utils/hashString.native.js.map +6 -1
- package/dist/esm/utils/isResponse.native.js +4 -2
- package/dist/esm/utils/isResponse.native.js.map +6 -1
- package/dist/esm/utils/isStatus.native.js +4 -2
- package/dist/esm/utils/isStatus.native.js.map +6 -1
- package/dist/esm/utils/promiseWithResolvers.native.js +7 -7
- package/dist/esm/utils/promiseWithResolvers.native.js.map +6 -1
- package/dist/esm/utils/rand.native.js +5 -3
- package/dist/esm/utils/rand.native.js.map +6 -1
- package/dist/esm/utils/redirect.native.js +7 -5
- package/dist/esm/utils/redirect.native.js.map +6 -1
- package/dist/esm/utils/removeSearch.native.js +4 -2
- package/dist/esm/utils/removeSearch.native.js.map +6 -1
- package/dist/esm/utils/removeUndefined.native.js +6 -3
- package/dist/esm/utils/removeUndefined.native.js.map +6 -1
- package/dist/esm/utils/requireResolve.native.js +4 -2
- package/dist/esm/utils/requireResolve.native.js.map +6 -1
- package/dist/esm/utils/url.native.js +6 -2
- package/dist/esm/utils/url.native.js.map +6 -1
- package/dist/esm/utils/weakKey.native.js +11 -10
- package/dist/esm/utils/weakKey.native.js.map +6 -1
- package/dist/esm/utils/weakMemo.native.js +8 -8
- package/dist/esm/utils/weakMemo.native.js.map +6 -1
- package/dist/esm/views/EmptyRoute.native.js +5 -3
- package/dist/esm/views/EmptyRoute.native.js.map +6 -1
- package/dist/esm/views/ErrorBoundary.native.js +5 -8
- package/dist/esm/views/ErrorBoundary.native.js.map +6 -1
- package/dist/esm/views/LoadProgressBar.native.js +58 -57
- package/dist/esm/views/LoadProgressBar.native.js.map +6 -1
- package/dist/esm/views/Navigator.native.js +54 -71
- package/dist/esm/views/Navigator.native.js.map +6 -1
- package/dist/esm/views/PreloadLinks.native.js +3 -1
- package/dist/esm/views/PreloadLinks.native.js.map +6 -1
- package/dist/esm/views/RootErrorBoundary.native.js +39 -29
- package/dist/esm/views/RootErrorBoundary.native.js.map +6 -1
- package/dist/esm/views/Screen.native.js +12 -12
- package/dist/esm/views/Screen.native.js.map +6 -1
- package/dist/esm/views/ScrollRestoration.native.js +27 -27
- package/dist/esm/views/ScrollRestoration.native.js.map +6 -1
- package/dist/esm/views/Try.native.js +40 -37
- package/dist/esm/views/Try.native.js.map +6 -1
- package/dist/esm/vite/build.native.js +260 -295
- package/dist/esm/vite/build.native.js.map +6 -1
- package/dist/esm/vite/clientTreeShakePlugin.native.js +34 -33
- package/dist/esm/vite/clientTreeShakePlugin.native.js.map +6 -1
- package/dist/esm/vite/constants.native.js +6 -4
- package/dist/esm/vite/constants.native.js.map +6 -1
- package/dist/esm/vite/createFileSystemRouter.js +1 -1
- package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
- package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
- package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
- package/dist/esm/vite/createFileSystemRouter.native.js +100 -131
- package/dist/esm/vite/createFileSystemRouter.native.js.map +6 -1
- package/dist/esm/vite/customNodeExternals.native.js +9 -10
- package/dist/esm/vite/customNodeExternals.native.js.map +6 -1
- package/dist/esm/vite/ensureTsConfig.native.js +7 -5
- package/dist/esm/vite/ensureTsConfig.native.js.map +6 -1
- package/dist/esm/vite/findDepsToOptimize.native.js +27 -19
- package/dist/esm/vite/findDepsToOptimize.native.js.map +6 -1
- package/dist/esm/vite/fixDependenciesPlugin.native.js +5 -3
- package/dist/esm/vite/fixDependenciesPlugin.native.js.map +6 -1
- package/dist/esm/vite/generateTypesForRoutes.native.js +9 -9
- package/dist/esm/vite/generateTypesForRoutes.native.js.map +6 -1
- package/dist/esm/vite/getManifest.native.js +6 -4
- package/dist/esm/vite/getManifest.native.js.map +6 -1
- package/dist/esm/vite/headers.native.js +11 -5
- package/dist/esm/vite/headers.native.js.map +6 -1
- package/dist/esm/vite/loadEnv.native.js +7 -6
- package/dist/esm/vite/loadEnv.native.js.map +6 -1
- package/dist/esm/vite/makePluginWebOnly.native.js +9 -5
- package/dist/esm/vite/makePluginWebOnly.native.js.map +6 -1
- package/dist/esm/vite/one.native.js +142 -127
- package/dist/esm/vite/one.native.js.map +6 -1
- package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js +14 -11
- package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js.map +6 -1
- package/dist/esm/vite/replaceLoader.js +7 -1
- package/dist/esm/vite/replaceLoader.js.map +1 -1
- package/dist/esm/vite/replaceLoader.mjs +5 -1
- package/dist/esm/vite/replaceLoader.mjs.map +1 -1
- package/dist/esm/vite/replaceLoader.native.js +13 -10
- package/dist/esm/vite/replaceLoader.native.js.map +6 -1
- package/dist/esm/vite/resolveAPIRequest.native.js +44 -47
- package/dist/esm/vite/resolveAPIRequest.native.js.map +6 -1
- package/dist/esm/vite/server.native.js +5 -4
- package/dist/esm/vite/server.native.js.map +6 -1
- package/dist/esm/vite/types.native.js +1 -2
- package/dist/esm/vite/types.native.js.map +6 -1
- package/dist/esm/vite/virtualEntryPlugin.native.js +21 -16
- package/dist/esm/vite/virtualEntryPlugin.native.js.map +6 -1
- package/dist/esm/vite/vitePluginSsrCss.native.js +61 -50
- package/dist/esm/vite/vitePluginSsrCss.native.js.map +6 -1
- package/dist/esm/vite.native.js +19 -10
- package/dist/esm/vite.native.js.map +6 -1
- package/dist/esm/zero/getQueryKey.native.js +5 -3
- package/dist/esm/zero/getQueryKey.native.js.map +6 -1
- package/dist/esm/zero/isZeroQuery.native.js +4 -2
- package/dist/esm/zero/isZeroQuery.native.js.map +6 -1
- package/dist/esm/zero/resolveQuery.native.js +9 -8
- package/dist/esm/zero/resolveQuery.native.js.map +6 -1
- package/dist/esm/zero/subscribeToQuery.native.js +5 -3
- package/dist/esm/zero/subscribeToQuery.native.js.map +6 -1
- package/dist/esm/zero/types.native.js +1 -2
- package/dist/esm/zero/types.native.js.map +6 -1
- package/dist/esm/zero/useQuery.native.js +12 -12
- package/dist/esm/zero/useQuery.native.js.map +6 -1
- package/dist/esm/zero/useQueryZero.native.js +24 -20
- package/dist/esm/zero/useQueryZero.native.js.map +6 -1
- package/dist/esm/zero.native.js +9 -5
- package/dist/esm/zero.native.js.map +6 -1
- package/package.json +7 -7
- package/src/cleanUrl.ts +1 -1
- package/src/cli/runAndroid.ts +6 -0
- package/src/cli/runIos.ts +6 -0
- package/src/cli.ts +27 -1
- package/src/createHandleRequest.ts +7 -0
- package/src/vite/createFileSystemRouter.tsx +1 -2
- package/src/vite/replaceLoader.ts +7 -1
- package/types/cli/runAndroid.d.ts +2 -0
- package/types/cli/runAndroid.d.ts.map +1 -0
- package/types/cli/runIos.d.ts +2 -0
- package/types/cli/runIos.d.ts.map +1 -0
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/vite/createFileSystemRouter.d.ts.map +1 -1
- package/types/vite/replaceLoader.d.ts.map +1 -1
@@ -1,36 +1,31 @@
|
|
1
1
|
import { join } from "node:path";
|
2
2
|
import { debounce } from "perfect-debounce";
|
3
3
|
import { createServerModuleRunner } from "vite";
|
4
|
-
import { createHandleRequest } from "../createHandleRequest
|
5
|
-
import { isResponse } from "../utils/isResponse
|
6
|
-
import { isStatusRedirect } from "../utils/isStatus
|
7
|
-
import { promiseWithResolvers } from "../utils/promiseWithResolvers
|
8
|
-
import { LoaderDataCache } from "./constants
|
9
|
-
import { replaceLoader } from "./replaceLoader
|
10
|
-
import { resolveAPIRequest } from "./resolveAPIRequest
|
11
|
-
import { virtalEntryIdClient, virtualEntryId } from "./virtualEntryPlugin
|
4
|
+
import { createHandleRequest } from "../createHandleRequest";
|
5
|
+
import { isResponse } from "../utils/isResponse";
|
6
|
+
import { isStatusRedirect } from "../utils/isStatus";
|
7
|
+
import { promiseWithResolvers } from "../utils/promiseWithResolvers";
|
8
|
+
import { LoaderDataCache } from "./constants";
|
9
|
+
import { replaceLoader } from "./replaceLoader";
|
10
|
+
import { resolveAPIRequest } from "./resolveAPIRequest";
|
11
|
+
import { virtalEntryIdClient, virtualEntryId } from "./virtualEntryPlugin";
|
12
12
|
function _type_of(obj) {
|
13
13
|
"@swc/helpers - typeof";
|
14
|
-
|
15
14
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
16
15
|
}
|
17
16
|
var USE_SERVER_ENV = !1;
|
18
17
|
//!!process.env.USE_SERVER_ENV
|
19
18
|
function createFileSystemRouter(options) {
|
20
|
-
var preloads = [
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
renderPromise = null;
|
19
|
+
var preloads = [
|
20
|
+
"/@vite/client",
|
21
|
+
virtalEntryIdClient
|
22
|
+
], runner, server, handleRequest = createRequestHandler(), renderPromise = null;
|
25
23
|
function createRequestHandler() {
|
26
24
|
return createHandleRequest(options, {
|
27
25
|
async handleSSR(param) {
|
28
|
-
var {
|
29
|
-
|
30
|
-
|
31
|
-
loaderProps
|
32
|
-
} = param;
|
33
|
-
if (console.info(` \u24F5 [${route.type}] ${url} resolved to ${route.file}`), route.type === "spa") return `<html><head>
|
26
|
+
var { route, url, loaderProps } = param;
|
27
|
+
if (console.info(` \u24F5 [${route.type}] ${url} resolved to ${route.file}`), route.type === "spa")
|
28
|
+
return `<html><head>
|
34
29
|
<script>globalThis['global'] = globalThis</script>
|
35
30
|
<script>globalThis['__vxrnIsSPA'] = true</script>
|
36
31
|
<script type="module">
|
@@ -42,31 +37,22 @@ function createFileSystemRouter(options) {
|
|
42
37
|
<script type="module" src="/@vite/client" async=""></script>
|
43
38
|
<script type="module" src="/@id/__x00__virtual:one-entry" async=""></script>
|
44
39
|
</head></html>`;
|
45
|
-
renderPromise &&
|
46
|
-
var {
|
47
|
-
promise,
|
48
|
-
resolve
|
49
|
-
} = promiseWithResolvers();
|
40
|
+
renderPromise && await renderPromise;
|
41
|
+
var { promise, resolve } = promiseWithResolvers();
|
50
42
|
renderPromise = promise;
|
51
43
|
try {
|
52
|
-
var _globalThis___vxrnresetState,
|
53
|
-
_globalThis,
|
54
|
-
_exported_loader,
|
55
|
-
routeFile = join("app", route.file);
|
44
|
+
var _globalThis___vxrnresetState, _globalThis, _exported_loader, routeFile = join("app", route.file);
|
56
45
|
runner.clearCache(), (_globalThis___vxrnresetState = (_globalThis = globalThis).__vxrnresetState) === null || _globalThis___vxrnresetState === void 0 || _globalThis___vxrnresetState.call(_globalThis);
|
57
|
-
var exported = routeFile === "" ? {} : await runner.import(routeFile),
|
58
|
-
loaderData = await ((_exported_loader = exported.loader) === null || _exported_loader === void 0 ? void 0 : _exported_loader.call(exported, loaderProps));
|
46
|
+
var exported = routeFile === "" ? {} : await runner.import(routeFile), loaderData = await ((_exported_loader = exported.loader) === null || _exported_loader === void 0 ? void 0 : _exported_loader.call(exported, loaderProps));
|
59
47
|
eval("process.env.TAMAGUI_IS_SERVER = '1'");
|
60
|
-
var entry = await runner.import(virtualEntryId),
|
61
|
-
render = entry.default.render;
|
48
|
+
var entry = await runner.import(virtualEntryId), render = entry.default.render;
|
62
49
|
globalThis.__vxrnLoaderData__ = loaderData, globalThis.__vxrnLoaderProps__ = loaderProps, LoaderDataCache[route.file] = loaderData;
|
63
|
-
var is404 = route.isNotFound || !exported.default,
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
});
|
50
|
+
var is404 = route.isNotFound || !exported.default, html = await render({
|
51
|
+
loaderData,
|
52
|
+
loaderProps,
|
53
|
+
path: loaderProps?.path || "/",
|
54
|
+
preloads
|
55
|
+
});
|
70
56
|
return is404 ? new Response(html, {
|
71
57
|
status: 404,
|
72
58
|
headers: {
|
@@ -75,9 +61,7 @@ function createFileSystemRouter(options) {
|
|
75
61
|
}) : html;
|
76
62
|
} catch (err) {
|
77
63
|
console.error("Error in handleSSR:", err);
|
78
|
-
var title = `Error rendering ${url.pathname} on server`,
|
79
|
-
message = err instanceof Error ? err.message : `${err}`,
|
80
|
-
stack = err instanceof Error ? err.stack : "";
|
64
|
+
var title = `Error rendering ${url.pathname} on server`, message = err instanceof Error ? err.message : `${err}`, stack = err instanceof Error ? err.stack : "";
|
81
65
|
return console.error(`${title}
|
82
66
|
${message}
|
83
67
|
|
@@ -98,19 +82,10 @@ ${stack}
|
|
98
82
|
}
|
99
83
|
},
|
100
84
|
async handleLoader(param2) {
|
101
|
-
var {
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
loaderProps: loaderProps2
|
106
|
-
} = param2,
|
107
|
-
_this,
|
108
|
-
_exported_loader2,
|
109
|
-
routeFile2 = join("app", route2.file),
|
110
|
-
transformedJS = (_this = await server.transformRequest(routeFile2)) === null || _this === void 0 ? void 0 : _this.code;
|
111
|
-
if (!transformedJS) throw new Error("No transformed js returned");
|
112
|
-
var exported2 = await runner.import(routeFile2),
|
113
|
-
loaderData2 = await ((_exported_loader2 = exported2.loader) === null || _exported_loader2 === void 0 ? void 0 : _exported_loader2.call(exported2, loaderProps2));
|
85
|
+
var { request, route: route2, url: url2, loaderProps: loaderProps2 } = param2, _this, _exported_loader2, routeFile2 = join("app", route2.file), transformedJS = (_this = await server.transformRequest(routeFile2)) === null || _this === void 0 ? void 0 : _this.code;
|
86
|
+
if (!transformedJS)
|
87
|
+
throw new Error("No transformed js returned");
|
88
|
+
var exported2 = await runner.import(routeFile2), loaderData2 = await ((_exported_loader2 = exported2.loader) === null || _exported_loader2 === void 0 ? void 0 : _exported_loader2.call(exported2, loaderProps2));
|
114
89
|
loaderData2 && (transformedJS = replaceLoader({
|
115
90
|
code: transformedJS,
|
116
91
|
loaderData: loaderData2
|
@@ -118,22 +93,17 @@ ${stack}
|
|
118
93
|
var platform = url2.searchParams.get("platform");
|
119
94
|
if (platform === "ios" || platform === "android") {
|
120
95
|
var environment = server.environments[platform || ""];
|
121
|
-
if (!environment)
|
96
|
+
if (!environment)
|
97
|
+
throw new Error(`[handleLoader] No Vite environment found for platform '${platform}'`);
|
122
98
|
var nativeTransformedJS = `exports.loader = () => (${JSON.stringify(loaderData2)});`;
|
123
99
|
return nativeTransformedJS;
|
124
100
|
}
|
125
101
|
return transformedJS;
|
126
102
|
},
|
127
103
|
async handleAPI(param2) {
|
128
|
-
var {
|
129
|
-
|
130
|
-
|
131
|
-
url: url2,
|
132
|
-
loaderProps: loaderProps2
|
133
|
-
} = param2,
|
134
|
-
result = await resolveAPIRequest(function () {
|
135
|
-
return runner.import(join("app", route2.file));
|
136
|
-
}, request, loaderProps2?.params || {});
|
104
|
+
var { request, route: route2, url: url2, loaderProps: loaderProps2 } = param2, result = await resolveAPIRequest(function() {
|
105
|
+
return runner.import(join("app", route2.file));
|
106
|
+
}, request, loaderProps2?.params || {});
|
137
107
|
return result;
|
138
108
|
}
|
139
109
|
});
|
@@ -144,12 +114,17 @@ ${stack}
|
|
144
114
|
apply: "serve",
|
145
115
|
async config(userConfig) {
|
146
116
|
if (handleRequest.manifest.pageRoutes) {
|
147
|
-
var routesAndLayouts = [
|
148
|
-
|
149
|
-
|
150
|
-
return
|
151
|
-
|
152
|
-
|
117
|
+
var routesAndLayouts = [
|
118
|
+
...new Set(handleRequest.manifest.pageRoutes.flatMap(function(route2) {
|
119
|
+
var _route_layouts;
|
120
|
+
return [
|
121
|
+
join("app", route2.file),
|
122
|
+
...((_route_layouts = route2.layouts) === null || _route_layouts === void 0 ? void 0 : _route_layouts.map(function(layout) {
|
123
|
+
return join("app", layout.contextKey);
|
124
|
+
})) || []
|
125
|
+
];
|
126
|
+
}))
|
127
|
+
];
|
153
128
|
return {
|
154
129
|
optimizeDeps: {
|
155
130
|
/**
|
@@ -203,37 +178,29 @@ ${stack}
|
|
203
178
|
// }
|
204
179
|
configureServer(serverIn) {
|
205
180
|
server = serverIn, runner = createServerModuleRunner(USE_SERVER_ENV ? server.environments.server : server.environments.ssr);
|
206
|
-
var appDir = join(process.cwd(), "app"),
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
server.middlewares.use(async function (req, res, next) {
|
181
|
+
var appDir = join(process.cwd(), "app"), fileWatcherChangeListener = debounce(async function(type, path) {
|
182
|
+
(type === "add" || type === "delete") && path.startsWith(appDir) && (handleRequest = createRequestHandler());
|
183
|
+
}, 100);
|
184
|
+
return server.watcher.addListener("all", fileWatcherChangeListener), function() {
|
185
|
+
server.middlewares.use(async function(req, res, next) {
|
212
186
|
try {
|
213
|
-
var _options_web,
|
214
|
-
redirects = (_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.redirects;
|
187
|
+
var _options_web, redirects = (_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.redirects;
|
215
188
|
if (redirects) {
|
216
|
-
var url2 = new URL(req.url || "", `http://${req.headers.host}`),
|
217
|
-
_iteratorNormalCompletion = !0,
|
218
|
-
_didIteratorError = !1,
|
219
|
-
_iteratorError = void 0;
|
189
|
+
var url2 = new URL(req.url || "", `http://${req.headers.host}`), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
220
190
|
try {
|
221
|
-
for (var _loop = function
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
};
|
235
|
-
}
|
236
|
-
}, _iterator = redirects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
191
|
+
for (var _loop = function() {
|
192
|
+
var redirect = _step.value, regexStr = `^${redirect.source.replace(/:\w+/g, "([^/]+)")}$`, match = url2.pathname.match(new RegExp(regexStr));
|
193
|
+
if (match) {
|
194
|
+
var destination = redirect.destination, params = redirect.source.match(/:\w+/g);
|
195
|
+
return params && params.forEach(function(param2, index) {
|
196
|
+
destination = destination.replace(param2, match[index + 1] || "");
|
197
|
+
}), console.warn(` [one] redirecting via redirect: ${destination}`), res.writeHead(redirect.permanent ? 301 : 302, {
|
198
|
+
Location: destination
|
199
|
+
}), res.end(), {
|
200
|
+
v: void 0
|
201
|
+
};
|
202
|
+
}
|
203
|
+
}, _iterator = redirects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
237
204
|
var _ret = _loop();
|
238
205
|
if (_type_of(_ret) === "object") return _ret.v;
|
239
206
|
}
|
@@ -243,12 +210,14 @@ ${stack}
|
|
243
210
|
try {
|
244
211
|
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
245
212
|
} finally {
|
246
|
-
if (_didIteratorError)
|
213
|
+
if (_didIteratorError)
|
214
|
+
throw _iteratorError;
|
247
215
|
}
|
248
216
|
}
|
249
217
|
}
|
250
218
|
var reply = await handleRequest.handler(await convertIncomingMessageToRequest(req));
|
251
|
-
if (!reply)
|
219
|
+
if (!reply)
|
220
|
+
return next();
|
252
221
|
if (typeof reply != "string" && isResponse(reply)) {
|
253
222
|
if (isStatusRedirect(reply.status)) {
|
254
223
|
var location = `${reply.headers.get("location") || ""}`;
|
@@ -260,12 +229,9 @@ ${stack}
|
|
260
229
|
}
|
261
230
|
console.error("No location provided to redirected status reply", reply);
|
262
231
|
}
|
263
|
-
res.statusCode = reply.status, res.statusMessage = reply.statusText, reply.headers.forEach(function
|
232
|
+
res.statusCode = reply.status, res.statusMessage = reply.statusText, reply.headers.forEach(function(value, key) {
|
264
233
|
if (key === "set-cookie") {
|
265
|
-
var cookies = value.split(", "),
|
266
|
-
_iteratorNormalCompletion2 = !0,
|
267
|
-
_didIteratorError2 = !1,
|
268
|
-
_iteratorError2 = void 0;
|
234
|
+
var cookies = value.split(", "), _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
|
269
235
|
try {
|
270
236
|
for (var _iterator2 = cookies[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
271
237
|
var cookie = _step2.value;
|
@@ -277,10 +243,12 @@ ${stack}
|
|
277
243
|
try {
|
278
244
|
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
|
279
245
|
} finally {
|
280
|
-
if (_didIteratorError2)
|
246
|
+
if (_didIteratorError2)
|
247
|
+
throw _iteratorError2;
|
281
248
|
}
|
282
249
|
}
|
283
|
-
} else
|
250
|
+
} else
|
251
|
+
res.setHeader(key, value);
|
284
252
|
});
|
285
253
|
var outString = "";
|
286
254
|
reply.body && reply.body.locked && console.warn("Body is locked??");
|
@@ -299,7 +267,7 @@ ${stack}
|
|
299
267
|
res.write(reply), res.end();
|
300
268
|
return;
|
301
269
|
} catch (error) {
|
302
|
-
next(error);
|
270
|
+
console.error(`One routing error: ${error}`), next(error);
|
303
271
|
}
|
304
272
|
console.warn(`SSR handler didn't send a response for url: ${req.url}`);
|
305
273
|
});
|
@@ -308,15 +276,10 @@ ${stack}
|
|
308
276
|
};
|
309
277
|
}
|
310
278
|
async function streamToString(stream) {
|
311
|
-
var reader = stream.getReader(),
|
312
|
-
decoder = new TextDecoder(),
|
313
|
-
result = "";
|
279
|
+
var reader = stream.getReader(), decoder = new TextDecoder(), result = "";
|
314
280
|
try {
|
315
|
-
for (
|
316
|
-
var {
|
317
|
-
done,
|
318
|
-
value
|
319
|
-
} = await reader.read();
|
281
|
+
for (; ; ) {
|
282
|
+
var { done, value } = await reader.read();
|
320
283
|
if (done) break;
|
321
284
|
result += decoder.decode(value, {
|
322
285
|
stream: !0
|
@@ -329,28 +292,34 @@ async function streamToString(stream) {
|
|
329
292
|
}
|
330
293
|
return result;
|
331
294
|
}
|
332
|
-
var convertIncomingMessageToRequest = async function
|
333
|
-
if (!req.originalUrl)
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
headers
|
338
|
-
for (var key in req.headers) req.headers[key] && headers.append(key, req.headers[key]);
|
295
|
+
var convertIncomingMessageToRequest = async function(req) {
|
296
|
+
if (!req.originalUrl)
|
297
|
+
throw new Error("Can't convert");
|
298
|
+
var urlBase = `http://${req.headers.host}`, urlString = req.originalUrl || "", url2 = new URL(urlString, urlBase), headers = new Headers();
|
299
|
+
for (var key in req.headers)
|
300
|
+
req.headers[key] && headers.append(key, req.headers[key]);
|
339
301
|
return new Request(url2, {
|
340
302
|
method: req.method,
|
341
|
-
body: [
|
303
|
+
body: [
|
304
|
+
"POST",
|
305
|
+
"PUT",
|
306
|
+
"PATCH",
|
307
|
+
"DELETE"
|
308
|
+
].includes(req.method || "") ? await readStream(req) : null,
|
342
309
|
headers
|
343
310
|
});
|
344
311
|
};
|
345
312
|
function readStream(stream) {
|
346
|
-
return new Promise(function
|
313
|
+
return new Promise(function(resolve2, reject) {
|
347
314
|
var chunks = [];
|
348
|
-
stream.on("data", function
|
315
|
+
stream.on("data", function(chunk) {
|
349
316
|
return chunks.push(chunk);
|
350
|
-
}), stream.on("end", function
|
317
|
+
}), stream.on("end", function() {
|
351
318
|
return resolve2(Buffer.concat(chunks));
|
352
319
|
}), stream.on("error", reject);
|
353
320
|
});
|
354
321
|
}
|
355
|
-
export {
|
356
|
-
|
322
|
+
export {
|
323
|
+
createFileSystemRouter
|
324
|
+
};
|
325
|
+
//# sourceMappingURL=createFileSystemRouter.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/createFileSystemRouter.tsx"],
|
4
|
+
"mappings": "AAAA,SAASA,YAAY;AACrB,SAASC,gBAAgB;AAEzB,SAASC,gCAAgC;AAEzC,SAASC,2BAA2B;AAEpC,SAASC,kBAAkB;AAC3B,SAASC,wBAAwB;AACjC,SAASC,4BAA4B;AACrC,SAASC,uBAAuB;AAChC,SAASC,qBAAqB;AAC9B,SAASC,yBAAyB;AAElC,SAASC,qBAAqBC,sBAAsB;;;;;AAGpD,IAAMC,iBAAiB;AAAM;AAEtB,SAASC,uBAAuBC,SAA0B;AAC/D,MAAMC,WAAW;IAAC;IAAiBL;KAE/BM,QACAC,QAEAC,gBAAgBC,qBAAAA,GAEhBC,gBAAsC;AAE1C,WAASD,uBAAAA;AACP,WAAOhB,oBAAoBW,SAAS;MAClC,MAAMO,UAAU,OAA2B;YAA3B,EAAEC,OAAOC,KAAKC,YAAW,IAAzB;AAGd,YAFAC,QAAQC,KAAK,aAAQJ,MAAMK,IAAI,KAAKJ,GAAAA,gBAAmBD,MAAMM,IAAI,EAAE,GAE/DN,MAAMK,SAAS;AAEjB,iBAAO;;;;;;;;;;;;AAcT,QAAIP,iBACF,MAAMA;AAGR,YAAM,EAAES,SAASC,QAAO,IAAKxB,qBAAAA;AAC7Bc,wBAAgBS;AAEhB,YAAI;cAIFE,8BAAAA,aAGyBC,kBANnBC,YAAYjC,KAAK,OAAOsB,MAAMM,IAAI;AACxCZ,iBAAOkB,WAAU,IAEjBH,gCAAAA,cAAAA,YAAW,sBAAmB,QAA9BA,iCAAAA,UAAAA,6BAAAA,KAAAA,WAAAA;AAEA,c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StatusRedirect", "promiseWithResolvers", "LoaderDataCache", "replaceLoader", "resolveAPIRequest", "virtalEntryIdClient", "virtualEntryId", "USE_SERVER_ENV", "createFileSystemRouter", "options", "preloads", "runner", "server", "handleRequest", "createRequestHandler", "renderPromise", "handleSSR", "route", "url", "loaderProps", "console", "info", "type", "file", "promise", "resolve", "globalThis", "exported", "routeFile", "clearCache", "import", "loaderData", "loader", "eval", "entry", "render", "default", "is404", "isNotFound", "html", "path", "Response", "status", "headers", "err", "error", "title", "pathname", "message", "Error", "stack", "handleLoader", "param", "request", "transformedJS", "transformRequest", "code", "platform", "searchParams", "get", "environment", "environments", "nativeTransformedJS", "JSON", "stringify", "handleAPI", "result", "params", "name", "enforce", "apply", "config", "userConfig", "manifest", "pageRoutes", "routesAndLayouts", "Set", "flatMap", "layouts", "map", "layout", "contextKey", "optimizeDeps", "entries", "configureServer", "serverIn", "ssr", "appDir", "process", "cwd", "fileWatcherChangeListener", "startsWith", "watcher", "addListener", "middlewares", "use", "req", "res", "next", "redirects", "web", "URL", "host", "redirect", "regexStr", "source", "replace", "match", "RegExp", "destination", "forEach", "index", "warn", "writeHead", "permanent", "Location", "end", "reply", "handler", "convertIncomingMessageToRequest", "location", "statusCode", "statusMessage", "statusText", "value", "key", "cookies", "split", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "_step", "cookie", "appendHeader", "setHeader", "outString", "body", "locked", "streamToString", "write", "stream", "reader", "getReader", "decoder", "TextDecoder", "done", "read", "decode", "releaseLock", "originalUrl", "urlBase", "urlString", "Headers", "append", "Request", "method", "includes", "readStream", "Promise", "reject", "chunks", "on", "chunk", "push", "Buffer", "concat"]
|
6
|
+
}
|
@@ -7,14 +7,11 @@ function nodeExternals() {
|
|
7
7
|
resolveId: {
|
8
8
|
order: "pre",
|
9
9
|
async handler(specifier, importer, param) {
|
10
|
-
var {
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
/^(?:\0|\.{1,2}\/)/.test(specifier) ||
|
16
|
-
// Ignore virtual modules and relative imports
|
17
|
-
path.isAbsolute(specifier)) return null;
|
10
|
+
var { isEntry } = param;
|
11
|
+
if (isEntry || // Ignore entry points (they should always be resolved)
|
12
|
+
/^(?:\0|\.{1,2}\/)/.test(specifier) || // Ignore virtual modules and relative imports
|
13
|
+
path.isAbsolute(specifier))
|
14
|
+
return null;
|
18
15
|
if (isBuiltin(specifier)) {
|
19
16
|
var stripped = specifier.replace(/^node:/, "");
|
20
17
|
return {
|
@@ -27,5 +24,7 @@ function nodeExternals() {
|
|
27
24
|
}
|
28
25
|
};
|
29
26
|
}
|
30
|
-
export {
|
31
|
-
|
27
|
+
export {
|
28
|
+
nodeExternals
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=customNodeExternals.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/customNodeExternals.ts"],
|
4
|
+
"mappings": "AAEA,SAASA,iBAAiB;AAC1B,OAAOC,UAAU;AAGV,SAASC,gBAAAA;AACd,SAAO;IACLC,MAAM;IACNC,SAAS;IAETC,WAAW;MACTC,OAAO;MACP,MAAMC,QAAQC,WAAWC,UAAU,OAAW;YAAX,EAAEC,QAAO,IAAT;AACjC,YACEA;QACA,oBAAoBC,KAAKH,SAAAA;QACzBP,KAAKW,WAAWJ,SAAAA;AAEhB,iBAAO;AAET,YAAIR,UAAUQ,SAAAA,GAAY;AACxB,cAAMK,WAAWL,UAAUM,QAAQ,UAAU,EAAA;AAC7C,iBAAO;YACLC,IAAKf,UAAUa,QAAAA,IAAiCA,WAArB,UAAUA;YACrCG,UAAU;YACVC,mBAAmB;UACrB;QACF;MACF;IACF;EACF;AACF;",
|
5
|
+
"names": ["isBuiltin", "path", "nodeExternals", "name", "enforce", "resolveId", "order", "handler", "specifier", "importer", "isEntry", "test", "isAbsolute", "stripped", "replace", "id", "external", "moduleSideEffects"]
|
6
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { writeFile } from "node:fs/promises";
|
2
|
-
import "../polyfills-server
|
3
|
-
import { existsAsync } from "../utils/existsAsync
|
2
|
+
import "../polyfills-server";
|
3
|
+
import { existsAsync } from "../utils/existsAsync";
|
4
4
|
function ensureTSConfig() {
|
5
|
-
existsAsync("tsconfig.json").then(function
|
5
|
+
existsAsync("tsconfig.json").then(function(hasTsConfig) {
|
6
6
|
hasTsConfig || (console.info("[one] adding default tsconfig.json. to disable set one/vite { config: { tsConfigPaths: false } }"), writeFile("tsconfig.json", `{
|
7
7
|
"compilerOptions": {
|
8
8
|
"baseUrl": ".",
|
@@ -41,5 +41,7 @@ function ensureTSConfig() {
|
|
41
41
|
`));
|
42
42
|
});
|
43
43
|
}
|
44
|
-
export {
|
45
|
-
|
44
|
+
export {
|
45
|
+
ensureTSConfig
|
46
|
+
};
|
47
|
+
//# sourceMappingURL=ensureTsConfig.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/ensureTsConfig.ts"],
|
4
|
+
"mappings": "AAAA,SAASA,iBAAiB;AAC1B,OAAO;AACP,SAASC,mBAAmB;AAErB,SAASC,iBAAAA;AACdD,cAAY,eAAA,EAAiBE,KAAK,SAACC,aAAAA;AACjC,IAAKA,gBACHC,QAAQC,KACN,kGAAkG,GAEpGN,UACE,iBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCP;EAGC,CAAA;AACF;",
|
5
|
+
"names": ["writeFile", "existsAsync", "ensureTSConfig", "then", "hasTsConfig", "console", "info"]
|
6
|
+
}
|
@@ -4,40 +4,48 @@ import path, { dirname } from "node:path";
|
|
4
4
|
import { createRequire } from "node:module";
|
5
5
|
async function getAllDependencies(root) {
|
6
6
|
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 20;
|
7
|
-
if (depth === 0)
|
7
|
+
if (depth === 0)
|
8
|
+
return [];
|
8
9
|
var pkgJsonPath = await findClosestPkgJsonPath(root);
|
9
|
-
if (!pkgJsonPath)
|
10
|
+
if (!pkgJsonPath)
|
11
|
+
throw new Error(`Cannot find package.json from ${root}`);
|
10
12
|
return await crawl(pkgJsonPath, depth - 1);
|
11
13
|
}
|
12
14
|
async function crawl(pkgJsonPath) {
|
13
|
-
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1 / 0,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies = pkgJson.dependencies ? Object.keys(pkgJson.dependencies) : [];
|
20
|
-
return await Promise.all(dependencies.map(async function (depName) {
|
15
|
+
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1 / 0, pkgJson = await FSExtra.readJson(pkgJsonPath).catch(function(e) {
|
16
|
+
throw new Error(`Unable to read ${pkgJsonPath}`, {
|
17
|
+
cause: e
|
18
|
+
});
|
19
|
+
}), dependencies = pkgJson.dependencies ? Object.keys(pkgJson.dependencies) : [];
|
20
|
+
return await Promise.all(dependencies.map(async function(depName) {
|
21
21
|
try {
|
22
|
-
var resolved = createRequire(dirname(pkgJsonPath)).resolve(depName),
|
23
|
-
|
24
|
-
|
22
|
+
var resolved = createRequire(dirname(pkgJsonPath)).resolve(depName), subDeps = await getAllDependencies(resolved, depth - 1);
|
23
|
+
subDeps && (dependencies = [
|
24
|
+
...dependencies,
|
25
|
+
...subDeps
|
26
|
+
]);
|
25
27
|
} catch {
|
26
28
|
console.log("Couldn't resolve", depName);
|
27
29
|
}
|
28
|
-
})), [
|
30
|
+
})), [
|
31
|
+
...new Set(dependencies)
|
32
|
+
];
|
29
33
|
}
|
30
34
|
async function findClosestPkgJsonPath(dir, predicate) {
|
31
|
-
for (dir.endsWith("package.json") && (dir = path.dirname(dir)); dir;) {
|
35
|
+
for (dir.endsWith("package.json") && (dir = path.dirname(dir)); dir; ) {
|
32
36
|
var pkg = path.join(dir, "package.json");
|
33
37
|
try {
|
34
38
|
var stat = await fs.stat(pkg);
|
35
|
-
if (stat.isFile() && (!predicate ||
|
36
|
-
|
39
|
+
if (stat.isFile() && (!predicate || await predicate(pkg)))
|
40
|
+
return pkg;
|
41
|
+
} catch {
|
42
|
+
}
|
37
43
|
var nextDir = path.dirname(dir);
|
38
44
|
if (nextDir === dir) break;
|
39
45
|
dir = nextDir;
|
40
46
|
}
|
41
47
|
}
|
42
|
-
export {
|
43
|
-
|
48
|
+
export {
|
49
|
+
getAllDependencies
|
50
|
+
};
|
51
|
+
//# sourceMappingURL=findDepsToOptimize.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/findDepsToOptimize.ts"],
|
4
|
+
"mappings": "AAEA,OAAOA,aAAa;AACpB,OAAOC,QAAQ;AACf,OAAOC,QAAQC,eAAe;AAC9B,SAASC,qBAAqB;AAG9B,eAAsBC,mBAAmBC,MAAY;MAAEC,QAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAQ;AAC7D,MAAIA,UAAU;AACZ,WAAO,CAAA;AAET,MAAMC,cAAc,MAAMC,uBAAuBH,IAAAA;AACjD,MAAI,CAACE;AACH,UAAM,IAAIE,MAAM,iCAAiCJ,IAAAA,EAAM;AAEzD,SAAO,MAAMK,MAAMH,aAAaD,QAAQ,CAAA;AAC1C;AAEA,eAAeI,MAAMH,aAAmB;MAAED,QAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAQK,OAC1CC,UAAU,MAAMb,QAAQc,SAASN,WAAAA,EAAaO,MAAM,SAACC,GAAAA;AACzD,UAAM,IAAIN,MAAM,kBAAkBF,WAAAA,IAAe;MAAES,OAAOD;IAAE,CAAA;EAC9D,CAAA,GAEIE,eAAeL,QAAQK,eAAeC,OAAOC,KAAKP,QAAQK,YAAY,IAAI,CAAA;AAE9E,eAAMG,QAAQC,IACZJ,aAAaK,IAAI,eAAOC,SAAAA;AACtB,QAAI;AACF,UAAMC,WAAWrB,cAAcD,QAAQK,WAAAA,CAAAA,EAAckB,QAAQF,OAAAA,GACvDG,UAAU,MAAMtB,mBAAmBoB,UAAUlB,QAAQ,CAAA;AAC3D,MAAIoB,YACFT,eAAe;WAAIA;WAAiBS;;IAExC,QAAc;AAEZC,cAAQC,IAAI,oBAAoBL,OAAAA;IAElC;EACF,CAAA,CAAA,GAGK;OAAI,IAAIM,IAAIZ,YAAAA;;AACrB;AAEA,eAAeT,uBACbsB,KACAC,WAA6C;AAK7C,OAHID,IAAIE,SAAS,cAAA,MACfF,MAAM7B,KAAKC,QAAQ4B,GAAAA,IAEdA,OAAK;AACV,QAAMG,MAAMhC,KAAKiC,KAAKJ,KAAK,cAAA;AAC3B,QAAI;AACF,UAAMK,OAAO,MAAMnC,GAAGmC,KAAKF,GAAAA;AAC3B,UAAIE,KAAKC,OAAM,MAAO,CAACL,aAAc,MAAMA,UAAUE,GAAAA;AACnD,eAAOA;IAEX,QAAQ;IAAC;AACT,QAAMI,UAAUpC,KAAKC,QAAQ4B,GAAAA;AAC7B,QAAIO,YAAYP,IAAK;AACrBA,UAAMO;EACR;AAEF;",
|
5
|
+
"names": ["FSExtra", "fs", "path", "dirname", "createRequire", "getAllDependencies", "root", "depth", "pkgJsonPath", "findClosestPkgJsonPath", "Error", "crawl", "Infinity", "pkgJson", "readJson", "catch", "e", "cause", "dependencies", "Object", "keys", "Promise", "all", "map", "depName", "resolved", "resolve", "subDeps", "console", "log", "Set", "dir", "predicate", "endsWith", "pkg", "join", "stat", "isFile", "nextDir"]
|
6
|
+
}
|
@@ -17,9 +17,11 @@ function fixDependenciesPlugin(options) {
|
|
17
17
|
!hasApplied && patches.length && (hasApplied = !0, await applyOptimizePatches(patches, config));
|
18
18
|
},
|
19
19
|
async configResolved(config) {
|
20
|
-
patches.length &&
|
20
|
+
patches.length && await applyDependencyPatches(patches, config);
|
21
21
|
}
|
22
22
|
};
|
23
23
|
}
|
24
|
-
export {
|
25
|
-
|
24
|
+
export {
|
25
|
+
fixDependenciesPlugin
|
26
|
+
};
|
27
|
+
//# sourceMappingURL=fixDependenciesPlugin.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/fixDependenciesPlugin.ts"],
|
4
|
+
"mappings": "AAEA,SAASA,sBAAsBC,8BAA6C;AAG5E,IAAIC,aAAa;AAEV,SAASC,sBAAsBC,SAA6B;AACjE,MAAMC,UAAsB,CAAA;AAC5B,WAAWC,OAAOF,SAAS;AACzB,QAAMG,QAAQH,QAAQE,GAAAA;AACtBD,YAAQG,KAAK;MACXC,QAAQH;MACRI,YACEH,SAAS,OAAOA,SAAU,WACtBA,QACA;QACEI,UAAUJ;MACZ;IACR,CAAA;EACF;AAEA,SAAO;IACLK,MAAM;IAEN,MAAMC,OAAOA,QAAM;AACjB,MAAI,CAACX,cAAcG,QAAQS,WACzBZ,aAAa,IACb,MAAMF,qBAAqBK,SAASQ,MAAAA;IAExC;IAEA,MAAME,eAAeF,QAAM;AACzB,MAAIR,QAAQS,UACV,MAAMb,uBAAuBI,SAASQ,MAAAA;IAE1C;EACF;AACF;",
|
5
|
+
"names": ["applyOptimizePatches", "applyDependencyPatches", "hasApplied", "fixDependenciesPlugin", "options", "patches", "key", "value", "push", "module", "patchFiles", "optimize", "name", "config", "length", "configResolved"]
|
6
|
+
}
|