@tsed/schema 7.10.0-rc.4 → 7.10.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.LICENSE.txt +0 -36
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/cjs/utils/matchGroups.js +36 -3
- package/lib/cjs/utils/matchGroups.js.map +1 -1
- package/lib/esm/utils/matchGroups.js +36 -3
- package/lib/esm/utils/matchGroups.js.map +1 -1
- package/package.json +9 -12
- package/tsconfig.compile.esm.json +13 -1
- package/webpack.config.js +12 -48
|
@@ -2,7 +2,40 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matchGroups = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const picomatch_1 = tslib_1.__importDefault(require("picomatch"));
|
|
6
|
+
function micromatch(list, patterns) {
|
|
7
|
+
patterns = [].concat(patterns);
|
|
8
|
+
list = [].concat(list);
|
|
9
|
+
let omit = new Set();
|
|
10
|
+
let keep = new Set();
|
|
11
|
+
let items = new Set();
|
|
12
|
+
let negatives = 0;
|
|
13
|
+
let onResult = (state) => {
|
|
14
|
+
items.add(state.output);
|
|
15
|
+
};
|
|
16
|
+
for (let i = 0; i < patterns.length; i++) {
|
|
17
|
+
let isMatch = (0, picomatch_1.default)(String(patterns[i]), { onResult }, true);
|
|
18
|
+
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
19
|
+
if (negated) {
|
|
20
|
+
negatives++;
|
|
21
|
+
}
|
|
22
|
+
for (let item of list) {
|
|
23
|
+
let matched = isMatch(item, true);
|
|
24
|
+
let match = negated ? !matched.isMatch : matched.isMatch;
|
|
25
|
+
if (!match)
|
|
26
|
+
continue;
|
|
27
|
+
if (negated) {
|
|
28
|
+
omit.add(matched.output);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
omit.delete(matched.output);
|
|
32
|
+
keep.add(matched.output);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
let result = negatives === patterns.length ? [...items] : [...keep];
|
|
37
|
+
return !!result.filter((item) => !omit.has(item)).length;
|
|
38
|
+
}
|
|
6
39
|
/**
|
|
7
40
|
* @ignore
|
|
8
41
|
*/
|
|
@@ -10,12 +43,12 @@ function matchGroups(groups, compareWith = []) {
|
|
|
10
43
|
const groupsExcludes = groups.filter((group) => group.startsWith("!")).map((group) => group.replace("!", ""));
|
|
11
44
|
const groupsIncludes = groups.filter((group) => !group.startsWith("!"));
|
|
12
45
|
if (groupsExcludes.length) {
|
|
13
|
-
if (compareWith.length && (
|
|
46
|
+
if (compareWith.length && micromatch(groupsExcludes, compareWith)) {
|
|
14
47
|
return true;
|
|
15
48
|
}
|
|
16
49
|
}
|
|
17
50
|
if (groupsIncludes.length) {
|
|
18
|
-
return !(
|
|
51
|
+
return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith);
|
|
19
52
|
}
|
|
20
53
|
return false;
|
|
21
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAElC,SAAS,UAAU,CAAC,IAAc,EAAE,QAAkB;IACpD,QAAQ,GAAI,EAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,GAAI,EAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAErC,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;IACrB,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;IACrB,IAAI,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACtB,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,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,MAAgB,EAAE,cAAwB,EAAE;IACtE,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9G,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAExE,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,IAAI,WAAW,CAAC,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE;YACjE,OAAO,IAAI,CAAC;SACb;KACF;IAED,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,OAAO,CAAC,UAAU,CAChB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAChD,WAAW,CACZ,CAAC;KACH;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAlBD,kCAkBC","sourcesContent":["import picomatch from \"picomatch\";\n\nfunction micromatch(list: string[], patterns: string[]) {\n patterns = ([] as string[]).concat(patterns);\n list = ([] as string[]).concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = (state: any) => {\n items.add(state.output);\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch: any = picomatch(String(patterns[i]), {onResult}, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n\n if (negated) {\n negatives++;\n }\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n return !!result.filter((item) => !omit.has(item)).length;\n}\n\n/**\n * @ignore\n */\nexport function matchGroups(groups: string[], compareWith: string[] = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith)) {\n return true;\n }\n }\n\n if (groupsIncludes.length) {\n return !micromatch(\n groups.filter((group) => !group.startsWith(\"!\")),\n compareWith\n );\n }\n\n return false;\n}\n"]}
|
|
@@ -1,4 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import picomatch from "picomatch";
|
|
2
|
+
function micromatch(list, patterns) {
|
|
3
|
+
patterns = [].concat(patterns);
|
|
4
|
+
list = [].concat(list);
|
|
5
|
+
let omit = new Set();
|
|
6
|
+
let keep = new Set();
|
|
7
|
+
let items = new Set();
|
|
8
|
+
let negatives = 0;
|
|
9
|
+
let onResult = (state) => {
|
|
10
|
+
items.add(state.output);
|
|
11
|
+
};
|
|
12
|
+
for (let i = 0; i < patterns.length; i++) {
|
|
13
|
+
let isMatch = picomatch(String(patterns[i]), { onResult }, true);
|
|
14
|
+
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
15
|
+
if (negated) {
|
|
16
|
+
negatives++;
|
|
17
|
+
}
|
|
18
|
+
for (let item of list) {
|
|
19
|
+
let matched = isMatch(item, true);
|
|
20
|
+
let match = negated ? !matched.isMatch : matched.isMatch;
|
|
21
|
+
if (!match)
|
|
22
|
+
continue;
|
|
23
|
+
if (negated) {
|
|
24
|
+
omit.add(matched.output);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
omit.delete(matched.output);
|
|
28
|
+
keep.add(matched.output);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
let result = negatives === patterns.length ? [...items] : [...keep];
|
|
33
|
+
return !!result.filter((item) => !omit.has(item)).length;
|
|
34
|
+
}
|
|
2
35
|
/**
|
|
3
36
|
* @ignore
|
|
4
37
|
*/
|
|
@@ -6,12 +39,12 @@ export function matchGroups(groups, compareWith = []) {
|
|
|
6
39
|
const groupsExcludes = groups.filter((group) => group.startsWith("!")).map((group) => group.replace("!", ""));
|
|
7
40
|
const groupsIncludes = groups.filter((group) => !group.startsWith("!"));
|
|
8
41
|
if (groupsExcludes.length) {
|
|
9
|
-
if (compareWith.length && micromatch(groupsExcludes, compareWith)
|
|
42
|
+
if (compareWith.length && micromatch(groupsExcludes, compareWith)) {
|
|
10
43
|
return true;
|
|
11
44
|
}
|
|
12
45
|
}
|
|
13
46
|
if (groupsIncludes.length) {
|
|
14
|
-
return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith)
|
|
47
|
+
return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith);
|
|
15
48
|
}
|
|
16
49
|
return false;
|
|
17
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,SAAS,UAAU,CAAC,IAAc,EAAE,QAAkB;IACpD,QAAQ,GAAI,EAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,GAAI,EAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAErC,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE,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CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAgB,EAAE,cAAwB,EAAE;IACtE,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9G,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAExE,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,IAAI,WAAW,CAAC,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE;YACjE,OAAO,IAAI,CAAC;SACb;KACF;IAED,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,OAAO,CAAC,UAAU,CAChB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAChD,WAAW,CACZ,CAAC;KACH;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import picomatch from \"picomatch\";\n\nfunction micromatch(list: string[], patterns: string[]) {\n patterns = ([] as string[]).concat(patterns);\n list = ([] as string[]).concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = (state: any) => {\n items.add(state.output);\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch: any = picomatch(String(patterns[i]), {onResult}, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n\n if (negated) {\n negatives++;\n }\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n return !!result.filter((item) => !omit.has(item)).length;\n}\n\n/**\n * @ignore\n */\nexport function matchGroups(groups: string[], compareWith: string[] = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith)) {\n return true;\n }\n }\n\n if (groupsIncludes.length) {\n return !micromatch(\n groups.filter((group) => !group.startsWith(\"!\")),\n compareWith\n );\n }\n\n return false;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/schema",
|
|
3
|
-
"version": "7.10.0-rc.
|
|
3
|
+
"version": "7.10.0-rc.6",
|
|
4
4
|
"description": "JsonSchema module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -35,30 +35,27 @@
|
|
|
35
35
|
"tsed"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tsed/openspec": "7.10.0-rc.
|
|
38
|
+
"@tsed/openspec": "7.10.0-rc.6",
|
|
39
39
|
"change-case": "^4.1.2",
|
|
40
40
|
"fs-extra": "^10.0.1",
|
|
41
41
|
"json-schema": "0.4.0",
|
|
42
|
-
"
|
|
42
|
+
"picomatch": "2.3.1",
|
|
43
43
|
"statuses": ">=2.0.1",
|
|
44
44
|
"tslib": "2.4.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
48
|
-
"@tsed/core": "7.10.0-rc.
|
|
49
|
-
"@tsed/openspec": "7.10.0-rc.
|
|
48
|
+
"@tsed/core": "7.10.0-rc.6",
|
|
49
|
+
"@tsed/openspec": "7.10.0-rc.6",
|
|
50
50
|
"@types/fs-extra": "9.0.13",
|
|
51
51
|
"@types/json-schema": "7.0.11",
|
|
52
|
-
"@types/
|
|
52
|
+
"@types/picomatch": "2.3.0",
|
|
53
53
|
"@types/statuses": "2.0.0",
|
|
54
|
-
"
|
|
55
|
-
"webpack": "^5.75.0",
|
|
56
|
-
"webpack-cli": "^5.0.1",
|
|
57
|
-
"webpack-remove-code-blocks": "^0.1.5"
|
|
54
|
+
"picomatch-browser": "https://github.com/silverwind/picomatch#ee6ebcc5570a8846d81610c11ebb92a9e199b145"
|
|
58
55
|
},
|
|
59
56
|
"peerDependencies": {
|
|
60
|
-
"@tsed/core": "^7.10.0-rc.
|
|
61
|
-
"@tsed/openspec": "^7.10.0-rc.
|
|
57
|
+
"@tsed/core": "^7.10.0-rc.6",
|
|
58
|
+
"@tsed/openspec": "^7.10.0-rc.6"
|
|
62
59
|
},
|
|
63
60
|
"peerDependenciesMeta": {
|
|
64
61
|
"@tsed/openspec": {
|
|
@@ -10,5 +10,17 @@
|
|
|
10
10
|
"declarationDir": "./lib/types"
|
|
11
11
|
},
|
|
12
12
|
"include": ["src"],
|
|
13
|
-
"exclude": [
|
|
13
|
+
"exclude": [
|
|
14
|
+
"node_modules",
|
|
15
|
+
"test",
|
|
16
|
+
"lib",
|
|
17
|
+
"benchmark",
|
|
18
|
+
"coverage",
|
|
19
|
+
"spec",
|
|
20
|
+
"**/*.benchmark.ts",
|
|
21
|
+
"**/*.spec.ts",
|
|
22
|
+
"keys",
|
|
23
|
+
"jest.config.js",
|
|
24
|
+
"webpack.config.js"
|
|
25
|
+
]
|
|
14
26
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,50 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
output: {
|
|
9
|
-
path: __dirname + "/lib/browser/",
|
|
10
|
-
filename: "schema.umd.min.js",
|
|
11
|
-
library: "schema",
|
|
12
|
-
libraryTarget: "umd"
|
|
1
|
+
const webpack = require("webpack");
|
|
2
|
+
|
|
3
|
+
module.exports = require("@tsed/webpack-config").create({
|
|
4
|
+
root: __dirname,
|
|
5
|
+
name: "schema",
|
|
6
|
+
externals: {
|
|
7
|
+
"@tsed/core": "@tsed/core"
|
|
13
8
|
},
|
|
14
9
|
resolve: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
test: /\.ts?$/,
|
|
21
|
-
use: [
|
|
22
|
-
{
|
|
23
|
-
loader: "webpack-remove-code-blocks",
|
|
24
|
-
options: {
|
|
25
|
-
blocks: [
|
|
26
|
-
"debug",
|
|
27
|
-
"devblock",
|
|
28
|
-
{
|
|
29
|
-
start: "node_env:start",
|
|
30
|
-
end: "node_env:end",
|
|
31
|
-
prefix: "/*",
|
|
32
|
-
suffix: "*/"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
loader: "ts-loader",
|
|
39
|
-
options: {
|
|
40
|
-
configFile: "tsconfig.compile.esm.json"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
exclude: /node_modules/
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
plugins: [],
|
|
49
|
-
optimization: {}
|
|
50
|
-
};
|
|
10
|
+
alias: {
|
|
11
|
+
picomatch: require.resolve("picomatch-browser/posix")
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|