Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@qawolf/ci-sdk

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qawolf/ci-sdk - npm Package Compare versions

Comparing version 0.20.0 to 0.21.0

4

dist/cjs/index.d.ts

@@ -0,4 +1,4 @@

export type { CiGreenlightStatus, CiGreenlightStatusBase, DeployConfig, DeployStatus, } from "./lib/api/index.js";
export * from "./lib/sdk/dependencies.js";
export * from "./lib/sdk/index.js";
export * from "./lib/sdk/dependencies.js";
export type { CiGreenlightStatus, CiGreenlightStatusBase, DeployConfig, DeployStatus, } from "./lib/api/index.js";
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./lib/sdk/dependencies.js"), exports);
tslib_1.__exportStar(require("./lib/sdk/index.js"), exports);
tslib_1.__exportStar(require("./lib/sdk/dependencies.js"), exports);
//# sourceMappingURL=index.js.map

@@ -49,6 +49,35 @@ import { type ApiConfig } from "../api-types";

export type CiGreenlightBugData = {
/**
* The count of blocking bugs reproduced in the run.
*/
blockingBugsCount: number;
/**
* The URLs of the blocking bugs.
*
* @deprecated This field will be removed in the next major version.
* Prefer using `reproducedBugs` filtered by `isBlocking: true`, reading
* the `applicationUrl` field.
*/
blockingBugUrls: string[];
/**
* The count of non-blocking bugs reproduced in the run.
*/
nonBlockingBugsCount: number;
/**
* The URLs of the non-blocking bugs.
*
* @deprecated This field will be removed in the next major version.
* Prefer using `reproducedBugs` filtered by `isBlocking: false`, reading
* the `applicationUrl` field.
*/
nonBlockingBugUrls: string[];
/**
* Blocking bugs that were not reproduced in this run, but are still
* opened in the run environment. This may happen when the run only covers a
* subset of the workflows in environment.
*/
otherBlockingBugsInEnvironment: CiGreenlightBugDetails[];
/**
* Bugs that were reproduced in this run. This includes newly found bugs.
*/
reproducedBugs: CiGreenlightBugDetails[];

@@ -55,0 +84,0 @@ };

import { type ApiConfig } from "../api-types";
import { type SdkDependencies } from "../sdk/dependencies";
import { type GenerateSignedUrlConfig, type GenerateSignedUrlResponse } from "../sdk/domain/generateSignedUrls/types";
export declare function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }: ApiConfig, { destinationFilePath }: Partial<GenerateSignedUrlConfig>, { fetch: localFetch }: SdkDependencies): Promise<GenerateSignedUrlResponse>;
export declare function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }: ApiConfig, { destinationFilePath }: GenerateSignedUrlConfig, { fetch: localFetch }: SdkDependencies): Promise<GenerateSignedUrlResponse>;
//# sourceMappingURL=generate-signed-url-for-run-inputs-executables.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

try {
const response = await localFetch(new URL(`${serviceBase}/api/v0/run-inputs-executables-signed-urls?file=${destinationFilePath}`), {
const response = await localFetch(new URL(`${serviceBase}/api/v0/run-inputs-executables-signed-urls?file=${encodeURIComponent(destinationFilePath)}`), {
headers: {

@@ -9,0 +9,0 @@ Authorization: `Bearer ${apiKey}`,

@@ -32,5 +32,4 @@ "use strict";

const extensionsCodes = rawBody.errors.flatMap((error) => error.extensions?.map?.((ext) => ext.code) ?? []);
for (const error of rawBody.errors) {
for (const error of rawBody.errors)
log.warn(`❌ [GraphQL] error: ${error.message}`);
}
const isUnauthenticated = extensionsCodes.includes("UNAUTHENTICATED");

@@ -37,0 +36,0 @@ const isForbidden = extensionsCodes.includes("FORBIDDEN");

@@ -6,2 +6,3 @@ import { type ApiConfig } from "../api-types";

baseEnvironmentAlias: string | undefined;
baseVcsBranch: string | undefined;
concurrencyLimit: number | undefined;

@@ -25,3 +26,3 @@ headEnvironmentAlias: string;

};
export declare function callNotifyVCSBranchBuildDeployedMutation(deps: SdkDependencies, apiConfig: ApiConfig, { baseEnvironmentAlias, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }: NotifyVCSBranchBuildDeployedMutationInput): Promise<GraphQLResponse<NotifyVCSBranchBuildDeployedResponseSchema>>;
export declare function callNotifyVCSBranchBuildDeployedMutation(deps: SdkDependencies, apiConfig: ApiConfig, { baseEnvironmentAlias, baseVcsBranch, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }: NotifyVCSBranchBuildDeployedMutationInput): Promise<GraphQLResponse<NotifyVCSBranchBuildDeployedResponseSchema>>;
//# sourceMappingURL=notify-vcs-branch-build-deployed-mutation.d.ts.map

@@ -9,2 +9,3 @@ "use strict";

$headVcsCommitId: String!,
$baseVcsBranch: String,
$headEnvironmentVariablesJson: String!,

@@ -21,2 +22,3 @@ $baseEnvironmentAlias: String,

headVcsCommitId: $headVcsCommitId,
baseVcsBranch: $baseVcsBranch,
headEnvironmentVariablesJson: $headEnvironmentVariablesJson,

@@ -38,3 +40,3 @@ baseEnvironmentAlias: $baseEnvironmentAlias,

}`;
async function callNotifyVCSBranchBuildDeployedMutation(deps, apiConfig, { baseEnvironmentAlias, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }) {
async function callNotifyVCSBranchBuildDeployedMutation(deps, apiConfig, { baseEnvironmentAlias, baseVcsBranch, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }) {
return (0, graphql_1.qawolfGraphql)({

@@ -47,2 +49,3 @@ apiConfig,

baseEnvironmentAlias: baseEnvironmentAlias ?? null,
baseVcsBranch: baseVcsBranch ?? null,
concurrencyLimit: concurrencyLimit ?? null,

@@ -49,0 +52,0 @@ headEnvironmentAlias,

@@ -20,4 +20,5 @@ "use strict";

log.error(`🚫 Network error from deploy_success, aborting.`);
else if (responseState.failureReason === "5XX-server-error")
else if (responseState.failureReason === "5XX-server-error") {
log.error(`🚫 Server error from deploy_success (status ${responseState.httpStatus}), aborting. Please contact support.`);
}
else if (responseState.failureReason === "4XX-client-error") {

@@ -32,5 +33,4 @@ log.error(`🚫 Unrecoverable error from deploy_success (status ${responseState.httpStatus}), aborting. Please contact support.`);

}
else {
else
(0, utils_1.assertType)(responseState);
}
if (responseState.failureReason === "network-error") {

@@ -37,0 +37,0 @@ return {

@@ -22,14 +22,10 @@ "use strict";

else {
if (responseState.httpStatus === 400) {
if (responseState.httpStatus === 400)
abortReason = "400-invalid-request";
}
else if (responseState.httpStatus === 401) {
else if (responseState.httpStatus === 401)
abortReason = "401-invalid-credentials";
}
else if (responseState.httpStatus === 403) {
else if (responseState.httpStatus === 403)
abortReason = "403-forbidden";
}
else if (responseState.httpStatus === 0) {
else if (responseState.httpStatus === 0)
abortReason = "client-network-error";
}
log.error(`🚫 Unrecoverable error (status ${responseState.httpStatus}) when generating signed upload url: ${responseState.errorMessage ? `${responseState.errorMessage}.` : ""} aborting.`);

@@ -36,0 +32,0 @@ }

@@ -22,14 +22,10 @@ "use strict";

else {
if (responseState.httpStatus === 400) {
if (responseState.httpStatus === 400)
abortReason = "400-invalid-request";
}
else if (responseState.httpStatus === 401) {
else if (responseState.httpStatus === 401)
abortReason = "401-invalid-credentials";
}
else if (responseState.httpStatus === 403) {
else if (responseState.httpStatus === 403)
abortReason = "403-forbidden";
}
else if (responseState.httpStatus === 0) {
else if (responseState.httpStatus === 0)
abortReason = "client-network-error";
}
log.error(`🚫 Unrecoverable error (status ${responseState.httpStatus}) when generating signed upload url: ${responseState.errorMessage ? `${responseState.errorMessage}.` : ""} aborting.`);

@@ -36,0 +32,0 @@ }

@@ -26,3 +26,3 @@ "use strict";

deps.log.error("baseEnvironmentVariablesJSON is not an object");
throw new Error("baseEnvironmentVariablesJSON is not an object");
throw Error("baseEnvironmentVariablesJSON is not an object");
}

@@ -29,0 +29,0 @@ const combinedEnvironmentVariables = {

@@ -5,2 +5,4 @@ "use strict";

const constants_1 = require("./constants");
// Migration debt, clean up when convenient
// eslint-disable-next-line @qawolf/restrict-names
async function findOrCreateEnvironment(deps, apiConfig, { baseEnvironmentId, branch, pr, qaWolfTeamId, }) {

@@ -65,5 +67,4 @@ const retrievalResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {

deps.log.info(`Environment response: ${JSON.stringify(createionResponseJson)}`);
if (!createionResponseJson.data.createEnvironment.id) {
if (!createionResponseJson.data.createEnvironment.id)
throw Error("Environment ID not found in response");
}
const multiBranchResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {

@@ -93,5 +94,4 @@ body: JSON.stringify({

const hasMultipleBranches = multiBranchResponseJson.data.teamBranches.length > 1;
if (!hasMultipleBranches) {
if (!hasMultipleBranches)
return createionResponseJson.data.createEnvironment.id;
}
const sourceEnvironmentResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {

@@ -122,5 +122,4 @@ body: JSON.stringify({

const targetBranchId = createionResponseJson.data.createEnvironment.branchId;
if (!baseBranchId) {
if (!baseBranchId)
throw Error("Base branch ID not found in response");
}
deps.log.info(`Promoting workflows from branch ${baseBranchId} to ${targetBranchId}`);

@@ -153,7 +152,6 @@ const promotionResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {

const promotionResponseJson = await promotionResponse.json();
if (!promotionResponseJson) {
throw new Error("Promotion failed");
}
if (!promotionResponseJson)
throw Error("Promotion failed");
return createionResponseJson.data.createEnvironment.id;
}
//# sourceMappingURL=findOrCreateEnvironment.js.map

@@ -5,2 +5,4 @@ "use strict";

const constants_1 = require("./constants");
// Migration debt, clean up when convenient
// eslint-disable-next-line @qawolf/restrict-names
async function findOrCreateTrigger(deps, apiConfig, args) {

@@ -91,5 +93,4 @@ const { branch, environmentId, pr, qaWolfTeamId, repositoryId, tags } = args;

const triggerId = creationResponseJson.data?.createTrigger?.id;
if (!triggerId) {
if (!triggerId)
throw Error("Trigger ID not found in response");
}
deps.log.info(`Trigger created with ID: ${triggerId}`);

@@ -96,0 +97,0 @@ return triggerId;

@@ -32,7 +32,6 @@ "use strict";

const repositories = responseJson.data.codeHostingServiceRepositories;
if (!repositories[0]) {
if (!repositories[0])
return;
}
return repositories[0].id;
}
//# sourceMappingURL=findRepositoryIdByName.js.map

@@ -33,7 +33,6 @@ "use strict";

const triggers = responseJson.data.triggers;
if (!triggers || !triggers[0]) {
if (!triggers || !triggers[0])
throw Error(`No environment found for branch: ${branch}`);
}
return triggers[0].environment_id;
}
//# sourceMappingURL=getEnvironmentIdForBranch.js.map

@@ -42,3 +42,3 @@ "use strict";

: ""} from CI greenlight, aborting after ${maxRetries} attempts.`);
if (responseState.errorType === "network")
if (responseState.errorType === "network") {
return {

@@ -49,2 +49,3 @@ abortReason: "network-error",

};
}
let abortReason = "XXX-other-http-code";

@@ -80,3 +81,3 @@ if (responseState.errorType === "not-found")

if (!previousStatus ||
previousStatus.runStage !== greenlightStatus.runStage)
previousStatus.runStage !== greenlightStatus.runStage) {
try {

@@ -88,2 +89,3 @@ await onRunStageChanged(greenlightStatus, previousStatus);

}
}
const urlInfo = `See ${greenlightStatus.relevantRunUrl}`;

@@ -156,5 +158,4 @@ const { greenlight, relevantRunId, relevantRunUrl, relevantRunWithBugsUrl, rootRunId, rootRunUrl, runStage, } = greenlightStatus;

}
else {
throw new Error(`Unexpected run stage: ${runStage}`);
}
else
throw Error(`Unexpected run stage: ${runStage}`);
}

