peachsim 0.1.793 → 0.1.795

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.
Files changed (81) hide show
  1. package/cli/app-config.ts +3 -7
  2. package/dist-lib/agent-daemon-client.cjs +2 -2
  3. package/dist-lib/agent-events.cjs +2 -2
  4. package/dist-lib/agent-identity.cjs +2 -2
  5. package/dist-lib/agent-sessions.cjs +2 -2
  6. package/dist-lib/attached-projects.cjs +2 -2
  7. package/dist-lib/auth/shared-session.cjs +2 -2
  8. package/dist-lib/backend-origin.cjs +2 -2
  9. package/dist-lib/beta.cjs +2 -2
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +2 -2
  12. package/dist-lib/bridge-contract-input.cjs +2 -2
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +2 -2
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +9077 -0
  17. package/dist-lib/capture-contract.cjs +2 -2
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cli-constants.cjs +2 -2
  20. package/dist-lib/cloud-contract.cjs +2 -2
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +2 -2
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +2 -2
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +2 -2
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +2 -2
  29. package/dist-lib/expo-swift-bundle.cjs +8425 -0
  30. package/dist-lib/expo-swift-metadata.cjs +91 -0
  31. package/dist-lib/expo-swift-metadata.mjs +63 -0
  32. package/dist-lib/home-paths.cjs +2 -2
  33. package/dist-lib/host/bridge-host.cjs +244 -130
  34. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  38. package/dist-lib/host/websocket-proxy.cjs +2 -2
  39. package/dist-lib/index.cjs +110 -12
  40. package/dist-lib/jump-to-source-babel.cjs +2 -2
  41. package/dist-lib/jump-to-source-native.cjs +2 -2
  42. package/dist-lib/kotlin-host.cjs +2 -2
  43. package/dist-lib/menu.cjs +2 -2
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +2 -2
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +110 -12
  50. package/dist-lib/native-app-identity.cjs +2 -2
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +2 -2
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/plist.cjs +2 -2
  55. package/dist-lib/plist.mjs +1 -1
  56. package/dist-lib/profiles.cjs +2 -2
  57. package/dist-lib/public-brand.cjs +2 -2
  58. package/dist-lib/react-native-host-modules.cjs +2 -2
  59. package/dist-lib/react-native-host-modules.mjs +1 -1
  60. package/dist-lib/render-mode.cjs +2 -2
  61. package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
  62. package/dist-lib/sdk.cjs +2 -2
  63. package/dist-lib/sdk.mjs +1 -1
  64. package/dist-lib/skills.cjs +355 -165
  65. package/dist-lib/swift-compile.cjs +105 -5
  66. package/dist-lib/swift-compile.mjs +101 -2
  67. package/dist-lib/swift-package.cjs +2 -2
  68. package/dist-lib/swift-package.mjs +1 -1
  69. package/dist-lib/swift-submit.cjs +2 -2
  70. package/dist-lib/swift-submit.mjs +1 -1
  71. package/dist-lib/swift-toolchain.cjs +2 -2
  72. package/dist-lib/swift.cjs +2 -2
  73. package/dist-lib/vite-swift.cjs +64 -8
  74. package/dist-lib/vite.cjs +2 -2
  75. package/package.json +18 -2
  76. package/src/bundle-channel.mjs +251 -0
  77. package/src/expo-swift-bundle.ts +32 -0
  78. package/src/expo-swift-host.ts +161 -128
  79. package/src/expoSwiftContract.ts +88 -0
  80. package/src/swift-compile.ts +111 -1
  81. package/src/swift-host.ts +4 -1
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1971,6 +1971,22 @@ var require_plist = __commonJS({
1971
1971
  });
1972
1972
 
1973
1973
  // src/config.ts
