@sap-ux/deploy-config-sub-generator 0.0.5 → 0.0.8
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/generators/app/index.js
CHANGED
|
@@ -47,6 +47,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
47
47
|
this.launchDeployConfigAsSubGenerator = opts.launchDeployConfigAsSubGenerator ?? false;
|
|
48
48
|
this.target = (0, utils_1.parseTarget)(args, opts);
|
|
49
49
|
this.vscode = opts.vscode;
|
|
50
|
+
(0, utils_1.registerNamespaces)(this.rootGeneratorName(), this.genNamespace, this.env.isPackageRegistered.bind(this.env), this.env.lookup.bind(this.env));
|
|
50
51
|
// Extensions use options.data to pass in the options
|
|
51
52
|
if (this.options.data?.destinationRoot) {
|
|
52
53
|
this.launchStandaloneFromYui = true;
|
|
@@ -90,8 +91,8 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
90
91
|
if (this.isCap && !this.mtaPath) {
|
|
91
92
|
this.target = deploy_config_generator_shared_1.TargetName.CF; // when CAP project and no mta.yaml, default to Cloud Foundry
|
|
92
93
|
}
|
|
93
|
-
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.
|
|
94
|
+
this.options.projectRoot = capRoot ?? (this.mtaPath && (0, path_1.dirname)(this.mtaPath)) ?? this.options.appRootPath;
|
|
95
|
+
({ backendConfig: this.backendConfig, isLibrary: this.isLibrary } = await (0, utils_2.getBackendConfig)(this.fs, this.options, this.launchStandaloneFromYui, this.options.appRootPath));
|
|
95
96
|
const { destinationName, servicePath } = await (0, utils_2.getApiHubOptions)(this.fs, {
|
|
96
97
|
appPath: this.options.appRootPath,
|
|
97
98
|
servicePath: this.options.appGenServicePath
|
|
@@ -127,7 +128,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
127
128
|
this.target = target;
|
|
128
129
|
this.answers = answers;
|
|
129
130
|
}
|
|
130
|
-
if (this.
|
|
131
|
+
if (this.target) {
|
|
131
132
|
this._composeWithSubGenerator(this.target, this.answers);
|
|
132
133
|
}
|
|
133
134
|
else {
|
|
@@ -160,7 +161,7 @@ class default_1 extends deploy_config_generator_shared_1.DeploymentGenerator {
|
|
|
160
161
|
this.composeWith((0, utils_2.generatorNamespace)(this.genNamespace, generatorName), subGenOpts);
|
|
161
162
|
}
|
|
162
163
|
catch (error) {
|
|
163
|
-
deploy_config_generator_shared_1.DeploymentGenerator.logger?.error(error);
|
|
164
|
+
deploy_config_generator_shared_1.DeploymentGenerator.logger?.error(error.message);
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
167
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DeployConfigOptions } from '../types';
|
|
2
|
+
import type { GeneratorOptions } from 'yeoman-generator';
|
|
2
3
|
/**
|
|
3
4
|
* Parses the target from the CLI args or the options.
|
|
4
5
|
*
|
|
@@ -17,4 +18,13 @@ export declare function getYUIDetails(appRootPath: string): {
|
|
|
17
18
|
name: string;
|
|
18
19
|
description: string;
|
|
19
20
|
}[];
|
|
21
|
+
/**
|
|
22
|
+
* Registers all the root generator's namespaces i.e the subgenerators.
|
|
23
|
+
*
|
|
24
|
+
* @param rootGenerator - the root generator name
|
|
25
|
+
* @param generatorNamespace - the namespace of the generator
|
|
26
|
+
* @param isPackageRegistered - function to check if a package is registered
|
|
27
|
+
* @param lookup - function to lookup and register the package's namespaces
|
|
28
|
+
*/
|
|
29
|
+
export declare function registerNamespaces(rootGenerator: string, generatorNamespace: string, isPackageRegistered: GeneratorOptions['env.isPackageRegistered'], lookup: GeneratorOptions['env.lookup']): void;
|
|
20
30
|
//# sourceMappingURL=utils.d.ts.map
|
package/generators/app/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getYUIDetails = exports.parseTarget = void 0;
|
|
3
|
+
exports.registerNamespaces = exports.getYUIDetails = exports.parseTarget = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
/**
|
|
6
6
|
* Parses the target from the CLI args or the options.
|
|
@@ -38,4 +38,18 @@ function getYUIDetails(appRootPath) {
|
|
|
38
38
|
];
|
|
39
39
|
}
|
|
40
40
|
exports.getYUIDetails = getYUIDetails;
|
|
41
|
+
/**
|
|
42
|
+
* Registers all the root generator's namespaces i.e the subgenerators.
|
|
43
|
+
*
|
|
44
|
+
* @param rootGenerator - the root generator name
|
|
45
|
+
* @param generatorNamespace - the namespace of the generator
|
|
46
|
+
* @param isPackageRegistered - function to check if a package is registered
|
|
47
|
+
* @param lookup - function to lookup and register the package's namespaces
|
|
48
|
+
*/
|
|
49
|
+
function registerNamespaces(rootGenerator, generatorNamespace, isPackageRegistered, lookup) {
|
|
50
|
+
if (rootGenerator && !isPackageRegistered(generatorNamespace)) {
|
|
51
|
+
lookup({ packagePatterns: [rootGenerator] });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.registerNamespaces = registerNamespaces;
|
|
41
55
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Target } from '../types';
|
|
2
2
|
export declare const generatorNamespace: (bundledRootGeneratorName: string, subGenName: string) => string;
|
|
3
|
+
export declare const generatorTitle = "Deployment Configuration Generator";
|
|
3
4
|
export declare const abapChoice: Target;
|
|
4
5
|
export declare const cfChoice: Target;
|
|
5
|
-
export declare const generatorTitle = "Deployment Configuration Generator";
|
|
6
6
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.cfChoice = exports.abapChoice = exports.generatorTitle = 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
|
+
exports.generatorTitle = 'Deployment Configuration Generator';
|
|
8
9
|
exports.abapChoice = { name: deploy_config_generator_shared_1.TargetName.ABAP, description: 'ABAP' };
|
|
9
10
|
exports.cfChoice = { name: deploy_config_generator_shared_1.TargetName.CF, description: 'Cloud Foundry' };
|
|
10
|
-
exports.generatorTitle = 'Deployment Configuration Generator';
|
|
11
11
|
//# 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.8",
|
|
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/axios-extension": "1.19.
|
|
29
|
-
"@sap-ux/btp-utils": "1.0.
|
|
30
|
-
"@sap-ux/
|
|
31
|
-
"@sap-ux/deploy-config-generator
|
|
32
|
-
"@sap-ux/
|
|
33
|
-
"@sap-ux/fiori-generator-shared": "0.9.
|
|
28
|
+
"@sap-ux/axios-extension": "1.19.1",
|
|
29
|
+
"@sap-ux/btp-utils": "1.0.2",
|
|
30
|
+
"@sap-ux/abap-deploy-config-sub-generator": "0.0.51",
|
|
31
|
+
"@sap-ux/cf-deploy-config-sub-generator": "0.1.27",
|
|
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.
|
|
39
|
-
"@sap-ux/
|
|
40
|
-
"@sap-ux/
|
|
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
|
+
"@sap-ux/ui5-config": "0.26.4",
|
|
40
|
+
"@sap-ux/store": "1.0.0"
|
|
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-
|
|
61
|
-
"@sap-ux/
|
|
62
|
-
"@sap-ux/
|
|
60
|
+
"@sap-ux/cf-deploy-config-writer": "0.1.22",
|
|
61
|
+
"@sap-ux/cf-deploy-config-inquirer": "0.2.18",
|
|
62
|
+
"@sap-ux/logger": "0.6.0"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=18.x"
|