@qawolf/ci-sdk 2.2.0 → 2.5.0

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.
Files changed (42) hide show
  1. package/README.md +13 -0
  2. package/dist/index.cjs +389 -196
  3. package/dist/index.cjs.map +7 -1
  4. package/dist/index.d.ts +4 -557
  5. package/dist/index.js +364 -194
  6. package/dist/index.js.map +7 -1
  7. package/dist/lib/api/ci-greenlight-bug-data.d.ts +67 -0
  8. package/dist/lib/api/ci-greenlight.d.ts +76 -0
  9. package/dist/lib/api/generate-signed-url-for-run-inputs-executables.d.ts +4 -0
  10. package/dist/lib/api/generate-signed-url-for-team-storage.d.ts +4 -0
  11. package/dist/lib/api/index.d.ts +2 -0
  12. package/dist/lib/api/log.d.ts +6 -0
  13. package/dist/lib/api/signed-url.d.ts +11 -0
  14. package/dist/lib/api-types.d.ts +5 -0
  15. package/dist/lib/other.d.ts +5 -0
  16. package/dist/lib/sdk/defaults/fetch.d.ts +1 -0
  17. package/dist/lib/sdk/defaults/log.d.ts +2 -0
  18. package/dist/lib/sdk/defaults/serviceBase.d.ts +1 -0
  19. package/dist/lib/sdk/defaults/userAgent.d.ts +1 -0
  20. package/dist/lib/sdk/dependencies.d.ts +7 -0
  21. package/dist/lib/sdk/domain/attemptDeploy/deployConfig.d.ts +37 -0
  22. package/dist/lib/sdk/domain/attemptDeploy/deploySuccessWireResponse.d.ts +39 -0
  23. package/dist/lib/sdk/domain/attemptDeploy/handleSuccessResponse.d.ts +3 -0
  24. package/dist/lib/sdk/domain/attemptDeploy/index.d.ts +4 -0
  25. package/dist/lib/sdk/domain/attemptDeploy/mapDeploySuccessResponse.d.ts +3 -0
  26. package/dist/lib/sdk/domain/attemptDeploy/parseDeploySuccessWireResponse.d.ts +2 -0
  27. package/dist/lib/sdk/domain/attemptDeploy/types.d.ts +129 -0
  28. package/dist/lib/sdk/domain/generateSignedUrls/generate-signed-url-for-run-inputs-executables.d.ts +4 -0
  29. package/dist/lib/sdk/domain/generateSignedUrls/generate-signed-url-for-team-storage.d.ts +16 -0
  30. package/dist/lib/sdk/domain/generateSignedUrls/types.d.ts +28 -0
  31. package/dist/lib/sdk/domain/notifyTerminatedEphemeralEnvironment/index.d.ts +4 -0
  32. package/dist/lib/sdk/domain/notifyTerminatedEphemeralEnvironment/types.d.ts +48 -0
  33. package/dist/lib/sdk/domain/pollCiGreenlight/buildCompletedRunResult.d.ts +8 -0
  34. package/dist/lib/sdk/domain/pollCiGreenlight/consts.d.ts +7 -0
  35. package/dist/lib/sdk/domain/pollCiGreenlight/index.d.ts +4 -0
  36. package/dist/lib/sdk/domain/pollCiGreenlight/iterator.d.ts +43 -0
  37. package/dist/lib/sdk/domain/pollCiGreenlight/logging.d.ts +25 -0
  38. package/dist/lib/sdk/domain/pollCiGreenlight/mapIteratorAbortToGreenlightStatus.d.ts +7 -0
  39. package/dist/lib/sdk/domain/pollCiGreenlight/types.d.ts +145 -0
  40. package/dist/lib/sdk/index.d.ts +26 -0
  41. package/package.json +8 -7
  42. package/dist/index.d.cts +0 -557
package/README.md CHANGED
@@ -469,6 +469,19 @@ This package follows the [SemVer](https://semver.org/) versioning scheme. Additi
469
469
 
470
470
  # Changelog
471
471
 
472
+ ## v2.5.0
473
+
474
+ - `attemptNotifyDeploy`: QA Wolf no longer sends `skipped_triggers` on the `deploy_success` response, so against a current backend `skippedTriggers` is absent and `failReason: "trigger-skipped"` does not occur. A trigger that matched the deployment but could not run now reaches you as `outcome: "skipped"` rather than `outcome: "failed"`, so a deploy step that used to fail in that case passes instead. This most often happens when the environment has no enabled tests, where there is nothing to run and nothing to retry. Both `skippedTriggers` and the `trigger-skipped` reason stay in the types and are still parsed, so no caller has to change and a self-hosted backend that predates the change keeps working. Note that this response no longer distinguishes a matched-but-unrunnable trigger from a deployment that matched nothing, and its log line reads as though nothing matched.
475
+
476
+ ## v2.4.0
477
+
478
+ - `attemptNotifyDeploy` and `notifyTerminatedEphemeralEnvironment`: the response may now carry a `warning` about the request itself rather than its outcome, and the SDK logs it through `log.warn`. Today it is sent when an organization or user API key omits `workspaceId`, in which case QA Wolf uses your organization's first-created workspace and the warning names it. The warning never changes the outcome, and it is absent against a backend that predates it. `attemptNotifyDeploy` also exposes it as `warning` on `DeployStatus`.
479
+
480
+ ## v2.3.0
481
+
482
+ - `attemptNotifyDeploy`: a failed suite result now carries `failureCode` and `failureMessage` alongside the existing `failureReason`. `failureCode` is a stable code to branch on, such as `billing-prevented`, `environment-terminated`, `environment-not-ready`, `test-configuration-error`, or `internal-error`; treat it as an open set, since new codes are added over time. Note that `environment-terminated` is permanent while `environment-not-ready` clears on its own, so retrying is worthwhile only for the second. `failureMessage` is human-readable copy for logs, and the SDK's own failure log line now prints it instead of the internal reason.
483
+ - `attemptNotifyDeploy`: `failureReason` is deprecated. It still ships unchanged and is safe to keep reading, but it carries an internal diagnostic whose values change without notice. Branch on `failureCode` and display `failureMessage` instead. Both are `undefined` when the SDK talks to a backend that predates them.
484
+
472
485
  ## v2.1.0
473
486
 
474
487
  - `attemptNotifyDeploy`: the `deploy_success` response is now validated at runtime instead of being trusted. A response with a non-JSON body, or a body that does not match the expected shape, returns `outcome: "aborted"` with the new `abortReason: "invalid-response-body"`. This is distinct from `"network-error"`, which now covers only transport and body-stream failures rather than also masking unparseable responses. A result the SDK does not recognize (for example a new result kind sent by a newer backend) returns `outcome: "failed"` with the new `failReason: "unknown-result"` instead of being reported as a success. Recognized results are unchanged, and older backends that omit newer fields remain fully supported.