tnp-core 21.0.144 → 21.0.145
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/VERIFIED-BUILD-DATA.jsonc +3 -3
- package/browser/fesm2022/tnp-core-browser.mjs +962 -626
- package/browser/fesm2022/tnp-core-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/tnp-core-browser.d.ts +90 -18
- package/browser-prod/fesm2022/tnp-core-browser-prod.mjs +970 -639
- package/browser-prod/fesm2022/tnp-core-browser-prod.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/tnp-core-browser-prod.d.ts +84 -14
- package/browser-prod.split-namespaces.json +16 -0
- package/cli.backend.js +2 -2
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/helpers.js +32 -14
- package/lib/helpers.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/node-chalk-mock.js +2 -2
- package/lib/node-path-mock.js +2 -2
- package/lib/package.json +1 -1
- package/lib/public-api.d.ts +0 -1
- package/lib/public-api.js +0 -1
- package/lib/public-api.js.map +1 -1
- package/lib/utils-exec-proc-vscode.d.ts +62 -0
- package/lib/utils-exec-proc-vscode.js +196 -0
- package/lib/utils-exec-proc-vscode.js.map +1 -0
- package/lib/utils-exec-proc.js +2 -2
- package/lib/utils-exec-proc.js.map +1 -1
- package/lib/utils-files-folders.js +2 -2
- package/lib/utils-files-folders.js.map +1 -1
- package/lib/utils-progress.d.ts +26 -0
- package/lib/utils-progress.js +189 -0
- package/lib/utils-progress.js.map +1 -0
- package/lib/utils-progress.test.d.ts +1 -0
- package/lib/utils-progress.test.js +194 -0
- package/lib/utils-progress.test.js.map +1 -0
- package/lib/utils-terminal.js +1 -1
- package/lib/utils-terminal.js.map +1 -1
- package/lib-esm/app.hosts.d.ts +2 -2
- package/lib-esm/app.hosts.js +4 -4
- package/lib-esm/cli.backend.d.ts +1 -1
- package/lib-esm/cli.backend.js +1 -1
- package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib-esm/lib/build-info._auto-generated_.js +1 -1
- package/lib-esm/lib/helpers.js +33 -15
- package/lib-esm/lib/helpers.js.map +1 -1
- package/lib-esm/lib/index.d.ts +2 -1
- package/lib-esm/lib/index.js +2 -1
- package/lib-esm/lib/index.js.map +1 -1
- package/lib-esm/lib/node-chalk-mock.d.ts +1 -1
- package/lib-esm/lib/node-chalk-mock.js +1 -1
- package/lib-esm/lib/node-path-mock.d.ts +1 -1
- package/lib-esm/lib/node-path-mock.js +1 -1
- package/lib-esm/lib/public-api.d.ts +0 -1
- package/lib-esm/lib/public-api.js +0 -1
- package/lib-esm/lib/public-api.js.map +1 -1
- package/lib-esm/lib/utils-exec-proc-vscode.d.ts +62 -0
- package/lib-esm/lib/utils-exec-proc-vscode.js +191 -0
- package/lib-esm/lib/utils-exec-proc-vscode.js.map +1 -0
- package/lib-esm/lib/utils-exec-proc.js +2 -2
- package/lib-esm/lib/utils-exec-proc.js.map +1 -1
- package/lib-esm/lib/utils-files-folders.js +2 -2
- package/lib-esm/lib/utils-files-folders.js.map +1 -1
- package/lib-esm/lib/utils-progress.d.ts +26 -0
- package/lib-esm/lib/utils-progress.js +186 -0
- package/lib-esm/lib/utils-progress.js.map +1 -0
- package/lib-esm/lib/utils-progress.test.d.ts +1 -0
- package/lib-esm/lib/utils-progress.test.js +192 -0
- package/lib-esm/lib/utils-progress.test.js.map +1 -0
- package/lib-esm/lib/utils-terminal.js +1 -1
- package/lib-esm/lib/utils-terminal.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/helpers.js +33 -15
- package/lib-prod/helpers.js.map +1 -1
- package/lib-prod/index.d.ts +2 -1
- package/lib-prod/index.js +2 -1
- package/lib-prod/index.js.map +1 -1
- package/lib-prod/node-chalk-mock.d.ts +1 -1
- package/lib-prod/node-chalk-mock.js +1 -1
- package/lib-prod/node-path-mock.d.ts +1 -1
- package/lib-prod/node-path-mock.js +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/public-api.d.ts +0 -1
- package/lib-prod/public-api.js +0 -1
- package/lib-prod/public-api.js.map +1 -1
- package/lib-prod/utils-exec-proc-vscode.d.ts +62 -0
- package/lib-prod/utils-exec-proc-vscode.js +191 -0
- package/lib-prod/utils-exec-proc-vscode.js.map +1 -0
- package/lib-prod/utils-exec-proc.js +2 -2
- package/lib-prod/utils-exec-proc.js.map +1 -1
- package/lib-prod/utils-files-folders.js +2 -2
- package/lib-prod/utils-files-folders.js.map +1 -1
- package/lib-prod/utils-progress.d.ts +24 -0
- package/lib-prod/utils-progress.js +181 -0
- package/lib-prod/utils-progress.js.map +1 -0
- package/lib-prod/utils-progress.test.d.ts +1 -0
- package/lib-prod/utils-progress.test.js +192 -0
- package/lib-prod/utils-progress.test.js.map +1 -0
- package/lib-prod/utils-terminal.js +1 -1
- package/lib-prod/utils-terminal.js.map +1 -1
- package/lib-prod.split-namespaces.json +16 -0
- package/package.json +1 -1
- package/websql/fesm2022/tnp-core-websql.mjs +962 -626
- package/websql/fesm2022/tnp-core-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/tnp-core-websql.d.ts +90 -18
- package/websql-prod/fesm2022/tnp-core-websql-prod.mjs +970 -639
- package/websql-prod/fesm2022/tnp-core-websql-prod.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/tnp-core-websql-prod.d.ts +84 -14
- package/websql-prod.split-namespaces.json +16 -0
- package/lib/progress-data.d.ts +0 -18
- package/lib/progress-data.js +0 -58
- package/lib/progress-data.js.map +0 -1
- package/lib-esm/lib/progress-data.d.ts +0 -18
- package/lib-esm/lib/progress-data.js +0 -54
- package/lib-esm/lib/progress-data.js.map +0 -1
- package/lib-prod/progress-data.d.ts +0 -18
- package/lib-prod/progress-data.js +0 -54
- package/lib-prod/progress-data.js.map +0 -1
|
@@ -310,6 +310,7 @@ import * as json5 from 'json5';
|
|
|
310
310
|
export { json5 };
|
|
311
311
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
312
312
|
import 'reflect-metadata';
|
|
313
|
+
import { exec } from 'node:child_process';
|
|
313
314
|
import axios from 'axios';
|
|
314
315
|
|
|
315
316
|
let isBrowser = false;
|
|
@@ -1724,6 +1725,193 @@ const CoreConfig = {
|
|
|
1724
1725
|
},
|
|
1725
1726
|
};
|
|
1726
1727
|
|
|
1728
|
+
/* */
|
|
1729
|
+
/* */
|
|
1730
|
+
var UtilsProgress;
|
|
1731
|
+
(function (UtilsProgress) {
|
|
1732
|
+
const PROGRESS_PREFIX = '[[[';
|
|
1733
|
+
const PROGRESS_SUFFIX = ']]]';
|
|
1734
|
+
//#endregion
|
|
1735
|
+
//#region emit progress
|
|
1736
|
+
function emitProgress(event, forceShow = false) {
|
|
1737
|
+
const normalizedEvent = {
|
|
1738
|
+
...event,
|
|
1739
|
+
value: normalizeProgressValue(event.value),
|
|
1740
|
+
date: event.date ?? new Date().toISOString(),
|
|
1741
|
+
};
|
|
1742
|
+
const dataToWrite = `${PROGRESS_PREFIX}` +
|
|
1743
|
+
`${JSON.stringify(normalizedEvent)}` +
|
|
1744
|
+
`${PROGRESS_SUFFIX}`;
|
|
1745
|
+
/* */
|
|
1746
|
+
/* */
|
|
1747
|
+
/* */
|
|
1748
|
+
/* */
|
|
1749
|
+
/* */
|
|
1750
|
+
/* */
|
|
1751
|
+
//#region @browser
|
|
1752
|
+
if (forceShow || globalThis.taonNonInteractive) {
|
|
1753
|
+
console.log(dataToWrite);
|
|
1754
|
+
}
|
|
1755
|
+
//#endregion
|
|
1756
|
+
}
|
|
1757
|
+
UtilsProgress.emitProgress = emitProgress;
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region resolve from
|
|
1760
|
+
function resolveFrom(chunk, options = {}, checkSplit = true) {
|
|
1761
|
+
options = options || {};
|
|
1762
|
+
if (!_.isString(chunk)) {
|
|
1763
|
+
return [];
|
|
1764
|
+
}
|
|
1765
|
+
if (_.isNil(checkSplit)) {
|
|
1766
|
+
checkSplit = true;
|
|
1767
|
+
}
|
|
1768
|
+
if (checkSplit) {
|
|
1769
|
+
const lines = chunk.split(/\r\n|\n|\r/);
|
|
1770
|
+
if (lines.length > 1) {
|
|
1771
|
+
return lines.flatMap(line => resolveFrom(line, options, false));
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
const result = [];
|
|
1775
|
+
const trimmedChunk = chunk.trim();
|
|
1776
|
+
if (!trimmedChunk) {
|
|
1777
|
+
return result;
|
|
1778
|
+
}
|
|
1779
|
+
/*
|
|
1780
|
+
* A line may contain one or multiple progress events:
|
|
1781
|
+
*
|
|
1782
|
+
* [[[{"value":10}]]]
|
|
1783
|
+
*
|
|
1784
|
+
* or:
|
|
1785
|
+
*
|
|
1786
|
+
* normal log [[[{"value":10}]]] another log
|
|
1787
|
+
*/
|
|
1788
|
+
const progressJsonParts = extractProgressJsonParts(trimmedChunk);
|
|
1789
|
+
for (const progressJson of progressJsonParts) {
|
|
1790
|
+
const event = parseTaonProgressJson(progressJson, options);
|
|
1791
|
+
if (!event) {
|
|
1792
|
+
continue;
|
|
1793
|
+
}
|
|
1794
|
+
result.push(event);
|
|
1795
|
+
options.callbackOnFounded?.(event);
|
|
1796
|
+
}
|
|
1797
|
+
return result;
|
|
1798
|
+
}
|
|
1799
|
+
UtilsProgress.resolveFrom = resolveFrom;
|
|
1800
|
+
//#endregion
|
|
1801
|
+
//#region has progress event
|
|
1802
|
+
function hasProgressEvent(chunk) {
|
|
1803
|
+
return resolveFrom(chunk).length > 0;
|
|
1804
|
+
}
|
|
1805
|
+
UtilsProgress.hasProgressEvent = hasProgressEvent;
|
|
1806
|
+
//#endregion
|
|
1807
|
+
//#region parse taon progress line
|
|
1808
|
+
function parseTaonProgressLine(line) {
|
|
1809
|
+
if (!_.isString(line)) {
|
|
1810
|
+
return undefined;
|
|
1811
|
+
}
|
|
1812
|
+
const trimmed = line.trim();
|
|
1813
|
+
if (!trimmed.startsWith(PROGRESS_PREFIX) ||
|
|
1814
|
+
!trimmed.endsWith(PROGRESS_SUFFIX)) {
|
|
1815
|
+
return undefined;
|
|
1816
|
+
}
|
|
1817
|
+
const json = trimmed.slice(PROGRESS_PREFIX.length, -PROGRESS_SUFFIX.length);
|
|
1818
|
+
return parseTaonProgressJson(json);
|
|
1819
|
+
}
|
|
1820
|
+
UtilsProgress.parseTaonProgressLine = parseTaonProgressLine;
|
|
1821
|
+
//#endregion
|
|
1822
|
+
//#region extract progress json parts
|
|
1823
|
+
function extractProgressJsonParts(chunk) {
|
|
1824
|
+
const result = [];
|
|
1825
|
+
let searchIndex = 0;
|
|
1826
|
+
while (searchIndex < chunk.length) {
|
|
1827
|
+
const prefixIndex = chunk.indexOf(PROGRESS_PREFIX, searchIndex);
|
|
1828
|
+
if (prefixIndex === -1) {
|
|
1829
|
+
break;
|
|
1830
|
+
}
|
|
1831
|
+
const jsonStart = prefixIndex + PROGRESS_PREFIX.length;
|
|
1832
|
+
const suffixIndex = chunk.indexOf(PROGRESS_SUFFIX, jsonStart);
|
|
1833
|
+
if (suffixIndex === -1) {
|
|
1834
|
+
break;
|
|
1835
|
+
}
|
|
1836
|
+
result.push(chunk.slice(jsonStart, suffixIndex));
|
|
1837
|
+
searchIndex = suffixIndex + PROGRESS_SUFFIX.length;
|
|
1838
|
+
}
|
|
1839
|
+
return result;
|
|
1840
|
+
}
|
|
1841
|
+
//#endregion
|
|
1842
|
+
//#region parse progress json
|
|
1843
|
+
function parseTaonProgressJson(json, options = {}) {
|
|
1844
|
+
try {
|
|
1845
|
+
const parsed = JSON.parse(json);
|
|
1846
|
+
if (!isTaonProgressEvent(parsed)) {
|
|
1847
|
+
if (options.logParseErrors) {
|
|
1848
|
+
console.error(`Invalid Taon progress event: ${json}`);
|
|
1849
|
+
}
|
|
1850
|
+
return undefined;
|
|
1851
|
+
}
|
|
1852
|
+
return {
|
|
1853
|
+
...parsed,
|
|
1854
|
+
value: normalizeProgressValue(parsed.value),
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1857
|
+
catch (error) {
|
|
1858
|
+
if (options.logParseErrors) {
|
|
1859
|
+
console.error(`Cannot parse Taon progress event: ${json}`, error);
|
|
1860
|
+
}
|
|
1861
|
+
return undefined;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
//#endregion
|
|
1865
|
+
//#region normalize progress value
|
|
1866
|
+
function normalizeProgressValue(value) {
|
|
1867
|
+
if (typeof value !== 'number') {
|
|
1868
|
+
return undefined;
|
|
1869
|
+
}
|
|
1870
|
+
if (!Number.isFinite(value)) {
|
|
1871
|
+
return undefined;
|
|
1872
|
+
}
|
|
1873
|
+
return Math.max(0, Math.min(100, value));
|
|
1874
|
+
}
|
|
1875
|
+
//#endregion
|
|
1876
|
+
//#region is taon progress event
|
|
1877
|
+
function isTaonProgressEvent(value) {
|
|
1878
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
1879
|
+
return false;
|
|
1880
|
+
}
|
|
1881
|
+
const event = value;
|
|
1882
|
+
return (isOptionalFiniteNumber(event.value) &&
|
|
1883
|
+
isOptionalString(event.message) &&
|
|
1884
|
+
isOptionalProgressType(event.type) &&
|
|
1885
|
+
isOptionalIsoDateString(event.date));
|
|
1886
|
+
}
|
|
1887
|
+
//#endregion
|
|
1888
|
+
//#region validators
|
|
1889
|
+
function isOptionalFiniteNumber(value) {
|
|
1890
|
+
return (value === undefined ||
|
|
1891
|
+
(typeof value === 'number' && Number.isFinite(value)));
|
|
1892
|
+
}
|
|
1893
|
+
function isOptionalString(value) {
|
|
1894
|
+
return value === undefined || typeof value === 'string';
|
|
1895
|
+
}
|
|
1896
|
+
function isOptionalProgressType(value) {
|
|
1897
|
+
return (value === undefined ||
|
|
1898
|
+
value === 'info' ||
|
|
1899
|
+
value === 'warning' ||
|
|
1900
|
+
value === 'error' ||
|
|
1901
|
+
value === 'event');
|
|
1902
|
+
}
|
|
1903
|
+
function isOptionalIsoDateString(value) {
|
|
1904
|
+
if (value === undefined) {
|
|
1905
|
+
return true;
|
|
1906
|
+
}
|
|
1907
|
+
if (typeof value !== 'string') {
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1910
|
+
return !Number.isNaN(Date.parse(value));
|
|
1911
|
+
}
|
|
1912
|
+
//#endregion
|
|
1913
|
+
})(UtilsProgress || (UtilsProgress = {}));
|
|
1914
|
+
|
|
1727
1915
|
// @ts-ignore
|
|
1728
1916
|
const isCloudflareWorker = typeof WebSocketPair !== 'undefined';
|
|
1729
1917
|
const taonContainers = 'taon-containers';
|
|
@@ -3670,184 +3858,22 @@ const startAsync = async (command, cwd, options) => {
|
|
|
3670
3858
|
};
|
|
3671
3859
|
//#endregion
|
|
3672
3860
|
|
|
3673
|
-
var UtilsTime;
|
|
3674
|
-
(function (UtilsTime) {
|
|
3675
|
-
//#region format duration
|
|
3676
|
-
UtilsTime.formatDuration = (milliseconds) => {
|
|
3677
|
-
const absMs = Math.abs(milliseconds);
|
|
3678
|
-
const ms = absMs % 1000;
|
|
3679
|
-
const totalSeconds = Math.floor(absMs / 1000);
|
|
3680
|
-
const seconds = totalSeconds % 60;
|
|
3681
|
-
const totalMinutes = Math.floor(totalSeconds / 60);
|
|
3682
|
-
const minutes = totalMinutes % 60;
|
|
3683
|
-
const hours = Math.floor(totalMinutes / 60);
|
|
3684
|
-
const parts = [];
|
|
3685
|
-
if (hours > 0) {
|
|
3686
|
-
parts.push(`${hours}h`);
|
|
3687
|
-
}
|
|
3688
|
-
if (minutes > 0) {
|
|
3689
|
-
parts.push(`${minutes}min`);
|
|
3690
|
-
}
|
|
3691
|
-
if (seconds > 0) {
|
|
3692
|
-
parts.push(`${seconds}s`);
|
|
3693
|
-
}
|
|
3694
|
-
// show ms:
|
|
3695
|
-
// - always when < 1s
|
|
3696
|
-
// - otherwise only if there is remainder
|
|
3697
|
-
if (ms > 0 || parts.length === 0) {
|
|
3698
|
-
parts.push(`${ms}ms`);
|
|
3699
|
-
}
|
|
3700
|
-
return parts.join(', ');
|
|
3701
|
-
};
|
|
3702
|
-
//#endregion
|
|
3703
|
-
//#region wait
|
|
3704
|
-
UtilsTime.wait = (second) => {
|
|
3705
|
-
return new Promise((resolve, reject) => {
|
|
3706
|
-
setTimeout(() => {
|
|
3707
|
-
resolve(void 0);
|
|
3708
|
-
}, second * 1000);
|
|
3709
|
-
});
|
|
3710
|
-
};
|
|
3711
|
-
//#endregion
|
|
3712
|
-
//#region wait miliseconds
|
|
3713
|
-
UtilsTime.waitMilliseconds = (milliseconds) => {
|
|
3714
|
-
// Helpers.taskStarted(`Waiting ${milliseconds} milliseconds...`);
|
|
3715
|
-
return new Promise((resolve, reject) => {
|
|
3716
|
-
setTimeout(() => {
|
|
3717
|
-
// Helpers.taskDone(`Done waiting ${milliseconds} milliseconds`);
|
|
3718
|
-
resolve(void 0);
|
|
3719
|
-
}, milliseconds);
|
|
3720
|
-
});
|
|
3721
|
-
};
|
|
3722
|
-
function createResult(description, durationMs, options) {
|
|
3723
|
-
const seconds = durationMs / 1000;
|
|
3724
|
-
const minutes = seconds / 60;
|
|
3725
|
-
const human = durationMs < 1000
|
|
3726
|
-
? `${durationMs.toFixed(2)}ms`
|
|
3727
|
-
: seconds < 60
|
|
3728
|
-
? `${seconds.toFixed(2)}s`
|
|
3729
|
-
: `${minutes.toFixed(2)}min`;
|
|
3730
|
-
if (!options?.hideLogs) {
|
|
3731
|
-
Helpers.taskDone(`Execution time for "${chalk.bold(description)}": ${chalk.bold(human)}`);
|
|
3732
|
-
}
|
|
3733
|
-
return {
|
|
3734
|
-
milliseconds: durationMs,
|
|
3735
|
-
seconds,
|
|
3736
|
-
minutes,
|
|
3737
|
-
human,
|
|
3738
|
-
};
|
|
3739
|
-
}
|
|
3740
|
-
//#endregion
|
|
3741
|
-
//#region mesure execution time
|
|
3742
|
-
UtilsTime.mesureExecutionTime = async (description, functionToExecute, options) => {
|
|
3743
|
-
if (!options?.hideLogs) {
|
|
3744
|
-
Helpers.taskStarted(`Starting ${chalk.bold(description)} (measuring time)`);
|
|
3745
|
-
}
|
|
3746
|
-
const start = process.hrtime.bigint();
|
|
3747
|
-
await functionToExecute();
|
|
3748
|
-
const end = process.hrtime.bigint();
|
|
3749
|
-
const durationMs = Number(end - start) / 1_000_000;
|
|
3750
|
-
return createResult(description, durationMs, options);
|
|
3751
|
-
};
|
|
3752
|
-
//#endregion
|
|
3753
|
-
//#region mesure execution time sync
|
|
3754
|
-
UtilsTime.mesureExecutionTimeSync = (description, functionToExecute, options) => {
|
|
3755
|
-
if (!options?.hideLogs) {
|
|
3756
|
-
Helpers.taskStarted(`Starting ${chalk.bold(description)} (measuring time)`);
|
|
3757
|
-
}
|
|
3758
|
-
const start = process.hrtime.bigint();
|
|
3759
|
-
functionToExecute();
|
|
3760
|
-
const end = process.hrtime.bigint();
|
|
3761
|
-
const durationMs = Number(end - start) / 1_000_000;
|
|
3762
|
-
return createResult(description, durationMs, options);
|
|
3763
|
-
};
|
|
3764
|
-
//#endregion
|
|
3765
|
-
})(UtilsTime || (UtilsTime = {}));
|
|
3766
|
-
|
|
3767
3861
|
//#region imports
|
|
3768
3862
|
//#endregion
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
//#region wait
|
|
3773
|
-
Utils.wait = (second) => {
|
|
3774
|
-
return UtilsTime.wait(second);
|
|
3775
|
-
};
|
|
3776
|
-
//#endregion
|
|
3777
|
-
//#region wait miliseconds
|
|
3778
|
-
Utils.waitMilliseconds = (milliseconds) => {
|
|
3779
|
-
// Helpers.taskStarted(`Waiting ${milliseconds} milliseconds...`);
|
|
3780
|
-
return UtilsTime.waitMilliseconds(milliseconds);
|
|
3781
|
-
};
|
|
3782
|
-
//#endregion
|
|
3783
|
-
//#region utils / uniq array
|
|
3784
|
-
Utils.uniqArray = (array, uniqueProperty) => {
|
|
3785
|
-
var seen = {};
|
|
3786
|
-
return array
|
|
3787
|
-
.filter(f => !!f)
|
|
3788
|
-
.filter(function (item) {
|
|
3789
|
-
return seen.hasOwnProperty(uniqueProperty ? item[uniqueProperty] : item)
|
|
3790
|
-
? false
|
|
3791
|
-
: (seen[uniqueProperty ? item[uniqueProperty] : item] = true);
|
|
3792
|
-
});
|
|
3793
|
-
};
|
|
3794
|
-
//#endregion
|
|
3795
|
-
//#region utils / recursive sort keys in object
|
|
3796
|
-
/**
|
|
3797
|
-
* @param anyObject
|
|
3798
|
-
* @returns object with sorted keys
|
|
3799
|
-
*/
|
|
3800
|
-
Utils.sortKeys = (anyObject) => {
|
|
3801
|
-
if (_.isArray(anyObject)) {
|
|
3802
|
-
return anyObject.map(Utils.sortKeys);
|
|
3803
|
-
}
|
|
3804
|
-
if (_.isObject(anyObject)) {
|
|
3805
|
-
return _.fromPairs(_.keys(anyObject)
|
|
3806
|
-
.sort()
|
|
3807
|
-
.map(key => [key, Utils.sortKeys(anyObject[key])]));
|
|
3808
|
-
}
|
|
3809
|
-
return anyObject;
|
|
3810
|
-
};
|
|
3811
|
-
//#endregion
|
|
3812
|
-
//#region utils / escape string for reg exp
|
|
3863
|
+
var UtilsProcess;
|
|
3864
|
+
(function (UtilsProcess) {
|
|
3865
|
+
//#region utils process / start async child process command until
|
|
3813
3866
|
/**
|
|
3814
|
-
*
|
|
3815
|
-
*
|
|
3867
|
+
* This let you start child process and resolve promise when some
|
|
3868
|
+
* condition is met. It is useful for example when you want to start
|
|
3869
|
+
* process and wait until some output is in stdout or stderr.
|
|
3816
3870
|
*/
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
if (options?.skipEscapeSlashAndDash) {
|
|
3820
|
-
return stringForRegExp.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
3821
|
-
}
|
|
3822
|
-
return stringForRegExp.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
3823
|
-
};
|
|
3824
|
-
//#endregion
|
|
3825
|
-
//#region utils / remove chalk special chars
|
|
3826
|
-
function removeChalkSpecialChars(str) {
|
|
3827
|
-
// Regex to match ANSI escape sequences used by Chalk
|
|
3828
|
-
const ansiRegex = /\u001b\[[0-9;]*m/g;
|
|
3829
|
-
// Replace all ANSI escape sequences with an empty string
|
|
3830
|
-
return str.replace(ansiRegex, '');
|
|
3831
|
-
}
|
|
3832
|
-
Utils.removeChalkSpecialChars = removeChalkSpecialChars;
|
|
3833
|
-
//#endregion
|
|
3834
|
-
//#region utils / full date time
|
|
3835
|
-
Utils.fullDateTime = () => {
|
|
3871
|
+
UtilsProcess.startAsyncChildProcessCommandUntil = async (command, options) => {
|
|
3872
|
+
/* */
|
|
3836
3873
|
/* */
|
|
3837
3874
|
/* */
|
|
3838
|
-
return (void 0);
|
|
3839
|
-
};
|
|
3840
|
-
//#endregion
|
|
3841
|
-
//#region utils / full date
|
|
3842
|
-
Utils.fullDate = () => {
|
|
3843
3875
|
/* */
|
|
3844
3876
|
/* */
|
|
3845
|
-
return (void 0);
|
|
3846
|
-
};
|
|
3847
|
-
//#endregion
|
|
3848
|
-
//#region utils / get free port
|
|
3849
|
-
const takenPorts = [];
|
|
3850
|
-
Utils.getFreePort = async (options) => {
|
|
3851
3877
|
/* */
|
|
3852
3878
|
/* */
|
|
3853
3879
|
/* */
|
|
@@ -3878,15 +3904,6 @@ var Utils;
|
|
|
3878
3904
|
/* */
|
|
3879
3905
|
/* */
|
|
3880
3906
|
/* */
|
|
3881
|
-
return (void 0);
|
|
3882
|
-
};
|
|
3883
|
-
//#endregion
|
|
3884
|
-
//#region utils / required uncached
|
|
3885
|
-
/**
|
|
3886
|
-
* Traverses the cache to search for all the cached
|
|
3887
|
-
* files of the specified module name
|
|
3888
|
-
*/
|
|
3889
|
-
const searchCache = (moduleName, callback) => {
|
|
3890
3907
|
/* */
|
|
3891
3908
|
/* */
|
|
3892
3909
|
/* */
|
|
@@ -3907,12 +3924,6 @@ var Utils;
|
|
|
3907
3924
|
/* */
|
|
3908
3925
|
/* */
|
|
3909
3926
|
/* */
|
|
3910
|
-
return (void 0);
|
|
3911
|
-
};
|
|
3912
|
-
/**
|
|
3913
|
-
* Removes a module from the cache
|
|
3914
|
-
*/
|
|
3915
|
-
const purgeCache = moduleName => {
|
|
3916
3927
|
/* */
|
|
3917
3928
|
/* */
|
|
3918
3929
|
/* */
|
|
@@ -3929,58 +3940,12 @@ var Utils;
|
|
|
3929
3940
|
/* */
|
|
3930
3941
|
return (void 0);
|
|
3931
3942
|
};
|
|
3932
|
-
|
|
3933
|
-
|
|
3943
|
+
//#endregion
|
|
3944
|
+
//#region utils process / get git bash path
|
|
3945
|
+
UtilsProcess.getGitBashPath = () => {
|
|
3934
3946
|
/* */
|
|
3935
3947
|
/* */
|
|
3936
3948
|
/* */
|
|
3937
|
-
return (void 0);
|
|
3938
|
-
};
|
|
3939
|
-
//#endregion
|
|
3940
|
-
//#region utils / camelize
|
|
3941
|
-
/**
|
|
3942
|
-
* similar to camelCase but remove
|
|
3943
|
-
* all non word / repeated characters
|
|
3944
|
-
*/
|
|
3945
|
-
Utils.camelize = (str = '') => {
|
|
3946
|
-
str = str.replace(/\W/g, '').toLowerCase();
|
|
3947
|
-
return str
|
|
3948
|
-
.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
|
|
3949
|
-
return index == 0 ? word.toLowerCase() : word.toUpperCase();
|
|
3950
|
-
})
|
|
3951
|
-
.replace(/\s+/g, '');
|
|
3952
|
-
};
|
|
3953
|
-
//#endregion
|
|
3954
|
-
//#region css
|
|
3955
|
-
let css;
|
|
3956
|
-
(function (css) {
|
|
3957
|
-
//#region css utils / numeric value of pixels
|
|
3958
|
-
/**
|
|
3959
|
-
*
|
|
3960
|
-
* @param pixelsCss pixels ex. 100px
|
|
3961
|
-
* @returns
|
|
3962
|
-
*/
|
|
3963
|
-
function numValue(pixelsCss) {
|
|
3964
|
-
// tslint:disable-next-line:radix
|
|
3965
|
-
return parseInt(pixelsCss?.toString()?.replace('px', ''));
|
|
3966
|
-
}
|
|
3967
|
-
css.numValue = numValue;
|
|
3968
|
-
//#endregion
|
|
3969
|
-
})(css = Utils.css || (Utils.css = {}));
|
|
3970
|
-
//#endregion
|
|
3971
|
-
})(Utils || (Utils = {}));
|
|
3972
|
-
//#endregion
|
|
3973
|
-
//#region TODO IN_PROGRESS utils messages
|
|
3974
|
-
/**
|
|
3975
|
-
* TODO @LAST @IN_PROGRESS
|
|
3976
|
-
* - utils for messages
|
|
3977
|
-
* - export when ready
|
|
3978
|
-
* - should be ready for everything async refactor
|
|
3979
|
-
*/
|
|
3980
|
-
var UtilsMessages;
|
|
3981
|
-
(function (UtilsMessages) {
|
|
3982
|
-
//#region utils messages / compilation wrapper
|
|
3983
|
-
UtilsMessages.compilationWrapper = async (fn, taskName = 'Task', executionType = 'Compilation of') => {
|
|
3984
3949
|
/* */
|
|
3985
3950
|
/* */
|
|
3986
3951
|
/* */
|
|
@@ -3999,48 +3964,14 @@ var UtilsMessages;
|
|
|
3999
3964
|
return (void 0);
|
|
4000
3965
|
};
|
|
4001
3966
|
//#endregion
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
UtilsMigrations.getTimestampFromClassName = (className) => {
|
|
4011
|
-
const [maybeTimestamp1, maybeTimestamp2] = className.split('_') || [];
|
|
4012
|
-
// console.log({ maybeTimestamp1, maybeTimestamp2 });
|
|
4013
|
-
const timestamp1 = parseInt(maybeTimestamp1);
|
|
4014
|
-
const timestamp2 = parseInt(maybeTimestamp2);
|
|
4015
|
-
const timestamp = !_.isNaN(timestamp1) ? timestamp1 : timestamp2;
|
|
4016
|
-
return UtilsMigrations.isValidTimestamp(timestamp) ? timestamp : void 0;
|
|
4017
|
-
};
|
|
4018
|
-
UtilsMigrations.getFormattedTimestampFromClassName = (className) => {
|
|
4019
|
-
const timestamp = UtilsMigrations.getTimestampFromClassName(className);
|
|
4020
|
-
if (!timestamp) {
|
|
4021
|
-
return void 0;
|
|
4022
|
-
}
|
|
4023
|
-
return UtilsMigrations.formatTimestamp(timestamp);
|
|
4024
|
-
};
|
|
4025
|
-
UtilsMigrations.formatTimestamp = (timestamp) => {
|
|
4026
|
-
const dateFromTimestamp = new Date(timestamp);
|
|
4027
|
-
// @ts-ignore
|
|
4028
|
-
return `${dateformat(dateFromTimestamp, 'dd-mm-yyyy HH:MM:ss')}`;
|
|
4029
|
-
};
|
|
4030
|
-
UtilsMigrations.isValidTimestamp = (value) => {
|
|
4031
|
-
if (typeof value !== 'number') {
|
|
4032
|
-
return false; // Must be a number
|
|
4033
|
-
}
|
|
4034
|
-
const minTimestamp = 0; // Minimum possible timestamp (Unix epoch)
|
|
4035
|
-
const maxTimestamp = 8640000000000000; // Max safe timestamp in JS (represents year ~275760)
|
|
4036
|
-
return value >= minTimestamp && value <= maxTimestamp;
|
|
4037
|
-
};
|
|
4038
|
-
})(UtilsMigrations || (UtilsMigrations = {}));
|
|
4039
|
-
//#endregion
|
|
4040
|
-
//#region utils yaml
|
|
4041
|
-
var UtilsYaml;
|
|
4042
|
-
(function (UtilsYaml) {
|
|
4043
|
-
UtilsYaml.yamlToJson = (yamlString) => {
|
|
3967
|
+
//#region utils process / start process in new graphical terminal window
|
|
3968
|
+
/**
|
|
3969
|
+
* TODO IMPLEMENT
|
|
3970
|
+
* start async node process
|
|
3971
|
+
*/
|
|
3972
|
+
UtilsProcess.startInNewTerminalWindow = (command, options) => {
|
|
3973
|
+
/* */
|
|
3974
|
+
/* */
|
|
4044
3975
|
/* */
|
|
4045
3976
|
/* */
|
|
4046
3977
|
/* */
|
|
@@ -4050,9 +3981,6 @@ var UtilsYaml;
|
|
|
4050
3981
|
/* */
|
|
4051
3982
|
/* */
|
|
4052
3983
|
/* */
|
|
4053
|
-
return (void 0);
|
|
4054
|
-
};
|
|
4055
|
-
UtilsYaml.jsonToYaml = (json) => {
|
|
4056
3984
|
/* */
|
|
4057
3985
|
/* */
|
|
4058
3986
|
/* */
|
|
@@ -4065,10 +3993,6 @@ var UtilsYaml;
|
|
|
4065
3993
|
/* */
|
|
4066
3994
|
/* */
|
|
4067
3995
|
/* */
|
|
4068
|
-
return (void 0);
|
|
4069
|
-
};
|
|
4070
|
-
//#region read yaml as json
|
|
4071
|
-
UtilsYaml.readYamlAsJson = (absFilePathToYamlOrYmlFile, options) => {
|
|
4072
3996
|
/* */
|
|
4073
3997
|
/* */
|
|
4074
3998
|
/* */
|
|
@@ -4080,131 +4004,12 @@ var UtilsYaml;
|
|
|
4080
4004
|
/* */
|
|
4081
4005
|
/* */
|
|
4082
4006
|
/* */
|
|
4083
|
-
return (void 0);
|
|
4084
|
-
};
|
|
4085
|
-
//#endregion
|
|
4086
|
-
//#region write json to yaml
|
|
4087
|
-
UtilsYaml.writeJsonToYaml = (destinationYamlfileAbsPath, json) => {
|
|
4088
4007
|
/* */
|
|
4089
4008
|
/* */
|
|
4090
4009
|
/* */
|
|
4091
4010
|
/* */
|
|
4092
4011
|
/* */
|
|
4093
4012
|
/* */
|
|
4094
|
-
return (void 0);
|
|
4095
|
-
};
|
|
4096
|
-
//#endregion
|
|
4097
|
-
})(UtilsYaml || (UtilsYaml = {}));
|
|
4098
|
-
//#endregion
|
|
4099
|
-
//#region utils filepath metadata
|
|
4100
|
-
var FilePathMetaData;
|
|
4101
|
-
(function (FilePathMetaData) {
|
|
4102
|
-
const TERMINATOR = 'xxxxx'; // terminates metadata block
|
|
4103
|
-
const KV_SEPARATOR = '...'; // key/value separator
|
|
4104
|
-
const PAIR_SEPARATOR = 'IxIxI'; // between pairs
|
|
4105
|
-
//#region embed data into filename
|
|
4106
|
-
/**
|
|
4107
|
-
* Embed metadata into filename while preserving the extension.
|
|
4108
|
-
*
|
|
4109
|
-
* Example:
|
|
4110
|
-
* embedData({ version: "1.2.3", envName: "__" }, "project.zip")
|
|
4111
|
-
* -> "version|-|1.2.3||--||envName|-|__|||project.zip"
|
|
4112
|
-
*
|
|
4113
|
-
* keysMap = {
|
|
4114
|
-
* projectName: "pn",
|
|
4115
|
-
* envName: "en",
|
|
4116
|
-
* version: "v"
|
|
4117
|
-
* }
|
|
4118
|
-
*/
|
|
4119
|
-
FilePathMetaData.embedData = (data, orgFilename, options) => {
|
|
4120
|
-
options = options || {};
|
|
4121
|
-
const ext = path.extname(orgFilename);
|
|
4122
|
-
const base = path.basename(orgFilename, ext);
|
|
4123
|
-
const meta = Object.entries(data)
|
|
4124
|
-
.map(([key, value]) => {
|
|
4125
|
-
if (options.keysMap && options.keysMap[key]) {
|
|
4126
|
-
key = options.keysMap[key];
|
|
4127
|
-
}
|
|
4128
|
-
return `${key}${KV_SEPARATOR}${value ?? ''}`;
|
|
4129
|
-
})
|
|
4130
|
-
.join(PAIR_SEPARATOR);
|
|
4131
|
-
return `${meta}${TERMINATOR}${options.skipAddingBasenameAtEnd ? '' : base}${ext}`;
|
|
4132
|
-
};
|
|
4133
|
-
//#endregion
|
|
4134
|
-
//#region extract data from filename
|
|
4135
|
-
/**
|
|
4136
|
-
* Extract metadata from filename (reverse of embedData).
|
|
4137
|
-
*
|
|
4138
|
-
* Example:
|
|
4139
|
-
* extractData<{ version: string; env: string }>("myfile__version-1.2.3__env-prod.zip")
|
|
4140
|
-
* -> { version: "1.2.3", env: "prod" }
|
|
4141
|
-
*
|
|
4142
|
-
* keysMap = {
|
|
4143
|
-
* projectName: "pn",
|
|
4144
|
-
* envName: "en",
|
|
4145
|
-
* version: "v"
|
|
4146
|
-
* }
|
|
4147
|
-
*/
|
|
4148
|
-
FilePathMetaData.extractData = (filename, options) => {
|
|
4149
|
-
options = options || {};
|
|
4150
|
-
const ext = path.extname(filename);
|
|
4151
|
-
const thereIsNoExt = ext.includes('|') || ext.includes('-');
|
|
4152
|
-
const base = thereIsNoExt ? filename : path.basename(filename, ext);
|
|
4153
|
-
// Everything BEFORE the FIRST TERMINATOR
|
|
4154
|
-
const idx = base.lastIndexOf(TERMINATOR);
|
|
4155
|
-
const metaPart = idx >= 0 ? base.substring(0, idx) : base;
|
|
4156
|
-
const data = {};
|
|
4157
|
-
let cursor = 0;
|
|
4158
|
-
while (cursor <= metaPart.length) {
|
|
4159
|
-
const sepIdx = metaPart.indexOf(PAIR_SEPARATOR, cursor);
|
|
4160
|
-
const segment = sepIdx === -1
|
|
4161
|
-
? metaPart.substring(cursor)
|
|
4162
|
-
: metaPart.substring(cursor, sepIdx);
|
|
4163
|
-
if (segment) {
|
|
4164
|
-
const kvIdx = segment.indexOf(KV_SEPARATOR);
|
|
4165
|
-
if (kvIdx > -1) {
|
|
4166
|
-
const key = segment.substring(0, kvIdx);
|
|
4167
|
-
const value = segment.substring(kvIdx + KV_SEPARATOR.length);
|
|
4168
|
-
let finalKey = options.keysMap
|
|
4169
|
-
? Object.keys(options.keysMap || {}).find(k => options.keysMap[k] === key)
|
|
4170
|
-
: key;
|
|
4171
|
-
data[finalKey] = value;
|
|
4172
|
-
}
|
|
4173
|
-
}
|
|
4174
|
-
if (sepIdx === -1)
|
|
4175
|
-
break;
|
|
4176
|
-
cursor = sepIdx + PAIR_SEPARATOR.length;
|
|
4177
|
-
}
|
|
4178
|
-
return data;
|
|
4179
|
-
};
|
|
4180
|
-
//#endregion
|
|
4181
|
-
//#region get only metadata string
|
|
4182
|
-
FilePathMetaData.getOnlyMetadataString = (filename) => {
|
|
4183
|
-
const ext = path.extname(filename);
|
|
4184
|
-
const base = path.basename(filename, ext);
|
|
4185
|
-
const idx = base.lastIndexOf(TERMINATOR);
|
|
4186
|
-
if (idx === -1)
|
|
4187
|
-
return ''; // no terminator
|
|
4188
|
-
const metaPart = base.substring(0, idx);
|
|
4189
|
-
if (!metaPart.trim())
|
|
4190
|
-
return ''; // empty metadata
|
|
4191
|
-
return metaPart;
|
|
4192
|
-
};
|
|
4193
|
-
//#endregion
|
|
4194
|
-
})(FilePathMetaData || (FilePathMetaData = {}));
|
|
4195
|
-
//#endregion
|
|
4196
|
-
|
|
4197
|
-
//#region imports
|
|
4198
|
-
//#endregion
|
|
4199
|
-
var UtilsProcess;
|
|
4200
|
-
(function (UtilsProcess) {
|
|
4201
|
-
//#region utils process / start async child process command until
|
|
4202
|
-
/**
|
|
4203
|
-
* This let you start child process and resolve promise when some
|
|
4204
|
-
* condition is met. It is useful for example when you want to start
|
|
4205
|
-
* process and wait until some output is in stdout or stderr.
|
|
4206
|
-
*/
|
|
4207
|
-
UtilsProcess.startAsyncChildProcessCommandUntil = async (command, options) => {
|
|
4208
4013
|
/* */
|
|
4209
4014
|
/* */
|
|
4210
4015
|
/* */
|
|
@@ -4277,152 +4082,11 @@ var UtilsProcess;
|
|
|
4277
4082
|
return (void 0);
|
|
4278
4083
|
};
|
|
4279
4084
|
//#endregion
|
|
4280
|
-
//#region utils process
|
|
4281
|
-
UtilsProcess.
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
/* */
|
|
4286
|
-
/* */
|
|
4287
|
-
/* */
|
|
4288
|
-
/* */
|
|
4289
|
-
/* */
|
|
4290
|
-
/* */
|
|
4291
|
-
/* */
|
|
4292
|
-
/* */
|
|
4293
|
-
/* */
|
|
4294
|
-
/* */
|
|
4295
|
-
/* */
|
|
4296
|
-
/* */
|
|
4297
|
-
/* */
|
|
4298
|
-
/* */
|
|
4299
|
-
/* */
|
|
4300
|
-
return (void 0);
|
|
4301
|
-
};
|
|
4302
|
-
//#endregion
|
|
4303
|
-
//#region utils process / start process in new graphical terminal window
|
|
4304
|
-
/**
|
|
4305
|
-
* TODO IMPLEMENT
|
|
4306
|
-
* start async node process
|
|
4307
|
-
*/
|
|
4308
|
-
UtilsProcess.startInNewTerminalWindow = (command, options) => {
|
|
4309
|
-
/* */
|
|
4310
|
-
/* */
|
|
4311
|
-
/* */
|
|
4312
|
-
/* */
|
|
4313
|
-
/* */
|
|
4314
|
-
/* */
|
|
4315
|
-
/* */
|
|
4316
|
-
/* */
|
|
4317
|
-
/* */
|
|
4318
|
-
/* */
|
|
4319
|
-
/* */
|
|
4320
|
-
/* */
|
|
4321
|
-
/* */
|
|
4322
|
-
/* */
|
|
4323
|
-
/* */
|
|
4324
|
-
/* */
|
|
4325
|
-
/* */
|
|
4326
|
-
/* */
|
|
4327
|
-
/* */
|
|
4328
|
-
/* */
|
|
4329
|
-
/* */
|
|
4330
|
-
/* */
|
|
4331
|
-
/* */
|
|
4332
|
-
/* */
|
|
4333
|
-
/* */
|
|
4334
|
-
/* */
|
|
4335
|
-
/* */
|
|
4336
|
-
/* */
|
|
4337
|
-
/* */
|
|
4338
|
-
/* */
|
|
4339
|
-
/* */
|
|
4340
|
-
/* */
|
|
4341
|
-
/* */
|
|
4342
|
-
/* */
|
|
4343
|
-
/* */
|
|
4344
|
-
/* */
|
|
4345
|
-
/* */
|
|
4346
|
-
/* */
|
|
4347
|
-
/* */
|
|
4348
|
-
/* */
|
|
4349
|
-
/* */
|
|
4350
|
-
/* */
|
|
4351
|
-
/* */
|
|
4352
|
-
/* */
|
|
4353
|
-
/* */
|
|
4354
|
-
/* */
|
|
4355
|
-
/* */
|
|
4356
|
-
/* */
|
|
4357
|
-
/* */
|
|
4358
|
-
/* */
|
|
4359
|
-
/* */
|
|
4360
|
-
/* */
|
|
4361
|
-
/* */
|
|
4362
|
-
/* */
|
|
4363
|
-
/* */
|
|
4364
|
-
/* */
|
|
4365
|
-
/* */
|
|
4366
|
-
/* */
|
|
4367
|
-
/* */
|
|
4368
|
-
/* */
|
|
4369
|
-
/* */
|
|
4370
|
-
/* */
|
|
4371
|
-
/* */
|
|
4372
|
-
/* */
|
|
4373
|
-
/* */
|
|
4374
|
-
/* */
|
|
4375
|
-
/* */
|
|
4376
|
-
/* */
|
|
4377
|
-
/* */
|
|
4378
|
-
/* */
|
|
4379
|
-
/* */
|
|
4380
|
-
/* */
|
|
4381
|
-
/* */
|
|
4382
|
-
/* */
|
|
4383
|
-
/* */
|
|
4384
|
-
/* */
|
|
4385
|
-
/* */
|
|
4386
|
-
/* */
|
|
4387
|
-
/* */
|
|
4388
|
-
/* */
|
|
4389
|
-
/* */
|
|
4390
|
-
/* */
|
|
4391
|
-
/* */
|
|
4392
|
-
/* */
|
|
4393
|
-
/* */
|
|
4394
|
-
/* */
|
|
4395
|
-
/* */
|
|
4396
|
-
/* */
|
|
4397
|
-
/* */
|
|
4398
|
-
/* */
|
|
4399
|
-
/* */
|
|
4400
|
-
/* */
|
|
4401
|
-
/* */
|
|
4402
|
-
/* */
|
|
4403
|
-
/* */
|
|
4404
|
-
/* */
|
|
4405
|
-
/* */
|
|
4406
|
-
/* */
|
|
4407
|
-
/* */
|
|
4408
|
-
/* */
|
|
4409
|
-
/* */
|
|
4410
|
-
/* */
|
|
4411
|
-
/* */
|
|
4412
|
-
/* */
|
|
4413
|
-
/* */
|
|
4414
|
-
/* */
|
|
4415
|
-
/* */
|
|
4416
|
-
/* */
|
|
4417
|
-
/* */
|
|
4418
|
-
return (void 0);
|
|
4419
|
-
};
|
|
4420
|
-
//#endregion
|
|
4421
|
-
//#region utils process / get bash or shell name
|
|
4422
|
-
UtilsProcess.getBashOrShellName = () => {
|
|
4423
|
-
//#region @browser
|
|
4424
|
-
return 'browser';
|
|
4425
|
-
//#endregion
|
|
4085
|
+
//#region utils process / get bash or shell name
|
|
4086
|
+
UtilsProcess.getBashOrShellName = () => {
|
|
4087
|
+
//#region @browser
|
|
4088
|
+
return 'browser';
|
|
4089
|
+
//#endregion
|
|
4426
4090
|
/* */
|
|
4427
4091
|
/* */
|
|
4428
4092
|
/* */
|
|
@@ -7365,6 +7029,9 @@ var Helpers;
|
|
|
7365
7029
|
/* */
|
|
7366
7030
|
/* */
|
|
7367
7031
|
/* */
|
|
7032
|
+
/* */
|
|
7033
|
+
/* */
|
|
7034
|
+
/* */
|
|
7368
7035
|
};
|
|
7369
7036
|
Helpers.info = (details, repeatable = false) => {
|
|
7370
7037
|
/* */
|
|
@@ -7410,6 +7077,9 @@ var Helpers;
|
|
|
7410
7077
|
/* */
|
|
7411
7078
|
/* */
|
|
7412
7079
|
/* */
|
|
7080
|
+
/* */
|
|
7081
|
+
/* */
|
|
7082
|
+
/* */
|
|
7413
7083
|
};
|
|
7414
7084
|
Helpers.success = (details) => {
|
|
7415
7085
|
if (Helpers.getIsBrowser()) {
|
|
@@ -7450,6 +7120,9 @@ var Helpers;
|
|
|
7450
7120
|
/* */
|
|
7451
7121
|
/* */
|
|
7452
7122
|
/* */
|
|
7123
|
+
/* */
|
|
7124
|
+
/* */
|
|
7125
|
+
/* */
|
|
7453
7126
|
};
|
|
7454
7127
|
class ActionInstance {
|
|
7455
7128
|
constructor(actionName) {
|
|
@@ -7528,6 +7201,9 @@ var Helpers;
|
|
|
7528
7201
|
/* */
|
|
7529
7202
|
/* */
|
|
7530
7203
|
/* */
|
|
7204
|
+
/* */
|
|
7205
|
+
/* */
|
|
7206
|
+
/* */
|
|
7531
7207
|
};
|
|
7532
7208
|
Helpers.logTaskStarted = (details) => {
|
|
7533
7209
|
if (global.hideLog && frameworkName === 'taon') {
|
|
@@ -7587,6 +7263,9 @@ var Helpers;
|
|
|
7587
7263
|
/* */
|
|
7588
7264
|
/* */
|
|
7589
7265
|
/* */
|
|
7266
|
+
/* */
|
|
7267
|
+
/* */
|
|
7268
|
+
/* */
|
|
7590
7269
|
};
|
|
7591
7270
|
Helpers.logTaskDone = (details) => {
|
|
7592
7271
|
if (global.hideLog && frameworkName === 'taon') {
|
|
@@ -7745,6 +7424,9 @@ var Helpers;
|
|
|
7745
7424
|
/* */
|
|
7746
7425
|
/* */
|
|
7747
7426
|
/* */
|
|
7427
|
+
/* */
|
|
7428
|
+
/* */
|
|
7429
|
+
/* */
|
|
7748
7430
|
};
|
|
7749
7431
|
const processes = [];
|
|
7750
7432
|
Helpers.bigMaxBuffer = 2024 * 500;
|
|
@@ -9640,25 +9322,450 @@ var Helpers;
|
|
|
9640
9322
|
/* */
|
|
9641
9323
|
return (void 0);
|
|
9642
9324
|
};
|
|
9643
|
-
/**
|
|
9644
|
-
* @deprecated use UtilsFilesFoldersSync.getFilesFrom
|
|
9645
|
-
* return absolute paths for files inside folder or link to folder
|
|
9646
|
-
*/
|
|
9647
|
-
Helpers.getFilesFrom = (folderOrLinkToFolder, options) => {
|
|
9648
|
-
return UtilsFilesFoldersSync.getFilesFrom(folderOrLinkToFolder, options);
|
|
9325
|
+
/**
|
|
9326
|
+
* @deprecated use UtilsFilesFoldersSync.getFilesFrom
|
|
9327
|
+
* return absolute paths for files inside folder or link to folder
|
|
9328
|
+
*/
|
|
9329
|
+
Helpers.getFilesFrom = (folderOrLinkToFolder, options) => {
|
|
9330
|
+
return UtilsFilesFoldersSync.getFilesFrom(folderOrLinkToFolder, options);
|
|
9331
|
+
};
|
|
9332
|
+
/**
|
|
9333
|
+
* @deprecated use UtilsFilesFoldersSync.getFoldersFrom
|
|
9334
|
+
* return absolute paths for folders inside folder or link to folder
|
|
9335
|
+
*/
|
|
9336
|
+
Helpers.getFoldersFrom = (folderOrLinkToFolder, options) => {
|
|
9337
|
+
return UtilsFilesFoldersSync.getFoldersFrom(folderOrLinkToFolder, options);
|
|
9338
|
+
};
|
|
9339
|
+
/**
|
|
9340
|
+
* @deprecated use UtilsFilesFoldersSync.filesFrom
|
|
9341
|
+
* return absolute paths for folders inside folders
|
|
9342
|
+
*/
|
|
9343
|
+
Helpers.filesFrom = (pathToFolder, recrusive = false, incudeUnexistedLinks = false) => {
|
|
9344
|
+
/* */
|
|
9345
|
+
/* */
|
|
9346
|
+
/* */
|
|
9347
|
+
/* */
|
|
9348
|
+
/* */
|
|
9349
|
+
/* */
|
|
9350
|
+
/* */
|
|
9351
|
+
/* */
|
|
9352
|
+
/* */
|
|
9353
|
+
/* */
|
|
9354
|
+
/* */
|
|
9355
|
+
/* */
|
|
9356
|
+
/* */
|
|
9357
|
+
/* */
|
|
9358
|
+
/* */
|
|
9359
|
+
/* */
|
|
9360
|
+
/* */
|
|
9361
|
+
/* */
|
|
9362
|
+
/* */
|
|
9363
|
+
/* */
|
|
9364
|
+
/* */
|
|
9365
|
+
/* */
|
|
9366
|
+
/* */
|
|
9367
|
+
/* */
|
|
9368
|
+
/* */
|
|
9369
|
+
/* */
|
|
9370
|
+
/* */
|
|
9371
|
+
/* */
|
|
9372
|
+
/* */
|
|
9373
|
+
/* */
|
|
9374
|
+
/* */
|
|
9375
|
+
/* */
|
|
9376
|
+
/* */
|
|
9377
|
+
/* */
|
|
9378
|
+
/* */
|
|
9379
|
+
/* */
|
|
9380
|
+
/* */
|
|
9381
|
+
return (void 0);
|
|
9382
|
+
};
|
|
9383
|
+
/**
|
|
9384
|
+
* @deprecated use UtilsOs.openFolderInFileExplorer
|
|
9385
|
+
* @param folderPath
|
|
9386
|
+
*/
|
|
9387
|
+
Helpers.openFolderInFileExplorer = (folderPath) => {
|
|
9388
|
+
UtilsOs.openFolderInFileExplorer(folderPath);
|
|
9389
|
+
};
|
|
9390
|
+
Helpers.hideNodeWarnings = () => {
|
|
9391
|
+
/* */
|
|
9392
|
+
/* */
|
|
9393
|
+
/* */
|
|
9394
|
+
};
|
|
9395
|
+
})(Helpers || (Helpers = {}));
|
|
9396
|
+
|
|
9397
|
+
var UtilsTime;
|
|
9398
|
+
(function (UtilsTime) {
|
|
9399
|
+
//#region format duration
|
|
9400
|
+
UtilsTime.formatDuration = (milliseconds) => {
|
|
9401
|
+
const absMs = Math.abs(milliseconds);
|
|
9402
|
+
const ms = absMs % 1000;
|
|
9403
|
+
const totalSeconds = Math.floor(absMs / 1000);
|
|
9404
|
+
const seconds = totalSeconds % 60;
|
|
9405
|
+
const totalMinutes = Math.floor(totalSeconds / 60);
|
|
9406
|
+
const minutes = totalMinutes % 60;
|
|
9407
|
+
const hours = Math.floor(totalMinutes / 60);
|
|
9408
|
+
const parts = [];
|
|
9409
|
+
if (hours > 0) {
|
|
9410
|
+
parts.push(`${hours}h`);
|
|
9411
|
+
}
|
|
9412
|
+
if (minutes > 0) {
|
|
9413
|
+
parts.push(`${minutes}min`);
|
|
9414
|
+
}
|
|
9415
|
+
if (seconds > 0) {
|
|
9416
|
+
parts.push(`${seconds}s`);
|
|
9417
|
+
}
|
|
9418
|
+
// show ms:
|
|
9419
|
+
// - always when < 1s
|
|
9420
|
+
// - otherwise only if there is remainder
|
|
9421
|
+
if (ms > 0 || parts.length === 0) {
|
|
9422
|
+
parts.push(`${ms}ms`);
|
|
9423
|
+
}
|
|
9424
|
+
return parts.join(', ');
|
|
9425
|
+
};
|
|
9426
|
+
//#endregion
|
|
9427
|
+
//#region wait
|
|
9428
|
+
UtilsTime.wait = (second) => {
|
|
9429
|
+
return new Promise((resolve, reject) => {
|
|
9430
|
+
setTimeout(() => {
|
|
9431
|
+
resolve(void 0);
|
|
9432
|
+
}, second * 1000);
|
|
9433
|
+
});
|
|
9434
|
+
};
|
|
9435
|
+
//#endregion
|
|
9436
|
+
//#region wait miliseconds
|
|
9437
|
+
UtilsTime.waitMilliseconds = (milliseconds) => {
|
|
9438
|
+
// Helpers.taskStarted(`Waiting ${milliseconds} milliseconds...`);
|
|
9439
|
+
return new Promise((resolve, reject) => {
|
|
9440
|
+
setTimeout(() => {
|
|
9441
|
+
// Helpers.taskDone(`Done waiting ${milliseconds} milliseconds`);
|
|
9442
|
+
resolve(void 0);
|
|
9443
|
+
}, milliseconds);
|
|
9444
|
+
});
|
|
9445
|
+
};
|
|
9446
|
+
function createResult(description, durationMs, options) {
|
|
9447
|
+
const seconds = durationMs / 1000;
|
|
9448
|
+
const minutes = seconds / 60;
|
|
9449
|
+
const human = durationMs < 1000
|
|
9450
|
+
? `${durationMs.toFixed(2)}ms`
|
|
9451
|
+
: seconds < 60
|
|
9452
|
+
? `${seconds.toFixed(2)}s`
|
|
9453
|
+
: `${minutes.toFixed(2)}min`;
|
|
9454
|
+
if (!options?.hideLogs) {
|
|
9455
|
+
Helpers.taskDone(`Execution time for "${chalk.bold(description)}": ${chalk.bold(human)}`);
|
|
9456
|
+
}
|
|
9457
|
+
return {
|
|
9458
|
+
milliseconds: durationMs,
|
|
9459
|
+
seconds,
|
|
9460
|
+
minutes,
|
|
9461
|
+
human,
|
|
9462
|
+
};
|
|
9463
|
+
}
|
|
9464
|
+
//#endregion
|
|
9465
|
+
//#region mesure execution time
|
|
9466
|
+
UtilsTime.mesureExecutionTime = async (description, functionToExecute, options) => {
|
|
9467
|
+
if (!options?.hideLogs) {
|
|
9468
|
+
Helpers.taskStarted(`Starting ${chalk.bold(description)} (measuring time)`);
|
|
9469
|
+
}
|
|
9470
|
+
const start = process.hrtime.bigint();
|
|
9471
|
+
await functionToExecute();
|
|
9472
|
+
const end = process.hrtime.bigint();
|
|
9473
|
+
const durationMs = Number(end - start) / 1_000_000;
|
|
9474
|
+
return createResult(description, durationMs, options);
|
|
9475
|
+
};
|
|
9476
|
+
//#endregion
|
|
9477
|
+
//#region mesure execution time sync
|
|
9478
|
+
UtilsTime.mesureExecutionTimeSync = (description, functionToExecute, options) => {
|
|
9479
|
+
if (!options?.hideLogs) {
|
|
9480
|
+
Helpers.taskStarted(`Starting ${chalk.bold(description)} (measuring time)`);
|
|
9481
|
+
}
|
|
9482
|
+
const start = process.hrtime.bigint();
|
|
9483
|
+
functionToExecute();
|
|
9484
|
+
const end = process.hrtime.bigint();
|
|
9485
|
+
const durationMs = Number(end - start) / 1_000_000;
|
|
9486
|
+
return createResult(description, durationMs, options);
|
|
9487
|
+
};
|
|
9488
|
+
//#endregion
|
|
9489
|
+
})(UtilsTime || (UtilsTime = {}));
|
|
9490
|
+
|
|
9491
|
+
//#region imports
|
|
9492
|
+
//#endregion
|
|
9493
|
+
//#region utils
|
|
9494
|
+
var Utils;
|
|
9495
|
+
(function (Utils) {
|
|
9496
|
+
//#region wait
|
|
9497
|
+
Utils.wait = (second) => {
|
|
9498
|
+
return UtilsTime.wait(second);
|
|
9499
|
+
};
|
|
9500
|
+
//#endregion
|
|
9501
|
+
//#region wait miliseconds
|
|
9502
|
+
Utils.waitMilliseconds = (milliseconds) => {
|
|
9503
|
+
// Helpers.taskStarted(`Waiting ${milliseconds} milliseconds...`);
|
|
9504
|
+
return UtilsTime.waitMilliseconds(milliseconds);
|
|
9505
|
+
};
|
|
9506
|
+
//#endregion
|
|
9507
|
+
//#region utils / uniq array
|
|
9508
|
+
Utils.uniqArray = (array, uniqueProperty) => {
|
|
9509
|
+
var seen = {};
|
|
9510
|
+
return array
|
|
9511
|
+
.filter(f => !!f)
|
|
9512
|
+
.filter(function (item) {
|
|
9513
|
+
return seen.hasOwnProperty(uniqueProperty ? item[uniqueProperty] : item)
|
|
9514
|
+
? false
|
|
9515
|
+
: (seen[uniqueProperty ? item[uniqueProperty] : item] = true);
|
|
9516
|
+
});
|
|
9517
|
+
};
|
|
9518
|
+
//#endregion
|
|
9519
|
+
//#region utils / recursive sort keys in object
|
|
9520
|
+
/**
|
|
9521
|
+
* @param anyObject
|
|
9522
|
+
* @returns object with sorted keys
|
|
9523
|
+
*/
|
|
9524
|
+
Utils.sortKeys = (anyObject) => {
|
|
9525
|
+
if (_.isArray(anyObject)) {
|
|
9526
|
+
return anyObject.map(Utils.sortKeys);
|
|
9527
|
+
}
|
|
9528
|
+
if (_.isObject(anyObject)) {
|
|
9529
|
+
return _.fromPairs(_.keys(anyObject)
|
|
9530
|
+
.sort()
|
|
9531
|
+
.map(key => [key, Utils.sortKeys(anyObject[key])]));
|
|
9532
|
+
}
|
|
9533
|
+
return anyObject;
|
|
9534
|
+
};
|
|
9535
|
+
//#endregion
|
|
9536
|
+
//#region utils / escape string for reg exp
|
|
9537
|
+
/**
|
|
9538
|
+
* Example:
|
|
9539
|
+
* new RegExp(escapeStringForRegEx('a.b.c'),'g') => /a\.b\.c/g
|
|
9540
|
+
*/
|
|
9541
|
+
Utils.escapeStringForRegEx = (stringForRegExp, options) => {
|
|
9542
|
+
options = options || {};
|
|
9543
|
+
if (options?.skipEscapeSlashAndDash) {
|
|
9544
|
+
return stringForRegExp.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
9545
|
+
}
|
|
9546
|
+
return stringForRegExp.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
9547
|
+
};
|
|
9548
|
+
//#endregion
|
|
9549
|
+
//#region utils / remove chalk special chars
|
|
9550
|
+
function removeChalkSpecialChars(str) {
|
|
9551
|
+
// Regex to match ANSI escape sequences used by Chalk
|
|
9552
|
+
const ansiRegex = /\u001b\[[0-9;]*m/g;
|
|
9553
|
+
// Replace all ANSI escape sequences with an empty string
|
|
9554
|
+
return str.replace(ansiRegex, '');
|
|
9555
|
+
}
|
|
9556
|
+
Utils.removeChalkSpecialChars = removeChalkSpecialChars;
|
|
9557
|
+
//#endregion
|
|
9558
|
+
//#region utils / full date time
|
|
9559
|
+
Utils.fullDateTime = () => {
|
|
9560
|
+
/* */
|
|
9561
|
+
/* */
|
|
9562
|
+
return (void 0);
|
|
9563
|
+
};
|
|
9564
|
+
//#endregion
|
|
9565
|
+
//#region utils / full date
|
|
9566
|
+
Utils.fullDate = () => {
|
|
9567
|
+
/* */
|
|
9568
|
+
/* */
|
|
9569
|
+
return (void 0);
|
|
9570
|
+
};
|
|
9571
|
+
//#endregion
|
|
9572
|
+
//#region utils / get free port
|
|
9573
|
+
const takenPorts = [];
|
|
9574
|
+
Utils.getFreePort = async (options) => {
|
|
9575
|
+
/* */
|
|
9576
|
+
/* */
|
|
9577
|
+
/* */
|
|
9578
|
+
/* */
|
|
9579
|
+
/* */
|
|
9580
|
+
/* */
|
|
9581
|
+
/* */
|
|
9582
|
+
/* */
|
|
9583
|
+
/* */
|
|
9584
|
+
/* */
|
|
9585
|
+
/* */
|
|
9586
|
+
/* */
|
|
9587
|
+
/* */
|
|
9588
|
+
/* */
|
|
9589
|
+
/* */
|
|
9590
|
+
/* */
|
|
9591
|
+
/* */
|
|
9592
|
+
/* */
|
|
9593
|
+
/* */
|
|
9594
|
+
/* */
|
|
9595
|
+
/* */
|
|
9596
|
+
/* */
|
|
9597
|
+
/* */
|
|
9598
|
+
/* */
|
|
9599
|
+
/* */
|
|
9600
|
+
/* */
|
|
9601
|
+
/* */
|
|
9602
|
+
/* */
|
|
9603
|
+
/* */
|
|
9604
|
+
/* */
|
|
9605
|
+
return (void 0);
|
|
9606
|
+
};
|
|
9607
|
+
//#endregion
|
|
9608
|
+
//#region utils / required uncached
|
|
9609
|
+
/**
|
|
9610
|
+
* Traverses the cache to search for all the cached
|
|
9611
|
+
* files of the specified module name
|
|
9612
|
+
*/
|
|
9613
|
+
const searchCache = (moduleName, callback) => {
|
|
9614
|
+
/* */
|
|
9615
|
+
/* */
|
|
9616
|
+
/* */
|
|
9617
|
+
/* */
|
|
9618
|
+
/* */
|
|
9619
|
+
/* */
|
|
9620
|
+
/* */
|
|
9621
|
+
/* */
|
|
9622
|
+
/* */
|
|
9623
|
+
/* */
|
|
9624
|
+
/* */
|
|
9625
|
+
/* */
|
|
9626
|
+
/* */
|
|
9627
|
+
/* */
|
|
9628
|
+
/* */
|
|
9629
|
+
/* */
|
|
9630
|
+
/* */
|
|
9631
|
+
/* */
|
|
9632
|
+
/* */
|
|
9633
|
+
/* */
|
|
9634
|
+
return (void 0);
|
|
9635
|
+
};
|
|
9636
|
+
/**
|
|
9637
|
+
* Removes a module from the cache
|
|
9638
|
+
*/
|
|
9639
|
+
const purgeCache = moduleName => {
|
|
9640
|
+
/* */
|
|
9641
|
+
/* */
|
|
9642
|
+
/* */
|
|
9643
|
+
/* */
|
|
9644
|
+
/* */
|
|
9645
|
+
/* */
|
|
9646
|
+
/* */
|
|
9647
|
+
/* */
|
|
9648
|
+
/* */
|
|
9649
|
+
/* */
|
|
9650
|
+
/* */
|
|
9651
|
+
/* */
|
|
9652
|
+
/* */
|
|
9653
|
+
/* */
|
|
9654
|
+
return (void 0);
|
|
9655
|
+
};
|
|
9656
|
+
Utils.requireUncached = (module) => {
|
|
9657
|
+
/* */
|
|
9658
|
+
/* */
|
|
9659
|
+
/* */
|
|
9660
|
+
/* */
|
|
9661
|
+
return (void 0);
|
|
9662
|
+
};
|
|
9663
|
+
//#endregion
|
|
9664
|
+
//#region utils / camelize
|
|
9665
|
+
/**
|
|
9666
|
+
* similar to camelCase but remove
|
|
9667
|
+
* all non word / repeated characters
|
|
9668
|
+
*/
|
|
9669
|
+
Utils.camelize = (str = '') => {
|
|
9670
|
+
str = str.replace(/\W/g, '').toLowerCase();
|
|
9671
|
+
return str
|
|
9672
|
+
.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
|
|
9673
|
+
return index == 0 ? word.toLowerCase() : word.toUpperCase();
|
|
9674
|
+
})
|
|
9675
|
+
.replace(/\s+/g, '');
|
|
9676
|
+
};
|
|
9677
|
+
//#endregion
|
|
9678
|
+
//#region css
|
|
9679
|
+
let css;
|
|
9680
|
+
(function (css) {
|
|
9681
|
+
//#region css utils / numeric value of pixels
|
|
9682
|
+
/**
|
|
9683
|
+
*
|
|
9684
|
+
* @param pixelsCss pixels ex. 100px
|
|
9685
|
+
* @returns
|
|
9686
|
+
*/
|
|
9687
|
+
function numValue(pixelsCss) {
|
|
9688
|
+
// tslint:disable-next-line:radix
|
|
9689
|
+
return parseInt(pixelsCss?.toString()?.replace('px', ''));
|
|
9690
|
+
}
|
|
9691
|
+
css.numValue = numValue;
|
|
9692
|
+
//#endregion
|
|
9693
|
+
})(css = Utils.css || (Utils.css = {}));
|
|
9694
|
+
//#endregion
|
|
9695
|
+
})(Utils || (Utils = {}));
|
|
9696
|
+
//#endregion
|
|
9697
|
+
//#region TODO IN_PROGRESS utils messages
|
|
9698
|
+
/**
|
|
9699
|
+
* TODO @LAST @IN_PROGRESS
|
|
9700
|
+
* - utils for messages
|
|
9701
|
+
* - export when ready
|
|
9702
|
+
* - should be ready for everything async refactor
|
|
9703
|
+
*/
|
|
9704
|
+
var UtilsMessages;
|
|
9705
|
+
(function (UtilsMessages) {
|
|
9706
|
+
//#region utils messages / compilation wrapper
|
|
9707
|
+
UtilsMessages.compilationWrapper = async (fn, taskName = 'Task', executionType = 'Compilation of') => {
|
|
9708
|
+
/* */
|
|
9709
|
+
/* */
|
|
9710
|
+
/* */
|
|
9711
|
+
/* */
|
|
9712
|
+
/* */
|
|
9713
|
+
/* */
|
|
9714
|
+
/* */
|
|
9715
|
+
/* */
|
|
9716
|
+
/* */
|
|
9717
|
+
/* */
|
|
9718
|
+
/* */
|
|
9719
|
+
/* */
|
|
9720
|
+
/* */
|
|
9721
|
+
/* */
|
|
9722
|
+
/* */
|
|
9723
|
+
return (void 0);
|
|
9724
|
+
};
|
|
9725
|
+
//#endregion
|
|
9726
|
+
})(UtilsMessages || (UtilsMessages = {}));
|
|
9727
|
+
//#endregion
|
|
9728
|
+
//#region utils migrations
|
|
9729
|
+
/**
|
|
9730
|
+
* Taon migration utilities
|
|
9731
|
+
*/
|
|
9732
|
+
var UtilsMigrations;
|
|
9733
|
+
(function (UtilsMigrations) {
|
|
9734
|
+
UtilsMigrations.getTimestampFromClassName = (className) => {
|
|
9735
|
+
const [maybeTimestamp1, maybeTimestamp2] = className.split('_') || [];
|
|
9736
|
+
// console.log({ maybeTimestamp1, maybeTimestamp2 });
|
|
9737
|
+
const timestamp1 = parseInt(maybeTimestamp1);
|
|
9738
|
+
const timestamp2 = parseInt(maybeTimestamp2);
|
|
9739
|
+
const timestamp = !_.isNaN(timestamp1) ? timestamp1 : timestamp2;
|
|
9740
|
+
return UtilsMigrations.isValidTimestamp(timestamp) ? timestamp : void 0;
|
|
9649
9741
|
};
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
return
|
|
9742
|
+
UtilsMigrations.getFormattedTimestampFromClassName = (className) => {
|
|
9743
|
+
const timestamp = UtilsMigrations.getTimestampFromClassName(className);
|
|
9744
|
+
if (!timestamp) {
|
|
9745
|
+
return void 0;
|
|
9746
|
+
}
|
|
9747
|
+
return UtilsMigrations.formatTimestamp(timestamp);
|
|
9656
9748
|
};
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9749
|
+
UtilsMigrations.formatTimestamp = (timestamp) => {
|
|
9750
|
+
const dateFromTimestamp = new Date(timestamp);
|
|
9751
|
+
// @ts-ignore
|
|
9752
|
+
return `${dateformat(dateFromTimestamp, 'dd-mm-yyyy HH:MM:ss')}`;
|
|
9753
|
+
};
|
|
9754
|
+
UtilsMigrations.isValidTimestamp = (value) => {
|
|
9755
|
+
if (typeof value !== 'number') {
|
|
9756
|
+
return false; // Must be a number
|
|
9757
|
+
}
|
|
9758
|
+
const minTimestamp = 0; // Minimum possible timestamp (Unix epoch)
|
|
9759
|
+
const maxTimestamp = 8640000000000000; // Max safe timestamp in JS (represents year ~275760)
|
|
9760
|
+
return value >= minTimestamp && value <= maxTimestamp;
|
|
9761
|
+
};
|
|
9762
|
+
})(UtilsMigrations || (UtilsMigrations = {}));
|
|
9763
|
+
//#endregion
|
|
9764
|
+
//#region utils yaml
|
|
9765
|
+
var UtilsYaml;
|
|
9766
|
+
(function (UtilsYaml) {
|
|
9767
|
+
UtilsYaml.yamlToJson = (yamlString) => {
|
|
9768
|
+
/* */
|
|
9662
9769
|
/* */
|
|
9663
9770
|
/* */
|
|
9664
9771
|
/* */
|
|
@@ -9667,6 +9774,9 @@ var Helpers;
|
|
|
9667
9774
|
/* */
|
|
9668
9775
|
/* */
|
|
9669
9776
|
/* */
|
|
9777
|
+
return (void 0);
|
|
9778
|
+
};
|
|
9779
|
+
UtilsYaml.jsonToYaml = (json) => {
|
|
9670
9780
|
/* */
|
|
9671
9781
|
/* */
|
|
9672
9782
|
/* */
|
|
@@ -9679,6 +9789,10 @@ var Helpers;
|
|
|
9679
9789
|
/* */
|
|
9680
9790
|
/* */
|
|
9681
9791
|
/* */
|
|
9792
|
+
return (void 0);
|
|
9793
|
+
};
|
|
9794
|
+
//#region read yaml as json
|
|
9795
|
+
UtilsYaml.readYamlAsJson = (absFilePathToYamlOrYmlFile, options) => {
|
|
9682
9796
|
/* */
|
|
9683
9797
|
/* */
|
|
9684
9798
|
/* */
|
|
@@ -9690,6 +9804,11 @@ var Helpers;
|
|
|
9690
9804
|
/* */
|
|
9691
9805
|
/* */
|
|
9692
9806
|
/* */
|
|
9807
|
+
return (void 0);
|
|
9808
|
+
};
|
|
9809
|
+
//#endregion
|
|
9810
|
+
//#region write json to yaml
|
|
9811
|
+
UtilsYaml.writeJsonToYaml = (destinationYamlfileAbsPath, json) => {
|
|
9693
9812
|
/* */
|
|
9694
9813
|
/* */
|
|
9695
9814
|
/* */
|
|
@@ -9698,72 +9817,106 @@ var Helpers;
|
|
|
9698
9817
|
/* */
|
|
9699
9818
|
return (void 0);
|
|
9700
9819
|
};
|
|
9820
|
+
//#endregion
|
|
9821
|
+
})(UtilsYaml || (UtilsYaml = {}));
|
|
9822
|
+
//#endregion
|
|
9823
|
+
//#region utils filepath metadata
|
|
9824
|
+
var FilePathMetaData;
|
|
9825
|
+
(function (FilePathMetaData) {
|
|
9826
|
+
const TERMINATOR = 'xxxxx'; // terminates metadata block
|
|
9827
|
+
const KV_SEPARATOR = '...'; // key/value separator
|
|
9828
|
+
const PAIR_SEPARATOR = 'IxIxI'; // between pairs
|
|
9829
|
+
//#region embed data into filename
|
|
9701
9830
|
/**
|
|
9702
|
-
*
|
|
9703
|
-
*
|
|
9831
|
+
* Embed metadata into filename while preserving the extension.
|
|
9832
|
+
*
|
|
9833
|
+
* Example:
|
|
9834
|
+
* embedData({ version: "1.2.3", envName: "__" }, "project.zip")
|
|
9835
|
+
* -> "version|-|1.2.3||--||envName|-|__|||project.zip"
|
|
9836
|
+
*
|
|
9837
|
+
* keysMap = {
|
|
9838
|
+
* projectName: "pn",
|
|
9839
|
+
* envName: "en",
|
|
9840
|
+
* version: "v"
|
|
9841
|
+
* }
|
|
9704
9842
|
*/
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
})(Helpers || (Helpers = {}));
|
|
9714
|
-
|
|
9715
|
-
class PROGRESS_DATA {
|
|
9716
|
-
constructor() {
|
|
9717
|
-
this.type = 'event';
|
|
9718
|
-
}
|
|
9719
|
-
static log(log) {
|
|
9720
|
-
/* */
|
|
9721
|
-
/* */
|
|
9722
|
-
/* */
|
|
9723
|
-
/* */
|
|
9724
|
-
/* */
|
|
9725
|
-
/* */
|
|
9726
|
-
/* */
|
|
9727
|
-
}
|
|
9728
|
-
static resolveFrom(chunk, callbackOnFounded, checkSplit = true) {
|
|
9729
|
-
let progress;
|
|
9730
|
-
let res = [];
|
|
9731
|
-
if (!_.isString(chunk)) {
|
|
9732
|
-
return [];
|
|
9733
|
-
}
|
|
9734
|
-
chunk = chunk.trim();
|
|
9735
|
-
if (checkSplit) {
|
|
9736
|
-
const split = chunk.split(/\r\n|\n|\r/);
|
|
9737
|
-
if (split.length > 1) {
|
|
9738
|
-
// console.log('split founded', split)
|
|
9739
|
-
split.forEach(s => {
|
|
9740
|
-
res = res.concat(this.resolveFrom(s, callbackOnFounded, false));
|
|
9741
|
-
});
|
|
9742
|
-
return res;
|
|
9843
|
+
FilePathMetaData.embedData = (data, orgFilename, options) => {
|
|
9844
|
+
options = options || {};
|
|
9845
|
+
const ext = path.extname(orgFilename);
|
|
9846
|
+
const base = path.basename(orgFilename, ext);
|
|
9847
|
+
const meta = Object.entries(data)
|
|
9848
|
+
.map(([key, value]) => {
|
|
9849
|
+
if (options.keysMap && options.keysMap[key]) {
|
|
9850
|
+
key = options.keysMap[key];
|
|
9743
9851
|
}
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9852
|
+
return `${key}${KV_SEPARATOR}${value ?? ''}`;
|
|
9853
|
+
})
|
|
9854
|
+
.join(PAIR_SEPARATOR);
|
|
9855
|
+
return `${meta}${TERMINATOR}${options.skipAddingBasenameAtEnd ? '' : base}${ext}`;
|
|
9856
|
+
};
|
|
9857
|
+
//#endregion
|
|
9858
|
+
//#region extract data from filename
|
|
9859
|
+
/**
|
|
9860
|
+
* Extract metadata from filename (reverse of embedData).
|
|
9861
|
+
*
|
|
9862
|
+
* Example:
|
|
9863
|
+
* extractData<{ version: string; env: string }>("myfile__version-1.2.3__env-prod.zip")
|
|
9864
|
+
* -> { version: "1.2.3", env: "prod" }
|
|
9865
|
+
*
|
|
9866
|
+
* keysMap = {
|
|
9867
|
+
* projectName: "pn",
|
|
9868
|
+
* envName: "en",
|
|
9869
|
+
* version: "v"
|
|
9870
|
+
* }
|
|
9871
|
+
*/
|
|
9872
|
+
FilePathMetaData.extractData = (filename, options) => {
|
|
9873
|
+
options = options || {};
|
|
9874
|
+
const ext = path.extname(filename);
|
|
9875
|
+
const thereIsNoExt = ext.includes('|') || ext.includes('-');
|
|
9876
|
+
const base = thereIsNoExt ? filename : path.basename(filename, ext);
|
|
9877
|
+
// Everything BEFORE the FIRST TERMINATOR
|
|
9878
|
+
const idx = base.lastIndexOf(TERMINATOR);
|
|
9879
|
+
const metaPart = idx >= 0 ? base.substring(0, idx) : base;
|
|
9880
|
+
const data = {};
|
|
9881
|
+
let cursor = 0;
|
|
9882
|
+
while (cursor <= metaPart.length) {
|
|
9883
|
+
const sepIdx = metaPart.indexOf(PAIR_SEPARATOR, cursor);
|
|
9884
|
+
const segment = sepIdx === -1
|
|
9885
|
+
? metaPart.substring(cursor)
|
|
9886
|
+
: metaPart.substring(cursor, sepIdx);
|
|
9887
|
+
if (segment) {
|
|
9888
|
+
const kvIdx = segment.indexOf(KV_SEPARATOR);
|
|
9889
|
+
if (kvIdx > -1) {
|
|
9890
|
+
const key = segment.substring(0, kvIdx);
|
|
9891
|
+
const value = segment.substring(kvIdx + KV_SEPARATOR.length);
|
|
9892
|
+
let finalKey = options.keysMap
|
|
9893
|
+
? Object.keys(options.keysMap || {}).find(k => options.keysMap[k] === key)
|
|
9894
|
+
: key;
|
|
9895
|
+
data[finalKey] = value;
|
|
9756
9896
|
}
|
|
9757
9897
|
}
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
Helpers.error(`ProgresssBarData: fail to parse "${progress}"`, true, true);
|
|
9762
|
-
}
|
|
9898
|
+
if (sepIdx === -1)
|
|
9899
|
+
break;
|
|
9900
|
+
cursor = sepIdx + PAIR_SEPARATOR.length;
|
|
9763
9901
|
}
|
|
9764
|
-
return
|
|
9765
|
-
}
|
|
9766
|
-
|
|
9902
|
+
return data;
|
|
9903
|
+
};
|
|
9904
|
+
//#endregion
|
|
9905
|
+
//#region get only metadata string
|
|
9906
|
+
FilePathMetaData.getOnlyMetadataString = (filename) => {
|
|
9907
|
+
const ext = path.extname(filename);
|
|
9908
|
+
const base = path.basename(filename, ext);
|
|
9909
|
+
const idx = base.lastIndexOf(TERMINATOR);
|
|
9910
|
+
if (idx === -1)
|
|
9911
|
+
return ''; // no terminator
|
|
9912
|
+
const metaPart = base.substring(0, idx);
|
|
9913
|
+
if (!metaPart.trim())
|
|
9914
|
+
return ''; // empty metadata
|
|
9915
|
+
return metaPart;
|
|
9916
|
+
};
|
|
9917
|
+
//#endregion
|
|
9918
|
+
})(FilePathMetaData || (FilePathMetaData = {}));
|
|
9919
|
+
//#endregion
|
|
9767
9920
|
|
|
9768
9921
|
//#region imports
|
|
9769
9922
|
//#endregion
|
|
@@ -10365,6 +10518,189 @@ var UtilsExecProc;
|
|
|
10365
10518
|
//#endregion
|
|
10366
10519
|
})(UtilsExecProc || (UtilsExecProc = {}));
|
|
10367
10520
|
|
|
10521
|
+
class ExecAsyncVscodeError extends Error {
|
|
10522
|
+
constructor(options) {
|
|
10523
|
+
const details = [
|
|
10524
|
+
`Command failed: ${options.command}`,
|
|
10525
|
+
options.cwd ? `cwd: ${options.cwd}` : undefined,
|
|
10526
|
+
typeof options.exitCode === 'number'
|
|
10527
|
+
? `exit code: ${options.exitCode}`
|
|
10528
|
+
: undefined,
|
|
10529
|
+
options.signal ? `signal: ${options.signal}` : undefined,
|
|
10530
|
+
options.stderr.trim() ? `stderr:\n${options.stderr.trim()}` : undefined,
|
|
10531
|
+
]
|
|
10532
|
+
.filter(Boolean)
|
|
10533
|
+
.join('\n');
|
|
10534
|
+
super(details, {
|
|
10535
|
+
cause: options.cause,
|
|
10536
|
+
});
|
|
10537
|
+
this.name = 'ExecAsyncVscodeError';
|
|
10538
|
+
this.command = options.command;
|
|
10539
|
+
this.cwd = options.cwd;
|
|
10540
|
+
this.stdout = options.stdout;
|
|
10541
|
+
this.stderr = options.stderr;
|
|
10542
|
+
this.exitCode = options.exitCode;
|
|
10543
|
+
this.signal = options.signal;
|
|
10544
|
+
}
|
|
10545
|
+
}
|
|
10546
|
+
function execAsyncVscode(options) {
|
|
10547
|
+
const { command, cwd, outputChannel, progress, cancellationToken, showCommand = true, showOutput = true, maxBuffer = 100 * 1024 * 1024, parseProgress = UtilsProgress.parseTaonProgressLine, } = options;
|
|
10548
|
+
return new Promise((resolve, reject) => {
|
|
10549
|
+
let stdout = '';
|
|
10550
|
+
let stderr = '';
|
|
10551
|
+
let previousProgress = 0;
|
|
10552
|
+
let settled = false;
|
|
10553
|
+
if (showCommand) {
|
|
10554
|
+
outputChannel?.appendLine(`> ${command}`);
|
|
10555
|
+
if (cwd) {
|
|
10556
|
+
outputChannel?.appendLine(`cwd: ${cwd}`);
|
|
10557
|
+
}
|
|
10558
|
+
}
|
|
10559
|
+
const execOptions = {
|
|
10560
|
+
cwd,
|
|
10561
|
+
env: {
|
|
10562
|
+
...process.env,
|
|
10563
|
+
...options.env,
|
|
10564
|
+
},
|
|
10565
|
+
windowsHide: true,
|
|
10566
|
+
maxBuffer,
|
|
10567
|
+
};
|
|
10568
|
+
const proc = exec(command, execOptions, (error, finalStdout, finalStderr) => {
|
|
10569
|
+
if (settled) {
|
|
10570
|
+
return;
|
|
10571
|
+
}
|
|
10572
|
+
settled = true;
|
|
10573
|
+
cancellationSubscription?.dispose();
|
|
10574
|
+
/*
|
|
10575
|
+
* The data listeners normally filled these already. Using the callback
|
|
10576
|
+
* values as a fallback also covers unusual stream situations.
|
|
10577
|
+
*/
|
|
10578
|
+
stdout ||= finalStdout ?? '';
|
|
10579
|
+
stderr ||= finalStderr ?? '';
|
|
10580
|
+
if (error) {
|
|
10581
|
+
reject(new ExecAsyncVscodeError({
|
|
10582
|
+
command,
|
|
10583
|
+
cwd,
|
|
10584
|
+
stdout,
|
|
10585
|
+
stderr,
|
|
10586
|
+
exitCode: typeof error.code === 'number' ? error.code : undefined,
|
|
10587
|
+
signal: error.signal ?? undefined,
|
|
10588
|
+
cause: error,
|
|
10589
|
+
}));
|
|
10590
|
+
return;
|
|
10591
|
+
}
|
|
10592
|
+
resolve({
|
|
10593
|
+
stdout,
|
|
10594
|
+
stderr,
|
|
10595
|
+
exitCode: 0,
|
|
10596
|
+
});
|
|
10597
|
+
});
|
|
10598
|
+
const stdoutReader = createLineReader(line => {
|
|
10599
|
+
stdout += `${line}\n`;
|
|
10600
|
+
const progressData = parseProgress?.(line);
|
|
10601
|
+
if (progressData) {
|
|
10602
|
+
reportProgress(progressData);
|
|
10603
|
+
return;
|
|
10604
|
+
}
|
|
10605
|
+
options.onStdoutLine?.(line);
|
|
10606
|
+
if (showOutput && line) {
|
|
10607
|
+
outputChannel?.appendLine(line);
|
|
10608
|
+
}
|
|
10609
|
+
});
|
|
10610
|
+
const stderrReader = createLineReader(line => {
|
|
10611
|
+
stderr += `${line}\n`;
|
|
10612
|
+
const progressData = parseProgress?.(line);
|
|
10613
|
+
if (progressData) {
|
|
10614
|
+
reportProgress(progressData);
|
|
10615
|
+
return;
|
|
10616
|
+
}
|
|
10617
|
+
options.onStderrLine?.(line);
|
|
10618
|
+
if (showOutput && line) {
|
|
10619
|
+
outputChannel?.appendLine(`[stderr] ${line}`);
|
|
10620
|
+
}
|
|
10621
|
+
});
|
|
10622
|
+
proc.stdout?.setEncoding('utf8');
|
|
10623
|
+
proc.stderr?.setEncoding('utf8');
|
|
10624
|
+
proc.stdout?.on('data', stdoutReader.push);
|
|
10625
|
+
proc.stderr?.on('data', stderrReader.push);
|
|
10626
|
+
proc.stdout?.on('end', stdoutReader.flush);
|
|
10627
|
+
proc.stderr?.on('end', stderrReader.flush);
|
|
10628
|
+
proc.stdout?.on('error', error => {
|
|
10629
|
+
outputChannel?.appendLine(`[stdout stream error] ${error.stack ?? error.message}`);
|
|
10630
|
+
});
|
|
10631
|
+
proc.stderr?.on('error', error => {
|
|
10632
|
+
outputChannel?.appendLine(`[stderr stream error] ${error.stack ?? error.message}`);
|
|
10633
|
+
});
|
|
10634
|
+
proc.once('error', error => {
|
|
10635
|
+
outputChannel?.appendLine(`[process error] ${error.stack ?? error.message}`);
|
|
10636
|
+
});
|
|
10637
|
+
const cancellationSubscription = cancellationToken?.onCancellationRequested(() => {
|
|
10638
|
+
if (settled) {
|
|
10639
|
+
return;
|
|
10640
|
+
}
|
|
10641
|
+
outputChannel?.appendLine(`Cancelling command: ${command}`);
|
|
10642
|
+
terminateChild(proc);
|
|
10643
|
+
});
|
|
10644
|
+
function reportProgress(data) {
|
|
10645
|
+
const message = data.message?.trim();
|
|
10646
|
+
if (typeof data.value === 'number') {
|
|
10647
|
+
const currentProgress = Math.max(previousProgress, Math.min(100, data.value));
|
|
10648
|
+
progress?.report({
|
|
10649
|
+
message,
|
|
10650
|
+
increment: currentProgress - previousProgress,
|
|
10651
|
+
});
|
|
10652
|
+
previousProgress = currentProgress;
|
|
10653
|
+
}
|
|
10654
|
+
else if (message) {
|
|
10655
|
+
progress?.report({
|
|
10656
|
+
message,
|
|
10657
|
+
});
|
|
10658
|
+
}
|
|
10659
|
+
if (message && showOutput) {
|
|
10660
|
+
outputChannel?.appendLine(`[${data.type ?? 'event'}] ${message}`);
|
|
10661
|
+
}
|
|
10662
|
+
}
|
|
10663
|
+
});
|
|
10664
|
+
}
|
|
10665
|
+
function terminateChild(proc) {
|
|
10666
|
+
if (!proc.pid || proc.killed) {
|
|
10667
|
+
return;
|
|
10668
|
+
}
|
|
10669
|
+
if (process.platform === 'win32') {
|
|
10670
|
+
/*
|
|
10671
|
+
* exec() creates a shell. Killing only proc.kill() can leave descendants
|
|
10672
|
+
* such as Node/ONNX alive, so terminate the process tree.
|
|
10673
|
+
*/
|
|
10674
|
+
exec(`taskkill /pid ${proc.pid} /t /f`, {
|
|
10675
|
+
windowsHide: true,
|
|
10676
|
+
}, () => undefined);
|
|
10677
|
+
return;
|
|
10678
|
+
}
|
|
10679
|
+
proc.kill('SIGTERM');
|
|
10680
|
+
}
|
|
10681
|
+
function createLineReader(onLine) {
|
|
10682
|
+
let pending = '';
|
|
10683
|
+
const push = (chunk) => {
|
|
10684
|
+
pending += chunk.toString();
|
|
10685
|
+
const lines = pending.split(/\r\n|\n|\r/);
|
|
10686
|
+
pending = lines.pop() ?? '';
|
|
10687
|
+
for (const line of lines) {
|
|
10688
|
+
onLine(line);
|
|
10689
|
+
}
|
|
10690
|
+
};
|
|
10691
|
+
const flush = () => {
|
|
10692
|
+
if (!pending) {
|
|
10693
|
+
return;
|
|
10694
|
+
}
|
|
10695
|
+
onLine(pending);
|
|
10696
|
+
pending = '';
|
|
10697
|
+
};
|
|
10698
|
+
return {
|
|
10699
|
+
push,
|
|
10700
|
+
flush,
|
|
10701
|
+
};
|
|
10702
|
+
}
|
|
10703
|
+
|
|
10368
10704
|
//#region imports
|
|
10369
10705
|
//#endregion
|
|
10370
10706
|
var UtilsNetwork;
|
|
@@ -13140,5 +13476,5 @@ var index = {};
|
|
|
13140
13476
|
* Generated bundle index. Do not edit.
|
|
13141
13477
|
*/
|
|
13142
13478
|
|
|
13143
|
-
export { $, BaselineSiteJoinprefix, CLI, CoreConfig, CoreModels, DbBinaryFormatEnum, FilePathMetaData, FilesNames, GlobalLibTypeName, GlobalStorage, GlobalTaskManager, GlobalTaskManagerClass, Helpers, LibTypeArr, LibTypeEnum, PREFIXES,
|
|
13479
|
+
export { $, BaselineSiteJoinprefix, CLI, CoreConfig, CoreModels, DbBinaryFormatEnum, ExecAsyncVscodeError, FilePathMetaData, FilesNames, GlobalLibTypeName, GlobalStorage, GlobalTaskManager, GlobalTaskManagerClass, Helpers, LibTypeArr, LibTypeEnum, PREFIXES, REGEX_REGION, TAGS, Utils, UtilsBinary, UtilsCli, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsExecProc, UtilsFilesFolders, UtilsFilesFoldersSync, UtilsI18n, UtilsJson, UtilsMessages, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsProgress, UtilsProjects, UtilsStdinStdoutLogger, UtilsString, UtilsStringRegex, UtilsSudo, UtilsTerminal, UtilsTime, UtilsWaitNotifier, UtilsYaml, _, appRelatedFiles, areTrustedForPatchUpdate, backendNodejsOnlyFiles, backendWebsqlNodejsFiles, baseTaonDevProjectsNames, chalk, child_process, chokidar, config, crossPlatformPath, dateformat, dockerTemplates, dotTaonFolder, dotTnpFolder, encoding, execAsyncVscode, extAllowedToExportAndReplaceTSJSCodeFiles, extAllowedToReplace, extForSassLikeFiles, extForStyles, extTemplatesFiles, fg, fileName, filesNotAllowedToClean, fkill, folderName, frameworkName, frameworkNameBe, frontEndOnly, frontendFiles, fse, glob, globalSpinner, http, https, isCloudflareWorker, isElevated, load, mkdirp, ncp, net, notAllowedNames, notAllowedProjectNames, notNeededForExportFiles, os, path, ps, psList, requireDefault, requiredForDev, rimraf, spawn, startAsync, taonActionFromParent, taonBasePathToGlobalDockerTemplatesFn, taonContainers, taonPackageName, taonProjects, taonRepoPathUserInUserDirFn, tempFoldersName, tnpPackageName, urlRepoTaon, urlRepoTaonContainers, win32Path };
|
|
13144
13480
|
//# sourceMappingURL=tnp-core-browser.mjs.map
|