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
|
@@ -665,31 +717,37 @@ class HelpersIsomorphic {
|
|
665
717
|
}
|
666
718
|
get isElectron() {
|
667
719
|
// @ts-ignore
|
668
|
-
if (typeof window !== 'undefined' &&
|
720
|
+
if (typeof window !== 'undefined' &&
|
721
|
+
typeof window.process === 'object' &&
|
722
|
+
window.process.type === 'renderer') {
|
669
723
|
return true;
|
670
724
|
}
|
671
725
|
// @ts-ignore
|
672
|
-
if (typeof process !== 'undefined' &&
|
726
|
+
if (typeof process !== 'undefined' &&
|
727
|
+
typeof process.versions === 'object' &&
|
728
|
+
!!process.versions.electron) {
|
673
729
|
return true;
|
674
730
|
}
|
675
|
-
if (typeof navigator === 'object' &&
|
731
|
+
if (typeof navigator === 'object' &&
|
732
|
+
typeof navigator.userAgent === 'string' &&
|
733
|
+
navigator.userAgent.indexOf('Electron') >= 0) {
|
676
734
|
return true;
|
677
735
|
}
|
678
736
|
return false;
|
679
737
|
}
|
680
738
|
contain(arr, item) {
|
681
|
-
return arr.filter(l => {
|
739
|
+
return (arr.filter(l => {
|
682
740
|
if (l instanceof RegExp) {
|
683
741
|
return l.test(item);
|
684
742
|
}
|
685
743
|
if (l === item) {
|
686
744
|
return true;
|
687
745
|
}
|
688
|
-
if (
|
746
|
+
if (item.match && typeof item.match === 'function' ? item.match(l) : false) {
|
689
747
|
return true;
|
690
748
|
}
|
691
749
|
return false;
|
692
|
-
}).length > 0;
|
750
|
+
}).length > 0);
|
693
751
|
}
|
694
752
|
}
|
695
753
|
;
|
@@ -746,7 +804,6 @@ const KEY_IMPORTANTCE = {
|
|
746
804
|
/* */
|
747
805
|
/* */
|
748
806
|
/* */
|
749
|
-
/* */
|
750
807
|
const LIMIT = 10;
|
751
808
|
class HelpersMessages extends HelpersIsomorphic {
|
752
809
|
msgCacheClear() {
|
@@ -766,6 +823,9 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
766
823
|
/* */
|
767
824
|
/* */
|
768
825
|
/* */
|
826
|
+
/* */
|
827
|
+
/* */
|
828
|
+
/* */
|
769
829
|
}
|
770
830
|
}
|
771
831
|
error(details, noExit = false, noTrace = false) {
|
@@ -823,8 +883,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
823
883
|
/* */
|
824
884
|
/* */
|
825
885
|
/* */
|
826
|
-
/* */
|
827
|
-
/* */
|
828
886
|
}
|
829
887
|
info(details, repeatable = false) {
|
830
888
|
/* */
|
@@ -871,7 +929,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
871
929
|
/* */
|
872
930
|
/* */
|
873
931
|
/* */
|
874
|
-
/* */
|
875
932
|
}
|
876
933
|
success(details) {
|
877
934
|
if (Helpers.isBrowser) {
|
@@ -915,7 +972,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
915
972
|
/* */
|
916
973
|
/* */
|
917
974
|
/* */
|
918
|
-
/* */
|
919
975
|
}
|
920
976
|
/**
|
921
977
|
*
|
@@ -974,6 +1030,7 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
974
1030
|
/* */
|
975
1031
|
/* */
|
976
1032
|
/* */
|
1033
|
+
/* */
|
977
1034
|
}
|
978
1035
|
taskDone(details, isLessImportant = false) {
|
979
1036
|
if (Helpers.isBrowser) {
|
@@ -1031,6 +1088,7 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
1031
1088
|
/* */
|
1032
1089
|
/* */
|
1033
1090
|
/* */
|
1091
|
+
/* */
|
1034
1092
|
}
|
1035
1093
|
log(details, debugLevel = 0) {
|
1036
1094
|
if (Helpers.isBrowser) {
|
@@ -1087,10 +1145,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
1087
1145
|
/* */
|
1088
1146
|
/* */
|
1089
1147
|
/* */
|
1090
|
-
/* */
|
1091
|
-
/* */
|
1092
|
-
/* */
|
1093
|
-
/* */
|
1094
1148
|
}
|
1095
1149
|
/* */
|
1096
1150
|
/* */
|
@@ -1182,6 +1236,13 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
1182
1236
|
/* */
|
1183
1237
|
/* */
|
1184
1238
|
/* */
|
1239
|
+
/* */
|
1240
|
+
/* */
|
1241
|
+
/* */
|
1242
|
+
/* */
|
1243
|
+
/* */
|
1244
|
+
/* */
|
1245
|
+
/* */
|
1185
1246
|
}
|
1186
1247
|
}
|
1187
1248
|
function transformData(details) {
|
@@ -1254,7 +1315,8 @@ class HelpersCore extends HelpersMessages {
|
|
1254
1315
|
if (!this.isElectron) {
|
1255
1316
|
return;
|
1256
1317
|
}
|
1257
|
-
return window.require('electron')
|
1318
|
+
return window.require('electron')
|
1319
|
+
.ipcRenderer;
|
1258
1320
|
}
|
1259
1321
|
/**
|
1260
1322
|
* get electron web frame
|
@@ -1278,8 +1340,7 @@ class HelpersCore extends HelpersMessages {
|
|
1278
1340
|
/* */
|
1279
1341
|
return (void 0);
|
1280
1342
|
}
|
1281
|
-
getElectronWindow({ allowRunningInsecureContent = true } = {}) {
|
1282
|
-
/* */
|
1343
|
+
getElectronWindow({ allowRunningInsecureContent = true, } = {}) {
|
1283
1344
|
/* */
|
1284
1345
|
/* */
|
1285
1346
|
/* */
|
@@ -1367,7 +1428,8 @@ class HelpersCore extends HelpersMessages {
|
|
1367
1428
|
removeEmptyLineFromString(str) {
|
1368
1429
|
const lines = (str || '').split('\n');
|
1369
1430
|
let previousWasEmpty = false;
|
1370
|
-
return lines
|
1431
|
+
return lines
|
1432
|
+
.filter(line => {
|
1371
1433
|
if (line.trim() === '') {
|
1372
1434
|
if (previousWasEmpty) {
|
1373
1435
|
return false;
|
@@ -1381,9 +1443,9 @@ class HelpersCore extends HelpersMessages {
|
|
1381
1443
|
previousWasEmpty = false;
|
1382
1444
|
return true;
|
1383
1445
|
}
|
1384
|
-
})
|
1446
|
+
})
|
1447
|
+
.join('\n');
|
1385
1448
|
}
|
1386
|
-
;
|
1387
1449
|
/**
|
1388
1450
|
* @deprecated
|
1389
1451
|
*/
|
@@ -1421,6 +1483,8 @@ class HelpersCore extends HelpersMessages {
|
|
1421
1483
|
/* */
|
1422
1484
|
/* */
|
1423
1485
|
/* */
|
1486
|
+
/* */
|
1487
|
+
/* */
|
1424
1488
|
return (void 0);
|
1425
1489
|
}
|
1426
1490
|
remove(fileOrFolderPathOrPatter, exactFolder = false) {
|
@@ -1452,7 +1516,9 @@ class HelpersCore extends HelpersMessages {
|
|
1452
1516
|
isClass(funcOrClass) {
|
1453
1517
|
let isClass = false;
|
1454
1518
|
if (typeof funcOrClass === 'function') {
|
1455
|
-
isClass =
|
1519
|
+
isClass =
|
1520
|
+
!!funcOrClass.prototype &&
|
1521
|
+
Object.getOwnPropertyNames(funcOrClass.prototype).filter(f => f !== 'constructor').length > 0;
|
1456
1522
|
}
|
1457
1523
|
return isClass;
|
1458
1524
|
}
|
@@ -1723,6 +1789,27 @@ class HelpersCore extends HelpersMessages {
|
|
1723
1789
|
/* */
|
1724
1790
|
/* */
|
1725
1791
|
/* */
|
1792
|
+
/* */
|
1793
|
+
/* */
|
1794
|
+
/* */
|
1795
|
+
/* */
|
1796
|
+
/* */
|
1797
|
+
/* */
|
1798
|
+
/* */
|
1799
|
+
/* */
|
1800
|
+
/* */
|
1801
|
+
/* */
|
1802
|
+
/* */
|
1803
|
+
/* */
|
1804
|
+
/* */
|
1805
|
+
/* */
|
1806
|
+
/* */
|
1807
|
+
/* */
|
1808
|
+
/* */
|
1809
|
+
/* */
|
1810
|
+
/* */
|
1811
|
+
/* */
|
1812
|
+
/* */
|
1726
1813
|
/**
|
1727
1814
|
* symlink may have existed or unexisted destiantion url
|
1728
1815
|
* @param destUrl M
|
@@ -1759,6 +1846,8 @@ class HelpersCore extends HelpersMessages {
|
|
1759
1846
|
/* */
|
1760
1847
|
/* */
|
1761
1848
|
/* */
|
1849
|
+
/* */
|
1850
|
+
/* */
|
1762
1851
|
return (void 0);
|
1763
1852
|
}
|
1764
1853
|
isSymlinkFileExitedOrUnexisted(filePath) {
|
@@ -1793,6 +1882,11 @@ class HelpersCore extends HelpersMessages {
|
|
1793
1882
|
/* */
|
1794
1883
|
/* */
|
1795
1884
|
/* */
|
1885
|
+
/* */
|
1886
|
+
/* */
|
1887
|
+
/* */
|
1888
|
+
/* */
|
1889
|
+
/* */
|
1796
1890
|
return (void 0);
|
1797
1891
|
}
|
1798
1892
|
/**
|
@@ -1814,6 +1908,13 @@ class HelpersCore extends HelpersMessages {
|
|
1814
1908
|
/* */
|
1815
1909
|
/* */
|
1816
1910
|
/* */
|
1911
|
+
/* */
|
1912
|
+
/* */
|
1913
|
+
/* */
|
1914
|
+
/* */
|
1915
|
+
/* */
|
1916
|
+
/* */
|
1917
|
+
/* */
|
1817
1918
|
return (void 0);
|
1818
1919
|
}
|
1819
1920
|
/* */
|
@@ -1854,18 +1955,24 @@ class HelpersCore extends HelpersMessages {
|
|
1854
1955
|
/* */
|
1855
1956
|
/* */
|
1856
1957
|
/* */
|
1958
|
+
/* */
|
1959
|
+
/* */
|
1960
|
+
/* */
|
1961
|
+
/* */
|
1962
|
+
/* */
|
1857
1963
|
return (void 0);
|
1858
1964
|
}
|
1859
1965
|
/**
|
1860
1966
|
* this is HACK for running procesess inside processes
|
1861
1967
|
*/
|
1862
1968
|
_fixCommand(command) {
|
1863
|
-
if ((command.startsWith('tnp ') || command.startsWith('firedev ')) // TODO every cli projects here that uses run and need to kill process easly!
|
1864
|
-
&&
|
1865
|
-
|
1969
|
+
if ((command.startsWith('tnp ') || command.startsWith('firedev ')) && // TODO every cli projects here that uses run and need to kill process easly!
|
1970
|
+
command.search('-spinner=false') === -1 &&
|
1971
|
+
command.search('-spinner=off') === -1) {
|
1866
1972
|
command = `${command} -spinner=false`;
|
1867
1973
|
}
|
1868
|
-
if (global.skipCoreCheck &&
|
1974
|
+
if (global.skipCoreCheck &&
|
1975
|
+
(command.startsWith('tnp ') || command.startsWith('firedev '))) {
|
1869
1976
|
command = `${command} --skipCoreCheck`;
|
1870
1977
|
}
|
1871
1978
|
return command;
|
@@ -1926,8 +2033,6 @@ class HelpersCore extends HelpersMessages {
|
|
1926
2033
|
/* */
|
1927
2034
|
/* */
|
1928
2035
|
/* */
|
1929
|
-
/* */
|
1930
|
-
/* */
|
1931
2036
|
};
|
1932
2037
|
}
|
1933
2038
|
wait(second) {
|
@@ -2012,6 +2117,10 @@ class HelpersCore extends HelpersMessages {
|
|
2012
2117
|
/* */
|
2013
2118
|
/* */
|
2014
2119
|
/* */
|
2120
|
+
/* */
|
2121
|
+
/* */
|
2122
|
+
/* */
|
2123
|
+
/* */
|
2015
2124
|
async killProcessByPort(portOrPortsToKill, options) {
|
2016
2125
|
/* */
|
2017
2126
|
/* */
|
@@ -2050,6 +2159,13 @@ class HelpersCore extends HelpersMessages {
|
|
2050
2159
|
/* */
|
2051
2160
|
/* */
|
2052
2161
|
/* */
|
2162
|
+
/* */
|
2163
|
+
/* */
|
2164
|
+
/* */
|
2165
|
+
/* */
|
2166
|
+
/* */
|
2167
|
+
/* */
|
2168
|
+
/* */
|
2053
2169
|
return (void 0);
|
2054
2170
|
}
|
2055
2171
|
async killOnPort(portOrPortsToKill, options) {
|
@@ -2079,6 +2195,10 @@ class HelpersCore extends HelpersMessages {
|
|
2079
2195
|
/* */
|
2080
2196
|
/* */
|
2081
2197
|
/* */
|
2198
|
+
/* */
|
2199
|
+
/* */
|
2200
|
+
/* */
|
2201
|
+
/* */
|
2082
2202
|
}
|
2083
2203
|
run(command, options) {
|
2084
2204
|
command = Helpers._fixCommand(command);
|
@@ -2091,33 +2211,47 @@ class HelpersCore extends HelpersMessages {
|
|
2091
2211
|
/* */
|
2092
2212
|
/* */
|
2093
2213
|
return {
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2214
|
+
/**
|
2215
|
+
* start command as synchronous nodej proces
|
2216
|
+
*/
|
2217
|
+
sync() {
|
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
|
+
return (void 0);
|
2250
|
+
},
|
2251
|
+
/**
|
2252
|
+
* start command as asynchronous nodej proces
|
2253
|
+
* @param detach (default: false) - if true process will be detached
|
2254
|
+
*/
|
2121
2255
|
async(detach = false, mockFun) {
|
2122
2256
|
if (mockFun) {
|
2123
2257
|
const subStdoutSub = new Subject();
|
@@ -2132,7 +2266,7 @@ class HelpersCore extends HelpersMessages {
|
|
2132
2266
|
stdoutCallback(d);
|
2133
2267
|
}));
|
2134
2268
|
}
|
2135
|
-
}
|
2269
|
+
},
|
2136
2270
|
},
|
2137
2271
|
stderr: {
|
2138
2272
|
on(action, stdoutCallback) {
|
@@ -2141,7 +2275,7 @@ class HelpersCore extends HelpersMessages {
|
|
2141
2275
|
stdoutCallback(d);
|
2142
2276
|
}));
|
2143
2277
|
}
|
2144
|
-
}
|
2278
|
+
},
|
2145
2279
|
},
|
2146
2280
|
on(action, exitFun) {
|
2147
2281
|
if (action == 'exit') {
|
@@ -2163,24 +2297,27 @@ class HelpersCore extends HelpersMessages {
|
|
2163
2297
|
}
|
2164
2298
|
WEBSQL_PROC_MOCK_PROCESSES_PPID[procDummy.ppid].childProcesses.push(procDummy.pid);
|
2165
2299
|
const checkIfProcessShouldBeDead = () => {
|
2166
|
-
return _.isNil(WEBSQL_PROC_MOCK_PROCESSES_PID[procDummy.pid]) ||
|
2300
|
+
return (_.isNil(WEBSQL_PROC_MOCK_PROCESSES_PID[procDummy.pid]) ||
|
2301
|
+
_.isNil(WEBSQL_PROC_MOCK_PROCESSES_PPID[procDummy.ppid]));
|
2167
2302
|
};
|
2168
2303
|
const f = Helpers.runSyncOrAsync({
|
2169
2304
|
functionFn: mockFun,
|
2170
2305
|
arrayOfParams: [
|
2171
|
-
|
2306
|
+
d => {
|
2172
2307
|
setTimeout(() => {
|
2173
2308
|
subStdoutSub.next(d);
|
2174
2309
|
});
|
2175
|
-
},
|
2310
|
+
},
|
2311
|
+
d => {
|
2176
2312
|
setTimeout(() => {
|
2177
2313
|
subStderSub.next(d);
|
2178
2314
|
});
|
2179
|
-
},
|
2315
|
+
},
|
2316
|
+
() => {
|
2180
2317
|
const shouldBeDead = checkIfProcessShouldBeDead();
|
2181
2318
|
return shouldBeDead;
|
2182
|
-
}
|
2183
|
-
]
|
2319
|
+
},
|
2320
|
+
],
|
2184
2321
|
});
|
2185
2322
|
f.then(exitCode => {
|
2186
2323
|
if (_.isNil(exitCode)) {
|
@@ -2190,7 +2327,7 @@ class HelpersCore extends HelpersMessages {
|
|
2190
2327
|
exitSub.next(exitCode);
|
2191
2328
|
subscribtions.forEach(s => s.unsubscribe());
|
2192
2329
|
});
|
2193
|
-
}).catch(
|
2330
|
+
}).catch(e => {
|
2194
2331
|
console.error(e);
|
2195
2332
|
console.error(`Something wrong with your mock funciton`);
|
2196
2333
|
exitSub.next(1);
|
@@ -2204,109 +2341,116 @@ class HelpersCore extends HelpersMessages {
|
|
2204
2341
|
/* */
|
2205
2342
|
return (void 0);
|
2206
2343
|
},
|
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
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2344
|
+
/**
|
2345
|
+
* start command as asynchronous nodej proces inside promise
|
2346
|
+
*/
|
2347
|
+
asyncAsPromise() {
|
2348
|
+
/* */
|
2349
|
+
/* */
|
2350
|
+
/* */
|
2351
|
+
/* */
|
2352
|
+
/* */
|
2353
|
+
/* */
|
2354
|
+
/* */
|
2355
|
+
/* */
|
2356
|
+
/* */
|
2357
|
+
/* */
|
2358
|
+
/* */
|
2359
|
+
/* */
|
2360
|
+
/* */
|
2361
|
+
/* */
|
2362
|
+
/* */
|
2363
|
+
/* */
|
2364
|
+
/* */
|
2365
|
+
return (void 0);
|
2366
|
+
},
|
2367
|
+
/**
|
2368
|
+
* start command as asynchronous nodej proces inside promise
|
2369
|
+
* and wait until output contains some string
|
2370
|
+
*/
|
2371
|
+
unitlOutputContains(stdoutMsg, stderMsg, timeout = 0, stdoutOutputContainsCallback) {
|
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
|
+
/* */
|
2448
|
+
/* */
|
2449
|
+
/* */
|
2450
|
+
/* */
|
2451
|
+
/* */
|
2452
|
+
return (void 0);
|
2453
|
+
},
|
2310
2454
|
};
|
2311
2455
|
}
|
2312
2456
|
async questionYesNo(message, callbackTrue, callbackFalse, defaultValue = true,
|
@@ -2760,6 +2904,125 @@ class HelpersCore extends HelpersMessages {
|
|
2760
2904
|
/* */
|
2761
2905
|
/* */
|
2762
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
|
+
/* */
|
3021
|
+
/* */
|
3022
|
+
/* */
|
3023
|
+
/* */
|
3024
|
+
/* */
|
3025
|
+
/* */
|
2763
3026
|
/**
|
2764
3027
|
* Quick fix for object values
|
2765
3028
|
* @deprecated
|
@@ -2895,10 +3158,49 @@ class HelpersCore extends HelpersMessages {
|
|
2895
3158
|
/* */
|
2896
3159
|
/* */
|
2897
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
|
+
/* */
|
3192
|
+
/* */
|
3193
|
+
/* */
|
3194
|
+
/* */
|
3195
|
+
/* */
|
3196
|
+
/* */
|
2898
3197
|
replaceLinesInFile(absoluteFilePath, lineReplaceFn) {
|
2899
3198
|
/* */
|
2900
3199
|
/* */
|
2901
3200
|
/* */
|
3201
|
+
/* */
|
3202
|
+
/* */
|
3203
|
+
/* */
|
2902
3204
|
}
|
2903
3205
|
/* */
|
2904
3206
|
/* */
|
@@ -3186,6 +3488,39 @@ class HelpersCore extends HelpersMessages {
|
|
3186
3488
|
/* */
|
3187
3489
|
/* */
|
3188
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
|
+
/* */
|
3519
|
+
/* */
|
3520
|
+
/* */
|
3521
|
+
/* */
|
3522
|
+
/* */
|
3523
|
+
/* */
|
3189
3524
|
hideNodeWarnings() {
|
3190
3525
|
/* */
|
3191
3526
|
/* */
|
@@ -3197,9 +3532,10 @@ class HelpersCore extends HelpersMessages {
|
|
3197
3532
|
|
3198
3533
|
const CoreConfig = {
|
3199
3534
|
message: {
|
3200
|
-
globalSystemToolMode: 'globalSystemToolMode'
|
3201
|
-
}
|
3535
|
+
globalSystemToolMode: 'globalSystemToolMode',
|
3536
|
+
},
|
3202
3537
|
};
|
3538
|
+
;
|
3203
3539
|
({}); // @--end-of-file-for-module=tnp-core lib/core-config.ts
|
3204
3540
|
|
3205
3541
|
class PROGRESS_DATA {
|
@@ -3211,6 +3547,9 @@ class PROGRESS_DATA {
|
|
3211
3547
|
/* */
|
3212
3548
|
/* */
|
3213
3549
|
/* */
|
3550
|
+
/* */
|
3551
|
+
/* */
|
3552
|
+
/* */
|
3214
3553
|
}
|
3215
3554
|
static resolveFrom(chunk, callbackOnFounded, checkSplit = true) {
|
3216
3555
|
let progress;
|
@@ -3426,16 +3765,19 @@ var Utils;
|
|
3426
3765
|
/* */
|
3427
3766
|
/* */
|
3428
3767
|
/* */
|
3768
|
+
/* */
|
3769
|
+
/* */
|
3770
|
+
/* */
|
3429
3771
|
async function fileToBlob(file) {
|
3430
|
-
return new Blob([new Uint8Array(await file.arrayBuffer())], {
|
3772
|
+
return new Blob([new Uint8Array(await file.arrayBuffer())], {
|
3773
|
+
type: file.type,
|
3774
|
+
});
|
3431
3775
|
}
|
3432
3776
|
binary.fileToBlob = fileToBlob;
|
3433
|
-
;
|
3434
3777
|
async function blobToFile(blob, nameForFile = 'my-file-name') {
|
3435
3778
|
if (!nameForFile) {
|
3436
|
-
nameForFile = 'nonamefile' +
|
3779
|
+
nameForFile = 'nonamefile' + new Date().getTime();
|
3437
3780
|
}
|
3438
|
-
;
|
3439
3781
|
// @ts-ignore
|
3440
3782
|
return new File([blob], nameForFile);
|
3441
3783
|
}
|
@@ -3463,6 +3805,9 @@ var Utils;
|
|
3463
3805
|
/* */
|
3464
3806
|
/* */
|
3465
3807
|
/* */
|
3808
|
+
/* */
|
3809
|
+
/* */
|
3810
|
+
/* */
|
3466
3811
|
async function textToBlob(text, type = 'text/plain') {
|
3467
3812
|
const blob = new Blob([text], { type });
|
3468
3813
|
return blob;
|
@@ -3485,7 +3830,9 @@ var Utils;
|
|
3485
3830
|
}
|
3486
3831
|
binary.fileToText = fileToText;
|
3487
3832
|
async function jsonToBlob(jsonObj) {
|
3488
|
-
const blob = new Blob([JSON.stringify(jsonObj, null, 2)], {
|
3833
|
+
const blob = new Blob([JSON.stringify(jsonObj, null, 2)], {
|
3834
|
+
type: 'application/json',
|
3835
|
+
});
|
3489
3836
|
return blob;
|
3490
3837
|
}
|
3491
3838
|
binary.jsonToBlob = jsonToBlob;
|
@@ -3500,7 +3847,7 @@ var Utils;
|
|
3500
3847
|
const response = await axios({
|
3501
3848
|
url,
|
3502
3849
|
method: 'get',
|
3503
|
-
responseType: 'blob'
|
3850
|
+
responseType: 'blob',
|
3504
3851
|
});
|
3505
3852
|
return response.data;
|
3506
3853
|
}
|