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,441 +0,0 @@
|
|
|
1
|
-
import { enqueueUpdate, isReactRefreshBoundary } from "./react-refresh-utils.native.js";
|
|
2
|
-
function _assert_this_initialized(self) {
|
|
3
|
-
if (self === void 0) {
|
|
4
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5
|
-
}
|
|
6
|
-
return self;
|
|
7
|
-
}
|
|
8
|
-
function _call_super(_this, derived, args) {
|
|
9
|
-
derived = _get_prototype_of(derived);
|
|
10
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
11
|
-
}
|
|
12
|
-
function _class_call_check(instance, Constructor) {
|
|
13
|
-
if (!(instance instanceof Constructor)) {
|
|
14
|
-
throw new TypeError("Cannot call a class as a function");
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function _defineProperties(target, props) {
|
|
18
|
-
for (var i = 0; i < props.length; i++) {
|
|
19
|
-
var descriptor = props[i];
|
|
20
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
21
|
-
descriptor.configurable = true;
|
|
22
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
23
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
27
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
28
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
29
|
-
return Constructor;
|
|
30
|
-
}
|
|
31
|
-
function _define_property(obj, key, value) {
|
|
32
|
-
if (key in obj) {
|
|
33
|
-
Object.defineProperty(obj, key, {
|
|
34
|
-
value,
|
|
35
|
-
enumerable: true,
|
|
36
|
-
configurable: true,
|
|
37
|
-
writable: true
|
|
38
|
-
});
|
|
39
|
-
} else {
|
|
40
|
-
obj[key] = value;
|
|
41
|
-
}
|
|
42
|
-
return obj;
|
|
43
|
-
}
|
|
44
|
-
function _get_prototype_of(o) {
|
|
45
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
46
|
-
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
47
|
-
};
|
|
48
|
-
return _get_prototype_of(o);
|
|
49
|
-
}
|
|
50
|
-
function _inherits(subClass, superClass) {
|
|
51
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
52
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
53
|
-
}
|
|
54
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
55
|
-
constructor: {
|
|
56
|
-
value: subClass,
|
|
57
|
-
writable: true,
|
|
58
|
-
configurable: true
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
62
|
-
}
|
|
63
|
-
function _possible_constructor_return(self, call) {
|
|
64
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
65
|
-
return call;
|
|
66
|
-
}
|
|
67
|
-
return _assert_this_initialized(self);
|
|
68
|
-
}
|
|
69
|
-
function _set_prototype_of(o, p) {
|
|
70
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
71
|
-
o2.__proto__ = p2;
|
|
72
|
-
return o2;
|
|
73
|
-
};
|
|
74
|
-
return _set_prototype_of(o, p);
|
|
75
|
-
}
|
|
76
|
-
function _type_of(obj) {
|
|
77
|
-
"@swc/helpers - typeof";
|
|
78
|
-
|
|
79
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
80
|
-
}
|
|
81
|
-
function _is_native_reflect_construct() {
|
|
82
|
-
try {
|
|
83
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
84
|
-
} catch (_) {}
|
|
85
|
-
return (_is_native_reflect_construct = function () {
|
|
86
|
-
return !!result;
|
|
87
|
-
})();
|
|
88
|
-
}
|
|
89
|
-
var BaseDevRuntime = DevRuntime;
|
|
90
|
-
var SimpleEmitter = /* @__PURE__ */function () {
|
|
91
|
-
"use strict";
|
|
92
|
-
|
|
93
|
-
function SimpleEmitter1() {
|
|
94
|
-
_class_call_check(this, SimpleEmitter1);
|
|
95
|
-
_define_property(this, "listeners", /* @__PURE__ */new Map());
|
|
96
|
-
}
|
|
97
|
-
_create_class(SimpleEmitter1, [{
|
|
98
|
-
key: "on",
|
|
99
|
-
value: function on(event, fn) {
|
|
100
|
-
if (!this.listeners.has(event)) this.listeners.set(event, /* @__PURE__ */new Set());
|
|
101
|
-
this.listeners.get(event).add(fn);
|
|
102
|
-
}
|
|
103
|
-
}, {
|
|
104
|
-
key: "off",
|
|
105
|
-
value: function off(event, fn) {
|
|
106
|
-
var _this_listeners_get;
|
|
107
|
-
(_this_listeners_get = this.listeners.get(event)) === null || _this_listeners_get === void 0 ? void 0 : _this_listeners_get.delete(fn);
|
|
108
|
-
}
|
|
109
|
-
}, {
|
|
110
|
-
key: "emit",
|
|
111
|
-
value: function emit(event, payload) {
|
|
112
|
-
var _this_listeners_get;
|
|
113
|
-
(_this_listeners_get = this.listeners.get(event)) === null || _this_listeners_get === void 0 ? void 0 : _this_listeners_get.forEach(function (fn) {
|
|
114
|
-
return fn(payload);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}]);
|
|
118
|
-
return SimpleEmitter1;
|
|
119
|
-
}();
|
|
120
|
-
var ModuleHotContext = /* @__PURE__ */function () {
|
|
121
|
-
"use strict";
|
|
122
|
-
|
|
123
|
-
function ModuleHotContext1(moduleId, socketHolder) {
|
|
124
|
-
_class_call_check(this, ModuleHotContext1);
|
|
125
|
-
_define_property(this, "moduleId", void 0);
|
|
126
|
-
_define_property(this, "socketHolder", void 0);
|
|
127
|
-
_define_property(this, "removeListeners", void 0);
|
|
128
|
-
_define_property(this, "acceptCallbacks", void 0);
|
|
129
|
-
this.moduleId = moduleId;
|
|
130
|
-
this.socketHolder = socketHolder;
|
|
131
|
-
this.removeListeners = [];
|
|
132
|
-
this.acceptCallbacks = [];
|
|
133
|
-
}
|
|
134
|
-
_create_class(ModuleHotContext1, [{
|
|
135
|
-
key: "refresh",
|
|
136
|
-
get: function get() {
|
|
137
|
-
return globalThis.__ReactRefresh;
|
|
138
|
-
}
|
|
139
|
-
}, {
|
|
140
|
-
key: "refreshUtils",
|
|
141
|
-
get: function get() {
|
|
142
|
-
return {
|
|
143
|
-
isReactRefreshBoundary,
|
|
144
|
-
enqueueUpdate
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
}, {
|
|
148
|
-
key: "accept",
|
|
149
|
-
value: function accept() {
|
|
150
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
151
|
-
args[_key] = arguments[_key];
|
|
152
|
-
}
|
|
153
|
-
if (args.length === 1) {
|
|
154
|
-
this.acceptCallbacks.push({
|
|
155
|
-
deps: [this.moduleId],
|
|
156
|
-
fn: args[0]
|
|
157
|
-
});
|
|
158
|
-
} else if (args.length === 0) {} else {
|
|
159
|
-
throw new Error("Invalid arguments for `import.meta.hot.accept`");
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}, {
|
|
163
|
-
key: "invalidate",
|
|
164
|
-
value: function invalidate() {
|
|
165
|
-
this.socketHolder.send(JSON.stringify({
|
|
166
|
-
type: "hmr:invalidate",
|
|
167
|
-
moduleId: this.moduleId
|
|
168
|
-
}));
|
|
169
|
-
}
|
|
170
|
-
}, {
|
|
171
|
-
key: "on",
|
|
172
|
-
value: function on(event, listener) {
|
|
173
|
-
var _this = this;
|
|
174
|
-
this.socketHolder.on(event, listener);
|
|
175
|
-
this.removeListeners.push(function () {
|
|
176
|
-
return _this.socketHolder.off(event, listener);
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
}, {
|
|
180
|
-
key: "off",
|
|
181
|
-
value: function off(event, listener) {
|
|
182
|
-
this.socketHolder.off(event, listener);
|
|
183
|
-
}
|
|
184
|
-
}, {
|
|
185
|
-
key: "send",
|
|
186
|
-
value: function send(type, payload) {
|
|
187
|
-
this.socketHolder.send(JSON.stringify({
|
|
188
|
-
type,
|
|
189
|
-
payload
|
|
190
|
-
}));
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "cleanup",
|
|
194
|
-
value: function cleanup() {
|
|
195
|
-
var _iteratorNormalCompletion = true,
|
|
196
|
-
_didIteratorError = false,
|
|
197
|
-
_iteratorError = void 0;
|
|
198
|
-
try {
|
|
199
|
-
for (var _iterator = this.removeListeners[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
200
|
-
var removeListener = _step.value;
|
|
201
|
-
removeListener();
|
|
202
|
-
}
|
|
203
|
-
} catch (err) {
|
|
204
|
-
_didIteratorError = true;
|
|
205
|
-
_iteratorError = err;
|
|
206
|
-
} finally {
|
|
207
|
-
try {
|
|
208
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
209
|
-
_iterator.return();
|
|
210
|
-
}
|
|
211
|
-
} finally {
|
|
212
|
-
if (_didIteratorError) {
|
|
213
|
-
throw _iteratorError;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
this.removeListeners.length = 0;
|
|
218
|
-
}
|
|
219
|
-
}]);
|
|
220
|
-
return ModuleHotContext1;
|
|
221
|
-
}();
|
|
222
|
-
var SocketHolder = /* @__PURE__ */function () {
|
|
223
|
-
"use strict";
|
|
224
|
-
|
|
225
|
-
function SocketHolder1() {
|
|
226
|
-
_class_call_check(this, SocketHolder1);
|
|
227
|
-
_define_property(this, "queuedMessages", []);
|
|
228
|
-
_define_property(this, "emitter", new SimpleEmitter());
|
|
229
|
-
_define_property(this, "_socket", null);
|
|
230
|
-
_define_property(this, "_origin", null);
|
|
231
|
-
}
|
|
232
|
-
_create_class(SocketHolder1, [{
|
|
233
|
-
key: "socket",
|
|
234
|
-
get: function get() {
|
|
235
|
-
return this._socket;
|
|
236
|
-
}
|
|
237
|
-
}, {
|
|
238
|
-
key: "origin",
|
|
239
|
-
get: function get() {
|
|
240
|
-
return this._origin;
|
|
241
|
-
}
|
|
242
|
-
}, {
|
|
243
|
-
key: "setup",
|
|
244
|
-
value: function setup(socket, origin) {
|
|
245
|
-
var _this = this;
|
|
246
|
-
this._socket = socket;
|
|
247
|
-
this._origin = origin;
|
|
248
|
-
if (socket.readyState !== WebSocket.OPEN) {
|
|
249
|
-
socket.addEventListener("open", function () {
|
|
250
|
-
return _this.flushQueuedMessages();
|
|
251
|
-
}, {
|
|
252
|
-
once: true
|
|
253
|
-
});
|
|
254
|
-
} else {
|
|
255
|
-
this.flushQueuedMessages();
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}, {
|
|
259
|
-
key: "on",
|
|
260
|
-
value: function on(event, listener) {
|
|
261
|
-
this.emitter.on(event, listener);
|
|
262
|
-
}
|
|
263
|
-
}, {
|
|
264
|
-
key: "off",
|
|
265
|
-
value: function off(event, listener) {
|
|
266
|
-
this.emitter.off(event, listener);
|
|
267
|
-
}
|
|
268
|
-
}, {
|
|
269
|
-
key: "emit",
|
|
270
|
-
value: function emit(event, payload) {
|
|
271
|
-
this.emitter.emit(event, payload);
|
|
272
|
-
}
|
|
273
|
-
}, {
|
|
274
|
-
key: "send",
|
|
275
|
-
value: function send(message) {
|
|
276
|
-
if (this._socket == null || this._socket.readyState !== WebSocket.OPEN) {
|
|
277
|
-
this.queuedMessages.push(message);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
this.flushQueuedMessages();
|
|
281
|
-
this._socket.send(message);
|
|
282
|
-
}
|
|
283
|
-
}, {
|
|
284
|
-
key: "flushQueuedMessages",
|
|
285
|
-
value: function flushQueuedMessages() {
|
|
286
|
-
if (this._socket == null) return;
|
|
287
|
-
var _iteratorNormalCompletion = true,
|
|
288
|
-
_didIteratorError = false,
|
|
289
|
-
_iteratorError = void 0;
|
|
290
|
-
try {
|
|
291
|
-
for (var _iterator = this.queuedMessages[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
292
|
-
var message = _step.value;
|
|
293
|
-
this._socket.send(message);
|
|
294
|
-
}
|
|
295
|
-
} catch (err) {
|
|
296
|
-
_didIteratorError = true;
|
|
297
|
-
_iteratorError = err;
|
|
298
|
-
} finally {
|
|
299
|
-
try {
|
|
300
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
301
|
-
_iterator.return();
|
|
302
|
-
}
|
|
303
|
-
} finally {
|
|
304
|
-
if (_didIteratorError) {
|
|
305
|
-
throw _iteratorError;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
this.queuedMessages.length = 0;
|
|
310
|
-
}
|
|
311
|
-
}, {
|
|
312
|
-
key: "close",
|
|
313
|
-
value: function close() {
|
|
314
|
-
var _this__socket;
|
|
315
|
-
(_this__socket = this._socket) === null || _this__socket === void 0 ? void 0 : _this__socket.close();
|
|
316
|
-
}
|
|
317
|
-
}]);
|
|
318
|
-
return SocketHolder1;
|
|
319
|
-
}();
|
|
320
|
-
var ReactNativeDevRuntime = /* @__PURE__ */function (BaseDevRuntime1) {
|
|
321
|
-
"use strict";
|
|
322
|
-
|
|
323
|
-
_inherits(ReactNativeDevRuntime1, BaseDevRuntime1);
|
|
324
|
-
function ReactNativeDevRuntime1() {
|
|
325
|
-
_class_call_check(this, ReactNativeDevRuntime1);
|
|
326
|
-
var _this;
|
|
327
|
-
var socketHolder = new SocketHolder();
|
|
328
|
-
var messenger = {
|
|
329
|
-
send: function (message) {
|
|
330
|
-
return socketHolder.send(JSON.stringify(message));
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
var clientId = `rn-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
334
|
-
_this = _call_super(this, ReactNativeDevRuntime1, [messenger, clientId]), _define_property(_this, "socketHolder", void 0), _define_property(_this, "moduleHotContexts", /* @__PURE__ */new Map()), _define_property(_this, "moduleHotContextsToBeUpdated", /* @__PURE__ */new Map());
|
|
335
|
-
_this.socketHolder = socketHolder;
|
|
336
|
-
return _this;
|
|
337
|
-
}
|
|
338
|
-
_create_class(ReactNativeDevRuntime1, [{
|
|
339
|
-
key: "createModuleHotContext",
|
|
340
|
-
value: function createModuleHotContext(moduleId) {
|
|
341
|
-
var hotContext = new ModuleHotContext(moduleId, this.socketHolder);
|
|
342
|
-
if (this.moduleHotContexts.has(moduleId)) {
|
|
343
|
-
this.moduleHotContextsToBeUpdated.set(moduleId, hotContext);
|
|
344
|
-
} else {
|
|
345
|
-
this.moduleHotContexts.set(moduleId, hotContext);
|
|
346
|
-
}
|
|
347
|
-
return hotContext;
|
|
348
|
-
}
|
|
349
|
-
}, {
|
|
350
|
-
key: "applyUpdates",
|
|
351
|
-
value: function applyUpdates(boundaries) {
|
|
352
|
-
var _this = this;
|
|
353
|
-
var _iteratorNormalCompletion = true,
|
|
354
|
-
_didIteratorError = false,
|
|
355
|
-
_iteratorError = void 0;
|
|
356
|
-
try {
|
|
357
|
-
var _this1,
|
|
358
|
-
_loop = function () {
|
|
359
|
-
var [moduleId] = _step.value;
|
|
360
|
-
var hotContext = _this1.moduleHotContexts.get(moduleId);
|
|
361
|
-
if (hotContext) {
|
|
362
|
-
hotContext.acceptCallbacks.filter(function (cb) {
|
|
363
|
-
cb.fn(_this.modules[moduleId].exports);
|
|
364
|
-
});
|
|
365
|
-
hotContext.cleanup();
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
for (var _iterator = boundaries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _this1 = this, _loop();
|
|
369
|
-
} catch (err) {
|
|
370
|
-
_didIteratorError = true;
|
|
371
|
-
_iteratorError = err;
|
|
372
|
-
} finally {
|
|
373
|
-
try {
|
|
374
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
375
|
-
_iterator.return();
|
|
376
|
-
}
|
|
377
|
-
} finally {
|
|
378
|
-
if (_didIteratorError) {
|
|
379
|
-
throw _iteratorError;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
this.moduleHotContextsToBeUpdated.forEach(function (hotContext, moduleId) {
|
|
384
|
-
_this.moduleHotContexts.set(moduleId, hotContext);
|
|
385
|
-
});
|
|
386
|
-
this.moduleHotContextsToBeUpdated.clear();
|
|
387
|
-
}
|
|
388
|
-
}, {
|
|
389
|
-
key: "setup",
|
|
390
|
-
value: function setup(socket, origin) {
|
|
391
|
-
var _this = this;
|
|
392
|
-
if (this.socketHolder.socket != null) {
|
|
393
|
-
console.warn("[vxrn HMR]: runtime already setup");
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
this.socketHolder.setup(socket, origin);
|
|
397
|
-
socket.addEventListener("message", function (event) {
|
|
398
|
-
var message = JSON.parse(event.data);
|
|
399
|
-
if (isCustomHMRMessage(message)) {
|
|
400
|
-
var _globalThis___VXRN_CUSTOM_HMR_HANDLER__, _globalThis;
|
|
401
|
-
_this.socketHolder.emit(message.type, message.payload);
|
|
402
|
-
(_globalThis___VXRN_CUSTOM_HMR_HANDLER__ = (_globalThis = globalThis).__VXRN_CUSTOM_HMR_HANDLER__) === null || _globalThis___VXRN_CUSTOM_HMR_HANDLER__ === void 0 ? void 0 : _globalThis___VXRN_CUSTOM_HMR_HANDLER__.call(_globalThis, socket, message);
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
switch (message.type) {
|
|
406
|
-
case "hmr:update":
|
|
407
|
-
_this.evaluate(message.code);
|
|
408
|
-
break;
|
|
409
|
-
case "hmr:reload":
|
|
410
|
-
_this.reload();
|
|
411
|
-
break;
|
|
412
|
-
}
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
}, {
|
|
416
|
-
key: "evaluate",
|
|
417
|
-
value: function evaluate(code, sourceURL) {
|
|
418
|
-
if (globalThis.globalEvalWithSourceUrl) {
|
|
419
|
-
globalThis.globalEvalWithSourceUrl(code, sourceURL);
|
|
420
|
-
} else {
|
|
421
|
-
eval(code);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}, {
|
|
425
|
-
key: "reload",
|
|
426
|
-
value: function reload() {
|
|
427
|
-
var moduleName = "DevSettings";
|
|
428
|
-
(globalThis.__turboModuleProxy ? globalThis.__turboModuleProxy(moduleName) : globalThis.nativeModuleProxy[moduleName]).reload();
|
|
429
|
-
}
|
|
430
|
-
}]);
|
|
431
|
-
return ReactNativeDevRuntime1;
|
|
432
|
-
}(BaseDevRuntime);
|
|
433
|
-
function isCustomHMRMessage(message) {
|
|
434
|
-
if ((typeof message === "undefined" ? "undefined" : _type_of(message)) !== "object" || message == null) return false;
|
|
435
|
-
if ("type" in message && typeof message.type === "string" && message.type.startsWith("hmr:")) {
|
|
436
|
-
return false;
|
|
437
|
-
}
|
|
438
|
-
return true;
|
|
439
|
-
}
|
|
440
|
-
globalThis.__rolldown_runtime__ = new ReactNativeDevRuntime();
|
|
441
|
-
//# sourceMappingURL=hmr-runtime.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["enqueueUpdate","isReactRefreshBoundary","_assert_this_initialized","self","ReferenceError","_call_super","_this","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","Reflect","construct","constructor","apply","_class_call_check","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_create_class","protoProps","staticProps","prototype","_define_property","obj","value","o","setPrototypeOf","getPrototypeOf","o2","__proto__","_inherits","subClass","superClass","create","_set_prototype_of","call","_type_of","p","p2","Symbol","result","Boolean","valueOf","_","BaseDevRuntime","DevRuntime","SimpleEmitter","SimpleEmitter1","Map","on","event","fn","listeners","has","set","Set","get","add","off","_this_listeners_get","delete","emit","payload","forEach","ModuleHotContext","ModuleHotContext1","moduleId","socketHolder","removeListeners","acceptCallbacks","globalThis","__ReactRefresh","accept","_len","arguments","Array","_key","push","deps","Error","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B,MAAA,SACH,OAAK;QACL,UAAAqE,KAAA;MACJ;IACD;EACH,GAEQ;IACN9D,GAAI,cAAW;IACbO,KAAA,WAAWwD,WAAA;MACb,IAAO,CAAAb,YAAA,CAAAc,IAAA,CAAAC,IAAA,CAAAC,SAAA;QACLC,IAAK,EAAI;QACXlB,QAAA,OAAAA;MACF;IAEQ;EACN,GACC;IAIHjD,GAAA;IACFO,KAAA,WAAAyB,GAAAC,KAAA,EAAAmC,QAAA;MAEA,IAAS7F,KAAA;MACH,KAAO2E,YAAY,CAAAlB,EAAA,CAAAC,KAAA,EAAAmC,QAAY;MAEjC,KAAAjB,eACA,CAAAS,IAAA,CAAO,YAAQ;QAGf,OAAOrF,KAAA,CAAA2E,YAAA,CAAAT,GAAA,CAAAR,KAAA,EAAAmC,QAAA;MACT;IACA;EACF,GAEA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
function getNativePrelude(options) {
|
|
2
|
-
return `
|
|
3
|
-
var __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();
|
|
4
|
-
|
|
5
|
-
var global = typeof globalThis !== 'undefined' ? globalThis
|
|
6
|
-
: typeof global !== 'undefined' ? global
|
|
7
|
-
: typeof window !== 'undefined' ? window
|
|
8
|
-
: this;
|
|
9
|
-
|
|
10
|
-
globalThis.global = global;
|
|
11
|
-
globalThis.__DEV__ = ${options.dev};
|
|
12
|
-
|
|
13
|
-
// react native polyfills
|
|
14
|
-
global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;
|
|
15
|
-
global.Event = global.Event || function() { return this; };
|
|
16
|
-
global.dispatchEvent = global.dispatchEvent || function() {};
|
|
17
|
-
global.window = global.window || global;
|
|
18
|
-
global.self = global.self || global;
|
|
19
|
-
global.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };
|
|
20
|
-
global.performance = global.performance || { now: function() { return Date.now(); } };
|
|
21
|
-
|
|
22
|
-
// ErrorUtils - used by RN's error handling system
|
|
23
|
-
if (!global.ErrorUtils) {
|
|
24
|
-
var _handler = null;
|
|
25
|
-
global.ErrorUtils = {
|
|
26
|
-
setGlobalHandler: function(h) { _handler = h; },
|
|
27
|
-
getGlobalHandler: function() { return _handler; },
|
|
28
|
-
reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },
|
|
29
|
-
reportError: function(e) { if (_handler) _handler(e, false); },
|
|
30
|
-
applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (typeof process === 'undefined') {
|
|
35
|
-
globalThis.process = { env: {} };
|
|
36
|
-
}
|
|
37
|
-
process.env.NODE_ENV = ${JSON.stringify(options.dev ? "development" : "production")};
|
|
38
|
-
process.env.EXPO_OS = ${JSON.stringify(options.platform)};
|
|
39
|
-
process.env.TAMAGUI_TARGET = 'native';
|
|
40
|
-
${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : ""}
|
|
41
|
-
|
|
42
|
-
// polyfill setImmediate (used by react-native internals)
|
|
43
|
-
if (typeof globalThis.setImmediate === 'undefined') {
|
|
44
|
-
globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };
|
|
45
|
-
globalThis.clearImmediate = function(id) { clearTimeout(id); };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// polyfill URLSearchParams early (before whatwg-fetch checks for it)
|
|
49
|
-
// RN's polyfillGlobal sets this up later but some modules check at import time
|
|
50
|
-
if (typeof globalThis.URLSearchParams === 'undefined') {
|
|
51
|
-
// minimal URLSearchParams polyfill - will be overridden by RN's proper one
|
|
52
|
-
globalThis.URLSearchParams = function URLSearchParams(init) {
|
|
53
|
-
this._params = {};
|
|
54
|
-
if (typeof init === 'string') {
|
|
55
|
-
init.replace(/^\\?/, '').split('&').forEach(function(p) {
|
|
56
|
-
var kv = p.split('=');
|
|
57
|
-
if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');
|
|
58
|
-
}.bind(this));
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };
|
|
62
|
-
globalThis.URLSearchParams.prototype.toString = function() {
|
|
63
|
-
return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ensure console exists before any library prelude touches it in release bundles
|
|
68
|
-
globalThis.console = globalThis.console || {};
|
|
69
|
-
var console = globalThis.console;
|
|
70
|
-
console.log = console.log || function() {};
|
|
71
|
-
console.info = console.info || function() {};
|
|
72
|
-
console.warn = console.warn || function() {};
|
|
73
|
-
console.error = console.error || function() {};
|
|
74
|
-
console.debug = console.debug || function() {};
|
|
75
|
-
console.trace = console.trace || function() {};
|
|
76
|
-
|
|
77
|
-
// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash
|
|
78
|
-
console.assert = console.assert || function() {};
|
|
79
|
-
console.clear = console.clear || function() {};
|
|
80
|
-
console.dir = console.dir || function() {};
|
|
81
|
-
console.dirxml = console.dirxml || function() {};
|
|
82
|
-
console.profile = console.profile || function() {};
|
|
83
|
-
console.profileEnd = console.profileEnd || function() {};
|
|
84
|
-
console.table = console.table || function() {};
|
|
85
|
-
|
|
86
|
-
// react refresh stubs (overridden by react-refresh plugin in dev)
|
|
87
|
-
${options.dev ? `
|
|
88
|
-
var $RefreshReg$ = function() {};
|
|
89
|
-
var $RefreshSig$ = function() { return function(v) { return v; }; };
|
|
90
|
-
` : ""}
|
|
91
|
-
`.trim();
|
|
92
|
-
}
|
|
93
|
-
export { getNativePrelude };
|
|
94
|
-
//# sourceMappingURL=native-prelude.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getNativePrelude","options","dev","JSON","stringify","platform","serverUrl","trim"],"sources":["native-prelude.mjs"],"sourcesContent":["function getNativePrelude(options) {\n\treturn `\nvar __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();\n\nvar global = typeof globalThis !== 'undefined' ? globalThis\n : typeof global !== 'undefined' ? global\n : typeof window !== 'undefined' ? window\n : this;\n\nglobalThis.global = global;\nglobalThis.__DEV__ = ${options.dev};\n\n// react native polyfills\nglobal.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;\nglobal.Event = global.Event || function() { return this; };\nglobal.dispatchEvent = global.dispatchEvent || function() {};\nglobal.window = global.window || global;\nglobal.self = global.self || global;\nglobal.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };\nglobal.performance = global.performance || { now: function() { return Date.now(); } };\n\n// ErrorUtils - used by RN's error handling system\nif (!global.ErrorUtils) {\n var _handler = null;\n global.ErrorUtils = {\n setGlobalHandler: function(h) { _handler = h; },\n getGlobalHandler: function() { return _handler; },\n reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },\n reportError: function(e) { if (_handler) _handler(e, false); },\n applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },\n };\n}\n\nif (typeof process === 'undefined') {\n globalThis.process = { env: {} };\n}\nprocess.env.NODE_ENV = ${JSON.stringify(options.dev ? \"development\" : \"production\")};\nprocess.env.EXPO_OS = ${JSON.stringify(options.platform)};\nprocess.env.TAMAGUI_TARGET = 'native';\n${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : \"\"}\n\n// polyfill setImmediate (used by react-native internals)\nif (typeof globalThis.setImmediate === 'undefined') {\n globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };\n globalThis.clearImmediate = function(id) { clearTimeout(id); };\n}\n\n// polyfill URLSearchParams early (before whatwg-fetch checks for it)\n// RN's polyfillGlobal sets this up later but some modules check at import time\nif (typeof globalThis.URLSearchParams === 'undefined') {\n // minimal URLSearchParams polyfill - will be overridden by RN's proper one\n globalThis.URLSearchParams = function URLSearchParams(init) {\n this._params = {};\n if (typeof init === 'string') {\n init.replace(/^\\\\?/, '').split('&').forEach(function(p) {\n var kv = p.split('=');\n if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');\n }.bind(this));\n }\n };\n globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };\n globalThis.URLSearchParams.prototype.toString = function() {\n return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');\n };\n}\n\n// ensure console exists before any library prelude touches it in release bundles\nglobalThis.console = globalThis.console || {};\nvar console = globalThis.console;\nconsole.log = console.log || function() {};\nconsole.info = console.info || function() {};\nconsole.warn = console.warn || function() {};\nconsole.error = console.error || function() {};\nconsole.debug = console.debug || function() {};\nconsole.trace = console.trace || function() {};\n\n// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash\nconsole.assert = console.assert || function() {};\nconsole.clear = console.clear || function() {};\nconsole.dir = console.dir || function() {};\nconsole.dirxml = console.dirxml || function() {};\nconsole.profile = console.profile || function() {};\nconsole.profileEnd = console.profileEnd || function() {};\nconsole.table = console.table || function() {};\n\n// react refresh stubs (overridden by react-refresh plugin in dev)\n${options.dev ? `\nvar $RefreshReg$ = function() {};\nvar $RefreshSig$ = function() { return function(v) { return v; }; };\n` : \"\"}\n`.trim();\n}\n\nexport { getNativePrelude };"],"mappings":"AAAA,SAASA,gBAAgBA,CAACC,OAAO,EAAE;EAClC,OAAO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuBA,OAAO,CAACC,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyBC,IAAI,CAACC,SAAS,CAACH,OAAO,CAACC,GAAG,GAAG,aAAa,GAAG,YAAY,CAAC;AACnF,wBAAwBC,IAAI,CAACC,SAAS,CAACH,OAAO,CAACI,QAAQ,CAAC;AACxD;AACA,EAAEJ,OAAO,CAACK,SAAS,GAAG,gCAAgCH,IAAI,CAACC,SAAS,CAACH,OAAO,CAACK,SAAS,CAAC,GAAG,GAAG,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAEL,OAAO,CAACC,GAAG,GAAG;AAChB;AACA;AACA,CAAC,GAAG,EAAE;AACN,CAAC,CAACK,IAAI,CAAC,CAAC;AACR;AAEA,SAASP,gBAAgB","ignoreList":[]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
function getNativePrelude(options) {
|
|
2
|
-
return `
|
|
3
|
-
var __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();
|
|
4
|
-
|
|
5
|
-
var global = typeof globalThis !== 'undefined' ? globalThis
|
|
6
|
-
: typeof global !== 'undefined' ? global
|
|
7
|
-
: typeof window !== 'undefined' ? window
|
|
8
|
-
: this;
|
|
9
|
-
|
|
10
|
-
globalThis.global = global;
|
|
11
|
-
globalThis.__DEV__ = ${options.dev};
|
|
12
|
-
|
|
13
|
-
// react native polyfills
|
|
14
|
-
global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;
|
|
15
|
-
global.Event = global.Event || function() { return this; };
|
|
16
|
-
global.dispatchEvent = global.dispatchEvent || function() {};
|
|
17
|
-
global.window = global.window || global;
|
|
18
|
-
global.self = global.self || global;
|
|
19
|
-
global.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };
|
|
20
|
-
global.performance = global.performance || { now: function() { return Date.now(); } };
|
|
21
|
-
|
|
22
|
-
// ErrorUtils - used by RN's error handling system
|
|
23
|
-
if (!global.ErrorUtils) {
|
|
24
|
-
var _handler = null;
|
|
25
|
-
global.ErrorUtils = {
|
|
26
|
-
setGlobalHandler: function(h) { _handler = h; },
|
|
27
|
-
getGlobalHandler: function() { return _handler; },
|
|
28
|
-
reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },
|
|
29
|
-
reportError: function(e) { if (_handler) _handler(e, false); },
|
|
30
|
-
applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (typeof process === 'undefined') {
|
|
35
|
-
globalThis.process = { env: {} };
|
|
36
|
-
}
|
|
37
|
-
process.env.NODE_ENV = ${JSON.stringify(options.dev ? "development" : "production")};
|
|
38
|
-
process.env.EXPO_OS = ${JSON.stringify(options.platform)};
|
|
39
|
-
process.env.TAMAGUI_TARGET = 'native';
|
|
40
|
-
${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : ""}
|
|
41
|
-
|
|
42
|
-
// polyfill setImmediate (used by react-native internals)
|
|
43
|
-
if (typeof globalThis.setImmediate === 'undefined') {
|
|
44
|
-
globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };
|
|
45
|
-
globalThis.clearImmediate = function(id) { clearTimeout(id); };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// polyfill URLSearchParams early (before whatwg-fetch checks for it)
|
|
49
|
-
// RN's polyfillGlobal sets this up later but some modules check at import time
|
|
50
|
-
if (typeof globalThis.URLSearchParams === 'undefined') {
|
|
51
|
-
// minimal URLSearchParams polyfill - will be overridden by RN's proper one
|
|
52
|
-
globalThis.URLSearchParams = function URLSearchParams(init) {
|
|
53
|
-
this._params = {};
|
|
54
|
-
if (typeof init === 'string') {
|
|
55
|
-
init.replace(/^\\?/, '').split('&').forEach(function(p) {
|
|
56
|
-
var kv = p.split('=');
|
|
57
|
-
if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');
|
|
58
|
-
}.bind(this));
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };
|
|
62
|
-
globalThis.URLSearchParams.prototype.toString = function() {
|
|
63
|
-
return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ensure console exists before any library prelude touches it in release bundles
|
|
68
|
-
globalThis.console = globalThis.console || {};
|
|
69
|
-
var console = globalThis.console;
|
|
70
|
-
console.log = console.log || function() {};
|
|
71
|
-
console.info = console.info || function() {};
|
|
72
|
-
console.warn = console.warn || function() {};
|
|
73
|
-
console.error = console.error || function() {};
|
|
74
|
-
console.debug = console.debug || function() {};
|
|
75
|
-
console.trace = console.trace || function() {};
|
|
76
|
-
|
|
77
|
-
// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash
|
|
78
|
-
console.assert = console.assert || function() {};
|
|
79
|
-
console.clear = console.clear || function() {};
|
|
80
|
-
console.dir = console.dir || function() {};
|
|
81
|
-
console.dirxml = console.dirxml || function() {};
|
|
82
|
-
console.profile = console.profile || function() {};
|
|
83
|
-
console.profileEnd = console.profileEnd || function() {};
|
|
84
|
-
console.table = console.table || function() {};
|
|
85
|
-
|
|
86
|
-
// react refresh stubs (overridden by react-refresh plugin in dev)
|
|
87
|
-
${options.dev ? `
|
|
88
|
-
var $RefreshReg$ = function() {};
|
|
89
|
-
var $RefreshSig$ = function() { return function(v) { return v; }; };
|
|
90
|
-
` : ""}
|
|
91
|
-
`.trim();
|
|
92
|
-
}
|
|
93
|
-
export { getNativePrelude };
|
|
94
|
-
//# sourceMappingURL=native-prelude.native.js.map
|