@sap-ux/deploy-config-sub-generator 0.0.5 → 0.0.7
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeploymentGenerator } from '@sap-ux/deploy-config-generator-shared';
|
|
2
|
-
import { AppWizard, Prompts } from '@sap-devx/yeoman-ui-types';
|
|
3
2
|
import { promptNames } from '../prompts/deploy-target';
|
|
3
|
+
import { AppWizard, type Prompts } from '@sap-devx/yeoman-ui-types';
|
|
4
4
|
import type { Answers } from 'inquirer';
|
|
5
5
|
import type { DeployConfigGenerator, DeployConfigOptions } from '../types';
|
|
6
6
|
import type { FioriToolsProxyConfigBackend } from '@sap-ux/ui5-config';
|
package/generators/app/index.js
CHANGED
|
@@ -10,10 +10,10 @@ const project_access_1 = require("@sap-ux/project-access");
|
|
|
10
10
|
const deploy_config_generator_shared_1 = require("@sap-ux/deploy-config-generator-shared");
|
|
11
11
|
const utils_1 = require("./utils");
|
|
12
12
|
const utils_2 = require("../utils");
|
|
13
|
-
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
14
13
|
const prompting_1 = require("./prompting");
|
|
15
14
|
const deploy_target_1 = require("../prompts/deploy-target");
|
|
16
15
|
Object.defineProperty(exports, "promptNames", { enumerable: true, get: function () { return deploy_target_1.promptNames; } });
|
|
16
|
+
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
17
17
|
/**
|
|
18
18
|
* The main deployment configuration generator.
|
|
19
19
|
*/
|
|
@@ -67,16 +67,6 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
67
67
|
this.apiHubConfig = this.options.apiHubConfig ?? (0, utils_2.getEnvApiHubConfig)();
|
|
68
68
|
this.launchStandaloneFromYui = false;
|
|
69
69
|
}
|
|
70
|
-
// If launched standalone, set the header, title and description
|
|
71
|
-
if (this.launchStandaloneFromYui) {
|
|
72
|
-
this.appWizard.setHeaderTitle(utils_2.generatorTitle);
|
|
73
|
-
this.prompts = new yeoman_ui_types_1.Prompts((0, utils_1.getYUIDetails)(this.options.projectRoot));
|
|
74
|
-
this.setPromptsCallback = (fn) => {
|
|
75
|
-
if (this.prompts) {
|
|
76
|
-
this.prompts.setCallback(fn);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
70
|
}
|
|
81
71
|
/**
|
|
82
72
|
* Initialization phase for deployment configuration.
|
|
@@ -91,7 +81,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
91
81
|
this.target = deploy_config_generator_shared_1.TargetName.CF; // when CAP project and no mta.yaml, default to Cloud Foundry
|
|
92
82
|
}
|
|
93
83
|
this.options.projectRoot = capRoot ?? this.mtaPath ?? this.options.appRootPath;
|
|
94
|
-
({ backendConfig: this.backendConfig, isLibrary: this.isLibrary } = await (0, utils_2.getBackendConfig)(this.fs, this.options, this.launchStandaloneFromYui, this.options.
|
|
84
|
+
({ backendConfig: this.backendConfig, isLibrary: this.isLibrary } = await (0, utils_2.getBackendConfig)(this.fs, this.options, this.launchStandaloneFromYui, this.options.appRootPath));
|
|
95
85
|
const { destinationName, servicePath } = await (0, utils_2.getApiHubOptions)(this.fs, {
|
|
96
86
|
appPath: this.options.appRootPath,
|
|
97
87
|
servicePath: this.options.appGenServicePath
|
|
@@ -127,7 +117,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
127
117
|
this.target = target;
|
|
128
118
|
this.answers = answers;
|
|
129
119
|
}
|
|
130
|
-
if (this.
|
|
120
|
+
if (this.target) {
|
|
131
121
|
this._composeWithSubGenerator(this.target, this.answers);
|
|
132
122
|
}
|
|
133
123
|
else {
|
|
@@ -160,7 +150,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
160
150
|
this.composeWith((0, utils_2.generatorNamespace)(this.genNamespace, generatorName), subGenOpts);
|
|
161
151
|
}
|
|
162
152
|
catch (error) {
|
|
163
|
-
deploy_config_generator_shared_1.DeploymentGenerator.logger?.error(error);
|
|
153
|
+
deploy_config_generator_shared_1.DeploymentGenerator.logger?.error(error.message);
|
|
164
154
|
}
|
|
165
155
|
}
|
|
166
156
|
}
|
|
@@ -7,14 +7,4 @@ import type { DeployConfigOptions } from '../types';
|
|
|
7
7
|
* @returns - the target
|
|
8
8
|
*/
|
|
9
9
|
export declare function parseTarget(args: string | string[], opts: DeployConfigOptions): string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Returns the details for the YUI prompt.
|
|
12
|
-
*
|
|
13
|
-
* @param appRootPath - path to the application to be displayed in YUI step description
|
|
14
|
-
* @returns step details
|
|
15
|
-
*/
|
|
16
|
-
export declare function getYUIDetails(appRootPath: string): {
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
}[];
|
|
20
10
|
//# sourceMappingURL=utils.d.ts.map
|
package/generators/app/utils.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const path_1 = require("path");
|
|
3
|
+
exports.parseTarget = void 0;
|
|
5
4
|
/**
|
|
6
5
|
* Parses the target from the CLI args or the options.
|
|
7
6
|
*
|
|
@@ -23,19 +22,4 @@ function parseTarget(args, opts) {
|
|
|
23
22
|
return result;
|
|
24
23
|
}
|
|
25
24
|
exports.parseTarget = parseTarget;
|
|
26
|
-
/**
|
|
27
|
-
* Returns the details for the YUI prompt.
|
|
28
|
-
*
|
|
29
|
-
* @param appRootPath - path to the application to be displayed in YUI step description
|
|
30
|
-
* @returns step details
|
|
31
|
-
*/
|
|
32
|
-
function getYUIDetails(appRootPath) {
|
|
33
|
-
return [
|
|
34
|
-
{
|
|
35
|
-
name: 'Deployment Configuration',
|
|
36
|
-
description: `Configure Deployment settings - ${(0, path_1.basename)(appRootPath)}`
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
}
|
|
40
|
-
exports.getYUIDetails = getYUIDetails;
|
|
41
25
|
//# sourceMappingURL=utils.js.map
|
|
@@ -2,5 +2,4 @@ import type { Target } from '../types';
|
|
|
2
2
|
export declare const generatorNamespace: (bundledRootGeneratorName: string, subGenName: string) => string;
|
|
3
3
|
export declare const abapChoice: Target;
|
|
4
4
|
export declare const cfChoice: Target;
|
|
5
|
-
export declare const generatorTitle = "Deployment Configuration Generator";
|
|
6
5
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.cfChoice = exports.abapChoice = exports.generatorNamespace = void 0;
|
|
4
4
|
// When deployment generator is bundled the namespacing is relative to the root generator
|
|
5
5
|
const deploy_config_generator_shared_1 = require("@sap-ux/deploy-config-generator-shared");
|
|
6
6
|
const generatorNamespace = (bundledRootGeneratorName, subGenName) => `${bundledRootGeneratorName}_${subGenName}`;
|
|
7
7
|
exports.generatorNamespace = generatorNamespace;
|
|
8
8
|
exports.abapChoice = { name: deploy_config_generator_shared_1.TargetName.ABAP, description: 'ABAP' };
|
|
9
9
|
exports.cfChoice = { name: deploy_config_generator_shared_1.TargetName.CF, description: 'Cloud Foundry' };
|
|
10
|
-
exports.generatorTitle = 'Deployment Configuration Generator';
|
|
11
10
|
//# sourceMappingURL=constants.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/deploy-config-sub-generator",
|
|
3
3
|
"description": "Main generator for configuring ABAP or Cloud Foundry deployment configuration",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"i18next": "23.5.1",
|
|
26
26
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
27
27
|
"yeoman-generator": "5.10.0",
|
|
28
|
-
"@sap-ux/
|
|
29
|
-
"@sap-ux/
|
|
30
|
-
"@sap-ux/
|
|
31
|
-
"@sap-ux/deploy-config-generator
|
|
32
|
-
"@sap-ux/
|
|
33
|
-
"@sap-ux/fiori-generator-shared": "0.9.
|
|
28
|
+
"@sap-ux/cf-deploy-config-sub-generator": "0.1.27",
|
|
29
|
+
"@sap-ux/axios-extension": "1.19.1",
|
|
30
|
+
"@sap-ux/btp-utils": "1.0.2",
|
|
31
|
+
"@sap-ux/abap-deploy-config-sub-generator": "0.0.51",
|
|
32
|
+
"@sap-ux/deploy-config-generator-shared": "0.0.37",
|
|
33
|
+
"@sap-ux/fiori-generator-shared": "0.9.9",
|
|
34
34
|
"@sap-ux/i18n": "0.2.3",
|
|
35
|
-
"@sap-ux/inquirer-common": "0.6.
|
|
36
|
-
"@sap-ux/nodejs-utils": "0.1.
|
|
37
|
-
"@sap-ux/odata-service-inquirer": "2.2.
|
|
38
|
-
"@sap-ux/project-access": "1.29.
|
|
35
|
+
"@sap-ux/inquirer-common": "0.6.29",
|
|
36
|
+
"@sap-ux/nodejs-utils": "0.1.8",
|
|
37
|
+
"@sap-ux/odata-service-inquirer": "2.2.21",
|
|
38
|
+
"@sap-ux/project-access": "1.29.16",
|
|
39
39
|
"@sap-ux/store": "1.0.0",
|
|
40
|
-
"@sap-ux/ui5-config": "0.26.
|
|
40
|
+
"@sap-ux/ui5-config": "0.26.4"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/types": "29.6.3",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"typescript": "5.3.3",
|
|
58
58
|
"unionfs": "4.4.0",
|
|
59
59
|
"yeoman-test": "6.3.0",
|
|
60
|
-
"@sap-ux/cf-deploy-config-inquirer": "0.2.
|
|
61
|
-
"@sap-ux/
|
|
62
|
-
"@sap-ux/
|
|
60
|
+
"@sap-ux/cf-deploy-config-inquirer": "0.2.18",
|
|
61
|
+
"@sap-ux/cf-deploy-config-writer": "0.1.22",
|
|
62
|
+
"@sap-ux/logger": "0.6.0"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=18.x"
|