Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
nyc /
lib /
commands /
Delete
Unzip
Name
Size
Permission
Date
Action
check-coverage.js
780
B
-rw-r--r--
2023-08-21 05:40
helpers.js
1.71
KB
-rw-r--r--
2023-08-21 05:40
instrument.js
2.07
KB
-rw-r--r--
2023-08-21 05:40
merge.js
1.6
KB
-rw-r--r--
2023-08-21 05:40
report.js
792
B
-rw-r--r--
2023-08-21 05:40
Save
Rename
'use strict' const NYC = require('../../index.js') const path = require('path') const { promisify } = require('util') const resolveFrom = require('resolve-from') const rimraf = promisify(require('rimraf')) const { cliWrapper, setupOptions } = require('./helpers.js') exports.command = 'instrument <input> [output]' exports.describe = 'instruments a file or a directory tree and writes the instrumented code to the desired output location' exports.builder = function (yargs) { yargs .demandCommand(0, 0) .example('$0 instrument ./lib ./output', 'instrument all .js files in ./lib with coverage and output in ./output') setupOptions(yargs, 'instrument') } exports.handler = cliWrapper(async argv => { if (argv.output && !argv.inPlace && (path.resolve(argv.cwd, argv.input) === path.resolve(argv.cwd, argv.output))) { throw new Error('cannot instrument files in place, <input> must differ from <output>. Set \'--in-place\' to force') } if (path.relative(argv.cwd, path.resolve(argv.cwd, argv.input)).startsWith('..')) { throw new Error('cannot instrument files outside project root directory') } if (argv.delete && argv.inPlace) { throw new Error('cannot use \'--delete\' when instrumenting files in place') } if (argv.delete && argv.output && argv.output.length !== 0) { const relPath = path.relative(process.cwd(), path.resolve(argv.output)) if (relPath !== '' && !relPath.startsWith('..')) { await rimraf(argv.output) } else { throw new Error(`attempt to delete '${process.cwd()}' or containing directory.`) } } // If instrument is set to false enable a noop instrumenter. argv.instrumenter = (argv.instrument) ? './lib/instrumenters/istanbul' : './lib/instrumenters/noop' if (argv.inPlace) { argv.output = argv.input argv.completeCopy = false } const nyc = new NYC(argv) if (!argv.useSpawnWrap) { nyc.require.forEach(requireModule => { const mod = resolveFrom.silent(nyc.cwd, requireModule) || requireModule require(mod) }) } await nyc.instrumentAllFiles(argv.input, argv.output) })