@sap/ux-ui5-tooling 1.10.3 → 1.10.4

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.
@@ -54,7 +54,7 @@ OPTIONS:
54
54
  | --service | -sv | Target SAPUI5 ABAP Repository OData Service |
55
55
  | --description | -e | Project description of the app |
56
56
  | --archive-url | -au | Download app bundle from this url and upload this bundle for deployment |
57
- | --strict-ssl | -ss | Perform certificate validation (Y/n)|
57
+ | --strict-ssl | -ss | Perform certificate validation (Y/n) (default: true) |
58
58
  | --archive-path | -ap | Provide path of the app bundle for deployment |
59
59
  | --testMode | -tm | Run deploy in test mode. ABAP backend reports deploy error without actual deploy the bundle. |
60
60
  | --verbose | -vb | Enable verbose logging (default: false) |
@@ -22,7 +22,7 @@ OPTIONS:
22
22
  | --name | -n | Project name of the app |
23
23
  | --yes | -y | Yes to all questions |
24
24
  | --verbose | -vb | Enable verbose logging (default: false) |
25
- | --strict-ssl | -ss | Perform certificate validation (Y/n)|
25
+ | --strict-ssl | -ss | Perform certificate validation (Y/n) (default: true)|
26
26
  | --uaa-url | -uu | UAA server url for steampunk systems which can be found in service key. |
27
27
  | --uaa-username | -un | Username for steampunk system authentication. |
28
28
  | --uaa-password | -up | User password for steampunk system authentication. |
@@ -12924,7 +12924,7 @@ var i18n_default = {
12924
12924
  ARCHIVE_PATH_SUCCESSFULLY_GENERATED: "Archive successfully generated for deployment.",
12925
12925
  ARCHIVE_PATH_CREATED: "Archive path created {{-archivePath}}",
12926
12926
  ARCHIVE_PATH_AVAILABLE: "Archive read from {{-archivePath}}",
12927
- SERVICE_PATH: "SAPUI5 OData Service Path",
12927
+ ERROR_UPDATE_DEPLOY_CONFIG: "Error while updating config file, error was: {{-error}}",
12928
12928
  TELEMETRY_CALL_FAILED: "Error while sending telemetry data"
12929
12929
  };
12930
12930
 
@@ -40583,7 +40583,7 @@ var require_package6 = __commonJS({
40583
40583
  "../lib/telemetry/dist/package.json"(exports2, module2) {
40584
40584
  module2.exports = {
40585
40585
  name: "@sap/ux-telemetry",
40586
- version: "1.10.3",
40586
+ version: "1.10.4",
40587
40587
  description: "SAP Fiori tools telemetry library",
40588
40588
  main: "dist/src/index.js",
40589
40589
  author: "SAP SE",
@@ -40608,10 +40608,10 @@ var require_package6 = __commonJS({
40608
40608
  },
40609
40609
  dependencies: {
40610
40610
  "@sap-ux/store": "0.3.8",
40611
- "@sap/ux-cds": "1.10.3",
40612
- "@sap/ux-common-utils": "1.10.3",
40613
- "@sap/ux-feature-toggle": "1.10.3",
40614
- "@sap/ux-project-access": "1.10.3",
40611
+ "@sap/ux-cds": "1.10.4",
40612
+ "@sap/ux-common-utils": "1.10.4",
40613
+ "@sap/ux-feature-toggle": "1.10.4",
40614
+ "@sap/ux-project-access": "1.10.4",
40615
40615
  applicationinsights: "1.4.1",
40616
40616
  axios: "0.26.0",
40617
40617
  "performance-now": "2.1.0",
@@ -59407,7 +59407,7 @@ var require_cap = __commonJS({
59407
59407
  });
59408
59408
  };
59409
59409
  Object.defineProperty(exports2, "__esModule", { value: true });
59410
- exports2.getCapEnvironment = exports2.getCapModelAndServices = exports2.getCapCustomPaths = exports2.getCapProjectType = exports2.isCapJavaProject = exports2.isCapNodeJsProject = void 0;
59410
+ exports2.toReferenceUri = exports2.toAbsoluteUri = exports2.getCapEnvironment = exports2.readCapServiceMetadataEdmx = exports2.getCapModelAndServices = exports2.getCapCustomPaths = exports2.getCapProjectType = exports2.isCapJavaProject = exports2.isCapNodeJsProject = void 0;
59411
59411
  var path_1 = require("path");
59412
59412
  var constants_1 = require_constants5();
59413
59413
  var file_1 = require_file4();
@@ -59463,7 +59463,7 @@ var require_cap = __commonJS({
59463
59463
  exports2.getCapCustomPaths = getCapCustomPaths;
59464
59464
  function getCapModelAndServices(projectRoot) {
59465
59465
  return __awaiter(this, void 0, void 0, function* () {
59466
- const cds = yield (0, module_loader_1.loadModuleFromProject)(projectRoot, "@sap/cds");
59466
+ const cds = yield loadCdsModuleFromProject(projectRoot);
59467
59467
  const capProjectPaths = yield getCapCustomPaths(projectRoot);
59468
59468
  const modelPaths = [
59469
59469
  (0, path_1.join)(projectRoot, capProjectPaths.app),
@@ -59471,7 +59471,15 @@ var require_cap = __commonJS({
59471
59471
  (0, path_1.join)(projectRoot, capProjectPaths.db)
59472
59472
  ];
59473
59473
  const model = yield cds.load(modelPaths);
59474
- const services = cds.compile.to["serviceinfo"](model, { root: projectRoot });
59474
+ let services = cds.compile.to["serviceinfo"](model, { root: projectRoot });
59475
+ if (services === null || services === void 0 ? void 0 : services.map) {
59476
+ services = services === null || services === void 0 ? void 0 : services.map((value) => {
59477
+ return {
59478
+ name: value.name,
59479
+ urlPath: uniformUrl(value.urlPath)
59480
+ };
59481
+ });
59482
+ }
59475
59483
  return {
59476
59484
  model,
59477
59485
  services
@@ -59479,14 +59487,105 @@ var require_cap = __commonJS({
59479
59487
  });
59480
59488
  }
59481
59489
  exports2.getCapModelAndServices = getCapModelAndServices;
59490
+ function uniformUrl(url) {
59491
+ return url.replace(/\\/g, "/").replace(/\/\//g, "/");
59492
+ }
59493
+ function readCapServiceMetadataEdmx(root, uri, version = "v4") {
59494
+ return __awaiter(this, void 0, void 0, function* () {
59495
+ try {
59496
+ const { model, services } = yield getCapModelAndServices(root);
59497
+ const service = findServiceByUri(services, uri);
59498
+ if (!service) {
59499
+ throw Error(`Service for uri: '${uri}' not found. Available services: ${JSON.stringify(services)}`);
59500
+ }
59501
+ const cds = yield loadCdsModuleFromProject(root);
59502
+ const edmx = cds.compile.to.edmx(model, { service: service.name, version });
59503
+ return edmx;
59504
+ } catch (error3) {
59505
+ throw Error(`Error while reading CAP service metadata. Path: '${root}', service uri: '${uri}', error: '${error3.toString()}'}`);
59506
+ }
59507
+ });
59508
+ }
59509
+ exports2.readCapServiceMetadataEdmx = readCapServiceMetadataEdmx;
59510
+ function findServiceByUri(services, uri) {
59511
+ const searchUri = uniformUrl(uri).replace(/(?:^\/)|(?:\/$)/g, "");
59512
+ return services.find((srv) => srv.urlPath.replace(/(?:^\/)|(?:\/$)/g, "") === searchUri);
59513
+ }
59482
59514
  function getCapEnvironment(capProjectPath) {
59483
59515
  return __awaiter(this, void 0, void 0, function* () {
59484
- const module3 = yield (0, module_loader_1.loadModuleFromProject)(capProjectPath, "@sap/cds");
59485
- const cds = "default" in module3 ? module3.default : module3;
59516
+ const cds = yield loadCdsModuleFromProject(capProjectPath);
59486
59517
  return cds.env.for("cds", capProjectPath);
59487
59518
  });
59488
59519
  }
59489
59520
  exports2.getCapEnvironment = getCapEnvironment;
59521
+ function loadCdsModuleFromProject(capProjectPath) {
59522
+ return __awaiter(this, void 0, void 0, function* () {
59523
+ const module3 = yield (0, module_loader_1.loadModuleFromProject)(capProjectPath, "@sap/cds");
59524
+ return "default" in module3 ? module3.default : module3;
59525
+ });
59526
+ }
59527
+ var toAbsoluteUri = (projectRoot, relativeUri) => (0, path_1.join)(projectRoot, relativeUri);
59528
+ exports2.toAbsoluteUri = toAbsoluteUri;
59529
+ var toReferenceUri = (projectRoot, relativeUriFrom, relativeUriTo) => __awaiter(void 0, void 0, void 0, function* () {
59530
+ let relativeUri = "";
59531
+ const indexNodeModules = relativeUriTo.lastIndexOf("node_modules");
59532
+ if (indexNodeModules >= 0) {
59533
+ const indexLastDot = relativeUriTo.lastIndexOf(".");
59534
+ if (indexLastDot > indexNodeModules + 13) {
59535
+ relativeUri = relativeUriTo.slice(indexNodeModules + 13, indexLastDot);
59536
+ } else {
59537
+ relativeUri = relativeUriTo.slice(indexNodeModules + 13);
59538
+ }
59539
+ } else if (relativeUriTo.startsWith("../") || relativeUriTo.startsWith("..\\")) {
59540
+ const result2 = yield getPackageNameInFolder(projectRoot, relativeUriTo);
59541
+ if (result2.packageName) {
59542
+ relativeUri = result2.packageName + relativeUriTo.slice(result2.packageFolder.length);
59543
+ }
59544
+ }
59545
+ if (!relativeUri) {
59546
+ const fromDir = (0, path_1.dirname)((0, exports2.toAbsoluteUri)(projectRoot, relativeUriFrom));
59547
+ relativeUri = (0, path_1.relative)(fromDir, (0, exports2.toAbsoluteUri)(projectRoot, relativeUriTo));
59548
+ if (!relativeUri.startsWith(".")) {
59549
+ relativeUri = "./" + relativeUri;
59550
+ }
59551
+ }
59552
+ const fileExtension = relativeUri.lastIndexOf(".") > 0 ? relativeUri.slice(relativeUri.lastIndexOf(".") + 1) : "";
59553
+ if (["CDS", "JSON"].includes(fileExtension.toUpperCase())) {
59554
+ relativeUri = relativeUri.slice(0, relativeUri.length - fileExtension.length - 1);
59555
+ }
59556
+ return relativeUri.split(path_1.sep).join("/");
59557
+ });
59558
+ exports2.toReferenceUri = toReferenceUri;
59559
+ function getPackageNameInFolder(baseUri, relativeUri) {
59560
+ return __awaiter(this, void 0, void 0, function* () {
59561
+ const refUriParts = relativeUri.split(path_1.sep);
59562
+ const result2 = { packageName: "", packageFolder: relativeUri };
59563
+ for (let i = refUriParts.length - 1; i >= 0 && !result2.packageName; i--) {
59564
+ const currentFolder = refUriParts.slice(0, i).join(path_1.sep);
59565
+ result2.packageName = yield readPackageNameForFolder(baseUri, currentFolder);
59566
+ if (result2.packageName) {
59567
+ result2.packageFolder = currentFolder;
59568
+ }
59569
+ }
59570
+ return result2;
59571
+ });
59572
+ }
59573
+ function readPackageNameForFolder(baseUri, relativeUri) {
59574
+ return __awaiter(this, void 0, void 0, function* () {
59575
+ let packageName = "";
59576
+ try {
59577
+ const path = (0, path_1.normalize)(baseUri + "/" + relativeUri + "/package.json");
59578
+ const content = yield (0, file_1.readFile)(path);
59579
+ if (content) {
59580
+ const parsed = JSON.parse(content);
59581
+ packageName = parsed.name;
59582
+ }
59583
+ } catch (e) {
59584
+ packageName = "";
59585
+ }
59586
+ return packageName;
59587
+ });
59588
+ }
59490
59589
  }
59491
59590
  });
59492
59591
 
@@ -62211,7 +62310,7 @@ var require_project2 = __commonJS({
62211
62310
  "../../node_modules/@sap-ux/project-access/dist/project/index.js"(exports2) {
62212
62311
  "use strict";
62213
62312
  Object.defineProperty(exports2, "__esModule", { value: true });
62214
- exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getAppProgrammingLanguage = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
62313
+ exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getAppProgrammingLanguage = exports2.readCapServiceMetadataEdmx = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
62215
62314
  var cap_1 = require_cap();
62216
62315
  Object.defineProperty(exports2, "getCapCustomPaths", { enumerable: true, get: function() {
62217
62316
  return cap_1.getCapCustomPaths;
@@ -62231,6 +62330,9 @@ var require_project2 = __commonJS({
62231
62330
  Object.defineProperty(exports2, "getCapEnvironment", { enumerable: true, get: function() {
62232
62331
  return cap_1.getCapEnvironment;
62233
62332
  } });
62333
+ Object.defineProperty(exports2, "readCapServiceMetadataEdmx", { enumerable: true, get: function() {
62334
+ return cap_1.readCapServiceMetadataEdmx;
62335
+ } });
62234
62336
  var info_1 = require_info();
62235
62337
  Object.defineProperty(exports2, "getAppProgrammingLanguage", { enumerable: true, get: function() {
62236
62338
  return info_1.getAppProgrammingLanguage;
@@ -62369,7 +62471,7 @@ var require_dist12 = __commonJS({
62369
62471
  __createBinding(exports3, m, p);
62370
62472
  };
62371
62473
  Object.defineProperty(exports2, "__esModule", { value: true });
62372
- exports2.getFilePaths = exports2.readUi5Yaml = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.FileName = void 0;
62474
+ exports2.getFilePaths = exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.FileName = void 0;
62373
62475
  var constants_1 = require_constants5();
62374
62476
  Object.defineProperty(exports2, "FileName", { enumerable: true, get: function() {
62375
62477
  return constants_1.FileName;
@@ -62414,6 +62516,9 @@ var require_dist12 = __commonJS({
62414
62516
  Object.defineProperty(exports2, "loadModuleFromProject", { enumerable: true, get: function() {
62415
62517
  return project_1.loadModuleFromProject;
62416
62518
  } });
62519
+ Object.defineProperty(exports2, "readCapServiceMetadataEdmx", { enumerable: true, get: function() {
62520
+ return project_1.readCapServiceMetadataEdmx;
62521
+ } });
62417
62522
  Object.defineProperty(exports2, "readUi5Yaml", { enumerable: true, get: function() {
62418
62523
  return project_1.readUi5Yaml;
62419
62524
  } });
@@ -82395,7 +82500,7 @@ var i18n_default = {
82395
82500
  ARCHIVE_PATH_SUCCESSFULLY_GENERATED: "Archive successfully generated for deployment.",
82396
82501
  ARCHIVE_PATH_CREATED: "Archive path created {{-archivePath}}",
82397
82502
  ARCHIVE_PATH_AVAILABLE: "Archive read from {{-archivePath}}",
82398
- SERVICE_PATH: "SAPUI5 OData Service Path",
82503
+ ERROR_UPDATE_DEPLOY_CONFIG: "Error while updating config file, error was: {{-error}}",
82399
82504
  TELEMETRY_CALL_FAILED: "Error while sending telemetry data"
82400
82505
  };
82401
82506
 
@@ -39763,7 +39763,7 @@ var require_package5 = __commonJS({
39763
39763
  "../lib/telemetry/dist/package.json"(exports2, module2) {
39764
39764
  module2.exports = {
39765
39765
  name: "@sap/ux-telemetry",
39766
- version: "1.10.3",
39766
+ version: "1.10.4",
39767
39767
  description: "SAP Fiori tools telemetry library",
39768
39768
  main: "dist/src/index.js",
39769
39769
  author: "SAP SE",
@@ -39788,10 +39788,10 @@ var require_package5 = __commonJS({
39788
39788
  },
39789
39789
  dependencies: {
39790
39790
  "@sap-ux/store": "0.3.8",
39791
- "@sap/ux-cds": "1.10.3",
39792
- "@sap/ux-common-utils": "1.10.3",
39793
- "@sap/ux-feature-toggle": "1.10.3",
39794
- "@sap/ux-project-access": "1.10.3",
39791
+ "@sap/ux-cds": "1.10.4",
39792
+ "@sap/ux-common-utils": "1.10.4",
39793
+ "@sap/ux-feature-toggle": "1.10.4",
39794
+ "@sap/ux-project-access": "1.10.4",
39795
39795
  applicationinsights: "1.4.1",
39796
39796
  axios: "0.26.0",
39797
39797
  "performance-now": "2.1.0",
@@ -58587,7 +58587,7 @@ var require_cap = __commonJS({
58587
58587
  });
58588
58588
  };
58589
58589
  Object.defineProperty(exports2, "__esModule", { value: true });
58590
- exports2.getCapEnvironment = exports2.getCapModelAndServices = exports2.getCapCustomPaths = exports2.getCapProjectType = exports2.isCapJavaProject = exports2.isCapNodeJsProject = void 0;
58590
+ exports2.toReferenceUri = exports2.toAbsoluteUri = exports2.getCapEnvironment = exports2.readCapServiceMetadataEdmx = exports2.getCapModelAndServices = exports2.getCapCustomPaths = exports2.getCapProjectType = exports2.isCapJavaProject = exports2.isCapNodeJsProject = void 0;
58591
58591
  var path_1 = require("path");
58592
58592
  var constants_1 = require_constants5();
58593
58593
  var file_1 = require_file4();
@@ -58643,7 +58643,7 @@ var require_cap = __commonJS({
58643
58643
  exports2.getCapCustomPaths = getCapCustomPaths;
58644
58644
  function getCapModelAndServices(projectRoot) {
58645
58645
  return __awaiter(this, void 0, void 0, function* () {
58646
- const cds = yield (0, module_loader_1.loadModuleFromProject)(projectRoot, "@sap/cds");
58646
+ const cds = yield loadCdsModuleFromProject(projectRoot);
58647
58647
  const capProjectPaths = yield getCapCustomPaths(projectRoot);
58648
58648
  const modelPaths = [
58649
58649
  (0, path_1.join)(projectRoot, capProjectPaths.app),
@@ -58651,7 +58651,15 @@ var require_cap = __commonJS({
58651
58651
  (0, path_1.join)(projectRoot, capProjectPaths.db)
58652
58652
  ];
58653
58653
  const model = yield cds.load(modelPaths);
58654
- const services = cds.compile.to["serviceinfo"](model, { root: projectRoot });
58654
+ let services = cds.compile.to["serviceinfo"](model, { root: projectRoot });
58655
+ if (services === null || services === void 0 ? void 0 : services.map) {
58656
+ services = services === null || services === void 0 ? void 0 : services.map((value) => {
58657
+ return {
58658
+ name: value.name,
58659
+ urlPath: uniformUrl(value.urlPath)
58660
+ };
58661
+ });
58662
+ }
58655
58663
  return {
58656
58664
  model,
58657
58665
  services
@@ -58659,14 +58667,105 @@ var require_cap = __commonJS({
58659
58667
  });
58660
58668
  }
58661
58669
  exports2.getCapModelAndServices = getCapModelAndServices;
58670
+ function uniformUrl(url) {
58671
+ return url.replace(/\\/g, "/").replace(/\/\//g, "/");
58672
+ }
58673
+ function readCapServiceMetadataEdmx(root, uri, version = "v4") {
58674
+ return __awaiter(this, void 0, void 0, function* () {
58675
+ try {
58676
+ const { model, services } = yield getCapModelAndServices(root);
58677
+ const service = findServiceByUri(services, uri);
58678
+ if (!service) {
58679
+ throw Error(`Service for uri: '${uri}' not found. Available services: ${JSON.stringify(services)}`);
58680
+ }
58681
+ const cds = yield loadCdsModuleFromProject(root);
58682
+ const edmx = cds.compile.to.edmx(model, { service: service.name, version });
58683
+ return edmx;
58684
+ } catch (error6) {
58685
+ throw Error(`Error while reading CAP service metadata. Path: '${root}', service uri: '${uri}', error: '${error6.toString()}'}`);
58686
+ }
58687
+ });
58688
+ }
58689
+ exports2.readCapServiceMetadataEdmx = readCapServiceMetadataEdmx;
58690
+ function findServiceByUri(services, uri) {
58691
+ const searchUri = uniformUrl(uri).replace(/(?:^\/)|(?:\/$)/g, "");
58692
+ return services.find((srv) => srv.urlPath.replace(/(?:^\/)|(?:\/$)/g, "") === searchUri);
58693
+ }
58662
58694
  function getCapEnvironment(capProjectPath) {
58663
58695
  return __awaiter(this, void 0, void 0, function* () {
58664
- const module3 = yield (0, module_loader_1.loadModuleFromProject)(capProjectPath, "@sap/cds");
58665
- const cds = "default" in module3 ? module3.default : module3;
58696
+ const cds = yield loadCdsModuleFromProject(capProjectPath);
58666
58697
  return cds.env.for("cds", capProjectPath);
58667
58698
  });
58668
58699
  }
58669
58700
  exports2.getCapEnvironment = getCapEnvironment;
58701
+ function loadCdsModuleFromProject(capProjectPath) {
58702
+ return __awaiter(this, void 0, void 0, function* () {
58703
+ const module3 = yield (0, module_loader_1.loadModuleFromProject)(capProjectPath, "@sap/cds");
58704
+ return "default" in module3 ? module3.default : module3;
58705
+ });
58706
+ }
58707
+ var toAbsoluteUri = (projectRoot, relativeUri) => (0, path_1.join)(projectRoot, relativeUri);
58708
+ exports2.toAbsoluteUri = toAbsoluteUri;
58709
+ var toReferenceUri = (projectRoot, relativeUriFrom, relativeUriTo) => __awaiter(void 0, void 0, void 0, function* () {
58710
+ let relativeUri = "";
58711
+ const indexNodeModules = relativeUriTo.lastIndexOf("node_modules");
58712
+ if (indexNodeModules >= 0) {
58713
+ const indexLastDot = relativeUriTo.lastIndexOf(".");
58714
+ if (indexLastDot > indexNodeModules + 13) {
58715
+ relativeUri = relativeUriTo.slice(indexNodeModules + 13, indexLastDot);
58716
+ } else {
58717
+ relativeUri = relativeUriTo.slice(indexNodeModules + 13);
58718
+ }
58719
+ } else if (relativeUriTo.startsWith("../") || relativeUriTo.startsWith("..\\")) {
58720
+ const result2 = yield getPackageNameInFolder(projectRoot, relativeUriTo);
58721
+ if (result2.packageName) {
58722
+ relativeUri = result2.packageName + relativeUriTo.slice(result2.packageFolder.length);
58723
+ }
58724
+ }
58725
+ if (!relativeUri) {
58726
+ const fromDir = (0, path_1.dirname)((0, exports2.toAbsoluteUri)(projectRoot, relativeUriFrom));
58727
+ relativeUri = (0, path_1.relative)(fromDir, (0, exports2.toAbsoluteUri)(projectRoot, relativeUriTo));
58728
+ if (!relativeUri.startsWith(".")) {
58729
+ relativeUri = "./" + relativeUri;
58730
+ }
58731
+ }
58732
+ const fileExtension = relativeUri.lastIndexOf(".") > 0 ? relativeUri.slice(relativeUri.lastIndexOf(".") + 1) : "";
58733
+ if (["CDS", "JSON"].includes(fileExtension.toUpperCase())) {
58734
+ relativeUri = relativeUri.slice(0, relativeUri.length - fileExtension.length - 1);
58735
+ }
58736
+ return relativeUri.split(path_1.sep).join("/");
58737
+ });
58738
+ exports2.toReferenceUri = toReferenceUri;
58739
+ function getPackageNameInFolder(baseUri, relativeUri) {
58740
+ return __awaiter(this, void 0, void 0, function* () {
58741
+ const refUriParts = relativeUri.split(path_1.sep);
58742
+ const result2 = { packageName: "", packageFolder: relativeUri };
58743
+ for (let i = refUriParts.length - 1; i >= 0 && !result2.packageName; i--) {
58744
+ const currentFolder = refUriParts.slice(0, i).join(path_1.sep);
58745
+ result2.packageName = yield readPackageNameForFolder(baseUri, currentFolder);
58746
+ if (result2.packageName) {
58747
+ result2.packageFolder = currentFolder;
58748
+ }
58749
+ }
58750
+ return result2;
58751
+ });
58752
+ }
58753
+ function readPackageNameForFolder(baseUri, relativeUri) {
58754
+ return __awaiter(this, void 0, void 0, function* () {
58755
+ let packageName = "";
58756
+ try {
58757
+ const path = (0, path_1.normalize)(baseUri + "/" + relativeUri + "/package.json");
58758
+ const content = yield (0, file_1.readFile)(path);
58759
+ if (content) {
58760
+ const parsed = JSON.parse(content);
58761
+ packageName = parsed.name;
58762
+ }
58763
+ } catch (e) {
58764
+ packageName = "";
58765
+ }
58766
+ return packageName;
58767
+ });
58768
+ }
58670
58769
  }
58671
58770
  });
58672
58771
 
@@ -61391,7 +61490,7 @@ var require_project2 = __commonJS({
61391
61490
  "../../node_modules/@sap-ux/project-access/dist/project/index.js"(exports2) {
61392
61491
  "use strict";
61393
61492
  Object.defineProperty(exports2, "__esModule", { value: true });
61394
- exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getAppProgrammingLanguage = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
61493
+ exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getAppProgrammingLanguage = exports2.readCapServiceMetadataEdmx = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
61395
61494
  var cap_1 = require_cap();
61396
61495
  Object.defineProperty(exports2, "getCapCustomPaths", { enumerable: true, get: function() {
61397
61496
  return cap_1.getCapCustomPaths;
@@ -61411,6 +61510,9 @@ var require_project2 = __commonJS({
61411
61510
  Object.defineProperty(exports2, "getCapEnvironment", { enumerable: true, get: function() {
61412
61511
  return cap_1.getCapEnvironment;
61413
61512
  } });
61513
+ Object.defineProperty(exports2, "readCapServiceMetadataEdmx", { enumerable: true, get: function() {
61514
+ return cap_1.readCapServiceMetadataEdmx;
61515
+ } });
61414
61516
  var info_1 = require_info();
61415
61517
  Object.defineProperty(exports2, "getAppProgrammingLanguage", { enumerable: true, get: function() {
61416
61518
  return info_1.getAppProgrammingLanguage;
@@ -61549,7 +61651,7 @@ var require_dist11 = __commonJS({
61549
61651
  __createBinding(exports3, m, p);
61550
61652
  };
61551
61653
  Object.defineProperty(exports2, "__esModule", { value: true });
61552
- exports2.getFilePaths = exports2.readUi5Yaml = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.FileName = void 0;
61654
+ exports2.getFilePaths = exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findAllApps = exports2.FileName = void 0;
61553
61655
  var constants_1 = require_constants5();
61554
61656
  Object.defineProperty(exports2, "FileName", { enumerable: true, get: function() {
61555
61657
  return constants_1.FileName;
@@ -61594,6 +61696,9 @@ var require_dist11 = __commonJS({
61594
61696
  Object.defineProperty(exports2, "loadModuleFromProject", { enumerable: true, get: function() {
61595
61697
  return project_1.loadModuleFromProject;
61596
61698
  } });
61699
+ Object.defineProperty(exports2, "readCapServiceMetadataEdmx", { enumerable: true, get: function() {
61700
+ return project_1.readCapServiceMetadataEdmx;
61701
+ } });
61597
61702
  Object.defineProperty(exports2, "readUi5Yaml", { enumerable: true, get: function() {
61598
61703
  return project_1.readUi5Yaml;
61599
61704
  } });
@@ -112984,7 +113089,7 @@ var i18n_default = {
112984
113089
  ARCHIVE_PATH_SUCCESSFULLY_GENERATED: "Archive successfully generated for deployment.",
112985
113090
  ARCHIVE_PATH_CREATED: "Archive path created {{-archivePath}}",
112986
113091
  ARCHIVE_PATH_AVAILABLE: "Archive read from {{-archivePath}}",
112987
- SERVICE_PATH: "SAPUI5 OData Service Path",
113092
+ ERROR_UPDATE_DEPLOY_CONFIG: "Error while updating config file, error was: {{-error}}",
112988
113093
  TELEMETRY_CALL_FAILED: "Error while sending telemetry data"
112989
113094
  };
112990
113095
 
@@ -9166,7 +9166,7 @@ var i18n_default = {
9166
9166
  ARCHIVE_PATH_SUCCESSFULLY_GENERATED: "Archive successfully generated for deployment.",
9167
9167
  ARCHIVE_PATH_CREATED: "Archive path created {{-archivePath}}",
9168
9168
  ARCHIVE_PATH_AVAILABLE: "Archive read from {{-archivePath}}",
9169
- SERVICE_PATH: "SAPUI5 OData Service Path",
9169
+ ERROR_UPDATE_DEPLOY_CONFIG: "Error while updating config file, error was: {{-error}}",
9170
9170
  TELEMETRY_CALL_FAILED: "Error while sending telemetry data"
9171
9171
  };
9172
9172