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

14
node_modules/move-concurrently/LICENSE generated vendored Normal file
View file

@ -0,0 +1,14 @@
Copyright (c) 2017, Rebecca Turner <me@re-becca.org>
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.

53
node_modules/move-concurrently/README.md generated vendored Normal file
View file

@ -0,0 +1,53 @@
# move-concurrently
Move files and directories.
```
const move = require('move-concurrently')
move('/path/to/thing', '/new/path/thing').then(() => {
// thing is now moved!
}).catch(err => {
// oh no!
})
```
Uses `rename` to move things as fast as possible.
If you `move` across devices or on filesystems that don't support renaming
large directories. That is, situations that result in `rename` returning
the `EXDEV` error, then `move` will fallback to copy + delete.
When recursively copying directories it will first try to rename the
contents before falling back to copying. While this will be slightly slower
in true cross-device scenarios, it is MUCH faster in cases where the
filesystem can't handle directory renames.
When copying ownership is maintained when running as root. Permissions are
always maintained. On Windows, if symlinks are unavailable then junctions
will be used.
## INTERFACE
### move(from, to, options) → Promise
Recursively moves `from` to `to` and resolves its promise when finished.
If `to` already exists then the promise will be rejected with an `EEXIST`
error.
Starts by trying to rename `from` to `to`.
Options are:
* maxConcurrency (Default: `1`) The maximum number of concurrent copies to do at once.
* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
fails then we'll try making a junction instead.
Options can also include dependency injection:
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
to use `graceful-fs` or to inject a mock.
* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The
implementation of `writeStreamAtomic` to use. Used to inject a mock.
* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.

84
node_modules/move-concurrently/move.js generated vendored Normal file
View file

@ -0,0 +1,84 @@
'use strict'
module.exports = move
var nodeFs = require('fs')
var rimraf = require('rimraf')
var validate = require('aproba')
var copy = require('copy-concurrently')
var RunQueue = require('run-queue')
var extend = Object.assign || require('util')._extend
function promisify (Promise, fn) {
return function () {
var args = [].slice.call(arguments)
return new Promise(function (resolve, reject) {
return fn.apply(null, args.concat(function (err, value) {
if (err) {
reject(err)
} else {
resolve(value)
}
}))
})
}
}
function move (from, to, opts) {
validate('SSO|SS', arguments)
opts = extend({}, opts || {})
var Promise = opts.Promise || global.Promise
var fs = opts.fs || nodeFs
var rimrafAsync = promisify(Promise, rimraf)
var renameAsync = promisify(Promise, fs.rename)
opts.top = from
var queue = new RunQueue({
maxConcurrency: opts.maxConcurrency,
Promise: Promise
})
opts.queue = queue
opts.recurseWith = rename
queue.add(0, rename, [from, to, opts])
return queue.run().then(function () {
return remove(from)
}, function (err) {
// if the target already exists don't clobber it
if (err.code === 'EEXIST' || err.code === 'EPERM') {
return passThroughError()
} else {
return remove(to).then(passThroughError, passThroughError)
}
function passThroughError () {
return Promise.reject(err)
}
})
function remove (target) {
var opts = {
unlink: fs.unlink,
chmod: fs.chmod,
stat: fs.stat,
lstat: fs.lstat,
rmdir: fs.rmdir,
readdir: fs.readdir,
glob: false
}
return rimrafAsync(target, opts)
}
function rename (from, to, opts, done) {
return renameAsync(from, to).catch(function (err) {
if (err.code !== 'EXDEV') {
return Promise.reject(err)
} else {
return remove(to).then(function () {
return copy.item(from, to, opts)
})
}
})
}
}

71
node_modules/move-concurrently/package.json generated vendored Normal file
View file

@ -0,0 +1,71 @@
{
"_from": "move-concurrently@^1.0.1",
"_id": "move-concurrently@1.0.1",
"_inBundle": false,
"_integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
"_location": "/move-concurrently",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "move-concurrently@^1.0.1",
"name": "move-concurrently",
"escapedName": "move-concurrently",
"rawSpec": "^1.0.1",
"saveSpec": null,
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
"/cacache"
],
"_resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
"_shasum": "be2c005fda32e0b29af1f05d7c4b33214c701f92",
"_spec": "move-concurrently@^1.0.1",
"_where": "/home/shimataro/projects/actions/ssh-key-action/node_modules/cacache",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
"url": "http://re-becca.org/"
},
"bugs": {
"url": "https://github.com/npm/move-concurrently/issues"
},
"bundleDependencies": false,
"dependencies": {
"aproba": "^1.1.1",
"copy-concurrently": "^1.0.0",
"fs-write-stream-atomic": "^1.0.8",
"mkdirp": "^0.5.1",
"rimraf": "^2.5.4",
"run-queue": "^1.0.3"
},
"deprecated": false,
"description": "Promises of moves of files or directories with rename, falling back to recursive rename/copy on EXDEV errors, with configurable concurrency and win32 junction support.",
"devDependencies": {
"standard": "^8.6.0",
"tacks": "^1.2.6",
"tap": "^10.1.1"
},
"directories": {
"test": "test"
},
"files": [
"move.js",
"is-windows.js"
],
"homepage": "https://www.npmjs.com/package/move-concurrently",
"keywords": [
"move"
],
"license": "ISC",
"main": "move.js",
"name": "move-concurrently",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/move-concurrently.git"
},
"scripts": {
"test": "standard && tap --coverage test"
},
"version": "1.0.1"
}