peachsim 0.1.2410 → 0.1.2412
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 +10390 -4177
- 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 +11656 -5443
- 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 +12910 -6697
- 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 +1018 -240
- 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 +934 -156
- package/dist-lib/native-app-identity-project.cjs +9 -5
- package/dist-lib/native-app-identity-project.mjs +9 -5
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +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 +14016 -7803
- 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 +190 -36
- package/dist-lib/vite.cjs +3101 -2327
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +5 -0
- 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/expo-native-workspace.ts +4 -0
- 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 +96 -19
- package/src/swift-objc-compile.ts +5 -0
- package/src/swift-packages.ts +46 -0
- package/src/turbo-runtime.lock.json +19 -19
- package/src/xcode-project.ts +17 -7
- 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.2412 | (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 ? "467738b34c64972f28a4f51bb4a9e09b15d846aaf5143fa94e95cf779eb7bf82" : 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":"5e7daa9fabfa1c7f38e7b7e11bb0d4168e26d958b1acdb65e54e06e7de5c6804","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
|
" "
|
|
@@ -12409,12 +13160,12 @@ function workspaceReferences(workspace) {
|
|
|
12409
13160
|
return references;
|
|
12410
13161
|
}
|
|
12411
13162
|
function versionRequirement(url, requirement) {
|
|
12412
|
-
const kind =
|
|
12413
|
-
const minimum =
|
|
12414
|
-
const maximum =
|
|
12415
|
-
const version =
|
|
12416
|
-
const branch =
|
|
12417
|
-
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);
|
|
12418
13169
|
if (kind === "upToNextMajorVersion" && minimum)
|
|
12419
13170
|
return { kind: "upToNextMajorVersion", minimumVersion: minimum };
|
|
12420
13171
|
if (kind === "upToNextMinorVersion" && minimum)
|
|
@@ -12434,7 +13185,7 @@ function remotePackageRequirements(projects) {
|
|
|
12434
13185
|
for (const id of list(project.project.packageReferences)) {
|
|
12435
13186
|
const reference = project.object(id);
|
|
12436
13187
|
if (reference?.isa !== "XCRemoteSwiftPackageReference") continue;
|
|
12437
|
-
const url =
|
|
13188
|
+
const url = str2(reference.repositoryURL);
|
|
12438
13189
|
if (!url) continue;
|
|
12439
13190
|
const requirement = reference.requirement;
|
|
12440
13191
|
if (!isDict(requirement)) throw new Error(`${url} has no version requirement`);
|
|
@@ -12467,12 +13218,12 @@ function loadProject(xcodeproj) {
|
|
|
12467
13218
|
const found = id === void 0 ? void 0 : objects[id];
|
|
12468
13219
|
return isDict(found) ? found : void 0;
|
|
12469
13220
|
};
|
|
12470
|
-
const project = object5(
|
|
13221
|
+
const project = object5(str2(root.rootObject));
|
|
12471
13222
|
if (!project || project.isa !== "PBXProject") {
|
|
12472
13223
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
12473
13224
|
}
|
|
12474
13225
|
const projectDir = import_node_fs23.default.realpathSync.native(
|
|
12475
|
-
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) ?? "")
|
|
12476
13227
|
);
|
|
12477
13228
|
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path25.default.join);
|
|
12478
13229
|
const result = {
|
|
@@ -12499,11 +13250,11 @@ function selectedDeveloperDir() {
|
|
|
12499
13250
|
return developerDir;
|
|
12500
13251
|
}
|
|
12501
13252
|
function defaultConfiguration(project) {
|
|
12502
|
-
const configList = project.object(
|
|
13253
|
+
const configList = project.object(str2(project.project.buildConfigurationList));
|
|
12503
13254
|
const names = list(configList?.buildConfigurations).flatMap(
|
|
12504
|
-
(id) =>
|
|
13255
|
+
(id) => str2(project.object(id)?.name) ?? []
|
|
12505
13256
|
);
|
|
12506
|
-
return names.includes("Debug") ? "Debug" :
|
|
13257
|
+
return names.includes("Debug") ? "Debug" : str2(configList?.defaultConfigurationName) ?? names[0] ?? "Debug";
|
|
12507
13258
|
}
|
|
12508
13259
|
function targetSettings(ref, configuration, builtins, options = {}, overrides = {}) {
|
|
12509
13260
|
const { project, target } = ref;
|
|
@@ -12511,14 +13262,14 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12511
13262
|
const selected = (listId) => {
|
|
12512
13263
|
const configList = project.object(listId);
|
|
12513
13264
|
const configs2 = list(configList?.buildConfigurations).map(project.object);
|
|
12514
|
-
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));
|
|
12515
13266
|
};
|
|
12516
13267
|
const level = (config) => {
|
|
12517
13268
|
if (!config) return [];
|
|
12518
|
-
const name2 =
|
|
12519
|
-
const base =
|
|
12520
|
-
const anchor =
|
|
12521
|
-
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);
|
|
12522
13273
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
12523
13274
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
12524
13275
|
const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path25.default.resolve(directory, relative3) : null;
|
|
@@ -12541,10 +13292,10 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12541
13292
|
)
|
|
12542
13293
|
];
|
|
12543
13294
|
};
|
|
12544
|
-
const targetConfig = selected(
|
|
13295
|
+
const targetConfig = selected(str2(target.buildConfigurationList));
|
|
12545
13296
|
const levels = [
|
|
12546
|
-
{ ...builtins, CONFIGURATION:
|
|
12547
|
-
...level(selected(
|
|
13297
|
+
{ ...builtins, CONFIGURATION: str2(targetConfig?.name) ?? configuration },
|
|
13298
|
+
...level(selected(str2(project.project.buildConfigurationList))),
|
|
12548
13299
|
...level(targetConfig),
|
|
12549
13300
|
overrides
|
|
12550
13301
|
];
|
|
@@ -12555,7 +13306,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12555
13306
|
if (at < 0) return derived(key);
|
|
12556
13307
|
const marker = `${key}@${at}`;
|
|
12557
13308
|
if (resolving2.has(marker))
|
|
12558
|
-
throw new Error(`${
|
|
13309
|
+
throw new Error(`${str2(target.name)} has a cyclic build setting ${key}`);
|
|
12559
13310
|
resolving2.add(marker);
|
|
12560
13311
|
const value = expand(
|
|
12561
13312
|
levels[at][key],
|
|
@@ -12569,9 +13320,9 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
12569
13320
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
12570
13321
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
12571
13322
|
EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
|
|
12572
|
-
MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[
|
|
13323
|
+
MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[str2(target.productType) ?? ""] ?? "",
|
|
12573
13324
|
// the native defaults of CoreBuildSystem.xcspec for a dynamic framework
|
|
12574
|
-
EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(
|
|
13325
|
+
EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(str2(target.productType) ?? "") ? `${get("PRODUCT_NAME")}.framework/${get("EXECUTABLE_NAME")}` : get("EXECUTABLE_NAME"),
|
|
12575
13326
|
DYLIB_INSTALL_NAME_BASE: () => "/Library/Frameworks",
|
|
12576
13327
|
LD_DYLIB_INSTALL_NAME: () => get("MACH_O_TYPE") === "mh_dylib" ? `${get("DYLIB_INSTALL_NAME_BASE")}/${get("EXECUTABLE_PATH")}` : "",
|
|
12577
13328
|
// the native default of CoreBuildSystem.xcspec
|
|
@@ -12778,7 +13529,7 @@ function fileListEntries(file, absolute) {
|
|
|
12778
13529
|
}
|
|
12779
13530
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
12780
13531
|
const { project, target, id: targetId } = ref;
|
|
12781
|
-
const targetName2 =
|
|
13532
|
+
const targetName2 = str2(target.name) ?? targetId;
|
|
12782
13533
|
const sources = /* @__PURE__ */ new Set();
|
|
12783
13534
|
const allSources = /* @__PURE__ */ new Set();
|
|
12784
13535
|
const headers = /* @__PURE__ */ new Set();
|
|
@@ -12793,15 +13544,15 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
12793
13544
|
for (const phaseId of list(target.buildPhases)) {
|
|
12794
13545
|
const phase = project.object(phaseId);
|
|
12795
13546
|
if (phase?.isa !== "PBXShellScriptBuildPhase") continue;
|
|
12796
|
-
const script =
|
|
13547
|
+
const script = str2(phase.name) ?? phaseId;
|
|
12797
13548
|
for (const catalog of shellAssetCatalogs(
|
|
12798
|
-
|
|
13549
|
+
str2(phase.shellScript) ?? "",
|
|
12799
13550
|
settings,
|
|
12800
13551
|
project.projectDir
|
|
12801
13552
|
))
|
|
12802
13553
|
for (const file of walkFiles(catalog)) resources.add(file);
|
|
12803
13554
|
copiedFiles.push(
|
|
12804
|
-
...shellCopies(
|
|
13555
|
+
...shellCopies(str2(phase.shellScript) ?? "", settings, project.projectDir)
|
|
12805
13556
|
);
|
|
12806
13557
|
const absolute = (raw) => import_node_path25.default.resolve(project.projectDir, expand(raw, settings));
|
|
12807
13558
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
@@ -12910,7 +13661,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
12910
13661
|
`
|
|
12911
13662
|
);
|
|
12912
13663
|
});
|
|
12913
|
-
const rawScript =
|
|
13664
|
+
const rawScript = str2(phase.shellScript) ?? "";
|
|
12914
13665
|
if (rawScript.includes("generate-modules-provider")) {
|
|
12915
13666
|
const preloadPath = import_node_path25.default.join(phaseDir, "expo-scan-timeout.cjs");
|
|
12916
13667
|
import_node_fs23.default.mkdirSync(phaseDir, { recursive: true });
|
|
@@ -12933,7 +13684,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
12933
13684
|
}
|
|
12934
13685
|
try {
|
|
12935
13686
|
const [shell, ...args] = scriptCommand(
|
|
12936
|
-
|
|
13687
|
+
str2(phase.shellPath) ?? "/bin/sh",
|
|
12937
13688
|
rawScript
|
|
12938
13689
|
);
|
|
12939
13690
|
(0, import_node_child_process13.execFileSync)(shell, args, {
|
|
@@ -13207,7 +13958,7 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
13207
13958
|
const nested = project.project.projectReferences;
|
|
13208
13959
|
if (Array.isArray(nested)) {
|
|
13209
13960
|
for (const entry of nested) {
|
|
13210
|
-
const ref = isDict(entry) ?
|
|
13961
|
+
const ref = isDict(entry) ? str2(entry.ProjectRef) : void 0;
|
|
13211
13962
|
const resolved = ref ? project.resolvePath(ref) : null;
|
|
13212
13963
|
if (resolved) addProject(resolved);
|
|
13213
13964
|
}
|
|
@@ -13242,7 +13993,7 @@ function isIosAppTarget(ref, options = {}) {
|
|
|
13242
13993
|
ref,
|
|
13243
13994
|
defaultConfiguration(ref.project),
|
|
13244
13995
|
{
|
|
13245
|
-
TARGET_NAME:
|
|
13996
|
+
TARGET_NAME: str2(ref.target.name) ?? ref.id
|
|
13246
13997
|
},
|
|
13247
13998
|
options
|
|
13248
13999
|
);
|
|
@@ -13255,14 +14006,14 @@ function isIosPlatform(name2) {
|
|
|
13255
14006
|
return name2.startsWith("iphoneos") || name2.startsWith("iphonesimulator");
|
|
13256
14007
|
}
|
|
13257
14008
|
function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
13258
|
-
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);
|
|
13259
14010
|
}
|
|
13260
14011
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
13261
14012
|
const project = loadProject(import_node_fs23.default.realpathSync.native(xcodeproj));
|
|
13262
14013
|
for (const [id, target] of Object.entries(project.objects)) {
|
|
13263
14014
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
13264
14015
|
if (isIosAppTarget({ project, id, target }, { requireSources: false }))
|
|
13265
|
-
return
|
|
14016
|
+
return str2(target.name);
|
|
13266
14017
|
}
|
|
13267
14018
|
}
|
|
13268
14019
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
@@ -13310,11 +14061,11 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
13310
14061
|
(candidate) => import_node_fs23.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs23.default.realpathSync.native(projectPath)
|
|
13311
14062
|
);
|
|
13312
14063
|
const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
|
|
13313
|
-
const name2 = target &&
|
|
14064
|
+
const name2 = target && str2(target.target.name);
|
|
13314
14065
|
if (!name2) {
|
|
13315
14066
|
const declared = (project ? [project] : projects).flatMap(
|
|
13316
14067
|
(candidate) => projectTargets(candidate).flatMap((ref) => {
|
|
13317
|
-
const targetName2 =
|
|
14068
|
+
const targetName2 = str2(ref.target.name);
|
|
13318
14069
|
return targetName2 ? [targetName2] : [];
|
|
13319
14070
|
})
|
|
13320
14071
|
);
|
|
@@ -13411,12 +14162,16 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13411
14162
|
);
|
|
13412
14163
|
const allTargets = projects.flatMap(projectTargets);
|
|
13413
14164
|
const appTargets = allTargets.filter(
|
|
13414
|
-
(ref) => isIosAppTarget(ref, options) || targetName2 !== void 0 && ref.target.name === targetName2 && ref.target.productType === APP_EXTENSION
|
|
14165
|
+
(ref) => options.frameworkMachOType ? ref.target.name === targetName2 && FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") : isIosAppTarget(ref, options) || targetName2 !== void 0 && ref.target.name === targetName2 && ref.target.productType === APP_EXTENSION
|
|
13415
14166
|
);
|
|
13416
|
-
const appTargetNames = appTargets.map((ref) =>
|
|
14167
|
+
const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
|
|
13417
14168
|
const container = import_node_path25.default.basename(xcodeprojOrWorkspace);
|
|
13418
14169
|
const named = targetName2 ? appTargets.filter((ref) => ref.target.name === targetName2) : appTargets;
|
|
13419
14170
|
if (named.length !== 1) {
|
|
14171
|
+
if (options.frameworkMachOType)
|
|
14172
|
+
throw new Error(
|
|
14173
|
+
`${container} must declare one framework target named ${targetName2}`
|
|
14174
|
+
);
|
|
13420
14175
|
if (appTargets.length === 0)
|
|
13421
14176
|
throw new Error(
|
|
13422
14177
|
`${container} has no application targets; open a project or workspace that contains one`
|
|
@@ -13426,28 +14181,28 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13426
14181
|
);
|
|
13427
14182
|
}
|
|
13428
14183
|
const app = named[0];
|
|
13429
|
-
const appConfigs = app.project.object(
|
|
14184
|
+
const appConfigs = app.project.object(str2(app.target.buildConfigurationList));
|
|
13430
14185
|
const appConfigNames = list(appConfigs?.buildConfigurations).flatMap(
|
|
13431
|
-
(id) =>
|
|
14186
|
+
(id) => str2(app.project.object(id)?.name) ?? []
|
|
13432
14187
|
);
|
|
13433
|
-
const configuration = configurationName === void 0 ? defaultConfiguration(app.project) : appConfigNames.includes(configurationName) ? configurationName :
|
|
14188
|
+
const configuration = configurationName === void 0 ? defaultConfiguration(app.project) : appConfigNames.includes(configurationName) ? configurationName : str2(appConfigs?.defaultConfigurationName) ?? configurationName;
|
|
13434
14189
|
const byProduct = /* @__PURE__ */ new Map();
|
|
13435
14190
|
for (const ref of allTargets) {
|
|
13436
|
-
const product = ref.project.object(
|
|
13437
|
-
const file =
|
|
14191
|
+
const product = ref.project.object(str2(ref.target.productReference));
|
|
14192
|
+
const file = str2(product?.path);
|
|
13438
14193
|
if (file && !byProduct.has(import_node_path25.default.basename(file)))
|
|
13439
14194
|
byProduct.set(import_node_path25.default.basename(file), ref);
|
|
13440
14195
|
}
|
|
13441
14196
|
const proxied = (project, proxyId) => {
|
|
13442
14197
|
const proxy = project.object(proxyId);
|
|
13443
14198
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
13444
|
-
const portal =
|
|
14199
|
+
const portal = str2(proxy.containerPortal);
|
|
13445
14200
|
const portalPath = project.resolvePath(portal ?? "");
|
|
13446
14201
|
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;
|
|
13447
|
-
const remote =
|
|
14202
|
+
const remote = str2(proxy.remoteGlobalIDString);
|
|
13448
14203
|
if (!owner || !remote) return void 0;
|
|
13449
14204
|
return projectTargets(owner).find(
|
|
13450
|
-
(ref) => ref.id === remote ||
|
|
14205
|
+
(ref) => ref.id === remote || str2(ref.target.productReference) === remote
|
|
13451
14206
|
);
|
|
13452
14207
|
};
|
|
13453
14208
|
const linkedTargets = (ref) => {
|
|
@@ -13459,8 +14214,8 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13459
14214
|
for (const buildFileId of list(phase.files)) {
|
|
13460
14215
|
const buildFile = project.object(buildFileId);
|
|
13461
14216
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
13462
|
-
const file = project.object(
|
|
13463
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project,
|
|
14217
|
+
const file = project.object(str2(buildFile.fileRef));
|
|
14218
|
+
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;
|
|
13464
14219
|
if (resolved)
|
|
13465
14220
|
found.push({
|
|
13466
14221
|
target: resolved,
|
|
@@ -13488,12 +14243,12 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13488
14243
|
const found = list(target.dependencies).flatMap((dependencyId) => {
|
|
13489
14244
|
const dependency = project.object(dependencyId);
|
|
13490
14245
|
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) return [];
|
|
13491
|
-
const direct =
|
|
13492
|
-
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project,
|
|
14246
|
+
const direct = str2(dependency.target);
|
|
14247
|
+
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str2(dependency.targetProxy));
|
|
13493
14248
|
return resolved ? [resolved] : [];
|
|
13494
14249
|
});
|
|
13495
14250
|
return [...found, ...linkedTargets(ref).map((link) => link.target)].filter(
|
|
13496
|
-
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(
|
|
14251
|
+
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str2(candidate.target.productType) ?? "")
|
|
13497
14252
|
);
|
|
13498
14253
|
};
|
|
13499
14254
|
const order = [];
|
|
@@ -13520,7 +14275,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13520
14275
|
return list(phase.files).flatMap((id) => {
|
|
13521
14276
|
const file = ref.project.object(id);
|
|
13522
14277
|
if (!file || !xcodeBuildFileBuildsForIos(file)) return [];
|
|
13523
|
-
const resolved = ref.project.resolvePath(
|
|
14278
|
+
const resolved = ref.project.resolvePath(str2(file.fileRef) ?? "");
|
|
13524
14279
|
const attributes = isDict(file.settings) ? list(file.settings.ATTRIBUTES) : [];
|
|
13525
14280
|
if (!resolved) return [];
|
|
13526
14281
|
return [
|
|
@@ -13537,7 +14292,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13537
14292
|
if (cached2) return cached2;
|
|
13538
14293
|
const headers = /* @__PURE__ */ new Map();
|
|
13539
14294
|
for (const other of projectTargets(project)) {
|
|
13540
|
-
if (FRAMEWORK_PRODUCTS.has(
|
|
14295
|
+
if (FRAMEWORK_PRODUCTS.has(str2(other.target.productType) ?? "")) continue;
|
|
13541
14296
|
const otherProduct = productName(other);
|
|
13542
14297
|
for (const { file, visibility } of headerPhase(other)) {
|
|
13543
14298
|
if (visibility === "Project") continue;
|
|
@@ -13556,7 +14311,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13556
14311
|
const product = targetSettings(
|
|
13557
14312
|
ref,
|
|
13558
14313
|
configuration,
|
|
13559
|
-
{ TARGET_NAME:
|
|
14314
|
+
{ TARGET_NAME: str2(ref.target.name) ?? ref.id },
|
|
13560
14315
|
options
|
|
13561
14316
|
).get("PRODUCT_NAME");
|
|
13562
14317
|
productNames.set(key, product);
|
|
@@ -13625,7 +14380,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13625
14380
|
OBJROOT: import_node_path25.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
13626
14381
|
};
|
|
13627
14382
|
const moduleTarget = (ref) => {
|
|
13628
|
-
const name2 =
|
|
14383
|
+
const name2 = str2(ref.target.name) ?? ref.id;
|
|
13629
14384
|
const {
|
|
13630
14385
|
get: settings2,
|
|
13631
14386
|
keys,
|
|
@@ -13638,7 +14393,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13638
14393
|
TARGETNAME: "$(TARGET_NAME)",
|
|
13639
14394
|
PROJECT: "$(PROJECT_NAME)",
|
|
13640
14395
|
PROJECT_NAME: import_node_path25.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
13641
|
-
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ?
|
|
14396
|
+
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
13642
14397
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
13643
14398
|
SRCROOT: ref.project.projectDir,
|
|
13644
14399
|
SOURCE_ROOT: ref.project.projectDir,
|
|
@@ -13652,7 +14407,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13652
14407
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
13653
14408
|
DWARF_DSYM_FOLDER_PATH: "$(CONFIGURATION_BUILD_DIR)",
|
|
13654
14409
|
DWARF_DSYM_FILE_NAME: "$(FULL_PRODUCT_NAME).dSYM",
|
|
13655
|
-
FULL_PRODUCT_NAME:
|
|
14410
|
+
FULL_PRODUCT_NAME: str2(ref.project.object(str2(ref.target.productReference))?.path) ?? "",
|
|
13656
14411
|
UNLOCALIZED_RESOURCES_FOLDER_PATH: "$(FULL_PRODUCT_NAME)",
|
|
13657
14412
|
CONTENTS_FOLDER_PATH: "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)",
|
|
13658
14413
|
FRAMEWORKS_FOLDER_PATH: "$(CONTENTS_FOLDER_PATH)/Frameworks",
|
|
@@ -13676,10 +14431,10 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13676
14431
|
CURRENT_ARCH: "arm64",
|
|
13677
14432
|
ARCHS: "arm64",
|
|
13678
14433
|
ACTION: "build",
|
|
13679
|
-
DEVELOPMENT_LANGUAGE:
|
|
14434
|
+
DEVELOPMENT_LANGUAGE: str2(ref.project.project.developmentRegion) ?? "en"
|
|
13680
14435
|
},
|
|
13681
14436
|
options,
|
|
13682
|
-
workspaceBuild
|
|
14437
|
+
ref === app && options.frameworkMachOType ? { ...workspaceBuild, MACH_O_TYPE: options.frameworkMachOType } : workspaceBuild
|
|
13683
14438
|
);
|
|
13684
14439
|
for (const file of read) xcconfigs.add(file);
|
|
13685
14440
|
const swiftVersion = Number.parseFloat(settings2("SWIFT_VERSION") || "5");
|
|
@@ -13692,12 +14447,12 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13692
14447
|
);
|
|
13693
14448
|
const searchRules = recursiveSearchRules(settings2);
|
|
13694
14449
|
const absolute = (file) => import_node_path25.default.resolve(ref.project.projectDir, file);
|
|
13695
|
-
const framework = FRAMEWORK_PRODUCTS.has(
|
|
14450
|
+
const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
|
|
13696
14451
|
const product = settings2("PRODUCT_NAME");
|
|
13697
14452
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
13698
14453
|
const compatibilityPhases = list(ref.target.buildPhases).flatMap((id) => {
|
|
13699
14454
|
const phase = ref.project.object(id);
|
|
13700
|
-
if (phase?.isa !== "PBXShellScriptBuildPhase" ||
|
|
14455
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "Copy generated compatibility header")
|
|
13701
14456
|
return [];
|
|
13702
14457
|
const inputs = list(phase.inputPaths).map(
|
|
13703
14458
|
(file) => absolute(expand(file, settings2))
|
|
@@ -13822,11 +14577,11 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13822
14577
|
if (phase?.isa !== "PBXSourcesBuildPhase") continue;
|
|
13823
14578
|
for (const id of list(phase.files)) {
|
|
13824
14579
|
const file = ref.project.object(id);
|
|
13825
|
-
const resolved = ref.project.resolvePath(
|
|
14580
|
+
const resolved = ref.project.resolvePath(str2(file?.fileRef) ?? "");
|
|
13826
14581
|
if (resolved && implementations.includes(resolved))
|
|
13827
14582
|
fileFlags[resolved] = settingList(
|
|
13828
14583
|
expand(
|
|
13829
|
-
|
|
14584
|
+
str2(isDict(file?.settings) ? file.settings.COMPILER_FLAGS : void 0) ?? "",
|
|
13830
14585
|
settings2
|
|
13831
14586
|
)
|
|
13832
14587
|
);
|
|
@@ -13963,15 +14718,15 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
13963
14718
|
// cocoapods writes for each header_mappings_dir folder.
|
|
13964
14719
|
...list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
13965
14720
|
const phase = ref.project.object(phaseId);
|
|
13966
|
-
if (phase?.isa !== "PBXCopyFilesBuildPhase" ||
|
|
14721
|
+
if (phase?.isa !== "PBXCopyFilesBuildPhase" || str2(phase.dstSubfolderSpec) !== "16")
|
|
13967
14722
|
return [];
|
|
13968
14723
|
const destination = expand(
|
|
13969
|
-
|
|
14724
|
+
str2(phase.dstPath) ?? "",
|
|
13970
14725
|
(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)
|
|
13971
14726
|
);
|
|
13972
14727
|
return list(phase.files).flatMap((id) => {
|
|
13973
14728
|
const file = ref.project.resolvePath(
|
|
13974
|
-
|
|
14729
|
+
str2(ref.project.object(id)?.fileRef) ?? ""
|
|
13975
14730
|
);
|
|
13976
14731
|
return file && HEADER_FILE.test(file) ? [
|
|
13977
14732
|
[
|
|
@@ -14019,7 +14774,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14019
14774
|
))
|
|
14020
14775
|
includeNativeTarget(ref);
|
|
14021
14776
|
const selectedTargets = options.nativeModules ? builtTargets.filter((target) => nativeTargets.has(target.ref)) : builtTargets;
|
|
14022
|
-
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(
|
|
14777
|
+
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 }));
|
|
14023
14778
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
14024
14779
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
14025
14780
|
({ 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)) : []
|
|
@@ -14041,7 +14796,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14041
14796
|
for (const owner of options.installedPods ? builtTargets : []) {
|
|
14042
14797
|
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
14043
14798
|
const phase = owner.ref.project.object(phaseId);
|
|
14044
|
-
if (phase?.isa !== "PBXShellScriptBuildPhase" ||
|
|
14799
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
|
|
14045
14800
|
continue;
|
|
14046
14801
|
const absolute = (raw) => import_node_path25.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
14047
14802
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
@@ -14065,8 +14820,8 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14065
14820
|
);
|
|
14066
14821
|
for (const [index, input2] of inputs.entries()) {
|
|
14067
14822
|
const product = bundleTargets.find((target) => {
|
|
14068
|
-
const file =
|
|
14069
|
-
target.ref.project.object(
|
|
14823
|
+
const file = str2(
|
|
14824
|
+
target.ref.project.object(str2(target.ref.target.productReference))?.path
|
|
14070
14825
|
);
|
|
14071
14826
|
return file && import_node_path25.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
14072
14827
|
});
|
|
@@ -14154,10 +14909,10 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14154
14909
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || list(phase.outputPaths).length || list(phase.outputFileListPaths).length)
|
|
14155
14910
|
break;
|
|
14156
14911
|
postBundleScripts.unshift({
|
|
14157
|
-
name:
|
|
14912
|
+
name: str2(phase.name) ?? id,
|
|
14158
14913
|
command: scriptCommand(
|
|
14159
|
-
|
|
14160
|
-
|
|
14914
|
+
str2(phase.shellPath) ?? "/bin/sh",
|
|
14915
|
+
str2(phase.shellScript) ?? ""
|
|
14161
14916
|
),
|
|
14162
14917
|
directory: app.project.projectDir,
|
|
14163
14918
|
inputPaths: list(phase.inputPaths),
|
|
@@ -14195,7 +14950,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14195
14950
|
}
|
|
14196
14951
|
return packages;
|
|
14197
14952
|
}
|
|
14198
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path25.default.resolve(project.projectDir,
|
|
14953
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path25.default.resolve(project.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
14199
14954
|
return candidate && import_node_fs23.default.existsSync(import_node_path25.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
14200
14955
|
})
|
|
14201
14956
|
)
|
|
@@ -14205,7 +14960,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14205
14960
|
projects.flatMap(
|
|
14206
14961
|
(project) => list(project.project.packageReferences).flatMap((id) => {
|
|
14207
14962
|
const reference = project.object(id);
|
|
14208
|
-
const url =
|
|
14963
|
+
const url = str2(reference?.repositoryURL);
|
|
14209
14964
|
return reference?.isa === "XCRemoteSwiftPackageReference" && url ? [url] : [];
|
|
14210
14965
|
})
|
|
14211
14966
|
)
|
|
@@ -14280,7 +15035,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14280
15035
|
const productPlatforms = /* @__PURE__ */ new Map();
|
|
14281
15036
|
const productRef = (id) => {
|
|
14282
15037
|
const entry = project.object(id);
|
|
14283
|
-
const ref2 =
|
|
15038
|
+
const ref2 = str2(entry?.productRef);
|
|
14284
15039
|
if (!entry || !ref2) return [];
|
|
14285
15040
|
const builds = xcodeBuildFileBuildsForIos(entry);
|
|
14286
15041
|
productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
|
|
@@ -14292,7 +15047,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14292
15047
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
14293
15048
|
for (const id of list(phase.files)) {
|
|
14294
15049
|
const file = project.object(id);
|
|
14295
|
-
const product =
|
|
15050
|
+
const product = str2(file?.productRef);
|
|
14296
15051
|
if (file && product && xcodeBuildFileBuildsForIos(file))
|
|
14297
15052
|
productAttributes.set(
|
|
14298
15053
|
product,
|
|
@@ -14318,20 +15073,20 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14318
15073
|
const ownKeys = /* @__PURE__ */ new Set();
|
|
14319
15074
|
for (const dependencyId of new Set(productDependencies)) {
|
|
14320
15075
|
const dependency = project.object(dependencyId);
|
|
14321
|
-
const product =
|
|
15076
|
+
const product = str2(dependency?.productName)?.replace(/^plugin:/, "");
|
|
14322
15077
|
if (!dependency || !product)
|
|
14323
15078
|
throw new Error(
|
|
14324
|
-
`${
|
|
15079
|
+
`${str2(target.name) ?? "target"}: package product dependency ${dependencyId} has no productName in ${project.projectFile}`
|
|
14325
15080
|
);
|
|
14326
|
-
const reference = project.object(
|
|
15081
|
+
const reference = project.object(str2(dependency.package));
|
|
14327
15082
|
const linked = {
|
|
14328
15083
|
product,
|
|
14329
15084
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
14330
|
-
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url:
|
|
15085
|
+
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
14331
15086
|
kind: "local",
|
|
14332
15087
|
dir: import_node_path25.default.resolve(
|
|
14333
15088
|
project.projectDir,
|
|
14334
|
-
|
|
15089
|
+
str2(reference.relativePath) ?? ""
|
|
14335
15090
|
)
|
|
14336
15091
|
} : { kind: "unnamed", remoteUrls: remotePackageUrls }
|
|
14337
15092
|
};
|
|
@@ -14352,10 +15107,10 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14352
15107
|
for (const buildFileId of list(phase.files)) {
|
|
14353
15108
|
const buildFile = project.object(buildFileId);
|
|
14354
15109
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
14355
|
-
const fileId =
|
|
15110
|
+
const fileId = str2(buildFile.fileRef);
|
|
14356
15111
|
const file = project.object(fileId);
|
|
14357
|
-
const tree =
|
|
14358
|
-
const rawPath =
|
|
15112
|
+
const tree = str2(file?.sourceTree);
|
|
15113
|
+
const rawPath = str2(file?.path) ?? "";
|
|
14359
15114
|
const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
14360
15115
|
if (file?.isa !== "PBXFileReference" || !name2) continue;
|
|
14361
15116
|
if (tree === "SDKROOT" || /\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`)) {
|
|
@@ -14369,7 +15124,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14369
15124
|
if (fileId && resolved !== null && !import_node_fs23.default.existsSync(resolved)) {
|
|
14370
15125
|
if (!ios_sdk_frameworks_default.frameworks.includes(name2))
|
|
14371
15126
|
throw new Error(
|
|
14372
|
-
`${
|
|
15127
|
+
`${str2(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
14373
15128
|
);
|
|
14374
15129
|
sdkFrameworks.add(name2);
|
|
14375
15130
|
continue;
|
|
@@ -14407,12 +15162,12 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14407
15162
|
sourceLinkGraph: {
|
|
14408
15163
|
entry: module2.id,
|
|
14409
15164
|
targets: builtTargets.filter(
|
|
14410
|
-
({ ref }) => ref === app || MODULE_PRODUCTS.has(
|
|
15165
|
+
({ ref }) => ref === app || MODULE_PRODUCTS.has(str2(ref.target.productType) ?? "")
|
|
14411
15166
|
).map(({ ref, module: module3, settings: settings2 }) => ({
|
|
14412
15167
|
id: module3.id,
|
|
14413
15168
|
sourceTarget: module3.allSources.length > 0 ? module3.moduleName : null,
|
|
14414
|
-
productName: settings2("FULL_PRODUCT_NAME") ||
|
|
14415
|
-
productType:
|
|
15169
|
+
productName: settings2("FULL_PRODUCT_NAME") || str2(ref.project.object(str2(ref.target.productReference))?.path) || settings2("PRODUCT_NAME"),
|
|
15170
|
+
productType: str2(ref.target.productType),
|
|
14416
15171
|
installName: settings2("LD_DYLIB_INSTALL_NAME") || null,
|
|
14417
15172
|
buildVersion: {
|
|
14418
15173
|
platform: settings2("PLATFORM_NAME") || null,
|
|
@@ -14422,7 +15177,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14422
15177
|
machOType: settings2("MACH_O_TYPE") || null,
|
|
14423
15178
|
linkerFlags: settingList(settings2("OTHER_LDFLAGS")),
|
|
14424
15179
|
dependencies: linkedTargets(ref).concat(frameworkFlagLinks(ref, settings2("OTHER_LDFLAGS"))).filter(
|
|
14425
|
-
(dependency) => MODULE_PRODUCTS.has(
|
|
15180
|
+
(dependency) => MODULE_PRODUCTS.has(str2(dependency.target.target.productType) ?? "")
|
|
14426
15181
|
).map(({ target, attributes }) => ({
|
|
14427
15182
|
target: `${target.project.projectFile}#${target.id}`,
|
|
14428
15183
|
attributes
|
|
@@ -14472,7 +15227,7 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
|
|
|
14472
15227
|
infoPlistFile,
|
|
14473
15228
|
...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
|
|
14474
15229
|
postBundleScripts,
|
|
14475
|
-
developmentRegion:
|
|
15230
|
+
developmentRegion: str2(app.project.project.developmentRegion) ?? "en",
|
|
14476
15231
|
frameworks,
|
|
14477
15232
|
resourceProducts,
|
|
14478
15233
|
linkedProducts,
|
|
@@ -15201,7 +15956,7 @@ var init_react_native_core = __esm({
|
|
|
15201
15956
|
init_swift_distribution();
|
|
15202
15957
|
init_swift_package();
|
|
15203
15958
|
init_swiftContract();
|
|
15204
|
-
recipe = true ? "
|
|
15959
|
+
recipe = true ? "69b07e9fa50c2e82ce458ed542c4e01980e8abeab0261d9176395a3348963751" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
15205
15960
|
}
|
|
15206
15961
|
});
|
|
15207
15962
|
|
|
@@ -15259,6 +16014,29 @@ var init_swift_cxx_reachable = __esm({
|
|
|
15259
16014
|
}
|
|
15260
16015
|
});
|
|
15261
16016
|
|
|
16017
|
+
// cli/internal-child-contract.ts
|
|
16018
|
+
var init_internal_child_contract = __esm({
|
|
16019
|
+
"cli/internal-child-contract.ts"() {
|
|
16020
|
+
"use strict";
|
|
16021
|
+
}
|
|
16022
|
+
});
|
|
16023
|
+
|
|
16024
|
+
// cli/standalone.ts
|
|
16025
|
+
var init_standalone = __esm({
|
|
16026
|
+
"cli/standalone.ts"() {
|
|
16027
|
+
"use strict";
|
|
16028
|
+
}
|
|
16029
|
+
});
|
|
16030
|
+
|
|
16031
|
+
// cli/self-invocation.ts
|
|
16032
|
+
var init_self_invocation = __esm({
|
|
16033
|
+
"cli/self-invocation.ts"() {
|
|
16034
|
+
"use strict";
|
|
16035
|
+
init_public_brand();
|
|
16036
|
+
init_standalone();
|
|
16037
|
+
}
|
|
16038
|
+
});
|
|
16039
|
+
|
|
15262
16040
|
// src/swift-pdf-raster.ts
|
|
15263
16041
|
var init_swift_pdf_raster = __esm({
|
|
15264
16042
|
"src/swift-pdf-raster.ts"() {
|
|
@@ -21678,7 +22456,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
|
|
|
21678
22456
|
const quoted = /^@"([^"]*)"$/.exec(text3.trim());
|
|
21679
22457
|
return quoted ? quoted[1] : constants.get(text3.trim());
|
|
21680
22458
|
};
|
|
21681
|
-
const
|
|
22459
|
+
const truthy2 = (name2) => {
|
|
21682
22460
|
const value = variables.get(name2);
|
|
21683
22461
|
return typeof value === "string" ? value.length > 0 : value !== void 0;
|
|
21684
22462
|
};
|
|
@@ -21690,7 +22468,7 @@ function evaluateObjcBody(body, bundle, constants, scope) {
|
|
|
21690
22468
|
);
|
|
21691
22469
|
if (early) {
|
|
21692
22470
|
if (!variables.has(early[2])) return null;
|
|
21693
|
-
if (early[1] === "!" === !
|
|
22471
|
+
if (early[1] === "!" === !truthy2(early[2])) return early[4] === "YES";
|
|
21694
22472
|
continue;
|
|
21695
22473
|
}
|
|
21696
22474
|
const declaration = /^(?:NSString|NSDictionary)\s*\*\s*(\w+)\s*=\s*([\s\S]+)$/.exec(
|
|
@@ -22027,7 +22805,7 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
|
|
|
22027
22805
|
init_podspec_sources();
|
|
22028
22806
|
|
|
22029
22807
|
// src/portable-expo-contract.ts
|
|
22030
|
-
var
|
|
22808
|
+
var import_zod4 = require("zod");
|
|
22031
22809
|
init_is_record();
|
|
22032
22810
|
init_podspec_sources();
|
|
22033
22811
|
|