peachsim 0.1.2421 → 0.1.2422
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 +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +4317 -3935
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3343 -2961
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +4199 -3817
- package/dist-lib/host/fetch-proxy-handler.cjs +24 -3
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +24 -3
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +24 -3
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +231 -212
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +30 -25
- package/dist-lib/public-origins-lib.json +77 -56
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +4851 -4468
- package/dist-lib/swift-compile.cjs +1261 -888
- package/dist-lib/swift-compile.mjs +1231 -848
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2712 -2347
- package/dist-lib/vite.cjs +24 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +0 -10
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/layer-claims.d.ts +2 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/expo-kotlin-bundle.ts +1 -1
- package/src/native-static-libraries.ts +51 -4
- package/src/swift-compile.ts +184 -107
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-guest-compile.ts +2 -0
- package/src/swift-guest-source-inputs.ts +2 -2
- package/src/swift-header-compiler.ts +185 -0
- package/src/swift-header-dependencies.ts +174 -0
- package/src/swift-objc-compile.ts +18 -24
- package/dist-types/packages/peach-engine/src/render-worker/accessibilityHostContract.d.ts +0 -65
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1142,7 +1142,7 @@ var require_lib = __commonJS({
|
|
|
1142
1142
|
// src/native-app-identity-project.ts
|
|
1143
1143
|
import fs19 from "node:fs";
|
|
1144
1144
|
import { createRequire } from "node:module";
|
|
1145
|
-
import
|
|
1145
|
+
import path40 from "node:path";
|
|
1146
1146
|
|
|
1147
1147
|
// src/android-string-value.ts
|
|
1148
1148
|
function compileAndroidStringValue(text2, where) {
|
|
@@ -1795,10 +1795,10 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
|
|
|
1795
1795
|
var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
1796
1796
|
function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
|
|
1797
1797
|
const pbxprojPath = Object.keys(files).find(
|
|
1798
|
-
(
|
|
1798
|
+
(path41) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path41)
|
|
1799
1799
|
) ?? Object.keys(files).find(
|
|
1800
|
-
(
|
|
1801
|
-
) ?? Object.keys(files).find((
|
|
1800
|
+
(path41) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path41)
|
|
1801
|
+
) ?? Object.keys(files).find((path41) => /(?:^|\/)project\.pbxproj$/.test(path41));
|
|
1802
1802
|
if (!pbxprojPath) return null;
|
|
1803
1803
|
const pbxproj = files[pbxprojPath];
|
|
1804
1804
|
let objects = {};
|
|
@@ -1840,7 +1840,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1840
1840
|
} else if (applicationTargetNames.size === 1) {
|
|
1841
1841
|
targetName = [...applicationTargetNames][0];
|
|
1842
1842
|
} else if (applicationTargetNames.size > 1) {
|
|
1843
|
-
const delegateTargets = Object.keys(files).filter((
|
|
1843
|
+
const delegateTargets = Object.keys(files).filter((path41) => !path41.includes("/Pods/")).map((path41) => path41.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
|
|
1844
1844
|
(name) => typeof name === "string" && applicationTargetNames.has(name)
|
|
1845
1845
|
);
|
|
1846
1846
|
if (delegateTargets.length === 1) {
|
|
@@ -2081,7 +2081,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2081
2081
|
if (Object.hasOwn(files, file)) return [file];
|
|
2082
2082
|
const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
2083
2083
|
return paths.filter(
|
|
2084
|
-
(
|
|
2084
|
+
(path41) => path41.startsWith(prefix) && !/(?:^|\/)\./.test(path41.slice(prefix.length))
|
|
2085
2085
|
);
|
|
2086
2086
|
},
|
|
2087
2087
|
join8,
|
|
@@ -2092,7 +2092,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2092
2092
|
}
|
|
2093
2093
|
const rootModuleName = readRootModuleName(
|
|
2094
2094
|
Object.entries(files).filter(
|
|
2095
|
-
([
|
|
2095
|
+
([path41]) => !path41.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path41) || path41.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
|
|
2096
2096
|
).map(([, source]) => source)
|
|
2097
2097
|
);
|
|
2098
2098
|
return {
|
|
@@ -2365,9 +2365,9 @@ var NATIVE_GRAPH_ID = createHash3("sha256").update(JSON.stringify(NATIVE_GRAPH_I
|
|
|
2365
2365
|
|
|
2366
2366
|
// src/xcode-project.ts
|
|
2367
2367
|
import { execFileSync as execFileSync15 } from "node:child_process";
|
|
2368
|
-
import { createHash as
|
|
2368
|
+
import { createHash as createHash23 } from "node:crypto";
|
|
2369
2369
|
import fs18 from "node:fs";
|
|
2370
|
-
import
|
|
2370
|
+
import path39 from "node:path";
|
|
2371
2371
|
import plist3 from "plist";
|
|
2372
2372
|
|
|
2373
2373
|
// src/bazel-project.ts
|
|
@@ -3877,10 +3877,10 @@ import {
|
|
|
3877
3877
|
execFile as execFile4,
|
|
3878
3878
|
execFileSync as execFileSync14
|
|
3879
3879
|
} from "node:child_process";
|
|
3880
|
-
import { createHash as
|
|
3880
|
+
import { createHash as createHash22 } from "node:crypto";
|
|
3881
3881
|
import fs17 from "node:fs";
|
|
3882
3882
|
import os8 from "node:os";
|
|
3883
|
-
import
|
|
3883
|
+
import path37 from "node:path";
|
|
3884
3884
|
import { promisify as promisify4 } from "node:util";
|
|
3885
3885
|
|
|
3886
3886
|
// src/git-repo-env.ts
|
|
@@ -3892,7 +3892,7 @@ var UNATTENDED_GIT_ENV = {
|
|
|
3892
3892
|
// src/swift-distribution.ts
|
|
3893
3893
|
import fs16 from "node:fs";
|
|
3894
3894
|
import os7 from "node:os";
|
|
3895
|
-
import
|
|
3895
|
+
import path36 from "node:path";
|
|
3896
3896
|
|
|
3897
3897
|
// ../contrast-runtime-delivery/src/index.ts
|
|
3898
3898
|
import { spawn as spawn3 } from "node:child_process";
|
|
@@ -3937,28 +3937,28 @@ import {
|
|
|
3937
3937
|
spawn as spawn5,
|
|
3938
3938
|
execFileSync as execFileSync13
|
|
3939
3939
|
} from "node:child_process";
|
|
3940
|
-
import { createHash as
|
|
3940
|
+
import { createHash as createHash20, randomUUID as randomUUID5 } from "node:crypto";
|
|
3941
3941
|
import {
|
|
3942
|
-
chmodSync as
|
|
3942
|
+
chmodSync as chmodSync3,
|
|
3943
3943
|
copyFileSync,
|
|
3944
3944
|
cpSync,
|
|
3945
|
-
existsSync as
|
|
3945
|
+
existsSync as existsSync9,
|
|
3946
3946
|
lstatSync,
|
|
3947
|
-
mkdirSync as
|
|
3948
|
-
mkdtempSync as
|
|
3949
|
-
readFileSync as
|
|
3947
|
+
mkdirSync as mkdirSync8,
|
|
3948
|
+
mkdtempSync as mkdtempSync4,
|
|
3949
|
+
readFileSync as readFileSync21,
|
|
3950
3950
|
readdirSync as readdirSync10,
|
|
3951
3951
|
readlinkSync,
|
|
3952
3952
|
realpathSync as realpathSync6,
|
|
3953
|
-
renameSync as
|
|
3954
|
-
rmSync as
|
|
3955
|
-
statSync as
|
|
3953
|
+
renameSync as renameSync3,
|
|
3954
|
+
rmSync as rmSync8,
|
|
3955
|
+
statSync as statSync4,
|
|
3956
3956
|
symlinkSync as symlinkSync2,
|
|
3957
3957
|
utimesSync,
|
|
3958
|
-
writeFileSync as
|
|
3958
|
+
writeFileSync as writeFileSync10
|
|
3959
3959
|
} from "node:fs";
|
|
3960
3960
|
import os6 from "node:os";
|
|
3961
|
-
import
|
|
3961
|
+
import path33 from "node:path";
|
|
3962
3962
|
import * as v5 from "valibot";
|
|
3963
3963
|
|
|
3964
3964
|
// src/admitted-mac-build.ts
|
|
@@ -4252,13 +4252,32 @@ var runBinaryen = promisify2(execFile2);
|
|
|
4252
4252
|
var WASM_LOWER_IDENTITY = `binaryen ${BINARYEN_VERSION} narrow ${LOWERING.join(" ")} ${FEATURES.join(",")} unoptimized-names`;
|
|
4253
4253
|
var BINARYEN_RELEASES = new Map(Object.entries(binaryen_lock_default.platforms));
|
|
4254
4254
|
|
|
4255
|
+
// src/swift-header-compiler.ts
|
|
4256
|
+
import { createHash as createHash17 } from "node:crypto";
|
|
4257
|
+
import {
|
|
4258
|
+
chmodSync,
|
|
4259
|
+
existsSync as existsSync5,
|
|
4260
|
+
mkdirSync as mkdirSync5,
|
|
4261
|
+
mkdtempSync as mkdtempSync3,
|
|
4262
|
+
readFileSync as readFileSync17,
|
|
4263
|
+
renameSync as renameSync2,
|
|
4264
|
+
rmSync as rmSync5,
|
|
4265
|
+
statSync as statSync2,
|
|
4266
|
+
writeFileSync as writeFileSync8
|
|
4267
|
+
} from "node:fs";
|
|
4268
|
+
import { createServer } from "node:http";
|
|
4269
|
+
import path25 from "node:path";
|
|
4270
|
+
|
|
4271
|
+
// src/swift-header-dependencies.ts
|
|
4272
|
+
import path26 from "node:path";
|
|
4273
|
+
|
|
4255
4274
|
// src/swift-icu.ts
|
|
4256
4275
|
import { execFile as execFile3 } from "node:child_process";
|
|
4257
|
-
import { createHash as
|
|
4258
|
-
import { existsSync as
|
|
4276
|
+
import { createHash as createHash18, randomUUID as randomUUID3 } from "node:crypto";
|
|
4277
|
+
import { existsSync as existsSync6, readFileSync as readFileSync18 } from "node:fs";
|
|
4259
4278
|
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
4260
4279
|
import os4 from "node:os";
|
|
4261
|
-
import
|
|
4280
|
+
import path27 from "node:path";
|
|
4262
4281
|
import { promisify as promisify3 } from "node:util";
|
|
4263
4282
|
import {
|
|
4264
4283
|
brotliCompress,
|
|
@@ -4281,21 +4300,21 @@ var inflateGzip = promisify3(gunzip);
|
|
|
4281
4300
|
|
|
4282
4301
|
// src/swift-link-roots.ts
|
|
4283
4302
|
import fs13 from "node:fs";
|
|
4284
|
-
import
|
|
4303
|
+
import path28 from "node:path";
|
|
4285
4304
|
|
|
4286
4305
|
// src/swift-project-user.ts
|
|
4287
4306
|
import { execFileSync as execFileSync11 } from "node:child_process";
|
|
4288
4307
|
import {
|
|
4289
|
-
chmodSync,
|
|
4290
|
-
existsSync as
|
|
4291
|
-
mkdirSync as
|
|
4308
|
+
chmodSync as chmodSync2,
|
|
4309
|
+
existsSync as existsSync7,
|
|
4310
|
+
mkdirSync as mkdirSync6,
|
|
4292
4311
|
readdirSync as readdirSync8,
|
|
4293
|
-
readFileSync as
|
|
4312
|
+
readFileSync as readFileSync19,
|
|
4294
4313
|
realpathSync as realpathSync3,
|
|
4295
|
-
rmSync as
|
|
4296
|
-
statSync as
|
|
4314
|
+
rmSync as rmSync6,
|
|
4315
|
+
statSync as statSync3
|
|
4297
4316
|
} from "node:fs";
|
|
4298
|
-
import
|
|
4317
|
+
import path29 from "node:path";
|
|
4299
4318
|
|
|
4300
4319
|
// src/swift-reproducible.ts
|
|
4301
4320
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
@@ -4305,27 +4324,27 @@ import os5 from "node:os";
|
|
|
4305
4324
|
import {
|
|
4306
4325
|
spawn as spawn4
|
|
4307
4326
|
} from "node:child_process";
|
|
4308
|
-
import { createHash as
|
|
4327
|
+
import { createHash as createHash19, randomUUID as randomUUID4 } from "node:crypto";
|
|
4309
4328
|
import {
|
|
4310
|
-
existsSync as
|
|
4329
|
+
existsSync as existsSync8,
|
|
4311
4330
|
linkSync,
|
|
4312
|
-
mkdirSync as
|
|
4331
|
+
mkdirSync as mkdirSync7,
|
|
4313
4332
|
readdirSync as readdirSync9,
|
|
4314
|
-
readFileSync as
|
|
4333
|
+
readFileSync as readFileSync20,
|
|
4315
4334
|
realpathSync as realpathSync5,
|
|
4316
|
-
rmSync as
|
|
4317
|
-
writeFileSync as
|
|
4335
|
+
rmSync as rmSync7,
|
|
4336
|
+
writeFileSync as writeFileSync9
|
|
4318
4337
|
} from "node:fs";
|
|
4319
4338
|
import { homedir as homedir2 } from "node:os";
|
|
4320
|
-
import
|
|
4339
|
+
import path30 from "node:path";
|
|
4321
4340
|
|
|
4322
4341
|
// src/swift-uniform-type-constants.ts
|
|
4323
4342
|
import { execFileSync as execFileSync12 } from "node:child_process";
|
|
4324
|
-
import
|
|
4343
|
+
import path31 from "node:path";
|
|
4325
4344
|
|
|
4326
4345
|
// src/xcode-header-search.ts
|
|
4327
4346
|
import fs14 from "node:fs";
|
|
4328
|
-
import
|
|
4347
|
+
import path32 from "node:path";
|
|
4329
4348
|
|
|
4330
4349
|
// src/swift-compile.ts
|
|
4331
4350
|
var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
@@ -4403,7 +4422,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
|
|
|
4403
4422
|
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
4404
4423
|
(module) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module}"`
|
|
4405
4424
|
).join("");
|
|
4406
|
-
var compilerSourceDigest = true ? "
|
|
4425
|
+
var compilerSourceDigest = true ? "63f37c4a87253305166cb52435207eb3f74394734f1a77e562d79ab7d5d7dfc1" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
4407
4426
|
var C_WORDS = new Set(
|
|
4408
4427
|
"auto bool break case char const continue default do double else enum extern false float for goto if inline int long register restrict return short signed sizeof static struct switch true typedef union unsigned void volatile while YES NO NULL nil Nil id self super instancetype".split(
|
|
4409
4428
|
" "
|
|
@@ -4448,7 +4467,7 @@ var SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
|
|
|
4448
4467
|
|
|
4449
4468
|
// src/answeredNativePackages.ts
|
|
4450
4469
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4451
|
-
import { readFileSync as
|
|
4470
|
+
import { readFileSync as readFileSync22 } from "node:fs";
|
|
4452
4471
|
import { join as join7 } from "node:path";
|
|
4453
4472
|
|
|
4454
4473
|
// src/launchMetadataContract.ts
|
|
@@ -4475,7 +4494,7 @@ var LAUNCH_METADATA_KEYS_BEFORE_RUNTIME_STATED_THEM = LAUNCH_METADATA_KEYS.filte
|
|
|
4475
4494
|
|
|
4476
4495
|
// src/runtime-assets.ts
|
|
4477
4496
|
import fs15 from "fs";
|
|
4478
|
-
import
|
|
4497
|
+
import path34 from "path";
|
|
4479
4498
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
4480
4499
|
|
|
4481
4500
|
// src/answeredNativePackages.ts
|
|
@@ -4488,17 +4507,17 @@ var unansweredStore = new AsyncLocalStorage();
|
|
|
4488
4507
|
var answeredStore = new AsyncLocalStorage();
|
|
4489
4508
|
|
|
4490
4509
|
// src/nitroAdapterContract.ts
|
|
4491
|
-
import { createHash as
|
|
4492
|
-
import { readdirSync as readdirSync11, readFileSync as
|
|
4493
|
-
import
|
|
4510
|
+
import { createHash as createHash21 } from "node:crypto";
|
|
4511
|
+
import { readdirSync as readdirSync11, readFileSync as readFileSync23 } from "node:fs";
|
|
4512
|
+
import path35 from "node:path";
|
|
4494
4513
|
|
|
4495
4514
|
// src/swift-package-manifest.ts
|
|
4496
|
-
var cacheDir3 =
|
|
4515
|
+
var cacheDir3 = path37.join(cacheDir(), "swift-manifests");
|
|
4497
4516
|
var execFileAsync = promisify4(execFile4);
|
|
4498
4517
|
|
|
4499
4518
|
// src/xcode-json-project.ts
|
|
4500
4519
|
var import_json5 = __toESM(require_lib(), 1);
|
|
4501
|
-
import
|
|
4520
|
+
import path38 from "node:path";
|
|
4502
4521
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4503
4522
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
4504
4523
|
var items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -4555,7 +4574,7 @@ var PHASE_ISA = {
|
|
|
4555
4574
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
4556
4575
|
const json = import_json5.default.parse(source);
|
|
4557
4576
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
4558
|
-
const projectDir =
|
|
4577
|
+
const projectDir = path38.dirname(xcodeproj);
|
|
4559
4578
|
const objects = {};
|
|
4560
4579
|
let next = 0;
|
|
4561
4580
|
const add = (entry, id) => {
|
|
@@ -4568,7 +4587,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
4568
4587
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
4569
4588
|
if (base) {
|
|
4570
4589
|
if (base[1] === "PROJECT")
|
|
4571
|
-
return { sourceTree: "<absolute>", path:
|
|
4590
|
+
return { sourceTree: "<absolute>", path: path38.join(projectDir, base[2]) };
|
|
4572
4591
|
if (base[1] === "PRODUCTS")
|
|
4573
4592
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
4574
4593
|
return null;
|
|
@@ -4576,7 +4595,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
4576
4595
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
4577
4596
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
4578
4597
|
if (unescaped.startsWith("~")) return null;
|
|
4579
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
4598
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: path38.join(groupDir, unescaped) };
|
|
4580
4599
|
};
|
|
4581
4600
|
const memberships = [];
|
|
4582
4601
|
const folders = [];
|
|
@@ -4587,7 +4606,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
4587
4606
|
const kind = text(entry.kind) ?? "file-reference";
|
|
4588
4607
|
const raw = text(entry.path) ?? "";
|
|
4589
4608
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
4590
|
-
const name = text(entry.name) ??
|
|
4609
|
+
const name = text(entry.name) ?? path38.basename(raw);
|
|
4591
4610
|
const node = { id: "", name, dir: null, parent, children: [] };
|
|
4592
4611
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
4593
4612
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -4708,7 +4727,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
4708
4727
|
if (!isObject(entry)) continue;
|
|
4709
4728
|
const repository = text(entry.repository);
|
|
4710
4729
|
const local = text(entry.path);
|
|
4711
|
-
const name = local !== void 0 ?
|
|
4730
|
+
const name = local !== void 0 ? path38.basename(path38.resolve(path38.dirname(xcodeproj), local)) : path38.basename(repository ?? "").replace(/\.git$/, "");
|
|
4712
4731
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
4713
4732
|
isa: "XCRemoteSwiftPackageReference",
|
|
4714
4733
|
repositoryURL: repository ?? "",
|
|
@@ -4933,7 +4952,7 @@ function walkFiles(dir) {
|
|
|
4933
4952
|
const out = [];
|
|
4934
4953
|
for (const entry of fs18.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
4935
4954
|
if (entry.name.startsWith(".")) continue;
|
|
4936
|
-
const full =
|
|
4955
|
+
const full = path39.join(dir, entry.name);
|
|
4937
4956
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
4938
4957
|
else if (entry.isFile()) out.push(full);
|
|
4939
4958
|
}
|
|
@@ -4950,7 +4969,7 @@ function readXcconfig(file, read) {
|
|
|
4950
4969
|
if (include) {
|
|
4951
4970
|
Object.assign(
|
|
4952
4971
|
settings,
|
|
4953
|
-
readXcconfig(
|
|
4972
|
+
readXcconfig(path39.resolve(path39.dirname(file), include[1]), read)
|
|
4954
4973
|
);
|
|
4955
4974
|
continue;
|
|
4956
4975
|
}
|
|
@@ -4995,8 +5014,8 @@ function applyOperator(value, operator) {
|
|
|
4995
5014
|
return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
4996
5015
|
case "standardizepath":
|
|
4997
5016
|
if (value === ".") return value;
|
|
4998
|
-
if (
|
|
4999
|
-
return
|
|
5017
|
+
if (path39.posix.isAbsolute(value))
|
|
5018
|
+
return path39.posix.normalize(value).replace(/(?<=.)\/$/, "");
|
|
5000
5019
|
return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
|
|
5001
5020
|
}
|
|
5002
5021
|
throw new Error(`unsupported build setting operator :${operator}`);
|
|
@@ -5005,18 +5024,18 @@ function decodeXml(text2) {
|
|
|
5005
5024
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
5006
5025
|
}
|
|
5007
5026
|
function workspaceReferences(workspace) {
|
|
5008
|
-
const data =
|
|
5027
|
+
const data = path39.join(workspace, "contents.xcworkspacedata");
|
|
5009
5028
|
if (!fs18.existsSync(data))
|
|
5010
5029
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
5011
|
-
const container =
|
|
5030
|
+
const container = path39.dirname(workspace);
|
|
5012
5031
|
const locate = (location, base) => {
|
|
5013
5032
|
const colon = location.indexOf(":");
|
|
5014
5033
|
const kind = location.slice(0, colon);
|
|
5015
5034
|
const rest = location.slice(colon + 1);
|
|
5016
|
-
if (kind === "group") return
|
|
5017
|
-
if (kind === "container" || kind === "self") return
|
|
5018
|
-
if (kind === "absolute") return
|
|
5019
|
-
throw new Error(`${
|
|
5035
|
+
if (kind === "group") return path39.resolve(base, rest);
|
|
5036
|
+
if (kind === "container" || kind === "self") return path39.resolve(container, rest);
|
|
5037
|
+
if (kind === "absolute") return path39.resolve(rest);
|
|
5038
|
+
throw new Error(`${path39.basename(workspace)} has an unsupported location ${location}`);
|
|
5020
5039
|
};
|
|
5021
5040
|
const groups = [container];
|
|
5022
5041
|
const references = [];
|
|
@@ -5071,7 +5090,7 @@ function remotePackageRequirements(projects) {
|
|
|
5071
5090
|
var loaded = /* @__PURE__ */ new Map();
|
|
5072
5091
|
function xcodeProjectFile(xcodeproj) {
|
|
5073
5092
|
for (const name of ["project.pbxproj", "project.xcproj"]) {
|
|
5074
|
-
const file =
|
|
5093
|
+
const file = path39.join(xcodeproj, name);
|
|
5075
5094
|
if (fs18.existsSync(file)) return file;
|
|
5076
5095
|
}
|
|
5077
5096
|
return null;
|
|
@@ -5081,7 +5100,7 @@ function loadProject(xcodeproj) {
|
|
|
5081
5100
|
if (!projectFile)
|
|
5082
5101
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
5083
5102
|
const source = fs18.readFileSync(projectFile, "utf8");
|
|
5084
|
-
const digest =
|
|
5103
|
+
const digest = createHash23("sha256").update(source).digest("hex");
|
|
5085
5104
|
const cached = loaded.get(projectFile);
|
|
5086
5105
|
if (cached?.digest === digest) return cached.project;
|
|
5087
5106
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -5098,9 +5117,9 @@ function loadProject(xcodeproj) {
|
|
|
5098
5117
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
5099
5118
|
}
|
|
5100
5119
|
const projectDir = fs18.realpathSync.native(
|
|
5101
|
-
|
|
5120
|
+
path39.resolve(path39.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
5102
5121
|
);
|
|
5103
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
5122
|
+
const resolvePath = xcodePathResolver(objects, projectDir, path39.join);
|
|
5104
5123
|
const result = {
|
|
5105
5124
|
xcodeproj,
|
|
5106
5125
|
projectFile,
|
|
@@ -5148,7 +5167,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
5148
5167
|
const relative2 = str(config.baseConfigurationReferenceRelativePath);
|
|
5149
5168
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
5150
5169
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
5151
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative2 ?
|
|
5170
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path39.resolve(directory, relative2) : null;
|
|
5152
5171
|
if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !fs18.existsSync(baseFile)))
|
|
5153
5172
|
throw new Error(
|
|
5154
5173
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
|
|
@@ -5240,10 +5259,10 @@ function scriptCommand(shell, script) {
|
|
|
5240
5259
|
return [executable, ...args, "-c", script];
|
|
5241
5260
|
}
|
|
5242
5261
|
function expandSearchPath(directory, rules2) {
|
|
5243
|
-
if (
|
|
5262
|
+
if (path39.basename(directory) !== "**") return [directory];
|
|
5244
5263
|
const expanded = [];
|
|
5245
5264
|
const seen = /* @__PURE__ */ new Set();
|
|
5246
|
-
const queue = [
|
|
5265
|
+
const queue = [path39.dirname(directory)];
|
|
5247
5266
|
for (let at = 0; at < queue.length; at++) {
|
|
5248
5267
|
const current = queue[at];
|
|
5249
5268
|
let real;
|
|
@@ -5259,7 +5278,7 @@ function expandSearchPath(directory, rules2) {
|
|
|
5259
5278
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
5260
5279
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
5261
5280
|
continue;
|
|
5262
|
-
queue.push(
|
|
5281
|
+
queue.push(path39.join(current, entry.name));
|
|
5263
5282
|
}
|
|
5264
5283
|
}
|
|
5265
5284
|
return expanded;
|
|
@@ -5350,7 +5369,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
5350
5369
|
for (const token of tokens) {
|
|
5351
5370
|
if (token.startsWith("-")) break;
|
|
5352
5371
|
const file = resolve(token);
|
|
5353
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
5372
|
+
if (file?.endsWith(".xcassets")) catalogs.push(path39.resolve(projectDir, file));
|
|
5354
5373
|
}
|
|
5355
5374
|
}
|
|
5356
5375
|
return catalogs;
|
|
@@ -5395,8 +5414,8 @@ function shellCopies(script, settings, projectDir) {
|
|
|
5395
5414
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
5396
5415
|
return [];
|
|
5397
5416
|
copies.push({
|
|
5398
|
-
from:
|
|
5399
|
-
to:
|
|
5417
|
+
from: path39.resolve(projectDir, operands[0]),
|
|
5418
|
+
to: path39.resolve(projectDir, operands[1])
|
|
5400
5419
|
});
|
|
5401
5420
|
}
|
|
5402
5421
|
return copies;
|
|
@@ -5416,7 +5435,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
5416
5435
|
const copiedFiles = [];
|
|
5417
5436
|
let generatedInfoPlist = false;
|
|
5418
5437
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
5419
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
5438
|
+
const infoPlistOutput = declaredInfoPlist ? path39.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
5420
5439
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
5421
5440
|
for (const phaseId of list(target.buildPhases)) {
|
|
5422
5441
|
const phase = project.object(phaseId);
|
|
@@ -5431,7 +5450,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
5431
5450
|
copiedFiles.push(
|
|
5432
5451
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
5433
5452
|
);
|
|
5434
|
-
const absolute = (raw) =>
|
|
5453
|
+
const absolute = (raw) => path39.resolve(project.projectDir, expand(raw, settings));
|
|
5435
5454
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
5436
5455
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
5437
5456
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -5474,7 +5493,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
5474
5493
|
false
|
|
5475
5494
|
))
|
|
5476
5495
|
continue;
|
|
5477
|
-
const phaseDir =
|
|
5496
|
+
const phaseDir = path39.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
5478
5497
|
for (const lists of fileLists.values())
|
|
5479
5498
|
for (const { file } of lists)
|
|
5480
5499
|
if (!fs18.existsSync(file))
|
|
@@ -5496,13 +5515,13 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
5496
5515
|
const lists = fileLists.get(kind);
|
|
5497
5516
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
5498
5517
|
lists.forEach((_item, index) => {
|
|
5499
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
5518
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path39.join(
|
|
5500
5519
|
phaseDir,
|
|
5501
5520
|
`${kind}-${index}.xcfilelist`
|
|
5502
5521
|
);
|
|
5503
5522
|
});
|
|
5504
5523
|
}
|
|
5505
|
-
const signature =
|
|
5524
|
+
const signature = createHash23("sha256").update(
|
|
5506
5525
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
5507
5526
|
);
|
|
5508
5527
|
for (const file of inputFiles) {
|
|
@@ -5529,7 +5548,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
5529
5548
|
fs18.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
5530
5549
|
fs18.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
5531
5550
|
for (const output2 of allOutputs)
|
|
5532
|
-
fs18.mkdirSync(
|
|
5551
|
+
fs18.mkdirSync(path39.dirname(output2), { recursive: true });
|
|
5533
5552
|
for (const [kind, lists] of fileLists)
|
|
5534
5553
|
lists.forEach((item, index) => {
|
|
5535
5554
|
fs18.writeFileSync(
|
|
@@ -5540,7 +5559,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
5540
5559
|
});
|
|
5541
5560
|
const rawScript = str(phase.shellScript) ?? "";
|
|
5542
5561
|
if (rawScript.includes("generate-modules-provider")) {
|
|
5543
|
-
const preloadPath =
|
|
5562
|
+
const preloadPath = path39.join(phaseDir, "expo-scan-timeout.cjs");
|
|
5544
5563
|
fs18.mkdirSync(phaseDir, { recursive: true });
|
|
5545
5564
|
fs18.writeFileSync(
|
|
5546
5565
|
preloadPath,
|
|
@@ -5599,9 +5618,9 @@ ${output2}`
|
|
|
5599
5618
|
}
|
|
5600
5619
|
project.visitMembers(
|
|
5601
5620
|
targetId,
|
|
5602
|
-
xcodePathResolver(project.objects, project.projectDir,
|
|
5621
|
+
xcodePathResolver(project.objects, project.projectDir, path39.join, settings),
|
|
5603
5622
|
(file) => isDirectory(file) ? walkFiles(file) : fs18.existsSync(file) ? [file] : [],
|
|
5604
|
-
|
|
5623
|
+
path39.join,
|
|
5605
5624
|
(file, kind, bundleName) => {
|
|
5606
5625
|
if (kind === "header") {
|
|
5607
5626
|
headers.add(file);
|
|
@@ -5614,7 +5633,7 @@ ${output2}`
|
|
|
5614
5633
|
}
|
|
5615
5634
|
if (!fs18.existsSync(file)) {
|
|
5616
5635
|
if (options.requireSources === false) return;
|
|
5617
|
-
const script = scriptForOutput.get(
|
|
5636
|
+
const script = scriptForOutput.get(path39.normalize(file));
|
|
5618
5637
|
throw new Error(
|
|
5619
5638
|
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}`
|
|
5620
5639
|
);
|
|
@@ -5625,7 +5644,7 @@ ${output2}`
|
|
|
5625
5644
|
);
|
|
5626
5645
|
if (options.prepareGeneratedSources && options.requireSources !== false) {
|
|
5627
5646
|
const interfaceFiles = [...resources].filter(
|
|
5628
|
-
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(
|
|
5647
|
+
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(path39.sep).some((part) => part.endsWith(".bundle"))
|
|
5629
5648
|
);
|
|
5630
5649
|
if (process.platform !== "darwin") {
|
|
5631
5650
|
let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
|
|
@@ -5635,7 +5654,7 @@ ${output2}`
|
|
|
5635
5654
|
if (typeof declared === "string") launchName = expand(declared, settings);
|
|
5636
5655
|
}
|
|
5637
5656
|
const runtimeInterfaceFiles = interfaceFiles.filter(
|
|
5638
|
-
(file) =>
|
|
5657
|
+
(file) => path39.basename(file, path39.extname(file)) !== launchName
|
|
5639
5658
|
);
|
|
5640
5659
|
if (runtimeInterfaceFiles.length > 0)
|
|
5641
5660
|
throw new Error(
|
|
@@ -5646,13 +5665,13 @@ ${output2}`
|
|
|
5646
5665
|
}
|
|
5647
5666
|
const interfaceOutputs = /* @__PURE__ */ new Set();
|
|
5648
5667
|
for (const file of interfaceFiles) {
|
|
5649
|
-
const localization = file.split(
|
|
5668
|
+
const localization = file.split(path39.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
5650
5669
|
const extension = file.endsWith(".storyboard") ? ".storyboardc" : ".nib";
|
|
5651
|
-
const output2 =
|
|
5670
|
+
const output2 = path39.join(
|
|
5652
5671
|
settings("DERIVED_FILE_DIR"),
|
|
5653
5672
|
"InterfaceBuilder",
|
|
5654
5673
|
localization,
|
|
5655
|
-
|
|
5674
|
+
path39.basename(file, path39.extname(file)) + extension
|
|
5656
5675
|
);
|
|
5657
5676
|
if (interfaceOutputs.has(output2))
|
|
5658
5677
|
throw new Error(`${targetName}: duplicate Interface Builder output ${output2}`);
|
|
@@ -5674,12 +5693,12 @@ ${output2}`
|
|
|
5674
5693
|
const inputs = JSON.stringify({
|
|
5675
5694
|
args,
|
|
5676
5695
|
developer: settings("DEVELOPER_DIR"),
|
|
5677
|
-
source:
|
|
5696
|
+
source: createHash23("sha256").update(fs18.readFileSync(file)).digest("hex")
|
|
5678
5697
|
});
|
|
5679
5698
|
if (!fs18.existsSync(output2) || !fs18.existsSync(stamp) || fs18.readFileSync(stamp, "utf8") !== inputs) {
|
|
5680
5699
|
fs18.rmSync(output2, { recursive: true, force: true });
|
|
5681
5700
|
fs18.rmSync(stamp, { force: true });
|
|
5682
|
-
fs18.mkdirSync(
|
|
5701
|
+
fs18.mkdirSync(path39.dirname(output2), { recursive: true });
|
|
5683
5702
|
execFileSync15("xcrun", args, {
|
|
5684
5703
|
cwd: project.projectDir,
|
|
5685
5704
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -5702,10 +5721,10 @@ ${output2}`
|
|
|
5702
5721
|
for (const definition of definitions) {
|
|
5703
5722
|
const configuredLanguage = settings("INTENTS_CODEGEN_LANGUAGE");
|
|
5704
5723
|
const language = !configuredLanguage || configuredLanguage === "Automatic" ? sources.size > 0 ? "Swift" : "Objective-C" : configuredLanguage;
|
|
5705
|
-
const output2 =
|
|
5724
|
+
const output2 = path39.join(
|
|
5706
5725
|
settings("DERIVED_FILE_DIR"),
|
|
5707
5726
|
"IntentDefinitionGenerated",
|
|
5708
|
-
|
|
5727
|
+
path39.basename(definition, ".intentdefinition")
|
|
5709
5728
|
);
|
|
5710
5729
|
fs18.rmSync(output2, { recursive: true, force: true });
|
|
5711
5730
|
fs18.mkdirSync(output2, { recursive: true });
|
|
@@ -5732,12 +5751,12 @@ ${output2}`
|
|
|
5732
5751
|
stdio: ["ignore", "pipe", "pipe"],
|
|
5733
5752
|
timeout: runScriptTimeoutMs
|
|
5734
5753
|
});
|
|
5735
|
-
const compiled =
|
|
5754
|
+
const compiled = path39.join(
|
|
5736
5755
|
settings("DERIVED_FILE_DIR"),
|
|
5737
5756
|
"IntentDefinitionCompiled",
|
|
5738
|
-
definition.split(
|
|
5757
|
+
definition.split(path39.sep).findLast((part) => part.endsWith(".lproj")) ?? ""
|
|
5739
5758
|
);
|
|
5740
|
-
const compiledDefinition =
|
|
5759
|
+
const compiledDefinition = path39.join(compiled, path39.basename(definition));
|
|
5741
5760
|
fs18.rmSync(compiledDefinition, { force: true });
|
|
5742
5761
|
fs18.mkdirSync(compiled, { recursive: true });
|
|
5743
5762
|
execFileSync15(
|
|
@@ -5780,22 +5799,22 @@ ${output2}`
|
|
|
5780
5799
|
function commonAncestor(dirs) {
|
|
5781
5800
|
let common = dirs[0];
|
|
5782
5801
|
for (const dir of dirs) {
|
|
5783
|
-
while (common !==
|
|
5784
|
-
common =
|
|
5802
|
+
while (common !== path39.dirname(common) && path39.relative(common, dir).startsWith(".."))
|
|
5803
|
+
common = path39.dirname(common);
|
|
5785
5804
|
}
|
|
5786
5805
|
return common;
|
|
5787
5806
|
}
|
|
5788
|
-
var isPodsProject = (xcodeproj) =>
|
|
5807
|
+
var isPodsProject = (xcodeproj) => path39.basename(xcodeproj) === "Pods.xcodeproj" && path39.basename(path39.dirname(xcodeproj)) === "Pods";
|
|
5789
5808
|
function installedPodsSandbox(pods) {
|
|
5790
|
-
const podfileLock =
|
|
5791
|
-
const manifestLock =
|
|
5809
|
+
const podfileLock = path39.join(path39.dirname(pods), "Podfile.lock");
|
|
5810
|
+
const manifestLock = path39.join(pods, "Manifest.lock");
|
|
5792
5811
|
if (!fs18.existsSync(podfileLock))
|
|
5793
5812
|
throw new Error(
|
|
5794
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
5813
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${path39.dirname(pods)}`
|
|
5795
5814
|
);
|
|
5796
5815
|
if (!fs18.existsSync(manifestLock) || !fs18.readFileSync(manifestLock).equals(fs18.readFileSync(podfileLock)))
|
|
5797
5816
|
throw new Error(
|
|
5798
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
5817
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path39.dirname(pods)}`
|
|
5799
5818
|
);
|
|
5800
5819
|
const specChecksums = {};
|
|
5801
5820
|
const lines = fs18.readFileSync(manifestLock, "utf8").split("\n");
|
|
@@ -5805,12 +5824,12 @@ function installedPodsSandbox(pods) {
|
|
|
5805
5824
|
if (!entry) break;
|
|
5806
5825
|
specChecksums[entry[1]] = entry[2];
|
|
5807
5826
|
}
|
|
5808
|
-
const specs =
|
|
5827
|
+
const specs = path39.join(pods, "Local Podspecs");
|
|
5809
5828
|
return {
|
|
5810
5829
|
podfileLock,
|
|
5811
5830
|
manifestLock,
|
|
5812
5831
|
specChecksums,
|
|
5813
|
-
localPodspecs: isDirectory(specs) ? fs18.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) =>
|
|
5832
|
+
localPodspecs: isDirectory(specs) ? fs18.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => path39.join(specs, name)) : []
|
|
5814
5833
|
};
|
|
5815
5834
|
}
|
|
5816
5835
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -5822,14 +5841,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
5822
5841
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
5823
5842
|
if (installedPods && isPodsProject(xcodeproj))
|
|
5824
5843
|
throw new Error(
|
|
5825
|
-
`${
|
|
5844
|
+
`${path39.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path39.dirname(path39.dirname(xcodeproj))}`
|
|
5826
5845
|
);
|
|
5827
5846
|
return;
|
|
5828
5847
|
}
|
|
5829
5848
|
const key = fs18.realpathSync.native(xcodeproj);
|
|
5830
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
5849
|
+
if (projectAt.has(key) || !installedPods && key.split(path39.sep).includes("Pods"))
|
|
5831
5850
|
return;
|
|
5832
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
5851
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(path39.dirname(key));
|
|
5833
5852
|
const project = loadProject(key);
|
|
5834
5853
|
projectAt.set(key, project);
|
|
5835
5854
|
projects.push(project);
|
|
@@ -5845,12 +5864,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
5845
5864
|
for (const reference of listed)
|
|
5846
5865
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
5847
5866
|
if (projects.length === 0) {
|
|
5848
|
-
throw new Error(`${
|
|
5867
|
+
throw new Error(`${path39.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
5849
5868
|
}
|
|
5850
|
-
const podfile =
|
|
5869
|
+
const podfile = path39.join(path39.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
5851
5870
|
if (installedPods && !cocoapods && fs18.existsSync(podfile))
|
|
5852
5871
|
throw new Error(
|
|
5853
|
-
`${podfile} is not installed into ${
|
|
5872
|
+
`${podfile} is not installed into ${path39.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path39.dirname(podfile)} and open the workspace it writes`
|
|
5854
5873
|
);
|
|
5855
5874
|
return { listed, projects, projectAt, cocoapods };
|
|
5856
5875
|
}
|
|
@@ -5903,19 +5922,19 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
5903
5922
|
];
|
|
5904
5923
|
const found = containers.flatMap(
|
|
5905
5924
|
(dir) => [
|
|
5906
|
-
|
|
5907
|
-
...isDirectory(
|
|
5925
|
+
path39.join(dir, "xcshareddata"),
|
|
5926
|
+
...isDirectory(path39.join(dir, "xcuserdata")) ? fs18.readdirSync(path39.join(dir, "xcuserdata")).sort().map((user) => path39.join(dir, "xcuserdata", user)) : []
|
|
5908
5927
|
].map((data) => ({
|
|
5909
5928
|
dir,
|
|
5910
|
-
file:
|
|
5929
|
+
file: path39.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
5911
5930
|
}))
|
|
5912
5931
|
).find((candidate) => fs18.existsSync(candidate.file));
|
|
5913
5932
|
if (!found) {
|
|
5914
5933
|
const known = containers.flatMap(
|
|
5915
|
-
(dir) => fs18.existsSync(
|
|
5934
|
+
(dir) => fs18.existsSync(path39.join(dir, "xcshareddata", "xcschemes")) ? fs18.readdirSync(path39.join(dir, "xcshareddata", "xcschemes")).filter((name2) => name2.endsWith(".xcscheme")).map((name2) => name2.slice(0, -".xcscheme".length)).sort() : []
|
|
5916
5935
|
);
|
|
5917
5936
|
throw new Error(
|
|
5918
|
-
`${
|
|
5937
|
+
`${path39.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
5919
5938
|
);
|
|
5920
5939
|
}
|
|
5921
5940
|
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
@@ -5932,8 +5951,8 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
5932
5951
|
if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
|
|
5933
5952
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
5934
5953
|
}
|
|
5935
|
-
const projectPath =
|
|
5936
|
-
|
|
5954
|
+
const projectPath = path39.resolve(
|
|
5955
|
+
path39.dirname(found.dir),
|
|
5937
5956
|
referenced.slice("container:".length)
|
|
5938
5957
|
);
|
|
5939
5958
|
const project = projects.find(
|
|
@@ -5957,26 +5976,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
5957
5976
|
var NativeAppTargetSelectionError = class extends Error {
|
|
5958
5977
|
};
|
|
5959
5978
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
5960
|
-
const nested =
|
|
5979
|
+
const nested = path39.join(projectRoot, "ios");
|
|
5961
5980
|
const iosRoot = fs18.existsSync(nested) ? nested : projectRoot;
|
|
5962
5981
|
const entries = fs18.readdirSync(iosRoot, { withFileTypes: true });
|
|
5963
5982
|
const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
5964
|
-
xcodeproj:
|
|
5983
|
+
xcodeproj: path39.join(iosRoot, entry.name),
|
|
5965
5984
|
workspace: null
|
|
5966
5985
|
})) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
5967
|
-
const workspace =
|
|
5986
|
+
const workspace = path39.join(iosRoot, entry.name);
|
|
5968
5987
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
5969
5988
|
xcodeproj: xcodeproj2,
|
|
5970
5989
|
workspace
|
|
5971
5990
|
}));
|
|
5972
5991
|
}).filter(
|
|
5973
|
-
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(
|
|
5992
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path39.sep).includes("Pods") && fs18.existsSync(xcodeproj2)
|
|
5974
5993
|
).filter(
|
|
5975
5994
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
5976
5995
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
5977
5996
|
xcodeproj: xcodeproj2,
|
|
5978
5997
|
workspace,
|
|
5979
|
-
name:
|
|
5998
|
+
name: path39.basename(xcodeproj2)
|
|
5980
5999
|
}));
|
|
5981
6000
|
if (projects.length === 0) return null;
|
|
5982
6001
|
if (projects.length > 1 && !iosTarget) {
|
|
@@ -6017,11 +6036,11 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
6017
6036
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
6018
6037
|
const container = fs18.existsSync(workspace) ? workspace : xcodeproj;
|
|
6019
6038
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
6020
|
-
if (fs18.existsSync(
|
|
6039
|
+
if (fs18.existsSync(path39.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
6021
6040
|
return true;
|
|
6022
|
-
const users =
|
|
6041
|
+
const users = path39.join(dir, "xcuserdata");
|
|
6023
6042
|
return fs18.existsSync(users) && fs18.readdirSync(users).some(
|
|
6024
|
-
(user) => fs18.existsSync(
|
|
6043
|
+
(user) => fs18.existsSync(path39.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
6025
6044
|
);
|
|
6026
6045
|
});
|
|
6027
6046
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -6032,8 +6051,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
6032
6051
|
);
|
|
6033
6052
|
return { xcodeproj, target, workspace: project.workspace };
|
|
6034
6053
|
}
|
|
6035
|
-
var workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
6036
|
-
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace :
|
|
6054
|
+
var workspaceResolvedFile = (xcodeprojOrWorkspace) => path39.join(
|
|
6055
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path39.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
6037
6056
|
"xcshareddata",
|
|
6038
6057
|
"swiftpm",
|
|
6039
6058
|
"Package.resolved"
|
|
@@ -6061,7 +6080,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6061
6080
|
(ref) => options.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "") : isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
|
|
6062
6081
|
);
|
|
6063
6082
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
6064
|
-
const container =
|
|
6083
|
+
const container = path39.basename(xcodeprojOrWorkspace);
|
|
6065
6084
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
6066
6085
|
if (named.length !== 1) {
|
|
6067
6086
|
if (options.frameworkMachOType)
|
|
@@ -6086,8 +6105,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6086
6105
|
for (const ref of allTargets) {
|
|
6087
6106
|
const product = ref.project.object(str(ref.target.productReference));
|
|
6088
6107
|
const file = str(product?.path);
|
|
6089
|
-
if (file && !byProduct.has(
|
|
6090
|
-
byProduct.set(
|
|
6108
|
+
if (file && !byProduct.has(path39.basename(file)))
|
|
6109
|
+
byProduct.set(path39.basename(file), ref);
|
|
6091
6110
|
}
|
|
6092
6111
|
const proxied = (project, proxyId) => {
|
|
6093
6112
|
const proxy = project.object(proxyId);
|
|
@@ -6111,7 +6130,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6111
6130
|
const buildFile = project.object(buildFileId);
|
|
6112
6131
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
6113
6132
|
const file = project.object(str(buildFile.fileRef));
|
|
6114
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
6133
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path39.basename(str(file.path) ?? "")) : void 0;
|
|
6115
6134
|
if (resolved)
|
|
6116
6135
|
found.push({
|
|
6117
6136
|
target: resolved,
|
|
@@ -6192,7 +6211,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6192
6211
|
const otherProduct = productName(other);
|
|
6193
6212
|
for (const { file, visibility } of headerPhase(other)) {
|
|
6194
6213
|
if (visibility === "Project") continue;
|
|
6195
|
-
const key = `${otherProduct}/${
|
|
6214
|
+
const key = `${otherProduct}/${path39.basename(file)}`;
|
|
6196
6215
|
if (!headers.has(key)) headers.set(key, file);
|
|
6197
6216
|
}
|
|
6198
6217
|
}
|
|
@@ -6223,7 +6242,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6223
6242
|
ref.id,
|
|
6224
6243
|
ref.project.resolvePath,
|
|
6225
6244
|
(file) => isDirectory(file) ? walkFiles(file) : fs18.existsSync(file) ? [file] : [],
|
|
6226
|
-
|
|
6245
|
+
path39.join,
|
|
6227
6246
|
(file, kind) => {
|
|
6228
6247
|
if (kind === "header") found.push(file);
|
|
6229
6248
|
}
|
|
@@ -6239,12 +6258,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6239
6258
|
for (const ref of projectTargets(project)) {
|
|
6240
6259
|
const product = productName(ref);
|
|
6241
6260
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
6242
|
-
const name =
|
|
6261
|
+
const name = path39.basename(file);
|
|
6243
6262
|
if (!entries.has(name))
|
|
6244
6263
|
entries.set(name, visibility !== "Project" ? `${product}/${name}` : file);
|
|
6245
6264
|
}
|
|
6246
6265
|
for (const file of synchronizedHeaders(ref)) {
|
|
6247
|
-
const name =
|
|
6266
|
+
const name = path39.basename(file);
|
|
6248
6267
|
if (!entries.has(name)) entries.set(name, file);
|
|
6249
6268
|
}
|
|
6250
6269
|
}
|
|
@@ -6254,7 +6273,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6254
6273
|
if (folder === null) continue;
|
|
6255
6274
|
for (const file of walkFiles(folder)) {
|
|
6256
6275
|
if (!HEADER_FILE.test(file)) continue;
|
|
6257
|
-
const name =
|
|
6276
|
+
const name = path39.basename(file);
|
|
6258
6277
|
if (!entries.has(name)) entries.set(name, file);
|
|
6259
6278
|
}
|
|
6260
6279
|
}
|
|
@@ -6262,18 +6281,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6262
6281
|
for (const id of Object.keys(project.objects)) {
|
|
6263
6282
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
6264
6283
|
const file = project.resolvePath(id);
|
|
6265
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
6266
|
-
entries.set(
|
|
6284
|
+
if (file && HEADER_FILE.test(file) && !entries.has(path39.basename(file)))
|
|
6285
|
+
entries.set(path39.basename(file), file);
|
|
6267
6286
|
}
|
|
6268
6287
|
const map = [...entries];
|
|
6269
6288
|
projectHeaderMaps.set(project, map);
|
|
6270
6289
|
return map;
|
|
6271
6290
|
};
|
|
6272
6291
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
6273
|
-
const buildDir = (project) =>
|
|
6292
|
+
const buildDir = (project) => path39.join(project.projectDir, ".build/peach-xcode/Build");
|
|
6274
6293
|
const workspaceBuild = {
|
|
6275
|
-
SYMROOT:
|
|
6276
|
-
OBJROOT:
|
|
6294
|
+
SYMROOT: path39.join(buildDir(app.project), "Products"),
|
|
6295
|
+
OBJROOT: path39.join(buildDir(app.project), "Intermediates.noindex")
|
|
6277
6296
|
};
|
|
6278
6297
|
const moduleTarget = (ref) => {
|
|
6279
6298
|
const name = str(ref.target.name) ?? ref.id;
|
|
@@ -6288,16 +6307,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6288
6307
|
TARGET_NAME: name,
|
|
6289
6308
|
TARGETNAME: "$(TARGET_NAME)",
|
|
6290
6309
|
PROJECT: "$(PROJECT_NAME)",
|
|
6291
|
-
PROJECT_NAME:
|
|
6310
|
+
PROJECT_NAME: path39.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
6292
6311
|
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
6293
6312
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
6294
6313
|
SRCROOT: ref.project.projectDir,
|
|
6295
6314
|
SOURCE_ROOT: ref.project.projectDir,
|
|
6296
6315
|
PROJECT_DIR: ref.project.projectDir,
|
|
6297
|
-
SYMROOT:
|
|
6316
|
+
SYMROOT: path39.join(buildDir(ref.project), "Products"),
|
|
6298
6317
|
BUILD_DIR: "$(SYMROOT)",
|
|
6299
6318
|
BUILD_ROOT: "$(SYMROOT)",
|
|
6300
|
-
OBJROOT:
|
|
6319
|
+
OBJROOT: path39.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
6301
6320
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
6302
6321
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
6303
6322
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -6346,7 +6365,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6346
6365
|
xcconfigs
|
|
6347
6366
|
);
|
|
6348
6367
|
const searchRules = recursiveSearchRules(settings2);
|
|
6349
|
-
const absolute = (file) =>
|
|
6368
|
+
const absolute = (file) => path39.resolve(ref.project.projectDir, file);
|
|
6350
6369
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
6351
6370
|
const product = settings2("PRODUCT_NAME");
|
|
6352
6371
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -6377,7 +6396,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6377
6396
|
`${name}: Swift compatibility header phase has no Swift producer sources`
|
|
6378
6397
|
);
|
|
6379
6398
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
6380
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
6399
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path39.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
6381
6400
|
if (versioning) {
|
|
6382
6401
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
6383
6402
|
const custom = [
|
|
@@ -6390,7 +6409,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6390
6409
|
].filter((key) => settings2(key));
|
|
6391
6410
|
if (custom.length)
|
|
6392
6411
|
throw new Error(
|
|
6393
|
-
`${name}: Xcode generates ${
|
|
6412
|
+
`${name}: Xcode generates ${path39.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
6394
6413
|
);
|
|
6395
6414
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
6396
6415
|
const [major, minor] = version.split(".");
|
|
@@ -6404,7 +6423,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6404
6423
|
""
|
|
6405
6424
|
].join("\n");
|
|
6406
6425
|
if (!fs18.existsSync(versioning) || fs18.readFileSync(versioning, "utf8") !== unit) {
|
|
6407
|
-
fs18.mkdirSync(
|
|
6426
|
+
fs18.mkdirSync(path39.dirname(versioning), { recursive: true });
|
|
6408
6427
|
fs18.writeFileSync(versioning, unit);
|
|
6409
6428
|
}
|
|
6410
6429
|
allSources.push(versioning);
|
|
@@ -6424,7 +6443,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6424
6443
|
const headerFiles = headerPhase(ref);
|
|
6425
6444
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
6426
6445
|
for (const { file, visibility } of headerFiles) {
|
|
6427
|
-
const name2 =
|
|
6446
|
+
const name2 = path39.basename(file);
|
|
6428
6447
|
const published = visibility !== "Project";
|
|
6429
6448
|
if (!ownHeaders.has(name2))
|
|
6430
6449
|
ownHeaders.set(name2, published ? `${product}/${name2}` : file);
|
|
@@ -6432,27 +6451,27 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6432
6451
|
ownHeaders.set(`${product}/${name2}`, file);
|
|
6433
6452
|
}
|
|
6434
6453
|
for (const file of synchronizedHeaders(ref)) {
|
|
6435
|
-
const name2 =
|
|
6454
|
+
const name2 = path39.basename(file);
|
|
6436
6455
|
if (ownHeaders.has(name2)) continue;
|
|
6437
6456
|
ownHeaders.set(name2, file);
|
|
6438
6457
|
const qualified = `${product}/${name2}`;
|
|
6439
6458
|
if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file);
|
|
6440
6459
|
}
|
|
6441
6460
|
const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
|
|
6442
|
-
const wrapper =
|
|
6461
|
+
const wrapper = path39.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
6443
6462
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
6444
|
-
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ?
|
|
6463
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path39.join(path39.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
6445
6464
|
const frameworkCompatibility = frameworkUmbrella && moduleMap && fs18.existsSync(moduleMap) && fs18.existsSync(frameworkUmbrella) ? {
|
|
6446
6465
|
framework: true,
|
|
6447
6466
|
moduleMap,
|
|
6448
6467
|
umbrella: frameworkUmbrella,
|
|
6449
|
-
outputModuleMap:
|
|
6450
|
-
outputUmbrella:
|
|
6468
|
+
outputModuleMap: path39.join(wrapper, "Modules", "module.modulemap"),
|
|
6469
|
+
outputUmbrella: path39.join(
|
|
6451
6470
|
wrapper,
|
|
6452
6471
|
"Headers",
|
|
6453
|
-
|
|
6472
|
+
path39.basename(frameworkUmbrella)
|
|
6454
6473
|
),
|
|
6455
|
-
outputHeader:
|
|
6474
|
+
outputHeader: path39.join(
|
|
6456
6475
|
wrapper,
|
|
6457
6476
|
"Headers",
|
|
6458
6477
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
@@ -6466,9 +6485,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6466
6485
|
outputUmbrella: compatibility.outputUmbrella,
|
|
6467
6486
|
outputHeader: compatibility.outputHeader
|
|
6468
6487
|
} : frameworkCompatibility;
|
|
6469
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap &&
|
|
6488
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path39.relative(path39.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path39.sep)[0] !== ".." && fs18.existsSync(moduleMap) ? fs18.readdirSync(path39.dirname(moduleMap)).flatMap((entry) => {
|
|
6470
6489
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
6471
|
-
const file =
|
|
6490
|
+
const file = path39.join(path39.dirname(moduleMap), entry);
|
|
6472
6491
|
return fs18.existsSync(file) ? [file] : [];
|
|
6473
6492
|
}) : [];
|
|
6474
6493
|
const fileFlags = {};
|
|
@@ -6547,15 +6566,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6547
6566
|
// xcode searches its products' include directory before
|
|
6548
6567
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
6549
6568
|
headerSearchPaths: [
|
|
6550
|
-
|
|
6569
|
+
path39.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
6551
6570
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
6552
6571
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
6553
6572
|
),
|
|
6554
|
-
|
|
6573
|
+
path39.join(
|
|
6555
6574
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
6556
6575
|
settings2("CURRENT_ARCH")
|
|
6557
6576
|
),
|
|
6558
|
-
|
|
6577
|
+
path39.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
6559
6578
|
settings2("DERIVED_FILE_DIR")
|
|
6560
6579
|
],
|
|
6561
6580
|
userHeaderSearchPaths: settingList(
|
|
@@ -6605,10 +6624,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6605
6624
|
...headerFiles.flatMap(
|
|
6606
6625
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
6607
6626
|
[
|
|
6608
|
-
|
|
6627
|
+
path39.join(
|
|
6609
6628
|
wrapper,
|
|
6610
6629
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
6611
|
-
|
|
6630
|
+
path39.basename(file)
|
|
6612
6631
|
),
|
|
6613
6632
|
file
|
|
6614
6633
|
]
|
|
@@ -6622,7 +6641,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6622
6641
|
return [];
|
|
6623
6642
|
const destination = expand(
|
|
6624
6643
|
str(phase.dstPath) ?? "",
|
|
6625
|
-
(name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ?
|
|
6644
|
+
(name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? path39.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? path39.join(wrapper, "PrivateHeaders") : settings2(name2)
|
|
6626
6645
|
);
|
|
6627
6646
|
return list(phase.files).flatMap((id) => {
|
|
6628
6647
|
const file = ref.project.resolvePath(
|
|
@@ -6630,17 +6649,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6630
6649
|
);
|
|
6631
6650
|
return file && HEADER_FILE.test(file) ? [
|
|
6632
6651
|
[
|
|
6633
|
-
|
|
6652
|
+
path39.resolve(
|
|
6634
6653
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
6635
6654
|
destination,
|
|
6636
|
-
|
|
6655
|
+
path39.basename(file)
|
|
6637
6656
|
),
|
|
6638
6657
|
file
|
|
6639
6658
|
]
|
|
6640
6659
|
] : [];
|
|
6641
6660
|
});
|
|
6642
6661
|
}),
|
|
6643
|
-
...moduleMap ? [[
|
|
6662
|
+
...moduleMap ? [[path39.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
6644
6663
|
]) : Object.fromEntries([
|
|
6645
6664
|
...podHeaders.map((file) => [file, file]),
|
|
6646
6665
|
...moduleMap ? [[moduleMap, moduleMap]] : []
|
|
@@ -6677,7 +6696,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6677
6696
|
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module2 }) => ({ ref, framework: module2 }));
|
|
6678
6697
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
6679
6698
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
6680
|
-
({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) =>
|
|
6699
|
+
({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path39.dirname(file)).filter((dir) => fs18.existsSync(dir)) : []
|
|
6681
6700
|
);
|
|
6682
6701
|
const expandValue = (value, settings2) => {
|
|
6683
6702
|
if (typeof value === "string") return expand(value, settings2);
|
|
@@ -6698,7 +6717,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6698
6717
|
const phase = owner.ref.project.object(phaseId);
|
|
6699
6718
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
6700
6719
|
continue;
|
|
6701
|
-
const absolute = (raw) =>
|
|
6720
|
+
const absolute = (raw) => path39.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
6702
6721
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
6703
6722
|
const file = absolute(raw);
|
|
6704
6723
|
xcconfigs.add(file);
|
|
@@ -6714,7 +6733,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6714
6733
|
].filter((file) => file.endsWith(".bundle"));
|
|
6715
6734
|
if (inputs.length !== outputs.length)
|
|
6716
6735
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
6717
|
-
const destinationRoot =
|
|
6736
|
+
const destinationRoot = path39.join(
|
|
6718
6737
|
owner.settings("TARGET_BUILD_DIR"),
|
|
6719
6738
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
6720
6739
|
);
|
|
@@ -6723,24 +6742,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6723
6742
|
const file = str(
|
|
6724
6743
|
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
6725
6744
|
);
|
|
6726
|
-
return file &&
|
|
6745
|
+
return file && path39.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
6727
6746
|
});
|
|
6728
6747
|
if (!product && !isDirectory(input2))
|
|
6729
6748
|
throw new Error(
|
|
6730
6749
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
6731
6750
|
);
|
|
6732
|
-
const destination =
|
|
6733
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
6751
|
+
const destination = path39.relative(destinationRoot, outputs[index]);
|
|
6752
|
+
if (destination === ".." || destination.startsWith(`..${path39.sep}`) || path39.isAbsolute(destination) || path39.basename(input2) !== path39.basename(destination))
|
|
6734
6753
|
throw new Error(
|
|
6735
6754
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
6736
6755
|
);
|
|
6737
|
-
const infoFile = product ?
|
|
6756
|
+
const infoFile = product ? path39.resolve(
|
|
6738
6757
|
product.ref.project.projectDir,
|
|
6739
6758
|
product.settings("INFOPLIST_FILE")
|
|
6740
6759
|
) : null;
|
|
6741
6760
|
if (infoFile) xcconfigs.add(infoFile);
|
|
6742
6761
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
6743
|
-
const bundlePath = prefix + destination.split(
|
|
6762
|
+
const bundlePath = prefix + destination.split(path39.sep).join("/");
|
|
6744
6763
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
6745
6764
|
throw new Error(
|
|
6746
6765
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -6756,15 +6775,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6756
6775
|
)
|
|
6757
6776
|
)
|
|
6758
6777
|
} : {
|
|
6759
|
-
resources: fs18.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) =>
|
|
6778
|
+
resources: fs18.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path39.join(entry.parentPath, entry.name)).sort(),
|
|
6760
6779
|
sourceRoot: input2
|
|
6761
6780
|
}
|
|
6762
6781
|
});
|
|
6763
6782
|
}
|
|
6764
6783
|
}
|
|
6765
6784
|
}
|
|
6766
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
6767
|
-
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ?
|
|
6785
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? path39.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
6786
|
+
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? path39.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
|
|
6768
6787
|
const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
6769
6788
|
const sourceInfo = infoPlistFile && !infoPlistPending ? plist3.parse(fs18.readFileSync(infoPlistFile, "utf8")) : {};
|
|
6770
6789
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
@@ -6829,7 +6848,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6829
6848
|
};
|
|
6830
6849
|
}
|
|
6831
6850
|
const localPackageDirs = [
|
|
6832
|
-
...listed.filter((reference) => fs18.existsSync(
|
|
6851
|
+
...listed.filter((reference) => fs18.existsSync(path39.join(reference, "Package.swift"))),
|
|
6833
6852
|
...projects.flatMap(
|
|
6834
6853
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
6835
6854
|
if (!isDict(entry)) return [];
|
|
@@ -6839,19 +6858,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6839
6858
|
const packages = [];
|
|
6840
6859
|
while (pending.length > 0) {
|
|
6841
6860
|
const dir = pending.pop();
|
|
6842
|
-
if (fs18.existsSync(
|
|
6861
|
+
if (fs18.existsSync(path39.join(dir, "Package.swift"))) {
|
|
6843
6862
|
packages.push(dir);
|
|
6844
6863
|
continue;
|
|
6845
6864
|
}
|
|
6846
6865
|
if (!isDirectory(dir)) continue;
|
|
6847
6866
|
for (const child of fs18.readdirSync(dir, { withFileTypes: true }))
|
|
6848
6867
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
6849
|
-
pending.push(
|
|
6868
|
+
pending.push(path39.join(dir, child.name));
|
|
6850
6869
|
}
|
|
6851
6870
|
return packages;
|
|
6852
6871
|
}
|
|
6853
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
6854
|
-
return candidate && fs18.existsSync(
|
|
6872
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path39.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
6873
|
+
return candidate && fs18.existsSync(path39.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
6855
6874
|
})
|
|
6856
6875
|
)
|
|
6857
6876
|
];
|
|
@@ -6881,7 +6900,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6881
6900
|
if ((flag === "-framework" || flag === "-weak_framework") && name)
|
|
6882
6901
|
sdkFrameworks.add(name);
|
|
6883
6902
|
});
|
|
6884
|
-
const absolute = (raw) =>
|
|
6903
|
+
const absolute = (raw) => path39.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
6885
6904
|
const requested = options.nativeModules;
|
|
6886
6905
|
const includeBinary = (name, dir) => {
|
|
6887
6906
|
if (!requested || nativeTargets.has(ref) || requested.includes(name) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module2) => requested.includes(module2)))
|
|
@@ -6899,7 +6918,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6899
6918
|
const name = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
6900
6919
|
if (!name || byProduct.has(entry.name) || searchedFrameworks.has(name))
|
|
6901
6920
|
continue;
|
|
6902
|
-
const file =
|
|
6921
|
+
const file = path39.join(directory, entry.name);
|
|
6903
6922
|
if (fs18.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
6904
6923
|
searchedFrameworks.set(name, file);
|
|
6905
6924
|
}
|
|
@@ -6908,7 +6927,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6908
6927
|
}
|
|
6909
6928
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
6910
6929
|
const dir = absolute(raw);
|
|
6911
|
-
const modulemap =
|
|
6930
|
+
const modulemap = path39.join(dir, "module.modulemap");
|
|
6912
6931
|
if (!fs18.existsSync(modulemap)) continue;
|
|
6913
6932
|
const name = moduleMapName(fs18.readFileSync(modulemap, "utf8"));
|
|
6914
6933
|
if (name && !binaryFrameworks.has(name)) includeBinary(name, dir);
|
|
@@ -6984,7 +7003,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
6984
7003
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
6985
7004
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
6986
7005
|
kind: "local",
|
|
6987
|
-
dir:
|
|
7006
|
+
dir: path39.resolve(
|
|
6988
7007
|
project.projectDir,
|
|
6989
7008
|
str(reference.relativePath) ?? ""
|
|
6990
7009
|
)
|
|
@@ -7018,7 +7037,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
7018
7037
|
continue;
|
|
7019
7038
|
}
|
|
7020
7039
|
if (tree === "BUILT_PRODUCTS_DIR" || tree === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
7021
|
-
byProduct.has(
|
|
7040
|
+
byProduct.has(path39.basename(rawPath)))
|
|
7022
7041
|
continue;
|
|
7023
7042
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
7024
7043
|
if (fileId && resolved !== null && !fs18.existsSync(resolved)) {
|
|
@@ -7048,7 +7067,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
7048
7067
|
({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
|
|
7049
7068
|
);
|
|
7050
7069
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
7051
|
-
let packageResolved = fs18.existsSync(resolvedFile) ? [fs18.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) =>
|
|
7070
|
+
let packageResolved = fs18.existsSync(resolvedFile) ? [fs18.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path39.join(dir, "Package.resolved")))].filter((file) => fs18.existsSync(file)).map((file) => fs18.realpathSync.native(file)).sort();
|
|
7052
7071
|
if (packageResolved.length === 0) {
|
|
7053
7072
|
const requirements = remotePackageRequirements(projects);
|
|
7054
7073
|
if (requirements.length > 0) {
|
|
@@ -7099,7 +7118,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
7099
7118
|
} : {},
|
|
7100
7119
|
rootDir: commonAncestor(
|
|
7101
7120
|
[
|
|
7102
|
-
workspace ?
|
|
7121
|
+
workspace ? path39.dirname(workspace) : app.project.projectDir,
|
|
7103
7122
|
...used.map((project) => project.projectDir),
|
|
7104
7123
|
...localPackageDirs,
|
|
7105
7124
|
...linkedProducts.flatMap(
|
|
@@ -7109,7 +7128,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
7109
7128
|
// a target's own files may sit beside the project, such as an asset
|
|
7110
7129
|
// catalog one folder up, and xcode builds them from there
|
|
7111
7130
|
...new Set(
|
|
7112
|
-
[...module.allSources, ...module.resources].filter((file) => fs18.existsSync(file)).map((file) =>
|
|
7131
|
+
[...module.allSources, ...module.resources].filter((file) => fs18.existsSync(file)).map((file) => path39.dirname(file))
|
|
7113
7132
|
)
|
|
7114
7133
|
].map((dir) => fs18.realpathSync.native(dir))
|
|
7115
7134
|
),
|
|
@@ -7272,7 +7291,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
7272
7291
|
app.resources,
|
|
7273
7292
|
(file) => fs19.readFileSync(file, "utf8"),
|
|
7274
7293
|
(file) => {
|
|
7275
|
-
const extension =
|
|
7294
|
+
const extension = path40.extname(file).toLowerCase();
|
|
7276
7295
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
7277
7296
|
return `data:${contentType};base64,${fs19.readFileSync(file).toString("base64")}`;
|
|
7278
7297
|
},
|
|
@@ -7311,7 +7330,7 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
7311
7330
|
const read = selectNativeAppIdentityReader(platform, {
|
|
7312
7331
|
android: () => null,
|
|
7313
7332
|
ios: () => {
|
|
7314
|
-
const nested =
|
|
7333
|
+
const nested = path40.join(projectRoot, "ios");
|
|
7315
7334
|
const iosRoot = fs19.existsSync(nested) ? nested : projectRoot;
|
|
7316
7335
|
const prefix = iosRoot === nested ? "ios/" : "";
|
|
7317
7336
|
const files = {};
|
|
@@ -7323,16 +7342,16 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
7323
7342
|
"AppDelegate.swift",
|
|
7324
7343
|
"AppDelegate.mm",
|
|
7325
7344
|
"AppDelegate.m",
|
|
7326
|
-
...fs19.readdirSync(
|
|
7345
|
+
...fs19.readdirSync(path40.join(iosRoot, entry.name)).filter((name) => name.endsWith(".entitlements"))
|
|
7327
7346
|
];
|
|
7328
7347
|
for (const name of names) {
|
|
7329
7348
|
const relative2 = `${prefix}${entry.name}/${name}`;
|
|
7330
|
-
const file =
|
|
7349
|
+
const file = path40.join(projectRoot, relative2);
|
|
7331
7350
|
if (fs19.existsSync(file)) files[relative2] = fs19.readFileSync(file, "utf8");
|
|
7332
7351
|
}
|
|
7333
7352
|
} else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
|
|
7334
7353
|
const relative2 = `${prefix}${entry.name}`;
|
|
7335
|
-
const file =
|
|
7354
|
+
const file = path40.join(projectRoot, relative2);
|
|
7336
7355
|
if (fs19.existsSync(file)) files[relative2] = fs19.readFileSync(file, "utf8");
|
|
7337
7356
|
}
|
|
7338
7357
|
}
|
|
@@ -7350,23 +7369,23 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
7350
7369
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
7351
7370
|
const files = {};
|
|
7352
7371
|
if (androidMergedManifest) {
|
|
7353
|
-
const file =
|
|
7372
|
+
const file = path40.resolve(projectRoot, androidMergedManifest);
|
|
7354
7373
|
if (!fs19.existsSync(file)) return null;
|
|
7355
7374
|
files[androidMergedManifest] = fs19.readFileSync(file, "utf8");
|
|
7356
7375
|
} else {
|
|
7357
|
-
const androidRoot =
|
|
7376
|
+
const androidRoot = path40.join(projectRoot, "android");
|
|
7358
7377
|
if (!fs19.existsSync(androidRoot)) return null;
|
|
7359
7378
|
const collect = (directory) => {
|
|
7360
7379
|
for (const entry of fs19.readdirSync(directory, { withFileTypes: true })) {
|
|
7361
|
-
const file =
|
|
7380
|
+
const file = path40.join(directory, entry.name);
|
|
7362
7381
|
if (entry.isDirectory()) collect(file);
|
|
7363
7382
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
7364
|
-
files[
|
|
7383
|
+
files[path40.relative(projectRoot, file).split(path40.sep).join("/")] = fs19.readFileSync(file, "utf8");
|
|
7365
7384
|
}
|
|
7366
7385
|
};
|
|
7367
7386
|
for (const module of fs19.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
7368
7387
|
if (!module.isDirectory()) continue;
|
|
7369
|
-
const outputs =
|
|
7388
|
+
const outputs = path40.join(
|
|
7370
7389
|
androidRoot,
|
|
7371
7390
|
module.name,
|
|
7372
7391
|
"build/intermediates/merged_manifests"
|
|
@@ -7377,14 +7396,14 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
|
7377
7396
|
for (const manifest of Object.keys(files)) {
|
|
7378
7397
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
7379
7398
|
if (!resourceDirectory) continue;
|
|
7380
|
-
const absolute =
|
|
7399
|
+
const absolute = path40.resolve(projectRoot, resourceDirectory);
|
|
7381
7400
|
if (!fs19.existsSync(absolute)) continue;
|
|
7382
7401
|
for (const entry of fs19.readdirSync(absolute, { withFileTypes: true })) {
|
|
7383
7402
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
7384
|
-
for (const resource of fs19.readdirSync(
|
|
7403
|
+
for (const resource of fs19.readdirSync(path40.join(absolute, entry.name))) {
|
|
7385
7404
|
if (!resource.endsWith(".xml")) continue;
|
|
7386
7405
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
7387
|
-
files[file] = fs19.readFileSync(
|
|
7406
|
+
files[file] = fs19.readFileSync(path40.resolve(projectRoot, file), "utf8");
|
|
7388
7407
|
}
|
|
7389
7408
|
}
|
|
7390
7409
|
}
|
|
@@ -7405,7 +7424,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
7405
7424
|
parseInfoPlist,
|
|
7406
7425
|
buildSdkVersion
|
|
7407
7426
|
);
|
|
7408
|
-
const projectManifestPath =
|
|
7427
|
+
const projectManifestPath = path40.join(projectRoot, "package.json");
|
|
7409
7428
|
const projectRequire = createRequire(projectManifestPath);
|
|
7410
7429
|
let reanimatedManifestPath;
|
|
7411
7430
|
try {
|
|
@@ -7426,8 +7445,8 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
7426
7445
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
7427
7446
|
const defaults = JSON.parse(
|
|
7428
7447
|
fs19.readFileSync(
|
|
7429
|
-
|
|
7430
|
-
|
|
7448
|
+
path40.join(
|
|
7449
|
+
path40.dirname(reanimatedManifestPath),
|
|
7431
7450
|
"src/featureFlags/staticFlags.json"
|
|
7432
7451
|
),
|
|
7433
7452
|
"utf8"
|