@invarn/cibuild 2.9.4 → 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 -1084
- 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/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 -311
- 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 -297
- 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 -253
- 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 -1340
- 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,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A requirement that cannot be checked yet must not name a step as its source
|
|
3
|
-
* unless a step is its source.
|
|
4
|
-
*
|
|
5
|
-
* Nine runtime requirements — `gradlew` in the three Android steps and the
|
|
6
|
-
* Bitrise gradle wrapper, `project_path` in five Xcode steps — carried
|
|
7
|
-
* `providedBy: 'git-clone'`. The lookup behind `providedBy` is keyed by step
|
|
8
|
-
* *output names* (`CIBUILD_SOURCE_DIR`, `GIT_CLONE_COMMIT_HASH`, …) and these
|
|
9
|
-
* requirements are named after a path or a command, so it could never match:
|
|
10
|
-
* every Android validation printed "'gradlew' will be provided by 'git-clone'
|
|
11
|
-
* step at runtime" whether the step was in the workflow or not.
|
|
12
|
-
*
|
|
13
|
-
* `git-clone` provides no files at all — the runner's checkout does, before
|
|
14
|
-
* any step runs — and once it is out of the curated templates the sentence
|
|
15
|
-
* names a step the pipeline does not contain.
|
|
16
|
-
*/
|
|
17
|
-
import { describe, test, expect } from '@jest/globals';
|
|
18
|
-
import './steps/index.js';
|
|
19
|
-
import { StepValidator } from './step-validator.js';
|
|
20
|
-
import { loadConfig } from '../config.js';
|
|
21
|
-
const config = loadConfig();
|
|
22
|
-
/** An Android workflow with no `git-clone` step, as issue 05 leaves it. */
|
|
23
|
-
function gradlePipeline() {
|
|
24
|
-
return {
|
|
25
|
-
format_version: '1',
|
|
26
|
-
meta: { invarn: { stack: 'linux-android-35' } },
|
|
27
|
-
app: { envs: [{ JAVA_HOME: '/usr/lib/jvm/java-21' }] },
|
|
28
|
-
workflows: {
|
|
29
|
-
primary: {
|
|
30
|
-
steps: [
|
|
31
|
-
{
|
|
32
|
-
'gradle-build@1.0.0': {
|
|
33
|
-
title: 'Build Debug APK',
|
|
34
|
-
inputs: { gradle_task: 'assembleDebug' },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
describe('a runtime requirement names a real provider', () => {
|
|
43
|
-
test('a clone-free workflow never mentions git-clone', async () => {
|
|
44
|
-
const validator = new StepValidator(gradlePipeline(), 'primary', config);
|
|
45
|
-
const result = await validator.validateWorkflow();
|
|
46
|
-
const messages = result.issues.map((i) => i.result.message ?? '').join('\n');
|
|
47
|
-
expect(messages).not.toContain('git-clone');
|
|
48
|
-
});
|
|
49
|
-
test('the checkout is named as the source of the gradle wrapper', async () => {
|
|
50
|
-
const validator = new StepValidator(gradlePipeline(), 'primary', config);
|
|
51
|
-
const result = await validator.validateWorkflow();
|
|
52
|
-
const gradlew = result.issues.find((i) => i.requirement.name === 'gradlew');
|
|
53
|
-
expect(gradlew).toBeDefined();
|
|
54
|
-
expect(gradlew.requirement.severity).toBe('info');
|
|
55
|
-
expect(gradlew.result.message).toContain('the checkout');
|
|
56
|
-
// The wording must not promise a step: no step puts the wrapper on disk.
|
|
57
|
-
expect(gradlew.result.message).not.toMatch(/'the checkout' step/);
|
|
58
|
-
});
|
|
59
|
-
test('the info does not fail validation', async () => {
|
|
60
|
-
const validator = new StepValidator(gradlePipeline(), 'primary', config);
|
|
61
|
-
const result = await validator.validateWorkflow();
|
|
62
|
-
expect(result.valid).toBe(true);
|
|
63
|
-
expect(result.counts.errors).toBe(0);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=a-runtime-requirement-names-a-real-provider.test.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A credential slot scoped to a workflow the pipeline does not have refuses
|
|
3
|
-
* the build, instead of silently belonging to nobody.
|
|
4
|
-
*
|
|
5
|
-
* The declaration `CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: ""` means "this
|
|
6
|
-
* credential, for the workflow called `primary`". Nothing checked that a
|
|
7
|
-
* workflow by that name existed, and every way of getting the name wrong fails
|
|
8
|
-
* quietly:
|
|
9
|
-
*
|
|
10
|
-
* - **A typo.** `CIBUILD_SW__PRIMRAY__X` decodes to workflow `primray`. No
|
|
11
|
-
* workflow is called that, so no workflow declares `X`, so `file@1.0.0`
|
|
12
|
-
* finds no key in its map, calls the credential optional, and skips it with
|
|
13
|
-
* a warning — the green-step failure mode issue 03 exists to end. The
|
|
14
|
-
* upload half is equally quiet: `ci secrets upload` encodes a value for
|
|
15
|
-
* `primray` and the resolver looks for `primary`.
|
|
16
|
-
* - **An underscore in the workflow's own name.** The encoding upper-cases
|
|
17
|
-
* the name and turns dashes into underscores, so decoding turns every
|
|
18
|
-
* underscore back into a dash. A workflow genuinely called `my_wf` is
|
|
19
|
-
* therefore unreachable: its slot decodes to `my-wf`, which the pipeline
|
|
20
|
-
* does not have. `ci secrets upload` warns about this at upload time; the
|
|
21
|
-
* pipeline is where it can be refused before a build starts.
|
|
22
|
-
*
|
|
23
|
-
* Both are one check — does the pipeline have a workflow by the decoded
|
|
24
|
-
* name? — and both are refused at generation time, from the resolver, before
|
|
25
|
-
* any step converts. That is the same place issue 03's refusal lands and for
|
|
26
|
-
* the same reason: a build that cannot possibly deliver a credential should
|
|
27
|
-
* stop while the message can still name the credential.
|
|
28
|
-
*
|
|
29
|
-
* The check only ever fires on a name we generate. No pipeline written before
|
|
30
|
-
* this declared an encoded slot at all, and a global `CIBUILD_S__X` names no
|
|
31
|
-
* workflow, so there is nothing in existence for it to refuse.
|
|
32
|
-
*/
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts","sourceRoot":"","sources":["../../../src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A credential slot scoped to a workflow the pipeline does not have refuses
|
|
3
|
-
* the build, instead of silently belonging to nobody.
|
|
4
|
-
*
|
|
5
|
-
* The declaration `CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: ""` means "this
|
|
6
|
-
* credential, for the workflow called `primary`". Nothing checked that a
|
|
7
|
-
* workflow by that name existed, and every way of getting the name wrong fails
|
|
8
|
-
* quietly:
|
|
9
|
-
*
|
|
10
|
-
* - **A typo.** `CIBUILD_SW__PRIMRAY__X` decodes to workflow `primray`. No
|
|
11
|
-
* workflow is called that, so no workflow declares `X`, so `file@1.0.0`
|
|
12
|
-
* finds no key in its map, calls the credential optional, and skips it with
|
|
13
|
-
* a warning — the green-step failure mode issue 03 exists to end. The
|
|
14
|
-
* upload half is equally quiet: `ci secrets upload` encodes a value for
|
|
15
|
-
* `primray` and the resolver looks for `primary`.
|
|
16
|
-
* - **An underscore in the workflow's own name.** The encoding upper-cases
|
|
17
|
-
* the name and turns dashes into underscores, so decoding turns every
|
|
18
|
-
* underscore back into a dash. A workflow genuinely called `my_wf` is
|
|
19
|
-
* therefore unreachable: its slot decodes to `my-wf`, which the pipeline
|
|
20
|
-
* does not have. `ci secrets upload` warns about this at upload time; the
|
|
21
|
-
* pipeline is where it can be refused before a build starts.
|
|
22
|
-
*
|
|
23
|
-
* Both are one check — does the pipeline have a workflow by the decoded
|
|
24
|
-
* name? — and both are refused at generation time, from the resolver, before
|
|
25
|
-
* any step converts. That is the same place issue 03's refusal lands and for
|
|
26
|
-
* the same reason: a build that cannot possibly deliver a credential should
|
|
27
|
-
* stop while the message can still name the credential.
|
|
28
|
-
*
|
|
29
|
-
* The check only ever fires on a name we generate. No pipeline written before
|
|
30
|
-
* this declared an encoded slot at all, and a global `CIBUILD_S__X` names no
|
|
31
|
-
* workflow, so there is nothing in existence for it to refuse.
|
|
32
|
-
*/
|
|
33
|
-
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
|
|
34
|
-
import { mkdtempSync, rmSync } from 'node:fs';
|
|
35
|
-
import { tmpdir } from 'node:os';
|
|
36
|
-
import { join } from 'node:path';
|
|
37
|
-
import { convertYAMLToPipelineDef } from './converter.js';
|
|
38
|
-
import { UnknownWorkflowSlotError } from './env-resolver.js';
|
|
39
|
-
import { clearRegistry, registerStep } from './steps/registry.js';
|
|
40
|
-
import { FileStepExecutor } from './steps/file.js';
|
|
41
|
-
const mockConfig = {
|
|
42
|
-
artifactsDir: '/test/artifacts',
|
|
43
|
-
maxConcurrentJobs: 1,
|
|
44
|
-
paths: {
|
|
45
|
-
buildsDir: '/test/builds',
|
|
46
|
-
cacheDir: '/test/cache',
|
|
47
|
-
derivedDataDir: '/test/derived-data',
|
|
48
|
-
},
|
|
49
|
-
interpreters: {
|
|
50
|
-
bash: '/bin/bash',
|
|
51
|
-
python: 'python3',
|
|
52
|
-
ruby: 'ruby',
|
|
53
|
-
node: 'node',
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
const TARGET = 'local.properties';
|
|
57
|
-
const VALUE = 'BASE_API_URL=https://example.test/api\n';
|
|
58
|
-
const TOUCHED = [
|
|
59
|
-
'LOCAL_PROPERTIES',
|
|
60
|
-
'CIBUILD_S__LOCAL_PROPERTIES',
|
|
61
|
-
'CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES',
|
|
62
|
-
'CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES',
|
|
63
|
-
'CIBUILD_SW__RELEASE__LOCAL_PROPERTIES',
|
|
64
|
-
'CIBUILD_SW__MY_WF__LOCAL_PROPERTIES',
|
|
65
|
-
];
|
|
66
|
-
let workdir;
|
|
67
|
-
let previousCwd;
|
|
68
|
-
beforeEach(() => {
|
|
69
|
-
clearRegistry();
|
|
70
|
-
registerStep('file', new FileStepExecutor());
|
|
71
|
-
previousCwd = process.cwd();
|
|
72
|
-
workdir = mkdtempSync(join(tmpdir(), 'cibuild-unknown-workflow-'));
|
|
73
|
-
process.chdir(workdir);
|
|
74
|
-
workdir = process.cwd();
|
|
75
|
-
for (const key of TOUCHED)
|
|
76
|
-
delete process.env[key];
|
|
77
|
-
});
|
|
78
|
-
afterEach(() => {
|
|
79
|
-
process.chdir(previousCwd);
|
|
80
|
-
rmSync(workdir, { recursive: true, force: true });
|
|
81
|
-
clearRegistry();
|
|
82
|
-
for (const key of TOUCHED)
|
|
83
|
-
delete process.env[key];
|
|
84
|
-
});
|
|
85
|
-
/** A pipeline with the given declared slots and the given workflow names. */
|
|
86
|
-
function probePipeline(declared, workflowNames = ['primary', 'pull-request', 'release']) {
|
|
87
|
-
const step = {
|
|
88
|
-
'file@1.0.0': {
|
|
89
|
-
is_skippable: true,
|
|
90
|
-
inputs: { target_path: TARGET, var_name: 'LOCAL_PROPERTIES' },
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
const workflows = {};
|
|
94
|
-
for (const name of workflowNames)
|
|
95
|
-
workflows[name] = { steps: [step] };
|
|
96
|
-
return {
|
|
97
|
-
format_version: '1',
|
|
98
|
-
app: { envs: Object.entries(declared).map(([k, v]) => ({ [k]: v })) },
|
|
99
|
-
workflows,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
/** The conversion's outcome, without letting a throw escape the assertion. */
|
|
103
|
-
async function convert(pipeline, workflow) {
|
|
104
|
-
try {
|
|
105
|
-
const result = await convertYAMLToPipelineDef(pipeline, mockConfig, workflow);
|
|
106
|
-
return { steps: result.pipeline.steps };
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
return { error: error };
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
describe('a slot naming a workflow nobody has', () => {
|
|
113
|
-
test('refuses the build, naming the slot and the workflow it decodes to', async () => {
|
|
114
|
-
process.env.CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES = VALUE;
|
|
115
|
-
const { error, steps } = await convert(probePipeline({ CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES: '' }), 'primary');
|
|
116
|
-
expect(error).toBeInstanceOf(UnknownWorkflowSlotError);
|
|
117
|
-
expect(error.message).toContain('CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES');
|
|
118
|
-
expect(error.message).toContain('primray');
|
|
119
|
-
expect(steps).toBeUndefined();
|
|
120
|
-
});
|
|
121
|
-
test('says which workflows the pipeline does have', async () => {
|
|
122
|
-
const { error } = await convert(probePipeline({ CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES: '' }), 'primary');
|
|
123
|
-
expect(error.message).toContain('primary');
|
|
124
|
-
expect(error.message).toContain('pull-request');
|
|
125
|
-
expect(error.message).toContain('release');
|
|
126
|
-
});
|
|
127
|
-
test('names the credential the slot is for, since that is what has to arrive', async () => {
|
|
128
|
-
const { error } = await convert(probePipeline({ CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES: '' }), 'primary');
|
|
129
|
-
expect(error.message).toContain('LOCAL_PROPERTIES');
|
|
130
|
-
});
|
|
131
|
-
test('refuses from whichever workflow is being run', async () => {
|
|
132
|
-
// The slot is in `app.envs`, so it is a defect in the pipeline and not in
|
|
133
|
-
// one workflow of it. A build of `release` must not pass just because the
|
|
134
|
-
// bad slot happens to name something else.
|
|
135
|
-
for (const workflow of ['primary', 'pull-request', 'release']) {
|
|
136
|
-
const { error } = await convert(probePipeline({ CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES: '' }), workflow);
|
|
137
|
-
expect(error).toBeInstanceOf(UnknownWorkflowSlotError);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
test('refuses a slot declared inside a workflow, not only in app.envs', async () => {
|
|
141
|
-
const pipeline = {
|
|
142
|
-
format_version: '1',
|
|
143
|
-
workflows: {
|
|
144
|
-
primary: {
|
|
145
|
-
envs: [{ CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES: '' }],
|
|
146
|
-
steps: [
|
|
147
|
-
{
|
|
148
|
-
'file@1.0.0': {
|
|
149
|
-
is_skippable: true,
|
|
150
|
-
inputs: { target_path: TARGET, var_name: 'LOCAL_PROPERTIES' },
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
const { error } = await convert(pipeline, 'primary');
|
|
158
|
-
expect(error).toBeInstanceOf(UnknownWorkflowSlotError);
|
|
159
|
-
});
|
|
160
|
-
test('carries no secret value into the message', async () => {
|
|
161
|
-
process.env.CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES = VALUE;
|
|
162
|
-
const { error } = await convert(probePipeline({ CIBUILD_SW__PRIMRAY__LOCAL_PROPERTIES: '' }), 'primary');
|
|
163
|
-
expect(error.message).not.toContain(VALUE.trim());
|
|
164
|
-
expect(error.message).not.toContain('example.test');
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
describe('a workflow whose own name the encoding cannot survive', () => {
|
|
168
|
-
test('is refused, and the message says the underscore is why', async () => {
|
|
169
|
-
// The pipeline really does have `my_wf`. Its slot still cannot reach it:
|
|
170
|
-
// decoding turns every underscore back into a dash, so the slot belongs to
|
|
171
|
-
// `my-wf`. Saying only "no such workflow" about a workflow that is right
|
|
172
|
-
// there would read as a bug in us.
|
|
173
|
-
const { error } = await convert(probePipeline({ CIBUILD_SW__MY_WF__LOCAL_PROPERTIES: '' }, ['my_wf']), 'my_wf');
|
|
174
|
-
expect(error).toBeInstanceOf(UnknownWorkflowSlotError);
|
|
175
|
-
expect(error.message).toContain('my_wf');
|
|
176
|
-
expect(error.message).toContain('my-wf');
|
|
177
|
-
expect(error.message).toMatch(/underscore/i);
|
|
178
|
-
});
|
|
179
|
-
test('is not refused when the workflow is named with a dash instead', async () => {
|
|
180
|
-
process.env.CIBUILD_SW__MY_WF__LOCAL_PROPERTIES = VALUE;
|
|
181
|
-
const { error, steps } = await convert(probePipeline({ CIBUILD_SW__MY_WF__LOCAL_PROPERTIES: '' }, ['my-wf']), 'my-wf');
|
|
182
|
-
expect(error).toBeUndefined();
|
|
183
|
-
expect(steps).toHaveLength(1);
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
describe('what the guard leaves alone', () => {
|
|
187
|
-
test('a pipeline whose scoped slots all name real workflows', async () => {
|
|
188
|
-
process.env.CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES = VALUE;
|
|
189
|
-
process.env.CIBUILD_SW__RELEASE__LOCAL_PROPERTIES = VALUE;
|
|
190
|
-
const declared = {
|
|
191
|
-
CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: '',
|
|
192
|
-
CIBUILD_SW__RELEASE__LOCAL_PROPERTIES: '',
|
|
193
|
-
};
|
|
194
|
-
const { error } = await convert(probePipeline(declared, ['primary', 'release']), 'primary');
|
|
195
|
-
expect(error).toBeUndefined();
|
|
196
|
-
});
|
|
197
|
-
test('a global slot, which names no workflow at all', async () => {
|
|
198
|
-
process.env.CIBUILD_S__LOCAL_PROPERTIES = VALUE;
|
|
199
|
-
const { error, steps } = await convert(probePipeline({ CIBUILD_S__LOCAL_PROPERTIES: '' }, ['primary']), 'primary');
|
|
200
|
-
expect(error).toBeUndefined();
|
|
201
|
-
expect(steps).toHaveLength(1);
|
|
202
|
-
});
|
|
203
|
-
test('an ordinary flat slot, which is every pipeline written before this', async () => {
|
|
204
|
-
process.env.LOCAL_PROPERTIES = VALUE;
|
|
205
|
-
const { error, steps } = await convert(probePipeline({ LOCAL_PROPERTIES: '' }, ['primary']), 'primary');
|
|
206
|
-
expect(error).toBeUndefined();
|
|
207
|
-
expect(steps).toHaveLength(1);
|
|
208
|
-
});
|
|
209
|
-
test('a half-encoded name, which is not a scoped slot and never was', async () => {
|
|
210
|
-
// `decodeSecretName` returns nothing for these, so they are ordinary
|
|
211
|
-
// variable names. Refusing them would be inventing a rule.
|
|
212
|
-
for (const key of ['CIBUILD_SW__RELEASE', 'CIBUILD_SW__RELEASE__', 'CIBUILD_S__']) {
|
|
213
|
-
const { error } = await convert(probePipeline({ [key]: '' }, ['primary']), 'primary');
|
|
214
|
-
expect(error).toBeUndefined();
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
//# sourceMappingURL=a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A value `SecretsManager` was just told to store is a value it can read back.
|
|
3
|
-
*
|
|
4
|
-
* It could not, on exactly the repositories that matter. `loadSecrets` sets
|
|
5
|
-
* `fileLoaded` when it finds a `.cibuild-secrets.json` or a
|
|
6
|
-
* `CIBUILD_S*`-shaped environment, and every reader begins
|
|
7
|
-
* `if (!this.fileLoaded) return process.env[...]` — a compatibility fallback
|
|
8
|
-
* to bare `CIBUILD_`-prefixed variables from before the store existed.
|
|
9
|
-
* `storeSecret` writes the file but never clears the flag, so on a repository
|
|
10
|
-
* that had no store — a first `ci init`, which is the only time `ci init`
|
|
11
|
-
* collects anything — every value collected in that run read back as absent
|
|
12
|
-
* from the instance that stored it.
|
|
13
|
-
*
|
|
14
|
-
* It is not a hypothetical. `ci init` extracts a workflow's keystore target
|
|
15
|
-
* from `storeFile=` in the `keystore.properties` it collected a moment
|
|
16
|
-
* earlier, which is how a project whose signing config names
|
|
17
|
-
* `app/customer.jks` gets its `file@` step pointed there instead of at
|
|
18
|
-
* `keystore.jks`. That read returned undefined on every fresh repository, so
|
|
19
|
-
* the resolution silently fell through to the Gradle-detected path — the half
|
|
20
|
-
* of issue 07 that shipped and never fired.
|
|
21
|
-
*
|
|
22
|
-
* The fix is additive rather than a flag flip: the stored data is consulted
|
|
23
|
-
* first, and the environment fallback stays exactly where it was for anything
|
|
24
|
-
* the store does not hold. Nothing that resolved before stops resolving.
|
|
25
|
-
*/
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=a-value-this-instance-stored-is-a-value-it-has.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a-value-this-instance-stored-is-a-value-it-has.test.d.ts","sourceRoot":"","sources":["../../../src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A value `SecretsManager` was just told to store is a value it can read back.
|
|
3
|
-
*
|
|
4
|
-
* It could not, on exactly the repositories that matter. `loadSecrets` sets
|
|
5
|
-
* `fileLoaded` when it finds a `.cibuild-secrets.json` or a
|
|
6
|
-
* `CIBUILD_S*`-shaped environment, and every reader begins
|
|
7
|
-
* `if (!this.fileLoaded) return process.env[...]` — a compatibility fallback
|
|
8
|
-
* to bare `CIBUILD_`-prefixed variables from before the store existed.
|
|
9
|
-
* `storeSecret` writes the file but never clears the flag, so on a repository
|
|
10
|
-
* that had no store — a first `ci init`, which is the only time `ci init`
|
|
11
|
-
* collects anything — every value collected in that run read back as absent
|
|
12
|
-
* from the instance that stored it.
|
|
13
|
-
*
|
|
14
|
-
* It is not a hypothetical. `ci init` extracts a workflow's keystore target
|
|
15
|
-
* from `storeFile=` in the `keystore.properties` it collected a moment
|
|
16
|
-
* earlier, which is how a project whose signing config names
|
|
17
|
-
* `app/customer.jks` gets its `file@` step pointed there instead of at
|
|
18
|
-
* `keystore.jks`. That read returned undefined on every fresh repository, so
|
|
19
|
-
* the resolution silently fell through to the Gradle-detected path — the half
|
|
20
|
-
* of issue 07 that shipped and never fired.
|
|
21
|
-
*
|
|
22
|
-
* The fix is additive rather than a flag flip: the stored data is consulted
|
|
23
|
-
* first, and the environment fallback stays exactly where it was for anything
|
|
24
|
-
* the store does not hold. Nothing that resolved before stops resolving.
|
|
25
|
-
*/
|
|
26
|
-
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
|
|
27
|
-
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
28
|
-
import { tmpdir } from 'node:os';
|
|
29
|
-
import { join } from 'node:path';
|
|
30
|
-
import { SecretsManager } from './secrets-manager.js';
|
|
31
|
-
const KEYSTORE_PROPERTIES = 'storeFile=app/customer.jks\nstorePassword=x\n';
|
|
32
|
-
let dir;
|
|
33
|
-
let storePath;
|
|
34
|
-
beforeEach(() => {
|
|
35
|
-
dir = mkdtempSync(join(tmpdir(), 'cibuild-store-readback-'));
|
|
36
|
-
storePath = join(dir, '.cibuild-secrets.json');
|
|
37
|
-
delete process.env.CIBUILD_KEYSTORE_PROPERTIES;
|
|
38
|
-
delete process.env.CIBUILD_FROM_THE_ENVIRONMENT;
|
|
39
|
-
});
|
|
40
|
-
afterEach(() => {
|
|
41
|
-
rmSync(dir, { recursive: true, force: true });
|
|
42
|
-
delete process.env.CIBUILD_KEYSTORE_PROPERTIES;
|
|
43
|
-
delete process.env.CIBUILD_FROM_THE_ENVIRONMENT;
|
|
44
|
-
});
|
|
45
|
-
describe('a repository that had no store yet', () => {
|
|
46
|
-
test('reads back a workflow-scoped value it just stored', () => {
|
|
47
|
-
const sm = new SecretsManager(storePath);
|
|
48
|
-
sm.storeSecret('KEYSTORE_PROPERTIES', KEYSTORE_PROPERTIES, 'release');
|
|
49
|
-
expect(sm.getSecret('KEYSTORE_PROPERTIES', 'release')).toBe(KEYSTORE_PROPERTIES);
|
|
50
|
-
expect(sm.hasSecret('KEYSTORE_PROPERTIES', 'release')).toBe(true);
|
|
51
|
-
expect(sm.getSecretIdByName('KEYSTORE_PROPERTIES', 'release')).toBe('KEYSTORE_PROPERTIES');
|
|
52
|
-
});
|
|
53
|
-
test('is why `ci init` can point a keystore step at the declared target', () => {
|
|
54
|
-
// The read that silently returned undefined: `ci init` takes the keystore
|
|
55
|
-
// target out of the properties file it collected in the same run.
|
|
56
|
-
const sm = new SecretsManager(storePath);
|
|
57
|
-
sm.storeSecret('KEYSTORE_PROPERTIES', KEYSTORE_PROPERTIES, 'release');
|
|
58
|
-
const storeFile = sm
|
|
59
|
-
.getSecret('KEYSTORE_PROPERTIES', 'release')
|
|
60
|
-
?.split('\n')
|
|
61
|
-
.find((line) => line.trim().startsWith('storeFile='));
|
|
62
|
-
expect(storeFile).toBe('storeFile=app/customer.jks');
|
|
63
|
-
});
|
|
64
|
-
test('reads back a global value it just stored', () => {
|
|
65
|
-
const sm = new SecretsManager(storePath);
|
|
66
|
-
sm.storeSecret('LOCAL_PROPERTIES', 'BASE_API_URL=x\n');
|
|
67
|
-
expect(sm.getSecret('LOCAL_PROPERTIES')).toBe('BASE_API_URL=x\n');
|
|
68
|
-
expect(sm.getAll()).toHaveProperty('LOCAL_PROPERTIES', 'BASE_API_URL=x\n');
|
|
69
|
-
expect(sm.getAllSecretNames()).toContain('LOCAL_PROPERTIES');
|
|
70
|
-
});
|
|
71
|
-
test('keeps a value scoped to the workflow it was stored for', () => {
|
|
72
|
-
const sm = new SecretsManager(storePath);
|
|
73
|
-
sm.storeSecret('LOCAL_PROPERTIES', 'ci-dynamic', 'primary');
|
|
74
|
-
sm.storeSecret('LOCAL_PROPERTIES', 'prod', 'release');
|
|
75
|
-
expect(sm.getSecret('LOCAL_PROPERTIES', 'primary')).toBe('ci-dynamic');
|
|
76
|
-
expect(sm.getSecret('LOCAL_PROPERTIES', 'release')).toBe('prod');
|
|
77
|
-
// No global value was stored, so a workflow nobody stored for has none.
|
|
78
|
-
expect(sm.getSecret('LOCAL_PROPERTIES', 'pull-request')).toBeUndefined();
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('the environment fallback', () => {
|
|
82
|
-
test('still answers for a key the store does not hold', () => {
|
|
83
|
-
process.env.CIBUILD_FROM_THE_ENVIRONMENT = 'inherited';
|
|
84
|
-
const sm = new SecretsManager(storePath);
|
|
85
|
-
sm.storeSecret('LOCAL_PROPERTIES', 'stored');
|
|
86
|
-
expect(sm.getSecret('FROM_THE_ENVIRONMENT')).toBe('inherited');
|
|
87
|
-
expect(sm.hasSecret('FROM_THE_ENVIRONMENT')).toBe(true);
|
|
88
|
-
expect(sm.getAll()).toMatchObject({
|
|
89
|
-
FROM_THE_ENVIRONMENT: 'inherited',
|
|
90
|
-
LOCAL_PROPERTIES: 'stored',
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
test('answers for everything when nothing has been stored', () => {
|
|
94
|
-
process.env.CIBUILD_FROM_THE_ENVIRONMENT = 'inherited';
|
|
95
|
-
const sm = new SecretsManager(storePath);
|
|
96
|
-
expect(sm.getSecret('FROM_THE_ENVIRONMENT')).toBe('inherited');
|
|
97
|
-
expect(sm.getAll()).toEqual({ FROM_THE_ENVIRONMENT: 'inherited' });
|
|
98
|
-
});
|
|
99
|
-
test('loses to a value that was actually stored', () => {
|
|
100
|
-
process.env.CIBUILD_KEYSTORE_PROPERTIES = 'from-the-environment';
|
|
101
|
-
const sm = new SecretsManager(storePath);
|
|
102
|
-
sm.storeSecret('KEYSTORE_PROPERTIES', KEYSTORE_PROPERTIES, 'release');
|
|
103
|
-
expect(sm.getSecret('KEYSTORE_PROPERTIES', 'release')).toBe(KEYSTORE_PROPERTIES);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
describe('a repository that already had a store', () => {
|
|
107
|
-
test('is unchanged — the file is the answer and the environment is not consulted', () => {
|
|
108
|
-
process.env.CIBUILD_FROM_THE_ENVIRONMENT = 'inherited';
|
|
109
|
-
writeFileSync(storePath, JSON.stringify({ global: { A: 'from-the-file' }, workflows: {} }), { mode: 0o600 });
|
|
110
|
-
const sm = new SecretsManager(storePath);
|
|
111
|
-
expect(sm.getSecret('A')).toBe('from-the-file');
|
|
112
|
-
expect(sm.getSecret('FROM_THE_ENVIRONMENT')).toBeUndefined();
|
|
113
|
-
expect(sm.getAll()).toEqual({ A: 'from-the-file' });
|
|
114
|
-
});
|
|
115
|
-
test('still lets a workflow value beat the global one', () => {
|
|
116
|
-
writeFileSync(storePath, JSON.stringify({
|
|
117
|
-
global: { A: 'global' },
|
|
118
|
-
workflows: { release: { A: 'release' } },
|
|
119
|
-
}), { mode: 0o600 });
|
|
120
|
-
const sm = new SecretsManager(storePath);
|
|
121
|
-
expect(sm.getSecret('A', 'release')).toBe('release');
|
|
122
|
-
expect(sm.getSecret('A', 'primary')).toBe('global');
|
|
123
|
-
expect(sm.getAll('release')).toEqual({ A: 'release' });
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
//# sourceMappingURL=a-value-this-instance-stored-is-a-value-it-has.test.js.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bitrise YAML Compatibility Layer
|
|
3
|
-
*
|
|
4
|
-
* This module provides compatibility functions to convert Bitrise YAML pipelines
|
|
5
|
-
* to CI Build format, including metadata conversion and environment variable mapping.
|
|
6
|
-
*/
|
|
7
|
-
import type { YAMLPipeline } from './types.js';
|
|
8
|
-
/**
|
|
9
|
-
* Map of Bitrise environment variables to CI Build equivalents
|
|
10
|
-
* Used for automatic variable substitution (FR-9.2)
|
|
11
|
-
*/
|
|
12
|
-
export declare const BITRISE_ENV_MAP: Record<string, string>;
|
|
13
|
-
/**
|
|
14
|
-
* Bitrise environment variables that require user input
|
|
15
|
-
* These cannot be automatically mapped and must be provided by the user (FR-9.3)
|
|
16
|
-
*/
|
|
17
|
-
export declare const BITRISE_USER_REQUIRED_VARS: string[];
|
|
18
|
-
/**
|
|
19
|
-
* Error class for Bitrise-specific environment variable issues
|
|
20
|
-
* Provides detailed information about missing variables (FR-9.3, FR-9.4, FR-9.5)
|
|
21
|
-
*/
|
|
22
|
-
export declare class BitriseEnvironmentError extends Error {
|
|
23
|
-
readonly missingVariables: BitriseVariableInfo[];
|
|
24
|
-
constructor(missingVariables: BitriseVariableInfo[]);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Information about a missing Bitrise environment variable
|
|
28
|
-
*/
|
|
29
|
-
export interface BitriseVariableInfo {
|
|
30
|
-
/** Variable name (e.g., BITRISE_PUBLIC_INSTALL_PAGE_URL) */
|
|
31
|
-
name: string;
|
|
32
|
-
/** Step where the variable is used */
|
|
33
|
-
stepName: string;
|
|
34
|
-
/** Input field where the variable is used */
|
|
35
|
-
inputField: string;
|
|
36
|
-
/** CI Build equivalent variable name (if available) */
|
|
37
|
-
cibuildEquivalent?: string;
|
|
38
|
-
/** Suggested action for the user */
|
|
39
|
-
suggestedAction: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Converts Bitrise metadata to CI Build format
|
|
43
|
-
* Transforms meta.bitrise.io to meta.cibuild.io (FR-1.1, FR-1.2, FR-1.3)
|
|
44
|
-
*
|
|
45
|
-
* @param pipeline YAML pipeline object (mutated in place)
|
|
46
|
-
*/
|
|
47
|
-
export declare function convertBitriseMetadata(pipeline: YAMLPipeline): void;
|
|
48
|
-
/**
|
|
49
|
-
* Detects Bitrise-specific environment variables in step inputs
|
|
50
|
-
* Scans recursively through objects and arrays (FR-9.1)
|
|
51
|
-
*
|
|
52
|
-
* @param inputs Step inputs object
|
|
53
|
-
* @param stepName Name of the step (for error reporting)
|
|
54
|
-
* @returns Array of detected Bitrise variable information
|
|
55
|
-
*/
|
|
56
|
-
export declare function detectBitriseEnvironmentVariables(inputs: any, stepName: string): BitriseVariableInfo[];
|
|
57
|
-
/**
|
|
58
|
-
* Checks if a variable should trigger a warning vs error
|
|
59
|
-
* Mapped variables generate info logs, unmapped variables generate errors
|
|
60
|
-
*
|
|
61
|
-
* @param varName Bitrise variable name
|
|
62
|
-
* @returns True if variable needs user configuration (error), false if auto-mapped (info)
|
|
63
|
-
*/
|
|
64
|
-
export declare function requiresUserConfiguration(varName: string): boolean;
|
|
65
|
-
//# sourceMappingURL=bitrise-compat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bitrise-compat.d.ts","sourceRoot":"","sources":["../../../src/yaml/bitrise-compat.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmBlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,UAKtC,CAAC;AAEF;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,SAAgB,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;gBAE5C,gBAAgB,EAAE,mBAAmB,EAAE;CAMpD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oCAAoC;IACpC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAsBnE;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,MAAM,GACf,mBAAmB,EAAE,CAOvB;AA2HD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAElE"}
|