@sap-ux/deploy-config-generator-shared 0.0.8 → 0.0.10

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 CHANGED
@@ -1,3 +1,4 @@
1
1
  export { DeploymentGenerator } from './base/generator';
2
2
  export { initI18n, bail, handleErrorMessage, showOverwriteQuestion, ErrorMessages, ConnectedSystem } from './utils';
3
+ export { getConfirmConfigUpdatePrompt } from './prompts';
3
4
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorMessages = exports.showOverwriteQuestion = exports.handleErrorMessage = exports.bail = exports.initI18n = exports.DeploymentGenerator = void 0;
3
+ exports.getConfirmConfigUpdatePrompt = exports.ErrorMessages = exports.showOverwriteQuestion = exports.handleErrorMessage = exports.bail = exports.initI18n = exports.DeploymentGenerator = void 0;
4
4
  var generator_1 = require("./base/generator");
5
5
  Object.defineProperty(exports, "DeploymentGenerator", { enumerable: true, get: function () { return generator_1.DeploymentGenerator; } });
6
6
  var utils_1 = require("./utils");
@@ -9,4 +9,6 @@ Object.defineProperty(exports, "bail", { enumerable: true, get: function () { re
9
9
  Object.defineProperty(exports, "handleErrorMessage", { enumerable: true, get: function () { return utils_1.handleErrorMessage; } });
10
10
  Object.defineProperty(exports, "showOverwriteQuestion", { enumerable: true, get: function () { return utils_1.showOverwriteQuestion; } });
11
11
  Object.defineProperty(exports, "ErrorMessages", { enumerable: true, get: function () { return utils_1.ErrorMessages; } });
12
+ var prompts_1 = require("./prompts");
13
+ Object.defineProperty(exports, "getConfirmConfigUpdatePrompt", { enumerable: true, get: function () { return prompts_1.getConfirmConfigUpdatePrompt; } });
12
14
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ import type { Question } from 'inquirer';
2
+ /**
3
+ * Returns prompt which asks whether the user wants to continue with the configuration update even though it is managed centrally as part of the CI pipeline.
4
+ *
5
+ * @param configType - the type of configuration being generated e.g FLP, Deployment
6
+ * @returns the prompt question
7
+ */
8
+ export declare function getConfirmConfigUpdatePrompt(configType?: string): Question[];
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfirmConfigUpdatePrompt = void 0;
4
+ const i18n_1 = require("../utils/i18n");
5
+ /**
6
+ * Enumeration of prompt names
7
+ */
8
+ var promptNames;
9
+ (function (promptNames) {
10
+ promptNames["confirmConfigUpate"] = "confirmConfigUpate";
11
+ })(promptNames || (promptNames = {}));
12
+ /**
13
+ * Returns prompt which asks whether the user wants to continue with the configuration update even though it is managed centrally as part of the CI pipeline.
14
+ *
15
+ * @param configType - the type of configuration being generated e.g FLP, Deployment
16
+ * @returns the prompt question
17
+ */
18
+ function getConfirmConfigUpdatePrompt(configType) {
19
+ return [
20
+ {
21
+ type: 'confirm',
22
+ name: promptNames.confirmConfigUpate,
23
+ message: (0, i18n_1.t)('prompts.confirmConfigUpate.message', { configType }),
24
+ default: false
25
+ }
26
+ ];
27
+ }
28
+ exports.getConfirmConfigUpdatePrompt = getConfirmConfigUpdatePrompt;
29
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,9 @@
1
1
  {
2
+ "prompts": {
3
+ "confirmConfigUpate": {
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
+ },
2
7
  "errors": {
3
8
  "abortSignal": "ABORT_SIGNAL",
4
9
  "cannotReadUi5Config": "Cannot read ui5.yaml: {{- reason}}",
@@ -11,7 +11,7 @@ const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
11
11
  */
12
12
  class ErrorMessages {
13
13
  static cannotFindBinary = (bin, pkg) => (0, i18n_1.t)('errors.noBinary', { bin, pkg });
14
- static abortSignal = (0, i18n_1.t)('errors.abortSignal'); // check this one, is ABORT_SIGNAL signifcant? or can we just throw an error?
14
+ static abortSignal = (0, i18n_1.t)('errors.abortSignal');
15
15
  static noManifest = (0, i18n_1.t)('errors.noManifest');
16
16
  static noAppName = (0, i18n_1.t)('errors.noAppName');
17
17
  static noUI5Config = (0, i18n_1.t)('errors.noUi5Config');
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.8",
4
+ "version": "0.0.10",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -20,12 +20,15 @@
20
20
  "@vscode-logging/logger": "2.0.0",
21
21
  "i18next": "20.6.1",
22
22
  "yeoman-generator": "5.10.0",
23
- "@sap-ux/fiori-generator-shared": "0.7.17"
23
+ "@sap-ux/fiori-generator-shared": "0.7.19",
24
+ "@sap-ux/nodejs-utils": "0.1.4"
24
25
  },
25
26
  "devDependencies": {
27
+ "@types/inquirer": "8.2.6",
28
+ "@types/vscode": "1.73.1",
26
29
  "@types/yeoman-generator": "5.2.11",
27
30
  "typescript": "5.3.3",
28
- "@sap-ux/axios-extension": "1.17.8",
31
+ "@sap-ux/axios-extension": "1.18.1",
29
32
  "@sap-ux/btp-utils": "0.17.2",
30
33
  "@sap-ux/store": "1.0.0"
31
34
  },