Socket
Socket
Sign inDemoInstall

@graphql-inspector/commands

Package Overview
Dependencies
Maintainers
2
Versions
418
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 2.5.0 to 2.6.0

16

index.cjs.js

@@ -26,2 +26,4 @@ 'use strict';

const headers = {};
const leftHeaders = {};
const rightHeaders = {};
if (args.header) {

@@ -33,6 +35,18 @@ args.header.forEach((header) => {

}
if (args.leftHeader) {
args.leftHeader.forEach((leftHeader) => {
const [lname, ...lvalues] = leftHeader.split(':');
leftHeaders[lname] = lvalues.join('');
});
}
if (args.rightHeader) {
args.rightHeader.forEach((rightHeader) => {
const [rname, ...rvalues] = rightHeader.split(':');
rightHeaders[rname] = rvalues.join('');
});
}
if (args.require) {
args.require.forEach((mod) => require(mod));
}
return { headers, token: args.token };
return { headers, leftHeaders, rightHeaders, token: args.token };
}

@@ -39,0 +53,0 @@ function mockCommand(mod, cmd) {

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

header?: string[];
leftHeader?: string[];
rightHeader?: string[];
federation?: boolean;

@@ -24,4 +26,6 @@ aws?: boolean;

headers: Record<string, string>;
leftHeaders: Record<string, string>;
rightHeaders: Record<string, string>;
token: string | undefined;
};
export declare function mockCommand(mod: Command, cmd: string): Promise<string>;

@@ -20,2 +20,4 @@ import { __awaiter } from 'tslib';

const headers = {};
const leftHeaders = {};
const rightHeaders = {};
if (args.header) {

@@ -27,6 +29,18 @@ args.header.forEach((header) => {

}
if (args.leftHeader) {
args.leftHeader.forEach((leftHeader) => {
const [lname, ...lvalues] = leftHeader.split(':');
leftHeaders[lname] = lvalues.join('');
});
}
if (args.rightHeader) {
args.rightHeader.forEach((rightHeader) => {
const [rname, ...rvalues] = rightHeader.split(':');
rightHeaders[rname] = rvalues.join('');
});
}
if (args.require) {
args.require.forEach((mod) => require(mod));
}
return { headers, token: args.token };
return { headers, leftHeaders, rightHeaders, token: args.token };
}

@@ -33,0 +47,0 @@ function mockCommand(mod, cmd) {

8

package.json
{
"name": "@graphql-inspector/commands",
"version": "2.5.0",
"version": "2.6.0",
"description": "Plugin system for commands in GraphQL Inspector",
"sideEffects": false,
"peerDependencies": {
"@graphql-inspector/config": "2.5.0",
"@graphql-inspector/loaders": "2.5.0",
"@graphql-inspector/config": "2.6.0",
"@graphql-inspector/loaders": "2.6.0",
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0",
"yargs": "16.2.0"
"yargs": "17.0.1"
},

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

Sorry, the diff of this file is not supported yet

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