upload site
This commit is contained in:
commit
69c5b90d6a
3300 changed files with 224783 additions and 0 deletions
21
node_modules/shell-exec/LICENSE
generated
vendored
Normal file
21
node_modules/shell-exec/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) tiaanduplessis <tiaanduplessis@hotmail.com> (tiaan.beer)
|
||||
|
||||
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.
|
60
node_modules/shell-exec/README.md
generated
vendored
Normal file
60
node_modules/shell-exec/README.md
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
|
||||
# shell-exec
|
||||
[](https://npmjs.org/package/shell-exec)
|
||||
[](https://npmjs.org/package/shell-exec)
|
||||
[](https://github.com/RichardLitt/standard-readme)
|
||||
[](https://npmjs.org/package/shell-exec)
|
||||
[](http://makeapullrequest.com) [](https://greenkeeper.io/)
|
||||
|
||||
> A tiny cross-platform promise based wrapper around child_process.spawn.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [API](#api)
|
||||
- [Contribute](#contribute)
|
||||
- [License](#License)
|
||||
|
||||
## Install
|
||||
|
||||
This project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com).
|
||||
|
||||
```sh
|
||||
$ npm install shell-exec
|
||||
$ # OR
|
||||
$ yarn add shell-exec
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const shellExec = require('shell-exec')
|
||||
|
||||
shellExec('echo Hi!').then(console.log).catch(console.log)
|
||||
// Hi!
|
||||
// { stdout: '', stderr: '', cmd: 'echo Hi!', code: 0 }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `shellExec(command, options)`
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- *`command`* {String | Array} - String or Array of commands to run
|
||||
- *`options`* {Object} - Options object passed to [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)
|
||||
|
||||
The function then returns a `Promise`.
|
||||
|
||||
## Contribute
|
||||
|
||||
1. Fork it and create your feature branch: git checkout -b my-new-feature
|
||||
2. Commit your changes: git commit -am 'Add some feature'
|
||||
3.Push to the branch: git push origin my-new-feature
|
||||
4. Submit a pull request
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
47
node_modules/shell-exec/index.js
generated
vendored
Normal file
47
node_modules/shell-exec/index.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
'use strict'
|
||||
|
||||
const childProcess = require('child_process')
|
||||
|
||||
function shellExec (cmd = '', opts = {}) {
|
||||
if (Array.isArray(cmd)) {
|
||||
cmd = cmd.join(';')
|
||||
}
|
||||
|
||||
opts = Object.assign({ stdio: 'pipe', cwd: process.cwd() }, opts)
|
||||
|
||||
let child
|
||||
const shell = process.platform === 'win32' ? { cmd: 'cmd', arg: '/C' } : { cmd: 'sh', arg: '-c' }
|
||||
|
||||
try {
|
||||
child = childProcess.spawn(shell.cmd, [shell.arg, cmd], opts)
|
||||
} catch (error) {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
||||
return new Promise(resolve => {
|
||||
let stdout = ''
|
||||
let stderr = ''
|
||||
|
||||
if (child.stdout) {
|
||||
child.stdout.on('data', data => {
|
||||
stdout += data
|
||||
})
|
||||
}
|
||||
|
||||
if (child.stderr) {
|
||||
child.stderr.on('data', data => {
|
||||
stderr += data
|
||||
})
|
||||
}
|
||||
|
||||
child.on('error', error => {
|
||||
resolve({ error, stdout, stderr, cmd })
|
||||
})
|
||||
|
||||
child.on('close', code => {
|
||||
resolve({ stdout, stderr, cmd, code })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = shellExec
|
61
node_modules/shell-exec/package.json
generated
vendored
Normal file
61
node_modules/shell-exec/package.json
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"shell-exec@1.0.2",
|
||||
"/home/ry/Desktop/Work/benji.monster"
|
||||
]
|
||||
],
|
||||
"_from": "shell-exec@1.0.2",
|
||||
"_id": "shell-exec@1.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg==",
|
||||
"_location": "/shell-exec",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "shell-exec@1.0.2",
|
||||
"name": "shell-exec",
|
||||
"escapedName": "shell-exec",
|
||||
"rawSpec": "1.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/shell-exec/-/shell-exec-1.0.2.tgz",
|
||||
"_spec": "1.0.2",
|
||||
"_where": "/home/ry/Desktop/Work/benji.monster",
|
||||
"author": {
|
||||
"name": "Tiaan du Plessis"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/tiaanduplessis/shell-exec"
|
||||
},
|
||||
"description": "A tiny cross-platform promise based wrapper around child_process.spawn.",
|
||||
"devDependencies": {
|
||||
"husky": "^0.14.3",
|
||||
"jest": "^22.4.3",
|
||||
"standard": "^12.0.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/tiaanduplessis/shell-exec",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "shell-exec",
|
||||
"repository": {
|
||||
"url": "git+https://github.com/tiaanduplessis/shell-exec.git",
|
||||
"type": "git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "standard --fix index.js",
|
||||
"precommit": "yarn test",
|
||||
"pretest": "yarn lint",
|
||||
"start": "yarn test",
|
||||
"test": "jest"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue