Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-inspector/commands

Package Overview
Dependencies
Maintainers
3
Versions
420
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-inspector/commands - npm Package Compare versions

Comparing version 0.0.0-canary.36985fe to 0.0.0-canary.36b26d2

6

index.d.ts

@@ -29,2 +29,6 @@ import { InspectorConfig } from '@graphql-inspector/config';

};
export declare function mockCommand(mod: Command, cmd: string): Promise<string>;
export declare function mockCommand(mod: Command, cmd: string): Promise<{
[x: string]: unknown;
_: (string | number)[];
$0: string;
}>;

24

index.js

@@ -12,3 +12,3 @@ 'use strict';

function useCommands(api) {
return api.config.commands.map((name) => loadCommand(name)(api));
return api.config.commands.map(name => loadCommand(name)(api));
}

@@ -30,3 +30,3 @@ function createCommand(factory) {

if (args.header) {
args.header.forEach((header) => {
args.header.forEach(header => {
const [name, ...values] = header.split(':');

@@ -37,3 +37,3 @@ headers[name] = values.join('');

if (args.leftHeader) {
args.leftHeader.forEach((leftHeader) => {
args.leftHeader.forEach(leftHeader => {
const [lname, ...lvalues] = leftHeader.split(':');

@@ -44,3 +44,3 @@ leftHeaders[lname] = lvalues.join('');

if (args.rightHeader) {
args.rightHeader.forEach((rightHeader) => {
args.rightHeader.forEach(rightHeader => {
const [rname, ...rvalues] = rightHeader.split(':');

@@ -51,3 +51,3 @@ rightHeaders[rname] = rvalues.join('');

if (args.require) {
args.require.forEach((mod) => require(mod));
args.require.forEach(mod => require(mod));
}

@@ -58,15 +58,3 @@ return { headers, leftHeaders, rightHeaders, token: args.token };

return tslib.__awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
yargs
.exitProcess(false)
.command(mod)
.parse(cmd, (err, _, output) => {
if (err) {
reject(err);
}
else {
resolve(output);
}
});
});
return yargs.command(mod).parseAsync(cmd);
});

@@ -73,0 +61,0 @@ }

{
"name": "@graphql-inspector/commands",
"version": "0.0.0-canary.36985fe",
"version": "0.0.0-canary.36b26d2",
"description": "Plugin system for commands in GraphQL Inspector",
"sideEffects": false,
"peerDependencies": {
"@graphql-inspector/config": "0.0.0-canary.36985fe",
"@graphql-inspector/loaders": "0.0.0-canary.36985fe",
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0",
"yargs": "17.1.1"
"@graphql-inspector/config": "0.0.0-canary.36b26d2",
"@graphql-inspector/loaders": "0.0.0-canary.36b26d2",
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
"yargs": "17.2.1"
},

@@ -12,0 +12,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc