@graphql-inspector/similar-command 0.0.0-canary.6527017 → 0.0.0-canary.86df6bb
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/index.d.ts +10 -2
- package/{index.cjs.js → index.js} +61 -52
- package/{index.esm.js → index.mjs} +58 -51
- package/package.json +17 -7
- package/index.cjs.js.map +0 -1
- package/index.esm.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { GlobalArgs } from '@graphql-inspector/commands';
|
|
2
|
-
|
|
1
|
+
import { GlobalArgs, CommandFactory } from '@graphql-inspector/commands';
|
|
2
|
+
import { GraphQLSchema } from 'graphql';
|
|
3
|
+
export { CommandFactory };
|
|
4
|
+
export declare function handler({ schema, writePath, type, threshold, }: {
|
|
5
|
+
schema: GraphQLSchema;
|
|
6
|
+
writePath?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
threshold?: number;
|
|
9
|
+
}): void;
|
|
10
|
+
declare const _default: CommandFactory<{}, {
|
|
3
11
|
schema: string;
|
|
4
12
|
name?: string | undefined;
|
|
5
13
|
threshold?: number | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
const tslib = require('tslib');
|
|
4
6
|
const commands = require('@graphql-inspector/commands');
|
|
5
7
|
const logger = require('@graphql-inspector/logger');
|
|
@@ -7,7 +9,52 @@ const core = require('@graphql-inspector/core');
|
|
|
7
9
|
const path = require('path');
|
|
8
10
|
const fs = require('fs');
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
function handler({ schema, writePath, type, threshold, }) {
|
|
13
|
+
const shouldWrite = typeof writePath !== 'undefined';
|
|
14
|
+
const similarMap = core.similar(schema, type, threshold);
|
|
15
|
+
if (!Object.keys(similarMap).length) {
|
|
16
|
+
logger.Logger.info('No similar types found');
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
for (const typeName in similarMap) {
|
|
20
|
+
if (similarMap.hasOwnProperty(typeName)) {
|
|
21
|
+
const matches = similarMap[typeName];
|
|
22
|
+
const prefix = core.getTypePrefix(schema.getType(typeName));
|
|
23
|
+
const sourceType = logger.chalk.bold(typeName);
|
|
24
|
+
const name = matches.bestMatch.target.typeId;
|
|
25
|
+
logger.Logger.log('');
|
|
26
|
+
logger.Logger.log(`${prefix} ${sourceType}`);
|
|
27
|
+
logger.Logger.log(printResult(name, matches.bestMatch.rating));
|
|
28
|
+
matches.ratings.forEach(match => {
|
|
29
|
+
logger.Logger.log(printResult(match.target.typeId, match.rating));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (shouldWrite) {
|
|
34
|
+
if (typeof writePath !== 'string') {
|
|
35
|
+
throw new Error(`--write is not valid file path: ${writePath}`);
|
|
36
|
+
}
|
|
37
|
+
const absPath = commands.ensureAbsolute(writePath);
|
|
38
|
+
const ext = path.extname(absPath).replace('.', '').toLocaleLowerCase();
|
|
39
|
+
let output = undefined;
|
|
40
|
+
const results = transformMap(similarMap);
|
|
41
|
+
if (ext === 'json') {
|
|
42
|
+
output = outputJSON(results);
|
|
43
|
+
}
|
|
44
|
+
if (output) {
|
|
45
|
+
fs.writeFileSync(absPath, output, {
|
|
46
|
+
encoding: 'utf-8',
|
|
47
|
+
});
|
|
48
|
+
logger.Logger.success(`Available at ${absPath}\n`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
throw new Error(`Extension ${ext} is not supported`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const index = commands.createCommand(api => {
|
|
57
|
+
const { loaders } = api;
|
|
11
58
|
return {
|
|
12
59
|
command: 'similar <schema>',
|
|
13
60
|
describe: 'Find similar types in a schema',
|
|
@@ -37,59 +84,21 @@ const index = commands.createCommand((api) => {
|
|
|
37
84
|
});
|
|
38
85
|
},
|
|
39
86
|
handler(args) {
|
|
87
|
+
var _a;
|
|
40
88
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const { loaders, intercept } = api;
|
|
42
|
-
if (intercept) {
|
|
43
|
-
intercept(args);
|
|
44
|
-
}
|
|
45
89
|
const { headers, token } = commands.parseGlobalArgs(args);
|
|
46
90
|
const writePath = args.write;
|
|
47
|
-
const
|
|
91
|
+
const type = args.name;
|
|
92
|
+
const threshold = args.threshold;
|
|
93
|
+
const apolloFederation = args.federation || false;
|
|
94
|
+
const aws = args.aws || false;
|
|
95
|
+
const method = ((_a = args.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || 'POST';
|
|
48
96
|
const schema = yield loaders.loadSchema(args.schema, {
|
|
49
97
|
headers,
|
|
50
98
|
token,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
logger.Logger.info('No similar types found');
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
for (const typeName in similarMap) {
|
|
58
|
-
if (similarMap.hasOwnProperty(typeName)) {
|
|
59
|
-
const matches = similarMap[typeName];
|
|
60
|
-
const prefix = core.getTypePrefix(schema.getType(typeName));
|
|
61
|
-
const sourceType = logger.chalk.bold(typeName);
|
|
62
|
-
const name = matches.bestMatch.target.typeId;
|
|
63
|
-
logger.Logger.log('');
|
|
64
|
-
logger.Logger.log(`${prefix} ${sourceType}`);
|
|
65
|
-
logger.Logger.log(printResult(name, matches.bestMatch.rating));
|
|
66
|
-
matches.ratings.forEach((match) => {
|
|
67
|
-
logger.Logger.log(printResult(match.target.typeId, match.rating));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (shouldWrite) {
|
|
72
|
-
if (typeof writePath !== 'string') {
|
|
73
|
-
throw new Error(`--write is not valid file path: ${writePath}`);
|
|
74
|
-
}
|
|
75
|
-
const absPath = commands.ensureAbsolute(writePath);
|
|
76
|
-
const ext = path.extname(absPath).replace('.', '').toLocaleLowerCase();
|
|
77
|
-
let output = undefined;
|
|
78
|
-
const results = transformMap(similarMap);
|
|
79
|
-
if (ext === 'json') {
|
|
80
|
-
output = outputJSON(results);
|
|
81
|
-
}
|
|
82
|
-
if (output) {
|
|
83
|
-
fs.writeFileSync(absPath, output, {
|
|
84
|
-
encoding: 'utf-8',
|
|
85
|
-
});
|
|
86
|
-
logger.Logger.success(`Available at ${absPath}\n`);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
throw new Error(`Extension ${ext} is not supported`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
99
|
+
method,
|
|
100
|
+
}, apolloFederation, aws);
|
|
101
|
+
return handler({ schema, writePath, type, threshold });
|
|
93
102
|
});
|
|
94
103
|
},
|
|
95
104
|
};
|
|
@@ -130,13 +139,13 @@ function printScale(ratio) {
|
|
|
130
139
|
const percentage = Math.floor(ratio * 100);
|
|
131
140
|
const levels = [0, 30, 50, 70, 90];
|
|
132
141
|
return levels
|
|
133
|
-
.map(
|
|
134
|
-
.map(
|
|
142
|
+
.map(level => percentage >= level)
|
|
143
|
+
.map(enabled => (enabled ? logger.figures.bullet : logger.chalk.gray(logger.figures.bullet)))
|
|
135
144
|
.join('');
|
|
136
145
|
}
|
|
137
146
|
function formatRating(ratio) {
|
|
138
147
|
return Math.floor(ratio * 100);
|
|
139
148
|
}
|
|
140
149
|
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
exports.default = index;
|
|
151
|
+
exports.handler = handler;
|
|
@@ -5,7 +5,52 @@ import { similar, getTypePrefix } from '@graphql-inspector/core';
|
|
|
5
5
|
import { extname } from 'path';
|
|
6
6
|
import { writeFileSync } from 'fs';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function handler({ schema, writePath, type, threshold, }) {
|
|
9
|
+
const shouldWrite = typeof writePath !== 'undefined';
|
|
10
|
+
const similarMap = similar(schema, type, threshold);
|
|
11
|
+
if (!Object.keys(similarMap).length) {
|
|
12
|
+
Logger.info('No similar types found');
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
for (const typeName in similarMap) {
|
|
16
|
+
if (similarMap.hasOwnProperty(typeName)) {
|
|
17
|
+
const matches = similarMap[typeName];
|
|
18
|
+
const prefix = getTypePrefix(schema.getType(typeName));
|
|
19
|
+
const sourceType = chalk.bold(typeName);
|
|
20
|
+
const name = matches.bestMatch.target.typeId;
|
|
21
|
+
Logger.log('');
|
|
22
|
+
Logger.log(`${prefix} ${sourceType}`);
|
|
23
|
+
Logger.log(printResult(name, matches.bestMatch.rating));
|
|
24
|
+
matches.ratings.forEach(match => {
|
|
25
|
+
Logger.log(printResult(match.target.typeId, match.rating));
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (shouldWrite) {
|
|
30
|
+
if (typeof writePath !== 'string') {
|
|
31
|
+
throw new Error(`--write is not valid file path: ${writePath}`);
|
|
32
|
+
}
|
|
33
|
+
const absPath = ensureAbsolute(writePath);
|
|
34
|
+
const ext = extname(absPath).replace('.', '').toLocaleLowerCase();
|
|
35
|
+
let output = undefined;
|
|
36
|
+
const results = transformMap(similarMap);
|
|
37
|
+
if (ext === 'json') {
|
|
38
|
+
output = outputJSON(results);
|
|
39
|
+
}
|
|
40
|
+
if (output) {
|
|
41
|
+
writeFileSync(absPath, output, {
|
|
42
|
+
encoding: 'utf-8',
|
|
43
|
+
});
|
|
44
|
+
Logger.success(`Available at ${absPath}\n`);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new Error(`Extension ${ext} is not supported`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const index = createCommand(api => {
|
|
53
|
+
const { loaders } = api;
|
|
9
54
|
return {
|
|
10
55
|
command: 'similar <schema>',
|
|
11
56
|
describe: 'Find similar types in a schema',
|
|
@@ -35,59 +80,21 @@ const index = createCommand((api) => {
|
|
|
35
80
|
});
|
|
36
81
|
},
|
|
37
82
|
handler(args) {
|
|
83
|
+
var _a;
|
|
38
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const { loaders, intercept } = api;
|
|
40
|
-
if (intercept) {
|
|
41
|
-
intercept(args);
|
|
42
|
-
}
|
|
43
85
|
const { headers, token } = parseGlobalArgs(args);
|
|
44
86
|
const writePath = args.write;
|
|
45
|
-
const
|
|
87
|
+
const type = args.name;
|
|
88
|
+
const threshold = args.threshold;
|
|
89
|
+
const apolloFederation = args.federation || false;
|
|
90
|
+
const aws = args.aws || false;
|
|
91
|
+
const method = ((_a = args.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || 'POST';
|
|
46
92
|
const schema = yield loaders.loadSchema(args.schema, {
|
|
47
93
|
headers,
|
|
48
94
|
token,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Logger.info('No similar types found');
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
for (const typeName in similarMap) {
|
|
56
|
-
if (similarMap.hasOwnProperty(typeName)) {
|
|
57
|
-
const matches = similarMap[typeName];
|
|
58
|
-
const prefix = getTypePrefix(schema.getType(typeName));
|
|
59
|
-
const sourceType = chalk.bold(typeName);
|
|
60
|
-
const name = matches.bestMatch.target.typeId;
|
|
61
|
-
Logger.log('');
|
|
62
|
-
Logger.log(`${prefix} ${sourceType}`);
|
|
63
|
-
Logger.log(printResult(name, matches.bestMatch.rating));
|
|
64
|
-
matches.ratings.forEach((match) => {
|
|
65
|
-
Logger.log(printResult(match.target.typeId, match.rating));
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (shouldWrite) {
|
|
70
|
-
if (typeof writePath !== 'string') {
|
|
71
|
-
throw new Error(`--write is not valid file path: ${writePath}`);
|
|
72
|
-
}
|
|
73
|
-
const absPath = ensureAbsolute(writePath);
|
|
74
|
-
const ext = extname(absPath).replace('.', '').toLocaleLowerCase();
|
|
75
|
-
let output = undefined;
|
|
76
|
-
const results = transformMap(similarMap);
|
|
77
|
-
if (ext === 'json') {
|
|
78
|
-
output = outputJSON(results);
|
|
79
|
-
}
|
|
80
|
-
if (output) {
|
|
81
|
-
writeFileSync(absPath, output, {
|
|
82
|
-
encoding: 'utf-8',
|
|
83
|
-
});
|
|
84
|
-
Logger.success(`Available at ${absPath}\n`);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error(`Extension ${ext} is not supported`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
95
|
+
method,
|
|
96
|
+
}, apolloFederation, aws);
|
|
97
|
+
return handler({ schema, writePath, type, threshold });
|
|
91
98
|
});
|
|
92
99
|
},
|
|
93
100
|
};
|
|
@@ -128,8 +135,8 @@ function printScale(ratio) {
|
|
|
128
135
|
const percentage = Math.floor(ratio * 100);
|
|
129
136
|
const levels = [0, 30, 50, 70, 90];
|
|
130
137
|
return levels
|
|
131
|
-
.map(
|
|
132
|
-
.map(
|
|
138
|
+
.map(level => percentage >= level)
|
|
139
|
+
.map(enabled => (enabled ? figures.bullet : chalk.gray(figures.bullet)))
|
|
133
140
|
.join('');
|
|
134
141
|
}
|
|
135
142
|
function formatRating(ratio) {
|
|
@@ -137,4 +144,4 @@ function formatRating(ratio) {
|
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
export default index;
|
|
140
|
-
|
|
147
|
+
export { handler };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-inspector/similar-command",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.86df6bb",
|
|
4
4
|
"description": "Find similar types in GraphQL Schema",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0"
|
|
7
|
+
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-inspector/commands": "0.0.0-canary.
|
|
11
|
-
"@graphql-inspector/core": "0.0.0-canary.
|
|
12
|
-
"@graphql-inspector/logger": "0.0.0-canary.
|
|
10
|
+
"@graphql-inspector/commands": "0.0.0-canary.86df6bb",
|
|
11
|
+
"@graphql-inspector/core": "0.0.0-canary.86df6bb",
|
|
12
|
+
"@graphql-inspector/logger": "0.0.0-canary.86df6bb",
|
|
13
13
|
"tslib": "^2.0.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
@@ -29,10 +29,20 @@
|
|
|
29
29
|
"url": "https://github.com/kamilkisiela"
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
|
-
"main": "index.
|
|
33
|
-
"module": "index.
|
|
32
|
+
"main": "index.js",
|
|
33
|
+
"module": "index.mjs",
|
|
34
34
|
"typings": "index.d.ts",
|
|
35
35
|
"typescript": {
|
|
36
36
|
"definition": "index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"require": "./index.js",
|
|
41
|
+
"import": "./index.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./*": {
|
|
44
|
+
"require": "./*.js",
|
|
45
|
+
"import": "./*.mjs"
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
}
|
package/index.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../dist/commands/similar/src/index.js"],"sourcesContent":["import { __awaiter } from \"tslib\";\nimport { createCommand, ensureAbsolute, parseGlobalArgs, } from '@graphql-inspector/commands';\nimport { Logger, figures, chalk } from '@graphql-inspector/logger';\nimport { similar as findSimilar, getTypePrefix, } from '@graphql-inspector/core';\nimport { extname } from 'path';\nimport { writeFileSync } from 'fs';\nexport default createCommand((api) => {\n return {\n command: 'similar <schema>',\n describe: 'Find similar types in a schema',\n builder(yargs) {\n return yargs\n .positional('schema', {\n describe: 'Point to a schema',\n type: 'string',\n demandOption: true,\n })\n .options({\n n: {\n alias: 'name',\n describe: 'Name of a type',\n type: 'string',\n },\n t: {\n alias: 'threshold',\n describe: 'Threshold of similarity ratio',\n type: 'number',\n },\n w: {\n alias: 'write',\n describe: 'Write a file with stats',\n type: 'string',\n },\n });\n },\n handler(args) {\n return __awaiter(this, void 0, void 0, function* () {\n const { loaders, intercept } = api;\n if (intercept) {\n intercept(args);\n }\n const { headers, token } = parseGlobalArgs(args);\n const writePath = args.write;\n const shouldWrite = typeof writePath !== 'undefined';\n const schema = yield loaders.loadSchema(args.schema, {\n headers,\n token,\n });\n const similarMap = findSimilar(schema, args.name, args.threshold);\n if (!Object.keys(similarMap).length) {\n Logger.info('No similar types found');\n }\n else {\n for (const typeName in similarMap) {\n if (similarMap.hasOwnProperty(typeName)) {\n const matches = similarMap[typeName];\n const prefix = getTypePrefix(schema.getType(typeName));\n const sourceType = chalk.bold(typeName);\n const name = matches.bestMatch.target.typeId;\n Logger.log('');\n Logger.log(`${prefix} ${sourceType}`);\n Logger.log(printResult(name, matches.bestMatch.rating));\n matches.ratings.forEach((match) => {\n Logger.log(printResult(match.target.typeId, match.rating));\n });\n }\n }\n if (shouldWrite) {\n if (typeof writePath !== 'string') {\n throw new Error(`--write is not valid file path: ${writePath}`);\n }\n const absPath = ensureAbsolute(writePath);\n const ext = extname(absPath).replace('.', '').toLocaleLowerCase();\n let output = undefined;\n const results = transformMap(similarMap);\n if (ext === 'json') {\n output = outputJSON(results);\n }\n if (output) {\n writeFileSync(absPath, output, {\n encoding: 'utf-8',\n });\n Logger.success(`Available at ${absPath}\\n`);\n }\n else {\n throw new Error(`Extension ${ext} is not supported`);\n }\n }\n }\n });\n },\n };\n});\nfunction indent(line, space) {\n return line.padStart(line.length + space, ' ');\n}\nfunction transformMap(similarMap) {\n const results = {};\n for (const typename in similarMap) {\n if (similarMap.hasOwnProperty(typename)) {\n const result = similarMap[typename];\n results[typename] = [];\n if (result.bestMatch) {\n results[typename].push(trasformResult(result.bestMatch));\n }\n if (result.ratings) {\n results[typename].push(...result.ratings.map(trasformResult));\n }\n }\n }\n return results;\n}\nfunction trasformResult(record) {\n return {\n typename: record.target.typeId,\n rating: record.rating,\n };\n}\nfunction outputJSON(results) {\n return JSON.stringify(results);\n}\nfunction printResult(name, rating) {\n const percentage = chalk.grey(`(${formatRating(rating)}%)`);\n return indent(`${printScale(rating)} ${percentage} ${name}`, 0);\n}\nfunction printScale(ratio) {\n const percentage = Math.floor(ratio * 100);\n const levels = [0, 30, 50, 70, 90];\n return levels\n .map((level) => percentage >= level)\n .map((enabled) => (enabled ? figures.bullet : chalk.gray(figures.bullet)))\n .join('');\n}\nfunction formatRating(ratio) {\n return Math.floor(ratio * 100);\n}\n//# sourceMappingURL=index.js.map"],"names":["createCommand","__awaiter","parseGlobalArgs","findSimilar","Logger","getTypePrefix","chalk","ensureAbsolute","extname","writeFileSync","figures"],"mappings":";;;;;;;;;AAMA,cAAeA,sBAAa,CAAC,CAAC,GAAG,KAAK;AACtC,IAAI,OAAO;AACX,QAAQ,OAAO,EAAE,kBAAkB;AACnC,QAAQ,QAAQ,EAAE,gCAAgC;AAClD,QAAQ,OAAO,CAAC,KAAK,EAAE;AACvB,YAAY,OAAO,KAAK;AACxB,iBAAiB,UAAU,CAAC,QAAQ,EAAE;AACtC,gBAAgB,QAAQ,EAAE,mBAAmB;AAC7C,gBAAgB,IAAI,EAAE,QAAQ;AAC9B,gBAAgB,YAAY,EAAE,IAAI;AAClC,aAAa,CAAC;AACd,iBAAiB,OAAO,CAAC;AACzB,gBAAgB,CAAC,EAAE;AACnB,oBAAoB,KAAK,EAAE,MAAM;AACjC,oBAAoB,QAAQ,EAAE,gBAAgB;AAC9C,oBAAoB,IAAI,EAAE,QAAQ;AAClC,iBAAiB;AACjB,gBAAgB,CAAC,EAAE;AACnB,oBAAoB,KAAK,EAAE,WAAW;AACtC,oBAAoB,QAAQ,EAAE,+BAA+B;AAC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IAAI,OAAO,MAAM;AACjB,SAAS,GAAG,CAAC,CAAC,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC;AAC5C,SAAS,GAAG,CAAC,CAAC,OAAO,MAAM,OAAO,GAAGI,cAAO,CAAC,MAAM,GAAGJ,YAAK,CAAC,IAAI,CAACI,cAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAClF,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;AACnC;;;;"}
|
package/index.esm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../dist/commands/similar/src/index.js"],"sourcesContent":["import { __awaiter } from \"tslib\";\nimport { createCommand, ensureAbsolute, parseGlobalArgs, } from '@graphql-inspector/commands';\nimport { Logger, figures, chalk } from '@graphql-inspector/logger';\nimport { similar as findSimilar, getTypePrefix, } from '@graphql-inspector/core';\nimport { extname } from 'path';\nimport { writeFileSync } from 'fs';\nexport default createCommand((api) => {\n return {\n command: 'similar <schema>',\n describe: 'Find similar types in a schema',\n builder(yargs) {\n return yargs\n .positional('schema', {\n describe: 'Point to a schema',\n type: 'string',\n demandOption: true,\n })\n .options({\n n: {\n alias: 'name',\n describe: 'Name of a type',\n type: 'string',\n },\n t: {\n alias: 'threshold',\n describe: 'Threshold of similarity ratio',\n type: 'number',\n },\n w: {\n alias: 'write',\n describe: 'Write a file with stats',\n type: 'string',\n },\n });\n },\n handler(args) {\n return __awaiter(this, void 0, void 0, function* () {\n const { loaders, intercept } = api;\n if (intercept) {\n intercept(args);\n }\n const { headers, token } = parseGlobalArgs(args);\n const writePath = args.write;\n const shouldWrite = typeof writePath !== 'undefined';\n const schema = yield loaders.loadSchema(args.schema, {\n headers,\n token,\n });\n const similarMap = findSimilar(schema, args.name, args.threshold);\n if (!Object.keys(similarMap).length) {\n Logger.info('No similar types found');\n }\n else {\n for (const typeName in similarMap) {\n if (similarMap.hasOwnProperty(typeName)) {\n const matches = similarMap[typeName];\n const prefix = getTypePrefix(schema.getType(typeName));\n const sourceType = chalk.bold(typeName);\n const name = matches.bestMatch.target.typeId;\n Logger.log('');\n Logger.log(`${prefix} ${sourceType}`);\n Logger.log(printResult(name, matches.bestMatch.rating));\n matches.ratings.forEach((match) => {\n Logger.log(printResult(match.target.typeId, match.rating));\n });\n }\n }\n if (shouldWrite) {\n if (typeof writePath !== 'string') {\n throw new Error(`--write is not valid file path: ${writePath}`);\n }\n const absPath = ensureAbsolute(writePath);\n const ext = extname(absPath).replace('.', '').toLocaleLowerCase();\n let output = undefined;\n const results = transformMap(similarMap);\n if (ext === 'json') {\n output = outputJSON(results);\n }\n if (output) {\n writeFileSync(absPath, output, {\n encoding: 'utf-8',\n });\n Logger.success(`Available at ${absPath}\\n`);\n }\n else {\n throw new Error(`Extension ${ext} is not supported`);\n }\n }\n }\n });\n },\n };\n});\nfunction indent(line, space) {\n return line.padStart(line.length + space, ' ');\n}\nfunction transformMap(similarMap) {\n const results = {};\n for (const typename in similarMap) {\n if (similarMap.hasOwnProperty(typename)) {\n const result = similarMap[typename];\n results[typename] = [];\n if (result.bestMatch) {\n results[typename].push(trasformResult(result.bestMatch));\n }\n if (result.ratings) {\n results[typename].push(...result.ratings.map(trasformResult));\n }\n }\n }\n return results;\n}\nfunction trasformResult(record) {\n return {\n typename: record.target.typeId,\n rating: record.rating,\n };\n}\nfunction outputJSON(results) {\n return JSON.stringify(results);\n}\nfunction printResult(name, rating) {\n const percentage = chalk.grey(`(${formatRating(rating)}%)`);\n return indent(`${printScale(rating)} ${percentage} ${name}`, 0);\n}\nfunction printScale(ratio) {\n const percentage = Math.floor(ratio * 100);\n const levels = [0, 30, 50, 70, 90];\n return levels\n .map((level) => percentage >= level)\n .map((enabled) => (enabled ? figures.bullet : chalk.gray(figures.bullet)))\n .join('');\n}\nfunction form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