@sap-ux/deploy-config-generator-shared 0.0.24 → 0.0.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/prompts/index.d.ts +6 -0
- package/dist/prompts/index.js +17 -1
- package/dist/translations/deploy-config-generator-shared.i18n.json +3 -1
- package/dist/utils/error-handler.d.ts +1 -2
- package/dist/utils/error-handler.js +1 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,10 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getConfirmConfigUpdatePrompt = exports.DeploymentGenerator = void 0;
|
|
17
|
+
exports.getConfirmMtaContinuePrompt = exports.getConfirmConfigUpdatePrompt = exports.DeploymentGenerator = void 0;
|
|
18
18
|
var generator_1 = require("./base/generator");
|
|
19
19
|
Object.defineProperty(exports, "DeploymentGenerator", { enumerable: true, get: function () { return generator_1.DeploymentGenerator; } });
|
|
20
20
|
__exportStar(require("./utils"), exports);
|
|
21
21
|
var prompts_1 = require("./prompts");
|
|
22
22
|
Object.defineProperty(exports, "getConfirmConfigUpdatePrompt", { enumerable: true, get: function () { return prompts_1.getConfirmConfigUpdatePrompt; } });
|
|
23
|
+
Object.defineProperty(exports, "getConfirmMtaContinuePrompt", { enumerable: true, get: function () { return prompts_1.getConfirmMtaContinuePrompt; } });
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -6,4 +6,10 @@ import type { Question } from 'inquirer';
|
|
|
6
6
|
* @returns the prompt question
|
|
7
7
|
*/
|
|
8
8
|
export declare function getConfirmConfigUpdatePrompt(configType?: string): Question[];
|
|
9
|
+
/**
|
|
10
|
+
* Generate a new prompt asking if the user wants to create an approuter configuration within a CAP project.
|
|
11
|
+
*
|
|
12
|
+
* @returns the CAP MTA continue question.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getConfirmMtaContinuePrompt(): Question[];
|
|
9
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/prompts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConfirmConfigUpdatePrompt = void 0;
|
|
3
|
+
exports.getConfirmMtaContinuePrompt = exports.getConfirmConfigUpdatePrompt = void 0;
|
|
4
4
|
const i18n_1 = require("../utils/i18n");
|
|
5
5
|
/**
|
|
6
6
|
* Enumeration of prompt names
|
|
@@ -26,4 +26,20 @@ function getConfirmConfigUpdatePrompt(configType) {
|
|
|
26
26
|
];
|
|
27
27
|
}
|
|
28
28
|
exports.getConfirmConfigUpdatePrompt = getConfirmConfigUpdatePrompt;
|
|
29
|
+
/**
|
|
30
|
+
* Generate a new prompt asking if the user wants to create an approuter configuration within a CAP project.
|
|
31
|
+
*
|
|
32
|
+
* @returns the CAP MTA continue question.
|
|
33
|
+
*/
|
|
34
|
+
function getConfirmMtaContinuePrompt() {
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
type: 'confirm',
|
|
38
|
+
name: 'addCapMtaContinue',
|
|
39
|
+
message: (0, i18n_1.t)('prompts.confirmCAPMtaContinue.message'),
|
|
40
|
+
default: false
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
exports.getConfirmMtaContinuePrompt = getConfirmMtaContinuePrompt;
|
|
29
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
"prompts": {
|
|
3
3
|
"confirmConfigUpdate": {
|
|
4
4
|
"message": "{{- configType}} configuration is managed centrally as part of the CI pipeline, local updates to the configuration will not be for productive use. Are you sure you want to continue?"
|
|
5
|
+
},
|
|
6
|
+
"confirmCAPMtaContinue": {
|
|
7
|
+
"message": "There is no mta.yaml file defined for this project. In order to add deployment configuration for this application, this file must be present. Do you want to create an mta.yaml to continue?"
|
|
5
8
|
}
|
|
6
9
|
},
|
|
7
10
|
"errors": {
|
|
8
11
|
"abortSignal": "Generator aborted",
|
|
9
|
-
"capDeploymentNoMta": "The SAP Fiori application is within a CAP project and deployment should be configured as part of the CAP project. Please ensure you have a mta.yaml file defined for this project.",
|
|
10
12
|
"fileDoesNotExist": "File does not exist: {{- filePath}}",
|
|
11
13
|
"folderDoesNotExist": "Folder path does not exist: {{- filePath}}",
|
|
12
14
|
"noAppName": "Could not determine app name from manifest",
|
|
@@ -4,8 +4,7 @@ export declare enum ERROR_TYPE {
|
|
|
4
4
|
NO_MANIFEST = "NO_MANIFEST",
|
|
5
5
|
NO_APP_NAME = "NO_APP_NAME",
|
|
6
6
|
NO_CDS_BIN = "NO_CDS_BIN",
|
|
7
|
-
NO_MTA_BIN = "NO_MTA_BIN"
|
|
8
|
-
CAP_DEPLOYMENT_NO_MTA = "CAP_DEPLOYMENT_NO_MTA"
|
|
7
|
+
NO_MTA_BIN = "NO_MTA_BIN"
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
10
|
* Error messages for the deploy configuration generator.
|
|
@@ -13,7 +13,6 @@ var ERROR_TYPE;
|
|
|
13
13
|
ERROR_TYPE["NO_APP_NAME"] = "NO_APP_NAME";
|
|
14
14
|
ERROR_TYPE["NO_CDS_BIN"] = "NO_CDS_BIN";
|
|
15
15
|
ERROR_TYPE["NO_MTA_BIN"] = "NO_MTA_BIN";
|
|
16
|
-
ERROR_TYPE["CAP_DEPLOYMENT_NO_MTA"] = "CAP_DEPLOYMENT_NO_MTA";
|
|
17
16
|
})(ERROR_TYPE || (exports.ERROR_TYPE = ERROR_TYPE = {}));
|
|
18
17
|
/**
|
|
19
18
|
* Error messages for the deploy configuration generator.
|
|
@@ -37,8 +36,7 @@ class ErrorHandler {
|
|
|
37
36
|
[ERROR_TYPE.NO_MANIFEST]: () => (0, i18n_1.t)('errors.noManifest'),
|
|
38
37
|
[ERROR_TYPE.NO_APP_NAME]: () => (0, i18n_1.t)('errors.noAppName'),
|
|
39
38
|
[ERROR_TYPE.NO_CDS_BIN]: () => ErrorHandler.cannotFindBinary(constants_1.cdsExecutable, constants_1.cdsPkg),
|
|
40
|
-
[ERROR_TYPE.NO_MTA_BIN]: () => ErrorHandler.cannotFindBinary(constants_1.mtaExecutable, constants_1.mtaPkg)
|
|
41
|
-
[ERROR_TYPE.CAP_DEPLOYMENT_NO_MTA]: () => (0, i18n_1.t)('errors.capDeploymentNoMta')
|
|
39
|
+
[ERROR_TYPE.NO_MTA_BIN]: () => ErrorHandler.cannotFindBinary(constants_1.mtaExecutable, constants_1.mtaPkg)
|
|
42
40
|
};
|
|
43
41
|
static noBaseConfig = (baseConfig) => (0, i18n_1.t)('errors.noBaseConfig', { baseConfig });
|
|
44
42
|
static unrecognizedTarget = (target) => (0, i18n_1.t)('errors.unrecognizedTarget', { target });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/deploy-config-generator-shared",
|
|
3
3
|
"description": "Commonly used shared functionality and types to support the deploy config generator.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.27",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"i18next": "20.6.1",
|
|
22
22
|
"yeoman-generator": "5.10.0",
|
|
23
23
|
"@sap-ux/btp-utils": "1.0.1",
|
|
24
|
-
"@sap-ux/fiori-generator-shared": "0.
|
|
24
|
+
"@sap-ux/fiori-generator-shared": "0.9.0",
|
|
25
25
|
"@sap-ux/nodejs-utils": "0.1.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/vscode": "1.73.1",
|
|
30
30
|
"@types/yeoman-generator": "5.2.11",
|
|
31
31
|
"typescript": "5.3.3",
|
|
32
|
-
"@sap-ux/axios-extension": "1.18.
|
|
32
|
+
"@sap-ux/axios-extension": "1.18.6",
|
|
33
33
|
"@sap-ux/store": "1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|