@samchon/ts-patch 3.2.2-dev.20241204
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/CHANGELOG.md +268 -0
- package/LICENSE.md +13 -0
- package/README.md +348 -0
- package/actions/check.d.ts +11 -0
- package/actions/check.js +45 -0
- package/actions/check.js.map +1 -0
- package/actions/index.d.ts +5 -0
- package/actions/index.js +22 -0
- package/actions/index.js.map +1 -0
- package/actions/install.d.ts +5 -0
- package/actions/install.js +25 -0
- package/actions/install.js.map +1 -0
- package/actions/patch.d.ts +6 -0
- package/actions/patch.js +82 -0
- package/actions/patch.js.map +1 -0
- package/actions/uninstall.d.ts +5 -0
- package/actions/uninstall.js +26 -0
- package/actions/uninstall.js.map +1 -0
- package/actions/unpatch.d.ts +3 -0
- package/actions/unpatch.js +82 -0
- package/actions/unpatch.js.map +1 -0
- package/bin/ts-patch.d.ts +1 -0
- package/bin/ts-patch.js +33 -0
- package/bin/ts-patch.js.map +1 -0
- package/bin/tspc.d.ts +0 -0
- package/bin/tspc.js +14 -0
- package/bin/tspc.js.map +1 -0
- package/cli/cli.d.ts +14 -0
- package/cli/cli.js +96 -0
- package/cli/cli.js.map +1 -0
- package/cli/commands.d.ts +5 -0
- package/cli/commands.js +49 -0
- package/cli/commands.js.map +1 -0
- package/cli/help-menu.d.ts +1 -0
- package/cli/help-menu.js +43 -0
- package/cli/help-menu.js.map +1 -0
- package/cli/options.d.ts +14 -0
- package/cli/options.js +63 -0
- package/cli/options.js.map +1 -0
- package/compiler/package.json +4 -0
- package/compiler/tsc.js +19 -0
- package/compiler/tsserver.js +19 -0
- package/compiler/tsserverlibrary.js +19 -0
- package/compiler/typescript.js +19 -0
- package/config.d.ts +18 -0
- package/config.js +50 -0
- package/config.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +29 -0
- package/index.js.map +1 -0
- package/module/get-live-module.d.ts +5 -0
- package/module/get-live-module.js +25 -0
- package/module/get-live-module.js.map +1 -0
- package/module/index.d.ts +4 -0
- package/module/index.js +21 -0
- package/module/index.js.map +1 -0
- package/module/module-file.d.ts +9 -0
- package/module/module-file.js +97 -0
- package/module/module-file.js.map +1 -0
- package/module/module-source.d.ts +15 -0
- package/module/module-source.js +35 -0
- package/module/module-source.js.map +1 -0
- package/module/source-section.d.ts +20 -0
- package/module/source-section.js +73 -0
- package/module/source-section.js.map +1 -0
- package/module/ts-module.d.ts +35 -0
- package/module/ts-module.js +100 -0
- package/module/ts-module.js.map +1 -0
- package/options.d.ts +19 -0
- package/options.js +32 -0
- package/options.js.map +1 -0
- package/package.json +107 -0
- package/patch/get-patched-source.d.ts +12 -0
- package/patch/get-patched-source.js +69 -0
- package/patch/get-patched-source.js.map +1 -0
- package/patch/patch-detail.d.ts +36 -0
- package/patch/patch-detail.js +67 -0
- package/patch/patch-detail.js.map +1 -0
- package/patch/patch-module.d.ts +5 -0
- package/patch/patch-module.js +182 -0
- package/patch/patch-module.js.map +1 -0
- package/patch/transformers/add-original-create-program.d.ts +3 -0
- package/patch/transformers/add-original-create-program.js +71 -0
- package/patch/transformers/add-original-create-program.js.map +1 -0
- package/patch/transformers/fix-ts-early-return.d.ts +2 -0
- package/patch/transformers/fix-ts-early-return.js +51 -0
- package/patch/transformers/fix-ts-early-return.js.map +1 -0
- package/patch/transformers/hook-tsc-exec.d.ts +2 -0
- package/patch/transformers/hook-tsc-exec.js +32 -0
- package/patch/transformers/hook-tsc-exec.js.map +1 -0
- package/patch/transformers/index.d.ts +6 -0
- package/patch/transformers/index.js +23 -0
- package/patch/transformers/index.js.map +1 -0
- package/patch/transformers/merge-statements.d.ts +2 -0
- package/patch/transformers/merge-statements.js +60 -0
- package/patch/transformers/merge-statements.js.map +1 -0
- package/patch/transformers/patch-create-program.d.ts +2 -0
- package/patch/transformers/patch-create-program.js +36 -0
- package/patch/transformers/patch-create-program.js.map +1 -0
- package/patch/transformers/patch-emitter.d.ts +2 -0
- package/patch/transformers/patch-emitter.js +44 -0
- package/patch/transformers/patch-emitter.js.map +1 -0
- package/plugin-types.d.ts +95 -0
- package/plugin-types.js +4 -0
- package/plugin-types.js.map +1 -0
- package/resources/module-patch.d.ts +50 -0
- package/resources/module-patch.js +609 -0
- package/slice/module-slice.d.ts +19 -0
- package/slice/module-slice.js +37 -0
- package/slice/module-slice.js.map +1 -0
- package/slice/ts54.d.ts +6 -0
- package/slice/ts54.js +70 -0
- package/slice/ts54.js.map +1 -0
- package/slice/ts55.d.ts +6 -0
- package/slice/ts55.js +70 -0
- package/slice/ts55.js.map +1 -0
- package/slice/ts552.d.ts +6 -0
- package/slice/ts552.js +70 -0
- package/slice/ts552.js.map +1 -0
- package/system/cache.d.ts +3 -0
- package/system/cache.js +69 -0
- package/system/cache.js.map +1 -0
- package/system/errors.d.ts +35 -0
- package/system/errors.js +82 -0
- package/system/errors.js.map +1 -0
- package/system/index.d.ts +4 -0
- package/system/index.js +21 -0
- package/system/index.js.map +1 -0
- package/system/logger.d.ts +7 -0
- package/system/logger.js +48 -0
- package/system/logger.js.map +1 -0
- package/system/types.d.ts +4 -0
- package/system/types.js +7 -0
- package/system/types.js.map +1 -0
- package/ts-package.d.ts +18 -0
- package/ts-package.js +73 -0
- package/ts-package.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/utils/file-utils.d.ts +9 -0
- package/utils/file-utils.js +98 -0
- package/utils/file-utils.js.map +1 -0
- package/utils/find-cache-dir.d.ts +23 -0
- package/utils/find-cache-dir.js +93 -0
- package/utils/find-cache-dir.js.map +1 -0
- package/utils/general.d.ts +5 -0
- package/utils/general.js +16 -0
- package/utils/general.js.map +1 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.js +20 -0
- package/utils/index.js.map +1 -0
package/ts-package.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getTsPackage = getTsPackage;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const resolve_1 = __importDefault(require("resolve"));
|
|
10
|
+
const system_1 = require("./system");
|
|
11
|
+
const module_1 = require("./module");
|
|
12
|
+
// endregion
|
|
13
|
+
/* ****************************************************************************************************************** */
|
|
14
|
+
// region: Utils
|
|
15
|
+
/* ****************************************************************************************************************** */
|
|
16
|
+
/**
|
|
17
|
+
* Get TypeScript package info - Resolve from dir, throws if not cannot find TS package
|
|
18
|
+
*/
|
|
19
|
+
function getTsPackage(dir = process.cwd()) {
|
|
20
|
+
if (!fs_1.default.existsSync(dir))
|
|
21
|
+
throw new system_1.PackageError(`${dir} is not a valid directory`);
|
|
22
|
+
const possiblePackageDirs = [dir, () => path_1.default.dirname(resolve_1.default.sync(`typescript/package.json`, { basedir: dir }))];
|
|
23
|
+
for (const d of possiblePackageDirs) {
|
|
24
|
+
let packageDir;
|
|
25
|
+
try {
|
|
26
|
+
packageDir = typeof d === 'function' ? d() : d;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
/* Parse package.json data */
|
|
32
|
+
const packageFile = path_1.default.join(packageDir, 'package.json');
|
|
33
|
+
if (!fs_1.default.existsSync(packageFile))
|
|
34
|
+
continue;
|
|
35
|
+
const { name, version } = (() => {
|
|
36
|
+
try {
|
|
37
|
+
return JSON.parse(fs_1.default.readFileSync(packageFile, 'utf8'));
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
throw new system_1.PackageError(`Could not parse json data in ${packageFile}`);
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
43
|
+
/* Validate */
|
|
44
|
+
if (name === 'typescript') {
|
|
45
|
+
const [sMajor, sMinor] = version.split('.');
|
|
46
|
+
const libDir = path_1.default.join(packageDir, 'lib');
|
|
47
|
+
const cacheDir = path_1.default.resolve(packageDir, '../.tsp/cache/');
|
|
48
|
+
/* Get all available module names in libDir */
|
|
49
|
+
const moduleNames = [];
|
|
50
|
+
for (const fileName of fs_1.default.readdirSync(libDir))
|
|
51
|
+
if (module_1.TsModule.names.includes(fileName))
|
|
52
|
+
moduleNames.push(fileName);
|
|
53
|
+
const res = {
|
|
54
|
+
version,
|
|
55
|
+
majorVer: +sMajor,
|
|
56
|
+
minorVer: +sMinor,
|
|
57
|
+
packageFile,
|
|
58
|
+
packageDir,
|
|
59
|
+
moduleNames,
|
|
60
|
+
cacheDir,
|
|
61
|
+
libDir,
|
|
62
|
+
moduleCache: new Map(),
|
|
63
|
+
getModulePath: (moduleName) => {
|
|
64
|
+
return path_1.default.join(libDir, moduleName);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return res;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
throw new system_1.PackageError(`Could not find typescript package from ${dir}`);
|
|
71
|
+
}
|
|
72
|
+
// endregion
|
|
73
|
+
//# sourceMappingURL=ts-package.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-package.js","sourceRoot":"","sources":["../../projects/core/src/ts-package.ts"],"names":[],"mappings":";;;;;AAsCA,oCA0DC;AAhGD,4CAAoB;AACpB,gDAAwB;AACxB,sDAA8B;AAC9B,qCAAwC;AACxC,qCAAoC;AAwBpC,YAAY;AAGZ,wHAAwH;AACxH,gBAAgB;AAChB,wHAAwH;AAExH;;GAEG;AACH,SAAgB,YAAY,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IACtD,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,qBAAY,CAAC,GAAG,GAAG,2BAA2B,CAAC,CAAC;IAEnF,MAAM,mBAAmB,GAAG,CAAE,GAAG,EAAE,GAAG,EAAE,CAAC,cAAI,CAAC,OAAO,CAAC,iBAAO,CAAC,I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,MAAM,CAAC;gBAC3C,IAAwB,iBAAQ,CAAC,KAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;oBAAE,WAAW,CAAC,IAAI,CAAC,QAAyB,CAAC,CAAC;YAE1G,MAAM,GAAG,GAAc;gBACrB,OAAO;gBACP,QAAQ,EAAE,CAAC,MAAM;gBACjB,QAAQ,EAAE,CAAC,MAAM;gBACjB,WAAW;gBACX,UAAU;gBACV,WAAW;gBACX,QAAQ;gBACR,MAAM;gBACN,WAAW,EAAE,IAAI,GAAG,EAAE;gBAEtB,aAAa,EAAE,CAAC,UAAyB,EAAE,EAAE;oBAC3C,OAAO,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,UAAoB,CAAC,CAAC;gBACjD,CAAC;aACF,CAAA;YAED,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IAED,MAAM,IAAI,qBAAY,CAAC,0CAA0C,GAAG,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,YAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/typescript/lib/typescript.d.ts","../projects/core/shared/plugin-types.ts","../projects/core/src/config.ts","../projects/core/src/utils/general.ts","../node_modules/@types/resolve/index.d.ts","../node_modules/@types/semver/classes/semver.d.ts","../node_modules/@types/semver/functions/parse.d.ts","../node_modules/@types/semver/functions/valid.d.ts","../node_modules/@types/semver/functions/clean.d.ts","../node_modules/@types/semver/functions/inc.d.ts","../node_modules/@types/semver/functions/diff.d.ts","../node_modules/@types/semver/functions/major.d.ts","../node_modules/@types/semver/functions/minor.d.ts","../node_modules/@types/semver/functions/patch.d.ts","../node_modules/@types/semver/functions/prerelease.d.ts","../node_modules/@types/semver/functions/compare.d.ts","../node_modules/@types/semver/functions/rcompare.d.ts","../node_modules/@types/semver/functions/compare-loose.d.ts","../node_modules/@types/semver/functions/compare-build.d.ts","../node_modules/@types/semver/functions/sort.d.ts","../node_modules/@types/semver/functions/rsort.d.ts","../node_modules/@types/semver/functions/gt.d.ts","../node_modules/@types/semver/functions/lt.d.ts","../node_modules/@types/semver/functions/eq.d.ts","../node_modules/@types/semver/functions/neq.d.ts","../node_modules/@types/semver/functions/gte.d.ts","../node_modules/@types/semver/functions/lte.d.ts","../node_modules/@types/semver/functions/cmp.d.ts","../node_modules/@types/semver/functions/coerce.d.ts","../node_modules/@types/semver/classes/comparator.d.ts","../node_modules/@types/semver/classes/range.d.ts","../node_modules/@types/semver/functions/satisfies.d.ts","../node_modules/@types/semver/ranges/max-satisfying.d.ts","../node_modules/@types/semver/ranges/min-satisfying.d.ts","../node_modules/@types/semver/ranges/to-comparators.d.ts","../node_modules/@types/semver/ranges/min-version.d.ts","../node_modules/@types/semver/ranges/valid.d.ts","../node_modules/@types/semver/ranges/outside.d.ts","../node_modules/@types/semver/ranges/gtr.d.ts","../node_modules/@types/semver/ranges/ltr.d.ts","../node_modules/@types/semver/ranges/intersects.d.ts","../node_modules/@types/semver/ranges/simplify.d.ts","../node_modules/@types/semver/ranges/subset.d.ts","../node_modules/@types/semver/internals/identifiers.d.ts","../node_modules/@types/semver/index.d.ts","../projects/core/src/patch/patch-detail.ts","../projects/core/src/module/module-file.ts","../projects/core/src/module/source-section.ts","../projects/core/src/slice/ts54.ts","../projects/core/src/slice/ts55.ts","../projects/core/src/slice/ts552.ts","../projects/core/src/slice/module-slice.ts","../projects/core/src/module/module-source.ts","../projects/core/src/module/ts-module.ts","../node_modules/chalk/index.d.ts","../projects/core/src/patch/transformers/fix-ts-early-return.ts","../projects/core/src/patch/transformers/patch-create-program.ts","../projects/core/src/patch/transformers/patch-emitter.ts","../projects/core/src/patch/transformers/merge-statements.ts","../projects/core/src/patch/transformers/add-original-create-program.ts","../projects/core/src/patch/transformers/hook-tsc-exec.ts","../projects/core/src/patch/transformers/index.ts","../projects/core/src/patch/patch-module.ts","../projects/core/src/patch/get-patched-source.ts","../projects/core/src/module/get-live-module.ts","../projects/core/src/module/index.ts","../projects/core/src/ts-package.ts","../projects/core/src/utils/file-utils.ts","../projects/core/src/utils/find-cache-dir.ts","../projects/core/src/utils/index.ts","../projects/core/src/system/cache.ts","../projects/core/src/system/errors.ts","../node_modules/strip-ansi/index.d.ts","../projects/core/src/system/logger.ts","../projects/core/src/system/types.ts","../projects/core/src/system/index.ts","../projects/core/src/options.ts","../projects/core/src/actions/patch.ts","../projects/core/src/actions/unpatch.ts","../projects/core/src/actions/check.ts","../projects/core/src/actions/install.ts","../projects/core/src/actions/uninstall.ts","../projects/core/src/actions/index.ts","../projects/core/src/index.ts","../node_modules/@types/minimist/index.d.ts","../projects/core/src/cli/options.ts","../projects/core/src/cli/commands.ts","../projects/core/src/cli/help-menu.ts","../projects/core/src/cli/cli.ts","../projects/core/src/bin/ts-patch.ts","../projects/core/src/bin/tspc.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/esm/index.d.ts","../node_modules/@types/minimatch/index.d.ts","../node_modules/@types/glob/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/@jest/expect-utils/build/index.d.ts","../node_modules/@sinclair/typebox/typebox.d.ts","../node_modules/@jest/schemas/build/index.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/jest-matcher-utils/build/index.d.ts","../node_modules/expect/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/mock-fs/lib/item.d.ts","../node_modules/@types/mock-fs/lib/file.d.ts","../node_modules/@types/mock-fs/lib/directory.d.ts","../node_modules/@types/mock-fs/lib/symlink.d.ts","../node_modules/@types/mock-fs/lib/filesystem.d.ts","../node_modules/@types/mock-fs/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/shelljs/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"e901ba366a3bd74de171e3964709915b55a57d93d9abe4b6842f7baf66be9189",{"version":"801442385123bb6dccc8e46fe2709c2763fbac5543b8a30d8056c5faba533df3","signature":"ebf61d0d1871edbf295bfdf66f72c19907fbe63db985134baf793fc34c019f2b"},{"version":"7b3794705e5f559648f95f1972ad8db4c2617431666e28ff31e1cf650bf073c2","signature":"0f175c50b7415a070dbd836d86a2c81155e8601244ddc49a48168a501fb4c20d"},{"version":"f80da2af872fd6a14bbc4d18ef07745f6722311d5f5c2ad206c780e819c369cc","signature":"4c5201db05e37c1f947dd7a8338240f6cd167dfd191aa0b8a9d2a36c57d28b91"},"5aca5a3bc07d2e16b6824a76c30378d6fb1b92e915d854315e1d1bd2d00974c9","cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4",{"version":"15ca002d9f604e8b65e7b86ecb1a01f424fc6038f33cdae16d0b8cc163ca56b4","signature":"7871aad7a8a23aab6284233937a178055397f658a5e97a35e07474a3efda764c"},{"version":"5002ff997079b78f6aebaedbe9d1877c646f11b861b5cdc3357c6e1a3444eae2","signature":"d0f3138d6256e8a71fe965bb291c2f24e6cab7878a558d14de8fcd6749b41a7d"},{"version":"80fe2077fd00bc5781a62808e294b0cc24aa1dfbec45ddc037ac90da50e40973","signature":"b1c4e21cc9238721f0b0183b9b7adb6ca5e4b4dbfbbb089c3a6f1dd43ea84672"},{"version":"9ff3f3245fcd37dbcdfc9c1311f213010d1384096536021522f7ea68cf46f5e7","signature":"f82153452730e25e8e494628af8e421a657c09674360a76f57fe10064b0eb7de"},{"version":"aadfd914737e68776bce8db8357fb51d503d1b0d9e49b986cc969b017603e114","signature":"50fa049ef81cff671462af4f461188af80cab5d8b5a554ff2e2ea4dbb08c39e3"},{"version":"21bc2c77a2e1078bacaf076628e2c403a93f4e0e05867dedc2768788c505b886","signature":"3c89ea22f57ab4f61218211333b49406a931bdb84a353ff8dc3b20454f0fde79"},{"version":"63d311998db63735d79851c18031f9333c80546afdf85dab1b8ade7b87e4a7d7","signature":"ee694b132b02c7e3630fefac7d92e5bff9518496b35bef5cbb71b07e978b590d"},{"version":"ba3f4bf14ab559c4b55e0dc233de5ab8f1c5e2f553f53ca6a50aa923e0b3aef4","signature":"0b1c7470ac7a0774c3d2c74f8b3c02e5e7ef66999ea56795bb393a41bf3812f8"},{"version":"fa1c03689a4864c34ef33e9a0908e1617afccba534baf9d673dda8d9fbdfe7fa","signature":"1f5d7faa1dd43fc22ab69ec8c4bb7153143c02f2407f763564eaa15fa95e0a4e"},"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2",{"version":"328506821e11d299b58510e824e55620fc3de4c999bfa7f279a27cd552425135","signature":"7483feda871a4ab53e5cc952c82a057e1f165b9cfe888e8186a3df82a4dbcc21"},{"version":"96191d7f4f8e713da3705a56f7e4a3b4b02b49cc1e28423a79dde09d7b011fd0","signature":"555ce436f5841901a223f94c0a69fac2b9a21b089c4b184c32ed32c5de887153"},{"version":"8b4d8b15ea9afc9ab079b11ae3b6b8189c9df51a498e119fcc595e3789252cf5","signature":"615cd5bf87480049728499144080e8bcc9f35e3ddfbc3a8a4b783a3dde8e5f7e"},{"version":"f7e9f5ef7d6281c7a825b4ecec2d2362e03131b0db1c28fe60363d5980ebfd37","signature":"4919fce6d3925882612289789d214f6c2fc56efe42464b4bbbc427389fb46914"},{"version":"aa0db8497b3a21c5f34311163c3e08c92d8a284bf782833baaf12ff06fc85a22","signature":"8475ecc05a0289dd4862940267b823b87f58e27a72498b9ed54a28e604560594"},{"version":"1829507795f9c69e2dc9587535e5cea2452ad8b2e37f26d3021b4eb182ce66ac","signature":"983496637800ae3585034a1d958b12a307dc7e38eaf3c31ace369b46589962d4"},{"version":"f6a2059974d97157225c31ab25e8dd86bde0db5142d1b0f9b40a36b3daa53bff","signature":"afb33bbcc9f3088d4cb2766af1a3e7735b444c27eb2d5ab6ff849701d27e16a9"},{"version":"d95ca05f58f9163dcd406e3c77479d8ebd46a079e698341693bfdb386295fa91","signature":"927c69598a94d13a277f40bbcde0f39d1bf3499e58e0b8a5892a63f50eda5250"},{"version":"b93ebc65560c9d39b701c521b1264063ff6dcd60525c25694dace78582270c14","signature":"31481f7ad0b50ccf0e4249b4c6220a8de8b391641a28ebe9e388825a2624e005"},{"version":"61e51c4f9077a2698991d307c0dfba6a08d31354f0fbd0c199acff8643e593eb","signature":"11faf63611205e2f8b45b1efa5593dc2330afd703f34cb16a5fc974f517921b2"},"aa6e41bcb9a7af18b8868f079f1e81b0602f301e3690b3f4b535ec999154ac97",{"version":"7aa2d9b0be31b58a676f57dc560175ce73167f037df37d902c746a914bf31e31","signature":"cc02ea07878296b5f0ef0544db77dd06e2c398a4a606acd434dafc619a1c5e83"},{"version":"279af871bb398ba5db31c45314e2758d4f5d59ca9dfbbd55fce830e6a118a648","signature":"59a5044b0a35bbceb68762339fbaf63c6e9510b95438e48d298ab4c001a6fcce"},{"version":"e4f334980f22f184777d6a3b2b41c447cfc05bc1f7c77f37dd3807d545ad7eec","signature":"68a564632bfb886a201fc38c0bdf469211352d0292fa09fbaf9893df12bb913b"},"8498f449d13ef1685ff5745ee9af8bc4b96789b16e9eeb12274f0611fa8264ae",{"version":"1590674310d33db93452e06ab18e8a2bb4c538fb04b14f90783ef1cc23b17642","signature":"7145912e90bd4170aa235363b9ef04cd62f71d4f35a3a7d61ae4e716d6205ace"},{"version":"d91efb224684b04ac9cee0546b7c4359f573e216abc516a018de66d8b02261d8","signature":"9c24e5aeee0739f8a679f05055e63f0f8a1468f5a4b7faa6bc642d2226bcb8c3"},"4b0f7f88fc46a672cb59eeb2782af271c203600d602f57a717ef07f96092caf8",{"version":"2338a9832bcdc6d48b3995759818d3529de4af0cbc31f9edacce3ee54b35b92a","signature":"85daf7281a503de317df74dc13180f24d29e9c24337af255afec5fa10ea745b7"},{"version":"bf7c720bb3e26b51672771462cfe677b5ec5220e63e969629c201373a6109aee","signature":"b776f0d5cd3a213fa2c44d4c6de8dfe5a6e8692c22c1ed00c63e0317ad740026"},"0d37f7ab4b1cc51b0a5a6dd5efb32d6267f82e62bb7322ee56a83d5d0a956f43",{"version":"58193b919b660b9b785c10c7ff6a1f8cf068a51ef983be68ff179c0ad7c0379d","signature":"9443fbbe7449d866f00aa520daf387fc032c49b14d591ac9be1ef6c7f5becac3"},{"version":"ea2ac7be64037c6fece106968c81380b7d8bd560d38654aa3e42f16ed01aa2da","signature":"2c83d69c414338dbe80f701f3ff379c3185bf032d1996dc9b512bf24f6a28eae"},{"version":"a3a769c2d53729359bac2b87fa3776158022207016c4410f21e3c617f666d9bd","signature":"647d1c285d24531d57f19999e51fbf9703c2ccf2238a5128cdce4ae743dca2b4"},{"version":"1dd164b7e5e0be2240797a21b8afb8f08082f35441fb50b8297dab72c5a84f63","signature":"3763e94cc3766888acdf45e6e8245cd10d3a312210e974d5eb575dba61407173"},{"version":"1ff4837d722650c47078c8966cebe60077437a78dbb2c1743f5c53e615207dea","signature":"f0654dfeb62dea5132a331aaad08dab6a3645914a0b5016d2787666bd4d7fce9"},{"version":"f129c815cc325f8a15fa10f96cc35dd83c71267071f1c2532623f5525774a105","signature":"4125b0891a0e984e4e960c2008fd58f4a06193f9eacb2bddeb017dcee3a5b748"},{"version":"c48373af70eec89718e17f8f2cb16b51b6e99ee738980195e678d06a8f2eb323","signature":"dad05ca7d099aec05e9a14f6319e5e33e6b2348f471f5ef0b41ea81e8ed3a727"},{"version":"cb3861ed806429de2c6b68a50d6c3c39fc46ac16590b382ad6a0a5a5d0b7e0ad","signature":"46a49b1cf2d8c32fb8e8a7d3bbfa4bacd1ddffd212a601ac84912fe72111b28c"},"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318",{"version":"8aa095e7ddb3e17212bcf8c69fe1695abc41710afc57edd2c63812b968252b53","signature":"18ae3ef5b87757ea64dfd5079baff7a245755e8a2bbf368bccd706e5f898d467"},{"version":"5ced7c149952b7cb0431c4d6be199c7dce4dbdcee61616c6e8de5e5ff5d3ca58","signature":"4ff9d90fdef2b0f8fa15228af191df240b9d75fca4f6b0caf3fbd0b58a882c83"},{"version":"0aa7b42119ad128391fa95fae4ba1dc61179761f4b57213e861ac6a992e7d8da","signature":"ad5164707f495f80447f93d3595769d70153ef73fc134bc92ffaa47167bb8dd7"},{"version":"6d33f4f44399255e7cc74bbcd93f7dd5fadf3e78d262529974aa853e9d7fd247","signature":"e255357a744c71f9fb988546969b44cea9ccafb327351f3dca99dbaad3660818"},{"version":"dcb3a4d0282e43a267e61644f5a09d08a196dad8b21b2849c8a624282a2d1030","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"230d1cd27576e6d54f408783b049508017f7a411a16f2e5a1e32d743922ec08a","signature":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","affectsGlobalScope":true},"55584873eae27c5607725f0a9b2123cdea9100fd47cd4bfd582b567a7c363877","2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","5f02abbb1b17e3d1e68c5eea14adf4705696e6255e2982b010c0dc2a5417b606","670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","3e0d35597ff6c5142082e60814fa39c8a2077a58d8a6a262e619afb5f855f6ba","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419",{"version":"056097110efd16869ec118cedb44ecbac9a019576eee808d61304ca6d5cb2cbe","affectsGlobalScope":true},"f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6",{"version":"0e60b021c025306c352205d38fce23b6bf353650566f5d26824fe1317f99ac99","affectsGlobalScope":true},"3dca3e952c8df3d5f78c55e53b6bb735bebf323ec6bae656c503e892cd4eb78d","661a11d16ad2e3543a77c53bcd4017ee9a450f47ab7def3ab493a86eae4d550c",{"version":"8cdc646cec7819581ef343b83855b1bfe4fe674f2c84f4fb8dc90d82fb56bd3a","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","15356d458fecbe393ba8da3d07fcbd6a34ceafcd2aa79a638c23db14d531928d","6c39d4dbdb372b364442854e42d8c473e2ec67badb226745af17ed5ac41ce6f5","7693b90b3075deaccafd5efb467bf9f2b747a3075be888652ef73e64396d8628","1bcc1e650cb04a29b65ef9227290792476ea416b5c342ce025417727618ecf6f","988b518a683e0203d1a4aa56dce733814299e0869d87da5899b098baa08fb40f",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},"b4a3399b36463f19d8b5654caee162eb9def18c1ba3f735ba3c06413ab0b72a5",{"version":"f7f13beb30daef3fabb51734f79aa39a876569b528364871ef91a5e01b9733d2","affectsGlobalScope":true},"171d02c5040b15102025d9e6357cc884e36c232a7e491c6be6259d85e9ac8437","addacad25729b8ba7c3f8cdd74a3afa191dbdd46e4efcc7b7db2ec4f8f0b9f71","aaa36a3ede6e754b88ad45ac785de8563f1808937e4a133f13fe36e22dac0593","bb6d313b87960df2630a8dd9119751723e3600038e5ca123ccaf9a15f47e9eaa","7e4217814fc7349400fa44f24d53f0932b6b0b70b21ea9024225f634afa998a1","43ec77c369473e92e2ecebf0554a0fdaa9c256644a6070f28228dfcceec77351",{"version":"d7dad6db394a3d9f7b49755e4b610fbf8ed6eb0c9810ae5f1a119f6b5d76de45","affectsGlobalScope":true},"d2388edcfda2b2f9a9762b196387b95e0b688f6c3e21ff8a86c6a7518f8ce0a8","4be60abb12ee8573738f06e47e3fe99436669d4b3546f0ae7a9a59b93fba3951","dd67d2b5e4e8a182a38de8e69fb736945eaa4588e0909c14e01a14bd3cc1fd1e",{"version":"71da8f7eeae664a4f95e557c3277267f7baf9be11a3734c9962b8bbf7d434eb1","affectsGlobalScope":true},{"version":"0d09f4b48899d342b5d6cd846f95f969a401933b0dcd375a8a7e45832328bb86","affectsGlobalScope":true},"cc6ef5733d4ea6d2e06310a32dffd2c16418b467c5033d49cecc4f3a25de7497","94768454c3348b6ebe48e45fbad8c92e2bb7af4a35243edbe2b90823d0bd7f9a","0be79b3ff0f16b6c2f9bc8c4cc7097ea417d8d67f8267f7e1eec8e32b548c2ff","88e485c93a1443952cb336167d49b82c33f6c0ca598608c943dc44f724f13e72","1ad9ae9e496d80dfb5cd49c7958aca4d48647599f2599d2ca1c67a72c23c7899","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","6e191fea1db6e9e4fa828259cf489e820ec9170effff57fb081a2f3295db4722","aed943465fbce1efe49ee16b5ea409050f15cd8eaf116f6fadb64ef0772e7d95","70d08483a67bf7050dbedace398ef3fee9f436fcd60517c97c4c1e22e3c6f3e8","f71188f97c9f7d309798ec02a56dd3bf50a4e4d079b3480f275ac13719953898",{"version":"e933de8143e1d12dd51d89b398760fd5a9081896be366dad88a922d0b29f3c69","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","c92436ab2b0f306458fefa7121f81edd53c9b4bb3bb92d8b1cf6c9a2355e944b","8e1f7c597c91a204847ea79b8f225ebe2e817278959b41afaabc5a297dfe802b","875c46cfd441e361416221859dc40617936fbbbe77c4b842b66b6a1fd74f2368",{"version":"a05e2d784c9be7051c4ac87a407c66d2106e23490c18c038bbd0712bde7602fd","affectsGlobalScope":true},{"version":"9f045c02a95c50d245e35aae2c070ac0a804f13c7a810f49f4b296361da133a7","affectsGlobalScope":true},"cf434b5c04792f62d6f4bdd5e2c8673f36e638e910333c172614d5def9b17f98","1d65d4798df9c2df008884035c41d3e67731f29db5ecb64cd7378797c7c53a2f","0faee6b555890a1cb106e2adc5d3ffd89545b1da894d474e9d436596d654998f","129f54f0e0b0dbf88d6578d627c54bd8599ecbdd9743b6788320d26e49fc5485","867f95abf1df444aab146b19847391fc2f922a55f6a970a27ed8226766cee29f",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b0297b09e607bec9698cac7cf55463d6731406efb1161ee4d448293b47397c84","9b11cc31fbd2f0089eaf278ab13cbe357bba7dd0be49a3aa5796b74e52e71e6c","963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"5ab630d466ac55baa6d32820378098404fc18ba9da6f7bc5df30c5dbb1cffae8","affectsGlobalScope":true},"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","4b50f58fcf29daaeab0c583da58ee9731a4d5c003f99fd833d91ad99f19a82c3","6692416887d66b903aea54b32163d34318300772cd2b8c7c36f972937a62de74","3e640a0056177a4ccfb819d81b21c9ed0ac0e77d8b7bf580894a3392298a890b","b75cb207f8dfade4120ba3554c5781005c9de85723c76588befd47693342ca50","693c4c9acf5e1c56e30130a90e07bd05122e6194d69018b0b20c6581c1324e0a","22293bd6fa12747929f8dfca3ec1684a3fe08638aa18023dd286ab337e88a592","df84eca381b7c2ec232cda8f9e0f4e05802d3eb64b23d9972cbc5e08327f7f27","ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","5d30d04a14ed8527ac5d654dc345a4db11b593334c11a65efb6e4facc5484a0e"],"root":[[48,50],[92,100],[102,118],[120,130],[132,137]],"options":{"allowJs":false,"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"esModuleInterop":true,"module":1,"newLine":1,"noImplicitReturns":true,"noUnusedLocals":false,"outDir":"./","sourceMap":true,"strict":true,"target":7,"useUnknownInCatchVariables":false},"fileIdsList":[[138],[205],[138,139,140,141,142],[138,140],[196],[160,161,196,198],[161,196],[201],[202],[207,210],[213,214,215,216],[212],[196,212],[212,213,214,215],[144],[147],[148,153,180],[149,160,161,168,177,188],[149,150,160,168],[151,189],[152,153,161,169],[153,177,185],[154,156,160,168],[155],[156,157],[160],[159,160],[147,160],[160,161,162,177,188],[160,161,162,177],[160,163,168,177,188],[160,161,163,164,168,177,185,188],[163,165,177,185,188],[144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[160,166],[167,188,193],[156,160,168,177],[169],[170],[147,171],[172,187,193],[173],[174],[160,175],[175,176,189,191],[148,160,177,178,179],[148,177,179],[177,178],[180],[181],[160,183,184],[183,184],[153,168,177,185],[186],[168,187],[148,163,174,188],[153,189],[177,190],[191],[192],[148,153,160,162,171,177,188,191,193],[177,194],[52,91],[52,76,91],[91],[52],[52,77,91],[52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],[77,91],[149,196,199],[221],[204,209],[207],[101,208],[206],[47],[92,101,112,113,122,123],[124,125,126,127,128],[49,101,130],[101,110,112,113,116,122,123,161,170],[49,101,123,125],[101,112,113,116,122,123,161,170],[135],[49,101,113,122,129,131,132,133,134,161],[101,131,135],[101,119,132,133],[116,122,123,131,135],[47,161,170],[48,112,123,129],[100,110,113,170],[93,99,100,111],[92,116,161,170],[94,98,100],[47,93,170],[49,93,99,113,122,161,170],[116,122],[101,109,112,116,122,161,170],[49,91,112,116],[47,49,92,94,108,112,116,122,161],[47,122],[47,49],[102,103,104,105,106,107],[91,95,96,97,112,122],[98,112],[49,116,161,169,170],[117,118,120,121],[101,119],[51,112,122,161,170],[50,113,122,161,170],[161,170,172],[153],[50,114,115]],"referencedMap":[[140,1],[206,2],[143,3],[139,1],[141,4],[142,1],[197,5],[199,6],[200,7],[202,8],[203,9],[211,10],[217,11],[214,12],[213,13],[216,14],[215,12],[144,15],[145,15],[147,16],[148,17],[149,18],[150,19],[151,20],[152,21],[153,22],[154,23],[155,24],[156,25],[157,25],[158,26],[159,27],[160,28],[161,29],[162,30],[163,31],[164,32],[165,33],[196,34],[166,35],[167,36],[168,37],[169,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,45],[177,46],[179,47],[178,48],[180,49],[181,50],[183,51],[184,52],[185,53],[186,54],[187,55],[188,56],[189,57],[190,58],[191,59],[192,60],[193,61],[194,62],[76,63],[77,64],[52,65],[55,65],[74,63],[75,63],[65,63],[64,66],[62,63],[57,63],[70,63],[68,63],[72,63],[56,63],[69,63],[73,63],[58,63],[59,63],[71,63],[53,63],[60,63],[61,63],[63,63],[67,63],[78,67],[66,63],[54,63],[91,68],[85,67],[87,69],[86,67],[79,67],[80,67],[82,67],[84,67],[88,69],[89,69],[81,69],[83,69],[219,70],[222,71],[210,72],[208,73],[209,74],[207,75],[48,76],[126,77],[129,78],[127,79],[124,80],[128,81],[125,82],[136,83],[135,84],[133,85],[134,86],[132,87],[49,88],[130,89],[111,90],[112,91],[93,92],[99,93],[94,94],[100,95],[123,96],[110,97],[92,98],[109,99],[106,100],[102,76],[107,101],[108,102],[105,76],[103,76],[104,76],[98,103],[95,104],[96,104],[97,104],[117,105],[122,106],[120,107],[113,108],[114,109],[115,110],[50,111],[116,112]],"latestChangedDtsFile":"./src/bin/tspc.d.ts"},"version":"5.5.2"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attempts to locate global installation of TypeScript
|
|
3
|
+
*/
|
|
4
|
+
export declare function getGlobalTsDir(): any;
|
|
5
|
+
export declare const mkdirIfNotExist: (dir: string) => string | false | undefined;
|
|
6
|
+
export declare function withFileLock<T>(filePath: string, fn: () => T): T;
|
|
7
|
+
export declare function writeFileWithLock(filePath: string, content: string): void;
|
|
8
|
+
export declare function readFileWithLock(filePath: string): string;
|
|
9
|
+
export declare function copyFileWithLock(src: string, dest: string): void;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mkdirIfNotExist = void 0;
|
|
7
|
+
exports.getGlobalTsDir = getGlobalTsDir;
|
|
8
|
+
exports.withFileLock = withFileLock;
|
|
9
|
+
exports.writeFileWithLock = writeFileWithLock;
|
|
10
|
+
exports.readFileWithLock = readFileWithLock;
|
|
11
|
+
exports.copyFileWithLock = copyFileWithLock;
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
|
+
const ts_package_1 = require("../ts-package");
|
|
15
|
+
const system_1 = require("../system");
|
|
16
|
+
const general_1 = require("./general");
|
|
17
|
+
/* ****************************************************************************************************************** */
|
|
18
|
+
// region: Config
|
|
19
|
+
/* ****************************************************************************************************************** */
|
|
20
|
+
const lockFileWaitMs = 2000;
|
|
21
|
+
// endregion
|
|
22
|
+
/* ****************************************************************************************************************** */
|
|
23
|
+
// region: Helpers
|
|
24
|
+
/* ****************************************************************************************************************** */
|
|
25
|
+
function waitForLockRelease(lockFilePath) {
|
|
26
|
+
const start = Date.now();
|
|
27
|
+
while (fs_1.default.existsSync(lockFilePath)) {
|
|
28
|
+
sleep(100);
|
|
29
|
+
if ((Date.now() - start) > lockFileWaitMs)
|
|
30
|
+
throw new Error(`Could not acquire lock to write file. If problem persists, run ts-patch clear-cache and try again.
|
|
31
|
+
`);
|
|
32
|
+
}
|
|
33
|
+
function sleep(ms) {
|
|
34
|
+
const wakeUpTime = Date.now() + ms;
|
|
35
|
+
while (Date.now() < wakeUpTime) { }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// endregion
|
|
39
|
+
/* ****************************************************************************************************************** */
|
|
40
|
+
// region: Utils
|
|
41
|
+
/* ****************************************************************************************************************** */
|
|
42
|
+
/**
|
|
43
|
+
* Attempts to locate global installation of TypeScript
|
|
44
|
+
*/
|
|
45
|
+
function getGlobalTsDir() {
|
|
46
|
+
const errors = [];
|
|
47
|
+
const dir = require('global-prefix');
|
|
48
|
+
const check = (dir) => {
|
|
49
|
+
try {
|
|
50
|
+
return (0, ts_package_1.getTsPackage)(dir);
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
errors.push(e);
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const { packageDir } = (check(dir) || check(path_1.default.join(dir, 'lib')));
|
|
58
|
+
if (!packageDir)
|
|
59
|
+
throw new system_1.PackageError(`Could not find global TypeScript installation! Are you sure it's installed globally?`);
|
|
60
|
+
return packageDir;
|
|
61
|
+
}
|
|
62
|
+
const mkdirIfNotExist = (dir) => !fs_1.default.existsSync(dir) && fs_1.default.mkdirSync(dir, { recursive: true });
|
|
63
|
+
exports.mkdirIfNotExist = mkdirIfNotExist;
|
|
64
|
+
function withFileLock(filePath, fn) {
|
|
65
|
+
const lockFileName = (0, general_1.getHash)(filePath) + '.lock';
|
|
66
|
+
const lockFilePath = (0, system_1.getLockFilePath)(lockFileName);
|
|
67
|
+
try {
|
|
68
|
+
const lockFileDir = path_1.default.dirname(lockFilePath);
|
|
69
|
+
if (!fs_1.default.existsSync(lockFileDir))
|
|
70
|
+
fs_1.default.mkdirSync(lockFileDir, { recursive: true });
|
|
71
|
+
waitForLockRelease(lockFilePath);
|
|
72
|
+
fs_1.default.writeFileSync(lockFilePath, '');
|
|
73
|
+
return fn();
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
if (fs_1.default.existsSync(lockFilePath))
|
|
77
|
+
fs_1.default.unlinkSync(lockFilePath);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function writeFileWithLock(filePath, content) {
|
|
81
|
+
withFileLock(filePath, () => {
|
|
82
|
+
fs_1.default.writeFileSync(filePath, content);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function readFileWithLock(filePath) {
|
|
86
|
+
return withFileLock(filePath, () => {
|
|
87
|
+
return fs_1.default.readFileSync(filePath, 'utf8');
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function copyFileWithLock(src, dest) {
|
|
91
|
+
withFileLock(src, () => {
|
|
92
|
+
withFileLock(dest, () => {
|
|
93
|
+
fs_1.default.copyFileSync(src, dest);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
// endregion
|
|
98
|
+
//# sourceMappingURL=file-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../../projects/core/src/utils/file-utils.ts"],"names":[],"mappings":";;;;;;AA+CA,wCAiBC;AAKD,oCAYC;AAED,8CAIC;AAED,4CAIC;AAED,4CAMC;AArGD,gDAAwB;AACxB,4CAAoB;AACpB,8CAA6C;AAC7C,sCAA0D;AAC1D,uCAAoC;AAGpC,wHAAwH;AACxH,iBAAiB;AACjB,wHAAwH;AAExH,MAAM,cAAc,GAAG,IAAK,CAAC;AAE7B,YAAY;AAGZ,wHAAwH;AACxH,kBAAkB;AAClB,wHAAwH;AAExH,SAAS,kBAAkB,CAAC,YAAoB;IAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACzB,OAAO,YAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEX,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,cAAc;YACvC,MAAM,IAAI,KAAK,CACb;OACD,CAAC,CAAC;IACP,CAAC;IAED,SAAS,KAAK,CAAC,EAAU;QACvB,MAAM,UAAU,GAAG,I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
|
+
* @author Sindre Sorhus
|
|
5
|
+
* @author James Talmage
|
|
6
|
+
*
|
|
7
|
+
* MIT License
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
10
|
+
* Copyright (c) James Talmage <james@talmage.io> (https://github.com/jamestalmage)
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
17
|
+
*/
|
|
18
|
+
export interface FindCacheDirOptions {
|
|
19
|
+
name: string;
|
|
20
|
+
cwd?: string;
|
|
21
|
+
create?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function findCacheDirectory(options: FindCacheDirOptions): string | undefined;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @credit https://github.com/sindresorhus/find-cache-di
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @author Sindre Sorhus
|
|
6
|
+
* @author James Talmage
|
|
7
|
+
*
|
|
8
|
+
* MIT License
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
11
|
+
* Copyright (c) James Talmage <james@talmage.io> (https://github.com/jamestalmage)
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
18
|
+
*/
|
|
19
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.findCacheDirectory = findCacheDirectory;
|
|
24
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
25
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
26
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
27
|
+
// endregion
|
|
28
|
+
/* ****************************************************************************************************************** */
|
|
29
|
+
// region: Helpers
|
|
30
|
+
/* ****************************************************************************************************************** */
|
|
31
|
+
const isWritable = (path) => {
|
|
32
|
+
try {
|
|
33
|
+
node_fs_1.default.accessSync(path, node_fs_1.default.constants.W_OK);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function useDirectory(directory, options) {
|
|
41
|
+
if (options.create) {
|
|
42
|
+
node_fs_1.default.mkdirSync(directory, { recursive: true });
|
|
43
|
+
}
|
|
44
|
+
return directory;
|
|
45
|
+
}
|
|
46
|
+
function getNodeModuleDirectory(directory) {
|
|
47
|
+
const nodeModules = node_path_1.default.join(directory, 'node_modules');
|
|
48
|
+
if (!isWritable(nodeModules)
|
|
49
|
+
&& (node_fs_1.default.existsSync(nodeModules) || !isWritable(node_path_1.default.join(directory)))) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
return nodeModules;
|
|
53
|
+
}
|
|
54
|
+
function findNearestPackageDir(startPath) {
|
|
55
|
+
const visitedDirs = new Set();
|
|
56
|
+
let currentPath = node_path_1.default.resolve(startPath);
|
|
57
|
+
while (true) {
|
|
58
|
+
const packageJsonPath = node_path_1.default.join(currentPath, 'package.json');
|
|
59
|
+
if (node_fs_1.default.existsSync(packageJsonPath)) {
|
|
60
|
+
return node_path_1.default.dirname(packageJsonPath);
|
|
61
|
+
}
|
|
62
|
+
// Mark the current directory as visited
|
|
63
|
+
visitedDirs.add(currentPath);
|
|
64
|
+
// Move to the parent directory
|
|
65
|
+
const parentPath = node_path_1.default.dirname(currentPath);
|
|
66
|
+
// Check for a circular loop
|
|
67
|
+
if (visitedDirs.has(parentPath) || parentPath === currentPath) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
currentPath = parentPath;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// endregion
|
|
74
|
+
/* ****************************************************************************************************************** */
|
|
75
|
+
// region: Utils
|
|
76
|
+
/* ****************************************************************************************************************** */
|
|
77
|
+
function findCacheDirectory(options) {
|
|
78
|
+
/* Use ENV Cache Dir if present */
|
|
79
|
+
if (node_process_1.default.env.CACHE_DIR && !['true', 'false', '1', '0'].includes(node_process_1.default.env.CACHE_DIR))
|
|
80
|
+
return useDirectory(node_path_1.default.join(node_process_1.default.env.CACHE_DIR, options.name), options);
|
|
81
|
+
/* Find Package Dir */
|
|
82
|
+
const startDir = options.cwd || node_process_1.default.cwd();
|
|
83
|
+
const pkgDir = findNearestPackageDir(startDir);
|
|
84
|
+
if (!pkgDir)
|
|
85
|
+
return undefined;
|
|
86
|
+
/* Find Node Modules Dir */
|
|
87
|
+
const nodeModules = getNodeModuleDirectory(pkgDir);
|
|
88
|
+
if (!nodeModules)
|
|
89
|
+
return undefined;
|
|
90
|
+
return useDirectory(node_path_1.default.join(pkgDir, 'node_modules', '.cache', options.name), options);
|
|
91
|
+
}
|
|
92
|
+
// endregion
|
|
93
|
+
//# sourceMappingURL=find-cache-dir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-cache-dir.js","sourceRoot":"","sources":["../../../projects/core/src/utils/find-cache-dir.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;AAwFH,gDAeC;AArGD,gEAAmC;AACnC,0DAA6B;AAC7B,sDAAyB;AAazB,YAAY;AAGZ,wHAAwH;AACxH,kBAAkB;AAClB,wHAAwH;AAExH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE;IAClC,IAAI,CAAC;QACH,iBAAE,CAAC,UAAU,CAAC,IAAI,EAAE,iBAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,YAAY,CAAC,SAAiB,EAAE,OAAY;IACnD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,iBAAE,CAAC,SAAS,CAAC,SAAS,EAAE,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BAAkB,CAAC,OAA4B;IAC7D,kCAAkC;IAClC,IAAI,sBAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,CAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAE,CAAC,QAAQ,CAAC,sBAAO,CAAC,GAAG,CAAC,SAAS,CAAC;QACzF,OAAO,YAAY,CAAC,mBAAI,CAAC,IAAI,CAAC,sBAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IAE/E,sBAAsB;IACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,IAAI,sBAAO,CAAC,GAAG,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAC/C,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAE9B,2BAA2B;IAC3B,MAAM,WAAW,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACnD,IAAI,CAAC,WAAW;QAAE,OAAO,SAAS,CAAC;IAEnC,OAAO,YAAY,CAAC,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AAC1F,CAAC;AAED,YAAY"}
|
package/utils/general.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getHash = getHash;
|
|
7
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
8
|
+
// endregion
|
|
9
|
+
/* ****************************************************************************************************************** */
|
|
10
|
+
// region: Crypto Utils
|
|
11
|
+
/* ****************************************************************************************************************** */
|
|
12
|
+
function getHash(fileContent) {
|
|
13
|
+
return crypto_1.default.createHash('md5').update(fileContent).digest('hex');
|
|
14
|
+
}
|
|
15
|
+
// endregion
|
|
16
|
+
//# sourceMappingURL=general.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../projects/core/src/utils/general.ts"],"names":[],"mappings":";;;;;AAmBA,0BAEC;AArBD,oDAA4B;AAY5B,YAAY;AAGZ,wHAAwH;AACxH,uBAAuB;AACvB,wHAAwH;AAExH,SAAgB,OAAO,CAAC,WAAmB;IACzC,OAAO,gBAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,YAAY"}
|
package/utils/index.d.ts
ADDED
package/utils/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./general"), exports);
|
|
18
|
+
__exportStar(require("./file-utils"), exports);
|
|
19
|
+
__exportStar(require("./find-cache-dir"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/core/src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B;AAC7B,mDAAiC"}
|