Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/share/.cache/yarn/v6/npm-jszip-3.10.1-integrity/node_modules/jszip/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
const madge = require("madge");
const path = require("path");
const ts = require("typescript");
const DIR = "./lib";
async function main() {
const tsconfigPath = ts.findConfigFile("./", ts.sys.fileExists);
const tsconfig = ts.readConfigFile(tsconfigPath, ts.sys.readFile).config;
const parsedConfig = ts.parseJsonConfigFileContent(tsconfig, ts.sys, "./");
const typedPaths = parsedConfig.fileNames.map(filename => path.resolve("./", filename));
const excludeTypedPaths = path => !typedPaths.includes(path);
const res = await madge(DIR, {
dependencyFilter: excludeTypedPaths
});
const untypedLeaves = res.leaves().map(filename => path.resolve(DIR, filename)).filter(excludeTypedPaths);
if (untypedLeaves.length) {
console.log("Convert next:");
console.log(untypedLeaves.join("\n"));
} else {
console.log("No untyped leaf dependencies found.");
console.log("Try looking at circular dependencies, or the image to decide what to convert next:");
const untypedCircular = res.circular().flat().map(filename => path.resolve(DIR, filename)).filter(excludeTypedPaths);
console.log(untypedCircular.join("\n"));
}
const imagePath = await res.image("graph.svg");
console.log();
console.log("Image written to " + imagePath);
}
main();
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0057 ]-- |