@sap-ux/ui5-application-inquirer 0.5.25 → 0.6.0
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 +2 -2
- package/dist/types.d.ts +17 -1
- package/package.json +3 -3
package/dist/prompts/prompts.js
CHANGED
|
@@ -22,10 +22,10 @@ function getQuestions(ui5Versions, promptOptions, capCdsInfo, isYUI = false) {
|
|
|
22
22
|
// Set shared defaults
|
|
23
23
|
const appName = typeof promptOptions?.[types_1.promptNames.name]?.default === 'string'
|
|
24
24
|
? promptOptions[types_1.promptNames.name].default
|
|
25
|
-
:
|
|
25
|
+
: promptOptions?.[types_1.promptNames.name]?.defaultValue;
|
|
26
26
|
const targetDir = typeof promptOptions?.[types_1.promptNames.targetFolder]?.default === 'string'
|
|
27
27
|
? promptOptions[types_1.promptNames.targetFolder].default // Default functions will be applied later, these replace the existing defaults
|
|
28
|
-
: process.cwd();
|
|
28
|
+
: promptOptions?.[types_1.promptNames.targetFolder]?.defaultValue ?? process.cwd();
|
|
29
29
|
const isCapProject = !!capCdsInfo;
|
|
30
30
|
const keyedPrompts = {
|
|
31
31
|
[types_1.promptNames.name]: getNamePrompt(targetDir, isCapProject, appName, isYUI),
|
package/dist/types.d.ts
CHANGED
|
@@ -90,6 +90,22 @@ type EnableTypeScriptPromptOptions = Omit<PromptDefaultValue<boolean>, 'default'
|
|
|
90
90
|
capCdsInfo?: CdsUi5PluginInfo;
|
|
91
91
|
}) => boolean;
|
|
92
92
|
};
|
|
93
|
+
type TargetFolderPromptOptions = {
|
|
94
|
+
/**
|
|
95
|
+
* The default target folder path to be used in combination with the prompt default function and the name prompt validation.
|
|
96
|
+
* Use this instead of replacing the default function to keep the existing default function behaviour.
|
|
97
|
+
* Note that if a `default` option is also provided then this will be used instead of the `defaultValue` option.
|
|
98
|
+
*/
|
|
99
|
+
defaultValue?: string;
|
|
100
|
+
};
|
|
101
|
+
type NamePromptOptions = {
|
|
102
|
+
/**
|
|
103
|
+
* The default name value to be used in combination with the prompt default function and the target folder prompt validation.
|
|
104
|
+
* Use this instead of replacing the default function to keep the existing default function behaviour.
|
|
105
|
+
* Note that if a `default` option is also provided then this will be used instead of the `defaultValue` option.
|
|
106
|
+
*/
|
|
107
|
+
defaultValue?: string;
|
|
108
|
+
};
|
|
93
109
|
/**
|
|
94
110
|
* These are boolean value prompt option keys
|
|
95
111
|
*/
|
|
@@ -110,7 +126,7 @@ export type UI5ApplicationCommonPromptOptions = {
|
|
|
110
126
|
* Provide the correct type checking for string value prompts and `ui5Version` options
|
|
111
127
|
*
|
|
112
128
|
*/
|
|
113
|
-
type stringValuePromptOptions = Record<stringValuePrompts, UI5ApplicationCommonPromptOptions> & Record<DefaultValueInputPrompts, PromptDefaultValue<string>> & Record<promptNames.ui5Version, UI5VersionPromptOptions>;
|
|
129
|
+
type stringValuePromptOptions = Record<stringValuePrompts, UI5ApplicationCommonPromptOptions> & Record<DefaultValueInputPrompts, PromptDefaultValue<string>> & Record<promptNames.ui5Version, UI5VersionPromptOptions> & Record<promptNames.targetFolder, TargetFolderPromptOptions> & Record<promptNames.name, NamePromptOptions>;
|
|
114
130
|
/**
|
|
115
131
|
* Provide the correct type checking for boolean value prompts and validator callback options
|
|
116
132
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui5-application-inquirer",
|
|
3
3
|
"description": "Prompts module that can prompt users for inputs required for UI5 application writing",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
25
|
"semver": "7.5.4",
|
|
26
26
|
"@sap-ux/inquirer-common": "0.4.6",
|
|
27
|
-
"@sap-ux/project-access": "1.26.
|
|
27
|
+
"@sap-ux/project-access": "1.26.8",
|
|
28
28
|
"@sap-ux/project-input-validator": "0.3.3",
|
|
29
29
|
"@sap-ux/ui5-info": "0.8.1"
|
|
30
30
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/lodash": "4.14.202",
|
|
36
36
|
"@types/semver": "7.5.4",
|
|
37
37
|
"inquirer": "8.2.6",
|
|
38
|
-
"@sap-ux/cap-config-writer": "0.7.
|
|
38
|
+
"@sap-ux/cap-config-writer": "0.7.30"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=18.x"
|