tnp-core 16.100.19 → 16.100.21
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/README.md +20 -20
- package/assets/shared/shared_folder_info.txt +1 -1
- package/browser/README.md +24 -24
- package/browser/esm2022/lib/core-config.mjs +4 -3
- package/browser/esm2022/lib/core-imports.mjs +35 -4
- package/browser/esm2022/lib/core-models.mjs +93 -80
- package/browser/esm2022/lib/framework-name.mjs +4 -3
- package/browser/esm2022/lib/helpers-isomorphic.mjs +13 -7
- package/browser/esm2022/lib/helpers-messages.mjs +13 -10
- package/browser/esm2022/lib/helpers.mjs +427 -153
- package/browser/esm2022/lib/index.mjs +1 -1
- package/browser/esm2022/lib/node-chalk-mock.mjs +1 -1
- package/browser/esm2022/lib/node-path-mock.mjs +21 -14
- package/browser/esm2022/lib/progress-data.mjs +4 -1
- package/browser/esm2022/lib/utils.mjs +17 -9
- package/browser/fesm2022/tnp-core.mjs +618 -271
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/core-imports.d.ts +1 -1
- package/browser/lib/core-models.d.ts +175 -165
- package/browser/lib/helpers.d.ts +21 -3
- package/browser/lib/utils.d.ts +1 -1
- package/cli.backend.js +3 -3
- package/client/README.md +24 -24
- package/client/esm2022/lib/core-config.mjs +4 -3
- package/client/esm2022/lib/core-imports.mjs +35 -4
- package/client/esm2022/lib/core-models.mjs +93 -80
- package/client/esm2022/lib/framework-name.mjs +4 -3
- package/client/esm2022/lib/helpers-isomorphic.mjs +13 -7
- package/client/esm2022/lib/helpers-messages.mjs +13 -10
- package/client/esm2022/lib/helpers.mjs +427 -153
- package/client/esm2022/lib/index.mjs +1 -1
- package/client/esm2022/lib/node-chalk-mock.mjs +1 -1
- package/client/esm2022/lib/node-path-mock.mjs +21 -14
- package/client/esm2022/lib/progress-data.mjs +4 -1
- package/client/esm2022/lib/utils.mjs +17 -9
- package/client/fesm2022/tnp-core.mjs +618 -271
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/core-imports.d.ts +1 -1
- package/client/lib/core-models.d.ts +175 -165
- package/client/lib/helpers.d.ts +21 -3
- package/client/lib/utils.d.ts +1 -1
- package/client/package.json +50 -39
- package/firedev.jsonc +69 -73
- package/lib/core-config.js +2 -2
- package/lib/core-config.js.map +1 -1
- package/lib/core-imports.d.ts +3 -5
- package/lib/core-imports.js +7 -8
- package/lib/core-imports.js.map +1 -1
- package/lib/core-models.d.ts +175 -165
- package/lib/core-models.js +92 -79
- package/lib/core-models.js.map +1 -1
- package/lib/framework-name.js +5 -4
- package/lib/framework-name.js.map +1 -1
- package/lib/helpers-isomorphic.js +12 -6
- package/lib/helpers-isomorphic.js.map +1 -1
- package/lib/helpers-messages.js +31 -18
- package/lib/helpers-messages.js.map +1 -1
- package/lib/helpers.d.ts +26 -11
- package/lib/helpers.js +268 -124
- package/lib/helpers.js.map +1 -1
- package/lib/node-chalk-mock.js +3 -3
- package/lib/node-path-mock.js +3 -3
- package/lib/progress-data.js.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +12 -10
- package/lib/utils.js.map +1 -1
- package/package.json +2 -2
- package/tmp-environment.json +54 -43
- package/websql/README.md +24 -24
- package/websql/esm2022/lib/core-config.mjs +4 -3
- package/websql/esm2022/lib/core-imports.mjs +35 -4
- package/websql/esm2022/lib/core-models.mjs +93 -80
- package/websql/esm2022/lib/framework-name.mjs +4 -3
- package/websql/esm2022/lib/helpers-isomorphic.mjs +13 -7
- package/websql/esm2022/lib/helpers-messages.mjs +13 -10
- package/websql/esm2022/lib/helpers.mjs +427 -155
- package/websql/esm2022/lib/index.mjs +1 -1
- package/websql/esm2022/lib/node-chalk-mock.mjs +1 -1
- package/websql/esm2022/lib/node-path-mock.mjs +21 -14
- package/websql/esm2022/lib/progress-data.mjs +4 -1
- package/websql/esm2022/lib/utils.mjs +17 -9
- package/websql/fesm2022/tnp-core.mjs +618 -273
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/core-imports.d.ts +1 -1
- package/websql/lib/core-models.d.ts +175 -165
- package/websql/lib/helpers.d.ts +21 -3
- package/websql/lib/utils.d.ts +1 -1
@@ -14,10 +14,11 @@ import axios from 'axios';
|
|
14
14
|
|
15
15
|
let isBrowser = false;
|
16
16
|
isBrowser = true;
|
17
|
-
const
|
17
|
+
const frameworkNameBeTmp = '';
|
18
18
|
/* */
|
19
19
|
/* */
|
20
|
-
|
20
|
+
/* */
|
21
|
+
const frameworkNameBe = frameworkNameBeTmp;
|
21
22
|
const frameworkName = isBrowser ? 'firedev' : frameworkNameBe;
|
22
23
|
;
|
23
24
|
({}); // @--end-of-file-for-module=tnp-core lib/framework-name.ts
|
@@ -44,7 +45,10 @@ function normalizeStringPosix(path, allowAboveRoot) {
|
|
44
45
|
if (lastSlash === i - 1 || dots === 1) {
|
45
46
|
}
|
46
47
|
else if (lastSlash !== i - 1 && dots === 2) {
|
47
|
-
if (res.length < 2 ||
|
48
|
+
if (res.length < 2 ||
|
49
|
+
lastSegmentLength !== 2 ||
|
50
|
+
res.charCodeAt(res.length - 1) !== 46 /*.*/ ||
|
51
|
+
res.charCodeAt(res.length - 2) !== 46 /*.*/) {
|
48
52
|
if (res.length > 2) {
|
49
53
|
var lastSlashIndex = res.lastIndexOf('/');
|
50
54
|
if (lastSlashIndex !== res.length - 1) {
|
@@ -115,8 +119,8 @@ const path$1 = {
|
|
115
119
|
assertPath(pathArg);
|
116
120
|
if (pathArg.length === 0)
|
117
121
|
return '.';
|
118
|
-
var isAbsolute = pathArg.charCodeAt(0) === 47
|
119
|
-
var trailingSeparator = pathArg.charCodeAt(pathArg.length - 1) === 47
|
122
|
+
var isAbsolute = pathArg.charCodeAt(0) === 47; /*/*/
|
123
|
+
var trailingSeparator = pathArg.charCodeAt(pathArg.length - 1) === 47; /*/*/
|
120
124
|
pathArg = normalizeStringPosix(pathArg, !isAbsolute);
|
121
125
|
if (pathArg.length === 0 && !isAbsolute)
|
122
126
|
pathArg = '.';
|
@@ -227,7 +231,7 @@ const path$1 = {
|
|
227
231
|
if (path.length === 0)
|
228
232
|
return '.';
|
229
233
|
var code = path.charCodeAt(0);
|
230
|
-
var hasRoot = code === 47
|
234
|
+
var hasRoot = code === 47; /*/*/
|
231
235
|
var end = -1;
|
232
236
|
var matchedSlash = true;
|
233
237
|
for (var i = path.length - 1; i >= 1; --i) {
|
@@ -341,16 +345,18 @@ const path$1 = {
|
|
341
345
|
preDotState = -1;
|
342
346
|
}
|
343
347
|
}
|
344
|
-
if (startDot === -1 ||
|
348
|
+
if (startDot === -1 ||
|
349
|
+
end === -1 ||
|
345
350
|
preDotState === 0 ||
|
346
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
351
|
+
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
|
347
352
|
return '';
|
348
353
|
}
|
349
354
|
return pathArg.slice(startDot, end);
|
350
355
|
},
|
351
356
|
format: function format(pathObject) {
|
352
357
|
if (pathObject === null || typeof pathObject !== 'object') {
|
353
|
-
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' +
|
358
|
+
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' +
|
359
|
+
typeof pathObject);
|
354
360
|
}
|
355
361
|
return _format('/', pathObject);
|
356
362
|
},
|
@@ -360,7 +366,7 @@ const path$1 = {
|
|
360
366
|
if (pathArg.length === 0)
|
361
367
|
return ret;
|
362
368
|
var code = pathArg.charCodeAt(0);
|
363
|
-
var isAbsolute = code === 47
|
369
|
+
var isAbsolute = code === 47; /*/*/
|
364
370
|
var start;
|
365
371
|
if (isAbsolute) {
|
366
372
|
ret.root = '/';
|
@@ -398,9 +404,10 @@ const path$1 = {
|
|
398
404
|
preDotState = -1;
|
399
405
|
}
|
400
406
|
}
|
401
|
-
if (startDot === -1 ||
|
407
|
+
if (startDot === -1 ||
|
408
|
+
end === -1 ||
|
402
409
|
preDotState === 0 ||
|
403
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
410
|
+
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
|
404
411
|
if (end !== -1) {
|
405
412
|
if (startPart === 0 && isAbsolute)
|
406
413
|
ret.base = ret.name = pathArg.slice(1, end);
|
@@ -428,11 +435,12 @@ const path$1 = {
|
|
428
435
|
sep: '/',
|
429
436
|
delimiter: ':',
|
430
437
|
win32: {
|
431
|
-
|
438
|
+
// @ts-ignore
|
439
|
+
normalize: p => {
|
432
440
|
return p;
|
433
|
-
}
|
441
|
+
},
|
434
442
|
},
|
435
|
-
posix: null
|
443
|
+
posix: null,
|
436
444
|
};
|
437
445
|
;
|
438
446
|
({}); // @--end-of-file-for-module=tnp-core lib/node-path-mock.ts
|
@@ -508,12 +516,12 @@ const chalk$1 = allObj;
|
|
508
516
|
/* */
|
509
517
|
let $;
|
510
518
|
$ = jQuery;
|
511
|
-
let path;
|
519
|
+
let path = void 0;
|
512
520
|
/* */
|
513
521
|
/* */
|
514
522
|
// @ts-ignore
|
515
523
|
path = path$1;
|
516
|
-
let chalk;
|
524
|
+
let chalk = void 0;
|
517
525
|
/* */
|
518
526
|
/* */
|
519
527
|
// @ts-ignore
|
@@ -553,94 +561,138 @@ const crossPlatformPath = (pathStringOrPathParts) => {
|
|
553
561
|
}
|
554
562
|
return pathStringOrPathParts.replace(/\\/g, '/').replace(/\/\//g, '/');
|
555
563
|
};
|
564
|
+
/* */
|
565
|
+
/* */
|
566
|
+
/* */
|
567
|
+
/* */
|
568
|
+
/* */
|
569
|
+
/* */
|
570
|
+
/* */
|
571
|
+
/* */
|
572
|
+
/* */
|
573
|
+
/* */
|
574
|
+
/* */
|
575
|
+
/* */
|
576
|
+
/* */
|
577
|
+
/* */
|
578
|
+
/* */
|
579
|
+
/* */
|
580
|
+
/* */
|
581
|
+
/* */
|
582
|
+
/* */
|
583
|
+
/* */
|
584
|
+
/* */
|
585
|
+
/* */
|
586
|
+
/* */
|
587
|
+
/* */
|
588
|
+
/* */
|
589
|
+
/* */
|
590
|
+
/* */
|
591
|
+
/* */
|
592
|
+
/* */
|
593
|
+
/* */
|
594
|
+
;
|
556
595
|
({}); // @--end-of-file-for-module=tnp-core lib/core-imports.ts
|
557
596
|
|
558
597
|
var CoreModels;
|
559
598
|
(function (CoreModels) {
|
599
|
+
CoreModels.BaseProjectTypeArr = [
|
600
|
+
'typescript',
|
601
|
+
'angular',
|
602
|
+
'angular-lib',
|
603
|
+
'unknow',
|
604
|
+
'unknow-npm-project',
|
605
|
+
];
|
560
606
|
CoreModels.mimeTypes = {
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
607
|
+
'.aac': 'audio/aac',
|
608
|
+
'.abw': 'application/x-abiword',
|
609
|
+
'.arc': 'application/x-freearc',
|
610
|
+
'.avi': 'video/x-msvideo',
|
611
|
+
'.azw': 'application/vnd.amazon.ebook',
|
612
|
+
'.bin': 'application/octet-stream',
|
613
|
+
'.bmp': 'image/bmp',
|
614
|
+
'.bz': 'application/x-bzip',
|
615
|
+
'.bz2': 'application/x-bzip2',
|
616
|
+
'.csh': 'application/x-csh',
|
617
|
+
'.css': 'text/css',
|
618
|
+
'.csv': 'text/csv',
|
619
|
+
'.doc': 'application/msword',
|
620
|
+
'.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
621
|
+
'.eot': 'application/vnd.ms-fontobject',
|
622
|
+
'.epub': 'application/epub+zip',
|
623
|
+
'.gz': 'application/gzip',
|
624
|
+
'.gif': 'image/gif',
|
625
|
+
'.htm': 'text/html',
|
626
|
+
'.html': 'text/html',
|
627
|
+
'.ico': 'image/vnd.microsoft.icon',
|
628
|
+
'.ics': 'text/calendar',
|
629
|
+
'.jar': 'application/java-archive',
|
630
|
+
'.jpeg': 'image/jpeg',
|
631
|
+
'.jpg': 'image/jpeg',
|
632
|
+
'.js': 'text/javascript',
|
633
|
+
'.json': 'application/json',
|
634
|
+
'.jsonld': 'application/ld+json',
|
635
|
+
'.mid': 'application/midi',
|
636
|
+
'.midi': 'application/midi',
|
637
|
+
'.mjs': 'text/javascript',
|
638
|
+
'.mp3': 'audio/mpeg',
|
639
|
+
'.mp4': 'video/mp4',
|
640
|
+
'.mpeg': 'video/mpeg',
|
641
|
+
'.mpkg': 'application/vnd.apple.installer+xml',
|
642
|
+
'.odp': 'application/vnd.oasis.opendocument.presentation',
|
643
|
+
'.ods': 'application/vnd.oasis.opendocument.spreadsheet',
|
644
|
+
'.odt': 'application/vnd.oasis.opendocument.text',
|
645
|
+
'.oga': 'audio/ogg',
|
646
|
+
'.ogg': 'audio/ogg',
|
647
|
+
'.ogv': 'video/ogg',
|
648
|
+
'.ogx': 'application/ogg',
|
649
|
+
'.opus': 'audio/opus',
|
650
|
+
'.otf': 'font/otf',
|
651
|
+
'.png': 'image/png',
|
652
|
+
'.pdf': 'application/pdf',
|
653
|
+
'.php': 'application/php',
|
654
|
+
'.ppt': 'application/vnd.ms-powerpoint',
|
655
|
+
'.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
656
|
+
'.rar': 'application/vnd.rar',
|
657
|
+
'.rtf': 'application/rtf',
|
658
|
+
'.sh': 'application/x-sh',
|
659
|
+
'.svg': 'image/svg+xml',
|
660
|
+
'.swf': 'application/x-shockwave-flash',
|
661
|
+
'.tar': 'application/x-tar',
|
662
|
+
'.tif': 'image/tiff',
|
663
|
+
'.tiff': 'image/tiff',
|
664
|
+
'.ts': 'video/mp2t',
|
665
|
+
'.ttf': 'font/ttf',
|
666
|
+
'.txt': 'text/plain',
|
667
|
+
'.vsd': 'application/vnd.visio',
|
668
|
+
'.wav': 'audio/wav',
|
669
|
+
'.weba': 'audio/webm',
|
670
|
+
'.webm': 'video/webm',
|
671
|
+
'.webp': 'image/webp',
|
672
|
+
'.woff': 'font/woff',
|
673
|
+
'.woff2': 'font/woff2',
|
674
|
+
'.xhtml': 'application/xhtml+xml',
|
675
|
+
'.xls': 'application/vnd.ms-excel',
|
676
|
+
'.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
677
|
+
'.xml': 'application/xml',
|
678
|
+
'.xul': 'application/vnd.mozilla.xul+xml',
|
679
|
+
'.zip': 'application/zip',
|
680
|
+
'.3gp': 'video/3gpp',
|
681
|
+
'.3g2': 'video/3gpp2',
|
682
|
+
'.7z': 'application/x-7z-compressed',
|
637
683
|
};
|
638
684
|
CoreModels.MediaTypeAllArr = [
|
639
|
-
'text',
|
640
|
-
'
|
685
|
+
'text',
|
686
|
+
'image',
|
687
|
+
'audio',
|
688
|
+
'video',
|
689
|
+
'font',
|
690
|
+
'application',
|
691
|
+
'multipart',
|
692
|
+
'message',
|
693
|
+
'model',
|
641
694
|
];
|
642
695
|
CoreModels.MimeTypesObj = CoreModels.mimeTypes;
|
643
|
-
;
|
644
696
|
})(CoreModels || (CoreModels = {}));
|
645
697
|
;
|
646
698
|
({}); // @--end-of-file-for-module=tnp-core lib/core-models.ts
|
@@ -664,31 +716,37 @@ class HelpersIsomorphic {
|
|
664
716
|
}
|
665
717
|
get isElectron() {
|
666
718
|
// @ts-ignore
|
667
|
-
if (typeof window !== 'undefined' &&
|
719
|
+
if (typeof window !== 'undefined' &&
|
720
|
+
typeof window.process === 'object' &&
|
721
|
+
window.process.type === 'renderer') {
|
668
722
|
return true;
|
669
723
|
}
|
670
724
|
// @ts-ignore
|
671
|
-
if (typeof process !== 'undefined' &&
|
725
|
+
if (typeof process !== 'undefined' &&
|
726
|
+
typeof process.versions === 'object' &&
|
727
|
+
!!process.versions.electron) {
|
672
728
|
return true;
|
673
729
|
}
|
674
|
-
if (typeof navigator === 'object' &&
|
730
|
+
if (typeof navigator === 'object' &&
|
731
|
+
typeof navigator.userAgent === 'string' &&
|
732
|
+
navigator.userAgent.indexOf('Electron') >= 0) {
|
675
733
|
return true;
|
676
734
|
}
|
677
735
|
return false;
|
678
736
|
}
|
679
737
|
contain(arr, item) {
|
680
|
-
return arr.filter(l => {
|
738
|
+
return (arr.filter(l => {
|
681
739
|
if (l instanceof RegExp) {
|
682
740
|
return l.test(item);
|
683
741
|
}
|
684
742
|
if (l === item) {
|
685
743
|
return true;
|
686
744
|
}
|
687
|
-
if (
|
745
|
+
if (item.match && typeof item.match === 'function' ? item.match(l) : false) {
|
688
746
|
return true;
|
689
747
|
}
|
690
748
|
return false;
|
691
|
-
}).length > 0;
|
749
|
+
}).length > 0);
|
692
750
|
}
|
693
751
|
}
|
694
752
|
;
|
@@ -745,7 +803,6 @@ const KEY_IMPORTANTCE = {
|
|
745
803
|
/* */
|
746
804
|
/* */
|
747
805
|
/* */
|
748
|
-
/* */
|
749
806
|
const LIMIT = 10;
|
750
807
|
class HelpersMessages extends HelpersIsomorphic {
|
751
808
|
msgCacheClear() {
|
@@ -765,6 +822,9 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
765
822
|
/* */
|
766
823
|
/* */
|
767
824
|
/* */
|
825
|
+
/* */
|
826
|
+
/* */
|
827
|
+
/* */
|
768
828
|
}
|
769
829
|
}
|
770
830
|
error(details, noExit = false, noTrace = false) {
|
@@ -822,8 +882,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
822
882
|
/* */
|
823
883
|
/* */
|
824
884
|
/* */
|
825
|
-
/* */
|
826
|
-
/* */
|
827
885
|
}
|
828
886
|
info(details, repeatable = false) {
|
829
887
|
/* */
|
@@ -870,7 +928,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
870
928
|
/* */
|
871
929
|
/* */
|
872
930
|
/* */
|
873
|
-
/* */
|
874
931
|
}
|
875
932
|
success(details) {
|
876
933
|
if (Helpers.isBrowser) {
|
@@ -914,7 +971,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
914
971
|
/* */
|
915
972
|
/* */
|
916
973
|
/* */
|
917
|
-
/* */
|
918
974
|
}
|
919
975
|
/**
|
920
976
|
*
|
@@ -973,6 +1029,7 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
973
1029
|
/* */
|
974
1030
|
/* */
|
975
1031
|
/* */
|
1032
|
+
/* */
|
976
1033
|
}
|
977
1034
|
taskDone(details, isLessImportant = false) {
|
978
1035
|
if (Helpers.isBrowser) {
|
@@ -1030,6 +1087,7 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
1030
1087
|
/* */
|
1031
1088
|
/* */
|
1032
1089
|
/* */
|
1090
|
+
/* */
|
1033
1091
|
}
|
1034
1092
|
log(details, debugLevel = 0) {
|
1035
1093
|
if (Helpers.isBrowser) {
|
@@ -1086,10 +1144,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
1086
1144
|
/* */
|
1087
1145
|
/* */
|
1088
1146
|
/* */
|
1089
|
-
/* */
|
1090
|
-
/* */
|
1091
|
-
/* */
|
1092
|
-
/* */
|
1093
1147
|
}
|
1094
1148
|
/* */
|
1095
1149
|
/* */
|
@@ -1181,6 +1235,13 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
1181
1235
|
/* */
|
1182
1236
|
/* */
|
1183
1237
|
/* */
|
1238
|
+
/* */
|
1239
|
+
/* */
|
1240
|
+
/* */
|
1241
|
+
/* */
|
1242
|
+
/* */
|
1243
|
+
/* */
|
1244
|
+
/* */
|
1184
1245
|
}
|
1185
1246
|
}
|
1186
1247
|
function transformData(details) {
|
@@ -1253,7 +1314,8 @@ class HelpersCore extends HelpersMessages {
|
|
1253
1314
|
if (!this.isElectron) {
|
1254
1315
|
return;
|
1255
1316
|
}
|
1256
|
-
return window.require('electron')
|
1317
|
+
return window.require('electron')
|
1318
|
+
.ipcRenderer;
|
1257
1319
|
}
|
1258
1320
|
/**
|
1259
1321
|
* get electron web frame
|
@@ -1277,8 +1339,7 @@ class HelpersCore extends HelpersMessages {
|
|
1277
1339
|
/* */
|
1278
1340
|
return (void 0);
|
1279
1341
|
}
|
1280
|
-
getElectronWindow({ allowRunningInsecureContent = true } = {}) {
|
1281
|
-
/* */
|
1342
|
+
getElectronWindow({ allowRunningInsecureContent = true, } = {}) {
|
1282
1343
|
/* */
|
1283
1344
|
/* */
|
1284
1345
|
/* */
|
@@ -1366,7 +1427,8 @@ class HelpersCore extends HelpersMessages {
|
|
1366
1427
|
removeEmptyLineFromString(str) {
|
1367
1428
|
const lines = (str || '').split('\n');
|
1368
1429
|
let previousWasEmpty = false;
|
1369
|
-
return lines
|
1430
|
+
return lines
|
1431
|
+
.filter(line => {
|
1370
1432
|
if (line.trim() === '') {
|
1371
1433
|
if (previousWasEmpty) {
|
1372
1434
|
return false;
|
@@ -1380,9 +1442,9 @@ class HelpersCore extends HelpersMessages {
|
|
1380
1442
|
previousWasEmpty = false;
|
1381
1443
|
return true;
|
1382
1444
|
}
|
1383
|
-
})
|
1445
|
+
})
|
1446
|
+
.join('\n');
|
1384
1447
|
}
|
1385
|
-
;
|
1386
1448
|
/**
|
1387
1449
|
* @deprecated
|
1388
1450
|
*/
|
@@ -1420,6 +1482,8 @@ class HelpersCore extends HelpersMessages {
|
|
1420
1482
|
/* */
|
1421
1483
|
/* */
|
1422
1484
|
/* */
|
1485
|
+
/* */
|
1486
|
+
/* */
|
1423
1487
|
return (void 0);
|
1424
1488
|
}
|
1425
1489
|
remove(fileOrFolderPathOrPatter, exactFolder = false) {
|
@@ -1451,7 +1515,9 @@ class HelpersCore extends HelpersMessages {
|
|
1451
1515
|
isClass(funcOrClass) {
|
1452
1516
|
let isClass = false;
|
1453
1517
|
if (typeof funcOrClass === 'function') {
|
1454
|
-
isClass =
|
1518
|
+
isClass =
|
1519
|
+
!!funcOrClass.prototype &&
|
1520
|
+
Object.getOwnPropertyNames(funcOrClass.prototype).filter(f => f !== 'constructor').length > 0;
|
1455
1521
|
}
|
1456
1522
|
return isClass;
|
1457
1523
|
}
|
@@ -1722,6 +1788,27 @@ class HelpersCore extends HelpersMessages {
|
|
1722
1788
|
/* */
|
1723
1789
|
/* */
|
1724
1790
|
/* */
|
1791
|
+
/* */
|
1792
|
+
/* */
|
1793
|
+
/* */
|
1794
|
+
/* */
|
1795
|
+
/* */
|
1796
|
+
/* */
|
1797
|
+
/* */
|
1798
|
+
/* */
|
1799
|
+
/* */
|
1800
|
+
/* */
|
1801
|
+
/* */
|
1802
|
+
/* */
|
1803
|
+
/* */
|
1804
|
+
/* */
|
1805
|
+
/* */
|
1806
|
+
/* */
|
1807
|
+
/* */
|
1808
|
+
/* */
|
1809
|
+
/* */
|
1810
|
+
/* */
|
1811
|
+
/* */
|
1725
1812
|
/**
|
1726
1813
|
* symlink may have existed or unexisted destiantion url
|
1727
1814
|
* @param destUrl M
|
@@ -1758,6 +1845,8 @@ class HelpersCore extends HelpersMessages {
|
|
1758
1845
|
/* */
|
1759
1846
|
/* */
|
1760
1847
|
/* */
|
1848
|
+
/* */
|
1849
|
+
/* */
|
1761
1850
|
return (void 0);
|
1762
1851
|
}
|
1763
1852
|
isSymlinkFileExitedOrUnexisted(filePath) {
|
@@ -1792,6 +1881,11 @@ class HelpersCore extends HelpersMessages {
|
|
1792
1881
|
/* */
|
1793
1882
|
/* */
|
1794
1883
|
/* */
|
1884
|
+
/* */
|
1885
|
+
/* */
|
1886
|
+
/* */
|
1887
|
+
/* */
|
1888
|
+
/* */
|
1795
1889
|
return (void 0);
|
1796
1890
|
}
|
1797
1891
|
/**
|
@@ -1813,6 +1907,13 @@ class HelpersCore extends HelpersMessages {
|
|
1813
1907
|
/* */
|
1814
1908
|
/* */
|
1815
1909
|
/* */
|
1910
|
+
/* */
|
1911
|
+
/* */
|
1912
|
+
/* */
|
1913
|
+
/* */
|
1914
|
+
/* */
|
1915
|
+
/* */
|
1916
|
+
/* */
|
1816
1917
|
return (void 0);
|
1817
1918
|
}
|
1818
1919
|
/* */
|
@@ -1853,18 +1954,24 @@ class HelpersCore extends HelpersMessages {
|
|
1853
1954
|
/* */
|
1854
1955
|
/* */
|
1855
1956
|
/* */
|
1957
|
+
/* */
|
1958
|
+
/* */
|
1959
|
+
/* */
|
1960
|
+
/* */
|
1961
|
+
/* */
|
1856
1962
|
return (void 0);
|
1857
1963
|
}
|
1858
1964
|
/**
|
1859
1965
|
* this is HACK for running procesess inside processes
|
1860
1966
|
*/
|
1861
1967
|
_fixCommand(command) {
|
1862
|
-
if ((command.startsWith('tnp ') || command.startsWith('firedev ')) // TODO every cli projects here that uses run and need to kill process easly!
|
1863
|
-
&&
|
1864
|
-
|
1968
|
+
if ((command.startsWith('tnp ') || command.startsWith('firedev ')) && // TODO every cli projects here that uses run and need to kill process easly!
|
1969
|
+
command.search('-spinner=false') === -1 &&
|
1970
|
+
command.search('-spinner=off') === -1) {
|
1865
1971
|
command = `${command} -spinner=false`;
|
1866
1972
|
}
|
1867
|
-
if (global.skipCoreCheck &&
|
1973
|
+
if (global.skipCoreCheck &&
|
1974
|
+
(command.startsWith('tnp ') || command.startsWith('firedev '))) {
|
1868
1975
|
command = `${command} --skipCoreCheck`;
|
1869
1976
|
}
|
1870
1977
|
return command;
|
@@ -1925,8 +2032,6 @@ class HelpersCore extends HelpersMessages {
|
|
1925
2032
|
/* */
|
1926
2033
|
/* */
|
1927
2034
|
/* */
|
1928
|
-
/* */
|
1929
|
-
/* */
|
1930
2035
|
};
|
1931
2036
|
}
|
1932
2037
|
wait(second) {
|
@@ -2011,6 +2116,10 @@ class HelpersCore extends HelpersMessages {
|
|
2011
2116
|
/* */
|
2012
2117
|
/* */
|
2013
2118
|
/* */
|
2119
|
+
/* */
|
2120
|
+
/* */
|
2121
|
+
/* */
|
2122
|
+
/* */
|
2014
2123
|
async killProcessByPort(portOrPortsToKill, options) {
|
2015
2124
|
/* */
|
2016
2125
|
/* */
|
@@ -2049,6 +2158,13 @@ class HelpersCore extends HelpersMessages {
|
|
2049
2158
|
/* */
|
2050
2159
|
/* */
|
2051
2160
|
/* */
|
2161
|
+
/* */
|
2162
|
+
/* */
|
2163
|
+
/* */
|
2164
|
+
/* */
|
2165
|
+
/* */
|
2166
|
+
/* */
|
2167
|
+
/* */
|
2052
2168
|
return (void 0);
|
2053
2169
|
}
|
2054
2170
|
async killOnPort(portOrPortsToKill, options) {
|
@@ -2063,13 +2179,15 @@ class HelpersCore extends HelpersMessages {
|
|
2063
2179
|
if (WEBSQL_PROC_MOCK_PROCESSES_PID[byPid]) {
|
2064
2180
|
const ppid = WEBSQL_PROC_MOCK_PROCESSES_PID[byPid].ppid;
|
2065
2181
|
if (WEBSQL_PROC_MOCK_PROCESSES_PPID[ppid]) {
|
2066
|
-
const allChilds = WEBSQL_PROC_MOCK_PROCESSES_PPID[ppid]
|
2182
|
+
const allChilds = WEBSQL_PROC_MOCK_PROCESSES_PPID[ppid]
|
2183
|
+
.childProcesses;
|
2067
2184
|
WEBSQL_PROC_MOCK_PROCESSES_PPID[ppid].childProcesses = allChilds.filter(p => p !== byPid);
|
2068
2185
|
}
|
2069
2186
|
delete WEBSQL_PROC_MOCK_PROCESSES_PID[byPid];
|
2070
2187
|
}
|
2071
2188
|
if (WEBSQL_PROC_MOCK_PROCESSES_PPID[byPid]) {
|
2072
|
-
const childs = WEBSQL_PROC_MOCK_PROCESSES_PPID[byPid]
|
2189
|
+
const childs = WEBSQL_PROC_MOCK_PROCESSES_PPID[byPid]
|
2190
|
+
.childProcesses;
|
2073
2191
|
for (let index = 0; index < childs.length; index++) {
|
2074
2192
|
const childPid = childs[index];
|
2075
2193
|
delete WEBSQL_PROC_MOCK_PROCESSES_PID[childPid];
|
@@ -2088,33 +2206,47 @@ class HelpersCore extends HelpersMessages {
|
|
2088
2206
|
/* */
|
2089
2207
|
/* */
|
2090
2208
|
return {
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2209
|
+
/**
|
2210
|
+
* start command as synchronous nodej proces
|
2211
|
+
*/
|
2212
|
+
sync() {
|
2213
|
+
/* */
|
2214
|
+
/* */
|
2215
|
+
/* */
|
2216
|
+
/* */
|
2217
|
+
/* */
|
2218
|
+
/* */
|
2219
|
+
/* */
|
2220
|
+
/* */
|
2221
|
+
/* */
|
2222
|
+
/* */
|
2223
|
+
/* */
|
2224
|
+
/* */
|
2225
|
+
/* */
|
2226
|
+
/* */
|
2227
|
+
/* */
|
2228
|
+
/* */
|
2229
|
+
/* */
|
2230
|
+
/* */
|
2231
|
+
/* */
|
2232
|
+
/* */
|
2233
|
+
/* */
|
2234
|
+
/* */
|
2235
|
+
/* */
|
2236
|
+
/* */
|
2237
|
+
/* */
|
2238
|
+
/* */
|
2239
|
+
/* */
|
2240
|
+
/* */
|
2241
|
+
/* */
|
2242
|
+
/* */
|
2243
|
+
/* */
|
2244
|
+
return (void 0);
|
2245
|
+
},
|
2246
|
+
/**
|
2247
|
+
* start command as asynchronous nodej proces
|
2248
|
+
* @param detach (default: false) - if true process will be detached
|
2249
|
+
*/
|
2118
2250
|
async(detach = false, mockFun) {
|
2119
2251
|
if (mockFun) {
|
2120
2252
|
const subStdoutSub = new Subject();
|
@@ -2129,7 +2261,7 @@ class HelpersCore extends HelpersMessages {
|
|
2129
2261
|
stdoutCallback(d);
|
2130
2262
|
}));
|
2131
2263
|
}
|
2132
|
-
}
|
2264
|
+
},
|
2133
2265
|
},
|
2134
2266
|
stderr: {
|
2135
2267
|
on(action, stdoutCallback) {
|
@@ -2138,7 +2270,7 @@ class HelpersCore extends HelpersMessages {
|
|
2138
2270
|
stdoutCallback(d);
|
2139
2271
|
}));
|
2140
2272
|
}
|
2141
|
-
}
|
2273
|
+
},
|
2142
2274
|
},
|
2143
2275
|
on(action, exitFun) {
|
2144
2276
|
if (action == 'exit') {
|
@@ -2160,24 +2292,27 @@ class HelpersCore extends HelpersMessages {
|
|
2160
2292
|
}
|
2161
2293
|
WEBSQL_PROC_MOCK_PROCESSES_PPID[procDummy.ppid].childProcesses.push(procDummy.pid);
|
2162
2294
|
const checkIfProcessShouldBeDead = () => {
|
2163
|
-
return _.isNil(WEBSQL_PROC_MOCK_PROCESSES_PID[procDummy.pid]) ||
|
2295
|
+
return (_.isNil(WEBSQL_PROC_MOCK_PROCESSES_PID[procDummy.pid]) ||
|
2296
|
+
_.isNil(WEBSQL_PROC_MOCK_PROCESSES_PPID[procDummy.ppid]));
|
2164
2297
|
};
|
2165
2298
|
const f = Helpers.runSyncOrAsync({
|
2166
2299
|
functionFn: mockFun,
|
2167
2300
|
arrayOfParams: [
|
2168
|
-
|
2301
|
+
d => {
|
2169
2302
|
setTimeout(() => {
|
2170
2303
|
subStdoutSub.next(d);
|
2171
2304
|
});
|
2172
|
-
},
|
2305
|
+
},
|
2306
|
+
d => {
|
2173
2307
|
setTimeout(() => {
|
2174
2308
|
subStderSub.next(d);
|
2175
2309
|
});
|
2176
|
-
},
|
2310
|
+
},
|
2311
|
+
() => {
|
2177
2312
|
const shouldBeDead = checkIfProcessShouldBeDead();
|
2178
2313
|
return shouldBeDead;
|
2179
|
-
}
|
2180
|
-
]
|
2314
|
+
},
|
2315
|
+
],
|
2181
2316
|
});
|
2182
2317
|
f.then(exitCode => {
|
2183
2318
|
if (_.isNil(exitCode)) {
|
@@ -2187,7 +2322,7 @@ class HelpersCore extends HelpersMessages {
|
|
2187
2322
|
exitSub.next(exitCode);
|
2188
2323
|
subscribtions.forEach(s => s.unsubscribe());
|
2189
2324
|
});
|
2190
|
-
}).catch(
|
2325
|
+
}).catch(e => {
|
2191
2326
|
console.error(e);
|
2192
2327
|
console.error(`Something wrong with your mock funciton`);
|
2193
2328
|
exitSub.next(1);
|
@@ -2201,109 +2336,116 @@ class HelpersCore extends HelpersMessages {
|
|
2201
2336
|
/* */
|
2202
2337
|
return (void 0);
|
2203
2338
|
},
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
|
2214
|
-
|
2215
|
-
|
2216
|
-
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
2221
|
-
|
2222
|
-
|
2223
|
-
|
2224
|
-
|
2225
|
-
|
2226
|
-
|
2227
|
-
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2231
|
-
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2239
|
-
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
|
2272
|
-
|
2273
|
-
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
2339
|
+
/**
|
2340
|
+
* start command as asynchronous nodej proces inside promise
|
2341
|
+
*/
|
2342
|
+
asyncAsPromise() {
|
2343
|
+
/* */
|
2344
|
+
/* */
|
2345
|
+
/* */
|
2346
|
+
/* */
|
2347
|
+
/* */
|
2348
|
+
/* */
|
2349
|
+
/* */
|
2350
|
+
/* */
|
2351
|
+
/* */
|
2352
|
+
/* */
|
2353
|
+
/* */
|
2354
|
+
/* */
|
2355
|
+
/* */
|
2356
|
+
/* */
|
2357
|
+
/* */
|
2358
|
+
/* */
|
2359
|
+
/* */
|
2360
|
+
return (void 0);
|
2361
|
+
},
|
2362
|
+
/**
|
2363
|
+
* start command as asynchronous nodej proces inside promise
|
2364
|
+
* and wait until output contains some string
|
2365
|
+
*/
|
2366
|
+
unitlOutputContains(stdoutMsg, stderMsg, timeout = 0, stdoutOutputContainsCallback) {
|
2367
|
+
/* */
|
2368
|
+
/* */
|
2369
|
+
/* */
|
2370
|
+
/* */
|
2371
|
+
/* */
|
2372
|
+
/* */
|
2373
|
+
/* */
|
2374
|
+
/* */
|
2375
|
+
/* */
|
2376
|
+
/* */
|
2377
|
+
/* */
|
2378
|
+
/* */
|
2379
|
+
/* */
|
2380
|
+
/* */
|
2381
|
+
/* */
|
2382
|
+
/* */
|
2383
|
+
/* */
|
2384
|
+
/* */
|
2385
|
+
/* */
|
2386
|
+
/* */
|
2387
|
+
/* */
|
2388
|
+
/* */
|
2389
|
+
/* */
|
2390
|
+
/* */
|
2391
|
+
/* */
|
2392
|
+
/* */
|
2393
|
+
/* */
|
2394
|
+
/* */
|
2395
|
+
/* */
|
2396
|
+
/* */
|
2397
|
+
/* */
|
2398
|
+
/* */
|
2399
|
+
/* */
|
2400
|
+
/* */
|
2401
|
+
/* */
|
2402
|
+
/* */
|
2403
|
+
/* */
|
2404
|
+
/* */
|
2405
|
+
/* */
|
2406
|
+
/* */
|
2407
|
+
/* */
|
2408
|
+
/* */
|
2409
|
+
/* */
|
2410
|
+
/* */
|
2411
|
+
/* */
|
2412
|
+
/* */
|
2413
|
+
/* */
|
2414
|
+
/* */
|
2415
|
+
/* */
|
2416
|
+
/* */
|
2417
|
+
/* */
|
2418
|
+
/* */
|
2419
|
+
/* */
|
2420
|
+
/* */
|
2421
|
+
/* */
|
2422
|
+
/* */
|
2423
|
+
/* */
|
2424
|
+
/* */
|
2425
|
+
/* */
|
2426
|
+
/* */
|
2427
|
+
/* */
|
2428
|
+
/* */
|
2429
|
+
/* */
|
2430
|
+
/* */
|
2431
|
+
/* */
|
2432
|
+
/* */
|
2433
|
+
/* */
|
2434
|
+
/* */
|
2435
|
+
/* */
|
2436
|
+
/* */
|
2437
|
+
/* */
|
2438
|
+
/* */
|
2439
|
+
/* */
|
2440
|
+
/* */
|
2441
|
+
/* */
|
2442
|
+
/* */
|
2443
|
+
/* */
|
2444
|
+
/* */
|
2445
|
+
/* */
|
2446
|
+
/* */
|
2447
|
+
return (void 0);
|
2448
|
+
},
|
2307
2449
|
};
|
2308
2450
|
}
|
2309
2451
|
async questionYesNo(message, callbackTrue, callbackFalse, defaultValue = true,
|
@@ -2757,6 +2899,125 @@ class HelpersCore extends HelpersMessages {
|
|
2757
2899
|
/* */
|
2758
2900
|
/* */
|
2759
2901
|
/* */
|
2902
|
+
/* */
|
2903
|
+
/* */
|
2904
|
+
/* */
|
2905
|
+
/* */
|
2906
|
+
/* */
|
2907
|
+
/* */
|
2908
|
+
/* */
|
2909
|
+
/* */
|
2910
|
+
/* */
|
2911
|
+
/* */
|
2912
|
+
/* */
|
2913
|
+
/* */
|
2914
|
+
/* */
|
2915
|
+
/* */
|
2916
|
+
/* */
|
2917
|
+
/* */
|
2918
|
+
/* */
|
2919
|
+
/* */
|
2920
|
+
/* */
|
2921
|
+
/* */
|
2922
|
+
/* */
|
2923
|
+
/* */
|
2924
|
+
/* */
|
2925
|
+
/* */
|
2926
|
+
/* */
|
2927
|
+
/* */
|
2928
|
+
/* */
|
2929
|
+
/* */
|
2930
|
+
/* */
|
2931
|
+
/* */
|
2932
|
+
/* */
|
2933
|
+
/* */
|
2934
|
+
/* */
|
2935
|
+
/* */
|
2936
|
+
/* */
|
2937
|
+
/* */
|
2938
|
+
/* */
|
2939
|
+
/* */
|
2940
|
+
/* */
|
2941
|
+
/* */
|
2942
|
+
/* */
|
2943
|
+
/* */
|
2944
|
+
/* */
|
2945
|
+
/* */
|
2946
|
+
/* */
|
2947
|
+
/* */
|
2948
|
+
/* */
|
2949
|
+
/* */
|
2950
|
+
/* */
|
2951
|
+
/* */
|
2952
|
+
/* */
|
2953
|
+
/* */
|
2954
|
+
/* */
|
2955
|
+
/* */
|
2956
|
+
/* */
|
2957
|
+
/* */
|
2958
|
+
/* */
|
2959
|
+
/* */
|
2960
|
+
/* */
|
2961
|
+
/* */
|
2962
|
+
/* */
|
2963
|
+
/* */
|
2964
|
+
/* */
|
2965
|
+
/* */
|
2966
|
+
/* */
|
2967
|
+
/* */
|
2968
|
+
/* */
|
2969
|
+
/* */
|
2970
|
+
/* */
|
2971
|
+
/* */
|
2972
|
+
/* */
|
2973
|
+
/* */
|
2974
|
+
/* */
|
2975
|
+
/* */
|
2976
|
+
/* */
|
2977
|
+
/* */
|
2978
|
+
/* */
|
2979
|
+
/* */
|
2980
|
+
/* */
|
2981
|
+
/* */
|
2982
|
+
/* */
|
2983
|
+
/* */
|
2984
|
+
/* */
|
2985
|
+
/* */
|
2986
|
+
/* */
|
2987
|
+
/* */
|
2988
|
+
/* */
|
2989
|
+
/* */
|
2990
|
+
/* */
|
2991
|
+
/* */
|
2992
|
+
/* */
|
2993
|
+
/* */
|
2994
|
+
/* */
|
2995
|
+
/* */
|
2996
|
+
/* */
|
2997
|
+
/* */
|
2998
|
+
/* */
|
2999
|
+
/* */
|
3000
|
+
/* */
|
3001
|
+
/* */
|
3002
|
+
/* */
|
3003
|
+
/* */
|
3004
|
+
/* */
|
3005
|
+
/* */
|
3006
|
+
/* */
|
3007
|
+
/* */
|
3008
|
+
/* */
|
3009
|
+
/* */
|
3010
|
+
/* */
|
3011
|
+
/* */
|
3012
|
+
/* */
|
3013
|
+
/* */
|
3014
|
+
/* */
|
3015
|
+
/* */
|
3016
|
+
/* */
|
3017
|
+
/* */
|
3018
|
+
/* */
|
3019
|
+
/* */
|
3020
|
+
/* */
|
2760
3021
|
/**
|
2761
3022
|
* Quick fix for object values
|
2762
3023
|
* @deprecated
|
@@ -2892,10 +3153,49 @@ class HelpersCore extends HelpersMessages {
|
|
2892
3153
|
/* */
|
2893
3154
|
/* */
|
2894
3155
|
/* */
|
3156
|
+
/* */
|
3157
|
+
/* */
|
3158
|
+
/* */
|
3159
|
+
/* */
|
3160
|
+
/* */
|
3161
|
+
/* */
|
3162
|
+
/* */
|
3163
|
+
/* */
|
3164
|
+
/* */
|
3165
|
+
/* */
|
3166
|
+
/* */
|
3167
|
+
/* */
|
3168
|
+
/* */
|
3169
|
+
/* */
|
3170
|
+
/* */
|
3171
|
+
/* */
|
3172
|
+
/* */
|
3173
|
+
/* */
|
3174
|
+
/* */
|
3175
|
+
/* */
|
3176
|
+
/* */
|
3177
|
+
/* */
|
3178
|
+
/* */
|
3179
|
+
/* */
|
3180
|
+
/* */
|
3181
|
+
/* */
|
3182
|
+
/* */
|
3183
|
+
/* */
|
3184
|
+
/* */
|
3185
|
+
/* */
|
3186
|
+
/* */
|
3187
|
+
/* */
|
3188
|
+
/* */
|
3189
|
+
/* */
|
3190
|
+
/* */
|
3191
|
+
/* */
|
2895
3192
|
replaceLinesInFile(absoluteFilePath, lineReplaceFn) {
|
2896
3193
|
/* */
|
2897
3194
|
/* */
|
2898
3195
|
/* */
|
3196
|
+
/* */
|
3197
|
+
/* */
|
3198
|
+
/* */
|
2899
3199
|
}
|
2900
3200
|
/* */
|
2901
3201
|
/* */
|
@@ -3183,6 +3483,39 @@ class HelpersCore extends HelpersMessages {
|
|
3183
3483
|
/* */
|
3184
3484
|
/* */
|
3185
3485
|
/* */
|
3486
|
+
/* */
|
3487
|
+
/* */
|
3488
|
+
/* */
|
3489
|
+
/* */
|
3490
|
+
/* */
|
3491
|
+
/* */
|
3492
|
+
/* */
|
3493
|
+
/* */
|
3494
|
+
/* */
|
3495
|
+
/* */
|
3496
|
+
/* */
|
3497
|
+
/* */
|
3498
|
+
/* */
|
3499
|
+
/* */
|
3500
|
+
/* */
|
3501
|
+
/* */
|
3502
|
+
/* */
|
3503
|
+
/* */
|
3504
|
+
/* */
|
3505
|
+
/* */
|
3506
|
+
/* */
|
3507
|
+
/* */
|
3508
|
+
/* */
|
3509
|
+
/* */
|
3510
|
+
/* */
|
3511
|
+
/* */
|
3512
|
+
/* */
|
3513
|
+
/* */
|
3514
|
+
/* */
|
3515
|
+
/* */
|
3516
|
+
/* */
|
3517
|
+
/* */
|
3518
|
+
/* */
|
3186
3519
|
hideNodeWarnings() {
|
3187
3520
|
/* */
|
3188
3521
|
/* */
|
@@ -3194,9 +3527,10 @@ class HelpersCore extends HelpersMessages {
|
|
3194
3527
|
|
3195
3528
|
const CoreConfig = {
|
3196
3529
|
message: {
|
3197
|
-
globalSystemToolMode: 'globalSystemToolMode'
|
3198
|
-
}
|
3530
|
+
globalSystemToolMode: 'globalSystemToolMode',
|
3531
|
+
},
|
3199
3532
|
};
|
3533
|
+
;
|
3200
3534
|
({}); // @--end-of-file-for-module=tnp-core lib/core-config.ts
|
3201
3535
|
|
3202
3536
|
class PROGRESS_DATA {
|
@@ -3208,6 +3542,9 @@ class PROGRESS_DATA {
|
|
3208
3542
|
/* */
|
3209
3543
|
/* */
|
3210
3544
|
/* */
|
3545
|
+
/* */
|
3546
|
+
/* */
|
3547
|
+
/* */
|
3211
3548
|
}
|
3212
3549
|
static resolveFrom(chunk, callbackOnFounded, checkSplit = true) {
|
3213
3550
|
let progress;
|
@@ -3423,16 +3760,19 @@ var Utils;
|
|
3423
3760
|
/* */
|
3424
3761
|
/* */
|
3425
3762
|
/* */
|
3763
|
+
/* */
|
3764
|
+
/* */
|
3765
|
+
/* */
|
3426
3766
|
async function fileToBlob(file) {
|
3427
|
-
return new Blob([new Uint8Array(await file.arrayBuffer())], {
|
3767
|
+
return new Blob([new Uint8Array(await file.arrayBuffer())], {
|
3768
|
+
type: file.type,
|
3769
|
+
});
|
3428
3770
|
}
|
3429
3771
|
binary.fileToBlob = fileToBlob;
|
3430
|
-
;
|
3431
3772
|
async function blobToFile(blob, nameForFile = 'my-file-name') {
|
3432
3773
|
if (!nameForFile) {
|
3433
|
-
nameForFile = 'nonamefile' +
|
3774
|
+
nameForFile = 'nonamefile' + new Date().getTime();
|
3434
3775
|
}
|
3435
|
-
;
|
3436
3776
|
// @ts-ignore
|
3437
3777
|
return new File([blob], nameForFile);
|
3438
3778
|
}
|
@@ -3460,6 +3800,9 @@ var Utils;
|
|
3460
3800
|
/* */
|
3461
3801
|
/* */
|
3462
3802
|
/* */
|
3803
|
+
/* */
|
3804
|
+
/* */
|
3805
|
+
/* */
|
3463
3806
|
async function textToBlob(text, type = 'text/plain') {
|
3464
3807
|
const blob = new Blob([text], { type });
|
3465
3808
|
return blob;
|
@@ -3482,7 +3825,9 @@ var Utils;
|
|
3482
3825
|
}
|
3483
3826
|
binary.fileToText = fileToText;
|
3484
3827
|
async function jsonToBlob(jsonObj) {
|
3485
|
-
const blob = new Blob([JSON.stringify(jsonObj, null, 2)], {
|
3828
|
+
const blob = new Blob([JSON.stringify(jsonObj, null, 2)], {
|
3829
|
+
type: 'application/json',
|
3830
|
+
});
|
3486
3831
|
return blob;
|
3487
3832
|
}
|
3488
3833
|
binary.jsonToBlob = jsonToBlob;
|
@@ -3497,7 +3842,7 @@ var Utils;
|
|
3497
3842
|
const response = await axios({
|
3498
3843
|
url,
|
3499
3844
|
method: 'get',
|
3500
|
-
responseType: 'blob'
|
3845
|
+
responseType: 'blob',
|
3501
3846
|
});
|
3502
3847
|
return response.data;
|
3503
3848
|
}
|