![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/public_html/node_modules/jszip/ |
"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();