@sap-ux/odata-service-inquirer 2.8.7 → 2.8.9

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.
@@ -8,7 +8,7 @@ exports.getCapProjectChoices = getCapProjectChoices;
8
8
  exports.getCapServiceChoices = getCapServiceChoices;
9
9
  exports.getCapEdmx = getCapEdmx;
10
10
  const project_access_1 = require("@sap-ux/project-access");
11
- const path_1 = require("path");
11
+ const node_path_1 = require("node:path");
12
12
  const i18n_1 = require("../../../i18n");
13
13
  const logger_helper_1 = __importDefault(require("../../logger-helper"));
14
14
  const prompt_helpers_1 = require("../../prompt-helpers");
@@ -27,7 +27,7 @@ async function getCapProjectPaths(paths) {
27
27
  // Keep track of duplicate folder names to append the path to the name when displaying the choices
28
28
  const folderNameCount = new Map();
29
29
  for (const root of capProjectRoots) {
30
- const folderName = (0, path_1.basename)(root);
30
+ const folderName = (0, node_path_1.basename)(root);
31
31
  // On Windows the path may have been returned with a different casing.
32
32
  // Use `realPath` to generate the same casing as used by cds compiler facade.
33
33
  capRootPaths.push({ folderName, path: process.platform === 'win32' ? await (0, promises_1.realpath)(root) : root });
@@ -86,8 +86,8 @@ function createCapServiceChoice(capModel, serviceInfo, projectPath, appPath, cds
86
86
  // be resolved against the project root. This is a workaround until cds provides the correct path in the service info.
87
87
  const absServicePath = capModel.$sources?.find((source) => source.indexOf(serviceFilePath.replace(/\.\.\\\\|\.\.\\|\.\.\//g, '')) > -1);
88
88
  logger_helper_1.default.logger.debug(`Source file path for service: ${serviceInfo.name}: ${absServicePath}`);
89
- if (absServicePath && (0, path_1.isAbsolute)(absServicePath)) {
90
- let serviceCdsFilePath = (0, path_1.relative)(projectPath, absServicePath);
89
+ if (absServicePath && (0, node_path_1.isAbsolute)(absServicePath)) {
90
+ let serviceCdsFilePath = (0, node_path_1.relative)(projectPath, absServicePath);
91
91
  // remove the file extension
92
92
  serviceCdsFilePath = serviceCdsFilePath.substring(0, serviceCdsFilePath.lastIndexOf('.cds'));
93
93
  logger_helper_1.default.logger.debug(`serviceCdsFilePath: ${serviceCdsFilePath}`);
@@ -9,7 +9,7 @@ exports.validateServiceUrl = validateServiceUrl;
9
9
  const i18n_1 = require("../../../i18n");
10
10
  const store_1 = require("@sap-ux/store");
11
11
  const logger_helper_1 = __importDefault(require("../../logger-helper"));
12
- const fs_1 = require("fs");
12
+ const node_fs_1 = require("node:fs");
13
13
  /**
14
14
  * Check if the system name is already in use.
15
15
  *
@@ -49,7 +49,7 @@ function validateServiceKey(path) {
49
49
  return false;
50
50
  }
51
51
  try {
52
- const serviceKeys = (0, fs_1.readFileSync)(path, 'utf8');
52
+ const serviceKeys = (0, node_fs_1.readFileSync)(path, 'utf8');
53
53
  const serviceInfo = JSON.parse(serviceKeys);
54
54
  if (!serviceInfo.url || !serviceInfo.uaa || !serviceInfo.catalogs) {
55
55
  return (0, i18n_1.t)('prompts.serviceKey.incompleteServiceKeyInfo');
@@ -73,7 +73,7 @@ function getEntityChoices(edmx, { entitySetFilter, defaultMainEntityName } = {})
73
73
  let odataVersion;
74
74
  try {
75
75
  convertedMetadata = (0, annotation_converter_1.convert)((0, edmx_parser_1.parse)(edmx));
76
- const parsedOdataVersion = parseInt(convertedMetadata?.version, 10);
76
+ const parsedOdataVersion = Number.parseInt(convertedMetadata?.version, 10);
77
77
  if (Number.isNaN(parsedOdataVersion)) {
78
78
  logger_helper_1.default.logger.error((0, i18n_1.t)('errors.unparseableOdataVersion'));
79
79
  throw new Error((0, i18n_1.t)('errors.unparseableOdataVersion'));
@@ -46,7 +46,7 @@ function getPromptHostEnvironment() {
46
46
  function parseOdataVersion(metadata) {
47
47
  try {
48
48
  const convertedMetadata = (0, annotation_converter_1.convert)((0, edmx_parser_1.parse)(metadata));
49
- const parsedOdataVersion = parseInt(convertedMetadata?.version, 10);
49
+ const parsedOdataVersion = Number.parseInt(convertedMetadata?.version, 10);
50
50
  if (Number.isNaN(parsedOdataVersion)) {
51
51
  logger_helper_1.default.logger.error((0, i18n_1.t)('errors.unparseableOdataVersion'));
52
52
  throw new Error((0, i18n_1.t)('errors.unparseableOdataVersion'));
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": "2.8.7",
4
+ "version": "2.8.9",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -29,17 +29,17 @@
29
29
  "i18next": "25.3.0",
30
30
  "inquirer-autocomplete-prompt": "2.0.1",
31
31
  "os-name": "4.0.1",
32
- "@sap-ux/axios-extension": "1.22.9",
33
- "@sap-ux/btp-utils": "1.1.3",
34
- "@sap-ux/fiori-generator-shared": "0.13.19",
32
+ "@sap-ux/axios-extension": "1.22.10",
33
+ "@sap-ux/btp-utils": "1.1.4",
34
+ "@sap-ux/fiori-generator-shared": "0.13.21",
35
35
  "@sap-ux/guided-answers-helper": "0.4.0",
36
- "@sap-ux/telemetry": "0.6.25",
37
- "@sap-ux/inquirer-common": "0.7.46",
36
+ "@sap-ux/telemetry": "0.6.27",
37
+ "@sap-ux/inquirer-common": "0.7.48",
38
38
  "@sap-ux/logger": "0.7.0",
39
- "@sap-ux/nodejs-utils": "0.2.5",
40
- "@sap-ux/project-access": "1.32.2",
41
- "@sap-ux/project-input-validator": "0.6.23",
42
- "@sap-ux/store": "1.1.4"
39
+ "@sap-ux/nodejs-utils": "0.2.7",
40
+ "@sap-ux/project-access": "1.32.3",
41
+ "@sap-ux/project-input-validator": "0.6.24",
42
+ "@sap-ux/store": "1.1.5"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@sap-ux/vocabularies-types": "0.13.0",
@@ -48,12 +48,12 @@
48
48
  "@types/inquirer": "8.2.6",
49
49
  "@types/lodash": "4.14.202",
50
50
  "jest-extended": "6.0.0",
51
- "@sap-ux/fiori-generator-shared": "0.13.19",
52
- "@sap-ux/fiori-elements-writer": "2.7.15",
53
- "@sap-ux/fiori-freestyle-writer": "2.4.47",
51
+ "@sap-ux/fiori-generator-shared": "0.13.21",
52
+ "@sap-ux/fiori-elements-writer": "2.7.17",
53
+ "@sap-ux/fiori-freestyle-writer": "2.4.49",
54
54
  "@sap-ux/feature-toggle": "0.3.1",
55
- "@sap-ux/odata-service-writer": "0.27.23",
56
- "@sap-ux/cap-config-writer": "0.12.10"
55
+ "@sap-ux/odata-service-writer": "0.27.24",
56
+ "@sap-ux/cap-config-writer": "0.12.12"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=20.x"