瀏覽代碼

Merge branch 'sumer' into query_node_mappings

ondratra 4 年之前
父節點
當前提交
337534ee3c

+ 4 - 0
.dockerignore

@@ -5,3 +5,7 @@ target/
 query-node/generated
 query-node/**/dist
 query-node/lib
+# rm -f during image build instead of ignoring
+# pioneer/
+cli/
+tests/

+ 2 - 0
.github/workflows/joystream-cli.yml

@@ -17,6 +17,7 @@ jobs:
     - name: checks
       run: |
         yarn install --frozen-lockfile
+        yarn workspace @joystream/types build
         yarn workspace @joystream/cli checks --quiet
     - name: yarn pack test
       run: |
@@ -39,6 +40,7 @@ jobs:
     - name: checks
       run: |
         yarn install --frozen-lockfile --network-timeout 120000
+        yarn workspace @joystream/types build
         yarn workspace @joystream/cli checks --quiet
     - name: yarn pack test
       run: |

+ 2 - 0
.github/workflows/network-tests.yml

@@ -17,6 +17,7 @@ jobs:
     - name: checks
       run: |
         yarn install --frozen-lockfile
+        yarn workspace @joystream/types build
         yarn workspace network-tests checks --quiet
 
   network_build_osx:
@@ -34,4 +35,5 @@ jobs:
     - name: checks
       run: |
         yarn install --frozen-lockfile --network-timeout 120000
+        yarn workspace @joystream/types build
         yarn workspace network-tests checks --quiet

+ 4 - 0
.github/workflows/pioneer.yml

@@ -17,6 +17,7 @@ jobs:
     - name: build
       run: |
         yarn install --frozen-lockfile
+        yarn workspace @joystream/types build
         yarn workspace pioneer build
 
   pioneer_build_osx:
@@ -34,6 +35,7 @@ jobs:
     - name: build
       run: |
         yarn install --frozen-lockfile --network-timeout 120000
+        yarn workspace @joystream/types build
         yarn workspace pioneer build
 
   pioneer_lint_ubuntu:
@@ -51,6 +53,7 @@ jobs:
     - name: lint
       run: |
         yarn install --frozen-lockfile
+        yarn workspace @joystream/types build
         yarn workspace pioneer lint --quiet
 
   pioneer_lint_osx:
@@ -68,4 +71,5 @@ jobs:
     - name: lint
       run: |
         yarn install --frozen-lockfile --network-timeout 120000
+        yarn workspace @joystream/types build
         yarn workspace pioneer lint --quiet

+ 15 - 5
.github/workflows/run-network-tests.yml

@@ -96,7 +96,9 @@ jobs:
           docker load --input joystream-node-docker-image.tar.gz
           docker images
       - name: Install packages and dependencies
-        run: yarn install --frozen-lockfile
+        run: |
+          yarn install --frozen-lockfile
+          yarn workspace @joystream/types build
       - name: Ensure tests are runnable
         run: yarn workspace network-tests build
       - name: Execute network tests
@@ -120,7 +122,9 @@ jobs:
           docker load --input joystream-node-docker-image.tar.gz
           docker images
       - name: Install packages and dependencies
-        run: yarn install --frozen-lockfile
+        run: |
+          yarn install --frozen-lockfile
+          yarn workspace @joystream/types build
       - name: Ensure tests are runnable
         run: yarn workspace network-tests build
       - name: Execute network tests
@@ -144,7 +148,9 @@ jobs:
           docker load --input joystream-node-docker-image.tar.gz
           docker images
       - name: Install packages and dependencies
-        run: yarn install --frozen-lockfile
+        run: |
+          yarn install --frozen-lockfile
+          yarn workspace @joystream/types build
       - name: Start chain
         run: docker-compose up -d joystream-node
       - name: Initialize the content directory
@@ -168,7 +174,9 @@ jobs:
           docker load --input joystream-node-docker-image.tar.gz
           docker images
       - name: Install packages and dependencies
-        run: yarn install --frozen-lockfile
+        run: |
+          yarn install --frozen-lockfile
+          yarn workspace @joystream/types build
       - name: Ensure query-node builds
         run: yarn workspace query-node-root build
       - name: Ensure tests are runnable
@@ -196,7 +204,9 @@ jobs:
           docker load --input joystream-node-docker-image.tar.gz
           docker images
       - name: Install packages and dependencies
-        run: yarn install --frozen-lockfile
+        run: |
+          yarn install --frozen-lockfile
+          yarn workspace @joystream/types build
       - name: Build storage node
         run: yarn workspace storage-node build
       - name: Start Services

+ 5 - 5
README.md

@@ -25,12 +25,11 @@ After cloning the repo run the following initialization scripts:
 # Install rust toolchain
 ./setup.sh
 
-# Install npm package dependencies
-# Also good habit to run this when switching between branches
-yarn install
+# Install npm package dependencies, build packages and docker images
+yarn build
 
-# run some tests
-yarn cargo-checks
+# start a local development network
+yarn start
 ```
 
 ## Software
@@ -75,6 +74,7 @@ The HEAD of the master branch should always be used for the correct version of t
 ```sh
 git checkout master
 yarn install
