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/jsdoc-api/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const JsdocCommand = require('./jsdoc-command')
/**
* @module explain
*/
/**
* @extends module:jsdoc~JsdocCommand
* @static
*/
class Explain extends JsdocCommand {
getOutput (err) {
if (err) return Promise.reject(err)
if (this.options.cache && !this.options.source) {
return this.readCache().catch(this._runJsdoc.bind(this))
} else {
return this._runJsdoc()
}
}
_runJsdoc () {
return new Promise((resolve, reject) => {
const collectAll = require('collect-all')
const jsdocOutput = {
stdout: '',
stderr: '',
collectInto (dest) {
return collectAll(data => { this[dest] = data.toString() })
}
}
const toSpawnArgs = require('object-to-spawn-args')
const jsdocArgs = toSpawnArgs(this.jsdocOptions)
.concat([ '-X' ])
.concat(this.options.source ? this.tempFile.path : this.inputFileSet.files)
jsdocArgs.unshift(this.jsdocPath)
const spawn = require('child_process').spawn
const handle = spawn('node', jsdocArgs)
handle.stderr.pipe(jsdocOutput.collectInto('stderr'))
handle.stdout.pipe(jsdocOutput.collectInto('stdout'))
handle.on('close', code => {
try {
const explainOutput = this.verifyOutput(code, jsdocOutput)
if (this.options.cache) {
this.cache.write(this.cacheKey, explainOutput).then(() => resolve(explainOutput))
} else {
resolve(explainOutput)
}
} catch (err) {
reject(err)
}
})
})
}
}
module.exports = Explain
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0131 ]-- |