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) /var/www/html/node-red/node_modules/nyc/lib/instrumenters/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 'use strict'
const { createInstrumenter } = require('istanbul-lib-instrument')
const convertSourceMap = require('convert-source-map')
const mergeSourceMap = require('merge-source-map')
function InstrumenterIstanbul (options) {
const { plugins } = options
const configPlugins = plugins ? { plugins } : {}
const instrumenter = createInstrumenter(Object.assign({
autoWrap: true,
coverageVariable: '__coverage__',
embedSource: true,
compact: options.compact,
preserveComments: options.preserveComments,
produceSourceMap: options.produceSourceMap,
ignoreClassMethods: options.ignoreClassMethods,
esModules: options.esModules
}, configPlugins))
return {
instrumentSync (code, filename, sourceMap) {
var instrumented = instrumenter.instrumentSync(code, filename)
// the instrumenter can optionally produce source maps,
// this is useful for features like remapping stack-traces.
// TODO: test source-map merging logic.
if (options.produceSourceMap) {
var lastSourceMap = instrumenter.lastSourceMap()
if (lastSourceMap) {
if (sourceMap) {
lastSourceMap = mergeSourceMap(
sourceMap.toObject(),
lastSourceMap
)
}
instrumented += '\n' + convertSourceMap.fromObject(lastSourceMap).toComment()
}
}
return instrumented
},
lastFileCoverage () {
return instrumenter.lastFileCoverage()
}
}
}
module.exports = InstrumenterIstanbul
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0068 ]-- |