+yarn build:packages
 yarn workspace pioneer start
 ```
 

+ 22 - 4
apps.Dockerfile

@@ -2,13 +2,31 @@ FROM node:12 as builder
 
 WORKDIR /joystream
 COPY . /joystream
+RUN  rm -fr /joystream/pioneer
 
 # Do not set NODE_ENV=production until after running yarn install
 # to ensure dev dependencies are installed.
-RUN yarn install --frozen-lockfile
-# Uncomment query-node build when mappings are fixed
-# RUN yarn workspace query-node-root build
-RUN yarn workspace pioneer build
+RUN yarn --forzen-lockfile
+
+RUN yarn workspace @joystream/types build
+RUN yarn workspace query-node-root build
 RUN yarn workspace storage-node build
 
+# Second stage to reduce image size, enable it when
+# all packages have correctly identified what is a devDependency and what is not.
+# It will reduce the image size by about 500MB (down from 2.2GB to 1.7GB)
+
+# # Remove files that are not needed after build.
+# # We will re-fetch only dependencies needed for running the apps.
+# RUN rm -fr node_modules/
+# RUN rm -fr .git/
+
+# FROM node:12
+# WORKDIR /joystream
+# COPY --from=builder /joystream/ /joystream/
+
+# # Skip installing devDependencies, since we have already built the packages.
+# ENV NODE_ENV=production
+# RUN yarn install --forzen-lockfile --production
+
 ENTRYPOINT [ "yarn" ]

+ 25 - 0
build-docker-images.sh

@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+set -e
+
+if ! command -v docker-compose &> /dev/null
+then
+  echo "docker-compose not found. Skipping docker image builds."
+  exit 0
+fi
+
+# Build joystream/apps docker image
+echo "Building 'joystream/apps' docker image..."
+docker-compose build colossus
+
+# Build the pioneer docker image
+echo "Building pioneer docker image"
+docker-compose build pioneer
+
+if [[ "$SKIP_JOYSTREAM_NODE" = 1 || "$SKIP_JOYSTREAM_NODE" = "true" ]]; then
+  echo "Skipping build of joystream/node docker image."
+else
+  # TODO: Try to fetch a cached joystream/node image
+  # if one is found matching code shasum instead of building
+  docker-compose build joystream-node
+fi

+ 11 - 0
build-npm-packages.sh

@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+set -e
+
+yarn
+yarn workspace @joystream/types build
+yarn workspace query-node-root build
+# For now cli build is broken.. proceed anyway
+yarn workspace @joystream/cli build || :
+yarn workspace storage-node build
+yarn workspace pioneer build

+ 0 - 53
build.sh

@@ -1,53 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-yarn
-yarn workspace @joystream/types build
-yarn workspace @joystream/cli build
-yarn workspace query-node-root build
-yarn workspace storage-node build
-# Not strictly needed during development, we run "yarn workspace pioneer start" to start
-# a dev instance, but will show highlight build issues
-yarn workspace pioneer build
-
-if ! command -v docker-compose &> /dev/null
-then
-  echo "docker-compose not found, skipping docker build!"
-else
-  # Build joystream/apps docker image
-  docker-compose build pioneer
-
-  # Optionally build joystream/node docker image
-  # TODO: Try to fetch a cached joystream/node image
-  # if one is found matching code shasum instead of building
-  while true
-  do
-    read -p "Rebuild joystream/node docker image? (y/N): " answer2
-
-    case $answer2 in
-    [yY]* ) docker-compose build joystream-node
-            break;;
-
-    [nN]* ) break;;
-
-    * )     break;;
-    esac
-  done
-fi
-
-# Build cargo crates: native binaries joystream/node, wasm runtime, and chainspec builder.
-while true
-do
-  read -p "Compile joystream node native binary? (y/N): " answer1
-
-  case $answer1 in
-   [yY]* ) yarn cargo-checks
-           yarn cargo-build
-           break;;
-
-   [nN]* ) break;;
-
-   * )     break;;
-  esac
-done

+ 8 - 9
docker-compose.yml

@@ -79,7 +79,7 @@ services:
       - "127.0.0.1:8081:${GRAPHQL_SERVER_PORT}"
     depends_on: 
       - db
-    command: ["workspace", "query-node-root", "server:start:prod"]
+    command: ["workspace", "query-node-root", "query-node:start:prod"]
 
   processor:
     image: joystream/apps
@@ -95,7 +95,8 @@ services:
       - TYPEORM_HOST=db
       - TYPEORM_DATABASE=${DB_NAME}
       - DEBUG=index-builder:*
-      - WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
+      - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
+      - PROCESSOR_POLL_INTERVAL=1000 # refresh every second
     depends_on:
       - hydra-indexer-gateway
     command: ["workspace", "query-node-root", "processor:start"]
@@ -110,16 +111,15 @@ services:
       - DB_HOST=db
       - DB_NAME=${INDEXER_DB_NAME}
       - INDEXER_WORKERS=5
-      - PROCESSOR_POLL_INTERVAL=1000 # refresh every second 
       - REDIS_URI=redis://redis:6379/0
       - DEBUG=index-builder:*
       - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
-      - TYPES_JSON=${TYPES_JSON}
+      - TYPES_JSON=types.json
     depends_on:
       - db
       - redis
     volumes:
-      - ${TYPES_JSON}:/home/hydra/packages/hydra-indexer/types/augment/all/defs.json
+      - ${TYPES_JSON}:/home/hydra/packages/hydra-indexer/types.json
     command: >
       sh -c "yarn db:bootstrap && yarn start:prod"
 
@@ -153,10 +153,9 @@ services:
       - "127.0.0.1:6379:6379"
 
   pioneer:
-    image: joystream/apps
+    image: joystream/pioneer
     build:
       context: .
-      dockerfile: apps.Dockerfile
+      dockerfile: pioneer.Dockerfile
     ports:
-      - "127.0.0.1:3000:3000"
-    command: workspace pioneer start
+      - "127.0.0.1:3000:80"

+ 4 - 2
package.json

@@ -4,8 +4,9 @@
   "version": "1.0.0",
   "license": "GPL-3.0-only",
   "scripts": {
-    "postinstall": "yarn workspace @joystream/types build",
-    "build": "./build.sh",
+    "build": "./build-npm-packages.sh && ./build-docker-images.sh",
+    "build:packages": "./build-npm-packages.sh",
+    "build:docker": "./build-docker-images.sh",
     "start": "./start.sh",
     "cargo-checks": "devops/git-hooks/pre-commit && devops/git-hooks/pre-push",
     "cargo-build": "scripts/cargo-build.sh"
@@ -36,6 +37,7 @@
     "@polkadot/wasm-crypto": "^1.2.1",
     "babel-core": "^7.0.0-bridge.0",
     "typescript": "^3.9.7",
+    "typeorm": "^0.2.31",
     "bn.js": "^5.1.2"
   },
   "devDependencies": {

+ 18 - 0
pioneer.Dockerfile

@@ -0,0 +1,18 @@
+FROM node:12 as builder
+
+WORKDIR /joystream
+COPY . /joystream
+
+RUN yarn
+RUN NODE_ENV=production yarn workspace @joystream/types build
+RUN NODE_ENV=production yarn workspace pioneer build
+
+FROM ubuntu:18.04
+
+RUN apt-get update && apt-get -y install nginx
+
+COPY --from=builder /joystream/pioneer/packages/apps/build /var/www/html
+
+EXPOSE 80
+
+CMD ["nginx", "-g", "daemon off;"]

+ 2 - 2
query-node/build.sh

@@ -13,8 +13,8 @@ yarn clean
 
 yarn codegen:noinstall
 
+yarn mappings:build
+
 # We run yarn again to ensure graphql-server dependencies are installed
 # and are inline with root workspace resolutions
 yarn
-
-ln -s ../../../../../node_modules/typeorm/cli.js generated/graphql-server/node_modules/.bin/typeorm || :

+ 3 - 1
query-node/package.json

@@ -36,7 +36,9 @@
   "dependencies": {
     "tslib": "^2.0.0",
     "@types/bn.js": "^4.11.6",
-    "bn.js": "^5.1.2"
+    "bn.js": "^5.1.2",
+    "@dzlzv/hydra-cli": "2.0.0-beta",
+    "@dzlzv/hydra-processor": "0.1.1"
   },
   "devDependencies": {
     "@dzlzv/hydra-cli": "2.0.1-beta.3",

+ 2 - 4
query-node/run-tests.sh

@@ -7,10 +7,6 @@ cd $SCRIPT_PATH
 # Only run codegen if no generated files found
 [ ! -d "generated/" ] && yarn build
 
-# Make sure typeorm is available.. it get removed when yarn is run again
-# typeorm commandline is used by db:migrate step below.
-ln -s ../../../../../node_modules/typeorm/cli.js generated/graphql-server/node_modules/.bin/typeorm || :
-
 set -a
 . ../.env
 set +a
@@ -24,6 +20,7 @@ function cleanup() {
     (echo "## Processor Logs ##" && docker logs joystream_processor_1 --tail 50) || :
     (echo "## Indexer Logs ##" && docker logs joystream_indexer_1 --tail 50) || :
     (echo "## Indexer API Gateway Logs ##" && docker logs joystream_hydra-indexer-gateway_1 --tail 50) || :
+    (echo "## Graphql Server Logs ##" && docker logs joystream_graphql-server_1 --tail 50) || :
     docker-compose down -v
 }
 
@@ -33,6 +30,7 @@ trap cleanup EXIT
 docker-compose up -d db
 
 # Migrate the databases
+yarn workspace query-node-root db:prepare
 yarn workspace query-node-root db:migrate
 
 docker-compose up -d graphql-server

+ 27 - 15
setup.sh

@@ -2,8 +2,25 @@
 
 set -e
 
+if [[ "$OSTYPE" == "linux-gnu" ]]; then
+    # code build tools
+    sudo apt-get update
+    sudo apt-get install -y coreutils clang jq curl gcc xz-utils sudo pkg-config unzip clang libc6-dev-i386 make libssl-dev python
+    # docker
+    sudo apt-get install -y docker.io docker-compose containerd runc
+elif [[ "$OSTYPE" == "darwin"* ]]; then
+    # install brew package manager
+    if ! which brew >/dev/null 2>&1; then
+      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
+    fi
+    # install additional packages
+    brew update
+    brew install b2sum gnu-tar jq curl
+    echo "It is recommended to setup Docker desktop from: https://www.docker.com/products/docker-desktop"
+fi
+
 # If OS is supported will install build tools for rust and substrate.
-# Skips installing substrate itself and subkey
+# Skips installation of substrate and subkey
 curl https://getsubstrate.io -sSf | bash -s -- --fast
 
 source ~/.cargo/env
@@ -23,21 +40,16 @@ rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-23
 rustup install 1.46.0
 rustup default 1.46.0
 
-if [[ "$OSTYPE" == "linux-gnu" ]]; then
-    sudo apt-get install -y coreutils clang jq curl gcc xz-utils sudo pkg-config unzip clang libc6-dev-i386
-    sudo apt-get install -y docker.io docker-compose
-elif [[ "$OSTYPE" == "darwin"* ]]; then
-    brew install b2sum gnu-tar jq curl
-    echo "It is recommended to setup Docker desktop from: https://www.docker.com/products/docker-desktop"
-fi
-
 # Volta nodejs, npm, yarn tools manager
 curl https://get.volta.sh | bash
 
-# After installing volta the .profile and .bash_profile are updated
-# to add it to the PATH, so we start new shell to use it
-env bash -c "volta install node@12"
-env bash -c "volta install yarn"
-env bash -c "volta install npx"
+# source env variables added by Volta
+source source ~/.bash_profile || ~/.profile || source ~/.bashrc || :
+
+volta install node@12
+volta install yarn
+volta install npx
+
+echo "Starting new terminal/shell session to make newly installed tools available."
 
-echo "Open a new terminal to start using newly installed tools"
+exec bash -l

+ 12 - 4
start.sh

@@ -2,7 +2,8 @@
 set -e
 
 # Run a complete joystream development network on your machine using docker.
-# Make sure to run build.sh prior to running this script.
+# Make sure to run build-docker-images.sh prior to running this script to use
+# the local build.
 
 set -a
 . .env
@@ -26,17 +27,24 @@ docker-compose up -d joystream-node
 # Configure a dev storage node and start storage node
 DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
 docker-compose up -d colossus
+# Create a new content directory lead
+yarn workspace api-scripts initialize-content-lead
 
 ## Query Node Infrastructure
 # Initialize a new database for the query node infrastructure
 docker-compose up -d db
+yarn workspace query-node-root db:prepare
 yarn workspace query-node-root db:migrate
 
 # Startup all query-node infrastructure services
+export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
 docker-compose up -d graphql-server
 docker-compose up -d processor
 
-echo "press Ctrl+C to shutdown"
+docker-compose up -d pioneer
 
-# Start a dev instance of pioneer and wait for exit
-docker-compose up pioneer
+echo "use Ctrl+C to shutdown the development network."
+
+while true; do 
+  read
+done

+ 0 - 65
tests/network-tests/src/Api.ts

@@ -30,10 +30,6 @@ import {
 } from '@joystream/types/hiring'
 import { FillOpeningParameters, ProposalId } from '@joystream/types/proposals'
 import { v4 as uuid } from 'uuid'
-import { ChannelEntity } from '@joystream/cd-schemas/types/entities/ChannelEntity'
-import { VideoEntity } from '@joystream/cd-schemas/types/entities/VideoEntity'
-import { InputParser } from '@joystream/cd-schemas'
-import { OperationType } from '@joystream/types/content-directory'
 import { ContentId, DataObject } from '@joystream/types/storage'
 import Debugger from 'debug'
 
@@ -1729,67 +1725,6 @@ export class Api {
     return this.api.createType('u32', this.api.consts[module].maxWorkerNumberLimit)
   }
 
-  async sendContentDirectoryTransaction(operations: OperationType[]): Promise<ISubmittableResult> {
-    const transaction = this.api.tx.contentDirectory.transaction(
-      { Lead: null }, // We use member with id 0 as actor (in this case we assume this is Alice)
-      operations // We provide parsed operations as second argument
-    )
-    const lead = (await this.getGroupLead(WorkingGroups.ContentDirectoryWorkingGroup)) as Worker
-    return this.sender.signAndSend(transaction, lead.role_account_id)
-  }
-
-  public async createChannelEntity(channel: ChannelEntity): Promise<ISubmittableResult> {
-    // Create the parser with known entity schemas (the ones in content-directory-schemas/inputs)
-    const parser = InputParser.createWithKnownSchemas(
-      this.api,
-      // The second argument is an array of entity batches, following standard entity batch syntax ({ className, entries }):
-      [
-        {
-          className: 'Channel',
-          entries: [channel], // We could specify multiple entries here, but in this case we only need one
-        },
-      ]
-    )
-    // We parse the input into CreateEntity and AddSchemaSupportToEntity operations
-    const operations = await parser.getEntityBatchOperations()
-    return this.sendContentDirectoryTransaction(operations)
-  }
-
-  public async createVideoEntity(video: VideoEntity): Promise<ISubmittableResult> {
-    // Create the parser with known entity schemas (the ones in content-directory-schemas/inputs)
-    const parser = InputParser.createWithKnownSchemas(
-      this.api,
-      // The second argument is an array of entity batches, following standard entity batch syntax ({ className, entries }):
-      [
-        {
-          className: 'Video',
-          entries: [video], // We could specify multiple entries here, but in this case we only need one
-        },
-      ]
-    )
-    // We parse the input into CreateEntity and AddSchemaSupportToEntity operations
-    const operations = await parser.getEntityBatchOperations()
-    return this.sendContentDirectoryTransaction(operations)
-  }
-
-  public async updateChannelEntity(
-    channelUpdateInput: Record<string, any>,
-    uniquePropValue: Record<string, any>
-  ): Promise<ISubmittableResult> {
-    // Create the parser with known entity schemas (the ones in content-directory-schemas/inputs)
-    const parser = InputParser.createWithKnownSchemas(this.api)
-
-    // We can reuse InputParser's `findEntityIdByUniqueQuery` method to find entityId of the channel we
-    // created in ./createChannel.ts example (normally we would probably use some other way to do it, ie.: query node)
-    const CHANNEL_ID = await parser.findEntityIdByUniqueQuery(uniquePropValue, 'Channel') // Use getEntityUpdateOperations to parse the update input
-    const updateOperations = await parser.getEntityUpdateOperations(
-      channelUpdateInput,
-      'Channel', // Class name
-      CHANNEL_ID // Id of the entity we want to update
-    )
-    return this.sendContentDirectoryTransaction(updateOperations)
-  }
-
   async getDataByContentId(contentId: ContentId): Promise<DataObject | null> {
     const dataObject = await this.api.query.dataDirectory.dataByContentId<Option<DataObject>>(contentId)
     return dataObject.unwrapOr(null)

+ 0 - 51
tests/network-tests/src/fixtures/contentDirectoryModule.ts

@@ -1,51 +0,0 @@
-import { Api } from '../Api'
-import { BaseFixture } from '../Fixture'
-import { ChannelEntity } from '@joystream/cd-schemas/types/entities/ChannelEntity'
-import { VideoEntity } from '@joystream/cd-schemas/types/entities/VideoEntity'
-
-export class CreateChannelFixture extends BaseFixture {
-  public channelEntity: ChannelEntity
-
-  public constructor(api: Api, channelEntity: ChannelEntity) {
-    super(api)
-    this.channelEntity = channelEntity
-  }
-
-  public async execute(): Promise<void> {
-    this.expectDispatchSuccess(
-      await this.api.createChannelEntity(this.channelEntity),
-      'Create Channel should have succeeded'
-    )
-  }
-}
-
-export class CreateVideoFixture extends BaseFixture {
-  public videoEntity: VideoEntity
-
-  public constructor(api: Api, videoEntity: VideoEntity) {
-    super(api)
-    this.videoEntity = videoEntity
-  }
-
-  public async execute(): Promise<void> {
-    this.expectDispatchSuccess(await this.api.createVideoEntity(this.videoEntity), 'Create Video should have succeeded')
-  }
-}
-
-export class UpdateChannelFixture extends BaseFixture {
-  private channelUpdateInput: Record<string, any>
-  private uniquePropValue: Record<string, any>
-
-  public constructor(api: Api, channelUpdateInput: Record<string, any>, uniquePropValue: Record<string, any>) {
-    super(api)
-    this.channelUpdateInput = channelUpdateInput
-    this.uniquePropValue = uniquePropValue
-  }
-
-  public async execute(): Promise<void> {
-    this.expectDispatchSuccess(
-      await this.api.updateChannelEntity(this.channelUpdateInput, this.uniquePropValue),
-      'Update Channel should have succeeded'
-    )
-  }
-}

+ 0 - 50
tests/network-tests/src/flows/contentDirectory/creatingChannel.ts

@@ -1,50 +0,0 @@
-import { Api } from '../../Api'
-import { FlowProps } from '../../Flow'
-import { Utils } from '../../utils'
-import { CreateChannelFixture } from '../../fixtures/contentDirectoryModule'
-import { ChannelEntity } from '@joystream/cd-schemas/types/entities/ChannelEntity'
-import { assert } from 'chai'
-import { FixtureRunner } from '../../Fixture'
-import Debugger from 'debug'
-
-export function createSimpleChannelFixture(api: Api): CreateChannelFixture {
-  const channelEntity: ChannelEntity = {
-    handle: 'New channel example',
-    description: 'This is an example channel',
-    // We can use "existing" syntax to reference either an on-chain entity or other entity that's part of the same batch.
-    // Here we reference language that we assume was added by initialization script (initialize:dev), as it is part of
-    // input/entityBatches/LanguageBatch.json
-    language: { existing: { code: 'EN' } },
-    coverPhotoUrl: '',
-    avatarPhotoUrl: '',
-    isPublic: true,
-  }
-  return new CreateChannelFixture(api, channelEntity)
-}
-
-function assertChannelMatchQueriedResult(queriedChannel: any, channel: ChannelEntity) {
-  assert.equal(queriedChannel.handle, channel.handle, 'Should be equal')
-  assert.equal(queriedChannel.description, channel.description, 'Should be equal')
-  assert.equal(queriedChannel.coverPhotoUrl, channel.coverPhotoUrl, 'Should be equal')
-  assert.equal(queriedChannel.avatarPhotoUrl, channel.avatarPhotoUrl, 'Should be equal')
-  assert.equal(queriedChannel.isPublic, channel.isPublic, 'Should be equal')
-}
-
-export default async function channelCreation({ api, query }: FlowProps): Promise<void> {
-  const debug = Debugger('flow:creatingChannel')
-  debug('Started')
-
-  const createChannelHappyCaseFixture = createSimpleChannelFixture(api)
-
-  await new FixtureRunner(createChannelHappyCaseFixture).run()
-
-  // Temporary solution (wait 2 minutes)
-  await Utils.wait(120000)
-
-  // Ensure newly created channel was parsed by query node
-  const result = await query.getChannelbyHandle(createChannelHappyCaseFixture.channelEntity.handle)
-
-  assertChannelMatchQueriedResult(result.data.channels[0], createChannelHappyCaseFixture.channelEntity)
-
-  debug('Done')
-}

+ 0 - 115
tests/network-tests/src/flows/contentDirectory/creatingVideo.ts

@@ -1,115 +0,0 @@
-import { Api } from '../../Api'
-import { FlowProps } from '../../Flow'
-import { CreateVideoFixture } from '../../fixtures/contentDirectoryModule'
-import { VideoEntity } from '@joystream/cd-schemas/types/entities/VideoEntity'
-import { assert } from 'chai'
-import { Utils } from '../../utils'
-import { FixtureRunner } from '../../Fixture'
-import Debugger from 'debug'
-
-export function createVideoReferencingChannelFixture(api: Api, handle: string): CreateVideoFixture {
-  const videoEntity: VideoEntity = {
-    title: 'Example video',
-    description: 'This is an example video',
-    // We reference existing language and category by their unique properties with "existing" syntax
-    // (those referenced here are part of inputs/entityBatches)
-    language: { existing: { code: 'EN' } },
-    category: { existing: { name: 'Education' } },
-    // We use the same "existing" syntax to reference a channel by unique property (handle)
-    // In this case it's a channel that we created in createChannel example
-    channel: { existing: { handle } },
-    media: {
-      // We use "new" syntax to sygnalize we want to create a new VideoMedia entity that will be related to this Video entity
-      new: {
-        // We use "exisiting" enconding from inputs/entityBatches/VideoMediaEncodingBatch.json
-        encoding: { existing: { name: 'H.263_MP4' } },
-        pixelHeight: 600,
-        pixelWidth: 800,
-        // We create nested VideoMedia->MediaLocation->HttpMediaLocation relations using the "new" syntax
-        location: { new: { httpMediaLocation: { new: { url: 'https://testnet.joystream.org/' } } } },
-      },
-    },
-    // Here we use combined "new" and "existing" syntaxes to create Video->License->KnownLicense relations
-    license: {
-      new: {
-        knownLicense: {
-          // This license can be found in inputs/entityBatches/KnownLicenseBatch.json
-          existing: { code: 'CC_BY' },
-        },
-      },
-    },
-    duration: 3600,
-    thumbnailUrl: '',
-    isExplicit: false,
-    isPublic: true,
-  }
-  return new CreateVideoFixture(api, videoEntity)
-}
-
-function assertVideoMatchQueriedResult(queriedVideo: any, video: VideoEntity) {
-  assert.equal(queriedVideo.title, video.title, 'Should be equal')
-  assert.equal(queriedVideo.description, video.description, 'Should be equal')
-  assert.equal(queriedVideo.duration, video.duration, 'Should be equal')
-  assert.equal(queriedVideo.thumbnailUrl, video.thumbnailUrl, 'Should be equal')
-  assert.equal(queriedVideo.isExplicit, video.isExplicit, 'Should be equal')
-  assert.equal(queriedVideo.isPublic, video.isPublic, 'Should be equal')
-}
-
-export default async function createVideo({ api, query }: FlowProps): Promise<void> {
-  const debug = Debugger('flow:creatingVideo')
-  debug('Started')
-
-  const channelTitle = 'New channel example'
-  const createVideoHappyCaseFixture = createVideoReferencingChannelFixture(api, channelTitle)
-
-  await new FixtureRunner(createVideoHappyCaseFixture).run()
-
-  // Temporary solution (wait 2 minutes)
-  await Utils.wait(120000)
-
-  // Perform number of full text searches on Channel title, that is a slight variation on title that one expects would return the video.
-  let channelFullTextSearchResult = await query.performFullTextSearchOnChannelTitle('video')
-
-  assert(channelFullTextSearchResult.data.search.length === 1, 'Should contain exactly one entry')
-
-  // Both channel and video title starts with `Example`
-  channelFullTextSearchResult = await query.performFullTextSearchOnChannelTitle('Example')
-
-  assert(channelFullTextSearchResult.data.search.length === 2, 'Should contain two entries')
-
-  // Perform number full text searches on Channel title, that absolutely should NOT return the video.
-  channelFullTextSearchResult = await query.performFullTextSearchOnChannelTitle('First')
-
-  assert(channelFullTextSearchResult.data.search.length === 0, 'Should be empty')
-
-  channelFullTextSearchResult = await query.performFullTextSearchOnChannelTitle('vid')
-
-  assert(channelFullTextSearchResult.data.search.length === 0, 'Should be empty')
-
-  // Ensure channel contains only one video with right data
-  const channelResult = await query.getChannelbyHandle(channelTitle)
-
-  assert(channelResult.data.channels[0].videos.length === 1, 'Given channel should contain exactly one video')
-
-  assertVideoMatchQueriedResult(channelResult.data.channels[0].videos[0], createVideoHappyCaseFixture.videoEntity)
-
-  // Perform number of full text searches on Video title, that is a slight variation on title that one expects would return the video.
-  let videoFullTextSearchResult = await query.performFullTextSearchOnVideoTitle('Example')
-
-  assert(videoFullTextSearchResult.data.search.length === 2, 'Should contain two entries')
-
-  videoFullTextSearchResult = await query.performFullTextSearchOnVideoTitle('Example video')
-
-  assert(videoFullTextSearchResult.data.search.length === 1, 'Should contain exactly one video')
-
-  // Perform number full text searches on Video title, that absolutely should NOT return the video.
-  videoFullTextSearchResult = await query.performFullTextSearchOnVideoTitle('unknown')
-
-  assert(videoFullTextSearchResult.data.search.length === 0, 'Should be empty')
-
-  videoFullTextSearchResult = await query.performFullTextSearchOnVideoTitle('MediaVideo')
-
-  assert(videoFullTextSearchResult.data.search.length === 0, 'Should be empty')
-
-  debug('Done')
-}

+ 0 - 49
tests/network-tests/src/flows/contentDirectory/updatingChannel.ts

@@ -1,49 +0,0 @@
-import { Api } from '../../Api'
-import { FlowProps } from '../../Flow'
-import { UpdateChannelFixture } from '../../fixtures/contentDirectoryModule'
-import { ChannelEntity } from '@joystream/cd-schemas/types/entities/ChannelEntity'
-import { assert } from 'chai'
-import { Utils } from '../../utils'
-import { FixtureRunner } from '../../Fixture'
-import Debugger from 'debug'
-
-export function createUpdateChannelHandleFixture(api: Api, handle: string, description: string): UpdateChannelFixture {
-  // Create partial channel entity, only containing the fields we wish to update
-  const channelUpdateInput: Partial<ChannelEntity> = {
-    description,
-  }
-
-  const uniquePropVal: Record<string, any> = { handle }
-
-  return new UpdateChannelFixture(api, channelUpdateInput, uniquePropVal)
-}
-
-export default async function updateChannel({ api, query }: FlowProps): Promise<void> {
-  const debug = Debugger('flow:updateChannel')
-  debug('Started')
-
-  const handle = 'New channel example'
-  const channelResult = await query.getChannelbyHandle(handle)
-  const channel = channelResult.data.channels[0]
-
-  const description = 'Updated description'
-  const createUpdateChannelDescriptionHappyCaseFixture = createUpdateChannelHandleFixture(api, handle, description)
-
-  await new FixtureRunner(createUpdateChannelDescriptionHappyCaseFixture).run()
-
-  // Temporary solution (wait 2 minutes)
-  await Utils.wait(120000)
-
-  const channelAfterUpdateResult = await query.getChannelbyHandle(handle)
-  const channelAfterUpdate = channelAfterUpdateResult.data.channels[0]
-
-  // description field should be updated to provided one
-  assert.equal(channelAfterUpdate.description, description, 'Should be equal')
-
-  assert.equal(channelAfterUpdate.handle, channel.handle, 'Should be equal')
-  assert.equal(channelAfterUpdate.coverPhotoUrl, channel.coverPhotoUrl, 'Should be equal')
-  assert.equal(channelAfterUpdate.avatarPhotoUrl, channel.avatarPhotoUrl, 'Should be equal')
-  assert.equal(channelAfterUpdate.isPublic, channel.isPublic, 'Should be equal')
-
-  debug('Done')
-}

+ 0 - 6
tests/network-tests/src/scenarios/content-directory.ts

@@ -1,12 +1,6 @@
 import leaderSetup from '../flows/workingGroup/leaderSetup'
-import createChannel from '../flows/contentDirectory/creatingChannel'
-import createVideo from '../flows/contentDirectory/creatingVideo'
-import updateChannel from '../flows/contentDirectory/updatingChannel'
 import { scenario } from '../Scenario'
 
 scenario(async ({ job }) => {
   job('setup content lead', leaderSetup.content)
-    .then(job('create-channel', createChannel))
-    .then(job('create-video', createVideo))
-    .then(job('update-channel', updateChannel))
 })

+ 1 - 1
utils/api-scripts/package.json

@@ -5,7 +5,7 @@
   "license": "GPL-3.0-only",
   "scripts": {
     "status": "ts-node src/status",
-    "initialize-content-lead": "ts-node src/sudo-init-content-lead",
+    "initialize-content-lead": "ts-node src/initialize-content-lead",
     "script": "ts-node src/script",
     "tsnode-strict": "node -r ts-node/register --unhandled-rejections=strict"
   },

+ 194 - 151
yarn.lock

@@ -1360,11 +1360,14 @@
     ajv "^6.12.0"
     ajv-keywords "^3.4.1"
 
-"@dzlzv/hydra-cli@^0.1.6":
-  version "0.1.6"
-  resolved "https://registry.yarnpkg.com/@dzlzv/hydra-cli/-/hydra-cli-0.1.6.tgz#644a64efcdcca850e26502ee6f3b755bc794d912"
-  integrity sha512-14NYR5VIN0bKhDMv05l+kxGanBiMLThyDhkF644VnVc0sIGWTqg4sT9wSwTb4HN8UHVhKerNWsaAxYMAWVwWDQ==
-  dependencies:
+"@dzlzv/hydra-cli@2.0.0-beta":
+  version "2.0.0-beta"
+  resolved "https://registry.yarnpkg.com/@dzlzv/hydra-cli/-/hydra-cli-2.0.0-beta.tgz#241a4fbaef5fb90661d994bfb06f9466fd569565"
+  integrity sha512-F06H+lj02Z5iQg+MvVx9VRjXN70Agx+7a78SiQ5zjAKHQsunwWnOTVNCcGI/tU3qDW+fh6fh1eCTcNJHtVW8TA==
+  dependencies:
+    "@inquirer/input" "^0.0.13-alpha.0"
+    "@inquirer/password" "^0.0.12-alpha.0"
+    "@inquirer/select" "^0.0.13-alpha.0"
     "@oclif/command" "^1.5.20"
     "@oclif/config" "^1"
     "@oclif/errors" "^1.3.3"
@@ -1388,7 +1391,7 @@
     mustache "^4.0.1"
     pluralize "^8.0.0"
     tslib "1.11.2"
-    warthog "https://github.com/metmirr/warthog/releases/download/v2.22.0/warthog-v2.22.0.tgz"
+    warthog "https://github.com/metmirr/warthog/releases/download/v2.23.0/warthog-v2.23.0.tgz"
 
 "@dzlzv/hydra-common@0.0.3", "@dzlzv/hydra-common@^0.0.3":
   version "0.0.3"
@@ -1404,7 +1407,7 @@
   dependencies:
     bn.js "^5.1.3"
 
-"@dzlzv/hydra-db-utils@0.0.2", "@dzlzv/hydra-db-utils@^0.0.2":
+"@dzlzv/hydra-db-utils@^0.0.2":
   version "0.0.2"
   resolved "https://registry.yarnpkg.com/@dzlzv/hydra-db-utils/-/hydra-db-utils-0.0.2.tgz#7d0b23ead97a5d084e72d2ecfb6dbcb126557a19"
   integrity sha512-dPrUqhtkq8HvT2jnTuSDPLQdEjaaTX+fRbfrz9wbJVUAYCW50nHtn2qZ1DEp23hiE0EkUkm+JLYONWDpJVNQ7w==
@@ -1416,19 +1419,49 @@
     lodash "^4.17.20"
     typeorm "^0.2.25"
 
-"@dzlzv/hydra-processor@0.0.7":
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/@dzlzv/hydra-processor/-/hydra-processor-0.0.7.tgz#54159045cce50d98dbd71d67b0dbc6036b537da9"
-  integrity sha512-PoZ3a6tv9KL26UEuKS/0MHOFNFu9EYa2D0q9ugzopFoT+CBTAy1uyp20PSqwhHIkWgEbqsrsvJyOoRyNIqmyag==
+"@dzlzv/hydra-processor@0.1.1":
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/@dzlzv/hydra-processor/-/hydra-processor-0.1.1.tgz#b227c10c625ea164fc60a86751f6951107572afd"
+  integrity sha512-r48VwjqL/w+UIuYEelnO7y6OVDek5lzwCywgXJuLlRUk/5Jhz8BBiC8GMFAfoc5sXStTC7uY8NNgtaJrGj3cEQ==
   dependencies:
     "@dzlzv/hydra-common" "^0.0.3"
     "@dzlzv/hydra-db-utils" "^0.0.2"
+    "@oclif/command" "^1.8.0"
+    "@oclif/config" "^1"
+    "@oclif/errors" "^1.3.3"
+    "@oclif/plugin-help" "^2"
+    "@oclif/plugin-plugins" "^1.9.4"
     bn.js "^5.1.3"
+    chalk "^4.1.0"
+    delay "^5.0.0"
+    dotenv "^8.2.0"
+    envalid "^6.0.2"
     express "^4.17.1"
     graphql "^15.4.0"
     graphql-request "^3.3.0"
+    p-wait-for "^3.2.0"
     prom-client "^12.0.0"
+    semver "^7.3.4"
     typedi "^0.8.0"
+    yaml "^1.10.0"
+    yaml-validator "^3.0.0"
+
+"@dzlzv/hydra-typegen@0.0.3-1":
+  version "0.0.3-1"
+  resolved "https://registry.yarnpkg.com/@dzlzv/hydra-typegen/-/hydra-typegen-0.0.3-1.tgz#e1fe3b22c77eb46b7be313e87248282906daf6e9"
+  integrity sha512-h5ppekE8IMFuhyhFmcgb84VGAGEJYCOsqHDVL27TL9umx8KWVPLeYmgd6bA43zsXKsU+ws1pT4ncCDz70t56tw==
+  dependencies:
+    "@oclif/command" "^1.8.0"
+    "@oclif/config" "^1"
+    "@oclif/errors" "^1.3.3"
+    "@oclif/plugin-help" "^2"
+    "@oclif/plugin-plugins" "^1.9.4"
+    "@polkadot/api" "^2.10.1"
+    debug "^4.3.1"
+    handlebars "^4.7.6"
+    lodash "^4.17.20"
+    yaml "^1.10.0"
+    yaml-validator "^3.0.0"
 
 "@electron/get@^1.0.1":
   version "1.12.2"
@@ -1738,6 +1771,46 @@
   resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8"
   integrity sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw==
 
+"@inquirer/core@^0.0.13-alpha.0":
+  version "0.0.13-alpha.0"
+  resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-0.0.13-alpha.0.tgz#374e901cc2aff56fc3f565c2fde5d5053145035f"
+  integrity sha512-vIXwLW793Z7VUZEfgS9GuEaxwxa4e+OU5TjrZGbkPb4QRnJAhRGgsuAizNgGltKxTRdpn+UD0qloCaAnHPOMbQ==
+  dependencies:
+    ansi-escapes "^4.2.1"
+    chalk "^4.1.0"
+    cli-spinners "^2.2.0"
+    cli-width "^3.0.0"
+    lodash "^4.17.19"
+    mute-stream "^0.0.8"
+    run-async "^2.3.0"
+    string-width "^4.1.0"
+    strip-ansi "^6.0.0"
+
+"@inquirer/input@^0.0.13-alpha.0":
+  version "0.0.13-alpha.0"
+  resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-0.0.13-alpha.0.tgz#ea2eb290723016fdf195ebe0d6e02a46ad266320"
+  integrity sha512-Pjc+WreJI0L3HRqGPSIWqdUIRSogKN/mznh1JW8VqEQHCyQ30vJtN7hePylmdoppLf9Np1pe3rfThl/wcAv1og==
+  dependencies:
+    "@inquirer/core" "^0.0.13-alpha.0"
+    chalk "^4.1.0"
+
+"@inquirer/password@^0.0.12-alpha.0":
+  version "0.0.12-alpha.0"
+  resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-0.0.12-alpha.0.tgz#2458ff6cc5d06593f3cc1662735f3cfb950a0a2c"
+  integrity sha512-zhY9sgnDFCN3jr1uCL22R2daAIw+AAtXa9VgyOCF8VdwAw9gg3h3FOj1MZrkHm7XgQ8JnhmaiggLXEERrQ48OQ==
+  dependencies:
+    "@inquirer/input" "^0.0.13-alpha.0"
+    chalk "^4.1.0"
+
+"@inquirer/select@^0.0.13-alpha.0":
+  version "0.0.13-alpha.0"
+  resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-0.0.13-alpha.0.tgz#853f8fa7fac09c81341c2cf0ea9be1f310bc1c30"
+  integrity sha512-Ne5rCNUOXotVhXm478C7smRTuOrAZEGXtOhRfpnDSnjjDHQLnBXJKXN8CVioG3Imbi7OKZu3DwAxjfJFV7KOxQ==
+  dependencies:
+    "@inquirer/core" "^0.0.13-alpha.0"
+    chalk "^4.1.0"
+    figures "^3.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"
@@ -3076,7 +3149,7 @@
     supports-color "^5.4.0"
     tslib "^1"
 
-"@oclif/command@^1.5.10", "@oclif/command@^1.5.12":
+"@oclif/command@^1.5.10", "@oclif/command@^1.5.12", "@oclif/command@^1.8.0":
   version "1.8.0"
   resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.0.tgz#c1a499b10d26e9d1a611190a81005589accbb339"
   integrity sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==
@@ -3442,7 +3515,7 @@
     memoizee "^0.4.14"
     rxjs "^6.6.0"
 
-"@polkadot/api@1.26.1", "@polkadot/api@^1.26.1":
+"@polkadot/api@1.26.1", "@polkadot/api@^1.26.1", "@polkadot/api@^2.10.1":
   version "1.26.1"
   resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-1.26.1.tgz#215268489c10b1a65429c6ce451c8d65bd3ad843"
   integrity sha512-al8nmLgIU1EKo0oROEgw1mqUvrHJu4gKYBwnFONaEOxHSxBgBSSgNy1MWKNntAQYDKA4ETCj4pz7ZpMXTx2SDA==
@@ -3663,7 +3736,7 @@
     "@polkadot/util" "^3.0.1"
     bn.js "^5.1.2"
 
-"@polkadot/types@1.26.1", "@polkadot/types@^1.26.1":
+"@polkadot/types@1.26.1", "@polkadot/types@^1.26.1", "@polkadot/types@~2.10.2-7":
   version "1.26.1"
   resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-1.26.1.tgz#e58a823da22bd526b298f7d42384bf59b8994fad"
   integrity sha512-mrA3+qYyDvfOIOMkY8lg2ziCYpwOl3N1LUxKdiyBDtKM7Dl8ZWQ0nLUCDW5MhbzDlThmYjE4feBRA+2eBShfyA==
@@ -4676,11 +4749,6 @@
   resolved "https://registry.yarnpkg.com/@types/faker/-/faker-4.1.12.tgz#065d37343677df1aa757c622650bd14666c42602"
   integrity sha512-0MEyzJrLLs1WaOCx9ULK6FzdCSj2EuxdSP9kvuxxdBEGujZYUOZ4vkPXdgu3dhyg/pOdn7VCatelYX7k0YShlA==
 
-"@types/figlet@^1.2.0":
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/@types/figlet/-/figlet-1.2.1.tgz#ae3ba62ae70fc2aa10ac76b42541a99680b080a1"
-  integrity sha512-uw+Xmam7sMFHYyVGq5CGH/6Lu0T792bf4T6+jPFtPkWnJ9YVjLKqOLzF7DHuSo/LEHtLWleUO7Zi7EKkg6rSIg==
-
 "@types/file-saver@^2.0.1":
   version "2.0.1"
   resolved "https://registry.yarnpkg.com/@types/file-saver/-/file-saver-2.0.1.tgz#e18eb8b069e442f7b956d313f4fadd3ef887354e"
@@ -6830,6 +6898,11 @@ argparse@^1.0.10, argparse@^1.0.7:
   dependencies:
     sprintf-js "~1.0.2"
 
+argparse@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+  integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
 arr-diff@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
@@ -7876,7 +7949,7 @@ bluebird@^3.1.1, bluebird@^3.3.5, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.
   resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
   integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
 
-bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3:
+bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^5.1.2, bn.js@^5.1.3:
   version "5.1.2"
   resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.2.tgz#c9686902d3c9a27729f43ab10f9d79c2004da7b0"
   integrity sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==
@@ -8747,6 +8820,13 @@ check-error@^1.0.2:
   resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
   integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=
 
+check-type@^0.4.11:
+  version "0.4.11"
+  resolved "https://registry.yarnpkg.com/check-type/-/check-type-0.4.11.tgz#abe3f534a51d31f5ce5726347bb74c0d0f910ccf"
+  integrity sha1-q+P1NKUdMfXOVyY0e7dMDQ+RDM8=
+  dependencies:
+    underscore "1.6.0"
+
 chokidar@3.4.3:
   version "3.4.3"
   resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b"
@@ -9050,18 +9130,6 @@ cli-highlight@^2.1.10:
     parse5-htmlparser2-tree-adapter "^6.0.0"
     yargs "^16.0.0"
 
-cli-highlight@^2.1.4:
-  version "2.1.4"
-  resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.4.tgz#098cb642cf17f42adc1c1145e07f960ec4d7522b"
-  integrity sha512-s7Zofobm20qriqDoU9sXptQx0t2R9PEgac92mENNm7xaEe1hn71IIMsXMK+6encA6WRCWWxIGQbipr3q998tlQ==
-  dependencies:
-    chalk "^3.0.0"
-    highlight.js "^9.6.0"
-    mz "^2.4.0"
-    parse5 "^5.1.1"
-    parse5-htmlparser2-tree-adapter "^5.1.1"
-    yargs "^15.0.0"
-
 cli-progress@^3.4.0:
   version "3.8.2"
   resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-3.8.2.tgz#abaf1fc6d6401351f16f068117a410554a0eb8c7"
@@ -9189,6 +9257,11 @@ cli-width@^2.0.0:
   resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
   integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
 
+cli-width@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
+  integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
+
 clipboard@^2.0.0:
   version "2.0.4"
   resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.4.tgz#836dafd66cf0fea5d71ce5d5b0bf6e958009112d"
@@ -10497,16 +10570,6 @@ date-fns@^2.0.1:
   resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.15.0.tgz#424de6b3778e4e69d3ff27046ec136af58ae5d5f"
   integrity sha512-ZCPzAMJZn3rNUvvQIMlXhDr4A+Ar07eLeGsGREoWU19a3Pqf5oYa+ccd+B3F6XVtQY6HANMFdOQ8A+ipFnvJdQ==
 
-date-format@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf"
-  integrity sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==
-
-date-format@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/date-format/-/date-format-3.0.0.tgz#eb8780365c7d2b1511078fb491e6479780f3ad95"
-  integrity sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==
-
 dateformat@^3.0.0, dateformat@^3.0.2:
   version "3.0.3"
   resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
@@ -10551,7 +10614,7 @@ debug@3.1.0, debug@=3.1.0, debug@~3.1.0:
   dependencies:
     ms "2.0.0"
 
-debug@4.2.0, debug@^4.2.0:
+debug@4.2.0:
   version "4.2.0"
   resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
   integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
@@ -10565,6 +10628,13 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
   dependencies:
     ms "^2.1.1"
 
+debug@^4.3.1:
+  version "4.3.1"
+  resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
+  integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
+  dependencies:
+    ms "2.1.2"
+
 debuglog@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
@@ -10760,6 +10830,11 @@ del@^4.1.1:
     pify "^4.0.1"
     rimraf "^2.6.3"
 
+delay@^5.0.0:
+  version "5.0.0"
+  resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d"
+  integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==
+
 delayed-stream@~1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
@@ -11314,7 +11389,7 @@ dotenv@^6.2.0:
   resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064"
   integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==
 
-dotenvi@^0.9.0, dotenvi@^0.9.1:
+dotenvi@^0.9.0:
   version "0.9.1"
   resolved "https://registry.yarnpkg.com/dotenvi/-/dotenvi-0.9.1.tgz#e280012ee9d201a0c57cb1f6e43559603b6f0fb4"
   integrity sha512-gM9HKu6P8BS+jBQRcJRdWKkbIA35Ztszr2FEqp1oKYLMfdTWDumLNi9xlIeEAFc2C4DeOwsYcNi+mMl5OWGtcw==
@@ -11678,6 +11753,16 @@ env-paths@^2.2.0:
   resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43"
   integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==
 
+envalid@^6.0.2:
+  version "6.0.2"
+  resolved "https://registry.yarnpkg.com/envalid/-/envalid-6.0.2.tgz#7139770e089acc945c0e47b5075d72915d8683e8"
+  integrity sha512-ChJb9a5rjwZ/NkcXfBrzEl5cFZaGLg38N7MlWJkv5qsmSypX2WJe28LkoAWcklC60nKZXYKRlBbsjuJSjYw0Xg==
+  dependencies:
+    chalk "^3.0.0"
+    dotenv "^8.2.0"
+    meant "^1.0.1"
+    validator "^13.0.0"
+
 envify@^3.4.0:
   version "3.4.1"
   resolved "https://registry.yarnpkg.com/envify/-/envify-3.4.1.tgz#d7122329e8df1688ba771b12501917c9ce5cbce8"
@@ -12915,7 +13000,7 @@ figgy-pudding@^3.4.1, figgy-pudding@^3.5.1:
   resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
   integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==
 
-figlet@^1.1.1, figlet@^1.4.0:
+figlet@^1.1.1:
   version "1.5.0"
   resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.0.tgz#2db4d00a584e5155a96080632db919213c3e003c"
   integrity sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww==
@@ -13244,11 +13329,6 @@ flatted@^2.0.0:
   resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
   integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
 
-flatted@^2.0.1:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
-  integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
-
 flatten@^1.0.2:
   version "1.0.3"
   resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b"
@@ -14715,7 +14795,7 @@ highlight.js@^10.0.0:
   resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.1.2.tgz#c20db951ba1c22c055010648dfffd7b2a968e00c"
   integrity sha512-Q39v/Mn5mfBlMff9r+zzA+gWxRsCRKwEMvYTiisLr/XUiFI/4puWt0Ojdko3R3JCNWGdOWaA5g/Yxqa23kC5AA==
 
-highlight.js@^9.3.0, highlight.js@^9.6.0:
+highlight.js@^9.3.0:
   version "9.18.3"
   resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.3.tgz#a1a0a2028d5e3149e2380f8a865ee8516703d634"
   integrity sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ==
@@ -18197,6 +18277,13 @@ js-yaml@^3.11.0, js-yaml@^3.13.1:
     argparse "^1.0.7"
     esprima "^4.0.0"
 
+js-yaml@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
+  integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==
+  dependencies:
+    argparse "^2.0.1"
+
 jsbn@~0.1.0:
   version "0.1.1"
   resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
@@ -19312,17 +19399,6 @@ log-update@^2.3.0:
     cli-cursor "^2.0.0"
     wrap-ansi "^3.0.1"
 
-log4js@^6.2.1:
-  version "6.3.0"
-  resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.3.0.tgz#10dfafbb434351a3e30277a00b9879446f715bcb"
-  integrity sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==
-  dependencies:
-    date-format "^3.0.0"
-    debug "^4.1.1"
-    flatted "^2.0.1"
-    rfdc "^1.1.4"
-    streamroller "^2.2.4"
-
 loglevel@^1.6.7:
   version "1.7.0"
   resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0"
@@ -19742,6 +19818,11 @@ mdurl@^1.0.1:
   resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
   integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=
 
+meant@^1.0.1:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.3.tgz#67769af9de1d158773e928ae82c456114903554c"
+  integrity sha512-88ZRGcNxAq4EH38cQ4D85PM57pikCwS8Z99EWHODxN7KBY+UuPiqzRTtZzS8KTXO/ywSWbdjjJST2Hly/EQxLw==
+
 media-typer@0.3.0:
   version "0.3.0"
   resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -20609,7 +20690,7 @@ mute-stream@0.0.7:
   resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
   integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
 
-mute-stream@0.0.8, mute-stream@~0.0.4:
+mute-stream@0.0.8, mute-stream@^0.0.8, mute-stream@~0.0.4:
   version "0.0.8"
   resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
   integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
@@ -21926,6 +22007,13 @@ p-retry@^3.0.1:
   dependencies:
     retry "^0.12.0"
 
+p-timeout@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
+  integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
+  dependencies:
+    p-finally "^1.0.0"
+
 p-try@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
@@ -21936,6 +22024,13 @@ p-try@^2.0.0:
   resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
   integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
 
+p-wait-for@^3.2.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/p-wait-for/-/p-wait-for-3.2.0.tgz#640429bcabf3b0dd9f492c31539c5718cb6a3f1f"
+  integrity sha512-wpgERjNkLrBiFmkMEjuZJEWKKDrNfHCKA1OhyN1wg1FrLkULbviEy6py1AyJUgZ72YWFbZ38FIpnqvVqAlDUwA==
+  dependencies:
+    p-timeout "^3.0.0"
+
 p-waterfall@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00"
@@ -22138,13 +22233,6 @@ parse-url@^5.0.0:
     parse-path "^4.0.0"
     protocols "^1.4.0"
 
-parse5-htmlparser2-tree-adapter@^5.1.1:
-  version "5.1.1"
-  resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-5.1.1.tgz#e8c743d4e92194d5293ecde2b08be31e67461cbc"
-  integrity sha512-CF+TKjXqoqyDwHqBhFQ+3l5t83xYi6fVT1tQNg+Ye0JRLnTxWvIroCjEp1A0k4lneHNBGnICUf0cfYVYGEazqw==
-  dependencies:
-    parse5 "^5.1.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"
@@ -22285,14 +22373,6 @@ path-type@^4.0.0:
   resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
   integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
 
-path@^0.12.7:
-  version "0.12.7"
-  resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f"
-  integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=
-  dependencies:
-    process "^0.11.1"
-    util "^0.10.3"
-
 pathval@^1.1.0:
   version "1.1.0"
   resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
@@ -22362,11 +22442,6 @@ pg-connection-string@0.1.3, pg-connection-string@^0.1.3:
   resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-0.1.3.tgz#da1847b20940e42ee1492beaf65d49d91b245df7"
   integrity sha1-2hhHsglA5C7hSSvq9l1J2RskXfc=
 
-pg-connection-string@^2.4.0:
-  version "2.4.0"
-  resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.4.0.tgz#c979922eb47832999a204da5dbe1ebf2341b6a10"
-  integrity sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==
-
 pg-int8@1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c"
@@ -22390,16 +22465,6 @@ pg-pool@^2.0.10:
   resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-2.0.10.tgz#842ee23b04e86824ce9d786430f8365082d81c4a"
   integrity sha512-qdwzY92bHf3nwzIUcj+zJ0Qo5lpG/YxchahxIN8+ZVmXqkahKXsnl2aiJPHLYN9o5mB/leG+Xh6XKxtP7e0sjg==
 
-pg-pool@^3.2.2:
-  version "3.2.2"
-  resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.2.2.tgz#a560e433443ed4ad946b84d774b3f22452694dff"
-  integrity sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==
-
-pg-protocol@^1.4.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.4.0.tgz#43a71a92f6fe3ac559952555aa3335c8cb4908be"
-  integrity sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==
-
 pg-types@1.*:
   version "1.13.0"
   resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-1.13.0.tgz#75f490b8a8abf75f1386ef5ec4455ecf6b345c63"
@@ -22450,19 +22515,6 @@ pg@^7.12.1:
     pgpass "1.x"
     semver "4.3.2"
 
-pg@^8.0.3:
-  version "8.5.1"
-  resolved "https://registry.yarnpkg.com/pg/-/pg-8.5.1.tgz#34dcb15f6db4a29c702bf5031ef2e1e25a06a120"
-  integrity sha512-9wm3yX9lCfjvA98ybCyw2pADUivyNWT/yIP4ZcDVpMN0og70BUWYEGXPCTAQdGTAqnytfRADb7NERrY1qxhIqw==
-  dependencies:
-    buffer-writer "2.0.0"
-    packet-reader "1.0.0"
-    pg-connection-string "^2.4.0"
-    pg-pool "^3.2.2"
-    pg-protocol "^1.4.0"
-    pg-types "^2.1.0"
-    pgpass "1.x"
-
 pgpass@1.*, pgpass@1.x:
   version "1.0.4"
   resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.4.tgz#85eb93a83800b20f8057a2b029bf05abaf94ea9c"
@@ -23272,7 +23324,7 @@ process-nextick-args@~1.0.6:
   resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
   integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=
 
-process@^0.11.1, process@^0.11.10:
+process@^0.11.10:
   version "0.11.10"
   resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
   integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
@@ -25159,11 +25211,6 @@ reusify@^1.0.0:
   resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
   integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
 
-rfdc@^1.1.4:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.2.0.tgz#9e9894258f48f284b43c3143c68070a4f373b949"
-  integrity sha512-ijLyszTMmUrXvjSooucVQwimGUk84eRcmCuLV8Xghe3UO85mjUtRAHRyoMM6XtyqbECaXuBWx18La3523sXINA==
-
 rgb-regex@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1"
@@ -25249,7 +25296,7 @@ run-async@^2.2.0:
   dependencies:
     is-promise "^2.1.0"
 
-run-async@^2.4.0:
+run-async@^2.3.0, run-async@^2.4.0:
   version "2.4.1"
   resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
   integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
@@ -25579,6 +25626,13 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
   resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
   integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
 
+semver@^7.3.4:
+  version "7.3.4"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
+  integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
+  dependencies:
+    lru-cache "^6.0.0"
+
 semver@~5.3.0:
   version "5.3.0"
   resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@@ -26466,15 +26520,6 @@ stream-to-pull-stream@^1.7.2:
     looper "^3.0.0"
     pull-stream "^3.2.3"
 
-streamroller@^2.2.4:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-2.2.4.tgz#c198ced42db94086a6193608187ce80a5f2b0e53"
-  integrity sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==
-  dependencies:
-    date-format "^2.1.0"
-    debug "^4.1.1"
-    fs-extra "^8.1.0"
-
 streamsearch@0.1.2:
   version "0.1.2"
   resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a"
@@ -27766,7 +27811,7 @@ ts-log@^2.1.4:
   resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.1.4.tgz#063c5ad1cbab5d49d258d18015963489fb6fb59a"
   integrity sha512-P1EJSoyV+N3bR/IWFeAqXzKPZwHpnLY6j7j58mAvewHRipo+BQM2Y1f9Y9BjEQznKwgqqZm7H8iuixmssU7tYQ==
 
-ts-node-dev@^1.0.0-pre.40, ts-node-dev@^1.0.0-pre.60:
+ts-node-dev@^1.0.0-pre.60:
   version "1.1.6"
   resolved "https://registry.yarnpkg.com/ts-node-dev/-/ts-node-dev-1.1.6.tgz#ee2113718cb5a92c1c8f4229123ad6afbeba01f8"
   integrity sha512-RTUi7mHMNQospArGz07KiraQcdgUVNXKsgO2HAi7FoiyPMdTDqdniB6K1dqyaIxT7c9v/VpSbfBZPS6uVpaFLQ==
@@ -28076,29 +28121,7 @@ typeorm-typedi-extensions@^0.2.3:
   resolved "https://registry.yarnpkg.com/typeorm-typedi-extensions/-/typeorm-typedi-extensions-0.2.3.tgz#94fca2656206d771bf6d2242f5aab570511188e8"
   integrity sha512-T9i1NvRZNjPn9Jb8oT772ihfn6PwdqDVpzPCtKSqjkZGOgXrCkdyD3dDrzfMaoWJ1afU58bVx2CMb95FzT42Ow==
 
-typeorm@^0.2.25:
-  version "0.2.29"
-  resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.29.tgz#401289dc91900d72eccb26e31cdb7f0591a2272e"
-  integrity sha512-ih1vrTe3gEAGKRcWlcsTRxTL7gNjacQE498wVGuJ3ZRujtMqPZlbAWuC7xDzWCRjQnkZYNwZQeG9UgKfxSHB5g==
-  dependencies:
-    "@sqltools/formatter" "1.2.2"
-    app-root-path "^3.0.0"
-    buffer "^5.5.0"
-    chalk "^4.1.0"
-    cli-highlight "^2.1.4"
-    debug "^4.1.1"
-    dotenv "^8.2.0"
-    glob "^7.1.6"
-    js-yaml "^3.14.0"
-    mkdirp "^1.0.4"
-    reflect-metadata "^0.1.13"
-    sha.js "^2.4.11"
-    tslib "^1.13.0"
-    xml2js "^0.4.23"
-    yargonaut "^1.1.2"
-    yargs "^16.0.3"
-
-typeorm@^0.2.30:
+typeorm@^0.2.25, typeorm@^0.2.31:
   version "0.2.31"
   resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.31.tgz#82b8a1b233224f81c738f53b0380386ccf360917"
   integrity sha512-dVvCEVHH48DG0QPXAKfo0l6ecQrl3A8ucGP4Yw4myz4YEDMProebTQo8as83uyES+nrwCbu3qdkL4ncC2+qcMA==
@@ -28128,7 +28151,7 @@ typescript-formatter@^7.2.2:
     commandpost "^1.0.0"
     editorconfig "^0.15.0"
 
-typescript@3.5.2, typescript@^3.0.3, typescript@^3.7.2, typescript@^3.7.5, typescript@^3.8.3, typescript@^3.9.5, typescript@^3.9.6, typescript@^3.9.7, typescript@^4.1.3:
+typescript@^3.0.3, typescript@^3.7.2, typescript@^3.7.5, typescript@^3.8, typescript@^3.8.3, typescript@^3.9.5, typescript@^3.9.6, typescript@^3.9.7, typescript@^4.1.3:
   version "3.9.7"
   resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
   integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
@@ -28197,6 +28220,11 @@ undefsafe@^2.0.2:
   dependencies:
     debug "^2.2.0"
 
+underscore@1.6.0:
+  version "1.6.0"
+  resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
+  integrity sha1-izixDKze9jM3uLJOT/htRa6lKag=
+
 unfetch@^4.1.0:
   version "4.1.0"
   resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db"
@@ -28787,6 +28815,11 @@ validator@13.0.0:
   resolved "https://registry.yarnpkg.com/validator/-/validator-13.0.0.tgz#0fb6c6bb5218ea23d368a8347e6d0f5a70e3bcab"
   integrity sha512-anYx5fURbgF04lQV18nEQWZ/3wHGnxiKdG4aL8J+jEDsm98n/sU/bey+tYk6tnGJzm7ioh5FoqrAiQ6m03IgaA==
 
+validator@^13.0.0:
+  version "13.5.2"
+  resolved "https://registry.yarnpkg.com/validator/-/validator-13.5.2.tgz#c97ae63ed4224999fb6f42c91eaca9567fe69a46"
+  integrity sha512-mD45p0rvHVBlY2Zuy3F3ESIe1h5X58GPfAtslBjY7EtTqGquZTj+VX/J4RnHWN8FKq0C9WRVt1oWAcytWRuYLQ==
+
 value-equal@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c"
@@ -29083,9 +29116,10 @@ warning@^4.0.2, warning@^4.0.3:
   dependencies:
     loose-envify "^1.0.0"
 
-"warthog@https://github.com/metmirr/warthog/releases/download/v2.22.0/warthog-v2.22.0.tgz":
-  version "2.22.0"
-  resolved "https://github.com/metmirr/warthog/releases/download/v2.22.0/warthog-v2.22.0.tgz#33162a65e2897c79f9b5c6c214565e85685108d3"
+"warthog@https://github.com/metmirr/warthog/releases/download/v2.23.0/warthog-v2.23.0.tgz":
+  version "2.23.0"
+  uid "4582fc35554580e0af0f43a9b3725aad2eb808c6"
+  resolved "https://github.com/metmirr/warthog/releases/download/v2.23.0/warthog-v2.23.0.tgz#4582fc35554580e0af0f43a9b3725aad2eb808c6"
   dependencies:
     "@types/app-root-path" "^1.2.4"
     "@types/bn.js" "^4.11.6"
@@ -29866,6 +29900,15 @@ yallist@^4.0.0:
   resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
   integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
 
+yaml-validator@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/yaml-validator/-/yaml-validator-3.0.1.tgz#9fb47251a003b22765fc562926a33901670aa944"
+  integrity sha512-6mLR0UJ8P044TkgUYQyGbNXCUE/Ic5sY5qjy+5T1a/l5ur8tQe8n6MMtASuNvLwq1C2GFS/cD7l5iuGHHX2U0g==
+  dependencies:
+    check-type "^0.4.11"
+    js-yaml "^4.0.0"
+    optionator "^0.9.1"
+
 yaml@^1.10.0:
   version "1.10.0"
   resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
@@ -30057,7 +30100,7 @@ yargs@^14.2.2:
     y18n "^4.0.0"
     yargs-parser "^15.0.0"
 
-yargs@^15.0.0, yargs@^15.0.1, yargs@^15.3.1, yargs@^15.4.1:
+yargs@^15.0.1, yargs@^15.3.1, yargs@^15.4.1:
   version "15.4.1"
   resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
   integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==