@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.
- package/CHANGELOG.md +4 -0
- package/dist/cli/index.js +94459 -88963
- package/dist/middlewares/fiori-tools-appreload.js +36962 -36518
- package/dist/middlewares/fiori-tools-preview.js +379 -130
- package/dist/middlewares/fiori-tools-proxy.js +379 -130
- package/dist/tasks/cf-deploy/index.js +379 -130
- package/dist/tasks/deploy/index.js +380 -131
- package/dist/templates/control-property-editor/app.js +1 -1
- package/package.json +12 -11
|
@@ -123178,12 +123178,19 @@ function eachOfGeneric(coll, iteratee, callback) {
|
|
|
123178
123178
|
* @returns {Promise} a promise, if a callback is omitted
|
|
123179
123179
|
* @example
|
|
123180
123180
|
*
|
|
123181
|
-
*
|
|
123182
|
-
*
|
|
123183
|
-
*
|
|
123184
|
-
*
|
|
123185
|
-
*
|
|
123186
|
-
*
|
|
123181
|
+
* // dev.json is a file containing a valid json object config for dev environment
|
|
123182
|
+
* // dev.json is a file containing a valid json object config for test environment
|
|
123183
|
+
* // prod.json is a file containing a valid json object config for prod environment
|
|
123184
|
+
* // invalid.json is a file with a malformed json object
|
|
123185
|
+
*
|
|
123186
|
+
* let configs = {}; //global variable
|
|
123187
|
+
* let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
|
|
123188
|
+
* let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
|
|
123189
|
+
*
|
|
123190
|
+
* // asynchronous function that reads a json file and parses the contents as json object
|
|
123191
|
+
* function parseFile(file, key, callback) {
|
|
123192
|
+
* fs.readFile(file, "utf8", function(err, data) {
|
|
123193
|
+
* if (err) return calback(err);
|
|
123187
123194
|
* try {
|
|
123188
123195
|
* configs[key] = JSON.parse(data);
|
|
123189
123196
|
* } catch (e) {
|
|
@@ -123191,11 +123198,73 @@ function eachOfGeneric(coll, iteratee, callback) {
|
|
|
123191
123198
|
* }
|
|
123192
123199
|
* callback();
|
|
123193
123200
|
* });
|
|
123194
|
-
* }
|
|
123195
|
-
*
|
|
123196
|
-
*
|
|
123197
|
-
*
|
|
123201
|
+
* }
|
|
123202
|
+
*
|
|
123203
|
+
* // Using callbacks
|
|
123204
|
+
* async.forEachOf(validConfigFileMap, parseFile, function (err) {
|
|
123205
|
+
* if (err) {
|
|
123206
|
+
* console.error(err);
|
|
123207
|
+
* } else {
|
|
123208
|
+
* console.log(configs);
|
|
123209
|
+
* // configs is now a map of JSON data, e.g.
|
|
123210
|
+
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
|
|
123211
|
+
* }
|
|
123198
123212
|
* });
|
|
123213
|
+
*
|
|
123214
|
+
* //Error handing
|
|
123215
|
+
* async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
|
|
123216
|
+
* if (err) {
|
|
123217
|
+
* console.error(err);
|
|
123218
|
+
* // JSON parse error exception
|
|
123219
|
+
* } else {
|
|
123220
|
+
* console.log(configs);
|
|
123221
|
+
* }
|
|
123222
|
+
* });
|
|
123223
|
+
*
|
|
123224
|
+
* // Using Promises
|
|
123225
|
+
* async.forEachOf(validConfigFileMap, parseFile)
|
|
123226
|
+
* .then( () => {
|
|
123227
|
+
* console.log(configs);
|
|
123228
|
+
* // configs is now a map of JSON data, e.g.
|
|
123229
|
+
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
|
|
123230
|
+
* }).catch( err => {
|
|
123231
|
+
* console.error(err);
|
|
123232
|
+
* });
|
|
123233
|
+
*
|
|
123234
|
+
* //Error handing
|
|
123235
|
+
* async.forEachOf(invalidConfigFileMap, parseFile)
|
|
123236
|
+
* .then( () => {
|
|
123237
|
+
* console.log(configs);
|
|
123238
|
+
* }).catch( err => {
|
|
123239
|
+
* console.error(err);
|
|
123240
|
+
* // JSON parse error exception
|
|
123241
|
+
* });
|
|
123242
|
+
*
|
|
123243
|
+
* // Using async/await
|
|
123244
|
+
* async () => {
|
|
123245
|
+
* try {
|
|
123246
|
+
* let result = await async.forEachOf(validConfigFileMap, parseFile);
|
|
123247
|
+
* console.log(configs);
|
|
123248
|
+
* // configs is now a map of JSON data, e.g.
|
|
123249
|
+
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
|
|
123250
|
+
* }
|
|
123251
|
+
* catch (err) {
|
|
123252
|
+
* console.log(err);
|
|
123253
|
+
* }
|
|
123254
|
+
* }
|
|
123255
|
+
*
|
|
123256
|
+
* //Error handing
|
|
123257
|
+
* async () => {
|
|
123258
|
+
* try {
|
|
123259
|
+
* let result = await async.forEachOf(invalidConfigFileMap, parseFile);
|
|
123260
|
+
* console.log(configs);
|
|
123261
|
+
* }
|
|
123262
|
+
* catch (err) {
|
|
123263
|
+
* console.log(err);
|
|
123264
|
+
* // JSON parse error exception
|
|
123265
|
+
* }
|
|
123266
|
+
* }
|
|
123267
|
+
*
|
|
123199
123268
|
*/
|
|
123200
123269
|
function eachOf(coll, iteratee, callback) {
|
|
123201
123270
|
var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;
|
|
@@ -123361,37 +123430,78 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
123361
123430
|
* @returns {Promise} a promise, if a callback is omitted
|
|
123362
123431
|
* @example
|
|
123363
123432
|
*
|
|
123364
|
-
* //
|
|
123365
|
-
* //
|
|
123433
|
+
* // dir1 is a directory that contains file1.txt, file2.txt
|
|
123434
|
+
* // dir2 is a directory that contains file3.txt, file4.txt
|
|
123435
|
+
* // dir3 is a directory that contains file5.txt
|
|
123436
|
+
* // dir4 does not exist
|
|
123366
123437
|
*
|
|
123367
|
-
*
|
|
123368
|
-
*
|
|
123369
|
-
* });
|
|
123438
|
+
* const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];
|
|
123439
|
+
* const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];
|
|
123370
123440
|
*
|
|
123371
|
-
* //
|
|
123372
|
-
*
|
|
123441
|
+
* // asynchronous function that deletes a file
|
|
123442
|
+
* const deleteFile = function(file, callback) {
|
|
123443
|
+
* fs.unlink(file, callback);
|
|
123444
|
+
* };
|
|
123373
123445
|
*
|
|
123374
|
-
*
|
|
123375
|
-
*
|
|
123376
|
-
*
|
|
123377
|
-
* if( file.length > 32 ) {
|
|
123378
|
-
* console.log('This file name is too long');
|
|
123379
|
-
* callback('File name too long');
|
|
123380
|
-
* } else {
|
|
123381
|
-
* // Do work to process file here
|
|
123382
|
-
* console.log('File processed');
|
|
123383
|
-
* callback();
|
|
123384
|
-
* }
|
|
123385
|
-
* }, function(err) {
|
|
123386
|
-
* // if any of the file processing produced an error, err would equal that error
|
|
123446
|
+
* // Using callbacks
|
|
123447
|
+
* async.each(fileList, deleteFile, function(err) {
|
|
123387
123448
|
* if( err ) {
|
|
123388
|
-
*
|
|
123389
|
-
* // All processing will now stop.
|
|
123390
|
-
* console.log('A file failed to process');
|
|
123449
|
+
* console.log(err);
|
|
123391
123450
|
* } else {
|
|
123392
|
-
*
|
|
123451
|
+
* console.log('All files have been deleted successfully');
|
|
123393
123452
|
* }
|
|
123394
123453
|
* });
|
|
123454
|
+
*
|
|
123455
|
+
* // Error Handling
|
|
123456
|
+
* async.each(withMissingFileList, deleteFile, function(err){
|
|
123457
|
+
* console.log(err);
|
|
123458
|
+
* // [ Error: ENOENT: no such file or directory ]
|
|
123459
|
+
* // since dir4/file2.txt does not exist
|
|
123460
|
+
* // dir1/file1.txt could have been deleted
|
|
123461
|
+
* });
|
|
123462
|
+
*
|
|
123463
|
+
* // Using Promises
|
|
123464
|
+
* async.each(fileList, deleteFile)
|
|
123465
|
+
* .then( () => {
|
|
123466
|
+
* console.log('All files have been deleted successfully');
|
|
123467
|
+
* }).catch( err => {
|
|
123468
|
+
* console.log(err);
|
|
123469
|
+
* });
|
|
123470
|
+
*
|
|
123471
|
+
* // Error Handling
|
|
123472
|
+
* async.each(fileList, deleteFile)
|
|
123473
|
+
* .then( () => {
|
|
123474
|
+
* console.log('All files have been deleted successfully');
|
|
123475
|
+
* }).catch( err => {
|
|
123476
|
+
* console.log(err);
|
|
123477
|
+
* // [ Error: ENOENT: no such file or directory ]
|
|
123478
|
+
* // since dir4/file2.txt does not exist
|
|
123479
|
+
* // dir1/file1.txt could have been deleted
|
|
123480
|
+
* });
|
|
123481
|
+
*
|
|
123482
|
+
* // Using async/await
|
|
123483
|
+
* async () => {
|
|
123484
|
+
* try {
|
|
123485
|
+
* await async.each(files, deleteFile);
|
|
123486
|
+
* }
|
|
123487
|
+
* catch (err) {
|
|
123488
|
+
* console.log(err);
|
|
123489
|
+
* }
|
|
123490
|
+
* }
|
|
123491
|
+
*
|
|
123492
|
+
* // Error Handling
|
|
123493
|
+
* async () => {
|
|
123494
|
+
* try {
|
|
123495
|
+
* await async.each(withMissingFileList, deleteFile);
|
|
123496
|
+
* }
|
|
123497
|
+
* catch (err) {
|
|
123498
|
+
* console.log(err);
|
|
123499
|
+
* // [ Error: ENOENT: no such file or directory ]
|
|
123500
|
+
* // since dir4/file2.txt does not exist
|
|
123501
|
+
* // dir1/file1.txt could have been deleted
|
|
123502
|
+
* }
|
|
123503
|
+
* }
|
|
123504
|
+
*
|
|
123395
123505
|
*/
|
|
123396
123506
|
function eachLimit(coll, iteratee, callback) {
|
|
123397
123507
|
return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);
|
|
@@ -123733,6 +123843,9 @@ function createObjectIterator(obj) {
|
|
|
123733
123843
|
var len = okeys.length;
|
|
123734
123844
|
return function next() {
|
|
123735
123845
|
var key = okeys[++i];
|
|
123846
|
+
if (key === '__proto__') {
|
|
123847
|
+
return next();
|
|
123848
|
+
}
|
|
123736
123849
|
return i < len ? { value: obj[key], key } : null;
|
|
123737
123850
|
};
|
|
123738
123851
|
}
|
|
@@ -123841,13 +123954,15 @@ module.exports = exports['default'];
|
|
|
123841
123954
|
|
|
123842
123955
|
"use strict";
|
|
123843
123956
|
|
|
123844
|
-
/* istanbul ignore file */
|
|
123845
123957
|
|
|
123846
123958
|
Object.defineProperty(exports, "__esModule", ({
|
|
123847
123959
|
value: true
|
|
123848
123960
|
}));
|
|
123849
123961
|
exports.fallback = fallback;
|
|
123850
123962
|
exports.wrap = wrap;
|
|
123963
|
+
/* istanbul ignore file */
|
|
123964
|
+
|
|
123965
|
+
var hasQueueMicrotask = exports.hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;
|
|
123851
123966
|
var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
|
|
123852
123967
|
var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
|
|
123853
123968
|
|
|
@@ -123861,7 +123976,9 @@ function wrap(defer) {
|
|
|
123861
123976
|
|
|
123862
123977
|
var _defer;
|
|
123863
123978
|
|
|
123864
|
-
if (
|
|
123979
|
+
if (hasQueueMicrotask) {
|
|
123980
|
+
_defer = queueMicrotask;
|
|
123981
|
+
} else if (hasSetImmediate) {
|
|
123865
123982
|
_defer = setImmediate;
|
|
123866
123983
|
} else if (hasNextTick) {
|
|
123867
123984
|
_defer = process.nextTick;
|
|
@@ -123987,35 +124104,135 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
123987
124104
|
* with (err, result).
|
|
123988
124105
|
* @return {Promise} a promise, if no callback is passed
|
|
123989
124106
|
* @example
|
|
124107
|
+
*
|
|
124108
|
+
* //Using Callbacks
|
|
123990
124109
|
* async.series([
|
|
123991
124110
|
* function(callback) {
|
|
123992
|
-
*
|
|
123993
|
-
*
|
|
124111
|
+
* setTimeout(function() {
|
|
124112
|
+
* // do some async task
|
|
124113
|
+
* callback(null, 'one');
|
|
124114
|
+
* }, 200);
|
|
123994
124115
|
* },
|
|
123995
124116
|
* function(callback) {
|
|
123996
|
-
*
|
|
123997
|
-
*
|
|
124117
|
+
* setTimeout(function() {
|
|
124118
|
+
* // then do another async task
|
|
124119
|
+
* callback(null, 'two');
|
|
124120
|
+
* }, 100);
|
|
123998
124121
|
* }
|
|
123999
|
-
* ],
|
|
124000
|
-
*
|
|
124001
|
-
*
|
|
124002
|
-
* // results is now equal to ['one', 'two']
|
|
124122
|
+
* ], function(err, results) {
|
|
124123
|
+
* console.log(results);
|
|
124124
|
+
* // results is equal to ['one','two']
|
|
124003
124125
|
* });
|
|
124004
124126
|
*
|
|
124127
|
+
* // an example using objects instead of arrays
|
|
124005
124128
|
* async.series({
|
|
124006
124129
|
* one: function(callback) {
|
|
124007
124130
|
* setTimeout(function() {
|
|
124131
|
+
* // do some async task
|
|
124008
124132
|
* callback(null, 1);
|
|
124009
124133
|
* }, 200);
|
|
124010
124134
|
* },
|
|
124011
|
-
* two: function(callback){
|
|
124135
|
+
* two: function(callback) {
|
|
124012
124136
|
* setTimeout(function() {
|
|
124137
|
+
* // then do another async task
|
|
124013
124138
|
* callback(null, 2);
|
|
124014
124139
|
* }, 100);
|
|
124015
124140
|
* }
|
|
124016
124141
|
* }, function(err, results) {
|
|
124017
|
-
*
|
|
124142
|
+
* console.log(results);
|
|
124143
|
+
* // results is equal to: { one: 1, two: 2 }
|
|
124144
|
+
* });
|
|
124145
|
+
*
|
|
124146
|
+
* //Using Promises
|
|
124147
|
+
* async.series([
|
|
124148
|
+
* function(callback) {
|
|
124149
|
+
* setTimeout(function() {
|
|
124150
|
+
* callback(null, 'one');
|
|
124151
|
+
* }, 200);
|
|
124152
|
+
* },
|
|
124153
|
+
* function(callback) {
|
|
124154
|
+
* setTimeout(function() {
|
|
124155
|
+
* callback(null, 'two');
|
|
124156
|
+
* }, 100);
|
|
124157
|
+
* }
|
|
124158
|
+
* ]).then(results => {
|
|
124159
|
+
* console.log(results);
|
|
124160
|
+
* // results is equal to ['one','two']
|
|
124161
|
+
* }).catch(err => {
|
|
124162
|
+
* console.log(err);
|
|
124018
124163
|
* });
|
|
124164
|
+
*
|
|
124165
|
+
* // an example using an object instead of an array
|
|
124166
|
+
* async.series({
|
|
124167
|
+
* one: function(callback) {
|
|
124168
|
+
* setTimeout(function() {
|
|
124169
|
+
* // do some async task
|
|
124170
|
+
* callback(null, 1);
|
|
124171
|
+
* }, 200);
|
|
124172
|
+
* },
|
|
124173
|
+
* two: function(callback) {
|
|
124174
|
+
* setTimeout(function() {
|
|
124175
|
+
* // then do another async task
|
|
124176
|
+
* callback(null, 2);
|
|
124177
|
+
* }, 100);
|
|
124178
|
+
* }
|
|
124179
|
+
* }).then(results => {
|
|
124180
|
+
* console.log(results);
|
|
124181
|
+
* // results is equal to: { one: 1, two: 2 }
|
|
124182
|
+
* }).catch(err => {
|
|
124183
|
+
* console.log(err);
|
|
124184
|
+
* });
|
|
124185
|
+
*
|
|
124186
|
+
* //Using async/await
|
|
124187
|
+
* async () => {
|
|
124188
|
+
* try {
|
|
124189
|
+
* let results = await async.series([
|
|
124190
|
+
* function(callback) {
|
|
124191
|
+
* setTimeout(function() {
|
|
124192
|
+
* // do some async task
|
|
124193
|
+
* callback(null, 'one');
|
|
124194
|
+
* }, 200);
|
|
124195
|
+
* },
|
|
124196
|
+
* function(callback) {
|
|
124197
|
+
* setTimeout(function() {
|
|
124198
|
+
* // then do another async task
|
|
124199
|
+
* callback(null, 'two');
|
|
124200
|
+
* }, 100);
|
|
124201
|
+
* }
|
|
124202
|
+
* ]);
|
|
124203
|
+
* console.log(results);
|
|
124204
|
+
* // results is equal to ['one','two']
|
|
124205
|
+
* }
|
|
124206
|
+
* catch (err) {
|
|
124207
|
+
* console.log(err);
|
|
124208
|
+
* }
|
|
124209
|
+
* }
|
|
124210
|
+
*
|
|
124211
|
+
* // an example using an object instead of an array
|
|
124212
|
+
* async () => {
|
|
124213
|
+
* try {
|
|
124214
|
+
* let results = await async.parallel({
|
|
124215
|
+
* one: function(callback) {
|
|
124216
|
+
* setTimeout(function() {
|
|
124217
|
+
* // do some async task
|
|
124218
|
+
* callback(null, 1);
|
|
124219
|
+
* }, 200);
|
|
124220
|
+
* },
|
|
124221
|
+
* two: function(callback) {
|
|
124222
|
+
* setTimeout(function() {
|
|
124223
|
+
* // then do another async task
|
|
124224
|
+
* callback(null, 2);
|
|
124225
|
+
* }, 100);
|
|
124226
|
+
* }
|
|
124227
|
+
* });
|
|
124228
|
+
* console.log(results);
|
|
124229
|
+
* // results is equal to: { one: 1, two: 2 }
|
|
124230
|
+
* }
|
|
124231
|
+
* catch (err) {
|
|
124232
|
+
* console.log(err);
|
|
124233
|
+
* }
|
|
124234
|
+
* }
|
|
124235
|
+
*
|
|
124019
124236
|
*/
|
|
124020
124237
|
function series(tasks, callback) {
|
|
124021
124238
|
return (0, _parallel3.default)(_eachOfSeries2.default, tasks, callback);
|
|
@@ -133670,7 +133887,7 @@ async function getBTPSystem(system, savedSapSystemServiceKey) {
|
|
|
133670
133887
|
sapSystem.name = system.name || '';
|
|
133671
133888
|
}
|
|
133672
133889
|
else {
|
|
133673
|
-
const newBTPSapSystem = __1.newSapSystemForSteampunk(system.name || '', system.credentials);
|
|
133890
|
+
const newBTPSapSystem = __1.newSapSystemForSteampunk(system.name || '', system.credentials, true);
|
|
133674
133891
|
// check if 'new' system already exists in store
|
|
133675
133892
|
sapSystem = await __1.getSapSystem(newBTPSapSystem.url, newBTPSapSystem.client);
|
|
133676
133893
|
if (!sapSystem) {
|
|
@@ -133689,12 +133906,25 @@ async function isSystemNameValid(newName, savedSystemName) {
|
|
|
133689
133906
|
}
|
|
133690
133907
|
exports.isSystemNameValid = isSystemNameValid;
|
|
133691
133908
|
async function isSapSystemConnected(sapSystem) {
|
|
133692
|
-
const
|
|
133693
|
-
const
|
|
133694
|
-
|
|
133695
|
-
|
|
133909
|
+
const versions = [__1.ODataVersion.v2, __1.ODataVersion.v4];
|
|
133910
|
+
const result = {};
|
|
133911
|
+
let error;
|
|
133912
|
+
for (const version of versions) {
|
|
133913
|
+
try {
|
|
133914
|
+
const catalog = await sapSystem.getCatalog(version);
|
|
133915
|
+
const services = await catalog.listServices();
|
|
133916
|
+
result[version] = services.length !== 0;
|
|
133917
|
+
}
|
|
133918
|
+
catch (e) {
|
|
133919
|
+
result[version] = false;
|
|
133920
|
+
error = e.message;
|
|
133921
|
+
}
|
|
133696
133922
|
}
|
|
133697
|
-
return
|
|
133923
|
+
return {
|
|
133924
|
+
v2: result[__1.ODataVersion.v2],
|
|
133925
|
+
v4: result[__1.ODataVersion.v4],
|
|
133926
|
+
error: error
|
|
133927
|
+
};
|
|
133698
133928
|
}
|
|
133699
133929
|
exports.isSapSystemConnected = isSapSystemConnected;
|
|
133700
133930
|
|
|
@@ -135739,6 +135969,13 @@ function getI18nPath(manifestFolder, manifest) {
|
|
|
135739
135969
|
typeof i18nModel.settings.bundleUrl === 'string') {
|
|
135740
135970
|
relativePath = i18nModel.settings.bundleUrl;
|
|
135741
135971
|
}
|
|
135972
|
+
else if ('settings' in i18nModel &&
|
|
135973
|
+
typeof i18nModel.settings === 'object' &&
|
|
135974
|
+
'bundleName' in i18nModel.settings &&
|
|
135975
|
+
typeof i18nModel.settings.bundleName === 'string') {
|
|
135976
|
+
const relBundleString = i18nModel.settings.bundleName.replace(manifest['sap.app'].id, '');
|
|
135977
|
+
relativePath = `${path_1.join(...relBundleString.split('.'))}.properties`;
|
|
135978
|
+
}
|
|
135742
135979
|
else if (typeof ((_c = manifest === null || manifest === void 0 ? void 0 : manifest['sap.app']) === null || _c === void 0 ? void 0 : _c.i18n) === 'string') {
|
|
135743
135980
|
relativePath = manifest['sap.app'].i18n;
|
|
135744
135981
|
}
|
|
@@ -139477,6 +139714,7 @@ var EventName;
|
|
|
139477
139714
|
(function (EventName) {
|
|
139478
139715
|
EventName["Test"] = "test";
|
|
139479
139716
|
EventName["TELEMETRY_SETTINGS_INIT_FAILED"] = "TELEMETRY_SETTINGS_INIT_FAILED";
|
|
139717
|
+
EventName["DISABLE_TELEMETRY"] = "DISABLE_TELEMETRY";
|
|
139480
139718
|
EventName["GUIDE_ACTION"] = "GUIDE_ACTION";
|
|
139481
139719
|
EventName["PANEL_LOAD"] = "PANEL_LOAD";
|
|
139482
139720
|
// Unique to Application Modeler
|
|
@@ -139888,7 +140126,7 @@ const fs_1 = __importDefault(__webpack_require__(57147));
|
|
|
139888
140126
|
const system_1 = __webpack_require__(36891);
|
|
139889
140127
|
const cloudDebugger_1 = __webpack_require__(95974);
|
|
139890
140128
|
const ux_common_utils_1 = __webpack_require__(59859);
|
|
139891
|
-
const
|
|
140129
|
+
const reporting_1 = __webpack_require__(20885);
|
|
139892
140130
|
class TelemetrySystem {
|
|
139893
140131
|
static init() {
|
|
139894
140132
|
cloudDebugger_1.debug(`start System.init`);
|
|
@@ -140010,14 +140248,14 @@ TelemetrySystem.fallbackModules = [
|
|
|
140010
140248
|
},
|
|
140011
140249
|
{
|
|
140012
140250
|
workStream: 'core',
|
|
140013
|
-
patterns: ['generators', 'project-generator', 'deployment-generator', 'ux-ui5-tooling']
|
|
140251
|
+
patterns: ['generators', 'project-generator', 'deployment-generator', 'ux-ui5-tooling', 'generator-common']
|
|
140014
140252
|
}
|
|
140015
140253
|
];
|
|
140016
140254
|
try {
|
|
140017
140255
|
TelemetrySystem.init();
|
|
140018
140256
|
}
|
|
140019
140257
|
catch (err) {
|
|
140020
|
-
|
|
140258
|
+
reporting_1.reportRuntimeError(err);
|
|
140021
140259
|
}
|
|
140022
140260
|
|
|
140023
140261
|
|
|
@@ -140339,7 +140577,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
140339
140577
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
140340
140578
|
};
|
|
140341
140579
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
140342
|
-
const
|
|
140580
|
+
const reporting_1 = __webpack_require__(20885);
|
|
140343
140581
|
const cloudDebugger_1 = __webpack_require__(95974);
|
|
140344
140582
|
const system_1 = __webpack_require__(73883);
|
|
140345
140583
|
const store_1 = __webpack_require__(18489);
|
|
@@ -140382,6 +140620,9 @@ exports.setEnableTelemetry = async (enableTelemetry) => {
|
|
|
140382
140620
|
const setting = new store_1.TelemetrySetting({ enableTelemetry });
|
|
140383
140621
|
await storeService.write(setting);
|
|
140384
140622
|
system_1.TelemetrySystem.telemetryEnabled = enableTelemetry;
|
|
140623
|
+
if (!enableTelemetry) {
|
|
140624
|
+
reporting_1.reportTelemetryTurnOff();
|
|
140625
|
+
}
|
|
140385
140626
|
};
|
|
140386
140627
|
exports.getTelemetrySetting = async () => {
|
|
140387
140628
|
let setting;
|
|
@@ -140469,7 +140710,7 @@ exports.initTelemetrySettings = async (options) => {
|
|
|
140469
140710
|
}
|
|
140470
140711
|
}
|
|
140471
140712
|
catch (err) {
|
|
140472
|
-
|
|
140713
|
+
reporting_1.reportRuntimeError(err);
|
|
140473
140714
|
}
|
|
140474
140715
|
};
|
|
140475
140716
|
|
|
@@ -140546,78 +140787,6 @@ exports.localDatetimeToUTC = () => {
|
|
|
140546
140787
|
};
|
|
140547
140788
|
|
|
140548
140789
|
|
|
140549
|
-
/***/ }),
|
|
140550
|
-
|
|
140551
|
-
/***/ 65279:
|
|
140552
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
140553
|
-
|
|
140554
|
-
"use strict";
|
|
140555
|
-
|
|
140556
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
140557
|
-
if (mod && mod.__esModule) return mod;
|
|
140558
|
-
var result = {};
|
|
140559
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
140560
|
-
result["default"] = mod;
|
|
140561
|
-
return result;
|
|
140562
|
-
};
|
|
140563
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
140564
|
-
const EventName_1 = __webpack_require__(70181);
|
|
140565
|
-
const appInsights = __importStar(__webpack_require__(14585));
|
|
140566
|
-
const telemetryPackageJSON = __importStar(__webpack_require__(18622));
|
|
140567
|
-
const telemetryClientConfig_1 = __webpack_require__(50712);
|
|
140568
|
-
const parseErrorStack = (errorStack) => {
|
|
140569
|
-
const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
|
|
140570
|
-
const parsedStack = [];
|
|
140571
|
-
const filtered = errorStack.split('\n').filter((line) => !!line.match(/^\s*at .*(\S+:\d+|\(native\))/m));
|
|
140572
|
-
if (!filtered.length) {
|
|
140573
|
-
return parsedStack;
|
|
140574
|
-
}
|
|
140575
|
-
filtered.forEach((line) => {
|
|
140576
|
-
let sanitizedLine = line.replace(/^\s+/, '');
|
|
140577
|
-
const location = line.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
140578
|
-
if (!location) {
|
|
140579
|
-
return;
|
|
140580
|
-
}
|
|
140581
|
-
let filepath = null;
|
|
140582
|
-
const normalizedFilepath = location[2].replace(/\\/g, '/');
|
|
140583
|
-
for (const regexp of regexps) {
|
|
140584
|
-
const match = normalizedFilepath.match(regexp);
|
|
140585
|
-
if (match) {
|
|
140586
|
-
filepath = match[0];
|
|
140587
|
-
break;
|
|
140588
|
-
}
|
|
140589
|
-
}
|
|
140590
|
-
if (!filepath) {
|
|
140591
|
-
return;
|
|
140592
|
-
}
|
|
140593
|
-
sanitizedLine = sanitizedLine.replace(location[0], '');
|
|
140594
|
-
const functionName = sanitizedLine.split(/\s+/).slice(1).join('');
|
|
140595
|
-
const lineNumber = location[3];
|
|
140596
|
-
const columnNumber = location[4];
|
|
140597
|
-
const parsedStackLine = `${functionName} at (${filepath}:${lineNumber}:${columnNumber});`;
|
|
140598
|
-
parsedStack.push(parsedStackLine);
|
|
140599
|
-
});
|
|
140600
|
-
return parsedStack;
|
|
140601
|
-
};
|
|
140602
|
-
const errorReportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
|
|
140603
|
-
telemetryClientConfig_1.configAzureTelemetryClient(errorReportingTelemetryClient);
|
|
140604
|
-
exports.reportRuntimeError = (error) => {
|
|
140605
|
-
const properties = { message: error.message };
|
|
140606
|
-
if (error.stack) {
|
|
140607
|
-
const parsedStack = parseErrorStack(error.stack);
|
|
140608
|
-
if (parsedStack.length) {
|
|
140609
|
-
properties.stack = parsedStack.join(' \n');
|
|
140610
|
-
}
|
|
140611
|
-
}
|
|
140612
|
-
const telemetryEvent = {
|
|
140613
|
-
name: EventName_1.EventName.TELEMETRY_SETTINGS_INIT_FAILED,
|
|
140614
|
-
properties,
|
|
140615
|
-
measurements: {}
|
|
140616
|
-
};
|
|
140617
|
-
errorReportingTelemetryClient.trackEvent(telemetryEvent);
|
|
140618
|
-
};
|
|
140619
|
-
|
|
140620
|
-
|
|
140621
140790
|
/***/ }),
|
|
140622
140791
|
|
|
140623
140792
|
/***/ 21677:
|
|
@@ -140721,6 +140890,86 @@ instructions) => {
|
|
|
140721
140890
|
};
|
|
140722
140891
|
|
|
140723
140892
|
|
|
140893
|
+
/***/ }),
|
|
140894
|
+
|
|
140895
|
+
/***/ 20885:
|
|
140896
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
140897
|
+
|
|
140898
|
+
"use strict";
|
|
140899
|
+
|
|
140900
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
140901
|
+
if (mod && mod.__esModule) return mod;
|
|
140902
|
+
var result = {};
|
|
140903
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
140904
|
+
result["default"] = mod;
|
|
140905
|
+
return result;
|
|
140906
|
+
};
|
|
140907
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
140908
|
+
const EventName_1 = __webpack_require__(70181);
|
|
140909
|
+
const appInsights = __importStar(__webpack_require__(14585));
|
|
140910
|
+
const telemetryPackageJSON = __importStar(__webpack_require__(18622));
|
|
140911
|
+
const telemetryClientConfig_1 = __webpack_require__(50712);
|
|
140912
|
+
const parseErrorStack = (errorStack) => {
|
|
140913
|
+
const regexps = [/sap-ux.+/gi, /[a-zA-Z-]+\/ide-extension\/.+/gi, /(\/telemetry\/.+)/gi];
|
|
140914
|
+
const parsedStack = [];
|
|
140915
|
+
const filtered = errorStack.split('\n').filter((line) => !!line.match(/^\s*at .*(\S+:\d+|\(native\))/m));
|
|
140916
|
+
if (!filtered.length) {
|
|
140917
|
+
return parsedStack;
|
|
140918
|
+
}
|
|
140919
|
+
filtered.forEach((line) => {
|
|
140920
|
+
let sanitizedLine = line.replace(/^\s+/, '');
|
|
140921
|
+
const location = line.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
140922
|
+
if (!location) {
|
|
140923
|
+
return;
|
|
140924
|
+
}
|
|
140925
|
+
let filepath = null;
|
|
140926
|
+
const normalizedFilepath = location[2].replace(/\\/g, '/');
|
|
140927
|
+
for (const regexp of regexps) {
|
|
140928
|
+
const match = normalizedFilepath.match(regexp);
|
|
140929
|
+
if (match) {
|
|
140930
|
+
filepath = match[0];
|
|
140931
|
+
break;
|
|
140932
|
+
}
|
|
140933
|
+
}
|
|
140934
|
+
if (!filepath) {
|
|
140935
|
+
return;
|
|
140936
|
+
}
|
|
140937
|
+
sanitizedLine = sanitizedLine.replace(location[0], '');
|
|
140938
|
+
const functionName = sanitizedLine.split(/\s+/).slice(1).join('');
|
|
140939
|
+
const lineNumber = location[3];
|
|
140940
|
+
const columnNumber = location[4];
|
|
140941
|
+
const parsedStackLine = `${functionName} at (${filepath}:${lineNumber}:${columnNumber});`;
|
|
140942
|
+
parsedStack.push(parsedStackLine);
|
|
140943
|
+
});
|
|
140944
|
+
return parsedStack;
|
|
140945
|
+
};
|
|
140946
|
+
const reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
|
|
140947
|
+
telemetryClientConfig_1.configAzureTelemetryClient(reportingTelemetryClient);
|
|
140948
|
+
exports.reportRuntimeError = (error) => {
|
|
140949
|
+
const properties = { message: error.message };
|
|
140950
|
+
if (error.stack) {
|
|
140951
|
+
const parsedStack = parseErrorStack(error.stack);
|
|
140952
|
+
if (parsedStack.length) {
|
|
140953
|
+
properties.stack = parsedStack.join(' \n');
|
|
140954
|
+
}
|
|
140955
|
+
}
|
|
140956
|
+
const telemetryEvent = {
|
|
140957
|
+
name: EventName_1.EventName.TELEMETRY_SETTINGS_INIT_FAILED,
|
|
140958
|
+
properties,
|
|
140959
|
+
measurements: {}
|
|
140960
|
+
};
|
|
140961
|
+
reportingTelemetryClient.trackEvent(telemetryEvent);
|
|
140962
|
+
};
|
|
140963
|
+
exports.reportTelemetryTurnOff = () => {
|
|
140964
|
+
const telemetryEvent = {
|
|
140965
|
+
name: EventName_1.EventName.DISABLE_TELEMETRY,
|
|
140966
|
+
properties: {},
|
|
140967
|
+
measurements: {}
|
|
140968
|
+
};
|
|
140969
|
+
reportingTelemetryClient.trackEvent(telemetryEvent);
|
|
140970
|
+
};
|
|
140971
|
+
|
|
140972
|
+
|
|
140724
140973
|
/***/ }),
|
|
140725
140974
|
|
|
140726
140975
|
/***/ 36891:
|
|
@@ -156157,7 +156406,7 @@ module.exports = JSON.parse('{"ERROR_SPECIFICATION_MISSING":"Seems specification
|
|
|
156157
156406
|
/***/ ((module) => {
|
|
156158
156407
|
|
|
156159
156408
|
"use strict";
|
|
156160
|
-
module.exports = JSON.parse('{"name":"@sap/ux-telemetry","version":"1.5.
|
|
156409
|
+
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"}]}}');
|
|
156161
156410
|
|
|
156162
156411
|
/***/ })
|
|
156163
156412
|
|