@qawolf/ci-sdk 0.10.1 → 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 CHANGED
@@ -1,3 +1,16 @@
1
+ # v0.10.3
2
+
3
+ _No visible changes_
4
+
5
+ # v0.10.2
6
+
7
+ - Avoid logging dots after URL names in the logs. Dots can confuse terminal
8
+ URL detection.
9
+
10
+ # v0.10.1
11
+
12
+ - Fix TypeScript types visibility.
13
+
1
14
  # v0.10.0
2
15
 
3
16
  Initial release.
package/README.md CHANGED
@@ -26,12 +26,12 @@ const deployConfig: DeployConfig = {
26
26
  variables: undefined,
27
27
  };
28
28
 
29
- const { attemptDeploy } = makeQaWolfSdk({
29
+ const { attemptNotifyDeploy } = makeQaWolfSdk({
30
30
  apiKey: "qawolf_xxxxx",
31
31
  });
32
32
 
33
33
  (async () => {
34
- const runId = await attemptDeploy(deployConfig);
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
  })();
@@ -72,3 +72,4 @@ This package follows the [SemVer](https://semver.org/) versioning scheme. Additi
72
72
  happen too often, and we will reach out to you and give advance notice when it does.
73
73
  - Only top-level exports are considered part of the public API and covered by SemVer.
74
74
  - Addition of new fields in the API response types are not considered breaking changes.
75
+ - Logs and debug messages are not considered part of the public API and can change at any time.
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.attemptDeploy = void 0;
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 attemptDeploy(deps, apiConfig, config) {
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.attemptDeploy = attemptDeploy;
37
+ exports.attemptNotifyDeploy = attemptNotifyDeploy;
@@ -55,7 +55,7 @@ async function pollCiGreenlightStatus(deps, apiConfig, { runId, onRunStageChange
55
55
  catch (e) {
56
56
  log.error(`Error in onRunStageChanged callback`, e);
57
57
  }
58
- const urlInfo = `See ${greenlightStatus.relevantRunUrl}.`;
58
+ const urlInfo = `See ${greenlightStatus.relevantRunUrl}`;
59
59
  const { greenlight, relevantRunId, relevantRunUrl, relevantRunWithBugsUrl, rootRunId, rootRunUrl, runStage, } = greenlightStatus;
60
60
  if (rootRunId !== relevantRunId) {
61
61
  log.info(`Root run was superseded:
@@ -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
- attemptDeploy: attempt_deploy_js_1.attemptDeploy.bind(null, deps, apiConfig),
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 attemptDeploy(deps, apiConfig, config) {
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) {
@@ -52,7 +52,7 @@ export async function pollCiGreenlightStatus(deps, apiConfig, { runId, onRunStag
52
52
  catch (e) {
53
53
  log.error(`Error in onRunStageChanged callback`, e);
54
54
  }
55
- const urlInfo = `See ${greenlightStatus.relevantRunUrl}.`;
55
+ const urlInfo = `See ${greenlightStatus.relevantRunUrl}`;
56
56
  const { greenlight, relevantRunId, relevantRunUrl, relevantRunWithBugsUrl, rootRunId, rootRunUrl, runStage, } = greenlightStatus;
57
57
  if (rootRunId !== relevantRunId) {
58
58
  log.info(`Root run was superseded:
@@ -1,4 +1,4 @@
1
- import { attemptDeploy } from "./domain/attempt-deploy.js";
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
- attemptDeploy: attemptDeploy.bind(null, deps, apiConfig),
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 attemptDeploy(deps: SdkDependencies, apiConfig: ApiConfig, config: Partial<DeployConfig>): Promise<string>;
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
- attemptDeploy: (config: Partial<import("../api/deploy.js").DeployConfig>) => Promise<string>;
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/ci-sdk",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "description": "A simple SDK for interacting with QAWolf in CI scripts.",
5
5
  "type": "module",
6
6
  "private": false,