@sap-ux/odata-service-inquirer 0.6.1 → 0.6.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/dist/i18n.js CHANGED
@@ -14,7 +14,6 @@ exports.defaultProjectNumber = 1;
14
14
  * Initialize i18next with the translations for this module.
15
15
  */
16
16
  async function initI18nOdataServiceInquirer() {
17
- const t0 = performance.now();
18
17
  await i18next_1.default.init({
19
18
  lng: 'en',
20
19
  fallbackLng: 'en',
@@ -34,8 +33,6 @@ async function initI18nOdataServiceInquirer() {
34
33
  }
35
34
  });
36
35
  i18next_1.default.addResourceBundle('en', odataServiceInquirerNamespace, odata_service_inquirer_i18n_json_1.default);
37
- const t1 = performance.now();
38
- console.log(`i18n load time: ${Math.round(t1 - t0)} milliseconds`);
39
36
  }
40
37
  /**
41
38
  * Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used.
@@ -165,8 +165,9 @@ export declare class ConnectionValidator {
165
165
  */
166
166
  private createOdataServiceConnection;
167
167
  /**
168
+ * Resets any connection state and validity information.
168
169
  *
169
- * @param resetValidity
170
+ * @param resetValidity if true, the validity information will be reset also
170
171
  */
171
172
  resetConnectionState(resetValidity?: boolean): void;
172
173
  /**
@@ -273,8 +273,9 @@ class ConnectionValidator {
273
273
  await this._odataService.get('');
274
274
  }
275
275
  /**
276
+ * Resets any connection state and validity information.
276
277
  *
277
- * @param resetValidity
278
+ * @param resetValidity if true, the validity information will be reset also
278
279
  */
