Update node_modules
This commit is contained in:
parent
5c14c1abc5
commit
e6b7b7a697
1
node_modules/.bin/ncp
generated
vendored
1
node_modules/.bin/ncp
generated
vendored
|
@ -1 +0,0 @@
|
|||
../ncp/bin/ncp
|
24
node_modules/fs-extra/package.json
generated
vendored
24
node_modules/fs-extra/package.json
generated
vendored
|
@ -1,28 +1,32 @@
|
|||
{
|
||||
"_from": "fs-extra@^8.1.0",
|
||||
"_args": [
|
||||
[
|
||||
"fs-extra@8.1.0",
|
||||
"/home/runner/work/ghaction-github-pages/ghaction-github-pages"
|
||||
]
|
||||
],
|
||||
"_from": "fs-extra@8.1.0",
|
||||
"_id": "fs-extra@8.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||
"_location": "/fs-extra",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "fs-extra@^8.1.0",
|
||||
"raw": "fs-extra@8.1.0",
|
||||
"name": "fs-extra",
|
||||
"escapedName": "fs-extra",
|
||||
"rawSpec": "^8.1.0",
|
||||
"rawSpec": "8.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^8.1.0"
|
||||
"fetchSpec": "8.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||
"_shasum": "49d43c45a88cd9677668cb7be1b46efdb8d2e1c0",
|
||||
"_spec": "fs-extra@^8.1.0",
|
||||
"_where": "X:\\dev\\neard\\www\\github\\ghaction\\ghaction-github-pages",
|
||||
"_spec": "8.1.0",
|
||||
"_where": "/home/runner/work/ghaction-github-pages/ghaction-github-pages",
|
||||
"author": {
|
||||
"name": "JP Richardson",
|
||||
"email": "jprichardson@gmail.com"
|
||||
|
@ -30,13 +34,11 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/jprichardson/node-fs-extra/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.0",
|
||||
|
|
23
node_modules/graceful-fs/package.json
generated
vendored
23
node_modules/graceful-fs/package.json
generated
vendored
|
@ -1,34 +1,37 @@
|
|||
{
|
||||
"_from": "graceful-fs@^4.2.0",
|
||||
"_args": [
|
||||
[
|
||||
"graceful-fs@4.2.3",
|
||||
"/home/runner/work/ghaction-github-pages/ghaction-github-pages"
|
||||
]
|
||||
],
|
||||
"_from": "graceful-fs@4.2.3",
|
||||
"_id": "graceful-fs@4.2.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
|
||||
"_location": "/graceful-fs",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "graceful-fs@^4.2.0",
|
||||
"raw": "graceful-fs@4.2.3",
|
||||
"name": "graceful-fs",
|
||||
"escapedName": "graceful-fs",
|
||||
"rawSpec": "^4.2.0",
|
||||
"rawSpec": "4.2.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.2.0"
|
||||
"fetchSpec": "4.2.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/fs-extra",
|
||||
"/jsonfile"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
|
||||
"_shasum": "4a12ff1b60376ef09862c2093edd908328be8423",
|
||||
"_spec": "graceful-fs@^4.2.0",
|
||||
"_where": "X:\\dev\\neard\\www\\github\\ghaction\\ghaction-github-pages\\node_modules\\fs-extra",
|
||||
"_spec": "4.2.3",
|
||||
"_where": "/home/runner/work/ghaction-github-pages/ghaction-github-pages",
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/node-graceful-fs/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "A drop-in replacement for fs, making various improvements.",
|
||||
"devDependencies": {
|
||||
"import-fresh": "^2.0.0",
|
||||
|
|
23
node_modules/jsonfile/package.json
generated
vendored
23
node_modules/jsonfile/package.json
generated
vendored
|
@ -1,27 +1,32 @@
|
|||
{
|
||||
"_from": "jsonfile@^4.0.0",
|
||||
"_args": [
|
||||
[
|
||||
"jsonfile@4.0.0",
|
||||
"/home/runner/work/ghaction-github-pages/ghaction-github-pages"
|
||||
]
|
||||
],
|
||||
"_from": "jsonfile@4.0.0",
|
||||
"_id": "jsonfile@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"_location": "/jsonfile",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "jsonfile@^4.0.0",
|
||||
"raw": "jsonfile@4.0.0",
|
||||
"name": "jsonfile",
|
||||
"escapedName": "jsonfile",
|
||||
"rawSpec": "^4.0.0",
|
||||
"rawSpec": "4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.0.0"
|
||||
"fetchSpec": "4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/fs-extra"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"_shasum": "8771aae0799b64076b76640fca058f9c10e33ecb",
|
||||
"_spec": "jsonfile@^4.0.0",
|
||||
"_where": "X:\\dev\\neard\\www\\github\\ghaction\\ghaction-github-pages\\node_modules\\fs-extra",
|
||||
"_spec": "4.0.0",
|
||||
"_where": "/home/runner/work/ghaction-github-pages/ghaction-github-pages",
|
||||
"author": {
|
||||
"name": "JP Richardson",
|
||||
"email": "jprichardson@gmail.com"
|
||||
|
@ -29,11 +34,9 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/jprichardson/node-jsonfile/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Easily read/write JSON files.",
|
||||
"devDependencies": {
|
||||
"mocha": "2.x",
|
||||
|
|
4
node_modules/ncp/.npmignore
generated
vendored
4
node_modules/ncp/.npmignore
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
node_modules
|
||||
.*.sw[op]
|
||||
.DS_Store
|
||||
test/*fixtures/out
|
6
node_modules/ncp/.travis.yml
generated
vendored
6
node_modules/ncp/.travis.yml
generated
vendored
|
@ -1,6 +0,0 @@
|
|||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 0.8
|
||||
- "0.10"
|
||||
- "0.11"
|
21
node_modules/ncp/LICENSE.md
generated
vendored
21
node_modules/ncp/LICENSE.md
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
# MIT License
|
||||
|
||||
###Copyright (C) 2011 by Charlie McConnell
|
||||
|
||||
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.
|
63
node_modules/ncp/README.md
generated
vendored
63
node_modules/ncp/README.md
generated
vendored
|
@ -1,63 +0,0 @@
|
|||
# ncp - Asynchronous recursive file & directory copying
|
||||
|
||||
[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)
|
||||
|
||||
Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.
|
||||
|
||||
## Command Line usage
|
||||
|
||||
Usage is simple: `ncp [source] [dest] [--limit=concurrency limit]
|
||||
[--filter=filter] --stopOnErr`
|
||||
|
||||
The 'filter' is a Regular Expression - matched files will be copied.
|
||||
|
||||
The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.
|
||||
|
||||
'stoponerr' is a boolean flag that will tell `ncp` to stop immediately if any
|
||||
errors arise, rather than attempting to continue while logging errors. The default behavior is to complete as many copies as possible, logging errors along the way.
|
||||
|
||||
If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.
|
||||
|
||||
## Programmatic usage
|
||||
|
||||
Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error.
|
||||
|
||||
```javascript
|
||||
var ncp = require('ncp').ncp;
|
||||
|
||||
ncp.limit = 16;
|
||||
|
||||
ncp(source, destination, function (err) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
console.log('done!');
|
||||
});
|
||||
```
|
||||
|
||||
You can also call ncp like `ncp(source, destination, options, callback)`.
|
||||
`options` should be a dictionary. Currently, such options are available:
|
||||
|
||||
* `options.filter` - a `RegExp` instance, against which each file name is
|
||||
tested to determine whether to copy it or not, or a function taking single
|
||||
parameter: copied file name, returning `true` or `false`, determining
|
||||
whether to copy file or not.
|
||||
|
||||
* `options.transform` - a function: `function (read, write) { read.pipe(write) }`
|
||||
used to apply streaming transforms while copying.
|
||||
|
||||
* `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite
|
||||
destination files that already exist.
|
||||
|
||||
* `options.dereference` - boolean=false. If set to true, `ncp` will follow symbolic
|
||||
links. For example, a symlink in the source tree pointing to a regular file
|
||||
will become a regular file in the destination tree. Broken symlinks will result in
|
||||
errors.
|
||||
|
||||
* `options.stopOnErr` - boolean=false. If set to true, `ncp` will behave like `cp -r`,
|
||||
and stop on the first error it encounters. By default, `ncp` continues copying, logging all
|
||||
errors and returning an array.
|
||||
|
||||
* `options.errs` - stream. If `options.stopOnErr` is `false`, a stream can be provided, and errors will be written to this stream.
|
||||
|
||||
Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.
|
48
node_modules/ncp/bin/ncp
generated
vendored
48
node_modules/ncp/bin/ncp
generated
vendored
|
@ -1,48 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
|
||||
|
||||
|
||||
var ncp = require('../lib/ncp'),
|
||||
args = process.argv.slice(2),
|
||||
source, dest;
|
||||
|
||||
if (args.length < 2) {
|
||||
console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// parse arguments the hard way
|
||||
function startsWith(str, prefix) {
|
||||
return str.substr(0, prefix.length) == prefix;
|
||||
}
|
||||
|
||||
var options = {};
|
||||
args.forEach(function (arg) {
|
||||
if (startsWith(arg, "--limit=")) {
|
||||
options.limit = parseInt(arg.split('=', 2)[1], 10);
|
||||
}
|
||||
if (startsWith(arg, "--filter=")) {
|
||||
options.filter = new RegExp(arg.split('=', 2)[1]);
|
||||
}
|
||||
if (startsWith(arg, "--stoponerr")) {
|
||||
options.stopOnErr = true;
|
||||
}
|
||||
});
|
||||
|
||||
ncp.ncp(args[0], args[1], options, function (err) {
|
||||
if (Array.isArray(err)) {
|
||||
console.error('There were errors during the copy.');
|
||||
err.forEach(function (err) {
|
||||
console.error(err.stack || err.message);
|
||||
});
|
||||
process.exit(1);
|
||||
}
|
||||
else if (err) {
|
||||
console.error('An error has occurred.');
|
||||
console.error(err.stack || err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
|
261
node_modules/ncp/lib/ncp.js
generated
vendored
261
node_modules/ncp/lib/ncp.js
generated
vendored
|
@ -1,261 +0,0 @@
|
|||
var fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
module.exports = ncp;
|
||||
ncp.ncp = ncp;
|
||||
|
||||
function ncp (source, dest, options, callback) {
|
||||
var cback = callback;
|
||||
|
||||
if (!callback) {
|
||||
cback = options;
|
||||
options = {};
|
||||
}
|
||||
|
||||
var basePath = process.cwd(),
|
||||
currentPath = path.resolve(basePath, source),
|
||||
targetPath = path.resolve(basePath, dest),
|
||||
filter = options.filter,
|
||||
rename = options.rename,
|
||||
transform = options.transform,
|
||||
clobber = options.clobber !== false,
|
||||
modified = options.modified,
|
||||
dereference = options.dereference,
|
||||
errs = null,
|
||||
started = 0,
|
||||
finished = 0,
|
||||
running = 0,
|
||||
limit = options.limit || ncp.limit || 16;
|
||||
|
||||
limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit;
|
||||
|
||||
startCopy(currentPath);
|
||||
|
||||
function startCopy(source) {
|
||||
started++;
|
||||
if (filter) {
|
||||
if (filter instanceof RegExp) {
|
||||
if (!filter.test(source)) {
|
||||
return cb(true);
|
||||
}
|
||||
}
|
||||
else if (typeof filter === 'function') {
|
||||
if (!filter(source)) {
|
||||
return cb(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return getStats(source);
|
||||
}
|
||||
|
||||
function getStats(source) {
|
||||
var stat = dereference ? fs.stat : fs.lstat;
|
||||
if (running >= limit) {
|
||||
return setImmediate(function () {
|
||||
getStats(source);
|
||||
});
|
||||
}
|
||||
running++;
|
||||
stat(source, function (err, stats) {
|
||||
var item = {};
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
|
||||
// We need to get the mode from the stats object and preserve it.
|
||||
item.name = source;
|
||||
item.mode = stats.mode;
|
||||
item.mtime = stats.mtime; //modified time
|
||||
item.atime = stats.atime; //access time
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
return onDir(item);
|
||||
}
|
||||
else if (stats.isFile()) {
|
||||
return onFile(item);
|
||||
}
|
||||
else if (stats.isSymbolicLink()) {
|
||||
// Symlinks don't really need to know about the mode.
|
||||
return onLink(source);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onFile(file) {
|
||||
var target = file.name.replace(currentPath, targetPath);
|
||||
if(rename) {
|
||||
target = rename(target);
|
||||
}
|
||||
isWritable(target, function (writable) {
|
||||
if (writable) {
|
||||
return copyFile(file, target);
|
||||
}
|
||||
if(clobber) {
|
||||
rmFile(target, function () {
|
||||
copyFile(file, target);
|
||||
});
|
||||
}
|
||||
if (modified) {
|
||||
var stat = dereference ? fs.stat : fs.lstat;
|
||||
stat(target, function(err, stats) {
|
||||
//if souce modified time greater to target modified time copy file
|
||||
if (file.mtime.getTime()>stats.mtime.getTime())
|
||||
copyFile(file, target);
|
||||
else return cb();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return cb();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function copyFile(file, target) {
|
||||
var readStream = fs.createReadStream(file.name),
|
||||
writeStream = fs.createWriteStream(target, { mode: file.mode });
|
||||
|
||||
readStream.on('error', onError);
|
||||
writeStream.on('error', onError);
|
||||
|
||||
if(transform) {
|
||||
transform(readStream, writeStream, file);
|
||||
} else {
|
||||
writeStream.on('open', function() {
|
||||
readStream.pipe(writeStream);
|
||||
});
|
||||
}
|
||||
writeStream.once('finish', function() {
|
||||
if (modified) {
|
||||
//target file modified date sync.
|
||||
fs.utimesSync(target, file.atime, file.mtime);
|
||||
cb();
|
||||
}
|
||||
else cb();
|
||||
});
|
||||
}
|
||||
|
||||
function rmFile(file, done) {
|
||||
fs.unlink(file, function (err) {
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
return done();
|
||||
});
|
||||
}
|
||||
|
||||
function onDir(dir) {
|
||||
var target = dir.name.replace(currentPath, targetPath);
|
||||
isWritable(target, function (writable) {
|
||||
if (writable) {
|
||||
return mkDir(dir, target);
|
||||
}
|
||||
copyDir(dir.name);
|
||||
});
|
||||
}
|
||||
|
||||
function mkDir(dir, target) {
|
||||
fs.mkdir(target, dir.mode, function (err) {
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
copyDir(dir.name);
|
||||
});
|
||||
}
|
||||
|
||||
function copyDir(dir) {
|
||||
fs.readdir(dir, function (err, items) {
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
items.forEach(function (item) {
|
||||
startCopy(path.join(dir, item));
|
||||
});
|
||||
return cb();
|
||||
});
|
||||
}
|
||||
|
||||
function onLink(link) {
|
||||
var target = link.replace(currentPath, targetPath);
|
||||
fs.readlink(link, function (err, resolvedPath) {
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
checkLink(resolvedPath, target);
|
||||
});
|
||||
}
|
||||
|
||||
function checkLink(resolvedPath, target) {
|
||||
if (dereference) {
|
||||
resolvedPath = path.resolve(basePath, resolvedPath);
|
||||
}
|
||||
isWritable(target, function (writable) {
|
||||
if (writable) {
|
||||
return makeLink(resolvedPath, target);
|
||||
}
|
||||
fs.readlink(target, function (err, targetDest) {
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
if (dereference) {
|
||||
targetDest = path.resolve(basePath, targetDest);
|
||||
}
|
||||
if (targetDest === resolvedPath) {
|
||||
return cb();
|
||||
}
|
||||
return rmFile(target, function () {
|
||||
makeLink(resolvedPath, target);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function makeLink(linkPath, target) {
|
||||
fs.symlink(linkPath, target, function (err) {
|
||||
if (err) {
|
||||
return onError(err);
|
||||
}
|
||||
return cb();
|
||||
});
|
||||
}
|
||||
|
||||
function isWritable(path, done) {
|
||||
fs.lstat(path, function (err) {
|
||||
if (err) {
|
||||
if (err.code === 'ENOENT') return done(true);
|
||||
return done(false);
|
||||
}
|
||||
return done(false);
|
||||
});
|
||||
}
|
||||
|
||||
function onError(err) {
|
||||
if (options.stopOnError) {
|
||||
return cback(err);
|
||||
}
|
||||
else if (!errs && options.errs) {
|
||||
errs = fs.createWriteStream(options.errs);
|
||||
}
|
||||
else if (!errs) {
|
||||
errs = [];
|
||||
}
|
||||
if (typeof errs.write === 'undefined') {
|
||||
errs.push(err);
|
||||
}
|
||||
else {
|
||||
errs.write(err.stack + '\n\n');
|
||||
}
|
||||
return cb();
|
||||
}
|
||||
|
||||
function cb(skipped) {
|
||||
if (!skipped) running--;
|
||||
finished++;
|
||||
if ((started === finished) && (running === 0)) {
|
||||
if (cback !== undefined ) {
|
||||
return errs ? cback(errs) : cback(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
65
node_modules/ncp/package.json
generated
vendored
65
node_modules/ncp/package.json
generated
vendored
|
@ -1,65 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"ncp@2.0.0",
|
||||
"/home/runner/work/ghaction-github-pages/ghaction-github-pages"
|
||||
]
|
||||
],
|
||||
"_from": "ncp@2.0.0",
|
||||
"_id": "ncp@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=",
|
||||
"_location": "/ncp",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ncp@2.0.0",
|
||||
"name": "ncp",
|
||||
"escapedName": "ncp",
|
||||
"rawSpec": "2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
|
||||
"_spec": "2.0.0",
|
||||
"_where": "/home/runner/work/ghaction-github-pages/ghaction-github-pages",
|
||||
"author": {
|
||||
"name": "AvianFlu",
|
||||
"email": "charlie@charlieistheman.com"
|
||||
},
|
||||
"bin": {
|
||||
"ncp": "./bin/ncp"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/AvianFlu/ncp/issues"
|
||||
},
|
||||
"description": "Asynchronous recursive file copy utility.",
|
||||
"devDependencies": {
|
||||
"mocha": "1.15.x",
|
||||
"read-dir-files": "0.0.x",
|
||||
"rimraf": "1.0.x"
|
||||
},
|
||||
"engine": {
|
||||
"node": ">=0.10"
|
||||
},
|
||||
"homepage": "https://github.com/AvianFlu/ncp#readme",
|
||||
"keywords": [
|
||||
"cli",
|
||||
"copy"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/ncp.js",
|
||||
"name": "ncp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/AvianFlu/ncp.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha -R spec"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
1
node_modules/ncp/test/modified-files/out/a
generated
vendored
1
node_modules/ncp/test/modified-files/out/a
generated
vendored
|
@ -1 +0,0 @@
|
|||
test3
|
1
node_modules/ncp/test/modified-files/src/a
generated
vendored
1
node_modules/ncp/test/modified-files/src/a
generated
vendored
|
@ -1 +0,0 @@
|
|||
test3
|
197
node_modules/ncp/test/ncp.js
generated
vendored
197
node_modules/ncp/test/ncp.js
generated
vendored
|
@ -1,197 +0,0 @@
|
|||
|
||||
|
||||
var assert = require('assert'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
rimraf = require('rimraf'),
|
||||
readDirFiles = require('read-dir-files'),
|
||||
util = require('util'),
|
||||
ncp = require('../').ncp;
|
||||
|
||||
|
||||
|
||||
describe('ncp', function () {
|
||||
describe('regular files and directories', function () {
|
||||
var fixtures = path.join(__dirname, 'regular-fixtures'),
|
||||
src = path.join(fixtures, 'src'),
|
||||
out = path.join(fixtures, 'out');
|
||||
|
||||
before(function (cb) {
|
||||
rimraf(out, function() {
|
||||
ncp(src, out, cb);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when copying a directory of files', function () {
|
||||
it('files are copied correctly', function (cb) {
|
||||
readDirFiles(src, 'utf8', function (srcErr, srcFiles) {
|
||||
readDirFiles(out, 'utf8', function (outErr, outFiles) {
|
||||
assert.ifError(srcErr);
|
||||
assert.deepEqual(srcFiles, outFiles);
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when copying files using filter', function () {
|
||||
before(function (cb) {
|
||||
var filter = function(name) {
|
||||
return name.substr(name.length - 1) != 'a';
|
||||
};
|
||||
rimraf(out, function () {
|
||||
ncp(src, out, {filter: filter}, cb);
|
||||
});
|
||||
});
|
||||
|
||||
it('files are copied correctly', function (cb) {
|
||||
readDirFiles(src, 'utf8', function (srcErr, srcFiles) {
|
||||
function filter(files) {
|
||||
for (var fileName in files) {
|
||||
var curFile = files[fileName];
|
||||
if (curFile instanceof Object)
|
||||
return filter(curFile);
|
||||
if (fileName.substr(fileName.length - 1) == 'a')
|
||||
delete files[fileName];
|
||||
}
|
||||
}
|
||||
filter(srcFiles);
|
||||
readDirFiles(out, 'utf8', function (outErr, outFiles) {
|
||||
assert.ifError(outErr);
|
||||
assert.deepEqual(srcFiles, outFiles);
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when using clobber=false', function () {
|
||||
it('the copy is completed successfully', function (cb) {
|
||||
ncp(src, out, function() {
|
||||
ncp(src, out, {clobber: false}, function(err) {
|
||||
assert.ifError(err);
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when using transform', function () {
|
||||
it('file descriptors are passed correctly', function (cb) {
|
||||
ncp(src, out, {
|
||||
transform: function(read,write,file) {
|
||||
assert.notEqual(file.name, undefined);
|
||||
assert.strictEqual(typeof file.mode,'number');
|
||||
read.pipe(write);
|
||||
}
|
||||
}, cb);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when using rename', function() {
|
||||
it('output files are correctly redirected', function(cb) {
|
||||
ncp(src, out, {
|
||||
rename: function(target) {
|
||||
if(path.basename(target) == 'a') return path.resolve(path.dirname(target), 'z');
|
||||
return target;
|
||||
}
|
||||
}, function(err) {
|
||||
if(err) return cb(err);
|
||||
|
||||
readDirFiles(src, 'utf8', function (srcErr, srcFiles) {
|
||||
readDirFiles(out, 'utf8', function (outErr, outFiles) {
|
||||
assert.ifError(srcErr);
|
||||
assert.deepEqual(srcFiles.a, outFiles.z);
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('symlink handling', function () {
|
||||
var fixtures = path.join(__dirname, 'symlink-fixtures'),
|
||||
src = path.join(fixtures, 'src'),
|
||||
out = path.join(fixtures, 'out');
|
||||
|
||||
beforeEach(function (cb) {
|
||||
rimraf(out, cb);
|
||||
});
|
||||
|
||||
it('copies symlinks by default', function (cb) {
|
||||
ncp(src, out, function (err) {
|
||||
if (err) return cb(err);
|
||||
assert.equal(fs.readlinkSync(path.join(out, 'file-symlink')), 'foo');
|
||||
assert.equal(fs.readlinkSync(path.join(out, 'dir-symlink')), 'dir');
|
||||
cb();
|
||||
})
|
||||
});
|
||||
|
||||
it('copies file contents when dereference=true', function (cb) {
|
||||
ncp(src, out, { dereference: true }, function (err) {
|
||||
var fileSymlinkPath = path.join(out, 'file-symlink');
|
||||
assert.ok(fs.lstatSync(fileSymlinkPath).isFile());
|
||||
assert.equal(fs.readFileSync(fileSymlinkPath), 'foo contents');
|
||||
|
||||
var dirSymlinkPath = path.join(out, 'dir-symlink');
|
||||
assert.ok(fs.lstatSync(dirSymlinkPath).isDirectory());
|
||||
assert.deepEqual(fs.readdirSync(dirSymlinkPath), ['bar']);
|
||||
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('broken symlink handling', function () {
|
||||
var fixtures = path.join(__dirname, 'broken-symlink-fixtures'),
|
||||
src = path.join(fixtures, 'src'),
|
||||
out = path.join(fixtures, 'out');
|
||||
|
||||
beforeEach(function (cb) {
|
||||
rimraf(out, cb);
|
||||
});
|
||||
|
||||
it('copies broken symlinks by default', function (cb) {
|
||||
ncp(src, out, function (err) {
|
||||
if (err) return cb(err);
|
||||
assert.equal(fs.readlinkSync(path.join(out, 'broken-symlink')), 'does-not-exist');
|
||||
cb();
|
||||
})
|
||||
});
|
||||
|
||||
it('returns an error when dereference=true', function (cb) {
|
||||
ncp(src, out, {dereference: true}, function (err) {
|
||||
assert.equal(err.length, 1);
|
||||
assert.equal(err[0].code, 'ENOENT');
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('modified files copies', function () {
|
||||
var fixtures = path.join(__dirname, 'modified-files'),
|
||||
src = path.join(fixtures, 'src'),
|
||||
out = path.join(fixtures, 'out');
|
||||
|
||||
it('if file not exists copy file to target', function(cb) {
|
||||
rimraf(out, function() {
|
||||
ncp(src, out, {modified: true, clobber: false}, function (err) {
|
||||
assert.equal(fs.existsSync(out), true);
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('change source file mtime and copy', function(cb) {
|
||||
fs.utimesSync(src+"/a", new Date().getTime()/1000, new Date('2015-01-01 00:00:00').getTime()/1000);
|
||||
ncp(src, out, {modified: true, clobber: false}, function (err) {
|
||||
fs.stat(out+"/a", function(err, stats) {
|
||||
assert.equal(stats.mtime.getTime(), new Date('2015-01-01 00:00:00').getTime());
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
1
node_modules/ncp/test/regular-fixtures/src/a
generated
vendored
1
node_modules/ncp/test/regular-fixtures/src/a
generated
vendored
|
@ -1 +0,0 @@
|
|||
Hello world
|
1
node_modules/ncp/test/regular-fixtures/src/b
generated
vendored
1
node_modules/ncp/test/regular-fixtures/src/b
generated
vendored
|
@ -1 +0,0 @@
|
|||
Hello ncp
|
0
node_modules/ncp/test/regular-fixtures/src/c
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/c
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/d
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/d
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/e
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/e
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/f
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/f
generated
vendored
1
node_modules/ncp/test/regular-fixtures/src/sub/a
generated
vendored
1
node_modules/ncp/test/regular-fixtures/src/sub/a
generated
vendored
|
@ -1 +0,0 @@
|
|||
Hello nodejitsu
|
0
node_modules/ncp/test/regular-fixtures/src/sub/b
generated
vendored
0
node_modules/ncp/test/regular-fixtures/src/sub/b
generated
vendored
1
node_modules/ncp/test/symlink-fixtures/src/dir/bar
generated
vendored
1
node_modules/ncp/test/symlink-fixtures/src/dir/bar
generated
vendored
|
@ -1 +0,0 @@
|
|||
bar contents
|
1
node_modules/ncp/test/symlink-fixtures/src/foo
generated
vendored
1
node_modules/ncp/test/symlink-fixtures/src/foo
generated
vendored
|
@ -1 +0,0 @@
|
|||
foo contents
|
23
node_modules/universalify/package.json
generated
vendored
23
node_modules/universalify/package.json
generated
vendored
|
@ -1,27 +1,32 @@
|
|||
{
|
||||
"_from": "universalify@^0.1.0",
|
||||
"_args": [
|
||||
[
|
||||
"universalify@0.1.2",
|
||||
"/home/runner/work/ghaction-github-pages/ghaction-github-pages"
|
||||
]
|
||||
],
|
||||
"_from": "universalify@0.1.2",
|
||||
"_id": "universalify@0.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||
"_location": "/universalify",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "universalify@^0.1.0",
|
||||
"raw": "universalify@0.1.2",
|
||||
"name": "universalify",
|
||||
"escapedName": "universalify",
|
||||
"rawSpec": "^0.1.0",
|
||||
"rawSpec": "0.1.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.0"
|
||||
"fetchSpec": "0.1.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/fs-extra"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"_shasum": "b646f69be3942dabcecc9d6639c80dc105efaa66",
|
||||
"_spec": "universalify@^0.1.0",
|
||||
"_where": "X:\\dev\\neard\\www\\github\\ghaction\\ghaction-github-pages\\node_modules\\fs-extra",
|
||||
"_spec": "0.1.2",
|
||||
"_where": "/home/runner/work/ghaction-github-pages/ghaction-github-pages",
|
||||
"author": {
|
||||
"name": "Ryan Zimmerman",
|
||||
"email": "opensrc@ryanzim.com"
|
||||
|
@ -29,8 +34,6 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/RyanZim/universalify/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Make a callback- or promise-based function support both promises and callbacks.",
|
||||
"devDependencies": {
|
||||
"colortape": "^0.1.2",
|
||||
|
|
Loading…
Reference in New Issue
Block a user