@@ -161,0 +162,0 @@ log.warn(`❌ Poll timed out after ${pollTimeout / 1000}s. Aborting...`);

@@ -5,3 +5,2 @@ import { type SdkDependencies } from "../../dependencies";

import { type NotifyMergeCompletedResult, type NotifyVCSBranchMergeCompletedInput } from "./notify-vcs-branch-merge-completed";
export * from "./types";
export * from "./lib/aliases";

@@ -11,2 +10,3 @@ export type { NotifyBuildDeployedInput, NotifyBuildDeployedResult, } from "./notify-vcs-branch-build-deployed";

export type { NotifyMergeCompletedResult, NotifyVCSBranchMergeCompletedInput, } from "./notify-vcs-branch-merge-completed";
export * from "./types";
export declare function makeVCSBranchTestingSDK({ apiKey, serviceBase, }: {

@@ -13,0 +13,0 @@ apiKey: string;

@@ -11,4 +11,4 @@ "use strict";

const notify_vcs_branch_merge_completed_1 = require("./notify-vcs-branch-merge-completed");
tslib_1.__exportStar(require("./lib/aliases"), exports);
tslib_1.__exportStar(require("./types"), exports);
tslib_1.__exportStar(require("./lib/aliases"), exports);
function makeVCSBranchTestingSDK({ apiKey, serviceBase = serviceBase_1.defaultServiceBase, }, { fetch = fetch_1.defaultFetch, log = log_1.defaultLogDriver, } = {}) {

@@ -15,0 +15,0 @@ const deps = { fetch, log };

@@ -51,5 +51,5 @@ "use strict";

(0, utils_1.assertType)(result.failureCode);
throw new Error(`[${methodName}] Unreachable code detected. This is a bug.`);
throw Error(`[${methodName}] Unreachable code detected. This is a bug.`);
}
}
//# sourceMappingURL=domain-failure.js.map

@@ -24,5 +24,5 @@ "use strict";

(0, utils_1.assertType)(graphQLPayload.errorCode);
throw new Error("Unreachable code detected. This is a bug.");
throw Error("Unreachable code detected. This is a bug.");
}
}
//# sourceMappingURL=graphql-error.js.map

@@ -14,5 +14,4 @@ "use strict";

if (result.outcome === "success" ||
!retriableAbortReasons.includes(result.abortReason)) {
!retriableAbortReasons.includes(result.abortReason))
return result;
}
// Exit if max retries reached

@@ -19,0 +18,0 @@ if (attemptNumber >= maxRetries + 1)

@@ -12,11 +12,7 @@ "use strict";

