@sap-ux/odata-service-inquirer 0.1.1 → 0.1.3
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/README.md +3 -3
- package/dist/index.js +3 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ See [Inquirer.js](https://www.npmjs.com/package/inquirer) for valid default prop
|
|
|
30
30
|
```TypeScript
|
|
31
31
|
import type { InquirerAdapter } from '@sap-ux/inquirer-common';
|
|
32
32
|
import type { OdataServiceAnswers, OdataServicePromptOptions } from '@sap-ux/odata-service-inquirer';
|
|
33
|
-
import { DatasourceType, prompt, CapService } from '@sap-ux/odata-service-inquirer';
|
|
33
|
+
import { DatasourceType, prompt as serviceInquirerPrompt, CapService } from '@sap-ux/odata-service-inquirer';
|
|
34
34
|
import { generate as generateOdataService, OdataService, ServiceType } from '@sap-ux/odata-service-writer'
|
|
35
35
|
...
|
|
36
36
|
const promptOpts = {
|
|
@@ -56,10 +56,10 @@ import { generate as generateOdataService, OdataService, ServiceType } from '@sa
|
|
|
56
56
|
* Pass an Inquirer prompt function https://www.npmjs.com/package/inquirer#methods
|
|
57
57
|
*/
|
|
58
58
|
const inqAdaptor = {
|
|
59
|
-
prompt
|
|
59
|
+
prompt: this.prompt.bind(this) // the inquirer prompting function, here we use the generators reference
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
const serviceAnswers: OdataServiceAnswers = await
|
|
62
|
+
const serviceAnswers: OdataServiceAnswers = await serviceInquirerPrompt(
|
|
63
63
|
inqAdaptor as InquirerAdapter,
|
|
64
64
|
promptOpts
|
|
65
65
|
);
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ const types_1 = require("./types");
|
|
|
23
23
|
Object.defineProperty(exports, "DatasourceType", { enumerable: true, get: function () { return types_1.DatasourceType; } });
|
|
24
24
|
Object.defineProperty(exports, "promptNames", { enumerable: true, get: function () { return types_1.promptNames; } });
|
|
25
25
|
const utils_1 = require("./utils");
|
|
26
|
+
const i18n_1 = require("./i18n");
|
|
26
27
|
/**
|
|
27
28
|
* Get the inquirer prompts for odata service.
|
|
28
29
|
*
|
|
@@ -35,6 +36,8 @@ const utils_1 = require("./utils");
|
|
|
35
36
|
*/
|
|
36
37
|
function getPrompts(promptOptions, logger, enableGuidedAnswers = false, telemetryClient, isYUI = false) {
|
|
37
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
// prompt texts must be loaded before the prompts are created, wait for the i18n bundle to be initialized
|
|
40
|
+
yield (0, i18n_1.initI18nOdataServiceInquirer)();
|
|
38
41
|
logger_helper_1.default.logger = logger !== null && logger !== void 0 ? logger : new logger_1.ToolsLogger({ logPrefix: '@sap-ux/odata-service-inquirer' });
|
|
39
42
|
error_handler_1.ErrorHandler.logger = logger_helper_1.default.logger;
|
|
40
43
|
error_handler_1.ErrorHandler.guidedAnswersEnabled = enableGuidedAnswers;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/odata-service-inquirer",
|
|
3
3
|
"description": "Prompts module that can prompt users for inputs required for odata service writing",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@sap/wing-service-explorer": "1.8.0",
|
|
23
23
|
"i18next": "23.5.1",
|
|
24
24
|
"os-name": "4.0.1",
|
|
25
|
-
"@sap-ux/btp-utils": "0.14.
|
|
26
|
-
"@sap-ux/telemetry": "0.4.
|
|
25
|
+
"@sap-ux/btp-utils": "0.14.4",
|
|
26
|
+
"@sap-ux/telemetry": "0.4.22",
|
|
27
27
|
"@sap-ux/inquirer-common": "0.2.7",
|
|
28
28
|
"@sap-ux/logger": "0.5.1",
|
|
29
29
|
"@sap-ux/project-access": "1.19.14"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/lodash": "4.14.202",
|
|
36
36
|
"jest-extended": "3.2.4",
|
|
37
37
|
"lodash": "4.17.21",
|
|
38
|
-
"@sap-ux/odata-service-writer": "0.17.
|
|
38
|
+
"@sap-ux/odata-service-writer": "0.17.2",
|
|
39
39
|
"@sap-ux/feature-toggle": "0.1.1"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|