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.
Files changed (119) hide show
  1. package/README.md +2 -5
  2. package/cli/internal-child-contract.ts +0 -1
  3. package/cli/internal-child.ts +0 -6
  4. package/cli/outbound-endpoints.ts +0 -23
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/bundle-channel.cjs +10390 -4177
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/config.mjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/expo-swift-bundle.cjs +11656 -5443
  31. package/dist-lib/expo-swift-metadata.cjs +1 -1
  32. package/dist-lib/expo-swift-metadata.mjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +12910 -6697
  35. package/dist-lib/host/fetch-proxy-handler.cjs +925 -151
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +1018 -240
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +934 -156
  51. package/dist-lib/native-app-identity-project.cjs +9 -5
  52. package/dist-lib/native-app-identity-project.mjs +9 -5
  53. package/dist-lib/native-app-identity.cjs +1 -1
  54. package/dist-lib/native-app-identity.mjs +1 -1
  55. package/dist-lib/native-firebase-metadata.cjs +1 -1
  56. package/dist-lib/native-firebase-metadata.mjs +1 -1
  57. package/dist-lib/pdfium-raster.cjs +1 -1
  58. package/dist-lib/pdfium-raster.mjs +1 -1
  59. package/dist-lib/plist.cjs +1 -1
  60. package/dist-lib/plist.mjs +1 -1
  61. package/dist-lib/profiles.cjs +1 -1
  62. package/dist-lib/public-brand.cjs +1 -1
  63. package/dist-lib/public-origins-lib-esm.json +24 -24
  64. package/dist-lib/public-origins-lib.json +124 -104
  65. package/dist-lib/react-native-host-modules.cjs +1 -1
  66. package/dist-lib/react-native-host-modules.mjs +1 -1
  67. package/dist-lib/reap-browser.cjs +1 -1
  68. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  69. package/dist-lib/sdk.cjs +1 -1
  70. package/dist-lib/sdk.mjs +1 -1
  71. package/dist-lib/skills.cjs +14016 -7803
  72. package/dist-lib/swift-compile.cjs +62 -14
  73. package/dist-lib/swift-compile.mjs +62 -13
  74. package/dist-lib/swift-package.cjs +1 -1
  75. package/dist-lib/swift-package.mjs +1 -1
  76. package/dist-lib/swift-submit.cjs +1 -1
  77. package/dist-lib/swift-submit.mjs +1 -1
  78. package/dist-lib/swift-toolchain.cjs +1 -1
  79. package/dist-lib/swift.cjs +1 -1
  80. package/dist-lib/vite-swift.cjs +190 -36
  81. package/dist-lib/vite.cjs +3101 -2327
  82. package/dist-lib/worklet-executable.cjs +1 -1
  83. package/dist-lib/worklet-executable.mjs +1 -1
  84. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -0
  85. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -0
  86. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
  87. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +5 -0
  88. package/kotlin/sdk.tar.gz +0 -0
  89. package/package.json +3 -3
  90. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
  91. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h +1 -1
  92. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResource.h +1 -1
  93. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChange.h +1 -1
  94. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchOptions.h +1 -1
  95. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchResult.h +1 -1
  96. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h +2 -2
  97. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHObject.h +1 -1
  98. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPhotoLibrary.h +2 -2
  99. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +1 -1
  100. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVibrancyEffect.h +1 -1
  101. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVisualEffectView.h +1 -1
  102. package/sdk/ios/System/Library/Frameworks/UIKitActivity.framework/Headers/UIKitActivity.h +1 -1
  103. package/src/expo-native-workspace.ts +4 -0
  104. package/src/nitro-adapter.lock.json +262 -262
  105. package/src/nitro-superset.lock.json +4 -4
  106. package/src/podspec-cocoapods.ts +934 -0
  107. package/src/podspec-prism.ts +66 -0
  108. package/src/podspec-ruby-stdlib.ts +1121 -0
  109. package/src/podspec-ruby.ts +5175 -0
  110. package/src/podspec-sources.ts +25 -112
  111. package/src/swift-compile.ts +70 -12
  112. package/src/swift-distribution.lock.json +9 -8
  113. package/src/swift-host.ts +96 -19
  114. package/src/swift-objc-compile.ts +5 -0
  115. package/src/swift-packages.ts +46 -0
  116. package/src/turbo-runtime.lock.json +19 -19
  117. package/src/xcode-project.ts +17 -7
  118. package/cli/drivers/linux-cocoapods.lock.json +0 -303
  119. package/cli/drivers/linux-cocoapods.ts +0 -99
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2410 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
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;
@@ -294,7 +294,7 @@ var STANDIN_SOURCE_DIGEST;
294
294
  var init_swift_standin_digest = __esm({
295
295
  "src/swift-standin-digest.ts"() {
296
296
  "use strict";
297
- STANDIN_SOURCE_DIGEST = true ? "33613fe0a59b84be02c11350a1382f0d95184a98af5ca339e388eff115c7ac07" : standinSourceDigest();
297
+ STANDIN_SOURCE_DIGEST = true ? "467738b34c64972f28a4f51bb4a9e09b15d846aaf5143fa94e95cf779eb7bf82" : standinSourceDigest();
298
298
  }
299
299
  });
300
300
 
@@ -1892,7 +1892,7 @@ var swiftCoverageProvenance;
1892
1892
  var init_provenance = __esm({
1893
1893
  "src/swift-coverage/provenance.ts"() {
1894
1894
  "use strict";
1895
- swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"b0da81ab133ad067978e174c2f62f5a9655dfe6b5639bc4b884f3137a8136144","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
1895
+ 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, ".."));
1896
1896
  }
1897
1897
  });
1898
1898
 
