@sap-ux/ui5-application-inquirer 0.2.0 → 0.2.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/index.d.ts +3 -3
- package/dist/index.js +5 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,10 +16,10 @@ declare function getPrompts(promptOptions?: UI5ApplicationPromptOptions, capCdsI
|
|
|
16
16
|
*
|
|
17
17
|
* @param adapter - optionally provide references to a calling inquirer instance, this supports integration to Yeoman generators, for example
|
|
18
18
|
* @param promptOptions - options that can control some of the prompt behavior. See {@link UI5ApplicationPromptOptions} for details
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
19
|
+
* @param [capCdsInfo] - the CAP CDS info for the project, if this prompting will add a UI% app to an existing CAP project
|
|
20
|
+
* @param [isYUI] - optional, default is `false`. Changes the behaviour of some validation since YUI does not re-validate prompts that may be inter-dependant.
|
|
21
21
|
* @returns the prompt answers
|
|
22
22
|
*/
|
|
23
|
-
declare function prompt(adapter: InquirerAdapter, promptOptions?: UI5ApplicationPromptOptions,
|
|
23
|
+
declare function prompt(adapter: InquirerAdapter, promptOptions?: UI5ApplicationPromptOptions, capCdsInfo?: CdsUi5PluginInfo, isYUI?: boolean): Promise<UI5ApplicationAnswers>;
|
|
24
24
|
export { getPrompts, prompt, promptNames, type CdsUi5PluginInfo, type InquirerAdapter, type PromptDefaultValue, type UI5ApplicationAnswers, type UI5ApplicationPromptOptions };
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.promptNames = exports.prompt = exports.getPrompts = void 0;
|
|
16
16
|
const ui5_info_1 = require("@sap-ux/ui5-info");
|
|
17
17
|
const inquirer_autocomplete_prompt_1 = __importDefault(require("inquirer-autocomplete-prompt"));
|
|
18
|
-
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
19
18
|
const isNil_1 = __importDefault(require("lodash/isNil"));
|
|
20
19
|
const prompts_1 = require("./prompts");
|
|
21
20
|
const types_1 = require("./types");
|
|
@@ -38,8 +37,7 @@ function getPrompts(promptOptions, capCdsInfo, isYUI = false) {
|
|
|
38
37
|
minSupportedUI5Version: (_b = (_a = promptOptions === null || promptOptions === void 0 ? void 0 : promptOptions.ui5Version) === null || _a === void 0 ? void 0 : _a.minUI5Version) !== null && _b !== void 0 ? _b : undefined
|
|
39
38
|
};
|
|
40
39
|
const ui5Versions = yield (0, ui5_info_1.getUI5Versions)(filterOptions);
|
|
41
|
-
|
|
42
|
-
return (0, prompts_1.getQuestions)(ui5Versions, promptOptionsClean, capCdsInfo, isYUI);
|
|
40
|
+
return (0, prompts_1.getQuestions)(ui5Versions, promptOptions, capCdsInfo, isYUI);
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
43
|
exports.getPrompts = getPrompts;
|
|
@@ -48,14 +46,14 @@ exports.getPrompts = getPrompts;
|
|
|
48
46
|
*
|
|
49
47
|
* @param adapter - optionally provide references to a calling inquirer instance, this supports integration to Yeoman generators, for example
|
|
50
48
|
* @param promptOptions - options that can control some of the prompt behavior. See {@link UI5ApplicationPromptOptions} for details
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
49
|
+
* @param [capCdsInfo] - the CAP CDS info for the project, if this prompting will add a UI% app to an existing CAP project
|
|
50
|
+
* @param [isYUI] - optional, default is `false`. Changes the behaviour of some validation since YUI does not re-validate prompts that may be inter-dependant.
|
|
53
51
|
* @returns the prompt answers
|
|
54
52
|
*/
|
|
55
|
-
function prompt(adapter, promptOptions,
|
|
53
|
+
function prompt(adapter, promptOptions, capCdsInfo, isYUI = false) {
|
|
56
54
|
var _a;
|
|
57
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const ui5AppPrompts = yield
|
|
56
|
+
const ui5AppPrompts = yield getPrompts(promptOptions, capCdsInfo, isYUI);
|
|
59
57
|
if ((adapter === null || adapter === void 0 ? void 0 : adapter.promptModule) && ((_a = promptOptions === null || promptOptions === void 0 ? void 0 : promptOptions.ui5Version) === null || _a === void 0 ? void 0 : _a.useAutocomplete)) {
|
|
60
58
|
const pm = adapter.promptModule;
|
|
61
59
|
pm.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
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.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|