@invarn/cibuild 2.9.6 → 2.9.8
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/a-missing-pinned-jdk-yields-for-every-gradle-run.test.d.ts +0 -2
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.js +0 -96
- 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 -1100
- 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 -91
- package/dist/src/yaml/steps/gradle-memory.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.js +0 -495
- 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/kotlin-metadata-compiles-on-a-daemon.test.d.ts +0 -2
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.js +0 -139
- 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,382 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An empty properties file fixes "file missing", not "field missing".
|
|
3
|
-
*
|
|
4
|
-
* The Secrets Gradle plugin turns each key of the properties file it loads
|
|
5
|
-
* into a `BuildConfig` constant and a manifest placeholder. A checkout without
|
|
6
|
-
* that file gets neither, so handing the build an empty stand-in clears the
|
|
7
|
-
* plugin's own throw and then fails one step later, inside Gradle, at the first
|
|
8
|
-
* reference to a constant that was never generated.
|
|
9
|
-
*
|
|
10
|
-
* `missingPropertyKeys` is the list a stand-in has to declare for that
|
|
11
|
-
* reference to resolve: what the build reads, read off the build files and the
|
|
12
|
-
* source under the modules that apply the plugin.
|
|
13
|
-
*/
|
|
14
|
-
import { mkdtempSync, rmSync, mkdirSync, writeFileSync } from "node:fs";
|
|
15
|
-
import { join } from "node:path";
|
|
16
|
-
import { tmpdir } from "node:os";
|
|
17
|
-
import { scanAndroidProject } from "./android-scanner.js";
|
|
18
|
-
let root;
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
root = mkdtempSync(join(tmpdir(), "cibuild-props-"));
|
|
21
|
-
});
|
|
22
|
-
afterEach(() => {
|
|
23
|
-
rmSync(root, { recursive: true, force: true });
|
|
24
|
-
});
|
|
25
|
-
function write(relative, content) {
|
|
26
|
-
const path = join(root, relative);
|
|
27
|
-
mkdirSync(join(path, ".."), { recursive: true });
|
|
28
|
-
writeFileSync(path, content);
|
|
29
|
-
}
|
|
30
|
-
async function keys() {
|
|
31
|
-
return (await scanAndroidProject(root)).missingPropertyKeys;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The shape the whole thing is for: one module applying the plugin, no
|
|
35
|
-
* properties file anywhere, and the root declaring the plugin without
|
|
36
|
-
* applying it — which is where a version catalog alias is nearly always named.
|
|
37
|
-
*/
|
|
38
|
-
function projectApplyingTheSecretsPlugin(appBuildFileExtra = "") {
|
|
39
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
40
|
-
write("build.gradle.kts", "plugins {\n alias(libs.plugins.secrets) apply false\n}\n");
|
|
41
|
-
write("app/build.gradle.kts", `plugins {\n id("com.android.application")\n alias(libs.plugins.secrets)\n}\n\nandroid {\n namespace = "com.example.app"\n${appBuildFileExtra}}\n`);
|
|
42
|
-
write(".gitignore", "local.properties\n");
|
|
43
|
-
}
|
|
44
|
-
describe("the keys a generated properties file has to declare", () => {
|
|
45
|
-
test("names a BuildConfig field referenced from Kotlin source", async () => {
|
|
46
|
-
projectApplyingTheSecretsPlugin();
|
|
47
|
-
write("app/src/main/java/com/example/app/Maps.kt", "package com.example.app\n\nval key: String = BuildConfig.MAPS_API_KEY\n");
|
|
48
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
49
|
-
});
|
|
50
|
-
test("names one referenced from Java source", async () => {
|
|
51
|
-
projectApplyingTheSecretsPlugin();
|
|
52
|
-
write("app/src/main/java/com/example/app/Maps.java", "package com.example.app;\n\nclass Maps { String k = BuildConfig.MAPS_API_KEY; }\n");
|
|
53
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
54
|
-
});
|
|
55
|
-
test("names a manifestPlaceholders key — Kotlin DSL, indexed", async () => {
|
|
56
|
-
projectApplyingTheSecretsPlugin(' defaultConfig {\n manifestPlaceholders["mapsApiKey"] = "unused"\n }\n');
|
|
57
|
-
expect(await keys()).toEqual(["mapsApiKey"]);
|
|
58
|
-
});
|
|
59
|
-
test("names a manifestPlaceholders key — Kotlin DSL, whole map", async () => {
|
|
60
|
-
projectApplyingTheSecretsPlugin(' defaultConfig {\n manifestPlaceholders += mapOf("mapsApiKey" to "u", "adsAppId" to "u")\n }\n');
|
|
61
|
-
expect(await keys()).toEqual(["adsAppId", "mapsApiKey"]);
|
|
62
|
-
});
|
|
63
|
-
test("names a manifestPlaceholders key — Groovy map literal", async () => {
|
|
64
|
-
write("settings.gradle", "include ':app'\n");
|
|
65
|
-
write("build.gradle", "// root\n");
|
|
66
|
-
write("app/build.gradle", "plugins {\n id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'\n}\n" +
|
|
67
|
-
"android {\n defaultConfig {\n" +
|
|
68
|
-
" manifestPlaceholders = [mapsApiKey: \"unused\", 'adsAppId': \"unused\"]\n" +
|
|
69
|
-
" }\n}\n");
|
|
70
|
-
expect(await keys()).toEqual(["adsAppId", "mapsApiKey"]);
|
|
71
|
-
});
|
|
72
|
-
test("names a manifestPlaceholders key — Groovy put", async () => {
|
|
73
|
-
write("settings.gradle", "include ':app'\n");
|
|
74
|
-
write("build.gradle", "// root\n");
|
|
75
|
-
write("app/build.gradle", "plugins {\n id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'\n}\n" +
|
|
76
|
-
"android {\n defaultConfig {\n" +
|
|
77
|
-
" manifestPlaceholders.put('mapsApiKey', 'unused')\n" +
|
|
78
|
-
" }\n}\n");
|
|
79
|
-
expect(await keys()).toEqual(["mapsApiKey"]);
|
|
80
|
-
});
|
|
81
|
-
test("merges both sources, sorted and deduplicated", async () => {
|
|
82
|
-
projectApplyingTheSecretsPlugin(' defaultConfig {\n manifestPlaceholders["MAPS_API_KEY"] = "u"\n }\n');
|
|
83
|
-
write("app/src/main/java/com/example/app/Keys.kt", "val a = BuildConfig.MAPS_API_KEY\nval b = BuildConfig.ADS_APP_ID\nval c = BuildConfig.MAPS_API_KEY\n");
|
|
84
|
-
expect(await keys()).toEqual(["ADS_APP_ID", "MAPS_API_KEY"]);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
describe("what it deliberately leaves out", () => {
|
|
88
|
-
/**
|
|
89
|
-
* `BuildConfig.DEBUG` is the most-referenced constant in Android source, and
|
|
90
|
-
* AGP generates it whether or not a properties file exists. Declaring it
|
|
91
|
-
* would make the Secrets plugin generate a `String DEBUG` beside AGP's
|
|
92
|
-
* `boolean DEBUG` — the file meant to rescue the build breaking it instead.
|
|
93
|
-
*/
|
|
94
|
-
test("the fields AGP generates by itself", async () => {
|
|
95
|
-
projectApplyingTheSecretsPlugin();
|
|
96
|
-
write("app/src/main/java/com/example/app/Env.kt", [
|
|
97
|
-
"val d = BuildConfig.DEBUG",
|
|
98
|
-
"val a = BuildConfig.APPLICATION_ID",
|
|
99
|
-
"val t = BuildConfig.BUILD_TYPE",
|
|
100
|
-
"val f = BuildConfig.FLAVOR",
|
|
101
|
-
"val fd = BuildConfig.FLAVOR_environment",
|
|
102
|
-
"val vc = BuildConfig.VERSION_CODE",
|
|
103
|
-
"val vn = BuildConfig.VERSION_NAME",
|
|
104
|
-
"val lp = BuildConfig.LIBRARY_PACKAGE_NAME",
|
|
105
|
-
"val mine = BuildConfig.MAPS_API_KEY",
|
|
106
|
-
].join("\n"));
|
|
107
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
108
|
-
});
|
|
109
|
-
test("a project that applies no Secrets plugin", async () => {
|
|
110
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
111
|
-
write("build.gradle.kts", "// root\n");
|
|
112
|
-
write("app/build.gradle.kts", 'plugins {\n id("com.android.application")\n}\n');
|
|
113
|
-
write("app/src/main/java/com/example/app/Maps.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
114
|
-
expect(await keys()).toEqual([]);
|
|
115
|
-
});
|
|
116
|
-
/**
|
|
117
|
-
* `apply false` names the plugin's version for the modules that will apply
|
|
118
|
-
* it; the root project loads no properties file of its own. Reading it as an
|
|
119
|
-
* application would aim the source walk at the whole repository — every
|
|
120
|
-
* module's source, on the strength of a line that applies nothing.
|
|
121
|
-
*/
|
|
122
|
-
test("a root that declares the plugin with apply false", async () => {
|
|
123
|
-
write("settings.gradle.kts", 'include(":app", ":other")\n');
|
|
124
|
-
write("build.gradle.kts", "plugins {\n alias(libs.plugins.secrets) apply false\n}\n");
|
|
125
|
-
write("app/build.gradle.kts", 'plugins {\n id("com.android.application")\n}\n');
|
|
126
|
-
write("other/build.gradle.kts", "// nothing\n");
|
|
127
|
-
write("other/src/main/java/Other.kt", "val k = BuildConfig.ELSEWHERE\n");
|
|
128
|
-
expect(await keys()).toEqual([]);
|
|
129
|
-
});
|
|
130
|
-
test("generated sources under build/", async () => {
|
|
131
|
-
projectApplyingTheSecretsPlugin();
|
|
132
|
-
write("app/build/generated/source/buildConfig/debug/com/example/app/BuildConfig.java", "public final class BuildConfig { public static final String STALE = BuildConfig.STALE; }\n");
|
|
133
|
-
write("app/src/main/java/com/example/app/Maps.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
134
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
describe("the module boundary", () => {
|
|
138
|
-
test("reads source of the module that applies the plugin, not its siblings", async () => {
|
|
139
|
-
write("settings.gradle.kts", 'include(":app", ":other")\n');
|
|
140
|
-
write("build.gradle.kts", "// root\n");
|
|
141
|
-
write("app/build.gradle.kts", 'plugins {\n alias(libs.plugins.secrets)\n}\n');
|
|
142
|
-
write("app/src/main/java/App.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
143
|
-
write("other/build.gradle.kts", "// nothing\n");
|
|
144
|
-
write("other/src/main/java/Other.kt", "val k = BuildConfig.ELSEWHERE\n");
|
|
145
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
146
|
-
});
|
|
147
|
-
test("a root module that really applies the plugin covers the whole tree", async () => {
|
|
148
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
149
|
-
write("build.gradle.kts", 'plugins {\n id("com.android.application")\n alias(libs.plugins.secrets)\n}\n');
|
|
150
|
-
write("app/build.gradle.kts", "// nothing\n");
|
|
151
|
-
write("app/src/main/java/App.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
152
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
/**
|
|
156
|
-
* The warnings a customer already sees. This scan adds a field and reads more
|
|
157
|
-
* files; it must not add, drop or reword a single warning, so the two paths
|
|
158
|
-
* that emit a `secrets-plugin` warning are asserted whole.
|
|
159
|
-
*/
|
|
160
|
-
describe("the Secrets-plugin warning path is unchanged", () => {
|
|
161
|
-
test("with no companion defaults file, the one file-absent warning", async () => {
|
|
162
|
-
projectApplyingTheSecretsPlugin();
|
|
163
|
-
write("app/src/main/java/com/example/app/Maps.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
164
|
-
const result = await scanAndroidProject(root);
|
|
165
|
-
expect(result.warnings.filter((w) => w.category === "secrets-plugin")).toEqual([
|
|
166
|
-
{
|
|
167
|
-
category: "secrets-plugin",
|
|
168
|
-
severity: "warning",
|
|
169
|
-
message: "Google Secrets Gradle Plugin reads 'local.properties' which is absent in CI",
|
|
170
|
-
hint: "Inject 'local.properties' as a file step using a secret variable",
|
|
171
|
-
// The root build file, which is where the version-catalog alias is
|
|
172
|
-
// named with `apply false`. The warning path counts that as an
|
|
173
|
-
// application and always has; `missingPropertyKeys` does not, which is
|
|
174
|
-
// why the two ask the question through different functions.
|
|
175
|
-
location: "build.gradle.kts",
|
|
176
|
-
},
|
|
177
|
-
]);
|
|
178
|
-
// And the new field is populated in the same scan, from the same files.
|
|
179
|
-
expect(result.missingPropertyKeys).toEqual(["MAPS_API_KEY"]);
|
|
180
|
-
});
|
|
181
|
-
test("with a companion defaults file, one warning per expected key", async () => {
|
|
182
|
-
projectApplyingTheSecretsPlugin();
|
|
183
|
-
write("secrets.defaults.properties", "MAPS_API_KEY=\nADS_APP_ID=\n");
|
|
184
|
-
write("app/src/main/java/com/example/app/Maps.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
185
|
-
const result = await scanAndroidProject(root);
|
|
186
|
-
expect(result.warnings.filter((w) => w.category === "secrets-plugin")).toEqual([
|
|
187
|
-
{
|
|
188
|
-
category: "secrets-plugin",
|
|
189
|
-
severity: "warning",
|
|
190
|
-
message: "Secrets plugin key: MAPS_API_KEY",
|
|
191
|
-
hint: "Add via: ci secrets add MAPS_API_KEY",
|
|
192
|
-
location: "local.properties",
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
category: "secrets-plugin",
|
|
196
|
-
severity: "warning",
|
|
197
|
-
message: "Secrets plugin key: ADS_APP_ID",
|
|
198
|
-
hint: "Add via: ci secrets add ADS_APP_ID",
|
|
199
|
-
location: "local.properties",
|
|
200
|
-
},
|
|
201
|
-
]);
|
|
202
|
-
});
|
|
203
|
-
test("a properties file that is present but not gitignored warns about neither", async () => {
|
|
204
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
205
|
-
write("build.gradle.kts", "// root\n");
|
|
206
|
-
write("app/build.gradle.kts", "plugins {\n alias(libs.plugins.secrets)\n}\n");
|
|
207
|
-
write("local.properties", "sdk.dir=/opt/android\n");
|
|
208
|
-
write("app/src/main/java/App.kt", "val k = BuildConfig.MAPS_API_KEY\n");
|
|
209
|
-
const result = await scanAndroidProject(root);
|
|
210
|
-
expect(result.warnings.filter((w) => w.category === "secrets-plugin")).toEqual([]);
|
|
211
|
-
// The keys are still reported. `invarn`-style callers run this scan on a
|
|
212
|
-
// developer's own checkout, where the file is nearly always present and
|
|
213
|
-
// holds nothing but `sdk.dir` — gating the keys on its absence would
|
|
214
|
-
// return nothing in exactly the case they are needed for.
|
|
215
|
-
expect(result.missingPropertyKeys).toEqual(["MAPS_API_KEY"]);
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
/**
|
|
219
|
-
* The commonest shape of all, and the one the first three sources missed.
|
|
220
|
-
*
|
|
221
|
-
* The Secrets plugin's own documentation, and every Google Maps setup guide,
|
|
222
|
-
* puts the key in the manifest and nowhere else. There is no `BuildConfig`
|
|
223
|
-
* reference and no `manifestPlaceholders` block — the plugin substitutes the
|
|
224
|
-
* value during manifest merging. A scan reading only build files and source
|
|
225
|
-
* returns nothing for such a repository, which is the majority of them.
|
|
226
|
-
*/
|
|
227
|
-
describe("a key referenced only in AndroidManifest.xml", () => {
|
|
228
|
-
test("names a placeholder the plugin fills", async () => {
|
|
229
|
-
projectApplyingTheSecretsPlugin();
|
|
230
|
-
write("app/src/main/AndroidManifest.xml", '<manifest xmlns:android="http://schemas.android.com/apk/res/android">\n' +
|
|
231
|
-
" <application>\n" +
|
|
232
|
-
' <meta-data android:name="com.google.android.geo.API_KEY"\n' +
|
|
233
|
-
' android:value="${MAPS_API_KEY}" />\n' +
|
|
234
|
-
" </application>\n</manifest>\n");
|
|
235
|
-
expect(await keys()).toEqual(["MAPS_API_KEY"]);
|
|
236
|
-
});
|
|
237
|
-
// AGP supplies this one from the variant, so it is not a value anybody owes.
|
|
238
|
-
test("ignores ${applicationId}", async () => {
|
|
239
|
-
projectApplyingTheSecretsPlugin();
|
|
240
|
-
write("app/src/main/AndroidManifest.xml", '<manifest>\n <provider android:authorities="${applicationId}.provider" />\n</manifest>\n');
|
|
241
|
-
expect(await keys()).toEqual([]);
|
|
242
|
-
});
|
|
243
|
-
test("finds them in flavor source sets too", async () => {
|
|
244
|
-
projectApplyingTheSecretsPlugin();
|
|
245
|
-
write("app/src/main/AndroidManifest.xml", '<manifest a="${BASE_KEY}" />\n');
|
|
246
|
-
write("app/src/prod/AndroidManifest.xml", '<manifest a="${PROD_KEY}" />\n');
|
|
247
|
-
expect(await keys()).toEqual(["BASE_KEY", "PROD_KEY"]);
|
|
248
|
-
});
|
|
249
|
-
test("skips a merged manifest under build/", async () => {
|
|
250
|
-
projectApplyingTheSecretsPlugin();
|
|
251
|
-
write("app/src/main/AndroidManifest.xml", '<manifest a="${REAL_KEY}" />\n');
|
|
252
|
-
write("app/build/intermediates/merged_manifest/AndroidManifest.xml", '<manifest a="${STALE}" />\n');
|
|
253
|
-
expect(await keys()).toEqual(["REAL_KEY"]);
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
/**
|
|
257
|
-
* A build that loads the properties file itself, with no Secrets plugin
|
|
258
|
-
* anywhere. The file existing is not the fix for these — only the file
|
|
259
|
-
* existing *with the key in it* is, because `getProperty` on an absent key
|
|
260
|
-
* returns null whether or not the file is there.
|
|
261
|
-
*/
|
|
262
|
-
describe("a build that reads the properties file directly", () => {
|
|
263
|
-
test("names a getProperty key, with no plugin applied", async () => {
|
|
264
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
265
|
-
write("build.gradle.kts", "// root\n");
|
|
266
|
-
write("app/build.gradle.kts", 'import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties\n' +
|
|
267
|
-
'val url: String = gradleLocalProperties(rootDir).getProperty("api.url.release")\n');
|
|
268
|
-
expect(await keys()).toEqual(["api.url.release"]);
|
|
269
|
-
});
|
|
270
|
-
test("keeps dotted keys, which a direct reader may use freely", async () => {
|
|
271
|
-
write("settings.gradle", "include ':app'\n");
|
|
272
|
-
write("build.gradle", "// root\n");
|
|
273
|
-
write("app/build.gradle", "def props = new Properties()\n" +
|
|
274
|
-
"props.load(rootProject.file('local.properties').newDataInputStream())\n" +
|
|
275
|
-
"def a = props.getProperty('api.url.debug')\n" +
|
|
276
|
-
"def b = props.getProperty('tv.isDebug')\n");
|
|
277
|
-
expect(await keys()).toEqual(["api.url.debug", "tv.isDebug"]);
|
|
278
|
-
});
|
|
279
|
-
test("honours a default argument without treating it as a key", async () => {
|
|
280
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
281
|
-
write("build.gradle.kts", "// root\n");
|
|
282
|
-
write("app/build.gradle.kts", 'val p = java.util.Properties()\n' +
|
|
283
|
-
'p.load(rootProject.file("local.properties").reader())\n' +
|
|
284
|
-
'val u = p.getProperty("api.url.release", "")\n');
|
|
285
|
-
expect(await keys()).toEqual(["api.url.release"]);
|
|
286
|
-
});
|
|
287
|
-
/**
|
|
288
|
-
* The idiom that hides every key behind a name the repository chose. Without
|
|
289
|
-
* following it, a repository like this reads as having no keys at all.
|
|
290
|
-
*/
|
|
291
|
-
test("follows a hand-rolled accessor to its call sites", async () => {
|
|
292
|
-
write("settings.gradle", "include ':app'\n");
|
|
293
|
-
write("build.gradle", "// root\n");
|
|
294
|
-
write("app/build.gradle", "def getProps(String propName) {\n" +
|
|
295
|
-
" def propsFile = rootProject.file('local.properties')\n" +
|
|
296
|
-
" if (propsFile.exists()) {\n" +
|
|
297
|
-
" def props = new Properties()\n" +
|
|
298
|
-
" props.load(new FileInputStream(propsFile))\n" +
|
|
299
|
-
" return props[propName]\n" +
|
|
300
|
-
" } else {\n" +
|
|
301
|
-
" return \"\";\n" +
|
|
302
|
-
" }\n" +
|
|
303
|
-
"}\n" +
|
|
304
|
-
"\n" +
|
|
305
|
-
"String signFilePath = getProps(\"sign.file\")\n" +
|
|
306
|
-
"Boolean noObfuscate = getProps(\"app.dontobfuscate\")?.toBoolean() ?: false\n");
|
|
307
|
-
expect(await keys()).toEqual(["app.dontobfuscate", "sign.file"]);
|
|
308
|
-
});
|
|
309
|
-
test("does not follow a function that reads something else", async () => {
|
|
310
|
-
write("settings.gradle", "include ':app'\n");
|
|
311
|
-
write("build.gradle", "// root\n");
|
|
312
|
-
write("app/build.gradle", "def getProps(String n) {\n" +
|
|
313
|
-
" def p = new Properties()\n" +
|
|
314
|
-
" p.load(rootProject.file('local.properties').newDataInputStream())\n" +
|
|
315
|
-
" return p[n]\n" +
|
|
316
|
-
"}\n" +
|
|
317
|
-
"def version(String n) {\n" +
|
|
318
|
-
" def p = new Properties()\n" +
|
|
319
|
-
" p.load(rootProject.file('version.properties').newDataInputStream())\n" +
|
|
320
|
-
" return p[n]\n" +
|
|
321
|
-
"}\n" +
|
|
322
|
-
"def a = getProps('wanted')\n" +
|
|
323
|
-
"def b = version('unwanted')\n");
|
|
324
|
-
expect(await keys()).toEqual(["wanted"]);
|
|
325
|
-
});
|
|
326
|
-
/**
|
|
327
|
-
* `properties["x"]` is the Gradle *project* property channel —
|
|
328
|
-
* `gradle.properties` and `-P` — which the scan already reports separately.
|
|
329
|
-
* Declaring those in a properties file would be the wrong file entirely.
|
|
330
|
-
*/
|
|
331
|
-
test("does not confuse Gradle project properties for properties-file keys", async () => {
|
|
332
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
333
|
-
write("build.gradle.kts", "// root\n");
|
|
334
|
-
write("app/build.gradle.kts", 'val p = java.util.Properties()\n' +
|
|
335
|
-
'p.load(rootProject.file("local.properties").reader())\n' +
|
|
336
|
-
'val a = p.getProperty("wanted")\n' +
|
|
337
|
-
'val b = properties["projectScoped"]\n' +
|
|
338
|
-
'val c = findProperty("alsoProjectScoped")\n');
|
|
339
|
-
expect(await keys()).toEqual(["wanted"]);
|
|
340
|
-
});
|
|
341
|
-
/** A developer's own SDK path is not a value anybody owes the build. */
|
|
342
|
-
test("never names a machine-local key", async () => {
|
|
343
|
-
write("settings.gradle.kts", 'include(":app")\n');
|
|
344
|
-
write("build.gradle.kts", "// root\n");
|
|
345
|
-
write("app/build.gradle.kts", 'val p = java.util.Properties()\n' +
|
|
346
|
-
'p.load(rootProject.file("local.properties").reader())\n' +
|
|
347
|
-
'val sdk = p.getProperty("sdk.dir")\n' +
|
|
348
|
-
'val ndk = p.getProperty("ndk.dir")\n' +
|
|
349
|
-
'val cmake = p.getProperty("cmake.dir")\n' +
|
|
350
|
-
'val real = p.getProperty("api.key")\n');
|
|
351
|
-
expect(await keys()).toEqual(["api.key"]);
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
/**
|
|
355
|
-
* A scan that answers well on a small repository and thins out on a large one
|
|
356
|
-
* is the worse of the two failures, because the large one is the one someone
|
|
357
|
-
* is paid to build.
|
|
358
|
-
*
|
|
359
|
-
* Manifests and source shared a file budget at first, and source was walked
|
|
360
|
-
* first. Measured on a real application — 1743 source files, 47 manifests —
|
|
361
|
-
* the source walk spent the whole budget and the manifests were never opened,
|
|
362
|
-
* so every key referenced only as `${KEY}` in a manifest came back missing.
|
|
363
|
-
* Nine of that application's twenty declared keys were lost that way, and the
|
|
364
|
-
* scan reported the other eleven with no sign anything was wrong.
|
|
365
|
-
*
|
|
366
|
-
* This is the only test here that builds a tree big enough to exhaust a
|
|
367
|
-
* budget, because that is the only way to express the defect. It costs about
|
|
368
|
-
* half a second.
|
|
369
|
-
*/
|
|
370
|
-
describe("a repository larger than the source budget", () => {
|
|
371
|
-
test("still reads its manifests", async () => {
|
|
372
|
-
projectApplyingTheSecretsPlugin();
|
|
373
|
-
write("app/src/main/AndroidManifest.xml", '<manifest android:value="${MANIFEST_ONLY_KEY}" />\n');
|
|
374
|
-
// Past SOURCE_FILE_CAP, spread over directories so no single readdir is
|
|
375
|
-
// unrepresentative.
|
|
376
|
-
for (let i = 0; i < 8100; i++) {
|
|
377
|
-
write(`app/src/main/java/p${i % 40}/F${i}.kt`, `val x${i} = 1\n`);
|
|
378
|
-
}
|
|
379
|
-
expect(await keys()).toContain("MANIFEST_ONLY_KEY");
|
|
380
|
-
}, 60_000);
|
|
381
|
-
});
|
|
382
|
-
//# sourceMappingURL=a-properties-stand-in-declares-the-keys-the-build-reads.test.js.map
|
package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A value already in `.cibuild-secrets.json` answers "what are the bytes".
|
|
3
|
-
* It does not answer "where does each workflow write them", and
|
|
4
|
-
* `collectFileSecret` used to treat the two as one question.
|
|
5
|
-
*
|
|
6
|
-
* `pendingGroups` is empty when every group already has the secret — and a
|
|
7
|
-
* **global** entry satisfies `hasSecret(name, workflow)` for every workflow, so
|
|
8
|
-
* one `ci init` in the repository's past is enough. The call then returned an
|
|
9
|
-
* empty paths map, the caller assigned that to `setupOptions.keystorePaths`,
|
|
10
|
-
* and the fallback filled every workflow from one source: the `storeFile=`
|
|
11
|
-
* line of whatever `keystore.properties` was collected, or the first path
|
|
12
|
-
* Gradle mentioned. One path for three workflows is one discriminator, so
|
|
13
|
-
* `credentialSlots` declared a single flat `KEYSTORE_BASE64` and the whole
|
|
14
|
-
* per-workflow split was lost — silently, and on exactly the credential the
|
|
15
|
-
* split exists for.
|
|
16
|
-
*
|
|
17
|
-
* Measured on the real repository, 2026-09-09: the store held
|
|
18
|
-
* `KEYSTORE_BASE64` globally, the keystore prompt never appeared, and all
|
|
19
|
-
* three workflows were generated writing to `customer-android.jks` — the
|
|
20
|
-
* release key's path, over the two debug workflows. A fresh clone of the same
|
|
21
|
-
* repository prompts and splits correctly, which is why this never showed up
|
|
22
|
-
* in a test that builds its own fixture from nothing.
|
|
23
|
-
*
|
|
24
|
-
* The store records values and never paths, so the path has to be asked for
|
|
25
|
-
* whichever the value's state is. Only a caller that consumes the returned map
|
|
26
|
-
* is affected — `promptTargetPath` marks it — so nothing else gains a prompt.
|
|
27
|
-
*/
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map
|
package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"an-already-stored-value-does-not-answer-the-target-question.test.d.ts","sourceRoot":"","sources":["../../../src/commands/an-already-stored-value-does-not-answer-the-target-question.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG"}
|
package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A value already in `.cibuild-secrets.json` answers "what are the bytes".
|
|
3
|
-
* It does not answer "where does each workflow write them", and
|
|
4
|
-
* `collectFileSecret` used to treat the two as one question.
|
|
5
|
-
*
|
|
6
|
-
* `pendingGroups` is empty when every group already has the secret — and a
|
|
7
|
-
* **global** entry satisfies `hasSecret(name, workflow)` for every workflow, so
|
|
8
|
-
* one `ci init` in the repository's past is enough. The call then returned an
|
|
9
|
-
* empty paths map, the caller assigned that to `setupOptions.keystorePaths`,
|
|
10
|
-
* and the fallback filled every workflow from one source: the `storeFile=`
|
|
11
|
-
* line of whatever `keystore.properties` was collected, or the first path
|
|
12
|
-
* Gradle mentioned. One path for three workflows is one discriminator, so
|
|
13
|
-
* `credentialSlots` declared a single flat `KEYSTORE_BASE64` and the whole
|
|
14
|
-
* per-workflow split was lost — silently, and on exactly the credential the
|
|
15
|
-
* split exists for.
|
|
16
|
-
*
|
|
17
|
-
* Measured on the real repository, 2026-09-09: the store held
|
|
18
|
-
* `KEYSTORE_BASE64` globally, the keystore prompt never appeared, and all
|
|
19
|
-
* three workflows were generated writing to `customer-android.jks` — the
|
|
20
|
-
* release key's path, over the two debug workflows. A fresh clone of the same
|
|
21
|
-
* repository prompts and splits correctly, which is why this never showed up
|
|
22
|
-
* in a test that builds its own fixture from nothing.
|
|
23
|
-
*
|
|
24
|
-
* The store records values and never paths, so the path has to be asked for
|
|
25
|
-
* whichever the value's state is. Only a caller that consumes the returned map
|
|
26
|
-
* is affected — `promptTargetPath` marks it — so nothing else gains a prompt.
|
|
27
|
-
*/
|
|
28
|
-
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
|
|
29
|
-
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
30
|
-
import { tmpdir } from 'node:os';
|
|
31
|
-
import { join, resolve } from 'node:path';
|
|
32
|
-
import prompts from 'prompts';
|
|
33
|
-
import { collectFileSecret } from './file-secret-collector.js';
|
|
34
|
-
import { SecretsManager } from '../yaml/secrets-manager.js';
|
|
35
|
-
import { credentialSlots } from './build.js';
|
|
36
|
-
const KEYSTORE_GROUPS = [
|
|
37
|
-
{ label: 'debug builds (primary, pull-request)', workflows: ['primary', 'pull-request'] },
|
|
38
|
-
{ label: 'release', workflows: ['release'] },
|
|
39
|
-
];
|
|
40
|
-
let workdir;
|
|
41
|
-
let secretsManager;
|
|
42
|
-
// `prompts.inject` concatenates, so a sentinel one test leaves queued becomes
|
|
43
|
-
// the next test's answer. The queue itself is the only reset there is.
|
|
44
|
-
const clearInjected = () => {
|
|
45
|
-
prompts._injected = undefined;
|
|
46
|
-
};
|
|
47
|
-
beforeEach(() => {
|
|
48
|
-
clearInjected();
|
|
49
|
-
workdir = resolve(mkdtempSync(join(tmpdir(), 'cibuild-stored-value-target-')));
|
|
50
|
-
secretsManager = new SecretsManager(join(workdir, '.cibuild-secrets.json'));
|
|
51
|
-
});
|
|
52
|
-
afterEach(() => {
|
|
53
|
-
clearInjected();
|
|
54
|
-
rmSync(workdir, { recursive: true, force: true });
|
|
55
|
-
});
|
|
56
|
-
function put(relPath, contents) {
|
|
57
|
-
const full = join(workdir, relPath);
|
|
58
|
-
mkdirSync(join(full, '..'), { recursive: true });
|
|
59
|
-
writeFileSync(full, contents, 'utf-8');
|
|
60
|
-
return full;
|
|
61
|
-
}
|
|
62
|
-
/** The repository's shape: a committed debug key and an uncommitted release key. */
|
|
63
|
-
function twoKeystores() {
|
|
64
|
-
return {
|
|
65
|
-
debug: put('config/debug.keystore', 'debug-key-bytes'),
|
|
66
|
-
release: put('app/customer-android.jks', 'release-key-bytes'),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function collectKeystore() {
|
|
70
|
-
return collectFileSecret({
|
|
71
|
-
displayName: 'keystore',
|
|
72
|
-
secretName: 'KEYSTORE_BASE64',
|
|
73
|
-
fileMatch: (name) => name.endsWith('.jks') || name.endsWith('.keystore'),
|
|
74
|
-
readAs: 'base64',
|
|
75
|
-
workflowGroups: KEYSTORE_GROUPS,
|
|
76
|
-
promptTargetPath: true,
|
|
77
|
-
}, workdir, secretsManager);
|
|
78
|
-
}
|
|
79
|
-
describe('a keystore whose value the store already holds', () => {
|
|
80
|
-
test('is still asked where each workflow writes it', async () => {
|
|
81
|
-
const { debug, release } = twoKeystores();
|
|
82
|
-
// One `ci init` in this repository's past, filed globally — which is what
|
|
83
|
-
// the real repository had.
|
|
84
|
-
secretsManager.storeSecret('KEYSTORE_BASE64', 'already-here');
|
|
85
|
-
prompts.inject([debug, release]);
|
|
86
|
-
const paths = await collectKeystore();
|
|
87
|
-
expect(paths).toEqual({
|
|
88
|
-
primary: 'config/debug.keystore',
|
|
89
|
-
'pull-request': 'config/debug.keystore',
|
|
90
|
-
release: 'app/customer-android.jks',
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
test('so the credential still declares one slot per workflow', async () => {
|
|
94
|
-
const { debug, release } = twoKeystores();
|
|
95
|
-
secretsManager.storeSecret('KEYSTORE_BASE64', 'already-here');
|
|
96
|
-
prompts.inject([debug, release]);
|
|
97
|
-
const paths = await collectKeystore();
|
|
98
|
-
const discriminatorByWorkflow = Object.fromEntries(Object.entries(paths).map(([workflow, path]) => [workflow, path]));
|
|
99
|
-
// One declaration per workflow, each under the plain name — what varies is
|
|
100
|
-
// the `envs` block it is emitted into, not the key.
|
|
101
|
-
expect(credentialSlots('KEYSTORE_BASE64', discriminatorByWorkflow)).toEqual([
|
|
102
|
-
{ slot: 'KEYSTORE_BASE64', workflow: 'primary' },
|
|
103
|
-
{ slot: 'KEYSTORE_BASE64', workflow: 'pull-request' },
|
|
104
|
-
{ slot: 'KEYSTORE_BASE64', workflow: 'release' },
|
|
105
|
-
]);
|
|
106
|
-
});
|
|
107
|
-
test('and a workflow-scoped entry hides the question just as well as a global one', async () => {
|
|
108
|
-
const { debug, release } = twoKeystores();
|
|
109
|
-
for (const workflow of ['primary', 'pull-request', 'release']) {
|
|
110
|
-
secretsManager.storeSecret('KEYSTORE_BASE64', 'already-here', workflow);
|
|
111
|
-
}
|
|
112
|
-
prompts.inject([debug, release]);
|
|
113
|
-
expect(await collectKeystore()).toEqual({
|
|
114
|
-
primary: 'config/debug.keystore',
|
|
115
|
-
'pull-request': 'config/debug.keystore',
|
|
116
|
-
release: 'app/customer-android.jks',
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
test('and the value the user picks now replaces the one that was there', async () => {
|
|
120
|
-
const { debug, release } = twoKeystores();
|
|
121
|
-
secretsManager.storeSecret('KEYSTORE_BASE64', 'already-here');
|
|
122
|
-
prompts.inject([debug, release]);
|
|
123
|
-
await collectKeystore();
|
|
124
|
-
// Re-reading it is the point: a stale global value is what would otherwise
|
|
125
|
-
// be uploaded for all three workflows.
|
|
126
|
-
expect(secretsManager.getSecret('KEYSTORE_BASE64', 'primary')).toBe(Buffer.from('debug-key-bytes').toString('base64'));
|
|
127
|
-
expect(secretsManager.getSecret('KEYSTORE_BASE64', 'release')).toBe(Buffer.from('release-key-bytes').toString('base64'));
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
describe('a credential whose caller does not need a path back', () => {
|
|
131
|
-
test('still short-circuits on an already-stored value, and asks nothing', async () => {
|
|
132
|
-
// `google-services.json`, `local.properties` and `keystore.properties` take
|
|
133
|
-
// their targets from the pipeline's own flavors, not from this call, so the
|
|
134
|
-
// early return is right for them and must stay. No answer is injected: a
|
|
135
|
-
// prompt here would hang or take undefined, and either fails the test.
|
|
136
|
-
put('app/src/prod/google-services.json', '{}');
|
|
137
|
-
secretsManager.storeSecret('GOOGLE_SERVICES_JSON', 'already-here');
|
|
138
|
-
const paths = await collectFileSecret({
|
|
139
|
-
displayName: 'google-services.json',
|
|
140
|
-
secretName: 'GOOGLE_SERVICES_JSON',
|
|
141
|
-
fileMatch: (name) => name === 'google-services.json',
|
|
142
|
-
readAs: 'text',
|
|
143
|
-
workflowGroups: [{ label: 'release', workflows: ['release'] }],
|
|
144
|
-
}, workdir, secretsManager);
|
|
145
|
-
expect(paths).toEqual({});
|
|
146
|
-
expect(secretsManager.getSecret('GOOGLE_SERVICES_JSON', 'release')).toBe('already-here');
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
describe('a keystore the store has never seen', () => {
|
|
150
|
-
test('behaves exactly as it did before', async () => {
|
|
151
|
-
const { debug, release } = twoKeystores();
|
|
152
|
-
prompts.inject([debug, release]);
|
|
153
|
-
expect(await collectKeystore()).toEqual({
|
|
154
|
-
primary: 'config/debug.keystore',
|
|
155
|
-
'pull-request': 'config/debug.keystore',
|
|
156
|
-
release: 'app/customer-android.jks',
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
//# sourceMappingURL=an-already-stored-value-does-not-answer-the-target-question.test.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A plugin applied inside `if (file("…").exists()) { … }` is conditional on a
|
|
3
|
-
* file the build may not have. Counting it as a hard credential requirement
|
|
4
|
-
* sends the user looking for a file the build never asks for — and, when the
|
|
5
|
-
* same rule is used to predict outcomes, reports projects as blocked that
|
|
6
|
-
* build green with no credential at all.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=android-gms-guard.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android-gms-guard.test.d.ts","sourceRoot":"","sources":["../../../src/commands/android-gms-guard.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|