@graphql-inspector/coverage-command 3.4.0 → 3.4.1-alpha-20230111095532-bd016dc8
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 +1 -1
- package/index.js +8 -4
- package/index.mjs +8 -4
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandFactory, GlobalArgs } from '@graphql-inspector/commands';
|
|
2
2
|
import { Source as DocumentSource } from '@graphql-tools/utils';
|
|
3
3
|
import { GraphQLSchema } from 'graphql';
|
|
4
4
|
export { CommandFactory };
|
package/index.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const tslib = require('tslib');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
6
8
|
const commands = require('@graphql-inspector/commands');
|
|
7
|
-
const logger = require('@graphql-inspector/logger');
|
|
8
9
|
const core = require('@graphql-inspector/core');
|
|
10
|
+
const logger = require('@graphql-inspector/logger');
|
|
9
11
|
const graphql = require('graphql');
|
|
10
|
-
const path = require('path');
|
|
11
|
-
const fs = require('fs');
|
|
12
12
|
|
|
13
13
|
function handler({ schema, documents, silent, writePath, }) {
|
|
14
14
|
const shouldWrite = typeof writePath !== 'undefined';
|
|
@@ -95,7 +95,11 @@ function renderCoverage(coverage) {
|
|
|
95
95
|
for (const typeName in coverage.types) {
|
|
96
96
|
if (coverage.types.hasOwnProperty(typeName)) {
|
|
97
97
|
const typeCoverage = coverage.types[typeName];
|
|
98
|
-
logger.Logger.log([
|
|
98
|
+
logger.Logger.log([
|
|
99
|
+
logger.chalk.grey(core.getTypePrefix(typeCoverage.type)),
|
|
100
|
+
logger.chalk.bold(`${typeName}`),
|
|
101
|
+
logger.chalk.grey('{'),
|
|
102
|
+
].join(' '));
|
|
99
103
|
for (const childName in typeCoverage.children) {
|
|
100
104
|
if (typeCoverage.children.hasOwnProperty(childName)) {
|
|
101
105
|
const childCoverage = typeCoverage.children[childName];
|
package/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __awaiter } from 'tslib';
|
|
2
|
+
import { writeFileSync } from 'fs';
|
|
3
|
+
import { extname } from 'path';
|
|
2
4
|
import { createCommand, parseGlobalArgs, ensureAbsolute } from '@graphql-inspector/commands';
|
|
3
|
-
import { Logger, chalk } from '@graphql-inspector/logger';
|
|
4
5
|
import { coverage, getTypePrefix } from '@graphql-inspector/core';
|
|
6
|
+
import { Logger, chalk } from '@graphql-inspector/logger';
|
|
5
7
|
import { Source, print } from 'graphql';
|
|
6
|
-
import { extname } from 'path';
|
|
7
|
-
import { writeFileSync } from 'fs';
|
|
8
8
|
|
|
9
9
|
function handler({ schema, documents, silent, writePath, }) {
|
|
10
10
|
const shouldWrite = typeof writePath !== 'undefined';
|
|
@@ -91,7 +91,11 @@ function renderCoverage(coverage) {
|
|
|
91
91
|
for (const typeName in coverage.types) {
|
|
92
92
|
if (coverage.types.hasOwnProperty(typeName)) {
|
|
93
93
|
const typeCoverage = coverage.types[typeName];
|
|
94
|
-
Logger.log([
|
|
94
|
+
Logger.log([
|
|
95
|
+
chalk.grey(getTypePrefix(typeCoverage.type)),
|
|
96
|
+
chalk.bold(`${typeName}`),
|
|
97
|
+
chalk.grey('{'),
|
|
98
|
+
].join(' '));
|
|
95
99
|
for (const childName in typeCoverage.children) {
|
|
96
100
|
if (typeCoverage.children.hasOwnProperty(childName)) {
|
|
97
101
|
const childCoverage = typeCoverage.children[childName];
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-inspector/coverage-command",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1-alpha-20230111095532-bd016dc8",
|
|
4
4
|
"description": "Schema Coverage in GraphQL Inspector",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-inspector/commands": "3.4.
|
|
11
|
-
"@graphql-inspector/core": "3.4.
|
|
12
|
-
"@graphql-inspector/logger": "3.4.
|
|
10
|
+
"@graphql-inspector/commands": "3.4.1-alpha-20230111095532-bd016dc8",
|
|
11
|
+
"@graphql-inspector/core": "3.4.1-alpha-20230111095532-bd016dc8",
|
|
12
|
+
"@graphql-inspector/logger": "3.4.1-alpha-20230111095532-bd016dc8",
|
|
13
13
|
"tslib": "^2.0.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|