From b58eb41ae0b2fae42879512408f5c69c911d3b78 Mon Sep 17 00:00:00 2001 From: Lewis Daly Date: Fri, 19 Nov 2021 15:09:31 +0930 Subject: [PATCH 1/6] feat(unit): adding test cases for RESERVED_ABORTED --- src/util/kafka/index.js | 5 +- test/unit/util/kafka/index.test.js | 796 +++++++++++++++-------------- 2 files changed, 419 insertions(+), 382 deletions(-) diff --git a/src/util/kafka/index.js b/src/util/kafka/index.js index d4979ac6..b57d4b72 100644 --- a/src/util/kafka/index.js +++ b/src/util/kafka/index.js @@ -327,5 +327,8 @@ module.exports = { produceParticipantMessage, produceGeneralMessage, commitMessageSync, - proceed + proceed, + + // exported for testing purposes: + _getFunctionalityAction: getFunctionalityAction } diff --git a/test/unit/util/kafka/index.test.js b/test/unit/util/kafka/index.test.js index d0a186a9..920acd69 100644 --- a/test/unit/util/kafka/index.test.js +++ b/test/unit/util/kafka/index.test.js @@ -46,6 +46,7 @@ const Utility = require('../../../../src/util').Kafka const Enum = require('../../../../src').Enum const Config = require('../../../util/config') const clone = require('../../../../src/util').clone +const { _getFunctionalityAction } = require('../../../../src/util/kafka') let participantName const TRANSFER = Enum.Events.Event.Type.TRANSFER @@ -124,406 +125,439 @@ Test('Utility Test', utilityTest => { test.end() }) - utilityTest.test('createParticipantTopicConf should', createParticipantTopicConfTest => { - createParticipantTopicConfTest.test('return a participant topic conf object', test => { - const response = Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE, 0) - test.equal(response.topicName, participantTopic) - test.equal(response.key, 0) - test.equal(response.partition, null) - test.equal(response.opaqueKey, null) + utilityTest.test('getFunctionalityAction', gfaTest => { + gfaTest.test('should return config for transfer-prepare', test => { + // Arrange + const expected = { functionalityMapped: 'transfer', actionMapped: 'prepare' } + // Act + const result = _getFunctionalityAction('transfer', 'prepare') + + // Assert + test.deepEqual(result, expected) test.end() }) - createParticipantTopicConfTest.test('throw error when Mustache cannot find config', test => { - try { - Sinon.stub(Mustache, 'render').throws(new Error()) - Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE) - test.fail('No Error thrown') - test.end() - Mustache.render.restore() - } catch (e) { - test.pass('Error thrown') - test.end() - Mustache.render.restore() - } - }) - - createParticipantTopicConfTest.end() - }) - - utilityTest.test('createGeneralTopicConf should', createGeneralTopicConfTest => { - createGeneralTopicConfTest.test('return a general topic conf object', test => { - const response = Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) - test.equal(response.topicName, generalTopic) - test.equal(response.key, 0) - test.equal(response.partition, null) - test.equal(response.opaqueKey, null) + gfaTest.test('should return config for transfer-reserved-aborted', test => { + // Arrange + const expected = { functionalityMapped: 'transfer', actionMapped: 'reserved-aborted' } + // Act + const result = _getFunctionalityAction('transfer', 'reserved-aborted') + + // Assert + test.deepEqual(result, expected) test.end() }) - createGeneralTopicConfTest.test('return a general topic conf object using topicMap', test => { - const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - '../../enums': { - topicMap: { - transfer: { - fulfil: { - functionality: 'transfer', - action: 'fulfil' - } - } - } - } - }) - const response = ModuleProxy.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) - test.equal(response.topicName, generalTopic) - test.equal(response.key, 0) - test.equal(response.partition, null) - test.equal(response.opaqueKey, null) - test.end() - }) - - createGeneralTopicConfTest.test('throw error when Mustache cannot find config', test => { - try { - Sinon.stub(Mustache, 'render').throws(new Error()) - Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL) - test.fail('No Error thrown') - test.end() - Mustache.render.restore() - } catch (e) { - test.pass('Error thrown') - test.end() - Mustache.render.restore() - } - }) - - createGeneralTopicConfTest.end() + gfaTest.end() }) + // utilityTest.test('createParticipantTopicConf should', createParticipantTopicConfTest => { + // createParticipantTopicConfTest.test('return a participant topic conf object', test => { + // const response = Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE, 0) + // test.equal(response.topicName, participantTopic) + // test.equal(response.key, 0) + // test.equal(response.partition, null) + // test.equal(response.opaqueKey, null) + // test.end() + // }) + + // createParticipantTopicConfTest.test('throw error when Mustache cannot find config', test => { + // try { + // Sinon.stub(Mustache, 'render').throws(new Error()) + // Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE) + // test.fail('No Error thrown') + // test.end() + // Mustache.render.restore() + // } catch (e) { + // test.pass('Error thrown') + // test.end() + // Mustache.render.restore() + // } + // }) + + // createParticipantTopicConfTest.end() + // }) + + // utilityTest.test('createGeneralTopicConf should', createGeneralTopicConfTest => { + // createGeneralTopicConfTest.test('return a general topic conf object', test => { + // const response = Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) + // test.equal(response.topicName, generalTopic) + // test.equal(response.key, 0) + // test.equal(response.partition, null) + // test.equal(response.opaqueKey, null) + // test.end() + // }) + + // createGeneralTopicConfTest.test('return a general topic conf object using topicMap', test => { + // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + // '../../enums': { + // topicMap: { + // transfer: { + // fulfil: { + // functionality: 'transfer', + // action: 'fulfil' + // } + // } + // } + // } + // }) + // const response = ModuleProxy.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) + // test.equal(response.topicName, generalTopic) + // test.equal(response.key, 0) + // test.equal(response.partition, null) + // test.equal(response.opaqueKey, null) + // test.end() + // }) + + // createGeneralTopicConfTest.test('throw error when Mustache cannot find config', test => { + // try { + // Sinon.stub(Mustache, 'render').throws(new Error()) + // Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL) + // test.fail('No Error thrown') + // test.end() + // Mustache.render.restore() + // } catch (e) { + // test.pass('Error thrown') + // test.end() + // Mustache.render.restore() + // } + // }) + + // createGeneralTopicConfTest.end() + // }) + utilityTest.test('getKafkaConfig should', getKafkaConfigTest => { - getKafkaConfigTest.test('return the Kafka config from the default.json', test => { + // getKafkaConfigTest.test('return the Kafka config from the default.json', test => { + // const config = Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER.toUpperCase(), PREPARE.toUpperCase()) + // test.ok(config.rdkafkaConf !== undefined) + // test.ok(config.options !== undefined) + // test.end() + // }) + + getKafkaConfigTest.test('return the Kafka config fpr TRANSFER RESERVED_ABORTED', test => { const config = Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER.toUpperCase(), PREPARE.toUpperCase()) test.ok(config.rdkafkaConf !== undefined) test.ok(config.options !== undefined) test.end() }) - getKafkaConfigTest.test('throw and error if Kafka config not in default.json', test => { - try { - Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER, PREPARE) - test.fail('Error not thrown') - test.end() - } catch (e) { - test.pass('Error thrown') - test.end() - } - }) - - getKafkaConfigTest.end() - }) + // getKafkaConfigTest.test('throw and error if Kafka config not in default.json', test => { + // try { + // Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER, PREPARE) + // test.fail('Error not thrown') + // test.end() + // } catch (e) { + // test.pass('Error thrown') + // test.end() + // } + // }) - utilityTest.test('transformGeneralTopicName should', getKafkaConfigTest => { - getKafkaConfigTest.test('return the general topic name using a template in the default.json', test => { - const topicName = Utility.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT) - test.ok(topicName === 'topic-notification-event') - test.end() - }) getKafkaConfigTest.end() }) - utilityTest.test('produceGeneralMessage should', produceGeneralMessageTest => { - produceGeneralMessageTest.test('produce a general message', async (test) => { - const span = EventSdk.Tracer.createSpan('test_span') - const result = await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS, undefined, span) - test.equal(result, true) - test.end() - }) - - produceGeneralMessageTest.test('produce a general message using topicMap', async (test) => { - const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - '../../enums': { - topicMap: { - transfer: { - prepare: { - functionality: 'transfer', - action: 'prepare' - } - } - } - } - }) - const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) - test.equal(result, true) - test.end() - }) - - produceGeneralMessageTest.test('produce a notification message using topicMap', async (test) => { - const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - '../../enums': { - topicMap: { - transfer: { - prepare: { - functionality: 'transfer', - action: 'prepare' - } - } - } - } - }) - const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) - test.equal(result, true) - test.end() - }) - - produceGeneralMessageTest.test('produce a general message', async (test) => { - try { - await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) - } catch (e) { - test.ok(e instanceof Error) - } - test.end() - }) - - produceGeneralMessageTest.end() - }) - - utilityTest.test('produceParticipantMessage should', produceParticipantMessageTest => { - produceParticipantMessageTest.test('produce a participant message', async (test) => { - const result = await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) - test.equal(result, true) - test.end() - }) - - produceParticipantMessageTest.test('produce a participant message using topicMap', async (test) => { - const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - '../../enums': { - topicMap: { - transfer: { - prepare: { - functionality: 'transfer', - action: 'prepare' - } - } - } - } - }) - const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) - test.equal(result, true) - test.end() - }) - - produceParticipantMessageTest.test('produce a notification message using topicMap', async (test) => { - const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - '../../enums': { - topicMap: { - transfer: { - prepare: { - functionality: 'transfer', - action: 'prepare' - } - } - } - } - }) - const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) - test.equal(result, true) - test.end() - }) - - produceParticipantMessageTest.test('produce a participant message', async (test) => { - try { - await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) - } catch (e) { - test.ok(e instanceof Error) - } - test.end() - }) - - produceParticipantMessageTest.end() - }) - - utilityTest.test('commitMessageSync should', commitMessageSyncTest => { - commitMessageSyncTest.test('commit message when auto commit is disabled', async (test) => { - const kafkaTopic = 'test-topic' - const message = 'message' - const commitMessageSyncStub = sandbox.stub() - const consumerStub = { - commitMessageSync: commitMessageSyncStub - } - const ConsumerStub = { - isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), - getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) - } - const UtilityProxy = rewire(`${src}/util/kafka`) - - await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) - test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') - test.ok(commitMessageSyncStub.withArgs(message).calledOnce, 'commitMessageSyncStub called once') - test.end() - }) - - commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { - const kafkaTopic = 'test-topic' - const message = 'message' - const commitMessageSyncStub = sandbox.stub() - const consumerStub = { - commitMessageSync: commitMessageSyncStub - } - const ConsumerStub = { - isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(true), - getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) - } - - const UtilityProxy = rewire(`${src}/util/kafka`) - - await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) - test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') - test.equal(commitMessageSyncStub.withArgs(message).callCount, 0, 'commitMessageSyncStub not called') - test.end() - }) - - commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { - const kafkaTopic = 'fail-topic' - const message = 'message' - const ConsumerStub = { - isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), - getConsumer: sandbox.stub().withArgs(kafkaTopic).throwsException(new Error('No Consumer')) - } - - const UtilityProxy = rewire(`${src}/util/kafka`) - try { - await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) - test.fail('No error thrown') - test.end() - } catch (err) { - test.ok(err instanceof Error) - test.end() - } - }) - - commitMessageSyncTest.end() - }) - - utilityTest.test('proceed should', async proceedTest => { - const commitMessageSyncStub = sandbox.stub().returns(Promise.resolve()) - const produceGeneralMessageStub = sandbox.stub().returns(Promise.resolve()) - const successState = Enum.Events.EventStatus.SUCCESS - const from = 'from' - const extList = [] - const message = { - value: { - content: { - payload: { - extensionList: extList - }, - headers: { - 'fspiop-destination': 'dfsp' - } - }, - from - } - } - const transferId = Uuid() - const kafkaTopic = 'kafkaTopic' - const consumer = 'consumer' - const producer = 'producer' - const params = { message, transferId, kafkaTopic, consumer, decodedPayload: message.value.content.payload, producer } - const eventDetail = { functionality: 'functionality', action: 'action' } - const UtilityProxy = rewire(`${src}/util/kafka/index`) - UtilityProxy.__set__('commitMessageSync', commitMessageSyncStub) - UtilityProxy.__set__('produceGeneralMessage', produceGeneralMessageStub) - - proceedTest.test('commitMessageSync when consumerCommit and produce toDestination', async test => { - const opts = { consumerCommit: true, eventDetail, toDestination: true } - try { - const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - test.ok(commitMessageSyncStub.calledOnce, 'commitMessageSyncStub called once') - test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).calledOnce, 'produceGeneralMessageStub called once') - test.equal(result, true, 'result returned') - } catch (err) { - test.fail(err.message) - } - - test.end() - }) - - proceedTest.test('commitMessageSync when consumerCommit and toDestination is string', async test => { - const opts = { consumerCommit: true, eventDetail, toDestination: 'dfsp1' } - try { - const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - test.ok(commitMessageSyncStub.calledTwice, 'commitMessageSyncStub called once') - test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).secondCall, 'produceGeneralMessageStub called once') - test.equal(result, true, 'result returned') - } catch (err) { - test.fail(err.message) - } - - test.end() - }) - - proceedTest.test('produce fromSwitch and do not stop timer', async test => { - const opts = { fromSwitch: true, eventDetail } - try { - const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') - test.equal(message.value.to, from, 'message destination set to sender') - test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') - test.equal(result, true, 'result returned') - } catch (err) { - test.fail(err.message) - } - - test.end() - }) - - proceedTest.test('produce fromSwitch without headers', async test => { - const opts = { fromSwitch: true, eventDetail } - try { - const localParams = clone(params) - delete localParams.message.value.content.headers - const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) - test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') - test.equal(message.value.to, from, 'message destination set to sender') - test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') - test.equal(result, true, 'result returned') - } catch (err) { - test.fail(err.message) - } - - test.end() - }) - - proceedTest.test('create error status and end timer', async test => { - const desc = 'desc' - const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() - const opts = { fspiopError } - try { - const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - test.equal(result, true, 'result returned') - } catch (err) { - test.fail(err.message) - } - - test.end() - }) - - proceedTest.test('create error status and end timer with uriParams', async test => { - const desc = 'desc' - const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() - const opts = { fspiopError } - try { - const localParams = MainUtil.clone(params) - localParams.message.value.content.uriParams = { id: Uuid() } - const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) - test.equal(result, true, 'result returned') - } catch (err) { - test.fail(err.message) - } - - test.end() - }) - - proceedTest.end() - }) + // utilityTest.test('transformGeneralTopicName should', getKafkaConfigTest => { + // getKafkaConfigTest.test('return the general topic name using a template in the default.json', test => { + // const topicName = Utility.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT) + // test.ok(topicName === 'topic-notification-event') + // test.end() + // }) + // getKafkaConfigTest.end() + // }) + + // utilityTest.test('produceGeneralMessage should', produceGeneralMessageTest => { + // produceGeneralMessageTest.test('produce a general message', async (test) => { + // const span = EventSdk.Tracer.createSpan('test_span') + // const result = await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS, undefined, span) + // test.equal(result, true) + // test.end() + // }) + + // produceGeneralMessageTest.test('produce a general message using topicMap', async (test) => { + // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + // '../../enums': { + // topicMap: { + // transfer: { + // prepare: { + // functionality: 'transfer', + // action: 'prepare' + // } + // } + // } + // } + // }) + // const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) + // test.equal(result, true) + // test.end() + // }) + + // produceGeneralMessageTest.test('produce a notification message using topicMap', async (test) => { + // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + // '../../enums': { + // topicMap: { + // transfer: { + // prepare: { + // functionality: 'transfer', + // action: 'prepare' + // } + // } + // } + // } + // }) + // const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) + // test.equal(result, true) + // test.end() + // }) + + // produceGeneralMessageTest.test('produce a general message', async (test) => { + // try { + // await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) + // } catch (e) { + // test.ok(e instanceof Error) + // } + // test.end() + // }) + + // produceGeneralMessageTest.end() + // }) + + // utilityTest.test('produceParticipantMessage should', produceParticipantMessageTest => { + // produceParticipantMessageTest.test('produce a participant message', async (test) => { + // const result = await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) + // test.equal(result, true) + // test.end() + // }) + + // produceParticipantMessageTest.test('produce a participant message using topicMap', async (test) => { + // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + // '../../enums': { + // topicMap: { + // transfer: { + // prepare: { + // functionality: 'transfer', + // action: 'prepare' + // } + // } + // } + // } + // }) + // const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) + // test.equal(result, true) + // test.end() + // }) + + // produceParticipantMessageTest.test('produce a notification message using topicMap', async (test) => { + // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + // '../../enums': { + // topicMap: { + // transfer: { + // prepare: { + // functionality: 'transfer', + // action: 'prepare' + // } + // } + // } + // } + // }) + // const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) + // test.equal(result, true) + // test.end() + // }) + + // produceParticipantMessageTest.test('produce a participant message', async (test) => { + // try { + // await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) + // } catch (e) { + // test.ok(e instanceof Error) + // } + // test.end() + // }) + + // produceParticipantMessageTest.end() + // }) + + // utilityTest.test('commitMessageSync should', commitMessageSyncTest => { + // commitMessageSyncTest.test('commit message when auto commit is disabled', async (test) => { + // const kafkaTopic = 'test-topic' + // const message = 'message' + // const commitMessageSyncStub = sandbox.stub() + // const consumerStub = { + // commitMessageSync: commitMessageSyncStub + // } + // const ConsumerStub = { + // isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), + // getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) + // } + // const UtilityProxy = rewire(`${src}/util/kafka`) + + // await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) + // test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') + // test.ok(commitMessageSyncStub.withArgs(message).calledOnce, 'commitMessageSyncStub called once') + // test.end() + // }) + + // commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { + // const kafkaTopic = 'test-topic' + // const message = 'message' + // const commitMessageSyncStub = sandbox.stub() + // const consumerStub = { + // commitMessageSync: commitMessageSyncStub + // } + // const ConsumerStub = { + // isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(true), + // getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) + // } + + // const UtilityProxy = rewire(`${src}/util/kafka`) + + // await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) + // test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') + // test.equal(commitMessageSyncStub.withArgs(message).callCount, 0, 'commitMessageSyncStub not called') + // test.end() + // }) + + // commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { + // const kafkaTopic = 'fail-topic' + // const message = 'message' + // const ConsumerStub = { + // isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), + // getConsumer: sandbox.stub().withArgs(kafkaTopic).throwsException(new Error('No Consumer')) + // } + + // const UtilityProxy = rewire(`${src}/util/kafka`) + // try { + // await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) + // test.fail('No error thrown') + // test.end() + // } catch (err) { + // test.ok(err instanceof Error) + // test.end() + // } + // }) + + // commitMessageSyncTest.end() + // }) + + // utilityTest.test('proceed should', async proceedTest => { + // const commitMessageSyncStub = sandbox.stub().returns(Promise.resolve()) + // const produceGeneralMessageStub = sandbox.stub().returns(Promise.resolve()) + // const successState = Enum.Events.EventStatus.SUCCESS + // const from = 'from' + // const extList = [] + // const message = { + // value: { + // content: { + // payload: { + // extensionList: extList + // }, + // headers: { + // 'fspiop-destination': 'dfsp' + // } + // }, + // from + // } + // } + // const transferId = Uuid() + // const kafkaTopic = 'kafkaTopic' + // const consumer = 'consumer' + // const producer = 'producer' + // const params = { message, transferId, kafkaTopic, consumer, decodedPayload: message.value.content.payload, producer } + // const eventDetail = { functionality: 'functionality', action: 'action' } + // const UtilityProxy = rewire(`${src}/util/kafka/index`) + // UtilityProxy.__set__('commitMessageSync', commitMessageSyncStub) + // UtilityProxy.__set__('produceGeneralMessage', produceGeneralMessageStub) + + // proceedTest.test('commitMessageSync when consumerCommit and produce toDestination', async test => { + // const opts = { consumerCommit: true, eventDetail, toDestination: true } + // try { + // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + // test.ok(commitMessageSyncStub.calledOnce, 'commitMessageSyncStub called once') + // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).calledOnce, 'produceGeneralMessageStub called once') + // test.equal(result, true, 'result returned') + // } catch (err) { + // test.fail(err.message) + // } + + // test.end() + // }) + + // proceedTest.test('commitMessageSync when consumerCommit and toDestination is string', async test => { + // const opts = { consumerCommit: true, eventDetail, toDestination: 'dfsp1' } + // try { + // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + // test.ok(commitMessageSyncStub.calledTwice, 'commitMessageSyncStub called once') + // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).secondCall, 'produceGeneralMessageStub called once') + // test.equal(result, true, 'result returned') + // } catch (err) { + // test.fail(err.message) + // } + + // test.end() + // }) + + // proceedTest.test('produce fromSwitch and do not stop timer', async test => { + // const opts = { fromSwitch: true, eventDetail } + // try { + // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') + // test.equal(message.value.to, from, 'message destination set to sender') + // test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') + // test.equal(result, true, 'result returned') + // } catch (err) { + // test.fail(err.message) + // } + + // test.end() + // }) + + // proceedTest.test('produce fromSwitch without headers', async test => { + // const opts = { fromSwitch: true, eventDetail } + // try { + // const localParams = clone(params) + // delete localParams.message.value.content.headers + // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) + // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') + // test.equal(message.value.to, from, 'message destination set to sender') + // test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') + // test.equal(result, true, 'result returned') + // } catch (err) { + // test.fail(err.message) + // } + + // test.end() + // }) + + // proceedTest.test('create error status and end timer', async test => { + // const desc = 'desc' + // const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() + // const opts = { fspiopError } + // try { + // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + // test.equal(result, true, 'result returned') + // } catch (err) { + // test.fail(err.message) + // } + + // test.end() + // }) + + // proceedTest.test('create error status and end timer with uriParams', async test => { + // const desc = 'desc' + // const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() + // const opts = { fspiopError } + // try { + // const localParams = MainUtil.clone(params) + // localParams.message.value.content.uriParams = { id: Uuid() } + // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) + // test.equal(result, true, 'result returned') + // } catch (err) { + // test.fail(err.message) + // } + + // test.end() + // }) + + // proceedTest.end() + // }) utilityTest.end() }) From d546d16c279a6978de58ae0032b35c52e2263110 Mon Sep 17 00:00:00 2001 From: Lewis Daly Date: Fri, 19 Nov 2021 15:40:06 +0930 Subject: [PATCH 2/6] feat(flow): add handling for notification/reserved-aborted to TopicMap --- src/enums/kafka.js | 4 + src/util/kafka/index.js | 2 + test/unit/util/kafka/index.test.js | 822 +++++++++++++++-------------- 3 files changed, 432 insertions(+), 396 deletions(-) diff --git a/src/enums/kafka.js b/src/enums/kafka.js index be5a3004..9e0d56ea 100644 --- a/src/enums/kafka.js +++ b/src/enums/kafka.js @@ -150,6 +150,10 @@ const TopicMap = { functionality: transferEventType.NOTIFICATION, action: transferEventAction.EVENT }, + 'reserved-aborted': { + functionality: transferEventType.NOTIFICATION, + action: transferEventAction.EVENT + }, 'settlement-window': { functionality: transferEventType.NOTIFICATION, action: transferEventAction.EVENT diff --git a/src/util/kafka/index.js b/src/util/kafka/index.js index b57d4b72..f7040181 100644 --- a/src/util/kafka/index.js +++ b/src/util/kafka/index.js @@ -143,7 +143,9 @@ const transformAccountToTopicName = (template, participantName, functionality, a const getKafkaConfig = (kafkaConfig, flow, functionality, action) => { try { const flowObject = kafkaConfig[flow] + console.log('flowObject', flowObject) const functionalityObject = flowObject[functionality] + console.log('functionalityObject', functionalityObject) const actionObject = action ? functionalityObject[action] : functionalityObject actionObject.config.logger = Logger return actionObject.config diff --git a/test/unit/util/kafka/index.test.js b/test/unit/util/kafka/index.test.js index 920acd69..42905feb 100644 --- a/test/unit/util/kafka/index.test.js +++ b/test/unit/util/kafka/index.test.js @@ -137,11 +137,22 @@ Test('Utility Test', utilityTest => { test.end() }) + gfaTest.test('should return config for NOTIFICATION ABORT_VALIDATION', test => { + // Arrange + const expected = { functionalityMapped: 'notification', actionMapped: 'event' } + // Act + const result = _getFunctionalityAction('notification', 'abort-validation') + + // Assert + test.deepEqual(result, expected) + test.end() + }) + gfaTest.test('should return config for transfer-reserved-aborted', test => { // Arrange - const expected = { functionalityMapped: 'transfer', actionMapped: 'reserved-aborted' } + const expected = { functionalityMapped: 'notification', actionMapped: 'event' } // Act - const result = _getFunctionalityAction('transfer', 'reserved-aborted') + const result = _getFunctionalityAction('notification', 'reserved-aborted') // Assert test.deepEqual(result, expected) @@ -151,413 +162,432 @@ Test('Utility Test', utilityTest => { gfaTest.end() }) - // utilityTest.test('createParticipantTopicConf should', createParticipantTopicConfTest => { - // createParticipantTopicConfTest.test('return a participant topic conf object', test => { - // const response = Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE, 0) - // test.equal(response.topicName, participantTopic) - // test.equal(response.key, 0) - // test.equal(response.partition, null) - // test.equal(response.opaqueKey, null) - // test.end() - // }) - - // createParticipantTopicConfTest.test('throw error when Mustache cannot find config', test => { - // try { - // Sinon.stub(Mustache, 'render').throws(new Error()) - // Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE) - // test.fail('No Error thrown') - // test.end() - // Mustache.render.restore() - // } catch (e) { - // test.pass('Error thrown') - // test.end() - // Mustache.render.restore() - // } - // }) - - // createParticipantTopicConfTest.end() - // }) - - // utilityTest.test('createGeneralTopicConf should', createGeneralTopicConfTest => { - // createGeneralTopicConfTest.test('return a general topic conf object', test => { - // const response = Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) - // test.equal(response.topicName, generalTopic) - // test.equal(response.key, 0) - // test.equal(response.partition, null) - // test.equal(response.opaqueKey, null) - // test.end() - // }) - - // createGeneralTopicConfTest.test('return a general topic conf object using topicMap', test => { - // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - // '../../enums': { - // topicMap: { - // transfer: { - // fulfil: { - // functionality: 'transfer', - // action: 'fulfil' - // } - // } - // } - // } - // }) - // const response = ModuleProxy.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) - // test.equal(response.topicName, generalTopic) - // test.equal(response.key, 0) - // test.equal(response.partition, null) - // test.equal(response.opaqueKey, null) - // test.end() - // }) - - // createGeneralTopicConfTest.test('throw error when Mustache cannot find config', test => { - // try { - // Sinon.stub(Mustache, 'render').throws(new Error()) - // Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL) - // test.fail('No Error thrown') - // test.end() - // Mustache.render.restore() - // } catch (e) { - // test.pass('Error thrown') - // test.end() - // Mustache.render.restore() - // } - // }) - - // createGeneralTopicConfTest.end() - // }) + utilityTest.test('createParticipantTopicConf should', createParticipantTopicConfTest => { + createParticipantTopicConfTest.test('return a participant topic conf object', test => { + const response = Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE, 0) + test.equal(response.topicName, participantTopic) + test.equal(response.key, 0) + test.equal(response.partition, null) + test.equal(response.opaqueKey, null) + test.end() + }) - utilityTest.test('getKafkaConfig should', getKafkaConfigTest => { - // getKafkaConfigTest.test('return the Kafka config from the default.json', test => { - // const config = Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER.toUpperCase(), PREPARE.toUpperCase()) - // test.ok(config.rdkafkaConf !== undefined) - // test.ok(config.options !== undefined) - // test.end() - // }) + createParticipantTopicConfTest.test('throw error when Mustache cannot find config', test => { + try { + Sinon.stub(Mustache, 'render').throws(new Error()) + Utility.createParticipantTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.PARTICIPANT_TOPIC_TEMPLATE.TEMPLATE, participantName, TRANSFER, PREPARE) + test.fail('No Error thrown') + test.end() + Mustache.render.restore() + } catch (e) { + test.pass('Error thrown') + test.end() + Mustache.render.restore() + } + }) - getKafkaConfigTest.test('return the Kafka config fpr TRANSFER RESERVED_ABORTED', test => { + createParticipantTopicConfTest.end() + }) + + utilityTest.test('createGeneralTopicConf should', createGeneralTopicConfTest => { + createGeneralTopicConfTest.test('return a general topic conf object', test => { + const response = Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) + test.equal(response.topicName, generalTopic) + test.equal(response.key, 0) + test.equal(response.partition, null) + test.equal(response.opaqueKey, null) + test.end() + }) + + createGeneralTopicConfTest.test('return a general topic conf object using topicMap', test => { + const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + '../../enums': { + topicMap: { + transfer: { + fulfil: { + functionality: 'transfer', + action: 'fulfil' + } + } + } + } + }) + const response = ModuleProxy.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL, 0) + test.equal(response.topicName, generalTopic) + test.equal(response.key, 0) + test.equal(response.partition, null) + test.equal(response.opaqueKey, null) + test.end() + }) + + createGeneralTopicConfTest.test('throw error when Mustache cannot find config', test => { + try { + Sinon.stub(Mustache, 'render').throws(new Error()) + Utility.createGeneralTopicConf(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, TRANSFER, FULFIL) + test.fail('No Error thrown') + test.end() + Mustache.render.restore() + } catch (e) { + test.pass('Error thrown') + test.end() + Mustache.render.restore() + } + }) + + createGeneralTopicConfTest.end() + }) + + utilityTest.test('getKafkaConfig should', getKafkaConfigTest => { + getKafkaConfigTest.test('return the Kafka config from the default.json', test => { const config = Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER.toUpperCase(), PREPARE.toUpperCase()) test.ok(config.rdkafkaConf !== undefined) test.ok(config.options !== undefined) test.end() }) - // getKafkaConfigTest.test('throw and error if Kafka config not in default.json', test => { - // try { - // Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER, PREPARE) - // test.fail('Error not thrown') - // test.end() - // } catch (e) { - // test.pass('Error thrown') - // test.end() - // } + // getKafkaConfigTest.test('return the Kafka config for NOTIFICATION ABORT_VALIDATION', test => { + // const config = Utility.getKafkaConfig( + // Config.KAFKA_CONFIG, + // CONSUMER, + // Enum.Events.Event.Type.POSITION.toUpperCase(), + // Enum.Events.Event.Action.ABORT_VALIDATION.toUpperCase() + // ) + // console.log('config is', config) + // test.ok(config.rdkafkaConf !== undefined) + // test.ok(config.options !== undefined) + // test.end() + // }) + + // getKafkaConfigTest.test('return the Kafka config for NOTIFICATION RESERVED_ABORTED', test => { + // const config = Utility.getKafkaConfig( + // Config.KAFKA_CONFIG, + // CONSUMER, + // Enum.Events.Event.Type.NOTIFICATION.toUpperCase(), + // Enum.Events.Event.Action.RESERVED_ABORTED.toUpperCase() + // ) + // console.log('config is', config) + // test.ok(config.rdkafkaConf !== undefined) + // test.ok(config.options !== undefined) + // test.end() // }) + getKafkaConfigTest.test('throw and error if Kafka config not in default.json', test => { + try { + Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER, PREPARE) + test.fail('Error not thrown') + test.end() + } catch (e) { + test.pass('Error thrown') + test.end() + } + }) + + getKafkaConfigTest.end() + }) + + utilityTest.test('transformGeneralTopicName should', getKafkaConfigTest => { + getKafkaConfigTest.test('return the general topic name using a template in the default.json', test => { + const topicName = Utility.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT) + test.ok(topicName === 'topic-notification-event') + test.end() + }) getKafkaConfigTest.end() }) - // utilityTest.test('transformGeneralTopicName should', getKafkaConfigTest => { - // getKafkaConfigTest.test('return the general topic name using a template in the default.json', test => { - // const topicName = Utility.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT) - // test.ok(topicName === 'topic-notification-event') - // test.end() - // }) - // getKafkaConfigTest.end() - // }) - - // utilityTest.test('produceGeneralMessage should', produceGeneralMessageTest => { - // produceGeneralMessageTest.test('produce a general message', async (test) => { - // const span = EventSdk.Tracer.createSpan('test_span') - // const result = await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS, undefined, span) - // test.equal(result, true) - // test.end() - // }) - - // produceGeneralMessageTest.test('produce a general message using topicMap', async (test) => { - // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - // '../../enums': { - // topicMap: { - // transfer: { - // prepare: { - // functionality: 'transfer', - // action: 'prepare' - // } - // } - // } - // } - // }) - // const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) - // test.equal(result, true) - // test.end() - // }) - - // produceGeneralMessageTest.test('produce a notification message using topicMap', async (test) => { - // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - // '../../enums': { - // topicMap: { - // transfer: { - // prepare: { - // functionality: 'transfer', - // action: 'prepare' - // } - // } - // } - // } - // }) - // const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) - // test.equal(result, true) - // test.end() - // }) - - // produceGeneralMessageTest.test('produce a general message', async (test) => { - // try { - // await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) - // } catch (e) { - // test.ok(e instanceof Error) - // } - // test.end() - // }) - - // produceGeneralMessageTest.end() - // }) - - // utilityTest.test('produceParticipantMessage should', produceParticipantMessageTest => { - // produceParticipantMessageTest.test('produce a participant message', async (test) => { - // const result = await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) - // test.equal(result, true) - // test.end() - // }) - - // produceParticipantMessageTest.test('produce a participant message using topicMap', async (test) => { - // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - // '../../enums': { - // topicMap: { - // transfer: { - // prepare: { - // functionality: 'transfer', - // action: 'prepare' - // } - // } - // } - // } - // }) - // const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) - // test.equal(result, true) - // test.end() - // }) - - // produceParticipantMessageTest.test('produce a notification message using topicMap', async (test) => { - // const ModuleProxy = Proxyquire('../../../../src/util/kafka', { - // '../../enums': { - // topicMap: { - // transfer: { - // prepare: { - // functionality: 'transfer', - // action: 'prepare' - // } - // } - // } - // } - // }) - // const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) - // test.equal(result, true) - // test.end() - // }) - - // produceParticipantMessageTest.test('produce a participant message', async (test) => { - // try { - // await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) - // } catch (e) { - // test.ok(e instanceof Error) - // } - // test.end() - // }) - - // produceParticipantMessageTest.end() - // }) - - // utilityTest.test('commitMessageSync should', commitMessageSyncTest => { - // commitMessageSyncTest.test('commit message when auto commit is disabled', async (test) => { - // const kafkaTopic = 'test-topic' - // const message = 'message' - // const commitMessageSyncStub = sandbox.stub() - // const consumerStub = { - // commitMessageSync: commitMessageSyncStub - // } - // const ConsumerStub = { - // isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), - // getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) - // } - // const UtilityProxy = rewire(`${src}/util/kafka`) - - // await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) - // test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') - // test.ok(commitMessageSyncStub.withArgs(message).calledOnce, 'commitMessageSyncStub called once') - // test.end() - // }) - - // commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { - // const kafkaTopic = 'test-topic' - // const message = 'message' - // const commitMessageSyncStub = sandbox.stub() - // const consumerStub = { - // commitMessageSync: commitMessageSyncStub - // } - // const ConsumerStub = { - // isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(true), - // getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) - // } - - // const UtilityProxy = rewire(`${src}/util/kafka`) - - // await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) - // test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') - // test.equal(commitMessageSyncStub.withArgs(message).callCount, 0, 'commitMessageSyncStub not called') - // test.end() - // }) - - // commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { - // const kafkaTopic = 'fail-topic' - // const message = 'message' - // const ConsumerStub = { - // isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), - // getConsumer: sandbox.stub().withArgs(kafkaTopic).throwsException(new Error('No Consumer')) - // } - - // const UtilityProxy = rewire(`${src}/util/kafka`) - // try { - // await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) - // test.fail('No error thrown') - // test.end() - // } catch (err) { - // test.ok(err instanceof Error) - // test.end() - // } - // }) - - // commitMessageSyncTest.end() - // }) - - // utilityTest.test('proceed should', async proceedTest => { - // const commitMessageSyncStub = sandbox.stub().returns(Promise.resolve()) - // const produceGeneralMessageStub = sandbox.stub().returns(Promise.resolve()) - // const successState = Enum.Events.EventStatus.SUCCESS - // const from = 'from' - // const extList = [] - // const message = { - // value: { - // content: { - // payload: { - // extensionList: extList - // }, - // headers: { - // 'fspiop-destination': 'dfsp' - // } - // }, - // from - // } - // } - // const transferId = Uuid() - // const kafkaTopic = 'kafkaTopic' - // const consumer = 'consumer' - // const producer = 'producer' - // const params = { message, transferId, kafkaTopic, consumer, decodedPayload: message.value.content.payload, producer } - // const eventDetail = { functionality: 'functionality', action: 'action' } - // const UtilityProxy = rewire(`${src}/util/kafka/index`) - // UtilityProxy.__set__('commitMessageSync', commitMessageSyncStub) - // UtilityProxy.__set__('produceGeneralMessage', produceGeneralMessageStub) - - // proceedTest.test('commitMessageSync when consumerCommit and produce toDestination', async test => { - // const opts = { consumerCommit: true, eventDetail, toDestination: true } - // try { - // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - // test.ok(commitMessageSyncStub.calledOnce, 'commitMessageSyncStub called once') - // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).calledOnce, 'produceGeneralMessageStub called once') - // test.equal(result, true, 'result returned') - // } catch (err) { - // test.fail(err.message) - // } - - // test.end() - // }) - - // proceedTest.test('commitMessageSync when consumerCommit and toDestination is string', async test => { - // const opts = { consumerCommit: true, eventDetail, toDestination: 'dfsp1' } - // try { - // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - // test.ok(commitMessageSyncStub.calledTwice, 'commitMessageSyncStub called once') - // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).secondCall, 'produceGeneralMessageStub called once') - // test.equal(result, true, 'result returned') - // } catch (err) { - // test.fail(err.message) - // } - - // test.end() - // }) - - // proceedTest.test('produce fromSwitch and do not stop timer', async test => { - // const opts = { fromSwitch: true, eventDetail } - // try { - // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') - // test.equal(message.value.to, from, 'message destination set to sender') - // test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') - // test.equal(result, true, 'result returned') - // } catch (err) { - // test.fail(err.message) - // } - - // test.end() - // }) - - // proceedTest.test('produce fromSwitch without headers', async test => { - // const opts = { fromSwitch: true, eventDetail } - // try { - // const localParams = clone(params) - // delete localParams.message.value.content.headers - // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) - // test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') - // test.equal(message.value.to, from, 'message destination set to sender') - // test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') - // test.equal(result, true, 'result returned') - // } catch (err) { - // test.fail(err.message) - // } - - // test.end() - // }) - - // proceedTest.test('create error status and end timer', async test => { - // const desc = 'desc' - // const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() - // const opts = { fspiopError } - // try { - // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) - // test.equal(result, true, 'result returned') - // } catch (err) { - // test.fail(err.message) - // } - - // test.end() - // }) - - // proceedTest.test('create error status and end timer with uriParams', async test => { - // const desc = 'desc' - // const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() - // const opts = { fspiopError } - // try { - // const localParams = MainUtil.clone(params) - // localParams.message.value.content.uriParams = { id: Uuid() } - // const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) - // test.equal(result, true, 'result returned') - // } catch (err) { - // test.fail(err.message) - // } - - // test.end() - // }) - - // proceedTest.end() - // }) + utilityTest.test('produceGeneralMessage should', produceGeneralMessageTest => { + produceGeneralMessageTest.test('produce a general message', async (test) => { + const span = EventSdk.Tracer.createSpan('test_span') + const result = await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS, undefined, span) + test.equal(result, true) + test.end() + }) + + produceGeneralMessageTest.test('produce a general message using topicMap', async (test) => { + const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + '../../enums': { + topicMap: { + transfer: { + prepare: { + functionality: 'transfer', + action: 'prepare' + } + } + } + } + }) + const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) + test.equal(result, true) + test.end() + }) + + produceGeneralMessageTest.test('produce a notification message using topicMap', async (test) => { + const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + '../../enums': { + topicMap: { + transfer: { + prepare: { + functionality: 'transfer', + action: 'prepare' + } + } + } + } + }) + const result = await ModuleProxy.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) + test.equal(result, true) + test.end() + }) + + produceGeneralMessageTest.test('produce a general message', async (test) => { + try { + await Utility.produceGeneralMessage(Config.KAFKA_CONFIG, KafkaProducer, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) + } catch (e) { + test.ok(e instanceof Error) + } + test.end() + }) + + produceGeneralMessageTest.end() + }) + + utilityTest.test('produceParticipantMessage should', produceParticipantMessageTest => { + produceParticipantMessageTest.test('produce a participant message', async (test) => { + const result = await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) + test.equal(result, true) + test.end() + }) + + produceParticipantMessageTest.test('produce a participant message using topicMap', async (test) => { + const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + '../../enums': { + topicMap: { + transfer: { + prepare: { + functionality: 'transfer', + action: 'prepare' + } + } + } + } + }) + const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, PREPARE, messageProtocol, Enum.Events.EventStatus.SUCCESS) + test.equal(result, true) + test.end() + }) + + produceParticipantMessageTest.test('produce a notification message using topicMap', async (test) => { + const ModuleProxy = Proxyquire('../../../../src/util/kafka', { + '../../enums': { + topicMap: { + transfer: { + prepare: { + functionality: 'transfer', + action: 'prepare' + } + } + } + } + }) + const result = await ModuleProxy.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.ABORT, messageProtocol, Enum.Events.EventStatus.SUCCESS) + test.equal(result, true) + test.end() + }) + + produceParticipantMessageTest.test('produce a participant message', async (test) => { + try { + await Utility.produceParticipantMessage(Config.KAFKA_CONFIG, KafkaProducer, participantName, TRANSFER, 'invalid', messageProtocol, Enum.Events.EventStatus.SUCCESS) + } catch (e) { + test.ok(e instanceof Error) + } + test.end() + }) + + produceParticipantMessageTest.end() + }) + + utilityTest.test('commitMessageSync should', commitMessageSyncTest => { + commitMessageSyncTest.test('commit message when auto commit is disabled', async (test) => { + const kafkaTopic = 'test-topic' + const message = 'message' + const commitMessageSyncStub = sandbox.stub() + const consumerStub = { + commitMessageSync: commitMessageSyncStub + } + const ConsumerStub = { + isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), + getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) + } + const UtilityProxy = rewire(`${src}/util/kafka`) + + await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) + test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') + test.ok(commitMessageSyncStub.withArgs(message).calledOnce, 'commitMessageSyncStub called once') + test.end() + }) + + commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { + const kafkaTopic = 'test-topic' + const message = 'message' + const commitMessageSyncStub = sandbox.stub() + const consumerStub = { + commitMessageSync: commitMessageSyncStub + } + const ConsumerStub = { + isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(true), + getConsumer: sandbox.stub().withArgs(kafkaTopic).returns(consumerStub) + } + + const UtilityProxy = rewire(`${src}/util/kafka`) + + await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) + test.ok(ConsumerStub.isConsumerAutoCommitEnabled.withArgs(kafkaTopic).calledOnce, 'isConsumerAutoCommitEnabled called once') + test.equal(commitMessageSyncStub.withArgs(message).callCount, 0, 'commitMessageSyncStub not called') + test.end() + }) + + commitMessageSyncTest.test('skip committing message when auto commit is enabled', async (test) => { + const kafkaTopic = 'fail-topic' + const message = 'message' + const ConsumerStub = { + isConsumerAutoCommitEnabled: sandbox.stub().withArgs(kafkaTopic).returns(false), + getConsumer: sandbox.stub().withArgs(kafkaTopic).throwsException(new Error('No Consumer')) + } + + const UtilityProxy = rewire(`${src}/util/kafka`) + try { + await UtilityProxy.commitMessageSync(ConsumerStub, kafkaTopic, message) + test.fail('No error thrown') + test.end() + } catch (err) { + test.ok(err instanceof Error) + test.end() + } + }) + + commitMessageSyncTest.end() + }) + + utilityTest.test('proceed should', async proceedTest => { + const commitMessageSyncStub = sandbox.stub().returns(Promise.resolve()) + const produceGeneralMessageStub = sandbox.stub().returns(Promise.resolve()) + const successState = Enum.Events.EventStatus.SUCCESS + const from = 'from' + const extList = [] + const message = { + value: { + content: { + payload: { + extensionList: extList + }, + headers: { + 'fspiop-destination': 'dfsp' + } + }, + from + } + } + const transferId = Uuid() + const kafkaTopic = 'kafkaTopic' + const consumer = 'consumer' + const producer = 'producer' + const params = { message, transferId, kafkaTopic, consumer, decodedPayload: message.value.content.payload, producer } + const eventDetail = { functionality: 'functionality', action: 'action' } + const UtilityProxy = rewire(`${src}/util/kafka/index`) + UtilityProxy.__set__('commitMessageSync', commitMessageSyncStub) + UtilityProxy.__set__('produceGeneralMessage', produceGeneralMessageStub) + + proceedTest.test('commitMessageSync when consumerCommit and produce toDestination', async test => { + const opts = { consumerCommit: true, eventDetail, toDestination: true } + try { + const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + test.ok(commitMessageSyncStub.calledOnce, 'commitMessageSyncStub called once') + test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).calledOnce, 'produceGeneralMessageStub called once') + test.equal(result, true, 'result returned') + } catch (err) { + test.fail(err.message) + } + + test.end() + }) + + proceedTest.test('commitMessageSync when consumerCommit and toDestination is string', async test => { + const opts = { consumerCommit: true, eventDetail, toDestination: 'dfsp1' } + try { + const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + test.ok(commitMessageSyncStub.calledTwice, 'commitMessageSyncStub called once') + test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).secondCall, 'produceGeneralMessageStub called once') + test.equal(result, true, 'result returned') + } catch (err) { + test.fail(err.message) + } + + test.end() + }) + + proceedTest.test('produce fromSwitch and do not stop timer', async test => { + const opts = { fromSwitch: true, eventDetail } + try { + const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') + test.equal(message.value.to, from, 'message destination set to sender') + test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') + test.equal(result, true, 'result returned') + } catch (err) { + test.fail(err.message) + } + + test.end() + }) + + proceedTest.test('produce fromSwitch without headers', async test => { + const opts = { fromSwitch: true, eventDetail } + try { + const localParams = clone(params) + delete localParams.message.value.content.headers + const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) + test.ok(produceGeneralMessageStub.withArgs(Config.KAFKA_CONFIG, producer, eventDetail.functionality, eventDetail.action, message.value, successState).lastCall, 'produceGeneralMessageStub called twice') + test.equal(message.value.to, from, 'message destination set to sender') + test.equal(message.value.from, Enum.Http.Headers.FSPIOP.SWITCH.value, 'from set to switch') + test.equal(result, true, 'result returned') + } catch (err) { + test.fail(err.message) + } + + test.end() + }) + + proceedTest.test('create error status and end timer', async test => { + const desc = 'desc' + const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() + const opts = { fspiopError } + try { + const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, params, opts) + test.equal(result, true, 'result returned') + } catch (err) { + test.fail(err.message) + } + + test.end() + }) + + proceedTest.test('create error status and end timer with uriParams', async test => { + const desc = 'desc' + const fspiopError = ErrorHandler.Factory.createInternalServerFSPIOPError(desc).toApiErrorObject() + const opts = { fspiopError } + try { + const localParams = MainUtil.clone(params) + localParams.message.value.content.uriParams = { id: Uuid() } + const result = await UtilityProxy.proceed(Config.KAFKA_CONFIG, localParams, opts) + test.equal(result, true, 'result returned') + } catch (err) { + test.fail(err.message) + } + + test.end() + }) + + proceedTest.end() + }) utilityTest.end() }) From 8b42b22a4249e5a37e6cc5abce324465f0e0dc9c Mon Sep 17 00:00:00 2001 From: Lewis Daly Date: Fri, 19 Nov 2021 15:54:11 +0930 Subject: [PATCH 3/6] chore: remove consoles --- src/util/kafka/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/kafka/index.js b/src/util/kafka/index.js index f7040181..b57d4b72 100644 --- a/src/util/kafka/index.js +++ b/src/util/kafka/index.js @@ -143,9 +143,7 @@ const transformAccountToTopicName = (template, participantName, functionality, a const getKafkaConfig = (kafkaConfig, flow, functionality, action) => { try { const flowObject = kafkaConfig[flow] - console.log('flowObject', flowObject) const functionalityObject = flowObject[functionality] - console.log('functionalityObject', functionalityObject) const actionObject = action ? functionalityObject[action] : functionalityObject actionObject.config.logger = Logger return actionObject.config From d61233ef9168ecdbffcc8c674412401aef2fc255 Mon Sep 17 00:00:00 2001 From: Lewis Daly Date: Tue, 23 Nov 2021 12:37:44 +0930 Subject: [PATCH 4/6] chore: remove unused test --- test/unit/util/kafka/index.test.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/test/unit/util/kafka/index.test.js b/test/unit/util/kafka/index.test.js index 42905feb..65d14ae7 100644 --- a/test/unit/util/kafka/index.test.js +++ b/test/unit/util/kafka/index.test.js @@ -245,32 +245,6 @@ Test('Utility Test', utilityTest => { test.end() }) - // getKafkaConfigTest.test('return the Kafka config for NOTIFICATION ABORT_VALIDATION', test => { - // const config = Utility.getKafkaConfig( - // Config.KAFKA_CONFIG, - // CONSUMER, - // Enum.Events.Event.Type.POSITION.toUpperCase(), - // Enum.Events.Event.Action.ABORT_VALIDATION.toUpperCase() - // ) - // console.log('config is', config) - // test.ok(config.rdkafkaConf !== undefined) - // test.ok(config.options !== undefined) - // test.end() - // }) - - // getKafkaConfigTest.test('return the Kafka config for NOTIFICATION RESERVED_ABORTED', test => { - // const config = Utility.getKafkaConfig( - // Config.KAFKA_CONFIG, - // CONSUMER, - // Enum.Events.Event.Type.NOTIFICATION.toUpperCase(), - // Enum.Events.Event.Action.RESERVED_ABORTED.toUpperCase() - // ) - // console.log('config is', config) - // test.ok(config.rdkafkaConf !== undefined) - // test.ok(config.options !== undefined) - // test.end() - // }) - getKafkaConfigTest.test('throw and error if Kafka config not in default.json', test => { try { Utility.getKafkaConfig(Config.KAFKA_CONFIG, CONSUMER, TRANSFER, PREPARE) From 8f5831c690241a2ce9f2c89e3792b934acbe76ea Mon Sep 17 00:00:00 2001 From: Lewis Daly Date: Wed, 24 Nov 2021 09:11:58 +0930 Subject: [PATCH 5/6] fix(vulns): run npm audit, ignore unfixable medium vulns for 1 month --- audit-resolve.json | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/audit-resolve.json b/audit-resolve.json index f05f94d4..317a8e97 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -39,6 +39,46 @@ "decision": "ignore", "madeAt": 1636956491233, "expiresAt": 1639548471465 + }, + "1004854|widdershins>openapi-sampler>json-pointer": { + "decision": "ignore", + "madeAt": 1637710894806, + "expiresAt": 1640302887336 + }, + "1004869|widdershins>swagger2openapi>better-ajv-errors>jsonpointer": { + "decision": "ignore", + "madeAt": 1637710898484, + "expiresAt": 1640302887336 + }, + "1004869|widdershins>swagger2openapi>oas-validator>better-ajv-errors>jsonpointer": { + "decision": "ignore", + "madeAt": 1637710898484, + "expiresAt": 1640302887336 + }, + "1004946|widdershins>yargs>string-width>strip-ansi>ansi-regex": { + "decision": "ignore", + "madeAt": 1637710902961, + "expiresAt": 1640302887336 + }, + "1004946|widdershins>yargs>cliui>string-width>strip-ansi>ansi-regex": { + "decision": "ignore", + "madeAt": 1637710902961, + "expiresAt": 1640302887336 + }, + "1005383|shins>sanitize-html": { + "decision": "ignore", + "madeAt": 1637710905808, + "expiresAt": 1640302887336 + }, + "1005384|shins>sanitize-html": { + "decision": "ignore", + "madeAt": 1637710905808, + "expiresAt": 1640302887336 + }, + "1005534|widdershins>yargs>yargs-parser": { + "decision": "ignore", + "madeAt": 1637710908069, + "expiresAt": 1640302887336 } }, "rules": {}, From 19f095b4f09db5429079a8ac5cc8bd81917849a6 Mon Sep 17 00:00:00 2001 From: Miguel de Barros Date: Mon, 7 Feb 2022 11:57:24 +0200 Subject: [PATCH 6/6] chore: updated dependencies - updated dependencies - removed "@mojaloop/sdk-standard-components" from `ncurc.json` file - fixed lint issues --- .ncurc.json | 1 - audit-resolve.json | 46 +- package-lock.json | 1199 ++++++++++++++-------------- package.json | 20 +- test/unit/util/kafka/index.test.js | 6 +- 5 files changed, 654 insertions(+), 618 deletions(-) diff --git a/.ncurc.json b/.ncurc.json index 81c49cbe..a5569505 100644 --- a/.ncurc.json +++ b/.ncurc.json @@ -1,5 +1,4 @@ { "reject": [ - "@mojaloop/sdk-standard-components" ] } diff --git a/audit-resolve.json b/audit-resolve.json index 5654196b..77a56898 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -42,43 +42,57 @@ }, "1004854|widdershins>openapi-sampler>json-pointer": { "decision": "ignore", - "madeAt": 1637925238134, - "expiresAt": 1640517233443 + "madeAt": 1644227612906, + "expiresAt": 1646819457744 }, "1004869|widdershins>swagger2openapi>better-ajv-errors>jsonpointer": { "decision": "ignore", - "madeAt": 1637925239670, - "expiresAt": 1640517233443 + "madeAt": 1644227615371, + "expiresAt": 1646819457744 }, "1004869|widdershins>swagger2openapi>oas-validator>better-ajv-errors>jsonpointer": { "decision": "ignore", - "madeAt": 1637925239670, - "expiresAt": 1640517233443 + "madeAt": 1644227615371, + "expiresAt": 1646819457744 }, "1004946|widdershins>yargs>string-width>strip-ansi>ansi-regex": { "decision": "ignore", - "madeAt": 1637925241156, - "expiresAt": 1640517233443 + "madeAt": 1644227616947, + "expiresAt": 1646819457744 }, "1004946|widdershins>yargs>cliui>string-width>strip-ansi>ansi-regex": { "decision": "ignore", - "madeAt": 1637925241156, - "expiresAt": 1640517233443 + "madeAt": 1644227616947, + "expiresAt": 1646819457744 }, "1005383|shins>sanitize-html": { "decision": "ignore", - "madeAt": 1637925243300, - "expiresAt": 1640517233443 + "madeAt": 1644227618453, + "expiresAt": 1646819457744 }, "1005384|shins>sanitize-html": { "decision": "ignore", - "madeAt": 1637925243300, - "expiresAt": 1640517233443 + "madeAt": 1644227618454, + "expiresAt": 1646819457744 }, "1005534|widdershins>yargs>yargs-parser": { "decision": "ignore", - "madeAt": 1637925244682, - "expiresAt": 1640517233443 + "madeAt": 1644227619978, + "expiresAt": 1646819457744 + }, + "1006899|widdershins>node-fetch": { + "decision": "fix", + "madeAt": 1644227510867 + }, + "1006846|shins>sanitize-html>postcss": { + "decision": "ignore", + "madeAt": 1644227621510, + "expiresAt": 1646819457744 + }, + "1006886|shins>markdown-it": { + "decision": "ignore", + "madeAt": 1644227622831, + "expiresAt": 1646819457744 } }, "rules": {}, diff --git a/package-lock.json b/package-lock.json index 4fcc692c..613077a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -932,6 +932,40 @@ "@hapi/hoek": "9.x.x" } }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@hutson/parse-repository-url": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", @@ -1126,9 +1160,9 @@ } }, "@mojaloop/sdk-standard-components": { - "version": "10.3.2", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-10.3.2.tgz", - "integrity": "sha512-O5DqUL+ncS718nFDFUMx8QO0pmTmg+/CNYuaXPrFfHDgf8c05mgSjg6Z8wt69Auwph6WXWaNjKTQRqZG2/BDdQ==", + "version": "15.13.0", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-15.13.0.tgz", + "integrity": "sha512-KzPP6aqM+Z2Kd0j7jvarPdeNfQnClQw7Uw611l7olUPKMzE78z6S/0HbC/Yt9EGbkTl20Xe46hxD1MJKzBB8pg==", "dev": true, "requires": { "base64url": "3.0.1", @@ -1165,9 +1199,9 @@ } }, "@npmcli/fs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz", - "integrity": "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.0.tgz", + "integrity": "sha512-VhP1qZLXcrXRIaPoqb4YA55JQxLNF3jNR4T55IdOJa3+IFJKNYHtPvtXx8slmeMavj37vCzCfrqQM1vWLsYKLA==", "dev": true, "requires": { "@gar/promisify": "^1.0.1", @@ -1503,9 +1537,9 @@ } }, "agentkeepalive": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.4.tgz", - "integrity": "sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", + "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", "dev": true, "requires": { "debug": "^4.1.0", @@ -1514,9 +1548,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -1541,9 +1575,9 @@ } }, "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -1593,23 +1627,6 @@ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -1794,6 +1811,29 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array.prototype.every": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.3.tgz", + "integrity": "sha512-vWnriJI//SOMOWtXbU/VXhJ/InfnNHPF6BLKn5WfY8xXy+NWql0fUy20GO3sdqBhCAO+qw8S/E5nJiZX+QFdCA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "is-string": "^1.0.7" + }, + "dependencies": { + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + } + } + }, "array.prototype.flat": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", @@ -1967,9 +2007,9 @@ } }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { @@ -2036,11 +2076,11 @@ "dev": true }, "axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", "requires": { - "follow-redirects": "^1.14.4" + "follow-redirects": "^1.14.7" } }, "balanced-match": { @@ -2174,9 +2214,9 @@ } }, "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "chalk": { @@ -2451,12 +2491,6 @@ "integrity": "sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==", "dev": true }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "cheerio": { "version": "1.0.0-rc.9", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.9.tgz", @@ -2528,54 +2562,23 @@ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, "cli-table": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.9.tgz", - "integrity": "sha512-7eA6hFtAZwVx3dWAGoaBqTrzWko5jRUFKpHT64ZHkJpaA3y5wf5NlLjguqTRmqycatJZiwftODYYyGNLbQ7MuA==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", + "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", "dev": true, "requires": { - "colors": "1.0.3", - "strip-ansi": "^6.0.1" + "colors": "1.0.3" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "colors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } } } }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true - }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -3076,9 +3079,9 @@ } }, "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" }, "cookie-signature": { "version": "1.0.6", @@ -3397,9 +3400,9 @@ } }, "dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz", + "integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==" }, "dotgitignore": { "version": "2.1.0", @@ -3637,9 +3640,9 @@ } }, "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true } } @@ -3713,50 +3716,79 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -3770,29 +3802,92 @@ } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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 }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" } }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, + "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 + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -3805,34 +3900,49 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } }, "strip-json-comments": { @@ -3841,11 +3951,23 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "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 + "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" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -4188,9 +4310,9 @@ } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" @@ -4203,14 +4325,14 @@ "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" } }, "esprima": { @@ -4359,26 +4481,15 @@ "integrity": "sha512-kXU1FiTsGT8PyMKtFM074RK/VBpzwuQJicAHqBpsPDeTXBQiSALPjkjKXlyKdG/GP6lR7bBaEkq8qdoO2geu9g==", "dev": true }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -4441,12 +4552,12 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "fill-keys": { @@ -4509,31 +4620,19 @@ "dev": true }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } + "flatted": "^3.1.0", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "fn.name": { @@ -4543,9 +4642,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", - "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==" + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", + "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" }, "for-each": { "version": "0.3.3", @@ -4999,17 +5098,25 @@ "dev": true }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + } } }, "got": { @@ -5158,12 +5265,13 @@ "dev": true }, "has-dynamic-import": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.0.0.tgz", - "integrity": "sha512-GYPi/aZmACJVrVfEhP1rNUFmtCuK+SQ96mn8Bs7mXiGZRAJiI4VjaMmjj4uuvW8qaF085uWJvyJk9UNYUIYn0A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.0.1.tgz", + "integrity": "sha512-X3fbtsZmwb6W7fJGR9o7x65fZoodygCrZ3TVycvghP62yYQfS0t4RS0Qcz+j5tQYUKeSWS09tHkWW6WhFV3XhQ==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" } }, "has-flag": { @@ -5287,9 +5395,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -5480,135 +5588,48 @@ }, "import-lazy": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "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 - }, - "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", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" } }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -5894,10 +5915,14 @@ } }, "is-weakset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz", - "integrity": "sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==", - "dev": true + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } }, "is-windows": { "version": "1.0.2", @@ -6352,13 +6377,13 @@ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "libnpmconfig": { @@ -7145,9 +7170,12 @@ } }, "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } }, "node-fetch-h2": { "version": "2.3.0", @@ -7367,21 +7395,21 @@ } }, "npm-check-updates": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.0.2.tgz", - "integrity": "sha512-VzMNuUXqRta1qpBkFiE0hKfpOGP2FbYwpBBTcJXoJWppOPBSi/paWFVhPVWf7PgRoDWegK+PDAWKhIvhyrBrIg==", + "version": "12.2.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.2.1.tgz", + "integrity": "sha512-fqfH2USwTLgho8HaC79i5Bl+RH3zV15AbdtJQTCaOAp9L3D2W8k+jsfuwee2vSTUrt6IUTXPbzwUIYo4/TQdYA==", "dev": true, "requires": { "chalk": "^4.1.2", "cint": "^8.2.1", - "cli-table": "^0.3.6", - "commander": "^6.2.1", + "cli-table": "^0.3.11", + "commander": "^8.3.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", - "hosted-git-info": "^4.0.2", + "hosted-git-info": "^4.1.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", @@ -7397,7 +7425,7 @@ "rimraf": "^3.0.2", "semver": "^7.3.5", "semver-utils": "^1.1.4", - "source-map-support": "^0.5.20", + "source-map-support": "^0.5.21", "spawn-please": "^1.0.0", "update-notifier": "^5.1.0" }, @@ -7437,9 +7465,9 @@ "dev": true }, "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", "dev": true }, "find-up": { @@ -7458,6 +7486,15 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -7589,17 +7626,81 @@ } }, "npm-registry-fetch": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz", - "integrity": "sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-12.0.1.tgz", + "integrity": "sha512-ricy4ezH3Uv0d4am6RSwHjCYTWJI74NJjurIigWMAG7Vs3PFyd0TUlkrez5L0AgaPzDLRsEzqb5cOZ/Ue01bmA==", "dev": true, "requires": { - "make-fetch-happen": "^9.0.1", + "make-fetch-happen": "^10.0.0", "minipass": "^3.1.3", "minipass-fetch": "^1.3.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.0.0", "npm-package-arg": "^8.0.0" + }, + "dependencies": { + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true + }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "make-fetch-happen": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.0.tgz", + "integrity": "sha512-CREcDkbKZZ64g5MN1FT+u58mDHX9FQFFtFyio5HonX44BdQdytqPZBXUz+6ibi2w/6ncji59f2phyXGSMGpgzA==", + "dev": true, + "requires": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true + } } }, "npm-run-path": { @@ -8534,19 +8635,10 @@ "fn.name": "1.x.x" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, "openapi-backend": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/openapi-backend/-/openapi-backend-5.0.1.tgz", - "integrity": "sha512-DHjQ7d3izTgIy6lSD+WGLhlunZ+fkyleHjNnUSGjHC7Lii3ukuB3N/J74NaCHf5mrDlXgCfylFMRVtq4oDwPKQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/openapi-backend/-/openapi-backend-5.2.0.tgz", + "integrity": "sha512-ykzFWC6pOPdw55/Qx7oxncymXh4Vuv+M5QCgaoIo38lAQ+hhzZXKl9AtSQfa6di9g5rKFs2yrGeAzUV7uLv6RQ==", "requires": { "@apidevtools/json-schema-ref-parser": "^9.0.7", "ajv": "^8.6.2", @@ -8554,8 +8646,8 @@ "cookie": "^0.4.0", "lodash": "^4.17.15", "mock-json-schema": "^1.0.7", - "openapi-schema-validator": "^9.2.0", - "openapi-types": "^9.2.0", + "openapi-schema-validator": "^10.0.0", + "openapi-types": "^10.0.0", "qs": "^6.9.3" } }, @@ -8569,20 +8661,20 @@ } }, "openapi-schema-validator": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/openapi-schema-validator/-/openapi-schema-validator-9.3.1.tgz", - "integrity": "sha512-5wpFKMoEbUcjiqo16jIen3Cb2+oApSnYZpWn8WQdRO2q/dNQZZl8Pz6ESwCriiyU5AK4i5ZI6+7O3bHQr6+6+g==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/openapi-schema-validator/-/openapi-schema-validator-10.0.0.tgz", + "integrity": "sha512-tfXR7kLhI2f7QgArfJn5imkFJ1dvLOO5r4b1JZQoW3PgPb3caOiaWZ+H1iLzFj3IG1gmM3BrYZD1sAvWtDwUCA==", "requires": { "ajv": "^8.1.0", "ajv-formats": "^2.0.2", "lodash.merge": "^4.6.1", - "openapi-types": "^9.3.1" + "openapi-types": "^10.0.0" } }, "openapi-types": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-9.3.1.tgz", - "integrity": "sha512-/Yvsd2D7miYB4HLJ3hOOS0+vnowQpaT75FsHzr/y5M9P4q9bwa7RcbW2YdH6KZBn8ceLbKGnHxMZ1CHliGHUFw==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-10.0.0.tgz", + "integrity": "sha512-Y8xOCT2eiKGYDzMW9R4x5cmfc3vGaaI4EL2pwhDmodWw1HlK18YcZ4uJxc7Rdp7/gGzAygzH9SXr6GKYIXbRcQ==" }, "opn": { "version": "5.5.0", @@ -8593,17 +8685,17 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "optjs": { @@ -8628,12 +8720,6 @@ "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", "dev": true }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "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", @@ -8719,9 +8805,9 @@ } }, "pacote": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-12.0.2.tgz", - "integrity": "sha512-Ar3mhjcxhMzk+OVZ8pbnXdb0l8+pimvlsqBGRNkble2NVgyqOGE3yrCGi/lAYq7E7NRDMz89R1Wx5HIMCGgeYg==", + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-12.0.3.tgz", + "integrity": "sha512-CdYEl03JDrRO3x18uHjBYA9TyoW8gy+ThVcypcDkxPtKlw76e4ejhYB6i9lJ+/cebbjpqPW/CijjqxwDTts8Ow==", "dev": true, "requires": { "@npmcli/git": "^2.1.0", @@ -8737,7 +8823,7 @@ "npm-package-arg": "^8.0.1", "npm-packlist": "^3.0.0", "npm-pick-manifest": "^6.0.0", - "npm-registry-fetch": "^11.0.0", + "npm-registry-fetch": "^12.0.0", "promise-retry": "^2.0.1", "read-package-json-fast": "^2.0.1", "rimraf": "^3.0.2", @@ -9090,9 +9176,9 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prepend-http": { @@ -9264,9 +9350,9 @@ "dev": true }, "qs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", - "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", "requires": { "side-channel": "^1.0.4" } @@ -9364,9 +9450,9 @@ "dev": true }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -9559,9 +9645,9 @@ } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "registry-auth-token": { @@ -9643,16 +9729,6 @@ "lowercase-keys": "^1.0.0" } }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "resumer": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", @@ -9675,12 +9751,12 @@ "dev": true }, "rewire": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-5.0.0.tgz", - "integrity": "sha512-1zfitNyp9RH5UDyGGLe9/1N0bMlPQ0WrX0Tmg11kMHBpqwPJI4gfPpP7YngFyLbFmhXh19SToAG0sKKEFcOIJA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rewire/-/rewire-6.0.0.tgz", + "integrity": "sha512-7sZdz5dptqBCapJYocw9EcppLU62KMEqDLIILJnNET2iqzXHaQfaVP5SOJ06XvjX+dNIDJbzjw0ZWzrgDhtjYg==", "dev": true, "requires": { - "eslint": "^6.8.0" + "eslint": "^7.32.0" } }, "right-align": { @@ -9700,12 +9776,6 @@ "glob": "^7.1.3" } }, - "run-async": { - "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.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -9715,23 +9785,6 @@ "queue-microtask": "^1.2.2" } }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -9968,32 +10021,32 @@ } }, "sinon": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.1.tgz", - "integrity": "sha512-iGu29Xhym33ydkAT+aNQFBINakjq69kKO6ByPvTsm3yyIACfyQttRTP03aBP/I8GfhFmLzrnKwNNkr0ORb1udg==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", + "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^8.1.0", - "@sinonjs/samsam": "^6.0.2", + "@sinonjs/fake-timers": "^9.0.0", + "@sinonjs/samsam": "^6.1.1", "diff": "^5.0.0", - "nise": "^5.1.0", + "nise": "^5.1.1", "supports-color": "^7.2.0" }, "dependencies": { "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.0.tgz", + "integrity": "sha512-M8vapsv9qQupMdzrVzkn5rb9jG7aUTEPAZdMtME2PuBaefksFZVE2C1g4LBRTkF/k3nRDNbDc5tp5NFC1PEYxA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" } }, "@sinonjs/samsam": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", - "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", + "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -10020,27 +10073,16 @@ "dev": true }, "nise": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", - "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", + "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": ">=5", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - } } }, "path-to-regexp": { @@ -10076,20 +10118,38 @@ "dev": true }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.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=", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "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 } } @@ -10101,13 +10161,13 @@ "dev": true }, "socks": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz", - "integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "dev": true, "requires": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" } }, "socks-proxy-agent": { @@ -10122,9 +10182,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -11254,71 +11314,42 @@ } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "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 - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "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==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } } } @@ -11538,11 +11569,12 @@ } }, "tape": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.3.2.tgz", - "integrity": "sha512-F+UjjvUJsEq/D0NwTKtuekTJsN7vpvYT/dvkZuBw7Y+2whC2JIU8syHIlNNkqstmtBu/mVoqhDr1QJGFUl+caA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.5.0.tgz", + "integrity": "sha512-hmsc9J+07tM+evk2Rkv7pkbj70Uoy9k0w1yhnN8Sza8kmjhtUTVNltsjywQjC+4grB+EBMKXiJPTkftX8IrbSA==", "dev": true, "requires": { + "array.prototype.every": "^1.1.3", "call-bind": "^1.0.2", "deep-equal": "^2.0.5", "defined": "^1.0.0", @@ -11551,12 +11583,13 @@ "get-package-type": "^0.1.0", "glob": "^7.2.0", "has": "^1.0.3", - "has-dynamic-import": "^2.0.0", + "has-dynamic-import": "^2.0.1", "inherits": "^2.0.4", "is-regex": "^1.1.4", "minimist": "^1.2.5", - "object-inspect": "^1.11.0", + "object-inspect": "^1.12.0", "object-is": "^1.1.5", + "object-keys": "^1.1.1", "object.assign": "^4.1.2", "resolve": "^2.0.0-next.3", "resumer": "^0.0.0", @@ -11579,9 +11612,9 @@ } }, "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, "resolve": { @@ -11698,15 +11731,6 @@ "resolved": "https://registry.npmjs.org/tiny-opts-parser/-/tiny-opts-parser-0.0.3.tgz", "integrity": "sha1-1sc6f65FiKa7Sh+mgbxmk3a+RRU=" }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -11732,6 +11756,11 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "traceparent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/traceparent/-/traceparent-1.0.0.tgz", @@ -11794,12 +11823,12 @@ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -12066,6 +12095,20 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -12490,26 +12533,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } - } - }, "write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", diff --git a/package.json b/package.json index 40733c9d..d73be60e 100644 --- a/package.json +++ b/package.json @@ -48,15 +48,15 @@ "dependencies": { "@hapi/catbox": "11.1.1", "@hapi/catbox-memory": "5.0.1", - "axios": "0.24.0", + "axios": "0.25.0", "clone": "2.1.2", - "dotenv": "10.0.0", + "dotenv": "16.0.0", "env-var": "7.1.1", "event-stream": "4.0.1", "immutable": "4.0.0", "lodash": "4.17.21", "mustache": "4.2.0", - "openapi-backend": "5.0.1", + "openapi-backend": "5.2.0", "raw-body": "2.4.2", "rc": "1.2.8", "shins": "2.6.0", @@ -71,23 +71,23 @@ "@mojaloop/central-services-logger": "10.6.2", "@mojaloop/central-services-metrics": "11.0.0", "@mojaloop/event-sdk": "10.7.1", - "@mojaloop/sdk-standard-components": "10.3.2", - "ajv": "8.8.2", + "@mojaloop/sdk-standard-components": "15.13.0", + "ajv": "8.10.0", "ajv-keywords": "5.1.0", "base64url": "3.0.1", "chance": "1.1.8", "npm-audit-resolver": "2.3.1", - "npm-check-updates": "12.0.2", + "npm-check-updates": "12.2.1", "nyc": "15.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", - "rewire": "5.0.0", - "sinon": "12.0.1", + "rewire": "6.0.0", + "sinon": "13.0.1", "standard": "16.0.4", "standard-version": "9.3.2", "tap-spec": "^5.0.0", "tap-xunit": "2.4.1", - "tape": "5.3.2", + "tape": "5.5.0", "tapes": "4.1.0" }, "peerDependencies": { @@ -95,7 +95,7 @@ "@mojaloop/central-services-logger": "10.6.2", "@mojaloop/central-services-metrics": "11.0.0", "@mojaloop/event-sdk": "10.7.1", - "ajv": "8.8.2", + "ajv": "8.10.0", "ajv-keywords": "5.1.0" }, "peerDependenciesMeta": { diff --git a/test/unit/util/kafka/index.test.js b/test/unit/util/kafka/index.test.js index 65d14ae7..8a88f06a 100644 --- a/test/unit/util/kafka/index.test.js +++ b/test/unit/util/kafka/index.test.js @@ -131,7 +131,7 @@ Test('Utility Test', utilityTest => { const expected = { functionalityMapped: 'transfer', actionMapped: 'prepare' } // Act const result = _getFunctionalityAction('transfer', 'prepare') - + // Assert test.deepEqual(result, expected) test.end() @@ -142,7 +142,7 @@ Test('Utility Test', utilityTest => { const expected = { functionalityMapped: 'notification', actionMapped: 'event' } // Act const result = _getFunctionalityAction('notification', 'abort-validation') - + // Assert test.deepEqual(result, expected) test.end() @@ -153,7 +153,7 @@ Test('Utility Test', utilityTest => { const expected = { functionalityMapped: 'notification', actionMapped: 'event' } // Act const result = _getFunctionalityAction('notification', 'reserved-aborted') - + // Assert test.deepEqual(result, expected) test.end()