peachsim 0.1.2409 → 0.1.2411
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/README.md +2 -5
- package/cli/internal-child-contract.ts +0 -1
- package/cli/internal-child.ts +0 -6
- package/cli/outbound-endpoints.ts +0 -23
- 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 +10313 -4172
- 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 +11579 -5438
- 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 +12830 -6689
- package/dist-lib/host/fetch-proxy-handler.cjs +925 -151
- 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 +1045 -246
- 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 +961 -162
- package/dist-lib/native-app-identity-project.cjs +36 -11
- package/dist-lib/native-app-identity-project.mjs +36 -11
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +124 -104
- 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 +13937 -7796
- package/dist-lib/swift-compile.cjs +62 -14
- package/dist-lib/swift-compile.mjs +62 -13
- 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 +110 -28
- package/dist-lib/vite.cjs +3101 -2327
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +3 -3
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResource.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChange.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchOptions.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchResult.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h +2 -2
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPhotoLibrary.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVibrancyEffect.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVisualEffectView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKitActivity.framework/Headers/UIKitActivity.h +1 -1
- package/src/nitro-adapter.lock.json +262 -262
- package/src/nitro-superset.lock.json +4 -4
- package/src/podspec-cocoapods.ts +934 -0
- package/src/podspec-prism.ts +66 -0
- package/src/podspec-ruby-stdlib.ts +1121 -0
- package/src/podspec-ruby.ts +5175 -0
- package/src/podspec-sources.ts +25 -112
- package/src/swift-compile.ts +70 -12
- package/src/swift-distribution.lock.json +9 -8
- package/src/swift-host.ts +14 -4
- package/src/turbo-runtime.lock.json +19 -19
- package/src/xcode-project.ts +37 -11
- package/cli/drivers/linux-cocoapods.lock.json +0 -303
- package/cli/drivers/linux-cocoapods.ts +0 -99
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2411 | (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;
|
|
@@ -3725,8 +3725,8 @@ function indentComment(comment, indent) {
|
|
|
3725
3725
|
var stringifyComment, lineComment;
|
|
3726
3726
|
var init_stringifyComment = __esm({
|
|
3727
3727
|
"../../node_modules/yaml/browser/dist/stringify/stringifyComment.js"() {
|
|
3728
|
-
stringifyComment = (
|
|
3729
|
-
lineComment = (
|
|
3728
|
+
stringifyComment = (str3) => str3.replace(/^(?!$)(?: $)?/gm, "#");
|
|
3729
|
+
lineComment = (str3, indent, comment) => str3.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str3.endsWith(" ") ? "" : " ") + comment;
|
|
3730
3730
|
}
|
|
3731
3731
|
});
|
|
3732
3732
|
|
|
@@ -3863,15 +3863,15 @@ var init_foldFlowLines = __esm({
|
|
|
3863
3863
|
});
|
|
3864
3864
|
|
|
3865
3865
|
// ../../node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
3866
|
-
function lineLengthOverLimit(
|
|
3866
|
+
function lineLengthOverLimit(str3, lineWidth, indentLength) {
|
|
3867
3867
|
if (!lineWidth || lineWidth < 0)
|
|
3868
3868
|
return false;
|
|
3869
3869
|
const limit = lineWidth - indentLength;
|
|
3870
|
-
const strLen =
|
|
3870
|
+
const strLen = str3.length;
|
|
3871
3871
|
if (strLen <= limit)
|
|
3872
3872
|
return false;
|
|
3873
3873
|
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
3874
|
-
if (
|
|
3874
|
+
if (str3[i] === "\n") {
|
|
3875
3875
|
if (i - start > limit)
|
|
3876
3876
|
return true;
|
|
3877
3877
|
start = i + 1;
|
|
@@ -3888,11 +3888,11 @@ function doubleQuotedString(value, ctx) {
|
|
|
3888
3888
|
const { implicitKey } = ctx;
|
|
3889
3889
|
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
3890
3890
|
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
3891
|
-
let
|
|
3891
|
+
let str3 = "";
|
|
3892
3892
|
let start = 0;
|
|
3893
3893
|
for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
|
|
3894
3894
|
if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
|
|
3895
|
-
|
|
3895
|
+
str3 += json.slice(start, i) + "\\ ";
|
|
3896
3896
|
i += 1;
|
|
3897
3897
|
start = i;
|
|
3898
3898
|
ch = "\\";
|
|
@@ -3901,38 +3901,38 @@ function doubleQuotedString(value, ctx) {
|
|
|
3901
3901
|
switch (json[i + 1]) {
|
|
3902
3902
|
case "u":
|
|
3903
3903
|
{
|
|
3904
|
-
|
|
3904
|
+
str3 += json.slice(start, i);
|
|
3905
3905
|
const code = json.substr(i + 2, 4);
|
|
3906
3906
|
switch (code) {
|
|
3907
3907
|
case "0000":
|
|
3908
|
-
|
|
3908
|
+
str3 += "\\0";
|
|
3909
3909
|
break;
|
|
3910
3910
|
case "0007":
|
|
3911
|
-
|
|
3911
|
+
str3 += "\\a";
|
|
3912
3912
|
break;
|
|
3913
3913
|
case "000b":
|
|
3914
|
-
|
|
3914
|
+
str3 += "\\v";
|
|
3915
3915
|
break;
|
|
3916
3916
|
case "001b":
|
|
3917
|
-
|
|
3917
|
+
str3 += "\\e";
|
|
3918
3918
|
break;
|
|
3919
3919
|
case "0085":
|
|
3920
|
-
|
|
3920
|
+
str3 += "\\N";
|
|
3921
3921
|
break;
|
|
3922
3922
|
case "00a0":
|
|
3923
|
-
|
|
3923
|
+
str3 += "\\_";
|
|
3924
3924
|
break;
|
|
3925
3925
|
case "2028":
|
|
3926
|
-
|
|
3926
|
+
str3 += "\\L";
|
|
3927
3927
|
break;
|
|
3928
3928
|
case "2029":
|
|
3929
|
-
|
|
3929
|
+
str3 += "\\P";
|
|
3930
3930
|
break;
|
|
3931
3931
|
default:
|
|
3932
3932
|
if (code.substr(0, 2) === "00")
|
|
3933
|
-
|
|
3933
|
+
str3 += "\\x" + code.substr(2);
|
|
3934
3934
|
else
|
|
3935
|
-
|
|
3935
|
+
str3 += json.substr(i, 6);
|
|
3936
3936
|
}
|
|
3937
3937
|
i += 5;
|
|
3938
3938
|
start = i + 1;
|
|
@@ -3942,14 +3942,14 @@ function doubleQuotedString(value, ctx) {
|
|
|
3942
3942
|
if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
|
|
3943
3943
|
i += 1;
|
|
3944
3944
|
} else {
|
|
3945
|
-
|
|
3945
|
+
str3 += json.slice(start, i) + "\n\n";
|
|
3946
3946
|
while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
|
|
3947
|
-
|
|
3947
|
+
str3 += "\n";
|
|
3948
3948
|
i += 2;
|
|
3949
3949
|
}
|
|
3950
|
-
|
|
3950
|
+
str3 += indent;
|
|
3951
3951
|
if (json[i + 2] === " ")
|
|
3952
|
-
|
|
3952
|
+
str3 += "\\";
|
|
3953
3953
|
i += 1;
|
|
3954
3954
|
start = i + 1;
|
|
3955
3955
|
}
|
|
@@ -3958,8 +3958,8 @@ function doubleQuotedString(value, ctx) {
|
|
|
3958
3958
|
i += 1;
|
|
3959
3959
|
}
|
|
3960
3960
|
}
|
|
3961
|
-
|
|
3962
|
-
return implicitKey ?
|
|
3961
|
+
str3 = start ? str3 + json.slice(start) : json;
|
|
3962
|
+
return implicitKey ? str3 : foldFlowLines(str3, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
3963
3963
|
}
|
|
3964
3964
|
function singleQuotedString(value, ctx) {
|
|
3965
3965
|
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
@@ -4081,15 +4081,15 @@ function plainString(item, ctx, onComment, onChompKeep) {
|
|
|
4081
4081
|
return quotedString(value, ctx);
|
|
4082
4082
|
}
|
|
4083
4083
|
}
|
|
4084
|
-
const
|
|
4084
|
+
const str3 = value.replace(/\n+/g, `$&
|
|
4085
4085
|
${indent}`);
|
|
4086
4086
|
if (actualString) {
|
|
4087
|
-
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(
|
|
4087
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str3);
|
|
4088
4088
|
const { compat, tags } = ctx.doc.schema;
|
|
4089
4089
|
if (tags.some(test) || compat?.some(test))
|
|
4090
4090
|
return quotedString(value, ctx);
|
|
4091
4091
|
}
|
|
4092
|
-
return implicitKey ?
|
|
4092
|
+
return implicitKey ? str3 : foldFlowLines(str3, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
4093
4093
|
}
|
|
4094
4094
|
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
4095
4095
|
const { implicitKey, inFlow } = ctx;
|
|
@@ -4134,7 +4134,7 @@ var init_stringifyString = __esm({
|
|
|
4134
4134
|
lineWidth: ctx.options.lineWidth,
|
|
4135
4135
|
minContentWidth: ctx.options.minContentWidth
|
|
4136
4136
|
});
|
|
4137
|
-
containsDocumentMarker = (
|
|
4137
|
+
containsDocumentMarker = (str3) => /^(%|---|\.\.\.)/m.test(str3);
|
|
4138
4138
|
try {
|
|
4139
4139
|
blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
|
|
4140
4140
|
} catch {
|
|
@@ -4249,11 +4249,11 @@ function stringify(item, ctx, onComment, onChompKeep) {
|
|
|
4249
4249
|
const props = stringifyProps(node, tagObj, ctx);
|
|
4250
4250
|
if (props.length > 0)
|
|
4251
4251
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
4252
|
-
const
|
|
4252
|
+
const str3 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
|
|
4253
4253
|
if (!props)
|
|
4254
|
-
return
|
|
4255
|
-
return isScalar(node) ||
|
|
4256
|
-
${ctx.indent}${
|
|
4254
|
+
return str3;
|
|
4255
|
+
return isScalar(node) || str3[0] === "{" || str3[0] === "[" ? `${props} ${str3}` : `${props}
|
|
4256
|
+
${ctx.indent}${str3}`;
|
|
4257
4257
|
}
|
|
4258
4258
|
var init_stringify = __esm({
|
|
4259
4259
|
"../../node_modules/yaml/browser/dist/stringify/stringify.js"() {
|
|
@@ -4285,8 +4285,8 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
|
4285
4285
|
});
|
|
4286
4286
|
let keyCommentDone = false;
|
|
4287
4287
|
let chompKeep = false;
|
|
4288
|
-
let
|
|
4289
|
-
if (!explicitKey && !ctx.inFlow &&
|
|
4288
|
+
let str3 = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
4289
|
+
if (!explicitKey && !ctx.inFlow && str3.length > 1024) {
|
|
4290
4290
|
if (simpleKeys)
|
|
4291
4291
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
4292
4292
|
explicitKey = true;
|
|
@@ -4295,27 +4295,27 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
|
4295
4295
|
if (allNullValues || value == null) {
|
|
4296
4296
|
if (keyCommentDone && onComment)
|
|
4297
4297
|
onComment();
|
|
4298
|
-
return
|
|
4298
|
+
return str3 === "" ? "?" : explicitKey ? `? ${str3}` : str3;
|
|
4299
4299
|
}
|
|
4300
4300
|
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
4301
|
-
|
|
4301
|
+
str3 = `? ${str3}`;
|
|
4302
4302
|
if (keyComment && !keyCommentDone) {
|
|
4303
|
-
|
|
4303
|
+
str3 += lineComment(str3, ctx.indent, commentString(keyComment));
|
|
4304
4304
|
} else if (chompKeep && onChompKeep)
|
|
4305
4305
|
onChompKeep();
|
|
4306
|
-
return
|
|
4306
|
+
return str3;
|
|
4307
4307
|
}
|
|
4308
4308
|
if (keyCommentDone)
|
|
4309
4309
|
keyComment = null;
|
|
4310
4310
|
if (explicitKey) {
|
|
4311
4311
|
if (keyComment)
|
|
4312
|
-
|
|
4313
|
-
|
|
4312
|
+
str3 += lineComment(str3, ctx.indent, commentString(keyComment));
|
|
4313
|
+
str3 = `? ${str3}
|
|
4314
4314
|
${indent}:`;
|
|
4315
4315
|
} else {
|
|
4316
|
-
|
|
4316
|
+
str3 = `${str3}:`;
|
|
4317
4317
|
if (keyComment)
|
|
4318
|
-
|
|
4318
|
+
str3 += lineComment(str3, ctx.indent, commentString(keyComment));
|
|
4319
4319
|
}
|
|
4320
4320
|
let vsb, vcb, valueComment;
|
|
4321
4321
|
if (isNode(value)) {
|
|
@@ -4331,7 +4331,7 @@ ${indent}:`;
|
|
|
4331
4331
|
}
|
|
4332
4332
|
ctx.implicitKey = false;
|
|
4333
4333
|
if (!explicitKey && !keyComment && isScalar(value))
|
|
4334
|
-
ctx.indentAtStart =
|
|
4334
|
+
ctx.indentAtStart = str3.length + 1;
|
|
4335
4335
|
chompKeep = false;
|
|
4336
4336
|
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
4337
4337
|
ctx.indent = ctx.indent.substring(2);
|
|
@@ -4375,16 +4375,16 @@ ${ctx.indent}`;
|
|
|
4375
4375
|
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
4376
4376
|
ws = "";
|
|
4377
4377
|
}
|
|
4378
|
-
|
|
4378
|
+
str3 += ws + valueStr;
|
|
4379
4379
|
if (ctx.inFlow) {
|
|
4380
4380
|
if (valueCommentDone && onComment)
|
|
4381
4381
|
onComment();
|
|
4382
4382
|
} else if (valueComment && !valueCommentDone) {
|
|
4383
|
-
|
|
4383
|
+
str3 += lineComment(str3, ctx.indent, commentString(valueComment));
|
|
4384
4384
|
} else if (chompKeep && onChompKeep) {
|
|
4385
4385
|
onChompKeep();
|
|
4386
4386
|
}
|
|
4387
|
-
return
|
|
4387
|
+
return str3;
|
|
4388
4388
|
}
|
|
4389
4389
|
var init_stringifyPair = __esm({
|
|
4390
4390
|
"../../node_modules/yaml/browser/dist/stringify/stringifyPair.js"() {
|
|
@@ -4592,31 +4592,31 @@ function stringifyBlockCollection({ comment, items: items2 }, ctx, { blockItemPr
|
|
|
4592
4592
|
}
|
|
4593
4593
|
}
|
|
4594
4594
|
chompKeep = false;
|
|
4595
|
-
let
|
|
4595
|
+
let str4 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
4596
4596
|
if (comment2)
|
|
4597
|
-
|
|
4597
|
+
str4 += lineComment(str4, itemIndent, commentString(comment2));
|
|
4598
4598
|
if (chompKeep && comment2)
|
|
4599
4599
|
chompKeep = false;
|
|
4600
|
-
lines.push(blockItemPrefix +
|
|
4600
|
+
lines.push(blockItemPrefix + str4);
|
|
4601
4601
|
}
|
|
4602
|
-
let
|
|
4602
|
+
let str3;
|
|
4603
4603
|
if (lines.length === 0) {
|
|
4604
|
-
|
|
4604
|
+
str3 = flowChars.start + flowChars.end;
|
|
4605
4605
|
} else {
|
|
4606
|
-
|
|
4606
|
+
str3 = lines[0];
|
|
4607
4607
|
for (let i = 1; i < lines.length; ++i) {
|
|
4608
4608
|
const line = lines[i];
|
|
4609
|
-
|
|
4609
|
+
str3 += line ? `
|
|
4610
4610
|
${indent}${line}` : "\n";
|
|
4611
4611
|
}
|
|
4612
4612
|
}
|
|
4613
4613
|
if (comment) {
|
|
4614
|
-
|
|
4614
|
+
str3 += "\n" + indentComment(commentString(comment), indent);
|
|
4615
4615
|
if (onComment)
|
|
4616
4616
|
onComment();
|
|
4617
4617
|
} else if (chompKeep && onChompKeep)
|
|
4618
4618
|
onChompKeep();
|
|
4619
|
-
return
|
|
4619
|
+
return str3;
|
|
4620
4620
|
}
|
|
4621
4621
|
function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent }) {
|
|
4622
4622
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
@@ -4659,21 +4659,21 @@ function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent
|
|
|
4659
4659
|
}
|
|
4660
4660
|
if (comment)
|
|
4661
4661
|
reqNewline = true;
|
|
4662
|
-
let
|
|
4663
|
-
reqNewline || (reqNewline = lines.length > linesAtValue ||
|
|
4662
|
+
let str3 = stringify(item, itemCtx, () => comment = null);
|
|
4663
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str3.includes("\n"));
|
|
4664
4664
|
if (i < items2.length - 1) {
|
|
4665
|
-
|
|
4665
|
+
str3 += ",";
|
|
4666
4666
|
} else if (ctx.options.trailingComma) {
|
|
4667
4667
|
if (ctx.options.lineWidth > 0) {
|
|
4668
|
-
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (
|
|
4668
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str3.length + 2) > ctx.options.lineWidth);
|
|
4669
4669
|
}
|
|
4670
4670
|
if (reqNewline) {
|
|
4671
|
-
|
|
4671
|
+
str3 += ",";
|
|
4672
4672
|
}
|
|
4673
4673
|
}
|
|
4674
4674
|
if (comment)
|
|
4675
|
-
|
|
4676
|
-
lines.push(
|
|
4675
|
+
str3 += lineComment(str3, itemIndent, commentString(comment));
|
|
4676
|
+
lines.push(str3);
|
|
4677
4677
|
linesAtValue = lines.length;
|
|
4678
4678
|
}
|
|
4679
4679
|
const { start, end } = flowChars;
|
|
@@ -4685,11 +4685,11 @@ function stringifyFlowCollection({ items: items2 }, ctx, { flowChars, itemIndent
|
|
|
4685
4685
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
4686
4686
|
}
|
|
4687
4687
|
if (reqNewline) {
|
|
4688
|
-
let
|
|
4688
|
+
let str3 = start;
|
|
4689
4689
|
for (const line of lines)
|
|
4690
|
-
|
|
4690
|
+
str3 += line ? `
|
|
4691
4691
|
${indentStep}${indent}${line}` : "\n";
|
|
4692
|
-
return `${
|
|
4692
|
+
return `${str3}
|
|
4693
4693
|
${indent}${end}`;
|
|
4694
4694
|
} else {
|
|
4695
4695
|
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
@@ -5082,7 +5082,7 @@ var init_schema2 = __esm({
|
|
|
5082
5082
|
identify: (value) => typeof value === "string",
|
|
5083
5083
|
default: true,
|
|
5084
5084
|
tag: "tag:yaml.org,2002:str",
|
|
5085
|
-
resolve: (
|
|
5085
|
+
resolve: (str3) => str3,
|
|
5086
5086
|
stringify: stringifyJSON
|
|
5087
5087
|
},
|
|
5088
5088
|
{
|
|
@@ -5099,7 +5099,7 @@ var init_schema2 = __esm({
|
|
|
5099
5099
|
default: true,
|
|
5100
5100
|
tag: "tag:yaml.org,2002:bool",
|
|
5101
5101
|
test: /^true$|^false$/,
|
|
5102
|
-
resolve: (
|
|
5102
|
+
resolve: (str3) => str3 === "true",
|
|
5103
5103
|
stringify: stringifyJSON
|
|
5104
5104
|
},
|
|
5105
5105
|
{
|
|
@@ -5107,7 +5107,7 @@ var init_schema2 = __esm({
|
|
|
5107
5107
|
default: true,
|
|
5108
5108
|
tag: "tag:yaml.org,2002:int",
|
|
5109
5109
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
5110
|
-
resolve: (
|
|
5110
|
+
resolve: (str3, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str3) : parseInt(str3, 10),
|
|
5111
5111
|
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
5112
5112
|
},
|
|
5113
5113
|
{
|
|
@@ -5115,7 +5115,7 @@ var init_schema2 = __esm({
|
|
|
5115
5115
|
default: true,
|
|
5116
5116
|
tag: "tag:yaml.org,2002:float",
|
|
5117
5117
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
5118
|
-
resolve: (
|
|
5118
|
+
resolve: (str3) => parseFloat(str3),
|
|
5119
5119
|
stringify: stringifyJSON
|
|
5120
5120
|
}
|
|
5121
5121
|
];
|
|
@@ -5123,9 +5123,9 @@ var init_schema2 = __esm({
|
|
|
5123
5123
|
default: true,
|
|
5124
5124
|
tag: "",
|
|
5125
5125
|
test: /^/,
|
|
5126
|
-
resolve(
|
|
5127
|
-
onError(`Unresolved plain scalar ${JSON.stringify(
|
|
5128
|
-
return
|
|
5126
|
+
resolve(str3, onError) {
|
|
5127
|
+
onError(`Unresolved plain scalar ${JSON.stringify(str3)}`);
|
|
5128
|
+
return str3;
|
|
5129
5129
|
}
|
|
5130
5130
|
};
|
|
5131
5131
|
schema = [map, seq].concat(jsonScalars, jsonError);
|
|
@@ -5327,9 +5327,9 @@ var init_set = __esm({
|
|
|
5327
5327
|
});
|
|
5328
5328
|
|
|
5329
5329
|
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
5330
|
-
function parseSexagesimal(
|
|
5331
|
-
const sign =
|
|
5332
|
-
const parts = sign === "-" || sign === "+" ?
|
|
5330
|
+
function parseSexagesimal(str3, asBigInt) {
|
|
5331
|
+
const sign = str3[0];
|
|
5332
|
+
const parts = sign === "-" || sign === "+" ? str3.substring(1) : str3;
|
|
5333
5333
|
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
5334
5334
|
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
5335
5335
|
return sign === "-" ? num(-1) * res : res;
|
|
@@ -5346,8 +5346,8 @@ var init_timestamp = __esm({
|
|
|
5346
5346
|
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
5347
5347
|
// assumed to be 00:00:00Z (start of day, UTC).
|
|
5348
5348
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
5349
|
-
resolve(
|
|
5350
|
-
const match =
|
|
5349
|
+
resolve(str3) {
|
|
5350
|
+
const match = str3.match(timestamp.test);
|
|
5351
5351
|
if (!match)
|
|
5352
5352
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
5353
5353
|
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
@@ -6591,58 +6591,802 @@ var init_nitro_dependencies = __esm({
|
|
|
6591
6591
|
}
|
|
6592
6592
|
});
|
|
6593
6593
|
|
|
6594
|
-
//
|
|
6595
|
-
var
|
|
6596
|
-
|
|
6594
|
+
// src/podspec-prism.ts
|
|
6595
|
+
var import_parsePrism;
|
|
6596
|
+
var init_podspec_prism = __esm({
|
|
6597
|
+
"src/podspec-prism.ts"() {
|
|
6597
6598
|
"use strict";
|
|
6599
|
+
import_parsePrism = require("@ruby/prism/src/parsePrism.js");
|
|
6598
6600
|
}
|
|
6599
6601
|
});
|
|
6600
6602
|
|
|
6601
|
-
//
|
|
6602
|
-
var
|
|
6603
|
-
|
|
6603
|
+
// src/podspec-ruby.ts
|
|
6604
|
+
var N, NOT_FOUND;
|
|
6605
|
+
var init_podspec_ruby = __esm({
|
|
6606
|
+
"src/podspec-ruby.ts"() {
|
|
6604
6607
|
"use strict";
|
|
6608
|
+
N = __toESM(require("@ruby/prism/src/nodes.js"), 1);
|
|
6609
|
+
init_podspec_prism();
|
|
6610
|
+
NOT_FOUND = Symbol("not found");
|
|
6605
6611
|
}
|
|
6606
6612
|
});
|
|
6607
6613
|
|
|
6608
|
-
//
|
|
6609
|
-
var
|
|
6610
|
-
"
|
|
6614
|
+
// src/podspec-ruby-stdlib.ts
|
|
6615
|
+
var init_podspec_ruby_stdlib = __esm({
|
|
6616
|
+
"src/podspec-ruby-stdlib.ts"() {
|
|
6611
6617
|
"use strict";
|
|
6618
|
+
init_podspec_ruby();
|
|
6612
6619
|
}
|
|
6613
6620
|
});
|
|
6614
6621
|
|
|
6615
|
-
//
|
|
6616
|
-
var
|
|
6617
|
-
|
|
6622
|
+
// src/podspec-cocoapods.ts
|
|
6623
|
+
var PRELUDE;
|
|
6624
|
+
var init_podspec_cocoapods = __esm({
|
|
6625
|
+
"src/podspec-cocoapods.ts"() {
|
|
6618
6626
|
"use strict";
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6627
|
+
init_podspec_ruby();
|
|
6628
|
+
init_podspec_ruby_stdlib();
|
|
6629
|
+
PRELUDE = String.raw`
|
|
6630
|
+
module Pod
|
|
6631
|
+
VERSION = '1.17.0'
|
|
6632
|
+
class Informative < StandardError; end
|
|
6633
|
+
class PlainInformative < StandardError; end
|
|
6634
|
+
class Version < Gem::Version; end
|
|
6635
|
+
|
|
6636
|
+
class Requirement
|
|
6637
|
+
PATTERN = /\A\s*(=|!=|>|<|>=|<=|~>)?\s*([0-9]+(?:\.[0-9a-zA-Z]+)*(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)\s*\z/
|
|
6638
|
+
attr_reader :requirements
|
|
6639
|
+
def self.create(input)
|
|
6640
|
+
input.is_a?(Requirement) ? input : new(input)
|
|
6641
|
+
end
|
|
6642
|
+
def initialize(*requirements)
|
|
6643
|
+
requirements = requirements.flatten
|
|
6644
|
+
requirements.compact!
|
|
6645
|
+
requirements.uniq!
|
|
6646
|
+
@requirements = requirements.empty? ? [['>=', Version.new('0')]] : requirements.map { |r| parse(r) }
|
|
6647
|
+
end
|
|
6648
|
+
def parse(requirement)
|
|
6649
|
+
return ['=', requirement] if requirement.is_a?(Version)
|
|
6650
|
+
match = PATTERN.match(requirement.to_s)
|
|
6651
|
+
raise ArgumentError, "Illformed requirement [#{requirement.inspect}]" unless match
|
|
6652
|
+
[match[1] || '=', Version.new(match[2])]
|
|
6653
|
+
end
|
|
6654
|
+
def to_s
|
|
6655
|
+
requirements.map { |op, version| "#{op} #{version}" }.join(', ')
|
|
6656
|
+
end
|
|
6657
|
+
end
|
|
6623
6658
|
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6659
|
+
class Dependency
|
|
6660
|
+
attr_reader :name, :requirement
|
|
6661
|
+
def initialize(name = nil, *requirements)
|
|
6662
|
+
@name = name
|
|
6663
|
+
@requirement = Requirement.create(requirements)
|
|
6664
|
+
end
|
|
6665
|
+
end
|
|
6666
|
+
|
|
6667
|
+
class Platform
|
|
6668
|
+
attr_reader :name, :deployment_target
|
|
6669
|
+
def initialize(name, deployment_target = nil)
|
|
6670
|
+
@name = name.to_s == 'macos' ? :osx : name.to_sym
|
|
6671
|
+
@deployment_target = deployment_target.nil? ? nil : Version.new(deployment_target)
|
|
6672
|
+
end
|
|
6673
|
+
def ==(other)
|
|
6674
|
+
other.is_a?(Platform) && name == other.name && deployment_target == other.deployment_target
|
|
6675
|
+
end
|
|
6676
|
+
def to_sym
|
|
6677
|
+
name
|
|
6678
|
+
end
|
|
6679
|
+
def to_s
|
|
6680
|
+
name.to_s
|
|
6681
|
+
end
|
|
6682
|
+
end
|
|
6683
|
+
|
|
6684
|
+
class Config
|
|
6685
|
+
attr_accessor :installation_root, :podfile, :lockfile
|
|
6686
|
+
def self.instance
|
|
6687
|
+
@instance ||= new
|
|
6688
|
+
end
|
|
6689
|
+
def sandbox_root
|
|
6690
|
+
installation_root + 'Pods'
|
|
6691
|
+
end
|
|
6692
|
+
def project_pods_root
|
|
6693
|
+
sandbox_root
|
|
6694
|
+
end
|
|
6695
|
+
def verbose?
|
|
6696
|
+
false
|
|
6697
|
+
end
|
|
6698
|
+
def silent?
|
|
6699
|
+
true
|
|
6700
|
+
end
|
|
6701
|
+
end
|
|
6702
|
+
|
|
6703
|
+
module UI
|
|
6704
|
+
def self.puts(*args); end
|
|
6705
|
+
def self.print(*args); end
|
|
6706
|
+
def self.warn(*args); end
|
|
6707
|
+
def self.notice(*args); end
|
|
6708
|
+
def self.message(*args); yield if block_given?; end
|
|
6709
|
+
def self.info(*args); yield if block_given?; end
|
|
6710
|
+
def self.section(*args); yield if block_given?; end
|
|
6711
|
+
def self.titled_section(*args); yield if block_given?; end
|
|
6712
|
+
end
|
|
6713
|
+
CoreUI = UI
|
|
6714
|
+
|
|
6715
|
+
class Specification
|
|
6716
|
+
module DSL
|
|
6717
|
+
PLATFORMS = [:osx, :ios, :tvos, :visionos, :watchos].freeze
|
|
6718
|
+
SINGULAR = {
|
|
6719
|
+
swift_versions: 'swift_version', authors: 'author', screenshots: 'screenshot', frameworks: 'framework',
|
|
6720
|
+
weak_frameworks: 'weak_framework', libraries: 'library', compiler_flags: 'compiler_flag',
|
|
6721
|
+
script_phases: 'script_phase', vendored_frameworks: 'vendored_framework', vendored_libraries: 'vendored_library',
|
|
6722
|
+
on_demand_resources: 'on_demand_resource', resource_bundles: 'resource_bundle', resources: 'resource',
|
|
6723
|
+
preserve_paths: 'preserve_path', default_subspecs: 'default_subspec'
|
|
6724
|
+
}.freeze
|
|
6725
|
+
|
|
6726
|
+
class Attribute
|
|
6727
|
+
attr_reader :name, :container, :types, :default_value
|
|
6728
|
+
def initialize(name, options)
|
|
6729
|
+
@name = name
|
|
6730
|
+
@multi_platform = options.fetch(:multi_platform, true)
|
|
6731
|
+
@root_only = options.fetch(:root_only, false)
|
|
6732
|
+
@inherited = options.fetch(:inherited, @root_only)
|
|
6733
|
+
@singularize = options.fetch(:singularize, false)
|
|
6734
|
+
@container = options.fetch(:container, nil)
|
|
6735
|
+
@default_value = options.fetch(:default_value, nil)
|
|
6736
|
+
@types = options.fetch(:types, [String])
|
|
6737
|
+
end
|
|
6738
|
+
def multi_platform?
|
|
6739
|
+
@multi_platform
|
|
6740
|
+
end
|
|
6741
|
+
def root_only?
|
|
6742
|
+
@root_only
|
|
6743
|
+
end
|
|
6744
|
+
def inherited?
|
|
6745
|
+
@inherited
|
|
6746
|
+
end
|
|
6747
|
+
def writer_name
|
|
6748
|
+
"#{name}="
|
|
6749
|
+
end
|
|
6750
|
+
def writer_singular_form
|
|
6751
|
+
"#{SINGULAR.fetch(name)}=" if @singularize
|
|
6752
|
+
end
|
|
6753
|
+
def default(platform = nil)
|
|
6754
|
+
@default_value
|
|
6755
|
+
end
|
|
6756
|
+
end
|
|
6757
|
+
|
|
6758
|
+
def self.attributes
|
|
6759
|
+
@attributes
|
|
6760
|
+
end
|
|
6761
|
+
def self.attribute(name, options = {})
|
|
6762
|
+
@attributes ||= {}
|
|
6763
|
+
@attributes[name] = Attribute.new(name, options)
|
|
6764
|
+
end
|
|
6765
|
+
def self.root_attribute(name, options = {})
|
|
6766
|
+
options[:root_only] = true
|
|
6767
|
+
options[:multi_platform] = false
|
|
6768
|
+
attribute(name, options)
|
|
6769
|
+
end
|
|
6770
|
+
|
|
6771
|
+
attribute :name, :inherited => false, :multi_platform => false
|
|
6772
|
+
root_attribute :version
|
|
6773
|
+
root_attribute :swift_versions, :container => Array, :singularize => true
|
|
6774
|
+
root_attribute :cocoapods_version
|
|
6775
|
+
root_attribute :authors, :types => [String, Array, Hash], :container => Hash, :singularize => true
|
|
6776
|
+
root_attribute :social_media_url
|
|
6777
|
+
root_attribute :license, :container => Hash
|
|
6778
|
+
root_attribute :homepage
|
|
6779
|
+
root_attribute :readme
|
|
6780
|
+
root_attribute :changelog
|
|
6781
|
+
root_attribute :source, :container => Hash
|
|
6782
|
+
root_attribute :summary
|
|
6783
|
+
root_attribute :description
|
|
6784
|
+
root_attribute :screenshots, :singularize => true, :container => Array
|
|
6785
|
+
root_attribute :documentation_url
|
|
6786
|
+
root_attribute :prepare_command
|
|
6787
|
+
root_attribute :static_framework, :types => [TrueClass, FalseClass], :default_value => false
|
|
6788
|
+
root_attribute :deprecated, :types => [TrueClass, FalseClass], :default_value => false
|
|
6789
|
+
root_attribute :deprecated_in_favor_of
|
|
6790
|
+
attribute :platforms, :container => Hash, :multi_platform => false, :inherited => true
|
|
6791
|
+
attribute :dependencies, :container => Hash, :inherited => true
|
|
6792
|
+
attribute :info_plist, :container => Hash, :inherited => false
|
|
6793
|
+
attribute :requires_arc, :types => [TrueClass, FalseClass, String, Array], :default_value => true, :inherited => true
|
|
6794
|
+
attribute :frameworks, :container => Array, :singularize => true, :inherited => true
|
|
6795
|
+
attribute :weak_frameworks, :container => Array, :singularize => true, :inherited => true
|
|
6796
|
+
attribute :libraries, :container => Array, :singularize => true, :inherited => true
|
|
6797
|
+
attribute :compiler_flags, :container => Array, :singularize => true, :inherited => true
|
|
6798
|
+
attribute :pod_target_xcconfig, :container => Hash, :inherited => true
|
|
6799
|
+
attribute :user_target_xcconfig, :container => Hash, :inherited => true
|
|
6800
|
+
attribute :prefix_header_contents, :types => [Array, String], :inherited => true
|
|
6801
|
+
attribute :prefix_header_file, :types => [TrueClass, FalseClass, String], :inherited => true
|
|
6802
|
+
root_attribute :module_name
|
|
6803
|
+
attribute :header_dir, :inherited => true
|
|
6804
|
+
attribute :header_mappings_dir, :inherited => true
|
|
6805
|
+
attribute :script_phases, :types => [Hash], :container => Array, :singularize => true
|
|
6806
|
+
attribute :source_files, :container => Array
|
|
6807
|
+
attribute :public_header_files, :container => Array
|
|
6808
|
+
attribute :project_header_files, :container => Array
|
|
6809
|
+
attribute :private_header_files, :container => Array
|
|
6810
|
+
attribute :vendored_frameworks, :container => Array, :singularize => true
|
|
6811
|
+
attribute :vendored_libraries, :container => Array, :singularize => true
|
|
6812
|
+
attribute :on_demand_resources, :types => [String, Array, Hash], :container => Hash, :singularize => true
|
|
6813
|
+
attribute :resource_bundles, :types => [String, Array], :container => Hash, :singularize => true
|
|
6814
|
+
attribute :resources, :container => Array, :singularize => true
|
|
6815
|
+
attribute :exclude_files, :container => Array
|
|
6816
|
+
attribute :preserve_paths, :container => Array, :singularize => true
|
|
6817
|
+
attribute :module_map, :types => [TrueClass, FalseClass, String], :root_only => true
|
|
6818
|
+
attribute :test_type, :types => [Symbol, String], :multi_platform => false
|
|
6819
|
+
attribute :requires_app_host, :types => [TrueClass, FalseClass], :default_value => false
|
|
6820
|
+
attribute :app_host_name, :types => [String]
|
|
6821
|
+
attribute :scheme, :types => [Hash], :container => Hash
|
|
6822
|
+
root_attribute :default_subspecs, :container => Array, :types => [Array, String, Symbol], :singularize => true
|
|
6823
|
+
attribute :xcconfig, :container => Hash, :inherited => true
|
|
6824
|
+
|
|
6825
|
+
class PlatformProxy
|
|
6826
|
+
attr_accessor :spec
|
|
6827
|
+
attr_reader :platform
|
|
6828
|
+
def initialize(spec, platform)
|
|
6829
|
+
@spec = spec
|
|
6830
|
+
@platform = platform
|
|
6831
|
+
end
|
|
6832
|
+
def method_missing(meth, *args, &block)
|
|
6833
|
+
attribute = attribute_for_method(meth)
|
|
6834
|
+
raise NoMethodError, "undefined method '#{meth}' for #{self}" unless attribute
|
|
6835
|
+
raise NoMethodError, "#{attribute} cannot be set per-platform" unless attribute.multi_platform?
|
|
6836
|
+
spec.store_attribute(attribute.name, args.first, platform)
|
|
6837
|
+
end
|
|
6838
|
+
def respond_to_missing?(method, include_all)
|
|
6839
|
+
attribute = attribute_for_method(method)
|
|
6840
|
+
(attribute && attribute.multi_platform?) || false
|
|
6841
|
+
end
|
|
6842
|
+
def dependency(*args)
|
|
6843
|
+
name, *version_requirements = args
|
|
6844
|
+
platform_name = platform.to_s
|
|
6845
|
+
platform_hash = spec.attributes_hash[platform_name] || {}
|
|
6846
|
+
platform_hash['dependencies'] ||= {}
|
|
6847
|
+
platform_hash['dependencies'][name] = version_requirements
|
|
6848
|
+
spec.attributes_hash[platform_name] = platform_hash
|
|
6849
|
+
end
|
|
6850
|
+
def deployment_target=(value)
|
|
6851
|
+
platform_name = platform.to_s
|
|
6852
|
+
spec.attributes_hash['platforms'] ||= {}
|
|
6853
|
+
spec.attributes_hash['platforms'][platform_name] = value
|
|
6854
|
+
end
|
|
6855
|
+
private
|
|
6856
|
+
def attribute_for_method(method)
|
|
6857
|
+
method = method.to_sym
|
|
6858
|
+
Specification::DSL.attributes.values.find do |attribute|
|
|
6859
|
+
if attribute.writer_name.to_sym == method
|
|
6860
|
+
true
|
|
6861
|
+
elsif attribute.writer_singular_form
|
|
6862
|
+
attribute.writer_singular_form.to_sym == method
|
|
6863
|
+
end
|
|
6864
|
+
end
|
|
6865
|
+
end
|
|
6866
|
+
end
|
|
6867
|
+
end
|
|
6868
|
+
|
|
6869
|
+
class Consumer
|
|
6870
|
+
attr_reader :spec, :platform_name
|
|
6871
|
+
def initialize(spec, platform)
|
|
6872
|
+
@spec = spec
|
|
6873
|
+
@platform_name = platform.respond_to?(:name) ? platform.name : platform
|
|
6874
|
+
end
|
|
6875
|
+
|
|
6876
|
+
def self.spec_attr_accessor(attr_name)
|
|
6877
|
+
define_method(attr_name) do
|
|
6878
|
+
value_for_attribute(attr_name)
|
|
6879
|
+
end
|
|
6880
|
+
end
|
|
6881
|
+
|
|
6882
|
+
spec_attr_accessor :requires_arc
|
|
6883
|
+
spec_attr_accessor :frameworks
|
|
6884
|
+
spec_attr_accessor :weak_frameworks
|
|
6885
|
+
spec_attr_accessor :libraries
|
|
6886
|
+
spec_attr_accessor :compiler_flags
|
|
6887
|
+
spec_attr_accessor :info_plist
|
|
6888
|
+
spec_attr_accessor :prefix_header_contents
|
|
6889
|
+
spec_attr_accessor :prefix_header_file
|
|
6890
|
+
spec_attr_accessor :module_name
|
|
6891
|
+
spec_attr_accessor :module_map
|
|
6892
|
+
spec_attr_accessor :header_dir
|
|
6893
|
+
spec_attr_accessor :header_mappings_dir
|
|
6894
|
+
spec_attr_accessor :requires_app_host
|
|
6895
|
+
spec_attr_accessor :app_host_name
|
|
6896
|
+
spec_attr_accessor :source_files
|
|
6897
|
+
spec_attr_accessor :public_header_files
|
|
6898
|
+
spec_attr_accessor :project_header_files
|
|
6899
|
+
spec_attr_accessor :private_header_files
|
|
6900
|
+
spec_attr_accessor :vendored_frameworks
|
|
6901
|
+
spec_attr_accessor :vendored_libraries
|
|
6902
|
+
spec_attr_accessor :resources
|
|
6903
|
+
spec_attr_accessor :exclude_files
|
|
6904
|
+
spec_attr_accessor :preserve_paths
|
|
6905
|
+
|
|
6906
|
+
def pod_target_xcconfig
|
|
6907
|
+
attr = Specification::DSL.attributes[:pod_target_xcconfig]
|
|
6908
|
+
merge_values(attr, value_for_attribute(:xcconfig), value_for_attribute(:pod_target_xcconfig))
|
|
6909
|
+
end
|
|
6910
|
+
|
|
6911
|
+
def user_target_xcconfig
|
|
6912
|
+
attr = Specification::DSL.attributes[:user_target_xcconfig]
|
|
6913
|
+
merge_values(attr, value_for_attribute(:xcconfig), value_for_attribute(:user_target_xcconfig))
|
|
6914
|
+
end
|
|
6915
|
+
|
|
6916
|
+
def dependencies
|
|
6917
|
+
value = value_for_attribute(:dependencies)
|
|
6918
|
+
value.map do |name, requirements|
|
|
6919
|
+
Dependency.new(name, requirements)
|
|
6920
|
+
end
|
|
6921
|
+
end
|
|
6922
|
+
|
|
6923
|
+
def value_for_attribute(attr_name)
|
|
6924
|
+
attr = Specification::DSL.attributes[attr_name]
|
|
6925
|
+
value = value_with_inheritance(spec, attr)
|
|
6926
|
+
value = attr.default(platform_name) if value.nil?
|
|
6927
|
+
value = attr.container.new if value.nil? && attr.container
|
|
6928
|
+
value
|
|
6929
|
+
end
|
|
6930
|
+
|
|
6931
|
+
def value_with_inheritance(the_spec, attr)
|
|
6932
|
+
value = raw_value_for_attribute(the_spec, attr)
|
|
6933
|
+
if the_spec.root? || !attr.inherited?
|
|
6934
|
+
return value
|
|
6935
|
+
end
|
|
6936
|
+
parent_value = value_with_inheritance(the_spec.parent, attr)
|
|
6937
|
+
merge_values(attr, parent_value, value)
|
|
6938
|
+
end
|
|
6939
|
+
|
|
6940
|
+
def raw_value_for_attribute(the_spec, attr)
|
|
6941
|
+
value = the_spec.attributes_hash[attr.name.to_s]
|
|
6942
|
+
value = prepare_value(attr, value)
|
|
6943
|
+
if attr.multi_platform?
|
|
6944
|
+
if platform_hash = the_spec.attributes_hash[platform_name.to_s]
|
|
6945
|
+
platform_value = platform_hash[attr.name.to_s]
|
|
6946
|
+
platform_value = prepare_value(attr, platform_value)
|
|
6947
|
+
value = merge_values(attr, value, platform_value)
|
|
6948
|
+
end
|
|
6949
|
+
end
|
|
6950
|
+
value
|
|
6951
|
+
end
|
|
6952
|
+
|
|
6953
|
+
def merge_values(attr, existing_value, new_value)
|
|
6954
|
+
return existing_value if new_value.nil?
|
|
6955
|
+
return new_value if existing_value.nil?
|
|
6956
|
+
if attr.types.include?(TrueClass)
|
|
6957
|
+
new_value.nil? ? existing_value : new_value
|
|
6958
|
+
elsif attr.container == Array
|
|
6959
|
+
r = [*existing_value] + [*new_value]
|
|
6960
|
+
r.compact
|
|
6961
|
+
elsif attr.container == Hash
|
|
6962
|
+
existing_value.merge(new_value) do |_, old, new|
|
|
6963
|
+
merge_hash_value(attr, old, new)
|
|
6964
|
+
end
|
|
6965
|
+
else
|
|
6966
|
+
new_value
|
|
6967
|
+
end
|
|
6968
|
+
end
|
|
6969
|
+
|
|
6970
|
+
def prepare_value(attr, value)
|
|
6971
|
+
if attr.container == Array
|
|
6972
|
+
value = if value.is_a?(Hash)
|
|
6973
|
+
[value]
|
|
6974
|
+
else
|
|
6975
|
+
[*value].compact
|
|
6976
|
+
end
|
|
6977
|
+
end
|
|
6978
|
+
value
|
|
6979
|
+
end
|
|
6980
|
+
|
|
6981
|
+
private
|
|
6982
|
+
|
|
6983
|
+
def merge_hash_value(attr, old, new)
|
|
6984
|
+
if attr.name == :info_plist
|
|
6985
|
+
new
|
|
6986
|
+
elsif spec.non_library_specification? && [:pod_target_xcconfig, :user_target_xcconfig, :xcconfig].include?(attr.name)
|
|
6987
|
+
new
|
|
6988
|
+
elsif new.is_a?(Array) || old.is_a?(Array)
|
|
6989
|
+
r = Array(old) + Array(new)
|
|
6990
|
+
r.compact
|
|
6991
|
+
else
|
|
6992
|
+
old + ' ' + new
|
|
6993
|
+
end
|
|
6994
|
+
end
|
|
6995
|
+
end
|
|
6996
|
+
|
|
6997
|
+
attr_reader :parent
|
|
6998
|
+
attr_accessor :attributes_hash, :subspecs, :test_specification, :app_specification, :defined_in_file
|
|
6999
|
+
alias_method :test_specification?, :test_specification
|
|
7000
|
+
alias_method :app_specification?, :app_specification
|
|
7001
|
+
|
|
7002
|
+
def initialize(parent = nil, name = nil, test_specification = false, app_specification: false)
|
|
7003
|
+
raise StandardError, "#{self} can not be both an app and test specification." if test_specification && app_specification
|
|
7004
|
+
@attributes_hash = {}
|
|
7005
|
+
@subspecs = []
|
|
7006
|
+
@consumers = {}
|
|
7007
|
+
@parent = parent
|
|
7008
|
+
@test_specification = test_specification
|
|
7009
|
+
@app_specification = app_specification
|
|
7010
|
+
attributes_hash['name'] = name
|
|
7011
|
+
attributes_hash['test_type'] = :unit if test_specification
|
|
7012
|
+
yield self if block_given?
|
|
7013
|
+
end
|
|
7014
|
+
|
|
7015
|
+
def to_s
|
|
7016
|
+
specified_version = attributes_hash['version'] || ''
|
|
7017
|
+
if name && !specified_version.to_s.empty?
|
|
7018
|
+
"#{name} (#{specified_version})"
|
|
7019
|
+
elsif name
|
|
7020
|
+
name
|
|
7021
|
+
else
|
|
7022
|
+
'No-name'
|
|
7023
|
+
end
|
|
7024
|
+
end
|
|
7025
|
+
|
|
7026
|
+
def inspect
|
|
7027
|
+
"#<#{self.class.name} name=#{name.inspect}>"
|
|
7028
|
+
end
|
|
7029
|
+
|
|
7030
|
+
def base_name
|
|
7031
|
+
attributes_hash['name']
|
|
7032
|
+
end
|
|
7033
|
+
|
|
7034
|
+
def name
|
|
7035
|
+
parent ? "#{parent.name}/#{base_name}" : base_name
|
|
7036
|
+
end
|
|
7037
|
+
|
|
7038
|
+
def name=(name)
|
|
7039
|
+
attributes_hash['name'] = name
|
|
7040
|
+
end
|
|
7041
|
+
|
|
7042
|
+
def root
|
|
7043
|
+
parent ? parent.root : self
|
|
7044
|
+
end
|
|
7045
|
+
|
|
7046
|
+
def root?
|
|
7047
|
+
parent.nil?
|
|
7048
|
+
end
|
|
7049
|
+
|
|
7050
|
+
def subspec?
|
|
7051
|
+
!parent.nil?
|
|
7052
|
+
end
|
|
7053
|
+
|
|
7054
|
+
def spec_type
|
|
7055
|
+
return :test if test_specification?
|
|
7056
|
+
return :app if app_specification?
|
|
7057
|
+
:library
|
|
7058
|
+
end
|
|
7059
|
+
|
|
7060
|
+
def library_specification?
|
|
7061
|
+
!app_specification? && !test_specification?
|
|
7062
|
+
end
|
|
7063
|
+
|
|
7064
|
+
def non_library_specification?
|
|
7065
|
+
!library_specification?
|
|
7066
|
+
end
|
|
7067
|
+
|
|
7068
|
+
def version
|
|
7069
|
+
if root?
|
|
7070
|
+
@version ||= Version.new(attributes_hash['version'])
|
|
7071
|
+
else
|
|
7072
|
+
@version ||= root.version
|
|
7073
|
+
end
|
|
7074
|
+
end
|
|
7075
|
+
|
|
7076
|
+
def requires_arc
|
|
7077
|
+
attributes_hash['requires_arc']
|
|
7078
|
+
end
|
|
7079
|
+
|
|
7080
|
+
def swift_version
|
|
7081
|
+
swift_versions.last
|
|
7082
|
+
end
|
|
7083
|
+
|
|
7084
|
+
def swift_versions
|
|
7085
|
+
@swift_versions ||= begin
|
|
7086
|
+
swift_versions = Array(attributes_hash['swift_versions']).dup
|
|
7087
|
+
swift_versions << attributes_hash['swift_version'] unless attributes_hash['swift_version'].nil?
|
|
7088
|
+
swift_versions.map { |swift_version| Version.new(swift_version) }.uniq.sort
|
|
7089
|
+
end
|
|
7090
|
+
end
|
|
7091
|
+
|
|
7092
|
+
def module_name
|
|
7093
|
+
attributes_hash['module_name'] || name.split('/').first.gsub(/^([0-9])/, '_\1').gsub(/[^a-zA-Z0-9_]/, '_').gsub(/_+/, '_')
|
|
7094
|
+
end
|
|
7095
|
+
|
|
7096
|
+
def homepage
|
|
7097
|
+
attributes_hash['homepage']
|
|
7098
|
+
end
|
|
7099
|
+
|
|
7100
|
+
def summary
|
|
7101
|
+
attributes_hash['summary']
|
|
7102
|
+
end
|
|
7103
|
+
|
|
7104
|
+
def source
|
|
7105
|
+
value = attributes_hash['source']
|
|
7106
|
+
value && value.is_a?(Hash) ? Specification.convert_keys_to_symbol(value) : value
|
|
7107
|
+
end
|
|
7108
|
+
|
|
7109
|
+
def default_subspecs
|
|
7110
|
+
value = Array(attributes_hash['default_subspecs'])
|
|
7111
|
+
first = value.first
|
|
7112
|
+
if first == :none || first == 'none'
|
|
7113
|
+
first.to_sym
|
|
7114
|
+
else
|
|
7115
|
+
value
|
|
7116
|
+
end
|
|
7117
|
+
end
|
|
7118
|
+
|
|
7119
|
+
def dependencies(platform = nil)
|
|
7120
|
+
if platform
|
|
7121
|
+
consumer(platform).dependencies || []
|
|
7122
|
+
else
|
|
7123
|
+
available_platforms.map do |spec_platform|
|
|
7124
|
+
consumer(spec_platform).dependencies
|
|
7125
|
+
end.flatten.uniq
|
|
7126
|
+
end
|
|
7127
|
+
end
|
|
7128
|
+
|
|
7129
|
+
def consumer(platform)
|
|
7130
|
+
platform = platform.to_sym
|
|
7131
|
+
@consumers[platform] ||= Consumer.new(self, platform)
|
|
7132
|
+
end
|
|
7133
|
+
|
|
7134
|
+
def subspec_by_name(relative_name, raise_if_missing = true, include_non_library_specifications = false)
|
|
7135
|
+
if relative_name.nil? || relative_name == base_name
|
|
7136
|
+
self
|
|
7137
|
+
elsif relative_name.downcase == base_name.downcase
|
|
7138
|
+
raise Informative, "Trying to access a '#{relative_name}' specification from '#{base_name}', which has a different case."
|
|
7139
|
+
else
|
|
7140
|
+
remainder = relative_name[base_name.size + 1..-1]
|
|
7141
|
+
subspec_name = remainder.split('/').shift
|
|
7142
|
+
subspec = subspecs.find { |s| s.base_name == subspec_name && (include_non_library_specifications || !s.non_library_specification?) }
|
|
7143
|
+
unless subspec
|
|
7144
|
+
if raise_if_missing
|
|
7145
|
+
raise Informative, "Unable to find a specification named " \
|
|
7146
|
+
"'#{relative_name}' in '#{name} (#{version})'."
|
|
7147
|
+
else
|
|
7148
|
+
return nil
|
|
7149
|
+
end
|
|
7150
|
+
end
|
|
7151
|
+
subspec.subspec_by_name(remainder, raise_if_missing, include_non_library_specifications)
|
|
7152
|
+
end
|
|
7153
|
+
end
|
|
7154
|
+
|
|
7155
|
+
def available_platforms
|
|
7156
|
+
names = supported_platform_names
|
|
7157
|
+
names = DSL::PLATFORMS.map(&:to_s) if names.empty?
|
|
7158
|
+
names.map { |name| Platform.new(name, deployment_target(name)) }
|
|
7159
|
+
end
|
|
7160
|
+
|
|
7161
|
+
def supported_platform_names
|
|
7162
|
+
spec = self
|
|
7163
|
+
names = nil
|
|
7164
|
+
until spec.nil?
|
|
7165
|
+
if spec.attributes_hash['platforms']
|
|
7166
|
+
spec_platforms = spec.attributes_hash['platforms'].keys
|
|
7167
|
+
names = names.nil? ? spec_platforms : names & spec_platforms
|
|
7168
|
+
end
|
|
7169
|
+
spec = spec.parent
|
|
7170
|
+
end
|
|
7171
|
+
names || []
|
|
7172
|
+
end
|
|
7173
|
+
|
|
7174
|
+
def deployment_target(platform_name)
|
|
7175
|
+
result = platform_hash[platform_name.to_s]
|
|
7176
|
+
result ||= parent.deployment_target(platform_name) if parent
|
|
7177
|
+
result
|
|
7178
|
+
end
|
|
7179
|
+
|
|
7180
|
+
def platform_hash
|
|
7181
|
+
case value = attributes_hash['platforms']
|
|
7182
|
+
when String
|
|
7183
|
+
{ value => nil }
|
|
7184
|
+
when Array
|
|
7185
|
+
result = {}
|
|
7186
|
+
value.each { |a| result[a] = nil }
|
|
7187
|
+
result
|
|
7188
|
+
when Hash
|
|
7189
|
+
value
|
|
7190
|
+
else
|
|
7191
|
+
{}
|
|
7192
|
+
end
|
|
7193
|
+
end
|
|
7194
|
+
|
|
7195
|
+
def store_attribute(name, value, platform_name = nil)
|
|
7196
|
+
name = name.to_s
|
|
7197
|
+
value = Specification.convert_keys_to_string(value) if value.is_a?(Hash)
|
|
7198
|
+
value = value.strip_heredoc.strip if value.respond_to?(:strip_heredoc)
|
|
7199
|
+
if platform_name
|
|
7200
|
+
platform_name = platform_name.to_s
|
|
7201
|
+
attributes_hash[platform_name] ||= {}
|
|
7202
|
+
attributes_hash[platform_name][name] = value
|
|
7203
|
+
else
|
|
7204
|
+
attributes_hash[name] = value
|
|
7205
|
+
end
|
|
7206
|
+
end
|
|
7207
|
+
|
|
7208
|
+
def self.convert_keys_to_string(value, recursive: true)
|
|
7209
|
+
return unless value
|
|
7210
|
+
result = {}
|
|
7211
|
+
value.each do |key, subvalue|
|
|
7212
|
+
subvalue = Specification.convert_keys_to_string(subvalue) if recursive && subvalue.is_a?(Hash)
|
|
7213
|
+
result[key.to_s] = subvalue
|
|
7214
|
+
end
|
|
7215
|
+
result
|
|
7216
|
+
end
|
|
7217
|
+
|
|
7218
|
+
def self.convert_keys_to_symbol(value, recursive: true)
|
|
7219
|
+
return unless value
|
|
7220
|
+
result = {}
|
|
7221
|
+
value.each do |key, subvalue|
|
|
7222
|
+
subvalue = Specification.convert_keys_to_symbol(subvalue) if recursive && subvalue.is_a?(Hash)
|
|
7223
|
+
result[key.to_sym] = subvalue
|
|
7224
|
+
end
|
|
7225
|
+
result
|
|
7226
|
+
end
|
|
7227
|
+
|
|
7228
|
+
DSL.attributes.values.each do |a|
|
|
7229
|
+
define_method(a.writer_name) do |value|
|
|
7230
|
+
store_attribute(a.name, value)
|
|
7231
|
+
end
|
|
7232
|
+
if a.writer_singular_form
|
|
7233
|
+
alias_method(a.writer_singular_form, a.writer_name)
|
|
7234
|
+
end
|
|
7235
|
+
end
|
|
7236
|
+
|
|
7237
|
+
def platform=(args)
|
|
7238
|
+
name, deployment_target = args
|
|
7239
|
+
name = :osx if name.to_s == 'macos'
|
|
7240
|
+
attributes_hash['platforms'] = if name
|
|
7241
|
+
{ name.to_s => deployment_target }
|
|
7242
|
+
else
|
|
7243
|
+
{}
|
|
7244
|
+
end
|
|
7245
|
+
end
|
|
7246
|
+
|
|
7247
|
+
def deployment_target=(*_args)
|
|
7248
|
+
raise Informative, 'The deployment target can be declared only per platform.'
|
|
7249
|
+
end
|
|
7250
|
+
|
|
7251
|
+
def dependency(*args)
|
|
7252
|
+
name, *version_requirements = args
|
|
7253
|
+
if name == self.name
|
|
7254
|
+
raise Informative, "A specification can't require itself as a subspec"
|
|
7255
|
+
end
|
|
7256
|
+
if @parent
|
|
7257
|
+
composed_name = ''
|
|
7258
|
+
@parent.name.split('/').each do |component|
|
|
7259
|
+
composed_name << component
|
|
7260
|
+
if name == composed_name
|
|
7261
|
+
raise Informative, "A subspec can't require one of its parents specifications"
|
|
7262
|
+
else
|
|
7263
|
+
composed_name << '/'
|
|
7264
|
+
end
|
|
7265
|
+
end
|
|
7266
|
+
end
|
|
7267
|
+
|
|
7268
|
+
configurations_option = version_requirements.find { |option| option.is_a?(Hash) && option.key?(:configurations) }
|
|
7269
|
+
whitelisted_configurations = if configurations_option
|
|
7270
|
+
version_requirements.delete(configurations_option)
|
|
7271
|
+
Array(configurations_option.delete(:configurations)).map { |c| c.to_s.downcase }
|
|
7272
|
+
end
|
|
7273
|
+
|
|
7274
|
+
dependency_options = version_requirements.reject { |req| req.is_a?(String) }
|
|
7275
|
+
dependency_options.each do |dependency_option|
|
|
7276
|
+
if dependency_option.is_a?(Hash)
|
|
7277
|
+
if !dependency_option[:path].nil?
|
|
7278
|
+
raise Informative, 'Podspecs cannot specify the source of dependencies. The :path option is not supported.'
|
|
7279
|
+
elsif !dependency_option[:git].nil?
|
|
7280
|
+
raise Informative, 'Podspecs cannot specify the source of dependencies. The :git option is not supported.'
|
|
7281
|
+
end
|
|
7282
|
+
end
|
|
7283
|
+
raise Informative, "Unsupported version requirements. #{version_requirements.inspect} is not valid."
|
|
7284
|
+
end
|
|
7285
|
+
|
|
7286
|
+
attributes_hash['dependencies'] ||= {}
|
|
7287
|
+
attributes_hash['dependencies'][name] = version_requirements
|
|
7288
|
+
|
|
7289
|
+
unless whitelisted_configurations.nil?
|
|
7290
|
+
attributes_hash['configuration_pod_whitelist'] ||= {}
|
|
7291
|
+
attributes_hash['configuration_pod_whitelist'][name] = whitelisted_configurations
|
|
7292
|
+
end
|
|
7293
|
+
end
|
|
7294
|
+
|
|
7295
|
+
def dependency=(args)
|
|
7296
|
+
raise Informative, "Cannot assign value to dependency."
|
|
7297
|
+
end
|
|
7298
|
+
|
|
7299
|
+
def subspec(name, &block)
|
|
7300
|
+
subspec = Specification.new(self, name, &block)
|
|
7301
|
+
@subspecs << subspec
|
|
7302
|
+
subspec
|
|
7303
|
+
end
|
|
7304
|
+
|
|
7305
|
+
def test_spec(name = 'Tests', &block)
|
|
7306
|
+
subspec = Specification.new(self, name, true, &block)
|
|
7307
|
+
@subspecs << subspec
|
|
7308
|
+
subspec
|
|
7309
|
+
end
|
|
7310
|
+
|
|
7311
|
+
def app_spec(name = 'App', &block)
|
|
7312
|
+
appspec = Specification.new(self, name, :app_specification => true, &block)
|
|
7313
|
+
@subspecs << appspec
|
|
7314
|
+
appspec
|
|
7315
|
+
end
|
|
7316
|
+
|
|
7317
|
+
def ios
|
|
7318
|
+
DSL::PlatformProxy.new(self, :ios)
|
|
7319
|
+
end
|
|
7320
|
+
def osx
|
|
7321
|
+
DSL::PlatformProxy.new(self, :osx)
|
|
7322
|
+
end
|
|
7323
|
+
alias macos osx
|
|
7324
|
+
def tvos
|
|
7325
|
+
DSL::PlatformProxy.new(self, :tvos)
|
|
7326
|
+
end
|
|
7327
|
+
def visionos
|
|
7328
|
+
DSL::PlatformProxy.new(self, :visionos)
|
|
7329
|
+
end
|
|
7330
|
+
def watchos
|
|
7331
|
+
DSL::PlatformProxy.new(self, :watchos)
|
|
7332
|
+
end
|
|
7333
|
+
|
|
7334
|
+
def to_hash
|
|
7335
|
+
hash = attributes_hash.dup
|
|
7336
|
+
if root? || available_platforms != parent.available_platforms
|
|
7337
|
+
platforms = Hash[available_platforms.map { |p| [p.name.to_s, p.deployment_target && p.deployment_target.to_s] }]
|
|
7338
|
+
hash['platforms'] = platforms
|
|
7339
|
+
end
|
|
7340
|
+
specs_by_type = subspecs.group_by(&:spec_type)
|
|
7341
|
+
all_appspecs = specs_by_type[:app] || []
|
|
7342
|
+
all_testspecs = specs_by_type[:test] || []
|
|
7343
|
+
all_subspecs = specs_by_type[:library] || []
|
|
7344
|
+
hash.delete('testspecs')
|
|
7345
|
+
hash['testspecs'] = all_testspecs.map(&:to_hash) unless all_testspecs.empty?
|
|
7346
|
+
hash.delete('appspecs')
|
|
7347
|
+
hash['appspecs'] = all_appspecs.map(&:to_hash) unless all_appspecs.empty?
|
|
7348
|
+
hash.delete('subspecs')
|
|
7349
|
+
hash['subspecs'] = all_subspecs.map(&:to_hash) unless all_subspecs.empty?
|
|
7350
|
+
hash.delete('swift_version')
|
|
7351
|
+
hash['swift_version'] = swift_version.to_s unless swift_version.nil?
|
|
7352
|
+
hash
|
|
7353
|
+
end
|
|
7354
|
+
|
|
7355
|
+
def to_json(*a)
|
|
7356
|
+
to_hash.to_json(*a)
|
|
7357
|
+
end
|
|
7358
|
+
|
|
7359
|
+
def self.from_hash(hash, parent = nil, test_specification: false, app_specification: false)
|
|
7360
|
+
attributes_hash = hash.dup
|
|
7361
|
+
spec = Specification.new(parent, nil, test_specification, :app_specification => app_specification)
|
|
7362
|
+
subspecs = attributes_hash.delete('subspecs')
|
|
7363
|
+
testspecs = attributes_hash.delete('testspecs')
|
|
7364
|
+
appspecs = attributes_hash.delete('appspecs')
|
|
7365
|
+
spec.test_specification = !attributes_hash['test_type'].nil?
|
|
7366
|
+
spec.attributes_hash = attributes_hash
|
|
7367
|
+
spec.subspecs.concat((subspecs || []).map { |s| from_hash(s, spec, test_specification: false, app_specification: false) })
|
|
7368
|
+
spec.subspecs.concat((testspecs || []).map { |s| from_hash(s, spec, test_specification: true, app_specification: false) })
|
|
7369
|
+
spec.subspecs.concat((appspecs || []).map { |s| from_hash(s, spec, test_specification: false, app_specification: true) })
|
|
7370
|
+
spec
|
|
7371
|
+
end
|
|
7372
|
+
end
|
|
7373
|
+
Spec = Specification
|
|
7374
|
+
|
|
7375
|
+
def self.peach_evaluated(spec)
|
|
7376
|
+
consumer = spec.consumer(:ios)
|
|
7377
|
+
result = {'name' => spec.name.split('/').last}
|
|
7378
|
+
%w[source_files exclude_files public_header_files private_header_files header_mappings_dir header_dir module_name vendored_frameworks vendored_libraries pod_target_xcconfig].each do |attribute|
|
|
7379
|
+
value = consumer.public_send(attribute)
|
|
7380
|
+
result[attribute] = value unless value.nil?
|
|
7381
|
+
end
|
|
7382
|
+
result['default_subspecs'] = spec.attributes_hash['default_subspecs'] if spec.attributes_hash.key?('default_subspecs')
|
|
7383
|
+
result['dependencies'] = consumer.dependencies.to_h { |dependency| [dependency.name, dependency.requirement.requirements.map { |operator, version| "#{operator} #{version}" }] }
|
|
7384
|
+
result['swift_versions'] = spec.swift_versions.map(&:to_s) if spec.swift_versions
|
|
7385
|
+
result['subspecs'] = spec.subspecs.select(&:library_specification?).map { |child| peach_evaluated(child) }
|
|
7386
|
+
result
|
|
7387
|
+
end
|
|
7388
|
+
end
|
|
7389
|
+
`;
|
|
6646
7390
|
}
|
|
6647
7391
|
});
|
|
6648
7392
|
|
|
@@ -6654,40 +7398,40 @@ var init_workspace_root = __esm({
|
|
|
6654
7398
|
});
|
|
6655
7399
|
|
|
6656
7400
|
// src/podspec-sources.ts
|
|
6657
|
-
var
|
|
7401
|
+
var import_zod2, pathsSchema, attributesSchema, evaluatedSpecSchema, podspecReceiptSchema;
|
|
6658
7402
|
var init_podspec_sources = __esm({
|
|
6659
7403
|
"src/podspec-sources.ts"() {
|
|
6660
7404
|
"use strict";
|
|
6661
|
-
|
|
6662
|
-
init_linux_cocoapods();
|
|
7405
|
+
import_zod2 = require("zod");
|
|
6663
7406
|
init_home_paths();
|
|
7407
|
+
init_podspec_cocoapods();
|
|
6664
7408
|
init_workspace_root();
|
|
6665
|
-
pathsSchema =
|
|
6666
|
-
attributesSchema =
|
|
6667
|
-
name:
|
|
7409
|
+
pathsSchema = import_zod2.z.union([import_zod2.z.string(), import_zod2.z.array(import_zod2.z.string())]);
|
|
7410
|
+
attributesSchema = import_zod2.z.object({
|
|
7411
|
+
name: import_zod2.z.string().min(1),
|
|
6668
7412
|
source_files: pathsSchema,
|
|
6669
7413
|
exclude_files: pathsSchema,
|
|
6670
7414
|
public_header_files: pathsSchema,
|
|
6671
7415
|
private_header_files: pathsSchema,
|
|
6672
|
-
header_mappings_dir:
|
|
6673
|
-
header_dir:
|
|
6674
|
-
module_name:
|
|
7416
|
+
header_mappings_dir: import_zod2.z.string().optional(),
|
|
7417
|
+
header_dir: import_zod2.z.string().optional(),
|
|
7418
|
+
module_name: import_zod2.z.string().optional(),
|
|
6675
7419
|
vendored_frameworks: pathsSchema,
|
|
6676
7420
|
vendored_libraries: pathsSchema,
|
|
6677
7421
|
default_subspecs: pathsSchema.optional(),
|
|
6678
|
-
swift_versions:
|
|
6679
|
-
dependencies:
|
|
6680
|
-
pod_target_xcconfig:
|
|
7422
|
+
swift_versions: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
7423
|
+
dependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.array(import_zod2.z.string())),
|
|
7424
|
+
pod_target_xcconfig: import_zod2.z.record(import_zod2.z.string(), pathsSchema).optional()
|
|
6681
7425
|
});
|
|
6682
|
-
evaluatedSpecSchema =
|
|
7426
|
+
evaluatedSpecSchema = import_zod2.z.lazy(
|
|
6683
7427
|
() => attributesSchema.extend({
|
|
6684
|
-
subspecs:
|
|
7428
|
+
subspecs: import_zod2.z.array(evaluatedSpecSchema).optional()
|
|
6685
7429
|
})
|
|
6686
7430
|
);
|
|
6687
|
-
podspecReceiptSchema =
|
|
6688
|
-
key:
|
|
6689
|
-
environment:
|
|
6690
|
-
app:
|
|
7431
|
+
podspecReceiptSchema = import_zod2.z.object({
|
|
7432
|
+
key: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
|
|
7433
|
+
environment: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
|
|
7434
|
+
app: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
|
|
6691
7435
|
spec: evaluatedSpecSchema
|
|
6692
7436
|
});
|
|
6693
7437
|
}
|
|
@@ -7001,13 +7745,13 @@ function nitroRegisteredNames(root) {
|
|
|
7001
7745
|
const { classes, views } = registrations(root);
|
|
7002
7746
|
return { names: classes.map(({ name: name2 }) => name2), views: [...views].sort() };
|
|
7003
7747
|
}
|
|
7004
|
-
var import_node_fs16, import_node_path14,
|
|
7748
|
+
var import_node_fs16, import_node_path14, import_zod3;
|
|
7005
7749
|
var init_nitro_source = __esm({
|
|
7006
7750
|
"src/nitro-source.ts"() {
|
|
7007
7751
|
"use strict";
|
|
7008
7752
|
import_node_fs16 = __toESM(require("node:fs"), 1);
|
|
7009
7753
|
import_node_path14 = __toESM(require("node:path"), 1);
|
|
7010
|
-
|
|
7754
|
+
import_zod3 = require("zod");
|
|
7011
7755
|
init_nitro_dependencies();
|
|
7012
7756
|
init_podspec_sources();
|
|
7013
7757
|
init_react_native_autolinking();
|
|
@@ -7926,7 +8670,7 @@ var STANDIN_SOURCE_DIGEST;
|
|
|
7926
8670
|
var init_swift_standin_digest = __esm({
|
|
7927
8671
|
"src/swift-standin-digest.ts"() {
|
|
7928
8672
|
"use strict";
|
|
7929
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
8673
|
+
STANDIN_SOURCE_DIGEST = true ? "2d765e977c08a74dad452d5ca662fba6baa967ccf18a7456e60717372076300b" : standinSourceDigest();
|
|
7930
8674
|
}
|
|
7931
8675
|
});
|
|
7932
8676
|
|
|
@@ -9579,12 +10323,12 @@ function parseOpenStepPlist(text3) {
|
|
|
9579
10323
|
if (i !== text3.length) fail("trailing content");
|
|
9580
10324
|
return root;
|
|
9581
10325
|
}
|
|
9582
|
-
var isDict,
|
|
10326
|
+
var isDict, str2, list;
|
|
9583
10327
|
var init_openstep_plist = __esm({
|
|
9584
10328
|
"src/openstep-plist.ts"() {
|
|
9585
10329
|
"use strict";
|
|
9586
10330
|
isDict = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9587
|
-
|
|
10331
|
+
str2 = (value) => typeof value === "string" ? value : void 0;
|
|
9588
10332
|
list = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
9589
10333
|
}
|
|
9590
10334
|
});
|
|
@@ -9612,8 +10356,8 @@ function xcodePathResolver(objects, projectDir, join9, sourceTreeRoot) {
|
|
|
9612
10356
|
const entry = objects[id];
|
|
9613
10357
|
let result = null;
|
|
9614
10358
|
if (isDict(entry)) {
|
|
9615
|
-
const own =
|
|
9616
|
-
const tree =
|
|
10359
|
+
const own = str2(entry.path) ?? "";
|
|
10360
|
+
const tree = str2(entry.sourceTree) ?? "<group>";
|
|
9617
10361
|
if (tree === "<absolute>") result = own;
|
|
9618
10362
|
else if (tree === "SOURCE_ROOT") result = join9(projectDir, own);
|
|
9619
10363
|
else if (tree === "<group>") {
|
|
@@ -9633,7 +10377,7 @@ function xcodePathResolver(objects, projectDir, join9, sourceTreeRoot) {
|
|
|
9633
10377
|
function xcodeBuildFileBuildsForIos(buildFile) {
|
|
9634
10378
|
const filters = [
|
|
9635
10379
|
...list(buildFile.platformFilters),
|
|
9636
|
-
|
|
10380
|
+
str2(buildFile.platformFilter)
|
|
9637
10381
|
].filter((filter) => !!filter);
|
|
9638
10382
|
return !filters.length || filters.includes("ios");
|
|
9639
10383
|
}
|
|
@@ -9655,7 +10399,7 @@ function xcodeTargetMemberVisitor(objects) {
|
|
|
9655
10399
|
for (const buildFileId of list(phase.files)) {
|
|
9656
10400
|
const buildFile = objects[buildFileId];
|
|
9657
10401
|
if (!isDict(buildFile) || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
9658
|
-
const refId =
|
|
10402
|
+
const refId = str2(buildFile.fileRef);
|
|
9659
10403
|
if (!refId) continue;
|
|
9660
10404
|
const entry = objects[refId];
|
|
9661
10405
|
const refs = isDict(entry) && entry.isa === "PBXVariantGroup" ? list(entry.children) : [refId];
|
|
@@ -9667,7 +10411,7 @@ function xcodeTargetMemberVisitor(objects) {
|
|
|
9667
10411
|
continue;
|
|
9668
10412
|
}
|
|
9669
10413
|
const ref = objects[id];
|
|
9670
|
-
const type = isDict(ref) ?
|
|
10414
|
+
const type = isDict(ref) ? str2(ref.lastKnownFileType) ?? str2(ref.explicitFileType) ?? "" : "";
|
|
9671
10415
|
const root = file.replace(/[\\/]+$/, "");
|
|
9672
10416
|
const folder = FOLDER_REFERENCE.test(type) ? root.split(/[\\/]/).pop() : void 0;
|
|
9673
10417
|
for (const inner of filesUnder(file))
|
|
@@ -10446,7 +11190,7 @@ var swiftCoverageProvenance;
|
|
|
10446
11190
|
var init_provenance = __esm({
|
|
10447
11191
|
"src/swift-coverage/provenance.ts"() {
|
|
10448
11192
|
"use strict";
|
|
10449
|
-
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":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","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":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"
|
|
11193
|
+
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":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","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":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"b0da81ab133ad067978e174c2f62f5a9655dfe6b5639bc4b884f3137a8136144","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
|
|
10450
11194
|
}
|
|
10451
11195
|
});
|
|
10452
11196
|
|
|
@@ -10645,6 +11389,13 @@ var init_xcode_assets = __esm({
|
|
|
10645
11389
|
}
|
|
10646
11390
|
});
|
|
10647
11391
|
|
|
11392
|
+
// cli/cli-release-origin.ts
|
|
11393
|
+
var init_cli_release_origin = __esm({
|
|
11394
|
+
"cli/cli-release-origin.ts"() {
|
|
11395
|
+
"use strict";
|
|
11396
|
+
}
|
|
11397
|
+
});
|
|
11398
|
+
|
|
10648
11399
|
// cli/drivers/linux-browser-libs.ts
|
|
10649
11400
|
var init_linux_browser_libs = __esm({
|
|
10650
11401
|
"cli/drivers/linux-browser-libs.ts"() {
|
|
@@ -11693,7 +12444,7 @@ var init_swift_compile = __esm({
|
|
|
11693
12444
|
FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
11694
12445
|
(module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
|
|
11695
12446
|
).join("");
|
|
11696
|
-
compilerSourceDigest = true ? "
|
|
12447
|
+
compilerSourceDigest = true ? "5bdda04d424b3a504c042269bf0bebf701fc0435974970611138a79db9b959cd" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
11697
12448
|
C_WORDS = new Set(
|
|
11698
12449
|
"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(
|
|
11699
12450
|
" "
|
|
@@ -12368,6 +13119,11 @@ function applyOperator(value, operator) {
|
|
|
12368
13119
|
case "identifier":
|
|
12369
13120
|
case "c99extidentifier":
|
|
12370
13121
|
return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
13122
|
+
case "standardizepath":
|
|
13123
|
+
if (value === ".") return value;
|
|
13124
|
+
if (import_node_path25.default.posix.isAbsolute(value))
|
|
13125
|
+
return import_node_path25.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
|
|
13126
|
+
return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
|
|
12371
13127
|
}
|
|
12372
13128
|
throw new Error(`unsupported build setting operator :${operator}`);
|
|
12373
13129
|
}
|
|
@@ -12404,12 +13160,12 @@ function workspaceReferences(workspace) {
|
|
|
12404
13160
|
return references;
|
|
12405
13161
|
}
|
|
12406
13162
|
function versionRequirement(url, requirement) {
|
|
12407
|
-
const kind =
|
|
12408
|
-
const minimum =
|
|
12409
|
-
const maximum =
|
|
12410
|
-
const version =
|
|
12411
|
-
const branch =
|
|
12412
|
-
const revision =
|
|
13163
|
+
const kind = str2(requirement.kind);
|
|
13164
|
+
const minimum = str2(requirement.minimumVersion);
|
|
13165
|
+
const maximum = str2(requirement.maximumVersion);
|
|
13166
|
+
const version = str2(requirement.version);
|
|
13167
|
+
const branch = str2(requirement.branch);
|
|
13168
|
+
const revision = str2(requirement.revision);
|
|
12413
13169
|
if (kind === "upToNextMajorVersion" && minimum)
|
|
12414
13170
|
return { kind: "upToNextMajorVersion", minimumVersion: minimum };
|
|
12415
13171
|
if (kind === "upToNextMinorVersion" && minimum)
|
|
@@ -12429,7 +13185,7 @@ function remotePackageRequirements(projects) {
|
|
|
12429
13185
|
for (const id of list(project.project.packageReferences)) {
|
|
12430
13186
|
const reference = project.object(id);
|
|
12431
13187
|
if (reference?.isa !== "XCRemoteSwiftPackageReference") continue;
|
|
12432
|
-
const url =
|
|
13188
|
+
const url = str2(reference.repositoryURL);
|
|
12433
13189
|
if (!url) continue;
|
|
12434
13190
|
const requirement = reference.requirement;
|
|
12435
13191
|
if (!isDict(requirement)) throw new Error(`${url} has no version requirement`);
|
|
@@ -12462,12 +13218,12 @@ function loadProject(xcodeproj) {
|
|
|
12462
13218
|
const found = id === void 0 ? void 0 : objects[id];
|
|
12463
13219
|
return isDict(found) ? found : void 0;
|
|
12464
13220
|
};
|
|
12465
|
-
const project = object5(
|
|
13221
|
+
const project = object5(str2(root.rootObject));
|
|
12466
13222
|
if (!project || project.isa !== "PBXProject") {
|
|
12467
13223
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
12468
13224
|
}
|
|
12469
13225
|
const projectDir = import_node_fs23.default.realpathSync.native(
|
|
12470
|
-
import_node_path25.default.resolve(import_node_path25.default.dirname(xcodeproj),
|
|
13226
|
+
import_node_path25.default.resolve(import_node_path25.default.dirname(xcodeproj), str2(project.projectDirPath) ?? "")
|
|
12471
13227
|
);
|
|
12472
13228
|
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path25.default.join);
|
|
12473
13229
|
const result = {
|
|
@@ -12494,11 +13250,11 @@ function selectedDeveloperDir() {
|
|
|
12494
13250
|
return developerDir;
|
|
12495
13251
|
}
|
|
12496
13252
|
function defaultConfiguration(project) {
|
|
12497
|
-
const configList = project.object(
|
|
13253
|
+
const configList = project.object(str2(project.project.buildConfigurationList));
|
|
12498
13254
|
const names = list(configList?.buildConfigurations).flatMap(
|
|
12499
|
-
(id) =>
|
|
13255
|
+
(id) => str2(project.object(id)?.name) ?? []
|
|
12500
13256
|
);
|
|
12501
|
-
return names.includes("Debug") ? "Debug" :
|
|
13257
|
+
return names.includes("Debug") ? "Debug" : str2(configList?.defaultConfigurationName) ?? names[0] ?? "Debug";
|
|
12502
13258
|
}
|
|
12503
13259
|
function targetSettings(ref, configuration, builtins, options = {}, overrides = {}) {
|
|
12504
13260
|
const { project, target } = ref;
|
|
@@ -12506,14 +13262,14 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12506
13262
|
const selected = (listId) => {
|
|
12507
13263
|
const configList = project.object(listId);
|
|
12508
13264
|
const configs2 = list(configList?.buildConfigurations).map(project.object);
|
|
12509
|
-
return configs2.find((entry) => entry?.name === configuration) ?? configs2.find((entry) => entry?.name ===
|
|
13265
|
+
return configs2.find((entry) => entry?.name === configuration) ?? configs2.find((entry) => entry?.name === str2(configList?.defaultConfigurationName));
|
|
12510
13266
|
};
|
|
12511
13267
|
const level = (config) => {
|
|
12512
13268
|
if (!config) return [];
|
|
12513
|
-
const name2 =
|
|
12514
|
-
const base =
|
|
12515
|
-
const anchor =
|
|
12516
|
-
const relative3 =
|
|
13269
|
+
const name2 = str2(config.name) ?? configuration;
|
|
13270
|
+
const base = str2(config.baseConfigurationReference);
|
|
13271
|
+
const anchor = str2(config.baseConfigurationReferenceAnchor);
|
|
13272
|
+
const relative3 = str2(config.baseConfigurationReferenceRelativePath);
|
|
12517
13273
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
12518
13274
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
12519
13275
|
const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path25.default.resolve(directory, relative3) : null;
|
|
@@ -12536,10 +13292,10 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12536
13292
|
)
|
|
12537
13293
|
];
|
|
12538
13294
|
};
|
|
12539
|
-
const targetConfig = selected(
|
|
13295
|
+
const targetConfig = selected(str2(target.buildConfigurationList));
|
|
12540
13296
|
const levels = [
|
|
12541
|
-
{ ...builtins, CONFIGURATION:
|
|
12542
|
-
...level(selected(
|
|
13297
|
+
{ ...builtins, CONFIGURATION: str2(targetConfig?.name) ?? configuration },
|
|
13298
|
+
...level(selected(str2(project.project.buildConfigurationList))),
|
|
12543
13299
|
...level(targetConfig),
|
|
12544
13300
|
overrides
|
|
12545
13301
|
];
|
|
@@ -12550,7 +13306,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12550
13306
|
if (at < 0) return derived(key);
|
|
12551
13307
|
const marker = `${key}@${at}`;
|
|
12552
13308
|
if (resolving2.has(marker))
|
|
12553
|
-
throw new Error(`${
|
|
13309
|
+
throw new Error(`${str2(target.name)} has a cyclic build setting ${key}`);
|
|
12554
13310
|
resolving2.add(marker);
|
|
12555
13311
|
const value = expand(
|
|
12556
13312
|
levels[at][key],
|
|
@@ -12564,9 +13320,9 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12564
13320
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
12565
13321
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
12566
13322
|
EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
|
|
12567
|
-
MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[
|
|
13323
|
+
MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[str2(target.productType) ?? ""] ?? "",
|
|
12568
13324
|
// the native defaults of CoreBuildSystem.xcspec for a dynamic framework
|
|
12569
|
-
EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(
|
|
13325
|
+
EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(str2(target.productType) ?? "") ? `${get("PRODUCT_NAME")}.framework/${get("EXECUTABLE_NAME")}` : get("EXECUTABLE_NAME"),
|
|
12570
13326
|
DYLIB_INSTALL_NAME_BASE: () => "/Library/Frameworks",
|
|
12571
13327
|
LD_DYLIB_INSTALL_NAME: () => get("MACH_O_TYPE") === "mh_dylib" ? `${get("DYLIB_INSTALL_NAME_BASE")}/${get("EXECUTABLE_PATH")}` : "",
|
|
12572
13328
|
// the native default of CoreBuildSystem.xcspec
|
|
@@ -12659,14 +13415,34 @@ function compilationConditions(settings) {
|
|
|
12659
13415
|
];
|
|
12660
13416
|
}
|
|
12661
13417
|
function expand(value, lookup2) {
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
13418
|
+
const references = /\$([({]|[A-Za-z_][A-Za-z0-9_]*)/g;
|
|
13419
|
+
let output2 = "";
|
|
13420
|
+
let cursor = 0;
|
|
13421
|
+
for (let match = references.exec(value); match; match = references.exec(value)) {
|
|
13422
|
+
let expression = match[1];
|
|
13423
|
+
let end = references.lastIndex;
|
|
13424
|
+
if (expression === "(" || expression === "{") {
|
|
13425
|
+
const start = end;
|
|
13426
|
+
const delimiters = [expression === "(" ? ")" : "}"];
|
|
13427
|
+
while (end < value.length && delimiters.length > 0) {
|
|
13428
|
+
const character = value[end++];
|
|
13429
|
+
if (character === delimiters.at(-1)) delimiters.pop();
|
|
13430
|
+
else if (character === "$" && (value[end] === "(" || value[end] === "{"))
|
|
13431
|
+
delimiters.push(value[end++] === "(" ? ")" : "}");
|
|
13432
|
+
}
|
|
13433
|
+
if (delimiters.length > 0) continue;
|
|
13434
|
+
expression = expand(value.slice(start, end - 1), lookup2);
|
|
13435
|
+
}
|
|
13436
|
+
const [name2, ...operators] = expression.split(":");
|
|
13437
|
+
if (!name2 || !/^[A-Za-z_][A-Za-z0-9_-]*$/.test(name2)) continue;
|
|
13438
|
+
output2 += value.slice(cursor, match.index);
|
|
13439
|
+
output2 += operators.reduce(
|
|
13440
|
+
(current, operator) => applyOperator(current, operator),
|
|
13441
|
+
lookup2(name2)
|
|
13442
|
+
);
|
|
13443
|
+
cursor = references.lastIndex = end;
|
|
13444
|
+
}
|
|
13445
|
+
return output2 + value.slice(cursor);
|
|
12670
13446
|
}
|
|
12671
13447
|
function shellAssetCatalogs(script, settings, projectDir) {
|
|
12672
13448
|
const assigned = /* @__PURE__ */ new Map();
|
|
@@ -12753,7 +13529,7 @@ function fileListEntries(file, absolute) {
|
|
|
12753
13529
|
}
|
|
12754
13530
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
12755
13531
|
const { project, target, id: targetId } = ref;
|
|
12756
|
-
const targetName2 =
|
|
13532
|
+
const targetName2 = str2(target.name) ?? targetId;
|
|
12757
13533
|
const sources = /* @__PURE__ */ new Set();
|
|
12758
13534
|
const allSources = /* @__PURE__ */ new Set();
|
|
12759
13535
|
const headers = /* @__PURE__ */ new Set();
|
|
@@ -12768,15 +13544,15 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
12768
13544
|
for (const phaseId of list(target.buildPhases)) {
|
|
12769
13545
|
const phase = project.object(phaseId);
|
|
12770
13546
|
if (phase?.isa !== "PBXShellScriptBuildPhase") continue;
|
|
12771
|
-
const script =
|
|
13547
|
+
const script = str2(phase.name) ?? phaseId;
|
|
12772
13548
|
for (const catalog of shellAssetCatalogs(
|
|
12773
|
-
|
|
13549
|
+
str2(phase.shellScript) ?? "",
|
|
12774
13550
|
settings,
|
|
12775
13551
|
project.projectDir
|
|
12776
13552
|
))
|
|
12777
13553
|
for (const file of walkFiles(catalog)) resources.add(file);
|
|
12778
13554
|
copiedFiles.push(
|
|
12779
|
-
...shellCopies(
|
|
13555
|
+
...shellCopies(str2(phase.shellScript) ?? "", settings, project.projectDir)
|
|
12780
13556
|
);
|
|
12781
13557
|
const absolute = (raw) => import_node_path25.default.resolve(project.projectDir, expand(raw, settings));
|
|
12782
13558
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
@@ -12885,7 +13661,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
12885
13661
|
`
|
|
12886
13662
|
);
|
|
12887
13663
|
});
|
|
12888
|
-
const rawScript =
|
|
13664
|
+
const rawScript = str2(phase.shellScript) ?? "";
|
|
12889
13665
|
if (rawScript.includes("generate-modules-provider")) {
|
|
12890
13666
|
const preloadPath = import_node_path25.default.join(phaseDir, "expo-scan-timeout.cjs");
|
|
12891
13667
|
import_node_fs23.default.mkdirSync(phaseDir, { recursive: true });
|
|
@@ -12908,7 +13684,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
12908
13684
|
}
|
|
12909
13685
|
try {
|
|
12910
13686
|
const [shell, ...args] = scriptCommand(
|
|
12911
|
-
|
|
13687
|
+
str2(phase.shellPath) ?? "/bin/sh",
|
|
12912
13688
|
rawScript
|
|
12913
13689
|
);
|
|
12914
13690
|
(0, import_node_child_process13.execFileSync)(shell, args, {
|
|
@@ -13182,7 +13958,7 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
13182
13958
|
const nested = project.project.projectReferences;
|
|
13183
13959
|
if (Array.isArray(nested)) {
|
|
13184
13960
|
for (const entry of nested) {
|
|
13185
|
-
const ref = isDict(entry) ?
|
|
13961
|
+
const ref = isDict(entry) ? str2(entry.ProjectRef) : void 0;
|
|
13186
13962
|
const resolved = ref ? project.resolvePath(ref) : null;
|
|
13187
13963
|
if (resolved) addProject(resolved);
|
|
13188
13964
|
}
|
|
@@ -13217,7 +13993,7 @@ function isIosAppTarget(ref, options = {}) {
|
|
|
13217
13993
|
ref,
|
|
13218
13994
|
defaultConfiguration(ref.project),
|
|
13219
13995
|
{
|
|
13220
|
-
TARGET_NAME:
|
|
13996
|
+
TARGET_NAME: str2(ref.target.name) ?? ref.id
|
|
13221
13997
|
},
|
|
13222
13998
|
options
|
|
13223
13999
|
);
|
|
@@ -13230,14 +14006,14 @@ function isIosPlatform(name2) {
|
|
|
13230
14006
|
return name2.startsWith("iphoneos") || name2.startsWith("iphonesimulator");
|
|
13231
14007
|
}
|
|
13232
14008
|
function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
13233
|
-
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) =>
|
|
14009
|
+
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str2(ref.target.name) ?? ref.id);
|
|
13234
14010
|
}
|
|
13235
14011
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
13236
14012
|
const project = loadProject(import_node_fs23.default.realpathSync.native(xcodeproj));
|
|
13237
14013
|
for (const [id, target] of Object.entries(project.objects)) {
|
|
13238
14014
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
13239
14015
|
if (isIosAppTarget({ project, id, target }, { requireSources: false }))
|
|
13240
|
-
return
|
|
14016
|
+
return str2(target.name);
|
|
13241
14017
|
}
|
|
13242
14018
|
}
|
|
13243
14019
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
@@ -13285,11 +14061,11 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
13285
14061
|
(candidate) => import_node_fs23.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs23.default.realpathSync.native(projectPath)
|
|
13286
14062
|
);
|
|
13287
14063
|
const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
|
|
13288
|
-
const name2 = target &&
|
|
14064
|
+
const name2 = target && str2(target.target.name);
|
|
13289
14065
|
if (!name2) {
|
|
13290
14066
|
const declared = (project ? [project] : projects).flatMap(
|
|
13291
14067
|
(candidate) => projectTargets(candidate).flatMap((ref) => {
|
|
13292
|
-
const targetName2 =
|
|
14068
|
+
const targetName2 = str2(ref.target.name);
|
|
13293
14069
|
return targetName2 ? [targetName2] : [];
|
|
13294
14070
|
})
|
|
13295
14071
|
);
|
|
@@ -13388,7 +14164,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13388
14164
|
const appTargets = allTargets.filter(
|
|
13389
14165
|
(ref) => isIosAppTarget(ref, options) || targetName2 !== void 0 && ref.target.name === targetName2 && ref.target.productType === APP_EXTENSION
|
|
13390
14166
|
);
|
|
13391
|
-
const appTargetNames = appTargets.map((ref) =>
|
|
14167
|
+
const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
|
|
13392
14168
|
const container = import_node_path25.default.basename(xcodeprojOrWorkspace);
|
|
13393
14169
|
const named = targetName2 ? appTargets.filter((ref) => ref.target.name === targetName2) : appTargets;
|
|
13394
14170
|
if (named.length !== 1) {
|
|
@@ -13401,28 +14177,28 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13401
14177
|
);
|
|
13402
14178
|
}
|
|
13403
14179
|
const app = named[0];
|
|
13404
|
-
const appConfigs = app.project.object(
|
|
14180
|
+
const appConfigs = app.project.object(str2(app.target.buildConfigurationList));
|
|
13405
14181
|
const appConfigNames = list(appConfigs?.buildConfigurations).flatMap(
|
|
13406
|
-
(id) =>
|
|
14182
|
+
(id) => str2(app.project.object(id)?.name) ?? []
|
|
13407
14183
|
);
|
|
13408
|
-
const configuration = configurationName === void 0 ? defaultConfiguration(app.project) : appConfigNames.includes(configurationName) ? configurationName :
|
|
14184
|
+
const configuration = configurationName === void 0 ? defaultConfiguration(app.project) : appConfigNames.includes(configurationName) ? configurationName : str2(appConfigs?.defaultConfigurationName) ?? configurationName;
|
|
13409
14185
|
const byProduct = /* @__PURE__ */ new Map();
|
|
13410
14186
|
for (const ref of allTargets) {
|
|
13411
|
-
const product = ref.project.object(
|
|
13412
|
-
const file =
|
|
14187
|
+
const product = ref.project.object(str2(ref.target.productReference));
|
|
14188
|
+
const file = str2(product?.path);
|
|
13413
14189
|
if (file && !byProduct.has(import_node_path25.default.basename(file)))
|
|
13414
14190
|
byProduct.set(import_node_path25.default.basename(file), ref);
|
|
13415
14191
|
}
|
|
13416
14192
|
const proxied = (project, proxyId) => {
|
|
13417
14193
|
const proxy = project.object(proxyId);
|
|
13418
14194
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
13419
|
-
const portal =
|
|
14195
|
+
const portal = str2(proxy.containerPortal);
|
|
13420
14196
|
const portalPath = project.resolvePath(portal ?? "");
|
|
13421
14197
|
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs23.default.existsSync(portalPath) ? projectAt.get(import_node_fs23.default.realpathSync.native(portalPath)) : void 0;
|
|
13422
|
-
const remote =
|
|
14198
|
+
const remote = str2(proxy.remoteGlobalIDString);
|
|
13423
14199
|
if (!owner || !remote) return void 0;
|
|
13424
14200
|
return projectTargets(owner).find(
|
|
13425
|
-
(ref) => ref.id === remote ||
|
|
14201
|
+
(ref) => ref.id === remote || str2(ref.target.productReference) === remote
|
|
13426
14202
|
);
|
|
13427
14203
|
};
|
|
13428
14204
|
const linkedTargets = (ref) => {
|
|
@@ -13434,8 +14210,8 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13434
14210
|
for (const buildFileId of list(phase.files)) {
|
|
13435
14211
|
const buildFile = project.object(buildFileId);
|
|
13436
14212
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
13437
|
-
const file = project.object(
|
|
13438
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project,
|
|
14213
|
+
const file = project.object(str2(buildFile.fileRef));
|
|
14214
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path25.default.basename(str2(file.path) ?? "")) : void 0;
|
|
13439
14215
|
if (resolved)
|
|
13440
14216
|
found.push({
|
|
13441
14217
|
target: resolved,
|
|
@@ -13463,12 +14239,12 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13463
14239
|
const found = list(target.dependencies).flatMap((dependencyId) => {
|
|
13464
14240
|
const dependency = project.object(dependencyId);
|
|
13465
14241
|
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) return [];
|
|
13466
|
-
const direct =
|
|
13467
|
-
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project,
|
|
14242
|
+
const direct = str2(dependency.target);
|
|
14243
|
+
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str2(dependency.targetProxy));
|
|
13468
14244
|
return resolved ? [resolved] : [];
|
|
13469
14245
|
});
|
|
13470
14246
|
return [...found, ...linkedTargets(ref).map((link) => link.target)].filter(
|
|
13471
|
-
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(
|
|
14247
|
+
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str2(candidate.target.productType) ?? "")
|
|
13472
14248
|
);
|
|
13473
14249
|
};
|
|
13474
14250
|
const order = [];
|
|
@@ -13495,7 +14271,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13495
14271
|
return list(phase.files).flatMap((id) => {
|
|
13496
14272
|
const file = ref.project.object(id);
|
|
13497
14273
|
if (!file || !xcodeBuildFileBuildsForIos(file)) return [];
|
|
13498
|
-
const resolved = ref.project.resolvePath(
|
|
14274
|
+
const resolved = ref.project.resolvePath(str2(file.fileRef) ?? "");
|
|
13499
14275
|
const attributes = isDict(file.settings) ? list(file.settings.ATTRIBUTES) : [];
|
|
13500
14276
|
if (!resolved) return [];
|
|
13501
14277
|
return [
|
|
@@ -13512,7 +14288,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13512
14288
|
if (cached2) return cached2;
|
|
13513
14289
|
const headers = /* @__PURE__ */ new Map();
|
|
13514
14290
|
for (const other of projectTargets(project)) {
|
|
13515
|
-
if (FRAMEWORK_PRODUCTS.has(
|
|
14291
|
+
if (FRAMEWORK_PRODUCTS.has(str2(other.target.productType) ?? "")) continue;
|
|
13516
14292
|
const otherProduct = productName(other);
|
|
13517
14293
|
for (const { file, visibility } of headerPhase(other)) {
|
|
13518
14294
|
if (visibility === "Project") continue;
|
|
@@ -13531,7 +14307,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13531
14307
|
const product = targetSettings(
|
|
13532
14308
|
ref,
|
|
13533
14309
|
configuration,
|
|
13534
|
-
{ TARGET_NAME:
|
|
14310
|
+
{ TARGET_NAME: str2(ref.target.name) ?? ref.id },
|
|
13535
14311
|
options
|
|
13536
14312
|
).get("PRODUCT_NAME");
|
|
13537
14313
|
productNames.set(key, product);
|
|
@@ -13600,7 +14376,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13600
14376
|
OBJROOT: import_node_path25.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
13601
14377
|
};
|
|
13602
14378
|
const moduleTarget = (ref) => {
|
|
13603
|
-
const name2 =
|
|
14379
|
+
const name2 = str2(ref.target.name) ?? ref.id;
|
|
13604
14380
|
const {
|
|
13605
14381
|
get: settings2,
|
|
13606
14382
|
keys,
|
|
@@ -13613,7 +14389,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13613
14389
|
TARGETNAME: "$(TARGET_NAME)",
|
|
13614
14390
|
PROJECT: "$(PROJECT_NAME)",
|
|
13615
14391
|
PROJECT_NAME: import_node_path25.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
13616
|
-
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ?
|
|
14392
|
+
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
13617
14393
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
13618
14394
|
SRCROOT: ref.project.projectDir,
|
|
13619
14395
|
SOURCE_ROOT: ref.project.projectDir,
|
|
@@ -13627,7 +14403,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13627
14403
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
13628
14404
|
DWARF_DSYM_FOLDER_PATH: "$(CONFIGURATION_BUILD_DIR)",
|
|
13629
14405
|
DWARF_DSYM_FILE_NAME: "$(FULL_PRODUCT_NAME).dSYM",
|
|
13630
|
-
FULL_PRODUCT_NAME:
|
|
14406
|
+
FULL_PRODUCT_NAME: str2(ref.project.object(str2(ref.target.productReference))?.path) ?? "",
|
|
13631
14407
|
UNLOCALIZED_RESOURCES_FOLDER_PATH: "$(FULL_PRODUCT_NAME)",
|
|
13632
14408
|
CONTENTS_FOLDER_PATH: "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)",
|
|
13633
14409
|
FRAMEWORKS_FOLDER_PATH: "$(CONTENTS_FOLDER_PATH)/Frameworks",
|
|
@@ -13651,7 +14427,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13651
14427
|
CURRENT_ARCH: "arm64",
|
|
13652
14428
|
ARCHS: "arm64",
|
|
13653
14429
|
ACTION: "build",
|
|
13654
|
-
DEVELOPMENT_LANGUAGE:
|
|
14430
|
+
DEVELOPMENT_LANGUAGE: str2(ref.project.project.developmentRegion) ?? "en"
|
|
13655
14431
|
},
|
|
13656
14432
|
options,
|
|
13657
14433
|
workspaceBuild
|
|
@@ -13667,12 +14443,12 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13667
14443
|
);
|
|
13668
14444
|
const searchRules = recursiveSearchRules(settings2);
|
|
13669
14445
|
const absolute = (file) => import_node_path25.default.resolve(ref.project.projectDir, file);
|
|
13670
|
-
const framework = FRAMEWORK_PRODUCTS.has(
|
|
14446
|
+
const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
|
|
13671
14447
|
const product = settings2("PRODUCT_NAME");
|
|
13672
14448
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
13673
14449
|
const compatibilityPhases = list(ref.target.buildPhases).flatMap((id) => {
|
|
13674
14450
|
const phase = ref.project.object(id);
|
|
13675
|
-
if (phase?.isa !== "PBXShellScriptBuildPhase" ||
|
|
14451
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "Copy generated compatibility header")
|
|
13676
14452
|
return [];
|
|
13677
14453
|
const inputs = list(phase.inputPaths).map(
|
|
13678
14454
|
(file) => absolute(expand(file, settings2))
|
|
@@ -13797,11 +14573,11 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13797
14573
|
if (phase?.isa !== "PBXSourcesBuildPhase") continue;
|
|
13798
14574
|
for (const id of list(phase.files)) {
|
|
13799
14575
|
const file = ref.project.object(id);
|
|
13800
|
-
const resolved = ref.project.resolvePath(
|
|
14576
|
+
const resolved = ref.project.resolvePath(str2(file?.fileRef) ?? "");
|
|
13801
14577
|
if (resolved && implementations.includes(resolved))
|
|
13802
14578
|
fileFlags[resolved] = settingList(
|
|
13803
14579
|
expand(
|
|
13804
|
-
|
|
14580
|
+
str2(isDict(file?.settings) ? file.settings.COMPILER_FLAGS : void 0) ?? "",
|
|
13805
14581
|
settings2
|
|
13806
14582
|
)
|
|
13807
14583
|
);
|
|
@@ -13938,15 +14714,15 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13938
14714
|
// cocoapods writes for each header_mappings_dir folder.
|
|
13939
14715
|
...list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
13940
14716
|
const phase = ref.project.object(phaseId);
|
|
13941
|
-
if (phase?.isa !== "PBXCopyFilesBuildPhase" ||
|
|
14717
|
+
if (phase?.isa !== "PBXCopyFilesBuildPhase" || str2(phase.dstSubfolderSpec) !== "16")
|
|
13942
14718
|
return [];
|
|
13943
14719
|
const destination = expand(
|
|
13944
|
-
|
|
14720
|
+
str2(phase.dstPath) ?? "",
|
|
13945
14721
|
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path25.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path25.default.join(wrapper, "PrivateHeaders") : settings2(name3)
|
|
13946
14722
|
);
|
|
13947
14723
|
return list(phase.files).flatMap((id) => {
|
|
13948
14724
|
const file = ref.project.resolvePath(
|
|
13949
|
-
|
|
14725
|
+
str2(ref.project.object(id)?.fileRef) ?? ""
|
|
13950
14726
|
);
|
|
13951
14727
|
return file && HEADER_FILE.test(file) ? [
|
|
13952
14728
|
[
|
|
@@ -13994,7 +14770,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13994
14770
|
))
|
|
13995
14771
|
includeNativeTarget(ref);
|
|
13996
14772
|
const selectedTargets = options.nativeModules ? builtTargets.filter((target) => nativeTargets.has(target.ref)) : builtTargets;
|
|
13997
|
-
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(
|
|
14773
|
+
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str2(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
|
|
13998
14774
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
13999
14775
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
14000
14776
|
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path25.default.dirname(file)).filter((dir) => import_node_fs23.default.existsSync(dir)) : []
|
|
@@ -14016,7 +14792,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14016
14792
|
for (const owner of options.installedPods ? builtTargets : []) {
|
|
14017
14793
|
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
14018
14794
|
const phase = owner.ref.project.object(phaseId);
|
|
14019
|
-
if (phase?.isa !== "PBXShellScriptBuildPhase" ||
|
|
14795
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
|
|
14020
14796
|
continue;
|
|
14021
14797
|
const absolute = (raw) => import_node_path25.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
14022
14798
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
@@ -14040,8 +14816,8 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14040
14816
|
);
|
|
14041
14817
|
for (const [index, input2] of inputs.entries()) {
|
|
14042
14818
|
const product = bundleTargets.find((target) => {
|
|
14043
|
-
const file =
|
|
14044
|
-
target.ref.project.object(
|
|
14819
|
+
const file = str2(
|
|
14820
|
+
target.ref.project.object(str2(target.ref.target.productReference))?.path
|
|
14045
14821
|
);
|
|
14046
14822
|
return file && import_node_path25.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
14047
14823
|
});
|
|
@@ -14129,10 +14905,10 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14129
14905
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || list(phase.outputPaths).length || list(phase.outputFileListPaths).length)
|
|
14130
14906
|
break;
|
|
14131
14907
|
postBundleScripts.unshift({
|
|
14132
|
-
name:
|
|
14908
|
+
name: str2(phase.name) ?? id,
|
|
14133
14909
|
command: scriptCommand(
|
|
14134
|
-
|
|
14135
|
-
|
|
14910
|
+
str2(phase.shellPath) ?? "/bin/sh",
|
|
14911
|
+
str2(phase.shellScript) ?? ""
|
|
14136
14912
|
),
|
|
14137
14913
|
directory: app.project.projectDir,
|
|
14138
14914
|
inputPaths: list(phase.inputPaths),
|
|
@@ -14170,7 +14946,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14170
14946
|
}
|
|
14171
14947
|
return packages;
|
|
14172
14948
|
}
|
|
14173
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path25.default.resolve(project.projectDir,
|
|
14949
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path25.default.resolve(project.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
14174
14950
|
return candidate && import_node_fs23.default.existsSync(import_node_path25.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
14175
14951
|
})
|
|
14176
14952
|
)
|
|
@@ -14180,7 +14956,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14180
14956
|
projects.flatMap(
|
|
14181
14957
|
(project) => list(project.project.packageReferences).flatMap((id) => {
|
|
14182
14958
|
const reference = project.object(id);
|
|
14183
|
-
const url =
|
|
14959
|
+
const url = str2(reference?.repositoryURL);
|
|
14184
14960
|
return reference?.isa === "XCRemoteSwiftPackageReference" && url ? [url] : [];
|
|
14185
14961
|
})
|
|
14186
14962
|
)
|
|
@@ -14255,7 +15031,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14255
15031
|
const productPlatforms = /* @__PURE__ */ new Map();
|
|
14256
15032
|
const productRef = (id) => {
|
|
14257
15033
|
const entry = project.object(id);
|
|
14258
|
-
const ref2 =
|
|
15034
|
+
const ref2 = str2(entry?.productRef);
|
|
14259
15035
|
if (!entry || !ref2) return [];
|
|
14260
15036
|
const builds = xcodeBuildFileBuildsForIos(entry);
|
|
14261
15037
|
productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
|
|
@@ -14267,7 +15043,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14267
15043
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
14268
15044
|
for (const id of list(phase.files)) {
|
|
14269
15045
|
const file = project.object(id);
|
|
14270
|
-
const product =
|
|
15046
|
+
const product = str2(file?.productRef);
|
|
14271
15047
|
if (file && product && xcodeBuildFileBuildsForIos(file))
|
|
14272
15048
|
productAttributes.set(
|
|
14273
15049
|
product,
|
|
@@ -14293,20 +15069,20 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14293
15069
|
const ownKeys = /* @__PURE__ */ new Set();
|
|
14294
15070
|
for (const dependencyId of new Set(productDependencies)) {
|
|
14295
15071
|
const dependency = project.object(dependencyId);
|
|
14296
|
-
const product =
|
|
15072
|
+
const product = str2(dependency?.productName)?.replace(/^plugin:/, "");
|
|
14297
15073
|
if (!dependency || !product)
|
|
14298
15074
|
throw new Error(
|
|
14299
|
-
`${
|
|
15075
|
+
`${str2(target.name) ?? "target"}: package product dependency ${dependencyId} has no productName in ${project.projectFile}`
|
|
14300
15076
|
);
|
|
14301
|
-
const reference = project.object(
|
|
15077
|
+
const reference = project.object(str2(dependency.package));
|
|
14302
15078
|
const linked = {
|
|
14303
15079
|
product,
|
|
14304
15080
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
14305
|
-
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url:
|
|
15081
|
+
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
14306
15082
|
kind: "local",
|
|
14307
15083
|
dir: import_node_path25.default.resolve(
|
|
14308
15084
|
project.projectDir,
|
|
14309
|
-
|
|
15085
|
+
str2(reference.relativePath) ?? ""
|
|
14310
15086
|
)
|
|
14311
15087
|
} : { kind: "unnamed", remoteUrls: remotePackageUrls }
|
|
14312
15088
|
};
|
|
@@ -14327,10 +15103,10 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14327
15103
|
for (const buildFileId of list(phase.files)) {
|
|
14328
15104
|
const buildFile = project.object(buildFileId);
|
|
14329
15105
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
14330
|
-
const fileId =
|
|
15106
|
+
const fileId = str2(buildFile.fileRef);
|
|
14331
15107
|
const file = project.object(fileId);
|
|
14332
|
-
const tree =
|
|
14333
|
-
const rawPath =
|
|
15108
|
+
const tree = str2(file?.sourceTree);
|
|
15109
|
+
const rawPath = str2(file?.path) ?? "";
|
|
14334
15110
|
const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
14335
15111
|
if (file?.isa !== "PBXFileReference" || !name2) continue;
|
|
14336
15112
|
if (tree === "SDKROOT" || /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`)) {
|
|
@@ -14344,7 +15120,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14344
15120
|
if (fileId && resolved !== null && !import_node_fs23.default.existsSync(resolved)) {
|
|
14345
15121
|
if (!ios_sdk_frameworks_default.frameworks.includes(name2))
|
|
14346
15122
|
throw new Error(
|
|
14347
|
-
`${
|
|
15123
|
+
`${str2(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
14348
15124
|
);
|
|
14349
15125
|
sdkFrameworks.add(name2);
|
|
14350
15126
|
continue;
|
|
@@ -14382,12 +15158,12 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14382
15158
|
sourceLinkGraph: {
|
|
14383
15159
|
entry: module2.id,
|
|
14384
15160
|
targets: builtTargets.filter(
|
|
14385
|
-
({ ref }) => ref === app || MODULE_PRODUCTS.has(
|
|
15161
|
+
({ ref }) => ref === app || MODULE_PRODUCTS.has(str2(ref.target.productType) ?? "")
|
|
14386
15162
|
).map(({ ref, module: module3, settings: settings2 }) => ({
|
|
14387
15163
|
id: module3.id,
|
|
14388
15164
|
sourceTarget: module3.allSources.length > 0 ? module3.moduleName : null,
|
|
14389
|
-
productName: settings2("FULL_PRODUCT_NAME") ||
|
|
14390
|
-
productType:
|
|
15165
|
+
productName: settings2("FULL_PRODUCT_NAME") || str2(ref.project.object(str2(ref.target.productReference))?.path) || settings2("PRODUCT_NAME"),
|
|
15166
|
+
productType: str2(ref.target.productType),
|
|
14391
15167
|
installName: settings2("LD_DYLIB_INSTALL_NAME") || null,
|
|
14392
15168
|
buildVersion: {
|
|
14393
15169
|
platform: settings2("PLATFORM_NAME") || null,
|
|
@@ -14397,7 +15173,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14397
15173
|
machOType: settings2("MACH_O_TYPE") || null,
|
|
14398
15174
|
linkerFlags: settingList(settings2("OTHER_LDFLAGS")),
|
|
14399
15175
|
dependencies: linkedTargets(ref).concat(frameworkFlagLinks(ref, settings2("OTHER_LDFLAGS"))).filter(
|
|
14400
|
-
(dependency) => MODULE_PRODUCTS.has(
|
|
15176
|
+
(dependency) => MODULE_PRODUCTS.has(str2(dependency.target.target.productType) ?? "")
|
|
14401
15177
|
).map(({ target, attributes }) => ({
|
|
14402
15178
|
target: `${target.project.projectFile}#${target.id}`,
|
|
14403
15179
|
attributes
|
|
@@ -14447,7 +15223,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14447
15223
|
infoPlistFile,
|
|
14448
15224
|
...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
|
|
14449
15225
|
postBundleScripts,
|
|
14450
|
-
developmentRegion:
|
|
15226
|
+
developmentRegion: str2(app.project.project.developmentRegion) ?? "en",
|
|
14451
15227
|
frameworks,
|
|
14452
15228
|
resourceProducts,
|
|
14453
15229
|
linkedProducts,
|
|
@@ -15176,7 +15952,7 @@ var init_react_native_core = __esm({
|
|
|
15176
15952
|
init_swift_distribution();
|
|
15177
15953
|
init_swift_package();
|
|
15178
15954
|
init_swiftContract();
|
|
15179
|
-
recipe = true ? "
|
|
15955
|
+
recipe = true ? "69b07e9fa50c2e82ce458ed542c4e01980e8abeab0261d9176395a3348963751" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
15180
15956
|
}
|
|
15181
15957
|
});
|
|
15182
15958
|
|
|
@@ -15234,6 +16010,29 @@ var init_swift_cxx_reachable = __esm({
|
|
|
15234
16010
|
}
|
|
15235
16011
|
});
|
|
15236
16012
|
|
|
16013
|
+
// cli/internal-child-contract.ts
|
|
16014
|
+
var init_internal_child_contract = __esm({
|
|
16015
|
+
"cli/internal-child-contract.ts"() {
|
|
16016
|
+
"use strict";
|
|
16017
|
+
}
|
|
16018
|
+
});
|
|
16019
|
+
|
|
16020
|
+
// cli/standalone.ts
|
|
16021
|
+
var init_standalone = __esm({
|
|
16022
|
+
"cli/standalone.ts"() {
|
|
16023
|
+
"use strict";
|
|
16024
|
+
}
|
|
16025
|
+
});
|
|
16026
|
+
|
|
16027
|
+
// cli/self-invocation.ts
|
|
16028
|
+
var init_self_invocation = __esm({
|
|
16029
|
+
"cli/self-invocation.ts"() {
|
|
16030
|
+
"use strict";
|
|
16031
|
+
init_public_brand();
|
|
16032
|
+
init_standalone();
|
|
16033
|
+
}
|
|
16034
|
+
});
|
|
16035
|
+
|
|
15237
16036
|
// src/swift-pdf-raster.ts
|
|
15238
16037
|
var init_swift_pdf_raster = __esm({
|
|
15239
16038
|
"src/swift-pdf-raster.ts"() {
|
|
@@ -21653,7 +22452,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
|
|
|
21653
22452
|
const quoted = /^@"([^"]*)"$/.exec(text3.trim());
|
|
21654
22453
|
return quoted ? quoted[1] : constants.get(text3.trim());
|
|
21655
22454
|
};
|
|
21656
|
-
const
|
|
22455
|
+
const truthy2 = (name2) => {
|
|
21657
22456
|
const value = variables.get(name2);
|
|
21658
22457
|
return typeof value === "string" ? value.length > 0 : value !== void 0;
|
|
21659
22458
|
};
|
|
@@ -21665,7 +22464,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
|
|
|
21665
22464
|
);
|
|
21666
22465
|
if (early) {
|
|
21667
22466
|
if (!variables.has(early[2])) return null;
|
|
21668
|
-
if (early[1] === "!" === !
|
|
22467
|
+
if (early[1] === "!" === !truthy2(early[2])) return early[4] === "YES";
|
|
21669
22468
|
continue;
|
|
21670
22469
|
}
|
|
21671
22470
|
const declaration = /^(?:NSString|NSDictionary)\s*\*\s*(\w+)\s*=\s*([\s\S]+)$/.exec(
|
|
@@ -22002,7 +22801,7 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
|
|
|
22002
22801
|
init_podspec_sources();
|
|
22003
22802
|
|
|
22004
22803
|
// src/portable-expo-contract.ts
|
|
22005
|
-
var
|
|
22804
|
+
var import_zod4 = require("zod");
|
|
22006
22805
|
init_is_record();
|
|
22007
22806
|
init_podspec_sources();
|
|
22008
22807
|
|