Socket
Socket
Sign inDemoInstall

@graphql-inspector/config

Package Overview
Dependencies
Maintainers
1
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-inspector/config - npm Package Compare versions

Comparing version 1.30.4 to 2.0.0-rc.0

42

index.cjs.js

@@ -30,17 +30,25 @@ 'use strict';

// Right now everything is hardcoded for better UX but this may change in future.
const availableCommands = [
'coverage',
'diff',
'docs',
'introspect',
'serve',
'similar',
'validate',
];
const availableLoaders = [
'code',
'git',
'github',
'graphql',
'json',
'url',
];
function useConfig() {
return __awaiter(this, void 0, void 0, function* () {
return {
use: {
loaders: ensureList(discoverLoaders(['code', 'git', 'github', 'graphql', 'json', 'url']), 'loaders'),
commands: ensureList(discoverCommands([
'coverage',
'diff',
'docs',
'introspect',
'serve',
'similar',
'validate',
]), 'commands'),
},
loaders: ensureList(discoverLoaders(availableLoaders), 'loaders'),
commands: ensureList(discoverCommands(availableCommands), 'commands'),
};

@@ -50,12 +58,8 @@ });

function moduleExists(name) {
var _a;
try {
require(name);
require.resolve(name);
return true;
}
catch (error) {
if ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes(`Cannot find module '${name}'`)) {
return false;
}
throw error;
return false;
}

@@ -79,3 +83,5 @@ }

exports.availableCommands = availableCommands;
exports.availableLoaders = availableLoaders;
exports.useConfig = useConfig;
//# sourceMappingURL=index.cjs.js.map
export interface InspectorConfig {
use: {
loaders: string[];
commands: string[];
};
loaders: string[];
commands: string[];
}
export declare const availableCommands: string[];
export declare const availableLoaders: string[];
export declare function useConfig(): Promise<InspectorConfig | never>;

@@ -26,17 +26,25 @@ /*! *****************************************************************************

// Right now everything is hardcoded for better UX but this may change in future.
const availableCommands = [
'coverage',
'diff',
'docs',
'introspect',
'serve',
'similar',
'validate',
];
const availableLoaders = [
'code',
'git',
'github',
'graphql',
'json',
'url',
];
function useConfig() {
return __awaiter(this, void 0, void 0, function* () {
return {
use: {
loaders: ensureList(discoverLoaders(['code', 'git', 'github', 'graphql', 'json', 'url']), 'loaders'),
commands: ensureList(discoverCommands([
'coverage',
'diff',
'docs',
'introspect',
'serve',
'similar',
'validate',
]), 'commands'),
},
loaders: ensureList(discoverLoaders(availableLoaders), 'loaders'),
commands: ensureList(discoverCommands(availableCommands), 'commands'),
};

@@ -46,12 +54,8 @@ });

function moduleExists(name) {
var _a;
try {
require(name);
require.resolve(name);
return true;
}
catch (error) {
if ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes(`Cannot find module '${name}'`)) {
return false;
}
throw error;
return false;
}

@@ -75,3 +79,3 @@ }

export { useConfig };
export { availableCommands, availableLoaders, useConfig };
//# sourceMappingURL=index.esm.js.map
{
"name": "@graphql-inspector/config",
"version": "1.30.4",
"version": "2.0.0-rc.0",
"peerDependencies": {

@@ -5,0 +5,0 @@ "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0"

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