diff --git a/packages/openapi-to-graphql-cli/src/openapi-to-graphql.ts b/packages/openapi-to-graphql-cli/src/openapi-to-graphql.ts index bbd90fa7..6351d3e8 100644 --- a/packages/openapi-to-graphql-cli/src/openapi-to-graphql.ts +++ b/packages/openapi-to-graphql-cli/src/openapi-to-graphql.ts @@ -142,7 +142,7 @@ if (typeof filePaths === 'undefined' || filePaths.length === 0) { // Load the OASs based off of the provided paths Promise.all( - filePaths.map((filePath) => { + filePaths.map(filePath => { return new Promise((resolve, reject) => { // Check if the file exists if (fs.existsSync(path.resolve(filePath))) { @@ -155,10 +155,10 @@ Promise.all( // Check if file is in a remote location } else if (filePath.match(/^https?/g)) { getRemoteFileSpec(filePath) - .then((remoteContent) => { + .then(remoteContent => { resolve(remoteContent) }) - .catch((error) => { + .catch(error => { reject(error) }) @@ -169,10 +169,10 @@ Promise.all( }) }) ) - .then((oass) => { + .then(oass => { startGraphQLServer(oass, options, portNumber) }) - .catch((error) => { + .catch(error => { console.error(error) process.exit(1) }) @@ -284,7 +284,7 @@ function startGraphQLServer( }) } }) - .catch((err) => { + .catch(err => { console.log('OpenAPI-to-GraphQL creation event error:', err.message) }) } @@ -294,7 +294,7 @@ function startGraphQLServer( * @param {createGraphQLSchema} schema */ function writeSchema(schema): void { - fs.writeFile(program.save, printSchema(schema), (err) => { + fs.writeFile(program.save, printSchema(schema), err => { if (err) throw err console.log( `OpenAPI-to-GraphQL successfully saved your schema at ${program.save}` @@ -311,7 +311,7 @@ function parseKeyValuePairs(keyValues: string[]): { [key: string]: string } { const parsedKeyValues: { [key: string]: string } = {} if (Array.isArray(keyValues)) { - ;(keyValues as string[]).forEach((keyValue) => { + ;(keyValues as string[]).forEach(keyValue => { const separator = keyValue.indexOf(':') if (separator === -1) { diff --git a/packages/openapi-to-graphql/lib/auth_builder.js.map b/packages/openapi-to-graphql/lib/auth_builder.js.map index c24e9dbd..58d2a9ad 100644 --- a/packages/openapi-to-graphql/lib/auth_builder.js.map +++ b/packages/openapi-to-graph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;QAEF,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CACzC,YAAY,EACZ,SAAS,CAAC,SAAS,CAAC,SAAS,CAC9B,CAAA;QACD,IAAI,CACF,SAAS,CAAC,aAAa,CAAC,gBAAgB,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CACtE,GAAG,EAAE,IAAI,EAAE,CAAA;KACb;IACD,IAAI,GAAG,kBAAU,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,IAAI,EAAE,IAAI,2BAAiB,CAAC;YAC1B,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;YAChC,WAAW,EAAE,4DAA4D;YACzE,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW;SAC1B,CAAC;QACF,OAAO;QACP,IAAI;QACJ,WAAW,EACT,mDAAmD;YACnD,2BAA2B;KAC9B,CAAA;AACH,CAAC"} \ No newline at end of file +{"version":3,"file":"auth_builder.js","sourceRoot":"","sources":["../src/auth_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAEhE;;;GAGG;AAEH,gBAAgB;AAChB,qCAOgB;AAChB,6CAA4D;AAM5D,WAAW;AACX,qDAAiD;AACjD,2CAA0C;AAC1C,iCAAyB;AACzB,mCAAoE;AACpE,iDAA8C;AAE9C,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,WAAmB,EACnB,aAAmC,EACnC,IAAiD;IAEjD,MAAM,OAAO,GAAG,EAAE,CAAA;IAClB;;;;;;;OAOG;IACH,MAAM,iBAAiB,GAA8B,EAAE,CAAA;IAEvD;;;OAGG;IACH,MAAM,aAAa,GAAG,EAAE,CAAA;IAExB,KAAK,IAAI,YAAY,IAAI,WAAW,EAAE;QACpC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,YAAY,CAAC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EACJ,EAAE;QACF,OAAO;YACL,iBAAiB,EAAE;gBACjB,QAAQ,EAAE,IAAI;aACf;SACF,CAAA;IACH,CAAC,CAAA;IAED,aAAa;IACb,IAAI,IAAI,GAAG,EAAE,CAAA;IACb,KAAK,IAAI,YAAY,IAAI,IAAI,CAAC,QAAQ,EAAE;QACtC,qDAAqD;QACrD,MAAM,GAAG,GAAG,4BAAa,CACvB,EAAE,OAAO,EAAE,YAAY,EAAE,EACzB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,MAAM,EAClC,IAAI,EACJ,IAAI,EACJ,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAChC,CAAA;QAED,MAAM,IAAI,GAAG,+BAAc,CAAC;YAC1B,GAAG;YACH,IAAI;YACJ,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAA;QAEF,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CACzC,YAAY,EACZ,SAAS,CAAC,SAAS,CAAC,SAAS,CAC9B,CAAA;QACD,IAAI,CACF,SAAS,CAAC,aAAa,CAAC,gBAAgB,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CACtE,GAAG,EAAE,IAAI,EAAE,CAAA;KACb;IACD,IAAI,GAAG,kBAAU,CAAC,IAAI,CAAC,CAAA;IAEvB,OAAO;QACL,IAAI,EAAE,IAAI,2BAAiB,CAAC;YAC1B,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;YAChC,WAAW,EAAE,4DAA4D;YACzE,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW;SAC1B,CAAC;QACF,OAAO;QACP,IAAI;QACJ,WAAW,EACT,mDAAmD;YACnD,2BAA2B;KAC9B,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.js b/packages/openapi-to-graphql/lib/oas_3_tools.js index d8d7ab26..e03ecf38 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.js +++ b/packages/openapi-to-graphql/lib/oas_3_tools.js @@ -62,8 +62,8 @@ function getValidOAS3(spec) { spec.swagger === '2.0') { preprocessingLog(`Received Swagger - going to translate to OpenAPI Specification...`); Swagger2OpenAPI.convertObj(spec, {}) - .then((options) => resolve(options.openapi)) - .catch((error) => reject(`Could not convert Swagger '${spec.info.title}' to OpenAPI Specification. ${error.message}`)); + .then(options => resolve(options.openapi)) + .catch(error => reject(`Could not convert Swagger '${spec.info.title}' to OpenAPI Specification. ${error.message}`)); // CASE: validate } else if (typeof spec.openapi === 'string' && @@ -71,7 +71,7 @@ function getValidOAS3(spec) { preprocessingLog(`Received OpenAPI Specification - going to validate...`); OASValidator.validate(spec, {}) .then(() => resolve(spec)) - .catch((error) => reject(`Could not validate OpenAPI Specification '${spec.info.title}'. ${error.message}`)); + .catch(error => reject(`Could not validate OpenAPI Specification '${spec.info.title}'. ${error.message}`)); } else { reject(`Invalid specification provided`); @@ -256,7 +256,7 @@ exports.sanitizeObjectKeys = sanitizeObjectKeys; * the given mapping. */ function desanitizeObjectKeys(obj, mapping = {}) { - const replaceKeys = (obj) => { + const replaceKeys = obj => { if (obj === null) { return null; } @@ -364,7 +364,10 @@ function extractBasePath(paths) { } } } - const updatedPaths = paths.map((path) => path.split('/').slice(basePathComponents.length).join('/')); + const updatedPaths = paths.map(path => path + .split('/') + .slice(basePathComponents.length) + .join('/')); let basePath = basePathComponents.length === 0 || (basePathComponents.length === 1 && basePathComponents[0] === '') ? '/' @@ -620,7 +623,7 @@ exports.getResponseSchemaAndNames = getResponseSchemaAndNames; function getResponseStatusCode(path, method, operation, oas, data) { if (typeof operation.responses === 'object') { const codes = Object.keys(operation.responses); - const successCodes = codes.filter((code) => { + const successCodes = codes.filter(code => { return exports.SUCCESS_STATUS_RX.test(code); }); if (successCodes.length === 1) { @@ -693,7 +696,7 @@ function getParameters(path, method, operation, pathItem, oas) { // First, consider parameters in Path Item Object: const pathParams = pathItem.parameters; if (Array.isArray(pathParams)) { - const pathItemParameters = pathParams.map((p) => { + const pathItemParameters = pathParams.map(p => { if (typeof p.$ref === 'string') { // Here we know we have a parameter object: return resolveRef(p['$ref'], oas); @@ -708,7 +711,7 @@ function getParameters(path, method, operation, pathItem, oas) { // Second, consider parameters in Operation Object: const opObjectParameters = operation.parameters; if (Array.isArray(opObjectParameters)) { - const operationParameters = opObjectParameters.map((p) => { + const operationParameters = opObjectParameters.map(p => { if (typeof p.$ref === 'string') { // Here we know we have a parameter object: return resolveRef(p['$ref'], oas); diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.js.map b/packages/openapi-to-graphql/lib/oas_3_tools.js.map index c5f1e283..4445d912 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.js.map +++ b/packages/openapi-to-graphql/lib/oas_3_tools.js.map @@ -1 +1 @@ -{"version":3,"file":"oas_3_tools.js","sourceRoot":"","sources":["../src/oas_3_tools.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAkChE,WAAW;AACX,mDAAkD;AAClD,8CAA6C;AAC7C,iCAAyB;AACzB,mCAAwD;AACxD,oCAAmC;AACnC,uCAAsC;AA8BtC,MAAM,OAAO,GAAG,eAAK,CAAC,MAAM,CAAC,CAAA;AAC7B,MAAM,gBAAgB,GAAG,eAAK,CAAC,eAAe,CAAC,CAAA;AAE/C,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C,gBAAgB;AAChB,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,2BAAa,CAAA;IACb,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,6BAAe,CAAA;AACjB,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB;AAEY,QAAA,iBAAiB,GAAG,eAAe,CAAA;AAEhD;;GAEG;AACH,SAAgB,kBAAkB,CAAC,MAAc;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AC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC;AAFD,oCAEC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CACjC,MAAoB,EACpB,IAAY;IAEZ,OAAO,QAAQ,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;AAC3D,CAAC;AALD,kDAKC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/resolver_builder.js.map b/packages/openapi-to-graphql/lib/resolver_builder.js.map index 2a0a0654..2a2f3531 100644 --- a/packages/openapi-to-graphql/lib/resolver_builder.js.map +++ b/packages/openapi-to-graphql/lib/resolver_builder.js.map @@ -1 +1 @@ -{"version":3,"file":"resolver_builder.js","sourceRoot":"","sources":["../src/resolver_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAYhE,uCAAsC;AAGtC,WAAW;AACX,2CAA0C;AAC1C,2CAA0C;AAC1C,0CAAyC;AACzC,iCAA6B;AAC7B,qCAA4D;AAC5D,qDAA4C;AAC5C,iEAA8C;AAG9C,MAAM,MAAM,GAAG,IAAI,8BAAM,EAAE,CAAA;AAE3B,MAAM,cAAc,GAAG,aAAK,CAAC,aAAa,CAAC,CAAA;AAC3C,MAAM,OAAO,GAAG,aAAK,CAAC,MAAM,CAAC,CAAA;AAC7B,MAAM,SAAS,GAAG,aAAK,CAAC,QAAQ,CAAC,CAAA;AAEjC,6CAA6C;AAC7C,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAEpD,QAAA,kBAAkB,GAAG,mBAAmB,CAAA;AAmErD;;;;GAIG;AACH,SAAgB,YAAY,CAA2B,EACrD,SAAS,EACT,WAAW,EACX,IAAI,EACJ,OAAO,EACP,cAAc,EAC+B;IAK7C,iCAAiC;IACjC,IAAI,OA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,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAA;oBAChE,MAAK;gBAEP,mBAAmB;gBACnB,KAAK,OAAO;oBACV,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAA;oBACzC,MAAK;gBAEP,oBAAoB;gBACpB,KAAK,QAAQ;oBACX,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAA;oBAC9C,MAAK;gBAEP,oBAAoB;gBACpB,KAAK,QAAQ;oBACX,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,EAAE;wBAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;qBACvB;oBAED,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAA;oBAClE,MAAK;gBAEP;oBACE,OAAO,CACL,oCAAoC,KAAK,CAAC,EAAE,WAAW;wBACrD,cAAc,KAAK,CAAC,IAAI,mBAAmB,IAAI,WAAW;wBAC1D,WAAW,CACd,CAAA;aACJ;SACF;KACF;IAED,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAA;AAC9B,CAAC;AA3DD,gEA2DC"} \ No newline at end of file +{"version":3,"file":"resolver_builder.js","sourceRoot":"","sources":["../src/resolver_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAYhE,uCAAsC;AAGtC,WAAW;AACX,2CAA0C;AAC1C,2CAA0C;AAC1C,0CAAyC;AACzC,iCAA6B;AAC7B,qCAA4D;AAC5D,qDAA4C;AAC5C,iEAA8C;AAG9C,MAAM,MAAM,GAAG,IAAI,8BAAM,EAAE,CAAA;AAE3B,MAAM,cAAc,GAAG,aAAK,CAAC,aAAa,CAAC,CAAA;AAC3C,MAAM,OAAO,GAAG,aAA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rictFloat.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.d.ts new file mode 100644 index 00000000..d2f9dc30 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.d.ts @@ -0,0 +1,3 @@ +import { GraphQLScalarType } from 'graphql'; +import { StrictScalarNumberConfig } from '../types/strict_scalars'; +export declare const createFloatScalar: (config: StrictScalarNumberConfig) => GraphQLScalarType; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.js b/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.js new file mode 100644 index 00000000..18e864a1 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.js @@ -0,0 +1,89 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const graphql_1 = require("graphql"); +const common_def_1 = require("./common_def"); +const utils_1 = require("../utils"); +// https://github.com/graphql/graphql-js/blob/master/src/type/scalars.js +exports.createFloatScalar = (config) => { + const { coerce, errorHandler, maximum, minimum, parse, sanitize, validate, serialize } = config, scalarConfig = __rest(config, ["coerce", "errorHandler", "maximum", "minimum", "parse", "sanitize", "validate", "serialize"]); + const handleError = errorHandler || common_def_1.defaultErrorHandler; + const parseValue = (unknownValue, ast) => { + // null inputs don't come here + // Coersion Phase + if (unknownValue == null) { + return null; + } + let value; + if (utils_1.strictTypeOf(unknownValue, 'number')) { + value = unknownValue; + } + else { + if (coerce) { + const valueOrNull = coerce(unknownValue); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config, + }); + } + } + // Sanitization Phase + if (sanitize && value != null) { + const valueOrNull = sanitize(value); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + // Validation Phase + if (minimum != null && value < minimum) { + return handleError({ + code: 'minimum', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (maximum != null && value > maximum) { + return handleError({ + code: 'maximum', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config, + }); + } + return value; + }; + return new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, scalarConfig), { serialize: serialize || common_def_1.defaultSerialize, parseValue, parseLiteral: (ast) => parseValue(common_def_1.getValueFromValueNode(ast), ast) })); +}; +//# sourceMappingURL=StrictFloat.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.js.map b/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.js.map new file mode 100644 index 00000000..b98eea44 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictFloat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StrictFloat.js","sourceRoot":"","sources":["../../src/scalar_validators/StrictFloat.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAuD;AAEvD,6CAIsB;AAGtB,oCAAuC;AAIvC,wEAAwE;AAE3D,QAAA,iBAAiB,GAAG,CAC7B,MAAgC,EACb,EAAE;IAErB,MAAM,EACJ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,KAEP,MAAM,EADR,6HACQ,CAAC;IAEX,MAAM,WAAW,GAAG,YAAY,IAAI,gCAAmB,CAAC;IAExD,MAAM,UAAU,GAAG,CACjB,YAAqB,EACrB,GAAe,EACG,EAAE;QAEpB,8BAA8B;QAE9B,iBAAiB;QAGjB,IAAI,YAAY,IAAI,IAAI,EAAE;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EAAE,UAAU;gBAChB,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAC;SACJ;QAGD,OAAO,KAAY,CAAC;IAEtB,CAAC,CAAC;IAIF,OAAO,IAAI,2BAAiB,iCACvB,YAAY,KACf,SAAS,EAAE,SAAS,IAAI,6BAAgB,EACxC,UAAU,EACV,YAAY,EAAE,CAAC,GAAG,EAAoB,EAAE,CACtC,UAAU,CAAC,kCAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAC7C,CAAC;AAEL,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.d.ts new file mode 100644 index 00000000..621141fb --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.d.ts @@ -0,0 +1,3 @@ +import { GraphQLScalarType } from 'graphql'; +import { StrictScalarNumberConfig } from '../types/strict_scalars'; +export declare const createIntScalar: (config: StrictScalarNumberConfig) => GraphQLScalarType; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.js b/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.js new file mode 100644 index 00000000..ed1332d6 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.js @@ -0,0 +1,88 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const graphql_1 = require("graphql"); +const common_def_1 = require("./common_def"); +const utils_1 = require("../utils"); +exports.createIntScalar = (config) => { + const { coerce, errorHandler, maximum, minimum, sanitize, validate, serialize } = config, scalarConfig = __rest(config, ["coerce", "errorHandler", "maximum", "minimum", "sanitize", "validate", "serialize"]); + const handleError = errorHandler || common_def_1.defaultErrorHandler; + const parseValue = (unknownValue, ast) => { + // null inputs don't come here + // Coersion Phase + if (unknownValue == null) { + return null; + } + let value; + if (utils_1.strictTypeOf(unknownValue, 'number')) { + value = unknownValue; + } + else { + if (coerce) { + const valueOrNull = coerce(unknownValue); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config, + }); + } + } + // Sanitization Phase + if (sanitize && value != null) { + const valueOrNull = sanitize(value); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + // Validation Phase + if (minimum != null && value < minimum) { + return handleError({ + code: 'minimum', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (maximum != null && value > maximum) { + return handleError({ + code: 'maximum', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config, + }); + } + return value; + }; + return new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, scalarConfig), { serialize: serialize || common_def_1.defaultSerialize, parseValue, parseLiteral: (ast) => parseValue(common_def_1.getValueFromValueNode(ast), ast) })); +}; +//# sourceMappingURL=StrictInt.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.js.map b/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.js.map new file mode 100644 index 00000000..ef07e8c6 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictInt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StrictInt.js","sourceRoot":"","sources":["../../src/scalar_validators/StrictInt.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAuD;AACvD,6CAIsB;AAGtB,oCAAuC;AAI1B,QAAA,eAAe,GAAG,CAE3B,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M;aACP,CAAC,CAAC;SACJ;QAID,IAAI,OAAO,IAAI,IAAI,IAAI,KAAK,GAAG,OAAO,EAAE;YAEtC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,SAAS;gBACf,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAC;SACJ;QAID,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAEhC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,UAAU;gBAChB,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAC;SACJ;QAED,OAAO,KAAY,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,IAAI,2BAAiB,iCACzB,YAAY,KACf,SAAS,EAAE,SAAS,IAAI,6BAAgB,EACxC,UAAU,EACV,YAAY,EAAE,CAAC,GAAG,EAAoB,EAAE,CACpC,UAAU,CAAC,kCAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAE7C,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictString.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/StrictString.d.ts new file mode 100644 index 00000000..0ee8e348 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictString.d.ts @@ -0,0 +1,3 @@ +import { GraphQLScalarType } from 'graphql'; +import { StrictScalarStringConfig } from '../types/strict_scalars'; +export declare const createStringScalar: (config: StrictScalarStringConfig) => GraphQLScalarType; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictString.js b/packages/openapi-to-graphql/lib/scalar_validators/StrictString.js new file mode 100644 index 00000000..707c62c4 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictString.js @@ -0,0 +1,177 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const graphql_1 = require("graphql"); +const common_def_1 = require("./common_def"); +const utils_1 = require("../utils"); +const strToUpperCase = (str) => str.toUpperCase(); +const wordRegex = /(?:^|\s)\S/g; +const sentenceRegex = /(?:^|\.\s)\S/g; +const newlineRegex = /[\r\n]+/g; +const newlineWithWSRegex = /\s*[\r\n]+\s*/g; +const linebreakRegex = /\r\n|\r|\n/g; +const whitespace = /\s+/g; +const collapseWS = (str) => str.replace(whitespace, ' '); +const trimAndCollapseWS = (str) => str.trim().replace(whitespace, ' '); +exports.createStringScalar = (config) => { + const { capitalize, coerce, collapseWhitespace, errorHandler, lowercase, maxEmptyLines, maxLength, minLength, nonEmpty, pattern, sanitize, serialize, singleline, trim, truncate, uppercase, validate } = config, scalarConfig = __rest(config, ["capitalize", "coerce", "collapseWhitespace", "errorHandler", "lowercase", "maxEmptyLines", "maxLength", "minLength", "nonEmpty", "pattern", "sanitize", "serialize", "singleline", "trim", "truncate", "uppercase", "validate"]); + const regex = typeof pattern === 'string' ? new RegExp(pattern) : (utils_1.strictTypeOf(pattern, 'regexp') ? pattern : /^.$/); + const handleError = errorHandler || common_def_1.defaultErrorHandler; + let emptyLineRegex = null; + let emptyLineString = null; + if (maxEmptyLines) { + emptyLineRegex = new RegExp(`\n{${maxEmptyLines + 2},}`, 'g'); + emptyLineString = '\n'.repeat(maxEmptyLines + 1); + } + const parseValue = (unknownValue, ast) => { + // null inputs don't come here + // Coersion Phase + if (unknownValue == null) { + return null; + } + let value; + if (typeof unknownValue === 'string') { + value = unknownValue; + } + else { + if (coerce) { + const valueOrNull = coerce(unknownValue); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config, + }); + } + } + // Sanitization Phase + if (value) { + if (trim) { + value = value.trim(); + } + if (value) { + if (singleline) { + value = value.replace(newlineRegex, singleline); + } + if (collapseWhitespace) { + if (singleline) { + // newlines replaced already + value = value.replace(whitespace, ' '); + } + else if (maxEmptyLines) { + value = value + .split(linebreakRegex) + .map(trimAndCollapseWS) + .join('\n') + .replace(emptyLineRegex, emptyLineString); + } + else { + value = value + .split(newlineWithWSRegex) + .map(collapseWS) + .join('\n'); + } + } + if (truncate != null && value.length > truncate) { + value = value.substring(0, truncate); + } + if (uppercase) { + value = value.toUpperCase(); + } + else if (lowercase) { + value = value.toLowerCase(); + } + if (capitalize) { + switch (capitalize) { + case 'characters': + value = value.toUpperCase(); + break; + case 'words': + value = value.replace(wordRegex, strToUpperCase); + break; + case 'sentences': + value = value.replace(sentenceRegex, strToUpperCase); + break; + case 'first': + default: + value = value[0].toUpperCase() + value.slice(1); + break; + } + } + } + } + if (sanitize) { + const valueOrNull = sanitize(value); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + // Validation Phase + if (nonEmpty && !value) { + return handleError({ + code: 'empty', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (minLength != null && value.length < minLength) { + return handleError({ + code: 'minLength', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (maxLength != null && value.length > maxLength) { + return handleError({ + code: 'maxLength', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (regex != null && !regex.test(value)) { + return handleError({ + code: 'pattern', + originalValue: unknownValue, + value, + ast, + config, + }); + } + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config, + }); + } + return value; + }; + return new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, scalarConfig), { serialize: serialize || common_def_1.defaultSerialize, parseValue, parseLiteral: (ast) => parseValue(common_def_1.getValueFromValueNode(ast), ast) })); +}; +//# sourceMappingURL=StrictString.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/StrictString.js.map b/packages/openapi-to-graphql/lib/scalar_validators/StrictString.js.map new file mode 100644 index 00000000..fc2b91be --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/StrictString.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StrictString.js","sourceRoot":"","sources":["../../src/scalar_validators/StrictString.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAuD;AAGvD,6CAIsB;AAEtB,oCAEiB;AAEjB,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;AAElE,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC,MAAM,aAAa,GAAG,eAAe,CAAC;AAEtC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAE5C,MAAM,cAAc,GAAG,aAAa,CAAC;AAErC,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAEzE,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAU,EAAE,CAEhD,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAGzB,QAAA,kBAAkB,GAAG,CAEhC,MAAgC,EAEb,EAAE;IAErB,MAAM,EACJ,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,KAEN,MAAM,EADR,gQACQ,CAAC;IAIX,MAAM,KAAK,GAAY,OAAO,OAAO,KAAK,QAA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AAC;SACJ;QAID,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAEhC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,UAAU;gBAChB,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAC;SAEJ;QAED,OAAO,KAAY,CAAC;IAEtB,CAAC,CAAC;IAIF,OAAO,IAAI,2BAAiB,iCACvB,YAAY,KACf,SAAS,EAAE,SAAS,IAAI,6BAAgB,EACxC,UAAU,EACV,YAAY,EAAE,CAAC,GAAG,EAAoB,EAAE,CACtC,UAAU,CAAC,kCAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAC7C,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/common_def.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/common_def.d.ts new file mode 100644 index 00000000..d59e33ac --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/common_def.d.ts @@ -0,0 +1,5 @@ +import { ValueNode } from 'graphql'; +import { ScalarParseErrorHandler } from '../types/strict_scalars'; +export declare const defaultErrorHandler: ScalarParseErrorHandler; +export declare const defaultSerialize: (x: any) => any; +export declare const getValueFromValueNode: (ast: ValueNode) => any; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/common_def.js b/packages/openapi-to-graphql/lib/scalar_validators/common_def.js new file mode 100644 index 00000000..c8f67c25 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/common_def.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getValueFromValueNode = exports.defaultSerialize = exports.defaultErrorHandler = void 0; +const graphql_1 = require("graphql"); +const graphql_2 = require("graphql"); +exports.defaultErrorHandler = ({ code, ast }) => { + throw new graphql_2.GraphQLError(`code=${code}`, ast ? [ast] : []); +}; +exports.defaultSerialize = (x) => x; +exports.getValueFromValueNode = (ast) => { + switch (ast.kind) { + case graphql_1.Kind.BOOLEAN: + return ast.value; + case graphql_1.Kind.FLOAT: + return parseFloat(ast.value); + case graphql_1.Kind.INT: + return parseInt(ast.value, 10); + case graphql_1.Kind.NULL: + return null; + case graphql_1.Kind.STRING: + return ast.value; + case graphql_1.Kind.ENUM: + return ast.value; + } + return undefined; +}; +//# sourceMappingURL=common_def.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/common_def.js.map b/packages/openapi-to-graphql/lib/scalar_validators/common_def.js.map new file mode 100644 index 00000000..25770ec9 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/common_def.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common_def.js","sourceRoot":"","sources":["../../src/scalar_validators/common_def.ts"],"names":[],"mappings":";;;AAAA,qCAQgB;AAEhB,qCAAsC;AAIzB,QAAA,mBAAmB,GAAsC,CAAC,EACrE,IAAI,EACJ,GAAG,EACJ,EAAS,EAAE;IACV,MAAM,IAAI,sBAAY,CAAC,QAAQ,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AAC1D,CAAC,CAAA;AAEY,QAAA,gBAAgB,GAAG,CAAC,CAAM,EAAO,EAAE,CAAC,CAAC,CAAA;AAErC,QAAA,qBAAqB,GAAG,CAAC,GAAc,EAAO,EAAE;IAC3D,QAAQ,GAAG,CAAC,IAAI,EAAE;QAChB,KAAK,cAAI,CAAC,OAAO;YACf,OAAQ,GAAwB,CAAC,KAAK,CAAA;QACxC,KAAK,cAAI,CAAC,KAAK;YACb,OAAO,UAAU,CAAE,GAAsB,CAAC,KAAK,CAAC,CAAA;QAClD,KAAK,cAAI,CAAC,GAAG;YACX,OAAO,QAAQ,CAAE,GAAoB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAClD,KAAK,cAAI,CAAC,IAAI;YACZ,OAAO,IAAI,CAAA;QACb,KAAK,cAAI,CAAC,MAAM;YACd,OAAQ,GAAuB,CAAC,KAAK,CAAA;QACvC,KAAK,cAAI,CAAC,IAAI;YACZ,OAAQ,GAAqB,CAAC,KAAK,CAAA;KACtC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_float.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/strict_float.d.ts new file mode 100644 index 00000000..d2f9dc30 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_float.d.ts @@ -0,0 +1,3 @@ +import { GraphQLScalarType } from 'graphql'; +import { StrictScalarNumberConfig } from '../types/strict_scalars'; +export declare const createFloatScalar: (config: StrictScalarNumberConfig) => GraphQLScalarType; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_float.js b/packages/openapi-to-graphql/lib/scalar_validators/strict_float.js new file mode 100644 index 00000000..3a95acca --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_float.js @@ -0,0 +1,90 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFloatScalar = void 0; +const graphql_1 = require("graphql"); +const common_def_1 = require("./common_def"); +const utils_1 = require("../utils"); +// https://github.com/graphql/graphql-js/blob/master/src/type/scalars.js +exports.createFloatScalar = (config) => { + const { coerce, errorHandler, maximum, minimum, parse, sanitize, validate, serialize } = config, scalarConfig = __rest(config, ["coerce", "errorHandler", "maximum", "minimum", "parse", "sanitize", "validate", "serialize"]); + const handleError = errorHandler || common_def_1.defaultErrorHandler; + const parseValue = (unknownValue, ast) => { + // null inputs don't come here + // Coersion Phase + if (unknownValue == null) { + return null; + } + let value; + if (utils_1.isTypeOf(unknownValue, 'number')) { + value = unknownValue; + } + else { + if (coerce) { + const valueOrNull = coerce(unknownValue); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config + }); + } + } + // Sanitization Phase + if (sanitize && value != null) { + const valueOrNull = sanitize(value); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + // Validation Phase + if (minimum != null && value < minimum) { + return handleError({ + code: 'minimum', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (maximum != null && value > maximum) { + return handleError({ + code: 'maximum', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config + }); + } + return value; + }; + return new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, scalarConfig), { serialize: serialize || common_def_1.defaultSerialize, parseValue, parseLiteral: (ast) => parseValue(common_def_1.getValueFromValueNode(ast), ast) })); +}; +//# sourceMappingURL=strict_float.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_float.js.map b/packages/openapi-to-graphql/lib/scalar_validators/strict_float.js.map new file mode 100644 index 00000000..3eb4f689 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_float.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strict_float.js","sourceRoot":"","sources":["../../src/scalar_validators/strict_float.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAsD;AAEtD,6CAIqB;AAErB,oCAAmC;AAOnC,wEAAwE;AAE3D,QAAA,iBAAiB,GAAG,CAC/B,MAAgC,EACb,EAAE;IACrB,MAAM,EACJ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,KAEP,MA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,WAAW,CAAC;gBACjB,IAAI,EAAE,SAAS;gBACf,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAChC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,UAAU;gBAChB,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,OAAO,KAAY,CAAA;IACrB,CAAC,CAAA;IAED,OAAO,IAAI,2BAAiB,iCACvB,YAAY,KACf,SAAS,EAAE,SAAS,IAAI,6BAAgB,EACxC,UAAU,EACV,YAAY,EAAE,CAAC,GAAG,EAAoB,EAAE,CACtC,UAAU,CAAC,kCAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAC7C,CAAA;AACJ,CAAC,CAAA"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_int.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/strict_int.d.ts new file mode 100644 index 00000000..621141fb --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_int.d.ts @@ -0,0 +1,3 @@ +import { GraphQLScalarType } from 'graphql'; +import { StrictScalarNumberConfig } from '../types/strict_scalars'; +export declare const createIntScalar: (config: StrictScalarNumberConfig) => GraphQLScalarType; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_int.js b/packages/openapi-to-graphql/lib/scalar_validators/strict_int.js new file mode 100644 index 00000000..a936c381 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_int.js @@ -0,0 +1,89 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createIntScalar = void 0; +const graphql_1 = require("graphql"); +const common_def_1 = require("./common_def"); +const utils_1 = require("../utils"); +exports.createIntScalar = (config) => { + const { coerce, errorHandler, maximum, minimum, sanitize, validate, serialize } = config, scalarConfig = __rest(config, ["coerce", "errorHandler", "maximum", "minimum", "sanitize", "validate", "serialize"]); + const handleError = errorHandler || common_def_1.defaultErrorHandler; + const parseValue = (unknownValue, ast) => { + // null inputs don't come here + // Coersion Phase + if (unknownValue == null) { + return null; + } + let value; + if (utils_1.isTypeOf(unknownValue, 'number')) { + value = unknownValue; + } + else { + if (coerce) { + const valueOrNull = coerce(unknownValue); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config + }); + } + } + // Sanitization Phase + if (sanitize && value != null) { + const valueOrNull = sanitize(value); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + // Validation Phase + if (minimum != null && value < minimum) { + return handleError({ + code: 'minimum', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (maximum != null && value > maximum) { + return handleError({ + code: 'maximum', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config + }); + } + return value; + }; + return new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, scalarConfig), { serialize: serialize || common_def_1.defaultSerialize, parseValue, parseLiteral: (ast) => parseValue(common_def_1.getValueFromValueNode(ast), ast) })); +}; +//# sourceMappingURL=strict_int.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_int.js.map b/packages/openapi-to-graphql/lib/scalar_validators/strict_int.js.map new file mode 100644 index 00000000..54a86ab0 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_int.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strict_int.js","sourceRoot":"","sources":["../../src/scalar_validators/strict_int.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAsD;AACtD,6CAIqB;AAErB,oCAAmC;AAOtB,QAAA,eAAe,GAAG,CAC7B,MAAgC,EACb,EAAE;IACrB,MAAM,EACJ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,KAEP,MAAM,EADL,YAAY,UACb,MAAM,EATJ,qFASL,CAAS,CAAA;IAEV,MAAM,WAAW,GAAG,YAAY,IAAI,gCAAmB,CAAA;IAEvD,MAAM,UAAU,GAAG,CACjB,YAAqB,EACrB,GAAe,EACG,EAAE;QACpB,8BAA8B;QAE9B,iBAAiB;QAEjB,IAAI,YAAY,IAAI,IAAI,EAAE;YACxB,OAAO,IAAI,CAAA;SACZ;QAED,IAAI,KAAa,CAAA;QAEjB,IAAI,gBAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;YACpC,KAAK,GAAG,YAAsB,CAAA;SAC/B;aAAM;YACL,IAAI,MAAM,EAAE;gBACV,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;gBAExC,IAAI,WAAW,IAAI,IAAI,EAAE;oBACvB,OAAO,IAAI,CAAA;iBACZ;gBAED,KAAK,GAAG,WAAW,CAAA;aACpB;iBAAM;gBACL,OAAO,WAAW,CAAC;oBACjB,IAAI,EAAE,MAAM;oBACZ,aAAa,EAAE,YAAY;oBAC3B,KAAK,EAAE,YAAY;oBACnB,GAAG;oBACH,MAAM;iBACP,CAAC,CAAA;aACH;SACF;QAED,qBAAqB;QAErB,IAAI,QAAQ,IAAI,KAAK,IAAI,IAAI,EAAE;YAC7B,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;YAEnC,IAAI,WAAW,IAAI,IAAI,EAAE;gBACvB,OAAO,IAAI,CAAA;aACZ;YAED,KAAK,GAAG,WAAW,CAAA;SACpB;QAED,mBAAmB;QAEnB,IAAI,OAAO,IAAI,IAAI,IAAI,KAAK,GAAG,OAAO,EAAE;YACtC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,SAAS;gBACf,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,IAAI,OAAO,IAAI,IAAI,IAAI,KAAK,GAAG,OAAO,EAAE;YACtC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,SAAS;gBACf,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAChC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,UAAU;gBAChB,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,OAAO,KAAY,CAAA;IACrB,CAAC,CAAA;IAED,OAAO,IAAI,2BAAiB,iCACvB,YAAY,KACf,SAAS,EAAE,SAAS,IAAI,6BAAgB,EACxC,UAAU,EACV,YAAY,EAAE,CAAC,GAAG,EAAoB,EAAE,CACtC,UAAU,CAAC,kCAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAC7C,CAAA;AACJ,CAAC,CAAA"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_string.d.ts b/packages/openapi-to-graphql/lib/scalar_validators/strict_string.d.ts new file mode 100644 index 00000000..0ee8e348 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_string.d.ts @@ -0,0 +1,3 @@ +import { GraphQLScalarType } from 'graphql'; +import { StrictScalarStringConfig } from '../types/strict_scalars'; +export declare const createStringScalar: (config: StrictScalarStringConfig) => GraphQLScalarType; diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_string.js b/packages/openapi-to-graphql/lib/scalar_validators/strict_string.js new file mode 100644 index 00000000..e78fb784 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_string.js @@ -0,0 +1,178 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createStringScalar = void 0; +const graphql_1 = require("graphql"); +const common_def_1 = require("./common_def"); +const utils_1 = require("../utils"); +const strToUpperCase = (str) => str.toUpperCase(); +const wordRegex = /(?:^|\s)\S/g; +const sentenceRegex = /(?:^|\.\s)\S/g; +const newlineRegex = /[\r\n]+/g; +const newlineWithWSRegex = /\s*[\r\n]+\s*/g; +const linebreakRegex = /\r\n|\r|\n/g; +const whitespace = /\s+/g; +const collapseWS = (str) => str.replace(whitespace, ' '); +const trimAndCollapseWS = (str) => str.trim().replace(whitespace, ' '); +exports.createStringScalar = (config) => { + const { capitalize, coerce, collapseWhitespace, errorHandler, lowercase, maxEmptyLines, maxLength, minLength, nonEmpty, pattern, sanitize, serialize, singleline, trim, truncate, uppercase, validate } = config, scalarConfig = __rest(config, ["capitalize", "coerce", "collapseWhitespace", "errorHandler", "lowercase", "maxEmptyLines", "maxLength", "minLength", "nonEmpty", "pattern", "sanitize", "serialize", "singleline", "trim", "truncate", "uppercase", "validate"]); + const regex = typeof pattern === 'string' ? new RegExp(pattern) : pattern; + const handleError = errorHandler || common_def_1.defaultErrorHandler; + let emptyLineRegex = null; + let emptyLineString = null; + if (maxEmptyLines) { + emptyLineRegex = new RegExp(`\n{${maxEmptyLines + 2},}`, 'g'); + emptyLineString = '\n'.repeat(maxEmptyLines + 1); + } + const parseValue = (unknownValue, ast) => { + // null inputs don't come here + // Coersion Phase + if (unknownValue == null) { + return null; + } + let value; + if (typeof unknownValue === 'string') { + value = unknownValue; + } + else { + if (coerce) { + const valueOrNull = coerce(unknownValue); + if (utils_1.isTypeOf(valueOrNull, 'null')) { + return null; + } + value = valueOrNull; + } + else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config + }); + } + } + // Sanitization Phase + if (value) { + if (trim) { + value = value.trim(); + } + if (value) { + if (singleline) { + value = value.replace(newlineRegex, singleline); + } + if (collapseWhitespace) { + if (singleline) { + // newlines replaced already + value = value.replace(whitespace, ' '); + } + else if (maxEmptyLines) { + value = value + .split(linebreakRegex) + .map(trimAndCollapseWS) + .join('\n') + .replace(emptyLineRegex, emptyLineString); + } + else { + value = value + .split(newlineWithWSRegex) + .map(collapseWS) + .join('\n'); + } + } + if (truncate != null && value.length > truncate) { + value = value.substring(0, truncate); + } + if (uppercase) { + value = value.toUpperCase(); + } + else if (lowercase) { + value = value.toLowerCase(); + } + if (capitalize) { + switch (capitalize) { + case 'characters': + value = value.toUpperCase(); + break; + case 'words': + value = value.replace(wordRegex, strToUpperCase); + break; + case 'sentences': + value = value.replace(sentenceRegex, strToUpperCase); + break; + case 'first': + default: + value = value[0].toUpperCase() + value.slice(1); + break; + } + } + } + } + if (sanitize) { + const valueOrNull = sanitize(value); + if (valueOrNull == null) { + return null; + } + value = valueOrNull; + } + // Validation Phase + if (nonEmpty && !value) { + return handleError({ + code: 'empty', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (minLength != null && value.length < minLength) { + return handleError({ + code: 'minLength', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (maxLength != null && value.length > maxLength) { + return handleError({ + code: 'maxLength', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (regex != null && !regex.test(value)) { + return handleError({ + code: 'pattern', + originalValue: unknownValue, + value, + ast, + config + }); + } + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config + }); + } + return value; + }; + return new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, scalarConfig), { serialize: serialize || common_def_1.defaultSerialize, parseValue, parseLiteral: (ast) => parseValue(common_def_1.getValueFromValueNode(ast), ast) })); +}; +//# sourceMappingURL=strict_string.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/scalar_validators/strict_string.js.map b/packages/openapi-to-graphql/lib/scalar_validators/strict_string.js.map new file mode 100644 index 00000000..1a3d26f9 --- /dev/null +++ b/packages/openapi-to-graphql/lib/scalar_validators/strict_string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strict_string.js","sourceRoot":"","sources":["../../src/scalar_validators/strict_string.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAsD;AAGtD,6CAIqB;AAErB,oCAAmC;AAEnC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAA;AAEjE,MAAM,SAAS,GAAG,aAAa,CAAA;AAE/B,MAAM,aAAa,GAAG,eAAe,CAAA;AAErC,MAAM,YAAY,GAAG,UAAU,CAAA;AAE/B,MAAM,kBAAkB,GAAG,gBAAgB,CAAA;AAE3C,MAAM,cAAc,GAAG,aAAa,CAAA;AAEpC,MAAM,UAAU,GAAG,MAAM,CAAA;AAEzB,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;AAExE,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAU,EAAE,CAChD,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;AAExB,QAAA,kBAAkB,GAAG,CAChC,MAAgC,EACb,EAAE;IACrB,MAAM,EACJ,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,YAAY,EACZ,SA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AAC,KAAK,CAAC,EAAE;YACvC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,SAAS;gBACf,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAChC,OAAO,WAAW,CAAC;gBACjB,IAAI,EAAE,UAAU;gBAChB,aAAa,EAAE,YAAY;gBAC3B,KAAK;gBACL,GAAG;gBACH,MAAM;aACP,CAAC,CAAA;SACH;QAED,OAAO,KAAY,CAAA;IACrB,CAAC,CAAA;IAED,OAAO,IAAI,2BAAiB,iCACvB,YAAY,KACf,SAAS,EAAE,SAAS,IAAI,6BAAgB,EACxC,UAAU,EACV,YAAY,EAAE,CAAC,GAAG,EAAoB,EAAE,CACtC,UAAU,CAAC,kCAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAC7C,CAAA;AACJ,CAAC,CAAA"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/schema_builder.d.ts b/packages/openapi-to-graphql/lib/schema_builder.d.ts index c3609bfb..abebf119 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.d.ts +++ b/packages/openapi-to-graphql/lib/schema_builder.d.ts @@ -3,7 +3,7 @@ */ import { PreprocessingData } from './types/preprocessing_data'; import { Operation, DataDefinition } from './types/operation'; -import { ParameterObject } from './types/oas3'; +import { SchemaObject, ParameterObject } from './types/oas3'; import { Args } from './types/graphql'; import { GraphQLOutputType, GraphQLInputType } from 'graphql'; declare type GetArgsParams = { @@ -14,6 +14,7 @@ declare type GetArgsParams = { }; declare type CreateOrReuseComplexTypeParams = { def: DataDefinition; + schema?: SchemaObject; operation?: Operation; iteration?: number; isInputObjectType?: boolean; @@ -22,7 +23,7 @@ declare type CreateOrReuseComplexTypeParams = { /** * Creates and returns a GraphQL type for the given JSON schema. */ -export declare function getGraphQLType({ def, operation, data, iteration, isInputObjectType }: CreateOrReuseComplexTypeParams): GraphQLOutputType | GraphQLInputType; +export declare function getGraphQLType({ def, schema, operation, data, iteration, isInputObjectType }: CreateOrReuseComplexTypeParams): GraphQLOutputType | GraphQLInputType; /** * Creates the arguments for resolving a field * diff --git a/packages/openapi-to-graphql/lib/schema_builder.js b/packages/openapi-to-graphql/lib/schema_builder.js index bd6f82b3..ecd74b6b 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.js +++ b/packages/openapi-to-graphql/lib/schema_builder.js @@ -5,6 +5,10 @@ // License text available at https://opensource.org/licenses/MIT Object.defineProperty(exports, "__esModule", { value: true }); exports.getArgs = exports.getGraphQLType = void 0; +//import { Args, GraphQLType, ResolveFunction } from './types/graphql' +const strict_string_1 = require("./scalar_validators/strict_string"); +const strict_int_1 = require("./scalar_validators/strict_int"); +const strict_float_1 = require("./scalar_validators/strict_float"); const graphql_1 = require("graphql"); // Imports: const graphql_type_json_1 = require("graphql-type-json"); @@ -20,7 +24,7 @@ const utils_1 = require("./utils"); * the API requests. Therefore, we need to change the serialize() function * in the GraphQLJSON type. */ -const CleanGraphQLJSON = new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, graphql_type_json_1.default.toConfig()), { serialize: (value) => { +const CleanGraphQLJSON = new graphql_1.GraphQLScalarType(Object.assign(Object.assign({}, graphql_type_json_1.default.toConfig()), { serialize: value => { let cleanValue; /** * If the value is an object and contains the _openAPIToGraphQL, @@ -52,7 +56,7 @@ const translationLog = debug_1.default('translation'); /** * Creates and returns a GraphQL type for the given JSON schema. */ -function getGraphQLType({ def, operation, data, iteration = 0, isInputObjectType = false }) { +function getGraphQLType({ def, schema, operation, data, iteration = 0, isInputObjectType = false }) { const name = isInputObjectType ? def.graphQLInputObjectTypeName : def.graphQLTypeName; @@ -83,6 +87,7 @@ function getGraphQLType({ def, operation, data, iteration = 0, isInputObjectType return createOrReuseList({ def, operation, + schema, data, iteration, isInputObjectType @@ -97,6 +102,8 @@ function getGraphQLType({ def, operation, data, iteration = 0, isInputObjectType default: return getScalarType({ def, + schema, + isInputObjectType, data }); } @@ -210,7 +217,7 @@ function createOrReuseUnion({ def, operation, data, iteration }) { ? schema.description : 'No description available.'; const memberTypeDefinitions = def.subDefinitions; - const types = Object.values(memberTypeDefinitions).map((memberTypeDefinition) => { + const types = Object.values(memberTypeDefinitions).map(memberTypeDefinition => { return getGraphQLType({ def: memberTypeDefinition, operation, @@ -232,7 +239,7 @@ function createOrReuseUnion({ def, operation, data, iteration }) { resolveType: (source, context, info) => { const properties = Object.keys(source) // Remove custom _openAPIToGraphQL property used to pass data - .filter((property) => property !== '_openAPIToGraphQL'); + .filter(property => property !== '_openAPIToGraphQL'); /** * Find appropriate member type * @@ -244,11 +251,11 @@ function createOrReuseUnion({ def, operation, data, iteration }) { * identified if, for whatever reason, the return data is a superset * of the fields specified in the OAS */ - return types.find((type) => { + return types.find(type => { const typeFields = Object.keys(type.getFields()); // The type should be a superset of the properties if (properties.length <= typeFields.length) { - return properties.every((property) => typeFields.includes(property)); + return properties.every(property => typeFields.includes(property)); } return false; }); @@ -281,7 +288,7 @@ function checkAmbiguousMemberTypes(def, types, data) { for (let j = i + 1; j < types.length; j++) { const otherType = types[j]; // TODO: Check the value, not just the field name - if (Object.keys(currentType.getFields()).every((field) => { + if (Object.keys(currentType.getFields()).every(field => { return Object.keys(otherType.getFields()).includes(field); })) { utils_1.handleWarning({ @@ -301,7 +308,7 @@ function checkAmbiguousMemberTypes(def, types, data) { /** * Creates a list type or returns an existing one, and stores it in data */ -function createOrReuseList({ def, operation, iteration, isInputObjectType, data }) { +function createOrReuseList({ def, operation, schema, iteration, isInputObjectType, data }) { const name = isInputObjectType ? def.graphQLInputObjectTypeName : def.graphQLTypeName; @@ -329,6 +336,7 @@ function createOrReuseList({ def, operation, iteration, isInputObjectType, data const itemsType = getGraphQLType({ def: itemDef, data, + schema, operation, iteration: iteration + 1, isInputObjectType @@ -365,7 +373,7 @@ function createOrReuseEnum({ def, data }) { else { translationLog(`Create GraphQLEnumType '${def.graphQLTypeName}'`); const values = {}; - def.schema.enum.forEach((e) => { + def.schema.enum.forEach(e => { // Force enum values to string and value should be in ALL_CAPS values[Oas3Tools.sanitize(e.toString(), Oas3Tools.CaseStyle.ALL_CAPS)] = { value: e @@ -382,19 +390,128 @@ function createOrReuseEnum({ def, data }) { /** * Returns the GraphQL scalar type matching the given JSON schema type */ -function getScalarType({ def, data }) { +function getScalarType({ def, schema, isInputObjectType, data }) { + const options = { + name: '' + }; + if (isInputObjectType && schema) { + const type = schema.type; + const title = schema.title || ''; + options.name = + title + .split(/\s+/) + .map(utils_1.ucFirst) + .join('') || + 'StrictScalar' + + utils_1.ucFirst(type) + + 'Type' + + (Math.random() * Date.now()).toString(16).replace('.', ''); + if (type === 'string') { + options.trim = true; + if ('nullable' in schema) + options.nonEmpty = !schema.nullable; + } + switch (true) { + case typeof schema.minimum === 'number': + case typeof schema.minLength === 'number': + if (type === 'string') { + options.minLength = schema.minLength; + } + if (type === 'number' || type === 'integer') { + options.minimum = schema.minimum; + } + break; + case typeof schema.maximum === 'number': + case typeof schema.maxLength === 'number': + if (type === 'string') { + options.maxLength = schema.maxLength; + } + if (type === 'number' || type === 'integer') { + options.maximum = schema.maximum; + } + break; + case typeof schema.pattern === 'string': + const $qualifier = schema.pattern.match(/\/(.)$/) || ['', '']; + const $pattern = schema.pattern + .replace(/^\//, '') + .replace(/\/(.)?$/, ''); + if (type === 'string') { + options.pattern = new RegExp($pattern, $qualifier[1]); + } + break; + case typeof schema.description === 'string': + options.description = schema.description.replace(/\s/g, '').trim(); + break; + case type !== 'object' && type !== 'array' && type === 'boolean': + case typeof schema.format === 'string': + case typeof schema.enum !== 'undefined': + const $format = schema.format || '-'; + const $enum = schema.enum || []; + options.coerce = (data) => { + if ($format === 'int64' || + $format === 'long' || + $format === 'float') { + if (!isFinite(data)) { + throw new graphql_1.GraphQLError('Float cannot represent non numeric value'); + } + } + if (type === 'string') { + if (typeof data !== 'string') { + throw new graphql_1.GraphQLError('String cannot represent a non string value'); + } + } + return data; + }; + options.serialize = (data) => { + if ($format === 'date' || $format === 'date-time') { + return utils_1.serializeDate(data); + } + return data; + }; + options.sanitize = (data) => { + return type === 'integer' || $format.startsWith('int') + ? utils_1.isSafeInteger(data) && parseInt(data, 10) + : $format === 'long' + ? utils_1.isSafeLong(data) && data + : type === 'number' || $format === 'float' + ? utils_1.isSafeFloat(data) && parseFloat(data) + : $format === 'date' || $format === 'date-time' + ? utils_1.isSafeDate(data) && data + : $format === 'uuid' + ? utils_1.isUUIDOrGUID(data) && data + : $format === 'email' + ? utils_1.isEmail(data) && data + : $format === 'url' + ? utils_1.isURL(data) && data + : data; + }; + options.validate = (data) => { + return $enum.includes(data) || utils_1.isTypeOf(data, type); + }; + break; + } + } switch (def.targetGraphQLType) { case 'id': def.graphQLType = graphql_1.GraphQLID; break; case 'string': - def.graphQLType = graphql_1.GraphQLString; + def.graphQLType = + isInputObjectType && schema + ? strict_string_1.createStringScalar(options) + : graphql_1.GraphQLString; break; case 'integer': - def.graphQLType = graphql_1.GraphQLInt; + def.graphQLType = + isInputObjectType && schema + ? strict_int_1.createIntScalar(options) + : graphql_1.GraphQLInt; break; case 'number': - def.graphQLType = graphql_1.GraphQLFloat; + def.graphQLType = + isInputObjectType && schema + ? strict_float_1.createFloatScalar(options) + : graphql_1.GraphQLFloat; break; case 'boolean': def.graphQLType = graphql_1.GraphQLBoolean; @@ -421,6 +538,7 @@ function createFields({ def, links, operation, data, iteration, isInputObjectTyp const objectType = getGraphQLType({ def: fieldTypeDefinition, operation, + schema: fieldSchema, data, iteration: iteration + 1, isInputObjectType @@ -491,7 +609,7 @@ function createFields({ def, links, operation, data, iteration, isInputObjectTyp // Get arguments that are not provided by the linked operation let dynamicParams = linkedOp.parameters; if (typeof argsFromLink === 'object') { - dynamicParams = dynamicParams.filter((param) => { + dynamicParams = dynamicParams.filter(param => { return typeof argsFromLink[param.name] === 'undefined'; }); } @@ -813,7 +931,7 @@ function skipArg(parameter, operation, data) { function getArgs({ requestPayloadDef, parameters, operation, data }) { let args = {}; // Handle params: - parameters.forEach((parameter) => { + parameters.forEach(parameter => { // We need at least a name if (typeof parameter.name !== 'string') { utils_1.handleWarning({ @@ -880,6 +998,7 @@ function getArgs({ requestPayloadDef, parameters, operation, data }) { const type = getGraphQLType({ def: paramDef, operation, + schema, data, iteration: 0, isInputObjectType: true @@ -944,6 +1063,7 @@ function getArgs({ requestPayloadDef, parameters, operation, data }) { const reqObjectType = getGraphQLType({ def: requestPayloadDef, data, + schema: requestPayloadDef.schema, operation, isInputObjectType: true // Request payloads will always be an input object type }); @@ -956,7 +1076,15 @@ function getArgs({ requestPayloadDef, parameters, operation, data }) { ? operation.payloadRequired : false; args[saneName] = { - type: reqRequired ? new graphql_1.GraphQLNonNull(reqObjectType) : reqObjectType, + type: reqRequired + ? new graphql_1.GraphQLNonNull(reqObjectType) + : typeof requestPayloadDef.schema.default !== + 'undefined' + ? { + type: reqObjectType, + defaultValue: requestPayloadDef.schema.default + } + : reqObjectType, // TODO: addendum to the description explaining this is the request body description: requestPayloadDef.schema.description }; @@ -984,7 +1112,7 @@ function getOasFromLinkLocation(linkLocation, link, data) { switch (getLinkLocationType(linkLocation)) { case 'title': // Get the possible - const possibleOass = data.oass.filter((oas) => { + const possibleOass = data.oass.filter(oas => { return oas.info.title === linkLocation; }); // Check if there are an ambiguous OASs diff --git a/packages/openapi-to-graphql/lib/schema_builder.js.map b/packages/openapi-to-graphql/lib/schema_builder.js.map index 60318b00..c3b07cd5 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.js.map +++ b/packages/openapi-to-graphql/lib/schema_builder.js.map @@ -1 +1 @@ -{"version":3,"file":"schema_builder.js","sourceRoot":"","sources":["../src/schema_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAiBhE,qCAiBgB;AAEhB,WAAW;AACX,yDAA2C;AAC3C,2CAA0C;AAC1C,yDAAoE;AACpE,iDA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BAC7B,eAAe;gBACf,OAAO,YAAY,CAAC,CAAC,CAAC,CAAA;aACvB;iBAAM,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,iBAAiB;gBACjB,qBAAa,CAAC;oBACZ,cAAc,EAAE,uBAAe,CAAC,cAAc;oBAC9C,OAAO,EACL,qBAAqB,IAAI,CAAC,YAAY,kBAAkB;wBACxD,QAAQ,YAAY,0CAA0C;oBAChE,IAAI;oBACJ,GAAG,EAAE,cAAc;iBACpB,CAAC,CAAA;aACH;iBAAM;gBACL,gCAAgC;gBAChC,qBAAa,CAAC;oBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;oBACjD,OAAO,EACL,qBAAqB,IAAI,CAAC,YAAY,kBAAkB;wBACxD,QAAQ,YAAY,gCAAgC;oBACtD,IAAI;oBACJ,GAAG,EAAE,cAAc;iBACpB,CAAC,CAAA;aACH;YACD,MAAK;QAEP,UAAU;QACV,cAAc;QACd,UAAU;QAEV,UAAU;QACV,eAAe;QACf,UAAU;QAEV,iCAAiC;QACjC,gCAAgC;QAChC;YACE,qBAAa,CAAC;gBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;gBACjD,OAAO,EACL,wCAAwC;oBACxC,IAAI,IAAI,CAAC,YAAY,gCAAgC;oBACrD,kDAAkD;gBACpD,IAAI;gBACJ,GAAG,EAAE,cAAc;aACpB,CAAC,CAAA;KACL;AACH,CAAC"} \ No newline at end of file +{"version":3,"file":"schema_builder.js","sourceRoot":"","sources":["../src/schema_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAqBhE,sEAAsE;AAEtE,qEAAsE;AACtE,+DAAgE;AAChE,mEAAoE;AAEpE,qCAkBgB;AAEhB,WAAW;AACX,yDAA2C;AAC3C,2CAA0C;AAC1C,yDAAoE;AACpE,iDAA8C;AAC9C,iCAAyB;AACzB,mCAcgB;AA0ChB;;;;;;GAMG;AACH,M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iBACpB,CAAC,CAAA;aACH;iBAAM;gBACL,gCAAgC;gBAChC,qBAAa,CAAC;oBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;oBACjD,OAAO,EACL,qBAAqB,IAAI,CAAC,YAAY,kBAAkB;wBACxD,QAAQ,YAAY,gCAAgC;oBACtD,IAAI;oBACJ,GAAG,EAAE,cAAc;iBACpB,CAAC,CAAA;aACH;YACD,MAAK;QAEP,UAAU;QACV,cAAc;QACd,UAAU;QAEV,UAAU;QACV,eAAe;QACf,UAAU;QAEV,iCAAiC;QACjC,gCAAgC;QAChC;YACE,qBAAa,CAAC;gBACZ,cAAc,EAAE,uBAAe,CAAC,iBAAiB;gBACjD,OAAO,EACL,wCAAwC;oBACxC,IAAI,IAAI,CAAC,YAAY,gCAAgC;oBACrD,kDAAkD;gBACpD,IAAI;gBACJ,GAAG,EAAE,cAAc;aACpB,CAAC,CAAA;KACL;AACH,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/types/oas3.d.ts b/packages/openapi-to-graphql/lib/types/oas3.d.ts index 026db5a3..ce6bede7 100644 --- a/packages/openapi-to-graphql/lib/types/oas3.d.ts +++ b/packages/openapi-to-graphql/lib/types/oas3.d.ts @@ -8,6 +8,11 @@ declare type ExternalDocumentationObject = { export declare type SchemaObject = { $ref?: string; title?: string; + minimum?: number; + maximum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; type?: 'string' | 'number' | 'object' | 'array' | 'boolean' | 'integer'; format?: string; nullable?: boolean; @@ -20,7 +25,7 @@ export declare type SchemaObject = { additionalProperties?: SchemaObject | ReferenceObject | boolean; items?: SchemaObject | ReferenceObject; additionalItems?: boolean | string[]; - enum?: string[]; + enum?: any[]; allOf?: (SchemaObject | ReferenceObject)[]; anyOf?: (SchemaObject | ReferenceObject)[]; oneOf?: (SchemaObject | ReferenceObject)[]; @@ -64,7 +69,7 @@ export declare type MediaTypeObject = { }; export declare type ParameterObject = { name: string; - in: 'query' | 'header' | 'path' | 'cookie'; + in: 'query' | 'header' | 'path' | 'cookie' | 'body'; description?: string; required?: boolean; deprecated?: boolean; diff --git a/packages/openapi-to-graphql/lib/types/strict_scalars.d.ts b/packages/openapi-to-graphql/lib/types/strict_scalars.d.ts new file mode 100644 index 00000000..92cec748 --- /dev/null +++ b/packages/openapi-to-graphql/lib/types/strict_scalars.d.ts @@ -0,0 +1,52 @@ +import { ValueNode } from 'graphql'; +export interface IScalarParseError { + code: TCode; + originalValue: unknown; + value: unknown; + ast?: ValueNode; + config: TConfig; +} +export declare type ScalarParseErrorHandler = (errorInfo: IScalarParseError) => TInternal; +declare type ScalarCoerceFunction = (raw: unknown) => T | null | undefined; +declare type ScalarSanitizeFunction = (value: T) => T | null | undefined; +declare type ScalarValidateFunction = (value: T) => boolean; +declare type ScalarParseFunction = (value: T) => U; +declare type ScalarSerializeFunction = (value: T) => U; +interface StrictScalarConfig { + name: string; + maximum?: number; + minimum?: number; + pattern?: RegExp | string; + maxLength?: number; + minLength?: number; + description?: string; + trim?: boolean; + nonEmpty?: boolean; +} +export declare type CaptilizeForm = 'characters' | 'words' | 'sentences' | 'first'; +export declare type NumberScalarErrorCode = 'type' | 'minimum' | 'maximum' | 'validate'; +export declare type StringScalarErrorCode = 'type' | 'empty' | 'minLength' | 'maxLength' | 'pattern' | 'validate'; +export interface StrictScalarNumberConfig extends StrictScalarConfig { + errorHandler?: ScalarParseErrorHandler; + serialize?: ScalarSerializeFunction; + parse?: ScalarParseFunction; + coerce?: ScalarCoerceFunction; + sanitize?: ScalarSanitizeFunction; + validate?: ScalarValidateFunction; +} +export interface StrictScalarStringConfig extends StrictScalarConfig { + maxEmptyLines?: number; + capitalize?: CaptilizeForm; + collapseWhitespace?: boolean; + truncate?: number; + uppercase?: boolean; + lowercase?: boolean; + singleline?: string; + errorHandler?: ScalarParseErrorHandler; + serialize?: ScalarSerializeFunction; + parse?: ScalarParseFunction; + coerce?: ScalarCoerceFunction; + sanitize?: ScalarSanitizeFunction; + validate?: ScalarValidateFunction; +} +export {}; diff --git a/packages/openapi-to-graphql/lib/types/strict_scalars.js b/packages/openapi-to-graphql/lib/types/strict_scalars.js new file mode 100644 index 00000000..264eddaa --- /dev/null +++ b/packages/openapi-to-graphql/lib/types/strict_scalars.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=strict_scalars.js.map \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/types/strict_scalars.js.map b/packages/openapi-to-graphql/lib/types/strict_scalars.js.map new file mode 100644 index 00000000..9aa31527 --- /dev/null +++ b/packages/openapi-to-graphql/lib/types/strict_scalars.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strict_scalars.js","sourceRoot":"","sources":["../../src/types/strict_scalars.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/utils.d.ts b/packages/openapi-to-graphql/lib/utils.d.ts index d1f77f6d..9e05534f 100644 --- a/packages/openapi-to-graphql/lib/utils.d.ts +++ b/packages/openapi-to-graphql/lib/utils.d.ts @@ -38,6 +38,46 @@ export declare enum MitigationTypes { export declare const mitigations: { [mitigationType in MitigationTypes]: string; }; +/** + * Verify that a variable contains a safe int (2^31) + */ +export declare function isSafeInteger(n: unknown): boolean; +/** + * Verify that a variable contains a safe long (2^53) + */ +export declare function isSafeLong(n: unknown): boolean; +/** + * Check if a number is a safe floating point + */ +export declare function isSafeFloat(n: unknown): boolean; +/** + * Serialize a date string into the ISO format + */ +export declare function serializeDate(n: string): string; +/** + * Verify that a vriable contains a safe date/date-time string + */ +export declare function isSafeDate(n: string): boolean; +/** + * Verify is a string is a valid URL + */ +export declare function isURL(s: string): boolean; +/** + * Verify if a string is a valid EMAIL + */ +export declare function isEmail(s: string): boolean; +/** + * Verify if a string is a valid GUID/UUID + */ +export declare function isUUIDOrGUID(s: string): boolean; +/** + * Convert the fist letter of a word in a string to upper case + */ +export declare function ucFirst(s: string): string; +/** + * Get the correct type of a variable + */ +export declare function isTypeOf(value: unknown, type: string): boolean; /** * Utilities that are specific to OpenAPI-to-GraphQL */ diff --git a/packages/openapi-to-graphql/lib/utils.js b/packages/openapi-to-graphql/lib/utils.js index 29abf49b..62fb944f 100644 --- a/packages/openapi-to-graphql/lib/utils.js +++ b/packages/openapi-to-graphql/lib/utils.js @@ -4,7 +4,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT Object.defineProperty(exports, "__esModule", { value: true }); -exports.getCommonPropertyNames = exports.sortObject = exports.handleWarning = exports.mitigations = exports.MitigationTypes = void 0; +exports.getCommonPropertyNames = exports.sortObject = exports.handleWarning = exports.isTypeOf = exports.ucFirst = exports.isUUIDOrGUID = exports.isEmail = exports.isURL = exports.isSafeDate = exports.serializeDate = exports.isSafeFloat = exports.isSafeLong = exports.isSafeInteger = exports.mitigations = exports.MitigationTypes = void 0; var MitigationTypes; (function (MitigationTypes) { /** @@ -88,6 +88,166 @@ exports.mitigations = { // Miscellaneous OAUTH_SECURITY_SCHEME: `Ignore security scheme` }; +const MAX_INT = 2147483647; +const MIN_INT = -2147483648; +const MAX_LONG = 9007199254740991; +const MIN_LONG = -9007199254740992; +/** + * Verify that a variable contains a safe int (2^31) + */ +function isSafeInteger(n) { + return (typeof n === 'number' && + isFinite(n) && + n <= MAX_INT && + n >= MIN_INT && + n % 1 === 0); +} +exports.isSafeInteger = isSafeInteger; +/** + * Verify that a variable contains a safe long (2^53) + */ +function isSafeLong(n) { + return (typeof n === 'number' && + isFinite(n) && + n <= MAX_LONG && + n >= MIN_LONG && + n % 1 === 0); +} +exports.isSafeLong = isSafeLong; +/** + * Check if a number is a safe floating point + */ +function isSafeFloat(n) { + return typeof n === 'number' && n % 0.5 !== 0; +} +exports.isSafeFloat = isSafeFloat; +/** + * Convert a date and/or date-time string into a date object + */ +function toDate(n) { + const parsed = Date.parse(n); + const $ref = new Date(); + $ref.setTime(parsed); + return ((typeof parsed === 'number' && + parsed !== NaN && + parsed > 0 && + String(parsed).length === 13 && + $ref) || + null); +} +/** + * Serialize a date string into the ISO format + */ +function serializeDate(n) { + const date = toDate(n); + return date && date.toJSON(); +} +exports.serializeDate = serializeDate; +/** + * Verify that a vriable contains a safe date/date-time string + */ +function isSafeDate(n) { + const date = toDate(n); + return date !== null && date.getTime() !== NaN; +} +exports.isSafeDate = isSafeDate; +/** + * Verify is a string is a valid URL + */ +function isURL(s) { + let res = null; + /* See: https://mathiasbynens.be/demo/url-regex for URL Reg Exp source */ + const urlRegex = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z0-9]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g; + try { + res = s.match(urlRegex); + } + catch (e) { + res = null; + } + return res !== null; +} +exports.isURL = isURL; +/** + * Verify if a string is a valid EMAIL + */ +function isEmail(s) { + /* See: See: https://github.com/Urigo/graphql-scalars/blob/master/src/resolvers/EmailAddress.ts#L4 for EMAIL Reg Exp source */ + const emailRegex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; + return emailRegex.test(s); +} +exports.isEmail = isEmail; +/** + * Verify if a string is a valid GUID/UUID + */ +function isUUIDOrGUID(s) { + /* See: See: https://github.com/Urigo/graphql-scalars/blob/master/src/resolvers/GUID.ts#L4 for UUID Reg Exp source */ + const uuidRegExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; + const guidRegExp = /^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/gi; + if (s.startsWith('{')) { + s = s.substring(1, s.length - 1); + } + return uuidRegExp.test(s) || guidRegExp.test(s); +} +exports.isUUIDOrGUID = isUUIDOrGUID; +/** + * Convert the fist letter of a word in a string to upper case + */ +function ucFirst(s) { + if (typeof s !== 'string') { + return ''; + } + return s.replace(/^./, c => c.toUpperCase()); +} +exports.ucFirst = ucFirst; +/** + * Check if a literal is falsy or not + */ +const isLiteralFalsey = (variable) => { + return variable === '' || variable === false || variable === 0; +}; +/** + * Check if a variable contains a reference type (not a literal) + */ +const isPrimitive = (arg) => { + return (typeof arg === 'object' || (Boolean(arg) && typeof arg.apply === 'function')); +}; +/** + * Check that the data type of primitive and/or reference + * variable mathes the type provided + */ +const checkTypeName = (target, type) => { + let typeName = ''; + // we need to separate checks for literal types and + // primitive types so we can speed up performance and + // keep things simple + if (isLiteralFalsey(target) || !isPrimitive(target)) { + // literal + typeName = typeof target; + } + else { + // primitive/reference + typeName = Object.prototype.toString + .call(target) + .replace(/^\[object (.+)\]$/, '$1'); + } + // check if the type matches + return Boolean(typeName.toLowerCase().indexOf(type) + 1); +}; +/** + * Get the correct type of a variable + */ +function isTypeOf(value, type) { + // swagger/OpenAPI 'integer' type is converted + // a JavaScript 'number' type for compatibility + if (type === 'integer') { + type = 'number'; + } + type = type || ''; + // checks that the data type of the variable + // matches that that was passed in + return checkTypeName(value, type); +} +exports.isTypeOf = isTypeOf; /** * Utilities that are specific to OpenAPI-to-GraphQL */ @@ -119,7 +279,7 @@ function handleWarning({ mitigationType, message, mitigationAddendum, path, data } exports.handleWarning = handleWarning; // Code provided by codename- from StackOverflow -// Link: https://stackoverflow.com/a/29622653 +// See: https://stackoverflow.com/a/29622653 function sortObject(o) { return Object.keys(o) .sort() diff --git a/packages/openapi-to-graphql/lib/utils.js.map b/packages/openapi-to-graphql/lib/utils.js.map index dbaff08e..ba189f39 100644 --- a/packages/openapi-to-graphql/lib/utils.js.map +++ b/packages/openapi-to-graphql/lib/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;AAKhE,IAAY,eA6CX;AA7CD,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M,CAAC,CAAA;SACpB;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;KAC3C;AACH,CAAC;AAxCD,sCAwCC;AAED,gDAAgD;AAChD,4CAA4C;AAC5C,SAAgB,UAAU,CAAI,CAAI;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;SAClB,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAM,CAAA;AAClD,CAAC;AAJD,gCAIC;AAED;;GAEG;AACH,SAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO;IACrD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;QAChD,OAAO,YAAY,IAAI,OAAO,CAAA;IAChC,CAAC,CAAC,CAAA;AACJ,CAAC;AAJD,wDAIC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/package-lock.json b/packages/openapi-to-graphql/package-lock.json index da8ddd02..2f5e6906 100644 --- a/packages/openapi-to-graphql/package-lock.json +++ b/packages/openapi-to-graphql/package-lock.json @@ -453,46 +453,11 @@ "dev": true, "requires": { "camelcase": "^5.3.1", - "find-up": "^4.1.0", "get-package-type": "^0.1.0", "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" }, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -627,8 +592,7 @@ "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "slash": "^3.0.0" }, "dependencies": { "@jest/types": { @@ -656,8 +620,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "4.2.1", @@ -706,15 +669,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1327,69 +1281,11 @@ } } }, - "@jest/types": { - "version": "25.2.6", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.2.6.tgz", - "integrity": "sha512-myJTTV37bxK7+3NgKc4Y/DlQ5q92/NOwZsZ+Uch7OXdElxOg61QYc72fPYNAjlvbnJ2YvbXLamIsa9tj48BmyQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^15.0.0", - "chalk": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true }, "@sinonjs/commons": { "version": "1.8.1", @@ -1409,6 +1305,15 @@ "@sinonjs/commons": "^1.7.0" } }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@types/babel__core": { "version": "7.1.10", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.10.tgz", @@ -1556,11 +1461,16 @@ "form-data": "^2.5.0" }, "dependencies": { - "@types/node": { - "version": "12.12.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.31.tgz", - "integrity": "sha512-T+wnJno8uh27G9c+1T+a1/WYCHzLeDqtsGJkoEdSp2X8RTh3oOCZQcUnjAx90CS8cmmADX51O0FI/tu9s0yssg==", - "dev": true + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } } } }, @@ -1571,9 +1481,9 @@ "dev": true }, "@types/tough-cookie": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.6.tgz", - "integrity": "sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", "dev": true }, "@types/yargs": { @@ -1739,12 +1649,52 @@ } }, "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", "dev": true, "requires": { - "string-width": "^2.0.0" + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "ansi-escapes": { @@ -1754,14 +1704,16 @@ "dev": true, "requires": { "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2209,25 +2161,102 @@ } }, "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", "dev": true, "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" }, "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.1.tgz", + "integrity": "sha512-LL0OLyN6AnfV9xqGQpDBwedT2Rt63737LxvsRxbcwpa2aIeynBApG2Sm//F3TaLHIR1aJBN52DWklc06b94o5Q==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -2332,6 +2361,38 @@ "unset-value": "^1.0.0" } }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", @@ -2367,12 +2428,6 @@ "rsvp": "^4.8.4" } }, - "capture-stack-trace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2402,9 +2457,9 @@ "dev": true }, "chokidar": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", - "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -2414,7 +2469,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.3.0" + "readdirp": "~3.4.0" }, "dependencies": { "glob-parent": { @@ -2473,9 +2528,9 @@ "dev": true }, "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", "dev": true }, "cli-cursor": { @@ -2488,9 +2543,9 @@ } }, "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, "cliui": { @@ -2533,6 +2588,23 @@ } } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + }, + "dependencies": { + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + } + } + }, "cluster-key-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz", @@ -2640,43 +2712,26 @@ } }, "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { - "dot-prop": "^4.1.0", + "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" }, "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-obj": "^2.0.0" } } } @@ -2791,15 +2846,6 @@ "printj": "~1.1.0" } }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -2814,9 +2860,9 @@ } }, "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "cssom": { @@ -2912,9 +2958,9 @@ } }, "deep-equal": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.2.tgz", - "integrity": "sha512-kX0bjV7tdMuhrhzKPEnVwqfQCuf+IEfN+4Xqv4eKd75xGRyn8yzdQ9ujPY6a221rgJKyQC4KBu1PibDTpa6m9w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.3.tgz", + "integrity": "sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA==", "requires": { "es-abstract": "^1.17.5", "es-get-iterator": "^1.1.0", @@ -2922,20 +2968,14 @@ "is-date-object": "^1.0.2", "is-regex": "^1.0.5", "isarray": "^2.0.5", - "object-is": "^1.0.2", + "object-is": "^1.1.2", "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.2", - "which-boxed-primitive": "^1.0.1", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } + "object.assign": "^4.1.0", + "regexp.prototype.flags": "^1.3.0", + "side-channel": "^1.0.2", + "which-boxed-primitive": "^1.0.1", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.2" } }, "deep-extend": { @@ -2956,6 +2996,12 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -3093,15 +3139,6 @@ } } }, - "dot-prop": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", - "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -3200,13 +3237,6 @@ "is-set": "^2.0.1", "is-string": "^1.0.5", "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } } }, "es-to-primitive": { @@ -3295,6 +3325,12 @@ "ext": "^1.1.2" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3366,9 +3402,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -3448,12 +3484,6 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", "dev": true - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true } } }, @@ -3564,6 +3594,12 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -3631,11 +3667,102 @@ "isarray": "^1.0.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } } } }, @@ -3744,18 +3871,18 @@ "dev": true }, "esquery": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", - "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", "dev": true, "requires": { - "estraverse": "^5.0.0" + "estraverse": "^5.1.0" }, "dependencies": { "estraverse": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", - "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", "dev": true } } @@ -4352,15 +4479,6 @@ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", "dev": true }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, "find-versions": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", @@ -4415,10 +4533,9 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -4468,9 +4585,9 @@ "dev": true }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, "optional": true }, @@ -4574,12 +4691,12 @@ } }, "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "^1.3.5" } }, "globals": { @@ -4589,36 +4706,45 @@ "dev": true }, "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, "requires": { - "create-error-class": "^3.0.0", + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" }, "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true } } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, "graphql": { @@ -4751,9 +4877,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4844,6 +4970,12 @@ } } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "help-me": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/help-me/-/help-me-1.1.0.tgz", @@ -4889,6 +5021,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -5151,9 +5289,9 @@ "dev": true }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.1.tgz", + "integrity": "sha512-LL0OLyN6AnfV9xqGQpDBwedT2Rt63737LxvsRxbcwpa2aIeynBApG2Sm//F3TaLHIR1aJBN52DWklc06b94o5Q==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -5182,9 +5320,9 @@ } }, "ioredis": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.16.0.tgz", - "integrity": "sha512-tlalhtuvnxXJNtrPjec1nGicuOCpi9ErYV/fRfwaWSzktX9ESrzHlcFwj1pVAL326E8dmt7h9pPQZyyVPPksRA==", + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.16.3.tgz", + "integrity": "sha512-Ejvcs2yW19Vq8AipvbtfcX3Ig8XG9EAyFOvGbhI/Q1QoVOK9ZdgY092kdOyOWIYBnPHjfjMJhU9qhsnp0i0K1w==", "dev": true, "optional": true, "requires": { @@ -5354,12 +5492,6 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, "is-generator-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", @@ -5376,13 +5508,13 @@ } }, "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" } }, "is-map": { @@ -5397,9 +5529,9 @@ "dev": true }, "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", "dev": true }, "is-number": { @@ -5414,19 +5546,16 @@ "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true }, "is-plain-object": { "version": "2.0.4", @@ -5443,18 +5572,6 @@ "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=", "dev": true }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, "is-regex": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", @@ -5472,12 +5589,6 @@ "is-unc-path": "^1.0.0" } }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true - }, "is-set": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", @@ -5553,12 +5664,17 @@ "is-docker": "^2.0.0" } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", "dev": true }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -7669,14 +7785,12 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, "requires": { "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" @@ -7692,22 +7806,10 @@ "supports-color": "^7.1.0" } }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "requires": { "color-name": "~1.1.4" } @@ -7715,18 +7817,13 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } + "dev": true }, "get-caller-file": { "version": "2.0.5", @@ -7746,62 +7843,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7815,11 +7856,8 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^4.0.0" } }, "yargs": { @@ -7835,7 +7873,6 @@ "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^18.1.2" @@ -8431,6 +8468,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -8499,6 +8542,15 @@ "object.assign": "^4.1.0" } }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -8512,12 +8564,12 @@ "dev": true }, "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "requires": { - "package-json": "^4.0.0" + "package-json": "^6.3.0" } }, "leven": { @@ -8577,16 +8629,6 @@ } } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", @@ -8634,16 +8676,6 @@ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -8732,16 +8764,16 @@ "dev": true }, "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "requires": { - "mime-db": "1.43.0" + "mime-db": "1.44.0" } }, "mimic-fn": { @@ -9036,9 +9068,9 @@ } }, "nodemon": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.2.tgz", - "integrity": "sha512-GWhYPMfde2+M0FsHnggIHXTqPDHXia32HRhh6H0d75Mt9FKUoCBvumNHr7LdrpPBTKxsWmIEOjoN+P4IU6Hcaw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.3.tgz", + "integrity": "sha512-lLQLPS90Lqwc99IHe0U94rDgvjo+G9I4uEIxRG3evSLROcqQ9hwc0AxlSHKS4T1JW/IMj/7N5mthiN58NL/5kw==", "dev": true, "requires": { "chokidar": "^3.2.2", @@ -9050,7 +9082,7 @@ "supports-color": "^5.5.0", "touch": "^3.1.0", "undefsafe": "^2.0.2", - "update-notifier": "^2.5.0" + "update-notifier": "^4.0.0" }, "dependencies": { "debug": { @@ -9091,6 +9123,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -9393,9 +9431,13 @@ "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" }, "object-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", - "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", + "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } }, "object-keys": { "version": "1.1.1", @@ -9529,6 +9571,12 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-each-series": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", @@ -9542,37 +9590,36 @@ "dev": true }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { "p-try": "^2.0.0" } }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "pako": { @@ -9626,24 +9673,12 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -9704,6 +9739,15 @@ "load-json-file": "^5.2.0" }, "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "load-json-file": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", @@ -9717,6 +9761,25 @@ "type-fest": "^0.3.0" } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -9727,6 +9790,12 @@ "json-parse-better-errors": "^1.0.1" } }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -9824,9 +9893,9 @@ "dev": true }, "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, "prettier": { @@ -9836,17 +9905,29 @@ "dev": true }, "pretty-format": { - "version": "25.2.6", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.2.6.tgz", - "integrity": "sha512-DEiWxLBaCHneffrIT4B+TpMvkV9RNvvJrd3lY9ew1CEQobDzEXmYT1mg0hJhljZty7kCc10z13ohOFAE8jrUDg==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.5.0.tgz", + "integrity": "sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ==", "dev": true, "requires": { - "@jest/types": "^25.2.6", + "@jest/types": "^25.5.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" }, "dependencies": { + "@jest/types": { + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.5.0.tgz", + "integrity": "sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^15.0.0", + "chalk": "^3.0.0" + } + }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -9863,6 +9944,16 @@ "color-convert": "^2.0.1" } }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -9877,6 +9968,21 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -9888,7 +9994,6 @@ "requires": { "chalk": "^3.0.0", "execa": "^4.0.0", - "find-up": "^4.1.0", "ignore": "^5.1.4", "mri": "^1.1.5", "multimatch": "^4.0.0" @@ -9957,16 +10062,6 @@ "strip-final-newline": "^2.0.0" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -9988,15 +10083,6 @@ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -10010,7 +10096,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -10018,8 +10103,7 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "path-key": { "version": "3.1.1", @@ -10117,12 +10201,6 @@ "integrity": "sha512-53BHGoSSquDJg7fyDrMKWa85jfF34LPKAeRSij+Eiktlh2YE4rAk5U9uba3mGRswE/grDiAi2mZWknbzbXiB9w==", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -10172,136 +10250,62 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "qlobber": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/qlobber/-/qlobber-5.0.3.tgz", - "integrity": "sha512-wW4GTZPePyh0RgOsM18oDyOUlXfurVRgoNyJfS+y7VWPyd0GYhQp5T2tycZFZjonH+hngxIfklGJhTP/ghidgQ==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "pupa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - } + "requires": { + "escape-goat": "^2.0.0" + } + }, + "qlobber": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/qlobber/-/qlobber-5.0.3.tgz", + "integrity": "sha512-wW4GTZPePyh0RgOsM18oDyOUlXfurVRgoNyJfS+y7VWPyd0GYhQp5T2tycZFZjonH+hngxIfklGJhTP/ghidgQ==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -10317,6 +10321,12 @@ "util-deprecate": "~1.0.1" }, "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -10326,12 +10336,12 @@ } }, "readdirp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", - "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", "dev": true, "requires": { - "picomatch": "^2.0.7" + "picomatch": "^2.2.1" } }, "redis-commands": { @@ -10389,22 +10399,21 @@ "dev": true }, "registry-auth-token": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", + "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", "dev": true, "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "rc": "^1.2.8" } }, "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "requires": { - "rc": "^1.0.1" + "rc": "^1.2.8" } }, "reinterval": { @@ -10456,18 +10465,6 @@ "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } } }, "request-promise-core": { @@ -10501,9 +10498,9 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -10538,6 +10535,15 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -10582,13 +10588,10 @@ "dev": true }, "run-async": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", - "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true }, "run-parallel": { "version": "1.1.9", @@ -10787,12 +10790,20 @@ "dev": true }, "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { - "semver": "^5.0.3" + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "semver-regex": { @@ -11041,6 +11052,14 @@ "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } } }, "snapdragon": { @@ -11217,9 +11236,9 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { @@ -11332,14 +11351,14 @@ "optional": true }, "standard-engine": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-12.0.0.tgz", - "integrity": "sha512-gJIIRb0LpL7AHyGbN9+hJ4UJns37lxmNTnMGRLC8CFrzQ+oB/K60IQjKNgPBCB2VP60Ypm6f8DFXvhVWdBOO+g==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-12.0.1.tgz", + "integrity": "sha512-XtR9NfoTqvHkWQCwL1aLMwXw1Qxy5s4rdSIqetgBNw+8faNbQ+BbB49hPhKXjxxfC4yg+fpH0lx/T5fuUbpDcQ==", "dev": true, "requires": { - "deglob": "^4.0.0", + "deglob": "^4.0.1", "get-stdin": "^7.0.0", - "minimist": "^1.1.0", + "minimist": "^1.2.5", "pkg-conf": "^3.1.0" } }, @@ -11409,20 +11428,10 @@ } } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, "string.prototype.trimend": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", - "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" @@ -11449,9 +11458,9 @@ } }, "string.prototype.trimstart": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", - "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5" @@ -11474,15 +11483,6 @@ } } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, "strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -11520,12 +11520,6 @@ "ws": "^5.2.0" }, "dependencies": { - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, "ws": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", @@ -11590,6 +11584,12 @@ "yargs": "^15.3.1" } }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -11609,9 +11609,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -11638,6 +11638,12 @@ "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", "dev": true }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -11667,47 +11673,10 @@ } }, "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } - } + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", + "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "dev": true }, "terminal-link": { "version": "2.1.1", @@ -11770,12 +11739,6 @@ } } }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -11827,6 +11790,12 @@ } } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -11895,17 +11864,10 @@ "json5": "2.x", "lodash.memoize": "4.x", "make-error": "1.x", - "mkdirp": "1.x", "semver": "7.x", "yargs-parser": "20.x" }, "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -11921,15 +11883,15 @@ } }, "tslib": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", + "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==", "dev": true }, "tslint": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.1.tgz", - "integrity": "sha512-kd6AQ/IgPRpLn6g5TozqzPdGNZ0q0jtXW4//hRcj10qLYBaa3mTUU2y2MCG+RXZm8Zx+KZi0eA+YCrMyNlF4UA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.2.tgz", + "integrity": "sha512-UyNrLdK3E0fQG/xWNqAFAC5ugtFyPO4JJR1KyyfQAyzR8W0fTRrC91A8Wej4BntFzcvETdCSDa/4PnNYJQLYiA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -12050,9 +12012,9 @@ "dev": true }, "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "type-is": { @@ -12153,12 +12115,12 @@ } }, "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "^2.0.0" } }, "unpipe": { @@ -12204,46 +12166,84 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true } } }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", + "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", "dev": true, "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" }, "dependencies": { - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "ci-info": "^1.5.0" + "has-flag": "^4.0.0" } } } @@ -12263,12 +12263,12 @@ "dev": true }, "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "^2.0.0" } }, "use": { @@ -12462,24 +12462,59 @@ "dev": true }, "which-typed-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.1.tgz", - "integrity": "sha512-IWlkoJZ4Zdfi4YBn2wnYB8AVox+4A2+Kmr4kHFAraffHYrQZFiTOjgjk9et8e6RSPZOV1QjZOC51PVCK9SkR/A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.2.tgz", + "integrity": "sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==", "requires": { - "available-typed-arrays": "^1.0.1", - "es-abstract": "^1.17.4", + "available-typed-arrays": "^1.0.2", + "es-abstract": "^1.17.5", + "foreach": "^2.0.5", "function-bind": "^1.1.1", "has-symbols": "^1.0.1", "is-typed-array": "^1.1.3" } }, "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { - "string-width": "^2.1.1" + "string-width": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.1.tgz", + "integrity": "sha512-LL0OLyN6AnfV9xqGQpDBwedT2Rt63737LxvsRxbcwpa2aIeynBApG2Sm//F3TaLHIR1aJBN52DWklc06b94o5Q==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "word-wrap": { @@ -12597,9 +12632,9 @@ } }, "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xml-name-validator": { @@ -12625,12 +12660,6 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yaml": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", diff --git a/packages/openapi-to-graphql/src/oas_3_tools.ts b/packages/openapi-to-graphql/src/oas_3_tools.ts index 8560cc9c..5aee3e05 100644 --- a/packages/openapi-to-graphql/src/oas_3_tools.ts +++ b/packages/openapi-to-graphql/src/oas_3_tools.ts @@ -136,8 +136,8 @@ export function getValidOAS3(spec: Oas2 | Oas3): Promise { ) Swagger2OpenAPI.convertObj(spec, {}) - .then((options) => resolve(options.openapi)) - .catch((error) => + .then(options => resolve(options.openapi)) + .catch(error => reject( `Could not convert Swagger '${ (spec as Oas2).info.title @@ -154,7 +154,7 @@ export function getValidOAS3(spec: Oas2 | Oas3): Promise { OASValidator.validate(spec, {}) .then(() => resolve(spec as Oas3)) - .catch((error) => + .catch(error => reject( `Could not validate OpenAPI Specification '${ (spec as Oas3).info.title @@ -376,7 +376,7 @@ export function desanitizeObjectKeys( obj: object | Array, mapping: object = {} ): object | Array { - const replaceKeys = (obj) => { + const replaceKeys = obj => { if (obj === null) { return null } else if (Array.isArray(obj)) { @@ -496,8 +496,11 @@ function extractBasePath( } } - const updatedPaths = paths.map((path) => - path.split('/').slice(basePathComponents.length).join('/') + const updatedPaths = paths.map(path => + path + .split('/') + .slice(basePathComponents.length) + .join('/') ) let basePath = @@ -835,7 +838,7 @@ export function getResponseStatusCode( ): string | void { if (typeof operation.responses === 'object') { const codes = Object.keys(operation.responses) - const successCodes = codes.filter((code) => { + const successCodes = codes.filter(code => { return SUCCESS_STATUS_RX.test(code) }) if (successCodes.length === 1) { @@ -935,7 +938,7 @@ export function getParameters( // First, consider parameters in Path Item Object: const pathParams = pathItem.parameters if (Array.isArray(pathParams)) { - const pathItemParameters: ParameterObject[] = pathParams.map((p) => { + const pathItemParameters: ParameterObject[] = pathParams.map(p => { if (typeof (p as ReferenceObject).$ref === 'string') { // Here we know we have a parameter object: return resolveRef(p['$ref'], oas) as ParameterObject @@ -950,17 +953,15 @@ export function getParameters( // Second, consider parameters in Operation Object: const opObjectParameters = operation.parameters if (Array.isArray(opObjectParameters)) { - const operationParameters: ParameterObject[] = opObjectParameters.map( - (p) => { - if (typeof (p as ReferenceObject).$ref === 'string') { - // Here we know we have a parameter object: - return resolveRef(p['$ref'], oas) as ParameterObject - } else { - // Here we know we have a parameter object: - return p as ParameterObject - } + const operationParameters: ParameterObject[] = opObjectParameters.map(p => { + if (typeof (p as ReferenceObject).$ref === 'string') { + // Here we know we have a parameter object: + return resolveRef(p['$ref'], oas) as ParameterObject + } else { + // Here we know we have a parameter object: + return p as ParameterObject } - ) + }) parameters = parameters.concat(operationParameters) } diff --git a/packages/openapi-to-graphql/src/preprocessor.ts b/packages/openapi-to-graphql/src/preprocessor.ts index bf93902c..133c71d4 100644 --- a/packages/openapi-to-graphql/src/preprocessor.ts +++ b/packages/openapi-to-graphql/src/preprocessor.ts @@ -204,7 +204,7 @@ export function preprocessOas( oass } - oass.forEach((oas) => { + oass.forEach(oas => { // Store stats on OAS: data.options.report.numOps += Oas3Tools.countOperations(oas) data.options.report.numOpsMutation += Oas3Tools.countOperationsMutation(oas) @@ -223,7 +223,7 @@ export function preprocessOas( data.security, currentSecurity ) - commonSecurityPropertyName.forEach((propertyName) => { + commonSecurityPropertyName.forEach(propertyName => { handleWarning({ mitigationType: MitigationTypes.DUPLICATE_SECURITY_SCHEME, message: `Multiple OASs share security schemes with the same name '${propertyName}'`, @@ -245,7 +245,7 @@ export function preprocessOas( : (Oas3Tools.resolveRef(oas.paths[path]['$ref'], oas) as PathItemObject) Object.keys(pathItem) - .filter((objectKey) => { + .filter(objectKey => { /** * Get only fields that contain operation objects * @@ -253,7 +253,7 @@ export function preprocessOas( */ return Oas3Tools.isHttpMethod(objectKey) }) - .forEach((rawMethod) => { + .forEach(rawMethod => { const operationString = oass.length === 1 ? Oas3Tools.formatOperationString(rawMethod, path) @@ -356,7 +356,7 @@ export function preprocessOas( const callbackOperationObjectMethods = Object.keys( resolvedCallbackPathItem - ).filter((objectKey) => { + ).filter(objectKey => { /** * Get only fields that contain operation objects * @@ -681,7 +681,7 @@ export function createDataDef( const saneLinks = {} if (typeof links === 'object') { - Object.keys(links).forEach((linkKey) => { + Object.keys(links).forEach(linkKey => { saneLinks[ Oas3Tools.sanitize( linkKey, @@ -707,7 +707,7 @@ export function createDataDef( if (typeof saneLinks !== 'undefined') { if (typeof existingDataDef.links !== 'undefined') { // Check if there are any overlapping links - Object.keys(existingDataDef.links).forEach((saneLinkKey) => { + Object.keys(existingDataDef.links).forEach(saneLinkKey => { if ( typeof saneLinks[saneLinkKey] !== 'undefined' && !deepEqual( @@ -1088,7 +1088,7 @@ function addObjectPropertiesToDataDef( * TODO: required may contain duplicates, which is not necessarily a problem */ if (Array.isArray(schema.required)) { - schema.required.forEach((requiredProperty) => { + schema.required.forEach(requiredProperty => { required.push(requiredProperty) }) } @@ -1160,7 +1160,7 @@ function resolveAllOf( // Resolve allOf if (Array.isArray(collapsedSchema.allOf)) { - collapsedSchema.allOf.forEach((memberSchema) => { + collapsedSchema.allOf.forEach(memberSchema => { // Collapse type if applicable const resolvedSchema = resolveAllOf(memberSchema, references, data, oas) @@ -1215,7 +1215,7 @@ function resolveAllOf( collapsedSchema.oneOf = [] } - resolvedSchema.oneOf.forEach((oneOfProperty) => { + resolvedSchema.oneOf.forEach(oneOfProperty => { collapsedSchema.oneOf.push(oneOfProperty) }) } @@ -1226,7 +1226,7 @@ function resolveAllOf( collapsedSchema.anyOf = [] } - resolvedSchema.anyOf.forEach((anyOfProperty) => { + resolvedSchema.anyOf.forEach(anyOfProperty => { collapsedSchema.anyOf.push(anyOfProperty) }) } @@ -1237,7 +1237,7 @@ function resolveAllOf( collapsedSchema.required = [] } - resolvedSchema.required.forEach((requiredProperty) => { + resolvedSchema.required.forEach(requiredProperty => { if (!collapsedSchema.required.includes(requiredProperty)) { collapsedSchema.required.push(requiredProperty) } @@ -1270,7 +1270,7 @@ function getMemberSchemaData( allRequired: [] } - schemas.forEach((schema) => { + schemas.forEach(schema => { // Dereference schemas if ('$ref' in schema) { schema = Oas3Tools.resolveRef(schema['$ref'], oas) as SchemaObject @@ -1311,7 +1311,7 @@ function hasNestedOneOfUsage( // TODO: Should also consider if the member schema contains type data return ( Array.isArray(collapsedSchema.oneOf) && - collapsedSchema.oneOf.some((memberSchema) => { + collapsedSchema.oneOf.some(memberSchema => { // anyOf and oneOf are nested if ('$ref' in memberSchema) { memberSchema = Oas3Tools.resolveRef( @@ -1339,7 +1339,7 @@ function hasNestedAnyOfUsage( // TODO: Should also consider if the member schema contains type data return ( Array.isArray(collapsedSchema.anyOf) && - collapsedSchema.anyOf.some((memberSchema) => { + collapsedSchema.anyOf.some(memberSchema => { // anyOf and oneOf are nested if ('$ref' in memberSchema) { memberSchema = Oas3Tools.resolveRef( @@ -1373,13 +1373,13 @@ function createDataDefFromAnyOf( const anyOfData = getMemberSchemaData(collapsedSchema.anyOf, data, oas) if ( - anyOfData.allTargetGraphQLTypes.some((memberTargetGraphQLType) => { + anyOfData.allTargetGraphQLTypes.some(memberTargetGraphQLType => { return memberTargetGraphQLType === 'object' }) ) { // Every member type should be an object if ( - anyOfData.allTargetGraphQLTypes.every((memberTargetGraphQLType) => { + anyOfData.allTargetGraphQLTypes.every(memberTargetGraphQLType => { return memberTargetGraphQLType === 'object' }) && anyOfData.allProperties.length > 0 // Redundant check @@ -1401,7 +1401,7 @@ function createDataDefFromAnyOf( */ if (typeof collapsedSchema.properties === 'object') { - Object.keys(collapsedSchema.properties).forEach((propertyName) => { + Object.keys(collapsedSchema.properties).forEach(propertyName => { allProperties[propertyName] = [ collapsedSchema.properties[propertyName] ] @@ -1409,12 +1409,12 @@ function createDataDefFromAnyOf( } // Check if any member schema has conflicting properties - anyOfData.allProperties.forEach((properties) => { - Object.keys(properties).forEach((propertyName) => { + anyOfData.allProperties.forEach(properties => { + Object.keys(properties).forEach(propertyName => { if ( !incompatibleProperties.has(propertyName) && // Has not been already identified as a problematic property typeof allProperties[propertyName] === 'object' && - allProperties[propertyName].some((property) => { + allProperties[propertyName].some(property => { // Property does not match a recorded one return !deepEqual(property, properties[propertyName]) }) @@ -1446,8 +1446,8 @@ function createDataDefFromAnyOf( ) } - anyOfData.allProperties.forEach((properties) => { - Object.keys(properties).forEach((propertyName) => { + anyOfData.allProperties.forEach(properties => { + Object.keys(properties).forEach(propertyName => { if (!incompatibleProperties.has(propertyName)) { // Dereferenced by processing anyOfData const propertySchema = properties[propertyName] as SchemaObject @@ -1473,7 +1473,7 @@ function createDataDefFromAnyOf( }) // Add in incompatible properties - incompatibleProperties.forEach((propertyName) => { + incompatibleProperties.forEach(propertyName => { // TODO: add description def.subDefinitions[propertyName] = { targetGraphQLType: 'json' @@ -1537,13 +1537,13 @@ function createDataDefFromOneOf( const oneOfData = getMemberSchemaData(collapsedSchema.oneOf, data, oas) if ( - oneOfData.allTargetGraphQLTypes.some((memberTargetGraphQLType) => { + oneOfData.allTargetGraphQLTypes.some(memberTargetGraphQLType => { return memberTargetGraphQLType === 'object' }) ) { // unions must be created from object types if ( - oneOfData.allTargetGraphQLTypes.every((memberTargetGraphQLType) => { + oneOfData.allTargetGraphQLTypes.every(memberTargetGraphQLType => { return memberTargetGraphQLType === 'object' }) && oneOfData.allProperties.length > 0 // Redundant check @@ -1568,7 +1568,7 @@ function createDataDefFromOneOf( ) { def.subDefinitions = [] - collapsedSchema.oneOf.forEach((memberSchema) => { + collapsedSchema.oneOf.forEach(memberSchema => { // Dereference member schema let fromRef: string if ('$ref' in memberSchema) { @@ -1615,7 +1615,7 @@ function createDataDefFromOneOf( // Not all member schemas may have been turned into GraphQL member types if ( def.subDefinitions.length > 0 && - def.subDefinitions.every((subDefinition) => { + def.subDefinitions.every(subDefinition => { return subDefinition.targetGraphQLType === 'object' }) ) { diff --git a/packages/openapi-to-graphql/src/resolver_builder.ts b/packages/openapi-to-graphql/src/resolver_builder.ts index 081fdc22..e2cbe59e 100644 --- a/packages/openapi-to-graphql/src/resolver_builder.ts +++ b/packages/openapi-to-graphql/src/resolver_builder.ts @@ -205,7 +205,7 @@ export function getSubscribe({ const cbParams = value.match(/{([^}]*)}/g) pubsubLog(`Analyzing subscription path: ${cbParams.toString()}`) - cbParams.forEach((cbParam) => { + cbParams.forEach(cbParam => { value = value.replace( cbParam, resolveRuntimeExpression( @@ -401,7 +401,7 @@ export function getResolver({ * Handle default values of parameters, if they have not yet been defined by * the user. */ - operation.parameters.forEach((param) => { + operation.parameters.forEach(param => { const paramName = Oas3Tools.sanitize( param.name, !data.options.simpleNames @@ -460,7 +460,7 @@ export function getResolver({ } else { // Replace link parameters with appropriate values const linkParams = value.match(/{([^}]*)}/g) - linkParams.forEach((linkParam) => { + linkParams.forEach(linkParam => { value = value.replace( linkParam, resolveRuntimeExpression( @@ -754,7 +754,7 @@ export function getResolver({ // Pass on _openAPIToGraphQL to subsequent resolvers if (saneData && typeof saneData === 'object') { if (Array.isArray(saneData)) { - saneData.forEach((element) => { + saneData.forEach(element => { if (typeof element[OPENAPI_TO_GRAPHQL] === 'undefined') { element[OPENAPI_TO_GRAPHQL] = { data: {} @@ -809,13 +809,13 @@ export function getResolver({ * * Ensure that there is not preexisting 'limit' argument */ - !operation.parameters.find((parameter) => { + !operation.parameters.find(parameter => { return parameter.name === 'limit' }) && // Only array data Array.isArray(saneData) && // Only array of objects/arrays - saneData.some((data) => { + saneData.some(data => { return typeof data === 'object' }) ) { diff --git a/packages/openapi-to-graphql/src/scalar_validators/common_def.ts b/packages/openapi-to-graphql/src/scalar_validators/common_def.ts new file mode 100644 index 00000000..d3ac4b58 --- /dev/null +++ b/packages/openapi-to-graphql/src/scalar_validators/common_def.ts @@ -0,0 +1,40 @@ +import { + BooleanValueNode, + EnumValueNode, + FloatValueNode, + IntValueNode, + Kind, + StringValueNode, + ValueNode +} from 'graphql' + +import { GraphQLError } from 'graphql' + +import { ScalarParseErrorHandler } from '../types/strict_scalars' + +export const defaultErrorHandler: ScalarParseErrorHandler = ({ + code, + ast +}): never => { + throw new GraphQLError(`code=${code}`, ast ? [ast] : []) +} + +export const defaultSerialize = (x: any): any => x + +export const getValueFromValueNode = (ast: ValueNode): any => { + switch (ast.kind) { + case Kind.BOOLEAN: + return (ast as BooleanValueNode).value + case Kind.FLOAT: + return parseFloat((ast as FloatValueNode).value) + case Kind.INT: + return parseInt((ast as IntValueNode).value, 10) + case Kind.NULL: + return null + case Kind.STRING: + return (ast as StringValueNode).value + case Kind.ENUM: + return (ast as EnumValueNode).value + } + return undefined +} diff --git a/packages/openapi-to-graphql/src/scalar_validators/strict_float.ts b/packages/openapi-to-graphql/src/scalar_validators/strict_float.ts new file mode 100644 index 00000000..8bd4abba --- /dev/null +++ b/packages/openapi-to-graphql/src/scalar_validators/strict_float.ts @@ -0,0 +1,124 @@ +import { GraphQLScalarType, ValueNode } from 'graphql' + +import { + defaultErrorHandler, + defaultSerialize, + getValueFromValueNode +} from './common_def' + +import { isTypeOf } from '../utils' + +import { + StrictScalarNumberConfig, + NumberScalarErrorCode +} from '../types/strict_scalars' + +// https://github.com/graphql/graphql-js/blob/master/src/type/scalars.js + +export const createFloatScalar = ( + config: StrictScalarNumberConfig +): GraphQLScalarType => { + const { + coerce, + errorHandler, + maximum, + minimum, + parse, + sanitize, + validate, + serialize, + ...scalarConfig + } = config + + const handleError = errorHandler || defaultErrorHandler + + const parseValue = ( + unknownValue: unknown, + ast?: ValueNode + ): TInternal | null => { + // null inputs don't come here + + // Coersion Phase + + if (unknownValue == null) { + return null + } + + let value: number + + if (isTypeOf(unknownValue, 'number')) { + value = unknownValue as number + } else { + if (coerce) { + const valueOrNull = coerce(unknownValue) + + if (valueOrNull == null) { + return null + } + + value = valueOrNull + } else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config + }) + } + } + + // Sanitization Phase + + if (sanitize && value != null) { + const valueOrNull = sanitize(value) + + if (valueOrNull == null) { + return null + } + value = valueOrNull + } + + // Validation Phase + + if (minimum != null && value < minimum) { + return handleError({ + code: 'minimum', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (maximum != null && value > maximum) { + return handleError({ + code: 'maximum', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config + }) + } + + return value as any + } + + return new GraphQLScalarType({ + ...scalarConfig, + serialize: serialize || defaultSerialize, + parseValue, + parseLiteral: (ast): TInternal | null => + parseValue(getValueFromValueNode(ast), ast) + }) +} diff --git a/packages/openapi-to-graphql/src/scalar_validators/strict_int.ts b/packages/openapi-to-graphql/src/scalar_validators/strict_int.ts new file mode 100644 index 00000000..d55cbdc6 --- /dev/null +++ b/packages/openapi-to-graphql/src/scalar_validators/strict_int.ts @@ -0,0 +1,121 @@ +import { GraphQLScalarType, ValueNode } from 'graphql' +import { + defaultErrorHandler, + defaultSerialize, + getValueFromValueNode +} from './common_def' + +import { isTypeOf } from '../utils' + +import { + StrictScalarNumberConfig, + NumberScalarErrorCode +} from '../types/strict_scalars' + +export const createIntScalar = ( + config: StrictScalarNumberConfig +): GraphQLScalarType => { + const { + coerce, + errorHandler, + maximum, + minimum, + sanitize, + validate, + serialize, + ...scalarConfig + } = config + + const handleError = errorHandler || defaultErrorHandler + + const parseValue = ( + unknownValue: unknown, + ast?: ValueNode + ): TInternal | null => { + // null inputs don't come here + + // Coersion Phase + + if (unknownValue == null) { + return null + } + + let value: number + + if (isTypeOf(unknownValue, 'number')) { + value = unknownValue as number + } else { + if (coerce) { + const valueOrNull = coerce(unknownValue) + + if (valueOrNull == null) { + return null + } + + value = valueOrNull + } else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config + }) + } + } + + // Sanitization Phase + + if (sanitize && value != null) { + const valueOrNull = sanitize(value) + + if (valueOrNull == null) { + return null + } + + value = valueOrNull + } + + // Validation Phase + + if (minimum != null && value < minimum) { + return handleError({ + code: 'minimum', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (maximum != null && value > maximum) { + return handleError({ + code: 'maximum', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config + }) + } + + return value as any + } + + return new GraphQLScalarType({ + ...scalarConfig, + serialize: serialize || defaultSerialize, + parseValue, + parseLiteral: (ast): TInternal | null => + parseValue(getValueFromValueNode(ast), ast) + }) +} diff --git a/packages/openapi-to-graphql/src/scalar_validators/strict_string.ts b/packages/openapi-to-graphql/src/scalar_validators/strict_string.ts new file mode 100644 index 00000000..efa1ccfc --- /dev/null +++ b/packages/openapi-to-graphql/src/scalar_validators/strict_string.ts @@ -0,0 +1,233 @@ +import { GraphQLScalarType, ValueNode } from 'graphql' +import { StrictScalarStringConfig } from '../types/strict_scalars' + +import { + defaultErrorHandler, + defaultSerialize, + getValueFromValueNode +} from './common_def' + +import { isTypeOf } from '../utils' + +const strToUpperCase = (str: string): string => str.toUpperCase() + +const wordRegex = /(?:^|\s)\S/g + +const sentenceRegex = /(?:^|\.\s)\S/g + +const newlineRegex = /[\r\n]+/g + +const newlineWithWSRegex = /\s*[\r\n]+\s*/g + +const linebreakRegex = /\r\n|\r|\n/g + +const whitespace = /\s+/g + +const collapseWS = (str: string): string => str.replace(whitespace, ' ') + +const trimAndCollapseWS = (str: string): string => + str.trim().replace(whitespace, ' ') + +export const createStringScalar = ( + config: StrictScalarStringConfig +): GraphQLScalarType => { + const { + capitalize, + coerce, + collapseWhitespace, + errorHandler, + lowercase, + maxEmptyLines, + maxLength, + minLength, + nonEmpty, + pattern, + sanitize, + serialize, + singleline, + trim, + truncate, + uppercase, + validate, + ...scalarConfig + } = config + + const regex: RegExp = + typeof pattern === 'string' ? new RegExp(pattern) : (pattern as RegExp) + + const handleError = errorHandler || defaultErrorHandler + + let emptyLineRegex: RegExp | null = null + + let emptyLineString: string | null = null + + if (maxEmptyLines) { + emptyLineRegex = new RegExp(`\n{${maxEmptyLines + 2},}`, 'g') + + emptyLineString = '\n'.repeat(maxEmptyLines + 1) + } + + const parseValue = ( + unknownValue: unknown, + + ast?: ValueNode + ): TInternal | null => { + // null inputs don't come here + + // Coersion Phase + + if (unknownValue == null) { + return null + } + + let value: string + if (typeof unknownValue === 'string') { + value = unknownValue + } else { + if (coerce) { + const valueOrNull = coerce(unknownValue) + + if (isTypeOf(valueOrNull, 'null')) { + return null + } + value = valueOrNull + } else { + return handleError({ + code: 'type', + originalValue: unknownValue, + value: unknownValue, + ast, + config + }) + } + } + + // Sanitization Phase + + if (value) { + if (trim) { + value = value.trim() + } + + if (value) { + if (singleline) { + value = value.replace(newlineRegex, singleline) + } + + if (collapseWhitespace) { + if (singleline) { + // newlines replaced already + value = value.replace(whitespace, ' ') + } else if (maxEmptyLines) { + value = value + .split(linebreakRegex) + .map(trimAndCollapseWS) + .join('\n') + .replace(emptyLineRegex!, emptyLineString!) + } else { + value = value.split(newlineWithWSRegex).map(collapseWS).join('\n') + } + } + + if (truncate != null && value.length > truncate) { + value = value.substring(0, truncate) + } + + if (uppercase) { + value = value.toUpperCase() + } else if (lowercase) { + value = value.toLowerCase() + } + + if (capitalize) { + switch (capitalize) { + case 'characters': + value = value.toUpperCase() + break + case 'words': + value = value.replace(wordRegex, strToUpperCase) + break + case 'sentences': + value = value.replace(sentenceRegex, strToUpperCase) + break + case 'first': + + default: + value = value[0].toUpperCase() + value.slice(1) + break + } + } + } + } + + if (sanitize) { + const valueOrNull = sanitize(value) + if (valueOrNull == null) { + return null + } + value = valueOrNull + } + + // Validation Phase + + if (nonEmpty && !value) { + return handleError({ + code: 'empty', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (minLength != null && value.length < minLength) { + return handleError({ + code: 'minLength', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (maxLength != null && value.length > maxLength) { + return handleError({ + code: 'maxLength', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (regex != null && !regex.test(value)) { + return handleError({ + code: 'pattern', + originalValue: unknownValue, + value, + ast, + config + }) + } + + if (validate && !validate(value)) { + return handleError({ + code: 'validate', + originalValue: unknownValue, + value, + ast, + config + }) + } + + return value as any + } + + return new GraphQLScalarType({ + ...scalarConfig, + serialize: serialize || defaultSerialize, + parseValue, + parseLiteral: (ast): TInternal | null => + parseValue(getValueFromValueNode(ast), ast) + }) +} diff --git a/packages/openapi-to-graphql/src/schema_builder.ts b/packages/openapi-to-graphql/src/schema_builder.ts index bf6a510f..a4b92b00 100644 --- a/packages/openapi-to-graphql/src/schema_builder.ts +++ b/packages/openapi-to-graphql/src/schema_builder.ts @@ -10,6 +10,10 @@ // Type imports: import { PreprocessingData } from './types/preprocessing_data' import { Operation, DataDefinition } from './types/operation' +import { + StrictScalarNumberConfig, + StrictScalarStringConfig +} from './types/strict_scalars' import { Oas3, SchemaObject, @@ -17,8 +21,15 @@ import { ReferenceObject, LinkObject } from './types/oas3' -import { Args, GraphQLType } from './types/graphql' +import { Args } from './types/graphql' +//import { Args, GraphQLType, ResolveFunction } from './types/graphql' + +import { createStringScalar } from './scalar_validators/strict_string' +import { createIntScalar } from './scalar_validators/strict_int' +import { createFloatScalar } from './scalar_validators/strict_float' + import { + GraphQLError, GraphQLScalarType, GraphQLObjectType, GraphQLString, @@ -43,7 +54,22 @@ import * as Oas3Tools from './oas_3_tools' import { getResolver, OPENAPI_TO_GRAPHQL } from './resolver_builder' import { createDataDef } from './preprocessor' import debug from 'debug' -import { handleWarning, sortObject, MitigationTypes } from './utils' +import { + handleWarning, + sortObject, + MitigationTypes, + ucFirst, + isSafeInteger, + isSafeLong, + isSafeFloat, + isTypeOf, + isSafeDate, + serializeDate, + isUUIDOrGUID, + isEmail, + isURL +} from './utils' +//import { serialize } from 'v8' type GetArgsParams = { requestPayloadDef?: DataDefinition @@ -54,6 +80,7 @@ type GetArgsParams = { type CreateOrReuseComplexTypeParams = { def: DataDefinition + schema?: SchemaObject operation?: Operation iteration?: number // Count of recursions used to create type isInputObjectType?: boolean // Does not require isInputObjectType because unions must be composed of objects @@ -62,6 +89,8 @@ type CreateOrReuseComplexTypeParams = { type CreateOrReuseSimpleTypeParams = { def: DataDefinition + schema?: SchemaObject + isInputObjectType?: boolean // Does not require isInputObjectType because unions must be composed of objects data: PreprocessingData } @@ -90,7 +119,7 @@ type LinkOpRefToOpIdParams = { */ const CleanGraphQLJSON = new GraphQLScalarType({ ...GraphQLJSON.toConfig(), - serialize: (value) => { + serialize: value => { let cleanValue /** @@ -132,6 +161,7 @@ const translationLog = debug('translation') */ export function getGraphQLType({ def, + schema, operation, data, iteration = 0, @@ -173,6 +203,7 @@ export function getGraphQLType({ return createOrReuseList({ def, operation, + schema, data, iteration, isInputObjectType @@ -189,6 +220,8 @@ export function getGraphQLType({ default: return getScalarType({ def, + schema, + isInputObjectType, data }) } @@ -344,7 +377,7 @@ function createOrReuseUnion({ const memberTypeDefinitions = def.subDefinitions as DataDefinition[] const types = Object.values(memberTypeDefinitions).map( - (memberTypeDefinition) => { + memberTypeDefinition => { return getGraphQLType({ def: memberTypeDefinition, operation, @@ -369,7 +402,7 @@ function createOrReuseUnion({ resolveType: (source, context, info) => { const properties = Object.keys(source) // Remove custom _openAPIToGraphQL property used to pass data - .filter((property) => property !== '_openAPIToGraphQL') + .filter(property => property !== '_openAPIToGraphQL') /** * Find appropriate member type @@ -382,12 +415,12 @@ function createOrReuseUnion({ * identified if, for whatever reason, the return data is a superset * of the fields specified in the OAS */ - return types.find((type) => { + return types.find(type => { const typeFields = Object.keys(type.getFields()) // The type should be a superset of the properties if (properties.length <= typeFields.length) { - return properties.every((property) => typeFields.includes(property)) + return properties.every(property => typeFields.includes(property)) } return false @@ -430,7 +463,7 @@ function checkAmbiguousMemberTypes( // TODO: Check the value, not just the field name if ( - Object.keys(currentType.getFields()).every((field) => { + Object.keys(currentType.getFields()).every(field => { return Object.keys(otherType.getFields()).includes(field) }) ) { @@ -457,6 +490,7 @@ function checkAmbiguousMemberTypes( function createOrReuseList({ def, operation, + schema, iteration, isInputObjectType, data @@ -496,6 +530,7 @@ function createOrReuseList({ const itemsType = getGraphQLType({ def: itemDef, data, + schema, operation, iteration: iteration + 1, isInputObjectType @@ -536,7 +571,7 @@ function createOrReuseEnum({ translationLog(`Create GraphQLEnumType '${def.graphQLTypeName}'`) const values = {} - def.schema.enum.forEach((e) => { + def.schema.enum.forEach(e => { // Force enum values to string and value should be in ALL_CAPS values[Oas3Tools.sanitize(e.toString(), Oas3Tools.CaseStyle.ALL_CAPS)] = { value: e @@ -558,20 +593,147 @@ function createOrReuseEnum({ */ function getScalarType({ def, + schema, + isInputObjectType, data }: CreateOrReuseSimpleTypeParams): GraphQLScalarType { + const options: StrictScalarNumberConfig | StrictScalarStringConfig = { + name: '' + } + + if (isInputObjectType && schema) { + const type = schema.type + const title = schema.title || '' + + options.name = + title + .split(/\s+/) + .map(ucFirst) + .join('') || + 'StrictScalar' + + ucFirst(type) + + 'Type' + + (Math.random() * Date.now()).toString(16).replace('.', '') + + if (type === 'string') { + options.trim = true + if ('nullable' in schema) options.nonEmpty = !schema.nullable + } + + switch (true) { + case typeof schema.minimum === 'number': + case typeof schema.minLength === 'number': + if (type === 'string') { + options.minLength = schema.minLength + } + + if (type === 'number' || type === 'integer') { + options.minimum = schema.minimum + } + break + case typeof schema.maximum === 'number': + case typeof schema.maxLength === 'number': + if (type === 'string') { + options.maxLength = schema.maxLength + } + + if (type === 'number' || type === 'integer') { + options.maximum = schema.maximum + } + break + case typeof schema.pattern === 'string': + const $qualifier = schema.pattern.match(/\/(.)$/) || ['', ''] + const $pattern = schema.pattern + .replace(/^\//, '') + .replace(/\/(.)?$/, '') + + if (type === 'string') { + options.pattern = new RegExp($pattern, $qualifier[1]) + } + break + case typeof schema.description === 'string': + options.description = schema.description.replace(/\s/g, '').trim() + break + case type !== 'object' && type !== 'array' && type === 'boolean': + case typeof schema.format === 'string': + case typeof schema.enum !== 'undefined': + const $format = schema.format || '-' + const $enum = schema.enum || [] + + options.coerce = (data: any) => { + if ( + $format === 'int64' || + $format === 'long' || + $format === 'float' + ) { + if (!isFinite(data)) { + throw new GraphQLError('Float cannot represent non numeric value') + } + } + + if (type === 'string') { + if (typeof data !== 'string') { + throw new GraphQLError( + 'String cannot represent a non string value' + ) + } + } + return data + } + + options.serialize = (data: any) => { + if ($format === 'date' || $format === 'date-time') { + return serializeDate(data) + } + return data + } + + options.sanitize = (data: any) => { + return type === 'integer' || $format.startsWith('int') + ? isSafeInteger(data) && parseInt(data, 10) + : $format === 'long' + ? isSafeLong(data) && data + : type === 'number' || $format === 'float' + ? isSafeFloat(data) && parseFloat(data) + : $format === 'date' || $format === 'date-time' + ? isSafeDate(data) && data + : $format === 'uuid' + ? isUUIDOrGUID(data) && data + : $format === 'email' + ? isEmail(data) && data + : $format === 'url' + ? isURL(data) && data + : data + } + + options.validate = (data: any) => { + return $enum.includes(data) || isTypeOf(data, type) + } + break + } + } + switch (def.targetGraphQLType) { case 'id': def.graphQLType = GraphQLID break case 'string': - def.graphQLType = GraphQLString + def.graphQLType = + isInputObjectType && schema + ? createStringScalar(options as StrictScalarStringConfig) + : GraphQLString break case 'integer': - def.graphQLType = GraphQLInt + def.graphQLType = + isInputObjectType && schema + ? createIntScalar(options as StrictScalarNumberConfig) + : GraphQLInt break case 'number': - def.graphQLType = GraphQLFloat + def.graphQLType = + isInputObjectType && schema + ? createFloatScalar(options as StrictScalarNumberConfig) + : GraphQLFloat break case 'boolean': def.graphQLType = GraphQLBoolean @@ -614,6 +776,7 @@ function createFields({ const objectType = getGraphQLType({ def: fieldTypeDefinition, operation, + schema: fieldSchema, data, iteration: iteration + 1, isInputObjectType @@ -704,7 +867,7 @@ function createFields({ // Get arguments that are not provided by the linked operation let dynamicParams = linkedOp.parameters if (typeof argsFromLink === 'object') { - dynamicParams = dynamicParams.filter((param) => { + dynamicParams = dynamicParams.filter(param => { return typeof argsFromLink[param.name] === 'undefined' }) } @@ -1110,7 +1273,7 @@ export function getArgs({ let args = {} // Handle params: - parameters.forEach((parameter) => { + parameters.forEach(parameter => { // We need at least a name if (typeof parameter.name !== 'string') { handleWarning({ @@ -1190,6 +1353,7 @@ export function getArgs({ const type = getGraphQLType({ def: paramDef, operation, + schema, data, iteration: 0, isInputObjectType: true @@ -1265,6 +1429,7 @@ export function getArgs({ const reqObjectType = getGraphQLType({ def: requestPayloadDef, data, + schema: requestPayloadDef.schema, operation, isInputObjectType: true // Request payloads will always be an input object type }) @@ -1281,7 +1446,15 @@ export function getArgs({ : false args[saneName] = { - type: reqRequired ? new GraphQLNonNull(reqObjectType) : reqObjectType, + type: reqRequired + ? new GraphQLNonNull(reqObjectType) + : typeof (requestPayloadDef.schema as SchemaObject).default !== + 'undefined' + ? { + type: reqObjectType, + defaultValue: (requestPayloadDef.schema as SchemaObject).default + } + : reqObjectType, // TODO: addendum to the description explaining this is the request body description: requestPayloadDef.schema.description } @@ -1315,7 +1488,7 @@ function getOasFromLinkLocation( switch (getLinkLocationType(linkLocation)) { case 'title': // Get the possible - const possibleOass = data.oass.filter((oas) => { + const possibleOass = data.oass.filter(oas => { return oas.info.title === linkLocation }) diff --git a/packages/openapi-to-graphql/src/types/oas3.ts b/packages/openapi-to-graphql/src/types/oas3.ts index d254b049..cd102392 100644 --- a/packages/openapi-to-graphql/src/types/oas3.ts +++ b/packages/openapi-to-graphql/src/types/oas3.ts @@ -17,6 +17,11 @@ type ExternalDocumentationObject = { export type SchemaObject = { $ref?: string title?: string + minimum?: number + maximum?: number + maxLength?: number + minLength?: number + pattern?: string type?: 'string' | 'number' | 'object' | 'array' | 'boolean' | 'integer' format?: string nullable?: boolean @@ -29,7 +34,7 @@ export type SchemaObject = { additionalProperties?: SchemaObject | ReferenceObject | boolean items?: SchemaObject | ReferenceObject // MUST be a single schema object in OAS, see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#properties additionalItems?: boolean | string[] - enum?: string[] + enum?: any[] allOf?: (SchemaObject | ReferenceObject)[] anyOf?: (SchemaObject | ReferenceObject)[] oneOf?: (SchemaObject | ReferenceObject)[] @@ -79,7 +84,7 @@ export type MediaTypeObject = { export type ParameterObject = { name: string - in: 'query' | 'header' | 'path' | 'cookie' + in: 'query' | 'header' | 'path' | 'cookie' | 'body' description?: string required?: boolean deprecated?: boolean diff --git a/packages/openapi-to-graphql/src/types/options.ts b/packages/openapi-to-graphql/src/types/options.ts index 07503ba0..337e6a68 100644 --- a/packages/openapi-to-graphql/src/types/options.ts +++ b/packages/openapi-to-graphql/src/types/options.ts @@ -66,8 +66,10 @@ export type RequestOptions = Omit< > & { headers?: Headers | RequestHeadersFunction } - -export type Options = Partial> + +export type Options = Partial< + InternalOptions +> export type InternalOptions = { /* @@ -220,7 +222,9 @@ export type InternalOptions = { * implementing performance improvements like caching, or dealing with * non-standard authentication requirements. */ - customResolvers?: OasTitlePathMethodObject> + customResolvers?: OasTitlePathMethodObject< + GraphQLFieldResolver + > /** * Allows to define custom resolvers and subscribe functions for fields on the diff --git a/packages/openapi-to-graphql/src/types/strict_scalars.ts b/packages/openapi-to-graphql/src/types/strict_scalars.ts new file mode 100644 index 00000000..cabb6aac --- /dev/null +++ b/packages/openapi-to-graphql/src/types/strict_scalars.ts @@ -0,0 +1,76 @@ +import { ValueNode } from 'graphql' + +export interface IScalarParseError { + code: TCode + originalValue: unknown + value: unknown + ast?: ValueNode + config: TConfig +} + +// function type may throw an error + +export type ScalarParseErrorHandler = ( + errorInfo: IScalarParseError +) => TInternal + +// coerce raw external input value into internal value + +type ScalarCoerceFunction = (raw: unknown) => T | null | undefined + +type ScalarSanitizeFunction = (value: T) => T | null | undefined + +type ScalarValidateFunction = (value: T) => boolean + +type ScalarParseFunction = (value: T) => U + +type ScalarSerializeFunction = (value: T) => U + +interface StrictScalarConfig { + name: string + maximum?: number + minimum?: number + pattern?: RegExp | string + maxLength?: number + minLength?: number + description?: string + trim?: boolean + nonEmpty?: boolean +} + +export type CaptilizeForm = 'characters' | 'words' | 'sentences' | 'first' + +export type NumberScalarErrorCode = 'type' | 'minimum' | 'maximum' | 'validate' + +export type StringScalarErrorCode = + | 'type' + | 'empty' + | 'minLength' + | 'maxLength' + | 'pattern' + | 'validate' + +export interface StrictScalarNumberConfig extends StrictScalarConfig { + errorHandler?: ScalarParseErrorHandler + serialize?: ScalarSerializeFunction + parse?: ScalarParseFunction + coerce?: ScalarCoerceFunction + sanitize?: ScalarSanitizeFunction + validate?: ScalarValidateFunction +} + +export interface StrictScalarStringConfig extends StrictScalarConfig { + maxEmptyLines?: number + capitalize?: CaptilizeForm + collapseWhitespace?: boolean + truncate?: number + uppercase?: boolean + lowercase?: boolean + singleline?: string + errorHandler?: ScalarParseErrorHandler + serialize?: ScalarSerializeFunction + parse?: ScalarParseFunction + coerce?: ScalarCoerceFunction + sanitize?: ScalarSanitizeFunction + validate?: ScalarValidateFunction +} diff --git a/packages/openapi-to-graphql/src/utils.ts b/packages/openapi-to-graphql/src/utils.ts index 2c165c97..b3dd8f74 100644 --- a/packages/openapi-to-graphql/src/utils.ts +++ b/packages/openapi-to-graphql/src/utils.ts @@ -103,6 +103,186 @@ export const mitigations: { [mitigationType in MitigationTypes]: string } = { OAUTH_SECURITY_SCHEME: `Ignore security scheme` } +const MAX_INT = 2147483647 +const MIN_INT = -2147483648 + +const MAX_LONG = 9007199254740991 +const MIN_LONG = -9007199254740992 + +/** + * Verify that a variable contains a safe int (2^31) + */ +export function isSafeInteger(n: unknown): boolean { + return ( + typeof n === 'number' && + isFinite(n) && + n <= MAX_INT && + n >= MIN_INT && + n % 1 === 0 + ) +} + +/** + * Verify that a variable contains a safe long (2^53) + */ +export function isSafeLong(n: unknown): boolean { + return ( + typeof n === 'number' && + isFinite(n) && + n <= MAX_LONG && + n >= MIN_LONG && + n % 1 === 0 + ) +} + +/** + * Check if a number is a safe floating point + */ +export function isSafeFloat(n: unknown): boolean { + return typeof n === 'number' && n % 0.5 !== 0 +} + +/** + * Convert a date and/or date-time string into a date object + */ +function toDate(n: string) { + const parsed = Date.parse(n) + const $ref = new Date() + + $ref.setTime(parsed) + + return ( + (typeof parsed === 'number' && + parsed !== NaN && + parsed > 0 && + String(parsed).length === 13 && + $ref) || + null + ) +} + +/** + * Serialize a date string into the ISO format + */ +export function serializeDate(n: string) { + const date = toDate(n) + return date && date.toJSON() +} + +/** + * Verify that a vriable contains a safe date/date-time string + */ +export function isSafeDate(n: string): boolean { + const date = toDate(n) + return date !== null && date.getTime() !== NaN +} + +/** + * Verify is a string is a valid URL + */ +export function isURL(s: string): boolean { + let res = null + /* See: https://mathiasbynens.be/demo/url-regex for URL Reg Exp source */ + const urlRegex = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z0-9]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g + try { + res = s.match(urlRegex) + } catch (e) { + res = null + } + return res !== null +} + +/** + * Verify if a string is a valid EMAIL + */ +export function isEmail(s: string): boolean { + /* See: See: https://github.com/Urigo/graphql-scalars/blob/master/src/resolvers/EmailAddress.ts#L4 for EMAIL Reg Exp source */ + const emailRegex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/ + return emailRegex.test(s) +} + +/** + * Verify if a string is a valid GUID/UUID + */ +export function isUUIDOrGUID(s: string): boolean { + /* See: See: https://github.com/Urigo/graphql-scalars/blob/master/src/resolvers/GUID.ts#L4 for UUID Reg Exp source */ + const uuidRegExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i + const guidRegExp = /^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/gi + + if (s.startsWith('{')) { + s = s.substring(1, s.length - 1) + } + + return uuidRegExp.test(s) || guidRegExp.test(s) +} + +/** + * Convert the fist letter of a word in a string to upper case + */ +export function ucFirst(s: string): string { + if (typeof s !== 'string') { + return '' + } + + return s.replace(/^./, c => c.toUpperCase()) +} + +/** + * Check if a literal is falsy or not + */ +const isLiteralFalsey = (variable: unknown): boolean => { + return variable === '' || variable === false || variable === 0 +} + +/** + * Check if a variable contains a reference type (not a literal) + */ +const isPrimitive = (arg: any): boolean => { + return ( + typeof arg === 'object' || (Boolean(arg) && typeof arg.apply === 'function') + ) +} + +/** + * Check that the data type of primitive and/or reference + * variable mathes the type provided + */ +const checkTypeName = (target: unknown, type: string): boolean => { + let typeName = '' + + // we need to separate checks for literal types and + // primitive types so we can speed up performance and + // keep things simple + if (isLiteralFalsey(target) || !isPrimitive(target)) { + // literal + typeName = typeof target + } else { + // primitive/reference + typeName = Object.prototype.toString + .call(target) + .replace(/^\[object (.+)\]$/, '$1') + } + + // check if the type matches + return Boolean(typeName.toLowerCase().indexOf(type) + 1) +} + +/** + * Get the correct type of a variable + */ +export function isTypeOf(value: unknown, type: string): boolean { + // swagger/OpenAPI 'integer' type is converted + // a JavaScript 'number' type for compatibility + if (type === 'integer') { + type = 'number' + } + + type = type || '' + // checks that the data type of the variable + // matches that that was passed in + return checkTypeName(value, type) +} + /** * Utilities that are specific to OpenAPI-to-GraphQL */ @@ -149,7 +329,7 @@ export function handleWarning({ } // Code provided by codename- from StackOverflow -// Link: https://stackoverflow.com/a/29622653 +// See: https://stackoverflow.com/a/29622653 export function sortObject(o: T): T { return Object.keys(o) .sort() diff --git a/packages/openapi-to-graphql/test/example_api.test.ts b/packages/openapi-to-graphql/test/example_api.test.ts index a3503cd6..3b437bf3 100644 --- a/packages/openapi-to-graphql/test/example_api.test.ts +++ b/packages/openapi-to-graphql/test/example_api.test.ts @@ -55,7 +55,7 @@ test('Get descriptions', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { __type: { @@ -95,7 +95,7 @@ test('Get resource (incl. enum)', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { user: { name: 'Arlene L McMahon', status: 'STAFF' } } }) @@ -109,7 +109,7 @@ test('Get resource 2', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { company: { legalForm: 'public' } } }) }) }) @@ -123,7 +123,7 @@ test('Get resource with status code: 2XX', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { papers: [ @@ -148,7 +148,7 @@ test('Get resource with no response schema and status code: 204 and fillEmptyRes bonuses }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { bonuses: null @@ -168,7 +168,7 @@ test('Get nested resource via link $response.body#/...', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -192,7 +192,7 @@ test('Get nested resource via link $request.path#/... and $request.query#/', () } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { productWithId: { @@ -215,7 +215,7 @@ test('Get nested resource via link operationRef', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { productWithId: { @@ -246,7 +246,7 @@ test('Get nested lists of resources', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -420,7 +420,7 @@ test('Link parameters as constants and variables', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { scanner: { @@ -478,7 +478,7 @@ test('Nested links with constants and variables', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { scanner: { @@ -529,7 +529,7 @@ test('Link parameters as constants and variables with request payload', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { postScanner: { @@ -551,7 +551,7 @@ test('Get response without providing parameter with default value', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { productReviews: [{ text: 'Great product' }, { text: 'I love it' }] @@ -565,7 +565,7 @@ test('Get response with header parameters', () => { snack(snackType: CHIPS, snackSize: SMALL) }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { snack: 'Here is a small chips' @@ -586,7 +586,7 @@ test('Get JSON response even with non-JSON accept header', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { office: { @@ -603,7 +603,7 @@ test('Get response with cookies', () => { cookie (cookieType: CHOCOLATE_CHIP, cookieSize: MEGA_SIZED) }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { cookie: `You ordered a mega-sized chocolate chip cookie!` @@ -622,7 +622,7 @@ test('Ensure good naming for operations with duplicated schemas', () => { dirtyDesks }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { cleanDesks: '5 clean desks', @@ -643,7 +643,7 @@ test('Get response containing 64-bit integer (using GraphQLFloat)', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { productReviews: [ @@ -662,7 +662,7 @@ test('Get array of strings', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -682,7 +682,7 @@ test('Get array of objects', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { company: { @@ -713,7 +713,7 @@ test('Get single resource', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -745,7 +745,7 @@ test('Post resource', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { postUser: { @@ -776,7 +776,7 @@ test('Post resource and get nested resource back', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { postUser: { @@ -796,7 +796,7 @@ test('Post resource with non-application/json content-type request and response const query = `mutation { postPaper(textPlainInput: "happy") }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { postPaper: 'You sent the paper idea: happy' @@ -817,7 +817,7 @@ test( } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { productWithId: { @@ -843,7 +843,7 @@ test('Request data is correctly de-sanitized to be sent', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { postProductWithId: { @@ -871,7 +871,7 @@ test('Fields with arbitrary JSON (e.g., maps) can be returned', () => { } }` - const promise = graphql(createdSchema, query, null, {}).then((result) => { + const promise = graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { cars: [ @@ -899,7 +899,7 @@ test('Fields with arbitrary JSON (e.g., maps) can be returned', () => { }) }) - const promise2 = graphql(createdSchema, query2, null, {}).then((result) => { + const promise2 = graphql(createdSchema, query2, null, {}).then(result => { expect(result).toEqual({ data: { cars: [ @@ -932,7 +932,7 @@ test('Capitalized enum values can be returned', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { car: { @@ -950,7 +950,7 @@ test('Enum values that started as numbers in OAS can be returned as strings', () } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { car: { @@ -981,7 +981,7 @@ test('Define header and query options', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { status2: 'Ok' @@ -1002,7 +1002,7 @@ test('Resolve simple allOf', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { user: { @@ -1030,7 +1030,7 @@ test('Resolve ref in allOf', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { user: { @@ -1059,7 +1059,7 @@ test('Resolve nested allOf', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { user: { @@ -1088,9 +1088,9 @@ test('Resolve circular allOf', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect( - result.data['__type']['fields'].find((field) => { + result.data['__type']['fields'].find(field => { return field.name === 'familyCircular' }) ).toEqual({ @@ -1113,7 +1113,7 @@ test('Resolve oneOf, which becomes a union type', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { type carType = { name: string description: string @@ -1164,7 +1164,7 @@ test('Union type', () => { } }` - return graphql(createdSchema, query, null, {}).then((result) => { + return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { asset: [ @@ -1226,7 +1226,7 @@ test('Error contains extension', () => { } }` - return graphql(createdSchema, query, null, {}).then((error) => { + return graphql(createdSchema, query, null, {}).then(error => { const extensions = error.errors[0].extensions expect(extensions).toBeDefined() @@ -1260,7 +1260,7 @@ test('Option provideErrorExtensions should prevent error extensions from being c const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ errors: [ { @@ -1309,7 +1309,7 @@ test('Option customResolver', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -1357,7 +1357,7 @@ test('Option customResolver with links', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -1404,7 +1404,7 @@ test('Option customResolver using resolver arguments', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -1444,7 +1444,7 @@ test('Option customResolver using resolver arguments that are sanitized', () => const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { productWithId: { @@ -1482,7 +1482,7 @@ test('Option addLimitArgument', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { user: { @@ -1567,7 +1567,7 @@ test('Content property in parameter object', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { coordinates: { @@ -1590,7 +1590,7 @@ test('Handle objects without defined properties with arbitrary GraphQL JSON type } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { trashcan: { @@ -1656,7 +1656,7 @@ test('Handle input objects without defined properties with arbitrary GraphQL JSO } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { postOfficeTrashCan: { @@ -1691,7 +1691,7 @@ test('Operation returning arbitrary JSON type should not include _openAPIToGraph * There should only be the random and status fields but no _openAPIToGraphQL * field. */ - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { random: { @@ -1736,24 +1736,24 @@ test('Generate "Equivalent to..." messages', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { // Make sure all query fields have the message expect( - result.data['__schema']['queryType']['fields'].every((field) => { + result.data['__schema']['queryType']['fields'].every(field => { return field.description.includes('\n\nEquivalent to GET ') }) ).toBe(true) // Make sure all mutation fields have the message expect( - result.data['__schema']['mutationType']['fields'].every((field) => { + result.data['__schema']['mutationType']['fields'].every(field => { return field.description.includes('\n\nEquivalent to ') }) ).toBe(true) // Check full message on a particular field expect( - result.data['__schema']['queryType']['fields'].find((field) => { + result.data['__schema']['queryType']['fields'].find(field => { return field.type.name === 'Car' }) ).toEqual({ @@ -1778,9 +1778,9 @@ test('Generate "Equivalent to..." messages', () => { } }` - const promise2 = graphql(createdSchema, query2).then((result) => { + const promise2 = graphql(createdSchema, query2).then(result => { expect( - result.data['__type']['fields'].find((field) => { + result.data['__type']['fields'].find(field => { return field.type.name === 'Company' }) ).toEqual({ @@ -1830,15 +1830,15 @@ test('Withhold "Equivalent to..." messages', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__schema']['queryType']['fields'].every((field) => { + result.data['__schema']['queryType']['fields'].every(field => { return field.description.includes('\n\nEquivalent to GET ') }) ).toBe(false) expect( - result.data['__schema']['mutationType']['fields'].every((field) => { + result.data['__schema']['mutationType']['fields'].every(field => { return field.description.includes('\n\nEquivalent to ') }) ).toBe(false) @@ -1863,9 +1863,9 @@ test('Withhold "Equivalent to..." messages', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query2).then((result) => { + return graphql(schema, query2).then(result => { expect( - result.data['__type']['fields'].find((field) => { + result.data['__type']['fields'].find(field => { return field.type.name === 'Company' }) ).toEqual({ @@ -1893,9 +1893,9 @@ test('UUID format becomes GraphQL ID type', () => { } }` - return graphql(createdSchema, query).then((result) => { + return graphql(createdSchema, query).then(result => { expect( - result.data['__type'].fields.find((field) => { + result.data['__type'].fields.find(field => { return field.name === 'id' }) ).toEqual({ @@ -1935,9 +1935,9 @@ test('Option idFormats', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__type'].fields.find((field) => { + result.data['__type'].fields.find(field => { return field.name === 'patentId' }) ).toEqual({ @@ -1985,9 +1985,9 @@ test('Option selectQueryOrMutationField', () => { }` // The users field should exist as a Query field - const promise = graphql(createdSchema, query).then((result) => { + const promise = graphql(createdSchema, query).then(result => { expect( - result.data['__schema'].queryType.fields.find((field) => { + result.data['__schema'].queryType.fields.find(field => { return field.name === 'user' }) ).toEqual({ @@ -1997,7 +1997,7 @@ test('Option selectQueryOrMutationField', () => { }) expect( - result.data['__schema'].mutationType.fields.find((field) => { + result.data['__schema'].mutationType.fields.find(field => { return field.name === 'user' }) ).toEqual(undefined) @@ -2020,15 +2020,15 @@ test('Option selectQueryOrMutationField', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__schema'].queryType.fields.find((field) => { + result.data['__schema'].queryType.fields.find(field => { return field.name === 'getUserByUsername' }) ).toEqual(undefined) expect( - result.data['__schema'].mutationType.fields.find((field) => { + result.data['__schema'].mutationType.fields.find(field => { return field.name === 'getUserByUsername' }) ).toEqual({ @@ -2070,9 +2070,9 @@ test('Header arguments are not created when they are provided through headers op const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__schema'].queryType.fields.find((field) => { + result.data['__schema'].queryType.fields.find(field => { return field.name === 'snack' }) ).toEqual({ @@ -2114,9 +2114,9 @@ test('Header arguments are not created when they are provided through requestOpt const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__schema'].queryType.fields.find((field) => { + result.data['__schema'].queryType.fields.find(field => { return field.name === 'snack' }) ).toEqual({ @@ -2155,9 +2155,9 @@ test('Query string arguments are not created when they are provided through qs o const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__schema'].queryType.fields.find((field) => { + result.data['__schema'].queryType.fields.find(field => { return field.name === 'users' }) ).toEqual({ @@ -2175,7 +2175,7 @@ test('Query string arguments are not created when they are provided through requ } }` - const promise = graphql(createdSchema, query, null, {}).then((result) => { + const promise = graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { users: [ @@ -2218,7 +2218,7 @@ test('Query string arguments are not created when they are provided through requ const ast = parse(query2) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query2).then((result) => { + return graphql(schema, query2).then(result => { expect(result).toEqual({ data: { users: [ @@ -2265,7 +2265,7 @@ test('Use headers option as function', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { snack: 'Here is a small chips' @@ -2300,7 +2300,7 @@ test('Use requestOptions headers option as function', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect(result).toEqual({ data: { snack: 'Here is a small chips' @@ -2333,9 +2333,9 @@ test('Option genericPayloadArgName', () => { }` // The postUser field should have a userInput argument - const promise = graphql(createdSchema, query).then((result) => { + const promise = graphql(createdSchema, query).then(result => { expect( - result.data['__schema'].mutationType.fields.find((field) => { + result.data['__schema'].mutationType.fields.find(field => { return field.name === 'postUser' }) ).toEqual({ @@ -2359,9 +2359,9 @@ test('Option genericPayloadArgName', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__schema'].mutationType.fields.find((field) => { + result.data['__schema'].mutationType.fields.find(field => { return field.name === 'postUser' }) ).toEqual({ @@ -2399,9 +2399,9 @@ test('Non-nullable properties from nested allOf', () => { const ast = parse(query) const errors = validate(schema, ast) expect(errors).toEqual([]) - return graphql(schema, query).then((result) => { + return graphql(schema, query).then(result => { expect( - result.data['__type'].fields.find((field) => { + result.data['__type'].fields.find(field => { return field.name === 'family' }) ).toEqual({ diff --git a/packages/openapi-to-graphql/test/example_api7.test.ts b/packages/openapi-to-graphql/test/example_api7.test.ts index b0ada5c5..3a9cc838 100644 --- a/packages/openapi-to-graphql/test/example_api7.test.ts +++ b/packages/openapi-to-graphql/test/example_api7.test.ts @@ -78,7 +78,7 @@ beforeAll(() => { } ) }) - .catch((e) => { + .catch(e => { console.log('error', e) }), startServers(HTTP_PORT, MQTT_PORT) @@ -86,7 +86,7 @@ beforeAll(() => { }) function sleep(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)) + return new Promise(resolve => setTimeout(resolve, ms)) } /** @@ -132,7 +132,7 @@ test('Receive data from the subscription after creating a new instance', () => { `ws://localhost:${TEST_PORT}/subscriptions` ) - client.onError((e) => reject(e)) + client.onError(e => reject(e)) client .request({ @@ -146,7 +146,7 @@ test('Receive data from the subscription after creating a new instance', () => { } }) .subscribe({ - next: (result) => { + next: result => { if (result.errors) { reject(result.errors) } @@ -162,7 +162,7 @@ test('Receive data from the subscription after creating a new instance', () => { resolve() } }, - error: (e) => reject(e) + error: e => reject(e) }) setTimeout(() => { @@ -173,7 +173,7 @@ test('Receive data from the subscription after creating a new instance', () => { status: false } }) - .then((res) => { + .then(res => { if (!res.data) { reject(new Error('Failed mutation')) } diff --git a/packages/openapi-to-graphql/test/example_api_server.js b/packages/openapi-to-graphql/test/example_api_server.js index ec62d6da..988bad9d 100644 --- a/packages/openapi-to-graphql/test/example_api_server.js +++ b/packages/openapi-to-graphql/test/example_api_server.js @@ -391,7 +391,7 @@ function startServer(PORT) { app.get('/api/users/:username/friends', (req, res) => { if (req.params.username in Users) { - const friends = Users[req.params.username].friends.map((friendName) => { + const friends = Users[req.params.username].friends.map(friendName => { return Users[friendName] }) @@ -479,11 +479,17 @@ function startServer(PORT) { }) app.get('/api/cleanDesks', (req, res) => { - res.set('Content-Type', 'text/plain').status(200).send('5 clean desks') + res + .set('Content-Type', 'text/plain') + .status(200) + .send('5 clean desks') }) app.get('/api/dirtyDesks', (req, res) => { - res.set('Content-Type', 'text/plain').status(200).send('5 dirty desks') + res + .set('Content-Type', 'text/plain') + .status(200) + .send('5 dirty desks') }) app.get('/api/bonuses', (req, res) => { @@ -586,7 +592,7 @@ function startServer(PORT) { app.get('/api/patents/:id', authMiddleware, (req, res) => { // Find patent based off of patent ID - const patent = Object.values(Patents).find((currentPatent) => { + const patent = Object.values(Patents).find(currentPatent => { return currentPatent['patent-id'] === req.params.id }) @@ -611,7 +617,7 @@ function startServer(PORT) { app.get('/api/projects/:id', authMiddleware, (req, res) => { // Find project based off of projectId - const project = Object.values(Projects).find((currentProject) => { + const project = Object.values(Projects).find(currentProject => { return currentProject.projectId === Number(req.params.id) }) @@ -648,7 +654,10 @@ function startServer(PORT) { typeof req.query.limit !== 'undefined' && typeof req.get('exampleHeader') !== 'undefined' ) { - res.set('Content-Type', 'text/plain').status(200).send('Ok') + res + .set('Content-Type', 'text/plain') + .status(200) + .send('Ok') } else { res.status(400).send({ message: 'wrong request' @@ -711,7 +720,7 @@ function startServer(PORT) { res.status(200).send({ status: 'success' }) }) - return new Promise((resolve) => { + return new Promise(resolve => { server = app.listen(PORT, () => { console.log(`Example API accessible on port ${PORT}`) resolve() @@ -723,7 +732,7 @@ function startServer(PORT) { * Stops server. */ function stopServer() { - return new Promise((resolve) => { + return new Promise(resolve => { server.close(() => { console.log(`Stopped API server`) resolve() diff --git a/packages/openapi-to-graphql/test/example_gql_server.js b/packages/openapi-to-graphql/test/example_gql_server.js index 55c728bb..49a254b6 100644 --- a/packages/openapi-to-graphql/test/example_gql_server.js +++ b/packages/openapi-to-graphql/test/example_gql_server.js @@ -47,6 +47,6 @@ openAPIToGraphQL console.log('GraphQL accessible at: http://localhost:3000/graphql') }) }) - .catch((err) => { + .catch(err => { console.log(err) }) diff --git a/packages/openapi-to-graphql/test/example_gql_server_ws.js b/packages/openapi-to-graphql/test/example_gql_server_ws.js index 2f294262..88d70986 100644 --- a/packages/openapi-to-graphql/test/example_gql_server_ws.js +++ b/packages/openapi-to-graphql/test/example_gql_server_ws.js @@ -70,6 +70,6 @@ openAPIToGraphQL ) }) }) - .catch((err) => { + .catch(err => { console.log(err) })