@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,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Local ui-fidelity render preview.
|
|
3
|
-
*
|
|
4
|
-
* Runs the EXACT same render path the runner uses -- the generated
|
|
5
|
-
* `ui-fidelity-render` node script in `package_source: "inputs"` mode (harness
|
|
6
|
-
* synthesis, asset-catalog compile, content trim, reference alignment, dimension
|
|
7
|
-
* reporting) -- but locally, against a SwiftPM package the caller already has on
|
|
8
|
-
* disk. This lets an agent eyeball the wrapper in seconds before dispatching a
|
|
9
|
-
* remote run, so the remote pass becomes a one-shot authoritative render rather
|
|
10
|
-
* than the inner loop of an iterate cycle.
|
|
11
|
-
*
|
|
12
|
-
* It is a faithful mirror, not a re-implementation: the package directory is
|
|
13
|
-
* archived to a temp `package.tar.gz` and fed through the same
|
|
14
|
-
* `generateRenderScript` output, so the target is auto-discovered, the archive
|
|
15
|
-
* is validated, and the produced rendered/aligned images and dimensions match
|
|
16
|
-
* what a remote run would produce on the same toolchain.
|
|
17
|
-
*/
|
|
18
|
-
/** One wrapper view to render, paired with the reference image to align to. */
|
|
19
|
-
export interface UiFidelityPreviewScreen {
|
|
20
|
-
/** Wrapper view type name (e.g. the public, parameterless `XProof`). */
|
|
21
|
-
screen: string;
|
|
22
|
-
/** Path to the reference image; copied into the inputs by basename. */
|
|
23
|
-
reference: string;
|
|
24
|
-
}
|
|
25
|
-
export interface UiFidelityPreviewOptions {
|
|
26
|
-
/**
|
|
27
|
-
* Local SwiftPM package directory to render. Archived to a temp
|
|
28
|
-
* package.tar.gz and rendered in inputs mode. Mutually exclusive with
|
|
29
|
-
* packageArchive.
|
|
30
|
-
*/
|
|
31
|
-
packagePath?: string;
|
|
32
|
-
/**
|
|
33
|
-
* A prebuilt package.tar.gz to render as-is (preview the exact artifact a
|
|
34
|
-
* remote run would receive). Mutually exclusive with packagePath.
|
|
35
|
-
*/
|
|
36
|
-
packageArchive?: string;
|
|
37
|
-
/** Screens to render, each mapped to a reference image path. */
|
|
38
|
-
screens: UiFidelityPreviewScreen[];
|
|
39
|
-
/**
|
|
40
|
-
* SPM library target to import. Auto-discovered from the shipped manifest
|
|
41
|
-
* when omitted (the package must declare exactly one library product).
|
|
42
|
-
*/
|
|
43
|
-
target?: string;
|
|
44
|
-
/** Render size in device points, "<width>x<height>" (default 393x852). */
|
|
45
|
-
renderSize?: string;
|
|
46
|
-
/** Display scale (default 2). */
|
|
47
|
-
scale?: number | string;
|
|
48
|
-
/** Directory to receive the artifacts; a temp dir is used when omitted. */
|
|
49
|
-
outDir?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Extra entries prepended to PATH for the render child process, so callers
|
|
52
|
-
* (and tests) can supply a specific swift/xcrun/tar toolchain. Optional.
|
|
53
|
-
*/
|
|
54
|
-
toolchainPath?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface UiFidelityPreviewDimensions {
|
|
57
|
-
rendered_px: [number, number];
|
|
58
|
-
logical_pt: [number, number];
|
|
59
|
-
reference_px: [number, number] | null;
|
|
60
|
-
/**
|
|
61
|
-
* The PRE-TRIM raster in px -- what the renderer PAINTED before cropping to
|
|
62
|
-
* content. The gate's frame-fill check reads it to tell a wrapper that never
|
|
63
|
-
* reached its design frame (a real defect) from one that filled the frame in a
|
|
64
|
-
* UNIFORM colour, whose own padding the trim then cropped back off (not a
|
|
65
|
-
* defect). Absent on renders produced before this shipped: absence makes no
|
|
66
|
-
* statement and the check falls back to the post-trim extent.
|
|
67
|
-
*/
|
|
68
|
-
source_px?: [number, number];
|
|
69
|
-
}
|
|
70
|
-
export interface UiFidelityPreviewScreenResult {
|
|
71
|
-
screen: string;
|
|
72
|
-
/** "rendered" when the screen rendered; otherwise "render_failed". */
|
|
73
|
-
status: string;
|
|
74
|
-
error: {
|
|
75
|
-
code: string;
|
|
76
|
-
message: string;
|
|
77
|
-
} | null;
|
|
78
|
-
/** Absolute path to the (per-screen) reference copy, or null. */
|
|
79
|
-
referenceImagePath: string | null;
|
|
80
|
-
/** Absolute path to the trimmed rendered image, or null. */
|
|
81
|
-
renderedImagePath: string | null;
|
|
82
|
-
/** Absolute path to the reference-aligned image, or null. */
|
|
83
|
-
alignedImagePath: string | null;
|
|
84
|
-
dimensions: UiFidelityPreviewDimensions | null;
|
|
85
|
-
/**
|
|
86
|
-
* Advisory warning (never a failure) when the rendered aspect ratio diverges
|
|
87
|
-
* sharply from the reference's — the early signal that several states were
|
|
88
|
-
* stacked into one composable. Null when in tolerance or not comparable.
|
|
89
|
-
*/
|
|
90
|
-
aspectWarning: string | null;
|
|
91
|
-
}
|
|
92
|
-
export interface UiFidelityPreviewResult {
|
|
93
|
-
/** Always "inputs": the preview mirrors a shipped-package remote run. */
|
|
94
|
-
packageSource: 'inputs';
|
|
95
|
-
/** Per-build package error (archive/target validation), or null. */
|
|
96
|
-
buildError: {
|
|
97
|
-
code: string;
|
|
98
|
-
message: string;
|
|
99
|
-
} | null;
|
|
100
|
-
/** One entry per requested screen, in request order. */
|
|
101
|
-
screens: UiFidelityPreviewScreenResult[];
|
|
102
|
-
/** Absolute path to the artifacts directory holding the images. */
|
|
103
|
-
artifactsDir: string;
|
|
104
|
-
/** True only when every screen rendered and there was no build error. */
|
|
105
|
-
ok: boolean;
|
|
106
|
-
}
|
|
107
|
-
/** Shape of the protocol-result.json the render script writes. */
|
|
108
|
-
/** One screen as the render script writes it into protocol-result.json. */
|
|
109
|
-
export interface RawPreviewScreen {
|
|
110
|
-
screen: string;
|
|
111
|
-
status: string;
|
|
112
|
-
error: {
|
|
113
|
-
code: string;
|
|
114
|
-
message: string;
|
|
115
|
-
} | null;
|
|
116
|
-
reference_image_path: string | null;
|
|
117
|
-
rendered_image_path: string | null;
|
|
118
|
-
aligned_image_path?: string | null;
|
|
119
|
-
dimensions?: UiFidelityPreviewDimensions | null;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Map one raw render-script screen to a preview result, resolving image paths
|
|
123
|
-
* and attaching the aspect-ratio warning. Shared by the iOS and Android preview
|
|
124
|
-
* engines so the two paths produce identical result shapes and warnings.
|
|
125
|
-
*/
|
|
126
|
-
export declare function buildPreviewScreenResult(raw: RawPreviewScreen, artifactsDir: string): UiFidelityPreviewScreenResult;
|
|
127
|
-
/**
|
|
128
|
-
* Render the requested screens locally and return the produced image paths and
|
|
129
|
-
* dimensions. Throws only on caller errors (bad options) or when the render
|
|
130
|
-
* script could not run at all; per-screen and per-build render failures are
|
|
131
|
-
* reported in the returned result (mirroring the remote result document).
|
|
132
|
-
*/
|
|
133
|
-
export declare function renderUiFidelityPreview(options: UiFidelityPreviewOptions): UiFidelityPreviewResult;
|
|
134
|
-
//# sourceMappingURL=ui-fidelity-preview.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-fidelity-preview.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/ui-fidelity-preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA6BH,+EAA+E;AAC/E,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAChD,iEAAiE;IACjE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,4DAA4D;IAC5D,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,6DAA6D;IAC7D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC/C;;;;OAIG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,aAAa,EAAE,QAAQ,CAAC;IACxB,oEAAoE;IACpE,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACrD,wDAAwD;IACxD,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACzC,mEAAmE;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,EAAE,EAAE,OAAO,CAAC;CACb;AAED,kEAAkE;AAClE,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAChD,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;CACjD;AAuBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,gBAAgB,EACrB,YAAY,EAAE,MAAM,GACnB,6BAA6B,CAgB/B;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,uBAAuB,CAqIzB"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Local ui-fidelity render preview.
|
|
3
|
-
*
|
|
4
|
-
* Runs the EXACT same render path the runner uses -- the generated
|
|
5
|
-
* `ui-fidelity-render` node script in `package_source: "inputs"` mode (harness
|
|
6
|
-
* synthesis, asset-catalog compile, content trim, reference alignment, dimension
|
|
7
|
-
* reporting) -- but locally, against a SwiftPM package the caller already has on
|
|
8
|
-
* disk. This lets an agent eyeball the wrapper in seconds before dispatching a
|
|
9
|
-
* remote run, so the remote pass becomes a one-shot authoritative render rather
|
|
10
|
-
* than the inner loop of an iterate cycle.
|
|
11
|
-
*
|
|
12
|
-
* It is a faithful mirror, not a re-implementation: the package directory is
|
|
13
|
-
* archived to a temp `package.tar.gz` and fed through the same
|
|
14
|
-
* `generateRenderScript` output, so the target is auto-discovered, the archive
|
|
15
|
-
* is validated, and the produced rendered/aligned images and dimensions match
|
|
16
|
-
* what a remote run would produce on the same toolchain.
|
|
17
|
-
*/
|
|
18
|
-
import { spawnSync } from 'node:child_process';
|
|
19
|
-
import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, statSync, writeFileSync, } from 'node:fs';
|
|
20
|
-
import { tmpdir } from 'node:os';
|
|
21
|
-
import { basename, join, resolve } from 'node:path';
|
|
22
|
-
import { DEFAULT_RENDER_SIZE, DEFAULT_SCALE, generateRenderScript, parseRenderSize, parseScale, } from './ui-fidelity-render.js';
|
|
23
|
-
import { evaluateAspectRatio, formatAspectRatioWarning, } from './fidelity-aspect-guard.js';
|
|
24
|
-
import { resolveCliJsPath } from './render-post-processor.js';
|
|
25
|
-
function runTar(args, pathPrepend) {
|
|
26
|
-
const env = pathPrepend
|
|
27
|
-
? { ...process.env, PATH: pathPrepend + ':' + (process.env.PATH ?? '') }
|
|
28
|
-
: process.env;
|
|
29
|
-
const result = spawnSync('tar', args, { encoding: 'utf-8', env, maxBuffer: 64 * 1024 * 1024 });
|
|
30
|
-
if (result.status !== 0) {
|
|
31
|
-
const detail = (result.stderr || result.error?.message || '').toString().trim();
|
|
32
|
-
throw new Error(`failed to archive the package (tar exited ${result.status}): ${detail}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/** Resolve an artifact-relative path to absolute, or null. */
|
|
36
|
-
function absOrNull(artifactsDir, relative) {
|
|
37
|
-
return typeof relative === 'string' && relative !== '' ? resolve(artifactsDir, relative) : null;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Map one raw render-script screen to a preview result, resolving image paths
|
|
41
|
-
* and attaching the aspect-ratio warning. Shared by the iOS and Android preview
|
|
42
|
-
* engines so the two paths produce identical result shapes and warnings.
|
|
43
|
-
*/
|
|
44
|
-
export function buildPreviewScreenResult(raw, artifactsDir) {
|
|
45
|
-
const dimensions = raw.dimensions ?? null;
|
|
46
|
-
const aspect = evaluateAspectRatio(dimensions?.rendered_px ?? null, dimensions?.reference_px ?? null);
|
|
47
|
-
return {
|
|
48
|
-
screen: raw.screen,
|
|
49
|
-
status: raw.status,
|
|
50
|
-
error: raw.error ?? null,
|
|
51
|
-
referenceImagePath: absOrNull(artifactsDir, raw.reference_image_path),
|
|
52
|
-
renderedImagePath: absOrNull(artifactsDir, raw.rendered_image_path),
|
|
53
|
-
alignedImagePath: absOrNull(artifactsDir, raw.aligned_image_path),
|
|
54
|
-
dimensions,
|
|
55
|
-
aspectWarning: formatAspectRatioWarning(raw.screen, aspect),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Render the requested screens locally and return the produced image paths and
|
|
60
|
-
* dimensions. Throws only on caller errors (bad options) or when the render
|
|
61
|
-
* script could not run at all; per-screen and per-build render failures are
|
|
62
|
-
* reported in the returned result (mirroring the remote result document).
|
|
63
|
-
*/
|
|
64
|
-
export function renderUiFidelityPreview(options) {
|
|
65
|
-
if (!options || typeof options !== 'object') {
|
|
66
|
-
throw new Error('renderUiFidelityPreview: options are required');
|
|
67
|
-
}
|
|
68
|
-
const hasDir = typeof options.packagePath === 'string' && options.packagePath !== '';
|
|
69
|
-
const hasArchive = typeof options.packageArchive === 'string' && options.packageArchive !== '';
|
|
70
|
-
if (hasDir === hasArchive) {
|
|
71
|
-
throw new Error('renderUiFidelityPreview: provide exactly one of packagePath or packageArchive');
|
|
72
|
-
}
|
|
73
|
-
if (!Array.isArray(options.screens) || options.screens.length === 0) {
|
|
74
|
-
throw new Error('renderUiFidelityPreview: at least one screen is required');
|
|
75
|
-
}
|
|
76
|
-
const { width, height } = parseRenderSize(options.renderSize ?? DEFAULT_RENDER_SIZE);
|
|
77
|
-
const scale = parseScale(options.scale ?? DEFAULT_SCALE);
|
|
78
|
-
const workDir = mkdtempSync(join(tmpdir(), 'ui-fidelity-preview-'));
|
|
79
|
-
const inputsDir = join(workDir, '.ci', 'inputs');
|
|
80
|
-
mkdirSync(inputsDir, { recursive: true });
|
|
81
|
-
// Stage references by basename and build the screens -> basename map, exactly
|
|
82
|
-
// as a remote caller would pass params.screens.
|
|
83
|
-
const screensParam = {};
|
|
84
|
-
for (const entry of options.screens) {
|
|
85
|
-
if (!entry || typeof entry.screen !== 'string' || entry.screen === '') {
|
|
86
|
-
throw new Error('renderUiFidelityPreview: each screen needs a non-empty screen name');
|
|
87
|
-
}
|
|
88
|
-
if (typeof entry.reference !== 'string' || entry.reference === '') {
|
|
89
|
-
throw new Error(`renderUiFidelityPreview: screen ${entry.screen} needs a reference path`);
|
|
90
|
-
}
|
|
91
|
-
if (!existsSync(entry.reference) || !statSync(entry.reference).isFile()) {
|
|
92
|
-
throw new Error(`renderUiFidelityPreview: reference for ${entry.screen} not found: ${entry.reference}`);
|
|
93
|
-
}
|
|
94
|
-
const base = basename(entry.reference);
|
|
95
|
-
copyFileSync(entry.reference, join(inputsDir, base));
|
|
96
|
-
screensParam[entry.screen] = base;
|
|
97
|
-
}
|
|
98
|
-
const archivePath = join(inputsDir, 'package.tar.gz');
|
|
99
|
-
if (hasArchive) {
|
|
100
|
-
const src = options.packageArchive;
|
|
101
|
-
if (!existsSync(src) || !statSync(src).isFile()) {
|
|
102
|
-
throw new Error(`renderUiFidelityPreview: packageArchive not found: ${src}`);
|
|
103
|
-
}
|
|
104
|
-
copyFileSync(src, archivePath);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
const dir = options.packagePath;
|
|
108
|
-
if (!existsSync(dir) || !statSync(dir).isDirectory()) {
|
|
109
|
-
throw new Error(`renderUiFidelityPreview: packagePath is not a directory: ${dir}`);
|
|
110
|
-
}
|
|
111
|
-
// Archive with Package.swift at the archive root; exclude build/VCS noise so
|
|
112
|
-
// the upload stays lean and matches what a careful caller would ship.
|
|
113
|
-
runTar([
|
|
114
|
-
'--exclude',
|
|
115
|
-
'.build',
|
|
116
|
-
'--exclude',
|
|
117
|
-
'.git',
|
|
118
|
-
'--exclude',
|
|
119
|
-
'.DS_Store',
|
|
120
|
-
'-czf',
|
|
121
|
-
archivePath,
|
|
122
|
-
'-C',
|
|
123
|
-
dir,
|
|
124
|
-
'.',
|
|
125
|
-
], options.toolchainPath);
|
|
126
|
-
}
|
|
127
|
-
// The standard params.json the render script reads: screen -> reference basename.
|
|
128
|
-
writeFileSync(join(inputsDir, 'params.json'), JSON.stringify({ screens: screensParam }, null, 2) + '\n');
|
|
129
|
-
const artifactsDir = options.outDir ? resolve(options.outDir) : join(workDir, '.ci', 'artifacts');
|
|
130
|
-
mkdirSync(artifactsDir, { recursive: true });
|
|
131
|
-
const config = {
|
|
132
|
-
packagePath: null,
|
|
133
|
-
target: options.target ?? null,
|
|
134
|
-
width,
|
|
135
|
-
height,
|
|
136
|
-
scale,
|
|
137
|
-
packageSource: 'inputs',
|
|
138
|
-
};
|
|
139
|
-
const script = generateRenderScript(config);
|
|
140
|
-
const env = {
|
|
141
|
-
...process.env,
|
|
142
|
-
CIBUILD_ARTIFACTS_DIR: artifactsDir,
|
|
143
|
-
};
|
|
144
|
-
if (options.toolchainPath) {
|
|
145
|
-
env.PATH = options.toolchainPath + ':' + (process.env.PATH ?? '');
|
|
146
|
-
}
|
|
147
|
-
// Hand the script this installation's CLI entrypoint so its trim stage can
|
|
148
|
-
// spawn `fidelity-trim` without a ci on PATH (library callers like the
|
|
149
|
-
// Invarn CLI). Never override an explicitly-set entrypoint.
|
|
150
|
-
if (!env.CIBUILD_CLI_JS) {
|
|
151
|
-
const cliJs = resolveCliJsPath();
|
|
152
|
-
if (cliJs !== null)
|
|
153
|
-
env.CIBUILD_CLI_JS = cliJs;
|
|
154
|
-
}
|
|
155
|
-
const run = spawnSync('node', ['-e', script], {
|
|
156
|
-
cwd: workDir,
|
|
157
|
-
env,
|
|
158
|
-
encoding: 'utf-8',
|
|
159
|
-
maxBuffer: 32 * 1024 * 1024,
|
|
160
|
-
});
|
|
161
|
-
const resultPath = join(artifactsDir, 'protocol-result.json');
|
|
162
|
-
if (!existsSync(resultPath)) {
|
|
163
|
-
const detail = ((run.stdout || '') + '\n' + (run.stderr || '')).trim();
|
|
164
|
-
throw new Error(`renderUiFidelityPreview: render script produced no result document` +
|
|
165
|
-
(detail ? `:\n${detail}` : ''));
|
|
166
|
-
}
|
|
167
|
-
const raw = JSON.parse(readFileSync(resultPath, 'utf-8'));
|
|
168
|
-
const screens = (raw.screens || []).map((s) => buildPreviewScreenResult(s, artifactsDir));
|
|
169
|
-
const buildError = raw.error ?? null;
|
|
170
|
-
const ok = buildError === null && screens.length > 0 && screens.every((s) => s.status === 'rendered');
|
|
171
|
-
return { packageSource: 'inputs', buildError, screens, artifactsDir, ok };
|
|
172
|
-
}
|
|
173
|
-
//# sourceMappingURL=ui-fidelity-preview.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the local ui-fidelity render preview engine.
|
|
3
|
-
*
|
|
4
|
-
* Validation and result-shaping run with a PATH-shimmed fake `swift`/`xcrun`
|
|
5
|
-
* (the engine spawns the real generated render script, which spawns the
|
|
6
|
-
* toolchain). The CoreGraphics render itself is covered by an opt-in
|
|
7
|
-
* real-toolchain test, gated on CIBUILD_UI_FIDELITY_REAL_SWIFT, since the fake
|
|
8
|
-
* toolchain cannot exercise the actual pixel render/trim.
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=ui-fidelity-preview.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-fidelity-preview.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/ui-fidelity-preview.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the local ui-fidelity render preview engine.
|
|
3
|
-
*
|
|
4
|
-
* Validation and result-shaping run with a PATH-shimmed fake `swift`/`xcrun`
|
|
5
|
-
* (the engine spawns the real generated render script, which spawns the
|
|
6
|
-
* toolchain). The CoreGraphics render itself is covered by an opt-in
|
|
7
|
-
* real-toolchain test, gated on CIBUILD_UI_FIDELITY_REAL_SWIFT, since the fake
|
|
8
|
-
* toolchain cannot exercise the actual pixel render/trim.
|
|
9
|
-
*/
|
|
10
|
-
import { describe, expect, test, afterAll } from '@jest/globals';
|
|
11
|
-
import { chmodSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync, } from 'node:fs';
|
|
12
|
-
import { tmpdir } from 'node:os';
|
|
13
|
-
import { dirname, join, resolve } from 'node:path';
|
|
14
|
-
import { fileURLToPath } from 'node:url';
|
|
15
|
-
import { renderUiFidelityPreview, buildPreviewScreenResult, } from './ui-fidelity-preview.js';
|
|
16
|
-
const FIXTURE_PACKAGE = resolve(dirname(fileURLToPath(import.meta.url)), '../../../test/fixtures/ui-fidelity-package');
|
|
17
|
-
const PNG_MAGIC = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
18
|
-
// A real, decodable 1x1 transparent PNG, used as the reference for the
|
|
19
|
-
// real-toolchain test so the aligned step has something to read.
|
|
20
|
-
const ONE_BY_ONE_PNG = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==', 'base64');
|
|
21
|
-
const tempDirs = [];
|
|
22
|
-
afterAll(() => {
|
|
23
|
-
for (const dir of tempDirs) {
|
|
24
|
-
try {
|
|
25
|
-
rmSync(dir, { recursive: true, force: true });
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
// best effort
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
function tempDir(prefix) {
|
|
33
|
-
const dir = mkdtempSync(join(tmpdir(), prefix));
|
|
34
|
-
tempDirs.push(dir);
|
|
35
|
-
return dir;
|
|
36
|
-
}
|
|
37
|
-
// Compact fake toolchain: enough of `swift`/`xcrun` for the inputs-mode render
|
|
38
|
-
// script to discover the target, "build", "render" a PNG stub, and "trim" it.
|
|
39
|
-
const FAKE_SWIFT = [
|
|
40
|
-
'#!/bin/bash',
|
|
41
|
-
'cmd="$1"; shift',
|
|
42
|
-
'case "$cmd" in',
|
|
43
|
-
' package)',
|
|
44
|
-
' printf \'{"name":"shipped","products":[{"name":"FixtureViews","type":{"library":["automatic"]}}]}\\n\'',
|
|
45
|
-
' exit 0 ;;',
|
|
46
|
-
' build)',
|
|
47
|
-
' while [ $# -gt 0 ]; do case "$1" in --show-bin-path) echo "$PWD/.build/debug"; exit 0 ;; *) shift ;; esac; done',
|
|
48
|
-
' exit 0 ;;',
|
|
49
|
-
' run)',
|
|
50
|
-
' pos=()',
|
|
51
|
-
' while [ $# -gt 0 ]; do case "$1" in --package-path) shift 2 ;; --skip-build) shift ;; *) pos+=("$1"); shift ;; esac; done',
|
|
52
|
-
' out="${pos[1]}"',
|
|
53
|
-
" printf '\\x89PNG\\r\\n\\x1a\\n' > \"$out\"; printf 'fake-render' >> \"$out\"",
|
|
54
|
-
' exit 0 ;;',
|
|
55
|
-
' *) exit 0 ;;',
|
|
56
|
-
'esac',
|
|
57
|
-
].join('\n');
|
|
58
|
-
const FAKE_XCRUN = ['#!/bin/bash', 'exit 0'].join('\n');
|
|
59
|
-
// Fake `ci` covering the shared trim stage's `ci fidelity-trim` invocation.
|
|
60
|
-
const FAKE_CI = [
|
|
61
|
-
'#!/bin/bash',
|
|
62
|
-
'case "$1" in',
|
|
63
|
-
' fidelity-trim)',
|
|
64
|
-
' out_png="$3"; aligned_png="$4"',
|
|
65
|
-
" printf '\\x89PNG\\r\\n\\x1a\\n' > \"$out_png\"; printf 'trimmed' >> \"$out_png\"",
|
|
66
|
-
' if [ -n "$aligned_png" ]; then printf \'\\x89PNG\\r\\n\\x1a\\n\' > "$aligned_png"; printf \'aligned\' >> "$aligned_png"; fi',
|
|
67
|
-
' echo "TRIMDIMS 320 640 160 320 400 800"',
|
|
68
|
-
' exit 0 ;;',
|
|
69
|
-
' *) exit 0 ;;',
|
|
70
|
-
'esac',
|
|
71
|
-
].join('\n');
|
|
72
|
-
function fakeToolchain() {
|
|
73
|
-
const bin = tempDir('ui-fidelity-fakebin-');
|
|
74
|
-
const swiftPath = join(bin, 'swift');
|
|
75
|
-
writeFileSync(swiftPath, FAKE_SWIFT + '\n');
|
|
76
|
-
chmodSync(swiftPath, 0o755);
|
|
77
|
-
const xcrunPath = join(bin, 'xcrun');
|
|
78
|
-
writeFileSync(xcrunPath, FAKE_XCRUN + '\n');
|
|
79
|
-
chmodSync(xcrunPath, 0o755);
|
|
80
|
-
const ciPath = join(bin, 'ci');
|
|
81
|
-
writeFileSync(ciPath, FAKE_CI + '\n');
|
|
82
|
-
chmodSync(ciPath, 0o755);
|
|
83
|
-
return bin;
|
|
84
|
-
}
|
|
85
|
-
function writeReference() {
|
|
86
|
-
const dir = tempDir('ui-fidelity-ref-');
|
|
87
|
-
const ref = join(dir, 'reference.png');
|
|
88
|
-
writeFileSync(ref, Buffer.concat([PNG_MAGIC, Buffer.from('ref')]));
|
|
89
|
-
return ref;
|
|
90
|
-
}
|
|
91
|
-
function isPng(filePath) {
|
|
92
|
-
return readFileSync(filePath).subarray(0, PNG_MAGIC.length).equals(PNG_MAGIC);
|
|
93
|
-
}
|
|
94
|
-
describe('renderUiFidelityPreview — option validation', () => {
|
|
95
|
-
test('requires exactly one of packagePath or packageArchive', () => {
|
|
96
|
-
expect(() => renderUiFidelityPreview({ screens: [] })).toThrow(/exactly one/);
|
|
97
|
-
expect(() => renderUiFidelityPreview({
|
|
98
|
-
packagePath: FIXTURE_PACKAGE,
|
|
99
|
-
packageArchive: '/tmp/x.tar.gz',
|
|
100
|
-
screens: [{ screen: 'HomeView', reference: writeReference() }],
|
|
101
|
-
})).toThrow(/exactly one/);
|
|
102
|
-
});
|
|
103
|
-
test('requires at least one screen', () => {
|
|
104
|
-
expect(() => renderUiFidelityPreview({ packagePath: FIXTURE_PACKAGE, screens: [] })).toThrow(/at least one screen/);
|
|
105
|
-
});
|
|
106
|
-
test('rejects a missing reference image', () => {
|
|
107
|
-
expect(() => renderUiFidelityPreview({
|
|
108
|
-
packagePath: FIXTURE_PACKAGE,
|
|
109
|
-
screens: [{ screen: 'HomeView', reference: '/no/such/reference.png' }],
|
|
110
|
-
})).toThrow(/reference for HomeView not found/);
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
describe('buildPreviewScreenResult — aspect-ratio warning wiring', () => {
|
|
114
|
-
function rawScreen(rendered, reference) {
|
|
115
|
-
return {
|
|
116
|
-
screen: 'PromoBanner',
|
|
117
|
-
status: 'rendered',
|
|
118
|
-
error: null,
|
|
119
|
-
reference_image_path: 'references/PromoBanner.png',
|
|
120
|
-
rendered_image_path: 'rendered/PromoBanner.png',
|
|
121
|
-
aligned_image_path: 'aligned/PromoBanner.png',
|
|
122
|
-
dimensions: {
|
|
123
|
-
rendered_px: rendered,
|
|
124
|
-
logical_pt: [rendered[0] / 2, rendered[1] / 2],
|
|
125
|
-
reference_px: reference,
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
test('attaches a warning when a stacked render diverges from its reference', () => {
|
|
130
|
-
const result = buildPreviewScreenResult(rawScreen([880, 400], [952, 200]), '/tmp/art');
|
|
131
|
-
expect(result.aspectWarning).toMatch(/divergence/);
|
|
132
|
-
expect(result.aspectWarning).toContain('PromoBanner');
|
|
133
|
-
});
|
|
134
|
-
test('leaves no warning when the render matches the reference aspect ratio', () => {
|
|
135
|
-
const result = buildPreviewScreenResult(rawScreen([720, 1280], [360, 640]), '/tmp/art');
|
|
136
|
-
expect(result.aspectWarning).toBeNull();
|
|
137
|
-
});
|
|
138
|
-
test('leaves no warning when there is no reference to compare', () => {
|
|
139
|
-
const result = buildPreviewScreenResult(rawScreen([720, 1280], null), '/tmp/art');
|
|
140
|
-
expect(result.aspectWarning).toBeNull();
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
describe('renderUiFidelityPreview — fake toolchain', () => {
|
|
144
|
-
test('archives the package, renders in inputs mode, and returns image paths + dims', () => {
|
|
145
|
-
const result = renderUiFidelityPreview({
|
|
146
|
-
packagePath: FIXTURE_PACKAGE,
|
|
147
|
-
screens: [{ screen: 'HomeView', reference: writeReference() }],
|
|
148
|
-
toolchainPath: fakeToolchain(),
|
|
149
|
-
});
|
|
150
|
-
expect(result.packageSource).toBe('inputs');
|
|
151
|
-
expect(result.buildError).toBeNull();
|
|
152
|
-
expect(result.ok).toBe(true);
|
|
153
|
-
expect(result.screens).toHaveLength(1);
|
|
154
|
-
const [screen] = result.screens;
|
|
155
|
-
expect(screen.screen).toBe('HomeView');
|
|
156
|
-
expect(screen.status).toBe('rendered');
|
|
157
|
-
expect(screen.error).toBeNull();
|
|
158
|
-
// Paths are absolute and point at real files the caller can read.
|
|
159
|
-
expect(screen.renderedImagePath && isPng(screen.renderedImagePath)).toBe(true);
|
|
160
|
-
expect(screen.alignedImagePath && isPng(screen.alignedImagePath)).toBe(true);
|
|
161
|
-
expect(screen.referenceImagePath && isPng(screen.referenceImagePath)).toBe(true);
|
|
162
|
-
expect(screen.dimensions).toEqual({
|
|
163
|
-
rendered_px: [320, 640],
|
|
164
|
-
logical_pt: [160, 320],
|
|
165
|
-
reference_px: [160, 320],
|
|
166
|
-
// the fake helper's TRIMDIMS pre-trim source px (fields 5-6)
|
|
167
|
-
source_px: [400, 800],
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
test('writes images under the requested outDir', () => {
|
|
171
|
-
const outDir = tempDir('ui-fidelity-out-');
|
|
172
|
-
const result = renderUiFidelityPreview({
|
|
173
|
-
packagePath: FIXTURE_PACKAGE,
|
|
174
|
-
screens: [{ screen: 'HomeView', reference: writeReference() }],
|
|
175
|
-
outDir,
|
|
176
|
-
toolchainPath: fakeToolchain(),
|
|
177
|
-
});
|
|
178
|
-
expect(result.artifactsDir).toBe(resolve(outDir));
|
|
179
|
-
expect(result.screens[0].renderedImagePath?.startsWith(resolve(outDir))).toBe(true);
|
|
180
|
-
expect(existsSync(join(outDir, 'ui-fidelity', 'rendered', 'HomeView.png'))).toBe(true);
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
// Opt-in: renders the fixture with the real Swift toolchain and asserts the
|
|
184
|
-
// content trim actually crops below the forced device canvas. Requires macOS
|
|
185
|
-
// with Xcode; skipped unless explicitly requested.
|
|
186
|
-
describe('renderUiFidelityPreview — real toolchain', () => {
|
|
187
|
-
const realTest = process.env.CIBUILD_UI_FIDELITY_REAL_SWIFT === '1' ? test : test.skip;
|
|
188
|
-
realTest('renders the fixture and trims the filled canvas down to its content', () => {
|
|
189
|
-
const refDir = tempDir('ui-fidelity-realref-');
|
|
190
|
-
const reference = join(refDir, 'reference.png');
|
|
191
|
-
writeFileSync(reference, ONE_BY_ONE_PNG);
|
|
192
|
-
const result = renderUiFidelityPreview({
|
|
193
|
-
packagePath: FIXTURE_PACKAGE,
|
|
194
|
-
screens: [{ screen: 'HomeView', reference }],
|
|
195
|
-
renderSize: '393x852',
|
|
196
|
-
scale: 2,
|
|
197
|
-
});
|
|
198
|
-
expect(result.ok).toBe(true);
|
|
199
|
-
const [screen] = result.screens;
|
|
200
|
-
expect(screen.status).toBe('rendered');
|
|
201
|
-
expect(screen.renderedImagePath && isPng(screen.renderedImagePath)).toBe(true);
|
|
202
|
-
// HomeView fills the canvas with a uniform translucent background and a
|
|
203
|
-
// little text; the content trim must crop well below the 786x1704 (@2x)
|
|
204
|
-
// device canvas to the text region.
|
|
205
|
-
const [rw, rh] = screen.dimensions.rendered_px;
|
|
206
|
-
expect(rw).toBeLessThan(786);
|
|
207
|
-
expect(rh).toBeLessThan(1704);
|
|
208
|
-
}, 600_000);
|
|
209
|
-
});
|
|
210
|
-
//# sourceMappingURL=ui-fidelity-preview.test.js.map
|