| Current Path : /home/emeraadmin/public_html/4d695/ |
| Current File : /home/emeraadmin/public_html/4d695/proc-log.tar |
package.json 0000644 00000003424 15170142700 0007032 0 ustar 00 {
"_id": "proc-log@4.2.0",
"_inBundle": true,
"_location": "/npm/proc-log",
"_phantomChildren": {},
"_requiredBy": [
"/npm",
"/npm/@npmcli/arborist",
"/npm/@npmcli/config",
"/npm/@npmcli/git",
"/npm/@npmcli/metavuln-calculator",
"/npm/@npmcli/package-json",
"/npm/@npmcli/run-script",
"/npm/@sigstore/sign",
"/npm/libnpmexec",
"/npm/libnpmpublish",
"/npm/libnpmversion",
"/npm/make-fetch-happen",
"/npm/npm-package-arg",
"/npm/npm-profile",
"/npm/npm-registry-fetch",
"/npm/pacote"
],
"author": {
"name": "GitHub Inc."
},
"bugs": {
"url": "https://github.com/npm/proc-log/issues"
},
"description": "just emit 'log' events on the process object",
"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"
},
"files": [
"bin/",
"lib/"
],
"homepage": "https://github.com/npm/proc-log#readme",
"license": "ISC",
"main": "lib/index.js",
"name": "proc-log",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/proc-log.git"
},
"scripts": {
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"lintfix": "npm run lint -- --fix",
"postlint": "template-oss-check",
"postsnap": "eslint index.js test/*.js --fix",
"posttest": "npm run lint",
"snap": "tap",
"template-oss-apply": "template-oss-apply --force",
"test": "tap"
},
"tap": {
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.21.3",
"publish": true
},
"version": "4.2.0"
}
lib/index.js 0000644 00000006464 15170142700 0006766 0 ustar 00 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
},
},
}
LICENSE 0000644 00000001346 15170142700 0005552 0 ustar 00 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.