@tsed/schema 7.10.0-rc.4 → 7.10.0-rc.5

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.
@@ -2,7 +2,41 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.matchGroups = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
5
+ const picomatch_1 = tslib_1.__importDefault(require("picomatch"));
6
+ const superagent_1 = require("superagent");
7
+ function micromatch(list, patterns) {
8
+ patterns = [].concat(patterns);
9
+ list = [].concat(list);
10
+ let omit = new Set();
11
+ let keep = new Set();
12
+ let items = new Set();
13
+ let negatives = 0;
14
+ let onResult = (state) => {
15
+ items.add(state.output);
16
+ };
17
+ for (let i = 0; i < patterns.length; i++) {
18
+ let isMatch = (0, picomatch_1.default)(String(patterns[i]), { ...superagent_1.options, onResult }, true);
19
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
20
+ if (negated) {
21
+ negatives++;
22
+ }
23
+ for (let item of list) {
24
+ let matched = isMatch(item, true);
25
+ let match = negated ? !matched.isMatch : matched.isMatch;
26
+ if (!match)
27
+ continue;
28
+ if (negated) {
29
+ omit.add(matched.output);
30
+ }
31
+ else {
32
+ omit.delete(matched.output);
33
+ keep.add(matched.output);
34
+ }
35
+ }
36
+ }
37
+ let result = negatives === patterns.length ? [...items] : [...keep];
38
+ return !!result.filter((item) => !omit.has(item)).length;
39
+ }
6
40
  /**
7
41
  * @ignore
8
42
  */
@@ -10,12 +44,12 @@ function matchGroups(groups, compareWith = []) {
10
44
  const groupsExcludes = groups.filter((group) => group.startsWith("!")).map((group) => group.replace("!", ""));
11
45
  const groupsIncludes = groups.filter((group) => !group.startsWith("!"));
12
46
  if (groupsExcludes.length) {
13
- if (compareWith.length && (0, micromatch_1.default)(groupsExcludes, compareWith).length) {
47
+ if (compareWith.length && micromatch(groupsExcludes, compareWith)) {
14
48
  return true;
15
49
  }
16
50
  }
17
51
  if (groupsIncludes.length) {
18
- return !(0, micromatch_1.default)(groups.filter((group) => !group.startsWith("!")), compareWith).length;
52
+ return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith);
19
53
  }
20
54
  return false;
21
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":";;;;AAAA,oEAAoC;AAEpC;;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,IAAA,oBAAU,EAAC,cAAc,EAAE,WAAW,CAAC,CAAC,MAAM,EAAE;YACxE,OAAO,IAAI,CAAC;SACb;KACF;IAED,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,OAAO,CAAC,IAAA,oBAAU,EAChB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAChD,WAAW,CACZ,CAAC,MAAM,CAAC;KACV;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAlBD,kCAkBC","sourcesContent":["import micromatch from \"micromatch\";\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).length) {\n return true;\n }\n }\n\n if (groupsIncludes.length) {\n return !micromatch(\n groups.filter((group) => !group.startsWith(\"!\")),\n compareWith\n ).length;\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,2CAAmC;AAEnC,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,IAAA,mBAAS,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAC,GAAG,oBAAO,EAAE,QAAQ,EAAC,EAAE,IAAI,CAAC,CAAC;QAChF,IAAI,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC;QAEpE,IAAI,OAAO,EAAE;YACX,SAAS,EAA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AAC;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\";\nimport {options} from \"superagent\";\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]), {...options, 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,38 @@
1
- import micromatch from "micromatch";
1
+ import picomatch from "picomatch";
2
+ import { options } from "superagent";
3
+ function micromatch(list, patterns) {
4
+ patterns = [].concat(patterns);
5
+ list = [].concat(list);
6
+ let omit = new Set();
7
+ let keep = new Set();
8
+ let items = new Set();
9
+ let negatives = 0;
10
+ let onResult = (state) => {
11
+ items.add(state.output);
12
+ };
13
+ for (let i = 0; i < patterns.length; i++) {
14
+ let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
15
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
16
+ if (negated) {
17
+ negatives++;
18
+ }
19
+ for (let item of list) {
20
+ let matched = isMatch(item, true);
21
+ let match = negated ? !matched.isMatch : matched.isMatch;
22
+ if (!match)
23
+ continue;
24
+ if (negated) {
25
+ omit.add(matched.output);
26
+ }
27
+ else {
28
+ omit.delete(matched.output);
29
+ keep.add(matched.output);
30
+ }
31
+ }
32
+ }
33
+ let result = negatives === patterns.length ? [...items] : [...keep];
34
+ return !!result.filter((item) => !omit.has(item)).length;
35
+ }
2
36
  /**
3
37
  * @ignore
4
38
  */
@@ -6,12 +40,12 @@ export function matchGroups(groups, compareWith = []) {
6
40
  const groupsExcludes = groups.filter((group) => group.startsWith("!")).map((group) => group.replace("!", ""));
7
41
  const groupsIncludes = groups.filter((group) => !group.startsWith("!"));
8
42
  if (groupsExcludes.length) {
9
- if (compareWith.length && micromatch(groupsExcludes, compareWith).length) {
43
+ if (compareWith.length && micromatch(groupsExcludes, compareWith)) {
10
44
  return true;
11
45
  }
12
46
  }
13
47
  if (groupsIncludes.length) {
14
- return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith).length;
48
+ return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith);
15
49
  }
16
50
  return false;
17
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC;;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,CAAC,MAAM,EAAE;YACxE,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,MAAM,CAAC;KACV;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import micromatch from \"micromatch\";\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).length) {\n return true;\n }\n }\n\n if (groupsIncludes.length) {\n return !micromatch(\n groups.filter((group) => !group.startsWith(\"!\")),\n compareWith\n ).length;\n }\n\n return false;\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AO,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\";\nimport {options} from \"superagent\";\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]), {...options, 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.4",
3
+ "version": "7.10.0-rc.5",
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.4",
38
+ "@tsed/openspec": "7.10.0-rc.5",
39
39
  "change-case": "^4.1.2",
40
40
  "fs-extra": "^10.0.1",
41
41
  "json-schema": "0.4.0",
42
- "micromatch": "4.0.5",
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.4",
49
- "@tsed/openspec": "7.10.0-rc.4",
48
+ "@tsed/core": "7.10.0-rc.5",
49
+ "@tsed/openspec": "7.10.0-rc.5",
50
50
  "@types/fs-extra": "9.0.13",
51
51
  "@types/json-schema": "7.0.11",
52
- "@types/micromatch": "4.0.2",
52
+ "@types/picomatch": "2.3.0",
53
53
  "@types/statuses": "2.0.0",
54
- "ts-loader": "^9.4.2",
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.4",
61
- "@tsed/openspec": "^7.10.0-rc.4"
57
+ "@tsed/core": "^7.10.0-rc.5",
58
+ "@tsed/openspec": "^7.10.0-rc.5"
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": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
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
- module.exports = {
2
- mode: "production",
3
- devtool: "source-map",
4
- stats: {warnings: false},
5
- entry: {
6
- main: "./src/index.ts"
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
- extensions: [".tsx", ".ts", ".js"]
16
- },
17
- module: {
18
- rules: [
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
+ });