@monokle/synchronizer
Advanced tools
Comparing version 0.14.0 to 0.14.1
@@ -53,3 +53,3 @@ import { SuppressionStatus } from '@monokle/types'; | ||
description: string; | ||
locations: string; | ||
location: string; | ||
status: SuppressionStatus; | ||
@@ -149,3 +149,3 @@ justification: string; | ||
getRepoId(projectSlug: string, repoOwner: string, repoName: string, tokenInfo: TokenInfo): Promise<ApiRepoIdData | undefined>; | ||
toggleSuppression(fingerprint: string, repoId: string, description: string, tokenInfo: TokenInfo): Promise<ApiSuppressionsData | undefined>; | ||
toggleSuppression(fingerprint: string, repoId: string, description: string, location: string | undefined, tokenInfo: TokenInfo): Promise<ApiSuppressionsData | undefined>; | ||
generateDeepLink(path: string): string; | ||
@@ -152,0 +152,0 @@ queryApi<OUT>(query: string, tokenInfo: TokenInfo, variables?: {}): Promise<OUT | undefined>; |
@@ -173,5 +173,5 @@ "use strict"; | ||
const toggleSuppressionMutation = ` | ||
mutation toggleSuppression($fingerprint: String!, $repoId: ID!, $description: String!) { | ||
mutation toggleSuppression($fingerprint: String!, $repoId: ID!, $description: String!, $location: String) { | ||
toggleSuppression( | ||
input: {fingerprint: $fingerprint, repository: $repoId, description: $description, skipReview: true} | ||
input: {fingerprint: $fingerprint, repository: $repoId, description: $description, location: $location, skipReview: true} | ||
) { | ||
@@ -258,5 +258,5 @@ id | ||
} | ||
toggleSuppression(fingerprint, repoId, description, tokenInfo) { | ||
toggleSuppression(fingerprint, repoId, description, location, tokenInfo) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.queryApi(toggleSuppressionMutation, tokenInfo, { fingerprint, repoId, description }); | ||
return this.queryApi(toggleSuppressionMutation, tokenInfo, { fingerprint, repoId, description, location }); | ||
}); | ||
@@ -263,0 +263,0 @@ } |
@@ -51,3 +51,3 @@ /// <reference types="node" /> | ||
getRepositorySuppressions(rootPath: string, projectSlug?: string): ApiSuppression[]; | ||
toggleSuppression(tokenInfo: TokenInfo, fingerprint: string, description: string, rootPath: string, projectSlug?: string): Promise<void>; | ||
toggleSuppression(tokenInfo: TokenInfo, fingerprint: string, description: string, location: string | undefined, rootPath: string, projectSlug?: string): Promise<void>; | ||
synchronize(tokenInfo: TokenInfo, rootPath: string, projectSlug?: string): Promise<void>; | ||
@@ -54,0 +54,0 @@ forceSynchronize(tokenInfo: TokenInfo, rootPath: string, projectSlug?: string): Promise<void>; |
@@ -63,3 +63,3 @@ "use strict"; | ||
} | ||
toggleSuppression(tokenInfo, fingerprint, description, rootPath, projectSlug) { | ||
toggleSuppression(tokenInfo, fingerprint, description, location, rootPath, projectSlug) { | ||
var _a, _b, _c, _d, _e; | ||
@@ -87,3 +87,3 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
const suppressionResult = yield this._apiHandler.toggleSuppression(fingerprint, id, description, tokenInfo); | ||
const suppressionResult = yield this._apiHandler.toggleSuppression(fingerprint, id, description, location, tokenInfo); | ||
if ((_e = (_d = (_c = suppressionResult === null || suppressionResult === void 0 ? void 0 : suppressionResult.data) === null || _c === void 0 ? void 0 : _c.getSuppressions) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.length) { | ||
@@ -90,0 +90,0 @@ const existingSuppressions = yield this.readSuppressions(repoData); |
@@ -53,3 +53,3 @@ import { SuppressionStatus } from '@monokle/types'; | ||
description: string; | ||
locations: string; | ||
location: string; | ||
status: SuppressionStatus; | ||
@@ -149,3 +149,3 @@ justification: string; | ||
getRepoId(projectSlug: string, repoOwner: string, repoName: string, tokenInfo: TokenInfo): Promise<ApiRepoIdData | undefined>; | ||
toggleSuppression(fingerprint: string, repoId: string, description: string, tokenInfo: TokenInfo): Promise<ApiSuppressionsData | undefined>; | ||
toggleSuppression(fingerprint: string, repoId: string, description: string, location: string | undefined, tokenInfo: TokenInfo): Promise<ApiSuppressionsData | undefined>; | ||
generateDeepLink(path: string): string; | ||
@@ -152,0 +152,0 @@ queryApi<OUT>(query: string, tokenInfo: TokenInfo, variables?: {}): Promise<OUT | undefined>; |
@@ -158,5 +158,5 @@ import normalizeUrl from 'normalize-url'; | ||
const toggleSuppressionMutation = ` | ||
mutation toggleSuppression($fingerprint: String!, $repoId: ID!, $description: String!) { | ||
mutation toggleSuppression($fingerprint: String!, $repoId: ID!, $description: String!, $location: String) { | ||
toggleSuppression( | ||
input: {fingerprint: $fingerprint, repository: $repoId, description: $description, skipReview: true} | ||
input: {fingerprint: $fingerprint, repository: $repoId, description: $description, location: $location, skipReview: true} | ||
) { | ||
@@ -232,4 +232,4 @@ id | ||
} | ||
async toggleSuppression(fingerprint, repoId, description, tokenInfo) { | ||
return this.queryApi(toggleSuppressionMutation, tokenInfo, { fingerprint, repoId, description }); | ||
async toggleSuppression(fingerprint, repoId, description, location, tokenInfo) { | ||
return this.queryApi(toggleSuppressionMutation, tokenInfo, { fingerprint, repoId, description, location }); | ||
} | ||
@@ -236,0 +236,0 @@ generateDeepLink(path) { |
@@ -51,3 +51,3 @@ /// <reference types="node" /> | ||
getRepositorySuppressions(rootPath: string, projectSlug?: string): ApiSuppression[]; | ||
toggleSuppression(tokenInfo: TokenInfo, fingerprint: string, description: string, rootPath: string, projectSlug?: string): Promise<void>; | ||
toggleSuppression(tokenInfo: TokenInfo, fingerprint: string, description: string, location: string | undefined, rootPath: string, projectSlug?: string): Promise<void>; | ||
synchronize(tokenInfo: TokenInfo, rootPath: string, projectSlug?: string): Promise<void>; | ||
@@ -54,0 +54,0 @@ forceSynchronize(tokenInfo: TokenInfo, rootPath: string, projectSlug?: string): Promise<void>; |
@@ -48,3 +48,3 @@ import slugify from 'slugify'; | ||
} | ||
async toggleSuppression(tokenInfo, fingerprint, description, rootPath, projectSlug) { | ||
async toggleSuppression(tokenInfo, fingerprint, description, location, rootPath, projectSlug) { | ||
if (!tokenInfo?.accessToken?.length) { | ||
@@ -70,3 +70,3 @@ throw new Error('Cannot use suppressions without access token.'); | ||
} | ||
const suppressionResult = await this._apiHandler.toggleSuppression(fingerprint, id, description, tokenInfo); | ||
const suppressionResult = await this._apiHandler.toggleSuppression(fingerprint, id, description, location, tokenInfo); | ||
if (suppressionResult?.data?.getSuppressions?.data?.length) { | ||
@@ -73,0 +73,0 @@ const existingSuppressions = await this.readSuppressions(repoData); |
{ | ||
"name": "@monokle/synchronizer", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"description": "Monokle Cloud synchronizer", | ||
@@ -5,0 +5,0 @@ "author": "Kubeshop", |
290577