@qawolf/ci-sdk 0.12.0 → 0.12.1
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/README.md +61 -4
- package/dist/cjs/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/api/ci-greenlight.d.ts +1 -1
- package/dist/types/lib/api/deploy.d.ts +5 -1
- package/package.json +3 -2
- package/CHANGELOG.md +0 -43
package/README.md
CHANGED
|
@@ -17,11 +17,12 @@ to determine the status of your CI/CD step/job/action.
|
|
|
17
17
|
|
|
18
18
|
## Example: Trigger Run on Deployment
|
|
19
19
|
|
|
20
|
+
> ℹ️ [See the API documentation page for this endpoint](https://qawolf.notion.site/dd72e46ceb7f451dae4e9ef06f64a2cc).
|
|
21
|
+
|
|
20
22
|
```ts
|
|
21
23
|
import { type DeployConfig, makeQaWolfSdk } from "@qawolf/ci-sdk";
|
|
22
24
|
|
|
23
25
|
// Edit this to your needs.
|
|
24
|
-
// See documentation here: https://qawolf.notion.site/cfe5a209256448a5bcd825bcf2d87e34
|
|
25
26
|
const deployConfig: DeployConfig = {
|
|
26
27
|
branch: undefined,
|
|
27
28
|
commitUrl: undefined,
|
|
@@ -51,6 +52,8 @@ const { attemptNotifyDeploy } = makeQaWolfSdk({
|
|
|
51
52
|
|
|
52
53
|
## Example: Poll for CI Greenlight Status
|
|
53
54
|
|
|
55
|
+
> ℹ️ [See the API documentation page for this endpoint](https://qawolf.notion.site/1b170576efea411fa785842a71e7c99e).
|
|
56
|
+
|
|
54
57
|
```ts
|
|
55
58
|
import { makeQaWolfSdk } from "@qawolf/ci-sdk";
|
|
56
59
|
|
|
@@ -63,7 +66,7 @@ const { pollCiGreenlightStatus } = makeQaWolfSdk({
|
|
|
63
66
|
const { outcome } = await pollCiGreenlightStatus({
|
|
64
67
|
runId,
|
|
65
68
|
// Optional: Callback to be called when the run stage changes.
|
|
66
|
-
// See https://qawolf.notion.site/
|
|
69
|
+
// See https://qawolf.notion.site/1b170576efea411fa785842a71e7c99e for
|
|
67
70
|
// documentation on these run stages.
|
|
68
71
|
onRunStageChanged: (current, previous) => {
|
|
69
72
|
console.log(current, previous);
|
|
@@ -86,10 +89,64 @@ This package follows the [SemVer](https://semver.org/) versioning scheme. Additi
|
|
|
86
89
|
|
|
87
90
|
- Versions below 1.0.0 still follow this scheme.
|
|
88
91
|
- We recommend depending on the `^` range operator for this package, as it will not introduce breaking changes and guarantee
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
an up-to-date API usage version.
|
|
93
|
+
<!-- There is a limitation in NPM preventing us from using relative links and hosting other MD files when the repository hosting code is not
|
|
94
|
+
public, hence we inline the changelog in the README. See https://github.com/npm/feedback/discussions/666 -->
|
|
95
|
+
- We will provide a changelog for each release, which will be available in the Changelog section below.
|
|
91
96
|
- This package major version will be bumped when an API breaking change is introduced. This won't
|
|
92
97
|
happen too often, and we will reach out to you and give advance notice when it does.
|
|
93
98
|
- Only top-level exports are considered part of the public API and covered by SemVer.
|
|
94
99
|
- Addition of new fields in the API response types are not considered breaking changes.
|
|
95
100
|
- Logs and debug messages are not considered part of the public API and can change at any time.
|
|
101
|
+
|
|
102
|
+
# Changelog
|
|
103
|
+
|
|
104
|
+
## v0.12.1
|
|
105
|
+
|
|
106
|
+
- Export dependencies types from root module.
|
|
107
|
+
- Refine `DeployConfig.hostingService` type to match API requirements.
|
|
108
|
+
- Fix inaccessible changelog file from NPM.
|
|
109
|
+
|
|
110
|
+
## v0.12.0
|
|
111
|
+
|
|
112
|
+
- Define a more restrictive `LogDriver` interface for easy integration with GHA
|
|
113
|
+
`core` interface.
|
|
114
|
+
|
|
115
|
+
## v0.11.0
|
|
116
|
+
|
|
117
|
+
- Support `reproducedBugs` field from CI-greenlight API.
|
|
118
|
+
|
|
119
|
+
> :warning: These are the last breaking changes brought to the 0.x major version.
|
|
120
|
+
> These are being introduced while the SDK hasn't been advertised to the public yet.
|
|
121
|
+
> Future changes will follow the SemVer versioning scheme.
|
|
122
|
+
|
|
123
|
+
BREAKING CHANGES:
|
|
124
|
+
|
|
125
|
+
- `pollCiGreenlightStatus` and `attemptNotifyDeploy` now return a "result" object
|
|
126
|
+
with an `outcome` field that can be either `"success"`, `"failed"` or `"aborted"`,
|
|
127
|
+
instead of exiting the process with a non-zero code. This will provide more
|
|
128
|
+
flexibility to the user to decide how to handle the outcome.
|
|
129
|
+
|
|
130
|
+
## v0.10.3
|
|
131
|
+
|
|
132
|
+
BREAKING CHANGES:
|
|
133
|
+
|
|
134
|
+
- Renamed `attemptDeploy` to `attemptNotifyDeploy`.
|
|
135
|
+
|
|
136
|
+
## v0.10.2
|
|
137
|
+
|
|
138
|
+
- Avoid logging dots after URL names in the logs. Dots can confuse terminal
|
|
139
|
+
URL detection.
|
|
140
|
+
|
|
141
|
+
## v0.10.1
|
|
142
|
+
|
|
143
|
+
- Fix TypeScript types visibility.
|
|
144
|
+
|
|
145
|
+
## v0.10.0
|
|
146
|
+
|
|
147
|
+
Initial release.
|
|
148
|
+
|
|
149
|
+
### Supported Endpoints
|
|
150
|
+
|
|
151
|
+
- `/api/deploy_success`
|
|
152
|
+
- `/api/v0/ci-greenlight/[root-run-id]`
|
package/dist/cjs/index.js
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export type CiGreenlightStatusBase = {
|
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* The status of a CI greenlight run. See the API documentation here for
|
|
67
|
-
* more details: https://qawolf.notion.site/
|
|
67
|
+
* more details: https://qawolf.notion.site/1b170576efea411fa785842a71e7c99e
|
|
68
68
|
*/
|
|
69
69
|
export type CiGreenlightStatus = CiGreenlightStatusBase & ({
|
|
70
70
|
blockingBugsCount: number;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { ApiConfig } from "../api-types.js";
|
|
2
2
|
import { SdkDependencies } from "../sdk/dependencies.js";
|
|
3
|
+
/**
|
|
4
|
+
* Refer to our official documentation for more information:
|
|
5
|
+
* https://qawolf.notion.site/dd72e46ceb7f451dae4e9ef06f64a2cc
|
|
6
|
+
*/
|
|
3
7
|
export type DeployConfig = {
|
|
4
8
|
branch: string | undefined;
|
|
5
9
|
commitUrl: string | undefined;
|
|
6
10
|
deduplicationKey: string | undefined;
|
|
7
11
|
deploymentType: string | undefined;
|
|
8
12
|
deploymentUrl: string | undefined;
|
|
9
|
-
hostingService:
|
|
13
|
+
hostingService: "GitHub" | "GitLab" | undefined;
|
|
10
14
|
sha: string | undefined;
|
|
11
15
|
variables: Record<string, string> | undefined;
|
|
12
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qawolf/ci-sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "A simple SDK for interacting with QAWolf in CI scripts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"build": "./scripts/build.sh",
|
|
16
16
|
"test": "jest",
|
|
17
17
|
"prepare": "npm run build",
|
|
18
|
-
"publish": "./scripts/publish.sh"
|
|
18
|
+
"npm-publish": "./scripts/publish.sh",
|
|
19
|
+
"tsc:check": "tsc --noEmit"
|
|
19
20
|
},
|
|
20
21
|
"keywords": [],
|
|
21
22
|
"author": "Jules Sam. Randolph<jules@qawolf.com>",
|
package/CHANGELOG.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# v0.12.0
|
|
2
|
-
|
|
3
|
-
- Define a more restrictive `LogDriver` interface for easy integration with GHA
|
|
4
|
-
`core` interface.
|
|
5
|
-
|
|
6
|
-
# v0.11.0
|
|
7
|
-
|
|
8
|
-
- Support `reproducedBugs` field from CI-greenlight API.
|
|
9
|
-
|
|
10
|
-
> :warning: These are the last breaking changes brought to the 0.x major version.
|
|
11
|
-
> These are being introduced while the SDK hasn't been advertised to the public yet.
|
|
12
|
-
> Future changes will follow the SemVer versioning scheme.
|
|
13
|
-
|
|
14
|
-
BREAKING CHANGES:
|
|
15
|
-
|
|
16
|
-
- `pollCiGreenlightStatus` and `attemptNotifyDeploy` now return a "result" object
|
|
17
|
-
with an `outcome` field that can be either `"success"`, `"failed"` or `"aborted"`,
|
|
18
|
-
instead of exiting the process with a non-zero code. This will provide more
|
|
19
|
-
flexibility to the user to decide how to handle the outcome.
|
|
20
|
-
|
|
21
|
-
# v0.10.3
|
|
22
|
-
|
|
23
|
-
BREAKING CHANGES:
|
|
24
|
-
|
|
25
|
-
- Renamed `attemptDeploy` to `attemptNotifyDeploy`.
|
|
26
|
-
|
|
27
|
-
# v0.10.2
|
|
28
|
-
|
|
29
|
-
- Avoid logging dots after URL names in the logs. Dots can confuse terminal
|
|
30
|
-
URL detection.
|
|
31
|
-
|
|
32
|
-
# v0.10.1
|
|
33
|
-
|
|
34
|
-
- Fix TypeScript types visibility.
|
|
35
|
-
|
|
36
|
-
# v0.10.0
|
|
37
|
-
|
|
38
|
-
Initial release.
|
|
39
|
-
|
|
40
|
-
## Supported Endpoints
|
|
41
|
-
|
|
42
|
-
- `/api/deploy_success`
|
|
43
|
-
- `/api/v0/ci-greenlight/[root-run-id]`
|