peachsim 0.1.1844 → 0.1.1846
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 +80 -31
- 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 +46 -20
- 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 +84 -32
- 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 +224 -16
- 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 +224 -16
- package/dist-lib/native-app-identity-project.cjs +24 -6
- package/dist-lib/native-app-identity-project.mjs +24 -6
- 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 +287 -53
- 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/package.json +1 -1
- package/src/expo-swift-host.ts +42 -17
- package/src/expoSwiftContract.ts +1 -0
- package/src/native-firebase-config.ts +271 -12
- package/src/nitro-dependencies.ts +14 -0
- package/src/turbo-source.ts +12 -3
- package/src/xcode-project.ts +38 -7
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1846 | (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": "3f580bf7c3c1c248f7671cf5bd7131dc2bb11324d1e0c67dd559e0d4e4de3f6f", "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,25 @@ 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) => ({
|
|
54598
|
+
xcodeproj: import_node_path45.default.join(iosRoot, entry.name),
|
|
54599
|
+
workspace: null
|
|
54600
|
+
})) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
54601
|
+
const workspace = import_node_path45.default.join(iosRoot, entry.name);
|
|
54602
|
+
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
54603
|
+
xcodeproj: xcodeproj2,
|
|
54604
|
+
workspace
|
|
54605
|
+
}));
|
|
54606
|
+
}).filter(
|
|
54607
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path45.default.sep).includes("Pods") && import_node_fs47.default.existsSync(xcodeproj2)
|
|
54608
|
+
).filter(
|
|
54609
|
+
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
54610
|
+
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
54611
|
+
xcodeproj: xcodeproj2,
|
|
54612
|
+
workspace,
|
|
54613
|
+
name: import_node_path45.default.basename(xcodeproj2)
|
|
54614
|
+
}));
|
|
54588
54615
|
if (projects2.length === 0) return null;
|
|
54589
54616
|
if (projects2.length > 1 && !iosTarget) {
|
|
54590
54617
|
throw new NativeAppTargetSelectionError(
|
|
@@ -54594,7 +54621,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
54594
54621
|
let project2 = projects2[0];
|
|
54595
54622
|
if (iosTarget && projects2.length > 1) {
|
|
54596
54623
|
const matches = projects2.filter(
|
|
54597
|
-
(entry) => listXcodeAppTargets(
|
|
54624
|
+
(entry) => listXcodeAppTargets(entry.xcodeproj, {
|
|
54598
54625
|
requireSources: false
|
|
54599
54626
|
}).includes(iosTarget)
|
|
54600
54627
|
);
|
|
@@ -54606,7 +54633,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
54606
54633
|
);
|
|
54607
54634
|
project2 = matches[0];
|
|
54608
54635
|
}
|
|
54609
|
-
const xcodeproj =
|
|
54636
|
+
const xcodeproj = project2.xcodeproj;
|
|
54610
54637
|
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
54611
54638
|
let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
|
|
54612
54639
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
@@ -54625,7 +54652,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
54625
54652
|
}
|
|
54626
54653
|
if (!appTargets.includes(target))
|
|
54627
54654
|
throw new Error(`native app identity has no application target ${target}`);
|
|
54628
|
-
return { xcodeproj, target };
|
|
54655
|
+
return { xcodeproj, target, workspace: project2.workspace };
|
|
54629
54656
|
}
|
|
54630
54657
|
async function resolveXcodeSwiftPackages(input, signal, target, configuration) {
|
|
54631
54658
|
if (import_node_fs47.default.existsSync(workspaceResolvedFile(import_node_fs47.default.realpathSync(input)))) return;
|
|
@@ -55751,8 +55778,25 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
55751
55778
|
import_node_fs48.default.rmSync(directory2, { recursive: true, force: true });
|
|
55752
55779
|
}
|
|
55753
55780
|
}
|
|
55754
|
-
function
|
|
55755
|
-
const
|
|
55781
|
+
function splitStatements(raw2) {
|
|
55782
|
+
const clean = stripComments(raw2);
|
|
55783
|
+
const blank = blankSwiftObjcLiterals(raw2);
|
|
55784
|
+
const statements = [];
|
|
55785
|
+
let depth = 0;
|
|
55786
|
+
let start = 0;
|
|
55787
|
+
for (let index = 0; index < blank.length; index++) {
|
|
55788
|
+
const char = blank[index];
|
|
55789
|
+
if (char === "{" || char === "(" || char === "[") depth += 1;
|
|
55790
|
+
if (char === "}" || char === ")" || char === "]") depth -= 1;
|
|
55791
|
+
if (char === ";" && depth === 0 || char === "}" && depth === 0) {
|
|
55792
|
+
statements.push(clean.slice(start, index + (char === "}" ? 1 : 0)).trim());
|
|
55793
|
+
start = index + 1;
|
|
55794
|
+
}
|
|
55795
|
+
}
|
|
55796
|
+
statements.push(clean.slice(start).trim());
|
|
55797
|
+
return statements.filter(Boolean);
|
|
55798
|
+
}
|
|
55799
|
+
function splitClauses(condition) {
|
|
55756
55800
|
const clauses = [];
|
|
55757
55801
|
let depth = 0;
|
|
55758
55802
|
let start = 0;
|
|
@@ -55769,11 +55813,158 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
55769
55813
|
}
|
|
55770
55814
|
}
|
|
55771
55815
|
clauses.push(condition.slice(start).trim());
|
|
55772
|
-
|
|
55773
|
-
|
|
55816
|
+
return clauses;
|
|
55817
|
+
}
|
|
55818
|
+
function findHelper(type, name3, label, sources) {
|
|
55819
|
+
const found = [];
|
|
55820
|
+
for (const file of sources) {
|
|
55821
|
+
const raw2 = import_node_fs48.default.readFileSync(file, "utf8");
|
|
55822
|
+
const blank = blankSwiftObjcLiterals(raw2);
|
|
55823
|
+
if (file.endsWith(".swift") && label === void 0) {
|
|
55824
|
+
const owners = type ? [
|
|
55825
|
+
...blank.matchAll(
|
|
55826
|
+
new RegExp(`\\b(?:enum|struct|class|extension)\\s+${type}\\b[^{]*\\{`, "g")
|
|
55827
|
+
)
|
|
55828
|
+
].flatMap((match) => {
|
|
55829
|
+
const owner = braceBlock(blank, match.index + match[0].length - 1);
|
|
55830
|
+
return owner ? [{ text: owner.body, offset: match.index + match[0].length }] : [];
|
|
55831
|
+
}) : [{ text: blank, offset: 0 }];
|
|
55832
|
+
for (const owner of owners) {
|
|
55833
|
+
const declaration = new RegExp(
|
|
55834
|
+
`${type ? "\\b(?:static|class)\\s+" : ""}func\\s+${name3}\\s*\\(\\s*\\)\\s*->\\s*Bool\\s*\\{`
|
|
55835
|
+
).exec(owner.text);
|
|
55836
|
+
const block2 = declaration ? braceBlock(
|
|
55837
|
+
blank,
|
|
55838
|
+
owner.offset + declaration.index + declaration[0].length - 1
|
|
55839
|
+
) : null;
|
|
55840
|
+
if (block2)
|
|
55841
|
+
found.push({
|
|
55842
|
+
body: raw2.slice(
|
|
55843
|
+
owner.offset + declaration.index + declaration[0].length,
|
|
55844
|
+
block2.end - 1
|
|
55845
|
+
),
|
|
55846
|
+
language: "swift",
|
|
55847
|
+
parameter: null,
|
|
55848
|
+
constants: /* @__PURE__ */ new Map()
|
|
55849
|
+
});
|
|
55850
|
+
}
|
|
55851
|
+
}
|
|
55852
|
+
if (/\.mm?$/.test(file) && type) {
|
|
55853
|
+
const implementation = new RegExp(`@implementation\\s+${type}\\b`).exec(blank);
|
|
55854
|
+
const end = implementation ? blank.indexOf("@end", implementation.index) : -1;
|
|
55855
|
+
if (!implementation || end < 0) continue;
|
|
55856
|
+
const suffix = label === void 0 ? "" : `${label[0].toUpperCase()}${label.slice(1)}\\w*`;
|
|
55857
|
+
const declaration = new RegExp(
|
|
55858
|
+
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*\\{`,
|
|
55859
|
+
"m"
|
|
55860
|
+
).exec(blank.slice(implementation.index, end));
|
|
55861
|
+
if (!declaration) continue;
|
|
55862
|
+
const open = implementation.index + declaration.index + declaration[0].length - 1;
|
|
55863
|
+
const block2 = braceBlock(blank, open);
|
|
55864
|
+
if (!block2) continue;
|
|
55865
|
+
const constants = /* @__PURE__ */ new Map();
|
|
55866
|
+
for (const constant of stripComments(raw2).matchAll(
|
|
55867
|
+
/\bNSString\s*\*\s*const\s+(\w+)\s*=\s*@"([^"]*)"\s*;/g
|
|
55868
|
+
))
|
|
55869
|
+
constants.set(constant[1], constant[2]);
|
|
55870
|
+
found.push({
|
|
55871
|
+
body: raw2.slice(open + 1, block2.end - 1),
|
|
55872
|
+
language: "objc",
|
|
55873
|
+
parameter: declaration[1] ?? null,
|
|
55874
|
+
constants
|
|
55875
|
+
});
|
|
55876
|
+
}
|
|
55877
|
+
}
|
|
55878
|
+
return found.length === 1 ? found[0] : null;
|
|
55879
|
+
}
|
|
55880
|
+
function evaluateHelperCall(expression, scope2, depth) {
|
|
55881
|
+
if (depth >= HELPER_DEPTH) return null;
|
|
55882
|
+
const call = /^(?:self\s*\.\s*)?(?:([A-Z]\w*)\s*\.\s*)?(\w+)\s*\(\s*(?:(\w+)\s*:\s*Bundle\.main)?\s*\)$/.exec(
|
|
55883
|
+
expression
|
|
55774
55884
|
);
|
|
55885
|
+
if (!call) return null;
|
|
55886
|
+
const helper = findHelper(call[1], call[2], call[3], scope2.sources);
|
|
55887
|
+
if (!helper) return null;
|
|
55888
|
+
return helper.language === "swift" ? evaluateSwiftBody(helper.body, scope2, depth + 1) : evaluateObjcBody(helper.body, helper.parameter, helper.constants, scope2);
|
|
55889
|
+
}
|
|
55890
|
+
function evaluateSwiftBody(body, scope2, depth) {
|
|
55775
55891
|
const bound = /* @__PURE__ */ new Map();
|
|
55892
|
+
for (const statement of splitStatements(body)) {
|
|
55893
|
+
const result = /^return\s+([\s\S]+)$/.exec(statement);
|
|
55894
|
+
if (result) return evaluateClauses([result[1].trim()], scope2, bound, depth);
|
|
55895
|
+
const branch = /^(if|guard)\b([\s\S]*?)(?:\belse\b)?\s*\{\s*return\s+(true|false)\s*\}$/.exec(
|
|
55896
|
+
statement
|
|
55897
|
+
);
|
|
55898
|
+
if (!branch) return null;
|
|
55899
|
+
const holds = evaluateClauses(splitClauses(branch[2]), scope2, bound, depth);
|
|
55900
|
+
if (holds === null) return null;
|
|
55901
|
+
if (holds === (branch[1] === "if")) return branch[3] === "true";
|
|
55902
|
+
}
|
|
55903
|
+
return null;
|
|
55904
|
+
}
|
|
55905
|
+
function evaluateObjcBody(body, bundle, constants, scope2) {
|
|
55906
|
+
const plists = scope2.resources.filter(
|
|
55907
|
+
(file) => import_node_path46.default.basename(file) === "GoogleService-Info.plist"
|
|
55908
|
+
);
|
|
55909
|
+
const variables = /* @__PURE__ */ new Map();
|
|
55910
|
+
const literal4 = (text6) => {
|
|
55911
|
+
const quoted = /^@"([^"]*)"$/.exec(text6.trim());
|
|
55912
|
+
return quoted ? quoted[1] : constants.get(text6.trim());
|
|
55913
|
+
};
|
|
55914
|
+
const truthy2 = (name3) => {
|
|
55915
|
+
const value = variables.get(name3);
|
|
55916
|
+
return typeof value === "string" ? value.length > 0 : value !== void 0;
|
|
55917
|
+
};
|
|
55918
|
+
for (const statement of splitStatements(body)) {
|
|
55919
|
+
if (/^return\s+YES$/.test(statement)) return true;
|
|
55920
|
+
if (/^return\s+NO$/.test(statement)) return false;
|
|
55921
|
+
const early = /^if\s*\(\s*(!?)\s*(\w+)(\.length)?\s*\)\s*\{?\s*return\s+(YES|NO)\s*;?\s*\}?$/.exec(
|
|
55922
|
+
statement
|
|
55923
|
+
);
|
|
55924
|
+
if (early) {
|
|
55925
|
+
if (!variables.has(early[2])) return null;
|
|
55926
|
+
if (early[1] === "!" === !truthy2(early[2])) return early[4] === "YES";
|
|
55927
|
+
continue;
|
|
55928
|
+
}
|
|
55929
|
+
const declaration = /^(?:NSString|NSDictionary)\s*\*\s*(\w+)\s*=\s*([\s\S]+)$/.exec(
|
|
55930
|
+
statement
|
|
55931
|
+
);
|
|
55932
|
+
if (!declaration) return null;
|
|
55933
|
+
const name3 = declaration[1];
|
|
55934
|
+
const value = declaration[2];
|
|
55935
|
+
const bundlePath = new RegExp(`^${bundle}\\.bundlePath$`).exec(value.trim());
|
|
55936
|
+
const resource = new RegExp(
|
|
55937
|
+
`^\\[\\s*${bundle}\\s+pathForResource:\\s*([^\\s]+)\\s+ofType:\\s*([^\\s\\]]+)\\s*\\]$`
|
|
55938
|
+
).exec(value.trim());
|
|
55939
|
+
const dictionary2 = /^\[\s*NSDictionary\s+dictionaryWithContentsOfFile:\s*(\w+)\s*\]$/.exec(
|
|
55940
|
+
value.trim()
|
|
55941
|
+
);
|
|
55942
|
+
const entry = /^(\w+)\s*\[\s*([^\]\s]+)\s*\]$/.exec(value.trim());
|
|
55943
|
+
if (bundle && bundlePath) variables.set(name3, "main bundle");
|
|
55944
|
+
else if (bundle && resource) {
|
|
55945
|
+
if (literal4(resource[1]) !== "GoogleService-Info" || literal4(resource[2]) !== "plist")
|
|
55946
|
+
return null;
|
|
55947
|
+
variables.set(name3, plists.length === 1 ? plists[0] : void 0);
|
|
55948
|
+
} else if (dictionary2 && variables.has(dictionary2[1])) {
|
|
55949
|
+
const file = variables.get(dictionary2[1]);
|
|
55950
|
+
const parsed = typeof file === "string" ? parsePlistSource(import_node_fs48.default.readFileSync(file, "utf8")) : void 0;
|
|
55951
|
+
variables.set(name3, isRecord(parsed) ? parsed : void 0);
|
|
55952
|
+
} else if (entry && variables.has(entry[1])) {
|
|
55953
|
+
const key2 = literal4(entry[2]);
|
|
55954
|
+
const source = variables.get(entry[1]);
|
|
55955
|
+
if (key2 === void 0) return null;
|
|
55956
|
+
variables.set(name3, isRecord(source) ? source[key2] : void 0);
|
|
55957
|
+
} else return null;
|
|
55958
|
+
}
|
|
55959
|
+
return null;
|
|
55960
|
+
}
|
|
55961
|
+
function evaluateClauses(clauses, scope2, bound, depth) {
|
|
55962
|
+
const sources = scope2.resources.filter(
|
|
55963
|
+
(file) => import_node_path46.default.basename(file) === "GoogleService-Info.plist"
|
|
55964
|
+
);
|
|
55776
55965
|
for (const clause of clauses) {
|
|
55966
|
+
if (clause === "true") continue;
|
|
55967
|
+
if (clause === "false") return false;
|
|
55777
55968
|
if (/^FirebaseApp\s*\.\s*app\s*\(\s*\)\s*==\s*nil$/.test(clause)) continue;
|
|
55778
55969
|
const resource = /^let\s+(\w+)\s*=\s*Bundle\.main\.path\s*\(\s*forResource:\s*"GoogleService-Info"\s*,\s*ofType:\s*"plist"\s*\)$/.exec(
|
|
55779
55970
|
clause
|
|
@@ -55808,10 +55999,17 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
55808
55999
|
if (!subject.startsWith(prefix[2])) return false;
|
|
55809
56000
|
continue;
|
|
55810
56001
|
}
|
|
55811
|
-
|
|
56002
|
+
const negated = clause.startsWith("!");
|
|
56003
|
+
const called = evaluateHelperCall(clause.replace(/^!\s*/, ""), scope2, depth);
|
|
56004
|
+
if (called === null) return null;
|
|
56005
|
+
if (called === negated) return false;
|
|
55812
56006
|
}
|
|
55813
56007
|
return true;
|
|
55814
56008
|
}
|
|
56009
|
+
function evaluateFirebaseGuard(header, scope2) {
|
|
56010
|
+
const condition = header.replace(/^\s*if\b/, "").replace(/\{\s*$/, "");
|
|
56011
|
+
return evaluateClauses(splitClauses(condition), scope2, /* @__PURE__ */ new Map(), 0);
|
|
56012
|
+
}
|
|
55815
56013
|
function blankSwiftObjcLiterals(raw2) {
|
|
55816
56014
|
return raw2.replace(
|
|
55817
56015
|
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
@@ -55884,8 +56082,8 @@ function findDefaultConfigureCall(body, sources) {
|
|
|
55884
56082
|
}
|
|
55885
56083
|
return null;
|
|
55886
56084
|
}
|
|
55887
|
-
function readTargetGoogleServicesFile(projectRoot,
|
|
55888
|
-
const app = readXcodeAppTarget(
|
|
56085
|
+
function readTargetGoogleServicesFile(projectRoot, container, target, prepareGeneratedSources = false) {
|
|
56086
|
+
const app = readXcodeAppTarget(container, target, void 0, {
|
|
55889
56087
|
requireSources: false,
|
|
55890
56088
|
prepareGeneratedSources
|
|
55891
56089
|
});
|
|
@@ -55950,7 +56148,13 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
55950
56148
|
if (nesting === 0) topLevelBefore += token;
|
|
55951
56149
|
if (token === "}") nesting -= 1;
|
|
55952
56150
|
}
|
|
55953
|
-
const guarded = guard === null ? true : evaluateFirebaseGuard(guard,
|
|
56151
|
+
const guarded = guard === null ? true : evaluateFirebaseGuard(guard, {
|
|
56152
|
+
resources: app.resources,
|
|
56153
|
+
sources: [
|
|
56154
|
+
...app.allSources,
|
|
56155
|
+
...app.frameworks.flatMap((framework) => framework.allSources)
|
|
56156
|
+
]
|
|
56157
|
+
});
|
|
55954
56158
|
if (guarded === null || depth !== 1 || conditionalDepth !== 0 || /\b(?:return|throw)\b/.test(topLevelBefore))
|
|
55955
56159
|
throw new Error(
|
|
55956
56160
|
"native Firebase initialization must be unconditional in the app launch method"
|
|
@@ -55987,7 +56191,7 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
55987
56191
|
if (selected) {
|
|
55988
56192
|
const file = readTargetGoogleServicesFile(
|
|
55989
56193
|
projectRoot,
|
|
55990
|
-
selected.xcodeproj,
|
|
56194
|
+
selected.workspace ?? selected.xcodeproj,
|
|
55991
56195
|
selected.target,
|
|
55992
56196
|
prepareGeneratedSources
|
|
55993
56197
|
);
|
|
@@ -56051,7 +56255,7 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
56051
56255
|
}
|
|
56052
56256
|
return result;
|
|
56053
56257
|
}
|
|
56054
|
-
var import_node_child_process29, import_node_fs48, import_node_module3, import_node_os15, import_node_path46, EXPO_CONFIG_SCRIPT, resultDirectory;
|
|
56258
|
+
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
56259
|
var init_native_firebase_config = __esm({
|
|
56056
56260
|
"src/native-firebase-config.ts"() {
|
|
56057
56261
|
"use strict";
|
|
@@ -56081,6 +56285,11 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
56081
56285
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
56082
56286
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
56083
56287
|
resultDirectory = () => import_node_fs48.default.mkdtempSync(import_node_path46.default.join(import_node_os15.default.tmpdir(), "peach-expo-config-"));
|
|
56288
|
+
HELPER_DEPTH = 3;
|
|
56289
|
+
stripComments = (raw2) => raw2.replace(
|
|
56290
|
+
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
56291
|
+
(token) => token.startsWith('"') ? token : token.replace(/[^\n]/g, " ")
|
|
56292
|
+
);
|
|
56084
56293
|
}
|
|
56085
56294
|
});
|
|
56086
56295
|
|
|
@@ -59443,7 +59652,7 @@ var init_swift_standin_digest = __esm({
|
|
|
59443
59652
|
import_node_path58 = __toESM(require("node:path"), 1);
|
|
59444
59653
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
59445
59654
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
59446
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
59655
|
+
STANDIN_SOURCE_DIGEST = true ? "0325c09fcc1b1b4d115920d8f47a5f2f7b4a0c394c928ae68586af45f80c5517" : standinSourceDigest();
|
|
59447
59656
|
}
|
|
59448
59657
|
});
|
|
59449
59658
|
|
|
@@ -63304,7 +63513,7 @@ var init_swift_objc_compile = __esm({
|
|
|
63304
63513
|
});
|
|
63305
63514
|
|
|
63306
63515
|
// src/react-native-bridge-modules.ts
|
|
63307
|
-
function
|
|
63516
|
+
function stripComments2(source) {
|
|
63308
63517
|
let out = "";
|
|
63309
63518
|
let i = 0;
|
|
63310
63519
|
while (i < source.length) {
|
|
@@ -63391,7 +63600,7 @@ function parseObjectiveCModules(sources) {
|
|
|
63391
63600
|
declarations.implementations.get(className)?.add(selector);
|
|
63392
63601
|
};
|
|
63393
63602
|
for (const { file, text: text6 } of sources) {
|
|
63394
|
-
const source =
|
|
63603
|
+
const source = stripComments2(text6);
|
|
63395
63604
|
let owner = null;
|
|
63396
63605
|
const closeImplementation = (end) => {
|
|
63397
63606
|
if (!owner?.implementation) return;
|
|
@@ -70644,7 +70853,7 @@ function codegenSpecRoot(codegen) {
|
|
|
70644
70853
|
return import_node_fs75.default.existsSync(nested) ? nested : codegen;
|
|
70645
70854
|
}
|
|
70646
70855
|
function registersReactModule(source) {
|
|
70647
|
-
const stripped2 =
|
|
70856
|
+
const stripped2 = stripComments3(source);
|
|
70648
70857
|
return OBJC_BRIDGE.test(stripped2) && !/-Swift\.h\b/.test(stripped2);
|
|
70649
70858
|
}
|
|
70650
70859
|
function fabricComponents(root) {
|
|
@@ -71044,11 +71253,11 @@ function podPublicHeaders(pod, files2) {
|
|
|
71044
71253
|
})
|
|
71045
71254
|
);
|
|
71046
71255
|
}
|
|
71047
|
-
function
|
|
71256
|
+
function stripComments3(text6) {
|
|
71048
71257
|
return text6.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
|
|
71049
71258
|
}
|
|
71050
71259
|
function transcribeLoad(text6, file) {
|
|
71051
|
-
const code =
|
|
71260
|
+
const code = stripComments3(text6);
|
|
71052
71261
|
const refuse2 = (why) => new Error(
|
|
71053
71262
|
`${file}: ${why}; Objective-C TurboModule sources need the Objective-C runtime`
|
|
71054
71263
|
);
|
|
@@ -71091,7 +71300,7 @@ function viewManagers(root, files2) {
|
|
|
71091
71300
|
const classes = /* @__PURE__ */ new Map();
|
|
71092
71301
|
for (const file of files2) {
|
|
71093
71302
|
if (!HEADER3.test(file) && !OBJC2.test(file)) continue;
|
|
71094
|
-
const text6 =
|
|
71303
|
+
const text6 = stripComments3(import_node_fs75.default.readFileSync(import_node_path72.default.join(root, file), "utf8"));
|
|
71095
71304
|
for (const [, name3, parent] of text6.matchAll(/@interface\s+(\w+)\s*:\s*(\w+)/g))
|
|
71096
71305
|
classes.set(name3, parent);
|
|
71097
71306
|
for (const [, name3, parent] of text6.matchAll(
|
|
@@ -71119,7 +71328,7 @@ function registers(root, files2, objc = true) {
|
|
|
71119
71328
|
if (!UNIT.test(file) && !OBJC2.test(file)) continue;
|
|
71120
71329
|
const text6 = import_node_fs75.default.readFileSync(import_node_path72.default.join(root, file), "utf8");
|
|
71121
71330
|
if (text6.includes(REGISTRATION)) return true;
|
|
71122
|
-
const stripped2 =
|
|
71331
|
+
const stripped2 = stripComments3(text6);
|
|
71123
71332
|
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
71333
|
([, name3]) => managers.has(name3)
|
|
71125
71334
|
)))
|
|
@@ -71206,6 +71415,7 @@ async function collectTurboSources(options) {
|
|
|
71206
71415
|
(provider) => readPod(provider, options.appRoot, options.installedPods?.get(provider.name))
|
|
71207
71416
|
);
|
|
71208
71417
|
let codegen = null;
|
|
71418
|
+
let moduleProviders = false;
|
|
71209
71419
|
const installedCodegenNames = new Set(
|
|
71210
71420
|
installedHeaderPods.flatMap((pod) => {
|
|
71211
71421
|
const manifest = JSON.parse(
|
|
@@ -71535,7 +71745,7 @@ async function collectTurboSources(options) {
|
|
|
71535
71745
|
resolveDependency(include);
|
|
71536
71746
|
};
|
|
71537
71747
|
const scanText = (from, text6, dependency = false) => {
|
|
71538
|
-
for (const [, quote, name3] of
|
|
71748
|
+
for (const [, quote, name3] of stripComments3(text6).matchAll(
|
|
71539
71749
|
/^\s*#\s*(?:include|import)\s*([<"])([^>"\n]+)[>"]/gm
|
|
71540
71750
|
)) {
|
|
71541
71751
|
if (!dependency) resolve13(from, name3, quote === '"');
|
|
@@ -71717,7 +71927,7 @@ async function collectTurboSources(options) {
|
|
|
71717
71927
|
else {
|
|
71718
71928
|
sources.push(file);
|
|
71719
71929
|
providerObjC = true;
|
|
71720
|
-
const stripped2 =
|
|
71930
|
+
const stripped2 = stripComments3(text6);
|
|
71721
71931
|
if (OBJC_TURBO.test(stripped2) || OBJC_BRIDGE.test(stripped2)) {
|
|
71722
71932
|
const registers2 = OBJC_REGISTERED.test(stripped2);
|
|
71723
71933
|
for (const [, className] of stripped2.matchAll(/@implementation\s+(\w+)/g))
|
|
@@ -72074,6 +72284,7 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
72074
72284
|
codegen ??= (await runInstalledTurboCodegen(options.appRoot, options.codegenDir)).generatedRoot;
|
|
72075
72285
|
const generated = codegenSpecRoot(codegen);
|
|
72076
72286
|
if (import_node_fs75.default.existsSync(import_node_path72.default.join(generated, "RCTModuleProviders.mm"))) {
|
|
72287
|
+
moduleProviders = true;
|
|
72077
72288
|
original(TURBO_CORE_TARGET, "ReactCodegen", generated, "RCTModuleProviders.mm");
|
|
72078
72289
|
alias(
|
|
72079
72290
|
`${core}/include/ReactCodegen/RCTModuleProviders.h`,
|
|
@@ -72137,7 +72348,8 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
72137
72348
|
[...objcClasses].sort(),
|
|
72138
72349
|
[...unregisteredObjcClasses].sort(),
|
|
72139
72350
|
decoratorHasPerformanceLogger,
|
|
72140
|
-
managerHasDevMenuDecorator
|
|
72351
|
+
managerHasDevMenuDecorator,
|
|
72352
|
+
moduleProviders
|
|
72141
72353
|
) : turboHostSource(withRuntime)
|
|
72142
72354
|
);
|
|
72143
72355
|
scanText(
|
|
@@ -72238,7 +72450,7 @@ extern "C" __attribute__((export_name("peach_turbo_module_names"))) const char*
|
|
|
72238
72450
|
}
|
|
72239
72451
|
`;
|
|
72240
72452
|
}
|
|
72241
|
-
function turboObjCHostSource(objcClasses, unregisteredClasses, decoratorHasPerformanceLogger, managerHasDevMenuDecorator) {
|
|
72453
|
+
function turboObjCHostSource(objcClasses, unregisteredClasses, decoratorHasPerformanceLogger, managerHasDevMenuDecorator, moduleProviders) {
|
|
72242
72454
|
const classNamesList = objcClasses.map((name3) => `@${JSON.stringify(name3)}`).join(", ");
|
|
72243
72455
|
const unregisteredList = unregisteredClasses.map((name3) => `@${JSON.stringify(name3)}`).join(", ");
|
|
72244
72456
|
return `// React Native's RCTTurboModuleManager on the process's JSI runtime, set up
|
|
@@ -72259,7 +72471,7 @@ function turboObjCHostSource(objcClasses, unregisteredClasses, decoratorHasPerfo
|
|
|
72259
72471
|
${decoratorHasPerformanceLogger ? "#import <React/RCTPerformanceLogger.h>" : ""}
|
|
72260
72472
|
#import <React/RCTBridgeModule.h>
|
|
72261
72473
|
#import <React/RCTEventDispatcherProtocol.h>
|
|
72262
|
-
#import <ReactCodegen/RCTModuleProviders.h>
|
|
72474
|
+
${moduleProviders ? "#import <ReactCodegen/RCTModuleProviders.h>" : ""}
|
|
72263
72475
|
#import <ReactCommon/CxxTurboModuleUtils.h>
|
|
72264
72476
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
72265
72477
|
#include <os/log.h>
|
|
@@ -72502,10 +72714,11 @@ static RCTTurboModuleManager *manager;
|
|
|
72502
72714
|
return module;
|
|
72503
72715
|
}
|
|
72504
72716
|
|
|
72505
|
-
|
|
72717
|
+
${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)name
|
|
72506
72718
|
{
|
|
72507
72719
|
return RCTModuleProviders.moduleProviders[@(name)];
|
|
72508
72720
|
}
|
|
72721
|
+
` : ""}
|
|
72509
72722
|
|
|
72510
72723
|
- (std::shared_ptr<react::TurboModule>)getTurboModule:(const std::string &)name
|
|
72511
72724
|
jsInvoker:(std::shared_ptr<react::CallInvoker>)jsInvoker
|
|
@@ -72593,7 +72806,7 @@ extern "C" __attribute__((export_name("peach_turbo_module_names"))) const char*
|
|
|
72593
72806
|
NSMutableOrderedSet<NSString *> *found = [NSMutableOrderedSet new];
|
|
72594
72807
|
for (const auto& [name, provider] : react::globalExportedCxxTurboModuleMap())
|
|
72595
72808
|
[found addObject:@(name.c_str())];
|
|
72596
|
-
[found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];
|
|
72809
|
+
${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];" : ""}
|
|
72597
72810
|
for (Class moduleClass in RCTGetModuleClasses())
|
|
72598
72811
|
if (moduleClass != [PeachTurboRegistry class] &&
|
|
72599
72812
|
moduleClass != [PeachImageURLLoading class] &&
|
|
@@ -72999,12 +73212,12 @@ async function witnessMatches(witness) {
|
|
|
72999
73212
|
}
|
|
73000
73213
|
return true;
|
|
73001
73214
|
}
|
|
73002
|
-
async function discoveryKey(root, installedWorkspace, prepareNative) {
|
|
73215
|
+
async function discoveryKey(root, installedWorkspace, prepareNative, iosTarget) {
|
|
73003
73216
|
const [config, expoConfig] = await Promise.all([
|
|
73004
73217
|
loadRNXAppConfig(resolveAppProject(root)),
|
|
73005
73218
|
readExpoConfigAsync(root)
|
|
73006
73219
|
]);
|
|
73007
|
-
return `${import_node_fs76.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
|
|
73220
|
+
return `${import_node_fs76.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
|
|
73008
73221
|
}
|
|
73009
73222
|
function cloneNativeTarget(target) {
|
|
73010
73223
|
return {
|
|
@@ -73356,17 +73569,18 @@ ${source}` : source;
|
|
|
73356
73569
|
}
|
|
73357
73570
|
for (const unit2 of units) unit2.nativeFiles = { ...unit2.nativeFiles, ...support };
|
|
73358
73571
|
}
|
|
73359
|
-
async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prepareNative = false) {
|
|
73572
|
+
async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prepareNative = false, iosTarget) {
|
|
73360
73573
|
if (traceStore.getStore())
|
|
73361
73574
|
return collectExpoSwiftSourcesUncached(
|
|
73362
73575
|
appRoot,
|
|
73363
73576
|
signal,
|
|
73364
73577
|
installedWorkspace,
|
|
73365
|
-
prepareNative
|
|
73578
|
+
prepareNative,
|
|
73579
|
+
iosTarget
|
|
73366
73580
|
);
|
|
73367
73581
|
signal?.throwIfAborted();
|
|
73368
73582
|
installSwiftInputTrace();
|
|
73369
|
-
const key2 = await discoveryKey(appRoot, installedWorkspace, prepareNative);
|
|
73583
|
+
const key2 = await discoveryKey(appRoot, installedWorkspace, prepareNative, iosTarget);
|
|
73370
73584
|
const cached4 = discoveryCache.get(key2);
|
|
73371
73585
|
if (cached4 && await witnessMatches(cached4.witness)) {
|
|
73372
73586
|
signal?.throwIfAborted();
|
|
@@ -73375,13 +73589,19 @@ async function collectExpoSwiftSources(appRoot, signal, installedWorkspace, prep
|
|
|
73375
73589
|
const witness = { marks: /* @__PURE__ */ new Map(), tainted: false };
|
|
73376
73590
|
const units = await traceStore.run(
|
|
73377
73591
|
witness,
|
|
73378
|
-
() => collectExpoSwiftSourcesUncached(
|
|
73592
|
+
() => collectExpoSwiftSourcesUncached(
|
|
73593
|
+
appRoot,
|
|
73594
|
+
signal,
|
|
73595
|
+
installedWorkspace,
|
|
73596
|
+
prepareNative,
|
|
73597
|
+
iosTarget
|
|
73598
|
+
)
|
|
73379
73599
|
);
|
|
73380
73600
|
if (witness.marks.size > 0 && await witnessMatches(witness))
|
|
73381
73601
|
discoveryCache.set(key2, { witness, units: cloneUnits(units) });
|
|
73382
73602
|
return cloneUnits(units);
|
|
73383
73603
|
}
|
|
73384
|
-
async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspace, prepareNative = false) {
|
|
73604
|
+
async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspace, prepareNative = false, iosTarget) {
|
|
73385
73605
|
const started = performance.now();
|
|
73386
73606
|
const report = (message) => console.error(`[expo-swift ${Math.round(performance.now() - started)}ms] ${message}`);
|
|
73387
73607
|
signal?.throwIfAborted();
|
|
@@ -73470,12 +73690,13 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
73470
73690
|
const module2 = await resolveSwiftModule({ signal });
|
|
73471
73691
|
moduleRoot = module2.root;
|
|
73472
73692
|
provided = new Set(swiftPeachModules(module2.root));
|
|
73473
|
-
await prepareXcodeSwiftPackages(installedWorkspace,
|
|
73693
|
+
await prepareXcodeSwiftPackages(installedWorkspace, iosTarget, void 0, signal);
|
|
73474
73694
|
moduleRoot = module2.root;
|
|
73475
73695
|
provided = new Set(swiftPeachModules(module2.root));
|
|
73476
73696
|
const snapshot = await withXcodeProject(
|
|
73477
73697
|
installedWorkspace,
|
|
73478
73698
|
{
|
|
73699
|
+
target: iosTarget,
|
|
73479
73700
|
configuration: "Debug",
|
|
73480
73701
|
interfaceRoot: module2.root,
|
|
73481
73702
|
moduleRoot: module2.root,
|
|
@@ -73562,8 +73783,14 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
73562
73783
|
);
|
|
73563
73784
|
continue;
|
|
73564
73785
|
}
|
|
73565
|
-
const prepared = await prepareExpoNativeWorkspace(appRoot, signal);
|
|
73566
|
-
return collectExpoSwiftSources(
|
|
73786
|
+
const prepared = await prepareExpoNativeWorkspace(appRoot, signal, iosTarget);
|
|
73787
|
+
return collectExpoSwiftSources(
|
|
73788
|
+
prepared.app,
|
|
73789
|
+
signal,
|
|
73790
|
+
prepared.workspace,
|
|
73791
|
+
false,
|
|
73792
|
+
iosTarget
|
|
73793
|
+
);
|
|
73567
73794
|
}
|
|
73568
73795
|
const declarations = [];
|
|
73569
73796
|
for (const descriptor of Array.isArray(modules) ? modules : []) {
|
|
@@ -73775,11 +74002,13 @@ ${import_node_fs76.default.readFileSync(source, "utf8")}`;
|
|
|
73775
74002
|
});
|
|
73776
74003
|
const cached4 = readExpoDiscovery(discovery.key);
|
|
73777
74004
|
if (cached4 !== void 0) return cached4;
|
|
73778
|
-
const prepared = await prepareExpoNativeWorkspace(appRoot, signal);
|
|
74005
|
+
const prepared = await prepareExpoNativeWorkspace(appRoot, signal, iosTarget);
|
|
73779
74006
|
const discovered = await collectExpoSwiftSources(
|
|
73780
74007
|
prepared.app,
|
|
73781
74008
|
signal,
|
|
73782
|
-
prepared.workspace
|
|
74009
|
+
prepared.workspace,
|
|
74010
|
+
false,
|
|
74011
|
+
iosTarget
|
|
73783
74012
|
);
|
|
73784
74013
|
const stored = writeExpoDiscovery({
|
|
73785
74014
|
key: discovery.key,
|
|
@@ -74060,7 +74289,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
74060
74289
|
installSwiftInputTrace();
|
|
74061
74290
|
let key2;
|
|
74062
74291
|
try {
|
|
74063
|
-
key2 = await discoveryKey(root, options.installedWorkspace, true);
|
|
74292
|
+
key2 = await discoveryKey(root, options.installedWorkspace, true, options.iosTarget);
|
|
74064
74293
|
} catch {
|
|
74065
74294
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
74066
74295
|
}
|
|
@@ -74095,7 +74324,8 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
74095
74324
|
root,
|
|
74096
74325
|
signal,
|
|
74097
74326
|
options.installedWorkspace,
|
|
74098
|
-
nativeWorkspaceAvailable()
|
|
74327
|
+
nativeWorkspaceAvailable(),
|
|
74328
|
+
options.iosTarget
|
|
74099
74329
|
);
|
|
74100
74330
|
signal.throwIfAborted();
|
|
74101
74331
|
const ios = import_node_path73.default.join(root, "ios");
|
|
@@ -74108,12 +74338,13 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
74108
74338
|
await ensureSwiftToolchain(signal);
|
|
74109
74339
|
const bridge = collectBridgeModuleSources(import_node_fs76.default.realpathSync(root), signal);
|
|
74110
74340
|
if (bridge && bridge.installedNamespaces.length > 0) {
|
|
74111
|
-
const workspace = options.installedWorkspace ?? (await prepareExpoNativeWorkspace(root, signal)).workspace;
|
|
74341
|
+
const workspace = options.installedWorkspace ?? (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).workspace;
|
|
74112
74342
|
const module3 = await resolveSwiftModule({ signal });
|
|
74113
|
-
await prepareXcodeSwiftPackages(workspace,
|
|
74343
|
+
await prepareXcodeSwiftPackages(workspace, options.iosTarget, void 0, signal);
|
|
74114
74344
|
await withXcodeProject(
|
|
74115
74345
|
workspace,
|
|
74116
74346
|
{
|
|
74347
|
+
target: options.iosTarget,
|
|
74117
74348
|
configuration: "Debug",
|
|
74118
74349
|
interfaceRoot: module3.root,
|
|
74119
74350
|
nativeModules: bridge.installedNamespaces
|
|
@@ -74481,7 +74712,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
74481
74712
|
)
|
|
74482
74713
|
);
|
|
74483
74714
|
const targetErrors = diagnostic.match(
|
|
74484
|
-
/^error: target .*$|^(?:error: )?[^\n:]+: missing or unsupported declared iOS deployment target .*$/gm
|
|
74715
|
+
/^error: target .*$|^(?:error: )?[^\n:]+: missing or unsupported declared iOS deployment target .*$|^(?:ld(?:\.lld)?|wasm-ld): error: .*$/gm
|
|
74485
74716
|
) ?? [];
|
|
74486
74717
|
const unitErrors = [...targetErrors, ...sourceErrors];
|
|
74487
74718
|
if (publishArtifact && targetErrors.length === 0 && (sourceErrors.length === 0 || sourceErrors.length !== errors.length) && !(error instanceof SwiftMissingModulesError))
|
|
@@ -74595,7 +74826,8 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
74595
74826
|
res.end("Expo Swift request has no host");
|
|
74596
74827
|
return true;
|
|
74597
74828
|
}
|
|
74598
|
-
const
|
|
74829
|
+
const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
|
|
74830
|
+
const flightKey = `${host2}\0${key2}\0${iosTarget ?? ""}`;
|
|
74599
74831
|
const prepared = openPreparations.take(
|
|
74600
74832
|
flightKey,
|
|
74601
74833
|
url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
|
|
@@ -74610,7 +74842,9 @@ async function handleExpoSwiftRequest(req, res) {
|
|
|
74610
74842
|
}
|
|
74611
74843
|
let pending = compiling.get(flightKey);
|
|
74612
74844
|
if (!pending) {
|
|
74613
|
-
pending = compileExpoSwiftModules(key2, `http://${host2}
|
|
74845
|
+
pending = compileExpoSwiftModules(key2, `http://${host2}`, void 0, {
|
|
74846
|
+
iosTarget
|
|
74847
|
+
}).finally(() => {
|
|
74614
74848
|
compiling.delete(flightKey);
|
|
74615
74849
|
});
|
|
74616
74850
|
compiling.set(flightKey, pending);
|
|
@@ -76432,7 +76666,7 @@ var init_nitro_superset = __esm({
|
|
|
76432
76666
|
init_swift_standin_digest();
|
|
76433
76667
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
76434
76668
|
packageVersion = (root) => JSON.parse((0, import_node_fs84.readFileSync)((0, import_node_path81.join)(root, "package.json"), "utf8")).version;
|
|
76435
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
76669
|
+
NITRO_COMPILER_DIGEST = true ? "528df2602797c902fa88855f6822ca31e7cf2fdf8e6493516502546ec76d4e1b" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
76436
76670
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
76437
76671
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
76438
76672
|
published = /* @__PURE__ */ new Map();
|
|
@@ -104381,7 +104615,7 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
104381
104615
|
);
|
|
104382
104616
|
expoStamped.searchParams.set(
|
|
104383
104617
|
"expoSwift",
|
|
104384
|
-
`${nativeAssetOrigin}/__peach/expo-swift?root=${encodeURIComponent(expoRoot)}`
|
|
104618
|
+
`${nativeAssetOrigin}/__peach/expo-swift?root=${encodeURIComponent(expoRoot)}${opts.iosTarget ? `&iosTarget=${encodeURIComponent(opts.iosTarget)}` : ""}`
|
|
104385
104619
|
);
|
|
104386
104620
|
const nitroConfiguration = bundle && new URL(bundle, nativeAssetOrigin).searchParams.get("dev") === "false" ? "Release" : "Debug";
|
|
104387
104621
|
expoStamped.searchParams.set(
|