MCPcopy Create free account
hub / github.com/cure53/dompurify / run

Function run

typescript/verify.js:13–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11});
12
13async function run() {
14 // Install node modules so that `dompurify` can be resolved.
15 process.stdout.write(`\x1b[30mInstalling node modules...\x1b[0m\n`);
16
17 await new Promise((resolve, reject) => {
18 exec('npm install --no-package-lock', { cwd: __dirname }, (err) => {
19 if (err) {
20 reject(err);
21 } else {
22 resolve(undefined);
23 }
24 });
25 });
26
27 process.stdout.write('\n');
28
29 let projects = await fs.readdir(__dirname, { withFileTypes: true });
30
31 for (let project of projects
32 .filter((x) => x.isDirectory())
33 .filter((x) => x.name !== 'node_modules')
34 .sort((a, b) => a.name.localeCompare(b.name))) {
35 await verify(project.name, path.join(__dirname, project.name));
36 }
37}
38
39/**
40 * Verifies that a TypeScript project compiles.

Callers 1

verify.jsFile · 0.85

Calls 1

verifyFunction · 0.85

Tested by

no test coverage detected