@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,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A cache key that cannot be computed costs a cache, not a pipeline.
|
|
3
|
-
*
|
|
4
|
-
* `cache_key: pods-{{checksum "Podfile.lock"}}` in a repository with no
|
|
5
|
-
* Podfile.lock used to abort conversion, so the build died at `cache-pull`
|
|
6
|
-
* before compiling a single file — including in repositories that use Swift
|
|
7
|
-
* Package Manager and have no reason to own a CocoaPods lockfile at all.
|
|
8
|
-
* Every other step keeps the hard failure: a checksum in a real input is a
|
|
9
|
-
* value that step needs.
|
|
10
|
-
*/
|
|
11
|
-
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
|
|
12
|
-
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
13
|
-
import { tmpdir } from 'node:os';
|
|
14
|
-
import { join } from 'node:path';
|
|
15
|
-
import { convertYAMLToPipelineDef } from './converter.js';
|
|
16
|
-
import { clearRegistry, registerStep } from './steps/registry.js';
|
|
17
|
-
import { ScriptStepExecutor } from './steps/script.js';
|
|
18
|
-
import { CachePullStepExecutor, CachePushStepExecutor } from './steps/cache.js';
|
|
19
|
-
const mockConfig = {
|
|
20
|
-
artifactsDir: '/test/artifacts',
|
|
21
|
-
maxConcurrentJobs: 1,
|
|
22
|
-
paths: {
|
|
23
|
-
buildsDir: '/test/builds',
|
|
24
|
-
cacheDir: '/test/cache',
|
|
25
|
-
derivedDataDir: '/test/derived-data',
|
|
26
|
-
},
|
|
27
|
-
interpreters: {
|
|
28
|
-
bash: '/bin/bash',
|
|
29
|
-
python: 'python3',
|
|
30
|
-
ruby: 'ruby',
|
|
31
|
-
node: 'node',
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
let workdir;
|
|
35
|
-
let previousCwd;
|
|
36
|
-
beforeEach(() => {
|
|
37
|
-
clearRegistry();
|
|
38
|
-
registerStep('script', new ScriptStepExecutor());
|
|
39
|
-
registerStep('cache-pull', new CachePullStepExecutor());
|
|
40
|
-
registerStep('cache-push', new CachePushStepExecutor());
|
|
41
|
-
previousCwd = process.cwd();
|
|
42
|
-
workdir = mkdtempSync(join(tmpdir(), 'cibuild-checksum-'));
|
|
43
|
-
process.chdir(workdir);
|
|
44
|
-
});
|
|
45
|
-
afterEach(() => {
|
|
46
|
-
process.chdir(previousCwd);
|
|
47
|
-
rmSync(workdir, { recursive: true, force: true });
|
|
48
|
-
clearRegistry();
|
|
49
|
-
});
|
|
50
|
-
function pipelineWithPodsCache() {
|
|
51
|
-
return {
|
|
52
|
-
format_version: '1',
|
|
53
|
-
workflows: {
|
|
54
|
-
primary: {
|
|
55
|
-
steps: [
|
|
56
|
-
{
|
|
57
|
-
'cache-pull': {
|
|
58
|
-
inputs: {
|
|
59
|
-
cache_key: 'pods-{{checksum "Podfile.lock"}}',
|
|
60
|
-
cache_paths: ['Pods'],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
script: {
|
|
66
|
-
title: 'Build',
|
|
67
|
-
inputs: { content: 'echo building' },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
'cache-push': {
|
|
72
|
-
inputs: {
|
|
73
|
-
cache_key: 'pods-{{checksum "Podfile.lock"}}',
|
|
74
|
-
cache_paths: ['Pods'],
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
describe('a cache key naming a file this repository does not have', () => {
|
|
84
|
-
test('skips the cache steps and keeps the build', async () => {
|
|
85
|
-
const result = await convertYAMLToPipelineDef(pipelineWithPodsCache(), mockConfig, 'primary');
|
|
86
|
-
expect(result.skippedSteps).toBe(2);
|
|
87
|
-
expect(Object.keys(result.pipeline.steps ?? {})).toHaveLength(1);
|
|
88
|
-
expect(result.warnings.join('\n')).toContain('Podfile.lock');
|
|
89
|
-
expect(result.warnings.join('\n')).toContain('uncached');
|
|
90
|
-
});
|
|
91
|
-
test('keeps the cache steps once the file is there', async () => {
|
|
92
|
-
writeFileSync(join(workdir, 'Podfile.lock'), 'PODFILE CHECKSUM: abc\n');
|
|
93
|
-
const result = await convertYAMLToPipelineDef(pipelineWithPodsCache(), mockConfig, 'primary');
|
|
94
|
-
expect(result.skippedSteps).toBe(0);
|
|
95
|
-
expect(Object.keys(result.pipeline.steps ?? {})).toHaveLength(3);
|
|
96
|
-
});
|
|
97
|
-
test('still fails a non-cache step whose checksum names a missing file', async () => {
|
|
98
|
-
const pipeline = {
|
|
99
|
-
format_version: '1',
|
|
100
|
-
workflows: {
|
|
101
|
-
primary: {
|
|
102
|
-
steps: [
|
|
103
|
-
{
|
|
104
|
-
script: {
|
|
105
|
-
title: 'Build',
|
|
106
|
-
inputs: { content: 'echo {{checksum "Podfile.lock"}}' },
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
await expect(convertYAMLToPipelineDef(pipeline, mockConfig, 'primary')).rejects.toThrow('Podfile.lock');
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
//# sourceMappingURL=cache-key-missing-file.test.js.map
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts YAML pipeline workflows to PipelineDef format
|
|
3
|
-
* This bridges the YAML configuration with the existing runner engine
|
|
4
|
-
*/
|
|
5
|
-
import type { PipelineDef, CIConfig } from '../types.js';
|
|
6
|
-
import type { YAMLPipeline } from './types.js';
|
|
7
|
-
export declare class YAMLConversionError extends Error {
|
|
8
|
-
constructor(message: string);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Result of YAML to PipelineDef conversion
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* What was on disk when the pipeline was converted — the only thing that can
|
|
15
|
-
* say which commit a build actually compiled.
|
|
16
|
-
*
|
|
17
|
-
* A dashboard's sha is the one that was *dispatched*. Between dispatch and
|
|
18
|
-
* checkout a branch can move, a tag can be re-pointed, and a shared checkout
|
|
19
|
-
* can be pushed over. Until now the sole in-log evidence was `git-clone`'s
|
|
20
|
-
* own echo, which is optional and on its way out of the templates.
|
|
21
|
-
*/
|
|
22
|
-
export interface CheckoutWitness {
|
|
23
|
-
/** Full SHA of HEAD. */
|
|
24
|
-
commit: string;
|
|
25
|
-
/** `Name <email>` of the commit's author, empty when unknown. */
|
|
26
|
-
author: string;
|
|
27
|
-
/** First line of the commit message, empty when unknown. */
|
|
28
|
-
subject: string;
|
|
29
|
-
}
|
|
30
|
-
export interface ConversionResult {
|
|
31
|
-
pipeline: PipelineDef;
|
|
32
|
-
warnings: string[];
|
|
33
|
-
skippedSteps: number;
|
|
34
|
-
/**
|
|
35
|
-
* Absent only when the working directory is not a git checkout — a local
|
|
36
|
-
* `ci run` in a plain directory, never a runner.
|
|
37
|
-
*/
|
|
38
|
-
checkout?: CheckoutWitness;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* A credential a `file@` step writes, and where it goes.
|
|
42
|
-
*/
|
|
43
|
-
export interface CredentialTarget {
|
|
44
|
-
targetPath: string;
|
|
45
|
-
varName: string;
|
|
46
|
-
}
|
|
47
|
-
/** A cache step's declared paths, and which step declared them. */
|
|
48
|
-
export interface CachePathDeclaration {
|
|
49
|
-
stepName: string;
|
|
50
|
-
cachePaths: string[];
|
|
51
|
-
}
|
|
52
|
-
export interface SwallowedCredential {
|
|
53
|
-
stepName: string;
|
|
54
|
-
cachePath: string;
|
|
55
|
-
targetPath: string;
|
|
56
|
-
varName: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* True when caching `cachePath` would sweep up the file at `targetPath`.
|
|
60
|
-
*
|
|
61
|
-
* Only a project-relative entry can: `cache.ts` classifies a `~`- or
|
|
62
|
-
* `/`-rooted entry as absolute and stores it from the filesystem root, so it
|
|
63
|
-
* is somewhere the checkout is not. An entry naming the checkout itself (`.`,
|
|
64
|
-
* `./`) contains everything.
|
|
65
|
-
*/
|
|
66
|
-
export declare function cacheEntryContains(cachePath: string, targetPath: string): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Every credential a workflow's cache steps would archive.
|
|
69
|
-
*
|
|
70
|
-
* `cache-push` uploads whatever `cache_paths` names, and that archive is
|
|
71
|
-
* stored where the *next* build pulls it from — so a credential swept into it
|
|
72
|
-
* outlives the build that received it. Everything else about a credential's
|
|
73
|
-
* life is bounded: the runner pushes the checkout and the guest root onto
|
|
74
|
-
* `cleanupPaths` and removes them in a `finally`, the guest gets
|
|
75
|
-
* `rm -rf`, and `tart delete` reclaims the VM. The cache store is the one
|
|
76
|
-
* place a file can survive all of that, which makes this the single hole in
|
|
77
|
-
* "nothing survives a build".
|
|
78
|
-
*
|
|
79
|
-
* No pipeline in play trips it — every one of them caches `~/.gradle/caches`,
|
|
80
|
-
* `~/.gradle/wrapper` and `.gradle`, and none of those contains a credential —
|
|
81
|
-
* so this is a guard on a mistake that is easy to make and impossible to see:
|
|
82
|
-
* adding `.` to `cache_paths` is a plausible way to speed up a build, and it
|
|
83
|
-
* would publish the keystore.
|
|
84
|
-
*/
|
|
85
|
-
export declare function credentialsSwallowedByCache(credentials: readonly CredentialTarget[], caches: readonly CachePathDeclaration[]): SwallowedCredential[];
|
|
86
|
-
/** The refusal text for one swallowed credential. */
|
|
87
|
-
export declare function swallowedCredentialMessage(workflowName: string, swallowed: SwallowedCredential): string;
|
|
88
|
-
/**
|
|
89
|
-
* Converts a YAML pipeline workflow to PipelineDef format
|
|
90
|
-
* @param pipeline Parsed YAML pipeline
|
|
91
|
-
* @param config CI configuration with path mappings
|
|
92
|
-
* @param workflowName Name of the workflow to convert (if not specified, uses first workflow)
|
|
93
|
-
* @param yamlFilePath Optional path to the YAML file (used for naming SSH keys, etc.)
|
|
94
|
-
* @returns ConversionResult with PipelineDef and warnings about unsupported steps
|
|
95
|
-
*/
|
|
96
|
-
export declare function convertYAMLToPipelineDef(pipeline: YAMLPipeline, config: CIConfig, workflowName?: string, yamlFilePath?: string): Promise<ConversionResult>;
|
|
97
|
-
/**
|
|
98
|
-
* Helper function to get available workflow names from a pipeline
|
|
99
|
-
* @param pipeline Parsed YAML pipeline
|
|
100
|
-
* @returns Array of workflow names
|
|
101
|
-
*/
|
|
102
|
-
export declare function getAvailableWorkflows(pipeline: YAMLPipeline): string[];
|
|
103
|
-
//# sourceMappingURL=converter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../src/yaml/converter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAW,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAA4B,MAAM,YAAY,CAAC;AAMzE,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAaD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,mEAAmE;AACnE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CASjF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,SAAS,gBAAgB,EAAE,EACxC,MAAM,EAAE,SAAS,oBAAoB,EAAE,GACtC,mBAAmB,EAAE,CAgBvB;AAED,qDAAqD;AACrD,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,mBAAmB,GAC7B,MAAM,CAaR;AA6DD;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,QAAQ,EAChB,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,gBAAgB,CAAC,CA0M3B;AAwGD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,EAAE,CAEtE"}
|
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts YAML pipeline workflows to PipelineDef format
|
|
3
|
-
* This bridges the YAML configuration with the existing runner engine
|
|
4
|
-
*/
|
|
5
|
-
import { getInvarnMeta } from './meta-helpers.js';
|
|
6
|
-
import { detectPlatformInfo } from './platform-detector.js';
|
|
7
|
-
import { EnvResolver, ChecksumFileMissingError } from './env-resolver.js';
|
|
8
|
-
import { getStepExecutor, UnrecognizedStepError } from './steps/registry.js';
|
|
9
|
-
export class YAMLConversionError extends Error {
|
|
10
|
-
constructor(message) {
|
|
11
|
-
super(message);
|
|
12
|
-
this.name = 'YAMLConversionError';
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The steps whose whole job is to make a build faster. Nothing they do is
|
|
17
|
-
* required for the build to be correct, so an input they cannot resolve
|
|
18
|
-
* costs a cache, not a pipeline.
|
|
19
|
-
*/
|
|
20
|
-
const CACHE_STEPS = new Set(['cache-pull', 'cache-push']);
|
|
21
|
-
function isCacheStep(stepName) {
|
|
22
|
-
return CACHE_STEPS.has(stepName);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Trailing slashes and a leading `./` off, backslashes forward. `.` and the
|
|
26
|
-
* empty string both mean "the whole checkout".
|
|
27
|
-
*/
|
|
28
|
-
function normalizeCheckoutPath(path) {
|
|
29
|
-
const forward = path.trim().replace(/\\/g, '/');
|
|
30
|
-
const withoutLead = forward.replace(/^\.\//, '');
|
|
31
|
-
const withoutTrail = withoutLead.replace(/\/+$/, '');
|
|
32
|
-
return withoutTrail === '.' ? '' : withoutTrail;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* True when caching `cachePath` would sweep up the file at `targetPath`.
|
|
36
|
-
*
|
|
37
|
-
* Only a project-relative entry can: `cache.ts` classifies a `~`- or
|
|
38
|
-
* `/`-rooted entry as absolute and stores it from the filesystem root, so it
|
|
39
|
-
* is somewhere the checkout is not. An entry naming the checkout itself (`.`,
|
|
40
|
-
* `./`) contains everything.
|
|
41
|
-
*/
|
|
42
|
-
export function cacheEntryContains(cachePath, targetPath) {
|
|
43
|
-
const raw = cachePath.trim();
|
|
44
|
-
if (raw.startsWith('~') || raw.startsWith('/'))
|
|
45
|
-
return false;
|
|
46
|
-
const cache = normalizeCheckoutPath(raw);
|
|
47
|
-
const target = normalizeCheckoutPath(targetPath);
|
|
48
|
-
if (target === '')
|
|
49
|
-
return false;
|
|
50
|
-
if (cache === '')
|
|
51
|
-
return true;
|
|
52
|
-
return target === cache || target.startsWith(`${cache}/`);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Every credential a workflow's cache steps would archive.
|
|
56
|
-
*
|
|
57
|
-
* `cache-push` uploads whatever `cache_paths` names, and that archive is
|
|
58
|
-
* stored where the *next* build pulls it from — so a credential swept into it
|
|
59
|
-
* outlives the build that received it. Everything else about a credential's
|
|
60
|
-
* life is bounded: the runner pushes the checkout and the guest root onto
|
|
61
|
-
* `cleanupPaths` and removes them in a `finally`, the guest gets
|
|
62
|
-
* `rm -rf`, and `tart delete` reclaims the VM. The cache store is the one
|
|
63
|
-
* place a file can survive all of that, which makes this the single hole in
|
|
64
|
-
* "nothing survives a build".
|
|
65
|
-
*
|
|
66
|
-
* No pipeline in play trips it — every one of them caches `~/.gradle/caches`,
|
|
67
|
-
* `~/.gradle/wrapper` and `.gradle`, and none of those contains a credential —
|
|
68
|
-
* so this is a guard on a mistake that is easy to make and impossible to see:
|
|
69
|
-
* adding `.` to `cache_paths` is a plausible way to speed up a build, and it
|
|
70
|
-
* would publish the keystore.
|
|
71
|
-
*/
|
|
72
|
-
export function credentialsSwallowedByCache(credentials, caches) {
|
|
73
|
-
const found = [];
|
|
74
|
-
for (const cache of caches) {
|
|
75
|
-
for (const cachePath of cache.cachePaths) {
|
|
76
|
-
for (const credential of credentials) {
|
|
77
|
-
if (!cacheEntryContains(cachePath, credential.targetPath))
|
|
78
|
-
continue;
|
|
79
|
-
found.push({
|
|
80
|
-
stepName: cache.stepName,
|
|
81
|
-
cachePath: cachePath.trim(),
|
|
82
|
-
targetPath: credential.targetPath,
|
|
83
|
-
varName: credential.varName,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return found;
|
|
89
|
-
}
|
|
90
|
-
/** The refusal text for one swallowed credential. */
|
|
91
|
-
export function swallowedCredentialMessage(workflowName, swallowed) {
|
|
92
|
-
return [
|
|
93
|
-
`Workflow "${workflowName}" would cache a credential.`,
|
|
94
|
-
``,
|
|
95
|
-
` The ${swallowed.stepName} step lists "${swallowed.cachePath}" in cache_paths, and that`,
|
|
96
|
-
` contains "${swallowed.targetPath}" — the file written from the ${swallowed.varName} secret.`,
|
|
97
|
-
``,
|
|
98
|
-
` A cached credential outlives the build. The archive is stored where the next`,
|
|
99
|
-
` build pulls it from, and nothing removes it when the sandbox is destroyed.`,
|
|
100
|
-
``,
|
|
101
|
-
` Narrow the cache_paths entry to the directories the build needs cached, or`,
|
|
102
|
-
` write the credential somewhere outside them.`,
|
|
103
|
-
].join('\n');
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Mapping of common unsupported steps to CI Build alternatives
|
|
107
|
-
*/
|
|
108
|
-
const STEP_SUGGESTIONS = {
|
|
109
|
-
'create-install-page-qr-code': 'Use script step with qrencode to generate QR codes',
|
|
110
|
-
'deploy-to-itunesconnect-deliver': 'Use script step with fastlane deliver or xcrun altool',
|
|
111
|
-
'deploy-to-itunesconnect-application-loader': 'Use script step with xcrun altool',
|
|
112
|
-
'amazon-s3-deploy': 'Use built-in S3 upload via upload-artifacts.sh script',
|
|
113
|
-
'deploy-to-bitrise-io': 'Use app-store-deploy (iOS) or google-play-deploy (Android) for store deployment, or a script step for generic S3 upload',
|
|
114
|
-
'generic-file-storage': 'Use a script step with upload-artifacts.sh for S3 upload',
|
|
115
|
-
'bitrise-step-install-from-source': 'Not supported - use native CI Build steps',
|
|
116
|
-
'npm': 'Use script step with npm commands',
|
|
117
|
-
'yarn': 'Use script step with yarn commands',
|
|
118
|
-
'danger': 'Use script step with danger commands',
|
|
119
|
-
'firebase-app-distribution': 'Use script step with Firebase CLI',
|
|
120
|
-
'firebase-test-lab': 'Use script step with gcloud firebase test',
|
|
121
|
-
'find-jira-issue': 'Use script step with JIRA REST API',
|
|
122
|
-
'comment-on-github-pull-request': 'Use script step with GitHub API or gh CLI',
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Bitrise step names that differ from their cibuild equivalents.
|
|
126
|
-
* Most Bitrise steps keep the same name — only remaps are listed here.
|
|
127
|
-
* See steps/bitrise-map.yml for the full version-tracking map.
|
|
128
|
-
*/
|
|
129
|
-
const BITRISE_TO_CIBUILD = {
|
|
130
|
-
'gradle-runner': 'gradle-build',
|
|
131
|
-
'certificate-and-profile-installer': 'certificate-installer',
|
|
132
|
-
'android-detekt': 'detekt',
|
|
133
|
-
'bitrise-step-flutter-installer': 'flutter-installer',
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Reads the checkout's identity back out of the resolver, which computed it
|
|
137
|
-
* from the very working directory the build is about to run in.
|
|
138
|
-
*
|
|
139
|
-
* Read through `getAll()` rather than `get()`: the latter records every name
|
|
140
|
-
* it is asked for in `referencedVars`, and a pipeline is refused when a
|
|
141
|
-
* referenced name has no value. Nothing here is a variable the pipeline
|
|
142
|
-
* referenced.
|
|
143
|
-
*
|
|
144
|
-
* `EnvResolver` falls back to the literal string `HEAD` when `git rev-parse`
|
|
145
|
-
* fails, so the shape of the hash — not a second question to git — is what
|
|
146
|
-
* tells a real checkout from a plain directory.
|
|
147
|
-
*/
|
|
148
|
-
function checkoutWitnessFrom(env) {
|
|
149
|
-
const commit = env['CIBUILD_GIT_COMMIT'] ?? '';
|
|
150
|
-
if (!/^[0-9a-f]{7,40}$/.test(commit))
|
|
151
|
-
return undefined;
|
|
152
|
-
const name = env['GIT_CLONE_COMMIT_AUTHOR_NAME'] ?? '';
|
|
153
|
-
const email = env['GIT_CLONE_COMMIT_AUTHOR_EMAIL'] ?? '';
|
|
154
|
-
return {
|
|
155
|
-
commit,
|
|
156
|
-
author: name && email ? `${name} <${email}>` : name || email,
|
|
157
|
-
subject: env['GIT_CLONE_COMMIT_MESSAGE_SUBJECT'] ?? '',
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Converts a YAML pipeline workflow to PipelineDef format
|
|
162
|
-
* @param pipeline Parsed YAML pipeline
|
|
163
|
-
* @param config CI configuration with path mappings
|
|
164
|
-
* @param workflowName Name of the workflow to convert (if not specified, uses first workflow)
|
|
165
|
-
* @param yamlFilePath Optional path to the YAML file (used for naming SSH keys, etc.)
|
|
166
|
-
* @returns ConversionResult with PipelineDef and warnings about unsupported steps
|
|
167
|
-
*/
|
|
168
|
-
export async function convertYAMLToPipelineDef(pipeline, config, workflowName, yamlFilePath) {
|
|
169
|
-
// Initialize warnings collection
|
|
170
|
-
const warnings = [];
|
|
171
|
-
let skippedSteps = 0;
|
|
172
|
-
// Step 1: Workflow selection (FR-22, sub-task 3.7)
|
|
173
|
-
const selectedWorkflow = selectWorkflow(pipeline, workflowName);
|
|
174
|
-
const selectedWorkflowName = workflowName || Object.keys(pipeline.workflows)[0];
|
|
175
|
-
// Step 2: Platform detection
|
|
176
|
-
const platformInfo = detectPlatformInfo(pipeline, selectedWorkflowName);
|
|
177
|
-
// Step 3: Environment variable resolution
|
|
178
|
-
const envResolver = new EnvResolver(pipeline, selectedWorkflow, selectedWorkflowName, platformInfo.platform, platformInfo.stack, yamlFilePath);
|
|
179
|
-
// Step 3.5: Auto-inject cache steps if cachedBuild is enabled
|
|
180
|
-
const invarnMeta = getInvarnMeta(pipeline);
|
|
181
|
-
const cachedBuild = invarnMeta?.cachedBuild === true;
|
|
182
|
-
let workflowSteps = [...selectedWorkflow.steps];
|
|
183
|
-
if (cachedBuild && invarnMeta?.platform) {
|
|
184
|
-
const platformToCacheTechnology = {
|
|
185
|
-
ios: 'ios',
|
|
186
|
-
android: 'gradle',
|
|
187
|
-
kmm: 'kmm',
|
|
188
|
-
};
|
|
189
|
-
const technology = platformToCacheTechnology[invarnMeta.platform];
|
|
190
|
-
if (technology) {
|
|
191
|
-
// Remove any manually written cache-pull/cache-push steps
|
|
192
|
-
workflowSteps = workflowSteps.filter(step => {
|
|
193
|
-
const stepKey = Object.keys(step)[0];
|
|
194
|
-
const stepName = stepKey.split('@')[0];
|
|
195
|
-
return stepName !== 'cache-pull' && stepName !== 'cache-push';
|
|
196
|
-
});
|
|
197
|
-
const cachePullStep = { 'cache-pull@1.0.0': { inputs: { technology } } };
|
|
198
|
-
const cachePushStep = { 'cache-push@1.0.0': { inputs: { technology } } };
|
|
199
|
-
workflowSteps.unshift(cachePullStep);
|
|
200
|
-
workflowSteps.push(cachePushStep);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
// Step 4: Parse and convert steps
|
|
204
|
-
const steps = [];
|
|
205
|
-
const stepsOrder = [];
|
|
206
|
-
let stepCounter = 0;
|
|
207
|
-
// Collected as the steps are converted, checked once at the end: a cache
|
|
208
|
-
// step can be declared before the `file@` step whose target it would
|
|
209
|
-
// swallow, so neither one alone can answer the question.
|
|
210
|
-
const credentialTargets = [];
|
|
211
|
-
const cacheDeclarations = [];
|
|
212
|
-
for (const yamlStep of workflowSteps) {
|
|
213
|
-
// Parse step (sub-task 3.8)
|
|
214
|
-
const parsedStep = parseStep(yamlStep, stepCounter);
|
|
215
|
-
stepCounter++;
|
|
216
|
-
// Handle conditional execution (sub-task 3.9)
|
|
217
|
-
// Note: run_if, is_always_run, is_skippable will be implemented
|
|
218
|
-
// when we have the step registry
|
|
219
|
-
// Remap Bitrise step names that differ from cibuild names
|
|
220
|
-
const resolvedStepName = BITRISE_TO_CIBUILD[parsedStep.name] ?? parsedStep.name;
|
|
221
|
-
// Get step executor from registry - catch unrecognized steps
|
|
222
|
-
let stepExecutor;
|
|
223
|
-
try {
|
|
224
|
-
stepExecutor = getStepExecutor(resolvedStepName);
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
if (error instanceof UnrecognizedStepError) {
|
|
228
|
-
// Add warning and skip this step
|
|
229
|
-
const stepIdentifier = parsedStep.version
|
|
230
|
-
? `${parsedStep.name}@${parsedStep.version}`
|
|
231
|
-
: parsedStep.name;
|
|
232
|
-
// Check if there's a suggested alternative
|
|
233
|
-
const suggestion = STEP_SUGGESTIONS[parsedStep.name];
|
|
234
|
-
let warningMessage = `⚠️ Unsupported step: ${stepIdentifier} (skipping)`;
|
|
235
|
-
if (suggestion) {
|
|
236
|
-
warningMessage += `\n 💡 Suggestion: ${suggestion}`;
|
|
237
|
-
}
|
|
238
|
-
warnings.push(warningMessage);
|
|
239
|
-
skippedSteps++;
|
|
240
|
-
continue; // Skip to next step
|
|
241
|
-
}
|
|
242
|
-
// Re-throw other errors
|
|
243
|
-
throw error;
|
|
244
|
-
}
|
|
245
|
-
// Interpolate step inputs
|
|
246
|
-
//
|
|
247
|
-
// A cache step whose key cannot be computed is not a broken pipeline. The
|
|
248
|
-
// key is usually `{{checksum "<lockfile>"}}`, and a repository without
|
|
249
|
-
// that lockfile has nothing to key a cache on — so there is no cache, and
|
|
250
|
-
// the build runs cold. Letting the error through instead killed five iOS
|
|
251
|
-
// builds in a thirty-repository study at `cache-pull`, before a single
|
|
252
|
-
// file compiled, on a CocoaPods lockfile that two of them had no reason
|
|
253
|
-
// to have. Every other step keeps the hard failure: a checksum in a real
|
|
254
|
-
// input is a value the step needs.
|
|
255
|
-
let interpolatedInputs;
|
|
256
|
-
try {
|
|
257
|
-
interpolatedInputs = envResolver.interpolateObject(parsedStep.inputs, parsedStep.title || parsedStep.name);
|
|
258
|
-
}
|
|
259
|
-
catch (error) {
|
|
260
|
-
if (error instanceof ChecksumFileMissingError && isCacheStep(resolvedStepName)) {
|
|
261
|
-
warnings.push(`⚠️ ${resolvedStepName}: no ${error.filePath} in this repository, so there is ` +
|
|
262
|
-
`nothing to key the cache on (skipping — the build runs uncached)`);
|
|
263
|
-
skippedSteps++;
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
throw error;
|
|
267
|
-
}
|
|
268
|
-
// Both halves of the cache-swallows-a-credential question, read off the
|
|
269
|
-
// interpolated inputs so `$PROJECT_LOCATION` and friends are already the
|
|
270
|
-
// paths they will be at runtime.
|
|
271
|
-
if (resolvedStepName === 'file') {
|
|
272
|
-
const targetPath = interpolatedInputs?.target_path;
|
|
273
|
-
const varName = interpolatedInputs?.var_name;
|
|
274
|
-
if (typeof targetPath === 'string' && typeof varName === 'string') {
|
|
275
|
-
credentialTargets.push({ targetPath, varName });
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (isCacheStep(resolvedStepName)) {
|
|
279
|
-
const declared = interpolatedInputs?.cache_paths;
|
|
280
|
-
const cachePaths = Array.isArray(declared)
|
|
281
|
-
? declared.filter((p) => typeof p === 'string')
|
|
282
|
-
: typeof declared === 'string'
|
|
283
|
-
? [declared]
|
|
284
|
-
: [];
|
|
285
|
-
if (cachePaths.length > 0) {
|
|
286
|
-
cacheDeclarations.push({ stepName: resolvedStepName, cachePaths });
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
// Execute step to get script
|
|
290
|
-
const stepDef = await stepExecutor.execute(interpolatedInputs, envResolver.getAll(), config);
|
|
291
|
-
// Generate unique step ID
|
|
292
|
-
const stepId = `step_${stepCounter}`;
|
|
293
|
-
stepDef.id = stepId;
|
|
294
|
-
stepDef.name = parsedStep.title || parsedStep.name;
|
|
295
|
-
// Cache steps are always skippable — they degrade gracefully and should
|
|
296
|
-
// never abort a pipeline.
|
|
297
|
-
const alwaysSkippableSteps = ['cache-pull', 'cache-push'];
|
|
298
|
-
stepDef.isSkippable = parsedStep.is_skippable || alwaysSkippableSteps.includes(resolvedStepName);
|
|
299
|
-
steps.push(stepDef);
|
|
300
|
-
stepsOrder.push(stepId);
|
|
301
|
-
// Register this step's outputs as passthrough shell references so that
|
|
302
|
-
// later steps can reference them without triggering a missing-var error.
|
|
303
|
-
if (stepExecutor.getOutputs) {
|
|
304
|
-
for (const output of stepExecutor.getOutputs()) {
|
|
305
|
-
envResolver.registerStepOutput(output.name);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
// Step 4b: refuse a pipeline that would archive a credential.
|
|
310
|
-
//
|
|
311
|
-
// Thrown at generation time for the same reason issue 03's missing-credential
|
|
312
|
-
// refusal is: it is the only place that can see the whole workflow, and the
|
|
313
|
-
// alternative is a build that succeeds while publishing a key. A pipeline
|
|
314
|
-
// configuration error, and the author is the one who can fix it.
|
|
315
|
-
const swallowed = credentialsSwallowedByCache(credentialTargets, cacheDeclarations);
|
|
316
|
-
if (swallowed.length > 0) {
|
|
317
|
-
throw new YAMLConversionError(swallowed.map((s) => swallowedCredentialMessage(selectedWorkflowName, s)).join('\n\n'));
|
|
318
|
-
}
|
|
319
|
-
// Step 5: Create PipelineDef
|
|
320
|
-
const pipelineDef = {
|
|
321
|
-
name: `${selectedWorkflowName} (YAML)`,
|
|
322
|
-
artifacts: [], // YAML pipelines don't define artifacts in the same way
|
|
323
|
-
steps,
|
|
324
|
-
stepsOrder,
|
|
325
|
-
};
|
|
326
|
-
return {
|
|
327
|
-
pipeline: pipelineDef,
|
|
328
|
-
warnings,
|
|
329
|
-
skippedSteps,
|
|
330
|
-
checkout: checkoutWitnessFrom(envResolver.getAll()),
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Selects a workflow from the pipeline
|
|
335
|
-
* If workflowName is not specified, returns the first workflow
|
|
336
|
-
* @param pipeline Parsed YAML pipeline
|
|
337
|
-
* @param workflowName Optional workflow name
|
|
338
|
-
* @returns Selected workflow
|
|
339
|
-
* @throws YAMLConversionError if workflow not found
|
|
340
|
-
*/
|
|
341
|
-
function selectWorkflow(pipeline, workflowName) {
|
|
342
|
-
// If no workflow specified, use the first one (FR-4)
|
|
343
|
-
if (!workflowName) {
|
|
344
|
-
const firstWorkflowName = Object.keys(pipeline.workflows)[0];
|
|
345
|
-
return pipeline.workflows[firstWorkflowName];
|
|
346
|
-
}
|
|
347
|
-
// Check if specified workflow exists
|
|
348
|
-
const workflow = pipeline.workflows[workflowName];
|
|
349
|
-
if (!workflow) {
|
|
350
|
-
const availableWorkflows = Object.keys(pipeline.workflows).join(', ');
|
|
351
|
-
throw new YAMLConversionError(`Workflow '${workflowName}' not found in pipeline.\n` +
|
|
352
|
-
`Available workflows: ${availableWorkflows}`);
|
|
353
|
-
}
|
|
354
|
-
return workflow;
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Parses a YAML step object into a ParsedStep
|
|
358
|
-
* Handles the step-name@version format
|
|
359
|
-
* @param yamlStep YAML step object
|
|
360
|
-
* @param index Step index for error messages
|
|
361
|
-
* @returns ParsedStep with name, version, and inputs
|
|
362
|
-
*/
|
|
363
|
-
function parseStep(yamlStep, index) {
|
|
364
|
-
// Each YAML step is an object with one key: "step-name@version"
|
|
365
|
-
const stepKeys = Object.keys(yamlStep);
|
|
366
|
-
if (stepKeys.length === 0) {
|
|
367
|
-
throw new YAMLConversionError(`Step at index ${index} has no step name defined`);
|
|
368
|
-
}
|
|
369
|
-
const stepNameWithVersion = stepKeys[0];
|
|
370
|
-
const stepConfig = yamlStep[stepNameWithVersion];
|
|
371
|
-
// Parse step name and version (FR-8)
|
|
372
|
-
const { name, version } = parseStepNameAndVersion(stepNameWithVersion);
|
|
373
|
-
// Convert Bitrise array-style inputs to object format
|
|
374
|
-
let inputs = stepConfig.inputs || {};
|
|
375
|
-
if (Array.isArray(inputs)) {
|
|
376
|
-
// Bitrise format: inputs are an array of objects with single key-value pairs
|
|
377
|
-
const inputsObj = {};
|
|
378
|
-
for (const input of inputs) {
|
|
379
|
-
if (typeof input === 'object' && input !== null) {
|
|
380
|
-
Object.assign(inputsObj, input);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
inputs = inputsObj;
|
|
384
|
-
}
|
|
385
|
-
// Extract step configuration
|
|
386
|
-
const parsedStep = {
|
|
387
|
-
name,
|
|
388
|
-
version,
|
|
389
|
-
title: stepConfig.title,
|
|
390
|
-
inputs,
|
|
391
|
-
run_if: stepConfig.run_if,
|
|
392
|
-
is_always_run: stepConfig.is_always_run,
|
|
393
|
-
is_skippable: stepConfig.is_skippable,
|
|
394
|
-
};
|
|
395
|
-
return parsedStep;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Parses step name and version from "step-name@version" format
|
|
399
|
-
* @param stepNameWithVersion Full step identifier
|
|
400
|
-
* @returns Object with name and optional version
|
|
401
|
-
*/
|
|
402
|
-
function parseStepNameAndVersion(stepNameWithVersion) {
|
|
403
|
-
const atIndex = stepNameWithVersion.indexOf('@');
|
|
404
|
-
if (atIndex === -1) {
|
|
405
|
-
// No version specified
|
|
406
|
-
return { name: stepNameWithVersion };
|
|
407
|
-
}
|
|
408
|
-
const name = stepNameWithVersion.substring(0, atIndex);
|
|
409
|
-
const version = stepNameWithVersion.substring(atIndex + 1);
|
|
410
|
-
return { name, version };
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Helper function to get available workflow names from a pipeline
|
|
414
|
-
* @param pipeline Parsed YAML pipeline
|
|
415
|
-
* @returns Array of workflow names
|
|
416
|
-
*/
|
|
417
|
-
export function getAvailableWorkflows(pipeline) {
|
|
418
|
-
return Object.keys(pipeline.workflows);
|
|
419
|
-
}
|
|
420
|
-
//# sourceMappingURL=converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.test.d.ts","sourceRoot":"","sources":["../../../src/yaml/converter.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|