@invarn/cibuild 2.9.5 → 2.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-35SI42CD.mjs +1 -0
- package/dist/chunk-IC45KVLJ.mjs +1 -0
- package/dist/chunk-XDY4V23V.mjs +1 -0
- package/dist/cli.cjs +14 -14
- package/dist/commands.mjs +1 -0
- package/dist/lib.mjs +3934 -0
- package/package.json +6 -10
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -399
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts +0 -38
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.js +0 -222
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts +0 -41
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.js +0 -324
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts +0 -2
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts.map +0 -1
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.js +0 -382
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts +0 -29
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map +0 -1
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.js +0 -160
- package/dist/src/commands/android-gms-guard.test.d.ts +0 -9
- package/dist/src/commands/android-gms-guard.test.d.ts.map +0 -1
- package/dist/src/commands/android-gms-guard.test.js +0 -78
- package/dist/src/commands/android-java-version.test.d.ts +0 -12
- package/dist/src/commands/android-java-version.test.d.ts.map +0 -1
- package/dist/src/commands/android-java-version.test.js +0 -209
- package/dist/src/commands/android-scanner-java.test.d.ts +0 -2
- package/dist/src/commands/android-scanner-java.test.d.ts.map +0 -1
- package/dist/src/commands/android-scanner-java.test.js +0 -130
- package/dist/src/commands/android-scanner.d.ts +0 -250
- package/dist/src/commands/android-scanner.d.ts.map +0 -1
- package/dist/src/commands/android-scanner.js +0 -1639
- package/dist/src/commands/build.d.ts +0 -215
- package/dist/src/commands/build.d.ts.map +0 -1
- package/dist/src/commands/build.js +0 -1433
- package/dist/src/commands/build.test.d.ts +0 -13
- package/dist/src/commands/build.test.d.ts.map +0 -1
- package/dist/src/commands/build.test.js +0 -121
- package/dist/src/commands/detect-platform.d.ts +0 -13
- package/dist/src/commands/detect-platform.d.ts.map +0 -1
- package/dist/src/commands/detect-platform.js +0 -51
- package/dist/src/commands/detect-project.d.ts +0 -7
- package/dist/src/commands/detect-project.d.ts.map +0 -1
- package/dist/src/commands/detect-project.js +0 -12
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts +0 -26
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts.map +0 -1
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.js +0 -196
- package/dist/src/commands/edit.d.ts +0 -12
- package/dist/src/commands/edit.d.ts.map +0 -1
- package/dist/src/commands/edit.js +0 -652
- package/dist/src/commands/edit.test.d.ts +0 -6
- package/dist/src/commands/edit.test.d.ts.map +0 -1
- package/dist/src/commands/edit.test.js +0 -45
- package/dist/src/commands/fidelity-trim.d.ts +0 -13
- package/dist/src/commands/fidelity-trim.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.js +0 -21
- package/dist/src/commands/fidelity-trim.test.d.ts +0 -8
- package/dist/src/commands/fidelity-trim.test.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.test.js +0 -79
- package/dist/src/commands/file-secret-collector.d.ts +0 -50
- package/dist/src/commands/file-secret-collector.d.ts.map +0 -1
- package/dist/src/commands/file-secret-collector.js +0 -217
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts +0 -38
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts.map +0 -1
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.js +0 -300
- package/dist/src/commands/github-workflow.d.ts +0 -5
- package/dist/src/commands/github-workflow.d.ts.map +0 -1
- package/dist/src/commands/github-workflow.js +0 -45
- package/dist/src/commands/index.d.ts +0 -33
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -33
- package/dist/src/commands/init.d.ts +0 -20
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js +0 -264
- package/dist/src/commands/ios-scanner.d.ts +0 -104
- package/dist/src/commands/ios-scanner.d.ts.map +0 -1
- package/dist/src/commands/ios-scanner.js +0 -492
- package/dist/src/commands/ios-scheme-ranking.test.d.ts +0 -2
- package/dist/src/commands/ios-scheme-ranking.test.d.ts.map +0 -1
- package/dist/src/commands/ios-scheme-ranking.test.js +0 -264
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts +0 -30
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/local-properties-reaches-every-workflow.test.js +0 -146
- package/dist/src/commands/reset.d.ts +0 -7
- package/dist/src/commands/reset.d.ts.map +0 -1
- package/dist/src/commands/reset.js +0 -81
- package/dist/src/commands/run.d.ts +0 -22
- package/dist/src/commands/run.d.ts.map +0 -1
- package/dist/src/commands/run.js +0 -141
- package/dist/src/commands/secrets-sync-workflow.d.ts +0 -15
- package/dist/src/commands/secrets-sync-workflow.d.ts.map +0 -1
- package/dist/src/commands/secrets-sync-workflow.js +0 -255
- package/dist/src/commands/secrets-upload.d.ts +0 -21
- package/dist/src/commands/secrets-upload.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.js +0 -177
- package/dist/src/commands/secrets-upload.test.d.ts +0 -5
- package/dist/src/commands/secrets-upload.test.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.test.js +0 -60
- package/dist/src/commands/validate.d.ts +0 -10
- package/dist/src/commands/validate.d.ts.map +0 -1
- package/dist/src/commands/validate.js +0 -46
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -47
- package/dist/src/envman/cli.d.ts +0 -21
- package/dist/src/envman/cli.d.ts.map +0 -1
- package/dist/src/envman/cli.js +0 -240
- package/dist/src/envman/envman.d.ts +0 -83
- package/dist/src/envman/envman.d.ts.map +0 -1
- package/dist/src/envman/envman.js +0 -361
- package/dist/src/envman/envman.test.d.ts +0 -5
- package/dist/src/envman/envman.test.d.ts.map +0 -1
- package/dist/src/envman/envman.test.js +0 -236
- package/dist/src/envman/envstore-round-trip.test.d.ts +0 -27
- package/dist/src/envman/envstore-round-trip.test.d.ts.map +0 -1
- package/dist/src/envman/envstore-round-trip.test.js +0 -130
- package/dist/src/envman/index.d.ts +0 -23
- package/dist/src/envman/index.d.ts.map +0 -1
- package/dist/src/envman/index.js +0 -23
- package/dist/src/envman/shim.d.ts +0 -16
- package/dist/src/envman/shim.d.ts.map +0 -1
- package/dist/src/envman/shim.js +0 -66
- package/dist/src/envman/types.d.ts +0 -55
- package/dist/src/envman/types.d.ts.map +0 -1
- package/dist/src/envman/types.js +0 -12
- package/dist/src/lib.d.ts +0 -33
- package/dist/src/lib.d.ts.map +0 -1
- package/dist/src/lib.js +0 -37
- package/dist/src/pipeline.d.ts +0 -3
- package/dist/src/pipeline.d.ts.map +0 -1
- package/dist/src/pipeline.js +0 -57
- package/dist/src/runner-node-step.test.d.ts +0 -12
- package/dist/src/runner-node-step.test.d.ts.map +0 -1
- package/dist/src/runner-node-step.test.js +0 -61
- package/dist/src/runner.d.ts +0 -31
- package/dist/src/runner.d.ts.map +0 -1
- package/dist/src/runner.js +0 -240
- package/dist/src/shared/detect-project.d.ts +0 -57
- package/dist/src/shared/detect-project.d.ts.map +0 -1
- package/dist/src/shared/detect-project.js +0 -219
- package/dist/src/shared/detect-project.test.d.ts +0 -2
- package/dist/src/shared/detect-project.test.d.ts.map +0 -1
- package/dist/src/shared/detect-project.test.js +0 -161
- package/dist/src/shared/git.d.ts +0 -25
- package/dist/src/shared/git.d.ts.map +0 -1
- package/dist/src/shared/git.js +0 -53
- package/dist/src/shared/git.test.d.ts +0 -9
- package/dist/src/shared/git.test.d.ts.map +0 -1
- package/dist/src/shared/git.test.js +0 -66
- package/dist/src/shared/gitignore.d.ts +0 -6
- package/dist/src/shared/gitignore.d.ts.map +0 -1
- package/dist/src/shared/gitignore.js +0 -26
- package/dist/src/shared/gradle-settings.d.ts +0 -49
- package/dist/src/shared/gradle-settings.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.js +0 -138
- package/dist/src/shared/gradle-settings.test.d.ts +0 -2
- package/dist/src/shared/gradle-settings.test.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.test.js +0 -65
- package/dist/src/shared/prompts.d.ts +0 -30
- package/dist/src/shared/prompts.d.ts.map +0 -1
- package/dist/src/shared/prompts.js +0 -121
- package/dist/src/shared/xcode-container.test.d.ts +0 -2
- package/dist/src/shared/xcode-container.test.d.ts.map +0 -1
- package/dist/src/shared/xcode-container.test.js +0 -123
- package/dist/src/step-marker.d.ts +0 -12
- package/dist/src/step-marker.d.ts.map +0 -1
- package/dist/src/step-marker.js +0 -29
- package/dist/src/step-marker.test.d.ts +0 -11
- package/dist/src/step-marker.test.d.ts.map +0 -1
- package/dist/src/step-marker.test.js +0 -45
- package/dist/src/types.d.ts +0 -58
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts +0 -28
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts.map +0 -1
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.js +0 -223
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts +0 -20
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.js +0 -201
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts +0 -37
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.js +0 -255
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts +0 -32
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts.map +0 -1
- package/dist/src/yaml/a-missing-credential-is-loud.test.js +0 -301
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts +0 -18
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts.map +0 -1
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.js +0 -66
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts +0 -34
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.js +0 -218
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts +0 -27
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.js +0 -126
- package/dist/src/yaml/bitrise-compat.d.ts +0 -65
- package/dist/src/yaml/bitrise-compat.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.js +0 -206
- package/dist/src/yaml/bitrise-compat.test.d.ts +0 -5
- package/dist/src/yaml/bitrise-compat.test.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.test.js +0 -347
- package/dist/src/yaml/cache-key-missing-file.test.d.ts +0 -12
- package/dist/src/yaml/cache-key-missing-file.test.d.ts.map +0 -1
- package/dist/src/yaml/cache-key-missing-file.test.js +0 -116
- package/dist/src/yaml/converter.d.ts +0 -103
- package/dist/src/yaml/converter.d.ts.map +0 -1
- package/dist/src/yaml/converter.js +0 -420
- package/dist/src/yaml/converter.test.d.ts +0 -5
- package/dist/src/yaml/converter.test.d.ts.map +0 -1
- package/dist/src/yaml/converter.test.js +0 -548
- package/dist/src/yaml/e2e.test.d.ts +0 -6
- package/dist/src/yaml/e2e.test.d.ts.map +0 -1
- package/dist/src/yaml/e2e.test.js +0 -446
- package/dist/src/yaml/env-resolver.d.ts +0 -218
- package/dist/src/yaml/env-resolver.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.js +0 -591
- package/dist/src/yaml/env-resolver.test.d.ts +0 -5
- package/dist/src/yaml/env-resolver.test.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.test.js +0 -502
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts +0 -16
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts.map +0 -1
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.js +0 -126
- package/dist/src/yaml/fidelity-input-digest.d.ts +0 -37
- package/dist/src/yaml/fidelity-input-digest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.js +0 -208
- package/dist/src/yaml/fidelity-input-digest.test.d.ts +0 -2
- package/dist/src/yaml/fidelity-input-digest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.test.js +0 -167
- package/dist/src/yaml/fidelity-manifest.d.ts +0 -126
- package/dist/src/yaml/fidelity-manifest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.js +0 -134
- package/dist/src/yaml/fidelity-manifest.test.d.ts +0 -12
- package/dist/src/yaml/fidelity-manifest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.test.js +0 -251
- package/dist/src/yaml/interactive-prompts.d.ts +0 -71
- package/dist/src/yaml/interactive-prompts.d.ts.map +0 -1
- package/dist/src/yaml/interactive-prompts.js +0 -260
- package/dist/src/yaml/meta-helpers.d.ts +0 -28
- package/dist/src/yaml/meta-helpers.d.ts.map +0 -1
- package/dist/src/yaml/meta-helpers.js +0 -46
- package/dist/src/yaml/missing-env-handler.d.ts +0 -45
- package/dist/src/yaml/missing-env-handler.d.ts.map +0 -1
- package/dist/src/yaml/missing-env-handler.js +0 -64
- package/dist/src/yaml/parser.d.ts +0 -33
- package/dist/src/yaml/parser.d.ts.map +0 -1
- package/dist/src/yaml/parser.js +0 -148
- package/dist/src/yaml/parser.test.d.ts +0 -5
- package/dist/src/yaml/parser.test.d.ts.map +0 -1
- package/dist/src/yaml/parser.test.js +0 -83
- package/dist/src/yaml/pipeline-with-secrets.d.ts +0 -25
- package/dist/src/yaml/pipeline-with-secrets.d.ts.map +0 -1
- package/dist/src/yaml/pipeline-with-secrets.js +0 -76
- package/dist/src/yaml/platform-detector.d.ts +0 -83
- package/dist/src/yaml/platform-detector.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.js +0 -189
- package/dist/src/yaml/platform-detector.test.d.ts +0 -5
- package/dist/src/yaml/platform-detector.test.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.test.js +0 -525
- package/dist/src/yaml/preflight-validation.d.ts +0 -29
- package/dist/src/yaml/preflight-validation.d.ts.map +0 -1
- package/dist/src/yaml/preflight-validation.js +0 -21
- package/dist/src/yaml/secrets-manager.d.ts +0 -87
- package/dist/src/yaml/secrets-manager.d.ts.map +0 -1
- package/dist/src/yaml/secrets-manager.js +0 -230
- package/dist/src/yaml/shell-assignments.d.ts +0 -40
- package/dist/src/yaml/shell-assignments.d.ts.map +0 -1
- package/dist/src/yaml/shell-assignments.js +0 -77
- package/dist/src/yaml/step-validator-check-failure.test.d.ts +0 -24
- package/dist/src/yaml/step-validator-check-failure.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-check-failure.test.js +0 -130
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts +0 -23
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-self-assigned.test.js +0 -191
- package/dist/src/yaml/step-validator.d.ts +0 -67
- package/dist/src/yaml/step-validator.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.js +0 -466
- package/dist/src/yaml/step-validator.test.d.ts +0 -18
- package/dist/src/yaml/step-validator.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.test.js +0 -140
- package/dist/src/yaml/steps/android-sign.d.ts +0 -35
- package/dist/src/yaml/steps/android-sign.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-sign.js +0 -147
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts +0 -2
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-variant-resolution.test.js +0 -260
- package/dist/src/yaml/steps/android-version.d.ts +0 -26
- package/dist/src/yaml/steps/android-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.js +0 -128
- package/dist/src/yaml/steps/android-version.test.d.ts +0 -5
- package/dist/src/yaml/steps/android-version.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.test.js +0 -196
- package/dist/src/yaml/steps/android.d.ts +0 -156
- package/dist/src/yaml/steps/android.d.ts.map +0 -1
- package/dist/src/yaml/steps/android.js +0 -1092
- package/dist/src/yaml/steps/app-store-deploy.d.ts +0 -48
- package/dist/src/yaml/steps/app-store-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/app-store-deploy.js +0 -167
- package/dist/src/yaml/steps/base.d.ts +0 -263
- package/dist/src/yaml/steps/base.d.ts.map +0 -1
- package/dist/src/yaml/steps/base.js +0 -380
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts +0 -26
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.js +0 -200
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.test.js +0 -280
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts +0 -22
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.js +0 -144
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.test.js +0 -331
- package/dist/src/yaml/steps/bitrise-slack.d.ts +0 -49
- package/dist/src/yaml/steps/bitrise-slack.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.js +0 -280
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.test.js +0 -484
- package/dist/src/yaml/steps/bitrise-ssh.d.ts +0 -27
- package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.js +0 -134
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.test.js +0 -205
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-daemon.test.js +0 -212
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts +0 -42
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.js +0 -209
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-push-daemon.test.js +0 -171
- package/dist/src/yaml/steps/cache.d.ts +0 -59
- package/dist/src/yaml/steps/cache.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache.js +0 -1027
- package/dist/src/yaml/steps/capture-injection.d.ts +0 -30
- package/dist/src/yaml/steps/capture-injection.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.js +0 -88
- package/dist/src/yaml/steps/capture-injection.test.d.ts +0 -2
- package/dist/src/yaml/steps/capture-injection.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.test.js +0 -163
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts +0 -42
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.js +0 -140
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts +0 -11
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.js +0 -176
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts +0 -22
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.js +0 -97
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.js +0 -282
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.js +0 -132
- package/dist/src/yaml/steps/envstore-loader.test.d.ts +0 -15
- package/dist/src/yaml/steps/envstore-loader.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/envstore-loader.test.js +0 -143
- package/dist/src/yaml/steps/fastlane.d.ts +0 -27
- package/dist/src/yaml/steps/fastlane.d.ts.map +0 -1
- package/dist/src/yaml/steps/fastlane.js +0 -79
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts +0 -53
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.js +0 -72
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts +0 -11
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.js +0 -50
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts +0 -87
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.js +0 -111
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts +0 -22
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.js +0 -118
- package/dist/src/yaml/steps/file.d.ts +0 -52
- package/dist/src/yaml/steps/file.d.ts.map +0 -1
- package/dist/src/yaml/steps/file.js +0 -108
- package/dist/src/yaml/steps/flutter.d.ts +0 -63
- package/dist/src/yaml/steps/flutter.d.ts.map +0 -1
- package/dist/src/yaml/steps/flutter.js +0 -215
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts +0 -16
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.js +0 -127
- package/dist/src/yaml/steps/git-clone.d.ts +0 -32
- package/dist/src/yaml/steps/git-clone.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone.js +0 -171
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts +0 -10
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.js +0 -162
- package/dist/src/yaml/steps/git-fetch-retry.d.ts +0 -62
- package/dist/src/yaml/steps/git-fetch-retry.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.js +0 -155
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts +0 -5
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.test.js +0 -86
- package/dist/src/yaml/steps/google-play-deploy.d.ts +0 -37
- package/dist/src/yaml/steps/google-play-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.js +0 -193
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts +0 -5
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.test.js +0 -310
- package/dist/src/yaml/steps/gradle-memory.d.ts +0 -61
- package/dist/src/yaml/steps/gradle-memory.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.js +0 -386
- package/dist/src/yaml/steps/gradle-memory.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-memory.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.test.js +0 -344
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts +0 -28
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.js +0 -107
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.js +0 -183
- package/dist/src/yaml/steps/index.d.ts +0 -10
- package/dist/src/yaml/steps/index.d.ts.map +0 -1
- package/dist/src/yaml/steps/index.js +0 -1461
- package/dist/src/yaml/steps/ios-deps.d.ts +0 -78
- package/dist/src/yaml/steps/ios-deps.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.js +0 -279
- package/dist/src/yaml/steps/ios-deps.test.d.ts +0 -5
- package/dist/src/yaml/steps/ios-deps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.test.js +0 -90
- package/dist/src/yaml/steps/ios-signing.d.ts +0 -31
- package/dist/src/yaml/steps/ios-signing.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-signing.js +0 -144
- package/dist/src/yaml/steps/ios-version.d.ts +0 -47
- package/dist/src/yaml/steps/ios-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-version.js +0 -151
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts +0 -10
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/java-home-version-spec.test.js +0 -58
- package/dist/src/yaml/steps/linting.d.ts +0 -47
- package/dist/src/yaml/steps/linting.d.ts.map +0 -1
- package/dist/src/yaml/steps/linting.js +0 -148
- package/dist/src/yaml/steps/phase2.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase2.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase2.test.js +0 -197
- package/dist/src/yaml/steps/phase3.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase3.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase3.test.js +0 -144
- package/dist/src/yaml/steps/phase4.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase4.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase4.test.js +0 -166
- package/dist/src/yaml/steps/phase5.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase5.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase5.test.js +0 -263
- package/dist/src/yaml/steps/registry.d.ts +0 -88
- package/dist/src/yaml/steps/registry.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.js +0 -125
- package/dist/src/yaml/steps/registry.test.d.ts +0 -5
- package/dist/src/yaml/steps/registry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.test.js +0 -235
- package/dist/src/yaml/steps/release.d.ts +0 -50
- package/dist/src/yaml/steps/release.d.ts.map +0 -1
- package/dist/src/yaml/steps/release.js +0 -154
- package/dist/src/yaml/steps/render-post-processor.d.ts +0 -100
- package/dist/src/yaml/steps/render-post-processor.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.js +0 -270
- package/dist/src/yaml/steps/render-post-processor.test.d.ts +0 -13
- package/dist/src/yaml/steps/render-post-processor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.test.js +0 -220
- package/dist/src/yaml/steps/script.d.ts +0 -23
- package/dist/src/yaml/steps/script.d.ts.map +0 -1
- package/dist/src/yaml/steps/script.js +0 -63
- package/dist/src/yaml/steps/spec-validation.test.d.ts +0 -6
- package/dist/src/yaml/steps/spec-validation.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/spec-validation.test.js +0 -130
- package/dist/src/yaml/steps/steps.test.d.ts +0 -6
- package/dist/src/yaml/steps/steps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/steps.test.js +0 -881
- package/dist/src/yaml/steps/structural-facts.d.ts +0 -992
- package/dist/src/yaml/steps/structural-facts.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.js +0 -3276
- package/dist/src/yaml/steps/structural-facts.test.d.ts +0 -12
- package/dist/src/yaml/steps/structural-facts.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.test.js +0 -3039
- package/dist/src/yaml/steps/test-config.d.ts +0 -5
- package/dist/src/yaml/steps/test-config.d.ts.map +0 -1
- package/dist/src/yaml/steps/test-config.js +0 -25
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts +0 -28
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align-corpus.test.js +0 -383
- package/dist/src/yaml/steps/trim-align.d.ts +0 -87
- package/dist/src/yaml/steps/trim-align.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.js +0 -367
- package/dist/src/yaml/steps/trim-align.test.d.ts +0 -11
- package/dist/src/yaml/steps/trim-align.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.test.js +0 -261
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts +0 -66
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.js +0 -251
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts +0 -13
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.js +0 -302
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts +0 -134
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.js +0 -173
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts +0 -11
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.test.js +0 -210
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts +0 -155
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.js +0 -1389
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts +0 -2
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.js +0 -1106
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts +0 -230
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.js +0 -1597
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts +0 -18
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.test.js +0 -1871
- package/dist/src/yaml/steps/xcode-app-product.d.ts +0 -90
- package/dist/src/yaml/steps/xcode-app-product.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.js +0 -247
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts +0 -2
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.test.js +0 -202
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts +0 -30
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-derived-data.test.js +0 -279
- package/dist/src/yaml/steps/xcode-destination.d.ts +0 -47
- package/dist/src/yaml/steps/xcode-destination.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.js +0 -202
- package/dist/src/yaml/steps/xcode-destination.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-destination.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.test.js +0 -227
- package/dist/src/yaml/steps/xcode-new.test.d.ts +0 -5
- package/dist/src/yaml/steps/xcode-new.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-new.test.js +0 -211
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-resolve-retry.test.js +0 -146
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts +0 -53
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.js +0 -98
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts +0 -21
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.test.js +0 -155
- package/dist/src/yaml/steps/xcode.d.ts +0 -230
- package/dist/src/yaml/steps/xcode.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode.js +0 -1350
- package/dist/src/yaml/types.d.ts +0 -76
- package/dist/src/yaml/types.d.ts.map +0 -1
- package/dist/src/yaml/types.js +0 -5
- package/dist/src/yaml/validation-types.d.ts +0 -102
- package/dist/src/yaml/validation-types.d.ts.map +0 -1
- package/dist/src/yaml/validation-types.js +0 -8
- package/dist/src/yaml/yaml-updater.d.ts +0 -24
- package/dist/src/yaml/yaml-updater.d.ts.map +0 -1
- package/dist/src/yaml/yaml-updater.js +0 -128
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Products go under a derived data path, never into one flat directory.
|
|
3
|
-
*
|
|
4
|
-
* `CONFIGURATION_BUILD_DIR` overrides the per-configuration/per-platform
|
|
5
|
-
* product separation xcodebuild provides under
|
|
6
|
-
* `DerivedData/Build/Products/<config>-<platform>/`, flattening every target in
|
|
7
|
-
* the graph into a single directory. Two build tasks for the same target then
|
|
8
|
-
* declare the same absolute output path and xcodebuild refuses the entire build
|
|
9
|
-
* with "Multiple commands produce". The notes it prints name the SAME target
|
|
10
|
-
* twice, which is the tell: one target built twice into one directory, not two
|
|
11
|
-
* packages colliding on a name.
|
|
12
|
-
*
|
|
13
|
-
* Measured 2026-09-09 on the iOS corpus rows, all on the template's must-pass
|
|
14
|
-
* "Build App" step: 16 collisions on jellyfin/Swiftfin, 266 on
|
|
15
|
-
* Automattic/pocket-casts-ios, 425 on home-assistant/iOS.
|
|
16
|
-
*
|
|
17
|
-
* A fourth row failed differently for the same reason. CocoaPods derives
|
|
18
|
-
* `PODS_CONFIGURATION_BUILD_DIR` from `BUILD_DIR`, which `CONFIGURATION_BUILD_DIR`
|
|
19
|
-
* does NOT override — so pod products land in the flat directory while every
|
|
20
|
-
* generated copy-resources script and linker search path still points into
|
|
21
|
-
* DerivedData. shenruisi/Stay reported "Resource SDWebImage.bundle not found.
|
|
22
|
-
* Run pod install" for a bundle that had been built two directories away.
|
|
23
|
-
*
|
|
24
|
-
* Proved by control on a runner guest, same repo and image and flags with only
|
|
25
|
-
* this setting differing: `CONFIGURATION_BUILD_DIR` reproduced the collision and
|
|
26
|
-
* exit 65 with no .app, `-derivedDataPath` reached BUILD SUCCEEDED in 2m06s and
|
|
27
|
-
* left both `Debug` and `Debug-iphonesimulator` under Products.
|
|
28
|
-
*/
|
|
29
|
-
import { describe, test, expect } from '@jest/globals';
|
|
30
|
-
import { execFileSync } from 'child_process';
|
|
31
|
-
import { mkdtempSync, realpathSync, symlinkSync } from 'fs';
|
|
32
|
-
import { tmpdir } from 'os';
|
|
33
|
-
import { join } from 'path';
|
|
34
|
-
import { XcodeBuildStepExecutor, XcodeBuildForTestStepExecutor, XcodeBuildForSimulatorStepExecutor, } from './xcode.js';
|
|
35
|
-
import { APP_PRODUCT_RESOLVER_SOURCE } from './xcode-app-product.js';
|
|
36
|
-
import { testConfig } from './test-config.js';
|
|
37
|
-
const DERIVED = '-derivedDataPath "$DERIVED_DATA_PATH"';
|
|
38
|
-
const scriptFor = async (executor, inputs) => {
|
|
39
|
-
const result = await executor.execute({ project_path: 'MyApp.xcodeproj', scheme: 'MyApp', ...inputs }, {}, testConfig);
|
|
40
|
-
return result.script;
|
|
41
|
-
};
|
|
42
|
-
const buildingExecutors = () => [
|
|
43
|
-
['xcodebuild', new XcodeBuildStepExecutor()],
|
|
44
|
-
['xcode-build-for-test', new XcodeBuildForTestStepExecutor()],
|
|
45
|
-
['xcode-build-for-simulator', new XcodeBuildForSimulatorStepExecutor()],
|
|
46
|
-
];
|
|
47
|
-
describe('no xcode step flattens the product tree', () => {
|
|
48
|
-
test.each(buildingExecutors())('%s never passes CONFIGURATION_BUILD_DIR', async (_name, executor) => {
|
|
49
|
-
expect(await scriptFor(executor, {})).not.toContain('CONFIGURATION_BUILD_DIR');
|
|
50
|
-
});
|
|
51
|
-
test.each(buildingExecutors())('%s builds into a derived data path', async (_name, executor) => {
|
|
52
|
-
expect(await scriptFor(executor, {})).toContain(DERIVED);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
describe('the resolve and the build read the same derived data', () => {
|
|
56
|
-
// If they diverge, the retried resolve populates one location and the build
|
|
57
|
-
// re-resolves into another — the retry is spent on work that is thrown away,
|
|
58
|
-
// and a refused fetch fails the expensive half anyway.
|
|
59
|
-
test.each(buildingExecutors())('%s', async (_name, executor) => {
|
|
60
|
-
const script = await scriptFor(executor, {});
|
|
61
|
-
const lines = script.split('\n');
|
|
62
|
-
const resolveLine = lines.find((l) => l.includes('-resolvePackageDependencies'));
|
|
63
|
-
const buildLine = lines.find((l) => /^xcodebuild (build|clean build|build-for-testing)/.test(l.trim()));
|
|
64
|
-
expect(resolveLine).toBeDefined();
|
|
65
|
-
expect(buildLine).toBeDefined();
|
|
66
|
-
expect(resolveLine).toContain(DERIVED);
|
|
67
|
-
expect(buildLine).toContain(DERIVED);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('xcode-build-for-simulator finds the .app where it now lands', () => {
|
|
71
|
-
// The guard is the step's strongest statement that the app compiled, so it
|
|
72
|
-
// has to follow the products. Left at `find "$OUTPUT_DIR" -maxdepth 1` it
|
|
73
|
-
// matches nothing and fails every build with ".app not found" while the app
|
|
74
|
-
// has in fact built perfectly.
|
|
75
|
-
const build = (inputs = {}) => scriptFor(new XcodeBuildForSimulatorStepExecutor(), inputs);
|
|
76
|
-
test('searches under the per-platform Products directory', async () => {
|
|
77
|
-
const script = await build();
|
|
78
|
-
expect(script).toContain('PRODUCTS_DIR="$DERIVED_DATA_PATH/Build/Products"');
|
|
79
|
-
expect(script).toContain('find "$PRODUCTS_DIR"');
|
|
80
|
-
});
|
|
81
|
-
test('searches deep enough to reach <config>-<platform>/Foo.app', async () => {
|
|
82
|
-
// Products/Debug-iphonesimulator/MyApp.app is two levels down. maxdepth 1
|
|
83
|
-
// would find the configuration directory and no .app at all.
|
|
84
|
-
const findLine = (await build())
|
|
85
|
-
.split('\n')
|
|
86
|
-
.find((l) => l.includes('-name "*.app"'));
|
|
87
|
-
expect(findLine).toContain('-maxdepth 2');
|
|
88
|
-
});
|
|
89
|
-
test('still fails the step when nothing landed', async () => {
|
|
90
|
-
const script = await build();
|
|
91
|
-
expect(script).toContain('if [ -z "$APP_PATH" ]; then');
|
|
92
|
-
expect(script).toContain('exit 1');
|
|
93
|
-
});
|
|
94
|
-
test('still exports the app path for later steps', async () => {
|
|
95
|
-
expect(await build()).toContain('envman add --key CIBUILD_APP_DIR_PATH');
|
|
96
|
-
});
|
|
97
|
-
// Following the products is not enough where a scheme builds a companion
|
|
98
|
-
// alongside the app: two bundles land and the scan cannot tell them apart.
|
|
99
|
-
// The scheme is asked first, and it is asked with the scheme and destination
|
|
100
|
-
// this step was actually given — a resolver told the wrong scheme name
|
|
101
|
-
// answers confidently and wrongly.
|
|
102
|
-
test('asks the scheme before falling back to a scan', async () => {
|
|
103
|
-
const script = await build({ scheme: 'MyApp', destination: 'generic/platform=iOS Simulator' });
|
|
104
|
-
const call = script.split('\n').find((l) => l.includes('node "$APP_RESOLVER"'));
|
|
105
|
-
expect(call).toBeDefined();
|
|
106
|
-
expect(call).toContain("'MyApp'");
|
|
107
|
-
expect(call).toContain("'generic/platform=iOS Simulator'");
|
|
108
|
-
// The scan is the fallback now, not the first answer.
|
|
109
|
-
expect(script.indexOf('node "$APP_RESOLVER"')).toBeLessThan(script.indexOf('-name "*.app"'));
|
|
110
|
-
});
|
|
111
|
-
// set -e is on, so a machine without a usable node must not fail the step
|
|
112
|
-
// before the scan it would have fallen back to has run.
|
|
113
|
-
test('a resolver that cannot run falls through instead of failing the build', async () => {
|
|
114
|
-
const call = (await build())
|
|
115
|
-
.split('\n')
|
|
116
|
-
.find((l) => l.includes('node "$APP_RESOLVER"'));
|
|
117
|
-
expect(call).toContain('|| true');
|
|
118
|
-
});
|
|
119
|
-
test('the resolver it writes is the one under test', async () => {
|
|
120
|
-
expect(await build()).toContain(APP_PRODUCT_RESOLVER_SOURCE.trim());
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
/**
|
|
124
|
-
* Delivery belonged to the pipeline and should have belonged to the build.
|
|
125
|
-
*
|
|
126
|
-
* gradle-build copies its own .apk into the artifacts directory. This step
|
|
127
|
-
* located the bundle, exported the path, and left it in DerivedData — which
|
|
128
|
-
* artifact discovery excludes. So an iOS proof could go green and hand the user
|
|
129
|
-
* nothing to install, and only the pipelines that added a collecting step of
|
|
130
|
-
* their own delivered anything.
|
|
131
|
-
*/
|
|
132
|
-
describe('xcode-build-for-simulator delivers the app it built', () => {
|
|
133
|
-
const build = (inputs = {}) => scriptFor(new XcodeBuildForSimulatorStepExecutor(), inputs);
|
|
134
|
-
test('copies its own output into the artifacts directory', async () => {
|
|
135
|
-
const script = await build();
|
|
136
|
-
expect(script).toContain('ARTIFACTS_DIR="${CIBUILD_ARTIFACTS_DIR:-.ci/artifacts}"');
|
|
137
|
-
expect(script).toContain('mkdir -p "$ARTIFACTS_DIR"');
|
|
138
|
-
});
|
|
139
|
-
// A .app is a directory. Staged as one it becomes an artifact per file
|
|
140
|
-
// inside it, and an internal symlink pointing outside the workspace fails
|
|
141
|
-
// the stage. A .zip is a plain file and stages as exactly one artifact.
|
|
142
|
-
test('delivers one zip rather than the bundle directory', async () => {
|
|
143
|
-
const script = await build();
|
|
144
|
-
expect(script).toContain('ditto -c -k --keepParent "$APP_PATH" "$ARTIFACTS_DIR/$APP_NAME.zip"');
|
|
145
|
-
});
|
|
146
|
-
// The app it exported and the app it delivers are the same one, or the
|
|
147
|
-
// manifest disagrees with CIBUILD_APP_DIR_PATH and the wrong bundle ships
|
|
148
|
-
// under a right-looking name.
|
|
149
|
-
test('delivers the bundle it exported, not another scan of the tree', async () => {
|
|
150
|
-
const script = await build();
|
|
151
|
-
expect(script).toContain('APP_NAME="$(basename "$APP_PATH")"');
|
|
152
|
-
expect(script.indexOf('envman add --key CIBUILD_APP_DIR_PATH')).toBeLessThan(script.indexOf('ditto -c -k'));
|
|
153
|
-
});
|
|
154
|
-
// A pipeline that already collects the app runs after this and writes the
|
|
155
|
-
// same path; re-running the build must not leave two zips either.
|
|
156
|
-
test('replaces its own previous zip rather than appending to it', async () => {
|
|
157
|
-
const script = await build();
|
|
158
|
-
expect(script.indexOf('rm -f "$ARTIFACTS_DIR/$APP_NAME.zip"')).toBeLessThan(script.indexOf('ditto -c -k'));
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
describe('the output_dir input still steers where everything goes', () => {
|
|
162
|
-
// The template gives "Build App" its own output_dir, so derived data has to
|
|
163
|
-
// follow that input rather than a hardcoded path.
|
|
164
|
-
test('a custom output_dir is what OUTPUT_DIR resolves to', async () => {
|
|
165
|
-
const script = await scriptFor(new XcodeBuildForSimulatorStepExecutor(), {
|
|
166
|
-
output_dir: 'build/app',
|
|
167
|
-
});
|
|
168
|
-
expect(script).toContain(`OUTPUT_DIR="$(cd 'build/app' && pwd)"`);
|
|
169
|
-
expect(script).toContain(DERIVED);
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
/**
|
|
173
|
-
* Derived data lives outside the source tree.
|
|
174
|
-
*
|
|
175
|
-
* With `-derivedDataPath "$OUTPUT_DIR/DerivedData"` and an output_dir of
|
|
176
|
-
* `build/app`, every resolved SPM checkout sat at
|
|
177
|
-
* `<repo>/build/app/DerivedData/SourcePackages/checkouts/` — inside the
|
|
178
|
-
* working tree an app's own SwiftLint build phase lints. vinhnx/Clendar went red
|
|
179
|
-
* on 145 serious violations, every one of them in a third-party package, none
|
|
180
|
-
* in the app. A developer's Xcode keeps derived data under ~/Library, so no
|
|
181
|
-
* repository has a reason to exclude it.
|
|
182
|
-
*/
|
|
183
|
-
describe('derived data is outside the source tree', () => {
|
|
184
|
-
// The lines that choose the path: the root, then the definition.
|
|
185
|
-
const definitionOf = (script) => {
|
|
186
|
-
const lines = script.split('\n');
|
|
187
|
-
const from = lines.findIndex((l) => l.startsWith('cibuild_dd_root='));
|
|
188
|
-
const to = lines.findIndex((l) => l.startsWith('DERIVED_DATA_PATH='));
|
|
189
|
-
expect(from).toBeGreaterThan(-1);
|
|
190
|
-
expect(to).toBeGreaterThan(from);
|
|
191
|
-
return lines.slice(from, to + 1).join('\n');
|
|
192
|
-
};
|
|
193
|
-
// Runs the step's own definition line, the way the step would.
|
|
194
|
-
const resolve = (script, env) => execFileSync('bash', ['-c', `${definitionOf(script)}\nprintf '%s' "$DERIVED_DATA_PATH"`], {
|
|
195
|
-
env: { PATH: process.env.PATH ?? '', ...env },
|
|
196
|
-
}).toString();
|
|
197
|
-
test.each(buildingExecutors())('%s never builds into the output dir', async (_name, executor) => {
|
|
198
|
-
expect(await scriptFor(executor, {})).not.toContain('$OUTPUT_DIR/DerivedData');
|
|
199
|
-
});
|
|
200
|
-
test.each(buildingExecutors())('%s puts derived data under the scratch root, not under the checkout', async (_name, executor) => {
|
|
201
|
-
const scratch = realpathSync(mkdtempSync(join(tmpdir(), 'scratch-')));
|
|
202
|
-
const repo = join(scratch, 'workspace', 'repo');
|
|
203
|
-
const path = resolve(await scriptFor(executor, { output_dir: 'build/app' }), {
|
|
204
|
-
CIBUILD_SCRATCH: scratch,
|
|
205
|
-
OUTPUT_DIR: join(repo, 'build', 'app'),
|
|
206
|
-
});
|
|
207
|
-
expect(path.startsWith(scratch + '/')).toBe(true);
|
|
208
|
-
expect(path.startsWith(repo + '/')).toBe(false);
|
|
209
|
-
});
|
|
210
|
-
test('falls back to TMPDIR outside a sandbox', async () => {
|
|
211
|
-
const tmp = realpathSync(mkdtempSync(join(tmpdir(), 'tmp-')));
|
|
212
|
-
const path = resolve(await scriptFor(new XcodeBuildStepExecutor(), {}), {
|
|
213
|
-
TMPDIR: tmp,
|
|
214
|
-
OUTPUT_DIR: '/work/repo/build',
|
|
215
|
-
});
|
|
216
|
-
expect(path.startsWith(tmp + '/')).toBe(true);
|
|
217
|
-
});
|
|
218
|
-
// The iOS template names the same output_dir on Build App and Build for
|
|
219
|
-
// Testing so the second step reads what the first compiled. That sharing has
|
|
220
|
-
// to survive the move: same output dir, same derived data.
|
|
221
|
-
test('two steps naming the same output_dir share derived data', async () => {
|
|
222
|
-
const env = { CIBUILD_SCRATCH: '/scratch', OUTPUT_DIR: '/work/repo/build/app' };
|
|
223
|
-
const app = resolve(await scriptFor(new XcodeBuildForSimulatorStepExecutor(), { output_dir: 'build/app' }), env);
|
|
224
|
-
const tests = resolve(await scriptFor(new XcodeBuildForTestStepExecutor(), { output_dir: 'build/app' }), env);
|
|
225
|
-
expect(tests).toBe(app);
|
|
226
|
-
});
|
|
227
|
-
test('two different output dirs stay apart', async () => {
|
|
228
|
-
const script = await scriptFor(new XcodeBuildStepExecutor(), {});
|
|
229
|
-
const a = resolve(script, { CIBUILD_SCRATCH: '/scratch', OUTPUT_DIR: '/work/repo/build/app' });
|
|
230
|
-
const b = resolve(script, { CIBUILD_SCRATCH: '/scratch', OUTPUT_DIR: '/work/repo/build' });
|
|
231
|
-
expect(a).not.toBe(b);
|
|
232
|
-
});
|
|
233
|
-
// analogcode/Swift-Radio-Pro: LNPopupController's Package.swift lists its
|
|
234
|
-
// header directories with FileManager (real paths, /private/tmp/...) and
|
|
235
|
-
// strips packageBase.path (/tmp/...) by text replacement, so every header
|
|
236
|
-
// search path came out eight characters short and '_LNPopupGlassUtils.h'
|
|
237
|
-
// was not found. On macOS /tmp and TMPDIR's /var are symlinks into
|
|
238
|
-
// /private; derived data has to be named by its real path.
|
|
239
|
-
test('derived data is named by its real path, not through a symlink', async () => {
|
|
240
|
-
const real = realpathSync(mkdtempSync(join(tmpdir(), 'real-')));
|
|
241
|
-
const link = join(realpathSync(mkdtempSync(join(tmpdir(), 'link-'))), 'tmp');
|
|
242
|
-
symlinkSync(real, link);
|
|
243
|
-
const script = await scriptFor(new XcodeBuildStepExecutor(), {});
|
|
244
|
-
const lines = script.split('\n');
|
|
245
|
-
const from = lines.findIndex((l) => l.startsWith('cibuild_dd_root='));
|
|
246
|
-
const to = lines.findIndex((l) => l.startsWith('echo "Derived data:'));
|
|
247
|
-
const path = execFileSync('bash', ['-c', `set -e\n${lines.slice(from, to).join('\n')}\nprintf '%s' "$DERIVED_DATA_PATH"`], { env: { PATH: process.env.PATH ?? '', TMPDIR: link, OUTPUT_DIR: '/work/repo/build' } }).toString();
|
|
248
|
-
expect(path.startsWith(real + '/')).toBe(true);
|
|
249
|
-
});
|
|
250
|
-
// nightly-baseline 58, measured on runner-mac-01: xcodebuild folds
|
|
251
|
-
// /private/tmp back to /tmp and FileManager does not, so LNPopupController's
|
|
252
|
-
// text-built header paths came out eight characters short under the guest's
|
|
253
|
-
// /tmp/cibuild-work-<id> root, and built under the user's home.
|
|
254
|
-
const tmpIsALink = (() => {
|
|
255
|
-
try {
|
|
256
|
-
return realpathSync('/tmp') !== '/tmp';
|
|
257
|
-
}
|
|
258
|
-
catch {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
})();
|
|
262
|
-
(tmpIsALink ? test : test.skip)('a scratch root under /tmp is traded for the build user\'s home', async () => {
|
|
263
|
-
const scratch = mkdtempSync('/tmp/cibuild-work-');
|
|
264
|
-
const home = realpathSync(mkdtempSync(join(tmpdir(), 'home-')));
|
|
265
|
-
const path = resolve(await scriptFor(new XcodeBuildStepExecutor(), {}), {
|
|
266
|
-
CIBUILD_SCRATCH: scratch,
|
|
267
|
-
CIBUILD_USER_HOME: home,
|
|
268
|
-
OUTPUT_DIR: '/work/repo/build',
|
|
269
|
-
});
|
|
270
|
-
expect(path.startsWith(`${home}/Library/Developer/cibuild/cibuild-derived-data/`)).toBe(true);
|
|
271
|
-
});
|
|
272
|
-
test('the product listing and the xctestrun search follow it', async () => {
|
|
273
|
-
const build = await scriptFor(new XcodeBuildStepExecutor(), {});
|
|
274
|
-
expect(build).toContain('ls -lhR "$DERIVED_DATA_PATH/Build/Products"');
|
|
275
|
-
const forTest = await scriptFor(new XcodeBuildForTestStepExecutor(), {});
|
|
276
|
-
expect(forTest).toContain('find "$DERIVED_DATA_PATH/Build/Products" -name "*.xctestrun"');
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
//# sourceMappingURL=xcode-derived-data.test.js.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves `destination: "auto"` for xcode-* step executors.
|
|
3
|
-
*
|
|
4
|
-
* `auto` queries `xcrun simctl list devices available --json` and picks the
|
|
5
|
-
* newest iPhone in the highest installed iOS runtime, returning a canonical
|
|
6
|
-
* destination string for xcodebuild: `platform=iOS Simulator,OS=<v>,name=<n>`.
|
|
7
|
-
*
|
|
8
|
-
* The host shell-out lives in {@link resolveAutoDestination} so the parser
|
|
9
|
-
* ({@link resolveAutoDestinationFromSimctlJson}) stays pure and unit-testable
|
|
10
|
-
* against fixture JSON.
|
|
11
|
-
*/
|
|
12
|
-
/** Failure mode for "auto" resolution. Surfaces as the step's failure reason. */
|
|
13
|
-
export declare class AutoDestinationError extends Error {
|
|
14
|
-
constructor(message: string);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Pure helper — parses `xcrun simctl list devices available --json` output
|
|
18
|
-
* and returns the canonical destination string.
|
|
19
|
-
*
|
|
20
|
-
* Selection rules (per spike spec):
|
|
21
|
-
* - Highest available iOS runtime: highest semver among keys matching
|
|
22
|
-
* `com.apple.CoreSimulator.SimRuntime.iOS-*`.
|
|
23
|
-
* - Newest iPhone: device whose name starts with "iPhone" and has the highest
|
|
24
|
-
* model number suffix (e.g. "iPhone 16 Pro Max" > "iPhone 15" >
|
|
25
|
-
* "iPhone SE (3rd generation)"). Ties at the highest model number prefer
|
|
26
|
-
* "Pro Max", then "Pro", then plain.
|
|
27
|
-
*/
|
|
28
|
-
export declare function resolveAutoDestinationFromSimctlJson(rawJson: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* Pass-through resolver used by xcode-* executors.
|
|
31
|
-
*
|
|
32
|
-
* Returns the literal value unchanged when it isn't the magic string `"auto"`.
|
|
33
|
-
* When it is, delegates to a resolver (default: {@link resolveAutoDestination},
|
|
34
|
-
* which shells out to `xcrun simctl`). The resolver injection point exists for
|
|
35
|
-
* tests, so executor-level tests can verify the "auto" branch without
|
|
36
|
-
* touching the host's xcrun.
|
|
37
|
-
*/
|
|
38
|
-
export declare function resolveDestinationInput(value: string, autoResolver?: () => string): string;
|
|
39
|
-
/**
|
|
40
|
-
* Shell-out wrapper: runs `xcrun simctl list devices available --json` and
|
|
41
|
-
* delegates the parse to {@link resolveAutoDestinationFromSimctlJson}.
|
|
42
|
-
*
|
|
43
|
-
* Surfaces the documented failure modes (xcrun missing, simctl failure,
|
|
44
|
-
* no iPhone runtime) as {@link AutoDestinationError}.
|
|
45
|
-
*/
|
|
46
|
-
export declare function resolveAutoDestination(): string;
|
|
47
|
-
//# sourceMappingURL=xcode-destination.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xcode-destination.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/xcode-destination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgBH,iFAAiF;AACjF,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4B5E;AAiID;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,MAAM,MAA+B,GAClD,MAAM,CAGR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CA4B/C"}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves `destination: "auto"` for xcode-* step executors.
|
|
3
|
-
*
|
|
4
|
-
* `auto` queries `xcrun simctl list devices available --json` and picks the
|
|
5
|
-
* newest iPhone in the highest installed iOS runtime, returning a canonical
|
|
6
|
-
* destination string for xcodebuild: `platform=iOS Simulator,OS=<v>,name=<n>`.
|
|
7
|
-
*
|
|
8
|
-
* The host shell-out lives in {@link resolveAutoDestination} so the parser
|
|
9
|
-
* ({@link resolveAutoDestinationFromSimctlJson}) stays pure and unit-testable
|
|
10
|
-
* against fixture JSON.
|
|
11
|
-
*/
|
|
12
|
-
import { execFileSync } from 'node:child_process';
|
|
13
|
-
/** Failure mode for "auto" resolution. Surfaces as the step's failure reason. */
|
|
14
|
-
export class AutoDestinationError extends Error {
|
|
15
|
-
constructor(message) {
|
|
16
|
-
super(message);
|
|
17
|
-
this.name = 'AutoDestinationError';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Pure helper — parses `xcrun simctl list devices available --json` output
|
|
22
|
-
* and returns the canonical destination string.
|
|
23
|
-
*
|
|
24
|
-
* Selection rules (per spike spec):
|
|
25
|
-
* - Highest available iOS runtime: highest semver among keys matching
|
|
26
|
-
* `com.apple.CoreSimulator.SimRuntime.iOS-*`.
|
|
27
|
-
* - Newest iPhone: device whose name starts with "iPhone" and has the highest
|
|
28
|
-
* model number suffix (e.g. "iPhone 16 Pro Max" > "iPhone 15" >
|
|
29
|
-
* "iPhone SE (3rd generation)"). Ties at the highest model number prefer
|
|
30
|
-
* "Pro Max", then "Pro", then plain.
|
|
31
|
-
*/
|
|
32
|
-
export function resolveAutoDestinationFromSimctlJson(rawJson) {
|
|
33
|
-
let parsed;
|
|
34
|
-
try {
|
|
35
|
-
parsed = JSON.parse(rawJson);
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
throw new AutoDestinationError('Failed to resolve destination: auto — xcrun simctl returned no usable output. ' +
|
|
39
|
-
'Pin a specific destination string instead.');
|
|
40
|
-
}
|
|
41
|
-
const iosRuntime = pickHighestIosRuntime(parsed.devices ?? {});
|
|
42
|
-
if (!iosRuntime) {
|
|
43
|
-
throw new AutoDestinationError('Failed to resolve destination: auto — no iPhone simulator runtimes are installed. ' +
|
|
44
|
-
'Install one via Xcode → Settings → Platforms.');
|
|
45
|
-
}
|
|
46
|
-
const iphone = pickNewestIphone(iosRuntime.devices);
|
|
47
|
-
if (!iphone) {
|
|
48
|
-
throw new AutoDestinationError('Failed to resolve destination: auto — no iPhone simulator runtimes are installed. ' +
|
|
49
|
-
'Install one via Xcode → Settings → Platforms.');
|
|
50
|
-
}
|
|
51
|
-
return `platform=iOS Simulator,OS=${iosRuntime.version},name=${iphone.name}`;
|
|
52
|
-
}
|
|
53
|
-
const IOS_RUNTIME_PREFIX = 'com.apple.CoreSimulator.SimRuntime.iOS-';
|
|
54
|
-
/**
|
|
55
|
-
* Picks the runtime with the highest semver among
|
|
56
|
-
* `com.apple.CoreSimulator.SimRuntime.iOS-*` keys whose device list contains
|
|
57
|
-
* at least one available iPhone.
|
|
58
|
-
*/
|
|
59
|
-
function pickHighestIosRuntime(devicesByRuntime) {
|
|
60
|
-
const candidates = [];
|
|
61
|
-
for (const [key, devices] of Object.entries(devicesByRuntime)) {
|
|
62
|
-
if (!key.startsWith(IOS_RUNTIME_PREFIX))
|
|
63
|
-
continue;
|
|
64
|
-
const versionSuffix = key.slice(IOS_RUNTIME_PREFIX.length); // e.g. "18-0"
|
|
65
|
-
const tuple = parseVersionTuple(versionSuffix.replace(/-/g, '.'));
|
|
66
|
-
if (tuple.length === 0)
|
|
67
|
-
continue;
|
|
68
|
-
const availableIphones = devices.filter((d) => isAvailableIphone(d));
|
|
69
|
-
if (availableIphones.length === 0)
|
|
70
|
-
continue;
|
|
71
|
-
candidates.push({
|
|
72
|
-
versionTuple: tuple,
|
|
73
|
-
version: tuple.join('.'),
|
|
74
|
-
devices: availableIphones,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (candidates.length === 0)
|
|
78
|
-
return null;
|
|
79
|
-
candidates.sort((a, b) => compareTuples(b.versionTuple, a.versionTuple));
|
|
80
|
-
const winner = candidates[0];
|
|
81
|
-
return { version: winner.version, devices: winner.devices };
|
|
82
|
-
}
|
|
83
|
-
function isAvailableIphone(device) {
|
|
84
|
-
if (device.isAvailable === false)
|
|
85
|
-
return false;
|
|
86
|
-
return typeof device.name === 'string' && device.name.startsWith('iPhone');
|
|
87
|
-
}
|
|
88
|
-
/** Parses "18.0" or "18.0.1" into [18, 0] / [18, 0, 1]. */
|
|
89
|
-
function parseVersionTuple(raw) {
|
|
90
|
-
const parts = raw.split('.');
|
|
91
|
-
const out = [];
|
|
92
|
-
for (const p of parts) {
|
|
93
|
-
const n = Number.parseInt(p, 10);
|
|
94
|
-
if (!Number.isFinite(n))
|
|
95
|
-
return [];
|
|
96
|
-
out.push(n);
|
|
97
|
-
}
|
|
98
|
-
return out;
|
|
99
|
-
}
|
|
100
|
-
function compareTuples(a, b) {
|
|
101
|
-
const len = Math.max(a.length, b.length);
|
|
102
|
-
for (let i = 0; i < len; i++) {
|
|
103
|
-
const av = a[i] ?? 0;
|
|
104
|
-
const bv = b[i] ?? 0;
|
|
105
|
-
if (av !== bv)
|
|
106
|
-
return av - bv;
|
|
107
|
-
}
|
|
108
|
-
return 0;
|
|
109
|
-
}
|
|
110
|
-
const VARIANT_RANK = [
|
|
111
|
-
{ pattern: /\bpro\s+max\b/i, rank: 3 },
|
|
112
|
-
{ pattern: /\bpro\b/i, rank: 2 },
|
|
113
|
-
{ pattern: /\bplus\b/i, rank: 1 },
|
|
114
|
-
];
|
|
115
|
-
/**
|
|
116
|
-
* Picks the newest iPhone by model-number suffix, with Pro Max > Pro > plain
|
|
117
|
-
* tie-breaking. iPhones with no numeric model (e.g. "iPhone SE (3rd generation)")
|
|
118
|
-
* are ranked below numeric models.
|
|
119
|
-
*/
|
|
120
|
-
function pickNewestIphone(devices) {
|
|
121
|
-
const scored = [];
|
|
122
|
-
for (const device of devices) {
|
|
123
|
-
if (!isAvailableIphone(device))
|
|
124
|
-
continue;
|
|
125
|
-
scored.push({
|
|
126
|
-
device,
|
|
127
|
-
model: extractIphoneModelNumber(device.name),
|
|
128
|
-
variantRank: extractVariantRank(device.name),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
if (scored.length === 0)
|
|
132
|
-
return null;
|
|
133
|
-
scored.sort((a, b) => {
|
|
134
|
-
if (a.model !== b.model)
|
|
135
|
-
return b.model - a.model;
|
|
136
|
-
if (a.variantRank !== b.variantRank)
|
|
137
|
-
return b.variantRank - a.variantRank;
|
|
138
|
-
return a.device.name.localeCompare(b.device.name);
|
|
139
|
-
});
|
|
140
|
-
return scored[0].device;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* "iPhone 16 Pro Max" → 16. "iPhone 15" → 15. "iPhone SE (3rd generation)" → -1.
|
|
144
|
-
* We look at the token immediately after "iPhone".
|
|
145
|
-
*/
|
|
146
|
-
function extractIphoneModelNumber(name) {
|
|
147
|
-
const match = name.match(/^iPhone\s+(\d+)/i);
|
|
148
|
-
if (!match)
|
|
149
|
-
return -1;
|
|
150
|
-
return Number.parseInt(match[1], 10);
|
|
151
|
-
}
|
|
152
|
-
function extractVariantRank(name) {
|
|
153
|
-
for (const { pattern, rank } of VARIANT_RANK) {
|
|
154
|
-
if (pattern.test(name))
|
|
155
|
-
return rank;
|
|
156
|
-
}
|
|
157
|
-
return 0;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Pass-through resolver used by xcode-* executors.
|
|
161
|
-
*
|
|
162
|
-
* Returns the literal value unchanged when it isn't the magic string `"auto"`.
|
|
163
|
-
* When it is, delegates to a resolver (default: {@link resolveAutoDestination},
|
|
164
|
-
* which shells out to `xcrun simctl`). The resolver injection point exists for
|
|
165
|
-
* tests, so executor-level tests can verify the "auto" branch without
|
|
166
|
-
* touching the host's xcrun.
|
|
167
|
-
*/
|
|
168
|
-
export function resolveDestinationInput(value, autoResolver = resolveAutoDestination) {
|
|
169
|
-
if (value !== 'auto')
|
|
170
|
-
return value;
|
|
171
|
-
return autoResolver();
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Shell-out wrapper: runs `xcrun simctl list devices available --json` and
|
|
175
|
-
* delegates the parse to {@link resolveAutoDestinationFromSimctlJson}.
|
|
176
|
-
*
|
|
177
|
-
* Surfaces the documented failure modes (xcrun missing, simctl failure,
|
|
178
|
-
* no iPhone runtime) as {@link AutoDestinationError}.
|
|
179
|
-
*/
|
|
180
|
-
export function resolveAutoDestination() {
|
|
181
|
-
let raw;
|
|
182
|
-
try {
|
|
183
|
-
raw = execFileSync('xcrun', ['simctl', 'list', 'devices', 'available', '--json'], {
|
|
184
|
-
encoding: 'utf-8',
|
|
185
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
catch (err) {
|
|
189
|
-
if (err && (err.code === 'ENOENT' || /not found/i.test(err.message ?? ''))) {
|
|
190
|
-
throw new AutoDestinationError('xcrun not available on this runner; cannot resolve destination: auto. ' +
|
|
191
|
-
'Pin a specific destination string instead.');
|
|
192
|
-
}
|
|
193
|
-
throw new AutoDestinationError('Failed to resolve destination: auto — xcrun simctl returned no usable output. ' +
|
|
194
|
-
'Pin a specific destination string instead.');
|
|
195
|
-
}
|
|
196
|
-
if (!raw || raw.trim() === '') {
|
|
197
|
-
throw new AutoDestinationError('Failed to resolve destination: auto — xcrun simctl returned no usable output. ' +
|
|
198
|
-
'Pin a specific destination string instead.');
|
|
199
|
-
}
|
|
200
|
-
return resolveAutoDestinationFromSimctlJson(raw);
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=xcode-destination.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the shared "auto destination" resolver.
|
|
3
|
-
*
|
|
4
|
-
* The resolver consumes the JSON `xcrun simctl list devices available --json`
|
|
5
|
-
* would produce on a macOS runner, and returns the canonical
|
|
6
|
-
* `platform=iOS Simulator,OS=<v>,name=<name>` string to feed to xcodebuild.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=xcode-destination.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xcode-destination.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/xcode-destination.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|