tnp-core 16.5.8 → 16.5.10
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 +5 -1
- package/browser/esm2022/lib/core-models.mjs +1 -2
- package/browser/esm2022/lib/helpers-messages.mjs +1 -33
- package/browser/esm2022/lib/helpers.mjs +2 -17
- package/browser/esm2022/lib/node-chalk-mock.mjs +1 -3
- package/browser/esm2022/lib/node-path-mock.mjs +1 -57
- package/browser/esm2022/lib/progress-data.mjs +1 -2
- package/browser/esm2022/lib/utils.mjs +2 -15
- package/browser/fesm2022/tnp-core.mjs +6 -122
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/utils.d.ts +1 -1
- package/cli.backend.js +3 -3
- package/client/esm2022/lib/core-imports.mjs +5 -1
- package/client/esm2022/lib/core-models.mjs +1 -2
- package/client/esm2022/lib/helpers-messages.mjs +1 -33
- package/client/esm2022/lib/helpers.mjs +2 -17
- package/client/esm2022/lib/node-chalk-mock.mjs +1 -3
- package/client/esm2022/lib/node-path-mock.mjs +1 -57
- package/client/esm2022/lib/progress-data.mjs +1 -2
- package/client/esm2022/lib/utils.mjs +2 -15
- package/client/fesm2022/tnp-core.mjs +6 -122
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/utils.d.ts +1 -1
- package/client/package.json +32 -32
- package/lib/core-imports.js +6 -1
- package/lib/core-imports.js.map +1 -1
- package/lib/node-chalk-mock.js +3 -3
- package/lib/node-path-mock.js +3 -3
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +2 -2
- package/lib/utils.js.map +1 -1
- package/package.json +2 -2
- package/tmp-environment.json +36 -36
- package/websql/esm2022/lib/core-imports.mjs +5 -1
- package/websql/esm2022/lib/core-models.mjs +1 -2
- package/websql/esm2022/lib/helpers-messages.mjs +1 -33
- package/websql/esm2022/lib/helpers.mjs +2 -17
- package/websql/esm2022/lib/node-chalk-mock.mjs +1 -3
- package/websql/esm2022/lib/node-path-mock.mjs +1 -57
- package/websql/esm2022/lib/progress-data.mjs +1 -2
- package/websql/esm2022/lib/utils.mjs +2 -15
- package/websql/fesm2022/tnp-core.mjs +6 -122
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/utils.d.ts +1 -1
@@ -26,7 +26,6 @@ function assertPath(path) {
|
|
26
26
|
throw new TypeError('[firedev-core] Path must be a string. Received ' + JSON.stringify(path));
|
27
27
|
}
|
28
28
|
}
|
29
|
-
/* \/\/ Resolves \. and \.\. elements in a path with directory names */
|
30
29
|
function normalizeStringPosix(path, allowAboveRoot) {
|
31
30
|
var res = '';
|
32
31
|
var lastSegmentLength = 0;
|
@@ -42,7 +41,6 @@ function normalizeStringPosix(path, allowAboveRoot) {
|
|
42
41
|
code = 47 /*/*/;
|
43
42
|
if (code === 47 /*/*/) {
|
44
43
|
if (lastSlash === i - 1 || dots === 1) {
|
45
|
-
/* \/\/ NOOP */
|
46
44
|
}
|
47
45
|
else if (lastSlash !== i - 1 && dots === 2) {
|
48
46
|
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {
|
@@ -109,7 +107,6 @@ function _format(sep, pathObject) {
|
|
109
107
|
return dir + sep + base;
|
110
108
|
}
|
111
109
|
const path$1 = {
|
112
|
-
/* \/\/ path\.resolve\(\[from \.\.\.\], to\) */
|
113
110
|
resolve: function resolve(pathToResovle) {
|
114
111
|
return pathToResovle;
|
115
112
|
},
|
@@ -119,7 +116,6 @@ const path$1 = {
|
|
119
116
|
return '.';
|
120
117
|
var isAbsolute = pathArg.charCodeAt(0) === 47 /*/*/;
|
121
118
|
var trailingSeparator = pathArg.charCodeAt(pathArg.length - 1) === 47 /*/*/;
|
122
|
-
/* \/\/ Normalize the path */
|
123
119
|
pathArg = normalizeStringPosix(pathArg, !isAbsolute);
|
124
120
|
if (pathArg.length === 0 && !isAbsolute)
|
125
121
|
pathArg = '.';
|
@@ -160,7 +156,6 @@ const path$1 = {
|
|
160
156
|
to = path$1.resolve(to);
|
161
157
|
if (from === to)
|
162
158
|
return '';
|
163
|
-
/* \/\/ Trim any leading backslashes */
|
164
159
|
var fromStart = 1;
|
165
160
|
for (; fromStart < from.length; ++fromStart) {
|
166
161
|
if (from.charCodeAt(fromStart) !== 47 /*/*/)
|
@@ -168,7 +163,6 @@ const path$1 = {
|
|
168
163
|
}
|
169
164
|
var fromEnd = from.length;
|
170
165
|
var fromLen = fromEnd - fromStart;
|
171
|
-
/* \/\/ Trim any leading backslashes */
|
172
166
|
var toStart = 1;
|
173
167
|
for (; toStart < to.length; ++toStart) {
|
174
168
|
if (to.charCodeAt(toStart) !== 47 /*/*/)
|
@@ -176,7 +170,6 @@ const path$1 = {
|
|
176
170
|
}
|
177
171
|
var toEnd = to.length;
|
178
172
|
var toLen = toEnd - toStart;
|
179
|
-
/* \/\/ Compare paths to find the longest common path from root */
|
180
173
|
var length = fromLen < toLen ? fromLen : toLen;
|
181
174
|
var lastCommonSep = -1;
|
182
175
|
var i = 0;
|
@@ -184,25 +177,17 @@ const path$1 = {
|
|
184
177
|
if (i === length) {
|
185
178
|
if (toLen > length) {
|
186
179
|
if (to.charCodeAt(toStart + i) === 47 /*/*/) {
|
187
|
-
/* \/\/ We get here if `from` is the exact base path for `to`\. */
|
188
|
-
/* \/\/ For example: from='\/foo\/bar'; to='\/foo\/bar\/baz' */
|
189
180
|
return to.slice(toStart + i + 1);
|
190
181
|
}
|
191
182
|
else if (i === 0) {
|
192
|
-
/* \/\/ We get here if `from` is the root */
|
193
|
-
/* \/\/ For example: from='\/'; to='\/foo' */
|
194
183
|
return to.slice(toStart + i);
|
195
184
|
}
|
196
185
|
}
|
197
186
|
else if (fromLen > length) {
|
198
187
|
if (from.charCodeAt(fromStart + i) === 47 /*/*/) {
|
199
|
-
/* \/\/ We get here if `to` is the exact base path for `from`\. */
|
200
|
-
/* \/\/ For example: from='\/foo\/bar\/baz'; to='\/foo\/bar' */
|
201
188
|
lastCommonSep = i;
|
202
189
|
}
|
203
190
|
else if (i === 0) {
|
204
|
-
/* \/\/ We get here if `to` is the root\. */
|
205
|
-
/* \/\/ For example: from='\/foo'; to='\/' */
|
206
191
|
lastCommonSep = 0;
|
207
192
|
}
|
208
193
|
}
|
@@ -216,8 +201,6 @@ const path$1 = {
|
|
216
201
|
lastCommonSep = i;
|
217
202
|
}
|
218
203
|
var out = '';
|
219
|
-
/* \/\/ Generate the relative path based on the path difference between `to` */
|
220
|
-
/* \/\/ and `from` */
|
221
204
|
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
222
205
|
if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {
|
223
206
|
if (out.length === 0)
|
@@ -226,8 +209,6 @@ const path$1 = {
|
|
226
209
|
out += '/..';
|
227
210
|
}
|
228
211
|
}
|
229
|
-
/* \/\/ Lastly, append the rest of the destination \(`to`\) path that comes after */
|
230
|
-
/* \/\/ the common path parts */
|
231
212
|
if (out.length > 0)
|
232
213
|
return out + to.slice(toStart + lastCommonSep);
|
233
214
|
else {
|
@@ -257,7 +238,6 @@ const path$1 = {
|
|
257
238
|
}
|
258
239
|
}
|
259
240
|
else {
|
260
|
-
/* \/\/ We saw the first non\-path separator */
|
261
241
|
matchedSlash = false;
|
262
242
|
}
|
263
243
|
}
|
@@ -283,8 +263,6 @@ const path$1 = {
|
|
283
263
|
for (i = pathArg.length - 1; i >= 0; --i) {
|
284
264
|
var code = pathArg.charCodeAt(i);
|
285
265
|
if (code === 47 /*/*/) {
|
286
|
-
/* \/\/ If we reached a path separator that was not part of a set of path */
|
287
|
-
/* \/\/ separators at the end of the string, stop now */
|
288
266
|
if (!matchedSlash) {
|
289
267
|
start = i + 1;
|
290
268
|
break;
|
@@ -292,23 +270,16 @@ const path$1 = {
|
|
292
270
|
}
|
293
271
|
else {
|
294
272
|
if (firstNonSlashEnd === -1) {
|
295
|
-
/* \/\/ We saw the first non\-path separator, remember this index in case */
|
296
|
-
/* \/\/ we need it if the extension ends up not matching */
|
297
273
|
matchedSlash = false;
|
298
274
|
firstNonSlashEnd = i + 1;
|
299
275
|
}
|
300
276
|
if (extIdx >= 0) {
|
301
|
-
/* \/\/ Try to match the explicit extension */
|
302
277
|
if (code === ext.charCodeAt(extIdx)) {
|
303
278
|
if (--extIdx === -1) {
|
304
|
-
/* \/\/ We matched the extension, so mark this as the end of our path */
|
305
|
-
/* \/\/ component */
|
306
279
|
end = i;
|
307
280
|
}
|
308
281
|
}
|
309
282
|
else {
|
310
|
-
/* \/\/ Extension does not match, so our result is the entire path */
|
311
|
-
/* \/\/ component */
|
312
283
|
extIdx = -1;
|
313
284
|
end = firstNonSlashEnd;
|
314
285
|
}
|
@@ -324,16 +295,12 @@ const path$1 = {
|
|
324
295
|
else {
|
325
296
|
for (i = pathArg.length - 1; i >= 0; --i) {
|
326
297
|
if (pathArg.charCodeAt(i) === 47 /*/*/) {
|
327
|
-
/* \/\/ If we reached a path separator that was not part of a set of path */
|
328
|
-
/* \/\/ separators at the end of the string, stop now */
|
329
298
|
if (!matchedSlash) {
|
330
299
|
start = i + 1;
|
331
300
|
break;
|
332
301
|
}
|
333
302
|
}
|
334
303
|
else if (end === -1) {
|
335
|
-
/* \/\/ We saw the first non\-path separator, mark this as the end of our */
|
336
|
-
/* \/\/ path component */
|
337
304
|
matchedSlash = false;
|
338
305
|
end = i + 1;
|
339
306
|
}
|
@@ -349,14 +316,10 @@ const path$1 = {
|
|
349
316
|
var startPart = 0;
|
350
317
|
var end = -1;
|
351
318
|
var matchedSlash = true;
|
352
|
-
/* \/\/ Track the state of characters \(if any\) we see before our first dot and */
|
353
|
-
/* \/\/ after any path separator we find */
|
354
319
|
var preDotState = 0;
|
355
320
|
for (var i = pathArg.length - 1; i >= 0; --i) {
|
356
321
|
var code = pathArg.charCodeAt(i);
|
357
322
|
if (code === 47 /*/*/) {
|
358
|
-
/* \/\/ If we reached a path separator that was not part of a set of path */
|
359
|
-
/* \/\/ separators at the end of the string, stop now */
|
360
323
|
if (!matchedSlash) {
|
361
324
|
startPart = i + 1;
|
362
325
|
break;
|
@@ -364,28 +327,21 @@ const path$1 = {
|
|
364
327
|
continue;
|
365
328
|
}
|
366
329
|
if (end === -1) {
|
367
|
-
/* \/\/ We saw the first non\-path separator, mark this as the end of our */
|
368
|
-
/* \/\/ extension */
|
369
330
|
matchedSlash = false;
|
370
331
|
end = i + 1;
|
371
332
|
}
|
372
333
|
if (code === 46 /*.*/) {
|
373
|
-
/* \/\/ If this is our first dot, mark it as the start of our extension */
|
374
334
|
if (startDot === -1)
|
375
335
|
startDot = i;
|
376
336
|
else if (preDotState !== 1)
|
377
337
|
preDotState = 1;
|
378
338
|
}
|
379
339
|
else if (startDot !== -1) {
|
380
|
-
/* \/\/ We saw a non\-dot and non\-path separator before our dot, so we should */
|
381
|
-
/* \/\/ have a good chance at having a non\-empty extension */
|
382
340
|
preDotState = -1;
|
383
341
|
}
|
384
342
|
}
|
385
343
|
if (startDot === -1 || end === -1 ||
|
386
|
-
/* \/\/ We saw a non\-dot character immediately before the dot */
|
387
344
|
preDotState === 0 ||
|
388
|
-
/* \/\/ The \(right\-most\) trimmed path component is exactly '\.\.' */
|
389
345
|
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
390
346
|
return '';
|
391
347
|
}
|
@@ -417,15 +373,10 @@ const path$1 = {
|
|
417
373
|
var end = -1;
|
418
374
|
var matchedSlash = true;
|
419
375
|
var i = pathArg.length - 1;
|
420
|
-
/* \/\/ Track the state of characters \(if any\) we see before our first dot and */
|
421
|
-
/* \/\/ after any path separator we find */
|
422
376
|
var preDotState = 0;
|
423
|
-
/* \/\/ Get non\-dir info */
|
424
377
|
for (; i >= start; --i) {
|
425
378
|
code = pathArg.charCodeAt(i);
|
426
379
|
if (code === 47 /*/*/) {
|
427
|
-
/* \/\/ If we reached a path separator that was not part of a set of path */
|
428
|
-
/* \/\/ separators at the end of the string, stop now */
|
429
380
|
if (!matchedSlash) {
|
430
381
|
startPart = i + 1;
|
431
382
|
break;
|
@@ -433,28 +384,21 @@ const path$1 = {
|
|
433
384
|
continue;
|
434
385
|
}
|
435
386
|
if (end === -1) {
|
436
|
-
/* \/\/ We saw the first non\-path separator, mark this as the end of our */
|
437
|
-
/* \/\/ extension */
|
438
387
|
matchedSlash = false;
|
439
388
|
end = i + 1;
|
440
389
|
}
|
441
390
|
if (code === 46 /*.*/) {
|
442
|
-
/* \/\/ If this is our first dot, mark it as the start of our extension */
|
443
391
|
if (startDot === -1)
|
444
392
|
startDot = i;
|
445
393
|
else if (preDotState !== 1)
|
446
394
|
preDotState = 1;
|
447
395
|
}
|
448
396
|
else if (startDot !== -1) {
|
449
|
-
/* \/\/ We saw a non\-dot and non\-path separator before our dot, so we should */
|
450
|
-
/* \/\/ have a good chance at having a non\-empty extension */
|
451
397
|
preDotState = -1;
|
452
398
|
}
|
453
399
|
}
|
454
400
|
if (startDot === -1 || end === -1 ||
|
455
|
-
/* \/\/ We saw a non\-dot character immediately before the dot */
|
456
401
|
preDotState === 0 ||
|
457
|
-
/* \/\/ The \(right\-most\) trimmed path component is exactly '\.\.' */
|
458
402
|
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
459
403
|
if (end !== -1) {
|
460
404
|
if (startPart === 0 && isAbsolute)
|
@@ -492,8 +436,6 @@ const path$1 = {
|
|
492
436
|
;
|
493
437
|
({}); // @--end-of-file-for-module=tnp-core lib/node-path-mock.ts
|
494
438
|
|
495
|
-
/* \/\/ TODO finish this MOCK @LAST */
|
496
|
-
/* \/\/ const c:Chalk = void 0; */
|
497
439
|
const allObj = {
|
498
440
|
black(a) {
|
499
441
|
console.log(a);
|
@@ -567,6 +509,10 @@ const crossPlatformPath = (pathStringOrPathParts) => {
|
|
567
509
|
/* */
|
568
510
|
/* */
|
569
511
|
/* */
|
512
|
+
/* */
|
513
|
+
/* */
|
514
|
+
/* */
|
515
|
+
/* */
|
570
516
|
if (typeof pathStringOrPathParts !== 'string') {
|
571
517
|
return pathStringOrPathParts;
|
572
518
|
}
|
@@ -579,7 +525,6 @@ const crossPlatformPath = (pathStringOrPathParts) => {
|
|
579
525
|
};
|
580
526
|
({}); // @--end-of-file-for-module=tnp-core lib/core-imports.ts
|
581
527
|
|
582
|
-
/* \/\/ https:\/\/developer\.mozilla\.org\/en\-US\/docs\/Web\/HTTP\/Basics_of_HTTP\/MIME_types\/Common_types */
|
583
528
|
const mimeTypes = {
|
584
529
|
".aac": "audio/aac",
|
585
530
|
".abw": "application/x-abiword",
|
@@ -711,9 +656,6 @@ class HelpersIsomorphic {
|
|
711
656
|
/* */
|
712
657
|
/* */
|
713
658
|
/* */
|
714
|
-
/* \/\/ import \{ config \} from 'tnp\-config'; */
|
715
|
-
/* \/\/ import \{ PROGRESS_DATA \} from 'tnp\-models'; */
|
716
|
-
/* \/\/ TODO handle global\.testMode \? */
|
717
659
|
const KEY = {
|
718
660
|
LAST_ERROR: Symbol(),
|
719
661
|
LAST_INFO: Symbol(),
|
@@ -764,34 +706,6 @@ const KEY_IMPORTANTCE = {
|
|
764
706
|
/* */
|
765
707
|
/* */
|
766
708
|
const LIMIT = 10;
|
767
|
-
/* \/\/ export class Log \{ */
|
768
|
-
/* \/\/ private static _instance: Log; */
|
769
|
-
/* \/\/ public Instance\(\) \{ */
|
770
|
-
/* \/\/ if \(!Log\._instance\) \{ */
|
771
|
-
/* \/\/ Log\._instance = new Log\(\); */
|
772
|
-
/* \/\/ \} */
|
773
|
-
/* \/\/ return Log\._instance; */
|
774
|
-
/* \/\/ \} */
|
775
|
-
/* \/\/ create\(name: string, level\?: Level\) \{ */
|
776
|
-
/* \/\/ if \(level === void 0\) \{ */
|
777
|
-
/* \/\/ level = Level\.DATA; */
|
778
|
-
/* \/\/ \} */
|
779
|
-
/* \/\/ return \{ */
|
780
|
-
/* \/\/ d\(details: string, debugLevel\?: number\) \{ */
|
781
|
-
/* \/\/ return Helpers\.log\(`\[\$\{name\}\] \$\{details\}`, debugLevel\) */
|
782
|
-
/* \/\/ \}, */
|
783
|
-
/* \/\/ i\(details: string\) \{ */
|
784
|
-
/* \/\/ return Helpers\.info\(`\[\$\{name\}\] \$\{details\}`\) */
|
785
|
-
/* \/\/ \}, */
|
786
|
-
/* \/\/ w\(details: string, noExit = false, noTrace = false\) \{ */
|
787
|
-
/* \/\/ return Helpers\.error\(`\[\$\{name\}\] \$\{details\}`, noExit, noTrace\); */
|
788
|
-
/* \/\/ \}, */
|
789
|
-
/* \/\/ er\(details: string, \) \{ */
|
790
|
-
/* \/\/ return Helpers\.info\(`\[\$\{name\}\] \$\{details\}`\) */
|
791
|
-
/* \/\/ \}, */
|
792
|
-
/* \/\/ \} */
|
793
|
-
/* \/\/ \} */
|
794
|
-
/* \/\/ \} */
|
795
709
|
class HelpersMessages extends HelpersIsomorphic {
|
796
710
|
msgCacheClear() {
|
797
711
|
/* */
|
@@ -805,7 +719,6 @@ class HelpersMessages extends HelpersIsomorphic {
|
|
805
719
|
/* */
|
806
720
|
/* */
|
807
721
|
/* */
|
808
|
-
/* \/\/ TODO for FE */
|
809
722
|
console.error(err);
|
810
723
|
}
|
811
724
|
error(details, noExit = false, noTrace = false) {
|
@@ -1309,7 +1222,6 @@ class HelpersCore extends HelpersMessages {
|
|
1309
1222
|
* @returns
|
1310
1223
|
*/
|
1311
1224
|
isBlob(maybeBlob) {
|
1312
|
-
/* \/\/ TODO is this needed hmmmm */
|
1313
1225
|
return maybeBlob instanceof Blob; // || toString.call(maybeBlob) === '[object Blob]';
|
1314
1226
|
}
|
1315
1227
|
/**
|
@@ -1334,13 +1246,6 @@ class HelpersCore extends HelpersMessages {
|
|
1334
1246
|
* stringify to pretty json string
|
1335
1247
|
*/
|
1336
1248
|
stringify(inputObject) {
|
1337
|
-
/* \/\/ if \(_\.isString\(inputObject\)\) \{ */
|
1338
|
-
/* \/\/ return inputObject; */
|
1339
|
-
/* \/\/ \} */
|
1340
|
-
/* \/\/ if \(_\.isObject\(inputObject\)\) \{ */
|
1341
|
-
/* \/\/ config\.log\(inputObject\) */
|
1342
|
-
/* \/\/ Helpers\.error\(`\[tnp\-helpers\] trying to stringify not a object`, false, true\); */
|
1343
|
-
/* \/\/ \} */
|
1344
1249
|
return JSON.stringify(inputObject, null, 2);
|
1345
1250
|
}
|
1346
1251
|
async runSyncOrAsync(fnOrOptions, ...firstArg) {
|
@@ -1360,12 +1265,9 @@ class HelpersCore extends HelpersMessages {
|
|
1360
1265
|
// @ts-ignore
|
1361
1266
|
promisOrValue = _.isArray(fnOrOptions) ? fnOrOptions[1][fnOrOptions[0]](...firstArg) : fnOrOptions(...firstArg);
|
1362
1267
|
}
|
1363
|
-
/* \/\/ let wasPromise = false; */
|
1364
1268
|
if (promisOrValue instanceof Promise) {
|
1365
|
-
/* \/\/ wasPromise = true; */
|
1366
1269
|
promisOrValue = Promise.resolve(promisOrValue);
|
1367
1270
|
}
|
1368
|
-
/* \/\/ console\.log\('was promis ', wasPromise\) */
|
1369
1271
|
return promisOrValue;
|
1370
1272
|
}
|
1371
1273
|
/* */
|
@@ -1691,9 +1593,7 @@ class HelpersCore extends HelpersMessages {
|
|
1691
1593
|
/* */
|
1692
1594
|
/* */
|
1693
1595
|
/* */
|
1694
|
-
exists(folderOrFilePath
|
1695
|
-
/* \/\/ , allowUnexistedLinks = false */
|
1696
|
-
) {
|
1596
|
+
exists(folderOrFilePath) {
|
1697
1597
|
/* */
|
1698
1598
|
/* */
|
1699
1599
|
/* */
|
@@ -1730,7 +1630,6 @@ class HelpersCore extends HelpersMessages {
|
|
1730
1630
|
return command;
|
1731
1631
|
}
|
1732
1632
|
command(command) {
|
1733
|
-
/* \/\/ console\.log\(\{ command \}\) */
|
1734
1633
|
command = Helpers._fixCommand(command);
|
1735
1634
|
return {
|
1736
1635
|
/* */
|
@@ -1897,7 +1796,6 @@ class HelpersCore extends HelpersMessages {
|
|
1897
1796
|
}
|
1898
1797
|
run(command, options) {
|
1899
1798
|
command = Helpers._fixCommand(command);
|
1900
|
-
/* \/\/ console\.log\(\{ command \}\) */
|
1901
1799
|
/* */
|
1902
1800
|
/* */
|
1903
1801
|
/* */
|
@@ -2534,7 +2432,6 @@ class PROGRESS_DATA {
|
|
2534
2432
|
if (checkSplit) {
|
2535
2433
|
const split = chunk.split(/\r\n|\n|\r/);
|
2536
2434
|
if (split.length > 1) {
|
2537
|
-
/* \/\/ console\.log\('split founded', split\) */
|
2538
2435
|
split.forEach(s => {
|
2539
2436
|
res = res.concat(this.resolveFrom(s, callbackOnFounded, false));
|
2540
2437
|
});
|
@@ -2636,7 +2533,6 @@ var Utils;
|
|
2636
2533
|
if (!m) {
|
2637
2534
|
throw new Error(`[firedev-framework][base64toBlob] Not a base64 blob [${base64Data}]`);
|
2638
2535
|
}
|
2639
|
-
/* \/\/ tslint:disable\-next\-line:prefer\-const */
|
2640
2536
|
var [__, contenttype, filebase64] = m;
|
2641
2537
|
content_type = contenttype;
|
2642
2538
|
file_base64 = filebase64;
|
@@ -2652,7 +2548,6 @@ var Utils;
|
|
2652
2548
|
const begin = sliceIndex * sliceSize;
|
2653
2549
|
const end = Math.min(begin + sliceSize, bytesLength);
|
2654
2550
|
const bytes = new Array(end - begin);
|
2655
|
-
/* \/\/ tslint:disable\-next\-line:one\-variable\-per\-declaration */
|
2656
2551
|
for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
|
2657
2552
|
bytes[i] = byteCharacters[offset].charCodeAt(0);
|
2658
2553
|
}
|
@@ -2788,16 +2683,10 @@ var Utils;
|
|
2788
2683
|
}
|
2789
2684
|
binary.blobToText = blobToText;
|
2790
2685
|
async function textToFile(text, fileRelativePathOrName) {
|
2791
|
-
/* \/\/ console\.log\(\{ path \}\) */
|
2792
2686
|
const ext = path.extname(fileRelativePathOrName);
|
2793
2687
|
const type = mimeTypes[ext];
|
2794
2688
|
const blob = new Blob([text], { type });
|
2795
2689
|
const file = await blobToFile(blob, fileRelativePathOrName);
|
2796
|
-
/* \/\/ console\.log\(\{ */
|
2797
|
-
/* \/\/ ext, */
|
2798
|
-
/* \/\/ blob, file */
|
2799
|
-
/* \/\/ \}\); */
|
2800
|
-
/* \/\/ debugger */
|
2801
2690
|
return file;
|
2802
2691
|
}
|
2803
2692
|
binary.textToFile = textToFile;
|
@@ -2835,12 +2724,7 @@ var Utils;
|
|
2835
2724
|
* @returns
|
2836
2725
|
*/
|
2837
2726
|
function numValue(pixelsCss) {
|
2838
|
-
|
2839
|
-
return parseInt(pixelsCss
|
2840
|
-
.replace('px', '')
|
2841
|
-
/* \/\/ \.replace\('pt', ''\) TOOD handle other types */
|
2842
|
-
/* \/\/ \.replace\('1rem', ''\) \/\/ to */
|
2843
|
-
);
|
2727
|
+
return parseInt(pixelsCss?.toString()?.replace('px', ''));
|
2844
2728
|
}
|
2845
2729
|
css.numValue = numValue;
|
2846
2730
|
})(css = Utils.css || (Utils.css = {}));
|