first commit
This commit is contained in:
24
app_vue/node_modules/wildcard/.github/workflows/build.yml
generated
vendored
Normal file
24
app_vue/node_modules/wildcard/.github/workflows/build.yml
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Build & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x, 18.x, 20.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: yarn install
|
||||
- run: yarn test
|
21
app_vue/node_modules/wildcard/LICENSE
generated
vendored
Normal file
21
app_vue/node_modules/wildcard/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 Damon Oehlman <damon.oehlman@gmail.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.
|
88
app_vue/node_modules/wildcard/README.md
generated
vendored
Normal file
88
app_vue/node_modules/wildcard/README.md
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
# wildcard
|
||||
|
||||
Very simple wildcard matching, which is designed to provide the same
|
||||
functionality that is found in the
|
||||
[eve](https://github.com/adobe-webplatform/eve) eventing library.
|
||||
|
||||
[](https://nodei.co/npm/wildcard/)
|
||||
|
||||
[](https://github.com/dominictarr/stability#stable)
|
||||
|
||||
## Usage
|
||||
|
||||
It works with strings:
|
||||
|
||||
```js
|
||||
var wildcard = require('wildcard');
|
||||
|
||||
console.log(wildcard('foo.*', 'foo.bar'));
|
||||
// --> true
|
||||
|
||||
console.log(wildcard('foo.*', 'foo'));
|
||||
// --> true
|
||||
```
|
||||
|
||||
Arrays:
|
||||
|
||||
```js
|
||||
var wildcard = require('wildcard');
|
||||
var testdata = [
|
||||
'a.b.c',
|
||||
'a.b',
|
||||
'a',
|
||||
'a.b.d'
|
||||
];
|
||||
|
||||
console.log(wildcard('a.b.*', testdata));
|
||||
// --> ['a.b.c', 'a.b', 'a.b.d']
|
||||
```
|
||||
|
||||
Objects (matching against keys):
|
||||
|
||||
```js
|
||||
var wildcard = require('wildcard');
|
||||
var testdata = {
|
||||
'a.b.c' : {},
|
||||
'a.b' : {},
|
||||
'a' : {},
|
||||
'a.b.d' : {}
|
||||
};
|
||||
|
||||
console.log(wildcard('a.*.c', testdata));
|
||||
// --> { 'a.b.c': {} }
|
||||
```
|
||||
|
||||
## Alternative Implementations
|
||||
|
||||
* <https://github.com/isaacs/node-glob>
|
||||
|
||||
Great for full file-based wildcard matching.
|
||||
|
||||
* <https://github.com/sindresorhus/matcher>
|
||||
|
||||
A well cared for and loved JS wildcard matcher.
|
||||
|
||||
## License(s)
|
||||
|
||||
### MIT
|
||||
|
||||
Copyright (c) 2023 Damon Oehlman <mailto:damon.oehlman@gmail.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.
|
9
app_vue/node_modules/wildcard/docs.json
generated
vendored
Normal file
9
app_vue/node_modules/wildcard/docs.json
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"badges": {
|
||||
"nodeico": true,
|
||||
"bithound": false,
|
||||
"stability": "stable"
|
||||
},
|
||||
|
||||
"license": {}
|
||||
}
|
10
app_vue/node_modules/wildcard/examples/arrays.js
generated
vendored
Normal file
10
app_vue/node_modules/wildcard/examples/arrays.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
var wildcard = require('..');
|
||||
var testdata = [
|
||||
'a.b.c',
|
||||
'a.b',
|
||||
'a',
|
||||
'a.b.d'
|
||||
];
|
||||
|
||||
console.log(wildcard('a.b.*', testdata));
|
||||
// --> ['a.b.c', 'a.b', 'a.b.d']
|
10
app_vue/node_modules/wildcard/examples/objects.js
generated
vendored
Normal file
10
app_vue/node_modules/wildcard/examples/objects.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
var wildcard = require('..');
|
||||
var testdata = {
|
||||
'a.b.c' : {},
|
||||
'a.b' : {},
|
||||
'a' : {},
|
||||
'a.b.d' : {}
|
||||
};
|
||||
|
||||
console.log(wildcard('a.*.c', testdata));
|
||||
// --> { 'a.b.c': {} }
|
7
app_vue/node_modules/wildcard/examples/strings.js
generated
vendored
Normal file
7
app_vue/node_modules/wildcard/examples/strings.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
var wildcard = require('..');
|
||||
|
||||
console.log(wildcard('foo.*', 'foo.bar'));
|
||||
// --> true
|
||||
|
||||
console.log(wildcard('foo.*', 'foo'));
|
||||
// --> true
|
114
app_vue/node_modules/wildcard/index.js
generated
vendored
Normal file
114
app_vue/node_modules/wildcard/index.js
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
/* jshint node: true */
|
||||
'use strict';
|
||||
|
||||
var REGEXP_PARTS = /(\*|\?)/g;
|
||||
|
||||
/**
|
||||
# wildcard
|
||||
|
||||
Very simple wildcard matching, which is designed to provide the same
|
||||
functionality that is found in the
|
||||
[eve](https://github.com/adobe-webplatform/eve) eventing library.
|
||||
|
||||
## Usage
|
||||
|
||||
It works with strings:
|
||||
|
||||
<<< examples/strings.js
|
||||
|
||||
Arrays:
|
||||
|
||||
<<< examples/arrays.js
|
||||
|
||||
Objects (matching against keys):
|
||||
|
||||
<<< examples/objects.js
|
||||
|
||||
## Alternative Implementations
|
||||
|
||||
- <https://github.com/isaacs/node-glob>
|
||||
|
||||
Great for full file-based wildcard matching.
|
||||
|
||||
- <https://github.com/sindresorhus/matcher>
|
||||
|
||||
A well cared for and loved JS wildcard matcher.
|
||||
**/
|
||||
|
||||
function WildcardMatcher(text, separator) {
|
||||
this.text = text = text || '';
|
||||
this.hasWild = text.indexOf('*') >= 0;
|
||||
this.separator = separator;
|
||||
this.parts = text.split(separator).map(this.classifyPart.bind(this));
|
||||
}
|
||||
|
||||
WildcardMatcher.prototype.match = function(input) {
|
||||
var matches = true;
|
||||
var parts = this.parts;
|
||||
var ii;
|
||||
var partsCount = parts.length;
|
||||
var testParts;
|
||||
|
||||
if (typeof input == 'string' || input instanceof String) {
|
||||
if (!this.hasWild && this.text != input) {
|
||||
matches = false;
|
||||
} else {
|
||||
testParts = (input || '').split(this.separator);
|
||||
for (ii = 0; matches && ii < partsCount; ii++) {
|
||||
if (parts[ii] === '*') {
|
||||
continue;
|
||||
} else if (ii < testParts.length) {
|
||||
matches = parts[ii] instanceof RegExp
|
||||
? parts[ii].test(testParts[ii])
|
||||
: parts[ii] === testParts[ii];
|
||||
} else {
|
||||
matches = false;
|
||||
}
|
||||
}
|
||||
|
||||
// If matches, then return the component parts
|
||||
matches = matches && testParts;
|
||||
}
|
||||
}
|
||||
else if (typeof input.splice == 'function') {
|
||||
matches = [];
|
||||
|
||||
for (ii = input.length; ii--; ) {
|
||||
if (this.match(input[ii])) {
|
||||
matches[matches.length] = input[ii];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (typeof input == 'object') {
|
||||
matches = {};
|
||||
|
||||
for (var key in input) {
|
||||
if (this.match(key)) {
|
||||
matches[key] = input[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
};
|
||||
|
||||
WildcardMatcher.prototype.classifyPart = function(part) {
|
||||
// in the event that we have been provided a part that is not just a wildcard
|
||||
// then turn this into a regular expression for matching purposes
|
||||
if (part === '*') {
|
||||
return part;
|
||||
} else if (part.indexOf('*') >= 0 || part.indexOf('?') >= 0) {
|
||||
return new RegExp(part.replace(REGEXP_PARTS, '\.$1'));
|
||||
}
|
||||
|
||||
return part;
|
||||
};
|
||||
|
||||
module.exports = function(text, test, separator) {
|
||||
var matcher = new WildcardMatcher(text, separator || /[\/\.]/);
|
||||
if (typeof test != 'undefined') {
|
||||
return matcher.match(test);
|
||||
}
|
||||
|
||||
return matcher;
|
||||
};
|
32
app_vue/node_modules/wildcard/package.json
generated
vendored
Normal file
32
app_vue/node_modules/wildcard/package.json
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "wildcard",
|
||||
"description": "Wildcard matching tools",
|
||||
"author": "Damon Oehlman <damon.oehlman@gmail.com>",
|
||||
"stability": "stable",
|
||||
"keywords": [
|
||||
"string",
|
||||
"wildcard"
|
||||
],
|
||||
"version": "2.0.1",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"embellish-readme": "^1.7.2",
|
||||
"tape": "^5.6.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/DamonOehlman/wildcard.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/DamonOehlman/wildcard/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test/all.js",
|
||||
"gendocs": "embellish README.md"
|
||||
},
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
3
app_vue/node_modules/wildcard/test/all.js
generated
vendored
Normal file
3
app_vue/node_modules/wildcard/test/all.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
require('./arrays');
|
||||
require('./objects');
|
||||
require('./strings');
|
33
app_vue/node_modules/wildcard/test/arrays.js
generated
vendored
Normal file
33
app_vue/node_modules/wildcard/test/arrays.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
var test = require('tape'),
|
||||
wildcard = require('../'),
|
||||
testdata = [
|
||||
'a.b.c',
|
||||
'a.b',
|
||||
'a',
|
||||
'a.b.d'
|
||||
],
|
||||
testdataSep = [
|
||||
'a:b:c',
|
||||
'a:b',
|
||||
'a',
|
||||
'a:b:d'
|
||||
];
|
||||
|
||||
test('array result matching tests', function(t) {
|
||||
t.plan(5);
|
||||
|
||||
t.equal(wildcard('*', testdata).length, 4, '* matches all testdata');
|
||||
t.equal(wildcard('a.*', testdata).length, 4, '4 matches found');
|
||||
t.equal(wildcard('a.b.*', testdata).length, 3, '3 matches found');
|
||||
t.equal(wildcard('a.*.c', testdata).length, 1);
|
||||
t.equal(wildcard('b.*.d', testdata).length, 0);
|
||||
});
|
||||
|
||||
test('array result with separator matching tests', function(t) {
|
||||
t.plan(4);
|
||||
|
||||
t.equal(wildcard('a:*', testdataSep, ':').length, 4, '4 matches found');
|
||||
t.equal(wildcard('a:b:*', testdataSep, ':').length, 3, '3 matches found');
|
||||
t.equal(wildcard('a:*:c', testdataSep, ':').length, 1);
|
||||
t.equal(wildcard('b:*:d', testdataSep, ':').length, 0);
|
||||
});
|
106
app_vue/node_modules/wildcard/test/objects.js
generated
vendored
Normal file
106
app_vue/node_modules/wildcard/test/objects.js
generated
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
var wildcard = require('../'),
|
||||
test = require('tape'),
|
||||
testdata = {
|
||||
'a.b.c' : {},
|
||||
'a.b' : {},
|
||||
'a' : {},
|
||||
'a.b.d' : {}
|
||||
},
|
||||
testdataSep = {
|
||||
'a:b:c' : {},
|
||||
'a:b' : {},
|
||||
'a' : {},
|
||||
'a:b:d' : {}
|
||||
};
|
||||
|
||||
test('object result matching tests', function(t) {
|
||||
t.test('should return 4 matches for a.*', function(t) {
|
||||
var matches = wildcard('a.*', testdata);
|
||||
|
||||
t.plan(4);
|
||||
t.ok(matches['a.b.c']);
|
||||
t.ok(matches['a.b']);
|
||||
t.ok(matches['a']);
|
||||
t.ok(matches['a.b.d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 4 matches for a:*', function(t) {
|
||||
var matches = wildcard('a:*', testdataSep, ':');
|
||||
|
||||
t.plan(4);
|
||||
t.ok(matches['a:b:c']);
|
||||
t.ok(matches['a:b']);
|
||||
t.ok(matches['a']);
|
||||
t.ok(matches['a:b:d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 3 matches for a.b.*', function(t) {
|
||||
var matches = wildcard('a.b.*', testdata);
|
||||
|
||||
t.plan(4);
|
||||
t.ok(matches['a.b.c']);
|
||||
t.ok(matches['a.b']);
|
||||
t.notOk(matches['a']);
|
||||
t.ok(matches['a.b.d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 3 matches for a:b:*', function(t) {
|
||||
var matches = wildcard('a:b:*', testdataSep, ':');
|
||||
|
||||
t.plan(4);
|
||||
t.ok(matches['a:b:c']);
|
||||
t.ok(matches['a:b']);
|
||||
t.notOk(matches['a']);
|
||||
t.ok(matches['a:b:d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 1 matches for a.*.c', function(t) {
|
||||
var matches = wildcard('a.*.c', testdata);
|
||||
|
||||
t.plan(4);
|
||||
t.ok(matches['a.b.c']);
|
||||
t.notOk(matches['a.b']);
|
||||
t.notOk(matches['a']);
|
||||
t.notOk(matches['a.b.d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 1 matches for a:*:c', function(t) {
|
||||
var matches = wildcard('a:*:c', testdataSep, ':');
|
||||
|
||||
t.plan(4);
|
||||
t.ok(matches['a:b:c']);
|
||||
t.notOk(matches['a:b']);
|
||||
t.notOk(matches['a']);
|
||||
t.notOk(matches['a:b:d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 0 matches for b.*.d', function(t) {
|
||||
var matches = wildcard('b.*.d', testdata);
|
||||
|
||||
t.plan(4);
|
||||
t.notOk(matches['a.b.c']);
|
||||
t.notOk(matches['a.b']);
|
||||
t.notOk(matches['a']);
|
||||
t.notOk(matches['a.b.d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.test('should return 0 matches for b:*:d', function(t) {
|
||||
var matches = wildcard('b:*:d', testdataSep, ':');
|
||||
|
||||
t.plan(4);
|
||||
t.notOk(matches['a:b:c']);
|
||||
t.notOk(matches['a:b']);
|
||||
t.notOk(matches['a']);
|
||||
t.notOk(matches['a:b:d']);
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
46
app_vue/node_modules/wildcard/test/strings.js
generated
vendored
Normal file
46
app_vue/node_modules/wildcard/test/strings.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
var test = require('tape'),
|
||||
wildcard = require('../');
|
||||
|
||||
test('general wild card matching tests', function(t) {
|
||||
|
||||
t.plan(8);
|
||||
t.ok(wildcard('*', 'test'), '* should match test');
|
||||
t.ok(wildcard('foo.*', 'foo.bar'), 'foo.* should match foo.bar');
|
||||
t.ok(wildcard('foo.*', 'foo'), 'foo.* should match foo');
|
||||
t.ok(wildcard('*.foo.com', 'test.foo.com'), 'test.foo.com should match *.foo.com');
|
||||
t.notOk(wildcard('foo.*', 'bar'), 'foo.* should not match bar');
|
||||
t.ok(wildcard('a.*.c', 'a.b.c'), 'a.*.c should match a.b.c');
|
||||
t.notOk(wildcard('a.*.c', 'a.b'), 'a.*.c should not match a.b');
|
||||
t.notOk(wildcard('a', 'a.b.c'), 'a should not match a.b.c');
|
||||
});
|
||||
|
||||
test('regex wildcard matching tests', function(t) {
|
||||
t.plan(4);
|
||||
t.ok(wildcard('*foo', 'foo'), '*foo should match foo');
|
||||
t.ok(wildcard('*foo.b', 'foo.b'), '*foo.b should match foo.b');
|
||||
t.ok(wildcard('a.*foo.c', 'a.barfoo.c'), 'a.barfoo.c should match a.*foo.c');
|
||||
t.ok(wildcard('a.foo*.c', 'a.foobar.c'), 'a.foobar.c should match a.foo*.c');
|
||||
});
|
||||
|
||||
test('general wild card with separator matching tests', function(t) {
|
||||
|
||||
t.plan(5);
|
||||
t.ok(wildcard('foo:*', 'foo:bar', ':'), 'foo:* should match foo:bar');
|
||||
t.ok(wildcard('foo:*', 'foo', ':'), 'foo:* should match foo');
|
||||
t.notOk(wildcard('foo:*', 'bar', ':'), 'foo:* should not match bar');
|
||||
t.ok(wildcard('a:*:c', 'a:b:c', ':'), 'a:*:c should match a:b:c');
|
||||
t.notOk(wildcard('a:*:c', 'a:b', ':'), 'a:*:c should not match a:b');
|
||||
});
|
||||
|
||||
test('general wild card with tokens being returned', function(t) {
|
||||
|
||||
t.plan(5);
|
||||
var parts = wildcard('foo.*', 'foo.bar');
|
||||
t.ok(parts);
|
||||
t.equal(parts.length, 2);
|
||||
t.equal(parts[0], 'foo');
|
||||
t.equal(parts[1], 'bar');
|
||||
|
||||
parts = wildcard('foo.*', 'not.matching');
|
||||
t.notOk(parts);
|
||||
});
|
Reference in New Issue
Block a user