initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

7
node_modules/fileset/.babelrc generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
]
}

1
node_modules/fileset/.eslintignore generated vendored Normal file
View File

@@ -0,0 +1 @@
src

18
node_modules/fileset/.eslintrc generated vendored Normal file
View File

@@ -0,0 +1,18 @@
{
"env": {
"es6": true,
"mocha": true
},
"parserOptions": {
"sourceType": "module"
},
"extends": "standard",
"rules": {
"semi": ["error", "always"],
"no-multi-spaces": ["error", { "exceptions": { "VariableDeclarator": true } }],
"promise/param-names": 0
}
}

0
node_modules/fileset/.npmignore generated vendored Normal file
View File

8
node_modules/fileset/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,8 @@
language: node_js
node_js:
- '6'
- '5'
- '4'
- '0.12'
- '0.10'

65
node_modules/fileset/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,65 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="2.0.2"></a>
## [2.0.2](https://github.com/mklabs/node-fileset/compare/v1.0.1...v2.0.2) (2016-06-27)
<a name="2.0.0"></a>
## [2.0.0](https://github.com/mklabs/node-fileset/compare/v1.0.1...v2.0.0) (2016-06-26)
<a name="1.0.1"></a>
## [1.0.1](https://github.com/mklabs/node-fileset/compare/v1.0.0...v1.0.1) (2016-06-01)
<a name="1.0.0"></a>
# [1.0.0](https://github.com/mklabs/node-fileset/compare/v0.2.1...v1.0.0) (2016-06-01)
### Bug Fixes
* update old tests to use mocha instead ([f4e0d8e](https://github.com/mklabs/node-fileset/commit/f4e0d8e))
### Features
* **sync:** always ignore node_modules in sync mode ([c6593c0](https://github.com/mklabs/node-fileset/commit/c6593c0))
* update glob 7 ([954bab5](https://github.com/mklabs/node-fileset/commit/954bab5))
### BREAKING CHANGES
* Includes an update to glob / minimatch. As described in
378de99522caf7b665c53472a34a41a0b295b489
> Since glob 6 removes support for comment and negation patterns, this may
> or may not be a breaking change from fileset's pov.
## Changelog
- Releases: https://github.com/mklabs/node-fileset/releases
### 0.2.1
- Sync API
### 0.2.0
- Drop support for 0.8
- PR mklabs/node-fileset#14 reapplied
- [Minor code style changes](bf8afae22a49cf64720177d6036090db2852d744)
### 0.1.8
- PR mklabs/node-fileset#17 - Reverts PR#14
### 0.1.6 / 0.1.7
- PR mklabs/node-fileset#14
### 0.1.x
- Initial commit

22
node_modules/fileset/LICENSE-MIT generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2012-2016 Mickael Daniel
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.

27
node_modules/fileset/Makefile generated vendored Normal file
View File

@@ -0,0 +1,27 @@
all: help
help:
bake -h
test:
cd test && ../node_modules/.bin/mocha -R spec .
eslint:
eslint .
fix:
eslint . --fix
release: version push publish
version:
standard-version -m '%s'
push:
git push origin master --tags
publish:
npm publish
.PHONY: test

97
node_modules/fileset/README.md generated vendored Normal file
View File

@@ -0,0 +1,97 @@
# node-fileset [![Build Status](https://secure.travis-ci.org/mklabs/node-fileset.png)](http://travis-ci.org/mklabs/node-fileset)
Exposes a basic wrapper on top of
[Glob](https://github.com/isaacs/node-glob) /
[minimatch](https://github.com/isaacs/minimatch) combo both written by
@isaacs. Glob now uses JavaScript instead of C++ bindings which makes it
usable in Node.js 0.6.x and Windows platforms.
[![NPM](https://nodei.co/npm/fileset.png?downloads=true&stars=true)](https://nodei.co/npm/fileset/)
Adds multiples patterns matching and exlude ability. This is
basically just a sugar API syntax where you can specify a list of includes
and optional exclude patterns. It works by setting up the necessary
miniglob "fileset" and filtering out the results using minimatch.
*[Changelog](https://github.com/mklabs/node-fileset/blob/master/CHANGELOG.md#changelog)*
## Install
npm install fileset
## Usage
Can be used with callback or emitter style.
* **include**: list of glob patterns `foo/**/*.js *.md src/lib/**/*`
* **exclude**: *optional* list of glob patterns to filter include
results `foo/**/*.js *.md`
* **callback**: *optional* function that gets called with an error if
something wrong happend, otherwise null with an array of results
The callback is optional since the fileset method return an instance of
EventEmitter which emit different events you might use:
* *match*: Every time a match is found, miniglob emits this event with
the pattern.
* *include*: Emitted each time an include match is found.
* *exclude*: Emitted each time an exclude match is found and filtered
out from the fileset.
* *end*: Emitted when the matching is finished with all the matches
found, optionally filtered by the exclude patterns.
#### Callback
```js
var fileset = require('fileset');
fileset('**/*.js', '**.min.js', function(err, files) {
if (err) return console.error(err);
console.log('Files: ', files.length);
console.log(files);
});
```
#### Event emitter
```js
var fileset = require('fileset');
fileset('**.coffee README.md *.json Cakefile **.js', 'node_modules/**')
.on('match', console.log.bind(console, 'error'))
.on('include', console.log.bind(console, 'includes'))
.on('exclude', console.log.bind(console, 'excludes'))
.on('end', console.log.bind(console, 'end'));
```
`fileset` returns an instance of EventEmitter, with an `includes` property
which is the array of Fileset objects (inheriting from
`miniglob.Miniglob`) that were used during the mathing process, should
you want to use them individually.
Check out the
[tests](https://github.com/mklabs/node-fileset/tree/master/tests) for
more examples.
## Sync usage
```js
var results = fileset.sync('*.md *.js', 'CHANGELOG.md node_modules/**/*.md node_modules/**/*.js');
```
The behavior should remain the same, although it lacks the last `options` arguments to pass to internal `glob` and `minimatch` dependencies.
## Tests
Run `npm test`
## Why
Mainly for a build tool with cake files, to provide me an easy way to get
a list of files by either using glob or path patterns, optionally
allowing exclude patterns to filter out the results.
All the magic is happening in
[Glob](https://github.com/isaacs/node-glob) and
[minimatch](https://github.com/isaacs/minimatch). Check them out!

108
node_modules/fileset/lib/fileset.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
var util = require('util');
var minimatch = require('minimatch');
var glob = require('glob');
var Glob = glob.Glob;
var EventEmitter = require('events').EventEmitter;
module.exports = fileset;
// Async API
function fileset(include, exclude, options, cb) {
if (typeof exclude === 'function') cb = exclude, exclude = '';
else if (typeof options === 'function') cb = options, options = {};
var includes = (typeof include === 'string') ? include.split(' ') : include;
var excludes = (typeof exclude === 'string') ? exclude.split(' ') : exclude;
var em = new EventEmitter;
var remaining = includes.length;
var results = [];
if (!includes.length) return cb(new Error('Must provide an include pattern'));
em.includes = includes.map(function(pattern) {
return new fileset.Fileset(pattern, options)
.on('error', cb ? cb : em.emit.bind(em, 'error'))
.on('match', em.emit.bind(em, 'match'))
.on('match', em.emit.bind(em, 'include'))
.on('end', next.bind({}, pattern))
});
function next(pattern, matches) {
results = results.concat(matches);
if (!(--remaining)) {
results = results.filter(function(file) {
return !excludes.filter(function(glob) {
var match = minimatch(file, glob, { matchBase: true });
if(match) em.emit('exclude', file);
return match;
}).length;
});
if(cb) cb(null, results);
em.emit('end', results);
}
}
return em;
}
// Sync API
fileset.sync = function filesetSync(include, exclude) {
if (!exclude) exclude = '';
// includes / excludes, either an array or string separated by comma or whitespace
var includes = (typeof include === 'string') ? include.split(/[\s,]/g) : include;
var excludes = (typeof exclude === 'string') ? exclude.split(/[\s,]/g) : exclude;
// Filter out any false positive '' empty strings
includes = includes.filter(function(pattern) { return pattern; });
excludes = excludes.filter(function(pattern) { return pattern; });
// - todo: pass in glob options as last param
var options = { matchBase: true };
// always ignore node_modules for sync api
options.ignore = ['node_modules/**/*'];
// First, glob match on all include patters into a single array
var results = includes.map(function(include) {
return glob.sync(include, options);
}).reduce(function(a, b) {
return a.concat(b);
}, []);
// Then filters out on any exclude match
var ignored = excludes.map(function(exclude) {
return glob.sync(exclude, options);
}).reduce(function(a, b) {
return a.concat(b);
}, []);
// And filter any exclude match
results = results.filter(function(file) {
return !ignored.filter(function(glob) {
return minimatch(file, glob, { matchBase: true });
}).length;
});
return results;
};
fileset.Fileset = function Fileset(pattern, options, cb) {
if (typeof options === 'function') cb = options, options = {};
if (!options) options = {};
// ignore node_modules by default, unless specified
options.ignore = options.ignore || ['node_modules/**/*'];
Glob.call(this, pattern, options);
if (typeof cb === 'function') {
this.on('error', cb);
this.on('end', function(matches) { cb(null, matches); });
}
};
util.inherits(fileset.Fileset, Glob);

91
node_modules/fileset/package.json generated vendored Normal file
View File

@@ -0,0 +1,91 @@
{
"_args": [
[
"fileset@^2.0.2",
"/home/bernhard/freifunk-app/node_modules/istanbul-api"
]
],
"_from": "fileset@>=2.0.2 <3.0.0",
"_id": "fileset@2.0.3",
"_inCache": true,
"_installable": true,
"_location": "/fileset",
"_nodeVersion": "6.7.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/fileset-2.0.3.tgz_1476434101736_0.43783262581564486"
},
"_npmUser": {
"email": "daniel.mickael@gmail.com",
"name": "mklabs"
},
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"name": "fileset",
"raw": "fileset@^2.0.2",
"rawSpec": "^2.0.2",
"scope": null,
"spec": ">=2.0.2 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/istanbul-api"
],
"_resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
"_shasum": "8e7548a96d3cc2327ee5e674168723a333bba2a0",
"_shrinkwrap": null,
"_spec": "fileset@^2.0.2",
"_where": "/home/bernhard/freifunk-app/node_modules/istanbul-api",
"author": {
"name": "mklabs"
},
"bugs": {
"url": "https://github.com/mklabs/node-fileset/issues"
},
"dependencies": {
"glob": "^7.0.3",
"minimatch": "^3.0.3"
},
"description": "Wrapper around miniglob / minimatch combo to allow multiple patterns matching and include-exclude ability",
"devDependencies": {
"babel-cli": "^6.9.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-regenerator": "^6.9.0",
"babel-preset-es2015": "^6.9.0",
"bake-cli": "^0.6.0",
"eslint": "^3.7.1",
"eslint-config-standard": "^6.2.0",
"eslint-plugin-promise": "^3.0.0",
"eslint-plugin-standard": "^2.0.1",
"mocha": "^3.1.2",
"standard-version": "^3.0.0",
"watchd": "^0.1.1"
},
"directories": {},
"dist": {
"shasum": "8e7548a96d3cc2327ee5e674168723a333bba2a0",
"tarball": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz"
},
"gitHead": "227334aa99497d88a099cc994057527c6b4de83c",
"homepage": "https://github.com/mklabs/node-fileset",
"license": "MIT",
"main": "./lib/fileset",
"maintainers": [
{
"name": "mklabs",
"email": "daniel.mickael@gmail.com"
}
],
"name": "fileset",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/mklabs/node-fileset.git"
},
"scripts": {
"test": "make test"
},
"version": "2.0.3"
}

View File

@@ -0,0 +1 @@
var odd = true;

0
node_modules/fileset/test/fixtures/foo.md generated vendored Normal file
View File

130
node_modules/fileset/test/mocha.js generated vendored Normal file
View File

@@ -0,0 +1,130 @@
var assert = require('assert');
var fileset = require('..');
var EventEmitter = require('events').EventEmitter;
describe('Sync API - Given a **.md pattern', function() {
it('returns the list of matching file in this repo', function() {
var results = fileset.sync('*.md', 'test/fixtures/**/*.md');
assert.ok(Array.isArray(results), 'should be an array');
assert.ok(results.length, 'should return at least one element');
assert.equal(results.length, 1, 'actually, should return only one');
});
});
describe('Sync API - Given a *.md and **.js pattern, and two exclude', function() {
it('returns the list of matching file in this repo', function() {
var results = fileset.sync('*.md *.js', 'CHANGELOG.md test/fixtures/**/*.md test/fixtures/**/*.js');
assert.ok(Array.isArray(results), 'should be an array');
assert.ok(results.length, 'should return at least one element');
assert.equal(results.length, 3, 'actually, should return only 3');
});
});
// Given a **.md pattern
describe('Given a **.md pattern', function() {
it('returns the list of matching file in this repo', function(done) {
fileset('*.js', function(err, results) {
if(err) return done(err);
assert.ok(Array.isArray(results), 'should be an array');
assert.ok(results.length, 'should return at least one element');
assert.equal(results.length, 1, 'actually, should return only two');
done();
});
});
});
describe('Say we want the **.js files, but not those in node_modules', function() {
it('recursively walks the dir and returns the matching list', function(done) {
fileset('**/*.js', '', function(err, results) {
if(err) return done(err);
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 2);
done();
});
});
it('recursively walks the dir and returns the matching list', function(done) {
fileset('**/*.js', function(err, results) {
if(err) return done(err);
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 2);
done();
});
});
it('supports multiple paths at once', function(done) {
fileset('**/*.js *.md', 'node_modules/**', function(err, results) {
if(err) return done(err);
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 2);
assert.deepEqual(results, [
'fixtures/an (odd) filename.js',
'mocha.js'
]);
done();
});
});
it('Should support multiple paths for excludes as well', function(done) {
fileset('**/*.js *.md', 'node_modules/** **.md tests/*.js', function(err, results) {
if(err) return done(err);
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 2);
assert.deepEqual(results, [
'fixtures/an (odd) filename.js',
'mocha.js'
]);
done();
});
});
});
describe('Testing out emmited events', function() {
it('recursively walk the dir and return the matching list', function(done) {
fileset('**/*.js', 'node_modules/**')
.on('error', done)
.on('end', function(results) {
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 2);
done();
});
});
it('support multiple paths at once', function(done) {
fileset('**/*.js *.md', 'node_modules/**')
.on('error', done)
.on('end', function(results) {
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 2);
assert.deepEqual(results, [
'fixtures/an (odd) filename.js',
'mocha.js'
]);
done();
});
});
});
describe('Testing patterns passed as arrays', function() {
it('match files passed as an array with odd filenames', function(done) {
fileset(['fixtures/*.md', 'fixtures/an (odd) filename.js'], ['*.md'])
.on('error', done)
.on('end', function(results) {
assert.ok(Array.isArray(results), 'should be an array');
assert.equal(results.length, 1);
assert.deepEqual(results, [
'fixtures/an (odd) filename.js',
]);
done();
});
});
});

3276
node_modules/fileset/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff