@sap-ux/cf-deploy-config-inquirer 0.3.30 → 0.4.1
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/prompts/prompts.js +5 -5
- package/dist/types.d.ts +13 -11
- package/dist/types.js +1 -1
- package/package.json +5 -5
package/dist/prompts/prompts.js
CHANGED
|
@@ -169,13 +169,13 @@ function getRouterOptionsPrompt() {
|
|
|
169
169
|
*/
|
|
170
170
|
async function getQuestions(promptOptions, log) {
|
|
171
171
|
const destinationOptions = promptOptions[types_1.promptNames.destinationName];
|
|
172
|
-
const addOverwriteQuestion = promptOptions
|
|
173
|
-
const
|
|
174
|
-
const
|
|
172
|
+
const addOverwriteQuestion = !promptOptions.overwrite?.hide;
|
|
173
|
+
const addManagedAppRouterQuestions = !promptOptions.addManagedAppRouter?.hide;
|
|
174
|
+
const addRouterTypeQuestion = !promptOptions.routerType?.hide;
|
|
175
175
|
const questions = [];
|
|
176
176
|
// Collect questions into an array
|
|
177
177
|
questions.push(await getDestinationNamePrompt(destinationOptions));
|
|
178
|
-
if (
|
|
178
|
+
if (addManagedAppRouterQuestions) {
|
|
179
179
|
log?.info((0, i18n_1.t)('info.addManagedAppRouter'));
|
|
180
180
|
questions.push(getAddManagedAppRouterPrompt());
|
|
181
181
|
}
|
|
@@ -183,7 +183,7 @@ async function getQuestions(promptOptions, log) {
|
|
|
183
183
|
log?.info((0, i18n_1.t)('info.overwriteDestination'));
|
|
184
184
|
questions.push(getOverwritePrompt());
|
|
185
185
|
}
|
|
186
|
-
if (
|
|
186
|
+
if (addRouterTypeQuestion) {
|
|
187
187
|
log?.info((0, i18n_1.t)('info.routerOptions'));
|
|
188
188
|
questions.push(getRouterOptionsPrompt());
|
|
189
189
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { YUIQuestion } from '@sap-ux/inquirer-common';
|
|
1
|
+
import type { CommonPromptOptions, YUIQuestion } from '@sap-ux/inquirer-common';
|
|
2
2
|
import type { AutocompleteQuestionOptions } from 'inquirer-autocomplete-prompt';
|
|
3
3
|
/**
|
|
4
4
|
* Enum defining prompt names for Cloud Foundry (CF) deployment configuration.
|
|
@@ -9,7 +9,7 @@ export declare enum promptNames {
|
|
|
9
9
|
/** The prompt to specify if a managed app router should be added to the deployment. */
|
|
10
10
|
addManagedAppRouter = "addManagedAppRouter",
|
|
11
11
|
/** The prompt for confirming destination overwrite. */
|
|
12
|
-
overwrite = "
|
|
12
|
+
overwrite = "overwrite",
|
|
13
13
|
/** The prompt for confirming the router type. */
|
|
14
14
|
routerType = "routerType"
|
|
15
15
|
}
|
|
@@ -62,22 +62,24 @@ export type DestinationRouterPromptOptions = {
|
|
|
62
62
|
hint?: boolean;
|
|
63
63
|
routerType?: RouterModuleType[];
|
|
64
64
|
};
|
|
65
|
+
type cfDeployConfigPromptOptions = {
|
|
66
|
+
[promptNames.destinationName]: DestinationNamePromptOptions & CommonPromptOptions;
|
|
67
|
+
[promptNames.addManagedAppRouter]: CommonPromptOptions;
|
|
68
|
+
[promptNames.overwrite]: CommonPromptOptions;
|
|
69
|
+
[promptNames.routerType]: CommonPromptOptions;
|
|
70
|
+
};
|
|
65
71
|
/**
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
export type booleanPromptOptions = Partial<Record<promptNames.overwrite | promptNames.addManagedAppRouter | appRouterPromptNames.mtaId | appRouterPromptNames.mtaDescription | appRouterPromptNames.mtaVersion | appRouterPromptNames.routerType | appRouterPromptNames.addABAPServiceBinding | appRouterPromptNames.addConnectivityService, boolean>>;
|
|
69
|
-
/**
|
|
70
|
-
* Defines options for string-type prompts in CF deployment configuration.
|
|
72
|
+
* Configuration options for CF deployment prompts.
|
|
71
73
|
*/
|
|
72
|
-
type
|
|
74
|
+
export type CfDeployConfigPromptOptions = Partial<cfDeployConfigPromptOptions>;
|
|
73
75
|
/**
|
|
74
|
-
*
|
|
76
|
+
* Used to determine if a prompt should be shown for the CF App Router generator.
|
|
75
77
|
*/
|
|
76
|
-
|
|
78
|
+
type appRouterPromptsHide = Partial<Record<appRouterPromptNames.mtaId | appRouterPromptNames.mtaDescription | appRouterPromptNames.mtaVersion | appRouterPromptNames.routerType | appRouterPromptNames.addABAPServiceBinding | appRouterPromptNames.addConnectivityService, boolean>>;
|
|
77
79
|
/**
|
|
78
80
|
* Configuration options for CF App Router deployment prompts.
|
|
79
81
|
*/
|
|
80
|
-
export type CfAppRouterDeployConfigPromptOptions =
|
|
82
|
+
export type CfAppRouterDeployConfigPromptOptions = Record<appRouterPromptNames.mtaPath, string> & Partial<appRouterPromptsHide>;
|
|
81
83
|
/**
|
|
82
84
|
* Represents a question in the CF deployment configuration.
|
|
83
85
|
* Extends `YUIQuestion` with optional autocomplete functionality.
|
package/dist/types.js
CHANGED
|
@@ -11,7 +11,7 @@ var promptNames;
|
|
|
11
11
|
/** The prompt to specify if a managed app router should be added to the deployment. */
|
|
12
12
|
promptNames["addManagedAppRouter"] = "addManagedAppRouter";
|
|
13
13
|
/** The prompt for confirming destination overwrite. */
|
|
14
|
-
promptNames["overwrite"] = "
|
|
14
|
+
promptNames["overwrite"] = "overwrite";
|
|
15
15
|
/** The prompt for confirming the router type. */
|
|
16
16
|
promptNames["routerType"] = "routerType";
|
|
17
17
|
})(promptNames || (exports.promptNames = promptNames = {}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/cf-deploy-config-inquirer",
|
|
3
3
|
"description": "Prompts module that can provide prompts for cf deployment config writer",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"i18next": "25.3.0",
|
|
23
23
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
24
|
-
"@sap-ux/inquirer-common": "0.7.
|
|
24
|
+
"@sap-ux/inquirer-common": "0.7.28",
|
|
25
25
|
"@sap-ux/btp-utils": "1.1.0",
|
|
26
26
|
"@sap-ux/logger": "0.7.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@sap-devx/yeoman-ui-types": "1.14.4",
|
|
30
|
-
"@types/inquirer-autocomplete-prompt": "2.0.
|
|
30
|
+
"@types/inquirer-autocomplete-prompt": "2.0.2",
|
|
31
31
|
"@types/inquirer": "8.2.6",
|
|
32
32
|
"inquirer": "8.2.6",
|
|
33
|
-
"@sap-ux/project-input-validator": "0.6.
|
|
33
|
+
"@sap-ux/project-input-validator": "0.6.13"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=20.x"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"watch": "tsc --watch",
|
|
42
42
|
"lint": "eslint . --ext .ts",
|
|
43
43
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
44
|
-
"test": "jest --ci --forceExit --detectOpenHandles --colors
|
|
44
|
+
"test": "jest --ci --forceExit --detectOpenHandles --colors",
|
|
45
45
|
"test-u": "jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
46
46
|
"link": "pnpm link --global",
|
|
47
47
|
"unlink": "pnpm unlink --global"
|