update
This commit is contained in:
15
package/node_modules/proc-log/LICENSE
generated
vendored
Normal file
15
package/node_modules/proc-log/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
153
package/node_modules/proc-log/lib/index.js
generated
vendored
Normal file
153
package/node_modules/proc-log/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
const META = Symbol('proc-log.meta')
|
||||
module.exports = {
|
||||
META: META,
|
||||
output: {
|
||||
LEVELS: [
|
||||
'standard',
|
||||
'error',
|
||||
'buffer',
|
||||
'flush',
|
||||
],
|
||||
KEYS: {
|
||||
standard: 'standard',
|
||||
error: 'error',
|
||||
buffer: 'buffer',
|
||||
flush: 'flush',
|
||||
},
|
||||
standard: function (...args) {
|
||||
return process.emit('output', 'standard', ...args)
|
||||
},
|
||||
error: function (...args) {
|
||||
return process.emit('output', 'error', ...args)
|
||||
},
|
||||
buffer: function (...args) {
|
||||
return process.emit('output', 'buffer', ...args)
|
||||
},
|
||||
flush: function (...args) {
|
||||
return process.emit('output', 'flush', ...args)
|
||||
},
|
||||
},
|
||||
log: {
|
||||
LEVELS: [
|
||||
'notice',
|
||||
'error',
|
||||
'warn',
|
||||
'info',
|
||||
'verbose',
|
||||
'http',
|
||||
'silly',
|
||||
'timing',
|
||||
'pause',
|
||||
'resume',
|
||||
],
|
||||
KEYS: {
|
||||
notice: 'notice',
|
||||
error: 'error',
|
||||
warn: 'warn',
|
||||
info: 'info',
|
||||
verbose: 'verbose',
|
||||
http: 'http',
|
||||
silly: 'silly',
|
||||
timing: 'timing',
|
||||
pause: 'pause',
|
||||
resume: 'resume',
|
||||
},
|
||||
error: function (...args) {
|
||||
return process.emit('log', 'error', ...args)
|
||||
},
|
||||
notice: function (...args) {
|
||||
return process.emit('log', 'notice', ...args)
|
||||
},
|
||||
warn: function (...args) {
|
||||
return process.emit('log', 'warn', ...args)
|
||||
},
|
||||
info: function (...args) {
|
||||
return process.emit('log', 'info', ...args)
|
||||
},
|
||||
verbose: function (...args) {
|
||||
return process.emit('log', 'verbose', ...args)
|
||||
},
|
||||
http: function (...args) {
|
||||
return process.emit('log', 'http', ...args)
|
||||
},
|
||||
silly: function (...args) {
|
||||
return process.emit('log', 'silly', ...args)
|
||||
},
|
||||
timing: function (...args) {
|
||||
return process.emit('log', 'timing', ...args)
|
||||
},
|
||||
pause: function () {
|
||||
return process.emit('log', 'pause')
|
||||
},
|
||||
resume: function () {
|
||||
return process.emit('log', 'resume')
|
||||
},
|
||||
},
|
||||
time: {
|
||||
LEVELS: [
|
||||
'start',
|
||||
'end',
|
||||
],
|
||||
KEYS: {
|
||||
start: 'start',
|
||||
end: 'end',
|
||||
},
|
||||
start: function (name, fn) {
|
||||
process.emit('time', 'start', name)
|
||||
function end () {
|
||||
return process.emit('time', 'end', name)
|
||||
}
|
||||
if (typeof fn === 'function') {
|
||||
const res = fn()
|
||||
if (res && res.finally) {
|
||||
return res.finally(end)
|
||||
}
|
||||
end()
|
||||
return res
|
||||
}
|
||||
return end
|
||||
},
|
||||
end: function (name) {
|
||||
return process.emit('time', 'end', name)
|
||||
},
|
||||
},
|
||||
input: {
|
||||
LEVELS: [
|
||||
'start',
|
||||
'end',
|
||||
'read',
|
||||
],
|
||||
KEYS: {
|
||||
start: 'start',
|
||||
end: 'end',
|
||||
read: 'read',
|
||||
},
|
||||
start: function (fn) {
|
||||
process.emit('input', 'start')
|
||||
function end () {
|
||||
return process.emit('input', 'end')
|
||||
}
|
||||
if (typeof fn === 'function') {
|
||||
const res = fn()
|
||||
if (res && res.finally) {
|
||||
return res.finally(end)
|
||||
}
|
||||
end()
|
||||
return res
|
||||
}
|
||||
return end
|
||||
},
|
||||
end: function () {
|
||||
return process.emit('input', 'end')
|
||||
},
|
||||
read: function (...args) {
|
||||
let resolve, reject
|
||||
const promise = new Promise((_resolve, _reject) => {
|
||||
resolve = _resolve
|
||||
reject = _reject
|
||||
})
|
||||
process.emit('input', 'read', resolve, reject, ...args)
|
||||
return promise
|
||||
},
|
||||
},
|
||||
}
|
45
package/node_modules/proc-log/package.json
generated
vendored
Normal file
45
package/node_modules/proc-log/package.json
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "proc-log",
|
||||
"version": "4.2.0",
|
||||
"files": [
|
||||
"bin/",
|
||||
"lib/"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"description": "just emit 'log' events on the process object",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/npm/proc-log.git"
|
||||
},
|
||||
"author": "GitHub Inc.",
|
||||
"license": "ISC",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"snap": "tap",
|
||||
"posttest": "npm run lint",
|
||||
"postsnap": "eslint index.js test/*.js --fix",
|
||||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
|
||||
"postlint": "template-oss-check",
|
||||
"lintfix": "npm run lint -- --fix",
|
||||
"template-oss-apply": "template-oss-apply --force"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@npmcli/eslint-config": "^4.0.0",
|
||||
"@npmcli/template-oss": "4.21.3",
|
||||
"tap": "^16.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
||||
},
|
||||
"templateOSS": {
|
||||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
||||
"version": "4.21.3",
|
||||
"publish": true
|
||||
},
|
||||
"tap": {
|
||||
"nyc-arg": [
|
||||
"--exclude",
|
||||
"tap-snapshots/**"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user