vxrn 1.25.3 → 1.25.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/src/plugins/reactNativeDevServer.ts +57 -17
- package/src/utils/createNativeDevEngine.test.ts +95 -0
- package/src/utils/createNativeDevEngine.ts +157 -80
- package/types/utils/createNativeDevEngine.d.ts +17 -6
- package/dist/cli.mjs +0 -288
- package/dist/cli.mjs.map +0 -1
- package/dist/cli.native.js +0 -292
- package/dist/cli.native.js.map +0 -1
- package/dist/config/getAdditionalViteConfig.mjs +0 -67
- package/dist/config/getAdditionalViteConfig.mjs.map +0 -1
- package/dist/config/getAdditionalViteConfig.native.js +0 -67
- package/dist/config/getAdditionalViteConfig.native.js.map +0 -1
- package/dist/config/getBaseViteConfigOnly.mjs +0 -84
- package/dist/config/getBaseViteConfigOnly.mjs.map +0 -1
- package/dist/config/getBaseViteConfigOnly.native.js +0 -86
- package/dist/config/getBaseViteConfigOnly.native.js.map +0 -1
- package/dist/config/getBaseViteConfigWithPlugins.mjs +0 -10
- package/dist/config/getBaseViteConfigWithPlugins.mjs.map +0 -1
- package/dist/config/getBaseViteConfigWithPlugins.native.js +0 -10
- package/dist/config/getBaseViteConfigWithPlugins.native.js.map +0 -1
- package/dist/config/getBaseVitePlugins.mjs +0 -141
- package/dist/config/getBaseVitePlugins.mjs.map +0 -1
- package/dist/config/getBaseVitePlugins.native.js +0 -163
- package/dist/config/getBaseVitePlugins.native.js.map +0 -1
- package/dist/config/getNonCliModeOnlyVitePlugins.mjs +0 -8
- package/dist/config/getNonCliModeOnlyVitePlugins.mjs.map +0 -1
- package/dist/config/getNonCliModeOnlyVitePlugins.native.js +0 -6
- package/dist/config/getNonCliModeOnlyVitePlugins.native.js.map +0 -1
- package/dist/config/getOptimizeDeps.mjs +0 -47
- package/dist/config/getOptimizeDeps.mjs.map +0 -1
- package/dist/config/getOptimizeDeps.native.js +0 -47
- package/dist/config/getOptimizeDeps.native.js.map +0 -1
- package/dist/config/getOptimizeDeps.test.mjs +0 -20
- package/dist/config/getOptimizeDeps.test.mjs.map +0 -1
- package/dist/config/getOptimizeDeps.test.native.js +0 -39
- package/dist/config/getOptimizeDeps.test.native.js.map +0 -1
- package/dist/config/getOptionsFilled.mjs +0 -69
- package/dist/config/getOptionsFilled.mjs.map +0 -1
- package/dist/config/getOptionsFilled.native.js +0 -73
- package/dist/config/getOptionsFilled.native.js.map +0 -1
- package/dist/config/getReactNativePlugins.mjs +0 -23
- package/dist/config/getReactNativePlugins.mjs.map +0 -1
- package/dist/config/getReactNativePlugins.native.js +0 -25
- package/dist/config/getReactNativePlugins.native.js.map +0 -1
- package/dist/config/getServerOptionsFilled.mjs +0 -40
- package/dist/config/getServerOptionsFilled.mjs.map +0 -1
- package/dist/config/getServerOptionsFilled.native.js +0 -43
- package/dist/config/getServerOptionsFilled.native.js.map +0 -1
- package/dist/config/getServerOptionsFilled.test.mjs +0 -20
- package/dist/config/getServerOptionsFilled.test.mjs.map +0 -1
- package/dist/config/getServerOptionsFilled.test.native.js +0 -20
- package/dist/config/getServerOptionsFilled.test.native.js.map +0 -1
- package/dist/config/getViteServerConfig.mjs +0 -51
- package/dist/config/getViteServerConfig.mjs.map +0 -1
- package/dist/config/getViteServerConfig.native.js +0 -52
- package/dist/config/getViteServerConfig.native.js.map +0 -1
- package/dist/config/mergeUserConfig.mjs +0 -37
- package/dist/config/mergeUserConfig.mjs.map +0 -1
- package/dist/config/mergeUserConfig.native.js +0 -47
- package/dist/config/mergeUserConfig.native.js.map +0 -1
- package/dist/config/mergeUserConfig.test.mjs +0 -108
- package/dist/config/mergeUserConfig.test.mjs.map +0 -1
- package/dist/config/mergeUserConfig.test.native.js +0 -108
- package/dist/config/mergeUserConfig.test.native.js.map +0 -1
- package/dist/constants/defaults.mjs +0 -15
- package/dist/constants/defaults.mjs.map +0 -1
- package/dist/constants/defaults.native.js +0 -15
- package/dist/constants/defaults.native.js.map +0 -1
- package/dist/constants.mjs +0 -10
- package/dist/constants.mjs.map +0 -1
- package/dist/constants.native.js +0 -10
- package/dist/constants.native.js.map +0 -1
- package/dist/exports/build.mjs +0 -294
- package/dist/exports/build.mjs.map +0 -1
- package/dist/exports/build.native.js +0 -307
- package/dist/exports/build.native.js.map +0 -1
- package/dist/exports/clean.mjs +0 -99
- package/dist/exports/clean.mjs.map +0 -1
- package/dist/exports/clean.native.js +0 -111
- package/dist/exports/clean.native.js.map +0 -1
- package/dist/exports/clean.test.mjs +0 -81
- package/dist/exports/clean.test.mjs.map +0 -1
- package/dist/exports/clean.test.native.js +0 -88
- package/dist/exports/clean.test.native.js.map +0 -1
- package/dist/exports/createServer.mjs +0 -56
- package/dist/exports/createServer.mjs.map +0 -1
- package/dist/exports/createServer.native.js +0 -57
- package/dist/exports/createServer.native.js.map +0 -1
- package/dist/exports/dev.mjs +0 -204
- package/dist/exports/dev.mjs.map +0 -1
- package/dist/exports/dev.native.js +0 -218
- package/dist/exports/dev.native.js.map +0 -1
- package/dist/exports/loadEnv.mjs +0 -65
- package/dist/exports/loadEnv.mjs.map +0 -1
- package/dist/exports/loadEnv.native.js +0 -74
- package/dist/exports/loadEnv.native.js.map +0 -1
- package/dist/exports/loadEnv.test.mjs +0 -65
- package/dist/exports/loadEnv.test.mjs.map +0 -1
- package/dist/exports/loadEnv.test.native.js +0 -65
- package/dist/exports/loadEnv.test.native.js.map +0 -1
- package/dist/exports/patch.mjs +0 -12
- package/dist/exports/patch.mjs.map +0 -1
- package/dist/exports/patch.native.js +0 -12
- package/dist/exports/patch.native.js.map +0 -1
- package/dist/exports/prebuild.mjs +0 -212
- package/dist/exports/prebuild.mjs.map +0 -1
- package/dist/exports/prebuild.native.js +0 -215
- package/dist/exports/prebuild.native.js.map +0 -1
- package/dist/exports/prebuildWithoutExpo.mjs +0 -53
- package/dist/exports/prebuildWithoutExpo.mjs.map +0 -1
- package/dist/exports/prebuildWithoutExpo.native.js +0 -54
- package/dist/exports/prebuildWithoutExpo.native.js.map +0 -1
- package/dist/exports/runAndroid.mjs +0 -14
- package/dist/exports/runAndroid.mjs.map +0 -1
- package/dist/exports/runAndroid.native.js +0 -15
- package/dist/exports/runAndroid.native.js.map +0 -1
- package/dist/exports/runIos.mjs +0 -14
- package/dist/exports/runIos.mjs.map +0 -1
- package/dist/exports/runIos.native.js +0 -15
- package/dist/exports/runIos.native.js.map +0 -1
- package/dist/exports/serve.mjs +0 -37
- package/dist/exports/serve.mjs.map +0 -1
- package/dist/exports/serve.native.js +0 -40
- package/dist/exports/serve.native.js.map +0 -1
- package/dist/exports/serveStaticAssets.mjs +0 -133
- package/dist/exports/serveStaticAssets.mjs.map +0 -1
- package/dist/exports/serveStaticAssets.native.js +0 -213
- package/dist/exports/serveStaticAssets.native.js.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -22
- package/dist/index.mjs.map +0 -1
- package/dist/index.native.js +0 -22
- package/dist/index.native.js.map +0 -1
- package/dist/patches/builtInDepPatches.mjs +0 -483
- package/dist/patches/builtInDepPatches.mjs.map +0 -1
- package/dist/patches/builtInDepPatches.native.js +0 -486
- package/dist/patches/builtInDepPatches.native.js.map +0 -1
- package/dist/plugins/applyBuiltInPatchesPlugin.mjs +0 -17
- package/dist/plugins/applyBuiltInPatchesPlugin.mjs.map +0 -1
- package/dist/plugins/applyBuiltInPatchesPlugin.native.js +0 -17
- package/dist/plugins/applyBuiltInPatchesPlugin.native.js.map +0 -1
- package/dist/plugins/autoDepOptimizePlugin.mjs +0 -108
- package/dist/plugins/autoDepOptimizePlugin.mjs.map +0 -1
- package/dist/plugins/autoDepOptimizePlugin.native.js +0 -121
- package/dist/plugins/autoDepOptimizePlugin.native.js.map +0 -1
- package/dist/plugins/autoDepOptimizePlugin.test.mjs +0 -31
- package/dist/plugins/autoDepOptimizePlugin.test.mjs.map +0 -1
- package/dist/plugins/autoDepOptimizePlugin.test.native.js +0 -39
- package/dist/plugins/autoDepOptimizePlugin.test.native.js.map +0 -1
- package/dist/plugins/clientInjectPlugin.mjs +0 -16
- package/dist/plugins/clientInjectPlugin.mjs.map +0 -1
- package/dist/plugins/clientInjectPlugin.native.js +0 -16
- package/dist/plugins/clientInjectPlugin.native.js.map +0 -1
- package/dist/plugins/defaultDepOptimizePlugin.mjs +0 -30
- package/dist/plugins/defaultDepOptimizePlugin.mjs.map +0 -1
- package/dist/plugins/defaultDepOptimizePlugin.native.js +0 -30
- package/dist/plugins/defaultDepOptimizePlugin.native.js.map +0 -1
- package/dist/plugins/expoManifestRequestHandlerPlugin.mjs +0 -189
- package/dist/plugins/expoManifestRequestHandlerPlugin.mjs.map +0 -1
- package/dist/plugins/expoManifestRequestHandlerPlugin.native.js +0 -202
- package/dist/plugins/expoManifestRequestHandlerPlugin.native.js.map +0 -1
- package/dist/plugins/getResolvedConfigSubset.mjs +0 -12
- package/dist/plugins/getResolvedConfigSubset.mjs.map +0 -1
- package/dist/plugins/getResolvedConfigSubset.native.js +0 -12
- package/dist/plugins/getResolvedConfigSubset.native.js.map +0 -1
- package/dist/plugins/reactNativeCommonJsPlugin.mjs +0 -194
- package/dist/plugins/reactNativeCommonJsPlugin.mjs.map +0 -1
- package/dist/plugins/reactNativeCommonJsPlugin.native.js +0 -275
- package/dist/plugins/reactNativeCommonJsPlugin.native.js.map +0 -1
- package/dist/plugins/reactNativeDevAssetPlugin.mjs +0 -99
- package/dist/plugins/reactNativeDevAssetPlugin.mjs.map +0 -1
- package/dist/plugins/reactNativeDevAssetPlugin.native.js +0 -108
- package/dist/plugins/reactNativeDevAssetPlugin.native.js.map +0 -1
- package/dist/plugins/reactNativeDevServer.mjs +0 -190
- package/dist/plugins/reactNativeDevServer.mjs.map +0 -1
- package/dist/plugins/reactNativeDevServer.native.js +0 -232
- package/dist/plugins/reactNativeDevServer.native.js.map +0 -1
- package/dist/plugins/resolveIdScan.test.mjs +0 -31
- package/dist/plugins/resolveIdScan.test.mjs.map +0 -1
- package/dist/plugins/resolveIdScan.test.native.js +0 -38
- package/dist/plugins/resolveIdScan.test.native.js.map +0 -1
- package/dist/plugins/rollupRemoveUnusedImports.mjs +0 -11
- package/dist/plugins/rollupRemoveUnusedImports.mjs.map +0 -1
- package/dist/plugins/rollupRemoveUnusedImports.native.js +0 -11
- package/dist/plugins/rollupRemoveUnusedImports.native.js.map +0 -1
- package/dist/plugins/serverExtensions.test.mjs +0 -106
- package/dist/plugins/serverExtensions.test.mjs.map +0 -1
- package/dist/plugins/serverExtensions.test.native.js +0 -117
- package/dist/plugins/serverExtensions.test.native.js.map +0 -1
- package/dist/rn-commands/bundle/buildBundle.mjs +0 -68
- package/dist/rn-commands/bundle/buildBundle.mjs.map +0 -1
- package/dist/rn-commands/bundle/buildBundle.native.js +0 -75
- package/dist/rn-commands/bundle/buildBundle.native.js.map +0 -1
- package/dist/runtime/hmr-client.mjs +0 -145
- package/dist/runtime/hmr-client.mjs.map +0 -1
- package/dist/runtime/hmr-client.native.js +0 -237
- package/dist/runtime/hmr-client.native.js.map +0 -1
- package/dist/runtime/hmr-runtime.mjs +0 -200
- package/dist/runtime/hmr-runtime.mjs.map +0 -1
- package/dist/runtime/hmr-runtime.native.js +0 -441
- package/dist/runtime/hmr-runtime.native.js.map +0 -1
- package/dist/runtime/hmr-types.mjs +0 -2
- package/dist/runtime/hmr-types.mjs.map +0 -1
- package/dist/runtime/hmr-types.native.js +0 -2
- package/dist/runtime/hmr-types.native.js.map +0 -1
- package/dist/runtime/native-prelude.mjs +0 -94
- package/dist/runtime/native-prelude.mjs.map +0 -1
- package/dist/runtime/native-prelude.native.js +0 -94
- package/dist/runtime/native-prelude.native.js.map +0 -1
- package/dist/runtime/react-refresh-utils.mjs +0 -29
- package/dist/runtime/react-refresh-utils.mjs.map +0 -1
- package/dist/runtime/react-refresh-utils.native.js +0 -34
- package/dist/runtime/react-refresh-utils.native.js.map +0 -1
- package/dist/serve/node.mjs +0 -62
- package/dist/serve/node.mjs.map +0 -1
- package/dist/serve/node.native.js +0 -107
- package/dist/serve/node.native.js.map +0 -1
- package/dist/serve/node.test.mjs +0 -60
- package/dist/serve/node.test.mjs.map +0 -1
- package/dist/serve/node.test.native.js +0 -72
- package/dist/serve/node.test.native.js.map +0 -1
- package/dist/types.mjs +0 -2
- package/dist/types.mjs.map +0 -1
- package/dist/types.native.js +0 -2
- package/dist/types.native.js.map +0 -1
- package/dist/user-interface/index.mjs +0 -312
- package/dist/user-interface/index.mjs.map +0 -1
- package/dist/user-interface/index.native.js +0 -349
- package/dist/user-interface/index.native.js.map +0 -1
- package/dist/utils/assert.mjs +0 -12
- package/dist/utils/assert.mjs.map +0 -1
- package/dist/utils/assert.native.js +0 -24
- package/dist/utils/assert.native.js.map +0 -1
- package/dist/utils/bindKeypressInput.mjs +0 -47
- package/dist/utils/bindKeypressInput.mjs.map +0 -1
- package/dist/utils/bindKeypressInput.native.js +0 -47
- package/dist/utils/bindKeypressInput.native.js.map +0 -1
- package/dist/utils/bindKeypressInput.test.mjs +0 -48
- package/dist/utils/bindKeypressInput.test.mjs.map +0 -1
- package/dist/utils/bindKeypressInput.test.native.js +0 -48
- package/dist/utils/bindKeypressInput.test.native.js.map +0 -1
- package/dist/utils/coerceToArray.mjs +0 -5
- package/dist/utils/coerceToArray.mjs.map +0 -1
- package/dist/utils/coerceToArray.native.js +0 -5
- package/dist/utils/coerceToArray.native.js.map +0 -1
- package/dist/utils/connectedNativeClients.mjs +0 -9
- package/dist/utils/connectedNativeClients.mjs.map +0 -1
- package/dist/utils/connectedNativeClients.native.js +0 -9
- package/dist/utils/connectedNativeClients.native.js.map +0 -1
- package/dist/utils/createNativeDevEngine.mjs +0 -875
- package/dist/utils/createNativeDevEngine.mjs.map +0 -1
- package/dist/utils/createNativeDevEngine.native.js +0 -932
- package/dist/utils/createNativeDevEngine.native.js.map +0 -1
- package/dist/utils/createNativeDevEngine.test.mjs +0 -93
- package/dist/utils/createNativeDevEngine.test.mjs.map +0 -1
- package/dist/utils/createNativeDevEngine.test.native.js +0 -106
- package/dist/utils/createNativeDevEngine.test.native.js.map +0 -1
- package/dist/utils/dispose.mjs +0 -9
- package/dist/utils/dispose.mjs.map +0 -1
- package/dist/utils/dispose.native.js +0 -11
- package/dist/utils/dispose.native.js.map +0 -1
- package/dist/utils/environmentUtils.mjs +0 -14
- package/dist/utils/environmentUtils.mjs.map +0 -1
- package/dist/utils/environmentUtils.native.js +0 -14
- package/dist/utils/environmentUtils.native.js.map +0 -1
- package/dist/utils/execSync.mjs +0 -9
- package/dist/utils/execSync.mjs.map +0 -1
- package/dist/utils/execSync.native.js +0 -9
- package/dist/utils/execSync.native.js.map +0 -1
- package/dist/utils/expoRun.mjs +0 -48
- package/dist/utils/expoRun.mjs.map +0 -1
- package/dist/utils/expoRun.native.js +0 -49
- package/dist/utils/expoRun.native.js.map +0 -1
- package/dist/utils/filterViteServerResolvedUrls.mjs +0 -29
- package/dist/utils/filterViteServerResolvedUrls.mjs.map +0 -1
- package/dist/utils/filterViteServerResolvedUrls.native.js +0 -70
- package/dist/utils/filterViteServerResolvedUrls.native.js.map +0 -1
- package/dist/utils/getBoundPort.mjs +0 -9
- package/dist/utils/getBoundPort.mjs.map +0 -1
- package/dist/utils/getBoundPort.native.js +0 -16
- package/dist/utils/getBoundPort.native.js.map +0 -1
- package/dist/utils/getBoundPort.test.mjs +0 -71
- package/dist/utils/getBoundPort.test.mjs.map +0 -1
- package/dist/utils/getBoundPort.test.native.js +0 -82
- package/dist/utils/getBoundPort.test.native.js.map +0 -1
- package/dist/utils/getCacheDir.mjs +0 -6
- package/dist/utils/getCacheDir.mjs.map +0 -1
- package/dist/utils/getCacheDir.native.js +0 -6
- package/dist/utils/getCacheDir.native.js.map +0 -1
- package/dist/utils/getServerEntry.mjs +0 -10
- package/dist/utils/getServerEntry.mjs.map +0 -1
- package/dist/utils/getServerEntry.native.js +0 -17
- package/dist/utils/getServerEntry.native.js.map +0 -1
- package/dist/utils/getVitePath.mjs +0 -49
- package/dist/utils/getVitePath.mjs.map +0 -1
- package/dist/utils/getVitePath.native.js +0 -48
- package/dist/utils/getVitePath.native.js.map +0 -1
- package/dist/utils/globDir.mjs +0 -18
- package/dist/utils/globDir.mjs.map +0 -1
- package/dist/utils/globDir.native.js +0 -21
- package/dist/utils/globDir.native.js.map +0 -1
- package/dist/utils/imageSizePatch.test.mjs +0 -29
- package/dist/utils/imageSizePatch.test.mjs.map +0 -1
- package/dist/utils/imageSizePatch.test.native.js +0 -30
- package/dist/utils/imageSizePatch.test.native.js.map +0 -1
- package/dist/utils/isWithin.mjs +0 -7
- package/dist/utils/isWithin.mjs.map +0 -1
- package/dist/utils/isWithin.native.js +0 -7
- package/dist/utils/isWithin.native.js.map +0 -1
- package/dist/utils/patches.mjs +0 -279
- package/dist/utils/patches.mjs.map +0 -1
- package/dist/utils/patches.native.js +0 -508
- package/dist/utils/patches.native.js.map +0 -1
- package/dist/utils/patches.test.mjs +0 -214
- package/dist/utils/patches.test.mjs.map +0 -1
- package/dist/utils/patches.test.native.js +0 -224
- package/dist/utils/patches.test.native.js.map +0 -1
- package/dist/utils/printServerUrls.mjs +0 -12
- package/dist/utils/printServerUrls.mjs.map +0 -1
- package/dist/utils/printServerUrls.native.js +0 -56
- package/dist/utils/printServerUrls.native.js.map +0 -1
- package/dist/utils/removeUndefined.mjs +0 -11
- package/dist/utils/removeUndefined.mjs.map +0 -1
- package/dist/utils/removeUndefined.native.js +0 -11
- package/dist/utils/removeUndefined.native.js.map +0 -1
- package/dist/utils/scanDepsToOptimize.mjs +0 -176
- package/dist/utils/scanDepsToOptimize.mjs.map +0 -1
- package/dist/utils/scanDepsToOptimize.native.js +0 -212
- package/dist/utils/scanDepsToOptimize.native.js.map +0 -1
- package/dist/utils/state.mjs +0 -28
- package/dist/utils/state.mjs.map +0 -1
- package/dist/utils/state.native.js +0 -28
- package/dist/utils/state.native.js.map +0 -1
- package/dist/utils/uniq.mjs +0 -5
- package/dist/utils/uniq.mjs.map +0 -1
- package/dist/utils/uniq.native.js +0 -5
- package/dist/utils/uniq.native.js.map +0 -1
- package/dist/utils/utils.mjs +0 -32
- package/dist/utils/utils.mjs.map +0 -1
- package/dist/utils/utils.native.js +0 -53
- package/dist/utils/utils.native.js.map +0 -1
- package/dist/vendor/debugger-app/index.mjs +0 -2
- package/dist/vendor/debugger-app/index.mjs.map +0 -1
- package/dist/vendor/debugger-app/index.native.js +0 -2
- package/dist/vendor/debugger-app/index.native.js.map +0 -1
- package/dist/vendor/debugger-app/src/debuggerWorker.mjs +0 -2
- package/dist/vendor/debugger-app/src/debuggerWorker.mjs.map +0 -1
- package/dist/vendor/debugger-app/src/debuggerWorker.native.js +0 -2
- package/dist/vendor/debugger-app/src/debuggerWorker.native.js.map +0 -1
- package/dist/vendor/debugger-app/src/index.css +0 -41
- package/dist/vendor/debugger-app/src/index.css.map +0 -6
- package/dist/vendor/debugger-app/src/index.mjs +0 -2
- package/dist/vendor/debugger-app/src/index.mjs.map +0 -1
- package/dist/vendor/debugger-app/src/index.native.js +0 -2
- package/dist/vendor/debugger-app/src/index.native.js.map +0 -1
- package/dist/vxrn-vite-plugin.mjs +0 -44
- package/dist/vxrn-vite-plugin.mjs.map +0 -1
- package/dist/vxrn-vite-plugin.native.js +0 -45
- package/dist/vxrn-vite-plugin.native.js.map +0 -1
- package/types/cli.d.ts.map +0 -1
- package/types/config/getAdditionalViteConfig.d.ts.map +0 -1
- package/types/config/getBaseViteConfigOnly.d.ts.map +0 -1
- package/types/config/getBaseViteConfigWithPlugins.d.ts.map +0 -1
- package/types/config/getBaseVitePlugins.d.ts.map +0 -1
- package/types/config/getNonCliModeOnlyVitePlugins.d.ts.map +0 -1
- package/types/config/getOptimizeDeps.d.ts.map +0 -1
- package/types/config/getOptimizeDeps.test.d.ts.map +0 -1
- package/types/config/getOptionsFilled.d.ts.map +0 -1
- package/types/config/getReactNativePlugins.d.ts.map +0 -1
- package/types/config/getServerOptionsFilled.d.ts.map +0 -1
- package/types/config/getServerOptionsFilled.test.d.ts.map +0 -1
- package/types/config/getViteServerConfig.d.ts.map +0 -1
- package/types/config/mergeUserConfig.d.ts.map +0 -1
- package/types/config/mergeUserConfig.test.d.ts.map +0 -1
- package/types/constants/defaults.d.ts.map +0 -1
- package/types/constants.d.ts.map +0 -1
- package/types/exports/build.d.ts.map +0 -1
- package/types/exports/clean.d.ts.map +0 -1
- package/types/exports/clean.test.d.ts.map +0 -1
- package/types/exports/createServer.d.ts.map +0 -1
- package/types/exports/dev.d.ts.map +0 -1
- package/types/exports/loadEnv.d.ts.map +0 -1
- package/types/exports/loadEnv.test.d.ts.map +0 -1
- package/types/exports/patch.d.ts.map +0 -1
- package/types/exports/prebuild.d.ts.map +0 -1
- package/types/exports/prebuildWithoutExpo.d.ts.map +0 -1
- package/types/exports/runAndroid.d.ts.map +0 -1
- package/types/exports/runIos.d.ts.map +0 -1
- package/types/exports/serve.d.ts.map +0 -1
- package/types/exports/serveStaticAssets.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/patches/builtInDepPatches.d.ts.map +0 -1
- package/types/plugins/applyBuiltInPatchesPlugin.d.ts.map +0 -1
- package/types/plugins/autoDepOptimizePlugin.d.ts.map +0 -1
- package/types/plugins/autoDepOptimizePlugin.test.d.ts.map +0 -1
- package/types/plugins/clientInjectPlugin.d.ts.map +0 -1
- package/types/plugins/defaultDepOptimizePlugin.d.ts.map +0 -1
- package/types/plugins/expoManifestRequestHandlerPlugin.d.ts.map +0 -1
- package/types/plugins/getResolvedConfigSubset.d.ts.map +0 -1
- package/types/plugins/reactNativeCommonJsPlugin.d.ts.map +0 -1
- package/types/plugins/reactNativeDevAssetPlugin.d.ts.map +0 -1
- package/types/plugins/reactNativeDevServer.d.ts.map +0 -1
- package/types/plugins/resolveIdScan.test.d.ts.map +0 -1
- package/types/plugins/rollupRemoveUnusedImports.d.ts.map +0 -1
- package/types/plugins/serverExtensions.test.d.ts.map +0 -1
- package/types/rn-commands/bundle/buildBundle.d.ts.map +0 -1
- package/types/runtime/hmr-client.d.ts.map +0 -1
- package/types/runtime/hmr-runtime.d.ts.map +0 -1
- package/types/runtime/hmr-types.d.ts.map +0 -1
- package/types/runtime/native-prelude.d.ts.map +0 -1
- package/types/runtime/react-refresh-utils.d.ts.map +0 -1
- package/types/serve/node.d.ts.map +0 -1
- package/types/serve/node.test.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- package/types/user-interface/index.d.ts.map +0 -1
- package/types/utils/assert.d.ts.map +0 -1
- package/types/utils/bindKeypressInput.d.ts.map +0 -1
- package/types/utils/bindKeypressInput.test.d.ts.map +0 -1
- package/types/utils/coerceToArray.d.ts.map +0 -1
- package/types/utils/connectedNativeClients.d.ts.map +0 -1
- package/types/utils/createNativeDevEngine.d.ts.map +0 -1
- package/types/utils/createNativeDevEngine.test.d.ts.map +0 -1
- package/types/utils/dispose.d.ts.map +0 -1
- package/types/utils/environmentUtils.d.ts.map +0 -1
- package/types/utils/execSync.d.ts.map +0 -1
- package/types/utils/expoRun.d.ts.map +0 -1
- package/types/utils/filterViteServerResolvedUrls.d.ts.map +0 -1
- package/types/utils/getBoundPort.d.ts.map +0 -1
- package/types/utils/getBoundPort.test.d.ts.map +0 -1
- package/types/utils/getCacheDir.d.ts.map +0 -1
- package/types/utils/getServerEntry.d.ts.map +0 -1
- package/types/utils/getVitePath.d.ts.map +0 -1
- package/types/utils/globDir.d.ts.map +0 -1
- package/types/utils/imageSizePatch.test.d.ts.map +0 -1
- package/types/utils/isWithin.d.ts.map +0 -1
- package/types/utils/patches.d.ts.map +0 -1
- package/types/utils/patches.test.d.ts.map +0 -1
- package/types/utils/printServerUrls.d.ts.map +0 -1
- package/types/utils/removeUndefined.d.ts.map +0 -1
- package/types/utils/scanDepsToOptimize.d.ts.map +0 -1
- package/types/utils/state.d.ts.map +0 -1
- package/types/utils/uniq.d.ts.map +0 -1
- package/types/utils/utils.d.ts.map +0 -1
- package/types/vxrn-vite-plugin.d.ts.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import module from "module";
|
|
2
|
-
import { pathToFileURL } from "url";
|
|
3
|
-
import { fillOptions } from "../config/getOptionsFilled.native.js";
|
|
4
|
-
import { applyBuiltInPatches } from "../utils/patches.native.js";
|
|
5
|
-
async function devServerRunning(port) {
|
|
6
|
-
try {
|
|
7
|
-
var res = await fetch(`http://localhost:${port}/status`, {
|
|
8
|
-
signal: AbortSignal.timeout(3e3)
|
|
9
|
-
});
|
|
10
|
-
return (await res.text()).includes("packager-status:running");
|
|
11
|
-
} catch (unused) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
async function expoRun(param) {
|
|
16
|
-
var {
|
|
17
|
-
root,
|
|
18
|
-
platform,
|
|
19
|
-
port
|
|
20
|
-
} = param;
|
|
21
|
-
var options = await fillOptions({
|
|
22
|
-
root
|
|
23
|
-
});
|
|
24
|
-
applyBuiltInPatches(options).catch(function (err) {
|
|
25
|
-
console.error(`
|
|
26
|
-
\u{1F97A} error applying built-in patches`, err);
|
|
27
|
-
});
|
|
28
|
-
var resolvedPort = port || 8081;
|
|
29
|
-
if (!(await devServerRunning(resolvedPort))) {
|
|
30
|
-
console.error(`
|
|
31
|
-
No dev server running on http://localhost:${resolvedPort} \u2014 the app loads its JS from it.
|
|
32
|
-
Start it first (e.g. \`bun dev\` or \`one dev\`), then re-run this command.`);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
process.env.RCT_METRO_PORT = String(resolvedPort);
|
|
36
|
-
try {
|
|
37
|
-
var require2 = module.createRequire(root);
|
|
38
|
-
var importPath = require2.resolve(`@expo/cli/build/src/run/${platform}/index.js`, {
|
|
39
|
-
paths: [root]
|
|
40
|
-
});
|
|
41
|
-
var expoRun2 = (await import(pathToFileURL(importPath).href)).default[`expoRun${platform.charAt(0).toUpperCase() + platform.slice(1)}`];
|
|
42
|
-
await expoRun2([`--port`, `${resolvedPort}`]);
|
|
43
|
-
} catch (e) {
|
|
44
|
-
console.error(`Failed to run native project: ${e}
|
|
45
|
-
Is "expo" listed in your dependencies?`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export { expoRun };
|
|
49
|
-
//# sourceMappingURL=expoRun.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["module","pathToFileURL","fillOptions","applyBuiltInPatches","devServerRunning","port","res","fetch","signal","AbortSignal","timeout","text","includes","unused","expoRun","param","root","platform","options","catch","err","console","error","resolvedPort","process","exit","env","RCT_METRO_PORT","String","require2","createRequire","importPath","resolve","paths","expoRun2","href","default","charAt","toUpperCase","slice","e"],"sources":["../../src/utils/expoRun.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,SAASC,aAAA,QAAqB;AAC9B,SAASC,WAAA,QAAmB;AAC5B,SAASC,mBAAA,QAA2B;AAUpC,eAAeC,iBAAiBC,IAAA,EAAgC;EAC9D,IAAI;IACF,IAAAC,GAAM,SAAMC,KAAM,qBAAMF,IAAoB,SAAI;MAC9CG,MAAA,EAAQC,WAAA,CAAYC,OAAA,CAAQ,GAAI;IAClC,CAAC;IACD,QAAQ,MAAMJ,GAAA,CAAIK,IAAA,CAAK,GAAGC,QAAA,CAAS,yBAAyB;EAC9D,SAAQC,MAAA;IACN,OAAO;EACT;AACF;AAEA,eAAsBC,QAAQC,KAAA;EAC5B;IAAAC,IAAA;IAAAC,QAAA;IAAAZ;EAAA,IAAAU,KAAA;EACA,IAAAG,OAAA,SAAAhB,WAAA;IACAc;EACF,CAIG;EACDb,mBAAgB,CAAAe,OAAM,EAAAC,KAAY,WAAQC,GAAA;IAE1CC,OAAA,CAAAC,KAAA;AACE,2CAAc,EAAAF,GAAA;EAAA;EAChB,IAACG,YAAA,GAAAlB,IAAA;EAED,YAAMD,gBAAe,CAAAmB,YAAQ;IAC7BF,OAAM,CAAAC,KAAM;AACV,4CAAQC,YAAA;AAAA,4EACN;IAAAC,OAAA,CAAAC,IAAA;EAA2D;EAAAD,OAE7D,CAAAE,GAAA,CAAAC,cAAA,GAAAC,MAAA,CAAAL,YAAA;EACA;IACF,IAAAM,QAAA,GAAA7B,MAAA,CAAA8B,aAAA,CAAAd,IAAA;IAOA,IAAAe,UAAY,GAAAF,QAAA,CAAAG,OAAiB,CAAO,2BAAYf,QAAA;MAE5CgB,KAAA,GAEFjB,IAAM;IAC6E,EACjF;IACF,IAACkB,QAAA,iBAAAjC,aAAA,CAAA8B,UAAA,EAAAI,IAAA,GAAAC,OAAA,WAAAnB,QAAA,CAAAoB,MAAA,IAAAC,WAAA,KAAArB,QAAA,CAAAsB,KAAA;IACD,MAAMzB,QAAA,EAGN,QAAM,EACR,GAAAS,YAAY,GACV;EAAQ,SACNiB,CAAA;IAAkCnB,OAAA,CAAAC,KAAA,kCAAAkB,CAAA;AAAA,uCACpC;EACF;AACF","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { networkInterfaces } from "node:os";
|
|
2
|
-
function getLocalIpAddress() {
|
|
3
|
-
const nets = networkInterfaces();
|
|
4
|
-
for (const name of Object.keys(nets)) {
|
|
5
|
-
for (const net of nets[name] ?? []) {
|
|
6
|
-
if (!net.internal && net.family === "IPv4") {
|
|
7
|
-
return net.address;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return void 0;
|
|
12
|
-
}
|
|
13
|
-
function filterViteServerResolvedUrls(urls) {
|
|
14
|
-
if (!urls) {
|
|
15
|
-
return urls;
|
|
16
|
-
}
|
|
17
|
-
let local = urls.local;
|
|
18
|
-
let network = urls.network;
|
|
19
|
-
const ipAddress = getLocalIpAddress();
|
|
20
|
-
if (ipAddress) {
|
|
21
|
-
network = network.filter(url => url.includes(ipAddress));
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
local,
|
|
25
|
-
network
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export { filterViteServerResolvedUrls };
|
|
29
|
-
//# sourceMappingURL=filterViteServerResolvedUrls.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["networkInterfaces","getLocalIpAddress","nets","name","Object","keys","net","internal","family","address","filterViteServerResolvedUrls","urls","local","network","ipAddress","filter","url","includes"],"sources":["../../src/utils/filterViteServerResolvedUrls.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,iBAAA,QAAyB;AAGlC,SAASC,kBAAA,EAAwC;EAC/C,MAAMC,IAAA,GAAOF,iBAAA,CAAkB;EAC/B,WAAWG,IAAA,IAAQC,MAAA,CAAOC,IAAA,CAAKH,IAAI,GAAG;IACpC,WAAWI,GAAA,IAAOJ,IAAA,CAAKC,IAAI,KAAK,EAAC,EAAG;MAElC,IAAI,CAACG,GAAA,CAAIC,QAAA,IAAYD,GAAA,CAAIE,MAAA,KAAW,QAAQ;QAC1C,OAAOF,GAAA,CAAIG,OAAA;MACb;IACF;EACF;EACA,OAAO;AACT;AAKO,SAASC,6BACdC,IAAA,EAC2B;EAC3B,IAAI,CAACA,IAAA,EAAM;IACT,OAAOA,IAAA;EACT;EAEA,IAAIC,KAAA,GAAQD,IAAA,CAAKC,KAAA;EACjB,IAAIC,OAAA,GAAUF,IAAA,CAAKE,OAAA;EAGnB,MAAMC,SAAA,GAAYb,iBAAA,CAAkB;EACpC,IAAIa,SAAA,EAAW;IACbD,OAAA,GAAUA,OAAA,CAAQE,MAAA,CAAQC,GAAA,IAAQA,GAAA,CAAIC,QAAA,CAASH,SAAS,CAAC;EAC3D;EAEA,OAAO;IAAEF,KAAA;IAAOC;EAAQ;AAC1B","ignoreList":[]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { networkInterfaces } from "os";
|
|
2
|
-
function getLocalIpAddress() {
|
|
3
|
-
var nets = networkInterfaces();
|
|
4
|
-
var _iteratorNormalCompletion = true,
|
|
5
|
-
_didIteratorError = false,
|
|
6
|
-
_iteratorError = void 0;
|
|
7
|
-
try {
|
|
8
|
-
for (var _iterator = Object.keys(nets)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
9
|
-
var name = _step.value;
|
|
10
|
-
var _nets_name;
|
|
11
|
-
var _iteratorNormalCompletion1 = true,
|
|
12
|
-
_didIteratorError1 = false,
|
|
13
|
-
_iteratorError1 = void 0;
|
|
14
|
-
try {
|
|
15
|
-
for (var _iterator1 = ((_nets_name = nets[name]) !== null && _nets_name !== void 0 ? _nets_name : [])[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
16
|
-
var net = _step1.value;
|
|
17
|
-
if (!net.internal && net.family === "IPv4") {
|
|
18
|
-
return net.address;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
} catch (err) {
|
|
22
|
-
_didIteratorError1 = true;
|
|
23
|
-
_iteratorError1 = err;
|
|
24
|
-
} finally {
|
|
25
|
-
try {
|
|
26
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
27
|
-
_iterator1.return();
|
|
28
|
-
}
|
|
29
|
-
} finally {
|
|
30
|
-
if (_didIteratorError1) {
|
|
31
|
-
throw _iteratorError1;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
} catch (err) {
|
|
37
|
-
_didIteratorError = true;
|
|
38
|
-
_iteratorError = err;
|
|
39
|
-
} finally {
|
|
40
|
-
try {
|
|
41
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
42
|
-
_iterator.return();
|
|
43
|
-
}
|
|
44
|
-
} finally {
|
|
45
|
-
if (_didIteratorError) {
|
|
46
|
-
throw _iteratorError;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return void 0;
|
|
51
|
-
}
|
|
52
|
-
function filterViteServerResolvedUrls(urls) {
|
|
53
|
-
if (!urls) {
|
|
54
|
-
return urls;
|
|
55
|
-
}
|
|
56
|
-
var local = urls.local;
|
|
57
|
-
var network = urls.network;
|
|
58
|
-
var ipAddress = getLocalIpAddress();
|
|
59
|
-
if (ipAddress) {
|
|
60
|
-
network = network.filter(function (url) {
|
|
61
|
-
return url.includes(ipAddress);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
local,
|
|
66
|
-
network
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export { filterViteServerResolvedUrls };
|
|
70
|
-
//# sourceMappingURL=filterViteServerResolvedUrls.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["networkInterfaces","getLocalIpAddress","nets","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Object","keys","Symbol","iterator","_step","next","done","name","value","_nets_name","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","net","internal","family","address","err","return"],"sources":["../../src/utils/filterViteServerResolvedUrls.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,iBAAA,QAAyB;AAGlC,SAASC,kBAAA,EAAwC;EAC/C,IAAAC,IAAM,GAAAF,iBAAO;EACb,IAAAG,yBAA0B,GAAK,IAAI;IAAGC,iBAAA;IAAAC,cAAA;EACpC;IAEE,SAAKC,SAAI,GAAAC,MAAgB,CAAAC,IAAA,CAAAN,IAAA,CAAW,CAAAO,MAAA,CAAQC,QAAA,KAAAC,KAAA,IAAAR,yBAAA,IAAAQ,KAAA,GAAAL,SAAA,CAAAM,IAAA,IAAAC,IAAA,GAAAV,yBAAA;MAC1C,IAAAW,IAAA,GAAOH,KAAI,CAAAI,KAAA;MACb,IAAAC,UAAA;MACF,IAAAC,0BAAA;QAAAC,kBAAA;QAAAC,eAAA;MACF;QACA,KAAO,IAAAC,UAAA,KAAAJ,UAAA,GAAAd,IAAA,CAAAY,IAAA,eAAAE,UAAA,cAAAA,UAAA,OAAAP,MAAA,CAAAC,QAAA,KAAAW,MAAA,IAAAJ,0BAAA,IAAAI,MAAA,GAAAD,UAAA,CAAAR,IAAA,IAAAC,IAAA,GAAAI,0BAAA;UACT,IAAAK,GAAA,GAAAD,MAAA,CAAAN,KAAA;UAKgB,KAAAO,GAAA,CAAAC,QAAA,IAAAD,GAAA,CAAAE,MACd,KAC2B;YACtB,OAAMF,GAAA,CAAAG,OAAA;UACT;QACF;MAEI,SAAQC,GAAA,EAAK;QACbR,kBAAe;QAGbC,eAAY,GAAAO,GAAA;MACd;QACF;UACF,KAAAT,0BAAA,IAAAG,UAAA,CAAAO,MAAA;YAESP,UAAO,CAAAO,MAAQ;UAC1B","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
function getBoundPort(server) {
|
|
2
|
-
const addr = server.httpServer?.address();
|
|
3
|
-
if (addr && typeof addr === "object" && typeof addr.port === "number") {
|
|
4
|
-
return addr.port;
|
|
5
|
-
}
|
|
6
|
-
return server.config.server.port ?? 8081;
|
|
7
|
-
}
|
|
8
|
-
export { getBoundPort };
|
|
9
|
-
//# sourceMappingURL=getBoundPort.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getBoundPort","server","addr","httpServer","address","port","config"],"sources":["../../src/utils/getBoundPort.ts"],"sourcesContent":[null],"mappings":"AAOO,SAASA,aAAaC,MAAA,EAA+B;EAC1D,MAAMC,IAAA,GAAOD,MAAA,CAAOE,UAAA,EAAYC,OAAA,CAAQ;EACxC,IAAIF,IAAA,IAAQ,OAAOA,IAAA,KAAS,YAAY,OAAOA,IAAA,CAAKG,IAAA,KAAS,UAAU;IACrE,OAAOH,IAAA,CAAKG,IAAA;EACd;EACA,OAAOJ,MAAA,CAAOK,MAAA,CAAOL,MAAA,CAAOI,IAAA,IAAQ;AACtC","ignoreList":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function _type_of(obj) {
|
|
2
|
-
"@swc/helpers - typeof";
|
|
3
|
-
|
|
4
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5
|
-
}
|
|
6
|
-
function getBoundPort(server) {
|
|
7
|
-
var _server_config_server_port;
|
|
8
|
-
var _server_httpServer;
|
|
9
|
-
var addr = (_server_httpServer = server.httpServer) === null || _server_httpServer === void 0 ? void 0 : _server_httpServer.address();
|
|
10
|
-
if (addr && (typeof addr === "undefined" ? "undefined" : _type_of(addr)) === "object" && typeof addr.port === "number") {
|
|
11
|
-
return addr.port;
|
|
12
|
-
}
|
|
13
|
-
return (_server_config_server_port = server.config.server.port) !== null && _server_config_server_port !== void 0 ? _server_config_server_port : 8081;
|
|
14
|
-
}
|
|
15
|
-
export { getBoundPort };
|
|
16
|
-
//# sourceMappingURL=getBoundPort.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_type_of","obj","Symbol","constructor","getBoundPort","server","_server_config_server_port","_server_httpServer"],"sources":["../../src/utils/getBoundPort.ts"],"sourcesContent":[null],"mappings":"AAOO,SAASA,SAAAC,GAAA,EAAa;EAC3B,uBAAoB;;EACpB,OAAIA,GAAA,IAAQ,OAAOC,MAAA,KAAS,WAAY,IAAOD,GAAA,CAAAE,WAAc,KAAAD,MAAU,qBAAAD,GAAA;AACrE;AAAY,SACdG,aAAAC,MAAA;EACA,IAAAC,0BAA4B;EAC9B,IAAAC,kBAAA","ignoreList":[]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { createServer } from "node:http";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { getBoundPort } from "./getBoundPort.mjs";
|
|
4
|
-
function fakeServer(opts) {
|
|
5
|
-
return {
|
|
6
|
-
httpServer: opts.address === void 0 ? void 0 : {
|
|
7
|
-
address: () => opts.address ?? null
|
|
8
|
-
},
|
|
9
|
-
config: {
|
|
10
|
-
server: {
|
|
11
|
-
port: opts.configPort
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
describe("getBoundPort", () => {
|
|
17
|
-
it("returns the actually-bound port from httpServer.address(), ignoring a stale/undefined config port (the 8081 trap)", () => {
|
|
18
|
-
expect(getBoundPort(fakeServer({
|
|
19
|
-
address: {
|
|
20
|
-
port: 8082
|
|
21
|
-
},
|
|
22
|
-
configPort: void 0
|
|
23
|
-
}))).toBe(8082);
|
|
24
|
-
});
|
|
25
|
-
it("prefers the bound port even when config.server.port disagrees", () => {
|
|
26
|
-
expect(getBoundPort(fakeServer({
|
|
27
|
-
address: {
|
|
28
|
-
port: 8082
|
|
29
|
-
},
|
|
30
|
-
configPort: 8081
|
|
31
|
-
}))).toBe(8082);
|
|
32
|
-
});
|
|
33
|
-
it("falls back to config.server.port when the server is not yet listening", () => {
|
|
34
|
-
expect(getBoundPort(fakeServer({
|
|
35
|
-
address: null,
|
|
36
|
-
configPort: 8085
|
|
37
|
-
}))).toBe(8085);
|
|
38
|
-
});
|
|
39
|
-
it("falls back to 8081 when nothing is available", () => {
|
|
40
|
-
expect(getBoundPort(fakeServer({
|
|
41
|
-
address: null,
|
|
42
|
-
configPort: void 0
|
|
43
|
-
}))).toBe(8081);
|
|
44
|
-
});
|
|
45
|
-
it("ignores a unix-socket/pipe address (string) and falls back to config", () => {
|
|
46
|
-
expect(getBoundPort(fakeServer({
|
|
47
|
-
address: "/tmp/some.sock",
|
|
48
|
-
configPort: 8090
|
|
49
|
-
}))).toBe(8090);
|
|
50
|
-
});
|
|
51
|
-
it("reads the real bound port from a live http server, not the config value", async () => {
|
|
52
|
-
const real = createServer();
|
|
53
|
-
await new Promise(res => real.listen(0, "127.0.0.1", () => res()));
|
|
54
|
-
try {
|
|
55
|
-
const boundPort = real.address().port;
|
|
56
|
-
const server = {
|
|
57
|
-
httpServer: real,
|
|
58
|
-
config: {
|
|
59
|
-
server: {
|
|
60
|
-
port: 8081
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
expect(getBoundPort(server)).toBe(boundPort);
|
|
65
|
-
expect(getBoundPort(server)).not.toBe(8081);
|
|
66
|
-
} finally {
|
|
67
|
-
await new Promise(res => real.close(() => res()));
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=getBoundPort.test.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createServer","describe","expect","it","getBoundPort","fakeServer","opts","httpServer","address","config","server","port","configPort","toBe","real","Promise","res","listen","boundPort","not","close"],"sources":["../../src/utils/getBoundPort.test.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,YAAA,QAAoB;AAE7B,SAASC,QAAA,EAAUC,MAAA,EAAQC,EAAA,QAAU;AACrC,SAASC,YAAA,QAAoB;AAG7B,SAASC,WAAWC,IAAA,EAGF;EAChB,OAAO;IACLC,UAAA,EACED,IAAA,CAAKE,OAAA,KAAY,SAAY,SAAY;MAAEA,OAAA,EAASA,CAAA,KAAMF,IAAA,CAAKE,OAAA,IAAW;IAAK;IACjFC,MAAA,EAAQ;MAAEC,MAAA,EAAQ;QAAEC,IAAA,EAAML,IAAA,CAAKM;MAAW;IAAE;EAC9C;AACF;AAEAX,QAAA,CAAS,gBAAgB,MAAM;EAC7BE,EAAA,CAAG,qHAAqH,MAAM;IAE5HD,MAAA,CACEE,YAAA,CAAaC,UAAA,CAAW;MAAEG,OAAA,EAAS;QAAEG,IAAA,EAAM;MAAK;MAAGC,UAAA,EAAY;IAAU,CAAC,CAAC,CAC7E,EAAEC,IAAA,CAAK,IAAI;EACb,CAAC;EAEDV,EAAA,CAAG,iEAAiE,MAAM;IACxED,MAAA,CAAOE,YAAA,CAAaC,UAAA,CAAW;MAAEG,OAAA,EAAS;QAAEG,IAAA,EAAM;MAAK;MAAGC,UAAA,EAAY;IAAK,CAAC,CAAC,CAAC,EAAEC,IAAA,CAC9E,IACF;EACF,CAAC;EAEDV,EAAA,CAAG,yEAAyE,MAAM;IAChFD,MAAA,CAAOE,YAAA,CAAaC,UAAA,CAAW;MAAEG,OAAA,EAAS;MAAMI,UAAA,EAAY;IAAK,CAAC,CAAC,CAAC,EAAEC,IAAA,CAAK,IAAI;EACjF,CAAC;EAEDV,EAAA,CAAG,gDAAgD,MAAM;IACvDD,MAAA,CAAOE,YAAA,CAAaC,UAAA,CAAW;MAAEG,OAAA,EAAS;MAAMI,UAAA,EAAY;IAAU,CAAC,CAAC,CAAC,EAAEC,IAAA,CAAK,IAAI;EACtF,CAAC;EAEDV,EAAA,CAAG,wEAAwE,MAAM;IAC/ED,MAAA,CACEE,YAAA,CAAaC,UAAA,CAAW;MAAEG,OAAA,EAAS;MAAkBI,UAAA,EAAY;IAAK,CAAC,CAAC,CAC1E,EAAEC,IAAA,CAAK,IAAI;EACb,CAAC;EAGDV,EAAA,CAAG,2EAA2E,YAAY;IACxF,MAAMW,IAAA,GAAOd,YAAA,CAAa;IAC1B,MAAM,IAAIe,OAAA,CAAeC,GAAA,IAAQF,IAAA,CAAKG,MAAA,CAAO,GAAG,aAAa,MAAMD,GAAA,CAAI,CAAC,CAAC;IACzE,IAAI;MACF,MAAME,SAAA,GAAaJ,IAAA,CAAKN,OAAA,CAAQ,EAAuBG,IAAA;MAEvD,MAAMD,MAAA,GAAS;QACbH,UAAA,EAAYO,IAAA;QACZL,MAAA,EAAQ;UAAEC,MAAA,EAAQ;YAAEC,IAAA,EAAM;UAAK;QAAE;MACnC;MACAT,MAAA,CAAOE,YAAA,CAAaM,MAAM,CAAC,EAAEG,IAAA,CAAKK,SAAS;MAC3ChB,MAAA,CAAOE,YAAA,CAAaM,MAAM,CAAC,EAAES,GAAA,CAAIN,IAAA,CAAK,IAAI;IAC5C,UAAE;MACA,MAAM,IAAIE,OAAA,CAAeC,GAAA,IAAQF,IAAA,CAAKM,KAAA,CAAM,MAAMJ,GAAA,CAAI,CAAC,CAAC;IAC1D;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { createServer } from "http";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { getBoundPort } from "./getBoundPort.native.js";
|
|
4
|
-
function fakeServer(opts) {
|
|
5
|
-
return {
|
|
6
|
-
httpServer: opts.address === void 0 ? void 0 : {
|
|
7
|
-
address: function () {
|
|
8
|
-
var _opts_address;
|
|
9
|
-
return (_opts_address = opts.address) !== null && _opts_address !== void 0 ? _opts_address : null;
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
config: {
|
|
13
|
-
server: {
|
|
14
|
-
port: opts.configPort
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
describe("getBoundPort", function () {
|
|
20
|
-
it("returns the actually-bound port from httpServer.address(), ignoring a stale/undefined config port (the 8081 trap)", function () {
|
|
21
|
-
expect(getBoundPort(fakeServer({
|
|
22
|
-
address: {
|
|
23
|
-
port: 8082
|
|
24
|
-
},
|
|
25
|
-
configPort: void 0
|
|
26
|
-
}))).toBe(8082);
|
|
27
|
-
});
|
|
28
|
-
it("prefers the bound port even when config.server.port disagrees", function () {
|
|
29
|
-
expect(getBoundPort(fakeServer({
|
|
30
|
-
address: {
|
|
31
|
-
port: 8082
|
|
32
|
-
},
|
|
33
|
-
configPort: 8081
|
|
34
|
-
}))).toBe(8082);
|
|
35
|
-
});
|
|
36
|
-
it("falls back to config.server.port when the server is not yet listening", function () {
|
|
37
|
-
expect(getBoundPort(fakeServer({
|
|
38
|
-
address: null,
|
|
39
|
-
configPort: 8085
|
|
40
|
-
}))).toBe(8085);
|
|
41
|
-
});
|
|
42
|
-
it("falls back to 8081 when nothing is available", function () {
|
|
43
|
-
expect(getBoundPort(fakeServer({
|
|
44
|
-
address: null,
|
|
45
|
-
configPort: void 0
|
|
46
|
-
}))).toBe(8081);
|
|
47
|
-
});
|
|
48
|
-
it("ignores a unix-socket/pipe address (string) and falls back to config", function () {
|
|
49
|
-
expect(getBoundPort(fakeServer({
|
|
50
|
-
address: "/tmp/some.sock",
|
|
51
|
-
configPort: 8090
|
|
52
|
-
}))).toBe(8090);
|
|
53
|
-
});
|
|
54
|
-
it("reads the real bound port from a live http server, not the config value", async function () {
|
|
55
|
-
var real = createServer();
|
|
56
|
-
await new Promise(function (res) {
|
|
57
|
-
return real.listen(0, "127.0.0.1", function () {
|
|
58
|
-
return res();
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
try {
|
|
62
|
-
var boundPort = real.address().port;
|
|
63
|
-
var server = {
|
|
64
|
-
httpServer: real,
|
|
65
|
-
config: {
|
|
66
|
-
server: {
|
|
67
|
-
port: 8081
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
expect(getBoundPort(server)).toBe(boundPort);
|
|
72
|
-
expect(getBoundPort(server)).not.toBe(8081);
|
|
73
|
-
} finally {
|
|
74
|
-
await new Promise(function (res) {
|
|
75
|
-
return real.close(function () {
|
|
76
|
-
return res();
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
//# sourceMappingURL=getBoundPort.test.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createServer","describe","expect","it","getBoundPort","fakeServer","opts","httpServer","address","_opts_address","config","server","port","configPort","toBe"],"sources":["../../src/utils/getBoundPort.test.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,YAAA,QAAoB;AAE7B,SAASC,QAAA,EAAUC,MAAA,EAAQC,EAAA,QAAU;AACrC,SAASC,YAAA,QAAoB;AAG7B,SAASC,WAAWC,IAAA,EAGF;EAChB,OAAO;IACLC,UAAA,EACED,IAAA,CAAKE,OAAA,KAAY,SAAY,SAAY;MAC3CA,OAAQ,EAAE,SAAAA,CAAA,EAAU;QACtB,IAAAC,aAAA;QACF,QAAAA,aAAA,GAAAH,IAAA,CAAAE,OAAA,cAAAC,aAAA,cAAAA,aAAA;MAEA;IACE,CAAG;IAEDC,MAAA;MACEC,MAAA;QACAC,IAAK,EAAAN,IAAI,CAAAO;MACZ;IAED;EACE;AAAgF;AAC9EZ,QACF;EACFE,EAAC;IAEDD,MAAG,CAAAE,YAAA,CAAAC,UAAA;MACDG,OAAO;QACRI,IAAA;MAEE;MACDC,UAAO;IACR,KAAAC,IAAA;EAED;EACEX,EAAA;IAAAD,MACE,CAAAE,YAAa,CAAAC,UAAa;MAC1BG,OAAK,EAAI;QACZI,IAAA;MAGE;MACDC,UAAM,EAAO;IACb,KAAAC,IAAM,CAAI;EACV;EACEX,EAAA,wEAAuD;IAEvDD,MAAA,CAAAE,YAAe,CAAAC,UAAA;MAAAG,OACb;MAAYK,UACJ,EAAE;IAAuB,EACnC,GAAAC,IAAA;EACA;EACAX,EAAA,+CAA0C;IAC5CD,MAAA,CAAAE,YAAE,CAAAC,UAAA;MACAG,OAAM,MAAI;MACZK,UAAA;IACD,KAAAC,IAAA;EACF","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["join","getCacheDir","root"],"sources":["../../src/utils/getCacheDir.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,IAAA,QAAY;AAEd,SAASC,YAAYC,IAAA,EAAc;EACxC,OAAOF,IAAA,CAAKE,IAAA,EAAM,gBAAgB,OAAO;AAC3C","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["join","getCacheDir","root"],"sources":["../../src/utils/getCacheDir.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,IAAA,QAAY;AAEd,SAASC,YAAYC,IAAA,EAAc;EACxC,OAAOF,IAAA,CAAKE,IAAA,EAAM,gBAAgB,OAAO;AAC3C","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
const getServerCJSSetting = options => {
|
|
3
|
-
const serverOptions = options.build?.server;
|
|
4
|
-
return typeof serverOptions !== "object" ? false : serverOptions.outputFormat === "cjs";
|
|
5
|
-
};
|
|
6
|
-
const getServerEntry = (options, outDir = "dist") => {
|
|
7
|
-
return resolve(process.cwd(), `${options.root}/${outDir}/server/_virtual_one-entry.${getServerCJSSetting(options) ? "c" : ""}js`);
|
|
8
|
-
};
|
|
9
|
-
export { getServerCJSSetting, getServerEntry };
|
|
10
|
-
//# sourceMappingURL=getServerEntry.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["resolve","getServerCJSSetting","options","serverOptions","build","server","outputFormat","getServerEntry","outDir","process","cwd","root"],"sources":["../../src/utils/getServerEntry.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,OAAA,QAAe;AAKjB,MAAMC,mBAAA,GAAuBC,OAAA,IAA2B;EAC7D,MAAMC,aAAA,GAAgBD,OAAA,CAAQE,KAAA,EAAOC,MAAA;EACrC,OAAO,OAAOF,aAAA,KAAkB,WAAW,QAAQA,aAAA,CAAcG,YAAA,KAAiB;AACpF;AAEO,MAAMC,cAAA,GAAiBA,CAACL,OAAA,EAAwBM,MAAA,GAAS,WAAW;EACzE,OAAOR,OAAA,CACLS,OAAA,CAAQC,GAAA,CAAI,GACZ,GAAGR,OAAA,CAAQS,IAAI,IAAIH,MAAM,8BAA8BP,mBAAA,CAAoBC,OAAO,IAAI,MAAM,EAAE,IAChG;AACF","ignoreList":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { resolve } from "path";
|
|
2
|
-
function _type_of(obj) {
|
|
3
|
-
"@swc/helpers - typeof";
|
|
4
|
-
|
|
5
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
6
|
-
}
|
|
7
|
-
var getServerCJSSetting = function (options) {
|
|
8
|
-
var _options_build;
|
|
9
|
-
var serverOptions = (_options_build = options.build) === null || _options_build === void 0 ? void 0 : _options_build.server;
|
|
10
|
-
return (typeof serverOptions === "undefined" ? "undefined" : _type_of(serverOptions)) !== "object" ? false : serverOptions.outputFormat === "cjs";
|
|
11
|
-
};
|
|
12
|
-
var getServerEntry = function (options) {
|
|
13
|
-
var outDir = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "dist";
|
|
14
|
-
return resolve(process.cwd(), `${options.root}/${outDir}/server/_virtual_one-entry.${getServerCJSSetting(options) ? "c" : ""}js`);
|
|
15
|
-
};
|
|
16
|
-
export { getServerCJSSetting, getServerEntry };
|
|
17
|
-
//# sourceMappingURL=getServerEntry.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["resolve","_type_of","obj","Symbol","constructor","getServerCJSSetting","options","_options_build","serverOptions","build","server","outputFormat","getServerEntry"],"sources":["../../src/utils/getServerEntry.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,OAAA,QAAe;AAKjB,SAAMC,SAAAC,GAAA;EACX,uBAAsB;;EACtB,OAAOA,GAAA,IAAO,OAAAC,MAAA,KAAkB,WAAW,IAAAD,GAAA,CAAQE,WAAA,KAAcD,MAAA,WAAiB,UAAAD,GAAA;AACpF;AAEO,IAAAG,mBAAuB,GAAC,SAAAA,CAAwBC,OAAS;EAC9D,IAAAC,cAAO;EAAA,IACLC,aAAY,IAAAD,cAAA,GAAAD,OAAA,CAAAG,KAAA,cAAAF,cAAA,uBAAAA,cAAA,CAAAG,MAAA;EAAA,OACT,QAAQF,aAAc,8BAA8B,GAAAP,QAAA,CAAAO,aAAoB,CAAO,MAAI,QAAQ,WAAAA,aAAA,CAAAG,YAAA;AAAA;AAElG,IAAAC,cAAA,YAAAA,CAAAN,OAAA","ignoreList":[]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { dirname, join } from "node:path";
|
|
2
|
-
import FSExtra from "fs-extra";
|
|
3
|
-
import { normalizePath } from "vite";
|
|
4
|
-
async function getVitePath(rootPath, importer, moduleName, resolver, resolverWithPlugins, absolute = false) {
|
|
5
|
-
if (moduleName === "react-native") {
|
|
6
|
-
return "react-native";
|
|
7
|
-
}
|
|
8
|
-
if (moduleName === "react") {
|
|
9
|
-
return "react";
|
|
10
|
-
}
|
|
11
|
-
if (moduleName === "react/jsx-runtime") {
|
|
12
|
-
return "react/jsx-runtime";
|
|
13
|
-
}
|
|
14
|
-
if (moduleName === "react/jsx-dev-runtime") {
|
|
15
|
-
return "react/jsx-dev-runtime";
|
|
16
|
-
}
|
|
17
|
-
if (moduleName.includes("one/dist/esm/index")) {
|
|
18
|
-
return "one";
|
|
19
|
-
}
|
|
20
|
-
if (moduleName[0] === ".") {
|
|
21
|
-
const rootAt = importer.indexOf(rootPath);
|
|
22
|
-
const base = join(dirname(importer.slice(rootAt)), moduleName);
|
|
23
|
-
return base + ".js";
|
|
24
|
-
}
|
|
25
|
-
if (moduleName === "one") {
|
|
26
|
-
return "one";
|
|
27
|
-
}
|
|
28
|
-
if (moduleName === "one") {
|
|
29
|
-
return "one";
|
|
30
|
-
}
|
|
31
|
-
const sourceFile = join(process.cwd(), "index.js");
|
|
32
|
-
const resolved = (await resolver(moduleName, sourceFile)) || (await resolverWithPlugins(moduleName, importer
|
|
33
|
-
// @zetavg: we cannot use `sourceFile` here since it'll always end with `.js`, and plugins such as `vite-tsconfig-paths` may simply ignore if it doesn't end with `.ts` or `.tsx` (see: https://github.com/aleclarson/vite-tsconfig-paths/blob/v5.0.0/src/index.ts#L307-L310). Actually IDK why we are using the `sourceFile` but not the `importer` here.
|
|
34
|
-
));
|
|
35
|
-
if (!resolved) {
|
|
36
|
-
return "one";
|
|
37
|
-
}
|
|
38
|
-
if (!resolved) {
|
|
39
|
-
throw new Error(` \u274C Path not found ${sourceFile} (rootPath ${rootPath}, importer ${importer}, moduleName ${moduleName})`);
|
|
40
|
-
}
|
|
41
|
-
const real = await FSExtra.realpath(resolved);
|
|
42
|
-
let id = real;
|
|
43
|
-
if (normalizePath(id).endsWith(`/react/jsx-dev-runtime.js`)) {
|
|
44
|
-
id = "react/jsx-runtime";
|
|
45
|
-
}
|
|
46
|
-
return id;
|
|
47
|
-
}
|
|
48
|
-
export { getVitePath };
|
|
49
|
-
//# sourceMappingURL=getVitePath.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["dirname","join","FSExtra","normalizePath","getVitePath","rootPath","importer","moduleName","resolver","resolverWithPlugins","absolute","includes","rootAt","indexOf","base","slice","sourceFile","process","cwd","resolved","Error","real","realpath","id","endsWith"],"sources":["../../src/utils/getVitePath.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,OAAA,EAASC,IAAA,QAAY;AAE9B,OAAOC,OAAA,MAAa;AACpB,SAASC,aAAA,QAAqB;AAE9B,eAAsBC,YACpBC,QAAA,EACAC,QAAA,EACAC,UAAA,EACAC,QAAA,EACAC,mBAAA,EAIAC,QAAA,GAAW,OACX;EAEA,IAAIH,UAAA,KAAe,gBAAgB;IACjC,OAAO;EACT;EACA,IAAIA,UAAA,KAAe,SAAS;IAC1B,OAAO;EACT;EACA,IAAIA,UAAA,KAAe,qBAAqB;IACtC,OAAO;EACT;EACA,IAAIA,UAAA,KAAe,yBAAyB;IAC1C,OAAO;EACT;EACA,IAAIA,UAAA,CAAWI,QAAA,CAAS,oBAAoB,GAAG;IAC7C,OAAO;EACT;EAEA,IAAIJ,UAAA,CAAW,CAAC,MAAM,KAAK;IACzB,MAAMK,MAAA,GAASN,QAAA,CAASO,OAAA,CAAQR,QAAQ;IACxC,MAAMS,IAAA,GAAOb,IAAA,CAAKD,OAAA,CAAQM,QAAA,CAASS,KAAA,CAAMH,MAAM,CAAC,GAAGL,UAAU;IAC7D,OAAOO,IAAA,GAAO;EAChB;EACA,IAAIP,UAAA,KAAe,OAAO;IAExB,OAAO;EACT;EACA,IAAIA,UAAA,KAAe,OAAO;IAExB,OAAO;EACT;EAEA,MAAMS,UAAA,GAAaf,IAAA,CAAKgB,OAAA,CAAQC,GAAA,CAAI,GAAG,UAAU;EACjD,MAAMC,QAAA,GACH,OAAMX,QAAA,CAASD,UAAA,EAAYS,UAAU,OACrC,MAAMP,mBAAA,CACLF,UAAA,EACAD;EAAA;EACF;EAGF,IAAI,CAACa,QAAA,EAAU;IACb,OAAO;EACT;EAGA,IAAI,CAACA,QAAA,EAAU;IACb,MAAM,IAAIC,KAAA,CACR,0BAAqBJ,UAAU,cAAcX,QAAQ,cAAcC,QAAQ,gBAAgBC,UAAU,GACvG;EACF;EAEA,MAAMc,IAAA,GAAO,MAAMnB,OAAA,CAAQoB,QAAA,CAASH,QAAQ;EAE5C,IAAII,EAAA,GAAKF,IAAA;EAOT,IAAIlB,aAAA,CAAcoB,EAAE,EAAEC,QAAA,CAAS,2BAA2B,GAAG;IAC3DD,EAAA,GAAK;EACP;EAEA,OAAOA,EAAA;AACT","ignoreList":[]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { dirname, join } from "path";
|
|
2
|
-
import FSExtra from "fs-extra";
|
|
3
|
-
import { normalizePath } from "vite";
|
|
4
|
-
async function getVitePath(rootPath, importer, moduleName, resolver, resolverWithPlugins) {
|
|
5
|
-
var absolute = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
6
|
-
if (moduleName === "react-native") {
|
|
7
|
-
return "react-native";
|
|
8
|
-
}
|
|
9
|
-
if (moduleName === "react") {
|
|
10
|
-
return "react";
|
|
11
|
-
}
|
|
12
|
-
if (moduleName === "react/jsx-runtime") {
|
|
13
|
-
return "react/jsx-runtime";
|
|
14
|
-
}
|
|
15
|
-
if (moduleName === "react/jsx-dev-runtime") {
|
|
16
|
-
return "react/jsx-dev-runtime";
|
|
17
|
-
}
|
|
18
|
-
if (moduleName.includes("one/dist/esm/index")) {
|
|
19
|
-
return "one";
|
|
20
|
-
}
|
|
21
|
-
if (moduleName[0] === ".") {
|
|
22
|
-
var rootAt = importer.indexOf(rootPath);
|
|
23
|
-
var base = join(dirname(importer.slice(rootAt)), moduleName);
|
|
24
|
-
return base + ".js";
|
|
25
|
-
}
|
|
26
|
-
if (moduleName === "one") {
|
|
27
|
-
return "one";
|
|
28
|
-
}
|
|
29
|
-
if (moduleName === "one") {
|
|
30
|
-
return "one";
|
|
31
|
-
}
|
|
32
|
-
var sourceFile = join(process.cwd(), "index.js");
|
|
33
|
-
var resolved = (await resolver(moduleName, sourceFile)) || (await resolverWithPlugins(moduleName, importer));
|
|
34
|
-
if (!resolved) {
|
|
35
|
-
return "one";
|
|
36
|
-
}
|
|
37
|
-
if (!resolved) {
|
|
38
|
-
throw new Error(` \u274C Path not found ${sourceFile} (rootPath ${rootPath}, importer ${importer}, moduleName ${moduleName})`);
|
|
39
|
-
}
|
|
40
|
-
var real = await FSExtra.realpath(resolved);
|
|
41
|
-
var id = real;
|
|
42
|
-
if (normalizePath(id).endsWith(`/react/jsx-dev-runtime.js`)) {
|
|
43
|
-
id = "react/jsx-runtime";
|
|
44
|
-
}
|
|
45
|
-
return id;
|
|
46
|
-
}
|
|
47
|
-
export { getVitePath };
|
|
48
|
-
//# sourceMappingURL=getVitePath.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["dirname","join","FSExtra","normalizePath","getVitePath","rootPath","importer","moduleName","resolver","resolverWithPlugins","absolute","arguments","length","includes","rootAt","indexOf","base","slice","sourceFile","process","cwd","resolved","Error","real","realpath","id","endsWith"],"sources":["../../src/utils/getVitePath.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,OAAA,EAASC,IAAA,QAAY;AAE9B,OAAOC,OAAA,MAAa;AACpB,SAASC,aAAA,QAAqB;AAE9B,eAAsBC,YACpBC,QAAA,EACAC,QAAA,EACAC,UAAA,EACAC,QAAA,EACAC,mBAAA,EAIA;EAGA,IAAIC,QAAA,GAAAC,SAAe,CAAAC,MAAA,IAAgB,IAAAD,SAAA,iBAAAA,SAAA;EACjC,IAAAJ,UAAO;IACT;EACA;EACE,IAAAA,UAAO;IACT;EACA;EACE,IAAAA,UAAO;IACT;EACA;EACE,IAAAA,UAAO;IACT;EACA;EACE,IAAAA,UAAO,CAAAM,QAAA;IACT;EAEA;EACE,IAAAN,UAAM,GAAS,UAAS;IACxB,IAAAO,MAAM,GAAOR,QAAK,CAAAS,OAAQ,CAAAV,QAAS;IACnC,IAAAW,IAAO,GAAAf,IAAO,CAAAD,OAAA,CAAAM,QAAA,CAAAW,KAAA,CAAAH,MAAA,IAAAP,UAAA;IAChB,OAAAS,IAAA;EACA;EAEE,IAAAT,UAAO;IACT;EACA;EAEE,IAAAA,UAAO;IACT;EAEA;EACA,IAAAW,UAAM,GACHjB,IAAA,CAAAkB,OAAM,CAAAC,GAAS,cAAY;EACrB,IACLC,QAAA,UAAAb,QAAA,CAAAD,UAAA,EAAAW,UAAA,aAAAT,mBAAA,CAAAF,UAAA,EAAAD,QAAA;EAAA,IACA,CAAAe,QAAA;IAAA;EACF;EAGF,IAAI,CAACA,QAAA,EAAU;IACb,UAAOC,KAAA,2BAAAJ,UAAA,cAAAb,QAAA,cAAAC,QAAA,gBAAAC,UAAA;EACT;EAGA,IAAIgB,IAAC,SAAUrB,OAAA,CAAAsB,QAAA,CAAAH,QAAA;EACb,IAAAI,EAAA,GAAMF,IAAI;EAAA,IACRpB,aAAA,CAAAsB,EAAA,EAAAC,QAAqB,4BAAwB;IAC/CD,EAAA;EACF;EAEA,OAAMA,EAAA;AAEN;AAOA,SACErB,WAAK","ignoreList":[]}
|
package/dist/utils/globDir.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Glob from "fast-glob";
|
|
2
|
-
function globDir(cwd, glob = "**/*.@(ts|tsx|js|jsx)") {
|
|
3
|
-
return Glob.sync(glob, {
|
|
4
|
-
cwd,
|
|
5
|
-
// fast-glob does not skip node_modules on its own, and a dependency's files
|
|
6
|
-
// are never this directory's own content. Without this, a dep patch keyed
|
|
7
|
-
// `**/*.js` reaches into the package's nested node_modules and rewrites a
|
|
8
|
-
// package it was never meant to touch: patching react-native-reanimated
|
|
9
|
-
// re-printed all 49 files of its nested semver@7.8.5, leaving that copy
|
|
10
|
-
// different from the 46 others installed elsewhere in the same tree.
|
|
11
|
-
ignore: ["**/node_modules/**"]
|
|
12
|
-
}).map(p => "./" + normalizePaths(p));
|
|
13
|
-
}
|
|
14
|
-
function normalizePaths(p) {
|
|
15
|
-
return p.replace(/\\/g, "/");
|
|
16
|
-
}
|
|
17
|
-
export { globDir };
|
|
18
|
-
//# sourceMappingURL=globDir.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Glob","globDir","cwd","glob","sync","ignore","map","p","normalizePaths","replace"],"sources":["../../src/utils/globDir.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,IAAA,MAAU;AAGV,SAASC,QAAQC,GAAA,EAAaC,IAAA,GAAO,yBAAyB;EACnE,OAAOH,IAAA,CAAKI,IAAA,CAAKD,IAAA,EAAM;IACrBD,GAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAOAG,MAAA,EAAQ,CAAC,oBAAoB;EAC/B,CAAC,EAAEC,GAAA,CAAKC,CAAA,IAAM,OAAOC,cAAA,CAAeD,CAAC,CAAC;AACxC;AAEA,SAASC,eAAeD,CAAA,EAAW;EACjC,OAAOA,CAAA,CAAEE,OAAA,CAAQ,OAAO,GAAG;AAC7B","ignoreList":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Glob from "fast-glob";
|
|
2
|
-
function globDir(cwd) {
|
|
3
|
-
var glob = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "**/*.@(ts|tsx|js|jsx)";
|
|
4
|
-
return Glob.sync(glob, {
|
|
5
|
-
cwd,
|
|
6
|
-
// fast-glob does not skip node_modules on its own, and a dependency's files
|
|
7
|
-
// are never this directory's own content. Without this, a dep patch keyed
|
|
8
|
-
// `**/*.js` reaches into the package's nested node_modules and rewrites a
|
|
9
|
-
// package it was never meant to touch: patching react-native-reanimated
|
|
10
|
-
// re-printed all 49 files of its nested semver@7.8.5, leaving that copy
|
|
11
|
-
// different from the 46 others installed elsewhere in the same tree.
|
|
12
|
-
ignore: ["**/node_modules/**"]
|
|
13
|
-
}).map(function (p) {
|
|
14
|
-
return "./" + normalizePaths(p);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function normalizePaths(p) {
|
|
18
|
-
return p.replace(/\\/g, "/");
|
|
19
|
-
}
|
|
20
|
-
export { globDir };
|
|
21
|
-
//# sourceMappingURL=globDir.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Glob","globDir","cwd","glob","arguments","length","sync","ignore","map","p","normalizePaths"],"sources":["../../src/utils/globDir.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,IAAA,MAAU;AAGV,SAASC,QAAQC,GAAA,EAAa;EACnC,IAAAC,IAAO,GAAAC,SAAU,CAAAC,MAAM,QAAAD,SAAA,iBAAAA,SAAA;EAAA,OACrBJ,IAAA,CAAAM,IAAA,CAAAH,IAAA;IAAAD,GAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAOA;IACDK,MAAO,GACV;EAGE,GAAAC,GAAA,CAAO,UAAEC,CAAQ;IACnB,cAAAC,cAAA,CAAAD,CAAA","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
const malformedImages = [{
|
|
4
|
-
name: "icns",
|
|
5
|
-
bytes: [105, 99, 110, 115, 0, 0, 0, 16, 105, 115, 51, 50, 0, 0, 0, 0],
|
|
6
|
-
error: "Invalid ICNS, invalid entry length"
|
|
7
|
-
}, {
|
|
8
|
-
name: "jxl",
|
|
9
|
-
bytes: [0, 0, 0, 12, 74, 88, 76, 32, 13, 10, 135, 10, 0, 0, 0, 12, 102, 116, 121, 112, 106, 120, 108, 32, 0, 0, 0, 0, 106, 120, 108, 112],
|
|
10
|
-
error: "No codestream found in JXL container"
|
|
11
|
-
}, {
|
|
12
|
-
name: "heif",
|
|
13
|
-
bytes: [0, 0, 0, 16, 102, 116, 121, 112, 97, 118, 105, 102, 0, 0, 0, 0, 0, 0, 0, 36, 109, 101, 116, 97, 0, 0, 0, 0, 0, 0, 0, 8, 105, 112, 114, 112, 0, 0, 0, 20, 105, 112, 99, 111, 0, 0, 0, 0, 105, 115, 112, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
14
|
-
error: "Invalid HEIF, no size found"
|
|
15
|
-
}];
|
|
16
|
-
describe("image-size malformed container handling", () => {
|
|
17
|
-
it.each(malformedImages)("rejects malformed $name data", ({
|
|
18
|
-
bytes,
|
|
19
|
-
error
|
|
20
|
-
}) => {
|
|
21
|
-
const result = spawnSync(process.execPath, ["-e", `const { imageSize } = require('image-size'); try { imageSize(Uint8Array.from(${JSON.stringify(bytes)})); process.exit(2) } catch (error) { process.exit(error instanceof Error && error.message === ${JSON.stringify(error)} ? 0 : 3) }`], {
|
|
22
|
-
timeout: 1e3
|
|
23
|
-
});
|
|
24
|
-
expect(result.error).toBeUndefined();
|
|
25
|
-
expect(result.signal).toBeNull();
|
|
26
|
-
expect(result.status).toBe(0);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=imageSizePatch.test.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["spawnSync","describe","expect","it","malformedImages","name","bytes","error","each","result","process","execPath","JSON","stringify","timeout","toBeUndefined","signal","toBeNull","status","toBe"],"sources":["../../src/utils/imageSizePatch.test.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,QAAiB;AAC1B,SAASC,QAAA,EAAUC,MAAA,EAAQC,EAAA,QAAU;AAErC,MAAMC,eAAA,GAAkB,CACtB;EACEC,IAAA,EAAM;EACNC,KAAA,EAAO,CAAC,KAAM,IAAM,KAAM,KAAM,GAAG,GAAG,GAAG,IAAI,KAAM,KAAM,IAAM,IAAM,GAAG,GAAG,GAAG,CAAC;EAC/EC,KAAA,EAAO;AACT,GACA;EACEF,IAAA,EAAM;EACNC,KAAA,EAAO,CACL,GAAG,GAAG,GAAG,IAAI,IAAM,IAAM,IAAM,IAAM,IAAM,IAAM,KAAM,IAAM,GAAG,GAAG,GAAG,IAAI,KAC1E,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,IAAM,GAAG,GAAG,GAAG,GAAG,KAAM,KAAM,KAAM,IAC1E;EACAC,KAAA,EAAO;AACT,GACA;EACEF,IAAA,EAAM;EACNC,KAAA,EAAO,CACL,GAAG,GAAG,GAAG,IAAI,KAAM,KAAM,KAAM,KAAM,IAAM,KAAM,KAAM,KAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAC/E,IAAI,KAAM,KAAM,KAAM,IAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,KAAM,KAAM,KAAM,KAAM,GAAG,GAAG,GAClF,IAAI,KAAM,KAAM,IAAM,KAAM,GAAG,GAAG,GAAG,GAAG,KAAM,KAAM,KAAM,KAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAClF,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAC1B;EACAC,KAAA,EAAO;AACT,EACF;AAEAN,QAAA,CAAS,2CAA2C,MAAM;EACxDE,EAAA,CAAGK,IAAA,CAAKJ,eAAe,EAAE,gCAAgC,CAAC;IAAEE,KAAA;IAAOC;EAAM,MAAM;IAC7E,MAAME,MAAA,GAAST,SAAA,CACbU,OAAA,CAAQC,QAAA,EACR,CACE,MACA,gFAAgFC,IAAA,CAAKC,SAAA,CAAUP,KAAK,CAAC,kGAAkGM,IAAA,CAAKC,SAAA,CAAUN,KAAK,CAAC,cAC9N,EACA;MAAEO,OAAA,EAAS;IAAM,CACnB;IAEAZ,MAAA,CAAOO,MAAA,CAAOF,KAAK,EAAEQ,aAAA,CAAc;IACnCb,MAAA,CAAOO,MAAA,CAAOO,MAAM,EAAEC,QAAA,CAAS;IAC/Bf,MAAA,CAAOO,MAAA,CAAOS,MAAM,EAAEC,IAAA,CAAK,CAAC;EAC9B,CAAC;AACH,CAAC","ignoreList":[]}
|