peachsim 0.1.1469 → 0.1.1481
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/cli/commands/control.ts +68 -42
- package/cli/commands/detox.ts +15 -10
- package/cli/commands/flow.ts +1 -2
- package/cli/commands/inspect/settling.ts +5 -1
- package/cli/commands/setup.ts +20 -13
- package/cli/commands/test.ts +2 -1
- package/cli/dev-build-freshness.ts +14 -14
- package/cli/drivers/playwright-sim-host.ts +7 -2
- package/cli/drivers/playwright.ts +6 -6
- package/cli/outbound-endpoints.ts +80 -6
- package/detox/index.ts +27 -14
- package/detox/matchers.ts +17 -6
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +54 -15
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +19 -3
- package/dist-lib/config.mjs +19 -3
- package/dist-lib/detox/index.cjs +125 -52
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +30 -9
- package/dist-lib/expo-swift-metadata.cjs +18 -6
- package/dist-lib/expo-swift-metadata.mjs +18 -6
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +621 -390
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +46 -19
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +24 -6
- package/dist-lib/metro-production-bundle.mjs +22 -6
- package/dist-lib/metro.cjs +41 -18
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- package/dist-lib/native-app-identity.cjs +19 -5
- package/dist-lib/native-app-identity.mjs +19 -5
- package/dist-lib/native-firebase-metadata.cjs +22 -7
- package/dist-lib/native-firebase-metadata.mjs +20 -7
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +3 -1
- package/dist-lib/react-native-host-modules.mjs +3 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +404 -279
- package/dist-lib/sdk.cjs +6 -2
- package/dist-lib/sdk.mjs +6 -2
- package/dist-lib/skills.cjs +757 -531
- package/dist-lib/swift-compile.cjs +7 -2
- package/dist-lib/swift-compile.mjs +7 -2
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +7 -2
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +27 -7
- package/dist-lib/worklet-executable.mjs +27 -7
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +493 -188
- package/src/admitted-mac-build.ts +12 -0
- package/src/bridge-constants.ts +5 -3
- package/src/bundleGlobalFooter.ts +26 -3
- package/src/config.ts +3 -2
- package/src/configured-bundle-producer.ts +2 -1
- package/src/expo-swift-host.ts +33 -7
- package/src/host/bridge-host.ts +34 -6
- package/src/metro-production-bundle.ts +11 -4
- package/src/native-app-identity.ts +3 -2
- package/src/native-firebase-metadata.ts +5 -3
- package/src/react-native-host-modules.ts +2 -0
- package/src/swift-compile.ts +5 -4
- package/src/worker-system-chunks.ts +61 -58
- package/src/worklet-executable.ts +38 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -59,6 +59,27 @@ var init_is_record = __esm({
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
+
// src/bundleGlobalFooter.ts
|
|
63
|
+
function findBundleFooter(source, prefix2) {
|
|
64
|
+
let end = source.length;
|
|
65
|
+
while (end > 0) {
|
|
66
|
+
const newline = source.lastIndexOf("\n", end - 1);
|
|
67
|
+
if (newline < 0) return -1;
|
|
68
|
+
const line = newline + 1;
|
|
69
|
+
if (source.startsWith(prefix2, line)) return newline;
|
|
70
|
+
if (line !== end && !source.startsWith("globalThis.", line) && !source.startsWith("//", line)) {
|
|
71
|
+
return -1;
|
|
72
|
+
}
|
|
73
|
+
end = newline;
|
|
74
|
+
}
|
|
75
|
+
return -1;
|
|
76
|
+
}
|
|
77
|
+
var init_bundleGlobalFooter = __esm({
|
|
78
|
+
"src/bundleGlobalFooter.ts"() {
|
|
79
|
+
"use strict";
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
62
83
|
// src/public-brand.ts
|
|
63
84
|
var name, peachPublicBrand, rnxPublicBrand;
|
|
64
85
|
var init_public_brand = __esm({
|
|
@@ -2029,7 +2050,7 @@ function readPeachBundleConfig(value) {
|
|
|
2029
2050
|
return { config: value.config, runtimePackages: [...value.runtimePackages] };
|
|
2030
2051
|
}
|
|
2031
2052
|
function readPeachBundleConfigFooter(source) {
|
|
2032
|
-
const start = source
|
|
2053
|
+
const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
|
|
2033
2054
|
if (start < 0) return null;
|
|
2034
2055
|
const end = source.indexOf("\n", start + 1);
|
|
2035
2056
|
const line = source.slice(start + 1, end < 0 ? void 0 : end);
|
|
@@ -2047,7 +2068,7 @@ function createPeachBundleConfigFooter(config) {
|
|
|
2047
2068
|
function detachPeachBundleConfigFooter(source) {
|
|
2048
2069
|
const configuredBundle = readPeachBundleConfigFooter(source);
|
|
2049
2070
|
if (!configuredBundle) return { source, configuredBundle };
|
|
2050
|
-
const start = source
|
|
2071
|
+
const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
|
|
2051
2072
|
const end = source.indexOf("\n", start + 1);
|
|
2052
2073
|
return {
|
|
2053
2074
|
source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
|
|
@@ -2117,6 +2138,7 @@ var init_config = __esm({
|
|
|
2117
2138
|
"src/config.ts"() {
|
|
2118
2139
|
"use strict";
|
|
2119
2140
|
init_version();
|
|
2141
|
+
init_bundleGlobalFooter();
|
|
2120
2142
|
init_is_record();
|
|
2121
2143
|
PEACH_CONFIG_QUERY_PARAM = "peachConfig";
|
|
2122
2144
|
BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
|
|
@@ -2253,7 +2275,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
2253
2275
|
config: packagedConfig,
|
|
2254
2276
|
runtimePackages: [...neededPackages].sort()
|
|
2255
2277
|
});
|
|
2256
|
-
const identityStart = source
|
|
2278
|
+
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
2257
2279
|
return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
2258
2280
|
}
|
|
2259
2281
|
var import_node_fs12, import_node_path14, import_sucrase, import_terser;
|
|
@@ -2265,6 +2287,7 @@ var init_configured_bundle_producer = __esm({
|
|
|
2265
2287
|
import_sucrase = require("sucrase");
|
|
2266
2288
|
import_terser = require("terser");
|
|
2267
2289
|
init_replacementModule();
|
|
2290
|
+
init_bundleGlobalFooter();
|
|
2268
2291
|
init_config();
|
|
2269
2292
|
init_replacement_module_handler();
|
|
2270
2293
|
}
|
|
@@ -2394,16 +2417,17 @@ function rnxCloudScopesAllowCommand(scopes, type) {
|
|
|
2394
2417
|
init_is_record();
|
|
2395
2418
|
|
|
2396
2419
|
// src/metro-production-bundle.ts
|
|
2420
|
+
init_bundleGlobalFooter();
|
|
2397
2421
|
var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
2398
2422
|
var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
|
|
2399
2423
|
var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
|
|
2400
2424
|
function detachRNXMetroSourceMapUrl(bundleText) {
|
|
2401
2425
|
const trimmedEnd = bundleText.trimEnd();
|
|
2402
|
-
const commentStart = trimmedEnd.lastIndexOf(
|
|
2403
|
-
|
|
2404
|
-
|
|
2426
|
+
const commentStart = trimmedEnd.lastIndexOf("\n");
|
|
2427
|
+
if (commentStart < 0 || !trimmedEnd.startsWith(RNXSIM_METRO_SOURCE_MAP_COMMENT, commentStart + 1)) {
|
|
2428
|
+
return { source: bundleText, sourceMappingUrl: null };
|
|
2429
|
+
}
|
|
2405
2430
|
const url = trimmedEnd.slice(commentStart + 1 + RNXSIM_METRO_SOURCE_MAP_COMMENT.length);
|
|
2406
|
-
if (url.includes("\n")) return { source: bundleText, sourceMappingUrl: null };
|
|
2407
2431
|
return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
|
|
2408
2432
|
}
|
|
2409
2433
|
function createRNXMetroModuleIdentityFooter(identity) {
|
|
@@ -7140,7 +7164,11 @@ async function waitForSootsimIdle({
|
|
|
7140
7164
|
for (const n of hierarchy) {
|
|
7141
7165
|
const layout = n && n.layout
|
|
7142
7166
|
if (layout && layout.width > 0) {
|
|
7143
|
-
|
|
7167
|
+
// painted bounds catch a scroll fling. background playback
|
|
7168
|
+
// keeps a view's painted bounds moving forever, so it and its
|
|
7169
|
+
// subtree count by their own layout; the rest of the screen
|
|
7170
|
+
// still catches the fling.
|
|
7171
|
+
const abs = n.backgroundPlayback ? layout : n.absolute || n.absolutePosition || layout
|
|
7144
7172
|
nodes.push(Math.round(abs.x) + ',' + Math.round(abs.y) + ',' + Math.round(layout.width))
|
|
7145
7173
|
}
|
|
7146
7174
|
notePreviewProgress(
|
|
@@ -9430,6 +9458,9 @@ var import_path4 = __toESM(require("path"), 1);
|
|
|
9430
9458
|
init_app_project();
|
|
9431
9459
|
init_replacement_module_handler();
|
|
9432
9460
|
|
|
9461
|
+
// src/native-app-identity.ts
|
|
9462
|
+
init_bundleGlobalFooter();
|
|
9463
|
+
|
|
9433
9464
|
// src/openstep-plist.ts
|
|
9434
9465
|
var isDict = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9435
9466
|
var str = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -9542,15 +9573,13 @@ function createNativeAppIdentityFooter(identity) {
|
|
|
9542
9573
|
${NATIVE_APP_IDENTITY_PREFIX}${payload};`;
|
|
9543
9574
|
}
|
|
9544
9575
|
function nativeAppIdentityFooterStart(source) {
|
|
9545
|
-
return source
|
|
9546
|
-
${NATIVE_APP_IDENTITY_PREFIX}`);
|
|
9576
|
+
return findBundleFooter(source, NATIVE_APP_IDENTITY_PREFIX);
|
|
9547
9577
|
}
|
|
9548
9578
|
function insertNativeAppIdentityFooter(source, identity) {
|
|
9549
9579
|
const existing = nativeAppIdentityFooterStart(source);
|
|
9550
9580
|
const existingEnd = existing < 0 ? -1 : source.includes("\n", existing + 1) ? source.indexOf("\n", existing + 1) : -1;
|
|
9551
9581
|
const withoutExisting = existing < 0 ? source : source.slice(0, existing) + source.slice(existingEnd < 0 ? source.length : existingEnd);
|
|
9552
|
-
const moduleFooter = withoutExisting
|
|
9553
|
-
${METRO_MODULE_PATHS_PREFIX}`);
|
|
9582
|
+
const moduleFooter = findBundleFooter(withoutExisting, METRO_MODULE_PATHS_PREFIX);
|
|
9554
9583
|
const footer = createNativeAppIdentityFooter(identity);
|
|
9555
9584
|
if (moduleFooter < 0) return withoutExisting + footer;
|
|
9556
9585
|
return withoutExisting.slice(0, moduleFooter) + footer + withoutExisting.slice(moduleFooter);
|
|
@@ -11245,6 +11274,7 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
|
|
|
11245
11274
|
}
|
|
11246
11275
|
|
|
11247
11276
|
// src/native-firebase-metadata.ts
|
|
11277
|
+
init_bundleGlobalFooter();
|
|
11248
11278
|
var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
|
|
11249
11279
|
var MODULE_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
11250
11280
|
var PLATFORMS = ["ios", "android"];
|
|
@@ -11294,8 +11324,7 @@ function createNativeFirebaseFooter(config) {
|
|
|
11294
11324
|
${PREFIX}${json};`;
|
|
11295
11325
|
}
|
|
11296
11326
|
function readNativeFirebaseFooter(source) {
|
|
11297
|
-
const start = source
|
|
11298
|
-
${PREFIX}`);
|
|
11327
|
+
const start = findBundleFooter(source, PREFIX);
|
|
11299
11328
|
if (start < 0) return null;
|
|
11300
11329
|
const lineEnd = source.indexOf("\n", start + 1);
|
|
11301
11330
|
const line = source.slice(start + 1, lineEnd < 0 ? void 0 : lineEnd);
|
|
@@ -11308,16 +11337,14 @@ ${PREFIX}`);
|
|
|
11308
11337
|
function detachNativeFirebaseFooter(source) {
|
|
11309
11338
|
const config = readNativeFirebaseFooter(source);
|
|
11310
11339
|
if (config === null) return { source, config };
|
|
11311
|
-
const start = source
|
|
11312
|
-
${PREFIX}`);
|
|
11340
|
+
const start = findBundleFooter(source, PREFIX);
|
|
11313
11341
|
const lineEnd = source.indexOf("\n", start + 1);
|
|
11314
11342
|
const end = lineEnd < 0 ? source.length : lineEnd;
|
|
11315
11343
|
return { source: source.slice(0, start) + source.slice(end), config };
|
|
11316
11344
|
}
|
|
11317
11345
|
function insertNativeFirebaseFooter(source, config) {
|
|
11318
11346
|
const detached = detachNativeFirebaseFooter(source).source;
|
|
11319
|
-
const start = detached
|
|
11320
|
-
${MODULE_PREFIX}`);
|
|
11347
|
+
const start = findBundleFooter(detached, MODULE_PREFIX);
|
|
11321
11348
|
const footer = createNativeFirebaseFooter(config);
|
|
11322
11349
|
return start < 0 ? detached + footer : detached.slice(0, start) + footer + detached.slice(start);
|
|
11323
11350
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
package/dist-lib/kotlin-host.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
package/dist-lib/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
package/dist-lib/menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -34,6 +34,24 @@ __export(metro_production_bundle_exports, {
|
|
|
34
34
|
validateRNXMetroModulePaths: () => validateRNXMetroModulePaths
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(metro_production_bundle_exports);
|
|
37
|
+
|
|
38
|
+
// src/bundleGlobalFooter.ts
|
|
39
|
+
function findBundleFooter(source, prefix) {
|
|
40
|
+
let end = source.length;
|
|
41
|
+
while (end > 0) {
|
|
42
|
+
const newline = source.lastIndexOf("\n", end - 1);
|
|
43
|
+
if (newline < 0) return -1;
|
|
44
|
+
const line = newline + 1;
|
|
45
|
+
if (source.startsWith(prefix, line)) return newline;
|
|
46
|
+
if (line !== end && !source.startsWith("globalThis.", line) && !source.startsWith("//", line)) {
|
|
47
|
+
return -1;
|
|
48
|
+
}
|
|
49
|
+
end = newline;
|
|
50
|
+
}
|
|
51
|
+
return -1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// src/metro-production-bundle.ts
|
|
37
55
|
var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
38
56
|
var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
|
|
39
57
|
function toPeachProductionBundleUrl(bundleUrl) {
|
|
@@ -55,11 +73,11 @@ function toPeachDevelopmentBundleUrl(bundleUrl) {
|
|
|
55
73
|
var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
|
|
56
74
|
function detachRNXMetroSourceMapUrl(bundleText) {
|
|
57
75
|
const trimmedEnd = bundleText.trimEnd();
|
|
58
|
-
const commentStart = trimmedEnd.lastIndexOf(
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
const commentStart = trimmedEnd.lastIndexOf("\n");
|
|
77
|
+
if (commentStart < 0 || !trimmedEnd.startsWith(RNXSIM_METRO_SOURCE_MAP_COMMENT, commentStart + 1)) {
|
|
78
|
+
return { source: bundleText, sourceMappingUrl: null };
|
|
79
|
+
}
|
|
61
80
|
const url = trimmedEnd.slice(commentStart + 1 + RNXSIM_METRO_SOURCE_MAP_COMMENT.length);
|
|
62
|
-
if (url.includes("\n")) return { source: bundleText, sourceMappingUrl: null };
|
|
63
81
|
return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
|
|
64
82
|
}
|
|
65
83
|
function createRNXMetroModuleIdentityFooter(identity) {
|
|
@@ -78,7 +96,7 @@ function readRNXMetroModuleIdentity(bundleText) {
|
|
|
78
96
|
const withoutMap = detached.source;
|
|
79
97
|
const footerPrefix = `
|
|
80
98
|
${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
|
|
81
|
-
const footerStart = withoutMap
|
|
99
|
+
const footerStart = findBundleFooter(withoutMap, RNXSIM_METRO_MODULE_PATHS_PREFIX);
|
|
82
100
|
if (footerStart < 0) return null;
|
|
83
101
|
if (!withoutMap.endsWith(";")) {
|
|
84
102
|
throw new Error("Metro module identity footer is truncated");
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
|
|
3
|
+
// src/bundleGlobalFooter.ts
|
|
4
|
+
function findBundleFooter(source, prefix) {
|
|
5
|
+
let end = source.length;
|
|
6
|
+
while (end > 0) {
|
|
7
|
+
const newline = source.lastIndexOf("\n", end - 1);
|
|
8
|
+
if (newline < 0) return -1;
|
|
9
|
+
const line = newline + 1;
|
|
10
|
+
if (source.startsWith(prefix, line)) return newline;
|
|
11
|
+
if (line !== end && !source.startsWith("globalThis.", line) && !source.startsWith("//", line)) {
|
|
12
|
+
return -1;
|
|
13
|
+
}
|
|
14
|
+
end = newline;
|
|
15
|
+
}
|
|
16
|
+
return -1;
|
|
17
|
+
}
|
|
2
18
|
|
|
3
19
|
// src/metro-production-bundle.ts
|
|
4
20
|
var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
@@ -22,11 +38,11 @@ function toPeachDevelopmentBundleUrl(bundleUrl) {
|
|
|
22
38
|
var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
|
|
23
39
|
function detachRNXMetroSourceMapUrl(bundleText) {
|
|
24
40
|
const trimmedEnd = bundleText.trimEnd();
|
|
25
|
-
const commentStart = trimmedEnd.lastIndexOf(
|
|
26
|
-
|
|
27
|
-
|
|
41
|
+
const commentStart = trimmedEnd.lastIndexOf("\n");
|
|
42
|
+
if (commentStart < 0 || !trimmedEnd.startsWith(RNXSIM_METRO_SOURCE_MAP_COMMENT, commentStart + 1)) {
|
|
43
|
+
return { source: bundleText, sourceMappingUrl: null };
|
|
44
|
+
}
|
|
28
45
|
const url = trimmedEnd.slice(commentStart + 1 + RNXSIM_METRO_SOURCE_MAP_COMMENT.length);
|
|
29
|
-
if (url.includes("\n")) return { source: bundleText, sourceMappingUrl: null };
|
|
30
46
|
return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
|
|
31
47
|
}
|
|
32
48
|
function createRNXMetroModuleIdentityFooter(identity) {
|
|
@@ -45,7 +61,7 @@ function readRNXMetroModuleIdentity(bundleText) {
|
|
|
45
61
|
const withoutMap = detached.source;
|
|
46
62
|
const footerPrefix = `
|
|
47
63
|
${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
|
|
48
|
-
const footerStart = withoutMap
|
|
64
|
+
const footerStart = findBundleFooter(withoutMap, RNXSIM_METRO_MODULE_PATHS_PREFIX);
|
|
49
65
|
if (footerStart < 0) return null;
|
|
50
66
|
if (!withoutMap.endsWith(";")) {
|
|
51
67
|
throw new Error("Metro module identity footer is truncated");
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -582,6 +582,27 @@ var init_replacement_module_handler = __esm({
|
|
|
582
582
|
}
|
|
583
583
|
});
|
|
584
584
|
|
|
585
|
+
// src/bundleGlobalFooter.ts
|
|
586
|
+
function findBundleFooter(source, prefix2) {
|
|
587
|
+
let end = source.length;
|
|
588
|
+
while (end > 0) {
|
|
589
|
+
const newline = source.lastIndexOf("\n", end - 1);
|
|
590
|
+
if (newline < 0) return -1;
|
|
591
|
+
const line = newline + 1;
|
|
592
|
+
if (source.startsWith(prefix2, line)) return newline;
|
|
593
|
+
if (line !== end && !source.startsWith("globalThis.", line) && !source.startsWith("//", line)) {
|
|
594
|
+
return -1;
|
|
595
|
+
}
|
|
596
|
+
end = newline;
|
|
597
|
+
}
|
|
598
|
+
return -1;
|
|
599
|
+
}
|
|
600
|
+
var init_bundleGlobalFooter = __esm({
|
|
601
|
+
"src/bundleGlobalFooter.ts"() {
|
|
602
|
+
"use strict";
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
|
|
585
606
|
// ../../node_modules/plist/lib/parse.js
|
|
586
607
|
var require_parse = __commonJS({
|
|
587
608
|
"../../node_modules/plist/lib/parse.js"(exports2) {
|
|
@@ -2012,7 +2033,7 @@ function readPeachBundleConfig(value) {
|
|
|
2012
2033
|
return { config: value.config, runtimePackages: [...value.runtimePackages] };
|
|
2013
2034
|
}
|
|
2014
2035
|
function readPeachBundleConfigFooter(source) {
|
|
2015
|
-
const start = source
|
|
2036
|
+
const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
|
|
2016
2037
|
if (start < 0) return null;
|
|
2017
2038
|
const end = source.indexOf("\n", start + 1);
|
|
2018
2039
|
const line = source.slice(start + 1, end < 0 ? void 0 : end);
|
|
@@ -2030,7 +2051,7 @@ function createPeachBundleConfigFooter(config) {
|
|
|
2030
2051
|
function detachPeachBundleConfigFooter(source) {
|
|
2031
2052
|
const configuredBundle = readPeachBundleConfigFooter(source);
|
|
2032
2053
|
if (!configuredBundle) return { source, configuredBundle };
|
|
2033
|
-
const start = source
|
|
2054
|
+
const start = findBundleFooter(source, BUNDLE_CONFIG_PREFIX);
|
|
2034
2055
|
const end = source.indexOf("\n", start + 1);
|
|
2035
2056
|
return {
|
|
2036
2057
|
source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
|
|
@@ -2100,6 +2121,7 @@ var init_config = __esm({
|
|
|
2100
2121
|
"src/config.ts"() {
|
|
2101
2122
|
"use strict";
|
|
2102
2123
|
init_version();
|
|
2124
|
+
init_bundleGlobalFooter();
|
|
2103
2125
|
init_is_record();
|
|
2104
2126
|
PEACH_CONFIG_QUERY_PARAM = "peachConfig";
|
|
2105
2127
|
BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
|
|
@@ -2253,7 +2275,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
2253
2275
|
config: packagedConfig,
|
|
2254
2276
|
runtimePackages: [...neededPackages].sort()
|
|
2255
2277
|
});
|
|
2256
|
-
const identityStart = source
|
|
2278
|
+
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
2257
2279
|
return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
2258
2280
|
}
|
|
2259
2281
|
var import_node_fs8, import_node_path9, import_sucrase, import_terser;
|
|
@@ -2265,6 +2287,7 @@ var init_configured_bundle_producer = __esm({
|
|
|
2265
2287
|
import_sucrase = require("sucrase");
|
|
2266
2288
|
import_terser = require("terser");
|
|
2267
2289
|
init_replacementModule();
|
|
2290
|
+
init_bundleGlobalFooter();
|
|
2268
2291
|
init_config();
|
|
2269
2292
|
init_replacement_module_handler();
|
|
2270
2293
|
}
|
|
@@ -2307,6 +2330,7 @@ function tagRnxBundleForPlugin(bundleUrl, replacementOrigin, replacementToken, p
|
|
|
2307
2330
|
init_replacement_module_handler();
|
|
2308
2331
|
|
|
2309
2332
|
// src/metro-production-bundle.ts
|
|
2333
|
+
init_bundleGlobalFooter();
|
|
2310
2334
|
var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
2311
2335
|
var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
|
|
2312
2336
|
function toPeachProductionBundleUrl(bundleUrl) {
|
|
@@ -2328,11 +2352,11 @@ function toPeachDevelopmentBundleUrl(bundleUrl) {
|
|
|
2328
2352
|
var RNXSIM_METRO_SOURCE_MAP_COMMENT = "//# sourceMappingURL=";
|
|
2329
2353
|
function detachRNXMetroSourceMapUrl(bundleText) {
|
|
2330
2354
|
const trimmedEnd = bundleText.trimEnd();
|
|
2331
|
-
const commentStart = trimmedEnd.lastIndexOf(
|
|
2332
|
-
|
|
2333
|
-
|
|
2355
|
+
const commentStart = trimmedEnd.lastIndexOf("\n");
|
|
2356
|
+
if (commentStart < 0 || !trimmedEnd.startsWith(RNXSIM_METRO_SOURCE_MAP_COMMENT, commentStart + 1)) {
|
|
2357
|
+
return { source: bundleText, sourceMappingUrl: null };
|
|
2358
|
+
}
|
|
2334
2359
|
const url = trimmedEnd.slice(commentStart + 1 + RNXSIM_METRO_SOURCE_MAP_COMMENT.length);
|
|
2335
|
-
if (url.includes("\n")) return { source: bundleText, sourceMappingUrl: null };
|
|
2336
2360
|
return { source: trimmedEnd.slice(0, commentStart), sourceMappingUrl: url };
|
|
2337
2361
|
}
|
|
2338
2362
|
function createRNXMetroModuleIdentityFooter(identity) {
|
|
@@ -2347,6 +2371,9 @@ function appendRNXMetroModuleIdentityFooter(bundleText, identity) {
|
|
|
2347
2371
|
${RNXSIM_METRO_SOURCE_MAP_COMMENT}${detached.sourceMappingUrl}`;
|
|
2348
2372
|
}
|
|
2349
2373
|
|
|
2374
|
+
// src/native-app-identity.ts
|
|
2375
|
+
init_bundleGlobalFooter();
|
|
2376
|
+
|
|
2350
2377
|
// src/openstep-plist.ts
|
|
2351
2378
|
var isDict = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2352
2379
|
var str = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -2459,15 +2486,13 @@ function createNativeAppIdentityFooter(identity) {
|
|
|
2459
2486
|
${NATIVE_APP_IDENTITY_PREFIX}${payload};`;
|
|
2460
2487
|
}
|
|
2461
2488
|
function nativeAppIdentityFooterStart(source) {
|
|
2462
|
-
return source
|
|
2463
|
-
${NATIVE_APP_IDENTITY_PREFIX}`);
|
|
2489
|
+
return findBundleFooter(source, NATIVE_APP_IDENTITY_PREFIX);
|
|
2464
2490
|
}
|
|
2465
2491
|
function insertNativeAppIdentityFooter(source, identity) {
|
|
2466
2492
|
const existing = nativeAppIdentityFooterStart(source);
|
|
2467
2493
|
const existingEnd = existing < 0 ? -1 : source.includes("\n", existing + 1) ? source.indexOf("\n", existing + 1) : -1;
|
|
2468
2494
|
const withoutExisting = existing < 0 ? source : source.slice(0, existing) + source.slice(existingEnd < 0 ? source.length : existingEnd);
|
|
2469
|
-
const moduleFooter = withoutExisting
|
|
2470
|
-
${METRO_MODULE_PATHS_PREFIX}`);
|
|
2495
|
+
const moduleFooter = findBundleFooter(withoutExisting, METRO_MODULE_PATHS_PREFIX);
|
|
2471
2496
|
const footer = createNativeAppIdentityFooter(identity);
|
|
2472
2497
|
if (moduleFooter < 0) return withoutExisting + footer;
|
|
2473
2498
|
return withoutExisting.slice(0, moduleFooter) + footer + withoutExisting.slice(moduleFooter);
|
|
@@ -4162,6 +4187,7 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
|
|
|
4162
4187
|
}
|
|
4163
4188
|
|
|
4164
4189
|
// src/native-firebase-metadata.ts
|
|
4190
|
+
init_bundleGlobalFooter();
|
|
4165
4191
|
var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
|
|
4166
4192
|
var MODULE_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
4167
4193
|
var PLATFORMS = ["ios", "android"];
|
|
@@ -4211,8 +4237,7 @@ function createNativeFirebaseFooter(config) {
|
|
|
4211
4237
|
${PREFIX}${json};`;
|
|
4212
4238
|
}
|
|
4213
4239
|
function readNativeFirebaseFooter(source) {
|
|
4214
|
-
const start = source
|
|
4215
|
-
${PREFIX}`);
|
|
4240
|
+
const start = findBundleFooter(source, PREFIX);
|
|
4216
4241
|
if (start < 0) return null;
|
|
4217
4242
|
const lineEnd = source.indexOf("\n", start + 1);
|
|
4218
4243
|
const line = source.slice(start + 1, lineEnd < 0 ? void 0 : lineEnd);
|
|
@@ -4225,16 +4250,14 @@ ${PREFIX}`);
|
|
|
4225
4250
|
function detachNativeFirebaseFooter(source) {
|
|
4226
4251
|
const config = readNativeFirebaseFooter(source);
|
|
4227
4252
|
if (config === null) return { source, config };
|
|
4228
|
-
const start = source
|
|
4229
|
-
${PREFIX}`);
|
|
4253
|
+
const start = findBundleFooter(source, PREFIX);
|
|
4230
4254
|
const lineEnd = source.indexOf("\n", start + 1);
|
|
4231
4255
|
const end = lineEnd < 0 ? source.length : lineEnd;
|
|
4232
4256
|
return { source: source.slice(0, start) + source.slice(end), config };
|
|
4233
4257
|
}
|
|
4234
4258
|
function insertNativeFirebaseFooter(source, config) {
|
|
4235
4259
|
const detached = detachNativeFirebaseFooter(source).source;
|
|
4236
|
-
const start = detached
|
|
4237
|
-
${MODULE_PREFIX}`);
|
|
4260
|
+
const start = findBundleFooter(detached, MODULE_PREFIX);
|
|
4238
4261
|
const footer = createNativeFirebaseFooter(config);
|
|
4239
4262
|
return start < 0 ? detached + footer : detached.slice(0, start) + footer + detached.slice(start);
|
|
4240
4263
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
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;
|
|
@@ -38,6 +38,22 @@ __export(native_app_identity_exports, {
|
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(native_app_identity_exports);
|
|
40
40
|
|
|
41
|
+
// src/bundleGlobalFooter.ts
|
|
42
|
+
function findBundleFooter(source, prefix) {
|
|
43
|
+
let end = source.length;
|
|
44
|
+
while (end > 0) {
|
|
45
|
+
const newline = source.lastIndexOf("\n", end - 1);
|
|
46
|
+
if (newline < 0) return -1;
|
|
47
|
+
const line = newline + 1;
|
|
48
|
+
if (source.startsWith(prefix, line)) return newline;
|
|
49
|
+
if (line !== end && !source.startsWith("globalThis.", line) && !source.startsWith("//", line)) {
|
|
50
|
+
return -1;
|
|
51
|
+
}
|
|
52
|
+
end = newline;
|
|
53
|
+
}
|
|
54
|
+
return -1;
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
// src/openstep-plist.ts
|
|
42
58
|
function parseOpenStepPlist(text) {
|
|
43
59
|
let i = 0;
|
|
@@ -280,8 +296,7 @@ function createNativeAppIdentityFooter(identity) {
|
|
|
280
296
|
${NATIVE_APP_IDENTITY_PREFIX}${payload};`;
|
|
281
297
|
}
|
|
282
298
|
function nativeAppIdentityFooterStart(source) {
|
|
283
|
-
return source
|
|
284
|
-
${NATIVE_APP_IDENTITY_PREFIX}`);
|
|
299
|
+
return findBundleFooter(source, NATIVE_APP_IDENTITY_PREFIX);
|
|
285
300
|
}
|
|
286
301
|
function readNativeAppIdentityFooter(source) {
|
|
287
302
|
const start = nativeAppIdentityFooterStart(source);
|
|
@@ -317,8 +332,7 @@ function insertNativeAppIdentityFooter(source, identity) {
|
|
|
317
332
|
const existing = nativeAppIdentityFooterStart(source);
|
|
318
333
|
const existingEnd = existing < 0 ? -1 : source.includes("\n", existing + 1) ? source.indexOf("\n", existing + 1) : -1;
|
|
319
334
|
const withoutExisting = existing < 0 ? source : source.slice(0, existing) + source.slice(existingEnd < 0 ? source.length : existingEnd);
|
|
320
|
-
const moduleFooter = withoutExisting
|
|
321
|
-
${METRO_MODULE_PATHS_PREFIX}`);
|
|
335
|
+
const moduleFooter = findBundleFooter(withoutExisting, METRO_MODULE_PATHS_PREFIX);
|
|
322
336
|
const footer = createNativeAppIdentityFooter(identity);
|
|
323
337
|
if (moduleFooter < 0) return withoutExisting + footer;
|
|
324
338
|
return withoutExisting.slice(0, moduleFooter) + footer + withoutExisting.slice(moduleFooter);
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
|
|
3
|
+
// src/bundleGlobalFooter.ts
|
|
4
|
+
function findBundleFooter(source, prefix) {
|
|
5
|
+
let end = source.length;
|
|
6
|
+
while (end > 0) {
|
|
7
|
+
const newline = source.lastIndexOf("\n", end - 1);
|
|
8
|
+
if (newline < 0) return -1;
|
|
9
|
+
const line = newline + 1;
|
|
10
|
+
if (source.startsWith(prefix, line)) return newline;
|
|
11
|
+
if (line !== end && !source.startsWith("globalThis.", line) && !source.startsWith("//", line)) {
|
|
12
|
+
return -1;
|
|
13
|
+
}
|
|
14
|
+
end = newline;
|
|
15
|
+
}
|
|
16
|
+
return -1;
|
|
17
|
+
}
|
|
2
18
|
|
|
3
19
|
// src/openstep-plist.ts
|
|
4
20
|
function parseOpenStepPlist(text) {
|
|
@@ -242,8 +258,7 @@ function createNativeAppIdentityFooter(identity) {
|
|
|
242
258
|
${NATIVE_APP_IDENTITY_PREFIX}${payload};`;
|
|
243
259
|
}
|
|
244
260
|
function nativeAppIdentityFooterStart(source) {
|
|
245
|
-
return source
|
|
246
|
-
${NATIVE_APP_IDENTITY_PREFIX}`);
|
|
261
|
+
return findBundleFooter(source, NATIVE_APP_IDENTITY_PREFIX);
|
|
247
262
|
}
|
|
248
263
|
function readNativeAppIdentityFooter(source) {
|
|
249
264
|
const start = nativeAppIdentityFooterStart(source);
|
|
@@ -279,8 +294,7 @@ function insertNativeAppIdentityFooter(source, identity) {
|
|
|
279
294
|
const existing = nativeAppIdentityFooterStart(source);
|
|
280
295
|
const existingEnd = existing < 0 ? -1 : source.includes("\n", existing + 1) ? source.indexOf("\n", existing + 1) : -1;
|
|
281
296
|
const withoutExisting = existing < 0 ? source : source.slice(0, existing) + source.slice(existingEnd < 0 ? source.length : existingEnd);
|
|
282
|
-
const moduleFooter = withoutExisting
|
|
283
|
-
${METRO_MODULE_PATHS_PREFIX}`);
|
|
297
|
+
const moduleFooter = findBundleFooter(withoutExisting, METRO_MODULE_PATHS_PREFIX);
|
|
284
298
|
const footer = createNativeAppIdentityFooter(identity);
|
|
285
299
|
if (moduleFooter < 0) return withoutExisting + footer;
|
|
286
300
|
return withoutExisting.slice(0, moduleFooter) + footer + withoutExisting.slice(moduleFooter);
|