peachsim 0.1.1843 → 0.1.1845
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/shell-url.ts +1 -1
- 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 +65 -29
- 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 +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +45 -19
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +69 -30
- 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 +207 -12
- 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 +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +207 -12
- package/dist-lib/native-app-identity-project.cjs +10 -5
- package/dist-lib/native-app-identity-project.mjs +10 -5
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- 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/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +269 -48
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- 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 +11 -3
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +1 -1
- package/package.json +1 -1
- package/src/expo-swift-host.ts +36 -12
- package/src/expoSwiftContract.ts +1 -0
- package/src/native-firebase-config.ts +268 -9
- package/src/nitro-dependencies.ts +14 -0
- package/src/turbo-source.ts +12 -3
- package/src/xcode-project.ts +23 -5
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1845 | (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);
|
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1845 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "1594a888c8d4d1f26bb06e522ccbdeecf314934063ac635eedd6f4938e0684fd", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -30797,6 +30797,7 @@ function rnDependencies(reactNativeVersion, reactNativeRoot) {
|
|
|
30797
30797
|
const minor = Number(/^0\.(\d+)\./.exec(reactNativeVersion)?.[1]);
|
|
30798
30798
|
if (minor >= 85) return RN_FMT_12_DEPENDENCIES;
|
|
30799
30799
|
if (minor >= 80) return RN_FMT_11_DEPENDENCIES;
|
|
30800
|
+
if (minor >= 78) return RN_FAST_FLOAT_6_DEPENDENCIES;
|
|
30800
30801
|
return [];
|
|
30801
30802
|
}
|
|
30802
30803
|
function directory(dependency) {
|
|
@@ -31011,7 +31012,7 @@ function glogSources() {
|
|
|
31011
31012
|
for (const unit2 of GLOG_UNITS) sources.push(read(unit2));
|
|
31012
31013
|
return sources;
|
|
31013
31014
|
}
|
|
31014
|
-
var import_node_child_process8, import_node_crypto6, import_node_fs13, import_node_path10, import_node_util2, run3, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FMT_12_DEPENDENCIES, HEADER, GLOG, GLOG_SUBSTITUTIONS, GLOG_CONFIGURE, GLOG_CONFIG_APPENDIX, GLOG_UNITS;
|
|
31015
|
+
var import_node_child_process8, import_node_crypto6, import_node_fs13, import_node_path10, import_node_util2, run3, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FAST_FLOAT_6_DEPENDENCIES, RN_FMT_12_DEPENDENCIES, HEADER, GLOG, GLOG_SUBSTITUTIONS, GLOG_CONFIGURE, GLOG_CONFIG_APPENDIX, GLOG_UNITS;
|
|
31015
31016
|
var init_nitro_dependencies = __esm({
|
|
31016
31017
|
"src/nitro-dependencies.ts"() {
|
|
31017
31018
|
"use strict";
|
|
@@ -31081,6 +31082,14 @@ var init_nitro_dependencies = __esm({
|
|
|
31081
31082
|
sourceDirectories: ["include/fmt", "src"]
|
|
31082
31083
|
}
|
|
31083
31084
|
];
|
|
31085
|
+
RN_FAST_FLOAT_6_DEPENDENCIES = RN_FMT_11_DEPENDENCIES.map(
|
|
31086
|
+
(dependency) => dependency.name === "fast_float" ? {
|
|
31087
|
+
...dependency,
|
|
31088
|
+
url: "https://github.com/fastfloat/fast_float/archive/v6.1.4.tar.gz",
|
|
31089
|
+
sha256: "12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704",
|
|
31090
|
+
prefix: "fast_float-6.1.4"
|
|
31091
|
+
} : dependency
|
|
31092
|
+
);
|
|
31084
31093
|
RN_FMT_12_DEPENDENCIES = [
|
|
31085
31094
|
...RN_SHARED_DEPENDENCIES,
|
|
31086
31095
|
{
|
|
@@ -54584,7 +54593,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
54584
54593
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
54585
54594
|
const nested = import_node_path45.default.join(projectRoot, "ios");
|
|
54586
54595
|
const iosRoot = import_node_fs47.default.existsSync(nested) ? nested : projectRoot;
|
|
54587
|
-
const
|
|
54596
|
+
const entries = import_node_fs47.default.readdirSync(iosRoot, { withFileTypes: true });
|
|
54597
|
+
const projects2 = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => import_node_path45.default.join(iosRoot, entry.name)) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => workspaceReferences(import_node_path45.default.join(iosRoot, entry.name))).filter(
|
|
54598
|
+
(xcodeproj2) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path45.default.sep).includes("Pods") && import_node_fs47.default.existsSync(xcodeproj2)
|
|
54599
|
+
).filter(
|
|
54600
|
+
(xcodeproj2) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
54601
|
+
)).map((xcodeproj2) => ({ xcodeproj: xcodeproj2, name: import_node_path45.default.basename(xcodeproj2) }));
|
|
54588
54602
|
if (projects2.length === 0) return null;
|
|
54589
54603
|
if (projects2.length > 1 && !iosTarget) {
|
|
54590
54604
|
throw new NativeAppTargetSelectionError(
|
|
@@ -54594,7 +54608,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
54594
54608
|
let project2 = projects2[0];
|
|
54595
54609
|
if (iosTarget && projects2.length > 1) {
|
|
54596
54610
|
const matches = projects2.filter(
|
|
54597
|
-
(entry) => listXcodeAppTargets(
|
|
54611
|
+
(entry) => listXcodeAppTargets(entry.xcodeproj, {
|
|
54598
54612
|
requireSources: false
|
|
54599
54613
|
}).includes(iosTarget)
|
|
54600
54614
|
);
|
|
@@ -54606,7 +54620,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
54606
54620
|
);
|
|
54607
54621
|
project2 = matches[0];
|
|
54608
54622
|
}
|
|
54609
|
-
const xcodeproj =
|
|
54623
|
+
const xcodeproj = project2.xcodeproj;
|
|
54610
54624
|
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
54611
54625
|
let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
|
|
54612
54626
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
@@ -55751,8 +55765,25 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
55751
55765
|
import_node_fs48.default.rmSync(directory2, { recursive: true, force: true });
|
|
55752
55766
|
}
|
|
55753
55767
|
}
|
|
55754
|
-
function
|
|
55755
|
-
const
|
|
55768
|
+
function splitStatements(raw2) {
|
|
55769
|
+
const clean = stripComments(raw2);
|
|
55770
|
+
const blank = blankSwiftObjcLiterals(raw2);
|
|
55771
|
+
const statements = [];
|
|
55772
|
+
let depth = 0;
|
|
55773
|
+
let start = 0;
|
|
55774
|
+
for (let index = 0; index < blank.length; index++) {
|
|
55775
|
+
const char = blank[index];
|
|
55776
|
+
if (char === "{" || char === "(" || char === "[") depth += 1;
|
|
55777
|
+
if (char === "}" || char === ")" || char === "]") depth -= 1;
|
|
55778
|
+
if (char === ";" && depth === 0 || char === "}" && depth === 0) {
|
|
55779
|
+
statements.push(clean.slice(start, index + (char === "}" ? 1 : 0)).trim());
|
|
55780
|
+
start = index + 1;
|
|
55781
|
+
}
|
|
55782
|
+
}
|
|
55783
|
+
statements.push(clean.slice(start).trim());
|
|
55784
|
+
return statements.filter(Boolean);
|
|
55785
|
+
}
|
|
55786
|
+
function splitClauses(condition) {
|
|
55756
55787
|
const clauses = [];
|
|
55757
55788
|
let depth = 0;
|
|
55758
55789
|
let start = 0;
|
|
@@ -55769,11 +55800,158 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
55769
55800
|
}
|
|
55770
55801
|
}
|
|
55771
55802
|
clauses.push(condition.slice(start).trim());
|
|
55772
|
-
|
|
55773
|
-
|
|
55803
|
+
return clauses;
|
|
55804
|
+
}
|
|
55805
|
+
function findHelper(type, name3, label, sources) {
|
|
55806
|
+
const found = [];
|
|
55807
|
+
for (const file of sources) {
|
|
55808
|
+
const raw2 = import_node_fs48.default.readFileSync(file, "utf8");
|
|
55809
|
+
const blank = blankSwiftObjcLiterals(raw2);
|
|
55810
|
+
if (file.endsWith(".swift") && label === void 0) {
|
|
55811
|
+
const owners = type ? [
|
|
55812
|
+
...blank.matchAll(
|
|
55813
|
+
new RegExp(`\\b(?:enum|struct|class|extension)\\s+${type}\\b[^{]*\\{`, "g")
|
|
55814
|
+
)
|
|
55815
|
+
].flatMap((match) => {
|
|
55816
|
+
const owner = braceBlock(blank, match.index + match[0].length - 1);
|
|
55817
|
+
return owner ? [{ text: owner.body, offset: match.index + match[0].length }] : [];
|
|
55818
|
+
}) : [{ text: blank, offset: 0 }];
|
|
55819
|
+
for (const owner of owners) {
|
|
55820
|
+
const declaration = new RegExp(
|
|
55821
|
+
`${type ? "\\b(?:static|class)\\s+" : ""}func\\s+${name3}\\s*\\(\\s*\\)\\s*->\\s*Bool\\s*\\{`
|
|
55822
|
+
).exec(owner.text);
|
|
55823
|
+
const block2 = declaration ? braceBlock(
|
|
55824
|
+
blank,
|
|
55825
|
+
owner.offset + declaration.index + declaration[0].length - 1
|
|
55826
|
+
) : null;
|
|
55827
|
+
if (block2)
|
|
55828
|
+
found.push({
|
|
55829
|
+
body: raw2.slice(
|
|
55830
|
+
owner.offset + declaration.index + declaration[0].length,
|
|
55831
|
+
block2.end - 1
|
|
55832
|
+
),
|
|
55833
|
+
language: "swift",
|
|
55834
|
+
parameter: null,
|
|
55835
|
+
constants: /* @__PURE__ */ new Map()
|
|
55836
|
+
});
|
|
55837
|
+
}
|
|
55838
|
+
}
|
|
55839
|
+
if (/\.mm?$/.test(file) && type) {
|
|
55840
|
+
const implementation = new RegExp(`@implementation\\s+${type}\\b`).exec(blank);
|
|
55841
|
+
const end = implementation ? blank.indexOf("@end", implementation.index) : -1;
|
|
55842
|
+
if (!implementation || end < 0) continue;
|
|
55843
|
+
const suffix = label === void 0 ? "" : `${label[0].toUpperCase()}${label.slice(1)}\\w*`;
|
|
55844
|
+
const declaration = new RegExp(
|
|
55845
|
+
label === void 0 ? `^\\s*\\+\\s*\\(\\s*BOOL\\s*\\)\\s*${name3}\\s*\\{` : `^\\s*\\+\\s*\\(\\s*BOOL\\s*\\)\\s*${name3}${suffix}\\s*:\\s*\\(\\s*NSBundle\\s*\\*\\s*\\)\\s*(\\w+)\\s*\\{`,
|
|
55846
|
+
"m"
|
|
55847
|
+
).exec(blank.slice(implementation.index, end));
|
|
55848
|
+
if (!declaration) continue;
|
|
55849
|
+
const open = implementation.index + declaration.index + declaration[0].length - 1;
|
|
55850
|
+
const block2 = braceBlock(blank, open);
|
|
55851
|
+
if (!block2) continue;
|
|
55852
|
+
const constants = /* @__PURE__ */ new Map();
|
|
55853
|
+
for (const constant of stripComments(raw2).matchAll(
|
|
55854
|
+
/\bNSString\s*\*\s*const\s+(\w+)\s*=\s*@"([^"]*)"\s*;/g
|
|
55855
|
+
))
|
|
55856
|
+
constants.set(constant[1], constant[2]);
|
|
55857
|
+
found.push({
|
|
55858
|
+
body: raw2.slice(open + 1, block2.end - 1),
|
|
55859
|
+
language: "objc",
|
|
55860
|
+
parameter: declaration[1] ?? null,
|
|
55861
|
+
constants
|
|
55862
|
+
});
|
|
55863
|
+
}
|
|
55864
|
+
}
|
|
55865
|
+
return found.length === 1 ? found[0] : null;
|
|
55866
|
+
}
|
|
55867
|
+
function evaluateHelperCall(expression, scope2, depth) {
|
|
55868
|
+
if (depth >= HELPER_DEPTH) return null;
|
|
55869
|
+
const call = /^(?:self\s*\.\s*)?(?:([A-Z]\w*)\s*\.\s*)?(\w+)\s*\(\s*(?:(\w+)\s*:\s*Bundle\.main)?\s*\)$/.exec(
|
|
55870
|
+
expression
|
|
55774
55871
|
);
|
|
55872
|
+
if (!call) return null;
|
|
55873
|
+
const helper = findHelper(call[1], call[2], call[3], scope2.sources);
|
|
55874
|
+
if (!helper) return null;
|
|
55875
|
+
return helper.language === "swift" ? evaluateSwiftBody(helper.body, scope2, depth + 1) : evaluateObjcBody(helper.body, helper.parameter, helper.constants, scope2);
|
|
55876
|
+
}
|
|
55877
|
+
function evaluateSwiftBody(body, scope2, depth) {
|
|
55775
55878
|
const bound = /* @__PURE__ */ new Map();
|
|
55879
|
+
for (const statement of splitStatements(body)) {
|
|
55880
|
+
const result = /^return\s+([\s\S]+)$/.exec(statement);
|
|
55881
|
+
if (result) return evaluateClauses([result[1].trim()], scope2, bound, depth);
|
|
55882
|
+
const branch = /^(if|guard)\b([\s\S]*?)(?:\belse\b)?\s*\{\s*return\s+(true|false)\s*\}$/.exec(
|
|
55883
|
+
statement
|
|
55884
|
+
);
|
|
55885
|
+
if (!branch) return null;
|
|
55886
|
+
const holds = evaluateClauses(splitClauses(branch[2]), scope2, bound, depth);
|
|
55887
|
+
if (holds === null) return null;
|
|
55888
|
+
if (holds === (branch[1] === "if")) return branch[3] === "true";
|
|
55889
|
+
}
|
|
55890
|
+
return null;
|
|
55891
|
+
}
|
|
55892
|
+
function evaluateObjcBody(body, bundle, constants, scope2) {
|
|
55893
|
+
const plists = scope2.resources.filter(
|
|
55894
|
+
(file) => import_node_path46.default.basename(file) === "GoogleService-Info.plist"
|
|
55895
|
+
);
|
|
55896
|
+
const variables = /* @__PURE__ */ new Map();
|
|
55897
|
+
const literal4 = (text6) => {
|
|
55898
|
+
const quoted = /^@"([^"]*)"$/.exec(text6.trim());
|
|
55899
|
+
return quoted ? quoted[1] : constants.get(text6.trim());
|
|
55900
|
+
};
|
|
55901
|
+
const truthy2 = (name3) => {
|
|
55902
|
+
const value = variables.get(name3);
|
|
55903
|
+
return typeof value === "string" ? value.length > 0 : value !== void 0;
|
|
55904
|
+
};
|
|
55905
|
+
for (const statement of splitStatements(body)) {
|
|
55906
|
+
if (/^return\s+YES$/.test(statement)) return true;
|
|
55907
|
+
if (/^return\s+NO$/.test(statement)) return false;
|
|
55908
|
+
const early = /^if\s*\(\s*(!?)\s*(\w+)(\.length)?\s*\)\s*\{?\s*return\s+(YES|NO)\s*;?\s*\}?$/.exec(
|
|
55909
|
+
statement
|
|
55910
|
+
);
|
|
55911
|
+
if (early) {
|
|
55912
|
+
if (!variables.has(early[2])) return null;
|
|
55913
|
+
if (early[1] === "!" === !truthy2(early[2])) return early[4] === "YES";
|
|
55914
|
+
continue;
|
|
55915
|
+
}
|
|
55916
|
+
const declaration = /^(?:NSString|NSDictionary)\s*\*\s*(\w+)\s*=\s*([\s\S]+)$/.exec(
|
|
55917
|
+
statement
|
|
55918
|
+
);
|
|
55919
|
+
if (!declaration) return null;
|
|
55920
|
+
const name3 = declaration[1];
|
|
55921
|
+
const value = declaration[2];
|
|
55922
|
+
const bundlePath = new RegExp(`^${bundle}\\.bundlePath$`).exec(value.trim());
|
|
55923
|
+
const resource = new RegExp(
|
|
55924
|
+
`^\\[\\s*${bundle}\\s+pathForResource:\\s*([^\\s]+)\\s+ofType:\\s*([^\\s\\]]+)\\s*\\]$`
|
|
55925
|
+
).exec(value.trim());
|
|
55926
|
+
const dictionary2 = /^\[\s*NSDictionary\s+dictionaryWithContentsOfFile:\s*(\w+)\s*\]$/.exec(
|
|
55927
|
+
value.trim()
|
|
55928
|
+
);
|
|
55929
|
+
const entry = /^(\w+)\s*\[\s*([^\]\s]+)\s*\]$/.exec(value.trim());
|
|
55930
|
+
if (bundle && bundlePath) variables.set(name3, "main bundle");
|
|
55931
|
+
else if (bundle && resource) {
|
|
55932
|
+
if (literal4(resource[1]) !== "GoogleService-Info" || literal4(resource[2]) !== "plist")
|
|
55933
|
+
return null;
|
|
55934
|
+
variables.set(name3, plists.length === 1 ? plists[0] : void 0);
|
|
55935
|
+
} else if (dictionary2 && variables.has(dictionary2[1])) {
|
|
55936
|
+
const file = variables.get(dictionary2[1]);
|
|
55937
|
+
const parsed = typeof file === "string" ? parsePlistSource(import_node_fs48.default.readFileSync(file, "utf8")) : void 0;
|
|
55938
|
+
variables.set(name3, isRecord(parsed) ? parsed : void 0);
|
|
55939
|
+
} else if (entry && variables.has(entry[1])) {
|
|
55940
|
+
const key2 = literal4(entry[2]);
|
|
55941
|
+
const source = variables.get(entry[1]);
|
|
55942
|
+
if (key2 === void 0) return null;
|
|
55943
|
+
variables.set(name3, isRecord(source) ? source[key2] : void 0);
|
|
55944
|
+
} else return null;
|
|
55945
|
+
}
|
|
55946
|
+
return null;
|
|
55947
|
+
}
|
|
55948
|
+
function evaluateClauses(clauses, scope2, bound, depth) {
|
|
55949
|
+
const sources = scope2.resources.filter(
|
|
55950
|
+
(file) => import_node_path46.default.basename(file) === "GoogleService-Info.plist"
|
|
55951
|
+
);
|
|
55776
55952
|
for (const clause of clauses) {
|
|
55953
|
+
if (clause === "true") continue;
|
|
55954
|
+
if (clause === "false") return false;
|
|
55777
55955
|
if (/^FirebaseApp\s*\.\s*app\s*\(\s*\)\s*==\s*nil$/.test(clause)) continue;
|
|
55778
55956
|
const resource = /^let\s+(\w+)\s*=\s*Bundle\.main\.path\s*\(\s*forResource:\s*"GoogleService-Info"\s*,\s*ofType:\s*"plist"\s*\)$/.exec(
|
|
55779
55957
|
clause
|
|
@@ -55808,10 +55986,17 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
55808
55986
|
if (!subject.startsWith(prefix[2])) return false;
|
|
55809
55987
|
continue;
|
|
55810
55988
|
}
|
|
55811
|
-
|
|
55989
|
+
const negated = clause.startsWith("!");
|
|
55990
|
+
const called = evaluateHelperCall(clause.replace(/^!\s*/, ""), scope2, depth);
|
|
55991
|
+
if (called === null) return null;
|
|
55992
|
+
if (called === negated) return false;
|
|
55812
55993
|
}
|
|
55813
55994
|
return true;
|
|
55814
55995
|
}
|
|
55996
|
+
function evaluateFirebaseGuard(header, scope2) {
|
|
55997
|
+
const condition = header.replace(/^\s*if\b/, "").replace(/\{\s*$/, "");
|
|
55998
|
+
return evaluateClauses(splitClauses(condition), scope2, /* @__PURE__ */ new Map(), 0);
|
|
55999
|
+
}
|
|
55815
56000
|
function blankSwiftObjcLiterals(raw2) {
|
|
55816
56001
|
return raw2.replace(
|
|
55817
56002
|
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
@@ -55950,7 +56135,13 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
55950
56135
|
if (nesting === 0) topLevelBefore += token;
|
|
55951
56136
|
if (token === "}") nesting -= 1;
|
|
55952
56137
|
}
|
|
55953
|
-
const guarded = guard === null ? true : evaluateFirebaseGuard(guard,
|
|
56138
|
+
const guarded = guard === null ? true : evaluateFirebaseGuard(guard, {
|
|
56139
|
+
resources: app.resources,
|
|
56140
|
+
sources: [
|
|
56141
|
+
...app.allSources,
|
|
56142
|
+
...app.frameworks.flatMap((framework) => framework.allSources)
|
|
56143
|
+
]
|
|
56144
|
+
});
|
|
55954
56145
|
if (guarded === null || depth !== 1 || conditionalDepth !== 0 || /\b(?:return|throw)\b/.test(topLevelBefore))
|
|
55955
56146
|
throw new Error(
|
|
55956
56147
|
"native Firebase initialization must be unconditional in the app launch method"
|
|
@@ -56051,7 +56242,7 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
56051
56242
|
}
|
|
56052
56243
|
return result;
|
|
56053
56244
|
}
|
|
56054
|
-
var import_node_child_process29, import_node_fs48, import_node_module3, import_node_os15, import_node_path46, EXPO_CONFIG_SCRIPT, resultDirectory;
|
|
56245
|
+
var import_node_child_process29, import_node_fs48, import_node_module3, import_node_os15, import_node_path46, EXPO_CONFIG_SCRIPT, resultDirectory, HELPER_DEPTH, stripComments;
|
|
56055
56246
|
var init_native_firebase_config = __esm({
|
|
56056
56247
|
"src/native-firebase-config.ts"() {
|
|
56057
56248
|
"use strict";
|
|
@@ -56081,6 +56272,11 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
56081
56272
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
56082
56273
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
56083
56274
|
resultDirectory = () => import_node_fs48.default.mkdtempSync(import_node_path46.default.join(import_node_os15.default.tmpdir(), "peach-expo-config-"));
|
|
56275
|
+
HELPER_DEPTH = 3;
|
|
56276
|
+
stripComments = (raw2) => raw2.replace(
|
|
56277
|
+
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
56278
|
+
(token) => token.startsWith('"') ? token : token.replace(/[^\n]/g, " ")
|
|
56279
|
+
);
|
|
56084
56280
|
}
|
|
56085
56281
|
});
|
|
56086
56282
|
|
|
@@ -59443,7 +59639,7 @@ var init_swift_standin_digest = __esm({
|
|
|
59443
59639
|
import_node_path58 = __toESM(require("node:path"), 1);
|
|
59444
59640
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
59445
59641
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
59446
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
59642
|
+
STANDIN_SOURCE_DIGEST = true ? "1fd57281ceaf1317ebbd3df4334dd41fce5931f51ce3a48d3b2870e4e9670d8c" : standinSourceDigest();
|
|
59447
59643
|
}
|
|
59448
59644
|
});
|
|
59449
59645
|
|
|
@@ -63304,7 +63500,7 @@ var init_swift_objc_compile = __esm({
|
|
|
63304
63500
|
});
|
|
63305
63501
|
|
|
63306
63502
|
// src/react-native-bridge-modules.ts
|
|
63307
|
-
function
|
|
63503
|
+
function stripComments2(source) {
|
|
63308
63504
|
let out = "";
|
|
63309
63505
|
let i = 0;
|
|
63310
63506
|
while (i < source.length) {
|
|
@@ -63391,7 +63587,7 @@ function parseObjectiveCModules(sources) {
|
|
|
63391
63587
|
declarations.implementations.get(className)?.add(selector);
|
|
63392
63588
|
};
|
|
63393
63589
|
for (const { file, text: text6 } of sources) {
|
|
63394
|
-
const source =
|
|
63590
|
+
const source = stripComments2(text6);
|
|
63395
63591
|
let owner = null;
|
|
63396
63592
|
const closeImplementation = (end) => {
|
|
63397
63593
|
if (!owner?.implementation) return;
|
|
@@ -70644,7 +70840,7 @@ function codegenSpecRoot(codegen) {
|
|
|
70644
70840
|
return import_node_fs75.default.existsSync(nested) ? nested : codegen;
|
|
70645
70841
|
}
|
|
70646
70842
|
function registersReactModule(source) {
|
|
70647
|
-
const stripped2 =
|
|
70843
|
+
const stripped2 = stripComments3(source);
|
|
70648
70844
|
return OBJC_BRIDGE.test(stripped2) && !/-Swift\.h\b/.test(stripped2);
|
|
70649
70845
|
}
|
|
70650
70846
|
function fabricComponents(root) {
|
|
@@ -71044,11 +71240,11 @@ function podPublicHeaders(pod, files2) {
|
|
|
71044
71240
|
})
|
|
71045
71241
|
);
|
|
71046
71242
|
}
|
|
71047
|
-
function
|
|
71243
|
+
function stripComments3(text6) {
|
|
71048
71244
|
return text6.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
|
|
71049
71245
|
}
|
|
71050
71246
|
function transcribeLoad(text6, file) {
|
|
71051
|
-
const code =
|
|
71247
|
+
const code = stripComments3(text6);
|
|
71052
71248
|
const refuse2 = (why) => new Error(
|
|
71053
71249
|
`${file}: ${why}; Objective-C TurboModule sources need the Objective-C runtime`
|
|
71054
71250
|
);
|
|
@@ -71091,7 +71287,7 @@ function viewManagers(root, files2) {
|
|
|
71091
71287
|
const classes = /* @__PURE__ */ new Map();
|
|
71092
71288
|
for (const file of files2) {
|
|
71093
71289
|
if (!HEADER3.test(file) && !OBJC2.test(file)) continue;
|
|
71094
|
-
const text6 =
|
|
71290
|
+
const text6 = stripComments3(import_node_fs75.default.readFileSync(import_node_path72.default.join(root, file), "utf8"));
|
|
71095
71291
|
for (const [, name3, parent] of text6.matchAll(/@interface\s+(\w+)\s*:\s*(\w+)/g))
|
|
71096
71292
|
classes.set(name3, parent);
|
|
71097
71293
|
for (const [, name3, parent] of text6.matchAll(
|
|
@@ -71119,7 +71315,7 @@ function registers(root, files2, objc = true) {
|
|
|
71119
71315
|
if (!UNIT.test(file) && !OBJC2.test(file)) continue;
|
|
71120
71316
|
const text6 = import_node_fs75.default.readFileSync(import_node_path72.default.join(root, file), "utf8");
|
|
71121
71317
|
if (text6.includes(REGISTRATION)) return true;
|
|
71122
|
-
const stripped2 =
|
|
71318
|
+
const stripped2 = stripComments3(text6);
|
|
71123
71319
|
if (objc && OBJC2.test(file) && !CODEGEN_OBJC.test(text6) && (OBJC_TURBO.test(stripped2) || OBJC_BRIDGE.test(stripped2) && ![...stripped2.matchAll(/@implementation\s+(\w+)/g)].some(
|
|
71124
71320
|
([, name3]) => managers.has(name3)
|
|
71125
71321
|
)))
|
|
@@ -71206,6 +71402,7 @@ async function collectTurboSources(options) {
|
|
|
71206
71402
|
(provider) => readPod(provider, options.appRoot, options.installedPods?.get(provider.name))
|
|
71207
71403
|
);
|
|
71208
71404
|
let codegen = null;
|
|
71405
|
+
let moduleProviders = false;
|
|
71209
71406
|
const installedCodegenNames = new Set(
|
|
71210
71407
|
installedHeaderPods.flatMap((pod) => {
|
|
71211
71408
|
const manifest = JSON.parse(
|
|
@@ -71535,7 +71732,7 @@ async function collectTurboSources(options) {
|
|
|
71535
71732
|
resolveDependency(include);
|
|
71536
71733
|
};
|
|
71537
71734
|
const scanText = (from, text6, dependency = false) => {
|
|
71538
|
-
for (const [, quote, name3] of
|
|
71735
|
+
for (const [, quote, name3] of stripComments3(text6).matchAll(
|
|
71539
71736
|
/^\s*#\s*(?:include|import)\s*([<"])([^>"\n]+)[>"]/gm
|
|
71540
71737
|
)) {
|
|
71541
71738
|
if (!dependency) resolve13(from, name3, quote === '"');
|
|
@@ -71717,7 +71914,7 @@ async function collectTurboSources(options) {
|
|
|
71717
71914
|
else {
|
|
71718
71915
|
sources.push(file);
|
|
71719
71916
|
providerObjC = true;
|
|
71720
|
-
const stripped2 =
|
|
71917
|
+
const stripped2 = stripComments3(text6);
|
|
71721
71918
|
if (OBJC_TURBO.test(stripped2) || OBJC_BRIDGE.test(stripped2)) {
|
|
71722
71919
|
const registers2 = OBJC_REGISTERED.test(stripped2);
|
|
71723
71920
|
for (const [, className] of stripped2.matchAll(/@implementation\s+(\w+)/g))
|
|
@@ -72074,6 +72271,7 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
72074
72271
|
codegen ??= (await runInstalledTurboCodegen(options.appRoot, options.codegenDir)).generatedRoot;
|
|
72075
72272
|
const generated = codegenSpecRoot(codegen);
|
|
72076
72273
|
if (import_node_fs75.default.existsSync(import_node_path72.default.join(generated, "RCTModuleProviders.mm"))) {
|
|
72274
|
+
moduleProviders = true;
|
|
72077
72275
|
original(TURBO_CORE_TARGET, "ReactCodegen", generated, "RCTModuleProviders.mm");
|
|
72078
72276
|
alias(
|
|
72079
72277
|
`${core}/include/ReactCodegen/RCTModuleProviders.h`,
|
|
@@ -72137,7 +72335,8 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
72137
72335
|
[...objcClasses].sort(),
|
|
72138
72336
|
[...unregisteredObjcClasses].sort(),
|
|
72139
72337
|
decoratorHasPerformanceLogger,
|
|
72140
|
-
managerHasDevMenuDecorator
|
|
72338
|
+
managerHasDevMenuDecorator,
|
|
72339
|
+
moduleProviders
|
|
72141
72340
|
) : turboHostSource(withRuntime)
|
|
72142
72341
|
);
|
|
72143
72342
|
scanText(
|
|
@@ -72238,7 +72437,7 @@ extern "C" __attribute__((export_name("peach_turbo_module_names"))) const char*
|
|
|
72238
72437
|
}
|
|
72239
72438
|
`;
|
|
72240
72439
|
}
|
|
72241
|
-
function turboObjCHostSource(objcClasses, unregisteredClasses, decoratorHasPerformanceLogger, managerHasDevMenuDecorator) {
|
|
72440
|
+
function turboObjCHostSource(objcClasses, unregisteredClasses, decoratorHasPerformanceLogger, managerHasDevMenuDecorator, moduleProviders) {
|
|
72242
72441
|
const classNamesList = objcClasses.map((name3) => `@${JSON.stringify(name3)}`).join(", ");
|
|
72243
72442
|
const unregisteredList = unregisteredClasses.map((name3) => `@${JSON.stringify(name3)}`).join(", ");
|
|
72244
72443
|
return `// React Native's RCTTurboModuleManager on the process's JSI runtime, set up
|
|
@@ -72259,7 +72458,7 @@ function turboObjCHostSource(objcClasses, unregisteredClasses, decoratorHasPerfo
|
|
|
72259
72458
|
${decoratorHasPerformanceLogger ? "#import <React/RCTPerformanceLogger.h>" : ""}
|
|
72260
72459
|
#import <React/RCTBridgeModule.h>
|
|
72261
72460
|
#import <React/RCTEventDispatcherProtocol.h>
|
|
72262
|
-
#import <ReactCodegen/RCTModuleProviders.h>
|
|
72461
|
+
${moduleProviders ? "#import <ReactCodegen/RCTModuleProviders.h>" : ""}
|
|
72263
72462
|
#import <ReactCommon/CxxTurboModuleUtils.h>
|
|
72264
72463
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
72265
72464
|
#include <os/log.h>
|
|
@@ -72502,10 +72701,11 @@ static RCTTurboModuleManager *manager;
|
|
|
72502
72701
|
return module;
|
|
72503
72702
|
}
|
|
72504
72703
|
|
|
72505
|
-
|
|
72704
|
+
${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)name
|
|
72506
72705
|
{
|
|
72507
72706
|
return RCTModuleProviders.moduleProviders[@(name)];
|
|
72508
72707
|
}
|
|
72708
|
+
` : ""}
|
|
72509
72709
|
|
|
72510
72710
|
- (std::shared_ptr<react::TurboModule>)getTurboModule:(const std::string &)name
|
|
72511
72711
|
jsInvoker:(std::shared_ptr<react::CallInvoker>)jsInvoker
|
|
@@ -72593,7 +72793,7 @@ extern "C" __attribute__((export_name("peach_turbo_module_names"))) const char*
|
|
|
72593
72793
|
NSMutableOrderedSet<NSString *> *found = [NSMutableOrderedSet new];
|
|
72594
72794
|
for (const auto& [name, provider] : react::globalExportedCxxTurboModuleMap())
|
|
72595
72795
|
[found addObject:@(name.c_str())];
|
|
72596
|
-
[found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];
|
|
72796
|
+
${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];" : ""}
|
|
72597
72797
|
for (Class moduleClass in RCTGetModuleClasses())
|
|
72598
72798
|
if (moduleClass != [PeachTurboRegistry class] &&
|
|
72599
72799
|
moduleClass != [PeachImageURLLoading class] &&
|
|
@@ -72999,12 +73199,12 @@ async function witnessMatches(witness) {
|
|
|
72999
73199
|
}
|
|
73000
73200
|
return true;
|
|
73001
73201
|
}
|
|
73002
|
-
async function discoveryKey(root, installedWorkspace, prepareNative) {
|
|
73202
|
+
async function discoveryKey(root, installedWorkspace, prepareNative, iosTarget) {
|
|
73003
73203
|
const [config, expoConfig] = await Promise.all([
|
|
73004
73204
|
loadRNXAppConfig(resolveAppProject(root)),
|
|
73005
73205
|
readExpoConfigAsync(root)
|
|
73006
73206
|
]);
|
|
73007
|
-
return `${import_node_fs76.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
|
|
73207
|
+
return `${import_node_fs76.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
|
|
73008
73208
|
}
|
|
73009
73209
|
function cloneNativeTarget(target) {
|
|
73010
73210
|
return {
|
|
@@ -73356,17 +73556,18 @@ ${source}` : source;
|
|
|
73356
73556
|
}
|
|
73357
73557
|
for (const unit2 of units) unit2.nativeFiles = { ...unit2.nativeFiles, ...support };
|
|
73358
73558
|
}
|
|
73359
|
-
async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prepareNative = false) {
|
|
73559
|
+
async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prepareNative = false, iosTarget) {
|
|
73360
73560
|
if (traceStore.getStore())
|
|
73361
73561
|
return collectExpoSwiftSourcesUncached(
|
|
73362
73562
|
appRoot,
|
|
73363
73563
|
signal,
|
|
73364
73564
|
installedWorkspace,
|
|
73365
|
-
prepareNative
|
|
73565
|
+
prepareNative,
|
|
73566
|
+
iosTarget
|
|
73366
73567
|
);
|
|
73367
73568
|
signal?.throwIfAborted();
|
|
73368
73569
|
installSwiftInputTrace();
|
|
73369
|
-
const key2 = await discoveryKey(appRoot, installedWorkspace, prepareNative);
|
|
73570
|
+
const key2 = await discoveryKey(appRoot, installedWorkspace, prepareNative, iosTarget);
|
|
73370
73571
|
const cached4 = discoveryCache.get(key2);
|
|
73371
73572
|
if (cached4 && await witnessMatches(cached4.witness)) {
|
|
73372
73573
|
signal?.throwIfAborted();
|
|
@@ -73375,13 +73576,19 @@ async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prep
|
|
|
73375
73576
|
const witness = { marks: /* @__PURE__ */ new Map(), tainted: false };
|
|
73376
73577
|
const units = await traceStore.run(
|
|
73377
73578
|
witness,
|
|
73378
|
-
() => collectExpoSwiftSourcesUncached(
|
|
73579
|
+
() => collectExpoSwiftSourcesUncached(
|
|
73580
|
+
appRoot,
|
|
73581
|
+
signal,
|
|
73582
|
+
installedWorkspace,
|
|
73583
|
+
prepareNative,
|
|
73584
|
+
iosTarget
|
|
73585
|
+
)
|
|
73379
73586
|
);
|
|
73380
73587
|
if (witness.marks.size > 0 && await witnessMatches(witness))
|
|
73381
73588
|
discoveryCache.set(key2, { witness, units: cloneUnits(units) });
|
|
73382
73589
|
return cloneUnits(units);
|
|
73383
73590
|
}
|
|
73384
|
-
async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspace, prepareNative = false) {
|
|
73591
|
+
async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspace, prepareNative = false, iosTarget) {
|
|
73385
73592
|
const started = performance.now();
|
|
73386
73593
|
const report = (message) => console.error(`[expo-swift ${Math.round(performance.now() - started)}ms] ${message}`);
|
|
73387
73594
|
signal?.throwIfAborted();
|
|
@@ -73470,12 +73677,13 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
73470
73677
|
const module2 = await resolveSwiftModule({ signal });
|
|
73471
73678
|
moduleRoot = module2.root;
|
|
73472
73679
|
provided = new Set(swiftPeachModules(module2.root));
|
|
73473
|
-
await prepareXcodeSwiftPackages(installedWorkspace,
|
|
73680
|
+
await prepareXcodeSwiftPackages(installedWorkspace, iosTarget, void 0, signal);
|
|
73474
73681
|
moduleRoot = module2.root;
|
|
73475
73682
|
provided = new Set(swiftPeachModules(module2.root));
|
|
73476
73683
|
const snapshot = await withXcodeProject(
|
|
73477
73684
|
installedWorkspace,
|
|
73478
73685
|
{
|
|
73686
|
+
target: iosTarget,
|
|
73479
73687
|
configuration: "Debug",
|
|
73480
73688
|
interfaceRoot: module2.root,
|
|
73481
73689
|
moduleRoot: module2.root,
|
|
@@ -73562,8 +73770,14 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
73562
73770
|
);
|
|
73563
73771
|
continue;
|
|
73564
73772
|
}
|
|
73565
|
-
const prepared = await prepareExpoNativeWorkspace(appRoot, signal);
|
|
73566
|
-
return collectExpoSwiftSources(
|
|
73773
|
+
const prepared = await prepareExpoNativeWorkspace(appRoot, signal, iosTarget);
|
|
73774
|
+
return collectExpoSwiftSources(
|
|
73775
|
+
prepared.app,
|
|
73776
|
+
signal,
|
|
73777
|
+
prepared.workspace,
|
|
73778
|
+
false,
|
|
73779
|
+
iosTarget
|
|
73780
|
+
);
|
|
73567
73781
|
}
|
|
73568
73782
|
const declarations = [];
|
|
73569
73783
|
for (const descriptor of Array.isArray(modules) ? modules : []) {
|
|
@@ -73775,11 +73989,13 @@ ${import_node_fs76.default.readFileSync(source, "utf8")}`;
|
|
|
73775
73989
|
});
|
|
73776
73990
|
const cached4 = readExpoDiscovery(discovery.key);
|
|
73777
73991
|
if (cached4 !== void 0) return cached4;
|
|
73778
|
-
const prepared = await prepareExpoNativeWorkspace(appRoot, signal);
|
|
73992
|
+
const prepared = await prepareExpoNativeWorkspace(appRoot, signal, iosTarget);
|
|
73779
73993
|
const discovered = await collectExpoSwiftSources(
|
|
73780
73994
|
prepared.app,
|
|
73781
73995
|
signal,
|
|
73782
|
-
prepared.workspace
|
|
73996
|
+
prepared.workspace,
|
|
73997
|
+
false,
|
|
73998
|
+
iosTarget
|
|
73783
73999
|
);
|
|
73784
74000
|
const stored = writeExpoDiscovery({
|
|
73785
74001
|
key: discovery.key,
|
|
@@ -74060,7 +74276,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
74060
74276
|
installSwiftInputTrace();
|
|
74061
74277
|
let key2;
|
|
74062
74278
|
try {
|
|
74063
|
-
key2 = await discoveryKey(root, options.installedWorkspace, true);
|
|
74279
|
+
key2 = await discoveryKey(root, options.installedWorkspace, true, options.iosTarget);
|
|
74064
74280
|
} catch {
|
|
74065
74281
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
74066
74282
|
}
|
|
@@ -74095,7 +74311,8 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
74095
74311
|
root,
|
|
74096
74312
|
signal,
|
|
74097
74313
|
options.installedWorkspace,
|
|
74098
|
-
nativeWorkspaceAvailable()
|
|
74314
|
+
nativeWorkspaceAvailable(),
|
|
74315
|
+
options.iosTarget
|
|
74099
74316
|
);
|
|
74100
74317
|
signal.throwIfAborted();
|
|
74101
74318
|
const ios = import_node_path73.default.join(root, "ios");
|
|
@@ -74108,12 +74325,13 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
74108
74325
|
await ensureSwiftToolchain(signal);
|
|
74109
74326
|
const bridge = collectBridgeModuleSources(import_node_fs76.default.realpathSync(root), signal);
|
|
74110
74327
|
if (bridge && bridge.installedNamespaces.length > 0) {
|
|
74111
|
-
const workspace = options.installedWorkspace ?? (await prepareExpoNativeWorkspace(root, signal)).workspace;
|
|
74328
|
+
const workspace = options.installedWorkspace ?? (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).workspace;
|
|
74112
74329
|
const module3 = await resolveSwiftModule({ signal });
|
|
74113
|
-
await prepareXcodeSwiftPackages(workspace,
|
|
74330
|
+
await prepareXcodeSwiftPackages(workspace, options.iosTarget, void 0, signal);
|
|
74114
74331
|
await withXcodeProject(
|
|
74115
74332
|
workspace,
|
|
74116
74333
|
{
|
|
74334
|
+
target: options.iosTarget,
|
|
74117
74335
|
configuration: "Debug",
|
|
74118
74336
|
interfaceRoot: module3.root,
|
|
74119
74337
|
nativeModules: bridge.installedNamespaces
|
|
@@ -74595,7 +74813,8 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
74595
74813
|
res.end("Expo Swift request has no host");
|
|
74596
74814
|
return true;
|
|
74597
74815
|
}
|
|
74598
|
-
const
|
|
74816
|
+
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
74817
|
+
const flightKey = `${host2}\0${key2}\0${iosTarget ?? ""}`;
|
|
74599
74818
|
const prepared = openPreparations.take(
|
|
74600
74819
|
flightKey,
|
|
74601
74820
|
url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
|
|
@@ -74610,7 +74829,9 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
74610
74829
|
}
|
|
74611
74830
|
let pending = compiling.get(flightKey);
|
|
74612
74831
|
if (!pending) {
|
|
74613
|
-
pending = compileExpoSwiftModules(key2, `http://${host2}
|
|
74832
|
+
pending = compileExpoSwiftModules(key2, `http://${host2}`, void 0, {
|
|
74833
|
+
iosTarget
|
|
74834
|
+
}).finally(() => {
|
|
74614
74835
|
compiling.delete(flightKey);
|
|
74615
74836
|
});
|
|
74616
74837
|
compiling.set(flightKey, pending);
|
|
@@ -76432,7 +76653,7 @@ var init_nitro_superset = __esm({
|
|
|
76432
76653
|
init_swift_standin_digest();
|
|
76433
76654
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
76434
76655
|
packageVersion = (root) => JSON.parse((0, import_node_fs84.readFileSync)((0, import_node_path81.join)(root, "package.json"), "utf8")).version;
|
|
76435
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
76656
|
+
NITRO_COMPILER_DIGEST = true ? "46c9ec53b7f124c900190b26e640f0ebee0ac3c78438141107125e04700eb25e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
76436
76657
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
76437
76658
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
76438
76659
|
published = /* @__PURE__ */ new Map();
|
|
@@ -104381,7 +104602,7 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
104381
104602
|
);
|
|
104382
104603
|
expoStamped.searchParams.set(
|
|
104383
104604
|
"expoSwift",
|
|
104384
|
-
`${nativeAssetOrigin}/__peach/expo-swift?root=${encodeURIComponent(expoRoot)}`
|
|
104605
|
+
`${nativeAssetOrigin}/__peach/expo-swift?root=${encodeURIComponent(expoRoot)}${opts.iosTarget ? `&iosTarget=${encodeURIComponent(opts.iosTarget)}` : ""}`
|
|
104385
104606
|
);
|
|
104386
104607
|
const nitroConfiguration = bundle && new URL(bundle, nativeAssetOrigin).searchParams.get("dev") === "false" ? "Release" : "Debug";
|
|
104387
104608
|
expoStamped.searchParams.set(
|