const log = deps.log;
const baseEnvironmentAlias = baseEnvironmentsMapping.find((mapping) => mapping.vcsBranch === baseVcsBranch)?.environmentAlias;
if (baseEnvironmentAlias === undefined) {
log.info(`ℹ️ [notifyVCSBranchBuildDeployed] Could not find a base environment for VCS branch '${baseVcsBranch}'. Fall back to use the default base environment`);
}
const baseEnvironmentAlias = baseEnvironmentsMapping?.find((mapping) => mapping.vcsBranch === baseVcsBranch)?.environmentAlias;
let finalConcurrencyLimit = concurrencyLimit;
if (typeof concurrencyLimit === "number") {
if (concurrencyLimit === Infinity) {
if (concurrencyLimit === Infinity)
finalConcurrencyLimit = 0;
}
else if (isNaN(concurrencyLimit) || !Number.isInteger(concurrencyLimit)) {

@@ -39,2 +35,3 @@ log.error(`❌ [notifyVCSBranchBuildDeployed] Invalid concurrency limit '${concurrencyLimit}'. Must be a positive integer.`);

baseEnvironmentAlias,
baseVcsBranch,
concurrencyLimit: finalConcurrencyLimit,

@@ -41,0 +38,0 @@ headEnvironmentAlias,

@@ -12,3 +12,3 @@ "use strict";

const { baseEnvironmentsMapping, baseVcsBranch: vcsBaseBranch } = input;
const baseEnvironmentAlias = baseEnvironmentsMapping.find((mapping) => mapping.vcsBranch === vcsBaseBranch)?.environmentAlias;
const baseEnvironmentAlias = baseEnvironmentsMapping?.find((mapping) => mapping.vcsBranch === vcsBaseBranch)?.environmentAlias;
if (baseEnvironmentAlias === undefined) {

@@ -15,0 +15,0 @@ log.info(`ℹ️ [notifyVCSBranchMergeCompleted] Could not find a base environment for VCS branch '${vcsBaseBranch}'. Fall back to use the default base environment`);

@@ -14,4 +14,6 @@ export type BaseVCSBranchConfig = {

* and a VCS branch. Use environment aliases to refer to a particular environment.
* If not provided, base environment identification will be handled by the QA Wolf
* app.
*/
baseEnvironmentsMapping: Array<{
baseEnvironmentsMapping?: Array<{
environmentAlias: string;

@@ -30,5 +32,3 @@ vcsBranch: string;

* The base VCS branch from which this
* branch was created. This will allow
* QA Wolf to determine the base environment
* to use given `baseEnvironmentsMapping`.
* branch was created.
*/

@@ -35,0 +35,0 @@ baseVcsBranch: string;

@@ -31,6 +31,6 @@ import { type SdkDependencies } from "./dependencies";

};
export type * from "./domain/attempt-deploy";
export type * from "./domain/generateSignedUrls/types";
export type * from "./domain/poll-ci-greenlight";
export type * from "./domain/attempt-deploy";
export * from "./domain/vcsBranchTesting/index";
export type * from "./domain/generateSignedUrls/types";
//# sourceMappingURL=index.d.ts.map

@@ -17,3 +17,3 @@ "use strict";

if (typeof fetch !== "function") {
throw new Error(`QA Wolf CI-SDK requires fetch to be defined. Make sure you are using NodeJS 18+, OR pass a fetch polyfill to the makeQaWolfSdk function.
throw Error(`QA Wolf CI-SDK requires fetch to be defined. Make sure you are using NodeJS 18+, OR pass a fetch polyfill to the makeQaWolfSdk function.
We recommend 'undici' package for that purpose. See the Requirement section of our README for more guidance.`);

@@ -20,0 +20,0 @@ }

@@ -95,3 +95,3 @@ "use strict";

it("should handle retries with network errors", async () => {
fetchMock.mockRejectedValue(new Error("network error"));
fetchMock.mockRejectedValue(Error("network error"));
const expectedValue = {

@@ -98,0 +98,0 @@ abortReason: "network-error",

@@ -0,4 +1,4 @@

export type { CiGreenlightStatus, CiGreenlightStatusBase, DeployConfig, DeployStatus, } from "./lib/api/index.js";
export * from "./lib/sdk/dependencies.js";
export * from "./lib/sdk/index.js";
export * from "./lib/sdk/dependencies.js";
export type { CiGreenlightStatus, CiGreenlightStatusBase, DeployConfig, DeployStatus, } from "./lib/api/index.js";
//# sourceMappingURL=index.d.ts.map

@@ -1,19 +0,3 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./lib/sdk/index.js"), exports);
__exportStar(require("./lib/sdk/dependencies.js"), exports);
export * from "./lib/sdk/dependencies.js";
export * from "./lib/sdk/index.js";
//# sourceMappingURL=index.js.map

@@ -1,3 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};
//# sourceMappingURL=api-types.js.map

@@ -49,6 +49,35 @@ import { type ApiConfig } from "../api-types";

export type CiGreenlightBugData = {
/**
* The count of blocking bugs reproduced in the run.
*/
blockingBugsCount: number;
/**
* The URLs of the blocking bugs.
*
* @deprecated This field will be removed in the next major version.
* Prefer using `reproducedBugs` filtered by `isBlocking: true`, reading
* the `applicationUrl` field.
*/
blockingBugUrls: string[];
/**
* The count of non-blocking bugs reproduced in the run.
*/
nonBlockingBugsCount: number;
/**
* The URLs of the non-blocking bugs.
*
* @deprecated This field will be removed in the next major version.
* Prefer using `reproducedBugs` filtered by `isBlocking: false`, reading
* the `applicationUrl` field.
*/
nonBlockingBugUrls: string[];
/**
* Blocking bugs that were not reproduced in this run, but are still
* opened in the run environment. This may happen when the run only covers a
* subset of the workflows in environment.
*/
otherBlockingBugsInEnvironment: CiGreenlightBugDetails[];
/**
* Bugs that were reproduced in this run. This includes newly found bugs.
*/
reproducedBugs: CiGreenlightBugDetails[];

@@ -55,0 +84,0 @@ };

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchCiGreenlightStatus = fetchCiGreenlightStatus;
async function fetchCiGreenlightStatus({ apiKey, serviceBase }, { runId, }, { fetch: localFetch }) {
export async function fetchCiGreenlightStatus({ apiKey, serviceBase }, { runId, }, { fetch: localFetch }) {
try {

@@ -6,0 +3,0 @@ const resp = await localFetch(new URL(`/api/v0/ci-greenlight/${encodeURIComponent(runId)}`, serviceBase), {

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.postDeploySuccess = postDeploySuccess;
async function postDeploySuccess({ apiKey, serviceBase }, { branch, commitUrl, deduplicationKey, deploymentType, deploymentUrl, hostingService, sha, variables, }, { fetch: localFetch }) {
export async function postDeploySuccess({ apiKey, serviceBase }, { branch, commitUrl, deduplicationKey, deploymentType, deploymentUrl, hostingService, sha, variables, }, { fetch: localFetch }) {
try {

@@ -6,0 +3,0 @@ const response = await localFetch(new URL("/api/webhooks/deploy_success", serviceBase), {

import { type ApiConfig } from "../api-types";
import { type SdkDependencies } from "../sdk/dependencies";
import { type GenerateSignedUrlConfig, type GenerateSignedUrlResponse } from "../sdk/domain/generateSignedUrls/types";
export declare function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }: ApiConfig, { destinationFilePath }: Partial<GenerateSignedUrlConfig>, { fetch: localFetch }: SdkDependencies): Promise<GenerateSignedUrlResponse>;
export declare function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }: ApiConfig, { destinationFilePath }: GenerateSignedUrlConfig, { fetch: localFetch }: SdkDependencies): Promise<GenerateSignedUrlResponse>;
//# sourceMappingURL=generate-signed-url-for-run-inputs-executables.d.ts.map

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callGenerateSignedUrlForRunInputsExecutablesStorage = callGenerateSignedUrlForRunInputsExecutablesStorage;
async function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }, { destinationFilePath }, { fetch: localFetch }) {
export async function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }, { destinationFilePath }, { fetch: localFetch }) {
try {
const response = await localFetch(new URL(`${serviceBase}/api/v0/run-inputs-executables-signed-urls?file=${destinationFilePath}`), {
const response = await localFetch(new URL(`${serviceBase}/api/v0/run-inputs-executables-signed-urls?file=${encodeURIComponent(destinationFilePath)}`), {
headers: {

@@ -8,0 +5,0 @@ Authorization: `Bearer ${apiKey}`,

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callGenerateSignedUrlForTempTeamStorage = callGenerateSignedUrlForTempTeamStorage;
async function callGenerateSignedUrlForTempTeamStorage({ apiKey, serviceBase }, { destinationFilePath }, { fetch: localFetch }) {
export async function callGenerateSignedUrlForTempTeamStorage({ apiKey, serviceBase }, { destinationFilePath }, { fetch: localFetch }) {
try {

@@ -6,0 +3,0 @@ const response = await localFetch(new URL(`${serviceBase}/api/v0/team-storage-signed-url?file=${destinationFilePath}`), {

@@ -1,4 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.qawolfGraphql = qawolfGraphql;
class GraphQLBadResponseError extends Error {

@@ -10,3 +7,3 @@ constructor(message) {

}
async function qawolfGraphql({ apiConfig: { apiKey, serviceBase }, deps: { fetch: localFetch, log }, name, query: queryGql, variables, }) {
export async function qawolfGraphql({ apiConfig: { apiKey, serviceBase }, deps: { fetch: localFetch, log }, name, query: queryGql, variables, }) {
try {

@@ -33,5 +30,4 @@ const response = await localFetch(new URL(`/api/graphql`, serviceBase), {

const extensionsCodes = rawBody.errors.flatMap((error) => error.extensions?.map?.((ext) => ext.code) ?? []);
for (const error of rawBody.errors) {
for (const error of rawBody.errors)
log.warn(`❌ [GraphQL] error: ${error.message}`);
}
const isUnauthenticated = extensionsCodes.includes("UNAUTHENTICATED");

@@ -38,0 +34,0 @@ const isForbidden = extensionsCodes.includes("FORBIDDEN");

@@ -1,20 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./ci-greenlight.js"), exports);
__exportStar(require("./deploy.js"), exports);
__exportStar(require("./generate-signed-url-for-team-storage.js"), exports);
export * from "./ci-greenlight.js";
export * from "./deploy.js";
export * from "./generate-signed-url-for-team-storage.js";
//# sourceMappingURL=index.js.map

@@ -6,2 +6,3 @@ import { type ApiConfig } from "../api-types";

baseEnvironmentAlias: string | undefined;
baseVcsBranch: string | undefined;
concurrencyLimit: number | undefined;

@@ -25,3 +26,3 @@ headEnvironmentAlias: string;

};
export declare function callNotifyVCSBranchBuildDeployedMutation(deps: SdkDependencies, apiConfig: ApiConfig, { baseEnvironmentAlias, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }: NotifyVCSBranchBuildDeployedMutationInput): Promise<GraphQLResponse<NotifyVCSBranchBuildDeployedResponseSchema>>;
export declare function callNotifyVCSBranchBuildDeployedMutation(deps: SdkDependencies, apiConfig: ApiConfig, { baseEnvironmentAlias, baseVcsBranch, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }: NotifyVCSBranchBuildDeployedMutationInput): Promise<GraphQLResponse<NotifyVCSBranchBuildDeployedResponseSchema>>;
//# sourceMappingURL=notify-vcs-branch-build-deployed-mutation.d.ts.map

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callNotifyVCSBranchBuildDeployedMutation = callNotifyVCSBranchBuildDeployedMutation;
const graphql_1 = require("./graphql");
import { qawolfGraphql } from "./graphql";
const mutationName = "notifyVCSBranchBuildDeployed";

@@ -9,2 +6,3 @@ const mutationGql = `

$headVcsCommitId: String!,
$baseVcsBranch: String,
$headEnvironmentVariablesJson: String!,

@@ -21,2 +19,3 @@ $baseEnvironmentAlias: String,

headVcsCommitId: $headVcsCommitId,
baseVcsBranch: $baseVcsBranch,
headEnvironmentVariablesJson: $headEnvironmentVariablesJson,

@@ -38,4 +37,4 @@ baseEnvironmentAlias: $baseEnvironmentAlias,

}`;
async function callNotifyVCSBranchBuildDeployedMutation(deps, apiConfig, { baseEnvironmentAlias, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }) {
return (0, graphql_1.qawolfGraphql)({
export async function callNotifyVCSBranchBuildDeployedMutation(deps, apiConfig, { baseEnvironmentAlias, baseVcsBranch, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }) {
return qawolfGraphql({
apiConfig,

@@ -47,2 +46,3 @@ deps,

baseEnvironmentAlias: baseEnvironmentAlias ?? null,
baseVcsBranch: baseVcsBranch ?? null,
concurrencyLimit: concurrencyLimit ?? null,

@@ -49,0 +49,0 @@ headEnvironmentAlias,

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callNotifyVCSBranchMergeCanceledMutation = callNotifyVCSBranchMergeCanceledMutation;
const graphql_1 = require("./graphql");
import { qawolfGraphql } from "./graphql";
const mutationName = "notifyVCSBranchMergeCanceled";

@@ -14,4 +11,4 @@ const mutationGql = `

}`;
async function callNotifyVCSBranchMergeCanceledMutation(deps, apiConfig, { headEnvironmentAlias }) {
return (0, graphql_1.qawolfGraphql)({
export async function callNotifyVCSBranchMergeCanceledMutation(deps, apiConfig, { headEnvironmentAlias }) {
return qawolfGraphql({
apiConfig,

@@ -18,0 +15,0 @@ deps,

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callNotifyVCSBranchMergeCompletedMutation = callNotifyVCSBranchMergeCompletedMutation;
const graphql_1 = require("./graphql");
import { qawolfGraphql } from "./graphql";
const mutationName = "notifyVCSBranchMergeCompleted";

@@ -14,4 +11,4 @@ const mutationGql = `

}`;
async function callNotifyVCSBranchMergeCompletedMutation(deps, apiConfig, { baseEnvironmentAlias, headEnvironmentAlias, }) {
return (0, graphql_1.qawolfGraphql)({
export async function callNotifyVCSBranchMergeCompletedMutation(deps, apiConfig, { baseEnvironmentAlias, headEnvironmentAlias, }) {
return qawolfGraphql({
apiConfig,

@@ -18,0 +15,0 @@ deps,

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultFetch = void 0;
exports.defaultFetch = globalThis.fetch;
export const defaultFetch = globalThis.fetch;
//# sourceMappingURL=fetch.js.map

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultLogDriver = void 0;
exports.defaultLogDriver = {
export const defaultLogDriver = {
error(message, error) {

@@ -6,0 +3,0 @@ console.error(message, error);

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultServiceBase = void 0;
exports.defaultServiceBase = "https://app.qawolf.com/";
export const defaultServiceBase = "https://app.qawolf.com/";
//# sourceMappingURL=serviceBase.js.map

@@ -1,3 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};
//# sourceMappingURL=dependencies.js.map

@@ -1,9 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.attemptNotifyDeploy = attemptNotifyDeploy;
const deploy_1 = require("../../api/deploy");
const utils_1 = require("../../utils");
async function attemptNotifyDeploy(deps, apiConfig, config) {
import { postDeploySuccess } from "../../api/deploy";
import { assertType } from "../../utils";
export async function attemptNotifyDeploy(deps, apiConfig, config) {
const { log } = deps;
const responseState = await (0, deploy_1.postDeploySuccess)(apiConfig, config, deps);
const responseState = await postDeploySuccess(apiConfig, config, deps);
if (!responseState.success) {

@@ -20,4 +17,5 @@ if (responseState.failureReason === "no-matched-trigger") {

log.error(`🚫 Network error from deploy_success, aborting.`);
else if (responseState.failureReason === "5XX-server-error")
else if (responseState.failureReason === "5XX-server-error") {
log.error(`🚫 Server error from deploy_success (status ${responseState.httpStatus}), aborting. Please contact support.`);
}
else if (responseState.failureReason === "4XX-client-error") {

@@ -32,5 +30,4 @@ log.error(`🚫 Unrecoverable error from deploy_success (status ${responseState.httpStatus}), aborting. Please contact support.`);

}
else {
(0, utils_1.assertType)(responseState);
}
else
assertType(responseState);
if (responseState.failureReason === "network-error") {

@@ -37,0 +34,0 @@ return {

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSignedUrlForRunInputsExecutablesStorage = generateSignedUrlForRunInputsExecutablesStorage;
const generate_signed_url_for_run_inputs_executables_1 = require("../../../api/generate-signed-url-for-run-inputs-executables");
async function generateSignedUrlForRunInputsExecutablesStorage(deps, apiConfig, config) {
import { callGenerateSignedUrlForRunInputsExecutablesStorage } from "../../../api/generate-signed-url-for-run-inputs-executables";
export async function generateSignedUrlForRunInputsExecutablesStorage(deps, apiConfig, config) {
const { log } = deps;

@@ -14,3 +11,3 @@ if (!config.destinationFilePath) {

}
const responseState = await (0, generate_signed_url_for_run_inputs_executables_1.callGenerateSignedUrlForRunInputsExecutablesStorage)(apiConfig, config, deps);
const responseState = await callGenerateSignedUrlForRunInputsExecutablesStorage(apiConfig, config, deps);
if (!responseState.success) {

@@ -23,14 +20,10 @@ let abortReason = "XXX-other-http-code";

else {
if (responseState.httpStatus === 400) {
if (responseState.httpStatus === 400)
abortReason = "400-invalid-request";
}
else if (responseState.httpStatus === 401) {
else if (responseState.httpStatus === 401)
abortReason = "401-invalid-credentials";
}
else if (responseState.httpStatus === 403) {
else if (responseState.httpStatus === 403)
abortReason = "403-forbidden";
}
else if (responseState.httpStatus === 0) {
else if (responseState.httpStatus === 0)
abortReason = "client-network-error";
}
log.error(`🚫 Unrecoverable error (status ${responseState.httpStatus}) when generating signed upload url: ${responseState.errorMessage ? `${responseState.errorMessage}.` : ""} aborting.`);

@@ -37,0 +30,0 @@ }

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSignedUrlForTempTeamStorage = generateSignedUrlForTempTeamStorage;
const generate_signed_url_for_team_storage_1 = require("../../../api/generate-signed-url-for-team-storage");
async function generateSignedUrlForTempTeamStorage(deps, apiConfig, config) {
import { callGenerateSignedUrlForTempTeamStorage } from "../../../api/generate-signed-url-for-team-storage";
export async function generateSignedUrlForTempTeamStorage(deps, apiConfig, config) {
const { log } = deps;

@@ -14,3 +11,3 @@ if (!config.destinationFilePath) {

}
const responseState = await (0, generate_signed_url_for_team_storage_1.callGenerateSignedUrlForTempTeamStorage)(apiConfig, config, deps);
const responseState = await callGenerateSignedUrlForTempTeamStorage(apiConfig, config, deps);
if (!responseState.success) {

@@ -23,14 +20,10 @@ let abortReason = "XXX-other-http-code";

else {
if (responseState.httpStatus === 400) {
if (responseState.httpStatus === 400)
abortReason = "400-invalid-request";
}
else if (responseState.httpStatus === 401) {
else if (responseState.httpStatus === 401)
abortReason = "401-invalid-credentials";
}
else if (responseState.httpStatus === 403) {
else if (responseState.httpStatus === 403)
abortReason = "403-forbidden";
}
else if (responseState.httpStatus === 0) {
else if (responseState.httpStatus === 0)
abortReason = "client-network-error";
}
log.error(`🚫 Unrecoverable error (status ${responseState.httpStatus}) when generating signed upload url: ${responseState.errorMessage ? `${responseState.errorMessage}.` : ""} aborting.`);

@@ -37,0 +30,0 @@ }

@@ -1,3 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};
//# sourceMappingURL=types.js.map

@@ -1,8 +0,5 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.previewDeploymentType = exports.qawolfDeploySuccessEndpoint = exports.qawolfGraphQLEndpoint = exports.qawolfBaseUrl = void 0;
exports.qawolfBaseUrl = "https://app.qawolf.com";
exports.qawolfGraphQLEndpoint = `${exports.qawolfBaseUrl}/api/graphql`;
exports.qawolfDeploySuccessEndpoint = `${exports.qawolfBaseUrl}/api/webhooks/deploy_success`;
exports.previewDeploymentType = "qawolf-preview";
export const qawolfBaseUrl = "https://app.qawolf.com";
export const qawolfGraphQLEndpoint = `${qawolfBaseUrl}/api/graphql`;
export const qawolfDeploySuccessEndpoint = `${qawolfBaseUrl}/api/webhooks/deploy_success`;
export const previewDeploymentType = "qawolf-preview";
//# sourceMappingURL=constants.js.map

@@ -1,13 +0,10 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEnvironmentAction = void 0;
const createEnvironmentVariables_1 = require("./createEnvironmentVariables");
const findOrCreateEnvironment_1 = require("./findOrCreateEnvironment");
const findOrCreateTrigger_1 = require("./findOrCreateTrigger");
const findRepositoryIdByName_1 = require("./findRepositoryIdByName");
const getEnvironmentVariablesFromEnvironment_1 = require("./getEnvironmentVariablesFromEnvironment");
const getTagsFromEnvironment_1 = require("./getTagsFromEnvironment");
const createEnvironmentAction = async (deps, apiConfig, { baseEnvironmentId, branch, deploymentUrl, headRepoFullName, pr, qaWolfTeamId, variables, }) => {
import { createEnvironmentVariables } from "./createEnvironmentVariables";
import { findOrCreateEnvironment } from "./findOrCreateEnvironment";
import { findOrCreateTrigger } from "./findOrCreateTrigger";
import { findRepositoryIdByName } from "./findRepositoryIdByName";
import { getEnvironmentVariablesFromEnvironment } from "./getEnvironmentVariablesFromEnvironment";
import { getTagsFromGenericTriggerInEnvironment } from "./getTagsFromEnvironment";
export const createEnvironmentAction = async (deps, apiConfig, { baseEnvironmentId, branch, deploymentUrl, headRepoFullName, pr, qaWolfTeamId, variables, }) => {
deps.log.info("Creating environment for pull request...");
const environmentId = await (0, findOrCreateEnvironment_1.findOrCreateEnvironment)(deps, apiConfig, {
const environmentId = await findOrCreateEnvironment(deps, apiConfig, {
baseEnvironmentId,

@@ -20,3 +17,3 @@ branch,

const baseEnvironmentVariablesJSON = baseEnvironmentId
? await (0, getEnvironmentVariablesFromEnvironment_1.getEnvironmentVariablesFromEnvironment)(deps, apiConfig, {
? await getEnvironmentVariablesFromEnvironment(deps, apiConfig, {
environmentId: baseEnvironmentId,

@@ -27,3 +24,3 @@ })

deps.log.error("baseEnvironmentVariablesJSON is not an object");
throw new Error("baseEnvironmentVariablesJSON is not an object");
throw Error("baseEnvironmentVariablesJSON is not an object");
}

@@ -36,3 +33,3 @@ const combinedEnvironmentVariables = {

deps.log.info("Creating environment variables...");
await (0, createEnvironmentVariables_1.createEnvironmentVariables)(deps, apiConfig, {
await createEnvironmentVariables(deps, apiConfig, {
environmentId,

@@ -43,3 +40,3 @@ variables: combinedEnvironmentVariables,

deps.log.info("Retrieving repository ID...");
const repositoryId = await (0, findRepositoryIdByName_1.findRepositoryIdByName)(deps, apiConfig, {
const repositoryId = await findRepositoryIdByName(deps, apiConfig, {
headRepoFullName,

@@ -51,3 +48,3 @@ });

const tags = baseEnvironmentId
? await (0, getTagsFromEnvironment_1.getTagsFromGenericTriggerInEnvironment)(deps, apiConfig, {
? await getTagsFromGenericTriggerInEnvironment(deps, apiConfig, {
environmentId: baseEnvironmentId,

@@ -58,3 +55,3 @@ })

deps.log.info("Creating trigger for deployment...");
await (0, findOrCreateTrigger_1.findOrCreateTrigger)(deps, apiConfig, {
await findOrCreateTrigger(deps, apiConfig, {
branch,

@@ -68,3 +65,2 @@ environmentId,

};
exports.createEnvironmentAction = createEnvironmentAction;
//# sourceMappingURL=createEnvironmentAction.js.map

@@ -1,9 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEnvironmentVariables = createEnvironmentVariables;
const constants_1 = require("./constants");
async function createEnvironmentVariables(deps, apiConfig, { environmentId, variables, }) {
import { qawolfGraphQLEndpoint } from "./constants";
export async function createEnvironmentVariables(deps, apiConfig, { environmentId, variables, }) {
const environmentVariableRequests = Object.keys(variables).map(async (key) => {
const value = variables[key];
return deps.fetch(constants_1.qawolfGraphQLEndpoint, {
return deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -10,0 +7,0 @@ query: `

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteEnvironment = deleteEnvironment;
const constants_1 = require("./constants");
async function deleteEnvironment(deps, apiConfig, { environmentId, }) {
await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
import { qawolfGraphQLEndpoint } from "./constants";
export async function deleteEnvironment(deps, apiConfig, { environmentId, }) {
await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -8,0 +5,0 @@ query: `

@@ -1,13 +0,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteEnvironmentAction = void 0;
const deleteEnvironment_1 = require("./deleteEnvironment");
const getEnvironmentIdForBranch_1 = require("./getEnvironmentIdForBranch");
const deleteEnvironmentAction = async (deps, apiConfig, { branch, }) => {
import { deleteEnvironment } from "./deleteEnvironment";
import { getEnvironmentIdForBranch } from "./getEnvironmentIdForBranch";
export const deleteEnvironmentAction = async (deps, apiConfig, { branch, }) => {
deps.log.info("Retrieving environment ID for deletion...");
const environmentId = await (0, getEnvironmentIdForBranch_1.getEnvironmentIdForBranch)(deps, apiConfig, branch);
const environmentId = await getEnvironmentIdForBranch(deps, apiConfig, branch);
deps.log.info(`Deleting environment with ID: ${environmentId}`);
await (0, deleteEnvironment_1.deleteEnvironment)(deps, apiConfig, { environmentId });
await deleteEnvironment(deps, apiConfig, { environmentId });
};
exports.deleteEnvironmentAction = deleteEnvironmentAction;
//# sourceMappingURL=deleteEnvironmentAction.js.map

@@ -1,7 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findOrCreateEnvironment = findOrCreateEnvironment;
const constants_1 = require("./constants");
async function findOrCreateEnvironment(deps, apiConfig, { baseEnvironmentId, branch, pr, qaWolfTeamId, }) {
const retrievalResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
import { qawolfGraphQLEndpoint } from "./constants";
// Migration debt, clean up when convenient
// eslint-disable-next-line @qawolf/restrict-names
export async function findOrCreateEnvironment(deps, apiConfig, { baseEnvironmentId, branch, pr, qaWolfTeamId, }) {
const retrievalResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -40,3 +39,3 @@ query: `

}
const creationResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
const creationResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -65,6 +64,5 @@ operationName: "createEnvironment",

deps.log.info(`Environment response: ${JSON.stringify(createionResponseJson)}`);
if (!createionResponseJson.data.createEnvironment.id) {
if (!createionResponseJson.data.createEnvironment.id)
throw Error("Environment ID not found in response");
}
const multiBranchResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
const multiBranchResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -93,6 +91,5 @@ query: `

const hasMultipleBranches = multiBranchResponseJson.data.teamBranches.length > 1;
if (!hasMultipleBranches) {
if (!hasMultipleBranches)
return createionResponseJson.data.createEnvironment.id;
}
const sourceEnvironmentResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
const sourceEnvironmentResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -122,7 +119,6 @@ query: `

const targetBranchId = createionResponseJson.data.createEnvironment.branchId;
if (!baseBranchId) {
if (!baseBranchId)
throw Error("Base branch ID not found in response");
}
deps.log.info(`Promoting workflows from branch ${baseBranchId} to ${targetBranchId}`);
const promotionResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
const promotionResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -153,7 +149,6 @@ query: `

const promotionResponseJson = await promotionResponse.json();
if (!promotionResponseJson) {
throw new Error("Promotion failed");
}
if (!promotionResponseJson)
throw Error("Promotion failed");
return createionResponseJson.data.createEnvironment.id;
}
//# sourceMappingURL=findOrCreateEnvironment.js.map

@@ -1,9 +0,8 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findOrCreateTrigger = findOrCreateTrigger;
const constants_1 = require("./constants");
async function findOrCreateTrigger(deps, apiConfig, args) {
import { previewDeploymentType, qawolfGraphQLEndpoint } from "./constants";
// Migration debt, clean up when convenient
// eslint-disable-next-line @qawolf/restrict-names
export async function findOrCreateTrigger(deps, apiConfig, args) {
const { branch, environmentId, pr, qaWolfTeamId, repositoryId, tags } = args;
const triggerName = `Deployments of ${pr ? `PR #${pr.number} - ${pr.title}` : `branch ${branch}`}`;
const retrievalResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
const retrievalResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -41,3 +40,3 @@ query: `query getTriggersForBranch($where: TriggerWhereInput) {

}
const creationResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
const creationResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -74,3 +73,3 @@ operationName: "createTrigger",

deploymentBranches: branch,
deploymentEnvironment: constants_1.previewDeploymentType,
deploymentEnvironment: previewDeploymentType,
deploymentProvider: "generic",

@@ -92,5 +91,4 @@ environmentId,

const triggerId = creationResponseJson.data?.createTrigger?.id;
if (!triggerId) {
if (!triggerId)
throw Error("Trigger ID not found in response");
}
deps.log.info(`Trigger created with ID: ${triggerId}`);

@@ -97,0 +95,0 @@ return triggerId;

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findRepositoryIdByName = findRepositoryIdByName;
const constants_1 = require("./constants");
async function findRepositoryIdByName(deps, apiConfig, { headRepoFullName, }) {
const response = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
import { qawolfGraphQLEndpoint } from "./constants";
export async function findRepositoryIdByName(deps, apiConfig, { headRepoFullName, }) {
const response = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -32,7 +29,6 @@ query: `

const repositories = responseJson.data.codeHostingServiceRepositories;
if (!repositories[0]) {
if (!repositories[0])
return;
}
return repositories[0].id;
}
//# sourceMappingURL=findRepositoryIdByName.js.map

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnvironmentIdForBranch = getEnvironmentIdForBranch;
const constants_1 = require("./constants");
async function getEnvironmentIdForBranch(deps, apiConfig, branch) {
const response = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
import { qawolfGraphQLEndpoint } from "./constants";
export async function getEnvironmentIdForBranch(deps, apiConfig, branch) {
const response = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -33,7 +30,6 @@ query: `

const triggers = responseJson.data.triggers;
if (!triggers || !triggers[0]) {
if (!triggers || !triggers[0])
throw Error(`No environment found for branch: ${branch}`);
}
return triggers[0].environment_id;
}
//# sourceMappingURL=getEnvironmentIdForBranch.js.map

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnvironmentVariablesFromEnvironment = getEnvironmentVariablesFromEnvironment;
const constants_1 = require("./constants");
async function getEnvironmentVariablesFromEnvironment(deps, apiConfig, { environmentId, }) {
const retrievalResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
import { qawolfGraphQLEndpoint } from "./constants";
export async function getEnvironmentVariablesFromEnvironment(deps, apiConfig, { environmentId, }) {
const retrievalResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -8,0 +5,0 @@ query: `

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTagsFromGenericTriggerInEnvironment = getTagsFromGenericTriggerInEnvironment;
const constants_1 = require("./constants");
async function getTagsFromGenericTriggerInEnvironment(deps, apiConfig, { environmentId, }) {
const retrievalResponse = await deps.fetch(constants_1.qawolfGraphQLEndpoint, {
import { qawolfGraphQLEndpoint } from "./constants";
export async function getTagsFromGenericTriggerInEnvironment(deps, apiConfig, { environmentId, }) {
const retrievalResponse = await deps.fetch(qawolfGraphQLEndpoint, {
body: JSON.stringify({

@@ -8,0 +5,0 @@ query: `

@@ -1,11 +0,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.testPreview = testPreview;
exports.removeEnvironment = removeEnvironment;
const attempt_deploy_1 = require("../attempt-deploy");
const constants_1 = require("./constants");
const createEnvironmentAction_1 = require("./createEnvironmentAction");
const deleteEnvironmentAction_1 = require("./deleteEnvironmentAction");
async function testPreview(deps, apiConfig, config) {
await (0, createEnvironmentAction_1.createEnvironmentAction)(deps, apiConfig, {
import { attemptNotifyDeploy } from "../attempt-deploy";
import { previewDeploymentType } from "./constants";
import { createEnvironmentAction as createEnvironment } from "./createEnvironmentAction";
import { deleteEnvironmentAction } from "./deleteEnvironmentAction";
export async function testPreview(deps, apiConfig, config) {
await createEnvironment(deps, apiConfig, {
baseEnvironmentId: config.baseEnvironmentId,

@@ -19,6 +15,6 @@ branch: config.branch,

});
return (0, attempt_deploy_1.attemptNotifyDeploy)(deps, apiConfig, {
return attemptNotifyDeploy(deps, apiConfig, {
branch: config.branch,
commitUrl: config.commitUrl,
deploymentType: constants_1.previewDeploymentType,
deploymentType: previewDeploymentType,
deploymentUrl: config.deploymentUrl,

@@ -29,5 +25,5 @@ sha: config.sha,

}
async function removeEnvironment(deps, apiConfig, config) {
await (0, deleteEnvironmentAction_1.deleteEnvironmentAction)(deps, apiConfig, config);
export async function removeEnvironment(deps, apiConfig, config) {
await deleteEnvironmentAction(deps, apiConfig, config);
}
//# sourceMappingURL=index.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pollCiGreenlightStatus = pollCiGreenlightStatus;
const ci_greenlight_1 = require("../../api/ci-greenlight");
const utils_1 = require("../../utils");
import { fetchCiGreenlightStatus, } from "../../api/ci-greenlight";
import { assertType, pluralize, sleep } from "../../utils";
// If you change these values, make sure you update the JSDoc

@@ -16,3 +13,3 @@ // comments in the PollConfig type.

};
async function pollCiGreenlightStatus(deps, apiConfig, { onRunStageChanged: onRunStageChanged = () => void 0, runId, ...pollConfig }) {
export async function pollCiGreenlightStatus(deps, apiConfig, { onRunStageChanged: onRunStageChanged = () => void 0, runId, ...pollConfig }) {
let retries = 0;

@@ -25,3 +22,3 @@ const { log } = deps;

while (!(hasTimedOut = Date.now() - startedAt > pollTimeout)) {
const responseState = await (0, ci_greenlight_1.fetchCiGreenlightStatus)(apiConfig, {
const responseState = await fetchCiGreenlightStatus(apiConfig, {
runId,

@@ -44,3 +41,3 @@ }, deps);

: ""} from CI greenlight, aborting after ${maxRetries} attempts.`);
if (responseState.errorType === "network")
if (responseState.errorType === "network") {
return {

@@ -51,2 +48,3 @@ abortReason: "network-error",

};
}
let abortReason = "XXX-other-http-code";

@@ -58,3 +56,3 @@ if (responseState.errorType === "not-found")

else
(0, utils_1.assertType)(responseState);
assertType(responseState);
return {

@@ -74,3 +72,3 @@ abortReason,

log.warn(`❌ Server error${retryLabel}`);
await (0, utils_1.sleep)(retryInterval);
await sleep(retryInterval);
continue;

@@ -84,3 +82,3 @@ }

if (!previousStatus ||
previousStatus.runStage !== greenlightStatus.runStage)
previousStatus.runStage !== greenlightStatus.runStage) {
try {

@@ -92,2 +90,3 @@ await onRunStageChanged(greenlightStatus, previousStatus);

}
}
const urlInfo = `See ${greenlightStatus.relevantRunUrl}`;

@@ -122,3 +121,3 @@ const { greenlight, relevantRunId, relevantRunUrl, relevantRunWithBugsUrl, rootRunId, rootRunUrl, runStage, } = greenlightStatus;

log.info(`✅ Run passed and no blocking bugs found${nonBlockingBugsCount > 0
? ` and ${nonBlockingBugsCount} non-blocking bug${(0, utils_1.pluralize)(nonBlockingBugsCount)} found`
? ` and ${nonBlockingBugsCount} non-blocking bug${pluralize(nonBlockingBugsCount)} found`
: ""}.\n${urlInfo}`);

@@ -128,4 +127,4 @@ return { greenlightStatus, outcome: "success" };

else {
log.warn(`❌ Run failed and ${blockingBugsCount} blocking bug${(0, utils_1.pluralize)(blockingBugsCount)} found${nonBlockingBugsCount
? ` and ${nonBlockingBugsCount} non-blocking bug${(0, utils_1.pluralize)(nonBlockingBugsCount)}`
log.warn(`❌ Run failed and ${blockingBugsCount} blocking bug${pluralize(blockingBugsCount)} found${nonBlockingBugsCount
? ` and ${nonBlockingBugsCount} non-blocking bug${pluralize(nonBlockingBugsCount)}`
: ""}.\nSee ${relevantRunWithBugsUrl}\n` +

@@ -156,11 +155,10 @@ "You may review the priority of certain bugs to mark these non-blocking and retry the job.\n" +

log.info(`⏳ Run is in progress... ${urlInfo}`);
await (0, utils_1.sleep)(runInProgressInterval);
await sleep(runInProgressInterval);
}
else if (runStage === "underReview") {
log.info(`🕵️ Run is under review... ${urlInfo}`);
await (0, utils_1.sleep)(runUnderReviewInterval);
await sleep(runUnderReviewInterval);
}
else {
throw new Error(`Unexpected run stage: ${runStage}`);
}
else
throw Error(`Unexpected run stage: ${runStage}`);
}

@@ -167,0 +165,0 @@ log.warn(`❌ Poll timed out after ${pollTimeout / 1000}s. Aborting...`);

@@ -5,3 +5,2 @@ import { type SdkDependencies } from "../../dependencies";

import { type NotifyMergeCompletedResult, type NotifyVCSBranchMergeCompletedInput } from "./notify-vcs-branch-merge-completed";
export * from "./types";
export * from "./lib/aliases";

@@ -11,2 +10,3 @@ export type { NotifyBuildDeployedInput, NotifyBuildDeployedResult, } from "./notify-vcs-branch-build-deployed";

export type { NotifyMergeCompletedResult, NotifyVCSBranchMergeCompletedInput, } from "./notify-vcs-branch-merge-completed";
export * from "./types";
export declare function makeVCSBranchTestingSDK({ apiKey, serviceBase, }: {

@@ -13,0 +13,0 @@ apiKey: string;

@@ -1,35 +0,18 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeVCSBranchTestingSDK = makeVCSBranchTestingSDK;
const fetch_1 = require("../../defaults/fetch");
const log_1 = require("../../defaults/log");
const serviceBase_1 = require("../../defaults/serviceBase");
const notify_vcs_branch_build_deployed_1 = require("./notify-vcs-branch-build-deployed");
const notify_vcs_branch_merge_canceled_1 = require("./notify-vcs-branch-merge-canceled");
const notify_vcs_branch_merge_completed_1 = require("./notify-vcs-branch-merge-completed");
__exportStar(require("./types"), exports);
__exportStar(require("./lib/aliases"), exports);
function makeVCSBranchTestingSDK({ apiKey, serviceBase = serviceBase_1.defaultServiceBase, }, { fetch = fetch_1.defaultFetch, log = log_1.defaultLogDriver, } = {}) {
import { defaultFetch } from "../../defaults/fetch";
import { defaultLogDriver } from "../../defaults/log";
import { defaultServiceBase } from "../../defaults/serviceBase";
import { notifyVCSBranchBuildDeployed, } from "./notify-vcs-branch-build-deployed";
import { notifyVCSBranchMergeCanceled, } from "./notify-vcs-branch-merge-canceled";
import { notifyVCSBranchMergeCompleted, } from "./notify-vcs-branch-merge-completed";
export * from "./lib/aliases";
export * from "./types";
export function makeVCSBranchTestingSDK({ apiKey, serviceBase = defaultServiceBase, }, { fetch = defaultFetch, log = defaultLogDriver, } = {}) {
const deps = { fetch, log };
const apiConfig = { apiKey, serviceBase };
return {
notifyVCSBranchBuildDeployed: notify_vcs_branch_build_deployed_1.notifyVCSBranchBuildDeployed.bind(null, deps, apiConfig),
notifyVCSBranchMergeCanceled: notify_vcs_branch_merge_canceled_1.notifyVCSBranchMergeCanceled.bind(null, deps, apiConfig),
notifyVCSBranchMergeCompleted: notify_vcs_branch_merge_completed_1.notifyVCSBranchMergeCompleted.bind(null, deps, apiConfig),
notifyVCSBranchBuildDeployed: notifyVCSBranchBuildDeployed.bind(null, deps, apiConfig),
notifyVCSBranchMergeCanceled: notifyVCSBranchMergeCanceled.bind(null, deps, apiConfig),
notifyVCSBranchMergeCompleted: notifyVCSBranchMergeCompleted.bind(null, deps, apiConfig),
};
}
//# sourceMappingURL=index.js.map

@@ -1,13 +0,6 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.pullRequestDetailsToEnvironmentAlias = pullRequestDetailsToEnvironmentAlias;
exports.arbitraryStringToEnvironmentAlias = arbitraryStringToEnvironmentAlias;
const slugify_1 = __importDefault(require("slugify"));
import slugify from "slugify";
/**
* Creates a compliant environment alias from pull request details.
*/
function pullRequestDetailsToEnvironmentAlias({ codeHostingServiceOrganization, codeHostingServiceRepositoryName, pullRequestIdentifier, }) {
export function pullRequestDetailsToEnvironmentAlias({ codeHostingServiceOrganization, codeHostingServiceRepositoryName, pullRequestIdentifier, }) {
return arbitraryStringToEnvironmentAlias(`${codeHostingServiceOrganization}-${codeHostingServiceRepositoryName}-pr-${pullRequestIdentifier}`);

@@ -18,5 +11,5 @@ }

*/
function arbitraryStringToEnvironmentAlias(arbitraryString) {
return (0, slugify_1.default)(arbitraryString, { lower: true });
export function arbitraryStringToEnvironmentAlias(arbitraryString) {
return slugify(arbitraryString, { lower: true });
}
//# sourceMappingURL=aliases.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.domainFailureToAbortResult = domainFailureToAbortResult;
const utils_1 = require("../../../../utils");
function domainFailureToAbortResult({ log, methodName, result, }) {
import { assertType } from "../../../../utils";
export function domainFailureToAbortResult({ log, methodName, result, }) {
switch (result.failureCode) {

@@ -50,6 +47,6 @@ case "run-creation-failed":

default:
(0, utils_1.assertType)(result.failureCode);
throw new Error(`[${methodName}] Unreachable code detected. This is a bug.`);
assertType(result.failureCode);
throw Error(`[${methodName}] Unreachable code detected. This is a bug.`);
}
}
//# sourceMappingURL=domain-failure.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.graphQLErrorToAbortResult = graphQLErrorToAbortResult;
const utils_1 = require("../../../../utils");
function graphQLErrorToAbortResult({ graphQLPayload, log, methodName, }) {
import { assertType } from "../../../../utils";
export function graphQLErrorToAbortResult({ graphQLPayload, log, methodName, }) {
switch (graphQLPayload.errorCode) {

@@ -23,6 +20,6 @@ case "forbidden":

default:
(0, utils_1.assertType)(graphQLPayload.errorCode);
throw new Error("Unreachable code detected. This is a bug.");
assertType(graphQLPayload.errorCode);
throw Error("Unreachable code detected. This is a bug.");
}
}
//# sourceMappingURL=graphql-error.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.retryWithExponentialBackoff = retryWithExponentialBackoff;
const utils_1 = require("../../../../utils");
async function retryWithExponentialBackoff({ log, maxRetries, methodName, retriableAbortReasons, runOnce, }) {
import { getBackoffMs, sleep } from "../../../../utils";
export async function retryWithExponentialBackoff({ log, maxRetries, methodName, retriableAbortReasons, runOnce, }) {
let attemptNumber = 0;

@@ -14,5 +11,4 @@ let result;

if (result.outcome === "success" ||
!retriableAbortReasons.includes(result.abortReason)) {
!retriableAbortReasons.includes(result.abortReason))
return result;
}
// Exit if max retries reached

@@ -22,8 +18,8 @@ if (attemptNumber >= maxRetries + 1)

// Else, backoff and retry
const backoffMs = (0, utils_1.getBackoffMs)(attemptNumber);
const backoffMs = getBackoffMs(attemptNumber);
const secondsApproximation = (backoffMs / 1000).toFixed(1);
log.warn(`⏳ [${methodName}] Retrying in ${secondsApproximation} seconds.`);
await (0, utils_1.sleep)(backoffMs);
await sleep(backoffMs);
} while (true);
}
//# sourceMappingURL=retry.js.map

@@ -1,21 +0,14 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.notifyVCSBranchBuildDeployed = notifyVCSBranchBuildDeployed;
const notify_vcs_branch_build_deployed_mutation_1 = require("../../../api/notify-vcs-branch-build-deployed-mutation");
const utils_1 = require("../../../utils");
const domain_failure_1 = require("./lib/domain-failure");
const graphql_error_1 = require("./lib/graphql-error");
const retry_1 = require("./lib/retry");
import { callNotifyVCSBranchBuildDeployedMutation } from "../../../api/notify-vcs-branch-build-deployed-mutation";
import { assertType } from "../../../utils";
import { domainFailureToAbortResult } from "./lib/domain-failure";
import { graphQLErrorToAbortResult } from "./lib/graphql-error";
import { retryWithExponentialBackoff } from "./lib/retry";
async function runNotifyVCSBranchBuildDeployedOnce(deps, apiConfig, input) {
const { baseEnvironmentsMapping, baseVcsBranch, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, } = input;
const log = deps.log;
const baseEnvironmentAlias = baseEnvironmentsMapping.find((mapping) => mapping.vcsBranch === baseVcsBranch)?.environmentAlias;
if (baseEnvironmentAlias === undefined) {
log.info(`ℹ️ [notifyVCSBranchBuildDeployed] Could not find a base environment for VCS branch '${baseVcsBranch}'. Fall back to use the default base environment`);
}
const baseEnvironmentAlias = baseEnvironmentsMapping?.find((mapping) => mapping.vcsBranch === baseVcsBranch)?.environmentAlias;
let finalConcurrencyLimit = concurrencyLimit;
if (typeof concurrencyLimit === "number") {
if (concurrencyLimit === Infinity) {
if (concurrencyLimit === Infinity)
finalConcurrencyLimit = 0;
}
else if (isNaN(concurrencyLimit) || !Number.isInteger(concurrencyLimit)) {

@@ -36,4 +29,5 @@ log.error(`❌ [notifyVCSBranchBuildDeployed] Invalid concurrency limit '${concurrencyLimit}'. Must be a positive integer.`);

}
const resp = await (0, notify_vcs_branch_build_deployed_mutation_1.callNotifyVCSBranchBuildDeployedMutation)(deps, apiConfig, {
const resp = await callNotifyVCSBranchBuildDeployedMutation(deps, apiConfig, {
baseEnvironmentAlias,
baseVcsBranch,
concurrencyLimit: finalConcurrencyLimit,

@@ -49,3 +43,3 @@ headEnvironmentAlias,

if (resp.isGqlError) {
return (0, graphql_error_1.graphQLErrorToAbortResult)({
return graphQLErrorToAbortResult({
graphQLPayload: resp,

@@ -68,4 +62,4 @@ log,

}
(0, utils_1.assertType)(result.outcome);
return (0, domain_failure_1.domainFailureToAbortResult)({
assertType(result.outcome);
return domainFailureToAbortResult({
log,

@@ -76,5 +70,5 @@ methodName: "notifyVCSBranchBuildDeployed",

}
async function notifyVCSBranchBuildDeployed(deps, apiConfig, input) {
export async function notifyVCSBranchBuildDeployed(deps, apiConfig, input) {
const { maxRetries = 10 } = input;
return (0, retry_1.retryWithExponentialBackoff)({
return retryWithExponentialBackoff({
log: deps.log,

@@ -81,0 +75,0 @@ maxRetries,

@@ -1,17 +0,14 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.notifyVCSBranchMergeCanceled = notifyVCSBranchMergeCanceled;
const notify_vcs_branch_merge_canceled_mutation_1 = require("../../../api/notify-vcs-branch-merge-canceled-mutation");
const utils_1 = require("../../../utils");
const domain_failure_1 = require("./lib/domain-failure");
const graphql_error_1 = require("./lib/graphql-error");
const retry_1 = require("./lib/retry");
import { callNotifyVCSBranchMergeCanceledMutation } from "../../../api/notify-vcs-branch-merge-canceled-mutation";
import { assertType } from "../../../utils";
import { domainFailureToAbortResult } from "./lib/domain-failure";
import { graphQLErrorToAbortResult } from "./lib/graphql-error";
import { retryWithExponentialBackoff } from "./lib/retry";
async function runNotifyVCSMergeCanceledOnce(deps, apiConfig, input) {
const log = deps.log;
const { headEnvironmentAlias } = input;
const resp = await (0, notify_vcs_branch_merge_canceled_mutation_1.callNotifyVCSBranchMergeCanceledMutation)(deps, apiConfig, {
const resp = await callNotifyVCSBranchMergeCanceledMutation(deps, apiConfig, {
headEnvironmentAlias,
});
if (resp.isGqlError) {
return (0, graphql_error_1.graphQLErrorToAbortResult)({
return graphQLErrorToAbortResult({
graphQLPayload: resp,

@@ -29,4 +26,4 @@ log,

}
(0, utils_1.assertType)(result.outcome);
return (0, domain_failure_1.domainFailureToAbortResult)({
assertType(result.outcome);
return domainFailureToAbortResult({
log,

@@ -37,5 +34,5 @@ methodName: "notifyVCSBranchMergeCanceled",

}
async function notifyVCSBranchMergeCanceled(deps, apiConfig, input) {
export async function notifyVCSBranchMergeCanceled(deps, apiConfig, input) {
const { maxRetries = 10 } = input;
return (0, retry_1.retryWithExponentialBackoff)({
return retryWithExponentialBackoff({
log: deps.log,

@@ -42,0 +39,0 @@ maxRetries,

@@ -1,17 +0,14 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.notifyVCSBranchMergeCompleted = notifyVCSBranchMergeCompleted;
const notify_vcs_branch_merge_completed_mutation_1 = require("../../../api/notify-vcs-branch-merge-completed-mutation");
const utils_1 = require("../../../utils");
const domain_failure_1 = require("./lib/domain-failure");
const graphql_error_1 = require("./lib/graphql-error");
const retry_1 = require("./lib/retry");
import { callNotifyVCSBranchMergeCompletedMutation } from "../../../api/notify-vcs-branch-merge-completed-mutation";
import { assertType } from "../../../utils";
import { domainFailureToAbortResult } from "./lib/domain-failure";
import { graphQLErrorToAbortResult } from "./lib/graphql-error";
import { retryWithExponentialBackoff } from "./lib/retry";
async function runNotifyVCSBranchMergeCompletedOnce(deps, apiConfig, input) {
const log = deps.log;
const { baseEnvironmentsMapping, baseVcsBranch: vcsBaseBranch } = input;
const baseEnvironmentAlias = baseEnvironmentsMapping.find((mapping) => mapping.vcsBranch === vcsBaseBranch)?.environmentAlias;
const baseEnvironmentAlias = baseEnvironmentsMapping?.find((mapping) => mapping.vcsBranch === vcsBaseBranch)?.environmentAlias;
if (baseEnvironmentAlias === undefined) {
log.info(`ℹ️ [notifyVCSBranchMergeCompleted] Could not find a base environment for VCS branch '${vcsBaseBranch}'. Fall back to use the default base environment`);
}
const resp = await (0, notify_vcs_branch_merge_completed_mutation_1.callNotifyVCSBranchMergeCompletedMutation)(deps, apiConfig, {
const resp = await callNotifyVCSBranchMergeCompletedMutation(deps, apiConfig, {
baseEnvironmentAlias,

@@ -21,3 +18,3 @@ headEnvironmentAlias: input.headEnvironmentAlias,

if (resp.isGqlError) {
return (0, graphql_error_1.graphQLErrorToAbortResult)({
return graphQLErrorToAbortResult({
graphQLPayload: resp,

@@ -35,4 +32,4 @@ log,

}
(0, utils_1.assertType)(result.outcome);
return (0, domain_failure_1.domainFailureToAbortResult)({
assertType(result.outcome);
return domainFailureToAbortResult({
log,

@@ -43,5 +40,5 @@ methodName: "notifyVCSBranchMergeCompleted",

}
async function notifyVCSBranchMergeCompleted(deps, apiConfig, input) {
export async function notifyVCSBranchMergeCompleted(deps, apiConfig, input) {
const { maxRetries = 10 } = input;
return (0, retry_1.retryWithExponentialBackoff)({
return retryWithExponentialBackoff({
log: deps.log,

@@ -48,0 +45,0 @@ maxRetries,

@@ -14,4 +14,6 @@ export type BaseVCSBranchConfig = {

* and a VCS branch. Use environment aliases to refer to a particular environment.
* If not provided, base environment identification will be handled by the QA Wolf
* app.
*/
baseEnvironmentsMapping: Array<{
baseEnvironmentsMapping?: Array<{
environmentAlias: string;

@@ -30,5 +32,3 @@ vcsBranch: string;

* The base VCS branch from which this
* branch was created. This will allow
* QA Wolf to determine the base environment
* to use given `baseEnvironmentsMapping`.
* branch was created.
*/

@@ -35,0 +35,0 @@ baseVcsBranch: string;

@@ -1,3 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};
//# sourceMappingURL=types.js.map

@@ -31,6 +31,6 @@ import { type SdkDependencies } from "./dependencies";

};
export type * from "./domain/attempt-deploy";
export type * from "./domain/generateSignedUrls/types";
export type * from "./domain/poll-ci-greenlight";
export type * from "./domain/attempt-deploy";
export * from "./domain/vcsBranchTesting/index";
export type * from "./domain/generateSignedUrls/types";
//# sourceMappingURL=index.d.ts.map

@@ -1,31 +0,14 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeQaWolfSdk = makeQaWolfSdk;
const utils_1 = require("../utils");
const fetch_1 = require("./defaults/fetch");
const log_1 = require("./defaults/log");
const serviceBase_1 = require("./defaults/serviceBase");
const attempt_deploy_1 = require("./domain/attempt-deploy");
const generate_signed_url_for_run_inputs_executables_1 = require("./domain/generateSignedUrls/generate-signed-url-for-run-inputs-executables");
const generate_signed_url_for_team_storage_1 = require("./domain/generateSignedUrls/generate-signed-url-for-team-storage");
const index_1 = require("./domain/legacy_previewTesting/index");
const poll_ci_greenlight_1 = require("./domain/poll-ci-greenlight");
const vcsBranchTesting_1 = require("./domain/vcsBranchTesting");
function makeQaWolfSdk({ apiKey, serviceBase = serviceBase_1.defaultServiceBase, }, { fetch = fetch_1.defaultFetch, log = log_1.defaultLogDriver, } = {}) {
import { buildFetchWithTimeout } from "../utils";
import { defaultFetch } from "./defaults/fetch";
import { defaultLogDriver } from "./defaults/log";
import { defaultServiceBase } from "./defaults/serviceBase";
import { attemptNotifyDeploy } from "./domain/attempt-deploy";
import { generateSignedUrlForRunInputsExecutablesStorage } from "./domain/generateSignedUrls/generate-signed-url-for-run-inputs-executables";
import { generateSignedUrlForTempTeamStorage } from "./domain/generateSignedUrls/generate-signed-url-for-team-storage";
import { removeEnvironment, testPreview, } from "./domain/legacy_previewTesting/index";
import { pollCiGreenlightStatus } from "./domain/poll-ci-greenlight";
import { makeVCSBranchTestingSDK } from "./domain/vcsBranchTesting";
export function makeQaWolfSdk({ apiKey, serviceBase = defaultServiceBase, }, { fetch = defaultFetch, log = defaultLogDriver, } = {}) {
if (typeof fetch !== "function") {
throw new Error(`QA Wolf CI-SDK requires fetch to be defined. Make sure you are using NodeJS 18+, OR pass a fetch polyfill to the makeQaWolfSdk function.
throw Error(`QA Wolf CI-SDK requires fetch to be defined. Make sure you are using NodeJS 18+, OR pass a fetch polyfill to the makeQaWolfSdk function.
We recommend 'undici' package for that purpose. See the Requirement section of our README for more guidance.`);

@@ -35,3 +18,3 @@ }

// Versions of fetch may have different default timeouts. For consistency, we explicitly set it to 60 seconds here.
fetch: (0, utils_1.buildFetchWithTimeout)(fetch, 60000),
fetch: buildFetchWithTimeout(fetch, 60000),
log,

@@ -41,18 +24,18 @@ };

return {
attemptNotifyDeploy: attempt_deploy_1.attemptNotifyDeploy.bind(null, deps, apiConfig),
attemptNotifyDeploy: attemptNotifyDeploy.bind(null, deps, apiConfig),
/**
* @deprecated Use `experimental_vcsBranchTesting` instead.
*/
experimental_removeEnvironment: index_1.removeEnvironment.bind(null, deps, apiConfig),
experimental_removeEnvironment: removeEnvironment.bind(null, deps, apiConfig),
/**
* @deprecated Use `experimental_vcsBranchTesting` instead.
*/
experimental_testPreview: index_1.testPreview.bind(null, deps, apiConfig),
experimental_vcsBranchTesting: (0, vcsBranchTesting_1.makeVCSBranchTestingSDK)(apiConfig, deps),
generateSignedUrlForRunInputsExecutablesStorage: generate_signed_url_for_run_inputs_executables_1.generateSignedUrlForRunInputsExecutablesStorage.bind(null, deps, apiConfig),
generateSignedUrlForTempTeamStorage: generate_signed_url_for_team_storage_1.generateSignedUrlForTempTeamStorage.bind(null, deps, apiConfig),
pollCiGreenlightStatus: poll_ci_greenlight_1.pollCiGreenlightStatus.bind(null, deps, apiConfig),
experimental_testPreview: testPreview.bind(null, deps, apiConfig),
experimental_vcsBranchTesting: makeVCSBranchTestingSDK(apiConfig, deps),
generateSignedUrlForRunInputsExecutablesStorage: generateSignedUrlForRunInputsExecutablesStorage.bind(null, deps, apiConfig),
generateSignedUrlForTempTeamStorage: generateSignedUrlForTempTeamStorage.bind(null, deps, apiConfig),
pollCiGreenlightStatus: pollCiGreenlightStatus.bind(null, deps, apiConfig),
};
}
__exportStar(require("./domain/vcsBranchTesting/index"), exports);
export * from "./domain/vcsBranchTesting/index";
//# sourceMappingURL=index.js.map

@@ -1,12 +0,5 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildFetchWithTimeout = void 0;
exports.sleep = sleep;
exports.pluralize = pluralize;
exports.assertType = assertType;
exports.getBackoffMs = getBackoffMs;
function sleep(ms) {
export function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
function pluralize(count) {
export function pluralize(count) {
return count === 1 ? "" : "s";

@@ -17,10 +10,9 @@ }

*/
function assertType(_value) {
export function assertType(_value) {
// noop
}
function getBackoffMs(attemptNumber, minWaitMs = 1000, maxWaitMs = 10000) {
export function getBackoffMs(attemptNumber, minWaitMs = 1000, maxWaitMs = 10000) {
return Math.min(maxWaitMs, minWaitMs * 1.2 ** attemptNumber);
}
const buildFetchWithTimeout = (fetch, timeout) => async (...args) => fetch(args[0], { ...args[1], signal: AbortSignal.timeout(timeout) });
exports.buildFetchWithTimeout = buildFetchWithTimeout;
export const buildFetchWithTimeout = (fetch, timeout) => async (...args) => fetch(args[0], { ...args[1], signal: AbortSignal.timeout(timeout) });
//# sourceMappingURL=utils.js.map

@@ -1,16 +0,6 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeVCSBranchTestingSDKForTest = makeVCSBranchTestingSDKForTest;
exports.makeQaWolfSdkForTest = makeQaWolfSdkForTest;
exports.buildResponse = buildResponse;
exports.buildCiGreenlightStatusBase = buildCiGreenlightStatusBase;
exports.setupTests = setupTests;
/* eslint-disable jest/no-export */
const globals_1 = require("@jest/globals");
const fake_timers_1 = __importDefault(require("@sinonjs/fake-timers"));
const vcsBranchTesting_1 = require("../lib/sdk/domain/vcsBranchTesting");
const index_1 = require("../lib/sdk/index");
import { jest } from "@jest/globals";
import FakeTimers from "@sinonjs/fake-timers";
import { makeVCSBranchTestingSDK } from "../lib/sdk/domain/vcsBranchTesting";
import { makeQaWolfSdk } from "../lib/sdk/index";
const localDummyServiceBase = "http://localhost:80/";

@@ -22,8 +12,8 @@ const testLogger = {

};
function makeVCSBranchTestingSDKForTest({ apiKey }) {
export function makeVCSBranchTestingSDKForTest({ apiKey }) {
// Can be used for mocking fetch
const fetch = globals_1.jest.fn(() => Promise.resolve(buildResponse({})));
const fetch = jest.fn(() => Promise.resolve(buildResponse({})));
return {
fetch,
sdk: (0, vcsBranchTesting_1.makeVCSBranchTestingSDK)({
sdk: makeVCSBranchTestingSDK({
apiKey,

@@ -37,8 +27,8 @@ serviceBase: localDummyServiceBase,

}
function makeQaWolfSdkForTest({ apiKey }) {
export function makeQaWolfSdkForTest({ apiKey }) {
// Can be used for mocking fetch
const fetch = globals_1.jest.fn(() => Promise.resolve(buildResponse({})));
const fetch = jest.fn(() => Promise.resolve(buildResponse({})));
return {
fetch,
sdk: (0, index_1.makeQaWolfSdk)({
sdk: makeQaWolfSdk({
apiKey,

@@ -52,3 +42,3 @@ serviceBase: localDummyServiceBase,

}
function buildResponse(response, status = 200) {
export function buildResponse(response, status = 200) {
return new Response(JSON.stringify(response), {

@@ -61,3 +51,3 @@ headers: {

}
function buildCiGreenlightStatusBase() {
export function buildCiGreenlightStatusBase() {
return {

@@ -74,6 +64,6 @@ relevantRunId: "foo",

}
function setupTests() {
const clock = fake_timers_1.default.install();
export function setupTests() {
const clock = FakeTimers.install();
function runGraphQLAssertions({ fetchMock, method, }) {
afterEach(() => globals_1.jest.resetAllMocks());
afterEach(() => jest.resetAllMocks());
it("should handle retries with GraphQL server-error", async () => {

@@ -102,3 +92,3 @@ fetchMock.mockImplementation(async () => {

it("should handle retries with network errors", async () => {
fetchMock.mockRejectedValue(new Error("network error"));
fetchMock.mockRejectedValue(Error("network error"));
const expectedValue = {

@@ -105,0 +95,0 @@ abortReason: "network-error",

@@ -0,4 +1,4 @@

export type { CiGreenlightStatus, CiGreenlightStatusBase, DeployConfig, DeployStatus, } from "./lib/api/index.js";
export * from "./lib/sdk/dependencies.js";
export * from "./lib/sdk/index.js";
export * from "./lib/sdk/dependencies.js";
export type { CiGreenlightStatus, CiGreenlightStatusBase, DeployConfig, DeployStatus, } from "./lib/api/index.js";
//# sourceMappingURL=index.d.ts.map

@@ -49,6 +49,35 @@ import { type ApiConfig } from "../api-types";

export type CiGreenlightBugData = {
/**
* The count of blocking bugs reproduced in the run.
*/
blockingBugsCount: number;
/**
* The URLs of the blocking bugs.
*
* @deprecated This field will be removed in the next major version.
* Prefer using `reproducedBugs` filtered by `isBlocking: true`, reading
* the `applicationUrl` field.
*/
blockingBugUrls: string[];
/**
* The count of non-blocking bugs reproduced in the run.
*/
nonBlockingBugsCount: number;
/**
* The URLs of the non-blocking bugs.
*
* @deprecated This field will be removed in the next major version.
* Prefer using `reproducedBugs` filtered by `isBlocking: false`, reading
* the `applicationUrl` field.
*/
nonBlockingBugUrls: string[];
/**
* Blocking bugs that were not reproduced in this run, but are still
* opened in the run environment. This may happen when the run only covers a
* subset of the workflows in environment.
*/
otherBlockingBugsInEnvironment: CiGreenlightBugDetails[];
/**
* Bugs that were reproduced in this run. This includes newly found bugs.
*/
reproducedBugs: CiGreenlightBugDetails[];

@@ -55,0 +84,0 @@ };

import { type ApiConfig } from "../api-types";
import { type SdkDependencies } from "../sdk/dependencies";
import { type GenerateSignedUrlConfig, type GenerateSignedUrlResponse } from "../sdk/domain/generateSignedUrls/types";
export declare function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }: ApiConfig, { destinationFilePath }: Partial<GenerateSignedUrlConfig>, { fetch: localFetch }: SdkDependencies): Promise<GenerateSignedUrlResponse>;
export declare function callGenerateSignedUrlForRunInputsExecutablesStorage({ apiKey, serviceBase }: ApiConfig, { destinationFilePath }: GenerateSignedUrlConfig, { fetch: localFetch }: SdkDependencies): Promise<GenerateSignedUrlResponse>;
//# sourceMappingURL=generate-signed-url-for-run-inputs-executables.d.ts.map

@@ -6,2 +6,3 @@ import { type ApiConfig } from "../api-types";

baseEnvironmentAlias: string | undefined;
baseVcsBranch: string | undefined;
concurrencyLimit: number | undefined;

@@ -25,3 +26,3 @@ headEnvironmentAlias: string;

};
export declare function callNotifyVCSBranchBuildDeployedMutation(deps: SdkDependencies, apiConfig: ApiConfig, { baseEnvironmentAlias, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }: NotifyVCSBranchBuildDeployedMutationInput): Promise<GraphQLResponse<NotifyVCSBranchBuildDeployedResponseSchema>>;
export declare function callNotifyVCSBranchBuildDeployedMutation(deps: SdkDependencies, apiConfig: ApiConfig, { baseEnvironmentAlias, baseVcsBranch, concurrencyLimit, headEnvironmentAlias, headEnvironmentName, headEnvironmentVariables, headVcsBranch, headVcsCommitId, headVcsCommitUrl, pullOrMergeRequestNumber, }: NotifyVCSBranchBuildDeployedMutationInput): Promise<GraphQLResponse<NotifyVCSBranchBuildDeployedResponseSchema>>;
//# sourceMappingURL=notify-vcs-branch-build-deployed-mutation.d.ts.map

@@ -5,3 +5,2 @@ import { type SdkDependencies } from "../../dependencies";

import { type NotifyMergeCompletedResult, type NotifyVCSBranchMergeCompletedInput } from "./notify-vcs-branch-merge-completed";
export * from "./types";
export * from "./lib/aliases";

@@ -11,2 +10,3 @@ export type { NotifyBuildDeployedInput, NotifyBuildDeployedResult, } from "./notify-vcs-branch-build-deployed";

export type { NotifyMergeCompletedResult, NotifyVCSBranchMergeCompletedInput, } from "./notify-vcs-branch-merge-completed";
export * from "./types";
export declare function makeVCSBranchTestingSDK({ apiKey, serviceBase, }: {

@@ -13,0 +13,0 @@ apiKey: string;

@@ -14,4 +14,6 @@ export type BaseVCSBranchConfig = {

* and a VCS branch. Use environment aliases to refer to a particular environment.
* If not provided, base environment identification will be handled by the QA Wolf
* app.
*/
baseEnvironmentsMapping: Array<{
baseEnvironmentsMapping?: Array<{
environmentAlias: string;

@@ -30,5 +32,3 @@ vcsBranch: string;

* The base VCS branch from which this
* branch was created. This will allow
* QA Wolf to determine the base environment
* to use given `baseEnvironmentsMapping`.
* branch was created.
*/

@@ -35,0 +35,0 @@ baseVcsBranch: string;

@@ -31,6 +31,6 @@ import { type SdkDependencies } from "./dependencies";

};
export type * from "./domain/attempt-deploy";
export type * from "./domain/generateSignedUrls/types";
export type * from "./domain/poll-ci-greenlight";
export type * from "./domain/attempt-deploy";
export * from "./domain/vcsBranchTesting/index";
export type * from "./domain/generateSignedUrls/types";
//# sourceMappingURL=index.d.ts.map
{
"name": "@qawolf/ci-sdk",
"version": "0.20.0",
"version": "0.21.0",
"description": "A simple SDK for interacting with QAWolf in CI scripts.",

@@ -18,2 +18,3 @@ "type": "commonjs",

"lint:fix": "eslint . --ext js,jsx,mjs,ts,tsx --fix --quiet && prettier --log-level=warn --write .",
"lint:warnings": "eslint . --ext js,jsx,mjs,ts,tsx",
"test": "jest",

@@ -27,3 +28,3 @@ "prepublishOnly": "nx run ci-sdk:build",

"engines": {
"node": ">= 16"
"node": ">=16"
},

@@ -30,0 +31,0 @@ "devDependencies": {

@@ -382,5 +382,14 @@ # QAWolf CI SDK

## v0.21.0
- Make `baseEnvironmentsMapping` optional in `notifyVCSBranchBuildDeployed` and `notifyVCSBranchMergeCompleted`.
- Send `baseVcsBranch` when requesting VCS branch testing and VCS branch merge completion.
## v0.20.0
- In `pollCiGreenlightStatus`, bug data fields are now available in the `"underReview"` run stage.
- `pollCiGreenlightStatus`: bug data fields are now available in the `"underReview"` run stage.
- `pollCiGreenlightStatus`: new `otherBlockingBugsInEnvironment` response
field. Some runs with a subset of workflows in environment will not reproduce
blocking bugs in this environment. You can now see these other blocking bugs
with this field.

@@ -387,0 +396,0 @@ ## v0.19.0

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc