aboutsummaryrefslogtreecommitdiff
path: root/node_modules/make-dir
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/make-dir
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/make-dir')
-rw-r--r--node_modules/make-dir/index.js85
-rw-r--r--node_modules/make-dir/license9
-rw-r--r--node_modules/make-dir/node_modules/pify/index.js84
-rw-r--r--node_modules/make-dir/node_modules/pify/license9
-rw-r--r--node_modules/make-dir/node_modules/pify/package.json51
-rw-r--r--node_modules/make-dir/node_modules/pify/readme.md131
-rw-r--r--node_modules/make-dir/package.json54
-rw-r--r--node_modules/make-dir/readme.md116
8 files changed, 0 insertions, 539 deletions
diff --git a/node_modules/make-dir/index.js b/node_modules/make-dir/index.js
deleted file mode 100644
index 18439555f..000000000
--- a/node_modules/make-dir/index.js
+++ /dev/null
@@ -1,85 +0,0 @@
-'use strict';
-const fs = require('fs');
-const path = require('path');
-const pify = require('pify');
-
-const defaults = {
- mode: 0o777 & (~process.umask()),
- fs
-};
-
-// https://github.com/nodejs/node/issues/8987
-// https://github.com/libuv/libuv/pull/1088
-const checkPath = pth => {
- if (process.platform === 'win32') {
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''));
-
- if (pathHasInvalidWinCharacters) {
- const err = new Error(`Path contains invalid characters: ${pth}`);
- err.code = 'EINVAL';
- throw err;
- }
- }
-};
-
-module.exports = (input, opts) => Promise.resolve().then(() => {
- checkPath(input);
- opts = Object.assign({}, defaults, opts);
-
- const mkdir = pify(opts.fs.mkdir);
- const stat = pify(opts.fs.stat);
-
- const make = pth => {
- return mkdir(pth, opts.mode)
- .then(() => pth)
- .catch(err => {
- if (err.code === 'ENOENT') {
- if (err.message.includes('null bytes') || path.dirname(pth) === pth) {
- throw err;
- }
-
- return make(path.dirname(pth)).then(() => make(pth));
- }
-
- return stat(pth)
- .then(stats => stats.isDirectory() ? pth : Promise.reject())
- .catch(() => {
- throw err;
- });
- });
- };
-
- return make(path.resolve(input));
-});
-
-module.exports.sync = (input, opts) => {
- checkPath(input);
- opts = Object.assign({}, defaults, opts);
-
- const make = pth => {
- try {
- opts.fs.mkdirSync(pth, opts.mode);
- } catch (err) {
- if (err.code === 'ENOENT') {
- if (err.message.includes('null bytes') || path.dirname(pth) === pth) {
- throw err;
- }
-
- make(path.dirname(pth));
- return make(pth);
- }
-
- try {
- if (!opts.fs.statSync(pth).isDirectory()) {
- throw new Error('The path is not a directory');
- }
- } catch (_) {
- throw err;
- }
- }
-
- return pth;
- };
-
- return make(path.resolve(input));
-};
diff --git a/node_modules/make-dir/license b/node_modules/make-dir/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/make-dir/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-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/node_modules/make-dir/node_modules/pify/index.js b/node_modules/make-dir/node_modules/pify/index.js
deleted file mode 100644
index 1dee43ad0..000000000
--- a/node_modules/make-dir/node_modules/pify/index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict';
-
-const processFn = (fn, opts) => function () {
- const P = opts.promiseModule;
- const args = new Array(arguments.length);
-
- for (let i = 0; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
-
- return new P((resolve, reject) => {
- if (opts.errorFirst) {
- args.push(function (err, result) {
- if (opts.multiArgs) {
- const results = new Array(arguments.length - 1);
-
- for (let i = 1; i < arguments.length; i++) {
- results[i - 1] = arguments[i];
- }
-
- if (err) {
- results.unshift(err);
- reject(results);
- } else {
- resolve(results);
- }
- } else if (err) {
- reject(err);
- } else {
- resolve(result);
- }
- });
- } else {
- args.push(function (result) {
- if (opts.multiArgs) {
- const results = new Array(arguments.length - 1);
-
- for (let i = 0; i < arguments.length; i++) {
- results[i] = arguments[i];
- }
-
- resolve(results);
- } else {
- resolve(result);
- }
- });
- }
-
- fn.apply(this, args);
- });
-};
-
-module.exports = (obj, opts) => {
- opts = Object.assign({
- exclude: [/.+(Sync|Stream)$/],
- errorFirst: true,
- promiseModule: Promise
- }, opts);
-
- const filter = key => {
- const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
- return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
- };
-
- let ret;
- if (typeof obj === 'function') {
- ret = function () {
- if (opts.excludeMain) {
- return obj.apply(this, arguments);
- }
-
- return processFn(obj, opts).apply(this, arguments);
- };
- } else {
- ret = Object.create(Object.getPrototypeOf(obj));
- }
-
- for (const key in obj) { // eslint-disable-line guard-for-in
- const x = obj[key];
- ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;
- }
-
- return ret;
-};
diff --git a/node_modules/make-dir/node_modules/pify/license b/node_modules/make-dir/node_modules/pify/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/make-dir/node_modules/pify/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-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/node_modules/make-dir/node_modules/pify/package.json b/node_modules/make-dir/node_modules/pify/package.json
deleted file mode 100644
index 468d85760..000000000
--- a/node_modules/make-dir/node_modules/pify/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "pify",
- "version": "3.0.0",
- "description": "Promisify a callback-style function",
- "license": "MIT",
- "repository": "sindresorhus/pify",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava && npm run optimization-test",
- "optimization-test": "node --allow-natives-syntax optimization-test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "promises",
- "promisify",
- "all",
- "denodify",
- "denodeify",
- "callback",
- "cb",
- "node",
- "then",
- "thenify",
- "convert",
- "transform",
- "wrap",
- "wrapper",
- "bind",
- "to",
- "async",
- "await",
- "es2015",
- "bluebird"
- ],
- "devDependencies": {
- "ava": "*",
- "pinkie-promise": "^2.0.0",
- "v8-natives": "^1.0.0",
- "xo": "*"
- }
-}
diff --git a/node_modules/make-dir/node_modules/pify/readme.md b/node_modules/make-dir/node_modules/pify/readme.md
deleted file mode 100644
index 376ca4e59..000000000
--- a/node_modules/make-dir/node_modules/pify/readme.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
-
-> Promisify a callback-style function
-
-
-## Install
-
-```
-$ npm install --save pify
-```
-
-
-## Usage
-
-```js
-const fs = require('fs');
-const pify = require('pify');
-
-// Promisify a single function
-pify(fs.readFile)('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-
-// Promisify all methods in a module
-pify(fs).readFile('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-```
-
-
-## API
-
-### pify(input, [options])
-
-Returns a `Promise` wrapped version of the supplied function or module.
-
-#### input
-
-Type: `Function` `Object`
-
-Callback-style function or module whose methods you want to promisify.
-
-#### options
-
-##### multiArgs
-
-Type: `boolean`<br>
-Default: `false`
-
-By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error.
-
-```js
-const request = require('request');
-const pify = require('pify');
-
-pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
- const [httpResponse, body] = result;
-});
-```
-
-##### include
-
-Type: `string[]` `RegExp[]`
-
-Methods in a module to promisify. Remaining methods will be left untouched.
-
-##### exclude
-
-Type: `string[]` `RegExp[]`<br>
-Default: `[/.+(Sync|Stream)$/]`
-
-Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
-
-##### excludeMain
-
-Type: `boolean`<br>
-Default: `false`
-
-If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module.
-
-```js
-const pify = require('pify');
-
-function fn() {
- return true;
-}
-
-fn.method = (data, callback) => {
- setImmediate(() => {
- callback(null, data);
- });
-};
-
-// Promisify methods but not `fn()`
-const promiseFn = pify(fn, {excludeMain: true});
-
-if (promiseFn()) {
- promiseFn.method('hi').then(data => {
- console.log(data);
- });
-}
-```
-
-##### errorFirst
-
-Type: `boolean`<br>
-Default: `true`
-
-Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc.
-
-##### promiseModule
-
-Type: `Function`
-
-Custom promise module to use instead of the native one.
-
-Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
-
-
-## Related
-
-- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted
-- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/make-dir/package.json b/node_modules/make-dir/package.json
deleted file mode 100644
index ec907a71f..000000000
--- a/node_modules/make-dir/package.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "name": "make-dir",
- "version": "1.3.0",
- "description": "Make a directory and its parents if needed - Think `mkdir -p`",
- "license": "MIT",
- "repository": "sindresorhus/make-dir",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && nyc ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "mkdir",
- "mkdirp",
- "make",
- "directories",
- "dir",
- "dirs",
- "folders",
- "directory",
- "folder",
- "path",
- "parent",
- "parents",
- "intermediate",
- "recursively",
- "recursive",
- "create",
- "fs",
- "filesystem",
- "file-system"
- ],
- "dependencies": {
- "pify": "^3.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "codecov": "^3.0.0",
- "graceful-fs": "^4.1.11",
- "nyc": "^11.3.0",
- "path-type": "^3.0.0",
- "tempy": "^0.2.1",
- "xo": "^0.20.0"
- }
-}
diff --git a/node_modules/make-dir/readme.md b/node_modules/make-dir/readme.md
deleted file mode 100644
index 8a32bf471..000000000
--- a/node_modules/make-dir/readme.md
+++ /dev/null
@@ -1,116 +0,0 @@
-# make-dir [![Build Status: macOS & Linux](https://travis-ci.org/sindresorhus/make-dir.svg?branch=master)](https://travis-ci.org/sindresorhus/make-dir) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/e0vtt8y600w91gcs/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/make-dir/branch/master) [![codecov](https://codecov.io/gh/sindresorhus/make-dir/branch/master/graph/badge.svg)](https://codecov.io/gh/sindresorhus/make-dir)
-
-> Make a directory and its parents if needed - Think `mkdir -p`
-
-
-## Advantages over [`mkdirp`](https://github.com/substack/node-mkdirp)
-
-- Promise API *(Async/await ready!)*
-- Fixes many `mkdirp` issues: [#96](https://github.com/substack/node-mkdirp/pull/96) [#70](https://github.com/substack/node-mkdirp/issues/70) [#66](https://github.com/substack/node-mkdirp/issues/66)
-- 100% test coverage
-- CI-tested on macOS, Linux, and Windows
-- Actively maintained
-- Doesn't bundle a CLI
-
-
-## Install
-
-```
-$ npm install make-dir
-```
-
-
-## Usage
-
-```
-$ pwd
-/Users/sindresorhus/fun
-$ tree
-.
-```
-
-```js
-const makeDir = require('make-dir');
-
-makeDir('unicorn/rainbow/cake').then(path => {
- console.log(path);
- //=> '/Users/sindresorhus/fun/unicorn/rainbow/cake'
-});
-```
-
-```
-$ tree
-.
-└── unicorn
- └── rainbow
- └── cake
-```
-
-Multiple directories:
-
-```js
-const makeDir = require('make-dir');
-
-Promise.all([
- makeDir('unicorn/rainbow')
- makeDir('foo/bar')
-]).then(paths => {
- console.log(paths);
- /*
- [
- '/Users/sindresorhus/fun/unicorn/rainbow',
- '/Users/sindresorhus/fun/foo/bar'
- ]
- */
-});
-```
-
-
-## API
-
-### makeDir(path, [options])
-
-Returns a `Promise` for the path to the created directory.
-
-### makeDir.sync(path, [options])
-
-Returns the path to the created directory.
-
-#### path
-
-Type: `string`
-
-Directory to create.
-
-#### options
-
-Type: `Object`
-
-##### mode
-
-Type: `integer`<br>
-Default: `0o777 & (~process.umask())`
-
-Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/).
-
-##### fs
-
-Type: `Object`<br>
-Default: `require('fs')`
-
-Use a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs).
-
-
-## Related
-
-- [make-dir-cli](https://github.com/sindresorhus/make-dir-cli) - CLI for this module
-- [del](https://github.com/sindresorhus/del) - Delete files and directories
-- [globby](https://github.com/sindresorhus/globby) - User-friendly glob matching
-- [cpy](https://github.com/sindresorhus/cpy) - Copy files
-- [cpy-cli](https://github.com/sindresorhus/cpy-cli) - Copy files on the command-line
-- [move-file](https://github.com/sindresorhus/move-file) - Move a file
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)