Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/fonts/iran-yekan/beflpn/process-on-spawn.tar
Назад
CHANGELOG.md 0000664 00000000544 15103436136 0006364 0 ustar 00 # Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. ## 1.0.0 (2019-12-16) ### Features * Initial implementation ([39123b4](https://github.com/cfware/process-on-spawn/commit/39123b4ec06d8f9a22a0b19bbf955ab9e80fa376)) LICENSE 0000664 00000002054 15103436136 0005556 0 ustar 00 MIT License Copyright (c) 2019 CFWare, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. README.md 0000664 00000004773 15103436136 0006042 0 ustar 00 # process-on-spawn [![Travis CI][travis-image]][travis-url] [![Greenkeeper badge][gk-image]](https://greenkeeper.io/) [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![MIT][license-image]](LICENSE) Execute callbacks when child processes are spawned. ## Usage ```js 'use strict'; const processOnSpawn = require('process-on-spawn'); processOnSpawn.addListener(opts => { opts.env.CHILD_VARIABLE = 'value'; }); ``` ### listener(opts) * `options` \<[Object]\> * `execPath` \<[string]\> The command to run. * `args` \<[string\[\]][string]\> Arguments of the child process. * `cwd` \<[string]\> Current working directory of the child process. * `detached` \<[boolean]\> The child will be prepared to run independently of its parent process. * `uid` \<[number]\> The user identity to be used by the child. * `gid` \<[number]\> The group identity to be used by the child. * `windowsVerbatimArguments` \<[boolean]\> No quoting or escaping of arguments will be done on Windows. * `windowsHide` \<[boolean]\> The subprocess console window that would normally be created on Windows systems will be hidden. All properties except `env` are read-only. ### processOnSpawn.addListener(listener) Add a listener to be called after any listeners already attached. ### processOnSpawn.prependListener(listener) Insert a listener to be called before any listeners already attached. ### processOnSpawn.removeListener(listener) Remove the specified listener. If the listener was added multiple times only the first is removed. ### processOnSpawn.removeAllListeners() Remove all attached listeners. [npm-image]: https://img.shields.io/npm/v/process-on-spawn.svg [npm-url]: https://npmjs.org/package/process-on-spawn [travis-image]: https://travis-ci.org/cfware/process-on-spawn.svg?branch=master [travis-url]: https://travis-ci.org/cfware/process-on-spawn [gk-image]: https://badges.greenkeeper.io/cfware/process-on-spawn.svg [downloads-image]: https://img.shields.io/npm/dm/process-on-spawn.svg [downloads-url]: https://npmjs.org/package/process-on-spawn [license-image]: https://img.shields.io/npm/l/process-on-spawn.svg [Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object [string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type [boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type [number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type index.js 0000664 00000005133 15103436136 0006217 0 ustar 00 'use strict'; /* Drop this dependency once node.js 12 is required. */ const fromEntries = require('fromentries'); const state = getState(1); function getState(version) { const stateId = Symbol.for('process-on-spawn@*:singletonId'); /* istanbul ignore next: cannot cover this once nyc depends on this module */ if (stateId in global === false) { /* Hopefully version and unwrap forward compatibility is never actually needed */ Object.defineProperty(global, stateId, { writable: true, value: { version, listeners: [], unwrap: wrapSpawnFunctions() } }); } return global[stateId]; } function wrappedSpawnFunction(fn) { return function (options) { let env = fromEntries( options.envPairs.map(nvp => nvp.split(/^([^=]*)=/).slice(1)) ); const opts = Object.create(null, { env: { enumerable: true, get() { return env; }, set(value) { if (!value || typeof value !== 'object') { throw new TypeError('env must be an object'); } env = value; } }, cwd: { enumerable: true, get() { return options.cwd || process.cwd(); } } }); const args = [...options.args]; Object.freeze(args); Object.assign(opts, { execPath: options.file, args, detached: Boolean(options.detached), uid: options.uid, gid: options.gid, windowsVerbatimArguments: Boolean(options.windowsVerbatimArguments), windowsHide: Boolean(options.windowsHide) }); Object.freeze(opts); state.listeners.forEach(listener => { listener(opts); }); options.envPairs = Object.entries(opts.env).map(([name, value]) => `${name}=${value}`); return fn.call(this, options); }; } function wrapSpawnFunctions() { const {ChildProcess} = require('child_process'); /* eslint-disable-next-line node/no-deprecated-api */ const spawnSyncBinding = process.binding('spawn_sync'); const originalSync = spawnSyncBinding.spawn; const originalAsync = ChildProcess.prototype.spawn; spawnSyncBinding.spawn = wrappedSpawnFunction(spawnSyncBinding.spawn); ChildProcess.prototype.spawn = wrappedSpawnFunction(ChildProcess.prototype.spawn); /* istanbul ignore next: forward compatibility code */ return () => { spawnSyncBinding.spawn = originalSync; ChildProcess.prototype.spawn = originalAsync; }; } module.exports = { addListener(listener) { state.listeners.push(listener); }, prependListener(listener) { state.listeners.unshift(listener); }, removeListener(listener) { const idx = state.listeners.indexOf(listener); if (idx !== -1) { state.listeners.splice(idx, 1); } }, removeAllListeners() { state.listeners = []; } }; package.json 0000664 00000003336 15103436136 0007043 0 ustar 00 { "_args": [ [ "process-on-spawn@1.0.0", "/home/freeclou/app.optimyar.com/backend" ] ], "_from": "process-on-spawn@1.0.0", "_id": "process-on-spawn@1.0.0", "_inBundle": false, "_integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "_location": "/process-on-spawn", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, "raw": "process-on-spawn@1.0.0", "name": "process-on-spawn", "escapedName": "process-on-spawn", "rawSpec": "1.0.0", "saveSpec": null, "fetchSpec": "1.0.0" }, "_requiredBy": [ "/node-preload", "/nyc" ], "_resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", "_spec": "1.0.0", "_where": "/home/freeclou/app.optimyar.com/backend", "author": { "name": "Corey Farrell" }, "bugs": { "url": "https://github.com/cfware/process-on-spawn/issues" }, "dependencies": { "fromentries": "^1.2.0" }, "description": "Execute callbacks when child processes are spawned", "devDependencies": { "nyc": "^15.0.0-beta.3", "standard-version": "^7.0.0", "tap-mocha-reporter": "^5.0.0", "tape": "^4.11.0", "xo": "^0.25.3" }, "engines": { "node": ">=8" }, "homepage": "https://github.com/cfware/process-on-spawn#readme", "license": "MIT", "name": "process-on-spawn", "repository": { "type": "git", "url": "git+https://github.com/cfware/process-on-spawn.git" }, "scripts": { "posttest": "nyc report --check-coverage", "pretest": "xo", "release": "standard-version --sign", "test": "nyc --silent tape test/*.js | tap-mocha-reporter classic" }, "version": "1.0.0" }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка