mirror of
https://github.com/Raghu-Ch/nodeRestAPI.git
synced 2026-02-10 12:43:02 -05:00
initial commit
This commit is contained in:
6
node_modules/write-file-atomic/LICENSE
generated
vendored
Normal file
6
node_modules/write-file-atomic/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
Copyright (c) 2015, Rebecca Turner
|
||||
|
||||
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.
|
||||
|
||||
44
node_modules/write-file-atomic/README.md
generated
vendored
Normal file
44
node_modules/write-file-atomic/README.md
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
write-file-atomic
|
||||
-----------------
|
||||
|
||||
This is an extension for node's `fs.writeFile` that makes its operation
|
||||
atomic and allows you set ownership (uid/gid of the file).
|
||||
|
||||
### var writeFileAtomic = require('write-file-atomic')<br>writeFileAtomic(filename, data, [options], callback)
|
||||
|
||||
* filename **String**
|
||||
* data **String** | **Buffer**
|
||||
* options **Object**
|
||||
* chown **Object**
|
||||
* uid **Number**
|
||||
* gid **Number**
|
||||
* encoding **String** | **Null** default = 'utf8'
|
||||
* mode **Number** default = 438 (aka 0666 in Octal)
|
||||
callback **Function**
|
||||
|
||||
Atomically and asynchronously writes data to a file, replacing the file if it already
|
||||
exists. data can be a string or a buffer.
|
||||
|
||||
The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`.
|
||||
If writeFile completes successfully then, if passed the **chown** option it will change
|
||||
the ownership of the file. Finally it renames the file back to the filename you specified. If
|
||||
it encounters errors at any of these steps it will attempt to unlink the temporary file and then
|
||||
pass the error back to the caller.
|
||||
|
||||
If provided, the **chown** option requires both **uid** and **gid** properties or else
|
||||
you'll get an error.
|
||||
|
||||
The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
writeFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) {
|
||||
if (err) throw err;
|
||||
console.log('It\'s saved!');
|
||||
});
|
||||
```
|
||||
|
||||
### var writeFileAtomicSync = require('write-file-atomic').sync<br>writeFileAtomicSync(filename, data, [options])
|
||||
|
||||
The synchronous version of **writeFileAtomic**.
|
||||
129
node_modules/write-file-atomic/index.js
generated
vendored
Normal file
129
node_modules/write-file-atomic/index.js
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
'use strict'
|
||||
module.exports = writeFile
|
||||
module.exports.sync = writeFileSync
|
||||
module.exports._getTmpname = getTmpname // for testing
|
||||
|
||||
var fs = require('graceful-fs')
|
||||
var chain = require('slide').chain
|
||||
var MurmurHash3 = require('imurmurhash')
|
||||
var extend = Object.assign || require('util')._extend
|
||||
|
||||
var invocations = 0
|
||||
function getTmpname (filename) {
|
||||
return filename + '.' +
|
||||
MurmurHash3(__filename)
|
||||
.hash(String(process.pid))
|
||||
.hash(String(++invocations))
|
||||
.result()
|
||||
}
|
||||
|
||||
function writeFile (filename, data, options, callback) {
|
||||
if (options instanceof Function) {
|
||||
callback = options
|
||||
options = null
|
||||
}
|
||||
if (!options) options = {}
|
||||
fs.realpath(filename, function (_, realname) {
|
||||
_writeFile(realname || filename, data, options, callback)
|
||||
})
|
||||
}
|
||||
function _writeFile (filename, data, options, callback) {
|
||||
var tmpfile = getTmpname(filename)
|
||||
|
||||
if (options.mode && options.chown) {
|
||||
return thenWriteFile()
|
||||
} else {
|
||||
// Either mode or chown is not explicitly set
|
||||
// Default behavior is to copy it from original file
|
||||
return fs.stat(filename, function (err, stats) {
|
||||
if (err || !stats) return thenWriteFile()
|
||||
|
||||
options = extend({}, options)
|
||||
if (!options.mode) {
|
||||
options.mode = stats.mode
|
||||
}
|
||||
if (!options.chown && process.getuid) {
|
||||
options.chown = { uid: stats.uid, gid: stats.gid }
|
||||
}
|
||||
return thenWriteFile()
|
||||
})
|
||||
}
|
||||
|
||||
function thenWriteFile () {
|
||||
chain([
|
||||
[writeFileAsync, tmpfile, data, options.mode, options.encoding || 'utf8'],
|
||||
options.chown && [fs, fs.chown, tmpfile, options.chown.uid, options.chown.gid],
|
||||
options.mode && [fs, fs.chmod, tmpfile, options.mode],
|
||||
[fs, fs.rename, tmpfile, filename]
|
||||
], function (err) {
|
||||
err ? fs.unlink(tmpfile, function () { callback(err) })
|
||||
: callback()
|
||||
})
|
||||
}
|
||||
|
||||
// doing this instead of `fs.writeFile` in order to get the ability to
|
||||
// call `fsync`.
|
||||
function writeFileAsync (file, data, mode, encoding, cb) {
|
||||
fs.open(file, 'w', options.mode, function (err, fd) {
|
||||
if (err) return cb(err)
|
||||
if (Buffer.isBuffer(data)) {
|
||||
return fs.write(fd, data, 0, data.length, 0, syncAndClose)
|
||||
} else if (data != null) {
|
||||
return fs.write(fd, String(data), 0, String(encoding), syncAndClose)
|
||||
} else {
|
||||
return syncAndClose()
|
||||
}
|
||||
function syncAndClose (err) {
|
||||
if (err) return cb(err)
|
||||
fs.fsync(fd, function (err) {
|
||||
if (err) return cb(err)
|
||||
fs.close(fd, cb)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function writeFileSync (filename, data, options) {
|
||||
if (!options) options = {}
|
||||
try {
|
||||
filename = fs.realpathSync(filename)
|
||||
} catch (ex) {
|
||||
// it's ok, it'll happen on a not yet existing file
|
||||
}
|
||||
var tmpfile = getTmpname(filename)
|
||||
|
||||
try {
|
||||
if (!options.mode || !options.chown) {
|
||||
// Either mode or chown is not explicitly set
|
||||
// Default behavior is to copy it from original file
|
||||
try {
|
||||
var stats = fs.statSync(filename)
|
||||
options = extend({}, options)
|
||||
if (!options.mode) {
|
||||
options.mode = stats.mode
|
||||
}
|
||||
if (!options.chown && process.getuid) {
|
||||
options.chown = { uid: stats.uid, gid: stats.gid }
|
||||
}
|
||||
} catch (ex) {
|
||||
// ignore stat errors
|
||||
}
|
||||
}
|
||||
|
||||
var fd = fs.openSync(tmpfile, 'w', options.mode)
|
||||
if (Buffer.isBuffer(data)) {
|
||||
fs.writeSync(fd, data, 0, data.length, 0)
|
||||
} else if (data != null) {
|
||||
fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8'))
|
||||
}
|
||||
fs.fsyncSync(fd)
|
||||
fs.closeSync(fd)
|
||||
if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid)
|
||||
if (options.mode) fs.chmodSync(tmpfile, options.mode)
|
||||
fs.renameSync(tmpfile, filename)
|
||||
} catch (err) {
|
||||
try { fs.unlinkSync(tmpfile) } catch (e) {}
|
||||
throw err
|
||||
}
|
||||
}
|
||||
15
node_modules/write-file-atomic/node_modules/graceful-fs/LICENSE
generated
vendored
Normal file
15
node_modules/write-file-atomic/node_modules/graceful-fs/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
||||
|
||||
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.
|
||||
133
node_modules/write-file-atomic/node_modules/graceful-fs/README.md
generated
vendored
Normal file
133
node_modules/write-file-atomic/node_modules/graceful-fs/README.md
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
# graceful-fs
|
||||
|
||||
graceful-fs functions as a drop-in replacement for the fs module,
|
||||
making various improvements.
|
||||
|
||||
The improvements are meant to normalize behavior across different
|
||||
platforms and environments, and to make filesystem access more
|
||||
resilient to errors.
|
||||
|
||||
## Improvements over [fs module](https://nodejs.org/api/fs.html)
|
||||
|
||||
* Queues up `open` and `readdir` calls, and retries them once
|
||||
something closes if there is an EMFILE error from too many file
|
||||
descriptors.
|
||||
* fixes `lchmod` for Node versions prior to 0.6.2.
|
||||
* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
|
||||
* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
|
||||
`lchown` if the user isn't root.
|
||||
* makes `lchmod` and `lchown` become noops, if not available.
|
||||
* retries reading a file if `read` results in EAGAIN error.
|
||||
|
||||
On Windows, it retries renaming a file for up to one second if `EACCESS`
|
||||
or `EPERM` error occurs, likely because antivirus software has locked
|
||||
the directory.
|
||||
|
||||
## USAGE
|
||||
|
||||
```javascript
|
||||
// use just like fs
|
||||
var fs = require('graceful-fs')
|
||||
|
||||
// now go and do stuff with it...
|
||||
fs.readFileSync('some-file-or-whatever')
|
||||
```
|
||||
|
||||
## Global Patching
|
||||
|
||||
If you want to patch the global fs module (or any other fs-like
|
||||
module) you can do this:
|
||||
|
||||
```javascript
|
||||
// Make sure to read the caveat below.
|
||||
var realFs = require('fs')
|
||||
var gracefulFs = require('graceful-fs')
|
||||
gracefulFs.gracefulify(realFs)
|
||||
```
|
||||
|
||||
This should only ever be done at the top-level application layer, in
|
||||
order to delay on EMFILE errors from any fs-using dependencies. You
|
||||
should **not** do this in a library, because it can cause unexpected
|
||||
delays in other parts of the program.
|
||||
|
||||
## Changes
|
||||
|
||||
This module is fairly stable at this point, and used by a lot of
|
||||
things. That being said, because it implements a subtle behavior
|
||||
change in a core part of the node API, even modest changes can be
|
||||
extremely breaking, and the versioning is thus biased towards
|
||||
bumping the major when in doubt.
|
||||
|
||||
The main change between major versions has been switching between
|
||||
providing a fully-patched `fs` module vs monkey-patching the node core
|
||||
builtin, and the approach by which a non-monkey-patched `fs` was
|
||||
created.
|
||||
|
||||
The goal is to trade `EMFILE` errors for slower fs operations. So, if
|
||||
you try to open a zillion files, rather than crashing, `open`
|
||||
operations will be queued up and wait for something else to `close`.
|
||||
|
||||
There are advantages to each approach. Monkey-patching the fs means
|
||||
that no `EMFILE` errors can possibly occur anywhere in your
|
||||
application, because everything is using the same core `fs` module,
|
||||
which is patched. However, it can also obviously cause undesirable
|
||||
side-effects, especially if the module is loaded multiple times.
|
||||
|
||||
Implementing a separate-but-identical patched `fs` module is more
|
||||
surgical (and doesn't run the risk of patching multiple times), but
|
||||
also imposes the challenge of keeping in sync with the core module.
|
||||
|
||||
The current approach loads the `fs` module, and then creates a
|
||||
lookalike object that has all the same methods, except a few that are
|
||||
patched. It is safe to use in all versions of Node from 0.8 through
|
||||
7.0.
|
||||
|
||||
### v4
|
||||
|
||||
* Do not monkey-patch the fs module. This module may now be used as a
|
||||
drop-in dep, and users can opt into monkey-patching the fs builtin
|
||||
if their app requires it.
|
||||
|
||||
### v3
|
||||
|
||||
* Monkey-patch fs, because the eval approach no longer works on recent
|
||||
node.
|
||||
* fixed possible type-error throw if rename fails on windows
|
||||
* verify that we *never* get EMFILE errors
|
||||
* Ignore ENOSYS from chmod/chown
|
||||
* clarify that graceful-fs must be used as a drop-in
|
||||
|
||||
### v2.1.0
|
||||
|
||||
* Use eval rather than monkey-patching fs.
|
||||
* readdir: Always sort the results
|
||||
* win32: requeue a file if error has an OK status
|
||||
|
||||
### v2.0
|
||||
|
||||
* A return to monkey patching
|
||||
* wrap process.cwd
|
||||
|
||||
### v1.1
|
||||
|
||||
* wrap readFile
|
||||
* Wrap fs.writeFile.
|
||||
* readdir protection
|
||||
* Don't clobber the fs builtin
|
||||
* Handle fs.read EAGAIN errors by trying again
|
||||
* Expose the curOpen counter
|
||||
* No-op lchown/lchmod if not implemented
|
||||
* fs.rename patch only for win32
|
||||
* Patch fs.rename to handle AV software on Windows
|
||||
* Close #4 Chown should not fail on einval or eperm if non-root
|
||||
* Fix isaacs/fstream#1 Only wrap fs one time
|
||||
* Fix #3 Start at 1024 max files, then back off on EMFILE
|
||||
* lutimes that doens't blow up on Linux
|
||||
* A full on-rewrite using a queue instead of just swallowing the EMFILE error
|
||||
* Wrap Read/Write streams as well
|
||||
|
||||
### 1.0
|
||||
|
||||
* Update engines for node 0.6
|
||||
* Be lstat-graceful on Windows
|
||||
* first
|
||||
21
node_modules/write-file-atomic/node_modules/graceful-fs/fs.js
generated
vendored
Normal file
21
node_modules/write-file-atomic/node_modules/graceful-fs/fs.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict'
|
||||
|
||||
var fs = require('fs')
|
||||
|
||||
module.exports = clone(fs)
|
||||
|
||||
function clone (obj) {
|
||||
if (obj === null || typeof obj !== 'object')
|
||||
return obj
|
||||
|
||||
if (obj instanceof Object)
|
||||
var copy = { __proto__: obj.__proto__ }
|
||||
else
|
||||
var copy = Object.create(null)
|
||||
|
||||
Object.getOwnPropertyNames(obj).forEach(function (key) {
|
||||
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
|
||||
})
|
||||
|
||||
return copy
|
||||
}
|
||||
262
node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js
generated
vendored
Normal file
262
node_modules/write-file-atomic/node_modules/graceful-fs/graceful-fs.js
generated
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
var fs = require('fs')
|
||||
var polyfills = require('./polyfills.js')
|
||||
var legacy = require('./legacy-streams.js')
|
||||
var queue = []
|
||||
|
||||
var util = require('util')
|
||||
|
||||
function noop () {}
|
||||
|
||||
var debug = noop
|
||||
if (util.debuglog)
|
||||
debug = util.debuglog('gfs4')
|
||||
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
|
||||
debug = function() {
|
||||
var m = util.format.apply(util, arguments)
|
||||
m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
|
||||
console.error(m)
|
||||
}
|
||||
|
||||
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
|
||||
process.on('exit', function() {
|
||||
debug(queue)
|
||||
require('assert').equal(queue.length, 0)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = patch(require('./fs.js'))
|
||||
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) {
|
||||
module.exports = patch(fs)
|
||||
}
|
||||
|
||||
// Always patch fs.close/closeSync, because we want to
|
||||
// retry() whenever a close happens *anywhere* in the program.
|
||||
// This is essential when multiple graceful-fs instances are
|
||||
// in play at the same time.
|
||||
module.exports.close =
|
||||
fs.close = (function (fs$close) { return function (fd, cb) {
|
||||
return fs$close.call(fs, fd, function (err) {
|
||||
if (!err)
|
||||
retry()
|
||||
|
||||
if (typeof cb === 'function')
|
||||
cb.apply(this, arguments)
|
||||
})
|
||||
}})(fs.close)
|
||||
|
||||
module.exports.closeSync =
|
||||
fs.closeSync = (function (fs$closeSync) { return function (fd) {
|
||||
// Note that graceful-fs also retries when fs.closeSync() fails.
|
||||
// Looks like a bug to me, although it's probably a harmless one.
|
||||
var rval = fs$closeSync.apply(fs, arguments)
|
||||
retry()
|
||||
return rval
|
||||
}})(fs.closeSync)
|
||||
|
||||
function patch (fs) {
|
||||
// Everything that references the open() function needs to be in here
|
||||
polyfills(fs)
|
||||
fs.gracefulify = patch
|
||||
fs.FileReadStream = ReadStream; // Legacy name.
|
||||
fs.FileWriteStream = WriteStream; // Legacy name.
|
||||
fs.createReadStream = createReadStream
|
||||
fs.createWriteStream = createWriteStream
|
||||
var fs$readFile = fs.readFile
|
||||
fs.readFile = readFile
|
||||
function readFile (path, options, cb) {
|
||||
if (typeof options === 'function')
|
||||
cb = options, options = null
|
||||
|
||||
return go$readFile(path, options, cb)
|
||||
|
||||
function go$readFile (path, options, cb) {
|
||||
return fs$readFile(path, options, function (err) {
|
||||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
||||
enqueue([go$readFile, [path, options, cb]])
|
||||
else {
|
||||
if (typeof cb === 'function')
|
||||
cb.apply(this, arguments)
|
||||
retry()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var fs$writeFile = fs.writeFile
|
||||
fs.writeFile = writeFile
|
||||
function writeFile (path, data, options, cb) {
|
||||
if (typeof options === 'function')
|
||||
cb = options, options = null
|
||||
|
||||
return go$writeFile(path, data, options, cb)
|
||||
|
||||
function go$writeFile (path, data, options, cb) {
|
||||
return fs$writeFile(path, data, options, function (err) {
|
||||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
||||
enqueue([go$writeFile, [path, data, options, cb]])
|
||||
else {
|
||||
if (typeof cb === 'function')
|
||||
cb.apply(this, arguments)
|
||||
retry()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var fs$appendFile = fs.appendFile
|
||||
if (fs$appendFile)
|
||||
fs.appendFile = appendFile
|
||||
function appendFile (path, data, options, cb) {
|
||||
if (typeof options === 'function')
|
||||
cb = options, options = null
|
||||
|
||||
return go$appendFile(path, data, options, cb)
|
||||
|
||||
function go$appendFile (path, data, options, cb) {
|
||||
return fs$appendFile(path, data, options, function (err) {
|
||||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
||||
enqueue([go$appendFile, [path, data, options, cb]])
|
||||
else {
|
||||
if (typeof cb === 'function')
|
||||
cb.apply(this, arguments)
|
||||
retry()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var fs$readdir = fs.readdir
|
||||
fs.readdir = readdir
|
||||
function readdir (path, options, cb) {
|
||||
var args = [path]
|
||||
if (typeof options !== 'function') {
|
||||
args.push(options)
|
||||
} else {
|
||||
cb = options
|
||||
}
|
||||
args.push(go$readdir$cb)
|
||||
|
||||
return go$readdir(args)
|
||||
|
||||
function go$readdir$cb (err, files) {
|
||||
if (files && files.sort)
|
||||
files.sort()
|
||||
|
||||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
||||
enqueue([go$readdir, [args]])
|
||||
else {
|
||||
if (typeof cb === 'function')
|
||||
cb.apply(this, arguments)
|
||||
retry()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function go$readdir (args) {
|
||||
return fs$readdir.apply(fs, args)
|
||||
}
|
||||
|
||||
if (process.version.substr(0, 4) === 'v0.8') {
|
||||
var legStreams = legacy(fs)
|
||||
ReadStream = legStreams.ReadStream
|
||||
WriteStream = legStreams.WriteStream
|
||||
}
|
||||
|
||||
var fs$ReadStream = fs.ReadStream
|
||||
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
|
||||
ReadStream.prototype.open = ReadStream$open
|
||||
|
||||
var fs$WriteStream = fs.WriteStream
|
||||
WriteStream.prototype = Object.create(fs$WriteStream.prototype)
|
||||
WriteStream.prototype.open = WriteStream$open
|
||||
|
||||
fs.ReadStream = ReadStream
|
||||
fs.WriteStream = WriteStream
|
||||
|
||||
function ReadStream (path, options) {
|
||||
if (this instanceof ReadStream)
|
||||
return fs$ReadStream.apply(this, arguments), this
|
||||
else
|
||||
return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
|
||||
}
|
||||
|
||||
function ReadStream$open () {
|
||||
var that = this
|
||||
open(that.path, that.flags, that.mode, function (err, fd) {
|
||||
if (err) {
|
||||
if (that.autoClose)
|
||||
that.destroy()
|
||||
|
||||
that.emit('error', err)
|
||||
} else {
|
||||
that.fd = fd
|
||||
that.emit('open', fd)
|
||||
that.read()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function WriteStream (path, options) {
|
||||
if (this instanceof WriteStream)
|
||||
return fs$WriteStream.apply(this, arguments), this
|
||||
else
|
||||
return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
|
||||
}
|
||||
|
||||
function WriteStream$open () {
|
||||
var that = this
|
||||
open(that.path, that.flags, that.mode, function (err, fd) {
|
||||
if (err) {
|
||||
that.destroy()
|
||||
that.emit('error', err)
|
||||
} else {
|
||||
that.fd = fd
|
||||
that.emit('open', fd)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function createReadStream (path, options) {
|
||||
return new ReadStream(path, options)
|
||||
}
|
||||
|
||||
function createWriteStream (path, options) {
|
||||
return new WriteStream(path, options)
|
||||
}
|
||||
|
||||
var fs$open = fs.open
|
||||
fs.open = open
|
||||
function open (path, flags, mode, cb) {
|
||||
if (typeof mode === 'function')
|
||||
cb = mode, mode = null
|
||||
|
||||
return go$open(path, flags, mode, cb)
|
||||
|
||||
function go$open (path, flags, mode, cb) {
|
||||
return fs$open(path, flags, mode, function (err, fd) {
|
||||
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
||||
enqueue([go$open, [path, flags, mode, cb]])
|
||||
else {
|
||||
if (typeof cb === 'function')
|
||||
cb.apply(this, arguments)
|
||||
retry()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return fs
|
||||
}
|
||||
|
||||
function enqueue (elem) {
|
||||
debug('ENQUEUE', elem[0].name, elem[1])
|
||||
queue.push(elem)
|
||||
}
|
||||
|
||||
function retry () {
|
||||
var elem = queue.shift()
|
||||
if (elem) {
|
||||
debug('RETRY', elem[0].name, elem[1])
|
||||
elem[0].apply(null, elem[1])
|
||||
}
|
||||
}
|
||||
118
node_modules/write-file-atomic/node_modules/graceful-fs/legacy-streams.js
generated
vendored
Normal file
118
node_modules/write-file-atomic/node_modules/graceful-fs/legacy-streams.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
var Stream = require('stream').Stream
|
||||
|
||||
module.exports = legacy
|
||||
|
||||
function legacy (fs) {
|
||||
return {
|
||||
ReadStream: ReadStream,
|
||||
WriteStream: WriteStream
|
||||
}
|
||||
|
||||
function ReadStream (path, options) {
|
||||
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
|
||||
|
||||
Stream.call(this);
|
||||
|
||||
var self = this;
|
||||
|
||||
this.path = path;
|
||||
this.fd = null;
|
||||
this.readable = true;
|
||||
this.paused = false;
|
||||
|
||||
this.flags = 'r';
|
||||
this.mode = 438; /*=0666*/
|
||||
this.bufferSize = 64 * 1024;
|
||||
|
||||
options = options || {};
|
||||
|
||||
// Mixin options into this
|
||||
var keys = Object.keys(options);
|
||||
for (var index = 0, length = keys.length; index < length; index++) {
|
||||
var key = keys[index];
|
||||
this[key] = options[key];
|
||||
}
|
||||
|
||||
if (this.encoding) this.setEncoding(this.encoding);
|
||||
|
||||
if (this.start !== undefined) {
|
||||
if ('number' !== typeof this.start) {
|
||||
throw TypeError('start must be a Number');
|
||||
}
|
||||
if (this.end === undefined) {
|
||||
this.end = Infinity;
|
||||
} else if ('number' !== typeof this.end) {
|
||||
throw TypeError('end must be a Number');
|
||||
}
|
||||
|
||||
if (this.start > this.end) {
|
||||
throw new Error('start must be <= end');
|
||||
}
|
||||
|
||||
this.pos = this.start;
|
||||
}
|
||||
|
||||
if (this.fd !== null) {
|
||||
process.nextTick(function() {
|
||||
self._read();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
fs.open(this.path, this.flags, this.mode, function (err, fd) {
|
||||
if (err) {
|
||||
self.emit('error', err);
|
||||
self.readable = false;
|
||||
return;
|
||||
}
|
||||
|
||||
self.fd = fd;
|
||||
self.emit('open', fd);
|
||||
self._read();
|
||||
})
|
||||
}
|
||||
|
||||
function WriteStream (path, options) {
|
||||
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
|
||||
|
||||
Stream.call(this);
|
||||
|
||||
this.path = path;
|
||||
this.fd = null;
|
||||
this.writable = true;
|
||||
|
||||
this.flags = 'w';
|
||||
this.encoding = 'binary';
|
||||
this.mode = 438; /*=0666*/
|
||||
this.bytesWritten = 0;
|
||||
|
||||
options = options || {};
|
||||
|
||||
// Mixin options into this
|
||||
var keys = Object.keys(options);
|
||||
for (var index = 0, length = keys.length; index < length; index++) {
|
||||
var key = keys[index];
|
||||
this[key] = options[key];
|
||||
}
|
||||
|
||||
if (this.start !== undefined) {
|
||||
if ('number' !== typeof this.start) {
|
||||
throw TypeError('start must be a Number');
|
||||
}
|
||||
if (this.start < 0) {
|
||||
throw new Error('start must be >= zero');
|
||||
}
|
||||
|
||||
this.pos = this.start;
|
||||
}
|
||||
|
||||
this.busy = false;
|
||||
this._queue = [];
|
||||
|
||||
if (this.fd === null) {
|
||||
this._open = fs.open;
|
||||
this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
|
||||
this.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
123
node_modules/write-file-atomic/node_modules/graceful-fs/package.json
generated
vendored
Normal file
123
node_modules/write-file-atomic/node_modules/graceful-fs/package.json
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "graceful-fs@^4.1.2",
|
||||
"scope": null,
|
||||
"escapedName": "graceful-fs",
|
||||
"name": "graceful-fs",
|
||||
"rawSpec": "^4.1.2",
|
||||
"spec": ">=4.1.2 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\chvra\\Documents\\angular-play\\nodeRest\\node_modules\\readdirp"
|
||||
],
|
||||
[
|
||||
{
|
||||
"raw": "graceful-fs@^4.1.11",
|
||||
"scope": null,
|
||||
"escapedName": "graceful-fs",
|
||||
"name": "graceful-fs",
|
||||
"rawSpec": "^4.1.11",
|
||||
"spec": ">=4.1.11 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\chvra\\Documents\\angular-play\\nodeRest\\node_modules\\write-file-atomic"
|
||||
]
|
||||
],
|
||||
"_from": "graceful-fs@^4.1.11",
|
||||
"_id": "graceful-fs@4.1.11",
|
||||
"_inCache": true,
|
||||
"_location": "/write-file-atomic/graceful-fs",
|
||||
"_nodeVersion": "6.5.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/graceful-fs-4.1.11.tgz_1479843029430_0.2122855328489095"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.10.9",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "graceful-fs@^4.1.11",
|
||||
"scope": null,
|
||||
"escapedName": "graceful-fs",
|
||||
"name": "graceful-fs",
|
||||
"rawSpec": "^4.1.11",
|
||||
"spec": ">=4.1.11 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/write-file-atomic"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"_shasum": "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "graceful-fs@^4.1.11",
|
||||
"_where": "C:\\Users\\chvra\\Documents\\angular-play\\nodeRest\\node_modules\\write-file-atomic",
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/node-graceful-fs/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "A drop-in replacement for fs, making various improvements.",
|
||||
"devDependencies": {
|
||||
"mkdirp": "^0.5.0",
|
||||
"rimraf": "^2.2.8",
|
||||
"tap": "^5.4.2"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658",
|
||||
"tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
},
|
||||
"files": [
|
||||
"fs.js",
|
||||
"graceful-fs.js",
|
||||
"legacy-streams.js",
|
||||
"polyfills.js"
|
||||
],
|
||||
"gitHead": "65cf80d1fd3413b823c16c626c1e7c326452bee5",
|
||||
"homepage": "https://github.com/isaacs/node-graceful-fs#readme",
|
||||
"keywords": [
|
||||
"fs",
|
||||
"module",
|
||||
"reading",
|
||||
"retry",
|
||||
"retries",
|
||||
"queue",
|
||||
"error",
|
||||
"errors",
|
||||
"handling",
|
||||
"EMFILE",
|
||||
"EAGAIN",
|
||||
"EINVAL",
|
||||
"EPERM",
|
||||
"EACCESS"
|
||||
],
|
||||
"license": "ISC",
|
||||
"main": "graceful-fs.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
}
|
||||
],
|
||||
"name": "graceful-fs",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/isaacs/node-graceful-fs.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js | tap -"
|
||||
},
|
||||
"version": "4.1.11"
|
||||
}
|
||||
330
node_modules/write-file-atomic/node_modules/graceful-fs/polyfills.js
generated
vendored
Normal file
330
node_modules/write-file-atomic/node_modules/graceful-fs/polyfills.js
generated
vendored
Normal file
@@ -0,0 +1,330 @@
|
||||
var fs = require('./fs.js')
|
||||
var constants = require('constants')
|
||||
|
||||
var origCwd = process.cwd
|
||||
var cwd = null
|
||||
|
||||
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
|
||||
|
||||
process.cwd = function() {
|
||||
if (!cwd)
|
||||
cwd = origCwd.call(process)
|
||||
return cwd
|
||||
}
|
||||
try {
|
||||
process.cwd()
|
||||
} catch (er) {}
|
||||
|
||||
var chdir = process.chdir
|
||||
process.chdir = function(d) {
|
||||
cwd = null
|
||||
chdir.call(process, d)
|
||||
}
|
||||
|
||||
module.exports = patch
|
||||
|
||||
function patch (fs) {
|
||||
// (re-)implement some things that are known busted or missing.
|
||||
|
||||
// lchmod, broken prior to 0.6.2
|
||||
// back-port the fix here.
|
||||
if (constants.hasOwnProperty('O_SYMLINK') &&
|
||||
process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
||||
patchLchmod(fs)
|
||||
}
|
||||
|
||||
// lutimes implementation, or no-op
|
||||
if (!fs.lutimes) {
|
||||
patchLutimes(fs)
|
||||
}
|
||||
|
||||
// https://github.com/isaacs/node-graceful-fs/issues/4
|
||||
// Chown should not fail on einval or eperm if non-root.
|
||||
// It should not fail on enosys ever, as this just indicates
|
||||
// that a fs doesn't support the intended operation.
|
||||
|
||||
fs.chown = chownFix(fs.chown)
|
||||
fs.fchown = chownFix(fs.fchown)
|
||||
fs.lchown = chownFix(fs.lchown)
|
||||
|
||||
fs.chmod = chmodFix(fs.chmod)
|
||||
fs.fchmod = chmodFix(fs.fchmod)
|
||||
fs.lchmod = chmodFix(fs.lchmod)
|
||||
|
||||
fs.chownSync = chownFixSync(fs.chownSync)
|
||||
fs.fchownSync = chownFixSync(fs.fchownSync)
|
||||
fs.lchownSync = chownFixSync(fs.lchownSync)
|
||||
|
||||
fs.chmodSync = chmodFixSync(fs.chmodSync)
|
||||
fs.fchmodSync = chmodFixSync(fs.fchmodSync)
|
||||
fs.lchmodSync = chmodFixSync(fs.lchmodSync)
|
||||
|
||||
fs.stat = statFix(fs.stat)
|
||||
fs.fstat = statFix(fs.fstat)
|
||||
fs.lstat = statFix(fs.lstat)
|
||||
|
||||
fs.statSync = statFixSync(fs.statSync)
|
||||
fs.fstatSync = statFixSync(fs.fstatSync)
|
||||
fs.lstatSync = statFixSync(fs.lstatSync)
|
||||
|
||||
// if lchmod/lchown do not exist, then make them no-ops
|
||||
if (!fs.lchmod) {
|
||||
fs.lchmod = function (path, mode, cb) {
|
||||
if (cb) process.nextTick(cb)
|
||||
}
|
||||
fs.lchmodSync = function () {}
|
||||
}
|
||||
if (!fs.lchown) {
|
||||
fs.lchown = function (path, uid, gid, cb) {
|
||||
if (cb) process.nextTick(cb)
|
||||
}
|
||||
fs.lchownSync = function () {}
|
||||
}
|
||||
|
||||
// on Windows, A/V software can lock the directory, causing this
|
||||
// to fail with an EACCES or EPERM if the directory contains newly
|
||||
// created files. Try again on failure, for up to 60 seconds.
|
||||
|
||||
// Set the timeout this long because some Windows Anti-Virus, such as Parity
|
||||
// bit9, may lock files for up to a minute, causing npm package install
|
||||
// failures. Also, take care to yield the scheduler. Windows scheduling gives
|
||||
// CPU to a busy looping process, which can cause the program causing the lock
|
||||
// contention to be starved of CPU by node, so the contention doesn't resolve.
|
||||
if (platform === "win32") {
|
||||
fs.rename = (function (fs$rename) { return function (from, to, cb) {
|
||||
var start = Date.now()
|
||||
var backoff = 0;
|
||||
fs$rename(from, to, function CB (er) {
|
||||
if (er
|
||||
&& (er.code === "EACCES" || er.code === "EPERM")
|
||||
&& Date.now() - start < 60000) {
|
||||
setTimeout(function() {
|
||||
fs.stat(to, function (stater, st) {
|
||||
if (stater && stater.code === "ENOENT")
|
||||
fs$rename(from, to, CB);
|
||||
else
|
||||
cb(er)
|
||||
})
|
||||
}, backoff)
|
||||
if (backoff < 100)
|
||||
backoff += 10;
|
||||
return;
|
||||
}
|
||||
if (cb) cb(er)
|
||||
})
|
||||
}})(fs.rename)
|
||||
}
|
||||
|
||||
// if read() returns EAGAIN, then just try it again.
|
||||
fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) {
|
||||
var callback
|
||||
if (callback_ && typeof callback_ === 'function') {
|
||||
var eagCounter = 0
|
||||
callback = function (er, _, __) {
|
||||
if (er && er.code === 'EAGAIN' && eagCounter < 10) {
|
||||
eagCounter ++
|
||||
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
|
||||
}
|
||||
callback_.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
|
||||
}})(fs.read)
|
||||
|
||||
fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
|
||||
var eagCounter = 0
|
||||
while (true) {
|
||||
try {
|
||||
return fs$readSync.call(fs, fd, buffer, offset, length, position)
|
||||
} catch (er) {
|
||||
if (er.code === 'EAGAIN' && eagCounter < 10) {
|
||||
eagCounter ++
|
||||
continue
|
||||
}
|
||||
throw er
|
||||
}
|
||||
}
|
||||
}})(fs.readSync)
|
||||
}
|
||||
|
||||
function patchLchmod (fs) {
|
||||
fs.lchmod = function (path, mode, callback) {
|
||||
fs.open( path
|
||||
, constants.O_WRONLY | constants.O_SYMLINK
|
||||
, mode
|
||||
, function (err, fd) {
|
||||
if (err) {
|
||||
if (callback) callback(err)
|
||||
return
|
||||
}
|
||||
// prefer to return the chmod error, if one occurs,
|
||||
// but still try to close, and report closing errors if they occur.
|
||||
fs.fchmod(fd, mode, function (err) {
|
||||
fs.close(fd, function(err2) {
|
||||
if (callback) callback(err || err2)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
fs.lchmodSync = function (path, mode) {
|
||||
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
|
||||
|
||||
// prefer to return the chmod error, if one occurs,
|
||||
// but still try to close, and report closing errors if they occur.
|
||||
var threw = true
|
||||
var ret
|
||||
try {
|
||||
ret = fs.fchmodSync(fd, mode)
|
||||
threw = false
|
||||
} finally {
|
||||
if (threw) {
|
||||
try {
|
||||
fs.closeSync(fd)
|
||||
} catch (er) {}
|
||||
} else {
|
||||
fs.closeSync(fd)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
function patchLutimes (fs) {
|
||||
if (constants.hasOwnProperty("O_SYMLINK")) {
|
||||
fs.lutimes = function (path, at, mt, cb) {
|
||||
fs.open(path, constants.O_SYMLINK, function (er, fd) {
|
||||
if (er) {
|
||||
if (cb) cb(er)
|
||||
return
|
||||
}
|
||||
fs.futimes(fd, at, mt, function (er) {
|
||||
fs.close(fd, function (er2) {
|
||||
if (cb) cb(er || er2)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
fs.lutimesSync = function (path, at, mt) {
|
||||
var fd = fs.openSync(path, constants.O_SYMLINK)
|
||||
var ret
|
||||
var threw = true
|
||||
try {
|
||||
ret = fs.futimesSync(fd, at, mt)
|
||||
threw = false
|
||||
} finally {
|
||||
if (threw) {
|
||||
try {
|
||||
fs.closeSync(fd)
|
||||
} catch (er) {}
|
||||
} else {
|
||||
fs.closeSync(fd)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
} else {
|
||||
fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
|
||||
fs.lutimesSync = function () {}
|
||||
}
|
||||
}
|
||||
|
||||
function chmodFix (orig) {
|
||||
if (!orig) return orig
|
||||
return function (target, mode, cb) {
|
||||
return orig.call(fs, target, mode, function (er) {
|
||||
if (chownErOk(er)) er = null
|
||||
if (cb) cb.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function chmodFixSync (orig) {
|
||||
if (!orig) return orig
|
||||
return function (target, mode) {
|
||||
try {
|
||||
return orig.call(fs, target, mode)
|
||||
} catch (er) {
|
||||
if (!chownErOk(er)) throw er
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function chownFix (orig) {
|
||||
if (!orig) return orig
|
||||
return function (target, uid, gid, cb) {
|
||||
return orig.call(fs, target, uid, gid, function (er) {
|
||||
if (chownErOk(er)) er = null
|
||||
if (cb) cb.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function chownFixSync (orig) {
|
||||
if (!orig) return orig
|
||||
return function (target, uid, gid) {
|
||||
try {
|
||||
return orig.call(fs, target, uid, gid)
|
||||
} catch (er) {
|
||||
if (!chownErOk(er)) throw er
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function statFix (orig) {
|
||||
if (!orig) return orig
|
||||
// Older versions of Node erroneously returned signed integers for
|
||||
// uid + gid.
|
||||
return function (target, cb) {
|
||||
return orig.call(fs, target, function (er, stats) {
|
||||
if (!stats) return cb.apply(this, arguments)
|
||||
if (stats.uid < 0) stats.uid += 0x100000000
|
||||
if (stats.gid < 0) stats.gid += 0x100000000
|
||||
if (cb) cb.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function statFixSync (orig) {
|
||||
if (!orig) return orig
|
||||
// Older versions of Node erroneously returned signed integers for
|
||||
// uid + gid.
|
||||
return function (target) {
|
||||
var stats = orig.call(fs, target)
|
||||
if (stats.uid < 0) stats.uid += 0x100000000
|
||||
if (stats.gid < 0) stats.gid += 0x100000000
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
|
||||
// ENOSYS means that the fs doesn't support the op. Just ignore
|
||||
// that, because it doesn't matter.
|
||||
//
|
||||
// if there's no getuid, or if getuid() is something other
|
||||
// than 0, and the error is EINVAL or EPERM, then just ignore
|
||||
// it.
|
||||
//
|
||||
// This specific case is a silent failure in cp, install, tar,
|
||||
// and most other unix tools that manage permissions.
|
||||
//
|
||||
// When running as root, or if other types of errors are
|
||||
// encountered, then it's strict.
|
||||
function chownErOk (er) {
|
||||
if (!er)
|
||||
return true
|
||||
|
||||
if (er.code === "ENOSYS")
|
||||
return true
|
||||
|
||||
var nonroot = !process.getuid || process.getuid() !== 0
|
||||
if (nonroot) {
|
||||
if (er.code === "EINVAL" || er.code === "EPERM")
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
106
node_modules/write-file-atomic/package.json
generated
vendored
Normal file
106
node_modules/write-file-atomic/package.json
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "write-file-atomic@^1.1.2",
|
||||
"scope": null,
|
||||
"escapedName": "write-file-atomic",
|
||||
"name": "write-file-atomic",
|
||||
"rawSpec": "^1.1.2",
|
||||
"spec": ">=1.1.2 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\chvra\\Documents\\angular-play\\nodeRest\\node_modules\\configstore"
|
||||
]
|
||||
],
|
||||
"_from": "write-file-atomic@>=1.1.2 <2.0.0",
|
||||
"_id": "write-file-atomic@1.3.4",
|
||||
"_inCache": true,
|
||||
"_location": "/write-file-atomic",
|
||||
"_nodeVersion": "7.7.4",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/write-file-atomic-1.3.4.tgz_1493249998004_0.7851631820667535"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "iarna",
|
||||
"email": "me@re-becca.org"
|
||||
},
|
||||
"_npmVersion": "4.6.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "write-file-atomic@^1.1.2",
|
||||
"scope": null,
|
||||
"escapedName": "write-file-atomic",
|
||||
"name": "write-file-atomic",
|
||||
"rawSpec": "^1.1.2",
|
||||
"spec": ">=1.1.2 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/configstore"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz",
|
||||
"_shasum": "f807a4f0b1d9e913ae7a48112e6cc3af1991b45f",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "write-file-atomic@^1.1.2",
|
||||
"_where": "C:\\Users\\chvra\\Documents\\angular-play\\nodeRest\\node_modules\\configstore",
|
||||
"author": {
|
||||
"name": "Rebecca Turner",
|
||||
"email": "me@re-becca.org",
|
||||
"url": "http://re-becca.org"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/iarna/write-file-atomic/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.11",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"slide": "^1.1.5"
|
||||
},
|
||||
"description": "Write files in an atomic fashion w/configurable ownership",
|
||||
"devDependencies": {
|
||||
"mkdirp": "^0.5.1",
|
||||
"require-inject": "^1.4.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"standard": "^9.0.2",
|
||||
"tap": "^10.3.2"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "f807a4f0b1d9e913ae7a48112e6cc3af1991b45f",
|
||||
"tarball": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "8f7d56f6a62600a38e816a8276a128883f4e7436",
|
||||
"homepage": "https://github.com/iarna/write-file-atomic",
|
||||
"keywords": [
|
||||
"writeFile",
|
||||
"atomic"
|
||||
],
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "iarna",
|
||||
"email": "me@re-becca.org"
|
||||
},
|
||||
{
|
||||
"name": "othiym23",
|
||||
"email": "ogd@aoaioxxysz.net"
|
||||
}
|
||||
],
|
||||
"name": "write-file-atomic",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/iarna/write-file-atomic.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && tap --coverage test/*.js"
|
||||
},
|
||||
"version": "1.3.4"
|
||||
}
|
||||
Reference in New Issue
Block a user