diff --git a/.github/workflows/test_dlt_connector.yml b/.github/workflows/test_dlt_connector.yml index 8628f9f37..1096f415d 100644 --- a/.github/workflows/test_dlt_connector.yml +++ b/.github/workflows/test_dlt_connector.yml @@ -60,15 +60,13 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - - - name: Download Docker Image - uses: actions/download-artifact@v3 - with: - name: docker-dlt-connector-test - path: /tmp + + - name: DLT-Connector | docker-compose mariadb + run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb - - name: Load Docker Image - run: docker load < /tmp/dlt-connector.tar + - name: Sleep for 30 seconds + run: sleep 30s + shell: bash - - name: Unit tests - run: docker run --env NODE_ENV=test --rm gradido/dlt-connector:test yarn run test + - name: DLT-Connector | Unit tests + run: cd dlt-database && yarn && yarn build && cd ../dlt-connector && yarn && yarn test diff --git a/backend/jest.config.js b/backend/jest.config.js index 5d562bdc5..8b322d76c 100644 --- a/backend/jest.config.js +++ b/backend/jest.config.js @@ -7,7 +7,7 @@ module.exports = { collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'], coverageThreshold: { global: { - lines: 83, + lines: 85, }, }, setupFiles: ['/test/testSetup.ts'], diff --git a/backend/src/apis/DltConnectorClient.ts b/backend/src/apis/DltConnectorClient.ts index 593072eef..f01a55d6c 100644 --- a/backend/src/apis/DltConnectorClient.ts +++ b/backend/src/apis/DltConnectorClient.ts @@ -78,27 +78,34 @@ export class DltConnectorClient { * transmit transaction via dlt-connector to iota * and update dltTransactionId of transaction in db with iota message id */ - public async transmitTransaction(transaction?: DbTransaction | null): Promise { - if (transaction) { - const typeString = getTransactionTypeString(transaction.typeId) - const secondsSinceEpoch = Math.round(transaction.balanceDate.getTime() / 1000) - const amountString = transaction.amount.toString() - try { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const { data } = await this.client.rawRequest(sendTransaction, { - input: { - type: typeString, - amount: amountString, - createdAt: secondsSinceEpoch, + public async transmitTransaction( + transaction: DbTransaction, + senderCommunityUuid?: string, + recipientCommunityUuid?: string, + ): Promise { + const typeString = getTransactionTypeString(transaction.typeId) + const amountString = transaction.amount.toString() + try { + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const { data } = await this.client.rawRequest(sendTransaction, { + input: { + senderUser: { + uuid: transaction.userGradidoID, + communityUuid: senderCommunityUuid, }, - }) - // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access - return data.sendTransaction.dltTransactionIdHex - } catch (e) { - throw new LogError('Error send sending transaction to dlt-connector: ', e) - } - } else { - throw new LogError('parameter transaction not set...') + recipientUser: { + uuid: transaction.linkedUserGradidoID, + communityUuid: recipientCommunityUuid, + }, + amount: amountString, + type: typeString, + createdAt: transaction.balanceDate.toString(), + }, + }) + // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access + return data.sendTransaction.dltTransactionIdHex + } catch (e) { + throw new LogError('Error send sending transaction to dlt-connector: ', e) } } } diff --git a/backend/src/federation/client/1_0/query/settleSendCoins.ts b/backend/src/federation/client/1_0/query/settleSendCoins.ts index 206a6544c..f5143b27d 100644 --- a/backend/src/federation/client/1_0/query/settleSendCoins.ts +++ b/backend/src/federation/client/1_0/query/settleSendCoins.ts @@ -27,4 +27,4 @@ export const settleSendCoins = gql` senderUserName: $senderUserName ) } -*/ \ No newline at end of file +*/ diff --git a/backend/src/graphql/resolver/util/processXComSendCoins.ts b/backend/src/graphql/resolver/util/processXComSendCoins.ts index a7cf4c9f4..d51d75156 100644 --- a/backend/src/graphql/resolver/util/processXComSendCoins.ts +++ b/backend/src/graphql/resolver/util/processXComSendCoins.ts @@ -96,8 +96,8 @@ export async function processXComPendingSendCoins( pendingTx.amount = amount.mul(-1) pendingTx.balance = senderBalance.balance pendingTx.balanceDate = creationDate - pendingTx.decay = senderBalance.decay.decay - pendingTx.decayStart = senderBalance.decay.start + pendingTx.decay = senderBalance ? senderBalance.decay.decay : new Decimal(0) + pendingTx.decayStart = senderBalance ? senderBalance.decay.start : null if (receiverCom.communityUuid) { pendingTx.linkedUserCommunityUuid = receiverCom.communityUuid } @@ -190,6 +190,7 @@ export async function processXComCommittingSendCoins( const receiverFCom = await DbFederatedCommunity.findOneOrFail({ where: { publicKey: receiverCom.publicKey, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment apiVersion: CONFIG.FEDERATION_BACKEND_SEND_ON_API, }, }) diff --git a/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.test.ts b/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.test.ts index 871c31a89..d9a2da569 100644 --- a/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.test.ts +++ b/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.test.ts @@ -6,6 +6,7 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { Connection } from '@dbTools/typeorm' +import { Community } from '@entity/Community' import { DltTransaction } from '@entity/DltTransaction' import { Transaction } from '@entity/Transaction' import { ApolloServerTestClient } from 'apollo-server-testing' @@ -14,6 +15,7 @@ import { Decimal } from 'decimal.js-light' // import { Response } from 'graphql-request/dist/types' import { GraphQLClient } from 'graphql-request' import { Response } from 'graphql-request/dist/types' +import { v4 as uuidv4 } from 'uuid' import { testEnvironment, cleanDB } from '@test/helpers' import { logger, i18n as localization } from '@test/testSetup' @@ -80,6 +82,16 @@ let testEnv: { } */ +async function createHomeCommunity(): Promise { + const homeCommunity = Community.create() + homeCommunity.foreign = false + homeCommunity.communityUuid = uuidv4() + homeCommunity.url = 'localhost' + homeCommunity.publicKey = Buffer.from('0x6e6a6c6d6feffe', 'hex') + await Community.save(homeCommunity) + return homeCommunity +} + async function createTxCREATION1(verified: boolean): Promise { let tx = Transaction.create() tx.amount = new Decimal(1000) @@ -358,6 +370,7 @@ describe('create and send Transactions to DltConnector', () => { txCREATION1 = await createTxCREATION1(false) txCREATION2 = await createTxCREATION2(false) txCREATION3 = await createTxCREATION3(false) + await createHomeCommunity() CONFIG.DLT_CONNECTOR = false await sendTransactionsToDltConnector() @@ -413,6 +426,7 @@ describe('create and send Transactions to DltConnector', () => { txCREATION1 = await createTxCREATION1(false) txCREATION2 = await createTxCREATION2(false) txCREATION3 = await createTxCREATION3(false) + await createHomeCommunity() CONFIG.DLT_CONNECTOR = true @@ -481,6 +495,7 @@ describe('create and send Transactions to DltConnector', () => { txCREATION1 = await createTxCREATION1(true) txCREATION2 = await createTxCREATION2(true) txCREATION3 = await createTxCREATION3(true) + await createHomeCommunity() txSEND1to2 = await createTxSend1ToReceive2(false) txRECEIVE2From1 = await createTxReceive2FromSend1(false) diff --git a/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.ts b/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.ts index 98ea255c1..98e1ffbe3 100644 --- a/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.ts +++ b/backend/src/graphql/resolver/util/sendTransactionsToDltConnector.ts @@ -1,4 +1,5 @@ import { IsNull } from '@dbTools/typeorm' +import { Community } from '@entity/Community' import { DltTransaction } from '@entity/DltTransaction' import { Transaction } from '@entity/Transaction' @@ -16,6 +17,13 @@ export async function sendTransactionsToDltConnector(): Promise { try { await createDltTransactions() const dltConnector = DltConnectorClient.getInstance() + // TODO: get actual communities from users + const homeCommunity = await Community.findOneOrFail({ where: { foreign: false } }) + const senderCommunityUuid = homeCommunity.communityUuid + if (!senderCommunityUuid) { + throw new Error('Cannot find community uuid of home community') + } + const recipientCommunityUuid = '' if (dltConnector) { logger.debug('with sending to DltConnector...') const dltTransactions = await DltTransaction.find({ @@ -23,9 +31,17 @@ export async function sendTransactionsToDltConnector(): Promise { relations: ['transaction'], order: { createdAt: 'ASC', id: 'ASC' }, }) + for (const dltTx of dltTransactions) { + if (!dltTx.transaction) { + continue + } try { - const messageId = await dltConnector.transmitTransaction(dltTx.transaction) + const messageId = await dltConnector.transmitTransaction( + dltTx.transaction, + senderCommunityUuid, + recipientCommunityUuid, + ) const dltMessageId = Buffer.from(messageId, 'hex') if (dltMessageId.length !== 32) { logger.error( diff --git a/backend/src/graphql/resolver/util/settlePendingSenderTransaction.ts b/backend/src/graphql/resolver/util/settlePendingSenderTransaction.ts index b9c7d8b36..ac9318f42 100644 --- a/backend/src/graphql/resolver/util/settlePendingSenderTransaction.ts +++ b/backend/src/graphql/resolver/util/settlePendingSenderTransaction.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable new-cap */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ - +/* import { getConnection } from '@dbTools/typeorm' import { Community as DbCommunity } from '@entity/Community' import { PendingTransaction as DbPendingTransaction } from '@entity/PendingTransaction' @@ -94,7 +94,7 @@ export async function settlePendingSenderTransaction( await queryRunner.commitTransaction() logger.info(`commit send Transaction successful...`) - /* + --* await EVENT_TRANSACTION_SEND(sender, recipient, transactionSend, transactionSend.amount) await EVENT_TRANSACTION_RECEIVE( @@ -103,7 +103,7 @@ export async function settlePendingSenderTransaction( transactionReceive, transactionReceive.amount, ) - */ + *-- // trigger to send transaction via dlt-connector // void sendTransactionsToDltConnector() } catch (e) { @@ -113,7 +113,7 @@ export async function settlePendingSenderTransaction( await queryRunner.release() releaseLock() } - /* + --* void sendTransactionReceivedEmail({ firstName: recipient.firstName, lastName: recipient.lastName, @@ -141,6 +141,7 @@ export async function settlePendingSenderTransaction( } finally { releaseLock() } - */ + *-- return true } +*/ diff --git a/dlt-connector/.env.dist b/dlt-connector/.env.dist index 96867eebb..1247ac3ec 100644 --- a/dlt-connector/.env.dist +++ b/dlt-connector/.env.dist @@ -1,4 +1,4 @@ -CONFIG_VERSION=v2.2023-07-07 +CONFIG_VERSION=v4.2023-09-12 # SET LOG LEVEL AS NEEDED IN YOUR .ENV # POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal @@ -7,6 +7,16 @@ CONFIG_VERSION=v2.2023-07-07 # IOTA IOTA_API_URL=https://chrysalis-nodes.iota.org IOTA_COMMUNITY_ALIAS=GRADIDO: TestHelloWelt2 +IOTA_HOME_COMMUNITY_SEED=aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899 + +# Database +DB_HOST=localhost +DB_PORT=3306 +DB_USER=root +DB_PASSWORD= +DB_DATABASE=gradido_dlt +DB_DATABASE_TEST=gradido_dlt_test +TYPEORM_LOGGING_RELATIVE_PATH=typeorm.backend.log # DLT-Connector -DLT_CONNECTOR_PORT=6000 \ No newline at end of file +DLT_CONNECTOR_PORT=6010 \ No newline at end of file diff --git a/dlt-connector/.env.template b/dlt-connector/.env.template index bd9466046..e3793f642 100644 --- a/dlt-connector/.env.template +++ b/dlt-connector/.env.template @@ -3,6 +3,16 @@ CONFIG_VERSION=$DLT_CONNECTOR_CONFIG_VERSION #IOTA IOTA_API_URL=$IOTA_API_URL IOTA_COMMUNITY_ALIAS=$IOTA_COMMUNITY_ALIAS +IOTA_HOME_COMMUNITY_SEED=$IOTA_HOME_COMMUNITY_SEED + +# Database +DB_HOST=localhost +DB_PORT=3306 +DB_USER=root +DB_PASSWORD= +DB_DATABASE=gradido_dlt +DB_DATABASE_TEST=$DB_DATABASE_TEST +TYPEORM_LOGGING_RELATIVE_PATH=typeorm.backend.log # DLT-Connector DLT_CONNECTOR_PORT=$DLT_CONNECTOR_PORT \ No newline at end of file diff --git a/dlt-connector/Dockerfile b/dlt-connector/Dockerfile index 6e5e628f7..3bdaf0679 100644 --- a/dlt-connector/Dockerfile +++ b/dlt-connector/Dockerfile @@ -16,7 +16,7 @@ ENV BUILD_COMMIT="0000000" ## SET NODE_ENV ENV NODE_ENV="production" ## App relevant Envs -ENV PORT="6000" +ENV PORT="6010" # Labels LABEL org.label-schema.build-date="${BUILD_DATE}" @@ -44,6 +44,7 @@ EXPOSE ${PORT} RUN mkdir -p ${DOCKER_WORKDIR} WORKDIR ${DOCKER_WORKDIR} +RUN mkdir -p /dlt-database ################################################################################## # DEVELOPMENT (Connected to the local environment, to reload on demand) ########## @@ -56,7 +57,7 @@ FROM base as development # Run command # (for development we need to execute yarn install since the # node_modules are on another volume and need updating) -CMD /bin/sh -c "cd /app && yarn install && yarn run dev" +CMD /bin/sh -c "cd /dlt-database && yarn install && yarn build && cd /app && yarn install && yarn run dev" ################################################################################## # BUILD (Does contain all files and is therefore bloated) ######################## @@ -65,13 +66,21 @@ FROM base as build # Copy everything from dlt-connector COPY ./dlt-connector/ ./ +# Copy everything from dlt-database +COPY ./dlt-database/ ../dlt-database/ # yarn install dlt-connector RUN yarn install --production=false --frozen-lockfile --non-interactive +# yarn install dlt-database +RUN cd ../dlt-database && yarn install --production=false --frozen-lockfile --non-interactive + # yarn build RUN yarn run build +# yarn build dlt-database +RUN cd ../dlt-database && yarn run build + ################################################################################## # TEST ########################################################################### ################################################################################## @@ -90,9 +99,10 @@ RUN apk del rust cargo python3 make g++ # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/build ./build - +COPY --from=build ${DOCKER_WORKDIR}/../dlt-database/build ../dlt-database/build # We also copy the node_modules express and serve-static for the run script COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules +COPY --from=build ${DOCKER_WORKDIR}/../dlt-database/node_modules ../dlt-database/node_modules # Copy static files # COPY --from=build ${DOCKER_WORKDIR}/public ./public # Copy package.json for script definitions (lock file should not be needed) diff --git a/dlt-connector/jest.config.js b/dlt-connector/jest.config.js index 45bee507e..723aa840b 100644 --- a/dlt-connector/jest.config.js +++ b/dlt-connector/jest.config.js @@ -6,7 +6,7 @@ module.exports = { collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'], coverageThreshold: { global: { - lines: 63, + lines: 77, }, }, setupFiles: ['/test/testSetup.ts'], @@ -14,22 +14,26 @@ module.exports = { modulePathIgnorePatterns: ['/build/'], moduleNameMapper: { '@/(.*)': '/src/$1', + '@arg/(.*)': '/src/graphql/arg/$1', + '@controller/(.*)': '/src/controller/$1', '@enum/(.*)': '/src/graphql/enum/$1', '@resolver/(.*)': '/src/graphql/resolver/$1', '@input/(.*)': '/src/graphql/input/$1', '@proto/(.*)': '/src/proto/$1', '@test/(.*)': '/test/$1', + '@typeorm/(.*)': '/src/typeorm/$1', '@client/(.*)': '/src/client/$1', '@entity/(.*)': // eslint-disable-next-line n/no-process-env process.env.NODE_ENV === 'development' - ? '/../database/entity/$1' - : '/../database/build/entity/$1', + ? '/../dlt-database/entity/$1' + : '/../dlt-database/build/entity/$1', '@dbTools/(.*)': // eslint-disable-next-line n/no-process-env process.env.NODE_ENV === 'development' - ? '/../database/src/$1' - : '/../database/build/src/$1', + ? '/../dlt-database/src/$1' + : '/../dlt-database/build/src/$1', + '@validator/(.*)': '/src/graphql/validator/$1', }, } /* diff --git a/dlt-connector/package.json b/dlt-connector/package.json index e520df019..1e54cc44d 100644 --- a/dlt-connector/package.json +++ b/dlt-connector/package.json @@ -25,6 +25,7 @@ "cors": "^2.8.5", "cross-env": "^7.0.3", "decimal.js-light": "^2.5.1", + "dlt-database": "file:../dlt-database", "dotenv": "10.0.0", "express": "4.17.1", "graphql": "^16.7.1", @@ -32,6 +33,7 @@ "log4js": "^6.7.1", "nodemon": "^2.0.20", "reflect-metadata": "^0.1.13", + "sodium-native": "^4.0.4", "tsconfig-paths": "^4.1.2", "type-graphql": "^2.0.0-beta.2" }, @@ -41,6 +43,7 @@ "@types/cors": "^2.8.13", "@types/jest": "^27.0.2", "@types/node": "^18.11.18", + "@types/sodium-native": "^2.3.5", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^5.57.1", "@typescript-eslint/parser": "^5.57.1", @@ -58,6 +61,8 @@ "prettier": "^2.8.7", "ts-jest": "^27.0.5", "ts-node": "^10.9.1", + "typeorm": "^0.3.17", + "typeorm-extension": "^3.0.1", "typescript": "^4.9.4" }, "engines": { diff --git a/dlt-connector/src/config/index.ts b/dlt-connector/src/config/index.ts index be0d4b7da..fc8c780b8 100644 --- a/dlt-connector/src/config/index.ts +++ b/dlt-connector/src/config/index.ts @@ -4,11 +4,12 @@ dotenv.config() const constants = { LOG4JS_CONFIG: 'log4js-config.json', + DB_VERSION: '0002-refactor_add_community', // default log level on production should be info LOG_LEVEL: process.env.LOG_LEVEL || 'info', CONFIG_VERSION: { DEFAULT: 'DEFAULT', - EXPECTED: 'v2.2023-07-07', + EXPECTED: 'v4.2023-09-12', CURRENT: '', }, } @@ -17,13 +18,24 @@ const server = { PRODUCTION: process.env.NODE_ENV === 'production' || false, } +const database = { + DB_HOST: process.env.DB_HOST ?? 'localhost', + DB_PORT: process.env.DB_PORT ? parseInt(process.env.DB_PORT) : 3306, + DB_USER: process.env.DB_USER ?? 'root', + DB_PASSWORD: process.env.DB_PASSWORD ?? '', + DB_DATABASE: process.env.DB_DATABASE ?? 'gradido_dlt', + DB_DATABASE_TEST: process.env.DB_DATABASE_TEST ?? 'gradido_dlt_test', + TYPEORM_LOGGING_RELATIVE_PATH: process.env.TYPEORM_LOGGING_RELATIVE_PATH ?? 'typeorm.backend.log', +} + const iota = { IOTA_API_URL: process.env.IOTA_API_URL ?? 'https://chrysalis-nodes.iota.org', IOTA_COMMUNITY_ALIAS: process.env.IOTA_COMMUNITY_ALIAS ?? 'GRADIDO: TestHelloWelt2', + IOTA_HOME_COMMUNITY_SEED: process.env.IOTA_HOME_COMMUNITY_SEED ?? null, } const dltConnector = { - DLT_CONNECTOR_PORT: process.env.DLT_CONNECTOR_PORT || 6000, + DLT_CONNECTOR_PORT: process.env.DLT_CONNECTOR_PORT || 6010, } // Check config version @@ -41,6 +53,7 @@ if ( export const CONFIG = { ...constants, ...server, + ...database, ...iota, ...dltConnector, } diff --git a/dlt-connector/src/controller/Community.test.ts b/dlt-connector/src/controller/Community.test.ts new file mode 100644 index 000000000..d8c5ad0de --- /dev/null +++ b/dlt-connector/src/controller/Community.test.ts @@ -0,0 +1,66 @@ +import 'reflect-metadata' +import { CommunityDraft } from '@/graphql/input/CommunityDraft' +import { create as createCommunity, getAllTopics, isExist } from './Community' +import { TestDB } from '@test/TestDB' +import { getDataSource } from '@/typeorm/DataSource' +import { Community } from '@entity/Community' +import { iotaTopicFromCommunityUUID } from '@/utils/typeConverter' + +jest.mock('@typeorm/DataSource', () => ({ + getDataSource: () => TestDB.instance.dbConnect, +})) + +describe('controller/Community', () => { + beforeAll(async () => { + await TestDB.instance.setupTestDB() + // apolloTestServer = await createApolloTestServer() + }) + + afterAll(async () => { + await TestDB.instance.teardownTestDB() + }) + + describe('createCommunity', () => { + it('valid community', async () => { + const communityDraft = new CommunityDraft() + communityDraft.foreign = false + communityDraft.createdAt = '2022-05-01T17:00:12.128Z' + communityDraft.uuid = '3d813cbb-47fb-32ba-91df-831e1593ac29' + + const iotaTopic = iotaTopicFromCommunityUUID(communityDraft.uuid) + expect(iotaTopic).toEqual('204ef6aed15fbf0f9da5819e88f8eea8e3adbe1e2c2d43280780a4b8c2d32b56') + + const createdAtDate = new Date(communityDraft.createdAt) + const communityEntity = createCommunity(communityDraft) + expect(communityEntity).toMatchObject({ + iotaTopic, + createdAt: createdAtDate, + foreign: false, + }) + await getDataSource().manager.save(communityEntity) + }) + }) + + describe('list communities', () => { + it('get all topics', async () => { + expect(await getAllTopics()).toMatchObject([ + '204ef6aed15fbf0f9da5819e88f8eea8e3adbe1e2c2d43280780a4b8c2d32b56', + ]) + }) + + it('isExist with communityDraft', async () => { + const communityDraft = new CommunityDraft() + communityDraft.foreign = false + communityDraft.createdAt = '2022-05-01T17:00:12.128Z' + communityDraft.uuid = '3d813cbb-47fb-32ba-91df-831e1593ac29' + expect(await isExist(communityDraft)).toBe(true) + }) + + it('createdAt with ms precision', async () => { + const list = await Community.findOne({ where: { foreign: false } }) + expect(list).toMatchObject({ + createdAt: new Date('2022-05-01T17:00:12.128Z'), + }) + }) + }) +}) diff --git a/dlt-connector/src/controller/Community.ts b/dlt-connector/src/controller/Community.ts new file mode 100644 index 000000000..eff1b2b64 --- /dev/null +++ b/dlt-connector/src/controller/Community.ts @@ -0,0 +1,28 @@ +import { CommunityDraft } from '@/graphql/input/CommunityDraft' +import { iotaTopicFromCommunityUUID } from '@/utils/typeConverter' +import { Community } from '@entity/Community' + +export const isExist = async (community: CommunityDraft | string): Promise => { + const iotaTopic = + community instanceof CommunityDraft ? iotaTopicFromCommunityUUID(community.uuid) : community + const result = await Community.find({ + where: { iotaTopic }, + }) + return result.length > 0 +} + +export const create = (community: CommunityDraft, topic?: string): Community => { + const communityEntity = Community.create() + communityEntity.iotaTopic = topic ?? iotaTopicFromCommunityUUID(community.uuid) + communityEntity.createdAt = new Date(community.createdAt) + communityEntity.foreign = community.foreign + if (!community.foreign) { + // TODO: generate keys + } + return communityEntity +} + +export const getAllTopics = async (): Promise => { + const communities = await Community.find({ select: { iotaTopic: true } }) + return communities.map((community) => community.iotaTopic) +} diff --git a/dlt-connector/src/controller/GradidoTransaction.ts b/dlt-connector/src/controller/GradidoTransaction.ts new file mode 100644 index 000000000..671f3f57a --- /dev/null +++ b/dlt-connector/src/controller/GradidoTransaction.ts @@ -0,0 +1,10 @@ +import { GradidoTransaction } from '@/proto/3_3/GradidoTransaction' +import { TransactionBody } from '@/proto/3_3/TransactionBody' + +export const create = (body: TransactionBody): GradidoTransaction => { + const transaction = new GradidoTransaction({ + bodyBytes: Buffer.from(TransactionBody.encode(body).finish()), + }) + // TODO: add correct signature(s) + return transaction +} diff --git a/dlt-connector/src/controller/TransactionBase.ts b/dlt-connector/src/controller/TransactionBase.ts new file mode 100644 index 000000000..9833226a9 --- /dev/null +++ b/dlt-connector/src/controller/TransactionBase.ts @@ -0,0 +1,6 @@ +import { TransactionValidationLevel } from '@/graphql/enum/TransactionValidationLevel' + +export abstract class TransactionBase { + // validate if transaction is valid, maybe expensive because depending on level several transactions will be fetched from db + public abstract validate(level: TransactionValidationLevel): boolean +} diff --git a/dlt-connector/src/controller/TransactionBody.test.ts b/dlt-connector/src/controller/TransactionBody.test.ts new file mode 100644 index 000000000..eac613ab7 --- /dev/null +++ b/dlt-connector/src/controller/TransactionBody.test.ts @@ -0,0 +1,162 @@ +import 'reflect-metadata' +import { TransactionDraft } from '@/graphql/input/TransactionDraft' +import { create, determineCrossGroupType, determineOtherGroup } from './TransactionBody' +import { UserIdentifier } from '@/graphql/input/UserIdentifier' +import { TransactionError } from '@/graphql/model/TransactionError' +import { TransactionErrorType } from '@/graphql/enum/TransactionErrorType' +import { CrossGroupType } from '@/graphql/enum/CrossGroupType' +import { TransactionType } from '@/graphql/enum/TransactionType' +import Decimal from 'decimal.js-light' + +describe('test controller/TransactionBody', () => { + describe('test create ', () => { + const senderUser = new UserIdentifier() + const recipientUser = new UserIdentifier() + it('test with contribution transaction', () => { + const transactionDraft = new TransactionDraft() + transactionDraft.senderUser = senderUser + transactionDraft.recipientUser = recipientUser + transactionDraft.type = TransactionType.CREATION + transactionDraft.amount = new Decimal(1000) + transactionDraft.createdAt = '2022-01-02T19:10:34.121' + transactionDraft.targetDate = '2021-12-01T10:05:00.191' + const body = create(transactionDraft) + + expect(body.creation).toBeDefined() + expect(body).toMatchObject({ + createdAt: { + seconds: 1641150634, + nanoSeconds: 121000000, + }, + versionNumber: '3.3', + type: CrossGroupType.LOCAL, + otherGroup: '', + creation: { + recipient: { + amount: '1000', + }, + targetDate: { + seconds: 1638353100, + }, + }, + }) + }) + it('test with local send transaction send part', () => { + const transactionDraft = new TransactionDraft() + transactionDraft.senderUser = senderUser + transactionDraft.recipientUser = recipientUser + transactionDraft.type = TransactionType.SEND + transactionDraft.amount = new Decimal(1000) + transactionDraft.createdAt = '2022-01-02T19:10:34.121' + const body = create(transactionDraft) + + expect(body.transfer).toBeDefined() + expect(body).toMatchObject({ + createdAt: { + seconds: 1641150634, + nanoSeconds: 121000000, + }, + versionNumber: '3.3', + type: CrossGroupType.LOCAL, + otherGroup: '', + transfer: { + sender: { + amount: '1000', + }, + }, + }) + }) + + it('test with local send transaction receive part', () => { + const transactionDraft = new TransactionDraft() + transactionDraft.senderUser = senderUser + transactionDraft.recipientUser = recipientUser + transactionDraft.type = TransactionType.RECEIVE + transactionDraft.amount = new Decimal(1000) + transactionDraft.createdAt = '2022-01-02T19:10:34.121' + const body = create(transactionDraft) + + expect(body.transfer).toBeDefined() + expect(body).toMatchObject({ + createdAt: { + seconds: 1641150634, + nanoSeconds: 121000000, + }, + versionNumber: '3.3', + type: CrossGroupType.LOCAL, + otherGroup: '', + transfer: { + sender: { + amount: '1000', + }, + }, + }) + }) + }) + describe('test determineCrossGroupType', () => { + const transactionDraft = new TransactionDraft() + transactionDraft.senderUser = new UserIdentifier() + transactionDraft.recipientUser = new UserIdentifier() + + it('local transaction', () => { + expect(determineCrossGroupType(transactionDraft)).toEqual(CrossGroupType.LOCAL) + }) + + it('test with with invalid input', () => { + transactionDraft.recipientUser.communityUuid = 'a72a4a4a-aa12-4f6c-b3d8-7cc65c67e24a' + expect(() => determineCrossGroupType(transactionDraft)).toThrow( + new TransactionError( + TransactionErrorType.NOT_IMPLEMENTED_YET, + 'cannot determine CrossGroupType', + ), + ) + }) + + it('inbound transaction (send to sender community)', () => { + transactionDraft.type = TransactionType.SEND + expect(determineCrossGroupType(transactionDraft)).toEqual(CrossGroupType.INBOUND) + }) + + it('outbound transaction (send to recipient community)', () => { + transactionDraft.type = TransactionType.RECEIVE + expect(determineCrossGroupType(transactionDraft)).toEqual(CrossGroupType.OUTBOUND) + }) + }) + + describe('test determineOtherGroup', () => { + const transactionDraft = new TransactionDraft() + transactionDraft.senderUser = new UserIdentifier() + transactionDraft.recipientUser = new UserIdentifier() + + it('for inbound transaction, other group is from recipient, missing community id for recipient', () => { + expect(() => determineOtherGroup(CrossGroupType.INBOUND, transactionDraft)).toThrowError( + new TransactionError( + TransactionErrorType.MISSING_PARAMETER, + 'missing recipient user community id for cross group transaction', + ), + ) + }) + it('for inbound transaction, other group is from recipient', () => { + transactionDraft.recipientUser.communityUuid = 'b8e9f00a-5a56-4b23-8c44-6823ac9e0d2d' + expect(determineOtherGroup(CrossGroupType.INBOUND, transactionDraft)).toEqual( + 'b8e9f00a-5a56-4b23-8c44-6823ac9e0d2d', + ) + }) + + it('for outbound transaction, other group is from sender, missing community id for sender', () => { + expect(() => determineOtherGroup(CrossGroupType.OUTBOUND, transactionDraft)).toThrowError( + new TransactionError( + TransactionErrorType.MISSING_PARAMETER, + 'missing sender user community id for cross group transaction', + ), + ) + }) + + it('for outbound transaction, other group is from sender', () => { + transactionDraft.senderUser.communityUuid = 'a72a4a4a-aa12-4f6c-b3d8-7cc65c67e24a' + expect(determineOtherGroup(CrossGroupType.OUTBOUND, transactionDraft)).toEqual( + 'a72a4a4a-aa12-4f6c-b3d8-7cc65c67e24a', + ) + }) + }) +}) diff --git a/dlt-connector/src/controller/TransactionBody.ts b/dlt-connector/src/controller/TransactionBody.ts new file mode 100644 index 000000000..ae5f37710 --- /dev/null +++ b/dlt-connector/src/controller/TransactionBody.ts @@ -0,0 +1,74 @@ +import { CrossGroupType } from '@/graphql/enum/CrossGroupType' +import { TransactionErrorType } from '@/graphql/enum/TransactionErrorType' +import { TransactionType } from '@/graphql/enum/TransactionType' +import { TransactionDraft } from '@/graphql/input/TransactionDraft' +import { TransactionError } from '@/graphql/model/TransactionError' +import { GradidoCreation } from '@/proto/3_3/GradidoCreation' +import { GradidoTransfer } from '@/proto/3_3/GradidoTransfer' +import { TransactionBody } from '@/proto/3_3/TransactionBody' + +export const create = (transaction: TransactionDraft): TransactionBody => { + const body = new TransactionBody(transaction) + // TODO: load pubkeys for sender and recipient user from db + switch (transaction.type) { + case TransactionType.CREATION: + body.creation = new GradidoCreation(transaction) + body.data = 'gradidoCreation' + break + case TransactionType.SEND: + case TransactionType.RECEIVE: + body.transfer = new GradidoTransfer(transaction) + body.data = 'gradidoTransfer' + break + } + return body +} + +export const determineCrossGroupType = ({ + senderUser, + recipientUser, + type, +}: TransactionDraft): CrossGroupType => { + if ( + !recipientUser.communityUuid || + recipientUser.communityUuid === '' || + senderUser.communityUuid === recipientUser.communityUuid || + type === TransactionType.CREATION + ) { + return CrossGroupType.LOCAL + } else if (type === TransactionType.SEND) { + return CrossGroupType.INBOUND + } else if (type === TransactionType.RECEIVE) { + return CrossGroupType.OUTBOUND + } + throw new TransactionError( + TransactionErrorType.NOT_IMPLEMENTED_YET, + 'cannot determine CrossGroupType', + ) +} + +export const determineOtherGroup = ( + type: CrossGroupType, + { senderUser, recipientUser }: TransactionDraft, +): string => { + switch (type) { + case CrossGroupType.LOCAL: + return '' + case CrossGroupType.INBOUND: + if (!recipientUser.communityUuid) { + throw new TransactionError( + TransactionErrorType.MISSING_PARAMETER, + 'missing recipient user community id for cross group transaction', + ) + } + return recipientUser.communityUuid + case CrossGroupType.OUTBOUND: + if (!senderUser.communityUuid) { + throw new TransactionError( + TransactionErrorType.MISSING_PARAMETER, + 'missing sender user community id for cross group transaction', + ) + } + return senderUser.communityUuid + } +} diff --git a/dlt-connector/src/graphql/enum/AddressType.ts b/dlt-connector/src/graphql/enum/AddressType.ts new file mode 100644 index 000000000..26efd2825 --- /dev/null +++ b/dlt-connector/src/graphql/enum/AddressType.ts @@ -0,0 +1,9 @@ +export enum AddressType { + NONE = 0, // if no address was found + COMMUNITY_HUMAN = 1, // creation account for human + COMMUNITY_GMW = 2, // community public budget account + COMMUNITY_AUF = 3, // community compensation and environment founds account + COMMUNITY_PROJECT = 4, // no creations allowed + SUBACCOUNT = 5, // no creations allowed + CRYPTO_ACCOUNT = 6, // user control his keys, no creations +} diff --git a/dlt-connector/src/graphql/enum/CrossGroupType.ts b/dlt-connector/src/graphql/enum/CrossGroupType.ts new file mode 100644 index 000000000..13e968509 --- /dev/null +++ b/dlt-connector/src/graphql/enum/CrossGroupType.ts @@ -0,0 +1,7 @@ +export enum CrossGroupType { + LOCAL = 0, + INBOUND = 1, + OUTBOUND = 2, + // for cross group transaction which haven't a direction like group friend update + // CROSS = 3, +} diff --git a/dlt-connector/src/graphql/enum/TransactionErrorType.ts b/dlt-connector/src/graphql/enum/TransactionErrorType.ts new file mode 100644 index 000000000..0e72292c1 --- /dev/null +++ b/dlt-connector/src/graphql/enum/TransactionErrorType.ts @@ -0,0 +1,13 @@ +import { registerEnumType } from 'type-graphql' + +export enum TransactionErrorType { + NOT_IMPLEMENTED_YET = 'Not Implemented yet', + MISSING_PARAMETER = 'Missing parameter', + ALREADY_EXIST = 'Already exist', + DB_ERROR = 'DB Error', +} + +registerEnumType(TransactionErrorType, { + name: 'TransactionErrorType', + description: 'Transaction Error Type', +}) diff --git a/dlt-connector/src/graphql/enum/TransactionValidationLevel.ts b/dlt-connector/src/graphql/enum/TransactionValidationLevel.ts new file mode 100644 index 000000000..9462dd8a8 --- /dev/null +++ b/dlt-connector/src/graphql/enum/TransactionValidationLevel.ts @@ -0,0 +1,15 @@ +import { registerEnumType } from 'type-graphql' + +export enum TransactionValidationLevel { + SINGLE = 1, // check only the transaction + SINGLE_PREVIOUS = 2, // check also with previous transaction + DATE_RANGE = 3, // check all transaction from within date range by creation automatic the same month + PAIRED = 4, // check paired transaction on another group by cross group transactions + CONNECTED_GROUP = 5, // check all transactions in the group which connected with this transaction address(es) + CONNECTED_BLOCKCHAIN = 6, // check all transactions which connected with this transaction +} + +registerEnumType(TransactionValidationLevel, { + name: 'TransactionValidationLevel', + description: 'Transaction Validation Levels', +}) diff --git a/dlt-connector/src/graphql/input/CommunityDraft.ts b/dlt-connector/src/graphql/input/CommunityDraft.ts new file mode 100644 index 000000000..f028ea06c --- /dev/null +++ b/dlt-connector/src/graphql/input/CommunityDraft.ts @@ -0,0 +1,20 @@ +// https://www.npmjs.com/package/@apollo/protobufjs + +import { IsBoolean, IsUUID } from 'class-validator' +import { Field, InputType } from 'type-graphql' +import { isValidDateString } from '@validator/DateString' + +@InputType() +export class CommunityDraft { + @Field(() => String) + @IsUUID('4') + uuid: string + + @Field(() => Boolean) + @IsBoolean() + foreign: boolean + + @Field(() => String) + @isValidDateString() + createdAt: string +} diff --git a/dlt-connector/src/graphql/input/TransactionDraft.ts b/dlt-connector/src/graphql/input/TransactionDraft.ts new file mode 100755 index 000000000..2021dd9e1 --- /dev/null +++ b/dlt-connector/src/graphql/input/TransactionDraft.ts @@ -0,0 +1,39 @@ +// https://www.npmjs.com/package/@apollo/protobufjs + +import { Decimal } from 'decimal.js-light' +import { TransactionType } from '@enum/TransactionType' +import { InputType, Field } from 'type-graphql' +import { UserIdentifier } from './UserIdentifier' +import { isValidDateString } from '@validator/DateString' +import { IsPositiveDecimal } from '@validator/Decimal' +import { IsEnum, IsObject, ValidateNested } from 'class-validator' + +@InputType() +export class TransactionDraft { + @Field(() => UserIdentifier) + @IsObject() + @ValidateNested() + senderUser: UserIdentifier + + @Field(() => UserIdentifier) + @IsObject() + @ValidateNested() + recipientUser: UserIdentifier + + @Field(() => Decimal) + @IsPositiveDecimal() + amount: Decimal + + @Field(() => TransactionType) + @IsEnum(TransactionType) + type: TransactionType + + @Field(() => String) + @isValidDateString() + createdAt: string + + // only for creation transactions + @Field(() => String, { nullable: true }) + @isValidDateString() + targetDate?: string +} diff --git a/dlt-connector/src/graphql/input/TransactionInput.ts b/dlt-connector/src/graphql/input/TransactionInput.ts index 02eba916e..d20b6ff27 100755 --- a/dlt-connector/src/graphql/input/TransactionInput.ts +++ b/dlt-connector/src/graphql/input/TransactionInput.ts @@ -3,16 +3,22 @@ import { Decimal } from 'decimal.js-light' import { TransactionType } from '../enum/TransactionType' import { InputType, Field } from 'type-graphql' +import { IsEnum, IsInt, Min } from 'class-validator' +import { IsPositiveDecimal } from '../validator/Decimal' @InputType() export class TransactionInput { @Field(() => TransactionType) + @IsEnum(TransactionType) type: TransactionType @Field(() => Decimal) + @IsPositiveDecimal() amount: Decimal @Field(() => Number) + @IsInt() + @Min(978346800) createdAt: number // @protoField.d(4, 'string') diff --git a/dlt-connector/src/graphql/input/UserIdentifier.ts b/dlt-connector/src/graphql/input/UserIdentifier.ts new file mode 100644 index 000000000..12f2e5889 --- /dev/null +++ b/dlt-connector/src/graphql/input/UserIdentifier.ts @@ -0,0 +1,19 @@ +// https://www.npmjs.com/package/@apollo/protobufjs + +import { IsPositive, IsUUID } from 'class-validator' +import { Field, Int, InputType } from 'type-graphql' + +@InputType() +export class UserIdentifier { + @Field(() => String) + @IsUUID('4') + uuid: string + + @Field(() => String, { nullable: true }) + @IsUUID('4') + communityUuid?: string + + @Field(() => Int, { defaultValue: 1, nullable: true }) + @IsPositive() + accountNr?: number +} diff --git a/dlt-connector/src/graphql/model/TransactionError.ts b/dlt-connector/src/graphql/model/TransactionError.ts new file mode 100644 index 000000000..891ad2a89 --- /dev/null +++ b/dlt-connector/src/graphql/model/TransactionError.ts @@ -0,0 +1,20 @@ +import { ObjectType, Field } from 'type-graphql' +import { TransactionErrorType } from '../enum/TransactionErrorType' + +@ObjectType() +export class TransactionError implements Error { + constructor(type: TransactionErrorType, message: string) { + this.type = type + this.message = message + this.name = type.toString() + } + + @Field(() => TransactionErrorType) + type: TransactionErrorType + + @Field(() => String) + message: string + + @Field(() => String) + name: string +} diff --git a/dlt-connector/src/graphql/model/TransactionResult.ts b/dlt-connector/src/graphql/model/TransactionResult.ts new file mode 100644 index 000000000..938c8bcf6 --- /dev/null +++ b/dlt-connector/src/graphql/model/TransactionResult.ts @@ -0,0 +1,26 @@ +import { ObjectType, Field } from 'type-graphql' +import { TransactionError } from './TransactionError' + +@ObjectType() +export class TransactionResult { + constructor(content?: TransactionError | string) { + this.succeed = true + if (content instanceof TransactionError) { + this.error = content + this.succeed = false + } else if (typeof content === 'string') { + this.messageId = content + } + } + + // the error if one happened + @Field(() => TransactionError, { nullable: true }) + error?: TransactionError + + // if no error happend, the message id of the iota transaction + @Field(() => String, { nullable: true }) + messageId?: string + + @Field(() => Boolean) + succeed: boolean +} diff --git a/dlt-connector/src/graphql/resolver/CommunityResolver.test.ts b/dlt-connector/src/graphql/resolver/CommunityResolver.test.ts new file mode 100644 index 000000000..7f1f3ea3c --- /dev/null +++ b/dlt-connector/src/graphql/resolver/CommunityResolver.test.ts @@ -0,0 +1,80 @@ +import 'reflect-metadata' +import { ApolloServer } from '@apollo/server' +import { createApolloTestServer } from '@test/ApolloServerMock' +import assert from 'assert' +import { TestDB } from '@test/TestDB' +import { TransactionResult } from '../model/TransactionResult' + +let apolloTestServer: ApolloServer + +jest.mock('@typeorm/DataSource', () => ({ + getDataSource: () => TestDB.instance.dbConnect, +})) + +describe('graphql/resolver/CommunityResolver', () => { + beforeAll(async () => { + apolloTestServer = await createApolloTestServer() + }) + + describe('tests with db', () => { + beforeAll(async () => { + await TestDB.instance.setupTestDB() + // apolloTestServer = await createApolloTestServer() + }) + + afterAll(async () => { + await TestDB.instance.teardownTestDB() + }) + + it('test add foreign community', async () => { + const response = await apolloTestServer.executeOperation({ + query: 'mutation ($input: CommunityDraft!) { addCommunity(data: $input) {succeed} }', + variables: { + input: { + uuid: '3d813cbb-37fb-42ba-91df-831e1593ac29', + foreign: true, + createdAt: '2012-04-17T17:12:00.0012Z', + }, + }, + }) + assert(response.body.kind === 'single') + expect(response.body.singleResult.errors).toBeUndefined() + const transactionResult = response.body.singleResult.data?.addCommunity as TransactionResult + expect(transactionResult.succeed).toEqual(true) + }) + + it('test add home community', async () => { + const response = await apolloTestServer.executeOperation({ + query: 'mutation ($input: CommunityDraft!) { addCommunity(data: $input) {succeed} }', + variables: { + input: { + uuid: '3d823cad-37fb-41cd-91df-152e1593ac29', + foreign: false, + createdAt: '2012-05-12T13:12:00.2917Z', + }, + }, + }) + assert(response.body.kind === 'single') + expect(response.body.singleResult.errors).toBeUndefined() + const transactionResult = response.body.singleResult.data?.addCommunity as TransactionResult + expect(transactionResult.succeed).toEqual(true) + }) + + it('test add existing community', async () => { + const response = await apolloTestServer.executeOperation({ + query: 'mutation ($input: CommunityDraft!) { addCommunity(data: $input) {succeed} }', + variables: { + input: { + uuid: '3d823cad-37fb-41cd-91df-152e1593ac29', + foreign: false, + createdAt: '2012-05-12T13:12:00.1271Z', + }, + }, + }) + assert(response.body.kind === 'single') + expect(response.body.singleResult.errors).toBeUndefined() + const transactionResult = response.body.singleResult.data?.addCommunity as TransactionResult + expect(transactionResult.succeed).toEqual(false) + }) + }) +}) diff --git a/dlt-connector/src/graphql/resolver/CommunityResolver.ts b/dlt-connector/src/graphql/resolver/CommunityResolver.ts new file mode 100644 index 000000000..d6f9f2d46 --- /dev/null +++ b/dlt-connector/src/graphql/resolver/CommunityResolver.ts @@ -0,0 +1,53 @@ +import { Resolver, Arg, Mutation } from 'type-graphql' + +import { CommunityDraft } from '@input/CommunityDraft' + +import { TransactionResult } from '../model/TransactionResult' +import { TransactionError } from '../model/TransactionError' +import { create as createCommunity, isExist } from '@/controller/Community' +import { TransactionErrorType } from '../enum/TransactionErrorType' +import { logger } from '@/server/logger' +import { iotaTopicFromCommunityUUID } from '@/utils/typeConverter' + +@Resolver() +export class CommunityResolver { + @Mutation(() => TransactionResult) + async addCommunity( + @Arg('data') + communityDraft: CommunityDraft, + ): Promise { + try { + const topic = iotaTopicFromCommunityUUID(communityDraft.uuid) + + // check if community was already written to db + if (await isExist(topic)) { + return new TransactionResult( + new TransactionError(TransactionErrorType.ALREADY_EXIST, 'community already exist!'), + ) + } + const community = createCommunity(communityDraft, topic) + + let result: TransactionResult + + if (!communityDraft.foreign) { + // TODO: CommunityRoot Transaction for blockchain + } + try { + await community.save() + result = new TransactionResult() + } catch (err) { + logger.error('error saving new community into db: %s', err) + result = new TransactionResult( + new TransactionError(TransactionErrorType.DB_ERROR, 'error saving community into db'), + ) + } + return result + } catch (error) { + if (error instanceof TransactionError) { + return new TransactionResult(error) + } else { + throw error + } + } + } +} diff --git a/dlt-connector/src/graphql/resolver/TransactionsResolver.test.ts b/dlt-connector/src/graphql/resolver/TransactionsResolver.test.ts index 0e54fa660..7c02a4306 100644 --- a/dlt-connector/src/graphql/resolver/TransactionsResolver.test.ts +++ b/dlt-connector/src/graphql/resolver/TransactionsResolver.test.ts @@ -2,6 +2,9 @@ import 'reflect-metadata' import { ApolloServer } from '@apollo/server' import { createApolloTestServer } from '@test/ApolloServerMock' import assert from 'assert' +import { TransactionResult } from '../model/TransactionResult' + +let apolloTestServer: ApolloServer jest.mock('@/client/IotaClient', () => { return { @@ -11,8 +14,6 @@ jest.mock('@/client/IotaClient', () => { } }) -let apolloTestServer: ApolloServer - describe('Transaction Resolver Test', () => { beforeAll(async () => { apolloTestServer = await createApolloTestServer() @@ -31,30 +32,45 @@ describe('Transaction Resolver Test', () => { }) it('test mocked sendTransaction', async () => { const response = await apolloTestServer.executeOperation({ - query: 'mutation ($input: TransactionInput!) { sendTransaction(data: $input) }', + query: + 'mutation ($input: TransactionDraft!) { sendTransaction(data: $input) {error {type, message}, messageId} }', variables: { input: { + senderUser: { + uuid: '0ec72b74-48c2-446f-91ce-31ad7d9f4d65', + }, + recipientUser: { + uuid: 'ddc8258e-fcb5-4e48-8d1d-3a07ec371dbe', + }, type: 'SEND', amount: '10', - createdAt: 1688992436, + createdAt: '2012-04-17T17:12:00Z', }, }, }) assert(response.body.kind === 'single') expect(response.body.singleResult.errors).toBeUndefined() - expect(response.body.singleResult.data?.sendTransaction).toBe( + const transactionResult = response.body.singleResult.data?.sendTransaction as TransactionResult + expect(transactionResult.messageId).toBe( '5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710', ) }) it('test mocked sendTransaction invalid transactionType ', async () => { const response = await apolloTestServer.executeOperation({ - query: 'mutation ($input: TransactionInput!) { sendTransaction(data: $input) }', + query: + 'mutation ($input: TransactionDraft!) { sendTransaction(data: $input) {error {type, message}, messageId} }', variables: { input: { + senderUser: { + uuid: '0ec72b74-48c2-446f-91ce-31ad7d9f4d65', + }, + recipientUser: { + uuid: 'ddc8258e-fcb5-4e48-8d1d-3a07ec371dbe', + }, type: 'INVALID', amount: '10', - createdAt: 1688992436, + createdAt: '2012-04-17T17:12:00Z', }, }, }) @@ -71,12 +87,19 @@ describe('Transaction Resolver Test', () => { it('test mocked sendTransaction invalid amount ', async () => { const response = await apolloTestServer.executeOperation({ - query: 'mutation ($input: TransactionInput!) { sendTransaction(data: $input) }', + query: + 'mutation ($input: TransactionDraft!) { sendTransaction(data: $input) {error {type, message}, messageId} }', variables: { input: { + senderUser: { + uuid: '0ec72b74-48c2-446f-91ce-31ad7d9f4d65', + }, + recipientUser: { + uuid: 'ddc8258e-fcb5-4e48-8d1d-3a07ec371dbe', + }, type: 'SEND', amount: 'no number', - createdAt: 1688992436, + createdAt: '2012-04-17T17:12:00Z', }, }, }) @@ -93,12 +116,19 @@ describe('Transaction Resolver Test', () => { it('test mocked sendTransaction invalid created date ', async () => { const response = await apolloTestServer.executeOperation({ - query: 'mutation ($input: TransactionInput!) { sendTransaction(data: $input) }', + query: + 'mutation ($input: TransactionDraft!) { sendTransaction(data: $input) {error {type, message}, messageId} }', variables: { input: { + senderUser: { + uuid: '0ec72b74-48c2-446f-91ce-31ad7d9f4d65', + }, + recipientUser: { + uuid: 'ddc8258e-fcb5-4e48-8d1d-3a07ec371dbe', + }, type: 'SEND', amount: '10', - createdAt: '2023-03-02T10:12:00', + createdAt: 'not valid', }, }, }) @@ -106,10 +136,47 @@ describe('Transaction Resolver Test', () => { expect(response.body.singleResult).toMatchObject({ errors: [ { - message: - 'Variable "$input" got invalid value "2023-03-02T10:12:00" at "input.createdAt"; Float cannot represent non numeric value: "2023-03-02T10:12:00"', + message: 'Argument Validation Error', + extensions: { + code: 'BAD_USER_INPUT', + validationErrors: [ + { + value: 'not valid', + property: 'createdAt', + constraints: { + isValidDateString: 'createdAt must be a valid date string', + }, + }, + ], + }, }, ], }) }) + it('test mocked sendTransaction missing creationDate for contribution', async () => { + const response = await apolloTestServer.executeOperation({ + query: + 'mutation ($input: TransactionDraft!) { sendTransaction(data: $input) {error {type, message}, messageId} }', + variables: { + input: { + senderUser: { + uuid: '0ec72b74-48c2-446f-91ce-31ad7d9f4d65', + }, + recipientUser: { + uuid: 'ddc8258e-fcb5-4e48-8d1d-3a07ec371dbe', + }, + type: 'CREATION', + amount: '10', + createdAt: '2012-04-17T17:12:00Z', + }, + }, + }) + assert(response.body.kind === 'single') + expect(response.body.singleResult.data?.sendTransaction).toMatchObject({ + error: { + type: 'MISSING_PARAMETER', + message: 'missing targetDate for contribution', + }, + }) + }) }) diff --git a/dlt-connector/src/graphql/resolver/TransactionsResolver.ts b/dlt-connector/src/graphql/resolver/TransactionsResolver.ts index df50322fb..282eb11cd 100755 --- a/dlt-connector/src/graphql/resolver/TransactionsResolver.ts +++ b/dlt-connector/src/graphql/resolver/TransactionsResolver.ts @@ -1,9 +1,14 @@ import { Resolver, Query, Arg, Mutation } from 'type-graphql' -import { TransactionInput } from '@input/TransactionInput' -import { TransactionBody } from '@proto/TransactionBody' +import { TransactionDraft } from '@input/TransactionDraft' + +import { create as createTransactionBody } from '@controller/TransactionBody' +import { create as createGradidoTransaction } from '@controller/GradidoTransaction' import { sendMessage as iotaSendMessage } from '@/client/IotaClient' +import { GradidoTransaction } from '@/proto/3_3/GradidoTransaction' +import { TransactionResult } from '../model/TransactionResult' +import { TransactionError } from '../model/TransactionError' @Resolver() export class TransactionResolver { @@ -18,14 +23,23 @@ export class TransactionResolver { return '0.1' } - @Mutation(() => String) + @Mutation(() => TransactionResult) async sendTransaction( @Arg('data') - transaction: TransactionInput, - ): Promise { - const message = TransactionBody.fromObject(transaction) - const messageBuffer = TransactionBody.encode(message).finish() - const resultMessage = await iotaSendMessage(messageBuffer) - return resultMessage.messageId + transaction: TransactionDraft, + ): Promise { + try { + const body = createTransactionBody(transaction) + const message = createGradidoTransaction(body) + const messageBuffer = GradidoTransaction.encode(message).finish() + const resultMessage = await iotaSendMessage(messageBuffer) + return new TransactionResult(resultMessage.messageId) + } catch (error) { + if (error instanceof TransactionError) { + return new TransactionResult(error) + } else { + throw error + } + } } } diff --git a/dlt-connector/src/graphql/scalar/Decimal.ts b/dlt-connector/src/graphql/scalar/Decimal.ts index 5046488e5..b343f383a 100755 --- a/dlt-connector/src/graphql/scalar/Decimal.ts +++ b/dlt-connector/src/graphql/scalar/Decimal.ts @@ -2,7 +2,7 @@ import { Decimal } from 'decimal.js-light' import { GraphQLScalarType, Kind, ValueNode } from 'graphql' -export const DecimalScalar = new GraphQLScalarType({ +export const DecimalScalar = new GraphQLScalarType({ name: 'Decimal', description: 'The `Decimal` scalar type to represent currency values', diff --git a/dlt-connector/src/graphql/schema.ts b/dlt-connector/src/graphql/schema.ts index 84951f360..fc9c26919 100755 --- a/dlt-connector/src/graphql/schema.ts +++ b/dlt-connector/src/graphql/schema.ts @@ -4,10 +4,19 @@ import { buildSchema } from 'type-graphql' import { DecimalScalar } from './scalar/Decimal' import { TransactionResolver } from './resolver/TransactionsResolver' +import { CommunityResolver } from './resolver/CommunityResolver' export const schema = async (): Promise => { return buildSchema({ - resolvers: [TransactionResolver], + resolvers: [TransactionResolver, CommunityResolver], scalarsMap: [{ type: Decimal, scalar: DecimalScalar }], + validate: { + validationError: { target: false }, + skipMissingProperties: true, + skipNullProperties: true, + skipUndefinedProperties: false, + forbidUnknownValues: true, + stopAtFirstError: true, + }, }) } diff --git a/dlt-connector/src/graphql/validator/DateString.ts b/dlt-connector/src/graphql/validator/DateString.ts new file mode 100644 index 000000000..3f46d89ec --- /dev/null +++ b/dlt-connector/src/graphql/validator/DateString.ts @@ -0,0 +1,21 @@ +import { registerDecorator, ValidationOptions } from 'class-validator' + +export function isValidDateString(validationOptions?: ValidationOptions) { + // eslint-disable-next-line @typescript-eslint/ban-types + return function (object: Object, propertyName: string) { + registerDecorator({ + name: 'isValidDateString', + target: object.constructor, + propertyName, + options: validationOptions, + validator: { + validate(value: string): boolean { + return !isNaN(Date.parse(value)) + }, + defaultMessage(): string { + return `${propertyName} must be a valid date string` + }, + }, + }) + } +} diff --git a/dlt-connector/src/graphql/validator/Decimal.ts b/dlt-connector/src/graphql/validator/Decimal.ts new file mode 100644 index 000000000..fd2604514 --- /dev/null +++ b/dlt-connector/src/graphql/validator/Decimal.ts @@ -0,0 +1,22 @@ +import { registerDecorator, ValidationOptions, ValidationArguments } from 'class-validator' +import { Decimal } from 'decimal.js-light' + +export function IsPositiveDecimal(validationOptions?: ValidationOptions) { + // eslint-disable-next-line @typescript-eslint/ban-types + return function (object: Object, propertyName: string) { + registerDecorator({ + name: 'isPositiveDecimal', + target: object.constructor, + propertyName, + options: validationOptions, + validator: { + validate(value: Decimal): boolean { + return value.greaterThan(0) + }, + defaultMessage(args: ValidationArguments): string { + return `The ${propertyName} must be a positive value ${args.property}` + }, + }, + }) + } +} diff --git a/dlt-connector/src/proto/3_3/GradidoConfirmedTransaction.ts b/dlt-connector/src/proto/3_3/GradidoConfirmedTransaction.ts new file mode 100644 index 000000000..7f0a58109 --- /dev/null +++ b/dlt-connector/src/proto/3_3/GradidoConfirmedTransaction.ts @@ -0,0 +1,34 @@ +import { Field, Message } from '@apollo/protobufjs' +import { GradidoTransaction } from './GradidoTransaction' +import { TimestampSeconds } from './TimestampSeconds' + +/* + id will be set by Node server + running_hash will be also set by Node server, + calculated from previous transaction running_hash and this id, transaction and received +*/ + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class GradidoConfirmedTransaction extends Message { + @Field.d(1, 'uint64') + id: number + + @Field.d(2, 'GradidoTransaction') + transaction: GradidoTransaction + + @Field.d(3, 'TimestampSeconds') + confirmedAt: TimestampSeconds + + @Field.d(4, 'string') + versionNumber: string + + @Field.d(5, 'bytes') + runningHash: Buffer + + @Field.d(6, 'bytes') + messageId: Buffer + + @Field.d(7, 'string') + accountBalance: string +} diff --git a/dlt-connector/src/proto/3_3/GradidoCreation.test.ts b/dlt-connector/src/proto/3_3/GradidoCreation.test.ts new file mode 100644 index 000000000..8b3fd1b3f --- /dev/null +++ b/dlt-connector/src/proto/3_3/GradidoCreation.test.ts @@ -0,0 +1,20 @@ +import 'reflect-metadata' +import { TransactionDraft } from '@/graphql/input/TransactionDraft' +import { GradidoCreation } from './GradidoCreation' +import { TransactionError } from '@/graphql/model/TransactionError' +import { TransactionErrorType } from '@enum/TransactionErrorType' + +describe('proto/3.3/GradidoCreation', () => { + it('test with missing targetDate', () => { + const transactionDraft = new TransactionDraft() + expect(() => { + // eslint-disable-next-line no-new + new GradidoCreation(transactionDraft) + }).toThrowError( + new TransactionError( + TransactionErrorType.MISSING_PARAMETER, + 'missing targetDate for contribution', + ), + ) + }) +}) diff --git a/dlt-connector/src/proto/3_3/GradidoCreation.ts b/dlt-connector/src/proto/3_3/GradidoCreation.ts new file mode 100644 index 000000000..ba6e93652 --- /dev/null +++ b/dlt-connector/src/proto/3_3/GradidoCreation.ts @@ -0,0 +1,32 @@ +import { Field, Message } from '@apollo/protobufjs' + +import { TimestampSeconds } from './TimestampSeconds' +import { TransferAmount } from './TransferAmount' +import { TransactionDraft } from '@/graphql/input/TransactionDraft' +import { TransactionError } from '@/graphql/model/TransactionError' +import { TransactionErrorType } from '@/graphql/enum/TransactionErrorType' + +// need signature from group admin or +// percent of group users another than the receiver +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class GradidoCreation extends Message { + constructor(transaction: TransactionDraft) { + if (!transaction.targetDate) { + throw new TransactionError( + TransactionErrorType.MISSING_PARAMETER, + 'missing targetDate for contribution', + ) + } + super({ + recipient: new TransferAmount({ amount: transaction.amount.toString() }), + targetDate: new TimestampSeconds(new Date(transaction.targetDate)), + }) + } + + @Field.d(1, TransferAmount) + public recipient: TransferAmount + + @Field.d(3, 'TimestampSeconds') + public targetDate: TimestampSeconds +} diff --git a/dlt-connector/src/proto/3_3/GradidoDeferredTransfer.ts b/dlt-connector/src/proto/3_3/GradidoDeferredTransfer.ts new file mode 100644 index 000000000..7b27c064a --- /dev/null +++ b/dlt-connector/src/proto/3_3/GradidoDeferredTransfer.ts @@ -0,0 +1,31 @@ +import { Field, Message } from '@apollo/protobufjs' + +import { GradidoTransfer } from './GradidoTransfer' +import { TimestampSeconds } from './TimestampSeconds' + +// transaction type for chargeable transactions +// for transaction for people which haven't a account already +// consider using a seed number for key pair generation for recipient +// using seed as redeem key for claiming transaction, technically make a default Transfer transaction from recipient address +// seed must be long enough to prevent brute force, maybe base64 encoded +// to own account +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class GradidoDeferredTransfer extends Message { + // amount is amount with decay for time span between transaction was received and timeout + // useable amount can be calculated + // recipient address don't need to be registered in blockchain with register address + @Field.d(1, GradidoTransfer) + public transfer: GradidoTransfer + + // if timeout timestamp is reached if it wasn't used, it will be booked back minus decay + // technically on blockchain no additional transaction will be created because how should sign it? + // the decay for amount and the seconds until timeout is lost no matter what happened + // consider is as fee for this service + // rest decay could be transferred back as separate transaction + @Field.d(2, 'TimestampSeconds') + public timeout: TimestampSeconds + + // split for n recipient + // max gradido per recipient? or per transaction with cool down? +} diff --git a/dlt-connector/src/proto/3_3/GradidoTransaction.ts b/dlt-connector/src/proto/3_3/GradidoTransaction.ts new file mode 100644 index 000000000..ca1a59e30 --- /dev/null +++ b/dlt-connector/src/proto/3_3/GradidoTransaction.ts @@ -0,0 +1,21 @@ +import { Field, Message } from '@apollo/protobufjs' + +import { SignatureMap } from './SignatureMap' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class GradidoTransaction extends Message { + @Field.d(1, SignatureMap) + public sigMap: SignatureMap + + // inspired by Hedera + // bodyBytes are the payload for signature + // bodyBytes are serialized TransactionBody + @Field.d(2, 'bytes') + public bodyBytes: Buffer + + // if it is a cross group transaction the parent message + // id from outbound transaction or other by cross + @Field.d(3, 'bytes') + public parentMessageId: Buffer +} diff --git a/dlt-connector/src/proto/3_3/GradidoTransfer.ts b/dlt-connector/src/proto/3_3/GradidoTransfer.ts new file mode 100644 index 000000000..215ffc60f --- /dev/null +++ b/dlt-connector/src/proto/3_3/GradidoTransfer.ts @@ -0,0 +1,23 @@ +import { Field, Message } from '@apollo/protobufjs' + +import { TransferAmount } from './TransferAmount' +import { TransactionDraft } from '@/graphql/input/TransactionDraft' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class GradidoTransfer extends Message { + constructor(transaction: TransactionDraft, coinOrigin?: string) { + super({ + sender: new TransferAmount({ + amount: transaction.amount.toString(), + communityId: coinOrigin, + }), + }) + } + + @Field.d(1, TransferAmount) + public sender: TransferAmount + + @Field.d(2, 'bytes') + public recipient: Buffer +} diff --git a/dlt-connector/src/proto/3_3/GroupFriendsUpdate.ts b/dlt-connector/src/proto/3_3/GroupFriendsUpdate.ts new file mode 100644 index 000000000..64e74a694 --- /dev/null +++ b/dlt-connector/src/proto/3_3/GroupFriendsUpdate.ts @@ -0,0 +1,15 @@ +import { Field, Message } from '@apollo/protobufjs' + +// connect group together +// only CrossGroupType CROSS (in TransactionBody) +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class GroupFriendsUpdate extends Message { + // if set to true, colors of this both groups are trait as the same + // on creation user get coins still in there color + // on transfer into another group which a connection exist, + // coins will be automatic swapped into user group color coin + // (if fusion between src coin and dst coin is enabled) + @Field.d(1, 'bool') + public colorFusion: boolean +} diff --git a/dlt-connector/src/proto/3_3/RegisterAddress.ts b/dlt-connector/src/proto/3_3/RegisterAddress.ts new file mode 100644 index 000000000..85b8390df --- /dev/null +++ b/dlt-connector/src/proto/3_3/RegisterAddress.ts @@ -0,0 +1,19 @@ +import { Field, Message } from '@apollo/protobufjs' + +import { AddressType } from '@enum/AddressType' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class RegisterAddress extends Message { + @Field.d(1, 'bytes') + public userPubkey: Buffer + + @Field.d(2, 'AddressType') + public addressType: AddressType + + @Field.d(3, 'bytes') + public nameHash: Buffer + + @Field.d(4, 'bytes') + public subaccountPubkey: Buffer +} diff --git a/dlt-connector/src/proto/3_3/SignatureMap.ts b/dlt-connector/src/proto/3_3/SignatureMap.ts new file mode 100644 index 000000000..e48b0232d --- /dev/null +++ b/dlt-connector/src/proto/3_3/SignatureMap.ts @@ -0,0 +1,10 @@ +import { Field, Message } from '@apollo/protobufjs' + +import { SignaturePair } from './SignaturePair' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class SignatureMap extends Message { + @Field.d(1, SignaturePair, 'repeated') + public sigPair: SignaturePair +} diff --git a/dlt-connector/src/proto/3_3/SignaturePair.ts b/dlt-connector/src/proto/3_3/SignaturePair.ts new file mode 100644 index 000000000..07ed4cc55 --- /dev/null +++ b/dlt-connector/src/proto/3_3/SignaturePair.ts @@ -0,0 +1,11 @@ +import { Field, Message } from '@apollo/protobufjs' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class SignaturePair extends Message { + @Field.d(1, 'bytes') + public pubKey: Buffer + + @Field.d(2, 'bytes') + public signature: Buffer +} diff --git a/dlt-connector/src/proto/3_3/Timestamp.test.ts b/dlt-connector/src/proto/3_3/Timestamp.test.ts new file mode 100644 index 000000000..39f6fd2c8 --- /dev/null +++ b/dlt-connector/src/proto/3_3/Timestamp.test.ts @@ -0,0 +1,16 @@ +import { Timestamp } from './Timestamp' + +describe('test timestamp constructor', () => { + it('with date input object', () => { + const now = new Date('2011-04-17T12:01:10.109') + const timestamp = new Timestamp(now) + expect(timestamp.seconds).toEqual(1303041670) + expect(timestamp.nanoSeconds).toEqual(109000000) + }) + + it('with milliseconds number input', () => { + const timestamp = new Timestamp(1303041670109) + expect(timestamp.seconds).toEqual(1303041670) + expect(timestamp.nanoSeconds).toEqual(109000000) + }) +}) diff --git a/dlt-connector/src/proto/3_3/Timestamp.ts b/dlt-connector/src/proto/3_3/Timestamp.ts new file mode 100644 index 000000000..ab060a9bc --- /dev/null +++ b/dlt-connector/src/proto/3_3/Timestamp.ts @@ -0,0 +1,27 @@ +import { Field, Message } from '@apollo/protobufjs' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class Timestamp extends Message { + public constructor(input?: Date | number) { + let seconds = 0 + let nanoSeconds = 0 + if (input instanceof Date) { + seconds = Math.floor(input.getTime() / 1000) + nanoSeconds = (input.getTime() % 1000) * 1000000 // Convert milliseconds to nanoseconds + } else if (typeof input === 'number') { + // Calculate seconds and nanoseconds from milliseconds + seconds = Math.floor(input / 1000) + nanoSeconds = (input % 1000) * 1000000 + } + super({ seconds, nanoSeconds }) + } + + // Number of complete seconds since the start of the epoch + @Field.d(1, 'int64') + public seconds: number + + // Number of nanoseconds since the start of the last second + @Field.d(2, 'int32') + public nanoSeconds: number +} diff --git a/dlt-connector/src/proto/3_3/TimestampSeconds.test.ts b/dlt-connector/src/proto/3_3/TimestampSeconds.test.ts new file mode 100644 index 000000000..92dc79130 --- /dev/null +++ b/dlt-connector/src/proto/3_3/TimestampSeconds.test.ts @@ -0,0 +1,14 @@ +import { TimestampSeconds } from './TimestampSeconds' + +describe('test TimestampSeconds constructor', () => { + it('with date input object', () => { + const now = new Date('2011-04-17T12:01:10.109') + const timestamp = new TimestampSeconds(now) + expect(timestamp.seconds).toEqual(1303041670) + }) + + it('with milliseconds number input', () => { + const timestamp = new TimestampSeconds(1303041670109) + expect(timestamp.seconds).toEqual(1303041670) + }) +}) diff --git a/dlt-connector/src/proto/3_3/TimestampSeconds.ts b/dlt-connector/src/proto/3_3/TimestampSeconds.ts new file mode 100644 index 000000000..055094c6d --- /dev/null +++ b/dlt-connector/src/proto/3_3/TimestampSeconds.ts @@ -0,0 +1,20 @@ +import { Field, Message } from '@apollo/protobufjs' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class TimestampSeconds extends Message { + public constructor(input?: Date | number) { + let seconds = 0 + // Calculate seconds from milliseconds + if (input instanceof Date) { + seconds = Math.floor(input.getTime() / 1000) + } else if (typeof input === 'number') { + seconds = Math.floor(input / 1000) + } + super({ seconds }) + } + + // Number of complete seconds since the start of the epoch + @Field.d(1, 'int64') + public seconds: number +} diff --git a/dlt-connector/src/proto/3_3/TransactionBody.ts b/dlt-connector/src/proto/3_3/TransactionBody.ts new file mode 100644 index 000000000..9e9179b3f --- /dev/null +++ b/dlt-connector/src/proto/3_3/TransactionBody.ts @@ -0,0 +1,66 @@ +import { Field, Message, OneOf } from '@apollo/protobufjs' + +import { CrossGroupType } from '@/graphql/enum/CrossGroupType' + +import { Timestamp } from './Timestamp' +import { GradidoTransfer } from './GradidoTransfer' +import { GradidoCreation } from './GradidoCreation' +import { GradidoDeferredTransfer } from './GradidoDeferredTransfer' +import { GroupFriendsUpdate } from './GroupFriendsUpdate' +import { RegisterAddress } from './RegisterAddress' +import { TransactionDraft } from '@/graphql/input/TransactionDraft' +import { determineCrossGroupType, determineOtherGroup } from '@/controller/TransactionBody' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class TransactionBody extends Message { + public constructor(transaction: TransactionDraft) { + const type = determineCrossGroupType(transaction) + super({ + memo: 'Not implemented yet', + createdAt: new Timestamp(new Date(transaction.createdAt)), + versionNumber: '3.3', + type, + otherGroup: determineOtherGroup(type, transaction), + }) + } + + @Field.d(1, 'string') + public memo: string + + @Field.d(2, Timestamp) + public createdAt: Timestamp + + @Field.d(3, 'string') + public versionNumber: string + + @Field.d(4, CrossGroupType) + public type: CrossGroupType + + @Field.d(5, 'string') + public otherGroup: string + + @OneOf.d( + 'gradidoTransfer', + 'gradidoCreation', + 'groupFriendsUpdate', + 'registerAddress', + 'gradidoDeferredTransfer', + ) + public data: string + + @Field.d(6, 'GradidoTransfer') + transfer?: GradidoTransfer + + @Field.d(7, 'GradidoCreation') + creation?: GradidoCreation + + @Field.d(8, 'GroupFriendsUpdate') + groupFriendsUpdate?: GroupFriendsUpdate + + @Field.d(9, 'RegisterAddress') + registerAddress?: RegisterAddress + + @Field.d(10, 'GradidoDeferredTransfer') + deferredTransfer?: GradidoDeferredTransfer +} diff --git a/dlt-connector/src/proto/3_3/TransferAmount.ts b/dlt-connector/src/proto/3_3/TransferAmount.ts new file mode 100644 index 000000000..f6adc47ff --- /dev/null +++ b/dlt-connector/src/proto/3_3/TransferAmount.ts @@ -0,0 +1,16 @@ +import { Field, Message } from '@apollo/protobufjs' + +// https://www.npmjs.com/package/@apollo/protobufjs +// eslint-disable-next-line no-use-before-define +export class TransferAmount extends Message { + @Field.d(1, 'bytes') + public pubkey: Buffer + + @Field.d(2, 'string') + public amount: string + + // community which created this coin + // used for colored coins + @Field.d(3, 'string') + public communityId: string +} diff --git a/dlt-connector/src/proto/TransactionBody.test.ts b/dlt-connector/src/proto/TransactionBody.test.ts deleted file mode 100644 index 168d15b63..000000000 --- a/dlt-connector/src/proto/TransactionBody.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import 'reflect-metadata' -import { TransactionType } from '@enum/TransactionType' -import { TransactionInput } from '@input/TransactionInput' -import Decimal from 'decimal.js-light' -import { TransactionBody } from './TransactionBody' - -describe('proto/TransactionBodyTest', () => { - it('test compatible with graphql/input/TransactionInput', async () => { - // test data - const type = TransactionType.SEND - const amount = new Decimal('10') - const createdAt = 1688992436 - - // init both objects - // graphql input object - const transactionInput = new TransactionInput() - transactionInput.type = type - transactionInput.amount = amount - transactionInput.createdAt = createdAt - - // protobuf object - const transactionBody = new TransactionBody() - transactionBody.type = type - transactionBody.amount = amount.toString() - transactionBody.createdAt = createdAt - - // create protobuf object from graphql Input object - const message = TransactionBody.fromObject(transactionInput) - // serialize both protobuf objects - const messageBuffer = TransactionBody.encode(message).finish() - const messageBuffer2 = TransactionBody.encode(transactionBody).finish() - - // compare - expect(messageBuffer).toStrictEqual(messageBuffer2) - }) -}) diff --git a/dlt-connector/src/proto/TransactionBody.ts b/dlt-connector/src/proto/TransactionBody.ts deleted file mode 100644 index 8fda5b863..000000000 --- a/dlt-connector/src/proto/TransactionBody.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TransactionType } from '../graphql/enum/TransactionType' -import { Field, Message } from '@apollo/protobufjs' - -// https://www.npmjs.com/package/@apollo/protobufjs -// eslint-disable-next-line no-use-before-define -export class TransactionBody extends Message { - @Field.d(1, TransactionType) - type: TransactionType - - @Field.d(2, 'string') - amount: string - - @Field.d(3, 'uint64') - createdAt: number - - // @protoField.d(4, 'string') - // communitySum: Decimal -} diff --git a/dlt-connector/src/typeorm/DBVersion.ts b/dlt-connector/src/typeorm/DBVersion.ts new file mode 100644 index 000000000..14da39368 --- /dev/null +++ b/dlt-connector/src/typeorm/DBVersion.ts @@ -0,0 +1,28 @@ +import { Migration } from '@entity/Migration' + +import { logger } from '@/server/logger' + +const getDBVersion = async (): Promise => { + try { + const [dbVersion] = await Migration.find({ order: { version: 'DESC' }, take: 1 }) + return dbVersion ? dbVersion.fileName : null + } catch (error) { + logger.error(error) + return null + } +} + +const checkDBVersion = async (DB_VERSION: string): Promise => { + const dbVersion = await getDBVersion() + if (!dbVersion?.includes(DB_VERSION)) { + logger.error( + `Wrong database version detected - the backend requires '${DB_VERSION}' but found '${ + dbVersion ?? 'None' + }`, + ) + return false + } + return true +} + +export { checkDBVersion, getDBVersion } diff --git a/dlt-connector/src/typeorm/DataSource.ts b/dlt-connector/src/typeorm/DataSource.ts new file mode 100644 index 000000000..eafa977aa --- /dev/null +++ b/dlt-connector/src/typeorm/DataSource.ts @@ -0,0 +1,26 @@ +// TODO This is super weird - since the entities are defined in another project they have their own globals. +// We cannot use our connection here, but must use the external typeorm installation +import { DataSource as DBDataSource, FileLogger } from '@dbTools/typeorm' +import { entities } from '@entity/index' + +import { CONFIG } from '@/config' + +const DataSource = new DBDataSource({ + type: 'mysql', + host: CONFIG.DB_HOST, + port: CONFIG.DB_PORT, + username: CONFIG.DB_USER, + password: CONFIG.DB_PASSWORD, + database: CONFIG.DB_DATABASE, + entities, + synchronize: false, + logging: true, + logger: new FileLogger('all', { + logPath: CONFIG.TYPEORM_LOGGING_RELATIVE_PATH, + }), + extra: { + charset: 'utf8mb4_unicode_ci', + }, +}) + +export const getDataSource = () => DataSource diff --git a/dlt-connector/src/utils/typeConverter.ts b/dlt-connector/src/utils/typeConverter.ts new file mode 100644 index 000000000..bd9e5f8da --- /dev/null +++ b/dlt-connector/src/utils/typeConverter.ts @@ -0,0 +1,17 @@ +import { crypto_generichash as cryptoHash } from 'sodium-native' + +export const uuid4ToBuffer = (uuid: string): Buffer => { + // Remove dashes from the UUIDv4 string + const cleanedUUID = uuid.replace(/-/g, '') + + // Create a Buffer object from the hexadecimal values + const buffer = Buffer.from(cleanedUUID, 'hex') + + return buffer +} + +export const iotaTopicFromCommunityUUID = (communityUUID: string): string => { + const hash = Buffer.alloc(32) + cryptoHash(hash, uuid4ToBuffer(communityUUID)) + return hash.toString('hex') +} diff --git a/dlt-connector/test/TestDB.ts b/dlt-connector/test/TestDB.ts new file mode 100644 index 000000000..457954f7d --- /dev/null +++ b/dlt-connector/test/TestDB.ts @@ -0,0 +1,77 @@ +import { DataSource, FileLogger } from '@dbTools/typeorm' +import { createDatabase } from 'typeorm-extension' + +import { entities } from '@entity/index' + +import { CONFIG } from '@/config' +import { LogError } from '@/server/LogError' + +export class TestDB { + // eslint-disable-next-line no-use-before-define + private static _instance: TestDB + + private constructor() { + if (!CONFIG.DB_DATABASE_TEST) { + throw new LogError('no test db in config') + } + if (CONFIG.DB_DATABASE === CONFIG.DB_DATABASE_TEST) { + throw new LogError( + 'main db is the same as test db, not good because test db will be cleared after each test run', + ) + } + this.dbConnect = new DataSource({ + type: 'mysql', + host: CONFIG.DB_HOST, + port: CONFIG.DB_PORT, + username: CONFIG.DB_USER, + password: CONFIG.DB_PASSWORD, + database: CONFIG.DB_DATABASE_TEST, + entities, + synchronize: true, + dropSchema: true, + logging: true, + logger: new FileLogger('all', { + logPath: CONFIG.TYPEORM_LOGGING_RELATIVE_PATH, + }), + extra: { + charset: 'utf8mb4_unicode_ci', + }, + }) + } + + public static get instance(): TestDB { + if (!this._instance) this._instance = new TestDB() + return this._instance + } + + public dbConnect!: DataSource + + async setupTestDB() { + // eslint-disable-next-line no-console + try { + if (!CONFIG.DB_DATABASE_TEST) { + throw new LogError('no test db in config') + } + await createDatabase({ + ifNotExist: true, + options: { + type: 'mysql', + charset: 'utf8mb4_unicode_ci', + host: CONFIG.DB_HOST, + port: CONFIG.DB_PORT, + username: CONFIG.DB_USER, + password: CONFIG.DB_PASSWORD, + database: CONFIG.DB_DATABASE_TEST, + }, + }) + await this.dbConnect.initialize() + } catch (error) { + // eslint-disable-next-line no-console + console.log(error) + } + } + + async teardownTestDB() { + await this.dbConnect.destroy() + } +} diff --git a/dlt-connector/tsconfig.json b/dlt-connector/tsconfig.json index bdc5e3a9b..3abf9aead 100644 --- a/dlt-connector/tsconfig.json +++ b/dlt-connector/tsconfig.json @@ -51,11 +51,17 @@ "@arg/*": ["src/graphql/arg/*"], "@enum/*": ["src/graphql/enum/*"], "@input/*": ["src/graphql/input/*"], + "@model/*": ["src/graphql/model/*"], "@resolver/*": ["src/graphql/resolver/*"], "@scalar/*": ["src/graphql/scalar/*"], "@test/*": ["test/*"], "@proto/*" : ["src/proto/*"], + "@controller/*": ["src/controller/*"], + "@validator/*" : ["src/graphql/validator/*"], + "@typeorm/*" : ["src/typeorm/*"], /* external */ + "@dbTools/*": ["../dlt-database/src/*", "../../dlt-database/build/src/*"], + "@entity/*": ["../dlt-database/entity/*", "../../dlt-database/build/entity/*"] }, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ "typeRoots": ["node_modules/@types"], /* List of folders to include type definitions from. */ @@ -79,4 +85,11 @@ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, + "references": [ + { + "path": "../dlt-database/tsconfig.json", + // add 'prepend' if you want to include the referenced project in your output file + // "prepend": true + } + ] } diff --git a/dlt-connector/yarn.lock b/dlt-connector/yarn.lock index 54c58c1e6..136e845f5 100644 --- a/dlt-connector/yarn.lock +++ b/dlt-connector/yarn.lock @@ -49,9 +49,9 @@ "@apollo/utils.logger" "^2.0.0" "@apollo/server@^4.7.5": - version "4.7.5" - resolved "https://registry.yarnpkg.com/@apollo/server/-/server-4.7.5.tgz#b3f679dd50898f55b6d11dd61efb1f05e59503b5" - integrity sha512-XobKpTnW/jbmr0DuJ+8zBzoeL6uEat4CkBN7kOCjhXEUuCNxiLrQGrWFVDqgV7bSdOJr6o2POmZYBPNQXLdyvA== + version "4.9.3" + resolved "https://registry.yarnpkg.com/@apollo/server/-/server-4.9.3.tgz#d51fa1745a7e9f3b1d687c6df40256744aaa977a" + integrity sha512-U56Sx/UmzR3Es344hQ/Ptf2EJrH+kV4ZPoLmgGjWoiwf2wYQ/pRSvkSXgjOvoyE34wSa8Gh7f92ljfLfY+6q1w== dependencies: "@apollo/cache-control-types" "^1.0.3" "@apollo/server-gateway-interface" "^1.1.1" @@ -167,72 +167,73 @@ resolved "https://registry.yarnpkg.com/@apollo/utils.withrequired/-/utils.withrequired-2.0.1.tgz#e72bc512582a6f26af150439f7eb7473b46ba874" integrity sha512-YBDiuAX9i1lLc6GeTy1m7DGLFn/gMnvXqlalOIMjM7DeOgIacEjjfwPqb0M1CQ2v11HhR15d1NmxJoRCfrNqcA== -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== dependencies: - "@babel/highlight" "^7.22.5" + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" -"@babel/compat-data@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.6.tgz#15606a20341de59ba02cd2fcc5086fcbe73bf544" - integrity sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg== +"@babel/compat-data@^7.22.9": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.20.tgz#8df6e96661209623f1975d66c35ffca66f3306d0" + integrity sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.8.tgz#386470abe884302db9c82e8e5e87be9e46c86785" - integrity sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw== + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.0.tgz#f8259ae0e52a123eb40f552551e647b506a94d83" + integrity sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" - "@babel/helper-compilation-targets" "^7.22.6" - "@babel/helper-module-transforms" "^7.22.5" - "@babel/helpers" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.8" - "@babel/types" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" - convert-source-map "^1.7.0" + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.0" + "@babel/helpers" "^7.23.0" + "@babel/parser" "^7.23.0" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.0" + "@babel/types" "^7.23.0" + convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" + json5 "^2.2.3" + semver "^6.3.1" -"@babel/generator@^7.22.7", "@babel/generator@^7.7.2": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.7.tgz#a6b8152d5a621893f2c9dacf9a4e286d520633d5" - integrity sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ== +"@babel/generator@^7.23.0", "@babel/generator@^7.7.2": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.23.0" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz#e30d61abe9480aa5a83232eb31c111be922d2e52" - integrity sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA== +"@babel/helper-compilation-targets@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" + integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== dependencies: - "@babel/compat-data" "^7.22.6" - "@babel/helper-validator-option" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" + "@babel/compat-data" "^7.22.9" + "@babel/helper-validator-option" "^7.22.15" browserslist "^4.21.9" lru-cache "^5.1.1" + semver "^6.3.1" -"@babel/helper-environment-visitor@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" - integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-function-name@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" - integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/template" "^7.22.5" - "@babel/types" "^7.22.5" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" @@ -241,26 +242,23 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-module-imports@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" - integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== +"@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.22.15" -"@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== +"@babel/helper-module-transforms@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" + integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-module-imports" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": version "7.22.5" @@ -274,7 +272,7 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-split-export-declaration@^7.22.5", "@babel/helper-split-export-declaration@^7.22.6": +"@babel/helper-split-export-declaration@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== @@ -286,38 +284,38 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== -"@babel/helper-validator-identifier@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" - integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== -"@babel/helper-validator-option@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" - integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== +"@babel/helper-validator-option@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" + integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== -"@babel/helpers@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.6.tgz#8e61d3395a4f0c5a8060f309fb008200969b5ecd" - integrity sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA== +"@babel/helpers@^7.23.0": + version "7.23.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.1.tgz#44e981e8ce2b9e99f8f0b703f3326a4636c16d15" + integrity sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA== dependencies: - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.6" - "@babel/types" "^7.22.5" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.0" + "@babel/types" "^7.23.0" -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== dependencies: - "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5", "@babel/parser@^7.22.7": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" - integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -410,38 +408,45 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/template@^7.22.5", "@babel/template@^7.3.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" - integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== +"@babel/runtime@^7.21.0": + version "7.23.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" + integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" + regenerator-runtime "^0.14.0" -"@babel/traverse@^7.22.5", "@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.7.2": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e" - integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw== +"@babel/template@^7.22.15", "@babel/template@^7.3.3": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.23.0", "@babel/traverse@^7.7.2": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.0.tgz#18196ddfbcf4ccea324b7f6d3ada00d8c5a99c53" + integrity sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/types" "^7.22.5" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.3.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.3.3": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== dependencies: "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -471,15 +476,15 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" - integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.0.tgz#7ccb5f58703fa61ffdcbf39e2c604a109e781162" + integrity sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ== -"@eslint/eslintrc@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.0.tgz#82256f164cc9e0b59669efc19d57f8092706841d" - integrity sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A== +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -491,10 +496,15 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.44.0": - version "8.44.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.44.0.tgz#961a5903c74139390478bdc808bcde3fc45ab7af" - integrity sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw== +"@eslint/js@8.50.0": + version "8.50.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.50.0.tgz#9e93b850f0f3fa35f5fa59adfd03adae8488e484" + integrity sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ== + +"@faker-js/faker@^8.0.2": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-8.1.0.tgz#e14896f1c57af2495e341dc4c7bf04125c8aeafd" + integrity sha512-38DT60rumHfBYynif3lmtxMqMqmsOQIxQgEuPZxCk2yUYN0eqWpTACgxi0VpidvsJB8CRxCpvP7B3anK85FjtQ== "@graphql-tools/merge@^8.4.1": version "8.4.2" @@ -543,9 +553,9 @@ value-or-promise "^1.0.12" "@graphql-tools/utils@^10.0.0": - version "10.0.3" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-10.0.3.tgz#e5d5b217ba643b7b67a35b50086b5d831aadb71c" - integrity sha512-6uO41urAEIs4sXQT2+CYGsUTkHkVo/2MpM/QjoHj6D6xoEF2woXHBpdAVi0HKIInDwZqWgEYOwIFez0pERxa1Q== + version "10.0.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-10.0.6.tgz#8a809d6bc0df27ffe8964696f182af2383b5974b" + integrity sha512-hZMjl/BbX10iagovakgf3IiqArx8TPsotq5pwBld37uIX1JiZoSbgbCIFol7u55bh32o6cfDEiiJgfAD5fbeyQ== dependencies: "@graphql-typed-document-node/core" "^3.1.1" dset "^3.1.2" @@ -564,10 +574,10 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== -"@humanwhocodes/config-array@^0.11.10": - version "0.11.10" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" - integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -591,6 +601,18 @@ neon-cli "^0.8" prebuild-install "^6.1.2" +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -790,12 +812,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/resolve-uri@^3.0.3": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== @@ -805,12 +822,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -824,17 +836,12 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@nicolo-ribaudo/semver-v6@^6.3.3": - version "6.3.3" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz#ea6d23ade78a325f7a52750aab1526b02b628c29" - integrity sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg== + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -857,17 +864,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/utils@^2.3.1": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" - integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== - dependencies: - cross-spawn "^7.0.3" - fast-glob "^3.3.0" - is-glob "^4.0.3" - open "^9.1.0" - picocolors "^1.0.0" - tslib "^2.6.0" +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -936,6 +936,11 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@sqltools/formatter@^1.2.5": + version "1.2.5" + resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12" + integrity sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw== + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -962,9 +967,9 @@ integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.1.tgz#916ecea274b0c776fec721e333e55762d3a9614b" - integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw== + version "7.20.2" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.2.tgz#215db4f4a35d710256579784a548907237728756" + integrity sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA== dependencies: "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" @@ -973,53 +978,53 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + version "7.6.5" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.5.tgz#281f4764bcbbbc51fdded0f25aa587b4ce14da95" + integrity sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + version "7.4.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.2.tgz#843e9f1f47c957553b0c374481dc4772921d6a6b" + integrity sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.1.tgz#dd6f1d2411ae677dcb2db008c962598be31d6acf" - integrity sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg== + version "7.20.2" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.2.tgz#4ddf99d95cfdd946ff35d2b65c978d9c9bf2645d" + integrity sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw== dependencies: "@babel/types" "^7.20.7" "@types/body-parser@*": - version "1.19.2" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + version "1.19.3" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.3.tgz#fb558014374f7d9e56c8f34bab2042a3a07d25cd" + integrity sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ== dependencies: "@types/connect" "*" "@types/node" "*" "@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + version "3.4.36" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.36.tgz#e511558c15a39cb29bd5357eebb57bd1459cd1ab" + integrity sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w== dependencies: "@types/node" "*" "@types/cors@^2.8.13": - version "2.8.13" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" - integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + version "2.8.14" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.14.tgz#94eeb1c95eda6a8ab54870a3bf88854512f43a92" + integrity sha512-RXHUvNWYICtbP6s18PnOCaqToK8y14DnLd75c6HfyKf228dxy7pHNOQkxPtvXKp/hINFMDjbYzsj63nnpPMSRQ== dependencies: "@types/node" "*" "@types/express-serve-static-core@^4.17.30", "@types/express-serve-static-core@^4.17.33": - version "4.17.35" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz#c95dd4424f0d32e525d23812aa8ab8e4d3906c4f" - integrity sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg== + version "4.17.37" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.37.tgz#7e4b7b59da9142138a2aaa7621f5abedce8c7320" + integrity sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg== dependencies: "@types/node" "*" "@types/qs" "*" @@ -1027,9 +1032,9 @@ "@types/send" "*" "@types/express@^4.17.13": - version "4.17.17" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.17.tgz#01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== + version "4.17.18" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.18.tgz#efabf5c4495c1880df1bdffee604b143b29c4a95" + integrity sha512-Sxv8BSLLgsBYmcnGdGjjEjqET2U+AKAdCRODmMiq02FgjwuV75Ut85DRpvFjyw/Mk0vgUOliGRU0UUmuuZHByQ== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "^4.17.33" @@ -1037,16 +1042,16 @@ "@types/serve-static" "*" "@types/graceful-fs@^4.1.2": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" - integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.7.tgz#30443a2e64fd51113bc3e2ba0914d47109695e2a" + integrity sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw== dependencies: "@types/node" "*" "@types/http-errors@*": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.1.tgz#20172f9578b225f6c7da63446f56d4ce108d5a65" - integrity sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.2.tgz#a86e00bbde8950364f8e7846687259ffcd96e8c2" + integrity sha512-lPG6KlZs88gef6aD85z3HNkztpj7w2R7HmR3gygjfXCQmsLloWNARFkMuzKiiY8FGdh1XDpgBdrSf4aKDiA7Kg== "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" @@ -1054,16 +1059,16 @@ integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== "@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#412e0725ef41cde73bfa03e0e833eaff41e0fd63" + integrity sha512-gPQuzaPR5h/djlAv2apEG1HVOyj1IUs7GpfMZixU0/0KXT3pm64ylHuMUI1/Akh+sq/iikxg6Z2j+fcMDXaaTQ== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.2.tgz#edc8e421991a3b4df875036d381fc0a5a982f549" + integrity sha512-kv43F9eb3Lhj+lr/Hn6OcLCs/sSM8bt+fIaP11rCYngfV6NVjzWXJ17owQtDQTL9tQ8WSLUrGsSJ6rJz0F1w1A== dependencies: "@types/istanbul-lib-report" "*" @@ -1076,9 +1081,9 @@ pretty-format "^27.0.0" "@types/json-schema@^7.0.9": - version "7.0.12" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== "@types/json5@^0.0.29": version "0.0.29" @@ -1100,23 +1105,30 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node-fetch@^2.6.1": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" - integrity sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg== +"@types/mysql@^2.15.8": + version "2.15.21" + resolved "https://registry.yarnpkg.com/@types/mysql/-/mysql-2.15.21.tgz#7516cba7f9d077f980100c85fd500c8210bd5e45" + integrity sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg== dependencies: "@types/node" "*" - form-data "^3.0.0" -"@types/node@*", "@types/node@^20.1.2": - version "20.4.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.1.tgz#a6033a8718653c50ac4962977e14d0f984d9527d" - integrity sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg== +"@types/node-fetch@^2.6.1": + version "2.6.6" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.6.tgz#b72f3f4bc0c0afee1c0bc9cff68e041d01e3e779" + integrity sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + +"@types/node@*", "@types/node@^20.4.9": + version "20.7.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.7.0.tgz#c03de4572f114a940bc2ca909a33ddb2b925e470" + integrity sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg== "@types/node@^18.11.18": - version "18.16.19" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.19.tgz#cb03fca8910fdeb7595b755126a8a78144714eea" - integrity sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA== + version "18.18.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.0.tgz#bd19d5133a6e5e2d0152ec079ac27c120e7f1763" + integrity sha512-3xA4X31gHT1F1l38ATDIL9GpRLdwVhnEFC8Uikv5ZLlXATwrCYyPq7ZWHxzxc3J/30SUiwiYT+bQe0/XvKlWbw== "@types/prettier@^2.1.5": version "2.7.3" @@ -1124,9 +1136,9 @@ integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== "@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + version "6.9.8" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.8.tgz#f2a7de3c107b89b441e071d5472e6b726b4adf45" + integrity sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg== "@types/range-parser@*": version "1.2.4" @@ -1134,27 +1146,34 @@ integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== "@types/semver@^7.3.12", "@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + version "7.5.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" + integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== "@types/send@*": - version "0.17.1" - resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" - integrity sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q== + version "0.17.2" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.2.tgz#af78a4495e3c2b79bfbdac3955fdd50e03cc98f2" + integrity sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw== dependencies: "@types/mime" "^1" "@types/node" "*" "@types/serve-static@*": - version "1.15.2" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.2.tgz#3e5419ecd1e40e7405d34093f10befb43f63381a" - integrity sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw== + version "1.15.3" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.3.tgz#2cfacfd1fd4520bbc3e292cca432d5e8e2e3ee61" + integrity sha512-yVRvFsEMrv7s0lGhzrggJjNOSmZCdgCjw9xWrPr/kNNLp6FaDfMC1KaYl3TSJ0c58bECwNBMoQrZJ8hA8E1eFg== dependencies: "@types/http-errors" "*" "@types/mime" "*" "@types/node" "*" +"@types/sodium-native@^2.3.5": + version "2.3.6" + resolved "https://registry.yarnpkg.com/@types/sodium-native/-/sodium-native-2.3.6.tgz#2730191204978a1a96ec7de2f2653ef3e4f7927a" + integrity sha512-MMQ0aR90G9A8WiynSaNsUnzzlkw6akTqYz+OBEgSH/Y3+91X/bkkP3lOJROogLSQMoONM81IX49yVmakEWw6ZA== + dependencies: + "@types/node" "*" + "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -1166,19 +1185,19 @@ integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== "@types/validator@^13.7.10": - version "13.7.17" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.17.tgz#0a6d1510395065171e3378a4afc587a3aefa7cc1" - integrity sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ== + version "13.11.2" + resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.11.2.tgz#a2502325a3c0bd29f36dbac3b763223edd801e17" + integrity sha512-nIKVVQKT6kGKysnNt+xLobr+pFJNssJRi2s034wgWeFBUx01fI8BeHTW2TcRp7VcFu9QCYG8IlChTuovcm0oKQ== "@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + version "21.0.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.1.tgz#07773d7160494d56aa882d7531aac7319ea67c3b" + integrity sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ== "@types/yargs@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.5.tgz#12cc86393985735a283e387936398c2f9e5f88e3" - integrity sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ== + version "16.0.6" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.6.tgz#cc0c63684d68d23498cf0b5f32aa4c3fb437c638" + integrity sha512-oTP7/Q13GSPrgcwEwdlnkoZSQ1Hg9THe644qq8PG6hhJzjZ3qj1JjEFPIwWV/IXVs5XGIVqtkNOS9kh63WIJ+A== dependencies: "@types/yargs-parser" "*" @@ -1324,7 +1343,7 @@ agent-base@6: dependencies: debug "4" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1351,6 +1370,11 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -1370,6 +1394,16 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -1378,6 +1412,11 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86" + integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA== + aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -1432,14 +1471,14 @@ array-flatten@1.1.1: integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== + version "3.1.7" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" + integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" is-string "^1.0.7" array-union@^2.1.0: @@ -1447,26 +1486,50 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== +array.prototype.findlastindex@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + +array.prototype.flat@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + async-retry@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" @@ -1555,10 +1618,10 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -big-integer@^1.6.44: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== +bignumber.js@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" + integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== binary-extensions@^2.0.0: version "2.2.0" @@ -1626,13 +1689,6 @@ body-parser@^1.20.0, body-parser@^1.20.2: type-is "~1.6.18" unpipe "1.0.0" -bplist-parser@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== - dependencies: - big-integer "^1.6.44" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1641,6 +1697,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -1654,14 +1717,14 @@ browser-process-hrtime@^1.0.0: integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browserslist@^4.21.9: - version "4.21.9" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" - integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg== + version "4.22.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.0.tgz#6adc8116589ccea8a99d0df79c5de2436199abdb" + integrity sha512-v+Jcv64L2LbfTC6OnRcaxtqJNJuQAVhZKSJfR/6hn7lhnChUXl4amwVviqN1k411BB+3rRoKMitELRn1CojeRA== dependencies: - caniuse-lite "^1.0.30001503" - electron-to-chromium "^1.4.431" - node-releases "^2.0.12" - update-browserslist-db "^1.0.11" + caniuse-lite "^1.0.30001539" + electron-to-chromium "^1.4.530" + node-releases "^2.0.13" + update-browserslist-db "^1.0.13" bs-logger@0.x: version "0.2.6" @@ -1690,6 +1753,14 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -1702,13 +1773,6 @@ builtins@^5.0.1: dependencies: semver "^7.0.0" -bundle-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" - integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== - dependencies: - run-applescript "^5.0.0" - bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" @@ -1742,12 +1806,12 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001503: - version "1.0.30001515" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz#418aefeed9d024cd3129bfae0ccc782d4cb8f12b" - integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA== +caniuse-lite@^1.0.30001539: + version "1.0.30001540" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001540.tgz#a316ca4f2ae673ab02ff0ec533334016d56ff658" + integrity sha512-9JL38jscuTJBTcuETxm8QLsFr/F6v0CYYTEU6r5+qSM98P2Q0Hmu0eG1dTG5GBUmywU3UlcVOUSIJYY47rdFSw== -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1756,7 +1820,7 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1820,6 +1884,18 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-highlight@^2.1.11: + version "2.1.11" + resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf" + integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg== + dependencies: + chalk "^4.0.0" + highlight.js "^10.7.1" + mz "^2.4.0" + parse5 "^5.1.1" + parse5-htmlparser2-tree-adapter "^6.0.0" + yargs "^16.0.0" + cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -1834,6 +1910,15 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1912,6 +1997,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -1936,11 +2026,16 @@ content-type@~1.0.4, content-type@~1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.6.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -1981,7 +2076,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1990,6 +2085,11 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +crypto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" + integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== + cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -2016,6 +2116,13 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" +date-fns@^2.29.3: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + date-format@^4.0.14: version "4.0.14" resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" @@ -2079,34 +2186,21 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -default-browser-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" - integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== +define-data-property@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.0.tgz#0db13540704e1d8d479a0656cf781267531b9451" + integrity sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g== dependencies: - bplist-parser "^0.2.0" - untildify "^4.0.0" - -default-browser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" - integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== - dependencies: - bundle-name "^3.0.0" - default-browser-id "^3.0.0" - execa "^7.1.1" - titleize "^3.0.0" - -define-lazy-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" - integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== dependencies: + define-data-property "^1.0.1" has-property-descriptors "^1.0.0" object-keys "^1.1.1" @@ -2120,6 +2214,11 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== +denque@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" + integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -2130,6 +2229,11 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== +destr@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.1.tgz#2fc7bddc256fed1183e03f8d148391dde4023cb2" + integrity sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA== + destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -2167,6 +2271,20 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +"dlt-database@file:../dlt-database": + version "1.23.2" + dependencies: + "@types/uuid" "^8.3.4" + cross-env "^7.0.3" + crypto "^1.0.1" + decimal.js-light "^2.5.1" + dotenv "^10.0.0" + mysql2 "^2.3.0" + reflect-metadata "^0.1.13" + ts-mysql-migrate "^1.0.2" + typeorm "^0.3.16" + uuid "^8.3.2" + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -2188,25 +2306,42 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -dotenv@10.0.0: +dotenv@10.0.0, dotenv@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== +dotenv@^16.0.3: + version "16.3.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== + dset@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.2.tgz#89c436ca6450398396dc6538ea00abc0c54cd45a" integrity sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q== +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +ebec@^1.1.0, ebec@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ebec/-/ebec-1.1.1.tgz#683a0dc82a77e86349e05b24c43d7233a6d0f840" + integrity sha512-JZ1vcvPQtR+8LGbZmbjG21IxLQq/v47iheJqn2F6yB2CgnGfn8ZVg3myHrf3buIZS8UCwQK0jOSIb3oHX7aH8g== + dependencies: + smob "^1.4.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.431: - version "1.4.455" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.455.tgz#81fe4353ac970eb971c07088c8da8b7f6280ddc9" - integrity sha512-8tgdX0Odl24LtmLwxotpJCVjIndN559AvaOtd67u+2mo+IDsgsTF580NB+uuDCqsHw8yFg53l5+imFV9Fw3cbA== +electron-to-chromium@^1.4.530: + version "1.4.531" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.531.tgz#22966d894c4680726c17cf2908ee82ff5d26ac25" + integrity sha512-H6gi5E41Rn3/mhKlPaT1aIMg/71hTAqn0gYEllSuw9igNWtvQwu185jiCZoZD29n7Zukgh7GVZ3zGf0XvkhqjQ== emittery@^0.8.1: version "0.8.1" @@ -2218,6 +2353,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -2245,18 +2385,19 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== +es-abstract@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" + integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== dependencies: array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" available-typed-arrays "^1.0.5" call-bind "^1.0.2" es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.1" get-symbol-description "^1.0.0" globalthis "^1.0.3" gopd "^1.0.1" @@ -2271,19 +2412,23 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" - is-typed-array "^1.1.10" + is-typed-array "^1.1.12" is-weakref "^1.0.2" object-inspect "^1.12.3" object-keys "^1.1.1" object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" typed-array-length "^1.0.4" unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" + which-typed-array "^1.1.11" es-set-tostringtag@^2.0.1: version "2.0.1" @@ -2347,9 +2492,9 @@ escodegen@^2.0.0: source-map "~0.6.1" eslint-config-prettier@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" - integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-config-standard@^17.0.0: version "17.1.0" @@ -2357,29 +2502,28 @@ eslint-config-standard@^17.0.0: integrity sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q== eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" eslint-import-resolver-typescript@^3.5.4: - version "3.5.5" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz#0a9034ae7ed94b254a360fbea89187b60ea7456d" - integrity sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw== + version "3.6.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz#7b983680edd3f1c5bce1a5829ae0bc2d57fe9efa" + integrity sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg== dependencies: debug "^4.3.4" enhanced-resolve "^5.12.0" eslint-module-utils "^2.7.4" + fast-glob "^3.3.1" get-tsconfig "^4.5.0" - globby "^13.1.3" is-core-module "^2.11.0" is-glob "^4.0.3" - synckit "^0.8.5" -eslint-module-utils@^2.7.4: +eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== @@ -2395,30 +2539,32 @@ eslint-plugin-es@^4.1.0: regexpp "^3.0.0" eslint-plugin-import@^2.27.5: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== + version "2.28.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" + integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== dependencies: array-includes "^3.1.6" + array.prototype.findlastindex "^1.2.2" array.prototype.flat "^1.3.1" array.prototype.flatmap "^1.3.1" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" + eslint-module-utils "^2.8.0" has "^1.0.3" - is-core-module "^2.11.0" + is-core-module "^2.13.0" is-glob "^4.0.3" minimatch "^3.1.2" + object.fromentries "^2.0.6" + object.groupby "^1.0.0" object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" + semver "^6.3.1" + tsconfig-paths "^3.14.2" eslint-plugin-jest@^27.2.1: - version "27.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.2.2.tgz#be4ded5f91905d9ec89aa8968d39c71f3b072c0c" - integrity sha512-euzbp06F934Z7UDl5ZUaRPLAc9MKjh0rMPERrHT7UhlCEwgb25kBj37TvMgWeHZVkR5I9CayswrpoaqZU1RImw== + version "27.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.4.0.tgz#3926cca723c40c3d7a3fe0e1fd911eff5e681f50" + integrity sha512-ukVeKmMPAUA5SWjHenvyyXnirKfHKMdOsTZdn5tZx5EW05HGVQwBohigjFZGGj3zuv1cV6hc82FvWv6LdIbkgg== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -2463,10 +2609,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -2495,32 +2641,32 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" - integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.37.0: - version "8.44.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.44.0.tgz#51246e3889b259bbcd1d7d736a0c10add4f0e500" - integrity sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A== + version "8.50.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.50.0.tgz#2ae6015fee0240fcd3f83e1e25df0287f487d6b2" + integrity sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.1.0" - "@eslint/js" "8.44.0" - "@humanwhocodes/config-array" "^0.11.10" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.50.0" + "@humanwhocodes/config-array" "^0.11.11" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.0" - eslint-visitor-keys "^3.4.1" - espree "^9.6.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -2530,7 +2676,6 @@ eslint@^8.37.0: globals "^13.19.0" graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" @@ -2542,13 +2687,12 @@ eslint@^8.37.0: natural-compare "^1.4.0" optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.0.tgz#80869754b1c6560f32e3b6929194a3fe07c5b82f" - integrity sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: acorn "^8.9.0" acorn-jsx "^5.3.2" @@ -2608,21 +2752,6 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" - integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^4.3.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -2735,10 +2864,10 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== -fast-glob@^3.2.9, fast-glob@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" - integrity sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA== +fast-glob@^3.2.9, fast-glob@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -2841,17 +2970,23 @@ find-up@^5.0.0: path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.0.tgz#0e54ab4a1a60fe87e2946b6b00657f1c99e1af3f" + integrity sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew== dependencies: - flatted "^3.1.0" + flatted "^3.2.7" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0, flatted@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== for-each@^0.3.3: version "0.3.3" @@ -2860,6 +2995,14 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -2869,6 +3012,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -2899,26 +3051,26 @@ fs.realpath@^1.0.0: integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -2937,6 +3089,13 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +generate-function@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" + integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== + dependencies: + is-property "^1.0.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -2947,7 +3106,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== @@ -2962,7 +3121,7 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-stream@^6.0.0, get-stream@^6.0.1: +get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -2976,9 +3135,9 @@ get-symbol-description@^1.0.0: get-intrinsic "^1.1.1" get-tsconfig@^4.5.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.6.2.tgz#831879a5e6c2aa24fe79b60340e2233a1e0f472e" - integrity sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg== + version "4.7.2" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.2.tgz#0dcd6fb330391d46332f4c6c1bf89a6514c2ddce" + integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A== dependencies: resolve-pkg-maps "^1.0.0" @@ -3008,6 +3167,17 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob@^10.3.3: + version "10.3.10" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" + integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.5" + minimatch "^9.0.1" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry "^1.10.1" + glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -3020,15 +3190,26 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + version "13.22.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.22.0.tgz#0c9fcb9c48a2494fbb5edbfee644285543eba9d8" + integrity sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw== dependencies: type-fest "^0.20.2" @@ -3051,17 +3232,6 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^13.1.3: - version "13.2.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" - integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== - dependencies: - dir-glob "^3.0.1" - fast-glob "^3.3.0" - ignore "^5.2.4" - merge2 "^1.4.1" - slash "^4.0.0" - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -3101,17 +3271,17 @@ graphql-subscriptions@^2.0.0: iterall "^1.3.0" graphql@^16.7.1: - version "16.7.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.7.1.tgz#11475b74a7bff2aefd4691df52a0eca0abd9b642" - integrity sha512-DRYR9tf+UGU0KOsMcKAlXeFfX89UiiIZ0dRU3mR0yJfu6OjZqUcp68NnFLnqQU5RexygFoDy1EW+ccOYcPfmHg== + version "16.8.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" + integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== handlebars@^4.7.6: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + version "4.7.8" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== dependencies: minimist "^1.2.5" - neo-async "^2.6.0" + neo-async "^2.6.2" source-map "^0.6.1" wordwrap "^1.0.0" optionalDependencies: @@ -3168,6 +3338,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +highlight.js@^10.7.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -3235,11 +3410,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== - iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3247,7 +3417,14 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13: +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -3262,7 +3439,7 @@ ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3385,10 +3562,10 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.11.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== +is-core-module@^2.11.0, is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: has "^1.0.3" @@ -3399,16 +3576,6 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3438,13 +3605,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-inside-container@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" - integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== - dependencies: - is-docker "^3.0.0" - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -3472,6 +3632,11 @@ is-potential-custom-element-name@^1.0.1: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== +is-property@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -3492,11 +3657,6 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -3511,16 +3671,12 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== +is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" + which-typed-array "^1.1.11" is-typedarray@^1.0.0: version "1.0.0" @@ -3534,12 +3690,10 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isarray@~1.0.0: version "1.0.0" @@ -3568,12 +3722,12 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: semver "^6.3.0" istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" + make-dir "^4.0.0" supports-color "^7.1.0" istanbul-lib-source-maps@^4.0.0: @@ -3586,9 +3740,9 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -3598,6 +3752,15 @@ iterall@^1.3.0: resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== +jackspeak@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.5.tgz#443f237f9eeeb0d7c6ec34835ef5289bb4acb068" + integrity sha512-Ratx+B8WeXLAtRJn26hrhY8S1+Jz6pxPMrkrdkgb/NstTNiqMhX0/oFVu5wX+g5n6JlEu2LPsDJmY8nRP4+alw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jest-changed-files@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" @@ -4003,6 +4166,11 @@ jest@^27.2.4: import-local "^3.0.2" jest-cli "^27.5.1" +jiti@^1.19.3: + version "1.20.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42" + integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4061,6 +4229,11 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -4076,7 +4249,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@2.x, json5@^2.2.2: +json5@2.x, json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -4095,6 +4268,13 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +keyv@^4.5.3: + version "4.5.3" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" + integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug== + dependencies: + json-buffer "3.0.1" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -4114,9 +4294,9 @@ levn@^0.4.1: type-check "~0.4.0" libphonenumber-js@^1.10.14: - version "1.10.37" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.37.tgz#185264130c9375f17d0c487a288223294579929c" - integrity sha512-Z10PCaOCiAxbUxLyR31DNeeNugSVP6iv/m7UrSKS5JHziEMApJtgku4e9Q69pzzSC9LnQiM09sqsGf2ticZnMw== + version "1.10.44" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.44.tgz#6709722461173e744190494aaaec9c1c690d8ca8" + integrity sha512-svlRdNBI5WgBjRC20GrCfbFiclbF0Cx+sCcQob/C1r57nsoq0xg8r65QbTyVyweQIlB33P+Uahyho6EMYgcOyQ== lines-and-columns@^1.1.6: version "1.2.4" @@ -4137,6 +4317,17 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +locter@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/locter/-/locter-1.2.2.tgz#a52e870236cd9383c1e0e3012f33a4c3f2a6f9d8" + integrity sha512-9C/TDHlFdZUlVtBXUmpXhHaO4V9uGYqWKIHag+2ToPQ22j3VEqg7tz8ZI1iWkHmBUGXS4wKXavzWATwFjxhirw== + dependencies: + destr "^2.0.0" + ebec "^1.1.1" + flat "^5.0.2" + glob "^10.3.3" + jiti "^1.19.3" + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -4188,6 +4379,13 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -4207,12 +4405,17 @@ lru-cache@^7.10.1, lru-cache@^7.14.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== +"lru-cache@^9.1.1 || ^10.0.0": + version "10.0.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" + integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: - semver "^6.0.0" + semver "^7.5.3" make-error@1.x, make-error@^1.1.1: version "1.3.6" @@ -4286,11 +4489,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - mimic-response@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" @@ -4303,16 +4501,40 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.1: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": + version "7.0.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" + integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== + mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== +mkdirp@^2.1.3: + version "2.1.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19" + integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4338,6 +4560,46 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mysql2@^2.3.0: + version "2.3.3" + resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-2.3.3.tgz#944f3deca4b16629052ff8614fbf89d5552545a0" + integrity sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA== + dependencies: + denque "^2.0.1" + generate-function "^2.3.1" + iconv-lite "^0.6.3" + long "^4.0.0" + lru-cache "^6.0.0" + named-placeholders "^1.1.2" + seq-queue "^0.0.5" + sqlstring "^2.3.2" + +mysql@^2.18.1: + version "2.18.1" + resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.18.1.tgz#2254143855c5a8c73825e4522baf2ea021766717" + integrity sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig== + dependencies: + bignumber.js "9.0.0" + readable-stream "2.3.7" + safe-buffer "5.1.2" + sqlstring "2.3.1" + +mz@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +named-placeholders@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" + integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== + dependencies: + lru-cache "^7.14.1" + napi-build-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" @@ -4358,7 +4620,7 @@ negotiator@0.6.3, negotiator@^0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.0: +neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -4383,6 +4645,14 @@ neon-cli@^0.8: validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + node-abi@^2.21.0: version "2.30.1" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" @@ -4396,18 +4666,23 @@ node-abort-controller@^3.1.1: integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ== node-fetch@^2.6.7: - version "2.6.12" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" - integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" +node-gyp-build@^4.6.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.1.tgz#24b6d075e5e391b8d5539d98c7fc5c210cac8a3e" + integrity sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ== + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.12: +node-releases@^2.0.13: version "2.0.13" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== @@ -4447,13 +4722,6 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - npmlog@^4.0.1: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -4474,7 +4742,7 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== -object-assign@^4, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -4499,14 +4767,33 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== +object.fromentries@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.groupby@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + +object.values@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" on-finished@2.4.1: version "2.4.1" @@ -4536,23 +4823,6 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - -open@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" - integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== - dependencies: - default-browser "^4.0.0" - define-lazy-prop "^3.0.0" - is-inside-container "^1.0.0" - is-wsl "^2.2.0" - optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -4620,16 +4890,36 @@ parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse5@6.0.1: +parse5-htmlparser2-tree-adapter@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + +parse5@6.0.1, parse5@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== +parse5@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -4645,16 +4935,19 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-scurry@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" + integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== + dependencies: + lru-cache "^9.1.1 || ^10.0.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -4803,6 +5096,14 @@ range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== +rapiq@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/rapiq/-/rapiq-0.9.0.tgz#0f427b1a459064a488ae86d2fb91f14524369240" + integrity sha512-k4oT4RarFBrlLMJ49xUTeQpa/us0uU4I70D/UEnK3FWQ4GENzei01rEQAmvPKAIzACo4NMW+YcYJ7EVfSa7EFg== + dependencies: + ebec "^1.1.0" + smob "^1.4.0" + raw-body@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" @@ -4848,6 +5149,19 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +readable-stream@2.3.7: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + readable-stream@^2.0.6: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" @@ -4887,19 +5201,24 @@ reflect-metadata@^0.1.13: resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regexp-tree@~0.1.1: version "0.1.27" resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.27.tgz#2198f0ef54518ffa743fe74d983b56ffd631b6cd" integrity sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA== -regexp.prototype.flags@^1.4.3: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" - functions-have-names "^1.2.3" + set-function-name "^2.0.0" regexpp@^3.0.0: version "3.2.0" @@ -4943,12 +5262,12 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== -resolve@^1.20.0, resolve@^1.22.1: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== +resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.4: + version "1.22.6" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.6.tgz#dd209739eca3aef739c626fea1b4f3c506195362" + integrity sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw== dependencies: - is-core-module "^2.11.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -4982,13 +5301,6 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -run-applescript@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" - integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== - dependencies: - execa "^5.0.0" - run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -5008,6 +5320,16 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5034,7 +5356,7 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -5046,7 +5368,7 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -semver@7.x, semver@^7.0.0, semver@^7.3.2, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0: +semver@7.x, semver@^7.0.0, semver@^7.3.2, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -5058,7 +5380,7 @@ semver@^5.4.1, semver@^5.7.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.3.0: +semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -5106,6 +5428,11 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" +seq-queue@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" + integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== + serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -5131,6 +5458,15 @@ set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + setprototypeof@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" @@ -5170,11 +5506,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -5206,10 +5547,17 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== +smob@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/smob/-/smob-1.4.1.tgz#66270e7df6a7527664816c5b577a23f17ba6f5b5" + integrity sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ== + +sodium-native@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-4.0.4.tgz#561b7c39c97789f8202d6fd224845fe2e8cd6879" + integrity sha512-faqOKw4WQKK7r/ybn6Lqo1F9+L5T6NlBJJYvpxbZPetpWylUVqz449mvlwIBKBqxEHbWakWuOlUt8J3Qpc4sWw== + dependencies: + node-gyp-build "^4.6.0" source-map-support@^0.5.6: version "0.5.21" @@ -5251,15 +5599,25 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + version "3.0.15" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz#142460aabaca062bc7cd4cc87b7d50725ed6a4ba" + integrity sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ== sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +sqlstring@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.1.tgz#475393ff9e91479aea62dcaf0ca3d14983a7fb40" + integrity sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ== + +sqlstring@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c" + integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== + stack-utils@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" @@ -5294,6 +5652,15 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -5303,41 +5670,41 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" string_decoder@^1.1.1: version "1.3.0" @@ -5353,6 +5720,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -5360,12 +5734,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== dependencies: - ansi-regex "^5.0.1" + ansi-regex "^6.0.1" strip-bom@^3.0.0: version "3.0.0" @@ -5382,12 +5756,7 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -5436,14 +5805,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" - integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== - dependencies: - "@pkgr/utils" "^2.3.1" - tslib "^2.5.0" - table-layout@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" @@ -5502,6 +5863,20 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + throat@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" @@ -5512,11 +5887,6 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -titleize@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" - integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -5599,6 +5969,14 @@ ts-jest@^27.0.5: semver "7.x" yargs-parser "20.x" +ts-mysql-migrate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ts-mysql-migrate/-/ts-mysql-migrate-1.0.2.tgz#736d37c3aa3fef92f226b869098e939950d0e18c" + integrity sha512-zDW6iQsfPCJfQ3JMhfUGjhy8aK+VNTvPrXmJH66PB2EGEvyn4m7x2nBdhDNhKuwYU9LMxW1p+l39Ei+btXNpxA== + dependencies: + "@types/mysql" "^2.15.8" + mysql "^2.18.1" + ts-node@^10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -5623,7 +6001,7 @@ ts-typed-json@^0.3.2: resolved "https://registry.yarnpkg.com/ts-typed-json/-/ts-typed-json-0.3.2.tgz#f4f20f45950bae0a383857f7b0a94187eca1b56a" integrity sha512-Tdu3BWzaer7R5RvBIJcg9r8HrTZgpJmsX+1meXMJzYypbkj8NK2oJN0yvm4Dp/Iv6tzFa/L5jKRmEVTga6K3nA== -tsconfig-paths@^3.14.1: +tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== @@ -5647,10 +6025,10 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" - integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== +tslib@^2.0.3, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsutils@^3.21.0: version "3.21.0" @@ -5689,16 +6067,16 @@ type-fest@^0.21.3: integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== type-graphql@^2.0.0-beta.2: - version "2.0.0-beta.2" - resolved "https://registry.yarnpkg.com/type-graphql/-/type-graphql-2.0.0-beta.2.tgz#498e8dee56b8ea1f5c3a5ed99aab8105dcb8f050" - integrity sha512-MCGxRvNADu5Wp9QEudI/WQgiqHJfjanGcKRk/ErCow6IaG04NNI7o3bjjxQVWC+qDundSOhmaquNdjDiiTbcqQ== + version "2.0.0-beta.3" + resolved "https://registry.yarnpkg.com/type-graphql/-/type-graphql-2.0.0-beta.3.tgz#71a796845dbb3f3cca5dfb97a38ffe30ee5aa1ea" + integrity sha512-5HEiQaWHPYhPmbJuMmT+IZgjsnbNWsW37osUISwgr5EpcHZ4krLl8eBoOfjFya4mxAWYshlpSO1ahaucJQqM5g== dependencies: - "@types/node" "^20.1.2" + "@types/node" "^20.4.9" "@types/semver" "^7.5.0" graphql-query-complexity "^0.12.0" graphql-subscriptions "^2.0.0" - semver "^7.5.0" - tslib "^2.5.0" + semver "^7.5.4" + tslib "^2.6.0" type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" @@ -5708,6 +6086,36 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" @@ -5724,6 +6132,41 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typeorm-extension@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/typeorm-extension/-/typeorm-extension-3.0.2.tgz#34e7256bc24e070b204442ff497a5d28e38341e5" + integrity sha512-hV67zcFuJo1o3mslgbPTwCQMeMKAsV4ZcdPZiXDrbY+km6rdsbhIycn1iRfSfbb69aHeKPcbc/tpdJLXsdhBqg== + dependencies: + "@faker-js/faker" "^8.0.2" + consola "^3.2.3" + locter "^1.2.2" + pascal-case "^3.1.2" + rapiq "^0.9.0" + reflect-metadata "^0.1.13" + smob "^1.4.0" + yargs "^17.7.2" + +typeorm@^0.3.16, typeorm@^0.3.17: + version "0.3.17" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.17.tgz#a73c121a52e4fbe419b596b244777be4e4b57949" + integrity sha512-UDjUEwIQalO9tWw9O2A4GU+sT3oyoUXheHJy4ft+RFdnRdQctdQ34L9SqE2p7LdwzafHx1maxT+bqXON+Qnmig== + dependencies: + "@sqltools/formatter" "^1.2.5" + app-root-path "^3.1.0" + buffer "^6.0.3" + chalk "^4.1.2" + cli-highlight "^2.1.11" + date-fns "^2.29.3" + debug "^4.3.4" + dotenv "^16.0.3" + glob "^8.1.0" + mkdirp "^2.1.3" + reflect-metadata "^0.1.13" + sha.js "^2.4.11" + tslib "^2.5.0" + uuid "^9.0.0" + yargs "^17.6.2" + typescript@^4.9.4: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" @@ -5774,15 +6217,10 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== - -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -5812,10 +6250,15 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== v8-compile-cache-lib@^3.0.1: version "3.0.1" @@ -5847,9 +6290,9 @@ validate-npm-package-name@^3.0.0: builtins "^1.0.3" validator@^13.7.0: - version "13.9.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" - integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== + version "13.11.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.11.0.tgz#23ab3fd59290c61248364eabf4067f04955fbb1b" + integrity sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ== value-or-promise@^1.0.12: version "1.0.12" @@ -5942,17 +6385,16 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.10.tgz#74baa2789991905c2076abb317103b866c64e69e" - integrity sha512-uxoA5vLUfRPdjCuJ1h5LlYdmTLbYfums398v3WLkM+i/Wltl2/XyZpQWKbN++ck5L64SR/grOHqtXCUKmlZPNA== +which-typed-array@^1.1.11: + version "1.1.11" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" + integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== dependencies: available-typed-arrays "^1.0.5" call-bind "^1.0.2" for-each "^0.3.3" gopd "^1.0.1" has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" which@^2.0.1: version "2.0.2" @@ -5981,7 +6423,7 @@ wordwrapjs@^4.0.0: reduce-flatten "^2.0.0" typical "^5.2.0" -wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -5990,6 +6432,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -6040,7 +6491,12 @@ yargs-parser@20.x, yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@^16.2.0: +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^16.0.0, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -6053,6 +6509,19 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.6.2, yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" diff --git a/dlt-database/entity/0001-init_db/Account.ts b/dlt-database/entity/0001-init_db/Account.ts index d7a2254df..43910122a 100644 --- a/dlt-database/entity/0001-init_db/Account.ts +++ b/dlt-database/entity/0001-init_db/Account.ts @@ -2,28 +2,26 @@ import { Entity, PrimaryGeneratedColumn, Column, - CreateDateColumn, ManyToOne, JoinColumn, OneToMany, - ManyToMany, - JoinTable, + BaseEntity, } from 'typeorm' -import { User } from './User' -import { Community } from './Community' -import { TransactionRecipe } from './TransactionRecipe' -import { ConfirmedTransaction } from './ConfirmedTransaction' +import { User } from '../User' +import { TransactionRecipe } from '../TransactionRecipe' +import { ConfirmedTransaction } from '../ConfirmedTransaction' import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer' import { Decimal } from 'decimal.js-light' +import { AccountCommunity } from '../AccountCommunity' @Entity('accounts') -export class Account { +export class Account extends BaseEntity { @PrimaryGeneratedColumn('increment', { unsigned: true }) id: number @ManyToOne(() => User, (user) => user.accounts) // Assuming you have a User entity with 'accounts' relation @JoinColumn({ name: 'user_id' }) - user: User + user?: User // if user id is null, account belongs to community gmw or auf @Column({ name: 'user_id', type: 'int', unsigned: true, nullable: true }) @@ -38,10 +36,15 @@ export class Account { @Column({ type: 'tinyint', unsigned: true }) type: number - @CreateDateColumn({ name: 'created_at', type: 'datetime', default: () => 'CURRENT_TIMESTAMP(3)' }) + @Column({ + name: 'created_at', + type: 'datetime', + precision: 3, + default: () => 'CURRENT_TIMESTAMP(3)', + }) createdAt: Date - @Column({ name: 'confirmed_at', type: 'datetime', nullable: true }) + @Column({ name: 'confirmed_at', type: 'datetime', precision: 3, nullable: true }) confirmedAt?: Date @Column({ @@ -56,17 +59,14 @@ export class Account { @Column({ name: 'balance_date', type: 'datetime', + precision: 3, default: () => 'CURRENT_TIMESTAMP(3)', }) balanceDate: Date - @ManyToMany(() => Community, (community) => community.communityAccounts) - @JoinTable({ - name: 'accounts_communities', - joinColumn: { name: 'account_id', referencedColumnName: 'id' }, - inverseJoinColumn: { name: 'community_id', referencedColumnName: 'id' }, - }) - accountCommunities: Community[] + @OneToMany(() => AccountCommunity, (accountCommunity) => accountCommunity.account) + @JoinColumn({ name: 'account_id' }) + accountCommunities: AccountCommunity[] @OneToMany(() => TransactionRecipe, (recipe) => recipe.signingAccount) transactionRecipesSigning?: TransactionRecipe[] diff --git a/dlt-database/entity/0001-init_db/AccountCommunity.ts b/dlt-database/entity/0001-init_db/AccountCommunity.ts index ad9787ab9..4c56b7954 100644 --- a/dlt-database/entity/0001-init_db/AccountCommunity.ts +++ b/dlt-database/entity/0001-init_db/AccountCommunity.ts @@ -1,10 +1,10 @@ -import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm' +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, BaseEntity } from 'typeorm' -import { Account } from './Account' -import { Community } from './Community' +import { Account } from '../Account' +import { Community } from '../Community' @Entity('accounts_communities') -export class AccountCommunity { +export class AccountCommunity extends BaseEntity { @PrimaryGeneratedColumn('increment', { unsigned: true }) id: number @@ -15,16 +15,16 @@ export class AccountCommunity { @Column({ name: 'account_id', type: 'int', unsigned: true }) accountId: number - @ManyToOne(() => Community, (community) => community.communityAccounts) + @ManyToOne(() => Community, (community) => community.accountCommunities) @JoinColumn({ name: 'community_id' }) community: Community @Column({ name: 'community_id', type: 'int', unsigned: true }) communityId: number - @Column({ name: 'valid_from', type: 'datetime' }) + @Column({ name: 'valid_from', type: 'datetime', precision: 3 }) validFrom: Date - @Column({ name: 'valid_to', type: 'datetime', nullable: true }) + @Column({ name: 'valid_to', type: 'datetime', precision: 3, nullable: true }) validTo?: Date } diff --git a/dlt-database/entity/0001-init_db/Community.ts b/dlt-database/entity/0001-init_db/Community.ts index 4be6a7f40..96ddd59d6 100644 --- a/dlt-database/entity/0001-init_db/Community.ts +++ b/dlt-database/entity/0001-init_db/Community.ts @@ -2,18 +2,17 @@ import { Entity, PrimaryGeneratedColumn, Column, - CreateDateColumn, JoinColumn, OneToOne, OneToMany, - ManyToMany, - JoinTable, + BaseEntity, } from 'typeorm' -import { Account } from './Account' -import { TransactionRecipe } from './TransactionRecipe' +import { Account } from '../Account' +import { TransactionRecipe } from '../TransactionRecipe' +import { AccountCommunity } from '../AccountCommunity' @Entity('communities') -export class Community { +export class Community extends BaseEntity { @PrimaryGeneratedColumn('increment', { unsigned: true }) id: number @@ -46,19 +45,20 @@ export class Community { @JoinColumn({ name: 'auf_account_id' }) aufAccount?: Account - @CreateDateColumn({ name: 'created_at', type: 'datetime', default: () => 'CURRENT_TIMESTAMP(3)' }) + @Column({ + name: 'created_at', + type: 'datetime', + precision: 3, + default: () => 'CURRENT_TIMESTAMP(3)', + }) createdAt: Date - @Column({ name: 'confirmed_at', type: 'datetime', nullable: true }) + @Column({ name: 'confirmed_at', type: 'datetime', precision: 3, nullable: true }) confirmedAt?: Date - @ManyToMany(() => Account, (account) => account.accountCommunities) - @JoinTable({ - name: 'accounts_communities', - joinColumn: { name: 'community_id', referencedColumnName: 'id' }, - inverseJoinColumn: { name: 'account_id', referencedColumnName: 'id' }, - }) - communityAccounts: Account[] + @OneToMany(() => AccountCommunity, (accountCommunity) => accountCommunity.community) + @JoinColumn({ name: 'community_id' }) + accountCommunities: AccountCommunity[] @OneToMany(() => TransactionRecipe, (recipe) => recipe.senderCommunity) transactionRecipesSender?: TransactionRecipe[] diff --git a/dlt-database/entity/0001-init_db/ConfirmedTransaction.ts b/dlt-database/entity/0001-init_db/ConfirmedTransaction.ts index 4cd616464..16786a713 100644 --- a/dlt-database/entity/0001-init_db/ConfirmedTransaction.ts +++ b/dlt-database/entity/0001-init_db/ConfirmedTransaction.ts @@ -1,12 +1,20 @@ -import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, OneToOne } from 'typeorm' +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToOne, + JoinColumn, + OneToOne, + BaseEntity, +} from 'typeorm' import { Decimal } from 'decimal.js-light' import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer' -import { Account } from './Account' -import { TransactionRecipe } from './TransactionRecipe' +import { Account } from '../Account' +import { TransactionRecipe } from '../TransactionRecipe' @Entity('confirmed_transactions') -export class ConfirmedTransaction { +export class ConfirmedTransaction extends BaseEntity { @PrimaryGeneratedColumn('increment', { unsigned: true, type: 'bigint' }) id: number @@ -44,6 +52,6 @@ export class ConfirmedTransaction { @Column({ name: 'iota_milestone', type: 'bigint' }) iotaMilestone: number - @Column({ name: 'confirmed_at', type: 'datetime' }) + @Column({ name: 'confirmed_at', type: 'datetime', precision: 3 }) confirmedAt: Date } diff --git a/dlt-database/entity/0001-init_db/InvalidTransaction.ts b/dlt-database/entity/0001-init_db/InvalidTransaction.ts index f88093c7f..1e9be4ff4 100644 --- a/dlt-database/entity/0001-init_db/InvalidTransaction.ts +++ b/dlt-database/entity/0001-init_db/InvalidTransaction.ts @@ -1,7 +1,7 @@ -import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm' +import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from 'typeorm' @Entity('invalid_transactions') -export class InvalidTransaction { +export class InvalidTransaction extends BaseEntity { @PrimaryGeneratedColumn('increment', { unsigned: true, type: 'bigint' }) id: number diff --git a/dlt-database/entity/0001-init_db/Migration.ts b/dlt-database/entity/0001-init_db/Migration.ts new file mode 100644 index 000000000..f1163cfbc --- /dev/null +++ b/dlt-database/entity/0001-init_db/Migration.ts @@ -0,0 +1,13 @@ +import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm' + +@Entity('migrations') +export class Migration extends BaseEntity { + @PrimaryGeneratedColumn() // This is actually not a primary column + version: number + + @Column({ length: 256, nullable: true, default: null }) + fileName: string + + @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }) + date: Date +} diff --git a/dlt-database/entity/0001-init_db/TransactionRecipe.ts b/dlt-database/entity/0001-init_db/TransactionRecipe.ts index e923c2b00..934e81d02 100644 --- a/dlt-database/entity/0001-init_db/TransactionRecipe.ts +++ b/dlt-database/entity/0001-init_db/TransactionRecipe.ts @@ -2,20 +2,20 @@ import { Entity, PrimaryGeneratedColumn, Column, - CreateDateColumn, ManyToOne, OneToOne, JoinColumn, + BaseEntity, } from 'typeorm' import { Decimal } from 'decimal.js-light' import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer' -import { Account } from './Account' -import { Community } from './Community' -import { ConfirmedTransaction } from './ConfirmedTransaction' +import { Account } from '../Account' +import { Community } from '../Community' +import { ConfirmedTransaction } from '../ConfirmedTransaction' @Entity('transaction_recipes') -export class TransactionRecipe { +export class TransactionRecipe extends BaseEntity { @PrimaryGeneratedColumn('increment', { unsigned: true, type: 'bigint' }) id: number @@ -48,7 +48,7 @@ export class TransactionRecipe { @JoinColumn({ name: 'recipient_community_id' }) recipientCommunity?: Community - @Column({ name: 'sender_community_id', type: 'int', unsigned: true, nullable: true }) + @Column({ name: 'recipient_community_id', type: 'int', unsigned: true, nullable: true }) recipientCommunityId?: number @Column({ @@ -63,7 +63,7 @@ export class TransactionRecipe { @Column({ type: 'tinyint' }) type: number - @CreateDateColumn({ name: 'created_at', type: 'datetime' }) + @Column({ name: 'created_at', type: 'datetime', precision: 3 }) createdAt: Date @Column({ name: 'body_bytes', type: 'blob' }) diff --git a/dlt-database/entity/0001-init_db/User.ts b/dlt-database/entity/0001-init_db/User.ts index 8fb7dc3ef..681a668e2 100644 --- a/dlt-database/entity/0001-init_db/User.ts +++ b/dlt-database/entity/0001-init_db/User.ts @@ -1,14 +1,6 @@ -import { - BaseEntity, - Entity, - PrimaryGeneratedColumn, - Column, - OneToMany, - JoinColumn, - CreateDateColumn, -} from 'typeorm' +import { BaseEntity, Entity, PrimaryGeneratedColumn, Column, OneToMany, JoinColumn } from 'typeorm' -import { Account } from './Account' +import { Account } from '../Account' @Entity('users', { engine: 'InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' }) export class User extends BaseEntity { @@ -26,9 +18,10 @@ export class User extends BaseEntity { @Column({ name: 'derive1_pubkey', type: 'binary', length: 32, unique: true }) derive1Pubkey: Buffer - @CreateDateColumn({ + @Column({ name: 'created_at', type: 'datetime', + precision: 3, default: () => 'CURRENT_TIMESTAMP(3)', }) createdAt: Date @@ -36,6 +29,7 @@ export class User extends BaseEntity { @Column({ name: 'confirmed_at', type: 'datetime', + precision: 3, nullable: true, }) confirmedAt?: Date diff --git a/dlt-database/entity/0002-refactor_add_community/Account.ts b/dlt-database/entity/0002-refactor_add_community/Account.ts new file mode 100644 index 000000000..9edba933d --- /dev/null +++ b/dlt-database/entity/0002-refactor_add_community/Account.ts @@ -0,0 +1,78 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToOne, + JoinColumn, + OneToMany, + BaseEntity, +} from 'typeorm' +import { User } from '../User' +import { TransactionRecipe } from '../TransactionRecipe' +import { ConfirmedTransaction } from '../ConfirmedTransaction' +import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer' +import { Decimal } from 'decimal.js-light' +import { AccountCommunity } from '../AccountCommunity' + +@Entity('accounts') +export class Account extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @ManyToOne(() => User, (user) => user.accounts) // Assuming you have a User entity with 'accounts' relation + @JoinColumn({ name: 'user_id' }) + user?: User + + // if user id is null, account belongs to community gmw or auf + @Column({ name: 'user_id', type: 'int', unsigned: true, nullable: true }) + userId?: number + + @Column({ name: 'derivation_index', type: 'int', unsigned: true }) + derivationIndex: number + + @Column({ name: 'derive2_pubkey', type: 'binary', length: 32, unique: true }) + derive2Pubkey: Buffer + + @Column({ type: 'tinyint', unsigned: true }) + type: number + + @Column({ + name: 'created_at', + type: 'datetime', + precision: 3, + default: () => 'CURRENT_TIMESTAMP(3)', + }) + createdAt: Date + + @Column({ name: 'confirmed_at', type: 'datetime', nullable: true }) + confirmedAt?: Date + + @Column({ + type: 'decimal', + precision: 40, + scale: 20, + default: 0, + transformer: DecimalTransformer, + }) + balance: Decimal + + @Column({ + name: 'balance_date', + type: 'datetime', + default: () => 'CURRENT_TIMESTAMP()', + }) + balanceDate: Date + + @OneToMany(() => AccountCommunity, (accountCommunity) => accountCommunity.account) + @JoinColumn({ name: 'account_id' }) + accountCommunities: AccountCommunity[] + + @OneToMany(() => TransactionRecipe, (recipe) => recipe.signingAccount) + transactionRecipesSigning?: TransactionRecipe[] + + @OneToMany(() => TransactionRecipe, (recipe) => recipe.recipientAccount) + transactionRecipesRecipient?: TransactionRecipe[] + + @OneToMany(() => ConfirmedTransaction, (transaction) => transaction.account) + confirmedTransactions?: ConfirmedTransaction[] +} diff --git a/dlt-database/entity/0002-refactor_add_community/AccountCommunity.ts b/dlt-database/entity/0002-refactor_add_community/AccountCommunity.ts new file mode 100644 index 000000000..80d6c15bf --- /dev/null +++ b/dlt-database/entity/0002-refactor_add_community/AccountCommunity.ts @@ -0,0 +1,30 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, BaseEntity } from 'typeorm' + +import { Account } from '../Account' +import { Community } from '../Community' + +@Entity('accounts_communities') +export class AccountCommunity extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @ManyToOne(() => Account, (account) => account.accountCommunities) + @JoinColumn({ name: 'account_id' }) + account: Account + + @Column({ name: 'account_id', type: 'int', unsigned: true }) + accountId: number + + @ManyToOne(() => Community, (community) => community.accountCommunities) + @JoinColumn({ name: 'community_id' }) + community: Community + + @Column({ name: 'community_id', type: 'int', unsigned: true }) + communityId: number + + @Column({ name: 'valid_from', type: 'datetime' }) + validFrom: Date + + @Column({ name: 'valid_to', type: 'datetime', nullable: true }) + validTo?: Date +} diff --git a/dlt-database/entity/0002-refactor_add_community/Community.ts b/dlt-database/entity/0002-refactor_add_community/Community.ts new file mode 100644 index 000000000..25f9e3265 --- /dev/null +++ b/dlt-database/entity/0002-refactor_add_community/Community.ts @@ -0,0 +1,68 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + JoinColumn, + OneToOne, + OneToMany, + BaseEntity, +} from 'typeorm' +import { Account } from '../Account' +import { TransactionRecipe } from '../TransactionRecipe' +import { AccountCommunity } from '../AccountCommunity' + +@Entity('communities') +export class Community extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @Column({ name: 'iota_topic', collation: 'utf8mb4_unicode_ci' }) + iotaTopic: string + + @Column({ name: 'root_pubkey', type: 'binary', length: 32, unique: true, nullable: true }) + rootPubkey?: Buffer + + @Column({ name: 'root_privkey', type: 'binary', length: 64, nullable: true }) + rootPrivkey?: Buffer + + @Column({ name: 'root_chaincode', type: 'binary', length: 32, nullable: true }) + rootChaincode?: Buffer + + @Column({ type: 'tinyint', default: true }) + foreign: boolean + + @Column({ name: 'gmw_account_id', type: 'int', unsigned: true, nullable: true }) + gmwAccountId?: number + + @OneToOne(() => Account) + @JoinColumn({ name: 'gmw_account_id' }) + gmwAccount?: Account + + @Column({ name: 'auf_account_id', type: 'int', unsigned: true, nullable: true }) + aufAccountId?: number + + @OneToOne(() => Account) + @JoinColumn({ name: 'auf_account_id' }) + aufAccount?: Account + + @Column({ + name: 'created_at', + type: 'datetime', + precision: 3, + default: () => 'CURRENT_TIMESTAMP(3)', + }) + createdAt: Date + + @Column({ name: 'confirmed_at', type: 'datetime', nullable: true }) + confirmedAt?: Date + + @OneToMany(() => AccountCommunity, (accountCommunity) => accountCommunity.community) + @JoinColumn({ name: 'community_id' }) + accountCommunities: AccountCommunity[] + + @OneToMany(() => TransactionRecipe, (recipe) => recipe.senderCommunity) + transactionRecipesSender?: TransactionRecipe[] + + @OneToMany(() => TransactionRecipe, (recipe) => recipe.recipientCommunity) + transactionRecipesRecipient?: TransactionRecipe[] +} diff --git a/dlt-database/entity/0002-refactor_add_community/ConfirmedTransaction.ts b/dlt-database/entity/0002-refactor_add_community/ConfirmedTransaction.ts new file mode 100644 index 000000000..5d2a38f65 --- /dev/null +++ b/dlt-database/entity/0002-refactor_add_community/ConfirmedTransaction.ts @@ -0,0 +1,57 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToOne, + JoinColumn, + OneToOne, + BaseEntity, +} from 'typeorm' +import { Decimal } from 'decimal.js-light' + +import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer' +import { Account } from '../Account' +import { TransactionRecipe } from '../TransactionRecipe' + +@Entity('confirmed_transactions') +export class ConfirmedTransaction extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true, type: 'bigint' }) + id: number + + @OneToOne(() => TransactionRecipe, (recipe) => recipe.confirmedTransaction) + @JoinColumn({ name: 'transaction_recipe_id' }) + transactionRecipe: TransactionRecipe + + @Column({ name: 'transaction_recipe_id', type: 'int', unsigned: true }) + transactionRecipeId: number + + @Column({ type: 'bigint' }) + nr: number + + @Column({ type: 'binary', length: 48 }) + runningHash: Buffer + + @ManyToOne(() => Account, (account) => account.confirmedTransactions) + @JoinColumn({ name: 'account_id' }) + account: Account + + @Column({ name: 'account_id', type: 'int', unsigned: true }) + accountId: number + + @Column({ + name: 'account_balance', + type: 'decimal', + precision: 40, + scale: 20, + nullable: false, + default: 0, + transformer: DecimalTransformer, + }) + accountBalance: Decimal + + @Column({ name: 'iota_milestone', type: 'bigint' }) + iotaMilestone: number + + @Column({ name: 'confirmed_at', type: 'datetime' }) + confirmedAt: Date +} diff --git a/dlt-database/entity/0002-refactor_add_community/User.ts b/dlt-database/entity/0002-refactor_add_community/User.ts new file mode 100644 index 000000000..5387be058 --- /dev/null +++ b/dlt-database/entity/0002-refactor_add_community/User.ts @@ -0,0 +1,39 @@ +import { BaseEntity, Entity, PrimaryGeneratedColumn, Column, OneToMany, JoinColumn } from 'typeorm' + +import { Account } from '../Account' + +@Entity('users', { engine: 'InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' }) +export class User extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @Column({ + name: 'gradido_id', + length: 36, + nullable: true, + collation: 'utf8mb4_unicode_ci', + }) + gradidoID?: string + + @Column({ name: 'derive1_pubkey', type: 'binary', length: 32, unique: true }) + derive1Pubkey: Buffer + + @Column({ + name: 'created_at', + type: 'datetime', + precision: 3, + default: () => 'CURRENT_TIMESTAMP(3)', + }) + createdAt: Date + + @Column({ + name: 'confirmed_at', + type: 'datetime', + nullable: true, + }) + confirmedAt?: Date + + @OneToMany(() => Account, (account) => account.user) + @JoinColumn({ name: 'user_id' }) + accounts?: Account[] +} diff --git a/dlt-database/entity/Account.ts b/dlt-database/entity/Account.ts index c5d1722b1..ed1e92840 100644 --- a/dlt-database/entity/Account.ts +++ b/dlt-database/entity/Account.ts @@ -1 +1 @@ -export { Account } from './0001-init_db/Account' +export { Account } from './0002-refactor_add_community/Account' diff --git a/dlt-database/entity/AccountCommunity.ts b/dlt-database/entity/AccountCommunity.ts index 8bd78e073..985e7bfb9 100644 --- a/dlt-database/entity/AccountCommunity.ts +++ b/dlt-database/entity/AccountCommunity.ts @@ -1 +1 @@ -export { AccountCommunity } from './0001-init_db/AccountCommunity' +export { AccountCommunity } from './0002-refactor_add_community/AccountCommunity' diff --git a/dlt-database/entity/Community.ts b/dlt-database/entity/Community.ts index 377102b71..211837e40 100644 --- a/dlt-database/entity/Community.ts +++ b/dlt-database/entity/Community.ts @@ -1 +1 @@ -export { Community } from './0001-init_db/Community' +export { Community } from './0002-refactor_add_community/Community' diff --git a/dlt-database/entity/ConfirmedTransaction.ts b/dlt-database/entity/ConfirmedTransaction.ts index d91aad926..765e0b2e6 100644 --- a/dlt-database/entity/ConfirmedTransaction.ts +++ b/dlt-database/entity/ConfirmedTransaction.ts @@ -1 +1 @@ -export { ConfirmedTransaction } from './0001-init_db/ConfirmedTransaction' +export { ConfirmedTransaction } from './0002-refactor_add_community/ConfirmedTransaction' diff --git a/dlt-database/entity/Migration.ts b/dlt-database/entity/Migration.ts new file mode 100644 index 000000000..9f1e743d0 --- /dev/null +++ b/dlt-database/entity/Migration.ts @@ -0,0 +1 @@ +export { Migration } from './0001-init_db/Migration' diff --git a/dlt-database/entity/User.ts b/dlt-database/entity/User.ts index c31bcc47f..3c803d783 100644 --- a/dlt-database/entity/User.ts +++ b/dlt-database/entity/User.ts @@ -1 +1 @@ -export { User } from './0001-init_db/User' +export { User } from './0002-refactor_add_community/User' diff --git a/dlt-database/entity/index.ts b/dlt-database/entity/index.ts new file mode 100644 index 000000000..74c2e2258 --- /dev/null +++ b/dlt-database/entity/index.ts @@ -0,0 +1,19 @@ +import { Account } from './Account' +import { AccountCommunity } from './AccountCommunity' +import { Community } from './Community' +import { ConfirmedTransaction } from './ConfirmedTransaction' +import { InvalidTransaction } from './InvalidTransaction' +import { Migration } from './Migration' +import { TransactionRecipe } from './TransactionRecipe' +import { User } from './User' + +export const entities = [ + AccountCommunity, + Account, + Community, + ConfirmedTransaction, + InvalidTransaction, + Migration, + TransactionRecipe, + User, +] diff --git a/dlt-database/migrations/0001-init_db.ts b/dlt-database/migrations/0001-init_db.ts index d2ae6494b..85fed59e0 100644 --- a/dlt-database/migrations/0001-init_db.ts +++ b/dlt-database/migrations/0001-init_db.ts @@ -125,6 +125,6 @@ export async function downgrade(queryFn: (query: string, values?: any[]) => Prom await queryFn(`DROP TABLE IF EXISTS \`accounts_communities\`;`) await queryFn(`DROP TABLE IF EXISTS \`transaction_recipes\`;`) await queryFn(`DROP TABLE IF EXISTS \`confirmed_transactions\`;`) - await queryFn(`DROP TABLE IF EXISTS \`community\`;`) + await queryFn(`DROP TABLE IF EXISTS \`communities\`;`) await queryFn(`DROP TABLE IF EXISTS \`invalid_transactions\`;`) } diff --git a/dlt-database/migrations/0002-refactor_add_community.ts b/dlt-database/migrations/0002-refactor_add_community.ts new file mode 100644 index 000000000..725954ea0 --- /dev/null +++ b/dlt-database/migrations/0002-refactor_add_community.ts @@ -0,0 +1,61 @@ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export async function upgrade(queryFn: (query: string, values?: any[]) => Promise>) { + // write upgrade logic as parameter of queryFn + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`root_privkey\` binary(64) NULL DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`root_pubkey\` binary(32) NULL DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`root_chaincode\` binary(32) NULL DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`confirmed_at\` datetime NULL DEFAULT NULL;`, + ) + await queryFn(`ALTER TABLE \`users\` MODIFY COLUMN \`confirmed_at\` datetime NULL DEFAULT NULL;`) + await queryFn( + `ALTER TABLE \`accounts\` MODIFY COLUMN \`confirmed_at\` datetime NULL DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`accounts\` MODIFY COLUMN \`balance_date\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;`, + ) + await queryFn( + `ALTER TABLE \`accounts_communities\` MODIFY COLUMN \`valid_from\` datetime NOT NULL;`, + ) + await queryFn( + `ALTER TABLE \`accounts_communities\` MODIFY COLUMN \`valid_to\` datetime NULL DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`confirmed_transactions\` MODIFY COLUMN \`confirmed_at\` datetime NOT NULL;`, + ) +} + +export async function downgrade(queryFn: (query: string, values?: any[]) => Promise>) { + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`root_privkey\` binary(32) DEFAULT NULL;`, + ) + await queryFn(`ALTER TABLE \`communities\` MODIFY COLUMN \`root_pubkey\` binary(32) NOT NULL;`) + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`root_chaincode\` binary(32) DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`communities\` MODIFY COLUMN \`confirmed_at\` datetime(3) DEFAULT NULL;`, + ) + await queryFn(`ALTER TABLE \`users\` MODIFY COLUMN \`confirmed_at\` datetime(3) DEFAULT NULL;`) + await queryFn(`ALTER TABLE \`accounts\` MODIFY COLUMN \`confirmed_at\` datetime(3) DEFAULT NULL;`) + await queryFn( + `ALTER TABLE \`accounts\` MODIFY COLUMN \`balance_date\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3);`, + ) + await queryFn( + `ALTER TABLE \`accounts_communities\` MODIFY COLUMN \`valid_from\` datetime(3) NOT NULL;`, + ) + await queryFn( + `ALTER TABLE \`accounts_communities\` MODIFY COLUMN \`valid_to\` datetime(3) DEFAULT NULL;`, + ) + await queryFn( + `ALTER TABLE \`confirmed_transactions\` MODIFY COLUMN \`confirmed_at\` datetime(3) NOT NULL;`, + ) +} diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 39a36798b..08e02f1d7 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -103,6 +103,7 @@ services: - dlt_connector_modules:/app/node_modules # bind the local folder to the docker to allow live reload - ./dlt-connector:/app + - ./dlt-database:/dlt-database ######################################################## # FEDERATION ########################################### diff --git a/docker-compose.test.yml b/docker-compose.test.yml index b8fa5851a..ff6ed61b8 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -64,6 +64,7 @@ services: - internal-net environment: - NODE_ENV="test" + - DB_HOST=mariadb ######################################################## # DATABASE ############################################# diff --git a/docker-compose.yml b/docker-compose.yml index 3703ea64e..4e29bc496 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -163,16 +163,17 @@ services: - internal-net - external-net ports: - - 6000:6000 + - 6010:6010 restart: always environment: # Envs used in Dockerfile # - DOCKER_WORKDIR="/app" - - PORT=6000 + - PORT=6010 - BUILD_DATE - BUILD_VERSION - BUILD_COMMIT - NODE_ENV="production" + - DB_HOST=mariadb # Application only envs volumes: # : – mirror bidirectional path in local context with path in Docker container diff --git a/federation/jest.config.js b/federation/jest.config.js index cffb79835..f859bbe2f 100644 --- a/federation/jest.config.js +++ b/federation/jest.config.js @@ -6,7 +6,7 @@ module.exports = { collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'], coverageThreshold: { global: { - lines: 74, + lines: 75, }, }, setupFiles: ['/test/testSetup.ts'], diff --git a/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.test.ts b/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.test.ts index c84965ce2..83e502a03 100644 --- a/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.test.ts +++ b/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.test.ts @@ -10,11 +10,8 @@ import { GraphQLError } from 'graphql' import { cleanDB, testEnvironment } from '@test/helpers' import { logger } from '@test/testSetup' import { Connection } from '@dbTools/typeorm' -import { PendingTransaction as DbPendingTransaction } from '@entity/PendingTransaction' import Decimal from 'decimal.js-light' -import { PendingTransactionState } from '../enum/PendingTransactionState' -import { TransactionTypeId } from '../enum/TransactionTypeId' -import { Transaction as DbTransaction } from '@entity/Transaction' +import { SendCoinsArgs } from '../model/SendCoinsArgs' let mutate: ApolloServerTestClient['mutate'], con: Connection // let query: ApolloServerTestClient['query'] @@ -49,54 +46,24 @@ afterAll(async () => { describe('SendCoinsResolver', () => { const voteForSendCoinsMutation = ` - mutation ( - $recipientCommunityUuid: String! - $recipientUserIdentifier: String! - $creationDate: String! - $amount: Decimal! - $memo: String! - $senderCommunityUuid: String! - $senderUserUuid: String! - $senderUserName: String! - ) { - voteForSendCoins( - recipientCommunityUuid: $recipientCommunityUuid - recipientUserIdentifier: $recipientUserIdentifier - creationDate: $creationDate - amount: $amount - memo: $memo - senderCommunityUuid: $senderCommunityUuid - senderUserUuid: $senderUserUuid - senderUserName: $senderUserName - ) { + mutation ($args: SendCoinsArgs!) { + voteForSendCoins(data: $args) { vote recipGradidoID recipName } - } -` - + }` const settleSendCoinsMutation = ` - mutation ( - $recipientCommunityUuid: String! - $recipientUserIdentifier: String! - $creationDate: String! - $amount: Decimal! - $memo: String! - $senderCommunityUuid: String! - $senderUserUuid: String! - $senderUserName: String! - ) { - settleSendCoins( - recipientCommunityUuid: $recipientCommunityUuid - recipientUserIdentifier: $recipientUserIdentifier - creationDate: $creationDate - amount: $amount - memo: $memo - senderCommunityUuid: $senderCommunityUuid - senderUserUuid: $senderUserUuid - senderUserName: $senderUserName - ) + mutation ($args: SendCoinsArgs!) { + settleSendCoins(data: $args) + }` + const revertSendCoinsMutation = ` + mutation ($args: SendCoinsArgs!) { + revertSendCoins(data: $args) + }` + const revertSettledSendCoinsMutation = ` + mutation ($args: SendCoinsArgs!) { + revertSettledSendCoins(data: $args) }` beforeEach(async () => { @@ -154,19 +121,21 @@ describe('SendCoinsResolver', () => { describe('unknown recipient community', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + args.recipientCommunityUuid = 'invalid foreignCom' + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = new Date().toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: voteForSendCoinsMutation, - variables: { - recipientCommunityUuid: 'invalid foreignCom', - recipientUserIdentifier: recipUser.gradidoID, - creationDate: new Date().toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -179,19 +148,23 @@ describe('SendCoinsResolver', () => { describe('unknown recipient user', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = 'invalid recipient' + args.creationDate = new Date().toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: voteForSendCoinsMutation, - variables: { - recipientCommunityUuid: foreignCom.communityUuid, - recipientUserIdentifier: 'invalid recipient', - creationDate: new Date().toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -208,19 +181,23 @@ describe('SendCoinsResolver', () => { describe('valid X-Com-TX voted', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = new Date().toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: voteForSendCoinsMutation, - variables: { - recipientCommunityUuid: foreignCom.communityUuid, - recipientUserIdentifier: recipUser.gradidoID, - creationDate: new Date().toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -238,63 +215,46 @@ describe('SendCoinsResolver', () => { }) describe('revertSendCoins', () => { - const revertSendCoinsMutation = ` - mutation ( - $recipientCommunityUuid: String! - $recipientUserIdentifier: String! - $creationDate: String! - $amount: Decimal! - $memo: String! - $senderCommunityUuid: String! - $senderUserUuid: String! - $senderUserName: String! - ) { - revertSendCoins( - recipientCommunityUuid: $recipientCommunityUuid - recipientUserIdentifier: $recipientUserIdentifier - creationDate: $creationDate - amount: $amount - memo: $memo - senderCommunityUuid: $senderCommunityUuid - senderUserUuid: $senderUserUuid - senderUserName: $senderUserName - ) - }` - const creationDate = new Date() beforeEach(async () => { + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) await mutate({ mutation: voteForSendCoinsMutation, - variables: { - recipientCommunityUuid: foreignCom.communityUuid, - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }) }) describe('unknown recipient community', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + args.recipientCommunityUuid = 'invalid foreignCom' + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: revertSendCoinsMutation, - variables: { - recipientCommunityUuid: 'invalid foreignCom', - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -307,19 +267,23 @@ describe('SendCoinsResolver', () => { describe('unknown recipient user', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = 'invalid recipient' + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: revertSendCoinsMutation, - variables: { - recipientCommunityUuid: foreignCom.communityUuid, - recipientUserIdentifier: 'invalid recipient', - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -336,19 +300,23 @@ describe('SendCoinsResolver', () => { describe('valid X-Com-TX reverted', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: revertSendCoinsMutation, - variables: { - recipientCommunityUuid: foreignCom.communityUuid, - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: homeCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -362,46 +330,46 @@ describe('SendCoinsResolver', () => { }) describe('settleSendCoins', () => { - let pendingTx: DbPendingTransaction const creationDate = new Date() beforeEach(async () => { - pendingTx = DbPendingTransaction.create() - pendingTx.amount = new Decimal(100) - pendingTx.balanceDate = creationDate - // pendingTx.balance = new Decimal(0) - pendingTx.linkedUserId = sendUser.id + const args = new SendCoinsArgs() if (foreignCom.communityUuid) { - pendingTx.linkedUserCommunityUuid = foreignCom.communityUuid + args.recipientCommunityUuid = foreignCom.communityUuid } - pendingTx.linkedUserGradidoID = sendUser.gradidoID - pendingTx.state = PendingTransactionState.NEW - pendingTx.typeId = TransactionTypeId.RECEIVE - pendingTx.memo = 'X-Com-TX memo' - pendingTx.userId = recipUser.id + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' if (homeCom.communityUuid) { - pendingTx.userCommunityUuid = homeCom.communityUuid + args.senderCommunityUuid = homeCom.communityUuid } - pendingTx.userGradidoID = recipUser.gradidoID - await DbPendingTransaction.insert(pendingTx) + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) + await mutate({ + mutation: voteForSendCoinsMutation, + variables: { args }, + }) }) describe('unknown recipient community', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + args.recipientCommunityUuid = 'invalid foreignCom' + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: settleSendCoinsMutation, - variables: { - recipientCommunityUuid: 'invalid foreignCom', - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: foreignCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -414,19 +382,23 @@ describe('SendCoinsResolver', () => { describe('unknown recipient user', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = 'invalid recipient' + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: settleSendCoinsMutation, - variables: { - recipientCommunityUuid: homeCom.communityUuid, - recipientUserIdentifier: 'invalid recipient', - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: foreignCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -443,19 +415,23 @@ describe('SendCoinsResolver', () => { describe('valid X-Com-TX settled', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: settleSendCoinsMutation, - variables: { - recipientCommunityUuid: homeCom.communityUuid, - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: foreignCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -469,88 +445,50 @@ describe('SendCoinsResolver', () => { }) describe('revertSettledSendCoins', () => { - const revertSettledSendCoinsMutation = ` - mutation ( - $recipientCommunityUuid: String! - $recipientUserIdentifier: String! - $creationDate: String! - $amount: Decimal! - $memo: String! - $senderCommunityUuid: String! - $senderUserUuid: String! - $senderUserName: String! - ) { - revertSettledSendCoins( - recipientCommunityUuid: $recipientCommunityUuid - recipientUserIdentifier: $recipientUserIdentifier - creationDate: $creationDate - amount: $amount - memo: $memo - senderCommunityUuid: $senderCommunityUuid - senderUserUuid: $senderUserUuid - senderUserName: $senderUserName - ) - }` - - let pendingTx: DbPendingTransaction - let settledTx: DbTransaction const creationDate = new Date() beforeEach(async () => { - pendingTx = DbPendingTransaction.create() - pendingTx.amount = new Decimal(100) - pendingTx.balanceDate = creationDate - // pendingTx.balance = new Decimal(0) - pendingTx.linkedUserId = sendUser.id + const args = new SendCoinsArgs() if (foreignCom.communityUuid) { - pendingTx.linkedUserCommunityUuid = foreignCom.communityUuid + args.recipientCommunityUuid = foreignCom.communityUuid } - pendingTx.linkedUserGradidoID = sendUser.gradidoID - pendingTx.linkedUserName = fullName(sendUser.firstName, sendUser.lastName) - pendingTx.state = PendingTransactionState.SETTLED - pendingTx.typeId = TransactionTypeId.RECEIVE - pendingTx.memo = 'X-Com-TX memo' - pendingTx.userId = recipUser.id + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' if (homeCom.communityUuid) { - pendingTx.userCommunityUuid = homeCom.communityUuid + args.senderCommunityUuid = homeCom.communityUuid } - pendingTx.userGradidoID = recipUser.gradidoID - await DbPendingTransaction.insert(pendingTx) - - settledTx = DbTransaction.create() - settledTx.amount = new Decimal(100) - settledTx.balanceDate = creationDate - // pendingTx.balance = new Decimal(0) - settledTx.linkedUserId = sendUser.id - settledTx.linkedUserCommunityUuid = foreignCom.communityUuid - settledTx.linkedUserGradidoID = sendUser.gradidoID - settledTx.linkedUserName = fullName(sendUser.firstName, sendUser.lastName) - settledTx.typeId = TransactionTypeId.RECEIVE - settledTx.memo = 'X-Com-TX memo' - settledTx.userId = recipUser.id - if (homeCom.communityUuid) { - settledTx.userCommunityUuid = homeCom.communityUuid - } - settledTx.userGradidoID = recipUser.gradidoID - await DbTransaction.insert(settledTx) + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) + await mutate({ + mutation: voteForSendCoinsMutation, + variables: { args }, + }) + await mutate({ + mutation: settleSendCoinsMutation, + variables: { args }, + }) }) describe('unknown recipient community', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + args.recipientCommunityUuid = 'invalid foreignCom' + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: revertSettledSendCoinsMutation, - variables: { - recipientCommunityUuid: 'invalid foreignCom', - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: foreignCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -563,19 +501,23 @@ describe('SendCoinsResolver', () => { describe('unknown recipient user', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = 'invalid recipient' + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: revertSettledSendCoinsMutation, - variables: { - recipientCommunityUuid: homeCom.communityUuid, - recipientUserIdentifier: 'invalid recipient', - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: foreignCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ @@ -592,19 +534,23 @@ describe('SendCoinsResolver', () => { describe('valid X-Com-TX settled', () => { it('throws an error', async () => { jest.clearAllMocks() + const args = new SendCoinsArgs() + if (foreignCom.communityUuid) { + args.recipientCommunityUuid = foreignCom.communityUuid + } + args.recipientUserIdentifier = recipUser.gradidoID + args.creationDate = creationDate.toISOString() + args.amount = new Decimal(100) + args.memo = 'X-Com-TX memo' + if (homeCom.communityUuid) { + args.senderCommunityUuid = homeCom.communityUuid + } + args.senderUserUuid = sendUser.gradidoID + args.senderUserName = fullName(sendUser.firstName, sendUser.lastName) expect( await mutate({ mutation: revertSettledSendCoinsMutation, - variables: { - recipientCommunityUuid: homeCom.communityUuid, - recipientUserIdentifier: recipUser.gradidoID, - creationDate: creationDate.toISOString(), - amount: 100, - memo: 'X-Com-TX memo', - senderCommunityUuid: foreignCom.communityUuid, - senderUserUuid: sendUser.gradidoID, - senderUserName: fullName(sendUser.firstName, sendUser.lastName), - }, + variables: { args }, }), ).toEqual( expect.objectContaining({ diff --git a/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.ts b/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.ts index 12e7eab20..d942c48f3 100644 --- a/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.ts +++ b/federation/src/graphql/api/1_0/resolver/SendCoinsResolver.ts @@ -157,8 +157,8 @@ export class SendCoinsResolver { } else { logger.debug( 'XCom: revertSendCoins NOT matching pendingTX for remove:', - pendingTx?.amount, - args.amount, + pendingTx?.amount.toString(), + args.amount.toString(), ) throw new LogError( `Can't find in revertSendCoins the pending receiver TX for args=`, @@ -283,7 +283,7 @@ export class SendCoinsResolver { } const pendingTx = await DbPendingTransaction.findOneBy({ userCommunityUuid: args.recipientCommunityUuid, - userGradidoID: receiverUser.gradidoID, + userGradidoID: args.recipientUserIdentifier, state: PendingTransactionState.SETTLED, typeId: TransactionTypeId.RECEIVE, balanceDate: new Date(args.creationDate), diff --git a/federation/src/graphql/api/1_0/util/revertSettledReceiveTransaction.ts b/federation/src/graphql/api/1_0/util/revertSettledReceiveTransaction.ts index 6eb933f6a..4b0f989ba 100644 --- a/federation/src/graphql/api/1_0/util/revertSettledReceiveTransaction.ts +++ b/federation/src/graphql/api/1_0/util/revertSettledReceiveTransaction.ts @@ -60,14 +60,31 @@ export async function revertSettledReceiveTransaction( } const lastTransaction = await getLastTransaction(receiverUser.id) + logger.debug(`LastTransaction vs PendingTransaction`) + logger.debug(`balance:`, lastTransaction?.balance.toString(), pendingTx.balance.toString()) + logger.debug( + `balanceDate:`, + lastTransaction?.balanceDate.toISOString(), + pendingTx.balanceDate.toISOString(), + ) + logger.debug(`GradidoID:`, lastTransaction?.userGradidoID, pendingTx.userGradidoID) + logger.debug(`Name:`, lastTransaction?.userName, pendingTx.userName) + logger.debug(`amount:`, lastTransaction?.amount.toString(), pendingTx.amount.toString()) + logger.debug(`memo:`, lastTransaction?.memo, pendingTx.memo) + logger.debug( + `linkedUserGradidoID:`, + lastTransaction?.linkedUserGradidoID, + pendingTx.linkedUserGradidoID, + ) + logger.debug(`linkedUserName:`, lastTransaction?.linkedUserName, pendingTx.linkedUserName) // now the last Tx must be the equivalant to the pendingTX if ( lastTransaction && - lastTransaction.balance === pendingTx.balance && + lastTransaction.balance.comparedTo(pendingTx.balance) === 0 && lastTransaction.balanceDate.toISOString() === pendingTx.balanceDate.toISOString() && lastTransaction.userGradidoID === pendingTx.userGradidoID && lastTransaction.userName === pendingTx.userName && - lastTransaction.amount.toString() === pendingTx.amount.toString() && + lastTransaction.amount.comparedTo(pendingTx.amount) === 0 && lastTransaction.memo === pendingTx.memo && lastTransaction.linkedUserGradidoID === pendingTx.linkedUserGradidoID && lastTransaction.linkedUserName === pendingTx.linkedUserName diff --git a/federation/src/graphql/util/calculateRecipientBalance.ts b/federation/src/graphql/util/calculateRecipientBalance.ts deleted file mode 100644 index 2a9c2aa1c..000000000 --- a/federation/src/graphql/util/calculateRecipientBalance.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Decimal } from 'decimal.js-light' - -import { getLastTransaction } from './getLastTransaction' -import { calculateDecay } from './decay' -import { Decay } from '../api/1_0/model/Decay' - -export async function calculateRecipientBalance( - userId: number, - amount: Decimal, - time: Date, -): Promise<{ balance: Decimal; decay: Decay; lastTransactionId: number } | null> { - const lastTransaction = await getLastTransaction(userId) - if (!lastTransaction) return null - - const decay = calculateDecay(lastTransaction.balance, lastTransaction.balanceDate, time) - - const balance = decay.balance.add(amount.toString()) - - return { balance, lastTransactionId: lastTransaction.id, decay } -} diff --git a/federation/src/graphql/util/checkTradingLevel.ts b/federation/src/graphql/util/checkTradingLevel.ts index c67d70ad7..9f5463a0d 100644 --- a/federation/src/graphql/util/checkTradingLevel.ts +++ b/federation/src/graphql/util/checkTradingLevel.ts @@ -7,7 +7,7 @@ export async function checkTradingLevel(homeCom: DbCommunity, amount: Decimal): const tradingLevel = CONFIG.FEDERATION_TRADING_LEVEL if (homeCom.url !== tradingLevel.RECEIVER_COMMUNITY_URL) { logger.warn( - `X-Com: tradingLevel allows to receive coins only wiht url ${tradingLevel.RECEIVER_COMMUNITY_URL}`, + `X-Com: tradingLevel allows to receive coins only with url ${tradingLevel.RECEIVER_COMMUNITY_URL}`, ) return false }