@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,466 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pre-execution validation orchestrator
|
|
3
|
-
*
|
|
4
|
-
* Validates all steps in a workflow BEFORE execution begins.
|
|
5
|
-
* All validation checks are READ-ONLY and safe to run on the user's machine.
|
|
6
|
-
* This enables catching all issues at once instead of failing on the first error.
|
|
7
|
-
*/
|
|
8
|
-
import { getStepExecutor, hasStep, getStepMetadata } from './steps/registry.js';
|
|
9
|
-
import { EnvResolver } from './env-resolver.js';
|
|
10
|
-
import { shellAssignedNames } from './shell-assignments.js';
|
|
11
|
-
import { detectPlatformInfo } from './platform-detector.js';
|
|
12
|
-
import { declaresMultiplatformApp } from './meta-helpers.js';
|
|
13
|
-
// POSIX env vars the shell always provides — don't flag these as undeclared.
|
|
14
|
-
// The runner's guest shell seeds HOME, TMPDIR, PATH, etc.; requiring
|
|
15
|
-
// pipelines to redeclare them forces literal-path-only scripts.
|
|
16
|
-
const POSIX_ENV_ALLOWLIST = new Set([
|
|
17
|
-
'HOME',
|
|
18
|
-
'USER',
|
|
19
|
-
'PATH',
|
|
20
|
-
'TMPDIR',
|
|
21
|
-
'TMP',
|
|
22
|
-
'TEMP',
|
|
23
|
-
'SHELL',
|
|
24
|
-
'LANG',
|
|
25
|
-
'LC_ALL',
|
|
26
|
-
'PWD',
|
|
27
|
-
'LOGNAME',
|
|
28
|
-
'HOSTNAME',
|
|
29
|
-
// Runner-provided vars (set in the sandbox execution script)
|
|
30
|
-
'CIBUILD_USER_HOME',
|
|
31
|
-
'CIBUILD_SCRATCH',
|
|
32
|
-
'JAVA_HOME',
|
|
33
|
-
]);
|
|
34
|
-
/**
|
|
35
|
-
* StepValidator orchestrates pre-execution validation for a workflow.
|
|
36
|
-
* It iterates through all steps, collects validation requirements,
|
|
37
|
-
* runs pre-execution checks, and aggregates all issues.
|
|
38
|
-
*/
|
|
39
|
-
export class StepValidator {
|
|
40
|
-
pipeline;
|
|
41
|
-
workflow;
|
|
42
|
-
workflowName;
|
|
43
|
-
config;
|
|
44
|
-
envResolver;
|
|
45
|
-
yamlFilePath;
|
|
46
|
-
// Track outputs provided by earlier steps for dependency validation
|
|
47
|
-
availableOutputs = new Map();
|
|
48
|
-
// Platform established by the first platform-specific step ('ios' or 'android')
|
|
49
|
-
establishedPlatform = null;
|
|
50
|
-
// True when the pipeline declares an app that is inherently both platforms
|
|
51
|
-
// (KMM today), so one workflow may legitimately hold android and ios steps.
|
|
52
|
-
// Read from the declaration only — see `declaresMultiplatformApp`.
|
|
53
|
-
spansPlatforms;
|
|
54
|
-
constructor(pipeline, workflowName, config, yamlFilePath) {
|
|
55
|
-
this.pipeline = pipeline;
|
|
56
|
-
this.workflowName = workflowName;
|
|
57
|
-
this.workflow = pipeline.workflows[workflowName];
|
|
58
|
-
this.config = config;
|
|
59
|
-
this.yamlFilePath = yamlFilePath;
|
|
60
|
-
if (!this.workflow) {
|
|
61
|
-
throw new Error(`Workflow '${workflowName}' not found in pipeline`);
|
|
62
|
-
}
|
|
63
|
-
this.spansPlatforms = declaresMultiplatformApp(pipeline);
|
|
64
|
-
// Create env resolver for variable interpolation
|
|
65
|
-
const platformInfo = detectPlatformInfo(pipeline, workflowName);
|
|
66
|
-
this.envResolver = new EnvResolver(pipeline, this.workflow, workflowName, platformInfo.platform, platformInfo.stack, yamlFilePath);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Validates all steps in the workflow.
|
|
70
|
-
* Returns a complete validation result with all issues grouped by step and category.
|
|
71
|
-
*/
|
|
72
|
-
async validateWorkflow() {
|
|
73
|
-
const issues = [];
|
|
74
|
-
const issuesByStep = new Map();
|
|
75
|
-
const issuesByCategory = new Map();
|
|
76
|
-
let stepIndex = 0;
|
|
77
|
-
for (const yamlStep of this.workflow.steps) {
|
|
78
|
-
const parsedStep = this.parseStep(yamlStep, stepIndex);
|
|
79
|
-
// Skip unrecognized steps (they'll be handled by converter with warnings)
|
|
80
|
-
if (!hasStep(parsedStep.name)) {
|
|
81
|
-
stepIndex++;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
const executor = getStepExecutor(parsedStep.name);
|
|
85
|
-
// Platform compatibility check
|
|
86
|
-
const stepMetadata = getStepMetadata(parsedStep.name);
|
|
87
|
-
const stepPlatform = stepMetadata?.platform ?? 'all';
|
|
88
|
-
// A declared multiplatform app is exempt: its build spans both platforms
|
|
89
|
-
// by construction, so there is no single platform for a step to conflict
|
|
90
|
-
// with. Everything else — including an app that declares nothing, or
|
|
91
|
-
// declares one platform and then mixes — is still refused below.
|
|
92
|
-
if (stepPlatform !== 'all' && !this.spansPlatforms) {
|
|
93
|
-
if (this.establishedPlatform === null) {
|
|
94
|
-
// First platform-specific step establishes the workflow platform
|
|
95
|
-
this.establishedPlatform = stepPlatform;
|
|
96
|
-
}
|
|
97
|
-
else if (this.establishedPlatform !== stepPlatform) {
|
|
98
|
-
// This step conflicts with the established platform
|
|
99
|
-
const platformIssue = {
|
|
100
|
-
stepName: parsedStep.title || parsedStep.name,
|
|
101
|
-
stepIndex,
|
|
102
|
-
requirement: {
|
|
103
|
-
category: 'platform',
|
|
104
|
-
name: parsedStep.name,
|
|
105
|
-
description: `'${parsedStep.name}' is an ${stepPlatform} step but this workflow targets ${this.establishedPlatform}`,
|
|
106
|
-
timing: 'pre-execution',
|
|
107
|
-
severity: 'error',
|
|
108
|
-
hint: `Remove this step or move it to a dedicated ${stepPlatform} workflow`,
|
|
109
|
-
check: async () => ({
|
|
110
|
-
passed: false,
|
|
111
|
-
message: `Cross-platform step: '${parsedStep.name}' (${stepPlatform}) cannot be used in an ${this.establishedPlatform} workflow`,
|
|
112
|
-
}),
|
|
113
|
-
},
|
|
114
|
-
result: {
|
|
115
|
-
passed: false,
|
|
116
|
-
message: `Cross-platform step: '${parsedStep.name}' (${stepPlatform}) cannot be used in an ${this.establishedPlatform} workflow`,
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
issues.push(platformIssue);
|
|
120
|
-
const stepIssues = issuesByStep.get(platformIssue.stepName) || [];
|
|
121
|
-
stepIssues.push(platformIssue);
|
|
122
|
-
issuesByStep.set(platformIssue.stepName, stepIssues);
|
|
123
|
-
const catIssues = issuesByCategory.get('platform') || [];
|
|
124
|
-
catIssues.push(platformIssue);
|
|
125
|
-
issuesByCategory.set('platform', catIssues);
|
|
126
|
-
stepIndex++;
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
// Skip all validation for steps that will be skipped in local mode
|
|
131
|
-
if (this.config.local && executor.isSkippedInLocalMode?.()) {
|
|
132
|
-
if (executor.getOutputs) {
|
|
133
|
-
for (const output of executor.getOutputs()) {
|
|
134
|
-
this.availableOutputs.set(output.name, { stepName: parsedStep.name, output });
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
stepIndex++;
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
// Get validation requirements if the executor supports it
|
|
141
|
-
if (executor.getValidationRequirements) {
|
|
142
|
-
// Interpolate inputs (but don't throw on missing vars during validation)
|
|
143
|
-
let interpolatedInputs = parsedStep.inputs;
|
|
144
|
-
try {
|
|
145
|
-
interpolatedInputs = this.envResolver.interpolateObject(parsedStep.inputs, parsedStep.title || parsedStep.name);
|
|
146
|
-
}
|
|
147
|
-
catch {
|
|
148
|
-
// Interpolation failed because a variable isn't set yet.
|
|
149
|
-
// Use a lenient copy: strip unresolved $VAR / ${VAR} references to ''
|
|
150
|
-
// so getValidationRequirements can correctly detect them as missing.
|
|
151
|
-
interpolatedInputs = this.stripUnresolvedVars(parsedStep.inputs);
|
|
152
|
-
}
|
|
153
|
-
const requirements = executor.getValidationRequirements(interpolatedInputs, this.envResolver.getAll(), this.config);
|
|
154
|
-
// Validate each requirement
|
|
155
|
-
for (const req of requirements) {
|
|
156
|
-
const issue = await this.validateRequirement(req, parsedStep.title || parsedStep.name, stepIndex);
|
|
157
|
-
if (issue) {
|
|
158
|
-
issues.push(issue);
|
|
159
|
-
// Group by step
|
|
160
|
-
const stepIssues = issuesByStep.get(issue.stepName) || [];
|
|
161
|
-
stepIssues.push(issue);
|
|
162
|
-
issuesByStep.set(issue.stepName, stepIssues);
|
|
163
|
-
// Group by category
|
|
164
|
-
const catIssues = issuesByCategory.get(issue.requirement.category) || [];
|
|
165
|
-
catIssues.push(issue);
|
|
166
|
-
issuesByCategory.set(issue.requirement.category, catIssues);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
// Auto-discover any $VAR references in raw inputs that aren't covered above
|
|
170
|
-
const resolvedEnv = this.envResolver.getAll();
|
|
171
|
-
const alreadyDeclared = new Set(requirements.map((r) => r.name));
|
|
172
|
-
const referencedVars = this.extractVariableReferences(parsedStep.inputs);
|
|
173
|
-
// Variables the step's own shell sets are not values anyone owes it.
|
|
174
|
-
const selfAssigned = shellAssignedNames(parsedStep.inputs);
|
|
175
|
-
for (const varName of referencedVars) {
|
|
176
|
-
// Skip POSIX vars the shell always provides
|
|
177
|
-
if (POSIX_ENV_ALLOWLIST.has(varName))
|
|
178
|
-
continue;
|
|
179
|
-
// Skip anything this step's script assigns itself — a computed local
|
|
180
|
-
// reads like a required input, and refusing on one stops a pipeline
|
|
181
|
-
// for a value nothing was ever meant to supply.
|
|
182
|
-
if (selfAssigned.has(varName))
|
|
183
|
-
continue;
|
|
184
|
-
// Skip if already in resolved env (use hasOwnProperty so empty-string
|
|
185
|
-
// values set by the YAML/secrets are still treated as "provided")
|
|
186
|
-
if (Object.prototype.hasOwnProperty.call(resolvedEnv, varName))
|
|
187
|
-
continue;
|
|
188
|
-
// Skip if the runner (or the surrounding shell) already exported
|
|
189
|
-
// the var into our process.env. The sandbox runner delivers
|
|
190
|
-
// dispatch-supplied `execution.env` / `execution.secrets` this
|
|
191
|
-
// way — without this fallback, bash-style `$VAR` refs in
|
|
192
|
-
// repo-hosted YAML (human CLI flow) would false-trigger the
|
|
193
|
-
// auto-discovery even though they resolve at shell runtime.
|
|
194
|
-
if (Object.prototype.hasOwnProperty.call(process.env, varName))
|
|
195
|
-
continue;
|
|
196
|
-
// Skip if provided as output by an earlier step
|
|
197
|
-
if (this.availableOutputs.has(varName))
|
|
198
|
-
continue;
|
|
199
|
-
// Skip if already declared by getValidationRequirements
|
|
200
|
-
if (alreadyDeclared.has(varName))
|
|
201
|
-
continue;
|
|
202
|
-
// Skip if already added by a previous step
|
|
203
|
-
if (issues.some((i) => i.requirement.name === varName))
|
|
204
|
-
continue;
|
|
205
|
-
// Skippable steps won't block the build if they fail — downgrade to warning
|
|
206
|
-
// so missing vars don't prevent the run when the step can safely be skipped.
|
|
207
|
-
const severity = parsedStep.is_skippable ? 'warning' : 'error';
|
|
208
|
-
const req = {
|
|
209
|
-
category: 'environment',
|
|
210
|
-
name: varName,
|
|
211
|
-
description: `${varName} is not set`,
|
|
212
|
-
timing: 'pre-execution',
|
|
213
|
-
severity,
|
|
214
|
-
check: async () => ({ passed: false, message: `${varName} is not set` }),
|
|
215
|
-
};
|
|
216
|
-
const issue = await this.validateRequirement(req, parsedStep.title || parsedStep.name, stepIndex);
|
|
217
|
-
if (issue) {
|
|
218
|
-
issues.push(issue);
|
|
219
|
-
const stepIssues = issuesByStep.get(issue.stepName) || [];
|
|
220
|
-
stepIssues.push(issue);
|
|
221
|
-
issuesByStep.set(issue.stepName, stepIssues);
|
|
222
|
-
const catIssues = issuesByCategory.get(issue.requirement.category) || [];
|
|
223
|
-
catIssues.push(issue);
|
|
224
|
-
issuesByCategory.set(issue.requirement.category, catIssues);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
// Record outputs this step provides for later steps
|
|
229
|
-
if (executor.getOutputs) {
|
|
230
|
-
for (const output of executor.getOutputs()) {
|
|
231
|
-
this.availableOutputs.set(output.name, {
|
|
232
|
-
stepName: parsedStep.name,
|
|
233
|
-
output,
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
stepIndex++;
|
|
238
|
-
}
|
|
239
|
-
// Count issues by severity
|
|
240
|
-
const counts = {
|
|
241
|
-
errors: issues.filter((i) => i.requirement.severity === 'error').length,
|
|
242
|
-
warnings: issues.filter((i) => i.requirement.severity === 'warning').length,
|
|
243
|
-
info: issues.filter((i) => i.requirement.severity === 'info').length,
|
|
244
|
-
};
|
|
245
|
-
return {
|
|
246
|
-
valid: counts.errors === 0,
|
|
247
|
-
issues,
|
|
248
|
-
issuesByStep,
|
|
249
|
-
issuesByCategory,
|
|
250
|
-
counts,
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Validates a single requirement and returns an issue if it fails
|
|
255
|
-
*/
|
|
256
|
-
async validateRequirement(requirement, stepName, stepIndex) {
|
|
257
|
-
// Skip runtime-only checks (they can't be validated before execution)
|
|
258
|
-
if (requirement.timing === 'runtime') {
|
|
259
|
-
// For runtime dependencies, check if the providing step exists earlier
|
|
260
|
-
if (requirement.providedBy) {
|
|
261
|
-
const provider = this.availableOutputs.get(requirement.name);
|
|
262
|
-
if (!provider) {
|
|
263
|
-
// Nothing declares this name as an output, so say where it does come
|
|
264
|
-
// from and leave it at that. `providedBy` is prose: most of these
|
|
265
|
-
// requirements are named after a path or a command rather than a
|
|
266
|
-
// step output, so the lookup above was never going to match one, and
|
|
267
|
-
// the sentence must stay true when the source is not a step at all.
|
|
268
|
-
return {
|
|
269
|
-
stepName,
|
|
270
|
-
stepIndex,
|
|
271
|
-
requirement,
|
|
272
|
-
result: {
|
|
273
|
-
passed: false,
|
|
274
|
-
message: `'${requirement.name}' is not here yet — expected from ${requirement.providedBy} at runtime`,
|
|
275
|
-
},
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
return null; // Skip other runtime checks
|
|
280
|
-
}
|
|
281
|
-
// Run the check if available
|
|
282
|
-
if (requirement.check) {
|
|
283
|
-
try {
|
|
284
|
-
const result = await requirement.check();
|
|
285
|
-
if (!result.passed) {
|
|
286
|
-
return {
|
|
287
|
-
stepName,
|
|
288
|
-
stepIndex,
|
|
289
|
-
requirement,
|
|
290
|
-
result,
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
catch (error) {
|
|
295
|
-
// A check that threw did not run. That is a different event from a
|
|
296
|
-
// check that ran and found nothing, and it must not inherit the
|
|
297
|
-
// severity chosen for the latter: `info` is a reasonable verdict for
|
|
298
|
-
// "looked in several places, found no JDK" and a useless one for
|
|
299
|
-
// "never looked". Reported at `warning` so it is visible on the first
|
|
300
|
-
// build — a check whose own failure reads as information can stay
|
|
301
|
-
// broken for as long as nobody reads carefully.
|
|
302
|
-
//
|
|
303
|
-
// `error` is never downgraded. A hard requirement nothing could verify
|
|
304
|
-
// is not softer than one that was verified and failed.
|
|
305
|
-
return {
|
|
306
|
-
stepName,
|
|
307
|
-
stepIndex,
|
|
308
|
-
requirement: requirement.severity === 'error'
|
|
309
|
-
? requirement
|
|
310
|
-
: { ...requirement, severity: 'warning' },
|
|
311
|
-
result: {
|
|
312
|
-
passed: false,
|
|
313
|
-
message: `Check failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
314
|
-
},
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
return null;
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Extracts all $VAR and ${VAR} variable names referenced in an object recursively.
|
|
322
|
-
*
|
|
323
|
-
* `${{ secrets.X }}` / `${{ vars.X }}` references are deliberately ignored:
|
|
324
|
-
* those are resolved by the runner-side interpolator before cibuild sees
|
|
325
|
-
* the YAML (or by the dashboard's secrets-resolver on dispatch). Without
|
|
326
|
-
* this filter the inner regex would capture `{ secrets.X ` as if it were
|
|
327
|
-
* a `${VAR}` reference, producing garbled variable names in the
|
|
328
|
-
* missing-env error output.
|
|
329
|
-
*/
|
|
330
|
-
extractVariableReferences(obj) {
|
|
331
|
-
const vars = new Set();
|
|
332
|
-
if (typeof obj === 'string') {
|
|
333
|
-
// Strip `${{ ... }}` refs first so they can't be mis-matched as `${VAR}`.
|
|
334
|
-
const sanitized = obj.replace(/\$\{\{[^}]*\}\}/g, '');
|
|
335
|
-
const pattern = /\$\{([^}]+)\}|\$([A-Z_][A-Z_0-9]*)/g;
|
|
336
|
-
let match;
|
|
337
|
-
while ((match = pattern.exec(sanitized)) !== null) {
|
|
338
|
-
vars.add(match[1] || match[2]);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
else if (Array.isArray(obj)) {
|
|
342
|
-
for (const item of obj) {
|
|
343
|
-
for (const v of this.extractVariableReferences(item))
|
|
344
|
-
vars.add(v);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
else if (obj && typeof obj === 'object') {
|
|
348
|
-
for (const value of Object.values(obj)) {
|
|
349
|
-
for (const v of this.extractVariableReferences(value))
|
|
350
|
-
vars.add(v);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
return vars;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Replaces all unresolved $VAR and ${VAR} references with empty string.
|
|
357
|
-
* Used as a lenient fallback when full interpolation fails, so that
|
|
358
|
-
* getValidationRequirements can detect truly-missing variables correctly.
|
|
359
|
-
*
|
|
360
|
-
* `${{ ... }}` refs are left intact — they belong to the runner-side
|
|
361
|
-
* interpolator / dashboard secrets-resolver layer, not to shell-level
|
|
362
|
-
* variable substitution. Stripping them here would destroy the YAML for
|
|
363
|
-
* any downstream consumer that still expects to see them.
|
|
364
|
-
*/
|
|
365
|
-
stripUnresolvedVars(obj) {
|
|
366
|
-
if (typeof obj === 'string') {
|
|
367
|
-
// `(?!\{)` prevents `\$\{[^}]+\}` from matching a leading `${` of
|
|
368
|
-
// `${{ ... }}` and stripping the inner content. Plain `$VAR` and
|
|
369
|
-
// `${VAR}` are still stripped as before.
|
|
370
|
-
return obj.replace(/\$\{(?!\{)[^}]+\}|\$[A-Z_][A-Z_0-9]*/g, '');
|
|
371
|
-
}
|
|
372
|
-
if (Array.isArray(obj)) {
|
|
373
|
-
return obj.map((item) => this.stripUnresolvedVars(item));
|
|
374
|
-
}
|
|
375
|
-
if (obj && typeof obj === 'object') {
|
|
376
|
-
const result = {};
|
|
377
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
378
|
-
result[key] = this.stripUnresolvedVars(value);
|
|
379
|
-
}
|
|
380
|
-
return result;
|
|
381
|
-
}
|
|
382
|
-
return obj;
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Parses a YAML step into a ParsedStep (simplified version of converter logic)
|
|
386
|
-
*/
|
|
387
|
-
parseStep(yamlStep, _index) {
|
|
388
|
-
const stepKeys = Object.keys(yamlStep);
|
|
389
|
-
const stepNameWithVersion = stepKeys[0];
|
|
390
|
-
const stepConfig = yamlStep[stepNameWithVersion];
|
|
391
|
-
const atIndex = stepNameWithVersion.indexOf('@');
|
|
392
|
-
const name = atIndex === -1 ? stepNameWithVersion : stepNameWithVersion.substring(0, atIndex);
|
|
393
|
-
const version = atIndex === -1 ? undefined : stepNameWithVersion.substring(atIndex + 1);
|
|
394
|
-
let inputs = stepConfig?.inputs || {};
|
|
395
|
-
if (Array.isArray(inputs)) {
|
|
396
|
-
const inputsObj = {};
|
|
397
|
-
for (const input of inputs) {
|
|
398
|
-
if (typeof input === 'object' && input !== null) {
|
|
399
|
-
Object.assign(inputsObj, input);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
inputs = inputsObj;
|
|
403
|
-
}
|
|
404
|
-
return {
|
|
405
|
-
name,
|
|
406
|
-
version,
|
|
407
|
-
title: stepConfig?.title,
|
|
408
|
-
inputs,
|
|
409
|
-
run_if: stepConfig?.run_if,
|
|
410
|
-
is_always_run: stepConfig?.is_always_run,
|
|
411
|
-
is_skippable: stepConfig?.is_skippable,
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Format validation result for console output
|
|
417
|
-
*/
|
|
418
|
-
export function formatValidationResult(result) {
|
|
419
|
-
if (result.valid && result.issues.length === 0) {
|
|
420
|
-
return '\n✅ All pre-execution validations passed\n';
|
|
421
|
-
}
|
|
422
|
-
const lines = [];
|
|
423
|
-
lines.push('\n' + '═'.repeat(70));
|
|
424
|
-
lines.push('PRE-EXECUTION VALIDATION RESULTS');
|
|
425
|
-
lines.push('═'.repeat(70));
|
|
426
|
-
// Summary
|
|
427
|
-
lines.push(`\n📊 Summary: ${result.counts.errors} error${result.counts.errors !== 1 ? 's' : ''}, ` +
|
|
428
|
-
`${result.counts.warnings} warning${result.counts.warnings !== 1 ? 's' : ''}, ` +
|
|
429
|
-
`${result.counts.info} info\n`);
|
|
430
|
-
// Group by step
|
|
431
|
-
for (const [stepName, stepIssues] of result.issuesByStep) {
|
|
432
|
-
const errors = stepIssues.filter((i) => i.requirement.severity === 'error');
|
|
433
|
-
const warnings = stepIssues.filter((i) => i.requirement.severity === 'warning');
|
|
434
|
-
const infos = stepIssues.filter((i) => i.requirement.severity === 'info');
|
|
435
|
-
lines.push(`\n📦 Step: ${stepName}`);
|
|
436
|
-
lines.push('─'.repeat(50));
|
|
437
|
-
for (const issue of errors) {
|
|
438
|
-
lines.push(` ❌ ERROR: ${issue.requirement.description}`);
|
|
439
|
-
lines.push(` ${issue.result.message}`);
|
|
440
|
-
if (issue.requirement.hint) {
|
|
441
|
-
lines.push(` 💡 ${issue.requirement.hint}`);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
for (const issue of warnings) {
|
|
445
|
-
lines.push(` ⚠️ WARNING: ${issue.requirement.description}`);
|
|
446
|
-
lines.push(` ${issue.result.message}`);
|
|
447
|
-
if (issue.requirement.hint) {
|
|
448
|
-
lines.push(` 💡 ${issue.requirement.hint}`);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
for (const issue of infos) {
|
|
452
|
-
lines.push(` ℹ️ INFO: ${issue.requirement.description}`);
|
|
453
|
-
lines.push(` ${issue.result.message}`);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
lines.push('\n' + '═'.repeat(70));
|
|
457
|
-
if (result.counts.errors > 0) {
|
|
458
|
-
lines.push('❌ Validation failed. Please fix the errors above before running the pipeline.');
|
|
459
|
-
}
|
|
460
|
-
else {
|
|
461
|
-
lines.push('⚠️ Validation passed with warnings. Pipeline can proceed.');
|
|
462
|
-
}
|
|
463
|
-
lines.push('═'.repeat(70) + '\n');
|
|
464
|
-
return lines.join('\n');
|
|
465
|
-
}
|
|
466
|
-
//# sourceMappingURL=step-validator.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for the pre-execution platform gate.
|
|
3
|
-
*
|
|
4
|
-
* A workflow's platform is established by its first platform-specific step,
|
|
5
|
-
* and any later step of a different platform is refused. That rule is right
|
|
6
|
-
* for an app that targets one platform and wrong for one that targets both:
|
|
7
|
-
* a Kotlin Multiplatform build is *inherently* android-then-ios — gradle
|
|
8
|
-
* assembles the XCFramework that `xcodebuild` then consumes — and there is no
|
|
9
|
-
* way to split it, because a workflow is one dispatch on one machine and two
|
|
10
|
-
* workflows share no filesystem.
|
|
11
|
-
*
|
|
12
|
-
* On 2026-09-01 that cost a real build: a generated KMM pipeline was refused
|
|
13
|
-
* before a single step ran. These tests pin the narrow relaxation that fixes
|
|
14
|
-
* it — permitted only where the pipeline *declares* a multiplatform app,
|
|
15
|
-
* never inferred from the steps themselves.
|
|
16
|
-
*/
|
|
17
|
-
import '../yaml/steps/index.js';
|
|
18
|
-
//# sourceMappingURL=step-validator.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step-validator.test.d.ts","sourceRoot":"","sources":["../../../src/yaml/step-validator.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,wBAAwB,CAAC"}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for the pre-execution platform gate.
|
|
3
|
-
*
|
|
4
|
-
* A workflow's platform is established by its first platform-specific step,
|
|
5
|
-
* and any later step of a different platform is refused. That rule is right
|
|
6
|
-
* for an app that targets one platform and wrong for one that targets both:
|
|
7
|
-
* a Kotlin Multiplatform build is *inherently* android-then-ios — gradle
|
|
8
|
-
* assembles the XCFramework that `xcodebuild` then consumes — and there is no
|
|
9
|
-
* way to split it, because a workflow is one dispatch on one machine and two
|
|
10
|
-
* workflows share no filesystem.
|
|
11
|
-
*
|
|
12
|
-
* On 2026-09-01 that cost a real build: a generated KMM pipeline was refused
|
|
13
|
-
* before a single step ran. These tests pin the narrow relaxation that fixes
|
|
14
|
-
* it — permitted only where the pipeline *declares* a multiplatform app,
|
|
15
|
-
* never inferred from the steps themselves.
|
|
16
|
-
*/
|
|
17
|
-
import { describe, test, expect } from '@jest/globals';
|
|
18
|
-
import '../yaml/steps/index.js';
|
|
19
|
-
import { StepValidator } from './step-validator.js';
|
|
20
|
-
import { PlatformDetectionError } from './platform-detector.js';
|
|
21
|
-
import { loadConfig } from '../config.js';
|
|
22
|
-
const config = loadConfig();
|
|
23
|
-
/** What every curated template declares, and what the detector reads first. */
|
|
24
|
-
const STACK = 'macos-xcode-26.4';
|
|
25
|
-
/**
|
|
26
|
-
* A KMM build in one workflow: gradle establishes android, xcodebuild follows.
|
|
27
|
-
*
|
|
28
|
-
* The stack is not decoration. `PlatformDetector` resolves the host OS from it
|
|
29
|
-
* first and only falls back to reading the steps — where a mixed workflow
|
|
30
|
-
* throws before this validator ever runs. Every curated template declares a
|
|
31
|
-
* stack, so this is the gate a real pipeline actually meets.
|
|
32
|
-
*
|
|
33
|
-
* `getInvarnMeta` takes `meta.invarn` as a whole when it is present, so a test
|
|
34
|
-
* about the legacy block has to omit `meta.invarn` entirely.
|
|
35
|
-
*/
|
|
36
|
-
function kmmShapedPipeline({ invarn, legacy } = {}, { stack = true } = {}) {
|
|
37
|
-
const base = stack ? { stack: STACK } : {};
|
|
38
|
-
const meta = legacy && !invarn
|
|
39
|
-
? { 'cibuild.io': { ...base, ...legacy } }
|
|
40
|
-
: {
|
|
41
|
-
invarn: { ...base, ...invarn },
|
|
42
|
-
...(legacy ? { 'cibuild.io': { ...base, ...legacy } } : {}),
|
|
43
|
-
};
|
|
44
|
-
return {
|
|
45
|
-
format_version: '1',
|
|
46
|
-
meta,
|
|
47
|
-
workflows: {
|
|
48
|
-
primary: {
|
|
49
|
-
steps: [
|
|
50
|
-
{ 'gradle-build@1.0.0': { inputs: { project_location: '.', gradle_task: 'assembleDebug' } } },
|
|
51
|
-
{
|
|
52
|
-
'xcodebuild@1.0.0': {
|
|
53
|
-
inputs: {
|
|
54
|
-
project_path: 'iosApp/iosApp.xcodeproj',
|
|
55
|
-
scheme: 'iosApp',
|
|
56
|
-
destination: 'generic/platform=iOS Simulator',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
async function platformIssues(pipeline) {
|
|
66
|
-
const validator = new StepValidator(pipeline, 'primary', config);
|
|
67
|
-
const result = await validator.validateWorkflow();
|
|
68
|
-
return (result.issuesByCategory.get('platform') ?? []).map((i) => i.requirement.name);
|
|
69
|
-
}
|
|
70
|
-
describe('StepValidator platform gate', () => {
|
|
71
|
-
test('refuses a mixed workflow that declares no app platform', async () => {
|
|
72
|
-
expect(await platformIssues(kmmShapedPipeline())).toEqual(['xcodebuild']);
|
|
73
|
-
});
|
|
74
|
-
test('permits a mixed workflow that declares a KMM app', async () => {
|
|
75
|
-
expect(await platformIssues(kmmShapedPipeline({ invarn: { platform: 'kmm' } }))).toEqual([]);
|
|
76
|
-
});
|
|
77
|
-
test('permits it through the legacy meta.cibuild.io block too', async () => {
|
|
78
|
-
expect(await platformIssues(kmmShapedPipeline({ legacy: { platform: 'kmm' } }))).toEqual([]);
|
|
79
|
-
});
|
|
80
|
-
// meta.invarn wins as a whole when both blocks are present, so a stale
|
|
81
|
-
// `kmm` under the legacy key must not grant permission the current block
|
|
82
|
-
// withholds.
|
|
83
|
-
test('lets meta.invarn withhold what a stale meta.cibuild.io granted', async () => {
|
|
84
|
-
expect(await platformIssues(kmmShapedPipeline({ invarn: { platform: 'android' }, legacy: { platform: 'kmm' } }))).toEqual(['xcodebuild']);
|
|
85
|
-
});
|
|
86
|
-
// The regression this relaxation could introduce. A declared platform, never
|
|
87
|
-
// inference: an ios step in a workflow that says it is android stays refused.
|
|
88
|
-
test('still refuses an ios step in a declared-android workflow', async () => {
|
|
89
|
-
expect(await platformIssues(kmmShapedPipeline({ invarn: { platform: 'android' } }))).toEqual([
|
|
90
|
-
'xcodebuild',
|
|
91
|
-
]);
|
|
92
|
-
});
|
|
93
|
-
test('still refuses an android step in a declared-ios workflow', async () => {
|
|
94
|
-
const iosFirst = {
|
|
95
|
-
format_version: '1',
|
|
96
|
-
meta: { invarn: { stack: STACK, platform: 'ios' } },
|
|
97
|
-
workflows: {
|
|
98
|
-
primary: {
|
|
99
|
-
steps: [
|
|
100
|
-
{ 'xcodebuild@1.0.0': { inputs: { project_path: 'App.xcodeproj', scheme: 'App' } } },
|
|
101
|
-
{ 'gradle-build@1.0.0': { inputs: { project_location: '.', gradle_task: 'assembleDebug' } } },
|
|
102
|
-
],
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
expect(await platformIssues(iosFirst)).toEqual(['gradle-build']);
|
|
107
|
-
});
|
|
108
|
-
// 'other' means the app type was not classified. An unclassified app has not
|
|
109
|
-
// declared that it spans platforms; silence is not permission.
|
|
110
|
-
test('still refuses when the declared platform is other', async () => {
|
|
111
|
-
expect(await platformIssues(kmmShapedPipeline({ invarn: { platform: 'other' } }))).toEqual([
|
|
112
|
-
'xcodebuild',
|
|
113
|
-
]);
|
|
114
|
-
});
|
|
115
|
-
// The declaration is about mixing, not about skipping the gate: a
|
|
116
|
-
// single-platform workflow was never at risk either way.
|
|
117
|
-
test('leaves a single-platform workflow alone whatever it declares', async () => {
|
|
118
|
-
const androidOnly = {
|
|
119
|
-
format_version: '1',
|
|
120
|
-
meta: { invarn: { stack: STACK, platform: 'kmm' } },
|
|
121
|
-
workflows: {
|
|
122
|
-
primary: {
|
|
123
|
-
steps: [
|
|
124
|
-
{ 'gradle-build@1.0.0': { inputs: { project_location: '.', gradle_task: 'assembleDebug' } } },
|
|
125
|
-
],
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
expect(await platformIssues(androidOnly)).toEqual([]);
|
|
130
|
-
});
|
|
131
|
-
// Declaring the app's platform does not tell the detector which host OS to
|
|
132
|
-
// ask for, and a mixed workflow cannot be read off its steps. That refusal
|
|
133
|
-
// is `PlatformDetector`'s and comes first — it is not relaxed here, and its
|
|
134
|
-
// own message already says what to add.
|
|
135
|
-
test('does not substitute for the stack a mixed workflow still needs', async () => {
|
|
136
|
-
const noStack = kmmShapedPipeline({ invarn: { platform: 'kmm' } }, { stack: false });
|
|
137
|
-
expect(() => new StepValidator(noStack, 'primary', config)).toThrow(PlatformDetectionError);
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
//# sourceMappingURL=step-validator.test.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Android signing step: sign-apk
|
|
3
|
-
*/
|
|
4
|
-
import { BaseStepExecutor } from './base.js';
|
|
5
|
-
import type { StepDef, CIConfig } from '../../types.js';
|
|
6
|
-
import type { ValidationRequirement, StepOutput } from '../validation-types.js';
|
|
7
|
-
export interface SignApkInputs {
|
|
8
|
-
/** Path(s) to APK or AAB file(s), pipe-separated */
|
|
9
|
-
android_app?: string;
|
|
10
|
-
/** Keystore file URL or local path (file://...) */
|
|
11
|
-
keystore_url?: string;
|
|
12
|
-
/** Keystore password */
|
|
13
|
-
keystore_password?: string;
|
|
14
|
-
/** Key alias inside the keystore */
|
|
15
|
-
keystore_alias?: string;
|
|
16
|
-
/** Private key password (defaults to keystore_password) */
|
|
17
|
-
private_key_password?: string;
|
|
18
|
-
/** Page alignment for .so files: automatic | true | false */
|
|
19
|
-
page_align?: string;
|
|
20
|
-
/** Signing tool: automatic | apksigner | jarsigner */
|
|
21
|
-
signer_tool?: string;
|
|
22
|
-
/** Output artifact name (without extension) */
|
|
23
|
-
output_name?: string;
|
|
24
|
-
/** Enable verbose logging */
|
|
25
|
-
verbose_log?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Signs APK/AAB files using apksigner or jarsigner with zipalign.
|
|
29
|
-
*/
|
|
30
|
-
export declare class SignApkStepExecutor extends BaseStepExecutor {
|
|
31
|
-
getValidationRequirements(inputs: SignApkInputs, env: Record<string, string>, _config: CIConfig): ValidationRequirement[];
|
|
32
|
-
getOutputs(): StepOutput[];
|
|
33
|
-
execute(inputs: SignApkInputs, _env: Record<string, string>, _config: CIConfig): Promise<StepDef>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=android-sign.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android-sign.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/android-sign.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB;IACvD,yBAAyB,CACvB,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAM1B,UAAU,IAAI,UAAU,EAAE;IAOpB,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CA0IxG"}
|