diff --git a/jest.config.ts b/jest.config.ts index d09cdd2..7bf1dc5 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -5,10 +5,9 @@ import inspector from 'inspector'; const testTimeout = inspector.url() ? 1e8 : 10e3; const config: Config.InitialOptions = { - preset: '@lifeomic/jest-config', testEnvironment: 'node', transform: { - '^.+\\.tsx?$': [ + '^.+\\.(j|t)s$': [ '@swc/jest', { jsc: { target: 'es2019' }, @@ -35,6 +34,8 @@ const config: Config.InitialOptions = { verbose: true, maxWorkers: '50%', testTimeout, + // need to transform imported js file using ESM + transformIgnorePatterns: ['/node_modules/(?!(axios)/)'], }; export default config; diff --git a/package.json b/package.json index 8639de4..4550491 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,8 @@ "clean": "yarn tsc --build --clean" }, "devDependencies": { - "@lifeomic/eslint-config-standards": "^3.0.0", - "@lifeomic/jest-config": "^1.1.2", - "@lifeomic/typescript-config": "^1.0.3", + "@lifeomic/eslint-config-standards": "3.0.0", + "@lifeomic/typescript-config": "^3.1.0", "@swc/core": "^1.2.207", "@swc/jest": "^0.2.21", "@types/jest": "^28.1.3", @@ -42,7 +41,6 @@ "@types/uuid": "^8.3.4", "aws-sdk-client-mock": "^1.0.0", "conventional-changelog-conventionalcommits": "^4.0.0", - "coveralls": "^3.1.0", "eslint": "^8.18.0", "jest": "^28.1.2", "jest-mock-extended": "^2.0.6", @@ -60,7 +58,7 @@ "@aws-sdk/signature-v4": "^3.110.0", "@aws-sdk/url-parser": "^3.357.0", "@types/aws-lambda": "^8.10.101", - "axios": "^0.27.2", + "axios": "^1.6.0", "lodash": "^4.17.21", "nearley": "2", "url-parse": "^1.5.10", diff --git a/src/adapters/helpers/apiGateway.ts b/src/adapters/helpers/apiGateway.ts index 3c0e85d..60d1c09 100644 --- a/src/adapters/helpers/apiGateway.ts +++ b/src/adapters/helpers/apiGateway.ts @@ -1,4 +1,4 @@ -import { AxiosRequestHeaders } from 'axios'; +import { RawAxiosRequestHeaders } from 'axios'; import { APIGatewayProxyEvent } from 'aws-lambda'; /** @@ -7,7 +7,7 @@ import { APIGatewayProxyEvent } from 'aws-lambda'; * https://github.com/apollographql/apollo-server/issues/5504 */ export type ToProxyHeaders = Pick; -export const toProxyHeaders = (headers: AxiosRequestHeaders = {}): ToProxyHeaders => { +export const toProxyHeaders = (headers: RawAxiosRequestHeaders = {}): ToProxyHeaders => { const response: ToProxyHeaders = { multiValueHeaders: {}, headers: {}, diff --git a/src/adapters/helpers/chainAdapters.ts b/src/adapters/helpers/chainAdapters.ts index 07621e0..62ccfd2 100644 --- a/src/adapters/helpers/chainAdapters.ts +++ b/src/adapters/helpers/chainAdapters.ts @@ -1,14 +1,14 @@ -import axios, { AxiosAdapter } from 'axios'; -import type { AlphaOptions, AlphaAdapter } from '../../types'; +import axios, { getAdapter } from 'axios'; +import type { InternalAlphaRequestConfig, AlphaAdapter } from '../../types'; -export type Predicate = (config: AlphaOptions) => any; +export type Predicate = (config: InternalAlphaRequestConfig) => any; export const chainAdapters = ( - config: AlphaOptions, + config: InternalAlphaRequestConfig, predicate: Predicate, adapter: AlphaAdapter, ) => { - const nextAdapter = config.adapter || axios.defaults.adapter as AxiosAdapter; + const nextAdapter = getAdapter(config.adapter || axios.defaults.adapter); config.adapter = async (config) => { if (predicate(config)) { diff --git a/src/adapters/helpers/lambdaResponse.ts b/src/adapters/helpers/lambdaResponse.ts index 7933d93..74a4679 100644 --- a/src/adapters/helpers/lambdaResponse.ts +++ b/src/adapters/helpers/lambdaResponse.ts @@ -2,10 +2,10 @@ import http from 'http'; import { RequestError } from './requestError'; import { TextEncoder } from 'util'; -import type { AlphaOptions } from '../../types'; +import type { AlphaOptions, InternalAlphaRequestConfig } from '../../types'; import type { InvocationRequest } from '@aws-sdk/client-lambda'; import type { AxiosResponse } from 'axios'; -import { HandlerRequest } from '../../types'; +import { type AlphaResponse, HandlerRequest } from '../../types'; export interface Payload { body: string; @@ -24,13 +24,13 @@ const payloadToData = (config: AlphaOptions, payload: Payload) => { }; export const lambdaResponse = ( - config: AlphaOptions, + config: InternalAlphaRequestConfig, request: InvocationRequest | HandlerRequest, payload: Payload, -): AxiosResponse => { +): AlphaResponse => { const data = payloadToData(config, payload); - const response: AxiosResponse = { + const response: AlphaResponse = { config, data, headers: payload.headers, diff --git a/src/adapters/helpers/requestError.ts b/src/adapters/helpers/requestError.ts index a6bb0fe..bc98853 100644 --- a/src/adapters/helpers/requestError.ts +++ b/src/adapters/helpers/requestError.ts @@ -1,11 +1,11 @@ import { InvocationRequest, InvocationResponse } from '@aws-sdk/client-lambda'; -import { HandlerRequest, AlphaOptions } from '../../types'; -import { AxiosError, AxiosResponse } from 'axios'; +import { HandlerRequest } from '../../types'; +import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; -export const isAxiosError = (err: any | AxiosError): err is AxiosError => +export const isAxiosError = (err: any): err is AxiosError => (typeof err === 'object') && !!err.isAxiosError; -export const isAlphaRequestError = (err: any | RequestError): err is RequestError => +export const isAlphaRequestError = (err: any): err is RequestError => (typeof err === 'object') && !!err.isAlphaRequestError; export class RequestError extends Error implements Omit { @@ -15,7 +15,7 @@ export class RequestError extends Error implements Omit { try { const result = await handler(request.event, request.context as Context) as Payload; return lambdaResponse(config, request, result); - } catch (error: any | Error) { + } catch (error: any) { throw new RequestError(error.message as string, config, request, error.response as AxiosResponse); } }; -const lambdaHandlerRequestInterceptor = (config: AlphaOptions) => chainAdapters( +const lambdaHandlerRequestInterceptor = (config: InternalAlphaRequestConfig) => chainAdapters( config, (config) => !isAbsoluteURL(config.url as string) && config.lambda, lambdaHandlerAdapter, diff --git a/src/adapters/lambda-invocation.ts b/src/adapters/lambda-invocation.ts index d34362a..05e188b 100644 --- a/src/adapters/lambda-invocation.ts +++ b/src/adapters/lambda-invocation.ts @@ -6,7 +6,7 @@ import { lambdaEvent } from './helpers/lambdaEvent'; import { lambdaResponse, Payload } from './helpers/lambdaResponse'; import { parseLambdaUrl, isAbsoluteURL } from '../utils/url'; import { RequestError } from './helpers/requestError'; -import { AlphaOptions, AlphaAdapter } from '../types'; +import { InternalAlphaRequestConfig, AlphaAdapter } from '../types'; import { Alpha } from '../alpha'; import { AbortController } from '@aws-sdk/abort-controller'; @@ -101,7 +101,7 @@ const lambdaInvocationAdapter: AlphaAdapter = async (config) => { return lambdaResponse(config, request, payload); }; -const lambdaInvocationRequestInterceptor = (config: AlphaOptions) => { +const lambdaInvocationRequestInterceptor = (config: InternalAlphaRequestConfig) => { return chainAdapters( config, (config) => (config.url as string).startsWith('lambda:') || (config.baseURL?.startsWith('lambda:')), diff --git a/src/adapters/response-retry.ts b/src/adapters/response-retry.ts index 673dddf..f1a52b4 100644 --- a/src/adapters/response-retry.ts +++ b/src/adapters/response-retry.ts @@ -1,9 +1,10 @@ import isBoolean from 'lodash/isBoolean'; import defaults from 'lodash/defaults'; +import _get from 'lodash/get'; +import _inRange from 'lodash/inRange'; import { RequestError } from './helpers/requestError'; import type { AlphaOptions } from '../types'; import type { Alpha } from '../alpha'; -import { AxiosError } from 'axios'; export interface RetryOptions { attempts: number; @@ -17,11 +18,20 @@ export interface RetryAlphaOptions extends Omit { retry: RetryOptions; } -const isRetryableError = (error: any | RequestError) => { +const isServerSideError = (error: RequestError) => { + return ( + error.response + && ( + _inRange(_get(error.response, 'StatusCode', 0) as number, 500, 600) + || _inRange(_get(error.response, 'status', 0) as number, 500, 600) + ) + ); +}; + +const isRetryableError = (error: RequestError) => { if (error.isLambdaInvokeTimeout) return true; - return error.code !== 'ECONNABORTED' && - (!error.response || (error.response.status >= 500 && error.response.status <= 599)); + return error.code !== 'ECONNABORTED' && isServerSideError(error); }; const DEFAULTS = { @@ -57,7 +67,7 @@ const exponentialBackoff = (config: RetryAlphaOptions) => { export const setup = (client: Alpha) => { client.interceptors.response.use( undefined, - async (err: any | AxiosError) => { + async (err: any) => { if (!('config' in err && err.config.retry)) { return Promise.reject(err); } diff --git a/src/alpha.ts b/src/alpha.ts index 4f7329b..74f3b0a 100644 --- a/src/alpha.ts +++ b/src/alpha.ts @@ -1,7 +1,7 @@ import pick from 'lodash/pick'; import merge from 'lodash/merge'; -import axios, { Axios, AxiosAdapter, AxiosResponse } from 'axios'; +import axios, { Axios, AxiosAdapter, AxiosHeaders, AxiosResponse } from 'axios'; import cloneDeep from 'lodash/cloneDeep'; import { AlphaOptions, AlphaResponse, HandlerRequest } from './types'; import { Handler } from 'aws-lambda'; @@ -35,7 +35,7 @@ export class Alpha extends Axios { constructor(target: string | Handler) constructor(target: string | Handler, config: AlphaOptions) constructor (...[target, config]: ConstructorArgs) { - const tmpOptions: AlphaOptions = {}; + const tmpOptions: AlphaOptions = { headers: new AxiosHeaders() }; if (typeof target === 'object') { Object.assign(tmpOptions, target); } else if (typeof target === 'string') { @@ -75,12 +75,12 @@ export class Alpha extends Axios { if (castResp.status === 301 || castResp.status === 302) { if (maxRedirects === 0) { const request = castResp.request as InvocationRequest | HandlerRequest; - throw new RequestError('Exceeded maximum number of redirects.', castResp.config, request, response); + throw new RequestError('Exceeded maximum number of redirects.', castResp.config, request, castResp); } const redirect = cloneDeep(config); redirect.maxRedirects = maxRedirects - 1; - redirect.url = resolve(castResp.headers.location, castResp.config.url as string); + redirect.url = resolve(castResp.headers.location as string, castResp.config.url); return this.request(redirect); } @@ -88,7 +88,7 @@ export class Alpha extends Axios { } get, D = any>(url: string, config?: AlphaOptions): Promise { - return super.get(url, config); + return super.get(url, config); } delete, D = any>(url: string, config?: AlphaOptions): Promise { return super.delete(url, config); diff --git a/src/interceptors/aws-v4-signature.ts b/src/interceptors/aws-v4-signature.ts index e2c9d25..f2a75c9 100644 --- a/src/interceptors/aws-v4-signature.ts +++ b/src/interceptors/aws-v4-signature.ts @@ -6,10 +6,9 @@ import { HttpRequest, HeaderBag, } from '@aws-sdk/types'; - -import buildURL from 'axios/lib/helpers/buildURL'; -import transformData from 'axios/lib/core/transformData'; -import buildFullPath from 'axios/lib/core/buildFullPath'; +import buildURL from 'axios/unsafe/helpers/buildURL.js'; +import transformData from 'axios/unsafe/core/transformData.js'; +import buildFullPath from 'axios/unsafe/core/buildFullPath.js'; import type { Alpha } from '../alpha'; import type { AlphaInterceptor, AlphaOptions } from '../types'; @@ -37,7 +36,7 @@ const unsignableHeaders = new Set([ ]); const combineParams = (url: string, { params, paramsSerializer }: AlphaOptions): HttpRequest['query'] => { - const fullUrl = buildURL(url, params, paramsSerializer); + const fullUrl: string = buildURL(url, params, paramsSerializer); const { query } = parseUrl(fullUrl); return query; }; @@ -55,7 +54,7 @@ const awsV4Signature: AlphaInterceptor = async (config) => { return config; } - let fullPath = buildFullPath(config.baseURL, config.url); + let fullPath: string = buildFullPath(config.baseURL, config.url); if (isLambdaUrl(fullPath)) { const lambdaUrl = parseLambdaUrl(fullPath) as LambdaUrl; fullPath = `lambda://${lambdaUrl.name}${lambdaUrl.path}`; diff --git a/src/resolve.ts b/src/resolve.ts index 16f28db..9c848ad 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -7,11 +7,15 @@ import { isAbsoluteURL, LambdaUrl, parseLambdaUrl } from './utils/url'; import { URL } from 'url'; -export const resolve = (url: string, base: string) => { +export const resolve = (url: string, base?: string) => { if (isAbsoluteURL(url)) { return url; } + if (!base) { + return url; + } + let lambdaParts = parseLambdaUrl(base); if (!lambdaParts) { diff --git a/src/types.ts b/src/types.ts index 6d15e2a..7c94db8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import type { AxiosPromise, AxiosRequestConfig, AxiosResponse } from 'axios'; +import type { AxiosPromise, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; import type { Lambda } from '@aws-sdk/client-lambda'; import type { Context, Handler } from 'aws-lambda'; import { SignatureV4CryptoInit, SignatureV4Init } from '@aws-sdk/signature-v4'; @@ -13,10 +13,6 @@ export interface RetryOptions { type SignatureV4Constructor = SignatureV4Init & SignatureV4CryptoInit; type SignatureV4Optionals = 'credentials' | 'region' | 'sha256' | 'service'; -export interface AlphaResponse extends AxiosResponse { - config: AlphaOptions; -} - export type SignAwsV4Config = & Omit & Partial>; @@ -33,8 +29,14 @@ export interface AlphaOptions extends AxiosRequestConfig { Lambda?: typeof Lambda; } -export type AlphaAdapter = (config: AlphaOptions) => AxiosPromise; -export type AlphaInterceptor = (config: AlphaOptions) => (Promise | AlphaOptions); +export type InternalAlphaRequestConfig = AlphaOptions & InternalAxiosRequestConfig; + +export type AlphaAdapter = (config: InternalAlphaRequestConfig) => AxiosPromise; +export type AlphaInterceptor = (config: InternalAlphaRequestConfig) => (Promise | InternalAlphaRequestConfig); + +export interface AlphaResponse extends AxiosResponse { + config: InternalAlphaRequestConfig; +} export interface HandlerRequest> { event: T; diff --git a/test/adapters/helpers/apiGateway.test.ts b/test/adapters/helpers/apiGateway.test.ts index 46d586a..4dd647e 100644 --- a/test/adapters/helpers/apiGateway.test.ts +++ b/test/adapters/helpers/apiGateway.test.ts @@ -2,17 +2,16 @@ import { ToProxyHeaders, toProxyHeaders } from '../../../src/adapters/helpers/ap import { v4 as uuid } from 'uuid'; import { AxiosRequestHeaders } from 'axios'; +// TODO support the use case that request header value could be undefined/null test('will convert header values', () => { expect(toProxyHeaders()).toEqual({ multiValueHeaders: {}, headers: {} }); const multiStringHeader = [uuid(), ` ${uuid()}`, `${uuid()} `, uuid()]; + // @ts-expect-error undefined is not allowed as header value, but it works const input: AxiosRequestHeaders = { stringHeader: uuid(), multiStringHeader: multiStringHeader.join(','), - // @ts-ignore numberHeader: 123456, - // @ts-ignore booleanHeader: true, - // @ts-ignore undefinedHeader: undefined, }; diff --git a/test/adapters/helpers/chainAdapters.test.ts b/test/adapters/helpers/chainAdapters.test.ts index 730f07e..dabdc35 100644 --- a/test/adapters/helpers/chainAdapters.test.ts +++ b/test/adapters/helpers/chainAdapters.test.ts @@ -1,17 +1,19 @@ -import axios from 'axios'; +import axios, { AxiosHeaders, getAdapter } from 'axios'; import { chainAdapters } from '../../../src/adapters/helpers/chainAdapters'; import { AlphaAdapter } from '../../../src'; -test('will set default adapter', () => { +test('will set default adapter', async () => { const adapter: AlphaAdapter = jest.fn(); const defaultAdapter = axios.defaults.adapter = jest.fn(); const config = chainAdapters( - {}, + { headers: new AxiosHeaders() }, () => false, adapter, ); - expect(defaultAdapter).not.toBeCalled(); - expect(() => config.adapter!(config)).not.toThrow(); - expect(defaultAdapter).toBeCalled(); - expect(adapter).not.toBeCalled(); + expect(defaultAdapter).not.toHaveBeenCalled(); + + expect(config.adapter).toHaveLength(1); // an array of adapters + await expect(getAdapter(config.adapter)(config)).resolves.toBeUndefined(); + expect(defaultAdapter).toHaveBeenCalled(); + expect(adapter).not.toHaveBeenCalled(); }); diff --git a/test/alpha.test.ts b/test/alpha.test.ts index 82b14cc..c06621c 100644 --- a/test/alpha.test.ts +++ b/test/alpha.test.ts @@ -31,27 +31,27 @@ test('constructor types', () => { test('overloaded method signatures', async () => { const path = `/${uuid()}`; handler.mockResolvedValue(response); - const options: AlphaOptions = {}; + const options: AlphaOptions = config; const data = {}; const alpha = new Alpha(handler); - await expect(alpha.get(path, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'GET' }), expect.any(Object), expect.any(Function)); + await expect(alpha.get(path, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'GET' }), expect.any(Object), expect.any(Function)); - await expect(alpha.delete(path, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'DELETE' }), expect.any(Object), expect.any(Function)); + await expect(alpha.delete(path, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'DELETE' }), expect.any(Object), expect.any(Function)); - await expect(alpha.head(path, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'HEAD' }), expect.any(Object), expect.any(Function)); + await expect(alpha.head(path, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'HEAD' }), expect.any(Object), expect.any(Function)); - await expect(alpha.options(path, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'OPTIONS' }), expect.any(Object), expect.any(Function)); + await expect(alpha.options(path, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'OPTIONS' }), expect.any(Object), expect.any(Function)); - await expect(alpha.post(path, data, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'POST' }), expect.any(Object), expect.any(Function)); + await expect(alpha.post(path, data, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'POST' }), expect.any(Object), expect.any(Function)); - await expect(alpha.put(path, data, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'PUT' }), expect.any(Object), expect.any(Function)); + await expect(alpha.put(path, data, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'PUT' }), expect.any(Object), expect.any(Function)); - await expect(alpha.patch(path, data, options)).resolves.toEqual(expect.objectContaining(expected)); - expect(handler).toBeCalledWith(expect.objectContaining({ path, httpMethod: 'PATCH' }), expect.any(Object), expect.any(Function)); + await expect(alpha.patch(path, data, options)).resolves.toMatchObject(expected); + expect(handler).toHaveBeenCalledWith(expect.objectContaining({ path, httpMethod: 'PATCH' }), expect.any(Object), expect.any(Function)); }); diff --git a/test/http.test.ts b/test/http.test.ts index 78689cd..ecf91af 100644 --- a/test/http.test.ts +++ b/test/http.test.ts @@ -1,3 +1,4 @@ +import { AxiosHeaders } from 'axios'; import { Alpha } from '../src'; import nock from 'nock'; @@ -24,7 +25,7 @@ test('Making a GET request with the http protocol performs a normal HTTP request expect(response.data).toBe('hello!'); expect(response.status).toBe(200); - expect(response.headers).toEqual({ 'test-header': 'some value' }); + expect(response.headers).toEqual(new AxiosHeaders({ 'test-header': 'some value' })); expect(server.isDone()).toBe(true); }); @@ -40,7 +41,7 @@ test('Making a GET request with the https protocol performs a normal HTTPS reque expect(response.data).toBe('hello!'); expect(response.status).toBe(200); - expect(response.headers).toEqual({ 'test-header': 'some value' }); + expect(response.headers).toEqual(new AxiosHeaders({ 'test-header': 'some value' })); expect(server.isDone()).toBe(true); }); diff --git a/test/interceptors/aws-v4-signature.test.ts b/test/interceptors/aws-v4-signature.test.ts index 4066d62..d5d369d 100644 --- a/test/interceptors/aws-v4-signature.test.ts +++ b/test/interceptors/aws-v4-signature.test.ts @@ -21,6 +21,7 @@ const expectedResponse = { status: response.statusCode, statusText: 'OK', headers: response.headers, + config: expect.anything(), }; const credentials: Credentials = { @@ -54,23 +55,22 @@ test.each([ } = {}, ) => { await expect(alpha.get(path, { signAwsV4, ...options })).resolves - .toEqual(expect.objectContaining(expectedResponse)); + .toMatchObject(expectedResponse); - expect(handler).toBeCalledWith(matchingObj, expect.any(Object), expect.any(Function)); + expect(handler).toHaveBeenCalledWith(matchingObj, expect.any(Object), expect.any(Function)); }); test('will get port', async () => { const alpha = new Alpha(handler, { baseURL: 'https://www.lifeomic.com:80' }); await expect(alpha.get(path, { signAwsV4: {} })).resolves - .toEqual(expect.objectContaining(expectedResponse)); + .toMatchObject(expectedResponse); - expect(handler).toBeCalledWith(matchingObj, expect.any(Object), expect.any(Function)); + expect(handler).toHaveBeenCalledWith(matchingObj, expect.any(Object), expect.any(Function)); }); test('will not sign requests without config', async () => { const alpha = new Alpha(handler); - await expect(alpha.get(path)).resolves - .toEqual(expect.objectContaining(expectedResponse)); + await expect(alpha.get(path)).resolves.toMatchObject(expectedResponse); - expect(handler).not.toBeCalledWith(matchingObj, expect.any(Object), expect.any(Function)); + expect(handler).not.toHaveBeenCalledWith(matchingObj, expect.any(Object), expect.any(Function)); }); diff --git a/test/lambda-handler.test.ts b/test/lambda-handler.test.ts index 1d9d396..1bcd182 100644 --- a/test/lambda-handler.test.ts +++ b/test/lambda-handler.test.ts @@ -1,9 +1,10 @@ import { Alpha } from '../src'; import nock from 'nock'; import { Handler } from 'aws-lambda'; +import { AxiosHeaders } from 'axios'; const response = { - headers: { 'test-header': 'some value' }, + headers: new AxiosHeaders({ 'test-header': 'some value' }), body: 'hello!', statusCode: 200, }; @@ -121,7 +122,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { expect(result.headers).toEqual(response.headers); expect(result.data).toBe(response.body); - expect(ctx.handler).toBeCalledWith(expect.objectContaining(event), expect.any(Object), expect.any(Function)); + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining(event), expect.any(Object), expect.any(Function)); }); test(`Making a POST request to a local handler invokes the handler (callbackStyle=${isCallbackStyleHandler})`, async () => { @@ -152,7 +153,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { multiValueHeaders: expect.any(Object), }; - expect(ctx.handler).toBeCalledWith(expect.objectContaining(event), expect.any(Object), expect.any(Function)); + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining(event), expect.any(Object), expect.any(Function)); }); test(`When a local handler returns an error the request fails (callbackStyle=${isCallbackStyleHandler})`, async () => { @@ -180,7 +181,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { expect(error.request.event.queryStringParameters).toEqual({}); expect(Object.keys(error as Object).includes('code')).toBe(false); - expect(ctx.handler).toBeCalled(); + expect(ctx.handler).toHaveBeenCalled(); }); test(`When status validation is disable errors are not thrown (callbackStyle=${isCallbackStyleHandler})`, async () => { @@ -228,7 +229,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { expect(result.status).toBe(200); expect(result.data).toBe(response.body); - expect(ctx.handler).toBeCalledWith(expect.objectContaining({ + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining({ body: '', headers: expect.any(Object), httpMethod: 'GET', @@ -239,7 +240,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { requestId: expect.any(String), }), }), expect.any(Object), expect.any(Function)); - expect(ctx.handler).toBeCalledWith(expect.objectContaining({ + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining({ body: '', headers: expect.any(Object), httpMethod: 'GET', @@ -279,7 +280,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { expect(result.status).toBe(200); expect(result.data).toBe(response.body); - expect(ctx.handler).toBeCalledWith(expect.objectContaining({ + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining({ body: '', headers: expect.any(Object), httpMethod: 'GET', @@ -290,7 +291,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { requestId: expect.any(String), }), }), expect.any(Object), expect.any(Function)); - expect(ctx.handler).toBeCalledWith(expect.objectContaining({ + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining({ body: '', headers: expect.any(Object), httpMethod: 'GET', @@ -332,7 +333,7 @@ const registerSpecs = (isCallbackStyleHandler: boolean) => { }), }; - expect(ctx.handler).toBeCalledWith(expect.objectContaining(event), expect.any(Object), expect.any(Function)); + expect(ctx.handler).toHaveBeenCalledWith(expect.objectContaining(event), expect.any(Object), expect.any(Function)); }); test(`When a local handler returns an error the request fails with a response (callbackStyle=${isCallbackStyleHandler})`, async () => { diff --git a/test/lambda-invocation.test.ts b/test/lambda-invocation.test.ts index ebb7a42..44f9a3e 100644 --- a/test/lambda-invocation.test.ts +++ b/test/lambda-invocation.test.ts @@ -1,9 +1,9 @@ import { Alpha } from '../src'; import nock from 'nock'; import { Lambda, InvokeCommand, InvokeCommandInput } from '@aws-sdk/client-lambda'; -import { AxiosRequestConfig } from 'axios'; import { mockClient } from 'aws-sdk-client-mock'; import { prepResponse, createResponse } from './utils'; +import { AxiosHeaders } from 'axios'; const mockLambda = mockClient(Lambda); const FakeLambda = jest.fn() as jest.MockedClass; @@ -58,7 +58,7 @@ test('Making a GET request with the lambda protocol invokes the lambda function' expect(response.data).toBe('hello!'); expect(response.status).toBe(200); - expect(response.headers).toEqual({ 'test-header': 'some value' }); + expect(response.headers).toEqual(new AxiosHeaders({ 'test-header': 'some value' })); const cmdInput = getIn(); @@ -146,7 +146,7 @@ const testLambdaWithQualifier = async (qualifier: string) => { expect(response.data).toBe('hello!'); expect(response.status).toBe(200); - expect(response.headers).toEqual({ 'test-header': 'some value' }); + expect(response.headers).toEqual(new AxiosHeaders({ 'test-header': 'some value' })); const cmdInput = getIn(); expect(cmdInput).toEqual({ @@ -195,7 +195,7 @@ test('When a lambda function returns an error code an error is thrown', async () expect(error.config.url).toBe('lambda://test-function/some/path'); expect(error.response.status).toBe(400); - expect(error.response.headers).toEqual({}); + expect(error.response.headers).toEqual(new AxiosHeaders({})); expect(error.response.data).toEqual({ error: 'Bad request.' }); expect(error.request.FunctionName).toBe('test-function'); @@ -436,9 +436,9 @@ test('timeout values are provided to the HTTP client used by the Lambda client', }, }); - await ctx.alpha.get('/some/path', { timeout: 5, Lambda: FakeLambda } as any as AxiosRequestConfig); + await ctx.alpha.get('/some/path', { timeout: 5, Lambda: FakeLambda }); - expect(FakeLambda).toBeCalledTimes(1); + expect(FakeLambda).toHaveBeenCalledTimes(1); const { requestHandler } = FakeLambda.mock.calls[0][0]; const config = await (requestHandler as any).configProvider; expect(config).toEqual(expect.objectContaining({ @@ -452,7 +452,7 @@ test('A timeout can be configured for the invoked lambda function', async () => const promise = ctx.alpha.get('/some/path', { Lambda: FakeLambda, // lambda will take 1000 ms timeout: 5, // timeout at 5 ms - } as any as AxiosRequestConfig); + }); await expect(promise).rejects.toThrow(); const error = await promise.catch((err) => err); @@ -466,49 +466,49 @@ test('A configured timeout does not hinder normal lambda function invocation beh const response = await ctx.alpha.get('/some/path', { Lambda: FakeLambda, timeout: 10, - } as any as AxiosRequestConfig); + }); expect(response.data).toBe('hello!'); expect(response.status).toBe(200); - expect(response.headers).toEqual({ 'test-header': 'some value' }); + expect(response.headers).toEqual(new AxiosHeaders({ 'test-header': 'some value' })); // By ending the test 10ms after the timeout, we ensure that the internal setTimeout firing doesn't // cause any negative side effects, such as attempting to abort after the lambda finished. await new Promise((resolve) => { setTimeout(() => { - expect(ctx.abort).toBeCalledTimes(0); + expect(ctx.abort).toHaveBeenCalledTimes(0); resolve(undefined); }, 20); }); }); test('A configured timeout does not eat lambda function invocation errors', async () => { - jest.useFakeTimers(); + jest.useFakeTimers({ doNotFake: ['performance'] }); jest.spyOn(global, 'setTimeout'); jest.spyOn(global, 'clearTimeout'); delayedLambda(1, new Error('Other error')); const promise = ctx.alpha.get('/some/path', { Lambda: FakeLambda, timeout: 1000, - } as any as AxiosRequestConfig); + }); await expect(promise).rejects.toThrow('Other error'); - expect(ctx.abort).not.toBeCalled(); + expect(ctx.abort).not.toHaveBeenCalled(); - expect(setTimeout).toBeCalledTimes(1); - expect(clearTimeout).toBeCalledTimes(1); + expect(setTimeout).toHaveBeenCalledTimes(1); + expect(clearTimeout).toHaveBeenCalledTimes(1); }); test('lambda function invocation errors are re-thrown', async () => { delayedLambda(1, new Error('Other error')); await expect(ctx.alpha.get('/some/path', { Lambda: FakeLambda, - } as any as AxiosRequestConfig)).rejects.toThrow('Other error'); + })).rejects.toThrow('Other error'); }); test('lambdaEndpoint config option is provided to the Lambda client', async () => { const alpha = new Alpha('lambda://test-function', { lambdaEndpoint: 'http://test-endpoint', Lambda: FakeLambda, - } as any as AxiosRequestConfig); + }); createResponse(mockLambda, { StatusCode: 200, Payload: { @@ -522,5 +522,5 @@ test('lambdaEndpoint config option is provided to the Lambda client', async () = expect(response.data).toBe('test'); expect(response.status).toBe(200); - expect(FakeLambda).toBeCalledWith({ endpoint: 'http://test-endpoint' }); + expect(FakeLambda).toHaveBeenCalledWith({ endpoint: 'http://test-endpoint' }); }); diff --git a/test/lambda-invoke-retry.test.ts b/test/lambda-invoke-retry.test.ts index 829a793..f0b967f 100644 --- a/test/lambda-invoke-retry.test.ts +++ b/test/lambda-invoke-retry.test.ts @@ -1,7 +1,6 @@ import { Alpha } from '../src'; import nock from 'nock'; import { InvokeCommand, Lambda } from '@aws-sdk/client-lambda'; -import { AxiosRequestConfig } from 'axios'; import { mockClient } from 'aws-sdk-client-mock'; const mockLambda = mockClient(Lambda); @@ -37,7 +36,7 @@ test('Lambda invocations should be retried after a timeout without a custom retr attempts: 2, factor: 1, }, - } as any as AxiosRequestConfig); + }); await expect(request).rejects.toThrow(); expect(mockLambda.commandCalls(InvokeCommand)).toHaveLength(3); diff --git a/test/resolve.test.ts b/test/resolve.test.ts index da4be5a..f944542 100644 --- a/test/resolve.test.ts +++ b/test/resolve.test.ts @@ -46,3 +46,9 @@ test('Resolving against a base URL that is merely a path returns the base path', expect(resolve(url, base)).toBe(url); }); + +test('Resolving a URL w/o base simply returns URL', () => { + const url = '/url/path'; + + expect(resolve(url)).toBe(url); +}); diff --git a/types/axiosTypes.d.ts b/types/axiosTypes.d.ts index b976240..2e1fabd 100644 --- a/types/axiosTypes.d.ts +++ b/types/axiosTypes.d.ts @@ -1,4 +1,4 @@ -declare module 'axios/lib/core/transformData' { +declare module 'axios/unsafe/core/transformData.js' { import { AxiosRequestConfig } from 'axios'; type TransformData = ( @@ -12,7 +12,7 @@ declare module 'axios/lib/core/transformData' { export default transformData; } -declare module 'axios/lib/core/buildFullPath' { +declare module 'axios/unsafe/core/buildFullPath.js' { import { AxiosRequestConfig } from 'axios'; type BuildFullPath = ( baseURL: AxiosRequestConfig['baseURL'], @@ -24,7 +24,7 @@ declare module 'axios/lib/core/buildFullPath' { export default buildFullPath; } -declare module 'axios/lib/helpers/buildURL' { +declare module 'axios/unsafe/helpers/buildURL.js' { import { AxiosRequestConfig } from 'axios'; type BuildURL = ( path: string, diff --git a/yarn.lock b/yarn.lock index 6e79595..3712a8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1161,15 +1161,27 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@es-joy/jsdoccomment@~0.31.0": - version "0.31.0" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.31.0.tgz#dbc342cc38eb6878c12727985e693eaef34302bc" - integrity sha512-tc1/iuQcnaiSIUVad72PBierDFpsxdUHtEF/OrfqvM1CBAsIoMP51j52jTMb3dXriwhieTo289InzZj72jL3EQ== +"@es-joy/jsdoccomment@~0.36.1": + version "0.36.1" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz#c37db40da36e4b848da5fd427a74bae3b004a30f" + integrity sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg== dependencies: comment-parser "1.3.1" esquery "^1.4.0" jsdoc-type-pratt-parser "~3.1.0" +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + "@eslint/eslintrc@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" @@ -1502,7 +1514,7 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lifeomic/eslint-config-standards@^3.0.0": +"@lifeomic/eslint-config-standards@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@lifeomic/eslint-config-standards/-/eslint-config-standards-3.0.0.tgz#b647a50c178f711a83089e71dea9ef1925e729fb" integrity sha512-doUJ9hvh4tbcbDQO9NfKPF/biHuFAX9AT5vzqtkcDgF7+NVKDLEa4CINm0/G7/svgc0VEOVYfjBvBhumgC5FwA== @@ -1513,15 +1525,10 @@ eslint-plugin-jsdoc "^39.3.3" eslint-plugin-prefer-arrow "^1.2.3" -"@lifeomic/jest-config@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@lifeomic/jest-config/-/jest-config-1.1.2.tgz#761cc893ca3613f09dd40b75e3324d7d5dbdd03f" - integrity sha512-w3oQvdcS9y0Ccr7+xkQggmoNM/1woCZGvyMnqAo1np15tvvowpUlrfx3n4IWXRJhHEntB4ri3cciP0B17+lsXQ== - -"@lifeomic/typescript-config@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@lifeomic/typescript-config/-/typescript-config-1.0.3.tgz#6804f84c9bee07e5d204d8238081cdb15c6c7abf" - integrity sha512-VFvK8mURnWK4+dlgNBjE7zq5NkzVgr4GFOvAlxDtAtJ7ZghOqnwXy3776omKo9qZtNlrvjSqlWx3XFnARsJzhQ== +"@lifeomic/typescript-config@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@lifeomic/typescript-config/-/typescript-config-3.1.0.tgz#853b8f8db86b2a83b21302b0d3305dcf495b15c1" + integrity sha512-Ypgvbr6eKnjkEak5fhfknP/TuNv6UVIHlilBFxA4Ga7J9vWpQX/7M2cM7JeUX0wKZ2+wnU4Ah8AfTqB2Pq/WLA== "@nodelib/fs.scandir@2.1.4": version "2.1.4" @@ -2146,9 +2153,9 @@ integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== "@types/node@^14.14.25": - version "14.14.25" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93" - integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ== + version "14.18.63" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b" + integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2170,6 +2177,11 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== +"@types/semver@^7.3.12": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.5.tgz#deed5ab7019756c9c90ea86139106b0346223f35" + integrity sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg== + "@types/sinon@10.0.10": version "10.0.10" resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.10.tgz#f8acd72fbc2e87c4679f3e2c1ab3530dff1ab6e2" @@ -2212,28 +2224,29 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.0.tgz#524a11e15c09701733033c96943ecf33f55d9ca1" - integrity sha512-lvhRJ2pGe2V9MEU46ELTdiHgiAFZPKtLhiU5wlnaYpMc2+c1R8fh8i80ZAa665drvjHKUJyRRGg3gEm1If54ow== - dependencies: - "@typescript-eslint/scope-manager" "5.30.0" - "@typescript-eslint/type-utils" "5.30.0" - "@typescript-eslint/utils" "5.30.0" + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" - functional-red-black-tree "^1.0.1" + graphemer "^1.4.0" ignore "^5.2.0" - regexpp "^3.2.0" + natural-compare-lite "^1.4.0" semver "^7.3.7" tsutils "^3.21.0" "@typescript-eslint/parser@^5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.0.tgz#a2184fb5f8ef2bf1db0ae61a43907e2e32aa1b8f" - integrity sha512-2oYYUws5o2liX6SrFQ5RB88+PuRymaM2EU02/9Ppoyu70vllPnHVO7ioxDdq/ypXHA277R04SVjxvwI8HmZpzA== + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.30.0" - "@typescript-eslint/types" "5.30.0" - "@typescript-eslint/typescript-estree" "5.30.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.30.0": @@ -2244,12 +2257,21 @@ "@typescript-eslint/types" "5.30.0" "@typescript-eslint/visitor-keys" "5.30.0" -"@typescript-eslint/type-utils@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.0.tgz#98f3af926a5099153f092d4dad87148df21fbaae" - integrity sha512-GF8JZbZqSS+azehzlv/lmQQ3EU3VfWYzCczdZjJRxSEeXDQkqFhCBgFhallLDbPwQOEQ4MHpiPfkjKk7zlmeNg== +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/utils" "5.30.0" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" tsutils "^3.21.0" @@ -2258,6 +2280,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.0.tgz#db7d81d585a3da3801432a9c1d2fafbff125e110" integrity sha512-vfqcBrsRNWw/LBXyncMF/KrUTYYzzygCSsVqlZ1qGu1QtGs6vMkt3US0VNSQ05grXi5Yadp3qv5XZdYLjpp8ag== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== + "@typescript-eslint/typescript-estree@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.0.tgz#4565ee8a6d2ac368996e20b2344ea0eab1a8f0bb" @@ -2271,7 +2298,34 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.30.0", "@typescript-eslint/utils@^5.10.0": +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + +"@typescript-eslint/utils@^5.10.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.0.tgz#1dac771fead5eab40d31860716de219356f5f754" integrity sha512-0bIgOgZflLKIcZsWvfklsaQTM3ZUbmtH0rJ1hKyV3raoUYyeZwcjQ8ZUJTzS7KnhNcsVT1Rxs7zeeMHEhGlltw== @@ -2291,6 +2345,14 @@ "@typescript-eslint/types" "5.30.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== + dependencies: + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2348,7 +2410,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2481,18 +2543,6 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2507,23 +2557,14 @@ aws-sdk-client-mock@^1.0.0: sinon "^11.1.1" tslib "^2.1.0" -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== +axios@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102" + integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg== dependencies: - follow-redirects "^1.14.9" + follow-redirects "^1.15.0" form-data "^4.0.0" + proxy-from-env "^1.1.0" babel-jest@^28.1.2: version "28.1.2" @@ -2590,13 +2631,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - before-after-hook@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" @@ -2741,11 +2775,6 @@ cardinal@^2.1.1: ansicolors "~0.3.2" redeyed "~2.1.0" -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - chalk@^2.0.0, chalk@^2.3.2, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2900,7 +2929,7 @@ columnify@^1.6.0: strip-ansi "^6.0.1" wcwidth "^1.0.0" -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -3006,11 +3035,6 @@ convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -3027,17 +3051,6 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -coveralls@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b" - integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ== - dependencies: - js-yaml "^3.13.1" - lcov-parse "^1.0.0" - log-driver "^1.2.7" - minimist "^1.2.5" - request "^2.88.2" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -3057,13 +3070,6 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -3216,14 +3222,6 @@ duplexer2@~0.1.0: dependencies: readable-stream "^2.0.2" -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - electron-to-chromium@^1.4.172: version "1.4.174" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.174.tgz#ffdf57f26dd4558c5aabdb4b190c47af1c4e443b" @@ -3298,23 +3296,23 @@ escape-string-regexp@^4.0.0: integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-plugin-jest@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.5.3.tgz#a3ceeaf4a757878342b8b00eca92379b246e5505" - integrity sha512-sICclUqJQnR1bFRZGLN2jnSVsYOsmPYYnroGCIMVSvTS3y8XR3yjzy1EcTQmk6typ5pRgyIWzbjqxK6cZHEZuQ== + version "26.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" + integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== dependencies: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsdoc@^39.3.3: - version "39.3.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.3.3.tgz#75dd67ce581e7527a69f27800138cc0f9c388236" - integrity sha512-K/DAjKRUNaUTf0KQhI9PvsF+Y3mGDx/j0pofXsJCQe/tmRsRweBIXR353c8nAro0lytZYEf7l0PluBpzKDiHxw== + version "39.9.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz#e9ce1723411fd7ea0933b3ef0dd02156ae3068e2" + integrity sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw== dependencies: - "@es-joy/jsdoccomment" "~0.31.0" + "@es-joy/jsdoccomment" "~0.36.1" comment-parser "1.3.1" debug "^4.3.4" escape-string-regexp "^4.0.0" esquery "^1.4.0" - semver "^7.3.7" + semver "^7.3.8" spdx-expression-parse "^3.0.1" eslint-plugin-prefer-arrow@^1.2.3: @@ -3470,21 +3468,6 @@ expect@^28.1.1: jest-message-util "^28.1.1" jest-util "^28.1.1" -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -3617,15 +3600,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== -follow-redirects@^1.14.9: - version "1.15.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" - integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== form-data@^4.0.0: version "4.0.0" @@ -3636,15 +3614,6 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - from2@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -3728,13 +3697,6 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - git-log-parser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/git-log-parser/-/git-log-parser-1.2.0.tgz#2e6a4c1b13fc00028207ba795a7ac31667b9fd4a" @@ -3847,6 +3809,11 @@ graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.5.tgz#bc18864a6c9fc7b303f2e2abdb9155ad178fbe29" integrity sha512-kBBSQbz2K0Nyn+31j/w36fUfxkBW9/gfwRWdUY1ULReH3iokVJgddZAFcD1D0xlgTmFxJCbUkUclAlc6/IDJkw== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -3859,19 +3826,6 @@ handlebars@^4.7.7: optionalDependencies: uglify-js "^3.1.4" -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -3942,15 +3896,6 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -4186,11 +4131,6 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -4206,11 +4146,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - issue-parser@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-6.0.0.tgz#b1edd06315d4f2044a9755daf85fdafde9b4014a" @@ -4659,11 +4594,6 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - jsdoc-type-pratt-parser@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" @@ -4689,11 +4619,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -4704,7 +4629,7 @@ json-stringify-nice@^1.1.4: resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: +json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= @@ -4728,16 +4653,6 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - just-diff-apply@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/just-diff-apply/-/just-diff-apply-5.3.1.tgz#30f40809ffed55ad76dccf73fa9b85a76964c867" @@ -4763,11 +4678,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lcov-parse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" - integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A= - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -4967,11 +4877,6 @@ lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -5100,7 +5005,7 @@ mime-db@1.40.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== @@ -5258,6 +5163,11 @@ mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -5571,11 +5481,6 @@ npmlog@^6.0.0, npmlog@^6.0.2: gauge "^4.0.3" set-blocking "^2.0.0" -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -5785,11 +5690,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -5903,12 +5803,12 @@ propagate@^2.0.0: resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -punycode@^2.1.0, punycode@^2.1.1: +punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== @@ -5923,11 +5823,6 @@ qrcode-terminal@^0.12.0: resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - querystringify@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" @@ -6074,32 +5969,6 @@ registry-auth-token@^4.0.0: dependencies: rc "^1.2.8" -request@^2.88.2: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -6180,17 +6049,17 @@ run-parallel@^1.1.9: resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -"safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -6251,7 +6120,7 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: +semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -6411,21 +6280,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - ssri@^9.0.0, ssri@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" @@ -6670,14 +6524,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -6744,18 +6590,6 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -6877,11 +6711,6 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -6921,15 +6750,6 @@ validate-npm-package-name@^4.0.0: dependencies: builtins "^5.0.0" -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - walk-up-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e"