├── .gitignore ├── .npmignore ├── README.md ├── bench └── sigs.js ├── bin └── salty ├── cli.js ├── cli ├── decode.js ├── decrypt.js ├── encode.js ├── encrypt.js ├── id.js ├── import.js ├── init.js ├── ls.js ├── restore.js ├── rm.js ├── save.js ├── sign.js └── verify.js ├── lib.js ├── lib ├── constants.js ├── decrypt.js ├── encrypt.js ├── ephemeral.js ├── header.js ├── message.js ├── pubkey.js └── wallet.js ├── node_modules ├── .bin │ ├── mkdirp │ └── rimraf ├── balanced-match │ ├── .npmignore │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ └── package.json ├── base-x │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ └── package.json ├── block-stream │ ├── LICENCE │ ├── LICENSE │ ├── README.md │ ├── block-stream.js │ └── package.json ├── brace-expansion │ ├── README.md │ ├── index.js │ └── package.json ├── bs58 │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ └── package.json ├── cli-prompt │ ├── .npmignore │ ├── .travis.yml │ ├── Makefile │ ├── README.md │ ├── examples │ │ ├── multi.js │ │ ├── name.js │ │ └── password.js │ ├── index.js │ ├── package.json │ └── test │ │ ├── basic.js │ │ ├── common.js │ │ ├── multi.js │ │ ├── password.js │ │ └── windows.js ├── commander │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── fs.realpath │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── old.js │ └── package.json ├── fstream │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── filter-pipe.js │ │ ├── pipe.js │ │ ├── reader.js │ │ └── symlink-write.js │ ├── fstream.js │ ├── lib │ │ ├── abstract.js │ │ ├── collect.js │ │ ├── dir-reader.js │ │ ├── dir-writer.js │ │ ├── file-reader.js │ │ ├── file-writer.js │ │ ├── get-type.js │ │ ├── link-reader.js │ │ ├── link-writer.js │ │ ├── proxy-reader.js │ │ ├── proxy-writer.js │ │ ├── reader.js │ │ ├── socket-reader.js │ │ └── writer.js │ └── package.json ├── generic-pool │ ├── .eslintrc.js │ ├── .npmignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── Makefile │ ├── README.md │ ├── bugs │ │ └── 128.js │ ├── fabfile.py │ ├── lib │ │ └── generic-pool.js │ ├── package.json │ └── test │ │ └── generic-pool.test.js ├── glob │ ├── LICENSE │ ├── README.md │ ├── changelog.md │ ├── common.js │ ├── glob.js │ ├── package.json │ └── sync.js ├── graceful-fs │ ├── LICENSE │ ├── README.md │ ├── fs.js │ ├── graceful-fs.js │ ├── legacy-streams.js │ ├── package.json │ └── polyfills.js ├── graceful-readlink │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── inflight │ ├── LICENSE │ ├── README.md │ ├── inflight.js │ └── package.json ├── inherits │ ├── LICENSE │ ├── README.md │ ├── inherits.js │ ├── inherits_browser.js │ ├── package.json │ └── test.js ├── is-utf8 │ ├── LICENSE │ ├── README.md │ ├── is-utf8.js │ └── package.json ├── js-scrypt │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── argument-scrubber.js │ │ ├── scrypt-async-worker.js │ │ ├── scrypt-async.js │ │ ├── scrypt-module-factory.js │ │ └── scrypt-sync.js │ ├── node_modules │ │ └── generic-pool │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── fabfile.py │ │ │ ├── issue58.js │ │ │ ├── lib │ │ │ └── generic-pool.js │ │ │ ├── package.json │ │ │ └── test │ │ │ └── generic-pool.test.js │ ├── package.json │ └── test │ │ ├── argument-scrubber-tests.coffee │ │ └── mocha.opts ├── keypress │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── micro-request │ ├── .npmignore │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── minimatch │ ├── LICENSE │ ├── README.md │ ├── minimatch.js │ └── package.json ├── minimist │ ├── .travis.yml │ ├── LICENSE │ ├── example │ │ └── parse.js │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── all_bool.js │ │ ├── bool.js │ │ ├── dash.js │ │ ├── default_bool.js │ │ ├── dotted.js │ │ ├── kv_short.js │ │ ├── long.js │ │ ├── num.js │ │ ├── parse.js │ │ ├── parse_modified.js │ │ ├── short.js │ │ ├── stop_early.js │ │ ├── unknown.js │ │ └── whitespace.js ├── mkdirp │ ├── .travis.yml │ ├── LICENSE │ ├── bin │ │ ├── cmd.js │ │ └── usage.txt │ ├── examples │ │ └── pow.js │ ├── index.js │ ├── node_modules │ │ └── minimist │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── example │ │ │ └── parse.js │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ ├── readme.markdown │ │ │ └── test │ │ │ ├── dash.js │ │ │ ├── default_bool.js │ │ │ ├── dotted.js │ │ │ ├── long.js │ │ │ ├── parse.js │ │ │ ├── parse_modified.js │ │ │ ├── short.js │ │ │ └── whitespace.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── chmod.js │ │ ├── clobber.js │ │ ├── mkdirp.js │ │ ├── opts_fs.js │ │ ├── opts_fs_sync.js │ │ ├── perm.js │ │ ├── perm_sync.js │ │ ├── race.js │ │ ├── rel.js │ │ ├── return.js │ │ ├── return_sync.js │ │ ├── root.js │ │ ├── sync.js │ │ ├── umask.js │ │ └── umask_sync.js ├── nacl-stream │ ├── .npmignore │ ├── README.md │ ├── nacl-stream.js │ ├── nacl-stream.min.js │ └── package.json ├── once │ ├── LICENSE │ ├── README.md │ ├── once.js │ └── package.json ├── path-is-absolute │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── pempal │ ├── .npmignore │ ├── README.md │ ├── favicon.ico │ ├── index.js │ ├── package.json │ └── test.js ├── progress │ ├── .npmignore │ ├── LICENSE │ ├── Makefile │ ├── Readme.md │ ├── index.js │ ├── lib │ │ └── node-progress.js │ └── package.json ├── rimraf │ ├── LICENSE │ ├── README.md │ ├── bin.js │ ├── package.json │ └── rimraf.js ├── tar │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── extracter.js │ │ ├── packer.js │ │ └── reader.js │ ├── lib │ │ ├── buffer-entry.js │ │ ├── entry-writer.js │ │ ├── entry.js │ │ ├── extended-header-writer.js │ │ ├── extended-header.js │ │ ├── extract.js │ │ ├── global-header-writer.js │ │ ├── header.js │ │ ├── pack.js │ │ └── parse.js │ ├── package.json │ ├── tar.js │ └── test │ │ ├── 00-setup-fixtures.js │ │ ├── cb-never-called-1.0.1.tgz │ │ ├── dir-normalization.js │ │ ├── dir-normalization.tar │ │ ├── error-on-broken.js │ │ ├── extract-move.js │ │ ├── extract.js │ │ ├── fixtures.tgz │ │ ├── header.js │ │ ├── pack-no-proprietary.js │ │ ├── pack.js │ │ ├── parse-discard.js │ │ ├── parse.js │ │ └── zz-cleanup.js ├── through │ ├── .travis.yml │ ├── LICENSE.APACHE2 │ ├── LICENSE.MIT │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── async.js │ │ ├── auto-destroy.js │ │ ├── buffering.js │ │ ├── end.js │ │ └── index.js ├── tweetnacl │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── nacl-fast.js │ ├── nacl-fast.min.js │ ├── nacl.js │ ├── nacl.min.js │ └── package.json └── wrappy │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── wrappy.js ├── package-lock.json ├── package.json ├── test └── test.js └── utils ├── a.js ├── createGist.js ├── fetchGist.js ├── headersFromArgs.js ├── loadPubkey.js ├── loadRecipients.js ├── loadWallet.js ├── makeNonce.js ├── printHeader.js ├── translateHeader.js └── writeHeader.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | node_modules/.bin/_mocha 3 | node_modules/.bin/jade 4 | node_modules/.bin/mocha 5 | node_modules/.bin/supports-color 6 | node_modules/debug/ 7 | node_modules/diff/ 8 | node_modules/escape-string-regexp/ 9 | node_modules/force-array/ 10 | node_modules/growl/ 11 | node_modules/is-array/ 12 | node_modules/jade/ 13 | node_modules/lru-cache/ 14 | node_modules/mocha/ 15 | node_modules/ms/ 16 | node_modules/sigmund/ 17 | node_modules/string/ 18 | node_modules/supports-color/ 19 | node_modules/suppose/ 20 | node_modules/to-iso-string/ 21 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/.bin/_mocha 2 | node_modules/.bin/jade 3 | node_modules/.bin/mocha 4 | node_modules/.bin/supports-color 5 | node_modules/debug/ 6 | node_modules/diff/ 7 | node_modules/escape-string-regexp/ 8 | node_modules/force-array/ 9 | node_modules/growl/ 10 | node_modules/is-array/ 11 | node_modules/jade/ 12 | node_modules/lru-cache/ 13 | node_modules/mocha/ 14 | node_modules/ms/ 15 | node_modules/sigmund/ 16 | node_modules/string/ 17 | node_modules/supports-color/ 18 | node_modules/suppose/ 19 | node_modules/to-iso-string/ -------------------------------------------------------------------------------- /bench/sigs.js: -------------------------------------------------------------------------------- 1 | var loadWallet = require('../utils/loadWallet') 2 | , crypto = require('crypto') 3 | , assert = require('assert') 4 | 5 | var wallet = require('path').join(process.env.HOME, '.salty') 6 | var nonce = 0 7 | loadWallet(wallet, function (err, wallet) { 8 | if (err) throw err 9 | var hash, sig, verify_result 10 | var start = new Date().getTime() 11 | var num_verified = 0 12 | ;(function doNext () { 13 | hash = crypto.createHash('sha256').update(String(nonce++)).digest() 14 | sig = wallet.sign(hash, true) 15 | verify_result = wallet.pubkey.verify(sig, hash) 16 | assert.deepEqual(verify_result, hash) 17 | num_verified++ 18 | setImmediate(doNext) 19 | })() 20 | 21 | function report () { 22 | var end = new Date().getTime() 23 | var seconds = Math.floor((end - start) / 1000) 24 | var per_sec = num_verified / seconds 25 | console.error('verified', num_verified, 'at', per_sec + '/sec') 26 | } 27 | 28 | setInterval(report, 5000) 29 | 30 | process.on('SIGINT', function () { 31 | report() 32 | process.exit() 33 | }) 34 | }) 35 | -------------------------------------------------------------------------------- /cli.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | decode: require('./cli/decode'), 3 | decrypt: require('./cli/decrypt'), 4 | encode: require('./cli/encode'), 5 | encrypt: require('./cli/encrypt'), 6 | id: require('./cli/id'), 7 | import: require('./cli/import'), 8 | init: require('./cli/init'), 9 | ls: require('./cli/ls'), 10 | restore: require('./cli/restore'), 11 | rm: require('./cli/rm'), 12 | save: require('./cli/save'), 13 | sign: require('./cli/sign'), 14 | verify: require('./cli/verify') 15 | } -------------------------------------------------------------------------------- /cli/decode.js: -------------------------------------------------------------------------------- 1 | var bs58 = require('bs58') 2 | , fs = require('fs') 3 | 4 | module.exports = function (inFile, options) { 5 | var inStream = inFile ? fs.createReadStream(inFile) : process.stdin 6 | var chunks = [] 7 | inStream.on('data', function (chunk) { 8 | chunks.push(chunk) 9 | }) 10 | inStream.once('end', function () { 11 | var str = Buffer.concat(chunks).toString('utf8').trim() 12 | var buf = Buffer.from(bs58.decode(str)) 13 | process.stdout.write(buf) 14 | }) 15 | } -------------------------------------------------------------------------------- /cli/encode.js: -------------------------------------------------------------------------------- 1 | var bs58 = require('bs58') 2 | , fs = require('fs') 3 | 4 | module.exports = function (inFile, options) { 5 | var inStream = inFile ? fs.createReadStream(inFile) : process.stdin 6 | var chunks = [] 7 | inStream.on('data', function (chunk) { 8 | chunks.push(chunk) 9 | }) 10 | inStream.once('end', function () { 11 | var buf = Buffer.concat(chunks) 12 | process.stdout.write(bs58.encode(buf)) 13 | }) 14 | } -------------------------------------------------------------------------------- /cli/id.js: -------------------------------------------------------------------------------- 1 | var loadPubkey = require('../utils/loadPubkey') 2 | 3 | module.exports = function (options) { 4 | var walletDir = options.parent.wallet 5 | loadPubkey(walletDir, function (err, pubkey) { 6 | if (err) throw err 7 | console.log(pubkey.toString()) 8 | }) 9 | } -------------------------------------------------------------------------------- /cli/ls.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path') 3 | 4 | module.exports = function (options) { 5 | var inPath = path.join(options.parent.wallet, 'imported_keys') 6 | try { 7 | var str = fs.readFileSync(inPath, {encoding: 'utf8'}) 8 | } 9 | catch (e) { 10 | return 11 | } 12 | console.log(str.trim()) 13 | } -------------------------------------------------------------------------------- /cli/restore.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path') 3 | , prompt = require('cli-prompt') 4 | , zlib = require('zlib') 5 | , tar = require('tar') 6 | , pempal = require('pempal') 7 | 8 | module.exports = function (inPath, outDir, options) { 9 | if (!inPath) inPath = 'salty.pem' 10 | inPath = path.resolve(inPath) 11 | if (!outDir) outDir = options.parent.wallet 12 | outDir = path.resolve(outDir) 13 | if (options.parent.force) return withCheck() 14 | try { 15 | fs.statSync(outDir) 16 | } 17 | catch (e) { 18 | if (e && e.code === 'ENOENT') return withCheck() 19 | throw e 20 | } 21 | throw new Error('Refusing to overwrite ' + outDir + '. Use --force to ignore this.') 22 | function withCheck () { 23 | var str = fs.readFileSync(inPath, {encoding: 'utf8'}) 24 | if (str.indexOf('4,ENCRYPTED') !== 1) { 25 | prompt.password('Enter passphrase: ', function (passphrase) { 26 | var parsedPem = pempal.decode(str, {tag: 'SALTY WALLET', passphrase: passphrase}) 27 | withParsed(parsedPem.body) 28 | }, function (err) { 29 | throw err 30 | }) 31 | } 32 | else { 33 | var parsedPem = pempal.decode(str, {tag: 'SALTY WALLET'}) 34 | withParsed(parsedPem.body) 35 | } 36 | } 37 | function withParsed (buf) { 38 | var extractStream = tar.Extract({path: outDir, mode: parseInt('0700', 8)}) 39 | var gunzipStream = zlib.createGunzip() 40 | extractStream.on('end', function () { 41 | /* 42 | require('child_process').exec('ls -la ' + outDir, function (err, stdout, stderr) { 43 | if (err) throw err 44 | console.error('after unpack', stdout) 45 | }) 46 | */ 47 | console.log('Restored to', outDir) 48 | }) 49 | gunzipStream.pipe(extractStream) 50 | gunzipStream.end(buf) 51 | } 52 | } -------------------------------------------------------------------------------- /cli/rm.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path') 3 | 4 | module.exports = function (input, options) { 5 | var walletDir = options.parent.wallet 6 | var inFile = path.join(walletDir, 'imported_keys') 7 | fs.readFile(inFile, {encoding: 'utf8'}, function (err, str) { 8 | if (err && err.code !== 'ENOENT') return cb(err) 9 | var lines = (str || '').trim().split('\n').filter(function (line) { 10 | return !!line.trim() 11 | }) 12 | var goodLines = [] 13 | lines.forEach(function (line) { 14 | try { 15 | var pubkey = libPubkey.parse(line.trim()) 16 | } 17 | catch (e) { 18 | return 19 | } 20 | if (pubkey.pubkey !== input && pubkey.email !== input.toLowerCase()) { 21 | goodLines.push(line) 22 | } 23 | }) 24 | fs.writeFile(inFile, goodLines.join('\n'), {mode: parseInt('0600', 8)}, function (err) { 25 | if (err) throw err 26 | console.log('Removed ' + (lines.length - goodLines.length) + ' key(s).') 27 | }) 28 | }) 29 | } -------------------------------------------------------------------------------- /lib.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | constants: require('./lib/constants'), 3 | decrypt: require('./lib/decrypt'), 4 | encrypt: require('./lib/encrypt'), 5 | ephemeral: require('./lib/ephemeral'), 6 | header: require('./lib/header'), 7 | pubkey: require('./lib/pubkey'), 8 | wallet: require('./lib/wallet'), 9 | makeNonce: require('./utils/makeNonce') 10 | } -------------------------------------------------------------------------------- /lib/constants.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | MAX_CHUNK: 655350, 3 | EPH_LENGTH: 80, 4 | ENC_LEN: 24, 5 | DEC_LEN: 8, 6 | PEM_MAX_SIZE: 10485760 7 | } -------------------------------------------------------------------------------- /node_modules/.bin/mkdirp: -------------------------------------------------------------------------------- 1 | ../mkdirp/bin/cmd.js -------------------------------------------------------------------------------- /node_modules/.bin/rimraf: -------------------------------------------------------------------------------- 1 | ../rimraf/bin.js -------------------------------------------------------------------------------- /node_modules/balanced-match/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .gitignore 3 | .travis.yml 4 | Makefile 5 | example.js 6 | -------------------------------------------------------------------------------- /node_modules/balanced-match/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT) 2 | 3 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | module.exports = balanced; 2 | function balanced(a, b, str) { 3 | if (a instanceof RegExp) a = maybeMatch(a, str); 4 | if (b instanceof RegExp) b = maybeMatch(b, str); 5 | 6 | var r = range(a, b, str); 7 | 8 | return r && { 9 | start: r[0], 10 | end: r[1], 11 | pre: str.slice(0, r[0]), 12 | body: str.slice(r[0] + a.length, r[1]), 13 | post: str.slice(r[1] + b.length) 14 | }; 15 | } 16 | 17 | function maybeMatch(reg, str) { 18 | var m = str.match(reg); 19 | return m ? m[0] : null; 20 | } 21 | 22 | balanced.range = range; 23 | function range(a, b, str) { 24 | var begs, beg, left, right, result; 25 | var ai = str.indexOf(a); 26 | var bi = str.indexOf(b, ai + 1); 27 | var i = ai; 28 | 29 | if (ai >= 0 && bi > 0) { 30 | begs = []; 31 | left = str.length; 32 | 33 | while (i < str.length && i >= 0 && ! result) { 34 | if (i == ai) { 35 | begs.push(i); 36 | ai = str.indexOf(a, i + 1); 37 | } else if (begs.length == 1) { 38 | result = [ begs.pop(), bi ]; 39 | } else { 40 | beg = begs.pop(); 41 | if (beg < left) { 42 | left = beg; 43 | right = bi; 44 | } 45 | 46 | bi = str.indexOf(b, i + 1); 47 | } 48 | 49 | i = ai < bi && ai >= 0 ? ai : bi; 50 | } 51 | 52 | if (begs.length) { 53 | result = [ left, right ]; 54 | } 55 | } 56 | 57 | return result; 58 | } 59 | -------------------------------------------------------------------------------- /node_modules/balanced-match/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "balanced-match@0.4.1", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "balanced-match@0.4.1", 9 | "_id": "balanced-match@0.4.1", 10 | "_inBundle": false, 11 | "_integrity": "sha1-GQU+LgdI6ts3nabAnUVc9eEDkzU=", 12 | "_location": "/balanced-match", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "balanced-match@0.4.1", 18 | "name": "balanced-match", 19 | "escapedName": "balanced-match", 20 | "rawSpec": "0.4.1", 21 | "saveSpec": null, 22 | "fetchSpec": "0.4.1" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz", 28 | "_spec": "0.4.1", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "Julian Gruber", 32 | "email": "mail@juliangruber.com", 33 | "url": "http://juliangruber.com" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/juliangruber/balanced-match/issues" 37 | }, 38 | "dependencies": {}, 39 | "description": "Match balanced character pairs, like \"{\" and \"}\"", 40 | "devDependencies": { 41 | "tape": "~4.5.0" 42 | }, 43 | "homepage": "https://github.com/juliangruber/balanced-match", 44 | "keywords": [ 45 | "match", 46 | "regexp", 47 | "test", 48 | "balanced", 49 | "parse" 50 | ], 51 | "license": "MIT", 52 | "main": "index.js", 53 | "name": "balanced-match", 54 | "repository": { 55 | "type": "git", 56 | "url": "git://github.com/juliangruber/balanced-match.git" 57 | }, 58 | "scripts": { 59 | "test": "make test" 60 | }, 61 | "testling": { 62 | "files": "test/*.js", 63 | "browsers": [ 64 | "ie/8..latest", 65 | "firefox/20..latest", 66 | "firefox/nightly", 67 | "chrome/25..latest", 68 | "chrome/canary", 69 | "opera/12..latest", 70 | "opera/next", 71 | "safari/5.1..latest", 72 | "ipad/6.0..latest", 73 | "iphone/6.0..latest", 74 | "android-browser/4.2..latest" 75 | ] 76 | }, 77 | "version": "0.4.1" 78 | } 79 | -------------------------------------------------------------------------------- /node_modules/base-x/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright base-x contributors (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/base-x/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "base-x@1.0.4", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "base-x@1.0.4", 9 | "_id": "base-x@1.0.4", 10 | "_inBundle": false, 11 | "_integrity": "sha1-MJsL9ubaM7dgeX17qDinowVHgng=", 12 | "_location": "/base-x", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "base-x@1.0.4", 18 | "name": "base-x", 19 | "escapedName": "base-x", 20 | "rawSpec": "1.0.4", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.4" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/base-x/-/base-x-1.0.4.tgz", 28 | "_spec": "1.0.4", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "Daniel Cousens" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/cryptocoinjs/base-x/issues" 35 | }, 36 | "description": "Fast base encoding / decoding of any given alphabet", 37 | "devDependencies": { 38 | "benchmark": "^2.0.0", 39 | "standard": "^5.4.1", 40 | "tape": "^4.5.1" 41 | }, 42 | "files": [ 43 | "index.js" 44 | ], 45 | "homepage": "https://github.com/cryptocoinjs/base-x", 46 | "keywords": [ 47 | "base-x", 48 | "base58", 49 | "base62", 50 | "base64", 51 | "crypto", 52 | "crytography", 53 | "decode", 54 | "decoding", 55 | "encode", 56 | "encoding" 57 | ], 58 | "license": "MIT", 59 | "main": "index.js", 60 | "name": "base-x", 61 | "repository": { 62 | "type": "git", 63 | "url": "git+https://github.com/cryptocoinjs/base-x.git" 64 | }, 65 | "scripts": { 66 | "benchmark:node": "node benchmark/benchmark.js", 67 | "standard": "standard", 68 | "test": "npm run unit && npm run standard", 69 | "unit": "tape test/*.js" 70 | }, 71 | "version": "1.0.4" 72 | } 73 | -------------------------------------------------------------------------------- /node_modules/block-stream/LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) Isaac Z. Schlueter 2 | All rights reserved. 3 | 4 | The BSD License 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /node_modules/block-stream/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/block-stream/README.md: -------------------------------------------------------------------------------- 1 | # block-stream 2 | 3 | A stream of blocks. 4 | 5 | Write data into it, and it'll output data in buffer blocks the size you 6 | specify, padding with zeroes if necessary. 7 | 8 | ```javascript 9 | var block = new BlockStream(512) 10 | fs.createReadStream("some-file").pipe(block) 11 | block.pipe(fs.createWriteStream("block-file")) 12 | ``` 13 | 14 | When `.end()` or `.flush()` is called, it'll pad the block with zeroes. 15 | -------------------------------------------------------------------------------- /node_modules/block-stream/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "block-stream@0.0.9", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "block-stream@0.0.9", 9 | "_id": "block-stream@0.0.9", 10 | "_inBundle": false, 11 | "_integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", 12 | "_location": "/block-stream", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "block-stream@0.0.9", 18 | "name": "block-stream", 19 | "escapedName": "block-stream", 20 | "rawSpec": "0.0.9", 21 | "saveSpec": null, 22 | "fetchSpec": "0.0.9" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/tar", 27 | "/tar-pack/tar" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", 30 | "_spec": "0.0.9", 31 | "_where": "/Users/carlos8f/projects/salty", 32 | "author": { 33 | "name": "Isaac Z. Schlueter", 34 | "email": "i@izs.me", 35 | "url": "http://blog.izs.me/" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/isaacs/block-stream/issues" 39 | }, 40 | "dependencies": { 41 | "inherits": "~2.0.0" 42 | }, 43 | "description": "a stream of blocks", 44 | "devDependencies": { 45 | "tap": "^5.7.1" 46 | }, 47 | "engines": { 48 | "node": "0.4 || >=0.5.8" 49 | }, 50 | "files": [ 51 | "block-stream.js" 52 | ], 53 | "homepage": "https://github.com/isaacs/block-stream#readme", 54 | "license": "ISC", 55 | "main": "block-stream.js", 56 | "name": "block-stream", 57 | "repository": { 58 | "type": "git", 59 | "url": "git://github.com/isaacs/block-stream.git" 60 | }, 61 | "scripts": { 62 | "test": "tap test/*.js --cov" 63 | }, 64 | "version": "0.0.9" 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/bs58/README.md: -------------------------------------------------------------------------------- 1 | bs58 2 | ==== 3 | 4 | [![build status](https://travis-ci.org/cryptocoinjs/bs58.svg)](https://travis-ci.org/cryptocoinjs/bs58) 5 | 6 | JavaScript component to compute base 58 encoding. This encoding is typically used for crypto currencies such as Bitcoin. 7 | 8 | **Note:** If you're looking for **base 58 check** encoding, see: [https://github.com/bitcoinjs/bs58check](https://github.com/bitcoinjs/bs58check), which depends upon this library. 9 | 10 | 11 | Install 12 | ------- 13 | 14 | npm i --save bs58 15 | 16 | 17 | API 18 | --- 19 | 20 | ### encode(input) 21 | 22 | `input` must be a [Buffer](https://nodejs.org/api/buffer.html) or an `Array`. It returns a `string`. 23 | 24 | **example**: 25 | 26 | ```js 27 | const bs58 = require('bs58') 28 | 29 | const bytes = Buffer.from('003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', 'hex') 30 | const address = bs58.encode(bytes) 31 | console.log(address) 32 | // => 16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS 33 | ``` 34 | 35 | 36 | ### decode(input) 37 | 38 | `input` must be a base 58 encoded string. Returns a [Buffer](https://nodejs.org/api/buffer.html). 39 | 40 | **example**: 41 | 42 | ```js 43 | const bs58 = require('bs58') 44 | 45 | const address = '16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS' 46 | const bytes = bs58.decode(address) 47 | console.log(out.toString('hex')) 48 | // => 003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187 49 | ``` 50 | 51 | Hack / Test 52 | ----------- 53 | 54 | Uses JavaScript standard style. Read more: 55 | 56 | [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) 57 | 58 | 59 | Credits 60 | ------- 61 | - [Mike Hearn](https://github.com/mikehearn) for original Java implementation 62 | - [Stefan Thomas](https://github.com/justmoon) for porting to JavaScript 63 | - [Stephan Pair](https://github.com/gasteve) for buffer improvements 64 | - [Daniel Cousens](https://github.com/dcousens) for cleanup and merging improvements from bitcoinjs-lib 65 | - [Jared Deckard](https://github.com/deckar01) for killing `bigi` as a dependency 66 | 67 | 68 | License 69 | ------- 70 | 71 | MIT 72 | -------------------------------------------------------------------------------- /node_modules/bs58/index.js: -------------------------------------------------------------------------------- 1 | var basex = require('base-x') 2 | var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' 3 | 4 | module.exports = basex(ALPHABET) 5 | -------------------------------------------------------------------------------- /node_modules/bs58/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "bs58@4.0.1", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "bs58@4.0.1", 9 | "_id": "bs58@4.0.1", 10 | "_inBundle": false, 11 | "_integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", 12 | "_location": "/bs58", 13 | "_phantomChildren": { 14 | "safe-buffer": "5.1.2" 15 | }, 16 | "_requested": { 17 | "type": "version", 18 | "registry": true, 19 | "raw": "bs58@4.0.1", 20 | "name": "bs58", 21 | "escapedName": "bs58", 22 | "rawSpec": "4.0.1", 23 | "saveSpec": null, 24 | "fetchSpec": "4.0.1" 25 | }, 26 | "_requiredBy": [ 27 | "/" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 30 | "_spec": "4.0.1", 31 | "_where": "/Users/carlos8f/projects/salty", 32 | "bugs": { 33 | "url": "https://github.com/cryptocoinjs/bs58/issues" 34 | }, 35 | "dependencies": { 36 | "base-x": "^3.0.2" 37 | }, 38 | "description": "Base 58 encoding / decoding", 39 | "devDependencies": { 40 | "standard": "*", 41 | "tape": "^4.6.3" 42 | }, 43 | "files": [ 44 | "./index.js" 45 | ], 46 | "homepage": "https://github.com/cryptocoinjs/bs58#readme", 47 | "keywords": [ 48 | "base58", 49 | "bitcoin", 50 | "crypto", 51 | "crytography", 52 | "decode", 53 | "decoding", 54 | "encode", 55 | "encoding", 56 | "litecoin" 57 | ], 58 | "license": "MIT", 59 | "main": "./index.js", 60 | "name": "bs58", 61 | "repository": { 62 | "url": "git+https://github.com/cryptocoinjs/bs58.git", 63 | "type": "git" 64 | }, 65 | "scripts": { 66 | "standard": "standard", 67 | "test": "npm run standard && npm run unit", 68 | "unit": "tape test/index.js" 69 | }, 70 | "version": "4.0.1" 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - '0.10' 5 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | @./node_modules/.bin/mocha \ 3 | --reporter spec \ 4 | --require test/common.js \ 5 | --bail 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/cli-prompt/examples/multi.js: -------------------------------------------------------------------------------- 1 | var prompt = require('../'); 2 | 3 | prompt.multi([ 4 | { 5 | key: 'username', 6 | default: 'john_doe' 7 | }, 8 | { 9 | label: 'password (must be at least 5 characters)', 10 | key: 'password', 11 | type: 'password', 12 | validate: function (val) { 13 | if (val.length < 5) throw new Error('password must be at least 5 characters long'); 14 | } 15 | }, 16 | { 17 | label: 'number of pets', 18 | key: 'pets', 19 | type: 'number', 20 | default: function () { 21 | return this.password.length; 22 | } 23 | }, 24 | { 25 | label: 'is this ok?', 26 | type: 'boolean' 27 | } 28 | ], console.log); 29 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/examples/name.js: -------------------------------------------------------------------------------- 1 | var prompt = require('../'); 2 | 3 | prompt('enter your first name: ', function (val) { 4 | var first = val; 5 | prompt('and your last name: ', function (val) { 6 | console.log('hi, ' + first + ' ' + val + '!'); 7 | }, function (err) { 8 | console.error('unable to read last name: ' + err); 9 | }); 10 | }, function (err) { 11 | console.error('unable to read first name: ' + err); 12 | }); 13 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/examples/password.js: -------------------------------------------------------------------------------- 1 | var prompt = require('../'); 2 | 3 | prompt.password('tell me a secret: ', function (val) { 4 | console.log(val); 5 | }); 6 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "cli-prompt@0.6.0", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "cli-prompt@0.6.0", 9 | "_id": "cli-prompt@0.6.0", 10 | "_inBundle": false, 11 | "_integrity": "sha1-NmaZ3qnIGL5uDoNMM7AtFNjDaW8=", 12 | "_location": "/cli-prompt", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "cli-prompt@0.6.0", 18 | "name": "cli-prompt", 19 | "escapedName": "cli-prompt", 20 | "rawSpec": "0.6.0", 21 | "saveSpec": null, 22 | "fetchSpec": "0.6.0" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/cli-prompt/-/cli-prompt-0.6.0.tgz", 28 | "_spec": "0.6.0", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "Carlos Rodriguez", 32 | "email": "carlos@s8f.org", 33 | "url": "http://s8f.org/" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/carlos8f/node-cli-prompt/issues" 37 | }, 38 | "dependencies": { 39 | "keypress": "~0.2.1" 40 | }, 41 | "description": "A tiny CLI prompter", 42 | "devDependencies": { 43 | "mocha": "*", 44 | "suppose": "git+https://github.com/carlos8f/node-suppose.git" 45 | }, 46 | "homepage": "https://github.com/carlos8f/node-cli-prompt", 47 | "keywords": [ 48 | "prompt", 49 | "cli", 50 | "readline", 51 | "input", 52 | "terminal", 53 | "console", 54 | "wizard" 55 | ], 56 | "license": "MIT", 57 | "name": "cli-prompt", 58 | "repository": { 59 | "type": "git", 60 | "url": "git://github.com/carlos8f/node-cli-prompt.git" 61 | }, 62 | "scripts": { 63 | "test": "make test" 64 | }, 65 | "version": "0.6.0" 66 | } 67 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/test/basic.js: -------------------------------------------------------------------------------- 1 | describe('basic test', function () { 2 | it('works', function (done) { 3 | suppose('node', [resolve(__dirname, '../examples/name.js')]) 4 | .when('enter your first name: ').respond('carliz\b\bos 8\n') 5 | .when('and your last name: ').respond('rodriguez\n') 6 | .when('hi, carlos 8 rodriguez!\n').respond("'sup!") 7 | .on('error', assert.ifError) 8 | .end(function (code) { 9 | assert(!code); 10 | done(); 11 | }); 12 | }); 13 | 14 | it('calls onError for premature end', function (done) { 15 | var gotError = false; 16 | var chunks = [] 17 | suppose('node', [resolve(__dirname, '../examples/name.js')]) 18 | // Output to stderr is wrapped into an Error 19 | .end(function (code) { 20 | assert(!code); 21 | var stderr = Buffer.concat(chunks).toString('utf8') 22 | assert(stderr.match(/unable to read first name: Error: stdin has ended\n/)) 23 | done(); 24 | }) 25 | .stderr.on('data', function (chunk) { 26 | chunks.push(chunk) 27 | }) 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/test/common.js: -------------------------------------------------------------------------------- 1 | assert = require('assert'); 2 | util = require('util'); 3 | resolve = require('path').resolve; 4 | fs = require('fs'); 5 | prompt = require('../'); 6 | suppose = require('suppose'); 7 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/test/multi.js: -------------------------------------------------------------------------------- 1 | describe('multi', function () { 2 | it('works', function (done) { 3 | var options = { 4 | //optional writeable output stream 5 | //debug: fs.createWriteStream('/tmp/debug.txt') 6 | }; 7 | suppose('node', [resolve(__dirname, '../examples/multi.js')], options) 8 | .when('username: (john_doe) ').respond('\n') 9 | .when('password (must be at least 5 characters): ').respond('asdfff\b\b\n') 10 | .when('password must be at least 5 characters long\npassword (must be at least 5 characters): ').respond('asdfff\n') 11 | .when('number of pets: (6) ').respond('eight\n') 12 | .when('number of pets: (6) ').respond('8\n') 13 | .when('is this ok?: (y/n) ').respond('okay\n') 14 | .when('is this ok?: (y/n) ').respond('yes\n') 15 | .when("{ username: 'john_doe', password: 'asdfff', pets: 8 }\n").respond('great') 16 | .on('error', assert.ifError) 17 | .end(function (code) { 18 | assert(!code); 19 | done(); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/test/password.js: -------------------------------------------------------------------------------- 1 | describe('password', function () { 2 | it('works', function (done) { 3 | var options = { 4 | //optional writeable output stream 5 | //debug: fs.createWriteStream('/tmp/debug.txt') 6 | }; 7 | suppose('node', [resolve(__dirname, '../examples/password.js')], options) 8 | .when('tell me a secret: ').respond('earthworn\bm jim\n') 9 | .when('earthworm jim\n').respond('hey') 10 | .on('error', assert.ifError) 11 | .end(function (code) { 12 | assert(!code); 13 | done(); 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /node_modules/cli-prompt/test/windows.js: -------------------------------------------------------------------------------- 1 | describe('windows CRLF', function () { 2 | it('works', function (done) { 3 | suppose('node', [resolve(__dirname, '../examples/name.js')]) 4 | .when('enter your first name: ').respond('carlos\r\n') 5 | .when('and your last name: ').respond('rodriguez\r\n') 6 | .when('hi, carlos rodriguez!\n').respond("'sup!") 7 | .on('error', assert.ifError) 8 | .end(function (code) { 9 | assert(!code); 10 | done(); 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /node_modules/commander/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/README.md: -------------------------------------------------------------------------------- 1 | # fs.realpath 2 | 3 | A backwards-compatible fs.realpath for Node v6 and above 4 | 5 | In Node v6, the JavaScript implementation of fs.realpath was replaced 6 | with a faster (but less resilient) native implementation. That raises 7 | new and platform-specific errors and cannot handle long or excessively 8 | symlink-looping paths. 9 | 10 | This module handles those cases by detecting the new errors and 11 | falling back to the JavaScript implementation. On versions of Node 12 | prior to v6, it has no effect. 13 | 14 | ## USAGE 15 | 16 | ```js 17 | var rp = require('fs.realpath') 18 | 19 | // async version 20 | rp.realpath(someLongAndLoopingPath, function (er, real) { 21 | // the ELOOP was handled, but it was a bit slower 22 | }) 23 | 24 | // sync version 25 | var real = rp.realpathSync(someLongAndLoopingPath) 26 | 27 | // monkeypatch at your own risk! 28 | // This replaces the fs.realpath/fs.realpathSync builtins 29 | rp.monkeypatch() 30 | 31 | // un-do the monkeypatching 32 | rp.unmonkeypatch() 33 | ``` 34 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/index.js: -------------------------------------------------------------------------------- 1 | module.exports = realpath 2 | realpath.realpath = realpath 3 | realpath.sync = realpathSync 4 | realpath.realpathSync = realpathSync 5 | realpath.monkeypatch = monkeypatch 6 | realpath.unmonkeypatch = unmonkeypatch 7 | 8 | var fs = require('fs') 9 | var origRealpath = fs.realpath 10 | var origRealpathSync = fs.realpathSync 11 | 12 | var version = process.version 13 | var ok = /^v[0-5]\./.test(version) 14 | var old = require('./old.js') 15 | 16 | function newError (er) { 17 | return er && er.syscall === 'realpath' && ( 18 | er.code === 'ELOOP' || 19 | er.code === 'ENOMEM' || 20 | er.code === 'ENAMETOOLONG' 21 | ) 22 | } 23 | 24 | function realpath (p, cache, cb) { 25 | if (ok) { 26 | return origRealpath(p, cache, cb) 27 | } 28 | 29 | if (typeof cache === 'function') { 30 | cb = cache 31 | cache = null 32 | } 33 | origRealpath(p, cache, function (er, result) { 34 | if (newError(er)) { 35 | old.realpath(p, cache, cb) 36 | } else { 37 | cb(er, result) 38 | } 39 | }) 40 | } 41 | 42 | function realpathSync (p, cache) { 43 | if (ok) { 44 | return origRealpathSync(p, cache) 45 | } 46 | 47 | try { 48 | return origRealpathSync(p, cache) 49 | } catch (er) { 50 | if (newError(er)) { 51 | return old.realpathSync(p, cache) 52 | } else { 53 | throw er 54 | } 55 | } 56 | } 57 | 58 | function monkeypatch () { 59 | fs.realpath = realpath 60 | fs.realpathSync = realpathSync 61 | } 62 | 63 | function unmonkeypatch () { 64 | fs.realpath = origRealpath 65 | fs.realpathSync = origRealpathSync 66 | } 67 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "fs.realpath@1.0.0", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "fs.realpath@1.0.0", 9 | "_id": "fs.realpath@1.0.0", 10 | "_inBundle": false, 11 | "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 12 | "_location": "/fs.realpath", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "fs.realpath@1.0.0", 18 | "name": "fs.realpath", 19 | "escapedName": "fs.realpath", 20 | "rawSpec": "1.0.0", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.0" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/glob", 27 | "/mocha/glob" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 30 | "_spec": "1.0.0", 31 | "_where": "/Users/carlos8f/projects/salty", 32 | "author": { 33 | "name": "Isaac Z. Schlueter", 34 | "email": "i@izs.me", 35 | "url": "http://blog.izs.me/" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/isaacs/fs.realpath/issues" 39 | }, 40 | "dependencies": {}, 41 | "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", 42 | "devDependencies": {}, 43 | "files": [ 44 | "old.js", 45 | "index.js" 46 | ], 47 | "homepage": "https://github.com/isaacs/fs.realpath#readme", 48 | "keywords": [ 49 | "realpath", 50 | "fs", 51 | "polyfill" 52 | ], 53 | "license": "ISC", 54 | "main": "index.js", 55 | "name": "fs.realpath", 56 | "repository": { 57 | "type": "git", 58 | "url": "git+https://github.com/isaacs/fs.realpath.git" 59 | }, 60 | "scripts": { 61 | "test": "tap test/*.js --cov" 62 | }, 63 | "version": "1.0.0" 64 | } 65 | -------------------------------------------------------------------------------- /node_modules/fstream/.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | node_modules/ 3 | examples/deep-copy/ 4 | examples/path/ 5 | examples/filter-copy/ 6 | -------------------------------------------------------------------------------- /node_modules/fstream/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | - "4" 5 | - "0.10" 6 | - "0.12" 7 | before_install: 8 | - "npm config set spin false" 9 | - "npm install -g npm/npm" 10 | -------------------------------------------------------------------------------- /node_modules/fstream/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/fstream/examples/reader.js: -------------------------------------------------------------------------------- 1 | var fstream = require('../fstream.js') 2 | var tap = require('tap') 3 | var fs = require('fs') 4 | var path = require('path') 5 | var dir = path.dirname(__dirname) 6 | 7 | tap.test('reader test', function (t) { 8 | var children = -1 9 | var gotReady = false 10 | var ended = false 11 | 12 | var r = fstream.Reader({ 13 | path: dir, 14 | filter: function () { 15 | // return this.parent === r 16 | return this.parent === r || this === r 17 | } 18 | }) 19 | 20 | r.on('ready', function () { 21 | gotReady = true 22 | children = fs.readdirSync(dir).length 23 | console.error('Setting expected children to ' + children) 24 | t.equal(r.type, 'Directory', 'should be a directory') 25 | }) 26 | 27 | r.on('entry', function (entry) { 28 | children-- 29 | if (!gotReady) { 30 | t.fail('children before ready!') 31 | } 32 | t.equal(entry.dirname, r.path, 'basename is parent dir') 33 | }) 34 | 35 | r.on('error', function (er) { 36 | t.fail(er) 37 | t.end() 38 | process.exit(1) 39 | }) 40 | 41 | r.on('end', function () { 42 | t.equal(children, 0, 'should have seen all children') 43 | ended = true 44 | }) 45 | 46 | var closed = false 47 | r.on('close', function () { 48 | t.ok(ended, 'saw end before close') 49 | t.notOk(closed, 'close should only happen once') 50 | closed = true 51 | t.end() 52 | }) 53 | }) 54 | 55 | tap.test('reader error test', function (t) { 56 | // assumes non-root on a *nix system 57 | var r = fstream.Reader({ path: '/etc/shadow' }) 58 | 59 | r.once('error', function (er) { 60 | t.ok(true) 61 | t.end() 62 | }) 63 | 64 | r.on('end', function () { 65 | t.fail('reader ended without error') 66 | t.end() 67 | }) 68 | }) 69 | -------------------------------------------------------------------------------- /node_modules/fstream/examples/symlink-write.js: -------------------------------------------------------------------------------- 1 | var fstream = require('../fstream.js') 2 | var notOpen = false 3 | process.chdir(__dirname) 4 | 5 | fstream 6 | .Writer({ 7 | path: 'path/to/symlink', 8 | linkpath: './file', 9 | isSymbolicLink: true, 10 | mode: '0755' // octal strings supported 11 | }) 12 | .on('close', function () { 13 | notOpen = true 14 | var fs = require('fs') 15 | var s = fs.lstatSync('path/to/symlink') 16 | var isSym = s.isSymbolicLink() 17 | console.log((isSym ? '' : 'not ') + 'ok 1 should be symlink') 18 | var t = fs.readlinkSync('path/to/symlink') 19 | var isTarget = t === './file' 20 | console.log((isTarget ? '' : 'not ') + 'ok 2 should link to ./file') 21 | }) 22 | .end() 23 | 24 | process.on('exit', function () { 25 | console.log((notOpen ? '' : 'not ') + 'ok 3 should be closed') 26 | console.log('1..3') 27 | }) 28 | -------------------------------------------------------------------------------- /node_modules/fstream/fstream.js: -------------------------------------------------------------------------------- 1 | exports.Abstract = require('./lib/abstract.js') 2 | exports.Reader = require('./lib/reader.js') 3 | exports.Writer = require('./lib/writer.js') 4 | 5 | exports.File = { 6 | Reader: require('./lib/file-reader.js'), 7 | Writer: require('./lib/file-writer.js') 8 | } 9 | 10 | exports.Dir = { 11 | Reader: require('./lib/dir-reader.js'), 12 | Writer: require('./lib/dir-writer.js') 13 | } 14 | 15 | exports.Link = { 16 | Reader: require('./lib/link-reader.js'), 17 | Writer: require('./lib/link-writer.js') 18 | } 19 | 20 | exports.Proxy = { 21 | Reader: require('./lib/proxy-reader.js'), 22 | Writer: require('./lib/proxy-writer.js') 23 | } 24 | 25 | exports.Reader.Dir = exports.DirReader = exports.Dir.Reader 26 | exports.Reader.File = exports.FileReader = exports.File.Reader 27 | exports.Reader.Link = exports.LinkReader = exports.Link.Reader 28 | exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader 29 | 30 | exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer 31 | exports.Writer.File = exports.FileWriter = exports.File.Writer 32 | exports.Writer.Link = exports.LinkWriter = exports.Link.Writer 33 | exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer 34 | 35 | exports.collect = require('./lib/collect.js') 36 | -------------------------------------------------------------------------------- /node_modules/fstream/lib/collect.js: -------------------------------------------------------------------------------- 1 | module.exports = collect 2 | 3 | function collect (stream) { 4 | if (stream._collected) return 5 | 6 | if (stream._paused) return stream.on('resume', collect.bind(null, stream)) 7 | 8 | stream._collected = true 9 | stream.pause() 10 | 11 | stream.on('data', save) 12 | stream.on('end', save) 13 | var buf = [] 14 | function save (b) { 15 | if (typeof b === 'string') b = new Buffer(b) 16 | if (Buffer.isBuffer(b) && !b.length) return 17 | buf.push(b) 18 | } 19 | 20 | stream.on('entry', saveEntry) 21 | var entryBuffer = [] 22 | function saveEntry (e) { 23 | collect(e) 24 | entryBuffer.push(e) 25 | } 26 | 27 | stream.on('proxy', proxyPause) 28 | function proxyPause (p) { 29 | p.pause() 30 | } 31 | 32 | // replace the pipe method with a new version that will 33 | // unlock the buffered stuff. if you just call .pipe() 34 | // without a destination, then it'll re-play the events. 35 | stream.pipe = (function (orig) { 36 | return function (dest) { 37 | // console.error(' === open the pipes', dest && dest.path) 38 | 39 | // let the entries flow through one at a time. 40 | // Once they're all done, then we can resume completely. 41 | var e = 0 42 | ;(function unblockEntry () { 43 | var entry = entryBuffer[e++] 44 | // console.error(" ==== unblock entry", entry && entry.path) 45 | if (!entry) return resume() 46 | entry.on('end', unblockEntry) 47 | if (dest) dest.add(entry) 48 | else stream.emit('entry', entry) 49 | })() 50 | 51 | function resume () { 52 | stream.removeListener('entry', saveEntry) 53 | stream.removeListener('data', save) 54 | stream.removeListener('end', save) 55 | 56 | stream.pipe = orig 57 | if (dest) stream.pipe(dest) 58 | 59 | buf.forEach(function (b) { 60 | if (b) stream.emit('data', b) 61 | else stream.emit('end') 62 | }) 63 | 64 | stream.resume() 65 | } 66 | 67 | return dest 68 | } 69 | })(stream.pipe) 70 | } 71 | -------------------------------------------------------------------------------- /node_modules/fstream/lib/get-type.js: -------------------------------------------------------------------------------- 1 | module.exports = getType 2 | 3 | function getType (st) { 4 | var types = [ 5 | 'Directory', 6 | 'File', 7 | 'SymbolicLink', 8 | 'Link', // special for hardlinks from tarballs 9 | 'BlockDevice', 10 | 'CharacterDevice', 11 | 'FIFO', 12 | 'Socket' 13 | ] 14 | var type 15 | 16 | if (st.type && types.indexOf(st.type) !== -1) { 17 | st[st.type] = true 18 | return st.type 19 | } 20 | 21 | for (var i = 0, l = types.length; i < l; i++) { 22 | type = types[i] 23 | var is = st[type] || st['is' + type] 24 | if (typeof is === 'function') is = is.call(st) 25 | if (is) { 26 | st[type] = true 27 | st.type = type 28 | return type 29 | } 30 | } 31 | 32 | return null 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/fstream/lib/link-reader.js: -------------------------------------------------------------------------------- 1 | // Basically just a wrapper around an fs.readlink 2 | // 3 | // XXX: Enhance this to support the Link type, by keeping 4 | // a lookup table of {:}, so that hardlinks 5 | // can be preserved in tarballs. 6 | 7 | module.exports = LinkReader 8 | 9 | var fs = require('graceful-fs') 10 | var inherits = require('inherits') 11 | var Reader = require('./reader.js') 12 | 13 | inherits(LinkReader, Reader) 14 | 15 | function LinkReader (props) { 16 | var self = this 17 | if (!(self instanceof LinkReader)) { 18 | throw new Error('LinkReader must be called as constructor.') 19 | } 20 | 21 | if (!((props.type === 'Link' && props.Link) || 22 | (props.type === 'SymbolicLink' && props.SymbolicLink))) { 23 | throw new Error('Non-link type ' + props.type) 24 | } 25 | 26 | Reader.call(self, props) 27 | } 28 | 29 | // When piping a LinkReader into a LinkWriter, we have to 30 | // already have the linkpath property set, so that has to 31 | // happen *before* the "ready" event, which means we need to 32 | // override the _stat method. 33 | LinkReader.prototype._stat = function (currentStat) { 34 | var self = this 35 | fs.readlink(self._path, function (er, linkpath) { 36 | if (er) return self.error(er) 37 | self.linkpath = self.props.linkpath = linkpath 38 | self.emit('linkpath', linkpath) 39 | Reader.prototype._stat.call(self, currentStat) 40 | }) 41 | } 42 | 43 | LinkReader.prototype._read = function () { 44 | var self = this 45 | if (self._paused) return 46 | // basically just a no-op, since we got all the info we need 47 | // from the _stat method 48 | if (!self._ended) { 49 | self.emit('end') 50 | self.emit('close') 51 | self._ended = true 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /node_modules/fstream/lib/socket-reader.js: -------------------------------------------------------------------------------- 1 | // Just get the stats, and then don't do anything. 2 | // You can't really "read" from a socket. You "connect" to it. 3 | // Mostly, this is here so that reading a dir with a socket in it 4 | // doesn't blow up. 5 | 6 | module.exports = SocketReader 7 | 8 | var inherits = require('inherits') 9 | var Reader = require('./reader.js') 10 | 11 | inherits(SocketReader, Reader) 12 | 13 | function SocketReader (props) { 14 | var self = this 15 | if (!(self instanceof SocketReader)) { 16 | throw new Error('SocketReader must be called as constructor.') 17 | } 18 | 19 | if (!(props.type === 'Socket' && props.Socket)) { 20 | throw new Error('Non-socket type ' + props.type) 21 | } 22 | 23 | Reader.call(self, props) 24 | } 25 | 26 | SocketReader.prototype._read = function () { 27 | var self = this 28 | if (self._paused) return 29 | // basically just a no-op, since we got all the info we have 30 | // from the _stat method 31 | if (!self._ended) { 32 | self.emit('end') 33 | self.emit('close') 34 | self._ended = true 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/fstream/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "fstream@1.0.11", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "fstream@1.0.11", 9 | "_id": "fstream@1.0.11", 10 | "_inBundle": false, 11 | "_integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", 12 | "_location": "/fstream", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "fstream@1.0.11", 18 | "name": "fstream", 19 | "escapedName": "fstream", 20 | "rawSpec": "1.0.11", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.11" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/fstream-ignore", 27 | "/tar", 28 | "/tar-pack", 29 | "/tar-pack/tar" 30 | ], 31 | "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", 32 | "_spec": "1.0.11", 33 | "_where": "/Users/carlos8f/projects/salty", 34 | "author": { 35 | "name": "Isaac Z. Schlueter", 36 | "email": "i@izs.me", 37 | "url": "http://blog.izs.me/" 38 | }, 39 | "bugs": { 40 | "url": "https://github.com/npm/fstream/issues" 41 | }, 42 | "dependencies": { 43 | "graceful-fs": "^4.1.2", 44 | "inherits": "~2.0.0", 45 | "mkdirp": ">=0.5 0", 46 | "rimraf": "2" 47 | }, 48 | "description": "Advanced file system stream things", 49 | "devDependencies": { 50 | "standard": "^4.0.0", 51 | "tap": "^1.2.0" 52 | }, 53 | "engines": { 54 | "node": ">=0.6" 55 | }, 56 | "homepage": "https://github.com/npm/fstream#readme", 57 | "license": "ISC", 58 | "main": "fstream.js", 59 | "name": "fstream", 60 | "repository": { 61 | "type": "git", 62 | "url": "git+https://github.com/npm/fstream.git" 63 | }, 64 | "scripts": { 65 | "test": "standard && tap examples/*.js" 66 | }, 67 | "version": "1.0.11" 68 | } 69 | -------------------------------------------------------------------------------- /node_modules/generic-pool/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": "standard", 3 | "plugins": [ 4 | "standard" 5 | ] 6 | }; -------------------------------------------------------------------------------- /node_modules/generic-pool/.npmignore: -------------------------------------------------------------------------------- 1 | fabfile.pyc 2 | node-pool.iml 3 | node-pool.tmproj 4 | node_modules 5 | -------------------------------------------------------------------------------- /node_modules/generic-pool/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.6" 4 | - "0.8" 5 | - "0.10" 6 | - "0.12" 7 | - "4" 8 | - "5" 9 | 10 | install: 11 | - make install 12 | - make lint-install 13 | 14 | script: 15 | - make lint 16 | - make test 17 | 18 | sudo: false 19 | 20 | matrix: 21 | fast_finish: true 22 | -------------------------------------------------------------------------------- /node_modules/generic-pool/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean install check test lint-install lint 2 | 3 | INCOMPATIBLE_ESLINT_VERSIONS=$(shell node --version | egrep 'v0.[2-9]' | cut -d '.' -f 1-2) 4 | 5 | all: 6 | 7 | clean: 8 | rm -rf node_modules 9 | 10 | install: 11 | npm install 12 | 13 | check: 14 | npm test 15 | 16 | test: 17 | npm test 18 | 19 | lint-install: 20 | ifeq ($(INCOMPATIBLE_ESLINT_VERSIONS),) 21 | npm run lint-install 22 | else 23 | @echo "Lint not available on $(INCOMPATIBLE_ESLINT_VERSIONS)" 24 | endif 25 | 26 | lint: 27 | ifeq ($(INCOMPATIBLE_ESLINT_VERSIONS),) 28 | npm run lint 29 | else 30 | @echo "Lint not available on $(INCOMPATIBLE_ESLINT_VERSIONS)" 31 | endif 32 | -------------------------------------------------------------------------------- /node_modules/generic-pool/fabfile.py: -------------------------------------------------------------------------------- 1 | # 2 | # dependencies: 3 | # fabric (apt-get install fabric) 4 | # node-jslint (http://github.com/reid/node-jslint) 5 | # expresso (or replace with whatever node.js test tool you're using) 6 | # 7 | 8 | from fabric.api import local 9 | import os, os.path 10 | 11 | def test(): 12 | local('expresso -I lib test/*', capture=False) 13 | 14 | def jslint(): 15 | ignore = [ "/lib-cov/" ] 16 | for root, subFolders, files in os.walk("."): 17 | for file in files: 18 | if file.endswith(".js"): 19 | filename = os.path.join(root,file) 20 | processFile = True 21 | for i in ignore: 22 | if filename.find(i) != -1: 23 | processFile = False 24 | if processFile: 25 | print filename 26 | local('jslint %s' % filename, capture=False) 27 | 28 | -------------------------------------------------------------------------------- /node_modules/glob/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/glob/changelog.md: -------------------------------------------------------------------------------- 1 | ## 7.0 2 | 3 | - Raise error if `options.cwd` is specified, and not a directory 4 | 5 | ## 6.0 6 | 7 | - Remove comment and negation pattern support 8 | - Ignore patterns are always in `dot:true` mode 9 | 10 | ## 5.0 11 | 12 | - Deprecate comment and negation patterns 13 | - Fix regression in `mark` and `nodir` options from making all cache 14 | keys absolute path. 15 | - Abort if `fs.readdir` returns an error that's unexpected 16 | - Don't emit `match` events for ignored items 17 | - Treat ENOTSUP like ENOTDIR in readdir 18 | 19 | ## 4.5 20 | 21 | - Add `options.follow` to always follow directory symlinks in globstar 22 | - Add `options.realpath` to call `fs.realpath` on all results 23 | - Always cache based on absolute path 24 | 25 | ## 4.4 26 | 27 | - Add `options.ignore` 28 | - Fix handling of broken symlinks 29 | 30 | ## 4.3 31 | 32 | - Bump minimatch to 2.x 33 | - Pass all tests on Windows 34 | 35 | ## 4.2 36 | 37 | - Add `glob.hasMagic` function 38 | - Add `options.nodir` flag 39 | 40 | ## 4.1 41 | 42 | - Refactor sync and async implementations for performance 43 | - Throw if callback provided to sync glob function 44 | - Treat symbolic links in globstar results the same as Bash 4.3 45 | 46 | ## 4.0 47 | 48 | - Use `^` for dependency versions (bumped major because this breaks 49 | older npm versions) 50 | - Ensure callbacks are only ever called once 51 | - switch to ISC license 52 | 53 | ## 3.x 54 | 55 | - Rewrite in JavaScript 56 | - Add support for setting root, cwd, and windows support 57 | - Cache many fs calls 58 | - Add globstar support 59 | - emit match events 60 | 61 | ## 2.x 62 | 63 | - Use `glob.h` and `fnmatch.h` from NetBSD 64 | 65 | ## 1.x 66 | 67 | - `glob.h` static binding. 68 | -------------------------------------------------------------------------------- /node_modules/glob/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "glob@7.0.5", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "glob@7.0.5", 9 | "_id": "glob@7.0.5", 10 | "_inBundle": false, 11 | "_integrity": "sha1-tCAqaQmbu00pKnwblbZoK2fr3JU=", 12 | "_location": "/glob", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "glob@7.0.5", 18 | "name": "glob", 19 | "escapedName": "glob", 20 | "rawSpec": "7.0.5", 21 | "saveSpec": null, 22 | "fetchSpec": "7.0.5" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/rimraf" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz", 29 | "_spec": "7.0.5", 30 | "_where": "/Users/carlos8f/projects/salty", 31 | "author": { 32 | "name": "Isaac Z. Schlueter", 33 | "email": "i@izs.me", 34 | "url": "http://blog.izs.me/" 35 | }, 36 | "bugs": { 37 | "url": "https://github.com/isaacs/node-glob/issues" 38 | }, 39 | "dependencies": { 40 | "fs.realpath": "^1.0.0", 41 | "inflight": "^1.0.4", 42 | "inherits": "2", 43 | "minimatch": "^3.0.2", 44 | "once": "^1.3.0", 45 | "path-is-absolute": "^1.0.0" 46 | }, 47 | "description": "a little globber", 48 | "devDependencies": { 49 | "mkdirp": "0", 50 | "rimraf": "^2.2.8", 51 | "tap": "^5.7.0", 52 | "tick": "0.0.6" 53 | }, 54 | "engines": { 55 | "node": "*" 56 | }, 57 | "files": [ 58 | "glob.js", 59 | "sync.js", 60 | "common.js" 61 | ], 62 | "homepage": "https://github.com/isaacs/node-glob#readme", 63 | "license": "ISC", 64 | "main": "glob.js", 65 | "name": "glob", 66 | "repository": { 67 | "type": "git", 68 | "url": "git://github.com/isaacs/node-glob.git" 69 | }, 70 | "scripts": { 71 | "bench": "bash benchmark.sh", 72 | "benchclean": "node benchclean.js", 73 | "prepublish": "npm run benchclean", 74 | "prof": "bash prof.sh && cat profile.txt", 75 | "profclean": "rm -f v8.log profile.txt", 76 | "test": "tap test/*.js --cov", 77 | "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" 78 | }, 79 | "version": "7.0.5" 80 | } 81 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/fs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var fs = require('fs') 4 | 5 | module.exports = clone(fs) 6 | 7 | function clone (obj) { 8 | if (obj === null || typeof obj !== 'object') 9 | return obj 10 | 11 | if (obj instanceof Object) 12 | var copy = { __proto__: obj.__proto__ } 13 | else 14 | var copy = Object.create(null) 15 | 16 | Object.getOwnPropertyNames(obj).forEach(function (key) { 17 | Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) 18 | }) 19 | 20 | return copy 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "graceful-fs@4.1.4", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "graceful-fs@4.1.4", 9 | "_id": "graceful-fs@4.1.4", 10 | "_inBundle": false, 11 | "_integrity": "sha1-7widKIDwM7ARgjzlyPrnmNp3Xb0=", 12 | "_location": "/graceful-fs", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "graceful-fs@4.1.4", 18 | "name": "graceful-fs", 19 | "escapedName": "graceful-fs", 20 | "rawSpec": "4.1.4", 21 | "saveSpec": null, 22 | "fetchSpec": "4.1.4" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/fstream" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz", 29 | "_spec": "4.1.4", 30 | "_where": "/Users/carlos8f/projects/salty", 31 | "bugs": { 32 | "url": "https://github.com/isaacs/node-graceful-fs/issues" 33 | }, 34 | "description": "A drop-in replacement for fs, making various improvements.", 35 | "devDependencies": { 36 | "mkdirp": "^0.5.0", 37 | "rimraf": "^2.2.8", 38 | "tap": "^5.4.2" 39 | }, 40 | "directories": { 41 | "test": "test" 42 | }, 43 | "engines": { 44 | "node": ">=0.4.0" 45 | }, 46 | "files": [ 47 | "fs.js", 48 | "graceful-fs.js", 49 | "legacy-streams.js", 50 | "polyfills.js" 51 | ], 52 | "homepage": "https://github.com/isaacs/node-graceful-fs#readme", 53 | "keywords": [ 54 | "fs", 55 | "module", 56 | "reading", 57 | "retry", 58 | "retries", 59 | "queue", 60 | "error", 61 | "errors", 62 | "handling", 63 | "EMFILE", 64 | "EAGAIN", 65 | "EINVAL", 66 | "EPERM", 67 | "EACCESS" 68 | ], 69 | "license": "ISC", 70 | "main": "graceful-fs.js", 71 | "name": "graceful-fs", 72 | "repository": { 73 | "type": "git", 74 | "url": "git+https://github.com/isaacs/node-graceful-fs.git" 75 | }, 76 | "scripts": { 77 | "test": "node test.js | tap -" 78 | }, 79 | "version": "4.1.4" 80 | } 81 | -------------------------------------------------------------------------------- /node_modules/graceful-readlink/.npmignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /node_modules/graceful-readlink/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.12" 5 | - "io.js" 6 | -------------------------------------------------------------------------------- /node_modules/graceful-readlink/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Zhiye Li 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /node_modules/graceful-readlink/README.md: -------------------------------------------------------------------------------- 1 | # graceful-readlink 2 | [![NPM Version](http://img.shields.io/npm/v/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink) 3 | [![NPM Downloads](https://img.shields.io/npm/dm/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink) 4 | 5 | 6 | ## Usage 7 | 8 | ```js 9 | var readlinkSync = require('graceful-readlink').readlinkSync; 10 | console.log(readlinkSync(f)); 11 | // output 12 | // the file pointed to when `f` is a symbolic link 13 | // the `f` itself when `f` is not a symbolic link 14 | ``` 15 | ## Licence 16 | 17 | MIT License 18 | -------------------------------------------------------------------------------- /node_modules/graceful-readlink/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , lstat = fs.lstatSync; 3 | 4 | exports.readlinkSync = function (p) { 5 | if (lstat(p).isSymbolicLink()) { 6 | return fs.readlinkSync(p); 7 | } else { 8 | return p; 9 | } 10 | }; 11 | 12 | 13 | -------------------------------------------------------------------------------- /node_modules/graceful-readlink/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "graceful-readlink@1.0.1", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "graceful-readlink@1.0.1", 9 | "_id": "graceful-readlink@1.0.1", 10 | "_inBundle": false, 11 | "_integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", 12 | "_location": "/graceful-readlink", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "graceful-readlink@1.0.1", 18 | "name": "graceful-readlink", 19 | "escapedName": "graceful-readlink", 20 | "rawSpec": "1.0.1", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.1" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", 28 | "_spec": "1.0.1", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "zhiyelee" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/zhiyelee/graceful-readlink/issues" 35 | }, 36 | "description": "graceful fs.readlink", 37 | "homepage": "https://github.com/zhiyelee/graceful-readlink", 38 | "keywords": [ 39 | "fs.readlink", 40 | "readlink" 41 | ], 42 | "license": "MIT", 43 | "main": "index.js", 44 | "name": "graceful-readlink", 45 | "repository": { 46 | "type": "git", 47 | "url": "git://github.com/zhiyelee/graceful-readlink.git" 48 | }, 49 | "scripts": { 50 | "test": "echo \"Error: no test specified\" && exit 1" 51 | }, 52 | "version": "1.0.1" 53 | } 54 | -------------------------------------------------------------------------------- /node_modules/inflight/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/inflight/README.md: -------------------------------------------------------------------------------- 1 | # inflight 2 | 3 | Add callbacks to requests in flight to avoid async duplication 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var inflight = require('inflight') 9 | 10 | // some request that does some stuff 11 | function req(key, callback) { 12 | // key is any random string. like a url or filename or whatever. 13 | // 14 | // will return either a falsey value, indicating that the 15 | // request for this key is already in flight, or a new callback 16 | // which when called will call all callbacks passed to inflightk 17 | // with the same key 18 | callback = inflight(key, callback) 19 | 20 | // If we got a falsey value back, then there's already a req going 21 | if (!callback) return 22 | 23 | // this is where you'd fetch the url or whatever 24 | // callback is also once()-ified, so it can safely be assigned 25 | // to multiple events etc. First call wins. 26 | setTimeout(function() { 27 | callback(null, key) 28 | }, 100) 29 | } 30 | 31 | // only assigns a single setTimeout 32 | // when it dings, all cbs get called 33 | req('foo', cb1) 34 | req('foo', cb2) 35 | req('foo', cb3) 36 | req('foo', cb4) 37 | ``` 38 | -------------------------------------------------------------------------------- /node_modules/inflight/inflight.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | var reqs = Object.create(null) 3 | var once = require('once') 4 | 5 | module.exports = wrappy(inflight) 6 | 7 | function inflight (key, cb) { 8 | if (reqs[key]) { 9 | reqs[key].push(cb) 10 | return null 11 | } else { 12 | reqs[key] = [cb] 13 | return makeres(key) 14 | } 15 | } 16 | 17 | function makeres (key) { 18 | return once(function RES () { 19 | var cbs = reqs[key] 20 | var len = cbs.length 21 | var args = slice(arguments) 22 | for (var i = 0; i < len; i++) { 23 | cbs[i].apply(null, args) 24 | } 25 | if (cbs.length > len) { 26 | // added more in the interim. 27 | // de-zalgo, just in case, but don't call again. 28 | cbs.splice(0, len) 29 | process.nextTick(function () { 30 | RES.apply(null, args) 31 | }) 32 | } else { 33 | delete reqs[key] 34 | } 35 | }) 36 | } 37 | 38 | function slice (args) { 39 | var length = args.length 40 | var array = [] 41 | 42 | for (var i = 0; i < length; i++) array[i] = args[i] 43 | return array 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/inflight/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "inflight@1.0.5", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "inflight@1.0.5", 9 | "_id": "inflight@1.0.5", 10 | "_inBundle": false, 11 | "_integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", 12 | "_location": "/inflight", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "inflight@1.0.5", 18 | "name": "inflight", 19 | "escapedName": "inflight", 20 | "rawSpec": "1.0.5", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.5" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/glob", 27 | "/mocha/glob" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", 30 | "_spec": "1.0.5", 31 | "_where": "/Users/carlos8f/projects/salty", 32 | "author": { 33 | "name": "Isaac Z. Schlueter", 34 | "email": "i@izs.me", 35 | "url": "http://blog.izs.me/" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/isaacs/inflight/issues" 39 | }, 40 | "dependencies": { 41 | "once": "^1.3.0", 42 | "wrappy": "1" 43 | }, 44 | "description": "Add callbacks to requests in flight to avoid async duplication", 45 | "devDependencies": { 46 | "tap": "^1.2.0" 47 | }, 48 | "files": [ 49 | "inflight.js" 50 | ], 51 | "homepage": "https://github.com/isaacs/inflight", 52 | "license": "ISC", 53 | "main": "inflight.js", 54 | "name": "inflight", 55 | "repository": { 56 | "type": "git", 57 | "url": "git+https://github.com/npm/inflight.git" 58 | }, 59 | "scripts": { 60 | "test": "tap test.js" 61 | }, 62 | "version": "1.0.5" 63 | } 64 | -------------------------------------------------------------------------------- /node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "inherits@2.0.1", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "inherits@2.0.1", 9 | "_id": "inherits@2.0.1", 10 | "_inBundle": false, 11 | "_integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", 12 | "_location": "/inherits", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "inherits@2.0.1", 18 | "name": "inherits", 19 | "escapedName": "inherits", 20 | "rawSpec": "2.0.1", 21 | "saveSpec": null, 22 | "fetchSpec": "2.0.1" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/block-stream", 27 | "/fstream", 28 | "/fstream-ignore", 29 | "/glob", 30 | "/mocha/glob", 31 | "/tar", 32 | "/tar-pack/tar" 33 | ], 34 | "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", 35 | "_spec": "2.0.1", 36 | "_where": "/Users/carlos8f/projects/salty", 37 | "browser": "./inherits_browser.js", 38 | "bugs": { 39 | "url": "https://github.com/isaacs/inherits/issues" 40 | }, 41 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 42 | "homepage": "https://github.com/isaacs/inherits#readme", 43 | "keywords": [ 44 | "inheritance", 45 | "class", 46 | "klass", 47 | "oop", 48 | "object-oriented", 49 | "inherits", 50 | "browser", 51 | "browserify" 52 | ], 53 | "license": "ISC", 54 | "main": "./inherits.js", 55 | "name": "inherits", 56 | "repository": { 57 | "type": "git", 58 | "url": "git://github.com/isaacs/inherits.git" 59 | }, 60 | "scripts": { 61 | "test": "node test" 62 | }, 63 | "version": "2.0.1" 64 | } 65 | -------------------------------------------------------------------------------- /node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /node_modules/is-utf8/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (C) 2014 Wei Fanzhe 4 | 5 | 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: 6 |    7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. 10 | -------------------------------------------------------------------------------- /node_modules/is-utf8/README.md: -------------------------------------------------------------------------------- 1 | #utf8 detector 2 | 3 | Detect if a Buffer is utf8 encoded. 4 | It need The minimum amount of bytes is 4. 5 | 6 | 7 | ```javascript 8 | var fs = require('fs'); 9 | var isUtf8 = require('is-utf8'); 10 | var ansi = fs.readFileSync('ansi.txt'); 11 | var utf8 = fs.readFileSync('utf8.txt'); 12 | 13 | console.log('ansi.txt is utf8: '+isUtf8(ansi)); //false 14 | console.log('utf8.txt is utf8: '+isUtf8(utf8)); //true 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /node_modules/is-utf8/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "is-utf8@0.2.1", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "is-utf8@0.2.1", 9 | "_id": "is-utf8@0.2.1", 10 | "_inBundle": false, 11 | "_integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", 12 | "_location": "/is-utf8", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "is-utf8@0.2.1", 18 | "name": "is-utf8", 19 | "escapedName": "is-utf8", 20 | "rawSpec": "0.2.1", 21 | "saveSpec": null, 22 | "fetchSpec": "0.2.1" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", 28 | "_spec": "0.2.1", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "wayfind" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/wayfind/is-utf8/issues" 35 | }, 36 | "description": "Detect if a buffer is utf8 encoded.", 37 | "files": [ 38 | "is-utf8.js" 39 | ], 40 | "homepage": "https://github.com/wayfind/is-utf8#readme", 41 | "keywords": [ 42 | "utf8", 43 | "charset" 44 | ], 45 | "license": "MIT", 46 | "main": "is-utf8.js", 47 | "name": "is-utf8", 48 | "repository": { 49 | "type": "git", 50 | "url": "git+https://github.com/wayfind/is-utf8.git" 51 | }, 52 | "scripts": { 53 | "test": "node test.js" 54 | }, 55 | "version": "0.2.1" 56 | } 57 | -------------------------------------------------------------------------------- /node_modules/js-scrypt/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | npm-debug.log 15 | node_modules -------------------------------------------------------------------------------- /node_modules/js-scrypt/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Michael J. Ryan 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /node_modules/js-scrypt/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | hash: require('./lib/scrypt-async'), 3 | hashSync: require('./lib/scrypt-sync') 4 | } -------------------------------------------------------------------------------- /node_modules/js-scrypt/lib/scrypt-async-worker.js: -------------------------------------------------------------------------------- 1 | var scrypt_module_factory = require('./scrypt-module-factory'); 2 | 3 | //console.log("Worker Started"); 4 | 5 | process.on('message', function(args){ 6 | //console.log("Got Message:", args); 7 | try { 8 | //console.log('got message in worker', args); 9 | 10 | var sm = scrypt_module_factory(args.options.maxmem); 11 | var pass = Array.prototype.slice.apply(new Buffer(args.password,'base64')); 12 | var salt = Array.prototype.slice.apply(new Buffer(args.salt, 'base64')); 13 | var hash = sm.crypto_scrypt(pass, salt, args.options.cost, args.options.blockSize, args.options.parallel, args.options.size); 14 | 15 | var ret = new Buffer(hash.length); 16 | for (var i=0; i=2.7.0", 49 | "tap": "1" 50 | }, 51 | "homepage": "https://github.com/substack/node-mkdirp#readme", 52 | "keywords": [ 53 | "mkdir", 54 | "directory" 55 | ], 56 | "license": "MIT", 57 | "main": "index.js", 58 | "name": "mkdirp", 59 | "repository": { 60 | "type": "git", 61 | "url": "git+https://github.com/substack/node-mkdirp.git" 62 | }, 63 | "scripts": { 64 | "test": "tap test/*.js" 65 | }, 66 | "version": "0.5.1" 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/chmod.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | var _0777 = parseInt('0777', 8); 6 | var _0755 = parseInt('0755', 8); 7 | var _0744 = parseInt('0744', 8); 8 | 9 | var ps = [ '', 'tmp' ]; 10 | 11 | for (var i = 0; i < 25; i++) { 12 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | ps.push(dir); 14 | } 15 | 16 | var file = ps.join('/'); 17 | 18 | test('chmod-pre', function (t) { 19 | var mode = _0744 20 | mkdirp(file, mode, function (er) { 21 | t.ifError(er, 'should not error'); 22 | fs.stat(file, function (er, stat) { 23 | t.ifError(er, 'should exist'); 24 | t.ok(stat && stat.isDirectory(), 'should be directory'); 25 | t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); 26 | t.end(); 27 | }); 28 | }); 29 | }); 30 | 31 | test('chmod', function (t) { 32 | var mode = _0755 33 | mkdirp(file, mode, function (er) { 34 | t.ifError(er, 'should not error'); 35 | fs.stat(file, function (er, stat) { 36 | t.ifError(er, 'should exist'); 37 | t.ok(stat && stat.isDirectory(), 'should be directory'); 38 | t.end(); 39 | }); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/clobber.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | var _0755 = parseInt('0755', 8); 6 | 7 | var ps = [ '', 'tmp' ]; 8 | 9 | for (var i = 0; i < 25; i++) { 10 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | ps.push(dir); 12 | } 13 | 14 | var file = ps.join('/'); 15 | 16 | // a file in the way 17 | var itw = ps.slice(0, 3).join('/'); 18 | 19 | 20 | test('clobber-pre', function (t) { 21 | console.error("about to write to "+itw) 22 | fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); 23 | 24 | fs.stat(itw, function (er, stat) { 25 | t.ifError(er) 26 | t.ok(stat && stat.isFile(), 'should be file') 27 | t.end() 28 | }) 29 | }) 30 | 31 | test('clobber', function (t) { 32 | t.plan(2); 33 | mkdirp(file, _0755, function (err) { 34 | t.ok(err); 35 | t.equal(err.code, 'ENOTDIR'); 36 | t.end(); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/mkdirp.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('woo', function (t) { 10 | t.plan(5); 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var file = '/tmp/' + [x,y,z].join('/'); 16 | 17 | mkdirp(file, _0755, function (err) { 18 | t.ifError(err); 19 | exists(file, function (ex) { 20 | t.ok(ex, 'file created'); 21 | fs.stat(file, function (err, stat) { 22 | t.ifError(err); 23 | t.equal(stat.mode & _0777, _0755); 24 | t.ok(stat.isDirectory(), 'target not a directory'); 25 | }) 26 | }) 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/opts_fs.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | var _0777 = parseInt('0777', 8); 6 | var _0755 = parseInt('0755', 8); 7 | 8 | test('opts.fs', function (t) { 9 | t.plan(5); 10 | 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var file = '/beep/boop/' + [x,y,z].join('/'); 16 | var xfs = mockfs.fs(); 17 | 18 | mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { 19 | t.ifError(err); 20 | xfs.exists(file, function (ex) { 21 | t.ok(ex, 'created file'); 22 | xfs.stat(file, function (err, stat) { 23 | t.ifError(err); 24 | t.equal(stat.mode & _0777, _0755); 25 | t.ok(stat.isDirectory(), 'target not a directory'); 26 | }); 27 | }); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/opts_fs_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var test = require('tap').test; 4 | var mockfs = require('mock-fs'); 5 | var _0777 = parseInt('0777', 8); 6 | var _0755 = parseInt('0755', 8); 7 | 8 | test('opts.fs sync', function (t) { 9 | t.plan(4); 10 | 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var file = '/beep/boop/' + [x,y,z].join('/'); 16 | var xfs = mockfs.fs(); 17 | 18 | mkdirp.sync(file, { fs: xfs, mode: _0755 }); 19 | xfs.exists(file, function (ex) { 20 | t.ok(ex, 'created file'); 21 | xfs.stat(file, function (err, stat) { 22 | t.ifError(err); 23 | t.equal(stat.mode & _0777, _0755); 24 | t.ok(stat.isDirectory(), 'target not a directory'); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/perm.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('async perm', function (t) { 10 | t.plan(5); 11 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); 12 | 13 | mkdirp(file, _0755, function (err) { 14 | t.ifError(err); 15 | exists(file, function (ex) { 16 | t.ok(ex, 'file created'); 17 | fs.stat(file, function (err, stat) { 18 | t.ifError(err); 19 | t.equal(stat.mode & _0777, _0755); 20 | t.ok(stat.isDirectory(), 'target not a directory'); 21 | }) 22 | }) 23 | }); 24 | }); 25 | 26 | test('async root perm', function (t) { 27 | mkdirp('/tmp', _0755, function (err) { 28 | if (err) t.fail(err); 29 | t.end(); 30 | }); 31 | t.end(); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/perm_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('sync perm', function (t) { 10 | t.plan(4); 11 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; 12 | 13 | mkdirp.sync(file, _0755); 14 | exists(file, function (ex) { 15 | t.ok(ex, 'file created'); 16 | fs.stat(file, function (err, stat) { 17 | t.ifError(err); 18 | t.equal(stat.mode & _0777, _0755); 19 | t.ok(stat.isDirectory(), 'target not a directory'); 20 | }); 21 | }); 22 | }); 23 | 24 | test('sync root perm', function (t) { 25 | t.plan(3); 26 | 27 | var file = '/tmp'; 28 | mkdirp.sync(file, _0755); 29 | exists(file, function (ex) { 30 | t.ok(ex, 'file created'); 31 | fs.stat(file, function (err, stat) { 32 | t.ifError(err); 33 | t.ok(stat.isDirectory(), 'target not a directory'); 34 | }) 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/race.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('race', function (t) { 10 | t.plan(10); 11 | var ps = [ '', 'tmp' ]; 12 | 13 | for (var i = 0; i < 25; i++) { 14 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 15 | ps.push(dir); 16 | } 17 | var file = ps.join('/'); 18 | 19 | var res = 2; 20 | mk(file); 21 | 22 | mk(file); 23 | 24 | function mk (file, cb) { 25 | mkdirp(file, _0755, function (err) { 26 | t.ifError(err); 27 | exists(file, function (ex) { 28 | t.ok(ex, 'file created'); 29 | fs.stat(file, function (err, stat) { 30 | t.ifError(err); 31 | t.equal(stat.mode & _0777, _0755); 32 | t.ok(stat.isDirectory(), 'target not a directory'); 33 | }); 34 | }) 35 | }); 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/rel.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('rel', function (t) { 10 | t.plan(5); 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var cwd = process.cwd(); 16 | process.chdir('/tmp'); 17 | 18 | var file = [x,y,z].join('/'); 19 | 20 | mkdirp(file, _0755, function (err) { 21 | t.ifError(err); 22 | exists(file, function (ex) { 23 | t.ok(ex, 'file created'); 24 | fs.stat(file, function (err, stat) { 25 | t.ifError(err); 26 | process.chdir(cwd); 27 | t.equal(stat.mode & _0777, _0755); 28 | t.ok(stat.isDirectory(), 'target not a directory'); 29 | }) 30 | }) 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/return.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(4); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | mkdirp(file, function (err, made) { 18 | t.ifError(err); 19 | t.equal(made, '/tmp/' + x); 20 | mkdirp(file, function (err, made) { 21 | t.ifError(err); 22 | t.equal(made, null); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/return_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | // Note that this will throw on failure, which will fail the test. 18 | var made = mkdirp.sync(file); 19 | t.equal(made, '/tmp/' + x); 20 | 21 | // making the same file again should have no effect. 22 | made = mkdirp.sync(file); 23 | t.equal(made, null); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/root.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | var _0755 = parseInt('0755', 8); 6 | 7 | test('root', function (t) { 8 | // '/' on unix, 'c:/' on windows. 9 | var file = path.resolve('/'); 10 | 11 | mkdirp(file, _0755, function (err) { 12 | if (err) throw err 13 | fs.stat(file, function (er, stat) { 14 | if (er) throw er 15 | t.ok(stat.isDirectory(), 'target is a directory'); 16 | t.end(); 17 | }) 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('sync', function (t) { 10 | t.plan(4); 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var file = '/tmp/' + [x,y,z].join('/'); 16 | 17 | try { 18 | mkdirp.sync(file, _0755); 19 | } catch (err) { 20 | t.fail(err); 21 | return t.end(); 22 | } 23 | 24 | exists(file, function (ex) { 25 | t.ok(ex, 'file created'); 26 | fs.stat(file, function (err, stat) { 27 | t.ifError(err); 28 | t.equal(stat.mode & _0777, _0755); 29 | t.ok(stat.isDirectory(), 'target not a directory'); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/umask.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('implicit mode from umask', function (t) { 10 | t.plan(5); 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var file = '/tmp/' + [x,y,z].join('/'); 16 | 17 | mkdirp(file, function (err) { 18 | t.ifError(err); 19 | exists(file, function (ex) { 20 | t.ok(ex, 'file created'); 21 | fs.stat(file, function (err, stat) { 22 | t.ifError(err); 23 | t.equal(stat.mode & _0777, _0777 & (~process.umask())); 24 | t.ok(stat.isDirectory(), 'target not a directory'); 25 | }); 26 | }) 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/umask_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var exists = fs.exists || path.exists; 5 | var test = require('tap').test; 6 | var _0777 = parseInt('0777', 8); 7 | var _0755 = parseInt('0755', 8); 8 | 9 | test('umask sync modes', function (t) { 10 | t.plan(4); 11 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 13 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 14 | 15 | var file = '/tmp/' + [x,y,z].join('/'); 16 | 17 | try { 18 | mkdirp.sync(file); 19 | } catch (err) { 20 | t.fail(err); 21 | return t.end(); 22 | } 23 | 24 | exists(file, function (ex) { 25 | t.ok(ex, 'file created'); 26 | fs.stat(file, function (err, stat) { 27 | t.ifError(err); 28 | t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); 29 | t.ok(stat.isDirectory(), 'target not a directory'); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/nacl-stream/.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | test 3 | demo 4 | -------------------------------------------------------------------------------- /node_modules/nacl-stream/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "nacl-stream@0.3.5", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "nacl-stream@0.3.5", 9 | "_id": "nacl-stream@0.3.5", 10 | "_inBundle": false, 11 | "_integrity": "sha512-qctrVmeV+9z0+VmTsrVT1F2RmLLOqwrh3MKH7fRlId78U8+6/tntGUj9VcU0Hny7zUWzDaHZy9JYeMoT4pESqA==", 12 | "_location": "/nacl-stream", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "nacl-stream@0.3.5", 18 | "name": "nacl-stream", 19 | "escapedName": "nacl-stream", 20 | "rawSpec": "0.3.5", 21 | "saveSpec": null, 22 | "fetchSpec": "0.3.5" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/nacl-stream/-/nacl-stream-0.3.5.tgz", 28 | "_spec": "0.3.5", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "Dmitry Chestnykh" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/dchest/nacl-stream-js/issues" 35 | }, 36 | "dependencies": { 37 | "tweetnacl": "^1.0.0" 38 | }, 39 | "description": "Streaming encryption based on TweetNaCl.js", 40 | "devDependencies": { 41 | "faucet": "^0.0.1", 42 | "tape": "^4.8.0", 43 | "tweetnacl-util": "^0.15.0", 44 | "uglify-js": "^3.0.28" 45 | }, 46 | "directories": { 47 | "test": "test" 48 | }, 49 | "homepage": "https://github.com/dchest/nacl-stream-js", 50 | "keywords": [ 51 | "encryption", 52 | "decryption", 53 | "streaming", 54 | "chunking", 55 | "nacl", 56 | "tweetnacl", 57 | "file" 58 | ], 59 | "license": "Unlicense", 60 | "main": "nacl-stream.js", 61 | "name": "nacl-stream", 62 | "repository": { 63 | "type": "git", 64 | "url": "git+https://github.com/dchest/nacl-stream-js.git" 65 | }, 66 | "scripts": { 67 | "build": "uglifyjs nacl-stream.js -c -m -o nacl-stream.min.js", 68 | "test": "faucet test/*.js" 69 | }, 70 | "version": "0.3.5" 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/once/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/once/README.md: -------------------------------------------------------------------------------- 1 | # once 2 | 3 | Only call a function once. 4 | 5 | ## usage 6 | 7 | ```javascript 8 | var once = require('once') 9 | 10 | function load (file, cb) { 11 | cb = once(cb) 12 | loader.load('file') 13 | loader.once('load', cb) 14 | loader.once('error', cb) 15 | } 16 | ``` 17 | 18 | Or add to the Function.prototype in a responsible way: 19 | 20 | ```javascript 21 | // only has to be done once 22 | require('once').proto() 23 | 24 | function load (file, cb) { 25 | cb = cb.once() 26 | loader.load('file') 27 | loader.once('load', cb) 28 | loader.once('error', cb) 29 | } 30 | ``` 31 | 32 | Ironically, the prototype feature makes this module twice as 33 | complicated as necessary. 34 | 35 | To check whether you function has been called, use `fn.called`. Once the 36 | function is called for the first time the return value of the original 37 | function is saved in `fn.value` and subsequent calls will continue to 38 | return this value. 39 | 40 | ```javascript 41 | var once = require('once') 42 | 43 | function load (cb) { 44 | cb = once(cb) 45 | var stream = createStream() 46 | stream.once('data', cb) 47 | stream.once('end', function () { 48 | if (!cb.called) cb(new Error('not found')) 49 | }) 50 | } 51 | ``` 52 | -------------------------------------------------------------------------------- /node_modules/once/once.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | module.exports = wrappy(once) 3 | 4 | once.proto = once(function () { 5 | Object.defineProperty(Function.prototype, 'once', { 6 | value: function () { 7 | return once(this) 8 | }, 9 | configurable: true 10 | }) 11 | }) 12 | 13 | function once (fn) { 14 | var f = function () { 15 | if (f.called) return f.value 16 | f.called = true 17 | return f.value = fn.apply(this, arguments) 18 | } 19 | f.called = false 20 | return f 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/once/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "once@1.3.3", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "once@1.3.3", 9 | "_id": "once@1.3.3", 10 | "_inBundle": false, 11 | "_integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", 12 | "_location": "/once", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "once@1.3.3", 18 | "name": "once", 19 | "escapedName": "once", 20 | "rawSpec": "1.3.3", 21 | "saveSpec": null, 22 | "fetchSpec": "1.3.3" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/glob", 27 | "/inflight", 28 | "/mocha/glob", 29 | "/tar-pack" 30 | ], 31 | "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", 32 | "_spec": "1.3.3", 33 | "_where": "/Users/carlos8f/projects/salty", 34 | "author": { 35 | "name": "Isaac Z. Schlueter", 36 | "email": "i@izs.me", 37 | "url": "http://blog.izs.me/" 38 | }, 39 | "bugs": { 40 | "url": "https://github.com/isaacs/once/issues" 41 | }, 42 | "dependencies": { 43 | "wrappy": "1" 44 | }, 45 | "description": "Run a function exactly one time", 46 | "devDependencies": { 47 | "tap": "^1.2.0" 48 | }, 49 | "directories": { 50 | "test": "test" 51 | }, 52 | "files": [ 53 | "once.js" 54 | ], 55 | "homepage": "https://github.com/isaacs/once#readme", 56 | "keywords": [ 57 | "once", 58 | "function", 59 | "one", 60 | "single" 61 | ], 62 | "license": "ISC", 63 | "main": "once.js", 64 | "name": "once", 65 | "repository": { 66 | "type": "git", 67 | "url": "git://github.com/isaacs/once.git" 68 | }, 69 | "scripts": { 70 | "test": "tap test/*.js" 71 | }, 72 | "version": "1.3.3" 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function posix(path) { 4 | return path.charAt(0) === '/'; 5 | }; 6 | 7 | function win32(path) { 8 | // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 9 | var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; 10 | var result = splitDeviceRe.exec(path); 11 | var device = result[1] || ''; 12 | var isUnc = !!device && device.charAt(1) !== ':'; 13 | 14 | // UNC paths are always absolute 15 | return !!result[2] || isUnc; 16 | }; 17 | 18 | module.exports = process.platform === 'win32' ? win32 : posix; 19 | module.exports.posix = posix; 20 | module.exports.win32 = win32; 21 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "path-is-absolute@1.0.0", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "path-is-absolute@1.0.0", 9 | "_id": "path-is-absolute@1.0.0", 10 | "_inBundle": false, 11 | "_integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=", 12 | "_location": "/path-is-absolute", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "path-is-absolute@1.0.0", 18 | "name": "path-is-absolute", 19 | "escapedName": "path-is-absolute", 20 | "rawSpec": "1.0.0", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.0" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/glob", 27 | "/mocha/glob" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", 30 | "_spec": "1.0.0", 31 | "_where": "/Users/carlos8f/projects/salty", 32 | "author": { 33 | "name": "Sindre Sorhus", 34 | "email": "sindresorhus@gmail.com", 35 | "url": "sindresorhus.com" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/sindresorhus/path-is-absolute/issues" 39 | }, 40 | "description": "Node.js 0.12 path.isAbsolute() ponyfill", 41 | "engines": { 42 | "node": ">=0.10.0" 43 | }, 44 | "files": [ 45 | "index.js" 46 | ], 47 | "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", 48 | "keywords": [ 49 | "path", 50 | "paths", 51 | "file", 52 | "dir", 53 | "absolute", 54 | "isabsolute", 55 | "is-absolute", 56 | "built-in", 57 | "util", 58 | "utils", 59 | "core", 60 | "ponyfill", 61 | "polyfill", 62 | "shim", 63 | "is", 64 | "detect", 65 | "check" 66 | ], 67 | "license": "MIT", 68 | "name": "path-is-absolute", 69 | "repository": { 70 | "type": "git", 71 | "url": "git+https://github.com/sindresorhus/path-is-absolute.git" 72 | }, 73 | "scripts": { 74 | "test": "node test.js" 75 | }, 76 | "version": "1.0.0" 77 | } 78 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/readme.md: -------------------------------------------------------------------------------- 1 | # path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) 2 | 3 | > Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill 4 | 5 | > Ponyfill: A polyfill that doesn't overwrite the native method 6 | 7 | 8 | ## Install 9 | 10 | ``` 11 | $ npm install --save path-is-absolute 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```js 18 | var pathIsAbsolute = require('path-is-absolute'); 19 | 20 | // Linux 21 | pathIsAbsolute('/home/foo'); 22 | //=> true 23 | 24 | // Windows 25 | pathIsAbsolute('C:/Users/'); 26 | //=> true 27 | 28 | // Any OS 29 | pathIsAbsolute.posix('/home/foo'); 30 | //=> true 31 | ``` 32 | 33 | 34 | ## API 35 | 36 | See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). 37 | 38 | ### pathIsAbsolute(path) 39 | 40 | ### pathIsAbsolute.posix(path) 41 | 42 | The Posix specific version. 43 | 44 | ### pathIsAbsolute.win32(path) 45 | 46 | The Windows specific version. 47 | 48 | 49 | ## License 50 | 51 | MIT © [Sindre Sorhus](http://sindresorhus.com) 52 | -------------------------------------------------------------------------------- /node_modules/pempal/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/pempal/README.md: -------------------------------------------------------------------------------- 1 | # pempal 2 | 3 | Read and write PEM strings, optionally with encryption 4 | -------------------------------------------------------------------------------- /node_modules/pempal/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carlos8f/salty/f72d13b4a121ae93c503d276848f18a679debfd8/node_modules/pempal/favicon.ico -------------------------------------------------------------------------------- /node_modules/pempal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "pempal@1.0.2", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "pempal@1.0.2", 9 | "_id": "pempal@1.0.2", 10 | "_inBundle": false, 11 | "_integrity": "sha1-KHobZD6o+yteEPoz/RasLokC4OM=", 12 | "_location": "/pempal", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "pempal@1.0.2", 18 | "name": "pempal", 19 | "escapedName": "pempal", 20 | "rawSpec": "1.0.2", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.2" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/pempal/-/pempal-1.0.2.tgz", 28 | "_spec": "1.0.2", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "Carlos Rodriguez", 32 | "email": "carlos@s8f.org", 33 | "url": "http://s8f.org/" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/carlos8f/pempal/issues" 37 | }, 38 | "dependencies": { 39 | "js-scrypt": "^0.2.0", 40 | "tweetnacl": "^0.14.3" 41 | }, 42 | "description": "Read and write PEM strings, optionally with encryption", 43 | "devDependencies": {}, 44 | "homepage": "https://github.com/carlos8f/pempal", 45 | "keywords": [ 46 | "pem", 47 | "crypto", 48 | "encode", 49 | "decode", 50 | "parser" 51 | ], 52 | "license": "MIT", 53 | "main": "index.js", 54 | "name": "pempal", 55 | "repository": { 56 | "type": "git", 57 | "url": "git://github.com/carlos8f/pempal.git" 58 | }, 59 | "scripts": { 60 | "test": "node test.js" 61 | }, 62 | "version": "1.0.2" 63 | } 64 | -------------------------------------------------------------------------------- /node_modules/pempal/test.js: -------------------------------------------------------------------------------- 1 | var pempal = require('./') 2 | , assert = require('assert') 3 | , fs = require('fs') 4 | 5 | var buf = fs.readFileSync('favicon.ico') 6 | 7 | var c = Buffer(128).toString('hex') 8 | var pem = pempal.encode(buf, {tag: 'SUPER SECRET', passphrase: 'this is super secret', headers: {'Custom-header': c}}) 9 | 10 | console.log(pem) 11 | 12 | var result = pempal.decode(pem, {tag: 'SUPER SECRET', passphrase: 'this is super secret'}) 13 | 14 | assert.equal(result.headers['proc-type'], '4,ENCRYPTED') 15 | assert.equal(result.headers['custom-header'], c) 16 | assert.deepEqual(result.body, buf) 17 | 18 | assert.throws(function () { 19 | var result2 = pempal.decode(pem, {tag: 'SUPER SECRET', passphrase: 'this is super secret NOT'}) 20 | }, 'Bad passphrase') 21 | 22 | buf = Buffer('carlos') 23 | pem = pempal.encode(buf) 24 | console.log(pem) 25 | -------------------------------------------------------------------------------- /node_modules/progress/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | yarn.lock 6 | -------------------------------------------------------------------------------- /node_modules/progress/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2017 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/progress/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE)) 3 | 4 | .PHONY: test 5 | test: $(EXAMPLES) 6 | 7 | .PHONY: $(EXAMPLES) 8 | $(EXAMPLES): ; node $@ && echo 9 | -------------------------------------------------------------------------------- /node_modules/progress/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/node-progress'); 2 | -------------------------------------------------------------------------------- /node_modules/progress/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "progress@2.0.0", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "progress@2.0.0", 9 | "_id": "progress@2.0.0", 10 | "_inBundle": false, 11 | "_integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", 12 | "_location": "/progress", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "progress@2.0.0", 18 | "name": "progress", 19 | "escapedName": "progress", 20 | "rawSpec": "2.0.0", 21 | "saveSpec": null, 22 | "fetchSpec": "2.0.0" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", 28 | "_spec": "2.0.0", 29 | "_where": "/Users/carlos8f/projects/salty", 30 | "author": { 31 | "name": "TJ Holowaychuk", 32 | "email": "tj@vision-media.ca" 33 | }, 34 | "bugs": { 35 | "url": "https://github.com/visionmedia/node-progress/issues" 36 | }, 37 | "contributors": [ 38 | { 39 | "name": "Christoffer Hallas", 40 | "email": "christoffer.hallas@gmail.com" 41 | }, 42 | { 43 | "name": "Jordan Scales", 44 | "email": "scalesjordan@gmail.com" 45 | }, 46 | { 47 | "name": "Andrew Rhyne", 48 | "email": "rhyneandrew@gmail.com" 49 | } 50 | ], 51 | "dependencies": {}, 52 | "description": "Flexible ascii progress bar", 53 | "engines": { 54 | "node": ">=0.4.0" 55 | }, 56 | "homepage": "https://github.com/visionmedia/node-progress#readme", 57 | "keywords": [ 58 | "cli", 59 | "progress" 60 | ], 61 | "license": "MIT", 62 | "main": "./index.js", 63 | "name": "progress", 64 | "repository": { 65 | "type": "git", 66 | "url": "git://github.com/visionmedia/node-progress.git" 67 | }, 68 | "version": "2.0.0" 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/rimraf/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/rimraf/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var rimraf = require('./') 4 | 5 | var help = false 6 | var dashdash = false 7 | var noglob = false 8 | var args = process.argv.slice(2).filter(function(arg) { 9 | if (dashdash) 10 | return !!arg 11 | else if (arg === '--') 12 | dashdash = true 13 | else if (arg === '--no-glob' || arg === '-G') 14 | noglob = true 15 | else if (arg === '--glob' || arg === '-g') 16 | noglob = false 17 | else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) 18 | help = true 19 | else 20 | return !!arg 21 | }) 22 | 23 | if (help || args.length === 0) { 24 | // If they didn't ask for help, then this is not a "success" 25 | var log = help ? console.log : console.error 26 | log('Usage: rimraf [ ...]') 27 | log('') 28 | log(' Deletes all files and folders at "path" recursively.') 29 | log('') 30 | log('Options:') 31 | log('') 32 | log(' -h, --help Display this usage info') 33 | log(' -G, --no-glob Do not expand glob patterns in arguments') 34 | log(' -g, --glob Expand glob patterns in arguments (default)') 35 | process.exit(help ? 0 : 1) 36 | } else 37 | go(0) 38 | 39 | function go (n) { 40 | if (n >= args.length) 41 | return 42 | var options = {} 43 | if (noglob) 44 | options = { glob: false } 45 | rimraf(args[n], options, function (er) { 46 | if (er) 47 | throw er 48 | go(n+1) 49 | }) 50 | } 51 | -------------------------------------------------------------------------------- /node_modules/rimraf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "rimraf@2.6.2", 5 | "/Users/carlos8f/projects/salty" 6 | ] 7 | ], 8 | "_from": "rimraf@2.6.2", 9 | "_id": "rimraf@2.6.2", 10 | "_inBundle": false, 11 | "_integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", 12 | "_location": "/rimraf", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "rimraf@2.6.2", 18 | "name": "rimraf", 19 | "escapedName": "rimraf", 20 | "rawSpec": "2.6.2", 21 | "saveSpec": null, 22 | "fetchSpec": "2.6.2" 23 | }, 24 | "_requiredBy": [ 25 | "/", 26 | "/fstream", 27 | "/tar-pack" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", 30 | "_spec": "2.6.2", 31 | "_where": "/Users/carlos8f/projects/salty", 32 | "author": { 33 | "name": "Isaac Z. Schlueter", 34 | "email": "i@izs.me", 35 | "url": "http://blog.izs.me/" 36 | }, 37 | "bin": { 38 | "rimraf": "./bin.js" 39 | }, 40 | "bugs": { 41 | "url": "https://github.com/isaacs/rimraf/issues" 42 | }, 43 | "dependencies": { 44 | "glob": "^7.0.5" 45 | }, 46 | "description": "A deep deletion module for node (like `rm -rf`)", 47 | "devDependencies": { 48 | "mkdirp": "^0.5.1", 49 | "tap": "^10.1.2" 50 | }, 51 | "files": [ 52 | "LICENSE", 53 | "README.md", 54 | "bin.js", 55 | "rimraf.js" 56 | ], 57 | "homepage": "https://github.com/isaacs/rimraf#readme", 58 | "license": "ISC", 59 | "main": "rimraf.js", 60 | "name": "rimraf", 61 | "repository": { 62 | "type": "git", 63 | "url": "git://github.com/isaacs/rimraf.git" 64 | }, 65 | "scripts": { 66 | "test": "tap test/*.js" 67 | }, 68 | "version": "2.6.2" 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/tar/.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | node_modules 3 | examples/extract/ 4 | test/tmp/ 5 | test/fixtures/ 6 | -------------------------------------------------------------------------------- /node_modules/tar/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | - 0.11 5 | -------------------------------------------------------------------------------- /node_modules/tar/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | Copyright (c) Isaac Z. Schlueter and Contributors 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 12 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13 | -------------------------------------------------------------------------------- /node_modules/tar/README.md: -------------------------------------------------------------------------------- 1 | # node-tar 2 | 3 | Tar for Node.js. 4 | 5 | [![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) 6 | 7 | ## API 8 | 9 | See `examples/` for usage examples. 10 | 11 | ### var tar = require('tar') 12 | 13 | Returns an object with `.Pack`, `.Extract` and `.Parse` methods. 14 | 15 | ### tar.Pack([properties]) 16 | 17 | Returns a through stream. Use 18 | [fstream](https://npmjs.org/package/fstream) to write files into the 19 | pack stream and you will receive tar archive data from the pack 20 | stream. 21 | 22 | This only works with directories, it does not work with individual files. 23 | 24 | The optional `properties` object are used to set properties in the tar 25 | 'Global Extended Header'. If the `fromBase` property is set to true, 26 | the tar will contain files relative to the path passed, and not with 27 | the path included. 28 | 29 | ### tar.Extract([options]) 30 | 31 | Returns a through stream. Write tar data to the stream and the files 32 | in the tarball will be extracted onto the filesystem. 33 | 34 | `options` can be: 35 | 36 | ```js 37 | { 38 | path: '/path/to/extract/tar/into', 39 | strip: 0, // how many path segments to strip from the root when extracting 40 | } 41 | ``` 42 | 43 | `options` also get passed to the `fstream.Writer` instance that `tar` 44 | uses internally. 45 | 46 | ### tar.Parse() 47 | 48 | Returns a writable stream. Write tar data to it and it will emit 49 | `entry` events for each entry parsed from the tarball. This is used by 50 | `tar.Extract`. 51 | -------------------------------------------------------------------------------- /node_modules/tar/examples/extracter.js: -------------------------------------------------------------------------------- 1 | var tar = require("../tar.js") 2 | , fs = require("fs") 3 | 4 | 5 | function onError(err) { 6 | console.error('An error occurred:', err) 7 | } 8 | 9 | function onEnd() { 10 | console.log('Extracted!') 11 | } 12 | 13 | var extractor = tar.Extract({path: __dirname + "/extract"}) 14 | .on('error', onError) 15 | .on('end', onEnd); 16 | 17 | fs.createReadStream(__dirname + "/../test/fixtures/c.tar") 18 | .on('error', onError) 19 | .pipe(extractor); 20 | -------------------------------------------------------------------------------- /node_modules/tar/examples/packer.js: -------------------------------------------------------------------------------- 1 | var tar = require("../tar.js") 2 | , fstream = require("fstream") 3 | , fs = require("fs") 4 | 5 | var dirDest = fs.createWriteStream('dir.tar') 6 | 7 | 8 | function onError(err) { 9 | console.error('An error occurred:', err) 10 | } 11 | 12 | function onEnd() { 13 | console.log('Packed!') 14 | } 15 | 16 | var packer = tar.Pack({ noProprietary: true }) 17 | .on('error', onError) 18 | .on('end', onEnd); 19 | 20 | // This must be a "directory" 21 | fstream.Reader({ path: __dirname, type: "Directory" }) 22 | .on('error', onError) 23 | .pipe(packer) 24 | .pipe(dirDest) 25 | -------------------------------------------------------------------------------- /node_modules/tar/examples/reader.js: -------------------------------------------------------------------------------- 1 | var tar = require("../tar.js") 2 | , fs = require("fs") 3 | 4 | fs.createReadStream(__dirname + "/../test/fixtures/c.tar") 5 | .pipe(tar.Parse()) 6 | .on("extendedHeader", function (e) { 7 | console.error("extended pax header", e.props) 8 | e.on("end", function () { 9 | console.error("extended pax fields:", e.fields) 10 | }) 11 | }) 12 | .on("ignoredEntry", function (e) { 13 | console.error("ignoredEntry?!?", e.props) 14 | }) 15 | .on("longLinkpath", function (e) { 16 | console.error("longLinkpath entry", e.props) 17 | e.on("end", function () { 18 | console.error("value=%j", e.body.toString()) 19 | }) 20 | }) 21 | .on("longPath", function (e) { 22 | console.error("longPath entry", e.props) 23 | e.on("end", function () { 24 | console.error("value=%j", e.body.toString()) 25 | }) 26 | }) 27 | .on("entry", function (e) { 28 | console.error("entry", e.props) 29 | e.on("data", function (c) { 30 | console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) 31 | }) 32 | e.on("end", function () { 33 | console.error(" << (http://s8f.org/)", 45 | "license": "MIT", 46 | "homepage": "https://github.com/carlos8f/salty", 47 | "bugs": { 48 | "url": "https://github.com/carlos8f/salty/issues" 49 | }, 50 | "bundledDependencies": [ 51 | "balanced-match", 52 | "base-x", 53 | "block-stream", 54 | "brace-expansion", 55 | "bs58", 56 | "cli-prompt", 57 | "commander", 58 | "concat-map", 59 | "fs.realpath", 60 | "generic-pool", 61 | "glob", 62 | "graceful-fs", 63 | "graceful-readlink", 64 | "inflight", 65 | "inherits", 66 | "is-utf8", 67 | "js-scrypt", 68 | "keypress", 69 | "micro-request", 70 | "minimatch", 71 | "minimist", 72 | "mkdirp", 73 | "nacl-stream", 74 | "once", 75 | "path-is-absolute", 76 | "pempal", 77 | "progress", 78 | "rimraf", 79 | "tar-pack", 80 | "through", 81 | "tweetnacl", 82 | "wrappy" 83 | ] 84 | } 85 | -------------------------------------------------------------------------------- /utils/a.js: -------------------------------------------------------------------------------- 1 | module.exports = function (buf) { 2 | return new Uint8Array(buf) 3 | } -------------------------------------------------------------------------------- /utils/createGist.js: -------------------------------------------------------------------------------- 1 | var request = require('micro-request') 2 | 3 | function createGist (str, cb) { 4 | var data = { 5 | "description": "", 6 | "public": false, 7 | "files": { 8 | "salty.pem": { 9 | "content": str 10 | } 11 | } 12 | } 13 | var pkg = require('../package.json') 14 | var headers = { 15 | 'User-Agent': pkg.name + '/' + pkg.version 16 | } 17 | request.post('https://api.github.com/gists', {data: data, headers: headers}, function (err, resp, body) { 18 | if (err) return cb(err) 19 | if (resp.statusCode !== 201) { 20 | return cb(new Error('non-201 status from github: ' + resp.statusCode)) 21 | } 22 | cb(null, body) 23 | }) 24 | } 25 | module.exports = createGist -------------------------------------------------------------------------------- /utils/fetchGist.js: -------------------------------------------------------------------------------- 1 | var request = require('micro-request') 2 | , assert = require('assert') 3 | 4 | function fetchGist (input, cb) { 5 | var pkg = require('../package.json') 6 | var headers = { 7 | 'User-Agent': pkg.name + '/' + pkg.version 8 | } 9 | var re = /^(?:https:\/\/gist\.github\.com\/)?(?:([^\/]+)\/)?([a-f0-9]+)/ 10 | var inMatch = input.match(re) 11 | if (!inMatch) return cb(new Error('invalid gist spec')) 12 | var uri = 'https://api.github.com/gists/' + inMatch[2] 13 | request('https://api.github.com/gists/' + inMatch[2], {headers: headers}, function (err, resp, gist) { 14 | if (err) return cb(err) 15 | if (resp.statusCode !== 200) { 16 | return cb(new Error('non-200 status from github: ' + resp.statusCode)) 17 | } 18 | if (!gist.files['salty.pem']) return cb(new Error('no salty.pem found in gist')) 19 | request(gist.files['salty.pem'].raw_url, function (err, resp, body) { 20 | if (err) return cb(err) 21 | if (resp.statusCode !== 200) return cb(new Error('non-200 status from github: ' + resp.statusCode)) 22 | cb(null, body, gist) 23 | }) 24 | }) 25 | } 26 | module.exports = fetchGist -------------------------------------------------------------------------------- /utils/headersFromArgs.js: -------------------------------------------------------------------------------- 1 | var minimist = require('minimist') 2 | 3 | module.exports = function headersFromArgs () { 4 | var hArr = minimist(process.argv, { 5 | alias: {H: 'header'}, 6 | string: ['header'] 7 | }).header || [] 8 | hArr = Array.isArray(hArr) ? hArr : [hArr] 9 | var headers = {} 10 | hArr.forEach(function (arg) { 11 | var pair = arg.split(/:\s*/) 12 | if (pair.length !== 2) return 13 | headers[pair[0].toLowerCase()] = pair[1] 14 | }) 15 | return headers 16 | } -------------------------------------------------------------------------------- /utils/loadPubkey.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path') 3 | , libPubkey = require('../lib/pubkey') 4 | 5 | function loadPubkey (walletDir, cb) { 6 | /* 7 | require('child_process').exec('ls -la ' + walletDir, function (err, stdout, stderr) { 8 | if (err) throw err 9 | console.error('loadPubkey', walletDir, stdout) 10 | }) 11 | */ 12 | fs.readFile(path.join(walletDir, 'id_salty.pub'), {encoding: 'utf8'}, function (err, str) { 13 | if (err && err.code === 'ENOENT') { 14 | return cb(new Error('No salty wallet set up. Type `salty init` to make one.')) 15 | } 16 | if (err) return cb(err) 17 | try { 18 | var pubkey = libPubkey.parse(str) 19 | } 20 | catch (e) { 21 | return cb(e) 22 | } 23 | cb(null, pubkey) 24 | }) 25 | } 26 | 27 | module.exports = loadPubkey -------------------------------------------------------------------------------- /utils/loadRecipients.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path') 3 | , libPubkey = require('../lib/pubkey') 4 | , loadPubkey = require('../utils/loadPubkey') 5 | 6 | function loadRecipients (walletDir, cb) { 7 | var inFile = path.join(walletDir, 'imported_keys') 8 | inFile = path.resolve(inFile) 9 | fs.readFile(inFile, {encoding: 'utf8'}, function (err, str) { 10 | if (err && err.code !== 'ENOENT') return cb(err) 11 | var lines = (str || '').trim().split('\n') 12 | // add self 13 | loadPubkey(walletDir, function (err, pubkey) { 14 | if (err) return cb(err) 15 | var recipients = Object.create(null) 16 | if (pubkey) { 17 | recipients['self'] = pubkey 18 | lines.push(pubkey.toString()) 19 | } 20 | lines.forEach(function (line) { 21 | try { 22 | var pubkey = libPubkey.parse(line.trim()) 23 | } 24 | catch (e) { 25 | return 26 | } 27 | // base58 28 | recipients[pubkey.pubkey] = pubkey 29 | // email 30 | if (pubkey.email) recipients[pubkey.email] = pubkey 31 | }) 32 | cb(null, recipients) 33 | }) 34 | }) 35 | } 36 | module.exports = loadRecipients -------------------------------------------------------------------------------- /utils/loadWallet.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path') 3 | , prompt = require('cli-prompt') 4 | , pempal = require('pempal') 5 | , libWallet = require('../lib/wallet') 6 | , loadPubkey = require('../utils/loadPubkey') 7 | , loadRecipients = require('../utils/loadRecipients') 8 | 9 | function loadWallet (walletDir, cb) { 10 | fs.readFile(path.join(walletDir, 'id_salty'), {encoding: 'utf8'}, function (err, str) { 11 | if (err && err.code === 'ENOENT') { 12 | err = new Error('No wallet found. Type `salty init` to create one.') 13 | err.code = 'ENOENT' 14 | return cb(err) 15 | } 16 | if (err) return cb(err) 17 | function ask () { 18 | return prompt.password('Enter passphrase: ', function (passphrase) { 19 | withPrompt(passphrase) 20 | }) 21 | } 22 | if (str.indexOf('ENCRYPTED') !== -1) { 23 | console.error('Wallet is encrypted.') 24 | ask() 25 | } 26 | else withPrompt(null) 27 | function withPrompt (passphrase) { 28 | try { 29 | var pem = pempal.decode(str, {tag: 'SALTY WALLET', passphrase: passphrase}) 30 | var wallet = libWallet.parse(pem.body) 31 | } 32 | catch (e) { 33 | if (e.message === 'Bad passphrase' && passphrase) { 34 | console.error('Bad passphrase!') 35 | return ask() 36 | } 37 | return cb(e) 38 | } 39 | loadPubkey(walletDir, function (err, pubkey) { 40 | if (err) return cb(err) 41 | wallet.pubkey = pubkey 42 | loadRecipients(walletDir, function (err, recipients) { 43 | if (err) return cb(err) 44 | wallet.recipients = recipients 45 | cb(null, wallet) 46 | }) 47 | }) 48 | } 49 | }) 50 | } 51 | module.exports = loadWallet -------------------------------------------------------------------------------- /utils/makeNonce.js: -------------------------------------------------------------------------------- 1 | var nacl = require('tweetnacl') 2 | 3 | module.exports = function (len) { 4 | return Buffer.from(nacl.randomBytes(len || nacl.box.nonceLength)) 5 | } -------------------------------------------------------------------------------- /utils/printHeader.js: -------------------------------------------------------------------------------- 1 | function printHeaders (header) { 2 | var longest = 0 3 | Object.keys(header).forEach(function (k) { 4 | longest = Math.max(k.length, longest) 5 | }) 6 | console.error() 7 | Object.keys(header).forEach(function (k) { 8 | console.error(k + ':' + ' '.repeat(longest - k.length + 1) + header[k]) 9 | }) 10 | console.error() 11 | } 12 | module.exports = printHeaders -------------------------------------------------------------------------------- /utils/translateHeader.js: -------------------------------------------------------------------------------- 1 | function translateHeader (header, recipients) { 2 | if (recipients) { 3 | if (header['from-salty-id'] && recipients[header['from-salty-id']]) { 4 | header['from-salty-id'] = recipients[header['from-salty-id']].toString(true) 5 | } 6 | if (header['to-salty-id'] && recipients[header['to-salty-id']]) { 7 | header['to-salty-id'] = recipients[header['to-salty-id']].toString(true) 8 | } 9 | } 10 | return header 11 | } 12 | module.exports = translateHeader -------------------------------------------------------------------------------- /utils/writeHeader.js: -------------------------------------------------------------------------------- 1 | function writeHeader (headers) { 2 | var out = '' 3 | Object.keys(headers).forEach(function (k) { 4 | out += k + ': ' + headers[k] + '\n' 5 | }) 6 | return out 7 | } 8 | module.exports = writeHeader --------------------------------------------------------------------------------