@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,446 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* End-to-end integration tests for YAML pipelines
|
|
3
|
-
* Tests complete YAML pipeline loading and execution through CLI components
|
|
4
|
-
*/
|
|
5
|
-
import { describe, test, expect } from '@jest/globals';
|
|
6
|
-
import { loadYAMLPipeline } from './parser.js';
|
|
7
|
-
import { convertYAMLToPipelineDef } from './converter.js';
|
|
8
|
-
import { detectPlatformInfo } from './platform-detector.js';
|
|
9
|
-
import { resolve } from 'node:path';
|
|
10
|
-
import { existsSync } from 'node:fs';
|
|
11
|
-
import * as jsYaml from 'js-yaml';
|
|
12
|
-
import './steps/index.js'; // Initialize step registry
|
|
13
|
-
// Test helper for default config
|
|
14
|
-
const testConfig = {
|
|
15
|
-
artifactsDir: './artifacts',
|
|
16
|
-
interpreters: {
|
|
17
|
-
python: 'python3',
|
|
18
|
-
ruby: 'ruby',
|
|
19
|
-
node: 'node',
|
|
20
|
-
bash: '/bin/bash',
|
|
21
|
-
},
|
|
22
|
-
maxConcurrentJobs: 1,
|
|
23
|
-
paths: {
|
|
24
|
-
buildsDir: '.ci-builds',
|
|
25
|
-
cacheDir: '.ci-cache',
|
|
26
|
-
derivedDataDir: '~/Library/Developer/Xcode/DerivedData',
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
describe('YAML Pipeline End-to-End Tests', () => {
|
|
30
|
-
const examplesDir = resolve(process.cwd(), 'examples');
|
|
31
|
-
describe('iOS Build Pipeline', () => {
|
|
32
|
-
const pipelinePath = resolve(examplesDir, 'ios-build.yml');
|
|
33
|
-
test('should load and parse iOS pipeline file', () => {
|
|
34
|
-
expect(existsSync(pipelinePath)).toBe(true);
|
|
35
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
36
|
-
expect(yamlPipeline.format_version).toBe('4');
|
|
37
|
-
expect(yamlPipeline.workflows).toBeDefined();
|
|
38
|
-
expect(yamlPipeline.workflows.primary).toBeDefined();
|
|
39
|
-
expect(yamlPipeline.workflows.debug).toBeDefined();
|
|
40
|
-
});
|
|
41
|
-
test('should convert primary workflow to PipelineDef', async () => {
|
|
42
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
43
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
44
|
-
expect(result.pipeline.name).toBe('primary (YAML)');
|
|
45
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
46
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
47
|
-
// Verify step IDs are generated
|
|
48
|
-
const stepIds = result.pipeline.steps.map(s => s.id);
|
|
49
|
-
expect(stepIds).toContain('step_1');
|
|
50
|
-
expect(stepIds).toContain('step_2');
|
|
51
|
-
});
|
|
52
|
-
test('should detect macOS platform for iOS workflow', () => {
|
|
53
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
54
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'primary');
|
|
55
|
-
expect(platformInfo.platform).toBe('macos');
|
|
56
|
-
expect(platformInfo.stack).toBe('macos-ventura-xcode-15.1');
|
|
57
|
-
expect(platformInfo.machineType).toBe('performance');
|
|
58
|
-
});
|
|
59
|
-
test('should convert debug workflow to PipelineDef', async () => {
|
|
60
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
61
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'debug');
|
|
62
|
-
expect(result.pipeline.name).toBe('debug (YAML)');
|
|
63
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
64
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
65
|
-
});
|
|
66
|
-
test('should include all expected iOS steps', async () => {
|
|
67
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
68
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
69
|
-
const stepNames = result.pipeline.steps.map(s => s.name);
|
|
70
|
-
expect(stepNames).toContain('git-clone');
|
|
71
|
-
expect(stepNames).toContain('cache-pull');
|
|
72
|
-
expect(stepNames).toContain('cache-push');
|
|
73
|
-
// xcodebuild and xcode-test steps should exist (titles may vary)
|
|
74
|
-
expect(result.pipeline.steps.length).toBeGreaterThanOrEqual(5);
|
|
75
|
-
});
|
|
76
|
-
test('should include environment-dependent step scripts', async () => {
|
|
77
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
78
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
79
|
-
// Check that steps have generated scripts (environment variables resolved during conversion)
|
|
80
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
81
|
-
// Check that all steps have valid scripts
|
|
82
|
-
for (const step of result.pipeline.steps) {
|
|
83
|
-
expect(step.script).toBeDefined();
|
|
84
|
-
expect(typeof step.script).toBe('string');
|
|
85
|
-
expect(step.script.length).toBeGreaterThan(0);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
describe('Android Build Pipeline', () => {
|
|
90
|
-
const pipelinePath = resolve(examplesDir, 'android-build.yml');
|
|
91
|
-
test('should load and parse Android pipeline file', () => {
|
|
92
|
-
expect(existsSync(pipelinePath)).toBe(true);
|
|
93
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
94
|
-
expect(yamlPipeline.format_version).toBe('4');
|
|
95
|
-
expect(yamlPipeline.workflows).toBeDefined();
|
|
96
|
-
expect(yamlPipeline.workflows.primary).toBeDefined();
|
|
97
|
-
expect(yamlPipeline.workflows.debug).toBeDefined();
|
|
98
|
-
expect(yamlPipeline.workflows.qa).toBeDefined();
|
|
99
|
-
});
|
|
100
|
-
test('should convert primary workflow to PipelineDef', async () => {
|
|
101
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
102
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
103
|
-
expect(result.pipeline.name).toBe('primary (YAML)');
|
|
104
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
105
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
106
|
-
});
|
|
107
|
-
test('should detect Linux platform for Android workflow', () => {
|
|
108
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
109
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'primary');
|
|
110
|
-
expect(platformInfo.platform).toBe('linux');
|
|
111
|
-
expect(platformInfo.stack).toBe('linux-docker-android-22.04');
|
|
112
|
-
expect(platformInfo.machineType).toBe('standard');
|
|
113
|
-
});
|
|
114
|
-
test('should include all expected Android steps', async () => {
|
|
115
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
116
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
117
|
-
const stepNames = result.pipeline.steps.map(s => s.name);
|
|
118
|
-
expect(stepNames).toContain('git-clone');
|
|
119
|
-
expect(stepNames).toContain('cache-pull');
|
|
120
|
-
expect(stepNames).toContain('cache-push');
|
|
121
|
-
// Android build steps should exist (8 total in primary workflow)
|
|
122
|
-
expect(result.pipeline.steps.length).toBe(8);
|
|
123
|
-
});
|
|
124
|
-
test('should convert qa workflow with test filters', async () => {
|
|
125
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
126
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'qa');
|
|
127
|
-
expect(result.pipeline.name).toBe('qa (YAML)');
|
|
128
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
129
|
-
// QA workflow should have test steps with generated scripts
|
|
130
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
131
|
-
for (const step of result.pipeline.steps) {
|
|
132
|
-
expect(step.kind).toBe('script');
|
|
133
|
-
expect(step.script).toBeDefined();
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
test('should generate scripts with environment variables', async () => {
|
|
137
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
138
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
139
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
140
|
-
// Check that all steps have generated scripts
|
|
141
|
-
for (const step of result.pipeline.steps) {
|
|
142
|
-
expect(step.script).toBeDefined();
|
|
143
|
-
expect(step.script.length).toBeGreaterThan(0);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
describe('Multi-Platform Pipeline', () => {
|
|
148
|
-
const pipelinePath = resolve(examplesDir, 'multi-platform.yml');
|
|
149
|
-
test('should load and parse multi-platform pipeline file', () => {
|
|
150
|
-
expect(existsSync(pipelinePath)).toBe(true);
|
|
151
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
152
|
-
expect(yamlPipeline.format_version).toBe('4');
|
|
153
|
-
expect(yamlPipeline.workflows).toBeDefined();
|
|
154
|
-
expect(Object.keys(yamlPipeline.workflows)).toHaveLength(4);
|
|
155
|
-
});
|
|
156
|
-
test('should have iOS and Android workflows', () => {
|
|
157
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
158
|
-
expect(yamlPipeline.workflows['ios-build']).toBeDefined();
|
|
159
|
-
expect(yamlPipeline.workflows['android-build']).toBeDefined();
|
|
160
|
-
expect(yamlPipeline.workflows['ios-debug']).toBeDefined();
|
|
161
|
-
expect(yamlPipeline.workflows['android-debug']).toBeDefined();
|
|
162
|
-
});
|
|
163
|
-
test('should detect macOS platform for ios-build workflow', () => {
|
|
164
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
165
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'ios-build');
|
|
166
|
-
expect(platformInfo.platform).toBe('macos');
|
|
167
|
-
expect(platformInfo.machineType).toBe('standard');
|
|
168
|
-
});
|
|
169
|
-
test('should detect Linux platform for android-build workflow', () => {
|
|
170
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
171
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'android-build');
|
|
172
|
-
expect(platformInfo.platform).toBe('linux');
|
|
173
|
-
expect(platformInfo.machineType).toBe('standard');
|
|
174
|
-
});
|
|
175
|
-
test('should convert ios-build workflow to PipelineDef', async () => {
|
|
176
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
177
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'ios-build');
|
|
178
|
-
expect(result.pipeline.name).toBe('ios-build (YAML)');
|
|
179
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
180
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
181
|
-
// Verify all steps have scripts
|
|
182
|
-
for (const step of result.pipeline.steps) {
|
|
183
|
-
expect(step.script).toBeDefined();
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
test('should convert android-build workflow to PipelineDef', async () => {
|
|
187
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
188
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'android-build');
|
|
189
|
-
expect(result.pipeline.name).toBe('android-build (YAML)');
|
|
190
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
191
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
192
|
-
// Verify all steps have scripts
|
|
193
|
-
for (const step of result.pipeline.steps) {
|
|
194
|
-
expect(step.script).toBeDefined();
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
test('should process global and workflow-specific environment variables into scripts', async () => {
|
|
198
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
199
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'ios-build');
|
|
200
|
-
// Verify steps were generated
|
|
201
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
202
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
203
|
-
// All steps should have generated scripts
|
|
204
|
-
for (const step of result.pipeline.steps) {
|
|
205
|
-
expect(step.script).toBeDefined();
|
|
206
|
-
expect(step.script.length).toBeGreaterThan(0);
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
test('should use first workflow when no workflow specified', async () => {
|
|
210
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
211
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig);
|
|
212
|
-
// Should default to first workflow in the object
|
|
213
|
-
expect(result.pipeline.name).toContain('(YAML)');
|
|
214
|
-
expect(result.pipeline.steps).toBeDefined();
|
|
215
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
describe('Workflow Selection', () => {
|
|
219
|
-
const pipelinePath = resolve(examplesDir, 'multi-platform.yml');
|
|
220
|
-
test('should throw error for non-existent workflow', async () => {
|
|
221
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
222
|
-
await expect(async () => {
|
|
223
|
-
await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'non-existent-workflow');
|
|
224
|
-
}).rejects.toThrow();
|
|
225
|
-
});
|
|
226
|
-
test('should successfully select each workflow by name', async () => {
|
|
227
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
228
|
-
const workflowNames = ['ios-build', 'android-build', 'ios-debug', 'android-debug'];
|
|
229
|
-
for (const workflowName of workflowNames) {
|
|
230
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, workflowName);
|
|
231
|
-
expect(result.pipeline.name).toBe(`${workflowName} (YAML)`);
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
describe('Step Script Generation', () => {
|
|
236
|
-
test('should generate valid bash scripts for all steps', async () => {
|
|
237
|
-
const pipelinePath = resolve(examplesDir, 'ios-build.yml');
|
|
238
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
239
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
240
|
-
for (const step of result.pipeline.steps) {
|
|
241
|
-
expect(step.kind).toBe('script');
|
|
242
|
-
expect(step.script).toBeDefined();
|
|
243
|
-
expect(typeof step.script).toBe('string');
|
|
244
|
-
expect(step.script.length).toBeGreaterThan(0);
|
|
245
|
-
// Scripts should be valid bash (start with shebang)
|
|
246
|
-
expect(step.script).toMatch(/^#!/);
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
test('should generate unique step IDs', async () => {
|
|
250
|
-
const pipelinePath = resolve(examplesDir, 'ios-build.yml');
|
|
251
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
252
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
253
|
-
const stepIds = result.pipeline.steps.map(s => s.id);
|
|
254
|
-
const uniqueIds = new Set(stepIds);
|
|
255
|
-
// All step IDs should be unique
|
|
256
|
-
expect(stepIds.length).toBe(uniqueIds.size);
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
describe('Environment Variable Resolution', () => {
|
|
260
|
-
test('should generate scripts with resolved variables', async () => {
|
|
261
|
-
const pipelinePath = resolve(examplesDir, 'android-build.yml');
|
|
262
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
263
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'primary');
|
|
264
|
-
// Scripts should be generated with resolved variable values
|
|
265
|
-
expect(result.pipeline.steps.length).toBe(8);
|
|
266
|
-
for (const step of result.pipeline.steps) {
|
|
267
|
-
expect(step.kind).toBe('script');
|
|
268
|
-
expect(step.script).toBeDefined();
|
|
269
|
-
expect(step.script.length).toBeGreaterThan(0);
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
test('should process app-level and workflow-level environment variables', async () => {
|
|
273
|
-
const pipelinePath = resolve(examplesDir, 'multi-platform.yml');
|
|
274
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
275
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'android-build');
|
|
276
|
-
// Verify all steps have valid scripts
|
|
277
|
-
expect(result.pipeline.steps.length).toBeGreaterThan(0);
|
|
278
|
-
for (const step of result.pipeline.steps) {
|
|
279
|
-
expect(step.script).toBeDefined();
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
describe('Platform Detection', () => {
|
|
284
|
-
test('should auto-detect platform from xcodebuild step', () => {
|
|
285
|
-
const pipelinePath = resolve(examplesDir, 'multi-platform.yml');
|
|
286
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
287
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'ios-build');
|
|
288
|
-
expect(platformInfo.platform).toBe('macos');
|
|
289
|
-
});
|
|
290
|
-
test('should auto-detect platform from gradle-build step', () => {
|
|
291
|
-
const pipelinePath = resolve(examplesDir, 'multi-platform.yml');
|
|
292
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
293
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'android-build');
|
|
294
|
-
expect(platformInfo.platform).toBe('linux');
|
|
295
|
-
});
|
|
296
|
-
test('should use stack metadata when available', () => {
|
|
297
|
-
const pipelinePath = resolve(examplesDir, 'ios-build.yml');
|
|
298
|
-
const yamlPipeline = loadYAMLPipeline(pipelinePath);
|
|
299
|
-
const platformInfo = detectPlatformInfo(yamlPipeline, 'primary');
|
|
300
|
-
expect(platformInfo.stack).toBe('macos-ventura-xcode-15.1');
|
|
301
|
-
expect(platformInfo.platform).toBe('macos');
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
describe('Unsupported Steps Integration', () => {
|
|
305
|
-
test('should handle YAML with mixed supported and unsupported steps', async () => {
|
|
306
|
-
// Create a temporary YAML in memory with mixed steps
|
|
307
|
-
const yamlContent = `format_version: '4'
|
|
308
|
-
|
|
309
|
-
workflows:
|
|
310
|
-
test-warnings:
|
|
311
|
-
steps:
|
|
312
|
-
- script@1.0.0:
|
|
313
|
-
title: Valid script step
|
|
314
|
-
inputs:
|
|
315
|
-
content: |
|
|
316
|
-
echo "This step is supported"
|
|
317
|
-
- unsupported-bitrise-step@1.0.0:
|
|
318
|
-
title: This step does not exist
|
|
319
|
-
inputs:
|
|
320
|
-
some_input: value
|
|
321
|
-
- npm@1.0.0:
|
|
322
|
-
title: NPM step (should suggest script alternative)
|
|
323
|
-
inputs:
|
|
324
|
-
command: install
|
|
325
|
-
- script@1.0.0:
|
|
326
|
-
title: Another valid step
|
|
327
|
-
inputs:
|
|
328
|
-
content: |
|
|
329
|
-
echo "This step is also supported"
|
|
330
|
-
- cocoapods-install@2.0.0:
|
|
331
|
-
title: CocoaPods (should suggest script alternative)
|
|
332
|
-
- completely-unknown-step@3.0.0:
|
|
333
|
-
title: Unknown step (no suggestion)
|
|
334
|
-
`;
|
|
335
|
-
// Parse YAML manually
|
|
336
|
-
// Use js-yaml for parsing
|
|
337
|
-
const yamlPipeline = jsYaml.load(yamlContent);
|
|
338
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'test-warnings');
|
|
339
|
-
// Verify warnings were collected
|
|
340
|
-
expect(result.warnings).toBeDefined();
|
|
341
|
-
expect(result.warnings.length).toBe(3); // 3 unsupported steps (cocoapods-install is now supported)
|
|
342
|
-
// Verify skipped steps count
|
|
343
|
-
expect(result.skippedSteps).toBe(3);
|
|
344
|
-
// Verify supported steps were processed (script x2 + cocoapods-install)
|
|
345
|
-
expect(result.pipeline.steps.length).toBe(3);
|
|
346
|
-
expect(result.pipeline.steps[0].name).toBe('Valid script step');
|
|
347
|
-
expect(result.pipeline.steps[1].name).toBe('Another valid step');
|
|
348
|
-
expect(result.pipeline.steps[2].name).toBe('CocoaPods (should suggest script alternative)');
|
|
349
|
-
// Verify warning messages contain step names
|
|
350
|
-
expect(result.warnings[0]).toContain('unsupported-bitrise-step@1.0.0');
|
|
351
|
-
expect(result.warnings[1]).toContain('npm@1.0.0');
|
|
352
|
-
expect(result.warnings[2]).toContain('completely-unknown-step@3.0.0');
|
|
353
|
-
// Verify suggestions are included for known steps
|
|
354
|
-
expect(result.warnings[1]).toContain('💡 Suggestion');
|
|
355
|
-
expect(result.warnings[1]).toContain('script step with npm commands');
|
|
356
|
-
// Verify no suggestion for unknown step
|
|
357
|
-
expect(result.warnings[2]).not.toContain('💡 Suggestion');
|
|
358
|
-
});
|
|
359
|
-
test('should handle YAML with all unsupported steps', async () => {
|
|
360
|
-
const yamlContent = `format_version: '4'
|
|
361
|
-
|
|
362
|
-
workflows:
|
|
363
|
-
all-unsupported:
|
|
364
|
-
steps:
|
|
365
|
-
- unsupported-1@1.0.0:
|
|
366
|
-
inputs: {}
|
|
367
|
-
- unsupported-2@2.0.0:
|
|
368
|
-
inputs: {}
|
|
369
|
-
- unsupported-3@3.0.0:
|
|
370
|
-
inputs: {}
|
|
371
|
-
`;
|
|
372
|
-
// Use js-yaml for parsing
|
|
373
|
-
const yamlPipeline = jsYaml.load(yamlContent);
|
|
374
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'all-unsupported');
|
|
375
|
-
// All steps should be skipped
|
|
376
|
-
expect(result.warnings.length).toBe(3);
|
|
377
|
-
expect(result.skippedSteps).toBe(3);
|
|
378
|
-
expect(result.pipeline.steps.length).toBe(0);
|
|
379
|
-
// Pipeline should still be valid
|
|
380
|
-
expect(result.pipeline.name).toBe('all-unsupported (YAML)');
|
|
381
|
-
expect(result.pipeline.stepsOrder.length).toBe(0);
|
|
382
|
-
});
|
|
383
|
-
test('should preserve step order after filtering unsupported steps', async () => {
|
|
384
|
-
const yamlContent = `format_version: '4'
|
|
385
|
-
|
|
386
|
-
workflows:
|
|
387
|
-
order-test:
|
|
388
|
-
steps:
|
|
389
|
-
- script@1.0.0:
|
|
390
|
-
title: Step 1
|
|
391
|
-
inputs:
|
|
392
|
-
content: echo "1"
|
|
393
|
-
- unsupported-step@1.0.0:
|
|
394
|
-
inputs: {}
|
|
395
|
-
- script@1.0.0:
|
|
396
|
-
title: Step 2
|
|
397
|
-
inputs:
|
|
398
|
-
content: echo "2"
|
|
399
|
-
- another-unsupported@1.0.0:
|
|
400
|
-
inputs: {}
|
|
401
|
-
- script@1.0.0:
|
|
402
|
-
title: Step 3
|
|
403
|
-
inputs:
|
|
404
|
-
content: echo "3"
|
|
405
|
-
`;
|
|
406
|
-
// Use js-yaml for parsing
|
|
407
|
-
const yamlPipeline = jsYaml.load(yamlContent);
|
|
408
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'order-test');
|
|
409
|
-
// Verify order is preserved
|
|
410
|
-
expect(result.pipeline.steps.length).toBe(3);
|
|
411
|
-
expect(result.pipeline.steps[0].name).toBe('Step 1');
|
|
412
|
-
expect(result.pipeline.steps[1].name).toBe('Step 2');
|
|
413
|
-
expect(result.pipeline.steps[2].name).toBe('Step 3');
|
|
414
|
-
// Verify stepsOrder matches
|
|
415
|
-
expect(result.pipeline.stepsOrder.length).toBe(3);
|
|
416
|
-
});
|
|
417
|
-
test('should handle multiple versions of same unsupported step', async () => {
|
|
418
|
-
const yamlContent = `format_version: '4'
|
|
419
|
-
|
|
420
|
-
workflows:
|
|
421
|
-
version-test:
|
|
422
|
-
steps:
|
|
423
|
-
- npm@1.0.0:
|
|
424
|
-
inputs: {}
|
|
425
|
-
- npm@2.0.0:
|
|
426
|
-
inputs: {}
|
|
427
|
-
- npm@3.5.0:
|
|
428
|
-
inputs: {}
|
|
429
|
-
`;
|
|
430
|
-
// Use js-yaml for parsing
|
|
431
|
-
const yamlPipeline = jsYaml.load(yamlContent);
|
|
432
|
-
const result = await convertYAMLToPipelineDef(yamlPipeline, testConfig, 'version-test');
|
|
433
|
-
// Should warn about each version separately
|
|
434
|
-
expect(result.warnings.length).toBe(3);
|
|
435
|
-
expect(result.warnings[0]).toContain('npm@1.0.0');
|
|
436
|
-
expect(result.warnings[1]).toContain('npm@2.0.0');
|
|
437
|
-
expect(result.warnings[2]).toContain('npm@3.5.0');
|
|
438
|
-
// All should have the same suggestion
|
|
439
|
-
result.warnings.forEach(warning => {
|
|
440
|
-
expect(warning).toContain('💡 Suggestion');
|
|
441
|
-
expect(warning).toContain('script step with npm commands');
|
|
442
|
-
});
|
|
443
|
-
});
|
|
444
|
-
});
|
|
445
|
-
});
|
|
446
|
-
//# sourceMappingURL=e2e.test.js.map
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Environment variable resolution and interpolation
|
|
3
|
-
* Merges global and workflow-level environment variables
|
|
4
|
-
* Supports variable interpolation in multiple formats
|
|
5
|
-
*/
|
|
6
|
-
import type { YAMLPipeline, YAMLWorkflow, Platform } from './types.js';
|
|
7
|
-
export declare class MissingEnvironmentVariableError extends Error {
|
|
8
|
-
readonly variableName: string;
|
|
9
|
-
readonly stepName?: string | undefined;
|
|
10
|
-
readonly hint?: string | undefined;
|
|
11
|
-
constructor(variableName: string, stepName?: string | undefined, hint?: string | undefined);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* A `{{checksum "path"}}` naming a file this checkout does not have.
|
|
15
|
-
*
|
|
16
|
-
* Distinct from a generic read failure because a caller can reasonably
|
|
17
|
-
* decide it does not matter. A cache key is the usual case: the file is
|
|
18
|
-
* absent, so there is nothing to key a cache on, so there is no cache — which
|
|
19
|
-
* is a slower build, not a broken one.
|
|
20
|
-
*/
|
|
21
|
-
export declare class ChecksumFileMissingError extends Error {
|
|
22
|
-
readonly filePath: string;
|
|
23
|
-
readonly stepName?: string | undefined;
|
|
24
|
-
constructor(filePath: string, stepName?: string | undefined);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* A credential slot scoped to a workflow the pipeline does not have.
|
|
28
|
-
*
|
|
29
|
-
* Thrown at generation time, before any step converts, because every way of
|
|
30
|
-
* getting the name wrong is otherwise silent. A slot naming a workflow nobody
|
|
31
|
-
* runs declares the credential for nobody: `file@1.0.0` finds no key in its
|
|
32
|
-
* map, calls the credential optional and skips it with a warning, and
|
|
33
|
-
* `ci secrets upload` cheerfully pushes a value under the same wrong name.
|
|
34
|
-
* Two green halves and a build that dies later inside the project's own build
|
|
35
|
-
* tool.
|
|
36
|
-
*
|
|
37
|
-
* The underscore case gets its own sentence because the workflow is right
|
|
38
|
-
* there in the pipeline. `encodeSecretName` upper-cases the workflow and turns
|
|
39
|
-
* dashes into underscores, so decoding turns every underscore back into a
|
|
40
|
-
* dash: a workflow genuinely called `my_wf` can only ever be addressed as
|
|
41
|
-
* `my-wf`, and "no such workflow" about a workflow that plainly exists reads
|
|
42
|
-
* as a defect in us rather than a name that cannot survive the round trip.
|
|
43
|
-
*/
|
|
44
|
-
export declare class UnknownWorkflowSlotError extends Error {
|
|
45
|
-
readonly slot: string;
|
|
46
|
-
readonly varName: string;
|
|
47
|
-
readonly workflow: string;
|
|
48
|
-
constructor(slot: string, varName: string, workflow: string, declared: string[]);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* EnvResolver handles environment variable merging and interpolation
|
|
52
|
-
*/
|
|
53
|
-
export declare class EnvResolver {
|
|
54
|
-
private envVars;
|
|
55
|
-
private referencedVars;
|
|
56
|
-
private secretsManager;
|
|
57
|
-
/**
|
|
58
|
-
* Every key the pipeline names in `app.envs` or `workflow.envs`, whether or
|
|
59
|
-
* not it gave one a value. Read by `importDeclaredFromProcessEnv`.
|
|
60
|
-
*/
|
|
61
|
-
private declaredVars;
|
|
62
|
-
/** The workflow being resolved. Decides which scoped slots apply — `slotKeyFor`. */
|
|
63
|
-
private workflowName;
|
|
64
|
-
/** Every workflow this pipeline declares. A scoped slot has to name one of them. */
|
|
65
|
-
private declaredWorkflows;
|
|
66
|
-
constructor(pipeline: YAMLPipeline, workflow: YAMLWorkflow, workflowName: string, platform: Platform, stack?: string, yamlFilePath?: string);
|
|
67
|
-
/**
|
|
68
|
-
* Gets the value of an environment variable
|
|
69
|
-
* @param name Variable name
|
|
70
|
-
* @returns Variable value or undefined if not found
|
|
71
|
-
*/
|
|
72
|
-
get(name: string): string | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Checks if an environment variable is defined
|
|
75
|
-
* @param name Variable name
|
|
76
|
-
* @returns True if variable exists
|
|
77
|
-
*/
|
|
78
|
-
has(name: string): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Registers a variable as a step output passthrough.
|
|
81
|
-
* When this variable appears in a later step's inputs it will be kept as
|
|
82
|
-
* the literal shell reference "$NAME" so the shell resolves it at runtime.
|
|
83
|
-
*/
|
|
84
|
-
registerStepOutput(name: string): void;
|
|
85
|
-
/**
|
|
86
|
-
* Gets all environment variables as a plain object
|
|
87
|
-
* @returns Object with all environment variables
|
|
88
|
-
*/
|
|
89
|
-
getAll(): Record<string, string>;
|
|
90
|
-
/**
|
|
91
|
-
* Interpolates environment variables in a string
|
|
92
|
-
* Supports four formats:
|
|
93
|
-
* - $VAR
|
|
94
|
-
* - ${VAR}
|
|
95
|
-
* - {{getenv "VAR"}}
|
|
96
|
-
* - {{checksum "path/to/file"}}
|
|
97
|
-
*
|
|
98
|
-
* @param str String to interpolate
|
|
99
|
-
* @param stepName Optional step name for error messages
|
|
100
|
-
* @returns Interpolated string
|
|
101
|
-
* @throws MissingEnvironmentVariableError if referenced variable not found
|
|
102
|
-
*/
|
|
103
|
-
interpolate(str: string, stepName?: string): string;
|
|
104
|
-
/**
|
|
105
|
-
* Interpolates environment variables in an object recursively
|
|
106
|
-
* @param obj Object to interpolate
|
|
107
|
-
* @param stepName Optional step name for error messages
|
|
108
|
-
* @returns Interpolated object
|
|
109
|
-
*/
|
|
110
|
-
interpolateObject(obj: any, stepName?: string): any;
|
|
111
|
-
/**
|
|
112
|
-
* Validates that all referenced variables are defined
|
|
113
|
-
* @throws MissingEnvironmentVariableError if any referenced variable is missing
|
|
114
|
-
*/
|
|
115
|
-
validateReferencedVars(): void;
|
|
116
|
-
/**
|
|
117
|
-
* Resolves a single variable reference
|
|
118
|
-
* @param varName Variable name
|
|
119
|
-
* @param stepName Optional step name for error messages
|
|
120
|
-
* @returns Variable value
|
|
121
|
-
* @throws MissingEnvironmentVariableError if variable not found
|
|
122
|
-
*/
|
|
123
|
-
private resolveVar;
|
|
124
|
-
/**
|
|
125
|
-
* Computes MD5 checksum of a file
|
|
126
|
-
* @param filePath Path to file (relative to current working directory)
|
|
127
|
-
* @returns MD5 hash of file contents
|
|
128
|
-
* @throws Error if file does not exist or cannot be read
|
|
129
|
-
*/
|
|
130
|
-
private computeChecksum;
|
|
131
|
-
/**
|
|
132
|
-
* Adds built-in environment variables
|
|
133
|
-
* @param workflowName Name of the current workflow
|
|
134
|
-
* @param platform Detected platform
|
|
135
|
-
* @param stack Optional stack identifier
|
|
136
|
-
*/
|
|
137
|
-
private addBuiltInVars;
|
|
138
|
-
/**
|
|
139
|
-
* Merges environment variables from YAML array format
|
|
140
|
-
* @param envArray Array of environment variable objects
|
|
141
|
-
*/
|
|
142
|
-
/**
|
|
143
|
-
* The variable a declared `envs` key stands for, or null when the
|
|
144
|
-
* declaration belongs to a different workflow.
|
|
145
|
-
*
|
|
146
|
-
* A credential two workflows cannot share is declared once per workflow,
|
|
147
|
-
* under the same name a workflow-scoped secret carries — the pipeline says
|
|
148
|
-
* `CIBUILD_SW__RELEASE__LOCAL_PROPERTIES: ""` where it used to say
|
|
149
|
-
* `LOCAL_PROPERTIES: ""`. The build still reads the credential under its
|
|
150
|
-
* plain name, so the declaration has to mean the plain name: it is what puts
|
|
151
|
-
* an unsupplied key in the map for `file@1.0.0` to refuse over, and what
|
|
152
|
-
* lets `importDeclaredFromProcessEnv` accept a value delivered flat.
|
|
153
|
-
*
|
|
154
|
-
* A slot naming another workflow is dropped rather than declared. Declaring
|
|
155
|
-
* it would make this workflow demand a value only that one was ever going to
|
|
156
|
-
* be given. The decoding lives here, beside the decoding of the secret
|
|
157
|
-
* itself, so the steps keep reading their plain `var_name` and never learn
|
|
158
|
-
* the convention exists.
|
|
159
|
-
*
|
|
160
|
-
* A slot naming a workflow the pipeline does not have is refused rather than
|
|
161
|
-
* dropped — see `UnknownWorkflowSlotError`. Dropping it silently is the same
|
|
162
|
-
* outcome as never declaring the credential, which is the green skip issue 03
|
|
163
|
-
* exists to end.
|
|
164
|
-
*/
|
|
165
|
-
private slotKeyFor;
|
|
166
|
-
private mergeEnvVars;
|
|
167
|
-
/**
|
|
168
|
-
* Fills a declared-but-still-empty variable from the process environment.
|
|
169
|
-
*
|
|
170
|
-
* This is how a credential dispatched by a build service arrives. The
|
|
171
|
-
* dispatch hands the value to the runner, the runner merges it into the
|
|
172
|
-
* environment of the `ci` invocation, and nothing else copies it anywhere —
|
|
173
|
-
* it writes no `.cibuild-secrets.json`, and that file is gitignored so the
|
|
174
|
-
* clone has none either. Without this step the value sits in the shell and
|
|
175
|
-
* is invisible to the steps that read this map: `file@1.0.0` reads
|
|
176
|
-
* `env[var_name]`, finds nothing, prints "not set — skipping" and reports
|
|
177
|
-
* success. Every credential a pipeline declared as an empty slot was
|
|
178
|
-
* dropped that way, on every dispatched build, with a green step.
|
|
179
|
-
*
|
|
180
|
-
* Scoped to keys the pipeline declares, deliberately. Copying `process.env`
|
|
181
|
-
* wholesale would turn arbitrary host environment into pipeline values and
|
|
182
|
-
* would change what every existing pipeline resolves. The declaration is
|
|
183
|
-
* the opt-in: `- GOOGLE_SERVICES_JSON: ""` is the pipeline saying "I read
|
|
184
|
-
* this key and I have no value for it", which is exactly the invitation the
|
|
185
|
-
* dispatched environment needs. A key nothing declares stays out, so `HOME`
|
|
186
|
-
* and the rest of the host's environment are not pipeline variables.
|
|
187
|
-
*
|
|
188
|
-
* Last, so anything an earlier source did supply wins — a developer's
|
|
189
|
-
* `.cibuild-secrets.json` still beats an inherited environment. The value
|
|
190
|
-
* is taken verbatim, with no interpolation, for the same reason step 2
|
|
191
|
-
* takes secrets verbatim: a credential is bytes, and a `$` inside one is
|
|
192
|
-
* not a variable reference.
|
|
193
|
-
*/
|
|
194
|
-
private importDeclaredFromProcessEnv;
|
|
195
|
-
/**
|
|
196
|
-
* Resolves $SECRET{secret_id} references to actual secret values
|
|
197
|
-
* @param value Value that may contain a secret reference
|
|
198
|
-
* @returns Resolved value with secret content, or empty string if secret not found
|
|
199
|
-
*/
|
|
200
|
-
private resolveSecretReference;
|
|
201
|
-
/**
|
|
202
|
-
* Interpolates environment variable value during initial setup
|
|
203
|
-
* This allows env vars to reference other env vars
|
|
204
|
-
* @param value Raw value
|
|
205
|
-
* @returns Interpolated value or original if interpolation fails
|
|
206
|
-
*/
|
|
207
|
-
private interpolateEnvValue;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Helper function to create an EnvResolver for a workflow
|
|
211
|
-
* @param pipeline Parsed YAML pipeline
|
|
212
|
-
* @param workflowName Name of the workflow
|
|
213
|
-
* @param platform Detected platform
|
|
214
|
-
* @param stack Optional stack identifier
|
|
215
|
-
* @returns EnvResolver instance
|
|
216
|
-
*/
|
|
217
|
-
export declare function createEnvResolver(pipeline: YAMLPipeline, workflowName: string, platform: Platform, stack?: string): EnvResolver;
|
|
218
|
-
//# sourceMappingURL=env-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-resolver.d.ts","sourceRoot":"","sources":["../../../src/yaml/env-resolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAc,QAAQ,EAAE,MAAM,YAAY,CAAC;AAkEnF,qBAAa,+BAAgC,SAAQ,KAAK;aAEtC,YAAY,EAAE,MAAM;aACpB,QAAQ,CAAC,EAAE,MAAM;aACjB,IAAI,CAAC,EAAE,MAAM;gBAFb,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,YAAA,EACjB,IAAI,CAAC,EAAE,MAAM,YAAA;CAUhC;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,QAAQ,EAAE,MAAM;aAChB,QAAQ,CAAC,EAAE,MAAM;gBADjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,YAAA;CAKpC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;CAgChF;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,cAAc,CAAiB;IACvC;;;OAGG;IACH,OAAO,CAAC,YAAY,CAA0B;IAC9C,oFAAoF;IACpF,OAAO,CAAC,YAAY,CAAS;IAC7B,oFAAoF;IACpF,OAAO,CAAC,iBAAiB,CAAW;gBAGlC,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,EAClB,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM;IAoCvB;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAKrC;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B;;;;OAIG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMtC;;;OAGG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQhC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;IAqCnD;;;;;OAKG;IACH,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,GAAG;IAoBnD;;;OAGG;IACH,sBAAsB,IAAI,IAAI;IAQ9B;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAalB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IA0BvB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IA4FtB;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,YAAY;IAsBpB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,OAAO,CAAC,4BAA4B;IAUpC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAuB9B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAS5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,WAAW,CAOb"}
|