279
280
  resetConnectionState(resetValidity = false) {
280
281
  this._serviceProvider = undefined;
@@ -46,7 +46,7 @@ export declare function getServiceType(servicePath: string, serviceType: string
46
46
  *
47
47
  * @param service the specific service to get details for
48
48
  * @param connectionValidator a reference to the connection validator which has an active connection to the backend
49
- * @param requiredOdataVersion
49
+ * @param requiredOdataVersion the required OData version used to validate the service
50
50
  * @returns true if successful, setting the PromptState.odataService properties, or an error message indicating why the service details could not be retrieved.
51
51
  */
52
52
  export declare function getServiceDetails(service: ServiceAnswer, connectionValidator: ConnectionValidator, requiredOdataVersion?: OdataVersion): Promise<string | boolean>;
@@ -64,7 +64,7 @@ const createServiceChoices = (serviceInfos) => {
64
64
  * Logs the catalog request errors using the error handler.
65
65
  *
66
66
  * @param requestErrors catalog request errors, keyed by the OData version of the catalog service, with the error, status code number or error message as the value
67
- * @param numOfRequests
67
+ * @param numOfRequests the number of catalog service requests made
68
68
  */
69
69
  function logServiceCatalogErrorsForHelp(requestErrors, numOfRequests) {
70
70
  const catalogRequesErrors = Object.values(requestErrors);
@@ -189,7 +189,7 @@ async function getServiceType(servicePath, serviceType, catalog) {
189
189
  *
190
190
  * @param service the specific service to get details for
191
191
  * @param connectionValidator a reference to the connection validator which has an active connection to the backend
192
- * @param requiredOdataVersion
192
+ * @param requiredOdataVersion the required OData version used to validate the service
193
193
  * @returns true if successful, setting the PromptState.odataService properties, or an error message indicating why the service details could not be retrieved.
194
194
  */
195
195
  async function getServiceDetails(service, connectionValidator, requiredOdataVersion) {
@@ -36,8 +36,8 @@ export declare function getBackendSystemDisplayName(system: BackendSystem): stri
36
36
  /**
37
37
  * Creates a list of choices for the system selection prompt using destinations or stored backend systems, depending on the environment.
38
38
  *
39
- * @param destinationFilters
40
- * @param includeCloudFoundryAbapEnvChoice
39
+ * @param destinationFilters the filters to apply to the destination choices
40
+ * @param includeCloudFoundryAbapEnvChoice whether to include the Cloud Foundry ABAP environment choice in the list
41
41
  * @returns a list of choices for the system selection prompt
42
42
  */
43
43
  export declare function createSystemChoices(destinationFilters?: Partial<DestinationFilters>, includeCloudFoundryAbapEnvChoice?: boolean): Promise<ListChoiceOptions<SystemSelectionAnswers>[]>;
@@ -109,8 +109,8 @@ function getBackendSystemDisplayName(system) {
109
109
  /**
110
110
  * Matches the destination against the provided filters. Returns true if the destination matches any filters, false otherwise.
111
111
  *
112
- * @param destination
113
- * @param filters
112
+ * @param destination the destination to match against the filters
113
+ * @param filters the filters to match against
114
114
  * @returns true if the destination matches any filters, false otherwise
115
115
  */
116
116
  function matchesFilters(destination, filters) {
@@ -135,8 +135,8 @@ function matchesFilters(destination, filters) {
135
135
  /**
136
136
  * Creates a list of choices for the system selection prompt using destinations or stored backend systems, depending on the environment.
137
137
  *
138
- * @param destinationFilters
139
- * @param includeCloudFoundryAbapEnvChoice
138
+ * @param destinationFilters the filters to apply to the destination choices
139
+ * @param includeCloudFoundryAbapEnvChoice whether to include the Cloud Foundry ABAP environment choice in the list
140
140
  * @returns a list of choices for the system selection prompt
141
141
  */
142
142
  async function createSystemChoices(destinationFilters, includeCloudFoundryAbapEnvChoice = false) {
@@ -32,7 +32,7 @@ export declare function getSystemSelectionQuestions(promptOptions?: OdataService
32
32
  * Additional destination attribute filters may be provided.
33
33
  *
34
34
  * @param connectionValidator A reference to the active connection validator, used to validate the service selection and retrieve service details.
35
- * @param promptOptions
35
+ * @param promptOptions prompt options that may be used to customize the questions
36
36
  * @returns a list of existing systems
37
37
  */
38
38
  export declare function getSystemConnectionQuestions(connectionValidator: ConnectionValidator, promptOptions?: OdataServicePromptOptions): Promise<Question<SystemSelectionAnswers>[]>;
@@ -33,9 +33,9 @@ const systemSelectionPromptNames = {
33
33
  /**
34
34
  * Validates the system selection, connecting to the selected system and validating the connection.
35
35
  *
36
- * @param systemSelection
37
- * @param connectionValidator
38
- * @param requiredOdataVersion
36
+ * @param systemSelection the selected system to validate
37
+ * @param connectionValidator the active connection validator to use for the connection attempt
38
+ * @param requiredOdataVersion the required OData version for the selected system, only the specified version will be used to request a service catalog
39
39
  * @returns the validation result of the selected system connection attempt
40
40
  */
41
41
  async function validateSystemSelection(systemSelection, connectionValidator, requiredOdataVersion) {
@@ -84,7 +84,7 @@ async function getSystemSelectionQuestions(promptOptions) {
84
84
  * Additional destination attribute filters may be provided.
85
85
  *
86
86
  * @param connectionValidator A reference to the active connection validator, used to validate the service selection and retrieve service details.
87
- * @param promptOptions
87
+ * @param promptOptions prompt options that may be used to customize the questions
88
88
  * @returns a list of existing systems
89
89
  */
90
90
  async function getSystemConnectionQuestions(connectionValidator, promptOptions) {
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.6.1",
4
+ "version": "0.6.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -26,7 +26,7 @@
26
26
  "i18next": "23.5.1",
27
27
  "inquirer-autocomplete-prompt": "2.0.1",
28
28
  "os-name": "4.0.1",
29
- "@sap-ux/axios-extension": "1.17.2",
29
+ "@sap-ux/axios-extension": "1.17.3",
30
30
  "@sap-ux/btp-utils": "0.16.0",
31
31
  "@sap-ux/fiori-generator-shared": "0.7.7",
32
32
  "@sap-ux/guided-answers-helper": "0.1.0",
@@ -45,7 +45,7 @@
45
45
  "jest-extended": "3.2.4",
46
46
  "@sap-ux/fiori-generator-shared": "0.7.7",
47
47
  "@sap-ux/feature-toggle": "0.2.2",
48
- "@sap-ux/odata-service-writer": "0.23.1"
48
+ "@sap-ux/odata-service-writer": "0.23.2"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=18.x"