@sap-ux/deploy-tooling 0.7.2 → 0.9.0
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 +2 -0
- package/dist/base/deploy.js +18 -21
- package/dist/cli/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,6 +101,8 @@ Options:
|
|
|
101
101
|
--username ABAP Service username
|
|
102
102
|
--password ABAP Service password
|
|
103
103
|
--transport <transport-request> Transport number to record the change in the ABAP system
|
|
104
|
+
--create-transport Create a transport request during deployment
|
|
105
|
+
--package <abap-package> Package name for deploy target ABAP system (only required when --create-transport is used)
|
|
104
106
|
--name <bsp-name> Project name of the app
|
|
105
107
|
--no-strict-ssl Deactivate SSL certificate validation, enabled by default
|
|
106
108
|
--test Run in test mode. ABAP backend reports undeployment errors without actually undeploying (use --no-test to deactivate it).
|
package/dist/base/deploy.js
CHANGED
|
@@ -227,9 +227,9 @@ function handle401Error(command, provider, config, logger, archive) {
|
|
|
227
227
|
config.target.serviceKey.uaa.password = credentials.password;
|
|
228
228
|
}
|
|
229
229
|
else {
|
|
230
|
-
|
|
230
|
+
config.credentials = credentials;
|
|
231
231
|
}
|
|
232
|
-
yield
|
|
232
|
+
yield runCommand(command, config, logger, archive);
|
|
233
233
|
return true;
|
|
234
234
|
}
|
|
235
235
|
else {
|
|
@@ -289,27 +289,20 @@ function getUi5AbapRepositoryService(provider, config, logger) {
|
|
|
289
289
|
function createTransportRequest(config, logger, provider) {
|
|
290
290
|
var _a;
|
|
291
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
provider = yield getAbapServiceProvider(config, logger);
|
|
295
|
-
}
|
|
296
|
-
const adtService = yield provider.getAdtService(axios_extension_1.TransportRequestService);
|
|
297
|
-
logger.debug(`ADTService created for application ${config.app.name}, ${!adtService}.`);
|
|
298
|
-
const transportRequest = yield (adtService === null || adtService === void 0 ? void 0 : adtService.createTransportRequest({
|
|
299
|
-
packageName: (_a = config.app.package) !== null && _a !== void 0 ? _a : '',
|
|
300
|
-
ui5AppName: config.app.name,
|
|
301
|
-
description: 'Created by @sap-ux/deploy-tooling'
|
|
302
|
-
}));
|
|
303
|
-
if (transportRequest) {
|
|
304
|
-
logger.info(`Transport request ${transportRequest} created for application ${config.app.name}.`);
|
|
305
|
-
return transportRequest;
|
|
306
|
-
}
|
|
307
|
-
throw new Error(`Transport request could not be created for application ${config.app.name}.`);
|
|
292
|
+
if (!provider) {
|
|
293
|
+
provider = yield getAbapServiceProvider(config, logger);
|
|
308
294
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
295
|
+
const adtService = yield provider.getAdtService(axios_extension_1.TransportRequestService);
|
|
296
|
+
const transportRequest = yield (adtService === null || adtService === void 0 ? void 0 : adtService.createTransportRequest({
|
|
297
|
+
packageName: (_a = config.app.package) !== null && _a !== void 0 ? _a : '',
|
|
298
|
+
ui5AppName: config.app.name,
|
|
299
|
+
description: 'Created by @sap-ux/deploy-tooling'
|
|
300
|
+
}));
|
|
301
|
+
if (transportRequest) {
|
|
302
|
+
logger.info(`Transport request ${transportRequest} created for application ${config.app.name}.`);
|
|
303
|
+
return transportRequest;
|
|
312
304
|
}
|
|
305
|
+
throw new Error(`Transport request could not be created for application ${config.app.name}.`);
|
|
313
306
|
});
|
|
314
307
|
}
|
|
315
308
|
exports.createTransportRequest = createTransportRequest;
|
|
@@ -384,6 +377,10 @@ exports.deploy = deploy;
|
|
|
384
377
|
function tryUndeploy(provider, config, logger) {
|
|
385
378
|
return __awaiter(this, void 0, void 0, function* () {
|
|
386
379
|
try {
|
|
380
|
+
if (config.createTransport) {
|
|
381
|
+
config.app.transport = yield createTransportRequest(config, logger, provider);
|
|
382
|
+
config.createTransport = false;
|
|
383
|
+
}
|
|
387
384
|
const service = getUi5AbapRepositoryService(provider, config, logger);
|
|
388
385
|
yield service.undeploy({ bsp: config.app, testMode: config.test });
|
|
389
386
|
if (config.test === true) {
|
package/dist/cli/index.js
CHANGED
|
@@ -38,7 +38,9 @@ function createCommand(name) {
|
|
|
38
38
|
.addOption(new commander_1.Option('--service <service-path>', 'Target SAPUI5 Repository OData Service'))
|
|
39
39
|
.addOption(new commander_1.Option('--cloud-service-key <file-location>', 'JSON file location with the ABAP cloud service key.').conflicts('destination'))
|
|
40
40
|
.addOption(new commander_1.Option('--cloud-service-env', 'Read ABAP cloud service properties from environment variables or .env file').conflicts(['cloudServiceKey', 'destination']))
|
|
41
|
+
.option('--package <abap-package>', 'Package name for deploy target ABAP system')
|
|
41
42
|
.option('--transport <transport-request>', 'Transport number to record the change in the ABAP system')
|
|
43
|
+
.addOption(new commander_1.Option('--create-transport', 'Create transport request during deployment').conflicts(['transport']))
|
|
42
44
|
.addOption(new commander_1.Option('--username <username>', 'ABAP System username').conflicts([
|
|
43
45
|
'cloudServiceKey',
|
|
44
46
|
'cloudServiceEnv',
|
|
@@ -56,9 +58,7 @@ function createCommand(name) {
|
|
|
56
58
|
if (name === 'deploy') {
|
|
57
59
|
// additional parameters for deployment
|
|
58
60
|
command
|
|
59
|
-
.option('--package <abap-package>', 'Package name for deploy target ABAP system')
|
|
60
61
|
.option('--description <description>', 'Project description of the app')
|
|
61
|
-
.addOption(new commander_1.Option('--create-transport', 'Create transport request during deployment').conflicts(['transport']))
|
|
62
62
|
// SafeMode: Example: If the deployment would overwrite a repository that contains an app with a different sap.app/id and SafeMode is true, HTTP status code 412 (Precondition Failed) with further information would be returned.
|
|
63
63
|
.option('--safe', 'Prevents accidentally breaking deployments.')
|
|
64
64
|
.option('--keep', 'Keep a copy of the deployed archive in the project folder.');
|
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.
|
|
12
|
+
"version": "0.9.0",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|