@sap/ux-ui5-tooling 1.5.3 → 1.5.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.
@@ -124302,12 +124302,19 @@ function eachOfGeneric(coll, iteratee, callback) {
124302
124302
  * @returns {Promise} a promise, if a callback is omitted
124303
124303
  * @example
124304
124304
  *
124305
- * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
124306
- * var configs = {};
124307
- *
124308
- * async.forEachOf(obj, function (value, key, callback) {
124309
- * fs.readFile(__dirname + value, "utf8", function (err, data) {
124310
- * if (err) return callback(err);
124305
+ * // dev.json is a file containing a valid json object config for dev environment
124306
+ * // dev.json is a file containing a valid json object config for test environment
124307
+ * // prod.json is a file containing a valid json object config for prod environment
124308
+ * // invalid.json is a file with a malformed json object
124309
+ *
124310
+ * let configs = {}; //global variable
124311
+ * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
124312
+ * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
124313
+ *
124314
+ * // asynchronous function that reads a json file and parses the contents as json object
124315
+ * function parseFile(file, key, callback) {
124316
+ * fs.readFile(file, "utf8", function(err, data) {
124317
+ * if (err) return calback(err);
124311
124318
  * try {
124312
124319
  * configs[key] = JSON.parse(data);
124313
124320
  * } catch (e) {
@@ -124315,11 +124322,73 @@ function eachOfGeneric(coll, iteratee, callback) {
124315
124322
  * }
124316
124323
  * callback();
124317
124324
  * });
124318
- * }, function (err) {
124319
- * if (err) console.error(err.message);
124320
- * // configs is now a map of JSON data
124321
- * doSomethingWith(configs);
124325
+ * }
124326
+ *
124327
+ * // Using callbacks
124328
+ * async.forEachOf(validConfigFileMap, parseFile, function (err) {
124329
+ * if (err) {
124330
+ * console.error(err);
124331
+ * } else {
124332
+ * console.log(configs);
124333
+ * // configs is now a map of JSON data, e.g.
124334
+ * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
124335
+ * }
124322
124336
  * });
124337
+ *
124338
+ * //Error handing
124339
+ * async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
124340
+ * if (err) {
124341
+ * console.error(err);
124342
+ * // JSON parse error exception
124343
+ * } else {
124344
+ * console.log(configs);
124345
+ * }
124346
+ * });
124347
+ *
124348
+ * // Using Promises
124349
+ * async.forEachOf(validConfigFileMap, parseFile)
124350
+ * .then( () => {
124351
+ * console.log(configs);
124352
+ * // configs is now a map of JSON data, e.g.
124353
+ * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
124354
+ * }).catch( err => {
124355
+ * console.error(err);
124356
+ * });
124357
+ *
124358
+ * //Error handing
124359
+ * async.forEachOf(invalidConfigFileMap, parseFile)
124360
+ * .then( () => {
124361
+ * console.log(configs);
124362
+ * }).catch( err => {
124363
+ * console.error(err);
124364
+ * // JSON parse error exception
124365
+ * });
124366
+ *
124367
+ * // Using async/await
124368
+ * async () => {
124369
+ * try {
124370
+ * let result = await async.forEachOf(validConfigFileMap, parseFile);
124371
+ * console.log(configs);
124372
+ * // configs is now a map of JSON data, e.g.
124373
+ * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
124374
+ * }
124375
+ * catch (err) {
124376
+ * console.log(err);
124377
+ * }
124378
+ * }
124379
+ *
124380
+ * //Error handing
124381
+ * async () => {
124382
+ * try {
124383
+ * let result = await async.forEachOf(invalidConfigFileMap, parseFile);
124384
+ * console.log(configs);
124385
+ * }
124386
+ * catch (err) {
124387
+ * console.log(err);
124388
+ * // JSON parse error exception
124389
+ * }
124390
+ * }
124391
+ *
124323
124392
  */
124324
124393
  function eachOf(coll, iteratee, callback) {
124325
124394
  var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;
@@ -124485,37 +124554,78 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
124485
124554
  * @returns {Promise} a promise, if a callback is omitted
124486
124555
  * @example
124487
124556
  *
124488
- * // assuming openFiles is an array of file names and saveFile is a function
124489
- * // to save the modified contents of that file:
124557
+ * // dir1 is a directory that contains file1.txt, file2.txt
124558
+ * // dir2 is a directory that contains file3.txt, file4.txt
124559
+ * // dir3 is a directory that contains file5.txt
124560
+ * // dir4 does not exist
124490
124561
  *
124491
- * async.each(openFiles, saveFile, function(err){
124492
- * // if any of the saves produced an error, err would equal that error
124493
- * });
124562
+ * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];
124563
+ * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];
124494
124564
  *
124495
- * // assuming openFiles is an array of file names
124496
- * async.each(openFiles, function(file, callback) {
124565
+ * // asynchronous function that deletes a file
124566
+ * const deleteFile = function(file, callback) {
124567
+ * fs.unlink(file, callback);
124568
+ * };
124497
124569
  *
124498
- * // Perform operation on file here.
124499
- * console.log('Processing file ' + file);
124500
- *
124501
- * if( file.length > 32 ) {
124502
- * console.log('This file name is too long');
124503
- * callback('File name too long');
124504
- * } else {
124505
- * // Do work to process file here
124506
- * console.log('File processed');
124507
- * callback();
124508
- * }
124509
- * }, function(err) {
124510
- * // if any of the file processing produced an error, err would equal that error
124570
+ * // Using callbacks
124571
+ * async.each(fileList, deleteFile, function(err) {
124511
124572
  * if( err ) {
124512
- * // One of the iterations produced an error.
124513
- * // All processing will now stop.
124514
- * console.log('A file failed to process');
124573
+ * console.log(err);
124515
124574
  * } else {
124516
- * console.log('All files have been processed successfully');
124575
+ * console.log('All files have been deleted successfully');
124517
124576
  * }
124518
124577
  * });
124578
+ *
124579
+ * // Error Handling
124580
+ * async.each(withMissingFileList, deleteFile, function(err){
124581
+ * console.log(err);
124582
+ * // [ Error: ENOENT: no such file or directory ]
124583
+ * // since dir4/file2.txt does not exist
124584
+ * // dir1/file1.txt could have been deleted
124585
+ * });
124586
+ *
124587
+ * // Using Promises
124588
+ * async.each(fileList, deleteFile)
124589
+ * .then( () => {
124590
+ * console.log('All files have been deleted successfully');
124591
+ * }).catch( err => {
124592
+ * console.log(err);
124593
+ * });
124594
+ *
124595
+ * // Error Handling
124596
+ * async.each(fileList, deleteFile)
124597
+ * .then( () => {
124598
+ * console.log('All files have been deleted successfully');
124599
+ * }).catch( err => {
124600
+ * console.log(err);
124601
+ * // [ Error: ENOENT: no such file or directory ]
124602
+ * // since dir4/file2.txt does not exist
124603
+ * // dir1/file1.txt could have been deleted
124604
+ * });
124605
+ *
124606
+ * // Using async/await
124607
+ * async () => {
124608
+ * try {
124609
+ * await async.each(files, deleteFile);
124610
+ * }
124611
+ * catch (err) {
124612
+ * console.log(err);
124613
+ * }
124614
+ * }
124615
+ *
124616
+ * // Error Handling
124617
+ * async () => {
124618
+ * try {
124619
+ * await async.each(withMissingFileList, deleteFile);
124620
+ * }
124621
+ * catch (err) {
124622
+ * console.log(err);
124623
+ * // [ Error: ENOENT: no such file or directory ]
124624
+ * // since dir4/file2.txt does not exist
124625
+ * // dir1/file1.txt could have been deleted
124626
+ * }
124627
+ * }
124628
+ *
124519
124629
  */
124520
124630
  function eachLimit(coll, iteratee, callback) {
124521
124631
  return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);
@@ -124857,6 +124967,9 @@ function createObjectIterator(obj) {
124857
124967
  var len = okeys.length;
124858
124968
  return function next() {
124859
124969
  var key = okeys[++i];
124970
+ if (key === '__proto__') {
124971
+ return next();
124972
+ }
124860
124973
  return i < len ? { value: obj[key], key } : null;
124861
124974
  };
124862
124975
  }
@@ -124965,13 +125078,15 @@ module.exports = exports['default'];
124965
125078
 
124966
125079
  "use strict";
124967
125080
 
124968
- /* istanbul ignore file */
124969
125081
 
124970
125082
  Object.defineProperty(exports, "__esModule", ({
124971
125083
  value: true
124972
125084
  }));
124973
125085
  exports.fallback = fallback;
124974
125086
  exports.wrap = wrap;
125087
+ /* istanbul ignore file */
125088
+
125089
+ var hasQueueMicrotask = exports.hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;
124975
125090
  var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
124976
125091
  var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
124977
125092
 
@@ -124985,7 +125100,9 @@ function wrap(defer) {
124985
125100
 
124986
125101
  var _defer;
124987
125102
 
124988
- if (hasSetImmediate) {
125103
+ if (hasQueueMicrotask) {
125104
+ _defer = queueMicrotask;
125105
+ } else if (hasSetImmediate) {
124989
125106
  _defer = setImmediate;
124990
125107
  } else if (hasNextTick) {
124991
125108
  _defer = process.nextTick;
@@ -125111,35 +125228,135 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
125111
125228
  * with (err, result).
125112
125229
  * @return {Promise} a promise, if no callback is passed
125113
125230
  * @example
125231
+ *
125232
+ * //Using Callbacks
125114
125233
  * async.series([
125115
125234
  * function(callback) {
125116
- * // do some stuff ...
125117
- * callback(null, 'one');
125235
+ * setTimeout(function() {
125236
+ * // do some async task
125237
+ * callback(null, 'one');
125238
+ * }, 200);
125118
125239
  * },
125119
125240
  * function(callback) {
125120
- * // do some more stuff ...
125121
- * callback(null, 'two');
125241
+ * setTimeout(function() {
125242
+ * // then do another async task
125243
+ * callback(null, 'two');
125244
+ * }, 100);
125122
125245
  * }
125123
- * ],
125124
- * // optional callback
125125
- * function(err, results) {
125126
- * // results is now equal to ['one', 'two']
125246
+ * ], function(err, results) {
125247
+ * console.log(results);
125248
+ * // results is equal to ['one','two']
125127
125249
  * });
125128
125250
  *
125251
+ * // an example using objects instead of arrays
125129
125252
  * async.series({
125130
125253
  * one: function(callback) {
125131
125254
  * setTimeout(function() {
125255
+ * // do some async task
125132
125256
  * callback(null, 1);
125133
125257
  * }, 200);
125134
125258
  * },
125135
- * two: function(callback){
125259
+ * two: function(callback) {
125136
125260
  * setTimeout(function() {
125261
+ * // then do another async task
125137
125262
  * callback(null, 2);
125138
125263
  * }, 100);
125139
125264
  * }
125140
125265
  * }, function(err, results) {
125141
- * // results is now equal to: {one: 1, two: 2}
125266
+ * console.log(results);
125267
+ * // results is equal to: { one: 1, two: 2 }
125268
+ * });
125269
+ *
125270
+ * //Using Promises
125271
+ * async.series([
125272
+ * function(callback) {
125273
+ * setTimeout(function() {
125274
+ * callback(null, 'one');
125275
+ * }, 200);
125276
+ * },
125277
+ * function(callback) {
125278
+ * setTimeout(function() {
125279
+ * callback(null, 'two');
125280
+ * }, 100);
125281
+ * }
125282
+ * ]).then(results => {
125283
+ * console.log(results);
125284
+ * // results is equal to ['one','two']
125285
+ * }).catch(err => {
125286
+ * console.log(err);
125142
125287
  * });
125288
+ *
125289
+ * // an example using an object instead of an array
125290
+ * async.series({
125291
+ * one: function(callback) {
125292
+ * setTimeout(function() {
125293
+ * // do some async task
125294
+ * callback(null, 1);
125295
+ * }, 200);
125296
+ * },
125297
+ * two: function(callback) {
125298
+ * setTimeout(function() {
125299
+ * // then do another async task
125300
+ * callback(null, 2);
125301
+ * }, 100);
125302
+ * }
125303
+ * }).then(results => {
125304
+ * console.log(results);
125305
+ * // results is equal to: { one: 1, two: 2 }
125306
+ * }).catch(err => {
125307
+ * console.log(err);
125308
+ * });
125309
+ *
125310
+ * //Using async/await
125311
+ * async () => {
125312
+ * try {
125313
+ * let results = await async.series([
125314
+ * function(callback) {
125315
+ * setTimeout(function() {
125316
+ * // do some async task
125317
+ * callback(null, 'one');
125318
+ * }, 200);
125319
+ * },
125320
+ * function(callback) {
125321
+ * setTimeout(function() {
125322
+ * // then do another async task
125323
+ * callback(null, 'two');
125324
+ * }, 100);
125325
+ * }
125326
+ * ]);
125327
+ * console.log(results);
125328
+ * // results is equal to ['one','two']
125329
+ * }
125330
+ * catch (err) {
125331
+ * console.log(err);
125332
+ * }
125333
+ * }
125334
+ *
125335
+ * // an example using an object instead of an array
125336
+ * async () => {
125337
+ * try {
125338
+ * let results = await async.parallel({
125339
+ * one: function(callback) {
125340
+ * setTimeout(function() {
125341
+ * // do some async task
125342
+ * callback(null, 1);
125343
+ * }, 200);
125344
+ * },
125345
+ * two: function(callback) {
125346
+ * setTimeout(function() {
125347
+ * // then do another async task
125348
+ * callback(null, 2);
125349
+ * }, 100);
125350
+ * }
125351
+ * });
125352
+ * console.log(results);
125353
+ * // results is equal to: { one: 1, two: 2 }
125354
+ * }
125355
+ * catch (err) {
125356
+ * console.log(err);
125357
+ * }
125358
+ * }
125359
+ *
125143
125360
  */
125144
125361
  function series(tasks, callback) {
125145
125362
  return (0, _parallel3.default)(_eachOfSeries2.default, tasks, callback);
@@ -136000,7 +136217,7 @@ async function getBTPSystem(system, savedSapSystemServiceKey) {
136000
136217
  sapSystem.name = system.name || '';
136001
136218
  }
136002
136219
  else {
136003
- const newBTPSapSystem = __1.newSapSystemForSteampunk(system.name || '', system.credentials);
136220
+ const newBTPSapSystem = __1.newSapSystemForSteampunk(system.name || '', system.credentials, true);
136004
136221
  // check if 'new' system already exists in store
136005
136222
  sapSystem = await __1.getSapSystem(newBTPSapSystem.url, newBTPSapSystem.client);
136006
136223
  if (!sapSystem) {
@@ -136019,12 +136236,25 @@ async function isSystemNameValid(newName, savedSystemName) {
136019
136236
  }
136020
136237
  exports.isSystemNameValid = isSystemNameValid;
136021
136238
  async function isSapSystemConnected(sapSystem) {
136022
- const catalogV2 = await sapSystem.getCatalog(__1.ODataVersion.v2);
136023
- const catalogV4 = await sapSystem.getCatalog(__1.ODataVersion.v4);
136024
- if (catalogV2 || catalogV4) {
136025
- return true;
136239
+ const versions = [__1.ODataVersion.v2, __1.ODataVersion.v4];
136240
+ const result = {};
136241
+ let error;
136242
+ for (const version of versions) {
136243
+ try {
136244
+ const catalog = await sapSystem.getCatalog(version);
136245
+ const services = await catalog.listServices();
136246
+ result[version] = services.length !== 0;
136247
+ }
136248
+ catch (e) {
136249
+ result[version] = false;
136250
+ error = e.message;
136251
+ }
136026
136252
  }
136027
- return false;
136253
+ return {
136254
+ v2: result[__1.ODataVersion.v2],
136255
+ v4: result[__1.ODataVersion.v4],
136256
+ error: error
136257
+ };
136028
136258
  }
136029
136259
  exports.isSapSystemConnected = isSapSystemConnected;
136030
136260
 
@@ -138069,6 +138299,13 @@ function getI18nPath(manifestFolder, manifest) {
138069
138299
  typeof i18nModel.settings.bundleUrl === 'string') {
138070
138300
  relativePath = i18nModel.settings.bundleUrl;
138071
138301
  }
138302
+ else if ('settings' in i18nModel &&
138303
+ typeof i18nModel.settings === 'object' &&
138304
+ 'bundleName' in i18nModel.settings &&
138305
+ typeof i18nModel.settings.bundleName === 'string') {
138306
+ const relBundleString = i18nModel.settings.bundleName.replace(manifest['sap.app'].id, '');
138307
+ relativePath = `${path_1.join(...relBundleString.split('.'))}.properties`;
138308
+ }
138072
138309
  else if (typeof ((_c = manifest === null || manifest === void 0 ? void 0 : manifest['sap.app']) === null || _c === void 0 ? void 0 : _c.i18n) === 'string') {
138073
138310
  relativePath = manifest['sap.app'].i18n;
138074
138311
  }
@@ -141807,6 +142044,7 @@ var EventName;
141807
142044
  (function (EventName) {
141808
142045
  EventName["Test"] = "test";
141809
142046
  EventName["TELEMETRY_SETTINGS_INIT_FAILED"] = "TELEMETRY_SETTINGS_INIT_FAILED";
142047
+ EventName["DISABLE_TELEMETRY"] = "DISABLE_TELEMETRY";
141810
142048
  EventName["GUIDE_ACTION"] = "GUIDE_ACTION";
141811
142049
  EventName["PANEL_LOAD"] = "PANEL_LOAD";
141812
142050
  // Unique to Application Modeler
@@ -142218,7 +142456,7 @@ const fs_1 = __importDefault(__webpack_require__(57147));
142218
142456
  const system_1 = __webpack_require__(36891);
142219
142457
  const cloudDebugger_1 = __webpack_require__(95974);
142220
142458
  const ux_common_utils_1 = __webpack_require__(59859);
142221
- const errorReporting_1 = __webpack_require__(65279);
142459
+ const reporting_1 = __webpack_require__(20885);
142222
142460
  class TelemetrySystem {
142223
142461
  static init() {
142224
142462
  cloudDebugger_1.debug(`start System.init`);
@@ -142340,14 +142578,14 @@ TelemetrySystem.fallbackModules = [
142340
142578
  },
142341
142579
  {
142342
142580
  workStream: 'core',
142343
- patterns: ['generators', 'project-generator', 'deployment-generator', 'ux-ui5-tooling']
142581
+ patterns: ['generators', 'project-generator', 'deployment-generator', 'ux-ui5-tooling', 'generator-common']
142344
142582
  }
142345
142583
  ];
142346
142584
  try {
142347
142585
  TelemetrySystem.init();
142348
142586
  }
142349
142587
  catch (err) {
142350
- errorReporting_1.reportRuntimeError(err);
142588
+ reporting_1.reportRuntimeError(err);
142351
142589
  }
142352
142590
 
142353
142591
 
@@ -142669,7 +142907,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
142669
142907
  return (mod && mod.__esModule) ? mod : { "default": mod };
142670
142908
  };
142671
142909
  Object.defineProperty(exports, "__esModule", ({ value: true }));
142672
- const errorReporting_1 = __webpack_require__(65279);
142910
+ const reporting_1 = __webpack_require__(20885);
142673
142911
  const cloudDebugger_1 = __webpack_require__(95974);
142674
142912
  const system_1 = __webpack_require__(73883);
142675
142913
  const store_1 = __webpack_require__(18489);
@@ -142712,6 +142950,9 @@ exports.setEnableTelemetry = async (enableTelemetry) => {
142712
142950
  const setting = new store_1.TelemetrySetting({ enableTelemetry });
142713
142951
  await storeService.write(setting);
142714
142952
  system_1.TelemetrySystem.telemetryEnabled = enableTelemetry;
142953
+ if (!enableTelemetry) {
142954
+ reporting_1.reportTelemetryTurnOff();
142955
+ }
142715
142956
  };
142716
142957
  exports.getTelemetrySetting = async () => {
142717
142958
  let setting;
@@ -142799,7 +143040,7 @@ exports.initTelemetrySettings = async (options) => {
142799
143040
  }
142800
143041
  }
142801
143042
  catch (err) {
142802
- errorReporting_1.reportRuntimeError(err);
143043
+ reporting_1.reportRuntimeError(err);
142803
143044
  }
142804
143045
  };
142805
143046
 
@@ -142876,78 +143117,6 @@ exports.localDatetimeToUTC = () => {
142876
143117
  };
142877
143118
 
142878
143119
 
142879
- /***/ }),
142880
-
142881
- /***/ 65279:
142882
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
142883
-
142884
- "use strict";
142885
-
142886
- var __importStar = (this && this.__importStar) || function (mod) {
142887
- if (mod && mod.__esModule) return mod;
142888
- var result = {};
142889
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
142890
- result["default"] = mod;
142891
- return result;
142892
- };
142893
- Object.defineProperty(exports, "__esModule", ({ value: true }));
142894
- const EventName_1 = __webpack_require__(70181);
142895
- const appInsights = __importStar(__webpack_require__(14585));
142896
- const telemetryPackageJSON = __importStar(__webpack_require__(18622));
142897
- const telemetryClientConfig_1 = __webpack_require__(50712);
142898
- const parseErrorStack = (errorStack) => {
142899
- const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
142900
- const parsedStack = [];
142901
- const filtered = errorStack.split('\n').filter((line) => !!line.match(/^\s*at .*(\S+:\d+|\(native\))/m));
142902
- if (!filtered.length) {
142903
- return parsedStack;
142904
- }
142905
- filtered.forEach((line) => {
142906
- let sanitizedLine = line.replace(/^\s+/, '');
142907
- const location = line.match(/ (\((.+):(\d+):(\d+)\)$)/);
142908
- if (!location) {
142909
- return;
142910
- }
142911
- let filepath = null;
142912
- const normalizedFilepath = location[2].replace(/\\/g, '/');
142913
- for (const regexp of regexps) {
142914
- const match = normalizedFilepath.match(regexp);
142915
- if (match) {
142916
- filepath = match[0];
142917
- break;
142918
- }
142919
- }
142920
- if (!filepath) {
142921
- return;
142922
- }
142923
- sanitizedLine = sanitizedLine.replace(location[0], '');
142924
- const functionName = sanitizedLine.split(/\s+/).slice(1).join('');
142925
- const lineNumber = location[3];
142926
- const columnNumber = location[4];
142927
- const parsedStackLine = `${functionName} at (${filepath}:${lineNumber}:${columnNumber});`;
142928
- parsedStack.push(parsedStackLine);
142929
- });
142930
- return parsedStack;
142931
- };
142932
- const errorReportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
142933
- telemetryClientConfig_1.configAzureTelemetryClient(errorReportingTelemetryClient);
142934
- exports.reportRuntimeError = (error) => {
142935
- const properties = { message: error.message };
142936
- if (error.stack) {
142937
- const parsedStack = parseErrorStack(error.stack);
142938
- if (parsedStack.length) {
142939
- properties.stack = parsedStack.join(' \n');
142940
- }
142941
- }
142942
- const telemetryEvent = {
142943
- name: EventName_1.EventName.TELEMETRY_SETTINGS_INIT_FAILED,
142944
- properties,
142945
- measurements: {}
142946
- };
142947
- errorReportingTelemetryClient.trackEvent(telemetryEvent);
142948
- };
142949
-
142950
-
142951
143120
  /***/ }),
142952
143121
 
142953
143122
  /***/ 21677:
@@ -143051,6 +143220,86 @@ instructions) => {
143051
143220
  };
143052
143221
 
143053
143222
 
143223
+ /***/ }),
143224
+
143225
+ /***/ 20885:
143226
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
143227
+
143228
+ "use strict";
143229
+
143230
+ var __importStar = (this && this.__importStar) || function (mod) {
143231
+ if (mod && mod.__esModule) return mod;
143232
+ var result = {};
143233
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
143234
+ result["default"] = mod;
143235
+ return result;
143236
+ };
143237
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
143238
+ const EventName_1 = __webpack_require__(70181);
143239
+ const appInsights = __importStar(__webpack_require__(14585));
143240
+ const telemetryPackageJSON = __importStar(__webpack_require__(18622));
143241
+ const telemetryClientConfig_1 = __webpack_require__(50712);
143242
+ const parseErrorStack = (errorStack) => {
143243
+ const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
143244
+ const parsedStack = [];
143245
+ const filtered = errorStack.split('\n').filter((line) => !!line.match(/^\s*at .*(\S+:\d+|\(native\))/m));
143246
+ if (!filtered.length) {
143247
+ return parsedStack;
143248
+ }
143249
+ filtered.forEach((line) => {
143250
+ let sanitizedLine = line.replace(/^\s+/, '');
143251
+ const location = line.match(/ (\((.+):(\d+):(\d+)\)$)/);
143252
+ if (!location) {
143253
+ return;
143254
+ }
143255
+ let filepath = null;
143256
+ const normalizedFilepath = location[2].replace(/\\/g, '/');
143257
+ for (const regexp of regexps) {
143258
+ const match = normalizedFilepath.match(regexp);
143259
+ if (match) {
143260
+ filepath = match[0];
143261
+ break;
143262
+ }
143263
+ }
143264
+ if (!filepath) {
143265
+ return;
143266
+ }
143267
+ sanitizedLine = sanitizedLine.replace(location[0], '');
143268
+ const functionName = sanitizedLine.split(/\s+/).slice(1).join('');
143269
+ const lineNumber = location[3];
143270
+ const columnNumber = location[4];
143271
+ const parsedStackLine = `${functionName} at (${filepath}:${lineNumber}:${columnNumber});`;
143272
+ parsedStack.push(parsedStackLine);
143273
+ });
143274
+ return parsedStack;
143275
+ };
143276
+ const reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
143277
+ telemetryClientConfig_1.configAzureTelemetryClient(reportingTelemetryClient);
143278
+ exports.reportRuntimeError = (error) => {
143279
+ const properties = { message: error.message };
143280
+ if (error.stack) {
143281
+ const parsedStack = parseErrorStack(error.stack);
143282
+ if (parsedStack.length) {
143283
+ properties.stack = parsedStack.join(' \n');
143284
+ }
143285
+ }
143286
+ const telemetryEvent = {
143287
+ name: EventName_1.EventName.TELEMETRY_SETTINGS_INIT_FAILED,
143288
+ properties,
143289
+ measurements: {}
143290
+ };
143291
+ reportingTelemetryClient.trackEvent(telemetryEvent);
143292
+ };
143293
+ exports.reportTelemetryTurnOff = () => {
143294
+ const telemetryEvent = {
143295
+ name: EventName_1.EventName.DISABLE_TELEMETRY,
143296
+ properties: {},
143297
+ measurements: {}
143298
+ };
143299
+ reportingTelemetryClient.trackEvent(telemetryEvent);
143300
+ };
143301
+
143302
+
143054
143303
  /***/ }),
143055
143304
 
143056
143305
  /***/ 36891:
@@ -143196,7 +143445,7 @@ const https_1 = __importDefault(__webpack_require__(95687));
143196
143445
  exports.MIN_UI5_VERSION_V4_TEMPLATE = '1.84.0';
143197
143446
  exports.MIN_UI5_VERSION = '1.65.0';
143198
143447
  exports.MIN_UI5_VERSION_ALP_V4_TEMPLATE = '1.90.0';
143199
- exports.MIN_UI5_VERSION_FORM_ENTRY_TEMPLATE = '1.86.0';
143448
+ exports.MIN_UI5_VERSION_FORM_ENTRY_TEMPLATE = '1.90.0';
143200
143449
  const MIN_UI5_VERSION_V2_TEMPLATE = '1.76.0';
143201
143450
  const MIN_UI5_DARK_THEME = '1.72.0';
143202
143451
  const SPECIFIC_UI5_HORIZON_THEME = '1.93.3';
@@ -168085,7 +168334,7 @@ module.exports = JSON.parse('{"ERROR_SPECIFICATION_MISSING":"Seems specification
168085
168334
  /***/ ((module) => {
168086
168335
 
168087
168336
  "use strict";
168088
- module.exports = JSON.parse('{"name":"@sap/ux-telemetry","version":"1.5.3","description":"SAP Fiori tools telemetry library","main":"dist/src/index.js","author":"SAP SE","license":"MIT","private":true,"azureInstrumentationKey":"0a65e45d-6bf4-421d-b845-61e888c50e9e","azureProdKey":"0a65e45d-6bf4-421d-b845-61e888c50e9e","scripts":{"pre-commit":"lint-staged --quiet","clean":"rimraf ./dist","build":"ts-node ./build-script/ && yarn run clean && tsc --project ./","test":"jest --maxWorkers=1 --silent --ci --forceExit --detectOpenHandles","lint":"eslint . --ext .ts","lint:summary":"eslint . --ext .ts -f summary","lint:fix":"eslint --fix","lint:fix:all":"eslint . --ext .ts --fix","lint:report":"eslint . --ext .ts -f multiple ","format:fix":"prettier --write --loglevel silent --ignore-path ../../../.prettierignore","format:fix:all":"prettier --write \'**/*.{css,scss,html,js,json,ts,tsx,yaml,yml}\' \'!**/{out,dist,node_modules}/**\' \'!**/*.{svg,png,xml}\' --ignore-path ../../../.prettierignore","madge":"madge --warning --circular --extensions ts ./"},"dependencies":{"@sap-ux/store":"0.1.0","@sap/ux-cds":"1.5.3","@sap/ux-common-utils":"1.5.3","@sap/ux-feature-toggle":"1.5.3","@sap/ux-project-access":"1.5.3","applicationinsights":"1.4.1","performance-now":"2.1.0","yaml":"2.0.0-10"},"devDependencies":{"ts-node":"8.5.2","typescript":"3.8.3"},"files":["dist/"],"jestSonar":{"reportPath":"reports/test/unit","reportFile":"test-report.xml"},"eslint-formatter-multiple":{"formatters":[{"name":"stylish","output":"console"},{"name":"json","output":"file","path":"reports/lint/eslint.json"},{"name":"checkstyle","output":"file","path":"reports/lint/eslint.checkstyle.xml"}]}}');
168337
+ module.exports = JSON.parse('{"name":"@sap/ux-telemetry","version":"1.5.4","description":"SAP Fiori tools telemetry library","main":"dist/src/index.js","author":"SAP SE","license":"MIT","private":true,"azureInstrumentationKey":"0a65e45d-6bf4-421d-b845-61e888c50e9e","azureProdKey":"0a65e45d-6bf4-421d-b845-61e888c50e9e","scripts":{"pre-commit":"lint-staged --quiet","clean":"rimraf ./dist","build":"ts-node ./build-script/ && yarn run clean && tsc --project ./","test":"jest --maxWorkers=1 --silent --ci --forceExit --detectOpenHandles","lint":"eslint . --ext .ts","lint:summary":"eslint . --ext .ts -f summary","lint:fix":"eslint --fix","lint:fix:all":"eslint . --ext .ts --fix","lint:report":"eslint . --ext .ts -f multiple ","format:fix":"prettier --write --loglevel silent --ignore-path ../../../.prettierignore","format:fix:all":"prettier --write \'**/*.{css,scss,html,js,json,ts,tsx,yaml,yml}\' \'!**/{out,dist,node_modules}/**\' \'!**/*.{svg,png,xml}\' --ignore-path ../../../.prettierignore","madge":"madge --warning --circular --extensions ts ./"},"dependencies":{"@sap-ux/store":"0.1.0","@sap/ux-cds":"1.5.4","@sap/ux-common-utils":"1.5.4","@sap/ux-feature-toggle":"1.5.4","@sap/ux-project-access":"1.5.4","applicationinsights":"1.4.1","performance-now":"2.1.0","yaml":"2.0.0-10"},"devDependencies":{"ts-node":"8.5.2","typescript":"3.8.3"},"files":["dist/"],"jestSonar":{"reportPath":"reports/test/unit","reportFile":"test-report.xml"},"eslint-formatter-multiple":{"formatters":[{"name":"stylish","output":"console"},{"name":"json","output":"file","path":"reports/lint/eslint.json"},{"name":"checkstyle","output":"file","path":"reports/lint/eslint.checkstyle.xml"}]}}');
168089
168338
 
168090
168339
  /***/ }),
168091
168340