@sap-ux/deploy-tooling 0.17.25 → 0.17.27

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.
@@ -245,7 +245,7 @@ async function validatePackageWithAdt(input, output, provider, logger) {
245
245
  return;
246
246
  }
247
247
  const packages = await adtService.listPackages({ phrase: inputPackage });
248
- const isValidPackage = packages.findIndex((packageName) => packageName === inputPackage) >= 0;
248
+ const isValidPackage = packages.includes(inputPackage);
249
249
  if (isValidPackage) {
250
250
  output.summary.push({
251
251
  message: exports.summaryMessage.packageCheckPass,
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getArchive = getArchive;
7
7
  const axios_1 = __importDefault(require("axios"));
8
- const node_fs_1 = require("node:fs");
8
+ const promises_1 = require("node:fs/promises");
9
9
  const adm_zip_1 = __importDefault(require("adm-zip"));
10
10
  const node_https_1 = require("node:https");
11
11
  /**
@@ -15,19 +15,16 @@ const node_https_1 = require("node:https");
15
15
  * @param path - path to the zip file
16
16
  * @returns Buffer containing the zip file
17
17
  */
18
- function getArchiveFromPath(logger, path) {
18
+ async function getArchiveFromPath(logger, path) {
19
19
  logger.info(`Loading archive from ${path}`);
20
- return new Promise((resolve, reject) => {
21
- (0, node_fs_1.readFile)(path, (err, data) => {
22
- if (err) {
23
- reject(`Loading archive has failed. Please ensure ${path} is valid and accessible.`);
24
- }
25
- else {
26
- logger.info(`Archive loaded from ${path}`);
27
- resolve(data);
28
- }
29
- });
30
- });
20
+ try {
21
+ const data = await (0, promises_1.readFile)(path);
22
+ logger.info(`Archive loaded from ${path}`);
23
+ return data;
24
+ }
25
+ catch {
26
+ throw new Error(`Loading archive has failed. Please ensure ${path} is valid and accessible.`);
27
+ }
31
28
  }
32
29
  /**
33
30
  * Fetch/get zip file from the given url.
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Adeploy-tooling"
11
11
  },
12
- "version": "0.17.25",
12
+ "version": "0.17.27",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -32,13 +32,13 @@
32
32
  "prompts": "2.4.2",
33
33
  "adm-zip": "0.5.10",
34
34
  "chalk": "4.1.2",
35
- "@sap-ux/axios-extension": "1.25.5",
35
+ "@sap-ux/axios-extension": "1.25.6",
36
36
  "@sap-ux/btp-utils": "1.1.6",
37
- "@sap-ux/inquirer-common": "0.10.7",
37
+ "@sap-ux/inquirer-common": "0.10.9",
38
38
  "@sap-ux/logger": "0.8.0",
39
- "@sap-ux/system-access": "0.6.39",
39
+ "@sap-ux/system-access": "0.6.40",
40
40
  "@sap-ux/ui5-config": "0.29.12",
41
- "@sap-ux/project-input-validator": "0.6.40"
41
+ "@sap-ux/project-input-validator": "0.6.42"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/prompts": "2.4.4",