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

codemirror-graphql

Package Overview
Dependencies
Maintainers
11
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codemirror-graphql - npm Package Compare versions

Comparing version 2.0.10-canary-f5992ff0.0 to 3.0.0-canary-351ba549.0

10

cm6-legacy/mode.js

@@ -1,9 +0,3 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.graphql = void 0;
var mode_factory_1 = __importDefault(require("../utils/mode-factory"));
exports.graphql = (0, mode_factory_1.default)({});
import graphqlModeFactory from '../utils/mode-factory';
export const graphql = graphqlModeFactory({});
//# sourceMappingURL=mode.js.map

37

hint.js

@@ -1,23 +0,18 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
require("codemirror/addon/hint/show-hint");
var graphql_language_service_1 = require("graphql-language-service");
codemirror_1.default.registerHelper('hint', 'graphql', function (editor, options) {
var schema = options.schema, externalFragments = options.externalFragments;
import CodeMirror from 'codemirror';
import 'codemirror/addon/hint/show-hint';
import { getAutocompleteSuggestions, Position } from 'graphql-language-service';
CodeMirror.registerHelper('hint', 'graphql', (editor, options) => {
const { schema, externalFragments } = options;
if (!schema) {
return;
}
var cur = editor.getCursor();
var token = editor.getTokenAt(cur);
var tokenStart = token.type !== null && /"|\w/.test(token.string[0])
const cur = editor.getCursor();
const token = editor.getTokenAt(cur);
const tokenStart = token.type !== null && /"|\w/.test(token.string[0])
? token.start
: token.end;
var position = new graphql_language_service_1.Position(cur.line, tokenStart);
var rawResults = (0, graphql_language_service_1.getAutocompleteSuggestions)(schema, editor.getValue(), position, token, externalFragments);
var results = {
list: rawResults.map(function (item) { return ({
const position = new Position(cur.line, tokenStart);
const rawResults = getAutocompleteSuggestions(schema, editor.getValue(), position, token, externalFragments);
const results = {
list: rawResults.map(item => ({
text: item.label,

@@ -28,3 +23,3 @@ type: item.type,

deprecationReason: item.deprecationReason,
}); }),
})),
from: { line: cur.line, ch: tokenStart },

@@ -34,5 +29,5 @@ to: { line: cur.line, ch: token.end },

if ((results === null || results === void 0 ? void 0 : results.list) && results.list.length > 0) {
results.from = codemirror_1.default.Pos(results.from.line, results.from.ch);
results.to = codemirror_1.default.Pos(results.to.line, results.to.ch);
codemirror_1.default.signal(editor, 'hasCompletion', editor, results, token);
results.from = CodeMirror.Pos(results.from.line, results.from.ch);
results.to = CodeMirror.Pos(results.to.line, results.to.ch);
CodeMirror.signal(editor, 'hasCompletion', editor, results, token);
}

@@ -39,0 +34,0 @@ return results;

@@ -1,23 +0,18 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require("graphql");
var codemirror_1 = __importDefault(require("codemirror"));
var getTypeInfo_1 = __importDefault(require("./utils/getTypeInfo"));
var SchemaReference_1 = require("./utils/SchemaReference");
require("./utils/info-addon");
codemirror_1.default.registerHelper('info', 'graphql', function (token, options) {
import { GraphQLList, GraphQLNonNull, } from 'graphql';
import CodeMirror from 'codemirror';
import getTypeInfo from './utils/getTypeInfo';
import { getArgumentReference, getDirectiveReference, getEnumValueReference, getFieldReference, getTypeReference, } from './utils/SchemaReference';
import './utils/info-addon';
CodeMirror.registerHelper('info', 'graphql', (token, options) => {
if (!options.schema || !token.state) {
return;
}
var _a = token.state, kind = _a.kind, step = _a.step;
var typeInfo = (0, getTypeInfo_1.default)(options.schema, token.state);
const { kind, step } = token.state;
const typeInfo = getTypeInfo(options.schema, token.state);
if ((kind === 'Field' && step === 0 && typeInfo.fieldDef) ||
(kind === 'AliasedField' && step === 2 && typeInfo.fieldDef)) {
var header = document.createElement('div');
const header = document.createElement('div');
header.className = 'CodeMirror-info-header';
renderField(header, typeInfo, options);
var into = document.createElement('div');
const into = document.createElement('div');
into.append(header);

@@ -28,6 +23,6 @@ renderDescription(into, options, typeInfo.fieldDef);

if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) {
var header = document.createElement('div');
const header = document.createElement('div');
header.className = 'CodeMirror-info-header';
renderDirective(header, typeInfo, options);
var into = document.createElement('div');
const into = document.createElement('div');
into.append(header);

@@ -38,6 +33,6 @@ renderDescription(into, options, typeInfo.directiveDef);

if (kind === 'Argument' && step === 0 && typeInfo.argDef) {
var header = document.createElement('div');
const header = document.createElement('div');
header.className = 'CodeMirror-info-header';
renderArg(header, typeInfo, options);
var into = document.createElement('div');
const into = document.createElement('div');
into.append(header);

@@ -50,6 +45,6 @@ renderDescription(into, options, typeInfo.argDef);

typeInfo.enumValue.description) {
var header = document.createElement('div');
const header = document.createElement('div');
header.className = 'CodeMirror-info-header';
renderEnumValue(header, typeInfo, options);
var into = document.createElement('div');
const into = document.createElement('div');
into.append(header);

@@ -62,6 +57,6 @@ renderDescription(into, options, typeInfo.enumValue);

typeInfo.type.description) {
var header = document.createElement('div');
const header = document.createElement('div');
header.className = 'CodeMirror-info-header';
renderType(header, typeInfo, options, typeInfo.type);
var into = document.createElement('div');
const into = document.createElement('div');
into.append(header);

@@ -78,14 +73,14 @@ renderDescription(into, options, typeInfo.type);

var _a;
var fieldName = ((_a = typeInfo.fieldDef) === null || _a === void 0 ? void 0 : _a.name) || '';
text(into, fieldName, 'field-name', options, (0, SchemaReference_1.getFieldReference)(typeInfo));
const fieldName = ((_a = typeInfo.fieldDef) === null || _a === void 0 ? void 0 : _a.name) || '';
text(into, fieldName, 'field-name', options, getFieldReference(typeInfo));
}
function renderDirective(into, typeInfo, options) {
var _a;
var name = '@' + (((_a = typeInfo.directiveDef) === null || _a === void 0 ? void 0 : _a.name) || '');
text(into, name, 'directive-name', options, (0, SchemaReference_1.getDirectiveReference)(typeInfo));
const name = '@' + (((_a = typeInfo.directiveDef) === null || _a === void 0 ? void 0 : _a.name) || '');
text(into, name, 'directive-name', options, getDirectiveReference(typeInfo));
}
function renderArg(into, typeInfo, options) {
var _a;
var name = ((_a = typeInfo.argDef) === null || _a === void 0 ? void 0 : _a.name) || '';
text(into, name, 'arg-name', options, (0, SchemaReference_1.getArgumentReference)(typeInfo));
const name = ((_a = typeInfo.argDef) === null || _a === void 0 ? void 0 : _a.name) || '';
text(into, name, 'arg-name', options, getArgumentReference(typeInfo));
renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType);

@@ -95,15 +90,15 @@ }

var _a;
var name = ((_a = typeInfo.enumValue) === null || _a === void 0 ? void 0 : _a.name) || '';
const name = ((_a = typeInfo.enumValue) === null || _a === void 0 ? void 0 : _a.name) || '';
renderType(into, typeInfo, options, typeInfo.inputType);
text(into, '.');
text(into, name, 'enum-value', options, (0, SchemaReference_1.getEnumValueReference)(typeInfo));
text(into, name, 'enum-value', options, getEnumValueReference(typeInfo));
}
function renderTypeAnnotation(into, typeInfo, options, t) {
var typeSpan = document.createElement('span');
const typeSpan = document.createElement('span');
typeSpan.className = 'type-name-pill';
if (t instanceof graphql_1.GraphQLNonNull) {
if (t instanceof GraphQLNonNull) {
renderType(typeSpan, typeInfo, options, t.ofType);
text(typeSpan, '!');
}
else if (t instanceof graphql_1.GraphQLList) {
else if (t instanceof GraphQLList) {
text(typeSpan, '[');

@@ -114,3 +109,3 @@ renderType(typeSpan, typeInfo, options, t.ofType);

else {
text(typeSpan, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, (0, SchemaReference_1.getTypeReference)(typeInfo, t));
text(typeSpan, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, getTypeReference(typeInfo, t));
}

@@ -120,7 +115,7 @@ into.append(typeSpan);

function renderType(into, typeInfo, options, t) {
if (t instanceof graphql_1.GraphQLNonNull) {
if (t instanceof GraphQLNonNull) {
renderType(into, typeInfo, options, t.ofType);
text(into, '!');
}
else if (t instanceof graphql_1.GraphQLList) {
else if (t instanceof GraphQLList) {
text(into, '[');

@@ -131,9 +126,9 @@ renderType(into, typeInfo, options, t.ofType);

else {
text(into, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, (0, SchemaReference_1.getTypeReference)(typeInfo, t));
text(into, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, getTypeReference(typeInfo, t));
}
}
function renderDescription(into, options, def) {
var description = def.description;
const { description } = def;
if (description) {
var descriptionDiv = document.createElement('div');
const descriptionDiv = document.createElement('div');
descriptionDiv.className = 'info-description';

@@ -151,12 +146,12 @@ if (options.renderDescription) {

function renderDeprecation(into, options, def) {
var reason = def.deprecationReason;
const reason = def.deprecationReason;
if (reason) {
var deprecationDiv = document.createElement('div');
const deprecationDiv = document.createElement('div');
deprecationDiv.className = 'info-deprecation';
into.append(deprecationDiv);
var label = document.createElement('span');
const label = document.createElement('span');
label.className = 'info-deprecation-label';
label.append(document.createTextNode('Deprecated'));
deprecationDiv.append(label);
var reasonDiv = document.createElement('div');
const reasonDiv = document.createElement('div');
reasonDiv.className = 'info-deprecation-reason';

@@ -172,14 +167,11 @@ if (options.renderDescription) {

}
function text(into, content, className, options, ref) {
if (className === void 0) { className = ''; }
if (options === void 0) { options = { onClick: null }; }
if (ref === void 0) { ref = null; }
function text(into, content, className = '', options = { onClick: null }, ref = null) {
if (className) {
var onClick_1 = options.onClick;
var node = void 0;
if (onClick_1) {
const { onClick } = options;
let node;
if (onClick) {
node = document.createElement('a');
node.href = 'javascript:void 0';
node.addEventListener('click', function (e) {
onClick_1(ref, e);
node.addEventListener('click', (e) => {
onClick(ref, e);
});

@@ -186,0 +178,0 @@ }

@@ -1,34 +0,29 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var getTypeInfo_1 = __importDefault(require("./utils/getTypeInfo"));
var SchemaReference_1 = require("./utils/SchemaReference");
require("./utils/jump-addon");
codemirror_1.default.registerHelper('jump', 'graphql', function (token, options) {
import CodeMirror from 'codemirror';
import getTypeInfo from './utils/getTypeInfo';
import { getArgumentReference, getDirectiveReference, getEnumValueReference, getFieldReference, getTypeReference, } from './utils/SchemaReference';
import './utils/jump-addon';
CodeMirror.registerHelper('jump', 'graphql', (token, options) => {
if (!options.schema || !options.onClick || !token.state) {
return;
}
var state = token.state;
var kind = state.kind, step = state.step;
var typeInfo = (0, getTypeInfo_1.default)(options.schema, state);
const { state } = token;
const { kind, step } = state;
const typeInfo = getTypeInfo(options.schema, state);
if ((kind === 'Field' && step === 0 && typeInfo.fieldDef) ||
(kind === 'AliasedField' && step === 2 && typeInfo.fieldDef)) {
return (0, SchemaReference_1.getFieldReference)(typeInfo);
return getFieldReference(typeInfo);
}
if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) {
return (0, SchemaReference_1.getDirectiveReference)(typeInfo);
return getDirectiveReference(typeInfo);
}
if (kind === 'Argument' && step === 0 && typeInfo.argDef) {
return (0, SchemaReference_1.getArgumentReference)(typeInfo);
return getArgumentReference(typeInfo);
}
if (kind === 'EnumValue' && typeInfo.enumValue) {
return (0, SchemaReference_1.getEnumValueReference)(typeInfo);
return getEnumValueReference(typeInfo);
}
if (kind === 'NamedType' && typeInfo.type) {
return (0, SchemaReference_1.getTypeReference)(typeInfo);
return getTypeReference(typeInfo);
}
});
//# sourceMappingURL=jump.js.map

@@ -1,10 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var graphql_language_service_1 = require("graphql-language-service");
var SEVERITY = ['error', 'warning', 'information', 'hint'];
var TYPE = {
import CodeMirror from 'codemirror';
import { getDiagnostics } from 'graphql-language-service';
const SEVERITY = ['error', 'warning', 'information', 'hint'];
const TYPE = {
'GraphQL: Validation': 'validation',

@@ -14,14 +9,14 @@ 'GraphQL: Deprecation': 'deprecation',

};
codemirror_1.default.registerHelper('lint', 'graphql', function (text, options) {
var schema = options.schema, validationRules = options.validationRules, externalFragments = options.externalFragments;
var rawResults = (0, graphql_language_service_1.getDiagnostics)(text, schema, validationRules, undefined, externalFragments);
var results = rawResults.map(function (error) { return ({
CodeMirror.registerHelper('lint', 'graphql', (text, options) => {
const { schema, validationRules, externalFragments } = options;
const rawResults = getDiagnostics(text, schema, validationRules, undefined, externalFragments);
const results = rawResults.map(error => ({
message: error.message,
severity: error.severity ? SEVERITY[error.severity - 1] : SEVERITY[0],
type: error.source ? TYPE[error.source] : undefined,
from: codemirror_1.default.Pos(error.range.start.line, error.range.start.character),
to: codemirror_1.default.Pos(error.range.end.line, error.range.end.character),
}); });
from: CodeMirror.Pos(error.range.start.line, error.range.start.character),
to: CodeMirror.Pos(error.range.end.line, error.range.end.character),
}));
return results;
});
//# sourceMappingURL=lint.js.map

@@ -1,9 +0,4 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var mode_factory_1 = __importDefault(require("./utils/mode-factory"));
codemirror_1.default.defineMode('graphql', mode_factory_1.default);
import CodeMirror from 'codemirror';
import modeFactory from './utils/mode-factory';
CodeMirror.defineMode('graphql', modeFactory);
//# sourceMappingURL=mode.js.map
{
"name": "codemirror-graphql",
"version": "2.0.10-canary-f5992ff0.0",
"version": "3.0.0-canary-351ba549.0",
"description": "GraphQL mode and helpers for CodeMirror.",

@@ -20,4 +20,2 @@ "contributors": [

"license": "MIT",
"main": "index.js",
"module": "esm/index.js",
"files": [

@@ -39,10 +37,4 @@ "src",

"scripts": {
"build": "yarn build-clean && yarn build-js && yarn build-esm && yarn build-flow .",
"build-js": "yarn tsc",
"build-esm": "cross-env ESM=true yarn tsc --project tsconfig.esm.json && node ../../scripts/renameFileExtensions.js './esm/{**,!**/__tests__/}/*.js' . .esm.js",
"build-clean": "rimraf {mode,hint,info,jump,lint}.{js,esm.js,js.flow,js.map,d.ts,d.ts.map} && rimraf esm results utils variables coverage cm6-legacy __tests__",
"build-flow": "node ../../scripts/buildFlow.js",
"watch": "babel --optional runtime resources/watch.js | node",
"test": "jest",
"postbuild": "node ../../scripts/renameFileExtensions.js './esm/{**,!**/__tests__/}/*.js' . .esm.js"
"test": "jest"
},

@@ -56,3 +48,3 @@ "peerDependencies": {

"dependencies": {
"graphql-language-service": "5.2.0-canary-f5992ff0.0"
"graphql-language-service": "6.0.0-canary-351ba549.0"
},

@@ -59,0 +51,0 @@ "devDependencies": {

@@ -1,12 +0,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var graphql_language_service_1 = require("graphql-language-service");
var mode_indent_1 = __importDefault(require("../utils/mode-indent"));
codemirror_1.default.defineMode('graphql-results', function (config) {
var parser = (0, graphql_language_service_1.onlineParser)({
eatWhitespace: function (stream) { return stream.eatSpace(); },
import CodeMirror from 'codemirror';
import { list, t, onlineParser, p } from 'graphql-language-service';
import indent from '../utils/mode-indent';
CodeMirror.defineMode('graphql-results', config => {
const parser = onlineParser({
eatWhitespace: stream => stream.eatSpace(),
lexRules: LexRules,

@@ -17,6 +12,6 @@ parseRules: ParseRules,

return {
config: config,
config,
startState: parser.startState,
token: parser.token,
indent: mode_indent_1.default,
indent,
electricInput: /^\s*[}\]]/,

@@ -30,3 +25,3 @@ fold: 'brace',

});
var LexRules = {
const LexRules = {
Punctuation: /^\[|]|\{|\}|:|,/,

@@ -37,6 +32,6 @@ Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,

};
var ParseRules = {
Document: [(0, graphql_language_service_1.p)('{'), (0, graphql_language_service_1.list)('Entry', (0, graphql_language_service_1.p)(',')), (0, graphql_language_service_1.p)('}')],
Entry: [(0, graphql_language_service_1.t)('String', 'def'), (0, graphql_language_service_1.p)(':'), 'Value'],
Value: function (token) {
const ParseRules = {
Document: [p('{'), list('Entry', p(',')), p('}')],
Entry: [t('String', 'def'), p(':'), 'Value'],
Value(token) {
switch (token.kind) {

@@ -66,10 +61,10 @@ case 'Number':

},
NumberValue: [(0, graphql_language_service_1.t)('Number', 'number')],
StringValue: [(0, graphql_language_service_1.t)('String', 'string')],
BooleanValue: [(0, graphql_language_service_1.t)('Keyword', 'builtin')],
NullValue: [(0, graphql_language_service_1.t)('Keyword', 'keyword')],
ListValue: [(0, graphql_language_service_1.p)('['), (0, graphql_language_service_1.list)('Value', (0, graphql_language_service_1.p)(',')), (0, graphql_language_service_1.p)(']')],
ObjectValue: [(0, graphql_language_service_1.p)('{'), (0, graphql_language_service_1.list)('ObjectField', (0, graphql_language_service_1.p)(',')), (0, graphql_language_service_1.p)('}')],
ObjectField: [(0, graphql_language_service_1.t)('String', 'property'), (0, graphql_language_service_1.p)(':'), 'Value'],
NumberValue: [t('Number', 'number')],
StringValue: [t('String', 'string')],
BooleanValue: [t('Keyword', 'builtin')],
NullValue: [t('Keyword', 'keyword')],
ListValue: [p('['), list('Value', p(',')), p(']')],
ObjectValue: [p('{'), list('ObjectField', p(',')), p('}')],
ObjectField: [t('String', 'property'), p(':'), 'Value'],
};
//# sourceMappingURL=mode.js.map

@@ -149,3 +149,3 @@ /* istanbul ignore file */

type: GraphQLBoolean,
resolve: () => {
resolve() {
return true;

@@ -152,0 +152,0 @@ },

@@ -26,11 +26,7 @@ /**

GraphQLInputFieldMap,
} from 'graphql';
import type { State, Maybe } from 'graphql-language-service';
import {
SchemaMetaFieldDef,
TypeMetaFieldDef,
TypeNameMetaFieldDef,
} from 'graphql/type/introspection';
} from 'graphql';
import type { State, Maybe } from 'graphql-language-service';
import forEachState from './forEachState';

@@ -37,0 +33,0 @@

@@ -1,40 +0,13 @@

"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require("graphql");
function collectVariables(schema, documentAST) {
var e_1, _a, e_2, _b;
var variableToType = Object.create(null);
try {
for (var _c = __values(documentAST.definitions), _d = _c.next(); !_d.done; _d = _c.next()) {
var definition = _d.value;
if (definition.kind === 'OperationDefinition') {
var variableDefinitions = definition.variableDefinitions;
if (variableDefinitions) {
try {
for (var variableDefinitions_1 = (e_2 = void 0, __values(variableDefinitions)), variableDefinitions_1_1 = variableDefinitions_1.next(); !variableDefinitions_1_1.done; variableDefinitions_1_1 = variableDefinitions_1.next()) {
var _e = variableDefinitions_1_1.value, variable = _e.variable, type = _e.type;
var inputType = (0, graphql_1.typeFromAST)(schema, type);
if (inputType) {
variableToType[variable.name.value] = inputType;
}
}
import { typeFromAST, } from 'graphql';
export default function collectVariables(schema, documentAST) {
const variableToType = Object.create(null);
for (const definition of documentAST.definitions) {
if (definition.kind === 'OperationDefinition') {
const { variableDefinitions } = definition;
if (variableDefinitions) {
for (const { variable, type } of variableDefinitions) {
const inputType = typeFromAST(schema, type);
if (inputType) {
variableToType[variable.name.value] = inputType;
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (variableDefinitions_1_1 && !variableDefinitions_1_1.done && (_b = variableDefinitions_1.return)) _b.call(variableDefinitions_1);
}
finally { if (e_2) throw e_2.error; }
}
}

@@ -44,12 +17,4 @@ }

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
return variableToType;
}
exports.default = collectVariables;
//# sourceMappingURL=collectVariables.js.map

@@ -1,6 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function forEachState(stack, fn) {
var reverseStateStack = [];
var state = stack;
export default function forEachState(stack, fn) {
const reverseStateStack = [];
let state = stack;
while (state === null || state === void 0 ? void 0 : state.kind) {

@@ -10,7 +8,6 @@ reverseStateStack.push(state);

}
for (var i = reverseStateStack.length - 1; i >= 0; i--) {
for (let i = reverseStateStack.length - 1; i >= 0; i--) {
fn(reverseStateStack[i]);
}
}
exports.default = forEachState;
//# sourceMappingURL=forEachState.js.map

@@ -1,12 +0,6 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require("graphql");
var introspection_1 = require("graphql/type/introspection");
var forEachState_1 = __importDefault(require("./forEachState"));
function getTypeInfo(schema, tokenState) {
var info = {
schema: schema,
import { isCompositeType, getNullableType, getNamedType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, } from 'graphql';
import forEachState from './forEachState';
export default function getTypeInfo(schema, tokenState) {
const info = {
schema,
type: null,

@@ -21,3 +15,3 @@ parentType: null,

};
(0, forEachState_1.default)(tokenState, function (state) {
forEachState(tokenState, (state) => {
var _a, _b;

@@ -50,3 +44,3 @@ switch (state.kind) {

case 'SelectionSet':
info.parentType = info.type ? (0, graphql_1.getNamedType)(info.type) : null;
info.parentType = info.type ? getNamedType(info.type) : null;
break;

@@ -57,3 +51,3 @@ case 'Directive':

case 'Arguments':
var parentDef = state.prevState
const parentDef = state.prevState
? state.prevState.kind === 'Field'

@@ -73,3 +67,3 @@ ? info.fieldDef

if (info.argDefs) {
for (var i = 0; i < info.argDefs.length; i++) {
for (let i = 0; i < info.argDefs.length; i++) {
if (info.argDefs[i].name === state.name) {

@@ -84,19 +78,19 @@ info.argDef = info.argDefs[i];

case 'EnumValue':
var enumType = info.inputType ? (0, graphql_1.getNamedType)(info.inputType) : null;
const enumType = info.inputType ? getNamedType(info.inputType) : null;
info.enumValue =
enumType instanceof graphql_1.GraphQLEnumType
? find(enumType.getValues(), function (val) { return val.value === state.name; })
enumType instanceof GraphQLEnumType
? find(enumType.getValues(), val => val.value === state.name)
: null;
break;
case 'ListValue':
var nullableType = info.inputType
? (0, graphql_1.getNullableType)(info.inputType)
const nullableType = info.inputType
? getNullableType(info.inputType)
: null;
info.inputType =
nullableType instanceof graphql_1.GraphQLList ? nullableType.ofType : null;
nullableType instanceof GraphQLList ? nullableType.ofType : null;
break;
case 'ObjectValue':
var objectType = info.inputType ? (0, graphql_1.getNamedType)(info.inputType) : null;
const objectType = info.inputType ? getNamedType(info.inputType) : null;
info.objectFieldDefs =
objectType instanceof graphql_1.GraphQLInputObjectType
objectType instanceof GraphQLInputObjectType
? objectType.getFields()

@@ -106,3 +100,3 @@ : null;

case 'ObjectField':
var objectField = state.name && info.objectFieldDefs
const objectField = state.name && info.objectFieldDefs
? info.objectFieldDefs[state.name]

@@ -119,12 +113,11 @@ : null;

}
exports.default = getTypeInfo;
function getFieldDef(schema, type, fieldName) {
if (fieldName === introspection_1.SchemaMetaFieldDef.name && schema.getQueryType() === type) {
return introspection_1.SchemaMetaFieldDef;
if (fieldName === SchemaMetaFieldDef.name && schema.getQueryType() === type) {
return SchemaMetaFieldDef;
}
if (fieldName === introspection_1.TypeMetaFieldDef.name && schema.getQueryType() === type) {
return introspection_1.TypeMetaFieldDef;
if (fieldName === TypeMetaFieldDef.name && schema.getQueryType() === type) {
return TypeMetaFieldDef;
}
if (fieldName === introspection_1.TypeNameMetaFieldDef.name && (0, graphql_1.isCompositeType)(type)) {
return introspection_1.TypeNameMetaFieldDef;
if (fieldName === TypeNameMetaFieldDef.name && isCompositeType(type)) {
return TypeNameMetaFieldDef;
}

@@ -136,3 +129,3 @@ if (type && type.getFields) {

function find(array, predicate) {
for (var i = 0; i < array.length; i++) {
for (let i = 0; i < array.length; i++) {
if (predicate(array[i])) {

@@ -139,0 +132,0 @@ return array[i];

@@ -1,9 +0,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function hintList(cursor, token, list) {
var hints = filterAndSortList(list, normalizeText(token.string));
export default function hintList(cursor, token, list) {
const hints = filterAndSortList(list, normalizeText(token.string));
if (!hints) {
return;
}
var tokenStart = token.type !== null && /"|\w/.test(token.string[0])
const tokenStart = token.type !== null && /"|\w/.test(token.string[0])
? token.start

@@ -17,21 +15,18 @@ : token.end;

}
exports.default = hintList;
function filterAndSortList(list, text) {
if (!text) {
return filterNonEmpty(list, function (entry) { return !entry.isDeprecated; });
return filterNonEmpty(list, entry => !entry.isDeprecated);
}
var byProximity = list.map(function (entry) { return ({
const byProximity = list.map(entry => ({
proximity: getProximity(normalizeText(entry.text), text),
entry: entry,
}); });
var conciseMatches = filterNonEmpty(filterNonEmpty(byProximity, function (pair) { return pair.proximity <= 2; }), function (pair) { return !pair.entry.isDeprecated; });
var sortedMatches = conciseMatches.sort(function (a, b) {
return (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) ||
a.proximity - b.proximity ||
a.entry.text.length - b.entry.text.length;
});
return sortedMatches.map(function (pair) { return pair.entry; });
entry,
}));
const conciseMatches = filterNonEmpty(filterNonEmpty(byProximity, pair => pair.proximity <= 2), pair => !pair.entry.isDeprecated);
const sortedMatches = conciseMatches.sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) ||
a.proximity - b.proximity ||
a.entry.text.length - b.entry.text.length);
return sortedMatches.map(pair => pair.entry);
}
function filterNonEmpty(array, predicate) {
var filtered = array.filter(predicate);
const filtered = array.filter(predicate);
return filtered.length === 0 ? array : filtered;

@@ -43,3 +38,3 @@ }

function getProximity(suggestion, text) {
var proximity = lexicalDistance(text, suggestion);
let proximity = lexicalDistance(text, suggestion);
if (suggestion.length > text.length) {

@@ -52,7 +47,7 @@ proximity -= suggestion.length - text.length - 1;

function lexicalDistance(a, b) {
var i;
var j;
var d = [];
var aLength = a.length;
var bLength = b.length;
let i;
let j;
const d = [];
const aLength = a.length;
const bLength = b.length;
for (i = 0; i <= aLength; i++) {

@@ -66,3 +61,3 @@ d[i] = [i];

for (j = 1; j <= bLength; j++) {
var cost = a[i - 1] === b[j - 1] ? 0 : 1;
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);

@@ -69,0 +64,0 @@ if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {

@@ -1,11 +0,6 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
codemirror_1.default.defineOption('info', false, function (cm, options, old) {
if (old && old !== codemirror_1.default.Init) {
var oldOnMouseOver = cm.state.info.onMouseOver;
codemirror_1.default.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver);
import CodeMirror from 'codemirror';
CodeMirror.defineOption('info', false, (cm, options, old) => {
if (old && old !== CodeMirror.Init) {
const oldOnMouseOver = cm.state.info.onMouseOver;
CodeMirror.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver);
clearTimeout(cm.state.info.hoverTimeout);

@@ -15,5 +10,5 @@ delete cm.state.info;

if (options) {
var state = (cm.state.info = createState(options));
const state = (cm.state.info = createState(options));
state.onMouseOver = onMouseOver.bind(null, cm);
codemirror_1.default.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver);
CodeMirror.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver);
}

@@ -31,8 +26,8 @@ });

function getHoverTime(cm) {
var options = cm.state.info.options;
const { options } = cm.state.info;
return (options === null || options === void 0 ? void 0 : options.hoverTime) || 500;
}
function onMouseOver(cm, e) {
var state = cm.state.info;
var target = e.target || e.srcElement;
const state = cm.state.info;
const target = e.target || e.srcElement;
if (!(target instanceof HTMLElement)) {

@@ -44,36 +39,36 @@ return;

}
var box = target.getBoundingClientRect();
var onMouseMove = function () {
const box = target.getBoundingClientRect();
const onMouseMove = function () {
clearTimeout(state.hoverTimeout);
state.hoverTimeout = setTimeout(onHover, hoverTime);
};
var onMouseOut = function () {
codemirror_1.default.off(document, 'mousemove', onMouseMove);
codemirror_1.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
const onMouseOut = function () {
CodeMirror.off(document, 'mousemove', onMouseMove);
CodeMirror.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
clearTimeout(state.hoverTimeout);
state.hoverTimeout = undefined;
};
var onHover = function () {
codemirror_1.default.off(document, 'mousemove', onMouseMove);
codemirror_1.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
const onHover = function () {
CodeMirror.off(document, 'mousemove', onMouseMove);
CodeMirror.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
state.hoverTimeout = undefined;
onMouseHover(cm, box);
};
var hoverTime = getHoverTime(cm);
const hoverTime = getHoverTime(cm);
state.hoverTimeout = setTimeout(onHover, hoverTime);
codemirror_1.default.on(document, 'mousemove', onMouseMove);
codemirror_1.default.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
CodeMirror.on(document, 'mousemove', onMouseMove);
CodeMirror.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
}
function onMouseHover(cm, box) {
var pos = cm.coordsChar({
const pos = cm.coordsChar({
left: (box.left + box.right) / 2,
top: (box.top + box.bottom) / 2,
}, 'window');
var state = cm.state.info;
var options = state.options;
var render = options.render || cm.getHelper(pos, 'info');
const state = cm.state.info;
const { options } = state;
const render = options.render || cm.getHelper(pos, 'info');
if (render) {
var token = cm.getTokenAt(pos, true);
const token = cm.getTokenAt(pos, true);
if (token) {
var info = render(token, options, cm, pos);
const info = render(token, options, cm, pos);
if (info) {

@@ -86,17 +81,17 @@ showPopup(cm, box, info);

function showPopup(cm, box, info) {
var popup = document.createElement('div');
const popup = document.createElement('div');
popup.className = 'CodeMirror-info';
popup.append(info);
document.body.append(popup);
var popupBox = popup.getBoundingClientRect();
var popupStyle = window.getComputedStyle(popup);
var popupWidth = popupBox.right -
const popupBox = popup.getBoundingClientRect();
const popupStyle = window.getComputedStyle(popup);
const popupWidth = popupBox.right -
popupBox.left +
parseFloat(popupStyle.marginLeft) +
parseFloat(popupStyle.marginRight);
var popupHeight = popupBox.bottom -
const popupHeight = popupBox.bottom -
popupBox.top +
parseFloat(popupStyle.marginTop) +
parseFloat(popupStyle.marginBottom);
var topPos = box.bottom;
let topPos = box.bottom;
if (popupHeight > window.innerHeight - box.bottom - 15 &&

@@ -109,3 +104,3 @@ box.top > window.innerHeight - box.bottom) {

}
var leftPos = Math.max(0, window.innerWidth - popupWidth - 15);
let leftPos = Math.max(0, window.innerWidth - popupWidth - 15);
if (leftPos > box.left) {

@@ -117,17 +112,17 @@ leftPos = box.left;

popup.style.left = leftPos + 'px';
var popupTimeout;
var onMouseOverPopup = function () {
let popupTimeout;
const onMouseOverPopup = function () {
clearTimeout(popupTimeout);
};
var onMouseOut = function () {
const onMouseOut = function () {
clearTimeout(popupTimeout);
popupTimeout = setTimeout(hidePopup, 200);
};
var hidePopup = function () {
codemirror_1.default.off(popup, 'mouseover', onMouseOverPopup);
codemirror_1.default.off(popup, 'mouseout', onMouseOut);
codemirror_1.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
const hidePopup = function () {
CodeMirror.off(popup, 'mouseover', onMouseOverPopup);
CodeMirror.off(popup, 'mouseout', onMouseOut);
CodeMirror.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
if (popup.style.opacity) {
popup.style.opacity = '0';
setTimeout(function () {
setTimeout(() => {
if (popup.parentNode) {

@@ -142,6 +137,6 @@ popup.remove();

};
codemirror_1.default.on(popup, 'mouseover', onMouseOverPopup);
codemirror_1.default.on(popup, 'mouseout', onMouseOut);
codemirror_1.default.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
CodeMirror.on(popup, 'mouseover', onMouseOverPopup);
CodeMirror.on(popup, 'mouseout', onMouseOut);
CodeMirror.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
}
//# sourceMappingURL=info-addon.js.map

@@ -1,20 +0,2 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSONSyntaxError = void 0;
function jsonParse(str) {
export default function jsonParse(str) {
string = str;

@@ -25,17 +7,16 @@ strLen = str.length;

lex();
var ast = parseObj();
const ast = parseObj();
expect('EOF');
return ast;
}
exports.default = jsonParse;
var string;
var strLen;
var start;
var end;
var lastEnd;
var code;
var kind;
let string;
let strLen;
let start;
let end;
let lastEnd;
let code;
let kind;
function parseObj() {
var nodeStart = start;
var members = [];
const nodeStart = start;
const members = [];
expect('{');

@@ -52,11 +33,11 @@ if (!skip('}')) {

end: lastEnd,
members: members,
members,
};
}
function parseMember() {
var nodeStart = start;
var key = kind === 'String' ? curToken() : null;
const nodeStart = start;
const key = kind === 'String' ? curToken() : null;
expect('String');
expect(':');
var value = parseVal();
const value = parseVal();
return {

@@ -66,9 +47,9 @@ kind: 'Member',

end: lastEnd,
key: key,
value: value,
key,
value,
};
}
function parseArr() {
var nodeStart = start;
var values = [];
const nodeStart = start;
const values = [];
expect('[');

@@ -85,3 +66,3 @@ if (!skip(']')) {

end: lastEnd,
values: values,
values,
};

@@ -99,3 +80,3 @@ }

case 'Null':
var token = curToken();
const token = curToken();
lex();

@@ -107,3 +88,3 @@ return token;

function curToken() {
return { kind: kind, start: start, end: end, value: JSON.parse(string.slice(start, end)) };
return { kind, start, end, value: JSON.parse(string.slice(start, end)) };
}

@@ -115,3 +96,3 @@ function expect(str) {

}
var found;
let found;
if (kind === 'EOF') {

@@ -124,19 +105,15 @@ found = '[end of file]';

else {
var match = string.slice(start).match(/^.+?\b/);
const match = string.slice(start).match(/^.+?\b/);
found = '`' + (match ? match[0] : string[start]) + '`';
}
throw syntaxError("Expected ".concat(str, " but found ").concat(found, "."));
throw syntaxError(`Expected ${str} but found ${found}.`);
}
var JSONSyntaxError = (function (_super) {
__extends(JSONSyntaxError, _super);
function JSONSyntaxError(message, position) {
var _this = _super.call(this, message) || this;
_this.position = position;
return _this;
export class JSONSyntaxError extends Error {
constructor(message, position) {
super(message);
this.position = position;
}
return JSONSyntaxError;
}(Error));
exports.JSONSyntaxError = JSONSyntaxError;
}
function syntaxError(message) {
return new JSONSyntaxError(message, { start: start, end: end });
return new JSONSyntaxError(message, { start, end });
}

@@ -143,0 +120,0 @@ function skip(k) {

@@ -1,19 +0,14 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
codemirror_1.default.defineOption('jump', false, function (cm, options, old) {
if (old && old !== codemirror_1.default.Init) {
var oldOnMouseOver = cm.state.jump.onMouseOver;
codemirror_1.default.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver);
var oldOnMouseOut = cm.state.jump.onMouseOut;
codemirror_1.default.off(cm.getWrapperElement(), 'mouseout', oldOnMouseOut);
codemirror_1.default.off(document, 'keydown', cm.state.jump.onKeyDown);
import CodeMirror from 'codemirror';
CodeMirror.defineOption('jump', false, (cm, options, old) => {
if (old && old !== CodeMirror.Init) {
const oldOnMouseOver = cm.state.jump.onMouseOver;
CodeMirror.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver);
const oldOnMouseOut = cm.state.jump.onMouseOut;
CodeMirror.off(cm.getWrapperElement(), 'mouseout', oldOnMouseOut);
CodeMirror.off(document, 'keydown', cm.state.jump.onKeyDown);
delete cm.state.jump;
}
if (options) {
var state = (cm.state.jump = {
options: options,
const state = (cm.state.jump = {
options,
onMouseOver: onMouseOver.bind(null, cm),

@@ -23,9 +18,9 @@ onMouseOut: onMouseOut.bind(null, cm),

});
codemirror_1.default.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver);
codemirror_1.default.on(cm.getWrapperElement(), 'mouseout', state.onMouseOut);
codemirror_1.default.on(document, 'keydown', state.onKeyDown);
CodeMirror.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver);
CodeMirror.on(cm.getWrapperElement(), 'mouseout', state.onMouseOut);
CodeMirror.on(document, 'keydown', state.onKeyDown);
}
});
function onMouseOver(cm, event) {
var target = event.target || event.srcElement;
const target = event.target || event.srcElement;
if (!(target instanceof HTMLElement)) {

@@ -37,4 +32,4 @@ return;

}
var box = target.getBoundingClientRect();
var cursor = {
const box = target.getBoundingClientRect();
const cursor = {
left: (box.left + box.right) / 2,

@@ -65,3 +60,3 @@ top: (box.top + box.bottom) / 2,

}
var onKeyUp = function (upEvent) {
const onKeyUp = (upEvent) => {
if (upEvent.code !== event.code) {

@@ -74,8 +69,8 @@ return;

}
codemirror_1.default.off(document, 'keyup', onKeyUp);
codemirror_1.default.off(document, 'click', onClick);
CodeMirror.off(document, 'keyup', onKeyUp);
CodeMirror.off(document, 'click', onClick);
cm.off('mousedown', onMouseDown);
};
var onClick = function (clickEvent) {
var _a = cm.state.jump, destination = _a.destination, options = _a.options;
const onClick = (clickEvent) => {
const { destination, options } = cm.state.jump;
if (destination) {

@@ -85,3 +80,3 @@ options.onClick(destination, clickEvent);

};
var onMouseDown = function (_, downEvent) {
const onMouseDown = (_, downEvent) => {
if (cm.state.jump.destination) {

@@ -91,7 +86,7 @@ downEvent.codemirrorIgnore = true;

};
codemirror_1.default.on(document, 'keyup', onKeyUp);
codemirror_1.default.on(document, 'click', onClick);
CodeMirror.on(document, 'keyup', onKeyUp);
CodeMirror.on(document, 'click', onClick);
cm.on('mousedown', onMouseDown);
}
var isMac = typeof navigator !== 'undefined' &&
const isMac = typeof navigator !== 'undefined' &&
navigator &&

@@ -106,10 +101,10 @@ navigator.appVersion.includes('Mac');

}
var _a = cm.state.jump, cursor = _a.cursor, options = _a.options;
var pos = cm.coordsChar(cursor);
var token = cm.getTokenAt(pos, true);
var getDestination = options.getDestination || cm.getHelper(pos, 'jump');
const { cursor, options } = cm.state.jump;
const pos = cm.coordsChar(cursor);
const token = cm.getTokenAt(pos, true);
const getDestination = options.getDestination || cm.getHelper(pos, 'jump');
if (getDestination) {
var destination = getDestination(token, options, cm);
const destination = getDestination(token, options, cm);
if (destination) {
var marker = cm.markText({ line: pos.line, ch: token.start }, { line: pos.line, ch: token.end }, { className: 'CodeMirror-jump-token' });
const marker = cm.markText({ line: pos.line, ch: token.start }, { line: pos.line, ch: token.end }, { className: 'CodeMirror-jump-token' });
cm.state.jump.marker = marker;

@@ -121,3 +116,3 @@ cm.state.jump.destination = destination;

function disableJumpMode(cm) {
var marker = cm.state.jump.marker;
const { marker } = cm.state.jump;
cm.state.jump.marker = null;

@@ -124,0 +119,0 @@ cm.state.jump.destination = null;

@@ -1,20 +0,15 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_language_service_1 = require("graphql-language-service");
var mode_indent_1 = __importDefault(require("./mode-indent"));
var graphqlModeFactory = function (config) {
var parser = (0, graphql_language_service_1.onlineParser)({
eatWhitespace: function (stream) { return stream.eatWhile(graphql_language_service_1.isIgnored); },
lexRules: graphql_language_service_1.LexRules,
parseRules: graphql_language_service_1.ParseRules,
import { LexRules, ParseRules, isIgnored, onlineParser, } from 'graphql-language-service';
import indent from './mode-indent';
const graphqlModeFactory = config => {
const parser = onlineParser({
eatWhitespace: stream => stream.eatWhile(isIgnored),
lexRules: LexRules,
parseRules: ParseRules,
editorConfig: { tabSize: config.tabSize },
});
return {
config: config,
config,
startState: parser.startState,
token: parser.token,
indent: mode_indent_1.default,
indent,
electricInput: /^\s*[})\]]/,

@@ -29,3 +24,3 @@ fold: 'brace',

};
exports.default = graphqlModeFactory;
export default graphqlModeFactory;
//# sourceMappingURL=mode-factory.js.map

@@ -1,7 +0,5 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function indent(state, textAfter) {
export default function indent(state, textAfter) {
var _a, _b;
var levels = state.levels, indentLevel = state.indentLevel;
var level = !levels || levels.length === 0
const { levels, indentLevel } = state;
const level = !levels || levels.length === 0
? indentLevel

@@ -11,3 +9,2 @@ : levels.at(-1) - (((_a = this.electricInput) === null || _a === void 0 ? void 0 : _a.test(textAfter)) ? 1 : 0);

}
exports.default = indent;
//# sourceMappingURL=mode-indent.js.map

@@ -1,39 +0,14 @@

"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
import { CharacterStream, onlineParser, } from 'graphql-language-service';
export default function runParser(sourceText, parserOptions, callbackFn) {
const parser = onlineParser(parserOptions);
const state = parser.startState();
const lines = sourceText.split('\n');
for (const line of lines) {
const stream = new CharacterStream(line);
while (!stream.eol()) {
const style = parser.token(stream, state);
callbackFn(stream, state, style);
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_language_service_1 = require("graphql-language-service");
function runParser(sourceText, parserOptions, callbackFn) {
var e_1, _a;
var parser = (0, graphql_language_service_1.onlineParser)(parserOptions);
var state = parser.startState();
var lines = sourceText.split('\n');
try {
for (var lines_1 = __values(lines), lines_1_1 = lines_1.next(); !lines_1_1.done; lines_1_1 = lines_1.next()) {
var line = lines_1_1.value;
var stream = new graphql_language_service_1.CharacterStream(line);
while (!stream.eol()) {
var style = parser.token(stream, state);
callbackFn(stream, state, style);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1);
}
finally { if (e_1) throw e_1.error; }
}
}
exports.default = runParser;
//# sourceMappingURL=runParser.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypeReference = exports.getEnumValueReference = exports.getArgumentReference = exports.getDirectiveReference = exports.getFieldReference = void 0;
var graphql_1 = require("graphql");
function getFieldReference(typeInfo) {
import { getNamedType } from 'graphql';
export function getFieldReference(typeInfo) {
return {

@@ -13,4 +10,3 @@ kind: 'Field',

}
exports.getFieldReference = getFieldReference;
function getDirectiveReference(typeInfo) {
export function getDirectiveReference(typeInfo) {
return {

@@ -22,4 +18,3 @@ kind: 'Directive',

}
exports.getDirectiveReference = getDirectiveReference;
function getArgumentReference(typeInfo) {
export function getArgumentReference(typeInfo) {
return typeInfo.directiveDef

@@ -40,4 +35,3 @@ ? {

}
exports.getArgumentReference = getArgumentReference;
function getEnumValueReference(typeInfo) {
export function getEnumValueReference(typeInfo) {
return {

@@ -47,8 +41,7 @@ kind: 'EnumValue',

type: typeInfo.inputType
? (0, graphql_1.getNamedType)(typeInfo.inputType)
? getNamedType(typeInfo.inputType)
: undefined,
};
}
exports.getEnumValueReference = getEnumValueReference;
function getTypeReference(typeInfo, type) {
export function getTypeReference(typeInfo, type) {
return {

@@ -60,3 +53,2 @@ kind: 'Type',

}
exports.getTypeReference = getTypeReference;
function isMetaField(fieldDef) {

@@ -63,0 +55,0 @@ return fieldDef.name.slice(0, 2) === '__';

@@ -1,18 +0,13 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var graphql_1 = require("graphql");
var forEachState_1 = __importDefault(require("../utils/forEachState"));
var hintList_1 = __importDefault(require("../utils/hintList"));
codemirror_1.default.registerHelper('hint', 'graphql-variables', function (editor, options) {
var cur = editor.getCursor();
var token = editor.getTokenAt(cur);
var results = getVariablesHint(cur, token, options);
import CodeMirror from 'codemirror';
import { getNullableType, getNamedType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLBoolean, } from 'graphql';
import forEachState from '../utils/forEachState';
import hintList from '../utils/hintList';
CodeMirror.registerHelper('hint', 'graphql-variables', (editor, options) => {
const cur = editor.getCursor();
const token = editor.getTokenAt(cur);
const results = getVariablesHint(cur, token, options);
if ((results === null || results === void 0 ? void 0 : results.list) && results.list.length > 0) {
results.from = codemirror_1.default.Pos(results.from.line, results.from.ch);
results.to = codemirror_1.default.Pos(results.to.line, results.to.ch);
codemirror_1.default.signal(editor, 'hasCompletion', editor, results, token);
results.from = CodeMirror.Pos(results.from.line, results.from.ch);
results.to = CodeMirror.Pos(results.to.line, results.to.ch);
CodeMirror.signal(editor, 'hasCompletion', editor, results, token);
}

@@ -22,27 +17,27 @@ return results;

function getVariablesHint(cur, token, options) {
var state = token.state.kind === 'Invalid' ? token.state.prevState : token.state;
var kind = state.kind, step = state.step;
const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state;
const { kind, step } = state;
if (kind === 'Document' && step === 0) {
return (0, hintList_1.default)(cur, token, [{ text: '{' }]);
return hintList(cur, token, [{ text: '{' }]);
}
var variableToType = options.variableToType;
const { variableToType } = options;
if (!variableToType) {
return;
}
var typeInfo = getTypeInfo(variableToType, token.state);
const typeInfo = getTypeInfo(variableToType, token.state);
if (kind === 'Document' || (kind === 'Variable' && step === 0)) {
var variableNames = Object.keys(variableToType);
return (0, hintList_1.default)(cur, token, variableNames.map(function (name) { return ({
text: "\"".concat(name, "\": "),
const variableNames = Object.keys(variableToType);
return hintList(cur, token, variableNames.map(name => ({
text: `"${name}": `,
type: variableToType[name],
}); }));
})));
}
if ((kind === 'ObjectValue' || (kind === 'ObjectField' && step === 0)) &&
typeInfo.fields) {
var inputFields = Object.keys(typeInfo.fields).map(function (fieldName) { return typeInfo.fields[fieldName]; });
return (0, hintList_1.default)(cur, token, inputFields.map(function (field) { return ({
text: "\"".concat(field.name, "\": "),
const inputFields = Object.keys(typeInfo.fields).map(fieldName => typeInfo.fields[fieldName]);
return hintList(cur, token, inputFields.map(field => ({
text: `"${field.name}": `,
type: field.type,
description: field.description,
}); }));
})));
}

@@ -56,20 +51,20 @@ if (kind === 'StringValue' ||

(kind === 'Variable' && step === 2)) {
var namedInputType_1 = typeInfo.type
? (0, graphql_1.getNamedType)(typeInfo.type)
const namedInputType = typeInfo.type
? getNamedType(typeInfo.type)
: undefined;
if (namedInputType_1 instanceof graphql_1.GraphQLInputObjectType) {
return (0, hintList_1.default)(cur, token, [{ text: '{' }]);
if (namedInputType instanceof GraphQLInputObjectType) {
return hintList(cur, token, [{ text: '{' }]);
}
if (namedInputType_1 instanceof graphql_1.GraphQLEnumType) {
var values = namedInputType_1.getValues();
return (0, hintList_1.default)(cur, token, values.map(function (value) { return ({
text: "\"".concat(value.name, "\""),
type: namedInputType_1,
if (namedInputType instanceof GraphQLEnumType) {
const values = namedInputType.getValues();
return hintList(cur, token, values.map(value => ({
text: `"${value.name}"`,
type: namedInputType,
description: value.description,
}); }));
})));
}
if (namedInputType_1 === graphql_1.GraphQLBoolean) {
return (0, hintList_1.default)(cur, token, [
{ text: 'true', type: graphql_1.GraphQLBoolean, description: 'Not false.' },
{ text: 'false', type: graphql_1.GraphQLBoolean, description: 'Not true.' },
if (namedInputType === GraphQLBoolean) {
return hintList(cur, token, [
{ text: 'true', type: GraphQLBoolean, description: 'Not false.' },
{ text: 'false', type: GraphQLBoolean, description: 'Not true.' },
]);

@@ -80,7 +75,7 @@ }

function getTypeInfo(variableToType, tokenState) {
var info = {
const info = {
type: null,
fields: null,
};
(0, forEachState_1.default)(tokenState, function (state) {
forEachState(tokenState, state => {
switch (state.kind) {

@@ -92,11 +87,11 @@ case 'Variable': {

case 'ListValue': {
var nullableType = info.type ? (0, graphql_1.getNullableType)(info.type) : undefined;
const nullableType = info.type ? getNullableType(info.type) : undefined;
info.type =
nullableType instanceof graphql_1.GraphQLList ? nullableType.ofType : null;
nullableType instanceof GraphQLList ? nullableType.ofType : null;
break;
}
case 'ObjectValue': {
var objectType = info.type ? (0, graphql_1.getNamedType)(info.type) : undefined;
const objectType = info.type ? getNamedType(info.type) : undefined;
info.fields =
objectType instanceof graphql_1.GraphQLInputObjectType
objectType instanceof GraphQLInputObjectType
? objectType.getFields()

@@ -107,3 +102,3 @@ : null;

case 'ObjectField': {
var objectField = state.name && info.fields ? info.fields[state.name] : null;
const objectField = state.name && info.fields ? info.fields[state.name] : null;
info.type = objectField === null || objectField === void 0 ? void 0 : objectField.type;

@@ -110,0 +105,0 @@ break;

@@ -1,69 +0,14 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var graphql_1 = require("graphql");
var jsonParse_1 = __importStar(require("../utils/jsonParse"));
codemirror_1.default.registerHelper('lint', 'graphql-variables', function (text, options, editor) {
import CodeMirror from 'codemirror';
import { GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLScalarType, } from 'graphql';
import jsonParse, { JSONSyntaxError, } from '../utils/jsonParse';
CodeMirror.registerHelper('lint', 'graphql-variables', (text, options, editor) => {
if (!text) {
return [];
}
var ast;
let ast;
try {
ast = (0, jsonParse_1.default)(text);
ast = jsonParse(text);
}
catch (error) {
if (error instanceof jsonParse_1.JSONSyntaxError) {
if (error instanceof JSONSyntaxError) {
return [lintError(editor, error.position, error.message)];

@@ -73,3 +18,3 @@ }

}
var variableToType = options.variableToType;
const { variableToType } = options;
if (!variableToType) {

@@ -81,49 +26,27 @@ return [];

function validateVariables(editor, variableToType, variablesAST) {
var e_1, _a, e_2, _b;
var _c;
var errors = [];
try {
for (var _d = __values(variablesAST.members), _e = _d.next(); !_e.done; _e = _d.next()) {
var member = _e.value;
if (member) {
var variableName = (_c = member.key) === null || _c === void 0 ? void 0 : _c.value;
var type = variableToType[variableName];
if (type) {
try {
for (var _f = (e_2 = void 0, __values(validateValue(type, member.value))), _g = _f.next(); !_g.done; _g = _f.next()) {
var _h = __read(_g.value, 2), node = _h[0], message = _h[1];
errors.push(lintError(editor, node, message));
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
}
finally { if (e_2) throw e_2.error; }
}
var _a;
const errors = [];
for (const member of variablesAST.members) {
if (member) {
const variableName = (_a = member.key) === null || _a === void 0 ? void 0 : _a.value;
const type = variableToType[variableName];
if (type) {
for (const [node, message] of validateValue(type, member.value)) {
errors.push(lintError(editor, node, message));
}
else {
errors.push(lintError(editor, member.key, "Variable \"$".concat(variableName, "\" does not appear in any GraphQL query.")));
}
}
else {
errors.push(lintError(editor, member.key, `Variable "$${variableName}" does not appear in any GraphQL query.`));
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
}
finally { if (e_1) throw e_1.error; }
}
return errors;
}
function validateValue(type, valueAST) {
var e_3, _a;
if (!type || !valueAST) {
return [];
}
if (type instanceof graphql_1.GraphQLNonNull) {
if (type instanceof GraphQLNonNull) {
if (valueAST.kind === 'Null') {
return [[valueAST, "Type \"".concat(type, "\" is non-nullable and cannot be null.")]];
return [[valueAST, `Type "${type}" is non-nullable and cannot be null.`]];
}

@@ -135,20 +58,20 @@ return validateValue(type.ofType, valueAST);

}
if (type instanceof graphql_1.GraphQLList) {
var itemType_1 = type.ofType;
if (type instanceof GraphQLList) {
const itemType = type.ofType;
if (valueAST.kind === 'Array') {
var values = valueAST.values || [];
return mapCat(values, function (item) { return validateValue(itemType_1, item); });
const values = valueAST.values || [];
return mapCat(values, item => validateValue(itemType, item));
}
return validateValue(itemType_1, valueAST);
return validateValue(itemType, valueAST);
}
if (type instanceof graphql_1.GraphQLInputObjectType) {
if (type instanceof GraphQLInputObjectType) {
if (valueAST.kind !== 'Object') {
return [[valueAST, "Type \"".concat(type, "\" must be an Object.")]];
return [[valueAST, `Type "${type}" must be an Object.`]];
}
var providedFields_1 = Object.create(null);
var fieldErrors = mapCat(valueAST.members, function (member) {
const providedFields = Object.create(null);
const fieldErrors = mapCat(valueAST.members, member => {
var _a;
var fieldName = (_a = member === null || member === void 0 ? void 0 : member.key) === null || _a === void 0 ? void 0 : _a.value;
providedFields_1[fieldName] = true;
var inputField = type.getFields()[fieldName];
const fieldName = (_a = member === null || member === void 0 ? void 0 : member.key) === null || _a === void 0 ? void 0 : _a.value;
providedFields[fieldName] = true;
const inputField = type.getFields()[fieldName];
if (!inputField) {

@@ -158,30 +81,20 @@ return [

member.key,
"Type \"".concat(type, "\" does not have a field \"").concat(fieldName, "\"."),
`Type "${type}" does not have a field "${fieldName}".`,
],
];
}
var fieldType = inputField ? inputField.type : undefined;
const fieldType = inputField ? inputField.type : undefined;
return validateValue(fieldType, member.value);
});
try {
for (var _b = __values(Object.keys(type.getFields())), _c = _b.next(); !_c.done; _c = _b.next()) {
var fieldName = _c.value;
var field = type.getFields()[fieldName];
if (!providedFields_1[fieldName] &&
field.type instanceof graphql_1.GraphQLNonNull &&
!field.defaultValue) {
fieldErrors.push([
valueAST,
"Object of type \"".concat(type, "\" is missing required field \"").concat(fieldName, "\"."),
]);
}
for (const fieldName of Object.keys(type.getFields())) {
const field = type.getFields()[fieldName];
if (!providedFields[fieldName] &&
field.type instanceof GraphQLNonNull &&
!field.defaultValue) {
fieldErrors.push([
valueAST,
`Object of type "${type}" is missing required field "${fieldName}".`,
]);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
return fieldErrors;

@@ -197,5 +110,5 @@ }

(valueAST.kind !== 'Number' || (valueAST.value | 0) !== valueAST.value))) {
return [[valueAST, "Expected value of type \"".concat(type, "\".")]];
return [[valueAST, `Expected value of type "${type}".`]];
}
if ((type instanceof graphql_1.GraphQLEnumType || type instanceof graphql_1.GraphQLScalarType) &&
if ((type instanceof GraphQLEnumType || type instanceof GraphQLScalarType) &&
((valueAST.kind !== 'String' &&

@@ -206,3 +119,3 @@ valueAST.kind !== 'Number' &&

isNullish(type.parseValue(valueAST.value)))) {
return [[valueAST, "Expected value of type \"".concat(type, "\".")]];
return [[valueAST, `Expected value of type "${type}".`]];
}

@@ -213,3 +126,3 @@ return [];

return {
message: message,
message,
severity: 'error',

@@ -216,0 +129,0 @@ type: 'validation',

@@ -1,12 +0,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var codemirror_1 = __importDefault(require("codemirror"));
var graphql_language_service_1 = require("graphql-language-service");
var mode_indent_1 = __importDefault(require("../utils/mode-indent"));
codemirror_1.default.defineMode('graphql-variables', function (config) {
var parser = (0, graphql_language_service_1.onlineParser)({
eatWhitespace: function (stream) { return stream.eatSpace(); },
import CodeMirror from 'codemirror';
import { list, t, onlineParser, opt, p, } from 'graphql-language-service';
import indent from '../utils/mode-indent';
CodeMirror.defineMode('graphql-variables', config => {
const parser = onlineParser({
eatWhitespace: stream => stream.eatSpace(),
lexRules: LexRules,

@@ -17,6 +12,6 @@ parseRules: ParseRules,

return {
config: config,
config,
startState: parser.startState,
token: parser.token,
indent: mode_indent_1.default,
indent,
electricInput: /^\s*[}\]]/,

@@ -30,3 +25,3 @@ fold: 'brace',

});
var LexRules = {
const LexRules = {
Punctuation: /^\[|]|\{|\}|:|,/,

@@ -37,6 +32,6 @@ Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,

};
var ParseRules = {
Document: [(0, graphql_language_service_1.p)('{'), (0, graphql_language_service_1.list)('Variable', (0, graphql_language_service_1.opt)((0, graphql_language_service_1.p)(','))), (0, graphql_language_service_1.p)('}')],
Variable: [namedKey('variable'), (0, graphql_language_service_1.p)(':'), 'Value'],
Value: function (token) {
const ParseRules = {
Document: [p('{'), list('Variable', opt(p(','))), p('}')],
Variable: [namedKey('variable'), p(':'), 'Value'],
Value(token) {
switch (token.kind) {

@@ -66,15 +61,15 @@ case 'Number':

},
NumberValue: [(0, graphql_language_service_1.t)('Number', 'number')],
StringValue: [(0, graphql_language_service_1.t)('String', 'string')],
BooleanValue: [(0, graphql_language_service_1.t)('Keyword', 'builtin')],
NullValue: [(0, graphql_language_service_1.t)('Keyword', 'keyword')],
ListValue: [(0, graphql_language_service_1.p)('['), (0, graphql_language_service_1.list)('Value', (0, graphql_language_service_1.opt)((0, graphql_language_service_1.p)(','))), (0, graphql_language_service_1.p)(']')],
ObjectValue: [(0, graphql_language_service_1.p)('{'), (0, graphql_language_service_1.list)('ObjectField', (0, graphql_language_service_1.opt)((0, graphql_language_service_1.p)(','))), (0, graphql_language_service_1.p)('}')],
ObjectField: [namedKey('attribute'), (0, graphql_language_service_1.p)(':'), 'Value'],
NumberValue: [t('Number', 'number')],
StringValue: [t('String', 'string')],
BooleanValue: [t('Keyword', 'builtin')],
NullValue: [t('Keyword', 'keyword')],
ListValue: [p('['), list('Value', opt(p(','))), p(']')],
ObjectValue: [p('{'), list('ObjectField', opt(p(','))), p('}')],
ObjectField: [namedKey('attribute'), p(':'), 'Value'],
};
function namedKey(style) {
return {
style: style,
match: function (token) { return token.kind === 'String'; },
update: function (state, token) {
style,
match: (token) => token.kind === 'String',
update(state, token) {
state.name = token.value.slice(1, -1);

@@ -81,0 +76,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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