peachsim 0.1.2591 → 0.1.2592
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/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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +3872 -3531
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-EMX4WZ72.mjs → acorn-67PU73QE.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-UYJXLDCG.mjs → chunk-5FTHILIE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JHXDM3YU.mjs → chunk-6DB5FR7S.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-EGKH2L6J.mjs → chunk-CF3MTPMY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MC6NMYWY.mjs → chunk-D4LYKRRB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QBMFX3J2.mjs → chunk-DFF5XZ5M.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-Q4NA6PUR.mjs → chunk-EHRSWFTD.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-4QHHRGO4.mjs → chunk-EITX573K.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-J676B57D.mjs → chunk-EWHA6X3Z.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-AKKHSVJ4.mjs → chunk-FYXXFYML.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ILWFGZWW.mjs → chunk-GQ3EO2UV.mjs} +107 -6
- package/dist-lib/esm-chunks/{chunk-VD27WNCT.mjs → chunk-GY6TE4B4.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-NX23AMX4.mjs → chunk-KDI5YYQ6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VYZ5DC3M.mjs → chunk-L5T3HBPO.mjs} +792 -514
- package/dist-lib/esm-chunks/{chunk-7627LKJK.mjs → chunk-M4QLI2SY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UIVXVMS5.mjs → chunk-PITO2NI2.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-SOAYP72T.mjs → chunk-QSFWBVUO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TFG4LZ5T.mjs → chunk-R3WTQB5J.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZL5N6ENT.mjs → chunk-RV4ACE6R.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YR6DNV76.mjs → chunk-SW4PSSTF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VF5WVB3D.mjs → chunk-TJZPNFVF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VRVXRZI4.mjs → chunk-XSQH4R5E.mjs} +48 -15
- package/dist-lib/esm-chunks/{chunk-RKQZGWX2.mjs → chunk-XZ3FX3HW.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-ANKZARNW.mjs → metro-layout-parser-EX65MARK.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-4N5CXBOZ.mjs → swift-package-prebuilt-3BPDQVA7.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-5IUSRXYA.mjs → swift-sdk-app-module-CRX6E3TR.mjs} +14 -14
- package/dist-lib/esm-chunks/{swift-sdk-image-7T2LMQS5.mjs → swift-sdk-image-EJD5TPQH.mjs} +14 -14
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-7QJ3BF6E.mjs → swift-sdk-image-producer-QAZOSLTZ.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +3243 -2905
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +5669 -4904
- package/dist-lib/host/fetch-proxy-handler.cjs +310 -298
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +238 -223
- package/dist-lib/native-app-identity-project.mjs +17 -17
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +81 -81
- package/dist-lib/public-origins-lib.json +73 -71
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +8 -8
- package/dist-lib/skills.cjs +6291 -5526
- package/dist-lib/swift-compile.cjs +1051 -696
- package/dist-lib/swift-compile.mjs +10 -10
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +12 -6
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/native-node-queries.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/native-bundles.ts +2 -0
- package/src/one-native-controls-package.ts +141 -31
- package/src/one-sdk/source.ts +2 -1
- package/src/oneSdkContract.ts +13 -2
- package/src/swift-compile.ts +301 -48
- package/src/swift-host.ts +88 -16
- package/src/swift-reproducible.ts +16 -2
- package/src/swift-root-lock.ts +77 -5
- package/src/swift-sdk-image.ts +53 -10
- package/src/swift-startup-split.ts +65 -27
- package/src/swift-toolchain.ts +16 -5
- package/src/wasm-lazy-split.ts +46 -40
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2592 | (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;
|
|
@@ -126,7 +126,8 @@ function swiftToolchainBin(release) {
|
|
|
126
126
|
const dirs = [import_node_os.default.homedir(), "/"].map(
|
|
127
127
|
(base) => import_node_path3.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
|
|
128
128
|
);
|
|
129
|
-
|
|
129
|
+
const found = dirs.find((dir) => import_node_fs3.default.existsSync(import_node_path3.default.join(dir, "swift")));
|
|
130
|
+
return found ? import_node_fs3.default.realpathSync(found) : dirs[0];
|
|
130
131
|
}
|
|
131
132
|
if (process.env.CONTRAST_SWIFT_TOOLCHAINS) {
|
|
132
133
|
return import_node_path3.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
|
|
@@ -139,7 +140,9 @@ function swiftToolchainBin(release) {
|
|
|
139
140
|
}
|
|
140
141
|
function peachHome() {
|
|
141
142
|
const override = process.env.PEACH_HOME;
|
|
142
|
-
|
|
143
|
+
if (override) return import_node_path3.default.resolve(override);
|
|
144
|
+
const home = import_node_path3.default.join(import_node_os.default.homedir(), ".peach");
|
|
145
|
+
return import_node_fs3.default.existsSync(home) ? import_node_fs3.default.realpathSync(home) : home;
|
|
143
146
|
}
|
|
144
147
|
function swiftEnvironment(base = process.env) {
|
|
145
148
|
return {
|
|
@@ -1896,17 +1899,18 @@ var init_swift_objc_prebuilt = __esm({
|
|
|
1896
1899
|
});
|
|
1897
1900
|
|
|
1898
1901
|
// src/swift-reproducible.ts
|
|
1899
|
-
var import_node_fs43, import_node_os9;
|
|
1902
|
+
var import_node_fs43, import_node_os9, import_node_path43;
|
|
1900
1903
|
var init_swift_reproducible = __esm({
|
|
1901
1904
|
"src/swift-reproducible.ts"() {
|
|
1902
1905
|
"use strict";
|
|
1903
1906
|
import_node_fs43 = require("node:fs");
|
|
1904
1907
|
import_node_os9 = __toESM(require("node:os"), 1);
|
|
1908
|
+
import_node_path43 = __toESM(require("node:path"), 1);
|
|
1905
1909
|
}
|
|
1906
1910
|
});
|
|
1907
1911
|
|
|
1908
1912
|
// src/swift-root-lock.ts
|
|
1909
|
-
var import_node_child_process24, import_node_crypto28, import_node_fs44, import_node_os10,
|
|
1913
|
+
var import_node_child_process24, import_node_crypto28, import_node_fs44, import_node_os10, import_node_path44;
|
|
1910
1914
|
var init_swift_root_lock = __esm({
|
|
1911
1915
|
"src/swift-root-lock.ts"() {
|
|
1912
1916
|
"use strict";
|
|
@@ -1914,7 +1918,7 @@ var init_swift_root_lock = __esm({
|
|
|
1914
1918
|
import_node_crypto28 = require("node:crypto");
|
|
1915
1919
|
import_node_fs44 = require("node:fs");
|
|
1916
1920
|
import_node_os10 = require("node:os");
|
|
1917
|
-
|
|
1921
|
+
import_node_path44 = __toESM(require("node:path"), 1);
|
|
1918
1922
|
init_process_group();
|
|
1919
1923
|
init_process_table();
|
|
1920
1924
|
}
|
|
@@ -1928,12 +1932,12 @@ var init_swift_source_closure = __esm({
|
|
|
1928
1932
|
});
|
|
1929
1933
|
|
|
1930
1934
|
// src/swift-uniform-type-constants.ts
|
|
1931
|
-
var import_node_child_process25,
|
|
1935
|
+
var import_node_child_process25, import_node_path45;
|
|
1932
1936
|
var init_swift_uniform_type_constants = __esm({
|
|
1933
1937
|
"src/swift-uniform-type-constants.ts"() {
|
|
1934
1938
|
"use strict";
|
|
1935
1939
|
import_node_child_process25 = require("node:child_process");
|
|
1936
|
-
|
|
1940
|
+
import_node_path45 = __toESM(require("node:path"), 1);
|
|
1937
1941
|
init_swift_objc_runtime();
|
|
1938
1942
|
init_swift_objc_standin();
|
|
1939
1943
|
init_swiftTargetContract();
|
|
@@ -1941,19 +1945,19 @@ var init_swift_uniform_type_constants = __esm({
|
|
|
1941
1945
|
});
|
|
1942
1946
|
|
|
1943
1947
|
// src/xcode-header-search.ts
|
|
1944
|
-
var import_node_fs45,
|
|
1948
|
+
var import_node_fs45, import_node_path46;
|
|
1945
1949
|
var init_xcode_header_search = __esm({
|
|
1946
1950
|
"src/xcode-header-search.ts"() {
|
|
1947
1951
|
"use strict";
|
|
1948
1952
|
import_node_fs45 = __toESM(require("node:fs"), 1);
|
|
1949
|
-
|
|
1953
|
+
import_node_path46 = __toESM(require("node:path"), 1);
|
|
1950
1954
|
init_case_insensitive_header_overlay();
|
|
1951
1955
|
init_write_build_file();
|
|
1952
1956
|
}
|
|
1953
1957
|
});
|
|
1954
1958
|
|
|
1955
1959
|
// src/swift-compile.ts
|
|
1956
|
-
var import_node_child_process26, import_node_crypto29, import_node_fs46, import_node_os11,
|
|
1960
|
+
var import_node_child_process26, import_node_crypto29, import_node_fs46, import_node_os11, import_node_path47, v6, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, NON_IOS_MODULES, compilerSourceDigest, NOT_ON_IOS, C_WORDS, CODE_MASK_CACHE_CHARS, CORE_FOUNDATION_HANDLE_IMPORTS, emptyMacroEnvironment, wasmMacroEnvironment, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, frameworkProductsReceiptSchema;
|
|
1957
1961
|
var init_swift_compile = __esm({
|
|
1958
1962
|
"src/swift-compile.ts"() {
|
|
1959
1963
|
"use strict";
|
|
@@ -1961,7 +1965,7 @@ var init_swift_compile = __esm({
|
|
|
1961
1965
|
import_node_crypto29 = require("node:crypto");
|
|
1962
1966
|
import_node_fs46 = require("node:fs");
|
|
1963
1967
|
import_node_os11 = __toESM(require("node:os"), 1);
|
|
1964
|
-
|
|
1968
|
+
import_node_path47 = __toESM(require("node:path"), 1);
|
|
1965
1969
|
v6 = __toESM(require("peachsim/vendor/valibot"), 1);
|
|
1966
1970
|
init_admitted_mac_build();
|
|
1967
1971
|
init_is_record();
|
|
@@ -2068,7 +2072,7 @@ var init_swift_compile = __esm({
|
|
|
2068
2072
|
};
|
|
2069
2073
|
OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
2070
2074
|
NON_IOS_MODULES = /* @__PURE__ */ new Set(["FoundationNetworking", "WASILibc"]);
|
|
2071
|
-
compilerSourceDigest = true ? "
|
|
2075
|
+
compilerSourceDigest = true ? "57c5faa7bb7758647030422e32db0f4a53fbab724723e220c14fea1e41d2391e" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
2072
2076
|
NOT_ON_IOS = new RegExp(
|
|
2073
2077
|
`\\b(?:os\\(\\s*WASI\\s*\\)|canImport\\(\\s*(?:${[...NON_IOS_MODULES].join("|")})\\s*\\))`,
|
|
2074
2078
|
"g"
|
|
@@ -2115,17 +2119,28 @@ var init_swift_compile = __esm({
|
|
|
2115
2119
|
host = globalThis;
|
|
2116
2120
|
rootLocks = host[ROOT_LOCKS] ??= /* @__PURE__ */ new Map();
|
|
2117
2121
|
SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
|
|
2122
|
+
frameworkProductsReceiptSchema = v6.object({
|
|
2123
|
+
modules: v6.string(),
|
|
2124
|
+
objects: v6.array(v6.string()),
|
|
2125
|
+
lazyObjects: v6.array(v6.string()),
|
|
2126
|
+
owners: v6.array(v6.tuple([v6.string(), v6.string()])),
|
|
2127
|
+
providers: v6.array(v6.string()),
|
|
2128
|
+
link: v6.array(v6.string()),
|
|
2129
|
+
moduleMaps: v6.array(v6.string()),
|
|
2130
|
+
objcHeaders: v6.array(v6.tuple([v6.string(), v6.string()])),
|
|
2131
|
+
archived: v6.array(v6.tuple([v6.string(), v6.string()]))
|
|
2132
|
+
});
|
|
2118
2133
|
}
|
|
2119
2134
|
});
|
|
2120
2135
|
|
|
2121
2136
|
// src/swift-distribution.ts
|
|
2122
|
-
var import_node_fs47, import_node_os12,
|
|
2137
|
+
var import_node_fs47, import_node_os12, import_node_path48;
|
|
2123
2138
|
var init_swift_distribution = __esm({
|
|
2124
2139
|
"src/swift-distribution.ts"() {
|
|
2125
2140
|
"use strict";
|
|
2126
2141
|
import_node_fs47 = __toESM(require("node:fs"), 1);
|
|
2127
2142
|
import_node_os12 = __toESM(require("node:os"), 1);
|
|
2128
|
-
|
|
2143
|
+
import_node_path48 = __toESM(require("node:path"), 1);
|
|
2129
2144
|
init_src();
|
|
2130
2145
|
init_linux_browser_libs();
|
|
2131
2146
|
init_home_paths();
|
|
@@ -3260,7 +3275,7 @@ __export(native_app_identity_project_exports, {
|
|
|
3260
3275
|
module.exports = __toCommonJS(native_app_identity_project_exports);
|
|
3261
3276
|
var import_node_fs51 = __toESM(require("node:fs"), 1);
|
|
3262
3277
|
var import_node_module2 = require("node:module");
|
|
3263
|
-
var
|
|
3278
|
+
var import_node_path53 = __toESM(require("node:path"), 1);
|
|
3264
3279
|
|
|
3265
3280
|
// src/android-string-value.ts
|
|
3266
3281
|
function compileAndroidStringValue(text3, where) {
|
|
@@ -3924,10 +3939,10 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
|
|
|
3924
3939
|
var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
3925
3940
|
function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
|
|
3926
3941
|
const pbxprojPath = Object.keys(files).find(
|
|
3927
|
-
(
|
|
3942
|
+
(path46) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path46)
|
|
3928
3943
|
) ?? Object.keys(files).find(
|
|
3929
|
-
(
|
|
3930
|
-
) ?? Object.keys(files).find((
|
|
3944
|
+
(path46) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path46)
|
|
3945
|
+
) ?? Object.keys(files).find((path46) => /(?:^|\/)project\.pbxproj$/.test(path46));
|
|
3931
3946
|
if (!pbxprojPath) return null;
|
|
3932
3947
|
const pbxproj = files[pbxprojPath];
|
|
3933
3948
|
let objects = {};
|
|
@@ -3969,7 +3984,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
3969
3984
|
} else if (applicationTargetNames.size === 1) {
|
|
3970
3985
|
targetName = [...applicationTargetNames][0];
|
|
3971
3986
|
} else if (applicationTargetNames.size > 1) {
|
|
3972
|
-
const delegateTargets = Object.keys(files).filter((
|
|
3987
|
+
const delegateTargets = Object.keys(files).filter((path46) => !path46.includes("/Pods/")).map((path46) => path46.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
|
|
3973
3988
|
(name2) => typeof name2 === "string" && applicationTargetNames.has(name2)
|
|
3974
3989
|
);
|
|
3975
3990
|
if (delegateTargets.length === 1) {
|
|
@@ -4199,7 +4214,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
4199
4214
|
return `${base.startsWith("/") ? "/" : ""}${segments.join("/")}`;
|
|
4200
4215
|
};
|
|
4201
4216
|
const project = Object.values(objects).find(
|
|
4202
|
-
(
|
|
4217
|
+
(object4) => isRecord(object4) && object4.isa === "PBXProject"
|
|
4203
4218
|
);
|
|
4204
4219
|
const projectDir = join9(
|
|
4205
4220
|
pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
|
|
@@ -4213,7 +4228,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
4213
4228
|
if (Object.hasOwn(files, file)) return [file];
|
|
4214
4229
|
const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
4215
4230
|
return paths.filter(
|
|
4216
|
-
(
|
|
4231
|
+
(path46) => path46.startsWith(prefix) && !/(?:^|\/)\./.test(path46.slice(prefix.length))
|
|
4217
4232
|
);
|
|
4218
4233
|
},
|
|
4219
4234
|
join9,
|
|
@@ -4224,7 +4239,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
4224
4239
|
}
|
|
4225
4240
|
const rootModuleName = readRootModuleName(
|
|
4226
4241
|
Object.entries(files).filter(
|
|
4227
|
-
([
|
|
4242
|
+
([path46]) => !path46.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path46) || path46.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
|
|
4228
4243
|
).map(([, source]) => source)
|
|
4229
4244
|
);
|
|
4230
4245
|
return {
|
|
@@ -4338,7 +4353,7 @@ var import_node_child_process28 = require("node:child_process");
|
|
|
4338
4353
|
var import_node_crypto33 = require("node:crypto");
|
|
4339
4354
|
var import_node_fs50 = __toESM(require("node:fs"), 1);
|
|
4340
4355
|
var import_node_module = require("node:module");
|
|
4341
|
-
var
|
|
4356
|
+
var import_node_path52 = __toESM(require("node:path"), 1);
|
|
4342
4357
|
var import_plist4 = __toESM(require("peachsim/vendor/plist"), 1);
|
|
4343
4358
|
|
|
4344
4359
|
// src/bazel-project.ts
|
|
@@ -5684,7 +5699,7 @@ var import_node_path13 = require("node:path");
|
|
|
5684
5699
|
var import_node_crypto7 = require("node:crypto");
|
|
5685
5700
|
var import_node_fs10 = require("node:fs");
|
|
5686
5701
|
var import_node_path11 = require("node:path");
|
|
5687
|
-
var swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"c64b677c93e48d61c71b371d887e9db8506c32ef968ed50d9468de1f67fe5d8d","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"
|
|
5702
|
+
var swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"c64b677c93e48d61c71b371d887e9db8506c32ef968ed50d9468de1f67fe5d8d","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"4f54e110f6f2f72da6d20ca6fc1a10c7dbd0cd462b7dd3959351e107c4aa7548","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"81f36daeda9ac5c81a5631fdcab42fb12d09a74705915b8861f404d0db2e01c5","xcode-target-members.ts":"96f6a9f5567a4fbd9806252229b35b9a451a112b20f70f8c20189ffd428815fd","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path11.join)(__sootsim_import_meta_dirname, ".."));
|
|
5688
5703
|
|
|
5689
5704
|
// src/swift-coverage/xcode-asset-symbols.ts
|
|
5690
5705
|
var import_node_fs11 = require("node:fs");
|
|
@@ -5878,7 +5893,7 @@ var import_node_child_process27 = require("node:child_process");
|
|
|
5878
5893
|
var import_node_crypto30 = require("node:crypto");
|
|
5879
5894
|
var import_node_fs48 = __toESM(require("node:fs"), 1);
|
|
5880
5895
|
var import_node_os13 = __toESM(require("node:os"), 1);
|
|
5881
|
-
var
|
|
5896
|
+
var import_node_path49 = __toESM(require("node:path"), 1);
|
|
5882
5897
|
var import_node_util4 = require("node:util");
|
|
5883
5898
|
|
|
5884
5899
|
// src/git-repo-env.ts
|
|
@@ -5894,7 +5909,7 @@ init_swift_lexical();
|
|
|
5894
5909
|
init_swift_native_pin();
|
|
5895
5910
|
init_swift_package();
|
|
5896
5911
|
init_swift_toolchain();
|
|
5897
|
-
var cacheDir3 =
|
|
5912
|
+
var cacheDir3 = import_node_path49.default.join(cacheDir(), "swift-manifests");
|
|
5898
5913
|
var execFileAsync = (0, import_node_util4.promisify)(import_node_child_process27.execFile);
|
|
5899
5914
|
|
|
5900
5915
|
// src/xcode-project.ts
|
|
@@ -5903,7 +5918,7 @@ init_swift_toolchain();
|
|
|
5903
5918
|
// src/xcode-intents.ts
|
|
5904
5919
|
var import_node_crypto32 = require("node:crypto");
|
|
5905
5920
|
var import_node_fs49 = __toESM(require("node:fs"), 1);
|
|
5906
|
-
var
|
|
5921
|
+
var import_node_path50 = __toESM(require("node:path"), 1);
|
|
5907
5922
|
|
|
5908
5923
|
// src/intent-definition/fields.ts
|
|
5909
5924
|
var import_strict = __toESM(require("node:assert/strict"), 1);
|
|
@@ -6219,10 +6234,10 @@ function readSwiftField(value, key, customTypes) {
|
|
|
6219
6234
|
const name2 = identifier(get("Name"));
|
|
6220
6235
|
let kind = intentParameterKind(get("Type"));
|
|
6221
6236
|
let enumeration = get("EnumType");
|
|
6222
|
-
let
|
|
6237
|
+
let object4 = get("ObjectType");
|
|
6223
6238
|
(0, import_strict.default)(enumeration === void 0 || kind === "Integer");
|
|
6224
|
-
(0, import_strict.default)(
|
|
6225
|
-
const custom = enumeration ??
|
|
6239
|
+
(0, import_strict.default)(object4 === void 0 || kind === "Object");
|
|
6240
|
+
const custom = enumeration ?? object4;
|
|
6226
6241
|
let customName;
|
|
6227
6242
|
if (custom !== void 0) {
|
|
6228
6243
|
const name3 = identifier(custom);
|
|
@@ -6232,7 +6247,7 @@ function readSwiftField(value, key, customTypes) {
|
|
|
6232
6247
|
if (!customName) {
|
|
6233
6248
|
kind = "String";
|
|
6234
6249
|
enumeration = void 0;
|
|
6235
|
-
|
|
6250
|
+
object4 = void 0;
|
|
6236
6251
|
}
|
|
6237
6252
|
} else {
|
|
6238
6253
|
customName = customTypes.get(name3);
|
|
@@ -6242,8 +6257,8 @@ function readSwiftField(value, key, customTypes) {
|
|
|
6242
6257
|
const type = types.get(kind);
|
|
6243
6258
|
const multiple = get("SupportsMultipleValues") === true;
|
|
6244
6259
|
const base = customName ?? type.type;
|
|
6245
|
-
const
|
|
6246
|
-
const valueType = multiple ? `[${
|
|
6260
|
+
const array6 = customName ?? type.array ?? type.type;
|
|
6261
|
+
const valueType = multiple ? `[${array6}]` : base;
|
|
6247
6262
|
const resolves = get("SupportsResolution") === true;
|
|
6248
6263
|
const explicitReasons = modelList(value, key + "UnsupportedReasons").map((entry) => {
|
|
6249
6264
|
(0, import_strict.default)(entry && typeof entry === "object");
|
|
@@ -6265,11 +6280,11 @@ function readSwiftField(value, key, customTypes) {
|
|
|
6265
6280
|
strong: type.strong === true,
|
|
6266
6281
|
module: type.module,
|
|
6267
6282
|
availability: type.availability,
|
|
6268
|
-
responseAvailability:
|
|
6283
|
+
responseAvailability: object4 === void 0 ? type.availability : swiftResolutionAvailable,
|
|
6269
6284
|
dynamic: dynamic === true && (get("Configurable") === true || resolves),
|
|
6270
6285
|
search: get("SupportsSearch") === true,
|
|
6271
|
-
collection: customName ?? type.collection ??
|
|
6272
|
-
array:
|
|
6286
|
+
collection: customName ?? type.collection ?? array6,
|
|
6287
|
+
array: array6,
|
|
6273
6288
|
resolution: customName ? `${customName}ResolutionResult` : type.resolution ? `IN${type.resolution}ResolutionResult` : "(null)",
|
|
6274
6289
|
resolves,
|
|
6275
6290
|
multiple,
|
|
@@ -7108,7 +7123,7 @@ var hidden = (visibility) => visibility === "project" ? hiddenAttribute : "";
|
|
|
7108
7123
|
var headerStart = "#if __has_include(<Intents/Intents.h>)\n#import <Intents/Intents.h>";
|
|
7109
7124
|
var headerEnd = "NS_ASSUME_NONNULL_END\n#endif\n";
|
|
7110
7125
|
var pointer = (name2) => name2 + " *";
|
|
7111
|
-
var
|
|
7126
|
+
var array5 = (element) => `NSArray<${element}> *`;
|
|
7112
7127
|
function objcAvailability(swift) {
|
|
7113
7128
|
if (!swift) return "";
|
|
7114
7129
|
const version = /^@available\(iOS ([\d.]+), macOS ([\d.]+), watchOS ([\d.]+), \*\)$/.exec(swift);
|
|
@@ -7119,7 +7134,7 @@ function objcElement(field) {
|
|
|
7119
7134
|
return field.objcArray;
|
|
7120
7135
|
}
|
|
7121
7136
|
function objcType(field) {
|
|
7122
|
-
return field.multiple ?
|
|
7137
|
+
return field.multiple ? array5(objcElement(field)) : field.objc;
|
|
7123
7138
|
}
|
|
7124
7139
|
function objcProperty(field) {
|
|
7125
7140
|
const type = objcType(field);
|
|
@@ -7162,7 +7177,7 @@ function objcIntentSource(name2, prefix, definition, customTypes, version, visib
|
|
|
7162
7177
|
const method = "resolve" + upper(field.name);
|
|
7163
7178
|
const base = reasons.find((reason) => reason.field === field)?.name;
|
|
7164
7179
|
const element = pointer(base ? base + "ResolutionResult" : field.resolution);
|
|
7165
|
-
const result = field.multiple ?
|
|
7180
|
+
const result = field.multiple ? array5(element) : element;
|
|
7166
7181
|
const resultName = field.multiple ? "resolutionResults" : "resolutionResult";
|
|
7167
7182
|
return `- (void)${method}For${name2}:(${klass} *)intent withCompletion:(void (^)(${result}${resultName}))completion NS_SWIFT_NAME(${method}(for:with:)) ${resolution};`;
|
|
7168
7183
|
};
|
|
@@ -7172,7 +7187,7 @@ function objcIntentSource(name2, prefix, definition, customTypes, version, visib
|
|
|
7172
7187
|
const suffix = "Options" + (!deprecated && modern ? "Collection" : "");
|
|
7173
7188
|
const method = "provide" + upper(field.name) + suffix;
|
|
7174
7189
|
const element = objcElement(field);
|
|
7175
|
-
const type = useCollection ? `INObjectCollection<${element}> *` :
|
|
7190
|
+
const type = useCollection ? `INObjectCollection<${element}> *` : array5(element);
|
|
7176
7191
|
const availability = deprecated ? 'API_DEPRECATED("", ios(13.0, 14.0), watchos(6.0, 7.0))' : useCollection ? options : resolution;
|
|
7177
7192
|
const argument = search ? " searchTerm:(nullable NSString *)searchTerm" : "";
|
|
7178
7193
|
const label = search ? "searchTerm:" : "";
|
|
@@ -7593,12 +7608,12 @@ function preparePortableIntent(definition, derivedDirectory, prefix, language, m
|
|
|
7593
7608
|
const key = (0, import_node_crypto32.createHash)("sha256").update(
|
|
7594
7609
|
JSON.stringify([intentCompilerRevision, definition, prefix, language, module2])
|
|
7595
7610
|
).update("\0").update(source).digest("hex");
|
|
7596
|
-
const cache =
|
|
7597
|
-
const output =
|
|
7598
|
-
const localization = definition.split(
|
|
7599
|
-
const compiledRelative =
|
|
7600
|
-
const compiled =
|
|
7601
|
-
const generated =
|
|
7611
|
+
const cache = import_node_path50.default.join(derivedDirectory, "IntentDefinitions");
|
|
7612
|
+
const output = import_node_path50.default.join(cache, key);
|
|
7613
|
+
const localization = definition.split(import_node_path50.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
7614
|
+
const compiledRelative = import_node_path50.default.join("Resources", localization, import_node_path50.default.basename(definition));
|
|
7615
|
+
const compiled = import_node_path50.default.join(output, compiledRelative);
|
|
7616
|
+
const generated = import_node_path50.default.join(output, "Sources");
|
|
7602
7617
|
if (import_node_fs49.default.existsSync(compiled) && import_node_fs49.default.existsSync(generated)) return { compiled, generated };
|
|
7603
7618
|
let metadata;
|
|
7604
7619
|
let sources;
|
|
@@ -7610,15 +7625,15 @@ function preparePortableIntent(definition, derivedDirectory, prefix, language, m
|
|
|
7610
7625
|
throw new Error(`could not compile intent definition ${definition}`, { cause });
|
|
7611
7626
|
}
|
|
7612
7627
|
import_node_fs49.default.mkdirSync(cache, { recursive: true });
|
|
7613
|
-
const stage = import_node_fs49.default.mkdtempSync(
|
|
7628
|
+
const stage = import_node_fs49.default.mkdtempSync(import_node_path50.default.join(cache, ".compile-"));
|
|
7614
7629
|
try {
|
|
7615
|
-
const sourceDirectory =
|
|
7616
|
-
const resource =
|
|
7630
|
+
const sourceDirectory = import_node_path50.default.join(stage, "Sources");
|
|
7631
|
+
const resource = import_node_path50.default.join(stage, compiledRelative);
|
|
7617
7632
|
import_node_fs49.default.mkdirSync(sourceDirectory);
|
|
7618
|
-
import_node_fs49.default.mkdirSync(
|
|
7633
|
+
import_node_fs49.default.mkdirSync(import_node_path50.default.dirname(resource), { recursive: true });
|
|
7619
7634
|
import_node_fs49.default.writeFileSync(resource, metadata);
|
|
7620
7635
|
for (const [file, contents] of sources)
|
|
7621
|
-
import_node_fs49.default.writeFileSync(
|
|
7636
|
+
import_node_fs49.default.writeFileSync(import_node_path50.default.join(sourceDirectory, file), contents);
|
|
7622
7637
|
try {
|
|
7623
7638
|
import_node_fs49.default.renameSync(stage, output);
|
|
7624
7639
|
} catch (error) {
|
|
@@ -7632,7 +7647,7 @@ function preparePortableIntent(definition, derivedDirectory, prefix, language, m
|
|
|
7632
7647
|
}
|
|
7633
7648
|
|
|
7634
7649
|
// src/xcode-json-project.ts
|
|
7635
|
-
var
|
|
7650
|
+
var import_node_path51 = __toESM(require("node:path"), 1);
|
|
7636
7651
|
var import_json5 = __toESM(require_lib(), 1);
|
|
7637
7652
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7638
7653
|
var text2 = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -7690,7 +7705,7 @@ var PHASE_ISA = {
|
|
|
7690
7705
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
7691
7706
|
const json = import_json5.default.parse(source);
|
|
7692
7707
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
7693
|
-
const projectDir =
|
|
7708
|
+
const projectDir = import_node_path51.default.dirname(xcodeproj);
|
|
7694
7709
|
const objects = {};
|
|
7695
7710
|
let next = 0;
|
|
7696
7711
|
const add = (entry, id) => {
|
|
@@ -7703,7 +7718,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
7703
7718
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
7704
7719
|
if (base) {
|
|
7705
7720
|
if (base[1] === "PROJECT")
|
|
7706
|
-
return { sourceTree: "<absolute>", path:
|
|
7721
|
+
return { sourceTree: "<absolute>", path: import_node_path51.default.join(projectDir, base[2]) };
|
|
7707
7722
|
if (base[1] === "PRODUCTS")
|
|
7708
7723
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
7709
7724
|
return null;
|
|
@@ -7711,7 +7726,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
7711
7726
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
7712
7727
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
7713
7728
|
if (unescaped.startsWith("~")) return null;
|
|
7714
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
7729
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path51.default.join(groupDir, unescaped) };
|
|
7715
7730
|
};
|
|
7716
7731
|
const memberships = [];
|
|
7717
7732
|
const folders = [];
|
|
@@ -7722,7 +7737,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
7722
7737
|
const kind = text2(entry.kind) ?? "file-reference";
|
|
7723
7738
|
const raw = text2(entry.path) ?? "";
|
|
7724
7739
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
7725
|
-
const name2 = text2(entry.name) ??
|
|
7740
|
+
const name2 = text2(entry.name) ?? import_node_path51.default.basename(raw);
|
|
7726
7741
|
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
7727
7742
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
7728
7743
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -7843,7 +7858,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
7843
7858
|
if (!isObject(entry)) continue;
|
|
7844
7859
|
const repository = text2(entry.repository);
|
|
7845
7860
|
const local = text2(entry.path);
|
|
7846
|
-
const name2 = local !== void 0 ?
|
|
7861
|
+
const name2 = local !== void 0 ? import_node_path51.default.basename(import_node_path51.default.resolve(import_node_path51.default.dirname(xcodeproj), local)) : import_node_path51.default.basename(repository ?? "").replace(/\.git$/, "");
|
|
7847
7862
|
const id = text2(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
7848
7863
|
isa: "XCRemoteSwiftPackageReference",
|
|
7849
7864
|
repositoryURL: repository ?? "",
|
|
@@ -8127,7 +8142,7 @@ function walkFiles(dir) {
|
|
|
8127
8142
|
const out = [];
|
|
8128
8143
|
for (const entry of import_node_fs50.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
8129
8144
|
if (entry.name.startsWith(".")) continue;
|
|
8130
|
-
const full =
|
|
8145
|
+
const full = import_node_path52.default.join(dir, entry.name);
|
|
8131
8146
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
8132
8147
|
else if (entry.isFile()) out.push(full);
|
|
8133
8148
|
}
|
|
@@ -8144,7 +8159,7 @@ function readXcconfig(file, read) {
|
|
|
8144
8159
|
if (include) {
|
|
8145
8160
|
Object.assign(
|
|
8146
8161
|
settings,
|
|
8147
|
-
readXcconfig(
|
|
8162
|
+
readXcconfig(import_node_path52.default.resolve(import_node_path52.default.dirname(file), include[1]), read)
|
|
8148
8163
|
);
|
|
8149
8164
|
continue;
|
|
8150
8165
|
}
|
|
@@ -8189,8 +8204,8 @@ function applyOperator(value, operator) {
|
|
|
8189
8204
|
return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
8190
8205
|
case "standardizepath":
|
|
8191
8206
|
if (value === ".") return value;
|
|
8192
|
-
if (
|
|
8193
|
-
return
|
|
8207
|
+
if (import_node_path52.default.posix.isAbsolute(value))
|
|
8208
|
+
return import_node_path52.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
|
|
8194
8209
|
return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
|
|
8195
8210
|
}
|
|
8196
8211
|
throw new Error(`unsupported build setting operator :${operator}`);
|
|
@@ -8199,18 +8214,18 @@ function decodeXml(text3) {
|
|
|
8199
8214
|
return text3.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
8200
8215
|
}
|
|
8201
8216
|
function workspaceReferences(workspace) {
|
|
8202
|
-
const data =
|
|
8217
|
+
const data = import_node_path52.default.join(workspace, "contents.xcworkspacedata");
|
|
8203
8218
|
if (!import_node_fs50.default.existsSync(data))
|
|
8204
8219
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
8205
|
-
const container =
|
|
8220
|
+
const container = import_node_path52.default.dirname(workspace);
|
|
8206
8221
|
const locate = (location, base) => {
|
|
8207
8222
|
const colon = location.indexOf(":");
|
|
8208
8223
|
const kind = location.slice(0, colon);
|
|
8209
8224
|
const rest = location.slice(colon + 1);
|
|
8210
|
-
if (kind === "group") return
|
|
8211
|
-
if (kind === "container" || kind === "self") return
|
|
8212
|
-
if (kind === "absolute") return
|
|
8213
|
-
throw new Error(`${
|
|
8225
|
+
if (kind === "group") return import_node_path52.default.resolve(base, rest);
|
|
8226
|
+
if (kind === "container" || kind === "self") return import_node_path52.default.resolve(container, rest);
|
|
8227
|
+
if (kind === "absolute") return import_node_path52.default.resolve(rest);
|
|
8228
|
+
throw new Error(`${import_node_path52.default.basename(workspace)} has an unsupported location ${location}`);
|
|
8214
8229
|
};
|
|
8215
8230
|
const groups = [container];
|
|
8216
8231
|
const references = [];
|
|
@@ -8265,7 +8280,7 @@ function remotePackageRequirements(projects) {
|
|
|
8265
8280
|
var loaded = /* @__PURE__ */ new Map();
|
|
8266
8281
|
function xcodeProjectFile(xcodeproj) {
|
|
8267
8282
|
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
8268
|
-
const file =
|
|
8283
|
+
const file = import_node_path52.default.join(xcodeproj, name2);
|
|
8269
8284
|
if (import_node_fs50.default.existsSync(file)) return file;
|
|
8270
8285
|
}
|
|
8271
8286
|
return null;
|
|
@@ -8283,25 +8298,25 @@ function loadProject(xcodeproj) {
|
|
|
8283
8298
|
throw new Error(`${projectFile} has no objects table`);
|
|
8284
8299
|
}
|
|
8285
8300
|
const objects = root.objects;
|
|
8286
|
-
const
|
|
8301
|
+
const object4 = (id) => {
|
|
8287
8302
|
const found = id === void 0 ? void 0 : objects[id];
|
|
8288
8303
|
return isDict(found) ? found : void 0;
|
|
8289
8304
|
};
|
|
8290
|
-
const project =
|
|
8305
|
+
const project = object4(str(root.rootObject));
|
|
8291
8306
|
if (!project || project.isa !== "PBXProject") {
|
|
8292
8307
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
8293
8308
|
}
|
|
8294
8309
|
const projectDir = import_node_fs50.default.realpathSync.native(
|
|
8295
|
-
|
|
8310
|
+
import_node_path52.default.resolve(import_node_path52.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
8296
8311
|
);
|
|
8297
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
8312
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path52.default.join);
|
|
8298
8313
|
const result = {
|
|
8299
8314
|
xcodeproj,
|
|
8300
8315
|
projectFile,
|
|
8301
8316
|
objects,
|
|
8302
8317
|
project,
|
|
8303
8318
|
projectDir,
|
|
8304
|
-
object:
|
|
8319
|
+
object: object4,
|
|
8305
8320
|
resolvePath,
|
|
8306
8321
|
visitMembers: xcodeTargetMemberVisitor(objects)
|
|
8307
8322
|
};
|
|
@@ -8379,7 +8394,7 @@ function targetSettings(ref, configuration, builtins, options2 = {}, overrides =
|
|
|
8379
8394
|
const relative2 = str(config.baseConfigurationReferenceRelativePath);
|
|
8380
8395
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
8381
8396
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
8382
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative2 ?
|
|
8397
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative2 ? import_node_path52.default.resolve(directory, relative2) : null;
|
|
8383
8398
|
if ((options2.requireSources !== false || options2.installedPods) && (base || anchor || relative2) && (!baseFile || !import_node_fs50.default.existsSync(baseFile)))
|
|
8384
8399
|
throw new Error(
|
|
8385
8400
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
|
|
@@ -8473,8 +8488,8 @@ function hostMacroPluginFlags(flags) {
|
|
|
8473
8488
|
if (flags[index - 1] !== "-load-plugin-executable") return flag;
|
|
8474
8489
|
const separator = flag.lastIndexOf("#");
|
|
8475
8490
|
if (separator < 0) return flag;
|
|
8476
|
-
const root =
|
|
8477
|
-
const manifest =
|
|
8491
|
+
const root = import_node_path52.default.dirname(import_node_path52.default.dirname(flag.slice(0, separator)));
|
|
8492
|
+
const manifest = import_node_path52.default.join(root, "package.json");
|
|
8478
8493
|
if (!import_node_fs50.default.existsSync(manifest)) return flag;
|
|
8479
8494
|
const pkg = JSON.parse(import_node_fs50.default.readFileSync(manifest, "utf8"));
|
|
8480
8495
|
if (!isRecord(pkg) || pkg.name !== "expo-modules-macros") return flag;
|
|
@@ -8494,10 +8509,10 @@ function scriptCommand(shell, script) {
|
|
|
8494
8509
|
return [executable, ...args, "-c", script];
|
|
8495
8510
|
}
|
|
8496
8511
|
function expandSearchPath(directory, rules2) {
|
|
8497
|
-
if (
|
|
8512
|
+
if (import_node_path52.default.basename(directory) !== "**") return [directory];
|
|
8498
8513
|
const expanded = [];
|
|
8499
8514
|
const seen = /* @__PURE__ */ new Set();
|
|
8500
|
-
const queue = [
|
|
8515
|
+
const queue = [import_node_path52.default.dirname(directory)];
|
|
8501
8516
|
for (let at = 0; at < queue.length; at++) {
|
|
8502
8517
|
const current = queue[at];
|
|
8503
8518
|
let real;
|
|
@@ -8513,7 +8528,7 @@ function expandSearchPath(directory, rules2) {
|
|
|
8513
8528
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
8514
8529
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
8515
8530
|
continue;
|
|
8516
|
-
queue.push(
|
|
8531
|
+
queue.push(import_node_path52.default.join(current, entry.name));
|
|
8517
8532
|
}
|
|
8518
8533
|
}
|
|
8519
8534
|
return expanded;
|
|
@@ -8524,7 +8539,7 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
8524
8539
|
const rules2 = recursiveSearchRules(settings);
|
|
8525
8540
|
const directories = new Set(
|
|
8526
8541
|
settingList(settings("LIBRARY_SEARCH_PATHS")).flatMap(
|
|
8527
|
-
(raw) => expandSearchPath(
|
|
8542
|
+
(raw) => expandSearchPath(import_node_path52.default.resolve(projectDir, expand(raw, settings)), rules2)
|
|
8528
8543
|
)
|
|
8529
8544
|
);
|
|
8530
8545
|
const resolved = [];
|
|
@@ -8537,9 +8552,9 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
8537
8552
|
}
|
|
8538
8553
|
let archive;
|
|
8539
8554
|
for (const directory of directories) {
|
|
8540
|
-
const file = (extension) =>
|
|
8555
|
+
const file = (extension) => import_node_path52.default.join(directory, `lib${name2}.${extension}`);
|
|
8541
8556
|
const dylib = file("dylib");
|
|
8542
|
-
const parent =
|
|
8557
|
+
const parent = import_node_path52.default.dirname(dylib);
|
|
8543
8558
|
let present = libraryDirectories.get(parent);
|
|
8544
8559
|
if (present === void 0) {
|
|
8545
8560
|
present = import_node_fs50.default.existsSync(parent);
|
|
@@ -8646,7 +8661,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
8646
8661
|
for (const token of tokens) {
|
|
8647
8662
|
if (token.startsWith("-")) break;
|
|
8648
8663
|
const file = resolve(token);
|
|
8649
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
8664
|
+
if (file?.endsWith(".xcassets")) catalogs.push(import_node_path52.default.resolve(projectDir, file));
|
|
8650
8665
|
}
|
|
8651
8666
|
}
|
|
8652
8667
|
return catalogs;
|
|
@@ -8691,8 +8706,8 @@ function shellCopies(script, settings, projectDir) {
|
|
|
8691
8706
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
8692
8707
|
return [];
|
|
8693
8708
|
copies.push({
|
|
8694
|
-
from:
|
|
8695
|
-
to:
|
|
8709
|
+
from: import_node_path52.default.resolve(projectDir, operands[0]),
|
|
8710
|
+
to: import_node_path52.default.resolve(projectDir, operands[1])
|
|
8696
8711
|
});
|
|
8697
8712
|
}
|
|
8698
8713
|
return copies;
|
|
@@ -8712,7 +8727,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8712
8727
|
const copiedFiles = [];
|
|
8713
8728
|
let generatedInfoPlist = false;
|
|
8714
8729
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
8715
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
8730
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path52.default.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
8716
8731
|
const isPreparedOutput = (file) => file === infoPlistOutput || options2.requireSources !== false && file.endsWith(".swift");
|
|
8717
8732
|
for (const phaseId of list(target.buildPhases)) {
|
|
8718
8733
|
const phase = project.object(phaseId);
|
|
@@ -8727,7 +8742,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8727
8742
|
copiedFiles.push(
|
|
8728
8743
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
8729
8744
|
);
|
|
8730
|
-
const absolute = (raw) =>
|
|
8745
|
+
const absolute = (raw) => import_node_path52.default.resolve(project.projectDir, expand(raw, settings));
|
|
8731
8746
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
8732
8747
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
8733
8748
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -8760,7 +8775,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8760
8775
|
for (const file of inputFiles) if (import_node_fs50.default.existsSync(file)) projectInputs.add(file);
|
|
8761
8776
|
}
|
|
8762
8777
|
if (options2.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
8763
|
-
const phaseDir =
|
|
8778
|
+
const phaseDir = import_node_path52.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
8764
8779
|
for (const lists of fileLists.values())
|
|
8765
8780
|
for (const { file } of lists)
|
|
8766
8781
|
if (!import_node_fs50.default.existsSync(file))
|
|
@@ -8782,7 +8797,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8782
8797
|
const lists = fileLists.get(kind);
|
|
8783
8798
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
8784
8799
|
lists.forEach((_item, index) => {
|
|
8785
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
8800
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path52.default.join(
|
|
8786
8801
|
phaseDir,
|
|
8787
8802
|
`${kind}-${index}.xcfilelist`
|
|
8788
8803
|
);
|
|
@@ -8807,7 +8822,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8807
8822
|
const bin = swiftToolchainBin(
|
|
8808
8823
|
privateSwiftRelease() ?? swiftNativePin().distribution.release
|
|
8809
8824
|
);
|
|
8810
|
-
const startup =
|
|
8825
|
+
const startup = import_node_path52.default.join(phaseDir, "peach-tools.sh");
|
|
8811
8826
|
import_node_fs50.default.writeFileSync(
|
|
8812
8827
|
startup,
|
|
8813
8828
|
'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
|
|
@@ -8817,12 +8832,12 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8817
8832
|
env.PEACH_PHASE_TOOLCHAIN = bin;
|
|
8818
8833
|
env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
|
|
8819
8834
|
env.BASH_ENV = startup;
|
|
8820
|
-
env.PATH = [bin, env.PATH].filter(Boolean).join(
|
|
8835
|
+
env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path52.default.delimiter);
|
|
8821
8836
|
}
|
|
8822
8837
|
import_node_fs50.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
8823
8838
|
import_node_fs50.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
8824
8839
|
for (const output of allOutputs)
|
|
8825
|
-
import_node_fs50.default.mkdirSync(
|
|
8840
|
+
import_node_fs50.default.mkdirSync(import_node_path52.default.dirname(output), { recursive: true });
|
|
8826
8841
|
for (const [kind, lists] of fileLists)
|
|
8827
8842
|
lists.forEach((item, index) => {
|
|
8828
8843
|
import_node_fs50.default.writeFileSync(
|
|
@@ -8833,7 +8848,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
8833
8848
|
});
|
|
8834
8849
|
const rawScript = str(phase.shellScript) ?? "";
|
|
8835
8850
|
if (rawScript.includes("generate-modules-provider")) {
|
|
8836
|
-
const preloadPath =
|
|
8851
|
+
const preloadPath = import_node_path52.default.join(phaseDir, "expo-scan-timeout.cjs");
|
|
8837
8852
|
import_node_fs50.default.mkdirSync(phaseDir, { recursive: true });
|
|
8838
8853
|
import_node_fs50.default.writeFileSync(
|
|
8839
8854
|
preloadPath,
|
|
@@ -8884,9 +8899,9 @@ ${output}`
|
|
|
8884
8899
|
}
|
|
8885
8900
|
project.visitMembers(
|
|
8886
8901
|
targetId,
|
|
8887
|
-
xcodePathResolver(project.objects, project.projectDir,
|
|
8902
|
+
xcodePathResolver(project.objects, project.projectDir, import_node_path52.default.join, settings),
|
|
8888
8903
|
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs50.default.existsSync(file) ? [file] : [],
|
|
8889
|
-
|
|
8904
|
+
import_node_path52.default.join,
|
|
8890
8905
|
(file, kind, bundleName) => {
|
|
8891
8906
|
if (kind === "header") {
|
|
8892
8907
|
headers.add(file);
|
|
@@ -8899,7 +8914,7 @@ ${output}`
|
|
|
8899
8914
|
}
|
|
8900
8915
|
if (!import_node_fs50.default.existsSync(file)) {
|
|
8901
8916
|
if (options2.requireSources === false) return;
|
|
8902
|
-
const script = scriptForOutput.get(
|
|
8917
|
+
const script = scriptForOutput.get(import_node_path52.default.normalize(file));
|
|
8903
8918
|
throw new Error(
|
|
8904
8919
|
script ? `${targetName}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName}: missing source ${file}`
|
|
8905
8920
|
);
|
|
@@ -8910,7 +8925,7 @@ ${output}`
|
|
|
8910
8925
|
);
|
|
8911
8926
|
if (options2.prepareGeneratedSources && options2.requireSources !== false) {
|
|
8912
8927
|
const interfaceFiles = [...resources].filter(
|
|
8913
|
-
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(
|
|
8928
|
+
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path52.default.sep).some((part) => part.endsWith(".bundle"))
|
|
8914
8929
|
);
|
|
8915
8930
|
let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
|
|
8916
8931
|
if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs50.default.existsSync(infoPlistOutput)) {
|
|
@@ -8920,11 +8935,11 @@ ${output}`
|
|
|
8920
8935
|
}
|
|
8921
8936
|
const interfaceOutputs = /* @__PURE__ */ new Set();
|
|
8922
8937
|
for (const file of interfaceFiles) {
|
|
8923
|
-
const localization = file.split(
|
|
8938
|
+
const localization = file.split(import_node_path52.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
8924
8939
|
const isStoryboard = file.endsWith(".storyboard");
|
|
8925
8940
|
const extension = isStoryboard ? ".storyboardc" : ".nib";
|
|
8926
|
-
const name2 =
|
|
8927
|
-
const output =
|
|
8941
|
+
const name2 = import_node_path52.default.basename(file, import_node_path52.default.extname(file));
|
|
8942
|
+
const output = import_node_path52.default.join(
|
|
8928
8943
|
settings("DERIVED_FILE_DIR"),
|
|
8929
8944
|
"InterfaceBuilder",
|
|
8930
8945
|
localization,
|
|
@@ -8958,7 +8973,7 @@ ${output}`
|
|
|
8958
8973
|
}
|
|
8959
8974
|
import_node_fs50.default.rmSync(output, { recursive: true, force: true });
|
|
8960
8975
|
import_node_fs50.default.rmSync(stamp, { force: true });
|
|
8961
|
-
import_node_fs50.default.mkdirSync(
|
|
8976
|
+
import_node_fs50.default.mkdirSync(import_node_path52.default.dirname(output), { recursive: true });
|
|
8962
8977
|
(0, import_node_child_process28.execFileSync)("xcrun", ["ibtool", "--compile", output, file, ...args], {
|
|
8963
8978
|
cwd: project.projectDir,
|
|
8964
8979
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -9006,22 +9021,22 @@ ${developer}
|
|
|
9006
9021
|
function commonAncestor(dirs) {
|
|
9007
9022
|
let common = dirs[0];
|
|
9008
9023
|
for (const dir of dirs) {
|
|
9009
|
-
while (common !==
|
|
9010
|
-
common =
|
|
9024
|
+
while (common !== import_node_path52.default.dirname(common) && import_node_path52.default.relative(common, dir).startsWith(".."))
|
|
9025
|
+
common = import_node_path52.default.dirname(common);
|
|
9011
9026
|
}
|
|
9012
9027
|
return common;
|
|
9013
9028
|
}
|
|
9014
|
-
var isPodsProject = (xcodeproj) =>
|
|
9029
|
+
var isPodsProject = (xcodeproj) => import_node_path52.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path52.default.basename(import_node_path52.default.dirname(xcodeproj)) === "Pods";
|
|
9015
9030
|
function installedPodsSandbox(pods) {
|
|
9016
|
-
const podfileLock =
|
|
9017
|
-
const manifestLock =
|
|
9031
|
+
const podfileLock = import_node_path52.default.join(import_node_path52.default.dirname(pods), "Podfile.lock");
|
|
9032
|
+
const manifestLock = import_node_path52.default.join(pods, "Manifest.lock");
|
|
9018
9033
|
if (!import_node_fs50.default.existsSync(podfileLock))
|
|
9019
9034
|
throw new Error(
|
|
9020
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
9035
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path52.default.dirname(pods)}`
|
|
9021
9036
|
);
|
|
9022
9037
|
if (!import_node_fs50.default.existsSync(manifestLock) || !import_node_fs50.default.readFileSync(manifestLock).equals(import_node_fs50.default.readFileSync(podfileLock)))
|
|
9023
9038
|
throw new Error(
|
|
9024
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
9039
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path52.default.dirname(pods)}`
|
|
9025
9040
|
);
|
|
9026
9041
|
const specChecksums = {};
|
|
9027
9042
|
const lines = import_node_fs50.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
@@ -9031,8 +9046,8 @@ function installedPodsSandbox(pods) {
|
|
|
9031
9046
|
if (!entry) break;
|
|
9032
9047
|
specChecksums[entry[1]] = entry[2];
|
|
9033
9048
|
}
|
|
9034
|
-
const specs =
|
|
9035
|
-
const generated =
|
|
9049
|
+
const specs = import_node_path52.default.join(pods, "Local Podspecs");
|
|
9050
|
+
const generated = import_node_path52.default.join(pods, POD_GRAPH_SPECIFICATIONS);
|
|
9036
9051
|
if (import_node_fs50.default.existsSync(generated))
|
|
9037
9052
|
return {
|
|
9038
9053
|
podfileLock,
|
|
@@ -9041,14 +9056,14 @@ function installedPodsSandbox(pods) {
|
|
|
9041
9056
|
localPodspecs: readPodGraphSpecifications(generated),
|
|
9042
9057
|
specificationFiles: [generated]
|
|
9043
9058
|
};
|
|
9044
|
-
const specificationFiles = isDirectory(specs) ? import_node_fs50.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) =>
|
|
9059
|
+
const specificationFiles = isDirectory(specs) ? import_node_fs50.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path52.default.join(specs, name2)) : [];
|
|
9045
9060
|
return {
|
|
9046
9061
|
podfileLock,
|
|
9047
9062
|
manifestLock,
|
|
9048
9063
|
specChecksums,
|
|
9049
9064
|
localPodspecs: new Map(
|
|
9050
9065
|
specificationFiles.map((file) => [
|
|
9051
|
-
|
|
9066
|
+
import_node_path52.default.basename(file, ".podspec.json"),
|
|
9052
9067
|
import_node_fs50.default.readFileSync(file, "utf8")
|
|
9053
9068
|
])
|
|
9054
9069
|
),
|
|
@@ -9064,14 +9079,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
9064
9079
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
9065
9080
|
if (installedPods && isPodsProject(xcodeproj))
|
|
9066
9081
|
throw new Error(
|
|
9067
|
-
`${
|
|
9082
|
+
`${import_node_path52.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path52.default.dirname(import_node_path52.default.dirname(xcodeproj))}`
|
|
9068
9083
|
);
|
|
9069
9084
|
return;
|
|
9070
9085
|
}
|
|
9071
9086
|
const key = import_node_fs50.default.realpathSync.native(xcodeproj);
|
|
9072
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
9087
|
+
if (projectAt.has(key) || !installedPods && key.split(import_node_path52.default.sep).includes("Pods"))
|
|
9073
9088
|
return;
|
|
9074
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
9089
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path52.default.dirname(key));
|
|
9075
9090
|
const project = loadProject(key);
|
|
9076
9091
|
projectAt.set(key, project);
|
|
9077
9092
|
projects.push(project);
|
|
@@ -9087,12 +9102,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
9087
9102
|
for (const reference of listed)
|
|
9088
9103
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
9089
9104
|
if (projects.length === 0) {
|
|
9090
|
-
throw new Error(`${
|
|
9105
|
+
throw new Error(`${import_node_path52.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
9091
9106
|
}
|
|
9092
|
-
const podfile =
|
|
9107
|
+
const podfile = import_node_path52.default.join(import_node_path52.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
9093
9108
|
if (installedPods && !cocoapods && import_node_fs50.default.existsSync(podfile))
|
|
9094
9109
|
throw new Error(
|
|
9095
|
-
`${podfile} is not installed into ${
|
|
9110
|
+
`${podfile} is not installed into ${import_node_path52.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path52.default.dirname(podfile)} and open the workspace it writes`
|
|
9096
9111
|
);
|
|
9097
9112
|
return { listed, projects, projectAt, cocoapods };
|
|
9098
9113
|
}
|
|
@@ -9145,19 +9160,19 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
9145
9160
|
];
|
|
9146
9161
|
const found = containers.flatMap(
|
|
9147
9162
|
(dir) => [
|
|
9148
|
-
|
|
9149
|
-
...isDirectory(
|
|
9163
|
+
import_node_path52.default.join(dir, "xcshareddata"),
|
|
9164
|
+
...isDirectory(import_node_path52.default.join(dir, "xcuserdata")) ? import_node_fs50.default.readdirSync(import_node_path52.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path52.default.join(dir, "xcuserdata", user)) : []
|
|
9150
9165
|
].map((data) => ({
|
|
9151
9166
|
dir,
|
|
9152
|
-
file:
|
|
9167
|
+
file: import_node_path52.default.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
9153
9168
|
}))
|
|
9154
9169
|
).find((candidate) => import_node_fs50.default.existsSync(candidate.file));
|
|
9155
9170
|
if (!found) {
|
|
9156
9171
|
const known = containers.flatMap(
|
|
9157
|
-
(dir) => import_node_fs50.default.existsSync(
|
|
9172
|
+
(dir) => import_node_fs50.default.existsSync(import_node_path52.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs50.default.readdirSync(import_node_path52.default.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
|
|
9158
9173
|
);
|
|
9159
9174
|
throw new Error(
|
|
9160
|
-
`${
|
|
9175
|
+
`${import_node_path52.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
9161
9176
|
);
|
|
9162
9177
|
}
|
|
9163
9178
|
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
@@ -9174,8 +9189,8 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
9174
9189
|
if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
|
|
9175
9190
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
9176
9191
|
}
|
|
9177
|
-
const projectPath =
|
|
9178
|
-
|
|
9192
|
+
const projectPath = import_node_path52.default.resolve(
|
|
9193
|
+
import_node_path52.default.dirname(found.dir),
|
|
9179
9194
|
referenced.slice("container:".length)
|
|
9180
9195
|
);
|
|
9181
9196
|
const project = projects.find(
|
|
@@ -9199,26 +9214,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
9199
9214
|
var NativeAppTargetSelectionError = class extends Error {
|
|
9200
9215
|
};
|
|
9201
9216
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
9202
|
-
const nested =
|
|
9217
|
+
const nested = import_node_path52.default.join(projectRoot, "ios");
|
|
9203
9218
|
const iosRoot = import_node_fs50.default.existsSync(nested) ? nested : projectRoot;
|
|
9204
9219
|
const entries = import_node_fs50.default.readdirSync(iosRoot, { withFileTypes: true });
|
|
9205
9220
|
const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
9206
|
-
xcodeproj:
|
|
9221
|
+
xcodeproj: import_node_path52.default.join(iosRoot, entry.name),
|
|
9207
9222
|
workspace: null
|
|
9208
9223
|
})) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
9209
|
-
const workspace =
|
|
9224
|
+
const workspace = import_node_path52.default.join(iosRoot, entry.name);
|
|
9210
9225
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
9211
9226
|
xcodeproj: xcodeproj2,
|
|
9212
9227
|
workspace
|
|
9213
9228
|
}));
|
|
9214
9229
|
}).filter(
|
|
9215
|
-
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(
|
|
9230
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path52.default.sep).includes("Pods") && import_node_fs50.default.existsSync(xcodeproj2)
|
|
9216
9231
|
).filter(
|
|
9217
9232
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
9218
9233
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
9219
9234
|
xcodeproj: xcodeproj2,
|
|
9220
9235
|
workspace,
|
|
9221
|
-
name:
|
|
9236
|
+
name: import_node_path52.default.basename(xcodeproj2)
|
|
9222
9237
|
}));
|
|
9223
9238
|
if (projects.length === 0) return null;
|
|
9224
9239
|
if (projects.length > 1 && !iosTarget) {
|
|
@@ -9259,11 +9274,11 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
9259
9274
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
9260
9275
|
const container = import_node_fs50.default.existsSync(workspace) ? workspace : xcodeproj;
|
|
9261
9276
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
9262
|
-
if (import_node_fs50.default.existsSync(
|
|
9277
|
+
if (import_node_fs50.default.existsSync(import_node_path52.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
9263
9278
|
return true;
|
|
9264
|
-
const users =
|
|
9279
|
+
const users = import_node_path52.default.join(dir, "xcuserdata");
|
|
9265
9280
|
return import_node_fs50.default.existsSync(users) && import_node_fs50.default.readdirSync(users).some(
|
|
9266
|
-
(user) => import_node_fs50.default.existsSync(
|
|
9281
|
+
(user) => import_node_fs50.default.existsSync(import_node_path52.default.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
9267
9282
|
);
|
|
9268
9283
|
});
|
|
9269
9284
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -9274,8 +9289,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
9274
9289
|
);
|
|
9275
9290
|
return { xcodeproj, target, workspace: project.workspace };
|
|
9276
9291
|
}
|
|
9277
|
-
var workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
9278
|
-
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace :
|
|
9292
|
+
var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path52.default.join(
|
|
9293
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path52.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
9279
9294
|
"xcshareddata",
|
|
9280
9295
|
"swiftpm",
|
|
9281
9296
|
"Package.resolved"
|
|
@@ -9303,7 +9318,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9303
9318
|
(ref) => options2.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "") : isIosAppTarget(ref, options2) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
|
|
9304
9319
|
);
|
|
9305
9320
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
9306
|
-
const container =
|
|
9321
|
+
const container = import_node_path52.default.basename(xcodeprojOrWorkspace);
|
|
9307
9322
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
9308
9323
|
if (named.length !== 1) {
|
|
9309
9324
|
if (options2.frameworkMachOType)
|
|
@@ -9328,8 +9343,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9328
9343
|
for (const ref of allTargets) {
|
|
9329
9344
|
const product = ref.project.object(str(ref.target.productReference));
|
|
9330
9345
|
const file = str(product?.path);
|
|
9331
|
-
if (file && !byProduct.has(
|
|
9332
|
-
byProduct.set(
|
|
9346
|
+
if (file && !byProduct.has(import_node_path52.default.basename(file)))
|
|
9347
|
+
byProduct.set(import_node_path52.default.basename(file), ref);
|
|
9333
9348
|
}
|
|
9334
9349
|
const proxied = (project, proxyId) => {
|
|
9335
9350
|
const proxy = project.object(proxyId);
|
|
@@ -9353,7 +9368,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9353
9368
|
const buildFile = project.object(buildFileId);
|
|
9354
9369
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
9355
9370
|
const file = project.object(str(buildFile.fileRef));
|
|
9356
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
9371
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path52.default.basename(str(file.path) ?? "")) : void 0;
|
|
9357
9372
|
if (resolved)
|
|
9358
9373
|
found.push({
|
|
9359
9374
|
target: resolved,
|
|
@@ -9434,7 +9449,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9434
9449
|
const otherProduct = productName(other);
|
|
9435
9450
|
for (const { file, visibility } of headerPhase(other)) {
|
|
9436
9451
|
if (visibility === "Project") continue;
|
|
9437
|
-
const key = `${otherProduct}/${
|
|
9452
|
+
const key = `${otherProduct}/${import_node_path52.default.basename(file)}`;
|
|
9438
9453
|
if (!headers.has(key)) headers.set(key, file);
|
|
9439
9454
|
}
|
|
9440
9455
|
}
|
|
@@ -9465,7 +9480,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9465
9480
|
ref.id,
|
|
9466
9481
|
ref.project.resolvePath,
|
|
9467
9482
|
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs50.default.existsSync(file) ? [file] : [],
|
|
9468
|
-
|
|
9483
|
+
import_node_path52.default.join,
|
|
9469
9484
|
(file, kind) => {
|
|
9470
9485
|
if (kind === "header") found.push(file);
|
|
9471
9486
|
}
|
|
@@ -9481,12 +9496,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9481
9496
|
for (const ref of projectTargets(project)) {
|
|
9482
9497
|
const product = productName(ref);
|
|
9483
9498
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
9484
|
-
const name2 =
|
|
9499
|
+
const name2 = import_node_path52.default.basename(file);
|
|
9485
9500
|
if (!entries.has(name2))
|
|
9486
9501
|
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
9487
9502
|
}
|
|
9488
9503
|
for (const file of synchronizedHeaders(ref)) {
|
|
9489
|
-
const name2 =
|
|
9504
|
+
const name2 = import_node_path52.default.basename(file);
|
|
9490
9505
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
9491
9506
|
}
|
|
9492
9507
|
}
|
|
@@ -9496,7 +9511,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9496
9511
|
if (folder === null) continue;
|
|
9497
9512
|
for (const file of walkFiles(folder)) {
|
|
9498
9513
|
if (!HEADER_FILE.test(file)) continue;
|
|
9499
|
-
const name2 =
|
|
9514
|
+
const name2 = import_node_path52.default.basename(file);
|
|
9500
9515
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
9501
9516
|
}
|
|
9502
9517
|
}
|
|
@@ -9504,18 +9519,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9504
9519
|
for (const id of Object.keys(project.objects)) {
|
|
9505
9520
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
9506
9521
|
const file = project.resolvePath(id);
|
|
9507
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
9508
|
-
entries.set(
|
|
9522
|
+
if (file && HEADER_FILE.test(file) && !entries.has(import_node_path52.default.basename(file)))
|
|
9523
|
+
entries.set(import_node_path52.default.basename(file), file);
|
|
9509
9524
|
}
|
|
9510
9525
|
const map = [...entries];
|
|
9511
9526
|
projectHeaderMaps.set(project, map);
|
|
9512
9527
|
return map;
|
|
9513
9528
|
};
|
|
9514
9529
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
9515
|
-
const buildDir = (project) =>
|
|
9530
|
+
const buildDir = (project) => import_node_path52.default.join(project.projectDir, ".build/peach-xcode/Build");
|
|
9516
9531
|
const workspaceBuild = {
|
|
9517
|
-
SYMROOT:
|
|
9518
|
-
OBJROOT:
|
|
9532
|
+
SYMROOT: import_node_path52.default.join(buildDir(app.project), "Products"),
|
|
9533
|
+
OBJROOT: import_node_path52.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
9519
9534
|
};
|
|
9520
9535
|
const moduleTarget = (ref) => {
|
|
9521
9536
|
const name2 = str(ref.target.name) ?? ref.id;
|
|
@@ -9531,16 +9546,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9531
9546
|
TARGET_NAME: name2,
|
|
9532
9547
|
TARGETNAME: "$(TARGET_NAME)",
|
|
9533
9548
|
PROJECT: "$(PROJECT_NAME)",
|
|
9534
|
-
PROJECT_NAME:
|
|
9549
|
+
PROJECT_NAME: import_node_path52.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
9535
9550
|
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
9536
9551
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
9537
9552
|
SRCROOT: ref.project.projectDir,
|
|
9538
9553
|
SOURCE_ROOT: ref.project.projectDir,
|
|
9539
9554
|
PROJECT_DIR: ref.project.projectDir,
|
|
9540
|
-
SYMROOT:
|
|
9555
|
+
SYMROOT: import_node_path52.default.join(buildDir(ref.project), "Products"),
|
|
9541
9556
|
BUILD_DIR: "$(SYMROOT)",
|
|
9542
9557
|
BUILD_ROOT: "$(SYMROOT)",
|
|
9543
|
-
OBJROOT:
|
|
9558
|
+
OBJROOT: import_node_path52.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
9544
9559
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
9545
9560
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
9546
9561
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -9589,7 +9604,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9589
9604
|
xcconfigs
|
|
9590
9605
|
);
|
|
9591
9606
|
const searchRules = recursiveSearchRules(settings2);
|
|
9592
|
-
const absolute = (file) =>
|
|
9607
|
+
const absolute = (file) => import_node_path52.default.resolve(ref.project.projectDir, file);
|
|
9593
9608
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
9594
9609
|
const product = settings2("PRODUCT_NAME");
|
|
9595
9610
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -9620,7 +9635,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9620
9635
|
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
9621
9636
|
);
|
|
9622
9637
|
const building = options2.prepareGeneratedSources && options2.requireSources !== false;
|
|
9623
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
9638
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path52.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
9624
9639
|
if (versioning) {
|
|
9625
9640
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
9626
9641
|
const custom = [
|
|
@@ -9633,7 +9648,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9633
9648
|
].filter((key) => settings2(key));
|
|
9634
9649
|
if (custom.length)
|
|
9635
9650
|
throw new Error(
|
|
9636
|
-
`${name2}: Xcode generates ${
|
|
9651
|
+
`${name2}: Xcode generates ${import_node_path52.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
9637
9652
|
);
|
|
9638
9653
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
9639
9654
|
const [major, minor] = version.split(".");
|
|
@@ -9647,7 +9662,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9647
9662
|
""
|
|
9648
9663
|
].join("\n");
|
|
9649
9664
|
if (!import_node_fs50.default.existsSync(versioning) || import_node_fs50.default.readFileSync(versioning, "utf8") !== unit) {
|
|
9650
|
-
import_node_fs50.default.mkdirSync(
|
|
9665
|
+
import_node_fs50.default.mkdirSync(import_node_path52.default.dirname(versioning), { recursive: true });
|
|
9651
9666
|
import_node_fs50.default.writeFileSync(versioning, unit);
|
|
9652
9667
|
}
|
|
9653
9668
|
allSources.push(versioning);
|
|
@@ -9667,7 +9682,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9667
9682
|
const headerFiles = headerPhase(ref);
|
|
9668
9683
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
9669
9684
|
for (const { file, visibility } of headerFiles) {
|
|
9670
|
-
const name3 =
|
|
9685
|
+
const name3 = import_node_path52.default.basename(file);
|
|
9671
9686
|
const published = visibility !== "Project";
|
|
9672
9687
|
if (!ownHeaders.has(name3))
|
|
9673
9688
|
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
@@ -9675,35 +9690,35 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9675
9690
|
ownHeaders.set(`${product}/${name3}`, file);
|
|
9676
9691
|
}
|
|
9677
9692
|
for (const file of synchronizedHeaders(ref)) {
|
|
9678
|
-
const name3 =
|
|
9693
|
+
const name3 = import_node_path52.default.basename(file);
|
|
9679
9694
|
if (ownHeaders.has(name3)) continue;
|
|
9680
9695
|
ownHeaders.set(name3, file);
|
|
9681
9696
|
const qualified = `${product}/${name3}`;
|
|
9682
9697
|
if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file);
|
|
9683
9698
|
}
|
|
9684
9699
|
const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
|
|
9685
|
-
const wrapper =
|
|
9686
|
-
const publicHeaders =
|
|
9700
|
+
const wrapper = import_node_path52.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
9701
|
+
const publicHeaders = import_node_path52.default.resolve(
|
|
9687
9702
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
9688
|
-
settings2("PUBLIC_HEADERS_FOLDER_PATH") ||
|
|
9703
|
+
settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path52.default.join(wrapper, "Headers")
|
|
9689
9704
|
);
|
|
9690
|
-
const privateHeaders =
|
|
9705
|
+
const privateHeaders = import_node_path52.default.resolve(
|
|
9691
9706
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
9692
|
-
settings2("PRIVATE_HEADERS_FOLDER_PATH") ||
|
|
9707
|
+
settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path52.default.join(wrapper, "PrivateHeaders")
|
|
9693
9708
|
);
|
|
9694
9709
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
9695
|
-
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ?
|
|
9710
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path52.default.join(import_node_path52.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
9696
9711
|
const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs50.default.existsSync(moduleMap) && import_node_fs50.default.existsSync(frameworkUmbrella) ? {
|
|
9697
9712
|
framework: true,
|
|
9698
9713
|
moduleMap,
|
|
9699
9714
|
umbrella: frameworkUmbrella,
|
|
9700
|
-
outputModuleMap:
|
|
9701
|
-
outputUmbrella:
|
|
9715
|
+
outputModuleMap: import_node_path52.default.join(wrapper, "Modules", "module.modulemap"),
|
|
9716
|
+
outputUmbrella: import_node_path52.default.join(
|
|
9702
9717
|
wrapper,
|
|
9703
9718
|
"Headers",
|
|
9704
|
-
|
|
9719
|
+
import_node_path52.default.basename(frameworkUmbrella)
|
|
9705
9720
|
),
|
|
9706
|
-
outputHeader:
|
|
9721
|
+
outputHeader: import_node_path52.default.join(
|
|
9707
9722
|
wrapper,
|
|
9708
9723
|
"Headers",
|
|
9709
9724
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
@@ -9717,9 +9732,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9717
9732
|
outputUmbrella: compatibility.outputUmbrella,
|
|
9718
9733
|
outputHeader: compatibility.outputHeader
|
|
9719
9734
|
} : frameworkCompatibility;
|
|
9720
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap &&
|
|
9735
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path52.default.relative(import_node_path52.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path52.default.sep)[0] !== ".." && import_node_fs50.default.existsSync(moduleMap) ? import_node_fs50.default.readdirSync(import_node_path52.default.dirname(moduleMap)).flatMap((entry) => {
|
|
9721
9736
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
9722
|
-
const file =
|
|
9737
|
+
const file = import_node_path52.default.join(import_node_path52.default.dirname(moduleMap), entry);
|
|
9723
9738
|
return import_node_fs50.default.existsSync(file) ? [file] : [];
|
|
9724
9739
|
}) : [];
|
|
9725
9740
|
const fileFlags = {};
|
|
@@ -9806,15 +9821,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9806
9821
|
// xcode searches its products' include directory before
|
|
9807
9822
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
9808
9823
|
headerSearchPaths: [
|
|
9809
|
-
|
|
9824
|
+
import_node_path52.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
9810
9825
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
9811
9826
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
9812
9827
|
),
|
|
9813
|
-
|
|
9828
|
+
import_node_path52.default.join(
|
|
9814
9829
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
9815
9830
|
settings2("CURRENT_ARCH")
|
|
9816
9831
|
),
|
|
9817
|
-
|
|
9832
|
+
import_node_path52.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
9818
9833
|
settings2("DERIVED_FILE_DIR")
|
|
9819
9834
|
],
|
|
9820
9835
|
userHeaderSearchPaths: settingList(
|
|
@@ -9864,9 +9879,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9864
9879
|
...headerFiles.flatMap(
|
|
9865
9880
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
9866
9881
|
[
|
|
9867
|
-
|
|
9882
|
+
import_node_path52.default.join(
|
|
9868
9883
|
visibility === "Public" ? publicHeaders : privateHeaders,
|
|
9869
|
-
|
|
9884
|
+
import_node_path52.default.basename(file)
|
|
9870
9885
|
),
|
|
9871
9886
|
file
|
|
9872
9887
|
]
|
|
@@ -9888,17 +9903,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9888
9903
|
);
|
|
9889
9904
|
return file && HEADER_FILE.test(file) ? [
|
|
9890
9905
|
[
|
|
9891
|
-
|
|
9906
|
+
import_node_path52.default.resolve(
|
|
9892
9907
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
9893
9908
|
destination,
|
|
9894
|
-
|
|
9909
|
+
import_node_path52.default.basename(file)
|
|
9895
9910
|
),
|
|
9896
9911
|
file
|
|
9897
9912
|
]
|
|
9898
9913
|
] : [];
|
|
9899
9914
|
});
|
|
9900
9915
|
}),
|
|
9901
|
-
...moduleMap ? [[
|
|
9916
|
+
...moduleMap ? [[import_node_path52.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
9902
9917
|
]) : Object.fromEntries([
|
|
9903
9918
|
...podHeaders.map((file) => [file, file]),
|
|
9904
9919
|
...moduleMap ? [[moduleMap, moduleMap]] : []
|
|
@@ -9937,7 +9952,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9937
9952
|
const generate = settings2("GENERATE_INFOPLIST_FILE") === "YES";
|
|
9938
9953
|
if (!FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "") || !plistSetting && !generate || module3.generatedInfoPlist && !options2.prepareGeneratedSources)
|
|
9939
9954
|
return { ref, framework: module3 };
|
|
9940
|
-
const file = plistSetting ?
|
|
9955
|
+
const file = plistSetting ? import_node_path52.default.resolve(ref.project.projectDir, plistSetting) : null;
|
|
9941
9956
|
if (file) xcconfigs.add(file);
|
|
9942
9957
|
const info2 = processedInfoPlist(module3.name, file, productSettings2, keys);
|
|
9943
9958
|
if (generate) {
|
|
@@ -9953,7 +9968,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9953
9968
|
});
|
|
9954
9969
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
9955
9970
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
9956
|
-
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) =>
|
|
9971
|
+
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path52.default.dirname(file)).filter((dir) => import_node_fs50.default.existsSync(dir)) : []
|
|
9957
9972
|
);
|
|
9958
9973
|
const resourceProducts = [];
|
|
9959
9974
|
const bundleTargets = builtTargets.filter(
|
|
@@ -9964,7 +9979,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9964
9979
|
const phase = owner.ref.project.object(phaseId);
|
|
9965
9980
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
9966
9981
|
continue;
|
|
9967
|
-
const absolute = (raw) =>
|
|
9982
|
+
const absolute = (raw) => import_node_path52.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
9968
9983
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
9969
9984
|
const file = absolute(raw);
|
|
9970
9985
|
xcconfigs.add(file);
|
|
@@ -9980,7 +9995,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9980
9995
|
].filter((file) => file.endsWith(".bundle"));
|
|
9981
9996
|
if (inputs.length !== outputs.length)
|
|
9982
9997
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
9983
|
-
const destinationRoot =
|
|
9998
|
+
const destinationRoot = import_node_path52.default.join(
|
|
9984
9999
|
owner.settings("TARGET_BUILD_DIR"),
|
|
9985
10000
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
9986
10001
|
);
|
|
@@ -9989,24 +10004,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
9989
10004
|
const file = str(
|
|
9990
10005
|
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
9991
10006
|
);
|
|
9992
|
-
return file &&
|
|
10007
|
+
return file && import_node_path52.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
9993
10008
|
});
|
|
9994
10009
|
if (!product && !isDirectory(input2))
|
|
9995
10010
|
throw new Error(
|
|
9996
10011
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
9997
10012
|
);
|
|
9998
|
-
const destination =
|
|
9999
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
10013
|
+
const destination = import_node_path52.default.relative(destinationRoot, outputs[index]);
|
|
10014
|
+
if (destination === ".." || destination.startsWith(`..${import_node_path52.default.sep}`) || import_node_path52.default.isAbsolute(destination) || import_node_path52.default.basename(input2) !== import_node_path52.default.basename(destination))
|
|
10000
10015
|
throw new Error(
|
|
10001
10016
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
10002
10017
|
);
|
|
10003
|
-
const infoFile = product ?
|
|
10018
|
+
const infoFile = product ? import_node_path52.default.resolve(
|
|
10004
10019
|
product.ref.project.projectDir,
|
|
10005
10020
|
product.settings("INFOPLIST_FILE")
|
|
10006
10021
|
) : null;
|
|
10007
10022
|
if (infoFile) xcconfigs.add(infoFile);
|
|
10008
10023
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
10009
|
-
const bundlePath = prefix + destination.split(
|
|
10024
|
+
const bundlePath = prefix + destination.split(import_node_path52.default.sep).join("/");
|
|
10010
10025
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
10011
10026
|
throw new Error(
|
|
10012
10027
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -10022,15 +10037,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10022
10037
|
)
|
|
10023
10038
|
)
|
|
10024
10039
|
} : {
|
|
10025
|
-
resources: import_node_fs50.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) =>
|
|
10040
|
+
resources: import_node_fs50.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path52.default.join(entry.parentPath, entry.name)).sort(),
|
|
10026
10041
|
sourceRoot: input2
|
|
10027
10042
|
}
|
|
10028
10043
|
});
|
|
10029
10044
|
}
|
|
10030
10045
|
}
|
|
10031
10046
|
}
|
|
10032
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
10033
|
-
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ?
|
|
10047
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path52.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
10048
|
+
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path52.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
|
|
10034
10049
|
const infoPlistPending = module2.generatedInfoPlist && !options2.prepareGeneratedSources;
|
|
10035
10050
|
const info = processedInfoPlist(
|
|
10036
10051
|
module2.name,
|
|
@@ -10077,7 +10092,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10077
10092
|
};
|
|
10078
10093
|
}
|
|
10079
10094
|
const localPackageDirs = [
|
|
10080
|
-
...listed.filter((reference) => import_node_fs50.default.existsSync(
|
|
10095
|
+
...listed.filter((reference) => import_node_fs50.default.existsSync(import_node_path52.default.join(reference, "Package.swift"))),
|
|
10081
10096
|
...projects.flatMap(
|
|
10082
10097
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
10083
10098
|
if (!isDict(entry)) return [];
|
|
@@ -10087,19 +10102,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10087
10102
|
const packages = [];
|
|
10088
10103
|
while (pending.length > 0) {
|
|
10089
10104
|
const dir = pending.pop();
|
|
10090
|
-
if (import_node_fs50.default.existsSync(
|
|
10105
|
+
if (import_node_fs50.default.existsSync(import_node_path52.default.join(dir, "Package.swift"))) {
|
|
10091
10106
|
packages.push(dir);
|
|
10092
10107
|
continue;
|
|
10093
10108
|
}
|
|
10094
10109
|
if (!isDirectory(dir)) continue;
|
|
10095
10110
|
for (const child of import_node_fs50.default.readdirSync(dir, { withFileTypes: true }))
|
|
10096
10111
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
10097
|
-
pending.push(
|
|
10112
|
+
pending.push(import_node_path52.default.join(dir, child.name));
|
|
10098
10113
|
}
|
|
10099
10114
|
return packages;
|
|
10100
10115
|
}
|
|
10101
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
10102
|
-
return candidate && import_node_fs50.default.existsSync(
|
|
10116
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path52.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
10117
|
+
return candidate && import_node_fs50.default.existsSync(import_node_path52.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
10103
10118
|
})
|
|
10104
10119
|
)
|
|
10105
10120
|
];
|
|
@@ -10129,7 +10144,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10129
10144
|
if ((flag === "-framework" || flag === "-weak_framework") && name2)
|
|
10130
10145
|
sdkFrameworks.add(name2);
|
|
10131
10146
|
});
|
|
10132
|
-
const absolute = (raw) =>
|
|
10147
|
+
const absolute = (raw) => import_node_path52.default.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
10133
10148
|
const requested = options2.nativeModules;
|
|
10134
10149
|
const includeBinary = (name2, dir) => {
|
|
10135
10150
|
if (!requested || nativeTargets.has(ref) || requested.includes(name2) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
|
|
@@ -10147,7 +10162,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10147
10162
|
const name2 = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
10148
10163
|
if (!name2 || byProduct.has(entry.name) || searchedFrameworks.has(name2))
|
|
10149
10164
|
continue;
|
|
10150
|
-
const file =
|
|
10165
|
+
const file = import_node_path52.default.join(directory, entry.name);
|
|
10151
10166
|
if (import_node_fs50.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
10152
10167
|
searchedFrameworks.set(name2, file);
|
|
10153
10168
|
}
|
|
@@ -10156,7 +10171,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10156
10171
|
}
|
|
10157
10172
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
10158
10173
|
const dir = absolute(raw);
|
|
10159
|
-
const modulemap =
|
|
10174
|
+
const modulemap = import_node_path52.default.join(dir, "module.modulemap");
|
|
10160
10175
|
if (!import_node_fs50.default.existsSync(modulemap)) continue;
|
|
10161
10176
|
const name2 = moduleMapName(import_node_fs50.default.readFileSync(modulemap, "utf8"));
|
|
10162
10177
|
if (name2 && !binaryFrameworks.has(name2)) includeBinary(name2, dir);
|
|
@@ -10232,7 +10247,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10232
10247
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
10233
10248
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
10234
10249
|
kind: "local",
|
|
10235
|
-
dir:
|
|
10250
|
+
dir: import_node_path52.default.resolve(
|
|
10236
10251
|
project.projectDir,
|
|
10237
10252
|
str(reference.relativePath) ?? ""
|
|
10238
10253
|
)
|
|
@@ -10266,14 +10281,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10266
10281
|
continue;
|
|
10267
10282
|
}
|
|
10268
10283
|
if (tree === "BUILT_PRODUCTS_DIR" || tree === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
10269
|
-
byProduct.has(
|
|
10284
|
+
byProduct.has(import_node_path52.default.basename(rawPath)))
|
|
10270
10285
|
continue;
|
|
10271
10286
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
10272
10287
|
if (fileId && resolved !== null && !import_node_fs50.default.existsSync(resolved)) {
|
|
10273
|
-
const parts = resolved.split(
|
|
10288
|
+
const parts = resolved.split(import_node_path52.default.sep);
|
|
10274
10289
|
const pods = parts.lastIndexOf("Pods");
|
|
10275
|
-
const sandbox = parts.slice(0, pods + 1).join(
|
|
10276
|
-
if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs50.default.existsSync(
|
|
10290
|
+
const sandbox = parts.slice(0, pods + 1).join(import_node_path52.default.sep);
|
|
10291
|
+
if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs50.default.existsSync(import_node_path52.default.join(import_node_path52.default.dirname(sandbox), "Podfile")))
|
|
10277
10292
|
continue;
|
|
10278
10293
|
if (!ios_sdk_frameworks_default.frameworks.includes(name2))
|
|
10279
10294
|
throw new Error(
|
|
@@ -10301,7 +10316,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10301
10316
|
({ product }) => !options2.nativeModules || nativeTargets.has(built.ref) || options2.nativeModules.includes(product)
|
|
10302
10317
|
);
|
|
10303
10318
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
10304
|
-
let packageResolved = import_node_fs50.default.existsSync(resolvedFile) ? [import_node_fs50.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) =>
|
|
10319
|
+
let packageResolved = import_node_fs50.default.existsSync(resolvedFile) ? [import_node_fs50.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path52.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs50.default.existsSync(file)).map((file) => import_node_fs50.default.realpathSync.native(file)).sort();
|
|
10305
10320
|
if (packageResolved.length === 0) {
|
|
10306
10321
|
const requirements = remotePackageRequirements(projects);
|
|
10307
10322
|
if (requirements.length > 0) {
|
|
@@ -10357,7 +10372,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10357
10372
|
} : {},
|
|
10358
10373
|
rootDir: commonAncestor(
|
|
10359
10374
|
[
|
|
10360
|
-
workspace ?
|
|
10375
|
+
workspace ? import_node_path52.default.dirname(workspace) : app.project.projectDir,
|
|
10361
10376
|
...used.map((project) => project.projectDir),
|
|
10362
10377
|
...localPackageDirs,
|
|
10363
10378
|
...linkedProducts.flatMap(
|
|
@@ -10367,7 +10382,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
10367
10382
|
// a target's own files may sit beside the project, such as an asset
|
|
10368
10383
|
// catalog one folder up, and xcode builds them from there
|
|
10369
10384
|
...new Set(
|
|
10370
|
-
[...module2.allSources, ...module2.resources].filter((file) => import_node_fs50.default.existsSync(file)).map((file) =>
|
|
10385
|
+
[...module2.allSources, ...module2.resources].filter((file) => import_node_fs50.default.existsSync(file)).map((file) => import_node_path52.default.dirname(file))
|
|
10371
10386
|
)
|
|
10372
10387
|
].map((dir) => import_node_fs50.default.realpathSync.native(dir))
|
|
10373
10388
|
),
|
|
@@ -10536,7 +10551,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
10536
10551
|
app.resources,
|
|
10537
10552
|
(file) => import_node_fs51.default.readFileSync(file, "utf8"),
|
|
10538
10553
|
(file) => {
|
|
10539
|
-
const extension =
|
|
10554
|
+
const extension = import_node_path53.default.extname(file).toLowerCase();
|
|
10540
10555
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
10541
10556
|
return `data:${contentType};base64,${import_node_fs51.default.readFileSync(file).toString("base64")}`;
|
|
10542
10557
|
},
|
|
@@ -10575,7 +10590,7 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
10575
10590
|
const read = selectNativeAppIdentityReader(platform, {
|
|
10576
10591
|
android: () => null,
|
|
10577
10592
|
ios: () => {
|
|
10578
|
-
const nested =
|
|
10593
|
+
const nested = import_node_path53.default.join(projectRoot, "ios");
|
|
10579
10594
|
const iosRoot = import_node_fs51.default.existsSync(nested) ? nested : projectRoot;
|
|
10580
10595
|
const prefix = iosRoot === nested ? "ios/" : "";
|
|
10581
10596
|
const files = {};
|
|
@@ -10587,16 +10602,16 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
10587
10602
|
"AppDelegate.swift",
|
|
10588
10603
|
"AppDelegate.mm",
|
|
10589
10604
|
"AppDelegate.m",
|
|
10590
|
-
...import_node_fs51.default.readdirSync(
|
|
10605
|
+
...import_node_fs51.default.readdirSync(import_node_path53.default.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
|
|
10591
10606
|
];
|
|
10592
10607
|
for (const name2 of names) {
|
|
10593
10608
|
const relative2 = `${prefix}${entry.name}/${name2}`;
|
|
10594
|
-
const file =
|
|
10609
|
+
const file = import_node_path53.default.join(projectRoot, relative2);
|
|
10595
10610
|
if (import_node_fs51.default.existsSync(file)) files[relative2] = import_node_fs51.default.readFileSync(file, "utf8");
|
|
10596
10611
|
}
|
|
10597
10612
|
} else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
|
|
10598
10613
|
const relative2 = `${prefix}${entry.name}`;
|
|
10599
|
-
const file =
|
|
10614
|
+
const file = import_node_path53.default.join(projectRoot, relative2);
|
|
10600
10615
|
if (import_node_fs51.default.existsSync(file)) files[relative2] = import_node_fs51.default.readFileSync(file, "utf8");
|
|
10601
10616
|
}
|
|
10602
10617
|
}
|
|
@@ -10614,23 +10629,23 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
10614
10629
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
10615
10630
|
const files = {};
|
|
10616
10631
|
if (androidMergedManifest) {
|
|
10617
|
-
const file =
|
|
10632
|
+
const file = import_node_path53.default.resolve(projectRoot, androidMergedManifest);
|
|
10618
10633
|
if (!import_node_fs51.default.existsSync(file)) return null;
|
|
10619
10634
|
files[androidMergedManifest] = import_node_fs51.default.readFileSync(file, "utf8");
|
|
10620
10635
|
} else {
|
|
10621
|
-
const androidRoot =
|
|
10636
|
+
const androidRoot = import_node_path53.default.join(projectRoot, "android");
|
|
10622
10637
|
if (!import_node_fs51.default.existsSync(androidRoot)) return null;
|
|
10623
10638
|
const collect = (directory) => {
|
|
10624
10639
|
for (const entry of import_node_fs51.default.readdirSync(directory, { withFileTypes: true })) {
|
|
10625
|
-
const file =
|
|
10640
|
+
const file = import_node_path53.default.join(directory, entry.name);
|
|
10626
10641
|
if (entry.isDirectory()) collect(file);
|
|
10627
10642
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
10628
|
-
files[
|
|
10643
|
+
files[import_node_path53.default.relative(projectRoot, file).split(import_node_path53.default.sep).join("/")] = import_node_fs51.default.readFileSync(file, "utf8");
|
|
10629
10644
|
}
|
|
10630
10645
|
};
|
|
10631
10646
|
for (const module2 of import_node_fs51.default.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
10632
10647
|
if (!module2.isDirectory()) continue;
|
|
10633
|
-
const outputs =
|
|
10648
|
+
const outputs = import_node_path53.default.join(
|
|
10634
10649
|
androidRoot,
|
|
10635
10650
|
module2.name,
|
|
10636
10651
|
"build/intermediates/merged_manifests"
|
|
@@ -10641,14 +10656,14 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
|
10641
10656
|
for (const manifest of Object.keys(files)) {
|
|
10642
10657
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
10643
10658
|
if (!resourceDirectory) continue;
|
|
10644
|
-
const absolute =
|
|
10659
|
+
const absolute = import_node_path53.default.resolve(projectRoot, resourceDirectory);
|
|
10645
10660
|
if (!import_node_fs51.default.existsSync(absolute)) continue;
|
|
10646
10661
|
for (const entry of import_node_fs51.default.readdirSync(absolute, { withFileTypes: true })) {
|
|
10647
10662
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
10648
|
-
for (const resource of import_node_fs51.default.readdirSync(
|
|
10663
|
+
for (const resource of import_node_fs51.default.readdirSync(import_node_path53.default.join(absolute, entry.name))) {
|
|
10649
10664
|
if (!resource.endsWith(".xml")) continue;
|
|
10650
10665
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
10651
|
-
files[file] = import_node_fs51.default.readFileSync(
|
|
10666
|
+
files[file] = import_node_fs51.default.readFileSync(import_node_path53.default.resolve(projectRoot, file), "utf8");
|
|
10652
10667
|
}
|
|
10653
10668
|
}
|
|
10654
10669
|
}
|
|
@@ -10669,7 +10684,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
10669
10684
|
parseInfoPlist,
|
|
10670
10685
|
buildSdkVersion
|
|
10671
10686
|
);
|
|
10672
|
-
const projectManifestPath =
|
|
10687
|
+
const projectManifestPath = import_node_path53.default.join(projectRoot, "package.json");
|
|
10673
10688
|
const projectRequire = (0, import_node_module2.createRequire)(projectManifestPath);
|
|
10674
10689
|
let reanimatedManifestPath;
|
|
10675
10690
|
try {
|
|
@@ -10690,8 +10705,8 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
10690
10705
|
if (Number.parseInt(installedVersion, 10) < 4) return identity2;
|
|
10691
10706
|
const defaults = JSON.parse(
|
|
10692
10707
|
import_node_fs51.default.readFileSync(
|
|
10693
|
-
|
|
10694
|
-
|
|
10708
|
+
import_node_path53.default.join(
|
|
10709
|
+
import_node_path53.default.dirname(reanimatedManifestPath),
|
|
10695
10710
|
"src/featureFlags/staticFlags.json"
|
|
10696
10711
|
),
|
|
10697
10712
|
"utf8"
|