@@ -3140,7 +3140,7 @@ var init_swift_compile = __esm({
3140
3140
  FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
3141
3141
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
3142
3142
  ).join("");
3143
- compilerSourceDigest = true ? "d287f3ad479477c70004707c1336f37c9baeb81aef1880544a5ca236e088ca16" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
3143
+ compilerSourceDigest = true ? "5bdda04d424b3a504c042269bf0bebf701fc0435974970611138a79db9b959cd" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
3144
3144
  C_WORDS = new Set(
3145
3145
  "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(
3146
3146
  " "
@@ -3390,68 +3390,802 @@ var init_xcode_project = __esm({
3390
3390
  }
3391
3391
  });
3392
3392
 
3393
- // cli/internal-child-contract.ts
3394
- var init_internal_child_contract = __esm({
3395
- "cli/internal-child-contract.ts"() {
3393
+ // src/podspec-prism.ts
3394
+ var import_parsePrism;
3395
+ var init_podspec_prism = __esm({
3396
+ "src/podspec-prism.ts"() {
3396
3397
  "use strict";
3398
+ import_parsePrism = require("@ruby/prism/src/parsePrism.js");
3397
3399
  }
3398
3400
  });
3399
3401
 
3400
- // src/public-brand.ts
3401
- var name, peachPublicBrand;
3402
- var init_public_brand = __esm({
3403
- "src/public-brand.ts"() {
3402
+ // src/podspec-ruby.ts
3403
+ var N, NOT_FOUND;
3404
+ var init_podspec_ruby = __esm({
3405
+ "src/podspec-ruby.ts"() {
3404
3406
  "use strict";
3405
- name = "Peach";
3406
- peachPublicBrand = Object.freeze({
3407
- name,
3408
- packageName: "peachsim",
3409
- commandName: "peach",
3410
- domain: "peachsim.com",
3411
- origin: "https://peachsim.com",
3412
- boxOrigin: "https://rnx-box.contrast.dev"
3413
- });
3407
+ N = __toESM(require("@ruby/prism/src/nodes.js"), 1);
3408
+ init_podspec_prism();
3409
+ NOT_FOUND = Symbol("not found");
3414
3410
  }
3415
3411
  });
3416
3412
 
3417
- // cli/standalone.ts
3418
- var init_standalone = __esm({
3419
- "cli/standalone.ts"() {
3413
+ // src/podspec-ruby-stdlib.ts
3414
+ var init_podspec_ruby_stdlib = __esm({
3415
+ "src/podspec-ruby-stdlib.ts"() {
3420
3416
  "use strict";
3417
+ init_podspec_ruby();
3421
3418
  }
3422
3419
  });
3423
3420
 
3424
- // cli/self-invocation.ts
3425
- var init_self_invocation = __esm({
3426
- "cli/self-invocation.ts"() {
3421
+ // src/podspec-cocoapods.ts
3422
+ var PRELUDE;
3423
+ var init_podspec_cocoapods = __esm({
3424
+ "src/podspec-cocoapods.ts"() {
3427
3425
  "use strict";
3428
- init_public_brand();
3429
- init_standalone();
3430
- }
3431
- });
3426
+ init_podspec_ruby();
3427
+ init_podspec_ruby_stdlib();
3428
+ PRELUDE = String.raw`
3429
+ module Pod
3430
+ VERSION = '1.17.0'
3431
+ class Informative < StandardError; end
3432
+ class PlainInformative < StandardError; end
3433
+ class Version < Gem::Version; end
3432
3434
 
3433
- // cli/drivers/linux-cocoapods.ts
3434
- var import_zod, pinnedFile, archLock, linuxCocoaPodsLockSchema;
3435
- var init_linux_cocoapods = __esm({
3436
- "cli/drivers/linux-cocoapods.ts"() {
3437
- "use strict";
3438
- init_src();
3439
- import_zod = require("zod");
3440
- init_home_paths();
3441
- init_cli_release_origin();
3442
- init_internal_child_contract();
3443
- init_self_invocation();
3444
- pinnedFile = import_zod.z.object({
3445
- url: import_zod.z.string().url(),
3446
- sha256: import_zod.z.string().regex(/^[a-f0-9]{64}$/)
3447
- });
3448
- archLock = import_zod.z.object({ ruby: pinnedFile, gems: import_zod.z.array(pinnedFile).min(1) });
3449
- linuxCocoaPodsLockSchema = import_zod.z.object({
3450
- id: import_zod.z.string().regex(/^[a-f0-9]{16}$/),
3451
- ruby: import_zod.z.string(),
3452
- cocoapods: import_zod.z.string(),
3453
- arches: import_zod.z.object({ x64: archLock, arm64: archLock })
3454
- });
3435
+ class Requirement
3436
+ PATTERN = /\A\s*(=|!=|>|<|>=|<=|~>)?\s*([0-9]+(?:\.[0-9a-zA-Z]+)*(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)\s*\z/
3437
+ attr_reader :requirements
3438
+ def self.create(input)
3439
+ input.is_a?(Requirement) ? input : new(input)
3440
+ end
3441
+ def initialize(*requirements)
3442
+ requirements = requirements.flatten
3443
+ requirements.compact!
3444
+ requirements.uniq!
3445
+ @requirements = requirements.empty? ? [['>=', Version.new('0')]] : requirements.map { |r| parse(r) }
3446
+ end
3447
+ def parse(requirement)
3448
+ return ['=', requirement] if requirement.is_a?(Version)
3449
+ match = PATTERN.match(requirement.to_s)
3450
+ raise ArgumentError, "Illformed requirement [#{requirement.inspect}]" unless match
3451
+ [match[1] || '=', Version.new(match[2])]
3452
+ end
3453
+ def to_s
3454
+ requirements.map { |op, version| "#{op} #{version}" }.join(', ')
3455
+ end
3456
+ end
3457
+
3458
+ class Dependency
3459
+ attr_reader :name, :requirement
3460
+ def initialize(name = nil, *requirements)
3461
+ @name = name
3462
+ @requirement = Requirement.create(requirements)
3463
+ end
3464
+ end
3465
+
3466
+ class Platform
3467
+ attr_reader :name, :deployment_target
3468
+ def initialize(name, deployment_target = nil)
3469
+ @name = name.to_s == 'macos' ? :osx : name.to_sym
3470
+ @deployment_target = deployment_target.nil? ? nil : Version.new(deployment_target)
3471
+ end
3472
+ def ==(other)
3473
+ other.is_a?(Platform) && name == other.name && deployment_target == other.deployment_target
3474
+ end
3475
+ def to_sym
3476
+ name
3477
+ end
3478
+ def to_s
3479
+ name.to_s
3480
+ end
3481
+ end
3482
+
3483
+ class Config
3484
+ attr_accessor :installation_root, :podfile, :lockfile
3485
+ def self.instance
3486
+ @instance ||= new
3487
+ end
3488
+ def sandbox_root
3489
+ installation_root + 'Pods'
3490
+ end
3491
+ def project_pods_root
3492
+ sandbox_root
3493
+ end
3494
+ def verbose?
3495
+ false
3496
+ end
3497
+ def silent?
3498
+ true
3499
+ end
3500
+ end
3501
+
3502
+ module UI
3503
+ def self.puts(*args); end
3504
+ def self.print(*args); end
3505
+ def self.warn(*args); end
3506
+ def self.notice(*args); end
3507
+ def self.message(*args); yield if block_given?; end
3508
+ def self.info(*args); yield if block_given?; end
3509
+ def self.section(*args); yield if block_given?; end
3510
+ def self.titled_section(*args); yield if block_given?; end
3511
+ end
3512
+ CoreUI = UI
3513
+
3514
+ class Specification
3515
+ module DSL
3516
+ PLATFORMS = [:osx, :ios, :tvos, :visionos, :watchos].freeze
3517
+ SINGULAR = {
3518
+ swift_versions: 'swift_version', authors: 'author', screenshots: 'screenshot', frameworks: 'framework',
3519
+ weak_frameworks: 'weak_framework', libraries: 'library', compiler_flags: 'compiler_flag',
3520
+ script_phases: 'script_phase', vendored_frameworks: 'vendored_framework', vendored_libraries: 'vendored_library',
3521
+ on_demand_resources: 'on_demand_resource', resource_bundles: 'resource_bundle', resources: 'resource',
3522
+ preserve_paths: 'preserve_path', default_subspecs: 'default_subspec'
3523
+ }.freeze
3524
+
3525
+ class Attribute
3526
+ attr_reader :name, :container, :types, :default_value
3527
+ def initialize(name, options)
3528
+ @name = name
3529
+ @multi_platform = options.fetch(:multi_platform, true)
3530
+ @root_only = options.fetch(:root_only, false)
3531
+ @inherited = options.fetch(:inherited, @root_only)
3532
+ @singularize = options.fetch(:singularize, false)
3533
+ @container = options.fetch(:container, nil)
3534
+ @default_value = options.fetch(:default_value, nil)
3535
+ @types = options.fetch(:types, [String])
3536
+ end
3537
+ def multi_platform?
3538
+ @multi_platform
3539
+ end
3540
+ def root_only?
3541
+ @root_only
3542
+ end
3543
+ def inherited?
3544
+ @inherited
3545
+ end
3546
+ def writer_name
3547
+ "#{name}="
3548
+ end
3549
+ def writer_singular_form
3550
+ "#{SINGULAR.fetch(name)}=" if @singularize
3551
+ end
3552
+ def default(platform = nil)
3553
+ @default_value
3554
+ end
3555
+ end
3556
+
3557
+ def self.attributes
3558
+ @attributes
3559
+ end
3560
+ def self.attribute(name, options = {})
3561
+ @attributes ||= {}
3562
+ @attributes[name] = Attribute.new(name, options)
3563
+ end
3564
+ def self.root_attribute(name, options = {})
3565
+ options[:root_only] = true
3566
+ options[:multi_platform] = false
3567
+ attribute(name, options)
3568
+ end
3569
+
3570
+ attribute :name, :inherited => false, :multi_platform => false
3571
+ root_attribute :version
3572
+ root_attribute :swift_versions, :container => Array, :singularize => true
3573
+ root_attribute :cocoapods_version
3574
+ root_attribute :authors, :types => [String, Array, Hash], :container => Hash, :singularize => true
3575
+ root_attribute :social_media_url
3576
+ root_attribute :license, :container => Hash
3577
+ root_attribute :homepage
3578
+ root_attribute :readme
3579
+ root_attribute :changelog
3580
+ root_attribute :source, :container => Hash
3581
+ root_attribute :summary
3582
+ root_attribute :description
3583
+ root_attribute :screenshots, :singularize => true, :container => Array
3584
+ root_attribute :documentation_url
3585
+ root_attribute :prepare_command
3586
+ root_attribute :static_framework, :types => [TrueClass, FalseClass], :default_value => false
3587
+ root_attribute :deprecated, :types => [TrueClass, FalseClass], :default_value => false
3588
+ root_attribute :deprecated_in_favor_of
3589
+ attribute :platforms, :container => Hash, :multi_platform => false, :inherited => true
3590
+ attribute :dependencies, :container => Hash, :inherited => true
3591
+ attribute :info_plist, :container => Hash, :inherited => false
3592
+ attribute :requires_arc, :types => [TrueClass, FalseClass, String, Array], :default_value => true, :inherited => true
3593
+ attribute :frameworks, :container => Array, :singularize => true, :inherited => true
3594
+ attribute :weak_frameworks, :container => Array, :singularize => true, :inherited => true
3595
+ attribute :libraries, :container => Array, :singularize => true, :inherited => true
3596
+ attribute :compiler_flags, :container => Array, :singularize => true, :inherited => true
3597
+ attribute :pod_target_xcconfig, :container => Hash, :inherited => true
3598
+ attribute :user_target_xcconfig, :container => Hash, :inherited => true
3599
+ attribute :prefix_header_contents, :types => [Array, String], :inherited => true
3600
+ attribute :prefix_header_file, :types => [TrueClass, FalseClass, String], :inherited => true
3601
+ root_attribute :module_name
3602
+ attribute :header_dir, :inherited => true
3603
+ attribute :header_mappings_dir, :inherited => true
3604
+ attribute :script_phases, :types => [Hash], :container => Array, :singularize => true
3605
+ attribute :source_files, :container => Array
3606
+ attribute :public_header_files, :container => Array
3607
+ attribute :project_header_files, :container => Array
3608
+ attribute :private_header_files, :container => Array
3609
+ attribute :vendored_frameworks, :container => Array, :singularize => true
3610
+ attribute :vendored_libraries, :container => Array, :singularize => true
3611
+ attribute :on_demand_resources, :types => [String, Array, Hash], :container => Hash, :singularize => true
3612
+ attribute :resource_bundles, :types => [String, Array], :container => Hash, :singularize => true
3613
+ attribute :resources, :container => Array, :singularize => true
3614
+ attribute :exclude_files, :container => Array
3615
+ attribute :preserve_paths, :container => Array, :singularize => true
3616
+ attribute :module_map, :types => [TrueClass, FalseClass, String], :root_only => true
3617
+ attribute :test_type, :types => [Symbol, String], :multi_platform => false
3618
+ attribute :requires_app_host, :types => [TrueClass, FalseClass], :default_value => false
3619
+ attribute :app_host_name, :types => [String]
3620
+ attribute :scheme, :types => [Hash], :container => Hash
3621
+ root_attribute :default_subspecs, :container => Array, :types => [Array, String, Symbol], :singularize => true
3622
+ attribute :xcconfig, :container => Hash, :inherited => true
3623
+
3624
+ class PlatformProxy
3625
+ attr_accessor :spec
3626
+ attr_reader :platform
3627
+ def initialize(spec, platform)
3628
+ @spec = spec
3629
+ @platform = platform
3630
+ end
3631
+ def method_missing(meth, *args, &block)
3632
+ attribute = attribute_for_method(meth)
3633
+ raise NoMethodError, "undefined method '#{meth}' for #{self}" unless attribute
3634
+ raise NoMethodError, "#{attribute} cannot be set per-platform" unless attribute.multi_platform?
3635
+ spec.store_attribute(attribute.name, args.first, platform)
3636
+ end
3637
+ def respond_to_missing?(method, include_all)
3638
+ attribute = attribute_for_method(method)
3639
+ (attribute && attribute.multi_platform?) || false
3640
+ end
3641
+ def dependency(*args)
3642
+ name, *version_requirements = args
3643
+ platform_name = platform.to_s
3644
+ platform_hash = spec.attributes_hash[platform_name] || {}
3645
+ platform_hash['dependencies'] ||= {}
3646
+ platform_hash['dependencies'][name] = version_requirements
3647
+ spec.attributes_hash[platform_name] = platform_hash
3648
+ end
3649
+ def deployment_target=(value)
3650
+ platform_name = platform.to_s
3651
+ spec.attributes_hash['platforms'] ||= {}
3652
+ spec.attributes_hash['platforms'][platform_name] = value
3653
+ end
3654
+ private
3655
+ def attribute_for_method(method)
3656
+ method = method.to_sym
3657
+ Specification::DSL.attributes.values.find do |attribute|
3658
+ if attribute.writer_name.to_sym == method
3659
+ true
3660
+ elsif attribute.writer_singular_form
3661
+ attribute.writer_singular_form.to_sym == method
3662
+ end
3663
+ end
3664
+ end
3665
+ end
3666
+ end
3667
+
3668
+ class Consumer
3669
+ attr_reader :spec, :platform_name
3670
+ def initialize(spec, platform)
3671
+ @spec = spec
3672
+ @platform_name = platform.respond_to?(:name) ? platform.name : platform
3673
+ end
3674
+
3675
+ def self.spec_attr_accessor(attr_name)
3676
+ define_method(attr_name) do
3677
+ value_for_attribute(attr_name)
3678
+ end
3679
+ end
3680
+
3681
+ spec_attr_accessor :requires_arc
3682
+ spec_attr_accessor :frameworks
3683
+ spec_attr_accessor :weak_frameworks
3684
+ spec_attr_accessor :libraries
3685
+ spec_attr_accessor :compiler_flags
3686
+ spec_attr_accessor :info_plist
3687
+ spec_attr_accessor :prefix_header_contents
3688
+ spec_attr_accessor :prefix_header_file
3689
+ spec_attr_accessor :module_name
3690
+ spec_attr_accessor :module_map
3691
+ spec_attr_accessor :header_dir
3692
+ spec_attr_accessor :header_mappings_dir
3693
+ spec_attr_accessor :requires_app_host
3694
+ spec_attr_accessor :app_host_name
3695
+ spec_attr_accessor :source_files
3696
+ spec_attr_accessor :public_header_files
3697
+ spec_attr_accessor :project_header_files
3698
+ spec_attr_accessor :private_header_files
3699
+ spec_attr_accessor :vendored_frameworks
3700
+ spec_attr_accessor :vendored_libraries
3701
+ spec_attr_accessor :resources
3702
+ spec_attr_accessor :exclude_files
3703
+ spec_attr_accessor :preserve_paths
3704
+
3705
+ def pod_target_xcconfig
3706
+ attr = Specification::DSL.attributes[:pod_target_xcconfig]
3707
+ merge_values(attr, value_for_attribute(:xcconfig), value_for_attribute(:pod_target_xcconfig))
3708
+ end
3709
+
3710
+ def user_target_xcconfig
3711
+ attr = Specification::DSL.attributes[:user_target_xcconfig]
3712
+ merge_values(attr, value_for_attribute(:xcconfig), value_for_attribute(:user_target_xcconfig))
3713
+ end
3714
+
3715
+ def dependencies
3716
+ value = value_for_attribute(:dependencies)
3717
+ value.map do |name, requirements|
3718
+ Dependency.new(name, requirements)
3719
+ end
3720
+ end
3721
+
3722
+ def value_for_attribute(attr_name)
3723
+ attr = Specification::DSL.attributes[attr_name]
3724
+ value = value_with_inheritance(spec, attr)
3725
+ value = attr.default(platform_name) if value.nil?
3726
+ value = attr.container.new if value.nil? && attr.container
3727
+ value
3728
+ end
3729
+
3730
+ def value_with_inheritance(the_spec, attr)
3731
+ value = raw_value_for_attribute(the_spec, attr)
3732
+ if the_spec.root? || !attr.inherited?
3733
+ return value
3734
+ end
3735
+ parent_value = value_with_inheritance(the_spec.parent, attr)
3736
+ merge_values(attr, parent_value, value)
3737
+ end
3738
+
3739
+ def raw_value_for_attribute(the_spec, attr)
3740
+ value = the_spec.attributes_hash[attr.name.to_s]
3741
+ value = prepare_value(attr, value)
3742
+ if attr.multi_platform?
3743
+ if platform_hash = the_spec.attributes_hash[platform_name.to_s]
3744
+ platform_value = platform_hash[attr.name.to_s]
3745
+ platform_value = prepare_value(attr, platform_value)
3746
+ value = merge_values(attr, value, platform_value)
3747
+ end
3748
+ end
3749
+ value
3750
+ end
3751
+
3752
+ def merge_values(attr, existing_value, new_value)
3753
+ return existing_value if new_value.nil?
3754
+ return new_value if existing_value.nil?
3755
+ if attr.types.include?(TrueClass)
3756
+ new_value.nil? ? existing_value : new_value
3757
+ elsif attr.container == Array
3758
+ r = [*existing_value] + [*new_value]
3759
+ r.compact
3760
+ elsif attr.container == Hash
3761
+ existing_value.merge(new_value) do |_, old, new|
3762
+ merge_hash_value(attr, old, new)
3763
+ end
3764
+ else
3765
+ new_value
3766
+ end
3767
+ end
3768
+
3769
+ def prepare_value(attr, value)
3770
+ if attr.container == Array
3771
+ value = if value.is_a?(Hash)
3772
+ [value]
3773
+ else
3774
+ [*value].compact
3775
+ end
3776
+ end
3777
+ value
3778
+ end
3779
+
3780
+ private
3781
+
3782
+ def merge_hash_value(attr, old, new)
3783
+ if attr.name == :info_plist
3784
+ new
3785
+ elsif spec.non_library_specification? && [:pod_target_xcconfig, :user_target_xcconfig, :xcconfig].include?(attr.name)
3786
+ new
3787
+ elsif new.is_a?(Array) || old.is_a?(Array)
3788
+ r = Array(old) + Array(new)
3789
+ r.compact
3790
+ else
3791
+ old + ' ' + new
3792
+ end
3793
+ end
3794
+ end
3795
+
3796
+ attr_reader :parent
3797
+ attr_accessor :attributes_hash, :subspecs, :test_specification, :app_specification, :defined_in_file
3798
+ alias_method :test_specification?, :test_specification
3799
+ alias_method :app_specification?, :app_specification
3800
+
3801
+ def initialize(parent = nil, name = nil, test_specification = false, app_specification: false)
3802
+ raise StandardError, "#{self} can not be both an app and test specification." if test_specification && app_specification
3803
+ @attributes_hash = {}
3804
+ @subspecs = []
3805
+ @consumers = {}
3806
+ @parent = parent
3807
+ @test_specification = test_specification
3808
+ @app_specification = app_specification
3809
+ attributes_hash['name'] = name
3810
+ attributes_hash['test_type'] = :unit if test_specification
3811
+ yield self if block_given?
3812
+ end
3813
+
3814
+ def to_s
3815
+ specified_version = attributes_hash['version'] || ''
3816
+ if name && !specified_version.to_s.empty?
3817
+ "#{name} (#{specified_version})"
3818
+ elsif name
3819
+ name
3820
+ else
3821
+ 'No-name'
3822
+ end
3823
+ end
3824
+
3825
+ def inspect
3826
+ "#<#{self.class.name} name=#{name.inspect}>"
3827
+ end
3828
+
3829
+ def base_name
3830
+ attributes_hash['name']
3831
+ end
3832
+
3833
+ def name
3834
+ parent ? "#{parent.name}/#{base_name}" : base_name
3835
+ end
3836
+
3837
+ def name=(name)
3838
+ attributes_hash['name'] = name
3839
+ end
3840
+
3841
+ def root
3842
+ parent ? parent.root : self
3843
+ end
3844
+
3845
+ def root?
3846
+ parent.nil?
3847
+ end
3848
+
3849
+ def subspec?
3850
+ !parent.nil?
3851
+ end
3852
+
3853
+ def spec_type
3854
+ return :test if test_specification?
3855
+ return :app if app_specification?
3856
+ :library
3857
+ end
3858
+
3859
+ def library_specification?
3860
+ !app_specification? && !test_specification?
3861
+ end
3862
+
3863
+ def non_library_specification?
3864
+ !library_specification?
3865
+ end
3866
+
3867
+ def version
3868
+ if root?
3869
+ @version ||= Version.new(attributes_hash['version'])
3870
+ else
3871
+ @version ||= root.version
3872
+ end
3873
+ end
3874
+
3875
+ def requires_arc
3876
+ attributes_hash['requires_arc']
3877
+ end
3878
+
3879
+ def swift_version
3880
+ swift_versions.last
3881
+ end
3882
+
3883
+ def swift_versions
3884
+ @swift_versions ||= begin
3885
+ swift_versions = Array(attributes_hash['swift_versions']).dup
3886
+ swift_versions << attributes_hash['swift_version'] unless attributes_hash['swift_version'].nil?
3887
+ swift_versions.map { |swift_version| Version.new(swift_version) }.uniq.sort
3888
+ end
3889
+ end
3890
+
3891
+ def module_name
3892
+ attributes_hash['module_name'] || name.split('/').first.gsub(/^([0-9])/, '_\1').gsub(/[^a-zA-Z0-9_]/, '_').gsub(/_+/, '_')
3893
+ end
3894
+
3895
+ def homepage
3896
+ attributes_hash['homepage']
3897
+ end
3898
+
3899
+ def summary
3900
+ attributes_hash['summary']
3901
+ end
3902
+
3903
+ def source
3904
+ value = attributes_hash['source']
3905
+ value && value.is_a?(Hash) ? Specification.convert_keys_to_symbol(value) : value
3906
+ end
3907
+
3908
+ def default_subspecs
3909
+ value = Array(attributes_hash['default_subspecs'])
3910
+ first = value.first
3911
+ if first == :none || first == 'none'
3912
+ first.to_sym
3913
+ else
3914
+ value
3915
+ end
3916
+ end
3917
+
3918
+ def dependencies(platform = nil)
3919
+ if platform
3920
+ consumer(platform).dependencies || []
3921
+ else
3922
+ available_platforms.map do |spec_platform|
3923
+ consumer(spec_platform).dependencies
3924
+ end.flatten.uniq
3925
+ end
3926
+ end
3927
+
3928
+ def consumer(platform)
3929
+ platform = platform.to_sym
3930
+ @consumers[platform] ||= Consumer.new(self, platform)
3931
+ end
3932
+
3933
+ def subspec_by_name(relative_name, raise_if_missing = true, include_non_library_specifications = false)
3934
+ if relative_name.nil? || relative_name == base_name
3935
+ self
3936
+ elsif relative_name.downcase == base_name.downcase
3937
+ raise Informative, "Trying to access a '#{relative_name}' specification from '#{base_name}', which has a different case."
3938
+ else
3939
+ remainder = relative_name[base_name.size + 1..-1]
3940
+ subspec_name = remainder.split('/').shift
3941
+ subspec = subspecs.find { |s| s.base_name == subspec_name && (include_non_library_specifications || !s.non_library_specification?) }
3942
+ unless subspec
3943
+ if raise_if_missing
3944
+ raise Informative, "Unable to find a specification named " \
3945
+ "'#{relative_name}' in '#{name} (#{version})'."
3946
+ else
3947
+ return nil
3948
+ end
3949
+ end
3950
+ subspec.subspec_by_name(remainder, raise_if_missing, include_non_library_specifications)
3951
+ end
3952
+ end
3953
+
3954
+ def available_platforms
3955
+ names = supported_platform_names
3956
+ names = DSL::PLATFORMS.map(&:to_s) if names.empty?
3957
+ names.map { |name| Platform.new(name, deployment_target(name)) }
3958
+ end
3959
+
3960
+ def supported_platform_names
3961
+ spec = self
3962
+ names = nil
3963
+ until spec.nil?
3964
+ if spec.attributes_hash['platforms']
3965
+ spec_platforms = spec.attributes_hash['platforms'].keys
3966
+ names = names.nil? ? spec_platforms : names & spec_platforms
3967
+ end
3968
+ spec = spec.parent
3969
+ end
3970
+ names || []
3971
+ end
3972
+
3973
+ def deployment_target(platform_name)
3974
+ result = platform_hash[platform_name.to_s]
3975
+ result ||= parent.deployment_target(platform_name) if parent
3976
+ result
3977
+ end
3978
+
3979
+ def platform_hash
3980
+ case value = attributes_hash['platforms']
3981
+ when String
3982
+ { value => nil }
3983
+ when Array
3984
+ result = {}
3985
+ value.each { |a| result[a] = nil }
3986
+ result
3987
+ when Hash
3988
+ value
3989
+ else
3990
+ {}
3991
+ end
3992
+ end
3993
+
3994
+ def store_attribute(name, value, platform_name = nil)
3995
+ name = name.to_s
3996
+ value = Specification.convert_keys_to_string(value) if value.is_a?(Hash)
3997
+ value = value.strip_heredoc.strip if value.respond_to?(:strip_heredoc)
3998
+ if platform_name
3999
+ platform_name = platform_name.to_s
4000
+ attributes_hash[platform_name] ||= {}
4001
+ attributes_hash[platform_name][name] = value
4002
+ else
4003
+ attributes_hash[name] = value
4004
+ end
4005
+ end
4006
+
4007
+ def self.convert_keys_to_string(value, recursive: true)
4008
+ return unless value
4009
+ result = {}
4010
+ value.each do |key, subvalue|
4011
+ subvalue = Specification.convert_keys_to_string(subvalue) if recursive && subvalue.is_a?(Hash)
4012
+ result[key.to_s] = subvalue
4013
+ end
4014
+ result
4015
+ end
4016
+
4017
+ def self.convert_keys_to_symbol(value, recursive: true)
4018
+ return unless value
4019
+ result = {}
4020
+ value.each do |key, subvalue|
4021
+ subvalue = Specification.convert_keys_to_symbol(subvalue) if recursive && subvalue.is_a?(Hash)
4022
+ result[key.to_sym] = subvalue
4023
+ end
4024
+ result
4025
+ end
4026
+
4027
+ DSL.attributes.values.each do |a|
4028
+ define_method(a.writer_name) do |value|
4029
+ store_attribute(a.name, value)
4030
+ end
4031
+ if a.writer_singular_form
4032
+ alias_method(a.writer_singular_form, a.writer_name)
4033
+ end
4034
+ end
4035
+
4036
+ def platform=(args)
4037
+ name, deployment_target = args
4038
+ name = :osx if name.to_s == 'macos'
4039
+ attributes_hash['platforms'] = if name
4040
+ { name.to_s => deployment_target }
4041
+ else
4042
+ {}
4043
+ end
4044
+ end
4045
+
4046
+ def deployment_target=(*_args)
4047
+ raise Informative, 'The deployment target can be declared only per platform.'
4048
+ end
4049
+
4050
+ def dependency(*args)
4051
+ name, *version_requirements = args
4052
+ if name == self.name
4053
+ raise Informative, "A specification can't require itself as a subspec"
4054
+ end
4055
+ if @parent
4056
+ composed_name = ''
4057
+ @parent.name.split('/').each do |component|
4058
+ composed_name << component
4059
+ if name == composed_name
4060
+ raise Informative, "A subspec can't require one of its parents specifications"
4061
+ else
4062
+ composed_name << '/'
4063
+ end
4064
+ end
4065
+ end
4066
+
4067
+ configurations_option = version_requirements.find { |option| option.is_a?(Hash) && option.key?(:configurations) }
4068
+ whitelisted_configurations = if configurations_option
4069
+ version_requirements.delete(configurations_option)
4070
+ Array(configurations_option.delete(:configurations)).map { |c| c.to_s.downcase }
4071
+ end
4072
+
4073
+ dependency_options = version_requirements.reject { |req| req.is_a?(String) }
4074
+ dependency_options.each do |dependency_option|
4075
+ if dependency_option.is_a?(Hash)
4076
+ if !dependency_option[:path].nil?
4077
+ raise Informative, 'Podspecs cannot specify the source of dependencies. The :path option is not supported.'
4078
+ elsif !dependency_option[:git].nil?
4079
+ raise Informative, 'Podspecs cannot specify the source of dependencies. The :git option is not supported.'
4080
+ end
4081
+ end
4082
+ raise Informative, "Unsupported version requirements. #{version_requirements.inspect} is not valid."
4083
+ end
4084
+
4085
+ attributes_hash['dependencies'] ||= {}
4086
+ attributes_hash['dependencies'][name] = version_requirements
4087
+
4088
+ unless whitelisted_configurations.nil?
4089
+ attributes_hash['configuration_pod_whitelist'] ||= {}
4090
+ attributes_hash['configuration_pod_whitelist'][name] = whitelisted_configurations
4091
+ end
4092
+ end
4093
+
4094
+ def dependency=(args)
4095
+ raise Informative, "Cannot assign value to dependency."
4096
+ end
4097
+
4098
+ def subspec(name, &block)
4099
+ subspec = Specification.new(self, name, &block)
4100
+ @subspecs << subspec
4101
+ subspec
4102
+ end
4103
+
4104
+ def test_spec(name = 'Tests', &block)
4105
+ subspec = Specification.new(self, name, true, &block)
4106
+ @subspecs << subspec
4107
+ subspec
4108
+ end
4109
+
4110
+ def app_spec(name = 'App', &block)
4111
+ appspec = Specification.new(self, name, :app_specification => true, &block)
4112
+ @subspecs << appspec
4113
+ appspec
4114
+ end
4115
+
4116
+ def ios
4117
+ DSL::PlatformProxy.new(self, :ios)
4118
+ end
4119
+ def osx
4120
+ DSL::PlatformProxy.new(self, :osx)
4121
+ end
4122
+ alias macos osx
4123
+ def tvos
4124
+ DSL::PlatformProxy.new(self, :tvos)
4125
+ end
4126
+ def visionos
4127
+ DSL::PlatformProxy.new(self, :visionos)
4128
+ end
4129
+ def watchos
4130
+ DSL::PlatformProxy.new(self, :watchos)
4131
+ end
4132
+
4133
+ def to_hash
4134
+ hash = attributes_hash.dup
4135
+ if root? || available_platforms != parent.available_platforms
4136
+ platforms = Hash[available_platforms.map { |p| [p.name.to_s, p.deployment_target && p.deployment_target.to_s] }]
4137
+ hash['platforms'] = platforms
4138
+ end
4139
+ specs_by_type = subspecs.group_by(&:spec_type)
4140
+ all_appspecs = specs_by_type[:app] || []
4141
+ all_testspecs = specs_by_type[:test] || []
4142
+ all_subspecs = specs_by_type[:library] || []
4143
+ hash.delete('testspecs')
4144
+ hash['testspecs'] = all_testspecs.map(&:to_hash) unless all_testspecs.empty?
4145
+ hash.delete('appspecs')
4146
+ hash['appspecs'] = all_appspecs.map(&:to_hash) unless all_appspecs.empty?
4147
+ hash.delete('subspecs')
4148
+ hash['subspecs'] = all_subspecs.map(&:to_hash) unless all_subspecs.empty?
4149
+ hash.delete('swift_version')
4150
+ hash['swift_version'] = swift_version.to_s unless swift_version.nil?
4151
+ hash
4152
+ end
4153
+
4154
+ def to_json(*a)
4155
+ to_hash.to_json(*a)
4156
+ end
4157
+
4158
+ def self.from_hash(hash, parent = nil, test_specification: false, app_specification: false)
4159
+ attributes_hash = hash.dup
4160
+ spec = Specification.new(parent, nil, test_specification, :app_specification => app_specification)
4161
+ subspecs = attributes_hash.delete('subspecs')
4162
+ testspecs = attributes_hash.delete('testspecs')
4163
+ appspecs = attributes_hash.delete('appspecs')
4164
+ spec.test_specification = !attributes_hash['test_type'].nil?
4165
+ spec.attributes_hash = attributes_hash
4166
+ spec.subspecs.concat((subspecs || []).map { |s| from_hash(s, spec, test_specification: false, app_specification: false) })
4167
+ spec.subspecs.concat((testspecs || []).map { |s| from_hash(s, spec, test_specification: true, app_specification: false) })
4168
+ spec.subspecs.concat((appspecs || []).map { |s| from_hash(s, spec, test_specification: false, app_specification: true) })
4169
+ spec
4170
+ end
4171
+ end
4172
+ Spec = Specification
4173
+
4174
+ def self.peach_evaluated(spec)
4175
+ consumer = spec.consumer(:ios)
4176
+ result = {'name' => spec.name.split('/').last}
4177
+ %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|
4178
+ value = consumer.public_send(attribute)
4179
+ result[attribute] = value unless value.nil?
4180
+ end
4181
+ result['default_subspecs'] = spec.attributes_hash['default_subspecs'] if spec.attributes_hash.key?('default_subspecs')
4182
+ result['dependencies'] = consumer.dependencies.to_h { |dependency| [dependency.name, dependency.requirement.requirements.map { |operator, version| "#{operator} #{version}" }] }
4183
+ result['swift_versions'] = spec.swift_versions.map(&:to_s) if spec.swift_versions
4184
+ result['subspecs'] = spec.subspecs.select(&:library_specification?).map { |child| peach_evaluated(child) }
4185
+ result
4186
+ end
4187
+ end
4188
+ `;
3455
4189
  }
3456
4190
  });
3457
4191
 
@@ -3463,40 +4197,40 @@ var init_workspace_root = __esm({
3463
4197
  });
3464
4198
 
3465
4199
  // src/podspec-sources.ts
3466
- var import_zod2, pathsSchema, attributesSchema, evaluatedSpecSchema, podspecReceiptSchema;
4200
+ var import_zod, pathsSchema, attributesSchema, evaluatedSpecSchema, podspecReceiptSchema;
3467
4201
  var init_podspec_sources = __esm({
3468
4202
  "src/podspec-sources.ts"() {
3469
4203
  "use strict";
3470
- import_zod2 = require("zod");
3471
- init_linux_cocoapods();
4204
+ import_zod = require("zod");
3472
4205
  init_home_paths();
4206
+ init_podspec_cocoapods();
3473
4207
  init_workspace_root();
3474
- pathsSchema = import_zod2.z.union([import_zod2.z.string(), import_zod2.z.array(import_zod2.z.string())]);
3475
- attributesSchema = import_zod2.z.object({
3476
- name: import_zod2.z.string().min(1),
4208
+ pathsSchema = import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]);
4209
+ attributesSchema = import_zod.z.object({
4210
+ name: import_zod.z.string().min(1),
3477
4211
  source_files: pathsSchema,
3478
4212
  exclude_files: pathsSchema,
3479
4213
  public_header_files: pathsSchema,
3480
4214
  private_header_files: pathsSchema,
3481
- header_mappings_dir: import_zod2.z.string().optional(),
3482
- header_dir: import_zod2.z.string().optional(),
3483
- module_name: import_zod2.z.string().optional(),
4215
+ header_mappings_dir: import_zod.z.string().optional(),
4216
+ header_dir: import_zod.z.string().optional(),
4217
+ module_name: import_zod.z.string().optional(),
3484
4218
  vendored_frameworks: pathsSchema,
3485
4219
  vendored_libraries: pathsSchema,
3486
4220
  default_subspecs: pathsSchema.optional(),
3487
- swift_versions: import_zod2.z.array(import_zod2.z.string()).optional(),
3488
- dependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.array(import_zod2.z.string())),
3489
- pod_target_xcconfig: import_zod2.z.record(import_zod2.z.string(), pathsSchema).optional()
4221
+ swift_versions: import_zod.z.array(import_zod.z.string()).optional(),
4222
+ dependencies: import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.string())),
4223
+ pod_target_xcconfig: import_zod.z.record(import_zod.z.string(), pathsSchema).optional()
3490
4224
  });
3491
- evaluatedSpecSchema = import_zod2.z.lazy(
4225
+ evaluatedSpecSchema = import_zod.z.lazy(
3492
4226
  () => attributesSchema.extend({
3493
- subspecs: import_zod2.z.array(evaluatedSpecSchema).optional()
4227
+ subspecs: import_zod.z.array(evaluatedSpecSchema).optional()
3494
4228
  })
3495
4229
  );
3496
- podspecReceiptSchema = import_zod2.z.object({
3497
- key: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
3498
- environment: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
3499
- app: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
4230
+ podspecReceiptSchema = import_zod.z.object({
4231
+ key: import_zod.z.string().regex(/^[a-f0-9]{64}$/),
4232
+ environment: import_zod.z.string().regex(/^[a-f0-9]{64}$/),
4233
+ app: import_zod.z.string().regex(/^[a-f0-9]{64}$/),
3500
4234
  spec: evaluatedSpecSchema
3501
4235
  });
3502
4236
  }
@@ -3641,11 +4375,11 @@ var init_react_native_autolinking = __esm({
3641
4375
  });
3642
4376
 
3643
4377
  // src/nitro-source.ts
3644
- var import_zod4;
4378
+ var import_zod3;
3645
4379
  var init_nitro_source = __esm({
3646
4380
  "src/nitro-source.ts"() {
3647
4381
  "use strict";
3648
- import_zod4 = require("zod");
4382
+ import_zod3 = require("zod");
3649
4383
  init_nitro_dependencies();
3650
4384
  init_podspec_sources();
3651
4385
  init_react_native_autolinking();
@@ -3687,6 +4421,23 @@ var init_nitroContract = __esm({
3687
4421
  }
3688
4422
  });
3689
4423
 
4424
+ // src/public-brand.ts
4425
+ var name, peachPublicBrand;
4426
+ var init_public_brand = __esm({
4427
+ "src/public-brand.ts"() {
4428
+ "use strict";
4429
+ name = "Peach";
4430
+ peachPublicBrand = Object.freeze({
4431
+ name,
4432
+ packageName: "peachsim",
4433
+ commandName: "peach",
4434
+ domain: "peachsim.com",
4435
+ origin: "https://peachsim.com",
4436
+ boxOrigin: "https://rnx-box.contrast.dev"
4437
+ });
4438
+ }
4439
+ });
4440
+
3690
4441
  // src/plist-bytes.ts
3691
4442
  var import_bplist_parser;
3692
4443
  var init_plist_bytes = __esm({
@@ -3950,7 +4701,7 @@ var init_react_native_core = __esm({
3950
4701
  init_swift_distribution();
3951
4702
  init_swift_package();
3952
4703
  init_swiftContract();
3953
- recipe = true ? "6425ef9cf485d8d9b2637bfd86f1dadd809b8afa3b62c607c10e5bc1882e0741" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
4704
+ recipe = true ? "69b07e9fa50c2e82ce458ed542c4e01980e8abeab0261d9176395a3348963751" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
3954
4705
  }
3955
4706
  });
3956
4707
 
@@ -4008,6 +4759,29 @@ var init_swift_cxx_reachable = __esm({
4008
4759
  }
4009
4760
  });
4010
4761
 
4762
+ // cli/internal-child-contract.ts
4763
+ var init_internal_child_contract = __esm({
4764
+ "cli/internal-child-contract.ts"() {
4765
+ "use strict";
4766
+ }
4767
+ });
4768
+
4769
+ // cli/standalone.ts
4770
+ var init_standalone = __esm({
4771
+ "cli/standalone.ts"() {
4772
+ "use strict";
4773
+ }
4774
+ });
4775
+
4776
+ // cli/self-invocation.ts
4777
+ var init_self_invocation = __esm({
4778
+ "cli/self-invocation.ts"() {
4779
+ "use strict";
4780
+ init_public_brand();
4781
+ init_standalone();
4782
+ }
4783
+ });
4784
+
4011
4785
  // src/swift-pdf-raster.ts
4012
4786
  var init_swift_pdf_raster = __esm({
4013
4787
  "src/swift-pdf-raster.ts"() {
@@ -5098,13 +5872,13 @@ var Collection = class extends NodeBase {
5098
5872
  };
5099
5873
 
5100
5874
  // ../../node_modules/yaml/browser/dist/stringify/stringifyComment.js
5101
- var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
5875
+ var stringifyComment = (str3) => str3.replace(/^(?!$)(?: $)?/gm, "#");
5102
5876
  function indentComment(comment, indent) {
5103
5877
  if (/^\n+$/.test(comment))
5104
5878
  return comment.substring(1);
5105
5879
  return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
5106
5880
  }
5107
- var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
5881
+ var lineComment = (str3, indent, comment) => str3.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str3.endsWith(" ") ? "" : " ") + comment;
5108
5882
 
5109
5883
  // ../../node_modules/yaml/browser/dist/stringify/foldFlowLines.js
5110
5884
  var FOLD_FLOW = "flow";
@@ -5239,16 +6013,16 @@ var getFoldOptions = (ctx, isBlock) => ({
5239
6013
  lineWidth: ctx.options.lineWidth,
5240
6014
  minContentWidth: ctx.options.minContentWidth
5241
6015
  });
5242
- var containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2);
5243
- function lineLengthOverLimit(str2, lineWidth, indentLength) {
6016
+ var containsDocumentMarker = (str3) => /^(%|---|\.\.\.)/m.test(str3);
6017
+ function lineLengthOverLimit(str3, lineWidth, indentLength) {
5244
6018
  if (!lineWidth || lineWidth < 0)
5245
6019
  return false;
5246
6020
  const limit = lineWidth - indentLength;
5247
- const strLen = str2.length;
6021
+ const strLen = str3.length;
5248
6022
  if (strLen <= limit)
5249
6023
  return false;
5250
6024
  for (let i = 0, start = 0; i < strLen; ++i) {
5251
- if (str2[i] === "\n") {
6025
+ if (str3[i] === "\n") {
5252
6026
  if (i - start > limit)
5253
6027
  return true;
5254
6028
  start = i + 1;
@@ -5265,11 +6039,11 @@ function doubleQuotedString(value, ctx) {
5265
6039
  const { implicitKey } = ctx;
5266
6040
  const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
5267
6041
  const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
5268
- let str2 = "";
6042
+ let str3 = "";
5269
6043
  let start = 0;
5270
6044
  for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
5271
6045
  if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
5272
- str2 += json.slice(start, i) + "\\ ";
6046
+ str3 += json.slice(start, i) + "\\ ";
5273
6047
  i += 1;
5274
6048
  start = i;
5275
6049
  ch = "\\";
@@ -5278,38 +6052,38 @@ function doubleQuotedString(value, ctx) {
5278
6052
  switch (json[i + 1]) {
5279
6053
  case "u":
5280
6054
  {
5281
- str2 += json.slice(start, i);
6055
+ str3 += json.slice(start, i);
5282
6056
  const code = json.substr(i + 2, 4);
5283
6057
  switch (code) {
5284
6058
  case "0000":
5285
- str2 += "\\0";
6059
+ str3 += "\\0";
5286
6060
  break;
5287
6061
  case "0007":
5288
- str2 += "\\a";
6062
+ str3 += "\\a";
5289
6063
  break;
5290
6064
  case "000b":
5291
- str2 += "\\v";
6065
+ str3 += "\\v";
5292
6066
  break;
5293
6067
  case "001b":
5294
- str2 += "\\e";
6068
+ str3 += "\\e";
5295
6069
  break;
5296
6070
  case "0085":
5297
- str2 += "\\N";
6071
+ str3 += "\\N";
5298
6072
  break;
5299
6073
  case "00a0":
5300
- str2 += "\\_";
6074
+ str3 += "\\_";
5301
6075
  break;
5302
6076
  case "2028":
5303
- str2 += "\\L";
6077
+ str3 += "\\L";
5304
6078
  break;
5305
6079
  case "2029":
5306
- str2 += "\\P";
6080
+ str3 += "\\P";
5307
6081
  break;
5308
6082
  default:
5309
6083
  if (code.substr(0, 2) === "00")
5310
- str2 += "\\x" + code.substr(2);
6084
+ str3 += "\\x" + code.substr(2);
5311
6085
  else
5312
- str2 += json.substr(i, 6);
6086
+ str3 += json.substr(i, 6);
5313
6087
  }
5314
6088
  i += 5;
5315
6089
  start = i + 1;
@@ -5319,14 +6093,14 @@ function doubleQuotedString(value, ctx) {
5319
6093
  if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
5320
6094
  i += 1;
5321
6095
  } else {
5322
- str2 += json.slice(start, i) + "\n\n";
6096
+ str3 += json.slice(start, i) + "\n\n";
5323
6097
  while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
5324
- str2 += "\n";
6098
+ str3 += "\n";
5325
6099
  i += 2;
5326
6100
  }
5327
- str2 += indent;
6101
+ str3 += indent;
5328
6102
  if (json[i + 2] === " ")
5329
- str2 += "\\";
6103
+ str3 += "\\";
5330
6104
  i += 1;
5331
6105
  start = i + 1;
5332
6106
  }
@@ -5335,8 +6109,8 @@ function doubleQuotedString(value, ctx) {
5335
6109
  i += 1;
5336
6110
  }
5337
6111
  }
5338
- str2 = start ? str2 + json.slice(start) : json;
5339
- return implicitKey ? str2 : foldFlowLines(str2, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
6112
+ str3 = start ? str3 + json.slice(start) : json;
6113
+ return implicitKey ? str3 : foldFlowLines(str3, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
5340
6114
  }
5341
6115
  function singleQuotedString(value, ctx) {
5342
6116
  if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
@@ -5464,15 +6238,15 @@ function plainString(item, ctx, onComment, onChompKeep) {
5464
6238
  return quotedString(value, ctx);
5465
6239
  }
5466
6240
  }
5467
- const str2 = value.replace(/\n+/g, `$&
6241
+ const str3 = value.replace(/\n+/g, `$&
5468
6242
  ${indent}`);
5469
6243
  if (actualString) {
5470
- const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2);
6244
+ const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str3);
5471
6245
  const { compat, tags } = ctx.doc.schema;
5472
6246
  if (tags.some(test) || compat?.some(test))
5473
6247
  return quotedString(value, ctx);
5474
6248
  }
5475
- return implicitKey ? str2 : foldFlowLines(str2, indent, FOLD_FLOW, getFoldOptions(ctx, false));
6249
+ return implicitKey ? str3 : foldFlowLines(str3, indent, FOLD_FLOW, getFoldOptions(ctx, false));
5476
6250
  }
5477
6251
  function stringifyString(item, ctx, onComment, onChompKeep) {
5478
6252
  const { implicitKey, inFlow } = ctx;
@@ -5614,11 +6388,11 @@ function stringify(item, ctx, onComment, onChompKeep) {
5614
6388
  const props = stringifyProps(node, tagObj, ctx);
5615
6389
  if (props.length > 0)
5616
6390
  ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
5617
- const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
6391
+ const str3 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
5618
6392
  if (!props)
5619
- return str2;
5620
- return isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props}
5621
- ${ctx.indent}${str2}`;
6393
+ return str3;
6394
+ return isScalar(node) || str3[0] === "{" || str3[0] === "[" ? `${props} ${str3}` : `${props}
6395
+ ${ctx.indent}${str3}`;
5622
6396
  }
5623
6397
 
5624
6398
  // ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
@@ -5642,8 +6416,8 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
5642
6416
  });
5643
6417
  let keyCommentDone = false;
5644
6418
  let chompKeep = false;
5645
- let str2 = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
5646
- if (!explicitKey && !ctx.inFlow && str2.length > 1024) {
6419
+ let str3 = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
6420
+ if (!explicitKey && !ctx.inFlow && str3.length > 1024) {
5647
6421
  if (simpleKeys)
5648
6422
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
5649
6423
  explicitKey = true;
@@ -5652,27 +6426,27 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
5652
6426
  if (allNullValues || value == null) {
5653
6427
  if (keyCommentDone && onComment)
5654
6428
  onComment();
5655
- return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2;
6429
+ return str3 === "" ? "?" : explicitKey ? `? ${str3}` : str3;
5656
6430
  }
5657
6431
  } else if (allNullValues && !simpleKeys || value == null && explicitKey) {
5658
- str2 = `? ${str2}`;
6432
+ str3 = `? ${str3}`;
5659
6433
  if (keyComment && !keyCommentDone) {
5660
- str2 += lineComment(str2, ctx.indent, commentString(keyComment));
6434
+ str3 += lineComment(str3, ctx.indent, commentString(keyComment));
5661
6435
  } else if (chompKeep && onChompKeep)
5662
6436
  onChompKeep();
5663
- return str2;
6437
+ return str3;
5664
6438
  }
5665
6439
  if (keyCommentDone)
5666
6440
  keyComment = null;
5667
6441
  if (explicitKey) {
5668
6442
  if (keyComment)
5669
- str2 += lineComment(str2, ctx.indent, commentString(keyComment));
5670
- str2 = `? ${str2}
6443
+ str3 += lineComment(str3, ctx.indent, commentString(keyComment));
6444
+ str3 = `? ${str3}
5671
6445
  ${indent}:`;
5672
6446
  } else {
5673
- str2 = `${str2}:`;
6447
+ str3 = `${str3}:`;
5674
6448
  if (keyComment)
5675
- str2 += lineComment(str2, ctx.indent, commentString(keyComment));
6449
+ str3 += lineComment(str3, ctx.indent, commentString(keyComment));
5676
6450
  }
5677
6451
  let vsb, vcb, valueComment;
5678
6452
  if (isNode(value)) {
@@ -5688,7 +6462,7 @@ ${indent}:`;
5688
6462
  }
5689
6463
  ctx.implicitKey = false;
5690
6464
  if (!explicitKey && !keyComment && isScalar(value))
5691
- ctx.indentAtStart = str2.length + 1;
6465
+ ctx.indentAtStart = str3.length + 1;
5692
6466
  chompKeep = false;
5693
6467
  if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
5694
6468
  ctx.indent = ctx.indent.substring(2);
@@ -5732,16 +6506,16 @@ ${ctx.indent}`;
5732
6506
  } else if (valueStr === "" || valueStr[0] === "\n") {
5733
6507
  ws = "";
5734
6508
  }
5735
- str2 += ws + valueStr;
6509
+ str3 += ws + valueStr;
5736
6510
  if (ctx.inFlow) {
5737
6511
  if (valueCommentDone && onComment)
5738
6512
  onComment();
5739
6513
  } else if (valueComment && !valueCommentDone) {
5740
- str2 += lineComment(str2, ctx.indent, commentString(valueComment));
6514
+ str3 += lineComment(str3, ctx.indent, commentString(valueComment));
5741
6515
  } else if (chompKeep && onChompKeep) {
5742
6516
  onChompKeep();
5743
6517
  }
5744
- return str2;
6518
+ return str3;
5745
6519
  }
5746
6520
 
5747
6521
  // ../../node_modules/yaml/browser/dist/log.js
@@ -5912,31 +6686,31 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
5912
6686
  }
5913
6687
  }
5914
6688
  chompKeep = false;
5915
- let str3 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
6689
+ let str4 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
5916
6690
  if (comment2)
5917
- str3 += lineComment(str3, itemIndent, commentString(comment2));
6691
+ str4 += lineComment(str4, itemIndent, commentString(comment2));
5918
6692
  if (chompKeep && comment2)
5919
6693
  chompKeep = false;
5920
- lines.push(blockItemPrefix + str3);
6694
+ lines.push(blockItemPrefix + str4);
5921
6695
  }
5922
- let str2;
6696
+ let str3;
5923
6697
  if (lines.length === 0) {
5924
- str2 = flowChars.start + flowChars.end;
6698
+ str3 = flowChars.start + flowChars.end;
5925
6699
  } else {
5926
- str2 = lines[0];
6700
+ str3 = lines[0];
5927
6701
  for (let i = 1; i < lines.length; ++i) {
5928
6702
  const line = lines[i];
5929
- str2 += line ? `
6703
+ str3 += line ? `
5930
6704
  ${indent}${line}` : "\n";
5931
6705
  }
5932
6706
  }
5933
6707
  if (comment) {
5934
- str2 += "\n" + indentComment(commentString(comment), indent);
6708
+ str3 += "\n" + indentComment(commentString(comment), indent);
5935
6709
  if (onComment)
5936
6710
  onComment();
5937
6711
  } else if (chompKeep && onChompKeep)
5938
6712
  onChompKeep();
5939
- return str2;
6713
+ return str3;
5940
6714
  }
5941
6715
  function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
5942
6716
  const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
@@ -5979,21 +6753,21 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
5979
6753
  }
5980
6754
  if (comment)
5981
6755
  reqNewline = true;
5982
- let str2 = stringify(item, itemCtx, () => comment = null);
5983
- reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n"));
6756
+ let str3 = stringify(item, itemCtx, () => comment = null);
6757
+ reqNewline || (reqNewline = lines.length > linesAtValue || str3.includes("\n"));
5984
6758
  if (i < items.length - 1) {
5985
- str2 += ",";
6759
+ str3 += ",";
5986
6760
  } else if (ctx.options.trailingComma) {
5987
6761
  if (ctx.options.lineWidth > 0) {
5988
- reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx.options.lineWidth);
6762
+ reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str3.length + 2) > ctx.options.lineWidth);
5989
6763
  }
5990
6764
  if (reqNewline) {
5991
- str2 += ",";
6765
+ str3 += ",";
5992
6766
  }
5993
6767
  }
5994
6768
  if (comment)
5995
- str2 += lineComment(str2, itemIndent, commentString(comment));
5996
- lines.push(str2);
6769
+ str3 += lineComment(str3, itemIndent, commentString(comment));
6770
+ lines.push(str3);
5997
6771
  linesAtValue = lines.length;
5998
6772
  }
5999
6773
  const { start, end } = flowChars;
@@ -6005,11 +6779,11 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
6005
6779
  reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
6006
6780
  }
6007
6781
  if (reqNewline) {
6008
- let str2 = start;
6782
+ let str3 = start;
6009
6783
  for (const line of lines)
6010
- str2 += line ? `
6784
+ str3 += line ? `
6011
6785
  ${indentStep}${indent}${line}` : "\n";
6012
- return `${str2}
6786
+ return `${str3}
6013
6787
  ${indent}${end}`;
6014
6788
  } else {
6015
6789
  return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
@@ -6298,7 +7072,7 @@ var jsonScalars = [
6298
7072
  identify: (value) => typeof value === "string",
6299
7073
  default: true,
6300
7074
  tag: "tag:yaml.org,2002:str",
6301
- resolve: (str2) => str2,
7075
+ resolve: (str3) => str3,
6302
7076
  stringify: stringifyJSON
6303
7077
  },
6304
7078
  {
@@ -6315,7 +7089,7 @@ var jsonScalars = [
6315
7089
  default: true,
6316
7090
  tag: "tag:yaml.org,2002:bool",
6317
7091
  test: /^true$|^false$/,
6318
- resolve: (str2) => str2 === "true",
7092
+ resolve: (str3) => str3 === "true",
6319
7093
  stringify: stringifyJSON
6320
7094
  },
6321
7095
  {
@@ -6323,7 +7097,7 @@ var jsonScalars = [
6323
7097
  default: true,
6324
7098
  tag: "tag:yaml.org,2002:int",
6325
7099
  test: /^-?(?:0|[1-9][0-9]*)$/,
6326
- resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10),
7100
+ resolve: (str3, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str3) : parseInt(str3, 10),
6327
7101
  stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
6328
7102
  },
6329
7103
  {
@@ -6331,7 +7105,7 @@ var jsonScalars = [
6331
7105
  default: true,
6332
7106
  tag: "tag:yaml.org,2002:float",
6333
7107
  test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
6334
- resolve: (str2) => parseFloat(str2),
7108
+ resolve: (str3) => parseFloat(str3),
6335
7109
  stringify: stringifyJSON
6336
7110
  }
6337
7111
  ];
@@ -6339,9 +7113,9 @@ var jsonError = {
6339
7113
  default: true,
6340
7114
  tag: "",
6341
7115
  test: /^/,
6342
- resolve(str2, onError) {
6343
- onError(`Unresolved plain scalar ${JSON.stringify(str2)}`);
6344
- return str2;
7116
+ resolve(str3, onError) {
7117
+ onError(`Unresolved plain scalar ${JSON.stringify(str3)}`);
7118
+ return str3;
6345
7119
  }
6346
7120
  };
6347
7121
  var schema = [map, seq].concat(jsonScalars, jsonError);
@@ -6485,9 +7259,9 @@ var YAMLSet = class _YAMLSet extends YAMLMap {
6485
7259
  YAMLSet.tag = "tag:yaml.org,2002:set";
6486
7260
 
6487
7261
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
6488
- function parseSexagesimal(str2, asBigInt) {
6489
- const sign = str2[0];
6490
- const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
7262
+ function parseSexagesimal(str3, asBigInt) {
7263
+ const sign = str3[0];
7264
+ const parts = sign === "-" || sign === "+" ? str3.substring(1) : str3;
6491
7265
  const num = (n) => asBigInt ? BigInt(n) : Number(n);
6492
7266
  const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
6493
7267
  return sign === "-" ? num(-1) * res : res;
@@ -6500,8 +7274,8 @@ var timestamp = {
6500
7274
  // may be omitted altogether, resulting in a date format. In such a case, the time part is
6501
7275
  // assumed to be 00:00:00Z (start of day, UTC).
6502
7276
  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})?))?)?$"),
6503
- resolve(str2) {
6504
- const match = str2.match(timestamp.test);
7277
+ resolve(str3) {
7278
+ const match = str3.match(timestamp.test);
6505
7279
  if (!match)
6506
7280
  throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
6507
7281
  const [, year, month, day, hour, minute, second] = match.map(Number);
@@ -6644,7 +7418,7 @@ init_xcode_project();
6644
7418
  init_podspec_sources();
6645
7419
 
6646
7420
  // src/portable-expo-contract.ts
6647
- var import_zod3 = require("zod");
7421
+ var import_zod2 = require("zod");
6648
7422
  init_is_record();
6649
7423
  init_podspec_sources();
6650
7424