@tsed/schema 7.10.0-rc.5 → 7.10.0-rc.7
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.map +1 -1
- package/lib/cjs/utils/matchGroups.js +1 -2
- package/lib/cjs/utils/matchGroups.js.map +1 -1
- package/lib/esm/utils/matchGroups.js +1 -2
- package/lib/esm/utils/matchGroups.js.map +1 -1
- package/package.json +6 -6
- package/webpack.config.js +2 -3
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.matchGroups = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const picomatch_1 = tslib_1.__importDefault(require("picomatch"));
|
|
6
|
-
const superagent_1 = require("superagent");
|
|
7
6
|
function micromatch(list, patterns) {
|
|
8
7
|
patterns = [].concat(patterns);
|
|
9
8
|
list = [].concat(list);
|
|
@@ -15,7 +14,7 @@ function micromatch(list, patterns) {
|
|
|
15
14
|
items.add(state.output);
|
|
16
15
|
};
|
|
17
16
|
for (let i = 0; i < patterns.length; i++) {
|
|
18
|
-
let isMatch = (0, picomatch_1.default)(String(patterns[i]), {
|
|
17
|
+
let isMatch = (0, picomatch_1.default)(String(patterns[i]), { onResult }, true);
|
|
19
18
|
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
20
19
|
if (negated) {
|
|
21
20
|
negatives++;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;
|
|
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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([] 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,5 +1,4 @@
|
|
|
1
1
|
import picomatch from "picomatch";
|
|
2
|
-
import { options } from "superagent";
|
|
3
2
|
function micromatch(list, patterns) {
|
|
4
3
|
patterns = [].concat(patterns);
|
|
5
4
|
list = [].concat(list);
|
|
@@ -11,7 +10,7 @@ function micromatch(list, patterns) {
|
|
|
11
10
|
items.add(state.output);
|
|
12
11
|
};
|
|
13
12
|
for (let i = 0; i < patterns.length; i++) {
|
|
14
|
-
let isMatch = picomatch(String(patterns[i]), {
|
|
13
|
+
let isMatch = picomatch(String(patterns[i]), { onResult }, true);
|
|
15
14
|
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
16
15
|
if (negated) {
|
|
17
16
|
negatives++;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;
|
|
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,CAAC;IACrB,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;IACrB,IAAI,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACtB,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,IAAI,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE;QAC5B,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,IAAI,OAAO,GAAQ,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAC,QAAQ,EAAC,EAAE,IAAI,CAAC,CAAC;QACpE,IAAI,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC;QAEpE,IAAI,OAAO,EAAE;YACX,SAAS,EAAE,CAAC;SACb;QAED,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE;YACrB,IAAI,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC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AAC,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.7",
|
|
4
4
|
"description": "JsonSchema module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"tsed"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tsed/openspec": "7.10.0-rc.
|
|
38
|
+
"@tsed/openspec": "7.10.0-rc.7",
|
|
39
39
|
"change-case": "^4.1.2",
|
|
40
40
|
"fs-extra": "^10.0.1",
|
|
41
41
|
"json-schema": "0.4.0",
|
|
@@ -45,8 +45,8 @@
|
|
|
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.7",
|
|
49
|
+
"@tsed/openspec": "7.10.0-rc.7",
|
|
50
50
|
"@types/fs-extra": "9.0.13",
|
|
51
51
|
"@types/json-schema": "7.0.11",
|
|
52
52
|
"@types/picomatch": "2.3.0",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"picomatch-browser": "https://github.com/silverwind/picomatch#ee6ebcc5570a8846d81610c11ebb92a9e199b145"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@tsed/core": "^7.10.0-rc.
|
|
58
|
-
"@tsed/openspec": "^7.10.0-rc.
|
|
57
|
+
"@tsed/core": "^7.10.0-rc.7",
|
|
58
|
+
"@tsed/openspec": "^7.10.0-rc.7"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"@tsed/openspec": {
|
package/webpack.config.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const webpack = require("webpack");
|
|
2
|
-
|
|
3
1
|
module.exports = require("@tsed/webpack-config").create({
|
|
4
2
|
root: __dirname,
|
|
5
3
|
name: "schema",
|
|
6
4
|
externals: {
|
|
7
|
-
"@tsed/core": "@tsed/core"
|
|
5
|
+
"@tsed/core": "@tsed/core",
|
|
6
|
+
"change-case": "change-case"
|
|
8
7
|
},
|
|
9
8
|
resolve: {
|
|
10
9
|
alias: {
|