tnp-core 16.444.14 → 16.444.16
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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/core-imports.mjs +44 -24
- package/browser/esm2022/lib/core-models.mjs +1 -1
- package/browser/esm2022/lib/helpers.mjs +16 -14
- package/browser/fesm2022/tnp-core.mjs +95 -94
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/core-models.d.ts +1 -0
- package/browser/lib/helpers.d.ts +1 -2
- package/cli.backend.js +3 -3
- package/client/esm2022/lib/core-imports.mjs +44 -24
- package/client/esm2022/lib/core-models.mjs +1 -1
- package/client/esm2022/lib/helpers.mjs +16 -14
- package/client/fesm2022/tnp-core.mjs +95 -94
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/core-models.d.ts +1 -0
- package/client/lib/helpers.d.ts +1 -2
- package/client/package.json +32 -31
- package/lib/core-imports.d.ts +10 -10
- package/lib/core-imports.js +79 -35
- package/lib/core-imports.js.map +1 -1
- package/lib/core-models.d.ts +1 -0
- package/lib/core-models.js.map +1 -1
- package/lib/helpers.d.ts +4 -3
- package/lib/helpers.js +17 -21
- package/lib/helpers.js.map +1 -1
- package/lib/node-chalk-mock.js +3 -3
- package/lib/node-path-mock.js +3 -3
- package/package.json +2 -2
- package/tmp-environment.json +37 -36
- package/websql/esm2022/lib/core-imports.mjs +44 -24
- package/websql/esm2022/lib/core-models.mjs +1 -1
- package/websql/esm2022/lib/helpers.mjs +16 -14
- package/websql/fesm2022/tnp-core.mjs +95 -94
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/core-models.d.ts +1 -0
- package/websql/lib/helpers.d.ts +1 -2
@@ -1,3 +1,4 @@
|
|
1
|
+
import jQuery from 'jquery';
|
1
2
|
import * as _ from 'lodash';
|
2
3
|
export { _ };
|
3
4
|
import * as q from 'q';
|
@@ -8,7 +9,6 @@ import * as dateformat from 'dateformat';
|
|
8
9
|
export { dateformat };
|
9
10
|
import * as json5 from 'json5';
|
10
11
|
export { json5 };
|
11
|
-
import jQuery from 'jquery';
|
12
12
|
import { Subject } from 'rxjs';
|
13
13
|
import axios from 'axios';
|
14
14
|
|
@@ -23,6 +23,48 @@ const frameworkName = isBrowser ? 'firedev' : frameworkNameBe;
|
|
23
23
|
;
|
24
24
|
({}); // @--end-of-file-for-module=tnp-core lib/framework-name.ts
|
25
25
|
|
26
|
+
const allObj = {
|
27
|
+
black(a) {
|
28
|
+
console.log(a);
|
29
|
+
},
|
30
|
+
gray(a) {
|
31
|
+
console.log(a);
|
32
|
+
},
|
33
|
+
red(a) {
|
34
|
+
console.log(a);
|
35
|
+
},
|
36
|
+
green(a) {
|
37
|
+
console.log(a);
|
38
|
+
},
|
39
|
+
italic(a) {
|
40
|
+
console.log(a);
|
41
|
+
},
|
42
|
+
magenta(a) {
|
43
|
+
console.log(a);
|
44
|
+
},
|
45
|
+
bold(a) {
|
46
|
+
console.log(a);
|
47
|
+
},
|
48
|
+
underline(a) {
|
49
|
+
console.log(a);
|
50
|
+
},
|
51
|
+
};
|
52
|
+
const map = new Map();
|
53
|
+
const all = Object.keys(allObj).map(key => {
|
54
|
+
map.set(allObj[key], key);
|
55
|
+
return allObj[key];
|
56
|
+
});
|
57
|
+
for (let i = 0; i < all.length; i++) {
|
58
|
+
const e1 = all[i];
|
59
|
+
for (let j = 0; j < all.length; j++) {
|
60
|
+
const e2 = all[j]; // @ts-ignore
|
61
|
+
e1[map.get(e2)] = e2;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
const chalk$1 = allObj;
|
65
|
+
;
|
66
|
+
({}); // @--end-of-file-for-module=tnp-core lib/node-chalk-mock.ts
|
67
|
+
|
26
68
|
function assertPath(path) {
|
27
69
|
if (typeof path !== 'string') {
|
28
70
|
throw new TypeError('[firedev-core] Path must be a string. Received ' + JSON.stringify(path));
|
@@ -445,77 +487,11 @@ const path$1 = {
|
|
445
487
|
;
|
446
488
|
({}); // @--end-of-file-for-module=tnp-core lib/node-path-mock.ts
|
447
489
|
|
448
|
-
|
449
|
-
black(a) {
|
450
|
-
console.log(a);
|
451
|
-
},
|
452
|
-
gray(a) {
|
453
|
-
console.log(a);
|
454
|
-
},
|
455
|
-
red(a) {
|
456
|
-
console.log(a);
|
457
|
-
},
|
458
|
-
green(a) {
|
459
|
-
console.log(a);
|
460
|
-
},
|
461
|
-
italic(a) {
|
462
|
-
console.log(a);
|
463
|
-
},
|
464
|
-
magenta(a) {
|
465
|
-
console.log(a);
|
466
|
-
},
|
467
|
-
bold(a) {
|
468
|
-
console.log(a);
|
469
|
-
},
|
470
|
-
underline(a) {
|
471
|
-
console.log(a);
|
472
|
-
},
|
473
|
-
};
|
474
|
-
const map = new Map();
|
475
|
-
const all = Object.keys(allObj).map(key => {
|
476
|
-
map.set(allObj[key], key);
|
477
|
-
return allObj[key];
|
478
|
-
});
|
479
|
-
for (let i = 0; i < all.length; i++) {
|
480
|
-
const e1 = all[i];
|
481
|
-
for (let j = 0; j < all.length; j++) {
|
482
|
-
const e2 = all[j]; // @ts-ignore
|
483
|
-
e1[map.get(e2)] = e2;
|
484
|
-
}
|
485
|
-
}
|
486
|
-
const chalk$1 = allObj;
|
487
|
-
;
|
488
|
-
({}); // @--end-of-file-for-module=tnp-core lib/node-chalk-mock.ts
|
489
|
-
|
490
|
-
/* */
|
491
|
-
/* */
|
492
|
-
/* */
|
493
|
-
/* */
|
494
|
-
/* */
|
495
|
-
/* */
|
496
|
-
/* */
|
497
|
-
/* */
|
498
|
-
/* */
|
499
|
-
/* */
|
500
|
-
/* */
|
501
|
-
/* */
|
502
|
-
/* */
|
503
|
-
/* */
|
504
|
-
/* */
|
505
|
-
/* */
|
506
|
-
/* */
|
507
|
-
/* */
|
508
|
-
/* */
|
509
|
-
/* */
|
510
|
-
/* */
|
511
|
-
/* */
|
512
|
-
/* */
|
513
|
-
/* */
|
514
|
-
/* */
|
515
|
-
/* */
|
516
|
-
/* */
|
490
|
+
let forceTrace = false;
|
517
491
|
let $;
|
518
492
|
$ = jQuery;
|
493
|
+
/* */
|
494
|
+
/* */
|
519
495
|
let path = void 0;
|
520
496
|
/* */
|
521
497
|
/* */
|
@@ -526,6 +502,10 @@ let chalk = void 0;
|
|
526
502
|
/* */
|
527
503
|
// @ts-ignore
|
528
504
|
chalk = chalk$1;
|
505
|
+
/* */
|
506
|
+
/* */
|
507
|
+
/* */
|
508
|
+
/* */
|
529
509
|
/**
|
530
510
|
* transform unix path to win32 path
|
531
511
|
*/
|
@@ -546,23 +526,42 @@ const crossPlatformPath = (pathStringOrPathParts) => {
|
|
546
526
|
if (Array.isArray(pathStringOrPathParts)) {
|
547
527
|
pathStringOrPathParts = pathStringOrPathParts.join('/');
|
548
528
|
}
|
549
|
-
/* */
|
550
|
-
/* */
|
551
|
-
/* */
|
552
|
-
/* */
|
553
|
-
/* */
|
554
|
-
/* */
|
555
|
-
/* */
|
556
|
-
/* */
|
557
529
|
if (typeof pathStringOrPathParts !== 'string') {
|
558
530
|
return pathStringOrPathParts;
|
559
531
|
}
|
532
|
+
if (typeof pathStringOrPathParts === 'string' &&
|
533
|
+
/^[A-Z]\:/.test(pathStringOrPathParts)) {
|
534
|
+
pathStringOrPathParts = _.lowerFirst(pathStringOrPathParts);
|
535
|
+
}
|
560
536
|
const isExtendedLengthPath = /^\\\\\?\\/.test(pathStringOrPathParts);
|
561
537
|
const hasNonAscii = /[^\u0000-\u0080]+/.test(pathStringOrPathParts); // eslint-disable-line no-control-regex
|
562
|
-
if (isExtendedLengthPath
|
563
|
-
|
538
|
+
if (isExtendedLengthPath) {
|
539
|
+
console.warn(`[firedev-core][crossPlatformPath]: Path starts with \\\\,
|
540
|
+
this is not supported in crossPlatformPath`);
|
541
|
+
if (forceTrace) {
|
542
|
+
console.trace(`path: "${pathStringOrPathParts}"`);
|
543
|
+
}
|
544
|
+
}
|
545
|
+
if (hasNonAscii) {
|
546
|
+
console.warn(`[firedev-core][crossPlatformPath]: Path contains non-ascii characters`);
|
547
|
+
if (forceTrace) {
|
548
|
+
console.trace(`path: "${pathStringOrPathParts}"`);
|
549
|
+
}
|
550
|
+
}
|
551
|
+
pathStringOrPathParts = (pathStringOrPathParts || '')
|
552
|
+
.replace(/\\/g, '/')
|
553
|
+
.replace(/\/\//g, '/')
|
554
|
+
.replace(/\/\//g, '/'); // TODO probably not needed
|
555
|
+
let isWindows = false;
|
556
|
+
/* */
|
557
|
+
/* */
|
558
|
+
/* */
|
559
|
+
/* */
|
560
|
+
const regexWinPath1 = /^(\/)[a-zA-Z]\:/;
|
561
|
+
if (isWindows && regexWinPath1.test(pathStringOrPathParts)) {
|
562
|
+
pathStringOrPathParts = pathStringOrPathParts.slice(1);
|
564
563
|
}
|
565
|
-
return pathStringOrPathParts
|
564
|
+
return pathStringOrPathParts;
|
566
565
|
};
|
567
566
|
/* */
|
568
567
|
/* */
|
@@ -1514,18 +1513,6 @@ class HelpersCore extends HelpersMessages {
|
|
1514
1513
|
/* */
|
1515
1514
|
/* */
|
1516
1515
|
/* */
|
1517
|
-
getShell() {
|
1518
|
-
/* */
|
1519
|
-
/* */
|
1520
|
-
/* */
|
1521
|
-
/* */
|
1522
|
-
/* */
|
1523
|
-
/* */
|
1524
|
-
/* */
|
1525
|
-
/* */
|
1526
|
-
/* */
|
1527
|
-
return (void 0);
|
1528
|
-
}
|
1529
1516
|
get isRunningInGitBash() {
|
1530
1517
|
/* */
|
1531
1518
|
/* */
|
@@ -2155,7 +2142,6 @@ class HelpersCore extends HelpersMessages {
|
|
2155
2142
|
/* */
|
2156
2143
|
/* */
|
2157
2144
|
/* */
|
2158
|
-
/* */
|
2159
2145
|
async killProcessByPort(portOrPortsToKill, options) {
|
2160
2146
|
/* */
|
2161
2147
|
/* */
|
@@ -3225,6 +3211,14 @@ class HelpersCore extends HelpersMessages {
|
|
3225
3211
|
/* */
|
3226
3212
|
/* */
|
3227
3213
|
/* */
|
3214
|
+
/* */
|
3215
|
+
/* */
|
3216
|
+
/* */
|
3217
|
+
/* */
|
3218
|
+
/* */
|
3219
|
+
/* */
|
3220
|
+
/* */
|
3221
|
+
/* */
|
3228
3222
|
replaceLinesInFile(absoluteFilePath, lineReplaceFn) {
|
3229
3223
|
/* */
|
3230
3224
|
/* */
|
@@ -3552,6 +3546,13 @@ class HelpersCore extends HelpersMessages {
|
|
3552
3546
|
/* */
|
3553
3547
|
/* */
|
3554
3548
|
/* */
|
3549
|
+
/* */
|
3550
|
+
/* */
|
3551
|
+
/* */
|
3552
|
+
/* */
|
3553
|
+
/* */
|
3554
|
+
/* */
|
3555
|
+
/* */
|
3555
3556
|
hideNodeWarnings() {
|
3556
3557
|
/* */
|
3557
3558
|
/* */
|