@zerothreatai/cli 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1 @@
1
- # zerothreat-installer-cli
2
1
 
3
- This is the on_prem installer cli project
@@ -22,11 +22,8 @@ const validateLicenseKey = (key) => {
22
22
  const deleteAcr = () => {
23
23
  // Acr token Delete
24
24
  const acrTokenService = new acr_token_service_1.default();
25
- try {
26
- if (app_constants_1.acrTokenName)
27
- acrTokenService.deleteAcrToken(app_constants_1.acrTokenName);
28
- }
29
- catch { }
25
+ if (app_constants_1.deleteAcrToken)
26
+ acrTokenService.deleteAcrToken(app_constants_1.deleteAcrToken).catch(() => { });
30
27
  return;
31
28
  };
32
29
  async function startSetup() {
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setAcrTokenName = exports.setDockerComposeAcr = exports.acrTokenName = exports.dockerComposeAcr = void 0;
3
+ exports.setDeleteAcrToken = exports.setDockerComposeAcr = exports.deleteAcrToken = exports.dockerComposeAcr = void 0;
4
4
  exports.dockerComposeAcr = '';
5
- exports.acrTokenName = '';
5
+ exports.deleteAcrToken = '';
6
6
  const setDockerComposeAcr = (value) => {
7
7
  exports.dockerComposeAcr = value;
8
8
  };
9
9
  exports.setDockerComposeAcr = setDockerComposeAcr;
10
- const setAcrTokenName = (value) => {
11
- exports.acrTokenName = value;
10
+ const setDeleteAcrToken = (value) => {
11
+ exports.deleteAcrToken = value;
12
12
  };
13
- exports.setAcrTokenName = setAcrTokenName;
13
+ exports.setDeleteAcrToken = setDeleteAcrToken;
@@ -46,7 +46,8 @@ class AcrTokenService extends api_service_1.default {
46
46
  fs_1.default.writeFileSync(filePath, decodedDockerComposeAcr);
47
47
  (0, app_constants_1.setDockerComposeAcr)(filePath);
48
48
  }
49
- (0, app_constants_1.setAcrTokenName)(username);
49
+ const deletionToken = response.deletionToken;
50
+ (0, app_constants_1.setDeleteAcrToken)(deletionToken);
50
51
  return {
51
52
  dockerAuth: {
52
53
  username,
@@ -61,7 +62,7 @@ class AcrTokenService extends api_service_1.default {
61
62
  }
62
63
  }
63
64
  async deleteAcrToken(acrTokenName) {
64
- await this.put(`/acr-token/delete?acrTokenName=${acrTokenName}`, {});
65
+ await this.put(`/acr-token/delete?deletionToken=${acrTokenName}`, {});
65
66
  }
66
67
  }
67
68
  exports.default = AcrTokenService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerothreatai/cli",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "node build.js",