diff options
Diffstat (limited to 'deps/npm/node_modules/update-notifier/node_modules/configstore')
19 files changed, 1219 insertions, 0 deletions
diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/index.js new file mode 100644 index 0000000000..798323e06d --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/index.js @@ -0,0 +1,98 @@ +'use strict'; +const path = require('path'); +const os = require('os'); +const fs = require('graceful-fs'); +const mkdirp = require('mkdirp'); +const xdgBasedir = require('xdg-basedir'); +const writeFileAtomic = require('write-file-atomic'); +const dotProp = require('dot-prop'); +const uniqueString = require('unique-string'); + +const configDir = xdgBasedir.config || path.join(os.tmpdir(), uniqueString()); +const permissionError = 'You don\'t have access to this file.'; +const defaultPathMode = 0o0700; +const writeFileOptions = {mode: 0o0600}; + +class Configstore { + constructor(id, defaults, opts) { + opts = opts || {}; + + const pathPrefix = opts.globalConfigPath ? + path.join(id, 'config.json') : + path.join('configstore', `${id}.json`); + + this.path = path.join(configDir, pathPrefix); + this.all = Object.assign({}, defaults, this.all); + } + get all() { + try { + return JSON.parse(fs.readFileSync(this.path, 'utf8')); + } catch (err) { + // Create dir if it doesn't exist + if (err.code === 'ENOENT') { + mkdirp.sync(path.dirname(this.path), defaultPathMode); + return {}; + } + + // Improve the message of permission errors + if (err.code === 'EACCES') { + err.message = `${err.message}\n${permissionError}\n`; + } + + // Empty the file if it encounters invalid JSON + if (err.name === 'SyntaxError') { + writeFileAtomic.sync(this.path, '', writeFileOptions); + return {}; + } + + throw err; + } + } + set all(val) { + try { + // Make sure the folder exists as it could have been deleted in the meantime + mkdirp.sync(path.dirname(this.path), defaultPathMode); + + writeFileAtomic.sync(this.path, JSON.stringify(val, null, '\t'), writeFileOptions); + } catch (err) { + // Improve the message of permission errors + if (err.code === 'EACCES') { + err.message = `${err.message}\n${permissionError}\n`; + } + + throw err; + } + } + get size() { + return Object.keys(this.all || {}).length; + } + get(key) { + return dotProp.get(this.all, key); + } + set(key, val) { + const config = this.all; + + if (arguments.length === 1) { + for (const k of Object.keys(key)) { + dotProp.set(config, k, key[k]); + } + } else { + dotProp.set(config, key, val); + } + + this.all = config; + } + has(key) { + return dotProp.has(this.all, key); + } + delete(key) { + const config = this.all; + dotProp.delete(config, key); + this.all = config; + } + clear() { + this.all = {}; + } +} + +module.exports = Configstore; diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js new file mode 100644 index 0000000000..59a0e22644 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/index.js @@ -0,0 +1,120 @@ +'use strict'; +const isObj = require('is-obj'); + +function getPathSegments(path) { + const pathArr = path.split('.'); + const parts = []; + + for (let i = 0; i < pathArr.length; i++) { + let p = pathArr[i]; + + while (p[p.length - 1] === '\\' && pathArr[i + 1] !== undefined) { + p = p.slice(0, -1) + '.'; + p += pathArr[++i]; + } + + parts.push(p); + } + + return parts; +} + +module.exports = { + get(obj, path, value) { + if (!isObj(obj) || typeof path !== 'string') { + return value === undefined ? obj : value; + } + + const pathArr = getPathSegments(path); + + for (let i = 0; i < pathArr.length; i++) { + if (!Object.prototype.propertyIsEnumerable.call(obj, pathArr[i])) { + return value; + } + + obj = obj[pathArr[i]]; + + if (obj === undefined || obj === null) { + // `obj` is either `undefined` or `null` so we want to stop the loop, and + // if this is not the last bit of the path, and + // if it did't return `undefined` + // it would return `null` if `obj` is `null` + // but we want `get({foo: null}, 'foo.bar')` to equal `undefined`, or the supplied value, not `null` + if (i !== pathArr.length - 1) { + return value; + } + + break; + } + } + + return obj; + }, + + set(obj, path, value) { + if (!isObj(obj) || typeof path !== 'string') { + return; + } + + const pathArr = getPathSegments(path); + + for (let i = 0; i < pathArr.length; i++) { + const p = pathArr[i]; + + if (!isObj(obj[p])) { + obj[p] = {}; + } + + if (i === pathArr.length - 1) { + obj[p] = value; + } + + obj = obj[p]; + } + }, + + delete(obj, path) { + if (!isObj(obj) || typeof path !== 'string') { + return; + } + + const pathArr = getPathSegments(path); + + for (let i = 0; i < pathArr.length; i++) { + const p = pathArr[i]; + + if (i === pathArr.length - 1) { + delete obj[p]; + return; + } + + obj = obj[p]; + + if (!isObj(obj)) { + return; + } + } + }, + + has(obj, path) { + if (!isObj(obj) || typeof path !== 'string') { + return false; + } + + const pathArr = getPathSegments(path); + + for (let i = 0; i < pathArr.length; i++) { + if (isObj(obj)) { + if (!(pathArr[i] in obj)) { + return false; + } + + obj = obj[pathArr[i]]; + } else { + return false; + } + } + + return true; + } +}; diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license new file mode 100644 index 0000000000..654d0bfe94 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js new file mode 100644 index 0000000000..4d023bc690 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/index.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = function (x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +}; diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license new file mode 100644 index 0000000000..654d0bfe94 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json new file mode 100644 index 0000000000..4bee1cda73 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "is-obj@^1.0.0", + "scope": null, + "escapedName": "is-obj", + "name": "is-obj", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop" + ] + ], + "_from": "is-obj@>=1.0.0 <2.0.0", + "_id": "is-obj@1.0.1", + "_inCache": true, + "_location": "/update-notifier/configstore/dot-prop/is-obj", + "_nodeVersion": "4.3.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/is-obj-1.0.1.tgz_1458641652447_0.6715397178195417" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "raw": "is-obj@^1.0.0", + "scope": null, + "escapedName": "is-obj", + "name": "is-obj", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/update-notifier/configstore/dot-prop" + ], + "_resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "_shasum": "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f", + "_shrinkwrap": null, + "_spec": "is-obj@^1.0.0", + "_where": "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-obj/issues" + }, + "dependencies": {}, + "description": "Check if a value is an object", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f", + "tarball": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7438be7393348bf65cbc2330446666bb7fc2c2da", + "homepage": "https://github.com/sindresorhus/is-obj#readme", + "keywords": [ + "obj", + "object", + "is", + "check", + "test", + "type" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-obj", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-obj.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md new file mode 100644 index 0000000000..d311026430 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/node_modules/is-obj/readme.md @@ -0,0 +1,34 @@ +# is-obj [![Build Status](https://travis-ci.org/sindresorhus/is-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-obj) + +> Check if a value is an object + +Keep in mind that array, function, regexp, etc, are objects in JavaScript.<br> +See [`is-plain-obj`](https://github.com/sindresorhus/is-plain-obj) if you want to check for plain objects. + + +## Install + +``` +$ npm install --save is-obj +``` + + +## Usage + +```js +const isObj = require('is-obj'); + +isObj({foo: 'bar'}); +//=> true + +isObj([1, 2, 3]); +//=> true + +isObj('foo'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json new file mode 100644 index 0000000000..f4204a1ad4 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "raw": "dot-prop@^4.1.0", + "scope": null, + "escapedName": "dot-prop", + "name": "dot-prop", + "rawSpec": "^4.1.0", + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/zkat/Documents/code/npm/node_modules/update-notifier/node_modules/configstore" + ] + ], + "_from": "dot-prop@>=4.1.0 <5.0.0", + "_id": "dot-prop@4.1.1", + "_inCache": true, + "_location": "/update-notifier/configstore/dot-prop", + "_nodeVersion": "4.6.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/dot-prop-4.1.1.tgz_1487442351691_0.9279007718432695" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "raw": "dot-prop@^4.1.0", + "scope": null, + "escapedName": "dot-prop", + "name": "dot-prop", + "rawSpec": "^4.1.0", + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/update-notifier/configstore" + ], + "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.1.1.tgz", + "_shasum": "a8493f0b7b5eeec82525b5c7587fa7de7ca859c1", + "_shrinkwrap": null, + "_spec": "dot-prop@^4.1.0", + "_where": "/Users/zkat/Documents/code/npm/node_modules/update-notifier/node_modules/configstore", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/dot-prop/issues" + }, + "dependencies": { + "is-obj": "^1.0.0" + }, + "description": "Get, set, or delete a property from a nested object using a dot path", + "devDependencies": { + "ava": "*", + "matcha": "^0.7.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a8493f0b7b5eeec82525b5c7587fa7de7ca859c1", + "tarball": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.1.1.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "49f0809db1201f2cf13735de4f3631191a692658", + "homepage": "https://github.com/sindresorhus/dot-prop#readme", + "keywords": [ + "obj", + "object", + "prop", + "property", + "dot", + "path", + "get", + "set", + "delete", + "del", + "access", + "notation", + "dotty" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "dot-prop", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/dot-prop.git" + }, + "scripts": { + "bench": "matcha bench.js", + "test": "xo && ava" + }, + "version": "4.1.1", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md new file mode 100644 index 0000000000..f612c47f7a --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/dot-prop/readme.md @@ -0,0 +1,97 @@ +# dot-prop [![Build Status](https://travis-ci.org/sindresorhus/dot-prop.svg?branch=master)](https://travis-ci.org/sindresorhus/dot-prop) + +> Get, set, or delete a property from a nested object using a dot path + + +## Install + +``` +$ npm install --save dot-prop +``` + + +## Usage + +```js +const dotProp = require('dot-prop'); + +// getter +dotProp.get({foo: {bar: 'unicorn'}}, 'foo.bar'); +//=> 'unicorn' + +dotProp.get({foo: {bar: 'a'}}, 'foo.notDefined.deep'); +//=> undefined + +dotProp.get({foo: {bar: 'a'}}, 'foo.notDefined.deep', 'default value'); +//=> 'default value' + +dotProp.get({foo: {'dot.dot': 'unicorn'}}, 'foo.dot\\.dot'); +//=> 'unicorn' + +// setter +const obj = {foo: {bar: 'a'}}; +dotProp.set(obj, 'foo.bar', 'b'); +console.log(obj); +//=> {foo: {bar: 'b'}} + +dotProp.set(obj, 'foo.baz', 'x'); +console.log(obj); +//=> {foo: {bar: 'b', baz: 'x'}} + +// has +dotProp.has({foo: {bar: 'unicorn'}}, 'foo.bar'); +//=> true + +// deleter +const obj = {foo: {bar: 'a'}}; +dotProp.delete(obj, 'foo.bar'); +console.log(obj); +//=> {foo: {}} + +obj.foo.bar = {x: 'y', y: 'x'}; +dotProp.delete(obj, 'foo.bar.x'); +console.log(obj); +//=> {foo: {bar: {y: 'x'}}} +``` + + +## API + +### get(obj, path, [defaultValue]) + +### set(obj, path, value) + +### has(obj, path) + +### delete(obj, path) + +#### obj + +Type: `Object` + +Object to get, set, or delete the `path` value. + +#### path + +Type: `string` + +Path of the property in the object, using `.` to separate each nested key. + +Use `\\.` if you have a `.` in the key. + +#### value + +Type: `any` + +Value to set at `path`. + +#### defaultValue + +Type: `any` + +Default value. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/index.js new file mode 100644 index 0000000000..5bc7787f4b --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/index.js @@ -0,0 +1,4 @@ +'use strict'; +const cryptoRandomString = require('crypto-random-string'); + +module.exports = () => cryptoRandomString(32); diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/license new file mode 100644 index 0000000000..654d0bfe94 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js new file mode 100644 index 0000000000..ceaf65bfcf --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/index.js @@ -0,0 +1,10 @@ +'use strict'; +const crypto = require('crypto'); + +module.exports = len => { + if (!Number.isFinite(len)) { + throw new TypeError('Expected a finite number'); + } + + return crypto.randomBytes(Math.ceil(len / 2)).toString('hex').slice(0, len); +}; diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license new file mode 100644 index 0000000000..654d0bfe94 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json new file mode 100644 index 0000000000..7c707f898a --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "crypto-random-string@^1.0.0", + "scope": null, + "escapedName": "crypto-random-string", + "name": "crypto-random-string", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string" + ] + ], + "_from": "crypto-random-string@>=1.0.0 <2.0.0", + "_id": "crypto-random-string@1.0.0", + "_inCache": true, + "_location": "/update-notifier/configstore/unique-string/crypto-random-string", + "_nodeVersion": "4.6.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/crypto-random-string-1.0.0.tgz_1479096882597_0.12821740517392755" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "crypto-random-string@^1.0.0", + "scope": null, + "escapedName": "crypto-random-string", + "name": "crypto-random-string", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/update-notifier/configstore/unique-string" + ], + "_resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "_shasum": "a230f64f568310e1498009940790ec99545bca7e", + "_shrinkwrap": null, + "_spec": "crypto-random-string@^1.0.0", + "_where": "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/crypto-random-string/issues" + }, + "dependencies": {}, + "description": "Generate a cryptographically strong random string", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a230f64f568310e1498009940790ec99545bca7e", + "tarball": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "21960c996c3f77cf5f7bf6765e837e7c8a07e200", + "homepage": "https://github.com/sindresorhus/crypto-random-string#readme", + "keywords": [ + "random", + "string", + "str", + "rand", + "text", + "id", + "identifier", + "slug", + "salt", + "crypto", + "strong", + "secure", + "hex" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "crypto-random-string", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/crypto-random-string.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md new file mode 100644 index 0000000000..dab5a2e9c2 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/node_modules/crypto-random-string/readme.md @@ -0,0 +1,49 @@ +# crypto-random-string [![Build Status](https://travis-ci.org/sindresorhus/crypto-random-string.svg?branch=master)](https://travis-ci.org/sindresorhus/crypto-random-string) + +> Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string + +Can be useful for creating an identifier, slug, salt, fixture, etc. + + +## Install + +``` +$ npm install --save crypto-random-string +``` + + +## Usage + +```js +const cryptoRandomString = require('crypto-random-string'); + +cryptoRandomString(10); +//=> '2cf05d94db' +``` + + +## API + +### cryptoRandomString(length) + +#### length + +Type: `number` + +Length of the returned string. + + +## Related + +- [random-int](https://github.com/sindresorhus/random-int) - Generate a random integer +- [random-float](https://github.com/sindresorhus/random-float) - Generate a random float +- [random-item](https://github.com/sindresorhus/random-item) - Get a random item from an array +- [random-boolean](https://github.com/arthurvr/random-boolean) - Get a random boolean +- [random-obj-key](https://github.com/sindresorhus/random-obj-key) - Get a random key from an object +- [random-obj-prop](https://github.com/sindresorhus/random-obj-prop) - Get a random property from an object +- [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/package.json new file mode 100644 index 0000000000..0c4223e004 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "unique-string@^1.0.0", + "scope": null, + "escapedName": "unique-string", + "name": "unique-string", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore" + ] + ], + "_from": "unique-string@>=1.0.0 <2.0.0", + "_id": "unique-string@1.0.0", + "_inCache": true, + "_location": "/update-notifier/configstore/unique-string", + "_nodeVersion": "4.6.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/unique-string-1.0.0.tgz_1479097654250_0.7648377516306937" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "unique-string@^1.0.0", + "scope": null, + "escapedName": "unique-string", + "name": "unique-string", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/update-notifier/configstore" + ], + "_resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "_shasum": "9e1057cca851abb93398f8b33ae187b99caec11a", + "_shrinkwrap": null, + "_spec": "unique-string@^1.0.0", + "_where": "/Users/ceej/code/Tools/npm/node_modules/update-notifier/node_modules/configstore", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/unique-string/issues" + }, + "dependencies": { + "crypto-random-string": "^1.0.0" + }, + "description": "Generate a unique random string", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "9e1057cca851abb93398f8b33ae187b99caec11a", + "tarball": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "157a6b74fb44cf5d4ee2aa579502b967edbf4203", + "homepage": "https://github.com/sindresorhus/unique-string#readme", + "keywords": [ + "unique", + "string", + "random", + "uniq", + "str", + "rand", + "text", + "id", + "identifier", + "slug", + "hex" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "unique-string", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/unique-string.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/readme.md new file mode 100644 index 0000000000..5d5ac971e4 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/node_modules/unique-string/readme.md @@ -0,0 +1,32 @@ +# unique-string [![Build Status](https://travis-ci.org/sindresorhus/unique-string.svg?branch=master)](https://travis-ci.org/sindresorhus/unique-string) + +> Generate a unique random string + + +## Install + +``` +$ npm install --save unique-string +``` + + +## Usage + +```js +const uniqueString = require('unique-string'); + +uniqueString(); +//=> 'b4de2a49c8ffa3fbee04446f045483b2' +``` + + +## API + +### uniqueString() + +Returns a 32 character unique string. Matches the length of MD5, which is [unique enough](http://stackoverflow.com/a/2444336/64949) for non-crypto purposes. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/package.json b/deps/npm/node_modules/update-notifier/node_modules/configstore/package.json new file mode 100644 index 0000000000..008fd14176 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + { + "raw": "configstore@^3.0.0", + "scope": null, + "escapedName": "configstore", + "name": "configstore", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/Users/ceej/code/Tools/npm/node_modules/update-notifier" + ] + ], + "_from": "configstore@>=3.0.0 <4.0.0", + "_id": "configstore@3.0.0", + "_inCache": true, + "_location": "/update-notifier/configstore", + "_nodeVersion": "4.6.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/configstore-3.0.0.tgz_1486992079317_0.31415490387007594" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "raw": "configstore@^3.0.0", + "scope": null, + "escapedName": "configstore", + "name": "configstore", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.0.0.tgz", + "_shasum": "e1b8669c1803ccc50b545e92f8e6e79aa80e0196", + "_shrinkwrap": null, + "_spec": "configstore@^3.0.0", + "_where": "/Users/ceej/code/Tools/npm/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/yeoman/configstore/issues" + }, + "dependencies": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^1.1.2", + "xdg-basedir": "^3.0.0" + }, + "description": "Easily load and save config without having to think about where and how", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "e1b8669c1803ccc50b545e92f8e6e79aa80e0196", + "tarball": "https://registry.npmjs.org/configstore/-/configstore-3.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "7ce00b4ce61ed2099388e1d476967a8cd8ff572a", + "homepage": "https://github.com/yeoman/configstore#readme", + "keywords": [ + "config", + "store", + "storage", + "conf", + "configuration", + "settings", + "preferences", + "json", + "data", + "persist", + "persistent", + "save" + ], + "license": "BSD-2-Clause", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "addyosmani", + "email": "addyosmani@gmail.com" + }, + { + "name": "passy", + "email": "phartig@rdrei.net" + }, + { + "name": "sboudrias", + "email": "admin@simonboudrias.com" + }, + { + "name": "eddiemonge", + "email": "eddie+npm@eddiemonge.com" + }, + { + "name": "arthurvr", + "email": "contact@arthurverschaeve.be" + } + ], + "name": "configstore", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/yeoman/configstore.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/deps/npm/node_modules/update-notifier/node_modules/configstore/readme.md b/deps/npm/node_modules/update-notifier/node_modules/configstore/readme.md new file mode 100644 index 0000000000..85987223a1 --- /dev/null +++ b/deps/npm/node_modules/update-notifier/node_modules/configstore/readme.md @@ -0,0 +1,114 @@ +# configstore [![Build Status](https://travis-ci.org/yeoman/configstore.svg?branch=master)](https://travis-ci.org/yeoman/configstore) + +> Easily load and persist config without having to think about where and how + +Config is stored in a JSON file located in `$XDG_CONFIG_HOME` or `~/.config`.<br> +Example: `~/.config/configstore/some-id.json` + + +## Usage + +```js +const Configstore = require('configstore'); +const pkg = require('./package.json'); + +// create a Configstore instance with an unique ID e.g. +// Package name and optionally some default values +const conf = new Configstore(pkg.name, {foo: 'bar'}); + +console.log(conf.get('foo')); +//=> 'bar' + +conf.set('awesome', true); +console.log(conf.get('awesome')); +//=> true + +// Use dot-notation to access nested properties +conf.set('bar.baz', true); +console.log(conf.get('bar')); +//=> {baz: true} + +conf.delete('awesome'); +console.log(conf.get('awesome')); +//=> undefined +``` + + +## API + +### Configstore(packageName, [defaults], [options]) + +Returns a new instance. + +#### packageName + +Type: `string` + +Name of your package. + +#### defaults + +Type: `Object` + +Default config. + +#### options + +##### globalConfigPath + +Type: `boolean`<br> +Default: `false` + +Store the config at `$CONFIG/package-name/config.json` instead of the default `$CONFIG/configstore/package-name.json`. This is not recommended as you might end up conflicting with other tools, rendering the "without having to think" idea moot. + +### Instance + +You can use [dot-notation](https://github.com/sindresorhus/dot-prop) in a `key` to access nested properties. + +### .set(key, value) + +Set an item. + +### .set(object) + +Set multiple items at once. + +### .get(key) + +Get an item. + +### .has(key) + +Check if an item exists. + +### .delete(key) + +Delete an item. + +### .clear() + +Delete all items. + +### .size + +Get the item count. + +### .path + +Get the path to the config file. Can be used to show the user where the config file is located or even better open it for them. + +### .all + +Get all the config as an object or replace the current config with an object: + +```js +conf.all = { + hello: 'world' +}; +``` + + +## License + +[BSD license](http://opensource.org/licenses/bsd-license.php)<br> +Copyright Google |