@sap-ux/deploy-tooling 0.4.0 → 0.4.2

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.
@@ -71,6 +71,15 @@ function createAbapCloudServiceProvider(options, target, noPrompt, logger) {
71
71
  }
72
72
  });
73
73
  }
74
+ /**
75
+ * Checks if credentials are of basic auth type.
76
+ *
77
+ * @param authOpts credential options
78
+ * @returns boolean
79
+ */
80
+ function isBasicAuth(authOpts) {
81
+ return !!authOpts && authOpts.password !== undefined;
82
+ }
74
83
  /**
75
84
  * Enhance axios options and create a service provider instance for an on-premise ABAP system.
76
85
  *
@@ -86,12 +95,15 @@ function createAbapServiceProvider(options, target) {
86
95
  }
87
96
  if (!options.auth) {
88
97
  const storedOpts = yield getCredentials(target);
89
- if (storedOpts === null || storedOpts === void 0 ? void 0 : storedOpts.password) {
98
+ if (isBasicAuth(storedOpts)) {
90
99
  options.auth = {
91
100
  username: storedOpts.username,
92
101
  password: storedOpts.password
93
102
  };
94
103
  }
104
+ if (storedOpts === null || storedOpts === void 0 ? void 0 : storedOpts.serviceKeys) {
105
+ throw new Error('This is an ABAP Cloud system, please add the --cloud arg to ensure the correct deployment flow.');
106
+ }
95
107
  }
96
108
  return (0, axios_extension_1.createForAbap)(options);
97
109
  });
@@ -259,7 +271,7 @@ function tryDeploy(service, config, logger, archive) {
259
271
  logger.info('Deployment in TestMode completed. A successful TestMode execution does not necessarily mean that your upload will be successful.');
260
272
  }
261
273
  else {
262
- logger.info('Successfully deployed.');
274
+ logger.info('Deployment Successful.');
263
275
  }
264
276
  }
265
277
  catch (error) {
@@ -298,7 +310,7 @@ function tryUndeploy(service, config, logger) {
298
310
  logger.info('Undeployment in TestMode completed. A successful TestMode execution does not necessarily mean that your undeploy will be successful.');
299
311
  }
300
312
  else {
301
- logger.info('Successfully undeployed.');
313
+ logger.info('Undeployment Successful.');
302
314
  }
303
315
  }
304
316
  catch (error) {
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.4.0",
12
+ "version": "0.4.2",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -31,11 +31,11 @@
31
31
  "dotenv": "16.0.0",
32
32
  "prompts": "2.4.2",
33
33
  "yazl": "2.5.1",
34
- "@sap-ux/axios-extension": "1.3.3",
34
+ "@sap-ux/axios-extension": "1.3.4",
35
35
  "@sap-ux/btp-utils": "0.11.7",
36
36
  "@sap-ux/logger": "0.3.7",
37
- "@sap-ux/ui5-config": "0.18.2",
38
- "@sap-ux/store": "0.3.12"
37
+ "@sap-ux/store": "0.3.12",
38
+ "@sap-ux/ui5-config": "0.18.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/prompts": "2.0.14",