@qawolf/ci-sdk 0.10.2 → 0.10.3
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/CHANGELOG.md +4 -0
- package/README.md +2 -2
- package/dist/cjs/lib/sdk/domain/attempt-deploy.js +3 -3
- package/dist/cjs/lib/sdk/index.js +1 -1
- package/dist/esm/lib/sdk/domain/attempt-deploy.js +1 -1
- package/dist/esm/lib/sdk/index.js +2 -2
- package/dist/types/lib/sdk/domain/attempt-deploy.d.ts +1 -1
- package/dist/types/lib/sdk/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -26,12 +26,12 @@ const deployConfig: DeployConfig = {
|
|
|
26
26
|
variables: undefined,
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const {
|
|
29
|
+
const { attemptNotifyDeploy } = makeQaWolfSdk({
|
|
30
30
|
apiKey: "qawolf_xxxxx",
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
(async () => {
|
|
34
|
-
const runId = await
|
|
34
|
+
const runId = await attemptNotifyDeploy(deployConfig);
|
|
35
35
|
// Store the runId as an output of the job to be used in a CI-greenlight job.
|
|
36
36
|
// This will depend on the CI platform you are using.
|
|
37
37
|
})();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.attemptNotifyDeploy = void 0;
|
|
4
4
|
const deploy_js_1 = require("../../api/deploy.js");
|
|
5
5
|
const utils_js_1 = require("../../utils.js");
|
|
6
|
-
async function
|
|
6
|
+
async function attemptNotifyDeploy(deps, apiConfig, config) {
|
|
7
7
|
const { job, log } = deps;
|
|
8
8
|
const responseState = await (0, deploy_js_1.postDeploySuccess)(apiConfig, config, deps);
|
|
9
9
|
if (!responseState.success) {
|
|
@@ -34,4 +34,4 @@ async function attemptDeploy(deps, apiConfig, config) {
|
|
|
34
34
|
log.info(`✅ Run created with ID: ${responseState.runId}`);
|
|
35
35
|
return responseState.runId;
|
|
36
36
|
}
|
|
37
|
-
exports.
|
|
37
|
+
exports.attemptNotifyDeploy = attemptNotifyDeploy;
|
|
@@ -9,7 +9,7 @@ function makeQaWolfSdk({ apiKey, serviceBase = "https://app.qawolf.com/", }, { j
|
|
|
9
9
|
const deps = { job, log, fetch };
|
|
10
10
|
const apiConfig = { apiKey, serviceBase };
|
|
11
11
|
return {
|
|
12
|
-
|
|
12
|
+
attemptNotifyDeploy: attempt_deploy_js_1.attemptNotifyDeploy.bind(null, deps, apiConfig),
|
|
13
13
|
pollCiGreenlightStatus: poll_ci_greenlight_js_1.pollCiGreenlightStatus.bind(null, deps, apiConfig),
|
|
14
14
|
};
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { postDeploySuccess } from "../../api/deploy.js";
|
|
2
2
|
import { assertType } from "../../utils.js";
|
|
3
|
-
export async function
|
|
3
|
+
export async function attemptNotifyDeploy(deps, apiConfig, config) {
|
|
4
4
|
const { job, log } = deps;
|
|
5
5
|
const responseState = await postDeploySuccess(apiConfig, config, deps);
|
|
6
6
|
if (!responseState.success) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { attemptNotifyDeploy } from "./domain/attempt-deploy.js";
|
|
2
2
|
import { defaultJobDriver } from "./job/default.js";
|
|
3
3
|
import { defaultLogDriver } from "./log/default.js";
|
|
4
4
|
import { pollCiGreenlightStatus } from "./domain/poll-ci-greenlight.js";
|
|
@@ -6,7 +6,7 @@ export function makeQaWolfSdk({ apiKey, serviceBase = "https://app.qawolf.com/",
|
|
|
6
6
|
const deps = { job, log, fetch };
|
|
7
7
|
const apiConfig = { apiKey, serviceBase };
|
|
8
8
|
return {
|
|
9
|
-
|
|
9
|
+
attemptNotifyDeploy: attemptNotifyDeploy.bind(null, deps, apiConfig),
|
|
10
10
|
pollCiGreenlightStatus: pollCiGreenlightStatus.bind(null, deps, apiConfig),
|
|
11
11
|
};
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DeployConfig } from "../../api/deploy.js";
|
|
2
2
|
import { SdkDependencies } from "../dependencies.js";
|
|
3
3
|
import { ApiConfig } from "../../api-types.js";
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function attemptNotifyDeploy(deps: SdkDependencies, apiConfig: ApiConfig, config: Partial<DeployConfig>): Promise<string>;
|
|
@@ -3,6 +3,6 @@ export declare function makeQaWolfSdk({ apiKey, serviceBase, }: {
|
|
|
3
3
|
apiKey: string;
|
|
4
4
|
serviceBase?: string;
|
|
5
5
|
}, { job, log, fetch, }?: Partial<SdkDependencies>): {
|
|
6
|
-
|
|
6
|
+
attemptNotifyDeploy: (config: Partial<import("../api/deploy.js").DeployConfig>) => Promise<string>;
|
|
7
7
|
pollCiGreenlightStatus: (args_0: import("./domain/poll-ci-greenlight.js").PollCiGreenlightParams) => Promise<undefined>;
|
|
8
8
|
};
|