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

@graphql-inspector/commands

Package Overview
Dependencies
Maintainers
1
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.8127707 to 0.0.0-canary.35db993

7

index.cjs.js

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

function useCommands(api) {
return api.config.commands.map((name) => loadCommand(name)(api));
return api.config.commands.map((name) => loadCommand(name)(Object.assign({ interceptOptions(opts) {
return opts;
},
interceptPositional(_key, opt) {
return opt;
} }, api)));
}

@@ -15,0 +20,0 @@ function createCommand(factory) {

17

index.d.ts
import { InspectorConfig } from '@graphql-inspector/config';
import { Loaders } from '@graphql-inspector/loaders';
import { CommandModule } from 'yargs';
export { CommandModule as Command };
import { CommandModule as Command, PositionalOptions, Options } from 'yargs';
export { Command };
export interface UseCommandsAPI {
config: InspectorConfig;
loaders: Loaders;
intercept?<T>(args: T): Promise<T>;
/** @internal */
interceptPositional?<TKey extends string, TOptions extends PositionalOptions>(key: TKey, options: TOptions): TOptions;
/** @internal */
interceptOptions?<T extends {
[key: string]: Options;
}>(options: T): T;
}
export declare type CommandFactory<T = {}, U = {}> = (api: UseCommandsAPI) => CommandModule<T, U>;
export declare function useCommands(api: UseCommandsAPI): CommandModule[];
export declare type CommandFactory<T = {}, U = {}> = (api: Required<UseCommandsAPI>) => Command<T, U>;
export declare function useCommands(api: UseCommandsAPI): Command[];
export declare function createCommand<T = {}, U = {}>(factory: CommandFactory<T, U>): CommandFactory<T, U>;

@@ -23,2 +28,2 @@ export declare function ensureAbsolute(filepath: string, basepath?: string): string;

};
export declare function mockCommand(mod: CommandModule, cmd: string): Promise<string>;
export declare function mockCommand(mod: Command, cmd: string): Promise<string>;

@@ -6,3 +6,8 @@ import { __awaiter } from 'tslib';

function useCommands(api) {
return api.config.commands.map((name) => loadCommand(name)(api));
return api.config.commands.map((name) => loadCommand(name)(Object.assign({ interceptOptions(opts) {
return opts;
},
interceptPositional(_key, opt) {
return opt;
} }, api)));
}

@@ -9,0 +14,0 @@ function createCommand(factory) {

{
"name": "@graphql-inspector/commands",
"version": "0.0.0-canary.8127707",
"version": "0.0.0-canary.35db993",
"description": "Plugin system for commands in GraphQL Inspector",
"sideEffects": false,
"peerDependencies": {
"@graphql-inspector/config": "0.0.0-canary.8127707",
"@graphql-inspector/loaders": "0.0.0-canary.8127707",
"@graphql-inspector/config": "0.0.0-canary.35db993",
"@graphql-inspector/loaders": "0.0.0-canary.35db993",
"graphql": "^0.13.0 || ^14.0.0 || ^15.0.0",

@@ -10,0 +10,0 @@ "yargs": "15.3.1"

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