1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

* first action! (#1)

This commit is contained in:
shimataro 2019-09-18 20:39:54 +09:00 committed by GitHub
parent 8deacc95b1
commit ace1e6a69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3750 changed files with 1155519 additions and 0 deletions

13
node_modules/spawn-please/.editorconfig generated vendored Normal file
View file

@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{md,jade}]
trim_trailing_whitespace = false

1
node_modules/spawn-please/.gitattributes generated vendored Normal file
View file

@ -0,0 +1 @@
* text=auto

20
node_modules/spawn-please/.jshintrc generated vendored Normal file
View file

@ -0,0 +1,20 @@
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"asi": true
}

1
node_modules/spawn-please/.npmignore generated vendored Normal file
View file

@ -0,0 +1 @@
node_modules

5
node_modules/spawn-please/.travis.yml generated vendored Normal file
View file

@ -0,0 +1,5 @@
language: node_js
node_js:
- '0.12'
notifications:
email: false

15
node_modules/spawn-please/LICENSE generated vendored Normal file
View file

@ -0,0 +1,15 @@
The ISC License (ISC)
Copyright (c) <> ()
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.

58
node_modules/spawn-please/README.md generated vendored Normal file
View file

@ -0,0 +1,58 @@
# spawn-please
[![npm version](https://img.shields.io/npm/v/spawn-please.svg)](https://npmjs.org/package/spawn-please)
> Promisified child_process.spawn. \*Supports stdin* \*Rejects on stderr*
## Install
```sh
$ npm install --save spawn-please
```
## Usage
> `promise = spawn(command, [arguments], [stdin], [options])`
`options` are passed directly through to `child_process.spawn`.
```js
const spawn = require('spawn-please')
spawn('printf', ['please?'])
.then(output => {
assert.equal(output, 'please?')
})
```
### How is this different than other child_process libraries?
- Allows you to pass a string to stdin:
```js
spawn('cat', [], 'test')
.then(output => {
assert.equal(output, 'test')
})
```
- Rejects on any stderr:
```js
spawn('some-command-with-stderr')
.catch(stderr => {
// do something with stderr
})
```
### Using your own Promise library
**spawn-please** uses the global Promise object by default. You may use your own Promise library by overriding the Promise property:
```js
const spawn = require('spawn-please')
spawn.Promise = require('bluebird')
```
## License
ISC © [Raine Revere](https://github.com/raineorshine)

58
node_modules/spawn-please/index.js generated vendored Normal file
View file

@ -0,0 +1,58 @@
var spawn = require('child_process').spawn
function spawnPlease(command, args, stdin, options) {
// if there are only three arguments and the third argument is an object, treat it as the options object and set stdin to null
if(!options && typeof stdin === 'object') {
options = stdin
stdin = undefined
}
// defaults
options = options || {}
if(options.rejectOnError === undefined) {
options.rejectOnError = true
}
var stdout = ''
var stderr = ''
var child = spawn(command, args, options)
if(!spawnPlease.Promise) {
throw new Error('No built-in Promise. You will need to use a Promise library and spawnPlease.Promise = Promise.')
}
return new spawnPlease.Promise(function (resolve, reject) {
if(stdin !== undefined) {
child.stdin.write(stdin)
}
child.stdin.end()
child.stdout.on('data', function (data) {
stdout += data
})
child.stderr.on('data', function (data) {
stderr += data
})
if(options.rejectOnError) {
child.addListener('error', reject)
}
child.on('close', function (code) {
if(code !== 0 && options.rejectOnError) {
reject(stderr)
}
else {
resolve(stdout)
}
})
})
}
spawnPlease.Promise = typeof Promise !== 'undefined' ? Promise : null
module.exports = spawnPlease

69
node_modules/spawn-please/package.json generated vendored Normal file
View file

@ -0,0 +1,69 @@
{
"_from": "spawn-please@^0.3.0",
"_id": "spawn-please@0.3.0",
"_inBundle": false,
"_integrity": "sha1-2zOOxM/2Orxp8dDgjO6euL69nRE=",
"_location": "/spawn-please",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "spawn-please@^0.3.0",
"name": "spawn-please",
"escapedName": "spawn-please",
"rawSpec": "^0.3.0",
"saveSpec": null,
"fetchSpec": "^0.3.0"
},
"_requiredBy": [
"/npm-check-updates"
],
"_resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-0.3.0.tgz",
"_shasum": "db338ec4cff63abc69f1d0e08cee9eb8bebd9d11",
"_spec": "spawn-please@^0.3.0",
"_where": "/home/shimataro/projects/actions/ssh-key-action/node_modules/npm-check-updates",
"author": {
"name": "Raine Lourie",
"url": "https://github.com/metaraine"
},
"bugs": {
"url": "https://github.com/metaraine/spawn-please/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Promisified child_process.spawn. *Supports stdin* *Rejects on stderr*",
"devDependencies": {
"bluebird": "^2.9.34",
"chai": "^3.2.0",
"chai-as-promised": "^5.1.0",
"mocha": "^2.2.5",
"nodemon": "^1.4.0",
"require-new": "^1.0.2"
},
"engines": {
"node": ">=0.10.0"
},
"homepage": "https://github.com/metaraine/spawn-please#readme",
"keywords": [
"promise",
"promisified",
"child_process",
"child process",
"exec",
"spawn",
"stdin",
"stdout",
"stderr"
],
"license": "ISC",
"name": "spawn-please",
"repository": {
"type": "git",
"url": "git+https://github.com/metaraine/spawn-please.git"
},
"scripts": {
"devtest": "nodemon -w index.js -w test -x 'npm test'",
"test": "mocha"
},
"version": "0.3.0"
}

72
node_modules/spawn-please/test/spec.js generated vendored Normal file
View file

@ -0,0 +1,72 @@
var chai = require('chai')
var should = chai.should()
var chaiAsPromised = require('chai-as-promised')
var BluebirdPromise = require('bluebird')
var requireNew = require('require-new')
var spawn = require('../index.js')
chai.use(chaiAsPromised)
describe('spawn-please', function() {
it('should resolve', function () {
return spawn('true')
})
it('should reject', function () {
return spawn('false')
.then(function () {
return should.not.exist(true, 'should not resolve!')
})
.catch(function (err) {
return should.exist(err)
})
})
it('should allow errors to be ignored with rejectOnError:false', function () {
return spawn('false', [], { rejectOnError: false })
})
it('should handle command-line arguments', function () {
return spawn('printf', ['hello'])
.then(function (output) {
return output.should.equal('hello')
})
})
it('should accept stdin', function () {
return spawn('cat', [], 'test')
.then(function (output) {
return output.should.equal('test')
})
})
it('should allow you to specify a custom Promise', function () {
var spawn = requireNew('../index.js')
spawn('true').should.not.be.an.instanceof(BluebirdPromise)
spawn.Promise = BluebirdPromise
spawn('true').should.be.an.instanceof(BluebirdPromise)
})
it('should accept options', function () {
return Promise.all([
spawn('pwd', [], 'test', { cwd: __dirname})
.then(function (output) {
return output.trim().should.equal(__dirname)
}),
// stdin should still be read
spawn('cat', [], 'test', { cwd: __dirname})
.then(function (output) {
return output.should.equal('test')
})
])
})
it('should accept options as the third argument', function () {
return spawn('pwd', [], { cwd: __dirname})
.then(function (output) {
return output.trim().should.equal(__dirname)
})
})
})

1399
node_modules/spawn-please/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load diff