@sap/ux-ui5-tooling 1.7.5 → 1.8.0

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.
@@ -140,7 +140,7 @@ var require_dist = __commonJS({
140
140
  return mod && mod.__esModule ? mod : { "default": mod };
141
141
  };
142
142
  Object.defineProperty(exports2, "__esModule", { value: true });
143
- exports2.getFioriToolsDirectory = exports2.FioriToolsSettings = exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = void 0;
143
+ exports2.filterReferenceUri = exports2.getFioriToolsDirectory = exports2.FioriToolsSettings = exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = void 0;
144
144
  var os_1 = require("os");
145
145
  var path_1 = __importDefault(require("path"));
146
146
  var appStudio_1 = require_appStudio();
@@ -164,6 +164,10 @@ var require_dist = __commonJS({
164
164
  return path_1.default.join(os_1.homedir(), FioriToolsSettings.dir);
165
165
  };
166
166
  exports2.getFioriToolsDirectory = getFioriToolsDirectory;
167
+ function filterReferenceUri(metadata) {
168
+ return metadata == null ? void 0 : metadata.replace(/ Uri="(http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[0])/g, ` Uri=".`);
169
+ }
170
+ exports2.filterReferenceUri = filterReferenceUri;
167
171
  }
168
172
  });
169
173
 
@@ -12544,9 +12548,9 @@ var require_is_wsl = __commonJS({
12544
12548
  }
12545
12549
  });
12546
12550
 
12547
- // ../../node_modules/open/index.js
12551
+ // ../lib/odata-client/node_modules/open/index.js
12548
12552
  var require_open = __commonJS({
12549
- "../../node_modules/open/index.js"(exports2, module2) {
12553
+ "../lib/odata-client/node_modules/open/index.js"(exports2, module2) {
12550
12554
  "use strict";
12551
12555
  var { promisify } = require("util");
12552
12556
  var path3 = require("path");
@@ -12921,9 +12925,9 @@ var require_error2 = __commonJS({
12921
12925
  }
12922
12926
  });
12923
12927
 
12924
- // ../lib/odata-client/node_modules/qs/lib/utils.js
12928
+ // ../../node_modules/qs/lib/utils.js
12925
12929
  var require_utils4 = __commonJS({
12926
- "../lib/odata-client/node_modules/qs/lib/utils.js"(exports2, module2) {
12930
+ "../../node_modules/qs/lib/utils.js"(exports2, module2) {
12927
12931
  "use strict";
12928
12932
  var has = Object.prototype.hasOwnProperty;
12929
12933
  var isArray = Array.isArray;
@@ -13103,9 +13107,9 @@ var require_utils4 = __commonJS({
13103
13107
  }
13104
13108
  });
13105
13109
 
13106
- // ../lib/odata-client/node_modules/qs/lib/formats.js
13110
+ // ../../node_modules/qs/lib/formats.js
13107
13111
  var require_formats = __commonJS({
13108
- "../lib/odata-client/node_modules/qs/lib/formats.js"(exports2, module2) {
13112
+ "../../node_modules/qs/lib/formats.js"(exports2, module2) {
13109
13113
  "use strict";
13110
13114
  var replace = String.prototype.replace;
13111
13115
  var percentTwenties = /%20/g;
@@ -13125,9 +13129,9 @@ var require_formats = __commonJS({
13125
13129
  }
13126
13130
  });
13127
13131
 
13128
- // ../lib/odata-client/node_modules/qs/lib/stringify.js
13132
+ // ../../node_modules/qs/lib/stringify.js
13129
13133
  var require_stringify = __commonJS({
13130
- "../lib/odata-client/node_modules/qs/lib/stringify.js"(exports2, module2) {
13134
+ "../../node_modules/qs/lib/stringify.js"(exports2, module2) {
13131
13135
  "use strict";
13132
13136
  var utils = require_utils4();
13133
13137
  var formats = require_formats();
@@ -13305,9 +13309,9 @@ var require_stringify = __commonJS({
13305
13309
  }
13306
13310
  });
13307
13311
 
13308
- // ../lib/odata-client/node_modules/qs/lib/parse.js
13312
+ // ../../node_modules/qs/lib/parse.js
13309
13313
  var require_parse = __commonJS({
13310
- "../lib/odata-client/node_modules/qs/lib/parse.js"(exports2, module2) {
13314
+ "../../node_modules/qs/lib/parse.js"(exports2, module2) {
13311
13315
  "use strict";
13312
13316
  var utils = require_utils4();
13313
13317
  var has = Object.prototype.hasOwnProperty;
@@ -13489,9 +13493,9 @@ var require_parse = __commonJS({
13489
13493
  }
13490
13494
  });
13491
13495
 
13492
- // ../lib/odata-client/node_modules/qs/lib/index.js
13496
+ // ../../node_modules/qs/lib/index.js
13493
13497
  var require_lib = __commonJS({
13494
- "../lib/odata-client/node_modules/qs/lib/index.js"(exports2, module2) {
13498
+ "../../node_modules/qs/lib/index.js"(exports2, module2) {
13495
13499
  "use strict";
13496
13500
  var stringify = require_stringify();
13497
13501
  var parse2 = require_parse();
@@ -28480,7 +28484,7 @@ var require_connection = __commonJS({
28480
28484
  var connectWithReentranceTicket_1 = require_connectWithReentranceTicket();
28481
28485
  var detect_content_type_1 = __importDefault(require_lib2());
28482
28486
  exports2.SAP_CLIENT = "sap-client";
28483
- async function connectWithBasicAuth({ target, credentials, autoAddTrailingSlash = true, timeout, ignoreCertError = false, logger = console }) {
28487
+ async function connectWithBasicAuth({ target, credentials, autoAddTrailingSlash = true, timeout, ignoreCertError = false, logger = console, disableSAML = false }) {
28484
28488
  var _a2;
28485
28489
  const url = new url_1.URL(target.service, target.url).toString();
28486
28490
  const hasCredentials = !!((_a2 = credentials == null ? void 0 : credentials.username) == null ? void 0 : _a2.length);
@@ -28512,7 +28516,7 @@ var require_connection = __commonJS({
28512
28516
  config2.params[exports2.SAP_CLIENT] = target.client;
28513
28517
  }
28514
28518
  const isTargetDestOnAppStudio = ux_common_utils_1.isAppStudio() && target.destination;
28515
- if (isTargetDestOnAppStudio) {
28519
+ if (isTargetDestOnAppStudio || disableSAML) {
28516
28520
  config2.params.saml2 = "disabled";
28517
28521
  }
28518
28522
  const urlPath = !(url == null ? void 0 : url.endsWith("/")) && autoAddTrailingSlash ? `${url}/` : url;
@@ -28568,7 +28572,7 @@ var require_connection = __commonJS({
28568
28572
  function isSamlLogonNeeded(response) {
28569
28573
  return (response == null ? void 0 : response.status) === 200 && isHtmlResponse(response) && typeof response.data === "string" && !!response.data.match(/saml/i);
28570
28574
  }
28571
- async function connect({ target, credentials, log: log3, autoAddTrailingSlash = true, timeout, ignoreCertError = false, postConnectionCallback }) {
28575
+ async function connect({ target, credentials, log: log3, autoAddTrailingSlash = true, timeout, ignoreCertError = false, postConnectionCallback, disableSAML = false }) {
28572
28576
  const targetAuthType = target.authenticationType;
28573
28577
  if (targetAuthType === config_1.AuthenticationType.OAuth2RefreshToken) {
28574
28578
  return uaaOauth_1.connectUsingUaa({ target, credentials, log: log3, postConnectionCallback });
@@ -28583,7 +28587,8 @@ var require_connection = __commonJS({
28583
28587
  autoAddTrailingSlash,
28584
28588
  timeout,
28585
28589
  ignoreCertError,
28586
- logger: log3
28590
+ logger: log3,
28591
+ disableSAML
28587
28592
  });
28588
28593
  }
28589
28594
  }
@@ -28606,7 +28611,7 @@ var require_httpClient = __commonJS({
28606
28611
  var connection_1 = require_connection();
28607
28612
  var https_1 = __importDefault(require("https"));
28608
28613
  var url_1 = require("url");
28609
- async function newHttpClient({ system, credentials, log: log3, existingConnection, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback }) {
28614
+ async function newHttpClient({ system, credentials, log: log3, existingConnection, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback, disableSAML = false }) {
28610
28615
  const connection = existingConnection || await connection_1.connect({
28611
28616
  target: system,
28612
28617
  credentials,
@@ -28614,7 +28619,8 @@ var require_httpClient = __commonJS({
28614
28619
  autoAddTrailingSlash,
28615
28620
  timeout,
28616
28621
  ignoreCertError,
28617
- postConnectionCallback
28622
+ postConnectionCallback,
28623
+ disableSAML
28618
28624
  });
28619
28625
  const headers = {
28620
28626
  Cookie: connection.cookies.toString()
@@ -31192,6 +31198,7 @@ var require_utils7 = __commonJS({
31192
31198
  if (!isImportedSystem) {
31193
31199
  sapSystem.name = system.name || "";
31194
31200
  sapSystem.setCredentials(creds);
31201
+ sapSystem.setUserDisplayName(creds.username);
31195
31202
  }
31196
31203
  } else {
31197
31204
  sapSystem = __1.newSapSystem(system.name || "", system.url, system.client, creds, true);
@@ -31270,7 +31277,7 @@ var require_oDataClient = __commonJS({
31270
31277
  var utils_1 = require_utils7();
31271
31278
  var error_1 = require_error();
31272
31279
  var ODataClient = class {
31273
- constructor({ system, credentials = void 0, log: log3 = console, connection = void 0, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback }) {
31280
+ constructor({ system, credentials = void 0, log: log3 = console, connection = void 0, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback, disableSAML = false }) {
31274
31281
  this.autoAddTrailingSlash = true;
31275
31282
  this.system = system;
31276
31283
  this.credentials = credentials;
@@ -31280,6 +31287,7 @@ var require_oDataClient = __commonJS({
31280
31287
  this.timeout = timeout;
31281
31288
  this.ignoreCertError = ignoreCertError;
31282
31289
  this.postConnectionCallback = postConnectionCallback;
31290
+ this.disableSAML = disableSAML;
31283
31291
  if (system && patchTls_1.TlsPatch.isPatchRequired(system.url)) {
31284
31292
  patchTls_1.TlsPatch.apply();
31285
31293
  }
@@ -31311,7 +31319,8 @@ var require_oDataClient = __commonJS({
31311
31319
  timeout: this.timeout,
31312
31320
  ignoreCertError: this.ignoreCertError,
31313
31321
  updateUserInfo: this.updateUserInfo,
31314
- postConnectionCallback: this.postConnectionCallback
31322
+ postConnectionCallback: this.postConnectionCallback,
31323
+ disableSAML: this.disableSAML
31315
31324
  });
31316
31325
  this.connection = connection;
31317
31326
  this.client = httpClient;
@@ -31324,10 +31333,15 @@ var require_oDataClient = __commonJS({
31324
31333
  }
31325
31334
  return this.connection;
31326
31335
  }
31327
- async metadata() {
31336
+ async metadata(filterReferenceUriInEdmx = true) {
31328
31337
  var _a2;
31329
31338
  const metadataPath = ((_a2 = this.system.service) == null ? void 0 : _a2.endsWith("/")) ? "$metadata" : "/$metadata";
31330
- return this.get(metadataPath, { Accept: "application/xml" });
31339
+ const edmx = await this.get(metadataPath, { Accept: "application/xml" });
31340
+ try {
31341
+ return filterReferenceUriInEdmx ? ux_common_utils_1.filterReferenceUri(edmx) : edmx;
31342
+ } catch {
31343
+ return edmx;
31344
+ }
31331
31345
  }
31332
31346
  async get(path3, headers) {
31333
31347
  var _a2, _b, _c;
@@ -61629,7 +61643,7 @@ var require_package5 = __commonJS({
61629
61643
  "../lib/telemetry/dist/package.json"(exports2, module2) {
61630
61644
  module2.exports = {
61631
61645
  name: "@sap/ux-telemetry",
61632
- version: "1.7.5",
61646
+ version: "1.8.0",
61633
61647
  description: "SAP Fiori tools telemetry library",
61634
61648
  main: "dist/src/index.js",
61635
61649
  author: "SAP SE",
@@ -61642,7 +61656,7 @@ var require_package5 = __commonJS({
61642
61656
  "clean:dist": "rimraf ./dist ./generators *.tsbuildinfo",
61643
61657
  clean: "rimraf ./reports",
61644
61658
  build: "ts-node ./build-script/ && yarn run clean && tsc --build ./",
61645
- test: "jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
61659
+ test: "cross-env SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY=false jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
61646
61660
  lint: "eslint . --ext .ts",
61647
61661
  "lint:summary": "eslint . --ext .ts -f summary",
61648
61662
  "lint:fix": "eslint --fix",
@@ -61654,10 +61668,10 @@ var require_package5 = __commonJS({
61654
61668
  },
61655
61669
  dependencies: {
61656
61670
  "@sap-ux/store": "0.3.0",
61657
- "@sap/ux-cds": "1.7.5",
61658
- "@sap/ux-common-utils": "1.7.5",
61659
- "@sap/ux-feature-toggle": "1.7.5",
61660
- "@sap/ux-project-access": "1.7.5",
61671
+ "@sap/ux-cds": "1.8.0",
61672
+ "@sap/ux-common-utils": "1.8.0",
61673
+ "@sap/ux-feature-toggle": "1.8.0",
61674
+ "@sap/ux-project-access": "1.8.0",
61661
61675
  applicationinsights: "1.4.1",
61662
61676
  "performance-now": "2.1.0",
61663
61677
  yaml: "2.0.0-10"
@@ -61787,8 +61801,12 @@ var require_reporting = __commonJS({
61787
61801
  });
61788
61802
  return parsedStack;
61789
61803
  };
61790
- var reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
61791
- telemetryClientConfig_1.configAzureTelemetryClient(reportingTelemetryClient);
61804
+ var reportingTelemetryClient;
61805
+ var _a2;
61806
+ if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
61807
+ reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
61808
+ telemetryClientConfig_1.configAzureTelemetryClient(reportingTelemetryClient);
61809
+ }
61792
61810
  var reportRuntimeError = (error3) => {
61793
61811
  const properties = { message: error3.message };
61794
61812
  if (error3.stack) {
@@ -61932,8 +61950,11 @@ var require_system3 = __commonJS({
61932
61950
  patterns: ["generators", "project-generator", "deployment-generator", "ux-ui5-tooling", "generator-common"]
61933
61951
  }
61934
61952
  ];
61953
+ var _a2;
61935
61954
  try {
61936
- TelemetrySystem.init();
61955
+ if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
61956
+ TelemetrySystem.init();
61957
+ }
61937
61958
  } catch (err) {
61938
61959
  reporting_1.reportRuntimeError(err);
61939
61960
  }
@@ -79828,9 +79849,9 @@ var require_console = __commonJS({
79828
79849
  }
79829
79850
  });
79830
79851
 
79831
- // ../../node_modules/winston/node_modules/async/internal/isArrayLike.js
79852
+ // ../../node_modules/async/internal/isArrayLike.js
79832
79853
  var require_isArrayLike2 = __commonJS({
79833
- "../../node_modules/winston/node_modules/async/internal/isArrayLike.js"(exports2, module2) {
79854
+ "../../node_modules/async/internal/isArrayLike.js"(exports2, module2) {
79834
79855
  "use strict";
79835
79856
  Object.defineProperty(exports2, "__esModule", {
79836
79857
  value: true
@@ -79843,9 +79864,9 @@ var require_isArrayLike2 = __commonJS({
79843
79864
  }
79844
79865
  });
79845
79866
 
79846
- // ../../node_modules/winston/node_modules/async/internal/initialParams.js
79867
+ // ../../node_modules/async/internal/initialParams.js
79847
79868
  var require_initialParams = __commonJS({
79848
- "../../node_modules/winston/node_modules/async/internal/initialParams.js"(exports2, module2) {
79869
+ "../../node_modules/async/internal/initialParams.js"(exports2, module2) {
79849
79870
  "use strict";
79850
79871
  Object.defineProperty(exports2, "__esModule", {
79851
79872
  value: true
@@ -79860,9 +79881,9 @@ var require_initialParams = __commonJS({
79860
79881
  }
79861
79882
  });
79862
79883
 
79863
- // ../../node_modules/winston/node_modules/async/internal/setImmediate.js
79884
+ // ../../node_modules/async/internal/setImmediate.js
79864
79885
  var require_setImmediate = __commonJS({
79865
- "../../node_modules/winston/node_modules/async/internal/setImmediate.js"(exports2) {
79886
+ "../../node_modules/async/internal/setImmediate.js"(exports2) {
79866
79887
  "use strict";
79867
79888
  Object.defineProperty(exports2, "__esModule", {
79868
79889
  value: true
@@ -79892,9 +79913,9 @@ var require_setImmediate = __commonJS({
79892
79913
  }
79893
79914
  });
79894
79915
 
79895
- // ../../node_modules/winston/node_modules/async/asyncify.js
79916
+ // ../../node_modules/async/asyncify.js
79896
79917
  var require_asyncify = __commonJS({
79897
- "../../node_modules/winston/node_modules/async/asyncify.js"(exports2, module2) {
79918
+ "../../node_modules/async/asyncify.js"(exports2, module2) {
79898
79919
  "use strict";
79899
79920
  Object.defineProperty(exports2, "__esModule", {
79900
79921
  value: true
@@ -79950,9 +79971,9 @@ var require_asyncify = __commonJS({
79950
79971
  }
79951
79972
  });
79952
79973
 
79953
- // ../../node_modules/winston/node_modules/async/internal/wrapAsync.js
79974
+ // ../../node_modules/async/internal/wrapAsync.js
79954
79975
  var require_wrapAsync = __commonJS({
79955
- "../../node_modules/winston/node_modules/async/internal/wrapAsync.js"(exports2) {
79976
+ "../../node_modules/async/internal/wrapAsync.js"(exports2) {
79956
79977
  "use strict";
79957
79978
  Object.defineProperty(exports2, "__esModule", {
79958
79979
  value: true
@@ -79984,9 +80005,9 @@ var require_wrapAsync = __commonJS({
79984
80005
  }
79985
80006
  });
79986
80007
 
79987
- // ../../node_modules/winston/node_modules/async/internal/awaitify.js
80008
+ // ../../node_modules/async/internal/awaitify.js
79988
80009
  var require_awaitify = __commonJS({
79989
- "../../node_modules/winston/node_modules/async/internal/awaitify.js"(exports2, module2) {
80010
+ "../../node_modules/async/internal/awaitify.js"(exports2, module2) {
79990
80011
  "use strict";
79991
80012
  Object.defineProperty(exports2, "__esModule", {
79992
80013
  value: true
@@ -80014,9 +80035,9 @@ var require_awaitify = __commonJS({
80014
80035
  }
80015
80036
  });
80016
80037
 
80017
- // ../../node_modules/winston/node_modules/async/internal/parallel.js
80038
+ // ../../node_modules/async/internal/parallel.js
80018
80039
  var require_parallel = __commonJS({
80019
- "../../node_modules/winston/node_modules/async/internal/parallel.js"(exports2, module2) {
80040
+ "../../node_modules/async/internal/parallel.js"(exports2, module2) {
80020
80041
  "use strict";
80021
80042
  Object.defineProperty(exports2, "__esModule", {
80022
80043
  value: true
@@ -80046,9 +80067,9 @@ var require_parallel = __commonJS({
80046
80067
  }
80047
80068
  });
80048
80069
 
80049
- // ../../node_modules/winston/node_modules/async/internal/once.js
80070
+ // ../../node_modules/async/internal/once.js
80050
80071
  var require_once = __commonJS({
80051
- "../../node_modules/winston/node_modules/async/internal/once.js"(exports2, module2) {
80072
+ "../../node_modules/async/internal/once.js"(exports2, module2) {
80052
80073
  "use strict";
80053
80074
  Object.defineProperty(exports2, "__esModule", {
80054
80075
  value: true
@@ -80069,9 +80090,9 @@ var require_once = __commonJS({
80069
80090
  }
80070
80091
  });
80071
80092
 
80072
- // ../../node_modules/winston/node_modules/async/internal/getIterator.js
80093
+ // ../../node_modules/async/internal/getIterator.js
80073
80094
  var require_getIterator = __commonJS({
80074
- "../../node_modules/winston/node_modules/async/internal/getIterator.js"(exports2, module2) {
80095
+ "../../node_modules/async/internal/getIterator.js"(exports2, module2) {
80075
80096
  "use strict";
80076
80097
  Object.defineProperty(exports2, "__esModule", {
80077
80098
  value: true
@@ -80083,9 +80104,9 @@ var require_getIterator = __commonJS({
80083
80104
  }
80084
80105
  });
80085
80106
 
80086
- // ../../node_modules/winston/node_modules/async/internal/iterator.js
80107
+ // ../../node_modules/async/internal/iterator.js
80087
80108
  var require_iterator2 = __commonJS({
80088
- "../../node_modules/winston/node_modules/async/internal/iterator.js"(exports2, module2) {
80109
+ "../../node_modules/async/internal/iterator.js"(exports2, module2) {
80089
80110
  "use strict";
80090
80111
  Object.defineProperty(exports2, "__esModule", {
80091
80112
  value: true
@@ -80138,9 +80159,9 @@ var require_iterator2 = __commonJS({
80138
80159
  }
80139
80160
  });
80140
80161
 
80141
- // ../../node_modules/winston/node_modules/async/internal/onlyOnce.js
80162
+ // ../../node_modules/async/internal/onlyOnce.js
80142
80163
  var require_onlyOnce = __commonJS({
80143
- "../../node_modules/winston/node_modules/async/internal/onlyOnce.js"(exports2, module2) {
80164
+ "../../node_modules/async/internal/onlyOnce.js"(exports2, module2) {
80144
80165
  "use strict";
80145
80166
  Object.defineProperty(exports2, "__esModule", {
80146
80167
  value: true
@@ -80159,9 +80180,9 @@ var require_onlyOnce = __commonJS({
80159
80180
  }
80160
80181
  });
80161
80182
 
80162
- // ../../node_modules/winston/node_modules/async/internal/breakLoop.js
80183
+ // ../../node_modules/async/internal/breakLoop.js
80163
80184
  var require_breakLoop = __commonJS({
80164
- "../../node_modules/winston/node_modules/async/internal/breakLoop.js"(exports2, module2) {
80185
+ "../../node_modules/async/internal/breakLoop.js"(exports2, module2) {
80165
80186
  "use strict";
80166
80187
  Object.defineProperty(exports2, "__esModule", {
80167
80188
  value: true
@@ -80172,9 +80193,9 @@ var require_breakLoop = __commonJS({
80172
80193
  }
80173
80194
  });
80174
80195
 
80175
- // ../../node_modules/winston/node_modules/async/internal/asyncEachOfLimit.js
80196
+ // ../../node_modules/async/internal/asyncEachOfLimit.js
80176
80197
  var require_asyncEachOfLimit = __commonJS({
80177
- "../../node_modules/winston/node_modules/async/internal/asyncEachOfLimit.js"(exports2, module2) {
80198
+ "../../node_modules/async/internal/asyncEachOfLimit.js"(exports2, module2) {
80178
80199
  "use strict";
80179
80200
  Object.defineProperty(exports2, "__esModule", {
80180
80201
  value: true
@@ -80242,9 +80263,9 @@ var require_asyncEachOfLimit = __commonJS({
80242
80263
  }
80243
80264
  });
80244
80265
 
80245
- // ../../node_modules/winston/node_modules/async/internal/eachOfLimit.js
80266
+ // ../../node_modules/async/internal/eachOfLimit.js
80246
80267
  var require_eachOfLimit = __commonJS({
80247
- "../../node_modules/winston/node_modules/async/internal/eachOfLimit.js"(exports2, module2) {
80268
+ "../../node_modules/async/internal/eachOfLimit.js"(exports2, module2) {
80248
80269
  "use strict";
80249
80270
  Object.defineProperty(exports2, "__esModule", {
80250
80271
  value: true
@@ -80323,9 +80344,9 @@ var require_eachOfLimit = __commonJS({
80323
80344
  }
80324
80345
  });
80325
80346
 
80326
- // ../../node_modules/winston/node_modules/async/eachOfLimit.js
80347
+ // ../../node_modules/async/eachOfLimit.js
80327
80348
  var require_eachOfLimit2 = __commonJS({
80328
- "../../node_modules/winston/node_modules/async/eachOfLimit.js"(exports2, module2) {
80349
+ "../../node_modules/async/eachOfLimit.js"(exports2, module2) {
80329
80350
  "use strict";
80330
80351
  Object.defineProperty(exports2, "__esModule", {
80331
80352
  value: true
@@ -80347,9 +80368,9 @@ var require_eachOfLimit2 = __commonJS({
80347
80368
  }
80348
80369
  });
80349
80370
 
80350
- // ../../node_modules/winston/node_modules/async/eachOfSeries.js
80371
+ // ../../node_modules/async/eachOfSeries.js
80351
80372
  var require_eachOfSeries = __commonJS({
80352
- "../../node_modules/winston/node_modules/async/eachOfSeries.js"(exports2, module2) {
80373
+ "../../node_modules/async/eachOfSeries.js"(exports2, module2) {
80353
80374
  "use strict";
80354
80375
  Object.defineProperty(exports2, "__esModule", {
80355
80376
  value: true
@@ -80369,9 +80390,9 @@ var require_eachOfSeries = __commonJS({
80369
80390
  }
80370
80391
  });
80371
80392
 
80372
- // ../../node_modules/winston/node_modules/async/series.js
80393
+ // ../../node_modules/async/series.js
80373
80394
  var require_series = __commonJS({
80374
- "../../node_modules/winston/node_modules/async/series.js"(exports2, module2) {
80395
+ "../../node_modules/async/series.js"(exports2, module2) {
80375
80396
  "use strict";
80376
80397
  Object.defineProperty(exports2, "__esModule", {
80377
80398
  value: true
@@ -85804,9 +85825,9 @@ var require_config3 = __commonJS({
85804
85825
  }
85805
85826
  });
85806
85827
 
85807
- // ../../node_modules/winston/node_modules/async/eachOf.js
85828
+ // ../../node_modules/async/eachOf.js
85808
85829
  var require_eachOf = __commonJS({
85809
- "../../node_modules/winston/node_modules/async/eachOf.js"(exports2, module2) {
85830
+ "../../node_modules/async/eachOf.js"(exports2, module2) {
85810
85831
  "use strict";
85811
85832
  Object.defineProperty(exports2, "__esModule", {
85812
85833
  value: true
@@ -85862,9 +85883,9 @@ var require_eachOf = __commonJS({
85862
85883
  }
85863
85884
  });
85864
85885
 
85865
- // ../../node_modules/winston/node_modules/async/internal/withoutIndex.js
85886
+ // ../../node_modules/async/internal/withoutIndex.js
85866
85887
  var require_withoutIndex = __commonJS({
85867
- "../../node_modules/winston/node_modules/async/internal/withoutIndex.js"(exports2, module2) {
85888
+ "../../node_modules/async/internal/withoutIndex.js"(exports2, module2) {
85868
85889
  "use strict";
85869
85890
  Object.defineProperty(exports2, "__esModule", {
85870
85891
  value: true
@@ -85877,9 +85898,9 @@ var require_withoutIndex = __commonJS({
85877
85898
  }
85878
85899
  });
85879
85900
 
85880
- // ../../node_modules/winston/node_modules/async/forEach.js
85901
+ // ../../node_modules/async/forEach.js
85881
85902
  var require_forEach = __commonJS({
85882
- "../../node_modules/winston/node_modules/async/forEach.js"(exports2, module2) {
85903
+ "../../node_modules/async/forEach.js"(exports2, module2) {
85883
85904
  "use strict";
85884
85905
  Object.defineProperty(exports2, "__esModule", {
85885
85906
  value: true
@@ -93371,10 +93392,10 @@ var import_semver2 = __toESM(require_semver7());
93371
93392
  function throwConfigMissingError(property) {
93372
93393
  throw new Error(i18next_default.t("ERROR_INVALID_DEPLOYMENT_CONFIGURATION", { property }));
93373
93394
  }
93374
- function validateConfig(config2) {
93375
- validateCredential(config2.credentials);
93395
+ function validateConfig(config2 = {}) {
93396
+ validateCredential(config2 == null ? void 0 : config2.credentials);
93376
93397
  replaceEnvVariables(config2);
93377
- if (config2.target) {
93398
+ if (config2 == null ? void 0 : config2.target) {
93378
93399
  if (!config2.target.url && !(0, import_ux_common_utils2.isAppStudio)()) {
93379
93400
  throwConfigMissingError("target-url");
93380
93401
  }
@@ -93389,14 +93410,14 @@ function validateConfig(config2) {
93389
93410
  } else {
93390
93411
  throwConfigMissingError("target");
93391
93412
  }
93392
- if (config2.app) {
93413
+ if (config2 == null ? void 0 : config2.app) {
93393
93414
  if (!config2.app.name) {
93394
93415
  throwConfigMissingError("app-name");
93395
93416
  }
93396
93417
  } else {
93397
93418
  throwConfigMissingError("app");
93398
93419
  }
93399
- if (config2.credentials) {
93420
+ if (config2 == null ? void 0 : config2.credentials) {
93400
93421
  if (!config2.credentials.serviceKeys && config2.credentials.username) {
93401
93422
  if (!config2.credentials.password) {
93402
93423
  throwConfigMissingError("password");
@@ -93796,18 +93817,31 @@ async function confirmDeploy(config2) {
93796
93817
  });
93797
93818
  return !abort && confirm;
93798
93819
  }
93820
+ function trackEvent(markName) {
93821
+ import_ux_telemetry2.PerformanceMeasurementAPI.endMark(markName);
93822
+ import_ux_telemetry2.PerformanceMeasurementAPI.measure(markName);
93823
+ const executionTime = import_ux_telemetry2.PerformanceMeasurementAPI.getMeasurementDuration(markName);
93824
+ import_ux_telemetry2.ClientFactory.getTelemetryClient().report(import_ux_telemetry2.EventName.DEPLOY, {
93825
+ target: "abap"
93826
+ }, {
93827
+ DeployTime: executionTime
93828
+ }, import_ux_telemetry2.SampleRate.NoSampling);
93829
+ }
93830
+ async function validateConfigProperties(config2 = {}) {
93831
+ validateConfig(config2);
93832
+ await validateTargetSystemUi5Version(config2);
93833
+ return config2;
93834
+ }
93799
93835
  module.exports = async function task({ workspace, options: options2 }) {
93800
93836
  var _a2, _b, _c;
93801
93837
  await initI18n();
93802
93838
  const log3 = (0, import_logger.getLogger)("builder:custom deploy-to-abap");
93803
- const config2 = options2.configuration;
93839
+ const config2 = await validateConfigProperties(options2 == null ? void 0 : options2.configuration);
93804
93840
  const isValidDist = await validateDistDir(config2.archivePath);
93805
93841
  if (!isValidDist) {
93806
93842
  log3.error(i18next_default.t("ERROR_DEPLOYMENT_FAILED_NO_DIST"));
93807
93843
  return;
93808
93844
  }
93809
- validateConfig(config2);
93810
- await validateTargetSystemUi5Version(config2);
93811
93845
  if (isConfirmationRequired(config2) && !await confirmDeploy(config2)) {
93812
93846
  log3.info(i18next_default.t("DEPLOY_CANCELED"));
93813
93847
  return;
@@ -93833,14 +93867,7 @@ module.exports = async function task({ workspace, options: options2 }) {
93833
93867
  }
93834
93868
  log3.info(i18next_default.t("INFO_STARTING_DEPLOYMENT"));
93835
93869
  await deployWithRetry(archive, config2, log3);
93836
- import_ux_telemetry2.PerformanceMeasurementAPI.endMark(markName);
93837
- import_ux_telemetry2.PerformanceMeasurementAPI.measure(markName);
93838
- const executionTime = import_ux_telemetry2.PerformanceMeasurementAPI.getMeasurementDuration(markName);
93839
- import_ux_telemetry2.ClientFactory.getTelemetryClient().report(import_ux_telemetry2.EventName.DEPLOY, {
93840
- target: "abap"
93841
- }, {
93842
- DeployTime: executionTime
93843
- }, import_ux_telemetry2.SampleRate.NoSampling);
93870
+ trackEvent(markName);
93844
93871
  } catch (e) {
93845
93872
  import_ux_telemetry2.ClientFactory.getTelemetryClient().report(import_ux_telemetry2.EventName.DEPLOY_FAIL, { target: "abap" }, {}, import_ux_telemetry2.SampleRate.NoSampling);
93846
93873
  log3.error(i18next_default.t("INFO_DEPLOYMENT_FAILED"));