1974
+ var config_exports = {};
1975
+ __export(config_exports, {
1976
+ PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
1977
+ PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
1978
+ applyPeachConfigToUrl: () => applyPeachConfigToUrl,
1979
+ collectConfiguredFileModules: () => collectConfiguredFileModules,
1980
+ createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
1981
+ defineConfig: () => defineConfig,
1982
+ detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
1983
+ hasPeachConfig: () => hasPeachConfig,
1984
+ isPeachConfig: () => isPeachConfig,
1985
+ mergePeachConfig: () => mergePeachConfig,
1986
+ readPeachBundleConfig: () => readPeachBundleConfig,
1987
+ readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
1988
+ readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
1989
+ });
1974
1990
  function collectConfiguredFileModules(config) {
1975
1991
  return [
1976
1992
  ...new Set(
@@ -1997,16 +2013,101 @@ function isPeachConfig(value) {
1997
2013
  "initialState"
1998
2014
  ].every((key) => value[key] === void 0 || isRecord(value[key]));
1999
2015
  }
2016
+ function readPeachBundleConfig(value) {
2017
+ if (value === void 0 || value === null) return null;
2018
+ if (!isRecord(value) || !isPeachConfig(value.config) || !Array.isArray(value.runtimePackages) || !value.runtimePackages.every((name2) => typeof name2 === "string")) {
2019
+ throw new Error("configured bundle metadata is malformed");
2020
+ }
2021
+ return { config: value.config, runtimePackages: [...value.runtimePackages] };
2022
+ }
2023
+ function readPeachBundleConfigFooter(source) {
2024
+ const start = source.lastIndexOf("\n" + BUNDLE_CONFIG_PREFIX);
2025
+ if (start < 0) return null;
2026
+ const end = source.indexOf("\n", start + 1);
2027
+ const line = source.slice(start + 1, end < 0 ? void 0 : end);
2028
+ if (!line.endsWith(";")) throw new Error("configured bundle footer is truncated");
2029
+ const result = readPeachBundleConfig(
2030
+ JSON.parse(line.slice(BUNDLE_CONFIG_PREFIX.length, -1))
2031
+ );
2032
+ if (!result) throw new Error("configured bundle footer is empty");
2033
+ return result;
2034
+ }
2000
2035
  function createPeachBundleConfigFooter(config) {
2001
2036
  const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
2002
2037
  return "\n" + BUNDLE_CONFIG_PREFIX + json + ";";
2003
2038
  }
2004
- var BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
2039
+ function detachPeachBundleConfigFooter(source) {
2040
+ const configuredBundle = readPeachBundleConfigFooter(source);
2041
+ if (!configuredBundle) return { source, configuredBundle };
2042
+ const start = source.lastIndexOf("\n" + BUNDLE_CONFIG_PREFIX);
2043
+ const end = source.indexOf("\n", start + 1);
2044
+ return {
2045
+ source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
2046
+ configuredBundle
2047
+ };
2048
+ }
2049
+ function defineConfig(config) {
2050
+ return config;
2051
+ }
2052
+ function hasOwnKeys(value) {
2053
+ return !!value && Object.keys(value).length > 0;
2054
+ }
2055
+ function hasPeachConfig(config) {
2056
+ if (!config) return false;
2057
+ return typeof config.runtimeVersion === "string" && config.runtimeVersion.length > 0 || hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.nativeViews) || hasOwnKeys(config.env) || hasOwnKeys(config.network?.remap) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
2058
+ }
2059
+ function mergePeachConfig(base, override) {
2060
+ if (!hasPeachConfig(base) && !hasPeachConfig(override)) return void 0;
2061
+ if (!hasPeachConfig(base)) return override ? { ...override } : void 0;
2062
+ if (!hasPeachConfig(override)) return base ? { ...base } : void 0;
2063
+ return {
2064
+ runtimeVersion: override.runtimeVersion ?? base.runtimeVersion,
2065
+ modules: { ...base.modules || {}, ...override.modules || {} },
2066
+ turboModules: { ...base.turboModules || {}, ...override.turboModules || {} },
2067
+ nativeModules: {
2068
+ ...base.nativeModules || {},
2069
+ ...override.nativeModules || {}
2070
+ },
2071
+ nativeViews: { ...base.nativeViews || {}, ...override.nativeViews || {} },
2072
+ env: { ...base.env || {}, ...override.env || {} },
2073
+ network: {
2074
+ remap: { ...base.network?.remap || {}, ...override.network?.remap || {} }
2075
+ },
2076
+ settings: {
2077
+ ...base.settings || {},
2078
+ ...override.settings || {}
2079
+ },
2080
+ initialState: { ...base.initialState || {}, ...override.initialState || {} }
2081
+ };
2082
+ }
2083
+ function readPeachConfigFromSearchParams(searchParams) {
2084
+ const raw = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
2085
+ if (!raw) return void 0;
2086
+ try {
2087
+ const parsed = JSON.parse(raw);
2088
+ return hasPeachConfig(parsed) ? parsed : void 0;
2089
+ } catch (error) {
2090
+ const message = error instanceof Error ? error.message : String(error);
2091
+ console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
2092
+ return void 0;
2093
+ }
2094
+ }
2095
+ function applyPeachConfigToUrl(url, config) {
2096
+ const parsed = new URL(url);
2097
+ if (hasPeachConfig(config)) {
2098
+ parsed.searchParams.set(PEACH_CONFIG_QUERY_PARAM, JSON.stringify(config));
2099
+ } else {
2100
+ parsed.searchParams.delete(PEACH_CONFIG_QUERY_PARAM);
2101
+ }
2102
+ return parsed.toString();
2103
+ }
2104
+ var PEACH_CONFIG_QUERY_PARAM, BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
2005
2105
  var init_config = __esm({
2006
2106
  "src/config.ts"() {
2007
2107
  "use strict";
2008
2108
  init_version();
2009
2109
  init_is_record();
2110
+ PEACH_CONFIG_QUERY_PARAM = "peachConfig";
2010
2111
  BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
2011
2112
  PEACH_CONFIGURED_FILES_HOOK = "__peachInstallConfiguredFiles";
2012
2113
  }
@@ -2045,10 +2146,8 @@ async function loadRNXAppConfig(project) {
2045
2146
  // metro serializes repeatedly in one process; edits must reload the config.
2046
2147
  moduleCache: false,
2047
2148
  tryNative: false,
2048
- alias: {
2049
- [`${rnxPublicBrand.packageName}/config`]: require2.resolve(
2050
- `${rnxPublicBrand.packageName}/config`
2051
- )
2149
+ virtualModules: {
2150
+ [`${rnxPublicBrand.packageName}/config`]: config_exports
2052
2151
  }
2053
2152
  });
2054
2153
  const loaded2 = await jiti.import(project.configPath, { default: true });
@@ -2065,17 +2164,16 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
2065
2164
  const project = resolveAppProject(startDir);
2066
2165
  return { project, config: await loadRNXAppConfig(project) };
2067
2166
  }
2068
- var import_node_module3, import_node_path10, import_jiti, require2;
2167
+ var import_node_path10, import_jiti;
2069
2168
  var init_app_config = __esm({
2070
2169
  "cli/app-config.ts"() {
2071
2170
  "use strict";
2072
- import_node_module3 = require("node:module");
2073
2171
  import_node_path10 = __toESM(require("node:path"), 1);
2074
2172
  import_jiti = require("jiti");
2075
2173
  init_config();
2174
+ init_config();
2076
2175
  init_public_brand();
2077
2176
  init_app_project();
2078
- require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
2079
2177
  }
2080
2178
  });
2081
2179
 
@@ -9919,8 +10017,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
9919
10017
  "app.config.mjs"
9920
10018
  ].some((name2) => import_node_fs8.default.existsSync(import_node_path9.default.join(projectRoot, name2)));
9921
10019
  if (staticExpo || dynamicExpo) {
9922
- const require3 = (0, import_node_module2.createRequire)(import_node_path9.default.join(projectRoot, "package.json"));
9923
- const configModule = require3("@expo/config");
10020
+ const require2 = (0, import_node_module2.createRequire)(import_node_path9.default.join(projectRoot, "package.json"));
10021
+ const configModule = require2("@expo/config");
9924
10022
  if (!isRecord(configModule) || typeof configModule.getConfig !== "function")
9925
10023
  throw new Error("Expo native configuration is unavailable.");
9926
10024
  const resolved = Reflect.apply(configModule.getConfig, configModule, [
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
package/dist-lib/menu.cjs CHANGED
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1954,6 +1954,22 @@ var init_version = __esm({
1954
1954
  });
1955
1955
 
1956
1956
  // src/config.ts
1957
+ var config_exports = {};
1958
+ __export(config_exports, {
1959
+ PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
1960
+ PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
1961
+ applyPeachConfigToUrl: () => applyPeachConfigToUrl,
1962
+ collectConfiguredFileModules: () => collectConfiguredFileModules,
1963
+ createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
1964
+ defineConfig: () => defineConfig,
1965
+ detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
1966
+ hasPeachConfig: () => hasPeachConfig,
1967
+ isPeachConfig: () => isPeachConfig,
1968
+ mergePeachConfig: () => mergePeachConfig,
1969
+ readPeachBundleConfig: () => readPeachBundleConfig,
1970
+ readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
1971
+ readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
1972
+ });
1957
1973
  function collectConfiguredFileModules(config) {
1958
1974
  return [
1959
1975
  ...new Set(
@@ -1980,16 +1996,101 @@ function isPeachConfig(value) {
1980
1996
  "initialState"
1981
1997
  ].every((key) => value[key] === void 0 || isRecord2(value[key]));
1982
1998
  }
1999
+ function readPeachBundleConfig(value) {
2000
+ if (value === void 0 || value === null) return null;
2001
+ if (!isRecord2(value) || !isPeachConfig(value.config) || !Array.isArray(value.runtimePackages) || !value.runtimePackages.every((name2) => typeof name2 === "string")) {
2002
+ throw new Error("configured bundle metadata is malformed");
2003
+ }
2004
+ return { config: value.config, runtimePackages: [...value.runtimePackages] };
2005
+ }
2006
+ function readPeachBundleConfigFooter(source) {
2007
+ const start = source.lastIndexOf("\n" + BUNDLE_CONFIG_PREFIX);
2008
+ if (start < 0) return null;
2009
+ const end = source.indexOf("\n", start + 1);
2010
+ const line = source.slice(start + 1, end < 0 ? void 0 : end);
2011
+ if (!line.endsWith(";")) throw new Error("configured bundle footer is truncated");
2012
+ const result = readPeachBundleConfig(
2013
+ JSON.parse(line.slice(BUNDLE_CONFIG_PREFIX.length, -1))
2014
+ );
2015
+ if (!result) throw new Error("configured bundle footer is empty");
2016
+ return result;
2017
+ }
1983
2018
  function createPeachBundleConfigFooter(config) {
1984
2019
  const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
1985
2020
  return "\n" + BUNDLE_CONFIG_PREFIX + json + ";";
1986
2021
  }
1987
- var BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
2022
+ function detachPeachBundleConfigFooter(source) {
2023
+ const configuredBundle = readPeachBundleConfigFooter(source);
2024
+ if (!configuredBundle) return { source, configuredBundle };
2025
+ const start = source.lastIndexOf("\n" + BUNDLE_CONFIG_PREFIX);
2026
+ const end = source.indexOf("\n", start + 1);
2027
+ return {
2028
+ source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
2029
+ configuredBundle
2030
+ };
2031
+ }
2032
+ function defineConfig(config) {
2033
+ return config;
2034
+ }
2035
+ function hasOwnKeys(value) {
2036
+ return !!value && Object.keys(value).length > 0;
2037
+ }
2038
+ function hasPeachConfig(config) {
2039
+ if (!config) return false;
2040
+ return typeof config.runtimeVersion === "string" && config.runtimeVersion.length > 0 || hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.nativeViews) || hasOwnKeys(config.env) || hasOwnKeys(config.network?.remap) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
2041
+ }
2042
+ function mergePeachConfig(base, override) {
2043
+ if (!hasPeachConfig(base) && !hasPeachConfig(override)) return void 0;
2044
+ if (!hasPeachConfig(base)) return override ? { ...override } : void 0;
2045
+ if (!hasPeachConfig(override)) return base ? { ...base } : void 0;
2046
+ return {
2047
+ runtimeVersion: override.runtimeVersion ?? base.runtimeVersion,
2048
+ modules: { ...base.modules || {}, ...override.modules || {} },
2049
+ turboModules: { ...base.turboModules || {}, ...override.turboModules || {} },
2050
+ nativeModules: {
2051
+ ...base.nativeModules || {},
2052
+ ...override.nativeModules || {}
2053
+ },
2054
+ nativeViews: { ...base.nativeViews || {}, ...override.nativeViews || {} },
2055
+ env: { ...base.env || {}, ...override.env || {} },
2056
+ network: {
2057
+ remap: { ...base.network?.remap || {}, ...override.network?.remap || {} }
2058
+ },
2059
+ settings: {
2060
+ ...base.settings || {},
2061
+ ...override.settings || {}
2062
+ },
2063
+ initialState: { ...base.initialState || {}, ...override.initialState || {} }
2064
+ };
2065
+ }
2066
+ function readPeachConfigFromSearchParams(searchParams) {
2067
+ const raw = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
2068
+ if (!raw) return void 0;
2069
+ try {
2070
+ const parsed = JSON.parse(raw);
2071
+ return hasPeachConfig(parsed) ? parsed : void 0;
2072
+ } catch (error) {
2073
+ const message = error instanceof Error ? error.message : String(error);
2074
+ console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
2075
+ return void 0;
2076
+ }
2077
+ }
2078
+ function applyPeachConfigToUrl(url, config) {
2079
+ const parsed = new URL(url);
2080
+ if (hasPeachConfig(config)) {
2081
+ parsed.searchParams.set(PEACH_CONFIG_QUERY_PARAM, JSON.stringify(config));
2082
+ } else {
2083
+ parsed.searchParams.delete(PEACH_CONFIG_QUERY_PARAM);
2084
+ }
2085
+ return parsed.toString();
2086
+ }
2087
+ var PEACH_CONFIG_QUERY_PARAM, BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
1988
2088
  var init_config = __esm({
1989
2089
  "src/config.ts"() {
1990
2090
  "use strict";
1991
2091
  init_version();
1992
2092
  init_is_record();
2093
+ PEACH_CONFIG_QUERY_PARAM = "peachConfig";
1993
2094
  BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
1994
2095
  PEACH_CONFIGURED_FILES_HOOK = "__peachInstallConfiguredFiles";
1995
2096
  }
@@ -2045,10 +2146,8 @@ async function loadRNXAppConfig(project) {
2045
2146
  // metro serializes repeatedly in one process; edits must reload the config.
2046
2147
  moduleCache: false,
2047
2148
  tryNative: false,
2048
- alias: {
2049
- [`${rnxPublicBrand.packageName}/config`]: require2.resolve(
2050
- `${rnxPublicBrand.packageName}/config`
2051
- )
2149
+ virtualModules: {
2150
+ [`${rnxPublicBrand.packageName}/config`]: config_exports
2052
2151
  }
2053
2152
  });
2054
2153
  const loaded2 = await jiti.import(project.configPath, { default: true });
@@ -2065,17 +2164,16 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
2065
2164
  const project = resolveAppProject(startDir);
2066
2165
  return { project, config: await loadRNXAppConfig(project) };
2067
2166
  }
2068
- var import_node_module2, import_node_path7, import_jiti, require2;
2167
+ var import_node_path7, import_jiti;
2069
2168
  var init_app_config = __esm({
2070
2169
  "cli/app-config.ts"() {
2071
2170
  "use strict";
2072
- import_node_module2 = require("node:module");
2073
2171
  import_node_path7 = __toESM(require("node:path"), 1);
2074
2172
  import_jiti = require("jiti");
2075
2173
  init_config();
2174
+ init_config();
2076
2175
  init_public_brand();
2077
2176
  init_app_project();
2078
- require2 = (0, import_node_module2.createRequire)(__sootsim_import_meta_url);
2079
2177
  }
2080
2178
  });
2081
2179
 
@@ -3493,8 +3591,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
3493
3591
  "app.config.mjs"
3494
3592
  ].some((name2) => import_node_fs5.default.existsSync(import_node_path5.default.join(projectRoot, name2)));
3495
3593
  if (staticExpo || dynamicExpo) {
3496
- const require3 = (0, import_node_module.createRequire)(import_node_path5.default.join(projectRoot, "package.json"));
3497
- const configModule = require3("@expo/config");
3594
+ const require2 = (0, import_node_module.createRequire)(import_node_path5.default.join(projectRoot, "package.json"));
3595
+ const configModule = require2("@expo/config");
3498
3596
  if (!isRecord2(configModule) || typeof configModule.getConfig !== "function")
3499
3597
  throw new Error("Expo native configuration is unavailable.");
3500
3598
  const resolved = Reflect.apply(configModule.getConfig, configModule, [
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-app-identity.ts
4
4
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-firebase-metadata.ts
4
4
  var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  import plist from "plist";
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
package/dist-lib/sdk.cjs CHANGED
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.795 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);