diff --git a/.env.example b/.env.example index abd1a0c9a..65628e846 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ DB_NAME=db DATABASE_URL=postgresql://granola:systems@127.0.0.1:5432/db # [REQUIRED] - the connection URL for the archive database. -# ARCHIVE_DATABASE_URL=postgresql://granola:systems@127.0.0.1:5432/db +ARCHIVE_DATABASE_URL=postgresql://granola:systems@127.0.0.1:5432/db # [REQUIRED] - origins allowed to make cross-site requests. # Use "*" to allow from anywhere. diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml deleted file mode 100644 index 65dc9a198..000000000 --- a/.github/workflows/server.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: server - -on: - push: - branches: ['main'] - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -defaults: - run: - working-directory: server - -jobs: - ci: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - - - name: Install just - uses: extractions/setup-just@v1 - with: - just-version: 1.13 - - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - - name: lint-server - working-directory: ./server - run: just lint-server - - - name: build and test - working-directory: ./server - run: just build-server diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml deleted file mode 100644 index 4f339f483..000000000 --- a/.github/workflows/web.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: web - -on: - push: - branches: ['main'] - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - SKIP_ENV_VALIDATION: 1 - -jobs: - ci: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: ['18.x'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - uses: pnpm/action-setup@v2 - name: Install pnpm - id: pnpm-install - with: - version: ^8.6.0 - run_install: false - - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - working-directory: ./web - run: pnpm install - - - name: Run TSC - working-directory: ./web - run: pnpm ts-lint - - - name: Run lint - working-directory: ./web - run: pnpm lint - - - name: Run tests (Jest) - working-directory: ./web - run: pnpm test - - - name: Run build - working-directory: ./web - run: pnpm build diff --git a/Justfile b/Justfile index 3152b89da..4e47a36bf 100644 --- a/Justfile +++ b/Justfile @@ -3,22 +3,10 @@ # The command 'just' will give usage information. # See https://github.com/casey/just for more. -# Default build target. Shows menu of targets which user runs 'just'. -# default: @just --list --justfile {{justfile()}} -# Variables -# -DB_HOST := env_var_or_default('DB_HOST', "127.0.0.1") -DB_PORT := env_var_or_default('DB_PORT', "5432") -DB_NAME := env_var_or_default('DB_NAME', "db") -DB_USER := env_var_or_default('DB_USER', "granola") -DB_PASS := env_var_or_default('DB_PASS', "systems") -DATABASE_URL := env_var_or_default( - 'DATABASE_URL', - "postgresql://" + DB_USER + ":" + DB_PASS + "@" + DB_HOST + ":" + DB_PORT + "/" + DB_NAME) -container_log_dir := `mktemp -d "${TMPDIR:-/tmp}"/container-logs-XXX` +set dotenv-load # # Targets @@ -67,17 +55,7 @@ build-server: lint-server test: test-web -test-web: test-server launch-web - -test-server: launch-server - sleep 10 # Wait for server to launch. - curl http://127.0.0.1:8080/api/info | grep 'chain_tip' - grep DEBUG {{ container_log_dir }}/server.err # Ensure DEBUG info being logged. - curl http://127.0.0.1:8080/api/proposals \ - | grep 'jw8dXuUqXVgd6NvmpryGmFLnRv1176oozHAro8gMFwj8yuvhBeS' - grep "status.*200.*/api/proposals" {{ container_log_dir }}/server.err - curl http://127.0.0.1:8080/api/proposal/4/results | grep 'MIP4' - grep "status.*200.*/api/proposal/4/result" {{ container_log_dir }}/server.err +test-web: destroy-all launch-web && destroy-all lint: lint-web lint-server @@ -97,107 +75,58 @@ lint-server: install-server image-build: image-build-web image-build-server # Build the container image for 'web' -[macos] image-build-web: clean-web docker build -t mina-ocv-web ./web -# Build the container image for 'web' -[linux] -image-build-web: clean-web - podman build -t mina-ocv-web ./web - # Build the container image for 'server' -[macos] image-build-server: clean-server docker build -t mina-ocv-server ./server -# Build the container image for 'server' -[linux] -image-build-server: clean-server - podman build -t mina-ocv-server ./server - -[macos] -destroy-db: - docker-compose --profile=db down - -[linux] destroy-db: - -podman stop db - -podman container rm db + docker-compose down db -[macos] destroy-server: - docker-compose --profile=server-db down - -[linux] -destroy-server: - -podman stop server - -podman container rm server - -[macos] -destroy-web: - docker-compose --profile=all down + docker-compose down server -[linux] destroy-web: - -podman stop web - -podman container rm web + docker-compose down web # Stop and destroy all known containers. -destroy-all: destroy-db destroy-server destroy-web - -# Run the database container with migrations applied. -[linux] -launch-db: destroy-db - podman run \ - --name db \ - -e POSTGRES_DB={{ DB_NAME }} \ - -e POSTGRES_USER={{ DB_USER }} \ - -e POSTGRES_PASSWORD={{ DB_PASS }} \ - -e DATABASE_URL={{ DATABASE_URL }} \ - --expose {{ DB_PORT }} \ - --network host \ - postgres:15.2 \ - > {{ container_log_dir }}/db.out \ - 2> {{ container_log_dir }}/db.err & - sleep 2 - cd server && \ - DATABASE_URL={{ DATABASE_URL }} diesel migration run - - # Running 'diesel migration run' actually makes changes to the source files! - # WTF! This undoes that change. - git restore -- server/src/schema.rs - -[macos] -launch-server: destroy-server image-build-server - docker-compose --profile=server-db up \ - > {{ container_log_dir }}/server.out \ - 2> {{ container_log_dir }}/server.err & - -[linux] -launch-server: destroy-server image-build-server launch-db - podman run \ - --name server \ - --env-file .env \ - --expose 8080 \ - --network host \ - localhost/mina-ocv-server:latest \ - > {{ container_log_dir }}/server.out \ - 2> {{ container_log_dir }}/server.err & - -[macos] -launch-web: destroy-all image-build-server image-build-web - docker-compose --profile=all up \ - > {{ container_log_dir }}/web.out \ - 2> {{ container_log_dir }}/web.err & - -[linux] -launch-web: destroy-all image-build-web launch-server - podman run \ - --name web \ - --env-file .env \ - --expose 3000 \ - --network host \ - localhost/mina-ocv-web:latest \ - > {{ container_log_dir }}/web.out \ - 2> {{ container_log_dir }}/web.err & +destroy-all: + docker-compose down + docker network prune -f + +launch-db: + docker-compose up -d db + +test-db: destroy-all launch-db && destroy-all + # Wait for the container to attach to the port. + sleep 5 + # Wait for up to 1 minute for the database instance to be ready. + pg_isready \ + -h "$DB_HOST" \ + -p "$DB_PORT" \ + -d "$DB_NAME" \ + -U "$DB_USER" \ + -t 60 + docker-compose logs db \ + | grep "database system is ready to accept connections" + +launch-server: + docker-compose up -d server + +test-server: destroy-all launch-server && destroy-all + sleep 20 # Wait for server to launch. + curl http://127.0.0.1:8080/api/info | grep 'chain_tip' + docker-compose logs server 2>&1 \ + | grep DEBUG # Ensure DEBUG info being logged. + curl http://127.0.0.1:8080/api/proposals \ + | grep 'jw8dXuUqXVgd6NvmpryGmFLnRv1176oozHAro8gMFwj8yuvhBeS' + docker-compose logs server 2>&1 \ + | grep "status.*200.*/api/proposals" + curl http://127.0.0.1:8080/api/proposal/4/results | grep 'MIP4' + docker-compose logs server 2>&1 \ + | grep "status.*200.*/api/proposal/4/result" + +launch-web: + docker-compose up -d web diff --git a/README.md b/README.md index ad3e001ed..a08a9e37b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build status](https://badge.buildkite.com/521caf4796d8f12a30ce6ca712f917715db81be9bbc265b6df.svg)](https://buildkite.com/granola/mina-on-chain-voting) + # Mina On-Chain Voting On-Chain Voting is a protocol developed to help with governing the Mina L1 diff --git a/docker-compose.yaml b/docker-compose.yaml index ea874d9ee..ecb6705d1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,11 +1,11 @@ version: '3.8' +networks: + mina-ocv: + name: "mina-ocv${BUILDKITE_BUILD_NUMBER-}" services: web: container_name: web - profiles: ['all', 'web'] - build: - context: ./web - dockerfile: Dockerfile + image: mina-ocv-web:latest env_file: .env environment: - API_BASE_URL=http://server:8080 @@ -13,26 +13,32 @@ services: - RELEASE_STAGE=production ports: - 3000:3000 + networks: + - mina-ocv + depends_on: + - db + - server server: container_name: server - profiles: ['all', 'server-db', 'server'] - build: - context: ./server - dockerfile: Dockerfile + image: mina-ocv-server:latest env_file: .env environment: - DB_HOST=db - DATABASE_URL=postgresql://granola:systems@db:5432/db ports: - 8080:8080 + networks: + - mina-ocv depends_on: - db db: container_name: postgres - profiles: ['all', 'server-db', 'db'] image: postgres:15.2 + env_file: .env ports: - 5432:5432 + networks: + - mina-ocv environment: POSTGRES_USER: granola POSTGRES_PASSWORD: systems diff --git a/ops/buildkite-pipeline.yaml b/ops/buildkite-pipeline.yaml index 63a7755c1..a9dafb49c 100644 --- a/ops/buildkite-pipeline.yaml +++ b/ops/buildkite-pipeline.yaml @@ -1,53 +1,49 @@ steps: - - label: "Prereqs" - command: | - . /etc/profile - echo $PATH - nix-shell ops/shell.nix --run just - key: prereqs +- label: "Prereqs" + command: | + echo $HOME + echo $PATH + echo $TMPDIR + nix-shell ops/shell.nix --run just + key: prereqs - - label: "Build server" - command: | - . /etc/profile - nix-shell ops/shell.nix --run "just build-server" - key: build-server - depends_on: prereqs +- label: "Build server" + command: | + nix-shell ops/shell.nix --run "just build-server" + key: build-server + depends_on: prereqs - - label: "Build web" - command: | - . /etc/profile - nix-shell ops/shell.nix --run "just build-web" - key: build-web - depends_on: prereqs +- label: "Build web" + command: | + nix-shell ops/shell.nix --run "just build-web" + key: build-web + depends_on: prereqs - - label: "Build images" - command: | - . /etc/profile - nix-shell ops/shell.nix --run "just image-build" - key: build-images - depends_on: - - build-web - - build-server - agents: - podman: "true" +- label: "Build images" + command: | + nix-shell ops/shell.nix --run "just image-build" + key: build-images + depends_on: + - build-web + - build-server + agents: + podman: "true" -# - label: "Test containers" -# command: | -# . /etc/profile -# nix-shell ops/shell.nix --run "just launch-db && just destroy-db" -# key: test-containers -# depends_on: build-images -# agents: -# podman: "true" +- label: "Test db container" + command: | + cp .env.example .env + nix-shell ops/shell.nix --run "just test-db" + key: test-db-container + depends_on: build-images + agents: + podman: "true" # - label: "Test" # command: | # . /etc/profile # nix-shell ops/shell.nix --run "just test" # key: full-test -# depends_on: -# - build-images -# - test-containers +# depends_on: test-db-container # agents: # podman: "true" diff --git a/ops/shell.nix b/ops/shell.nix index 004267d0c..0b9c7a672 100644 --- a/ops/shell.nix +++ b/ops/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/261abe8a44a7e8392598d038d2e01f7b33cf26d0.tar.gz") {} +{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/2281c1ca636ae9164b00e33f01190a01895282fc.tar.gz") {} }: let @@ -13,6 +13,8 @@ let storageConf = pkgs.writeText "storage.conf" '' [storage] driver = "overlay" + graphRoot = "$HOME/containers/graphRoot" + runRoot = "$HOME/containers/runRoot" ''; in pkgs.writeScript "podman-setup" '' #!${pkgs.runtimeShell} @@ -27,6 +29,13 @@ let fi ''; + # Provides fake "docker" and "docker-compose" binaries. + dockerCompat = pkgs.runCommandNoCC "docker-podman-compat" {} '' + mkdir -p $out/bin + ln -s ${pkgs.podman}/bin/podman $out/bin/docker + ln -s ${pkgs.podman-compose}/bin/podman-compose $out/bin/docker-compose + ''; + in pkgs.mkShell { RUSTC_VERSION = pkgs.lib.readFile ../rust-toolchain; @@ -62,14 +71,13 @@ in pkgs.mkShell { pkgs.nodePackages.pnpm pkgs.openssl # Required for compiling. pkgs.pkg-config # Required for compiling. - pkgs.postgresql # Required for compiling against libpq. + pkgs.postgresql # Required for compiling against libpq, and for pg_isready. pkgs.rustup pkgs.skopeo ] ++ pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ - pkgs.runc # Container runtime - # pkgs.conmon # Container runtime monitor - pkgs.slirp4netns # User-mode networking for unprivileged namespaces - pkgs.podman # Required for testing with containers. + pkgs.podman # Required for testing with containers. + pkgs.podman-compose # Required for testing with containers. + dockerCompat ] ++ pkgs.lib.optionals (pkgs.stdenv.isDarwin) [ pkgs.darwin.apple_sdk.frameworks.Security pkgs.darwin.apple_sdk.frameworks.SystemConfiguration @@ -80,5 +88,6 @@ in pkgs.mkShell { export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/ # Install required configuration ${podmanSetupScript} + export TMPDIR=/var/tmp ''; } diff --git a/ops/test-all-just-targets b/ops/test-all-just-targets index 4d2b0b282..6879087d7 100755 --- a/ops/test-all-just-targets +++ b/ops/test-all-just-targets @@ -13,7 +13,7 @@ just image-build-web just image-build-server just clean-server just clean-web -just build-images +just image-build just install just install-server just install-web @@ -27,6 +27,7 @@ just build just launch-db || is_darwin just launch-server just clean +just test-db just test-server just test-web just test diff --git a/server/Cargo.lock b/server/Cargo.lock index be660265e..607584016 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -41,9 +41,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -119,13 +119,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -206,9 +206,9 @@ checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bigdecimal" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454bca3db10617b88b566f205ed190aedb0e0e6dd4cad61d3988a72e8c5594cb" +checksum = "c06619be423ea5bb86c95f087d5707942791a08a85530df0db2209a3ecfb8bc9" dependencies = [ "autocfg", "libm", @@ -225,9 +225,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -340,9 +340,9 @@ checksum = "ad152d03a2c813c80bb94fedbf3a3f02b28f793e39e7c214c8a0bcc196343de7" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -361,9 +361,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -427,7 +427,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -501,12 +501,12 @@ dependencies = [ [[package]] name = "diesel" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c8a2cb22327206568569e5a45bb5a2c946455efdd76e24d15b7e82171af95e" +checksum = "2268a214a6f118fce1838edba3d1561cf0e78d8de785475957a580a7f8c69d33" dependencies = [ "bigdecimal", - "bitflags 2.4.0", + "bitflags 2.4.1", "byteorder", "diesel_derives", "itoa", @@ -526,7 +526,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -538,7 +538,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -547,7 +547,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -570,25 +570,14 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "error-chain" version = "0.12.4" @@ -675,7 +664,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -914,27 +903,27 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "linux-raw-sys" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1112,9 +1101,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -1156,7 +1145,7 @@ version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -1173,7 +1162,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1212,13 +1201,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", "windows-targets", ] @@ -1246,7 +1235,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1293,9 +1282,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -1421,16 +1410,25 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "regex" -version = "1.9.6" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.9", - "regex-syntax 0.7.5", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -1444,13 +1442,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", ] [[package]] @@ -1461,9 +1459,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" @@ -1573,11 +1571,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.17" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", @@ -1660,31 +1658,31 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1826,9 +1824,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -1882,7 +1880,7 @@ checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "redox_syscall 0.3.5", "rustix", "windows-sys", ] @@ -1904,7 +1902,7 @@ checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1934,9 +1932,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -1959,7 +1957,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2017,7 +2015,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", @@ -2044,11 +2042,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -2057,20 +2054,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -2172,9 +2169,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom", ] @@ -2243,7 +2240,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -2277,7 +2274,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/web/package.json b/web/package.json index 7ad3d82c9..47be80b6f 100644 --- a/web/package.json +++ b/web/package.json @@ -36,12 +36,12 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "cmdk": "0.2.0", - "exceljs": "^4.3.0", + "exceljs": "^4.4.0", "file-saver": "^2.0.5", "moment": "^2.29.4", "next": "13.5.2", "next-themes": "0.2.1", - "nextjs-toploader": "1.4.2", + "nextjs-toploader": "1.6.4", "react": "18.2.0", "react-dom": "18.2.0", "react-wrap-balancer": "1.1.0", @@ -53,14 +53,14 @@ "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.5.1", "@types/file-saver": "^2.0.5", - "@types/jest": "29.5.5", + "@types/jest": "29.5.7", "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/parser": "5.62.0", "autoprefixer": "10.4.16", "cssnano": "6.0.1", "depcheck": "^1.4.6", "eslint": "~8.51.0", - "eslint-config-next": "13.5.4", + "eslint-config-next": "14.0.1", "eslint-config-prettier": "9.0.0", "eslint-plugin-simple-import-sort": "10.0.0", "eslint-plugin-storybook": "~0.6.15", @@ -72,7 +72,7 @@ "next-router-mock": "^0.9.10", "prettier": "^3.0.3", "tailwind-merge": "^1.14.0", - "tailwindcss": "3.3.3", + "tailwindcss": "3.3.5", "tailwindcss-animate": "^1.0.7", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index c53ada163..bbcbb4ace 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + dependencies: '@radix-ui/react-checkbox': specifier: ^1.0.4 @@ -56,8 +60,8 @@ dependencies: specifier: 0.2.0 version: 0.2.0(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) exceljs: - specifier: ^4.3.0 - version: 4.3.0 + specifier: ^4.4.0 + version: 4.4.0 file-saver: specifier: ^2.0.5 version: 2.0.5 @@ -71,8 +75,8 @@ dependencies: specifier: 0.2.1 version: 0.2.1(next@13.5.2)(react-dom@18.2.0)(react@18.2.0) nextjs-toploader: - specifier: 1.4.2 - version: 1.4.2(next@13.5.2)(react-dom@18.2.0)(react@18.2.0) + specifier: 1.6.4 + version: 1.6.4(next@13.5.2)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -103,8 +107,8 @@ devDependencies: specifier: ^2.0.5 version: 2.0.5 '@types/jest': - specifier: 29.5.5 - version: 29.5.5 + specifier: 29.5.7 + version: 29.5.7 '@typescript-eslint/eslint-plugin': specifier: 5.62.0 version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.51.0)(typescript@5.1.6) @@ -124,8 +128,8 @@ devDependencies: specifier: ~8.51.0 version: 8.51.0 eslint-config-next: - specifier: 13.5.4 - version: 13.5.4(eslint@8.51.0)(typescript@5.1.6) + specifier: 14.0.1 + version: 14.0.1(eslint@8.51.0)(typescript@5.1.6) eslint-config-prettier: specifier: 9.0.0 version: 9.0.0(eslint@8.51.0) @@ -160,11 +164,11 @@ devDependencies: specifier: ^1.14.0 version: 1.14.0 tailwindcss: - specifier: 3.3.3 - version: 3.3.3(ts-node@10.9.1) + specifier: 3.3.5 + version: 3.3.5(ts-node@10.9.1) tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.3.3) + version: 1.0.7(tailwindcss@3.3.5) ts-jest: specifier: ^29.1.1 version: 29.1.1(@babel/core@7.22.20)(jest@29.7.0)(typescript@5.1.6) @@ -918,8 +922,8 @@ packages: /@next/env@13.5.2: resolution: {integrity: sha512-dUseBIQVax+XtdJPzhwww4GetTjlkRSsXeQnisIJWBaHsnxYcN2RGzsPHi58D6qnkATjnhuAtQTJmR1hKYQQPg==} - /@next/eslint-plugin-next@13.5.4: - resolution: {integrity: sha512-vI94U+D7RNgX6XypSyjeFrOzxGlZyxOplU0dVE5norIfZGn/LDjJYPHdvdsR5vN1eRtl6PDAsOHmycFEOljK5A==} + /@next/eslint-plugin-next@14.0.1: + resolution: {integrity: sha512-bLjJMwXdzvhnQOnxvHoTTUh/+PYk6FF/DCgHi4BXwXCINer+o1ZYfL9aVeezj/oI7wqGJOqwGIXrlBvPbAId3w==} dependencies: glob: 7.1.7 dev: true @@ -2315,8 +2319,8 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true - /@types/jest@29.5.5: - resolution: {integrity: sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==} + /@types/jest@29.5.7: + resolution: {integrity: sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g==} dependencies: expect: 29.7.0 pretty-format: 29.7.0 @@ -2350,8 +2354,8 @@ packages: resolution: {integrity: sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==} dev: true - /@types/nprogress@0.2.0: - resolution: {integrity: sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==} + /@types/nprogress@0.2.2: + resolution: {integrity: sha512-2wLrSJXLztGmr7wXwM0hA/wuIOY9DznVdd+ZFofHOiXcj9JnVt+2ZeLRJ7v5ZVlmheSkUOSg3Q3O4Ce7yji79A==} dev: false /@types/parse-json@4.0.0: @@ -2387,7 +2391,7 @@ packages: /@types/testing-library__jest-dom@5.14.9: resolution: {integrity: sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==} dependencies: - '@types/jest': 29.5.5 + '@types/jest': 29.5.7 dev: true /@types/tough-cookie@4.0.3: @@ -4008,8 +4012,8 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-next@13.5.4(eslint@8.51.0)(typescript@5.1.6): - resolution: {integrity: sha512-FzQGIj4UEszRX7fcRSJK6L1LrDiVZvDFW320VVntVKh3BSU8Fb9kpaoxQx0cdFgf3MQXdeSbrCXJ/5Z/NndDkQ==} + /eslint-config-next@14.0.1(eslint@8.51.0)(typescript@5.1.6): + resolution: {integrity: sha512-QfIFK2WD39H4WOespjgf6PLv9Bpsd7KGGelCtmq4l67nGvnlsGpuvj0hIT+aIy6p5gKH+lAChYILsyDlxP52yg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -4017,7 +4021,7 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.5.4 + '@next/eslint-plugin-next': 14.0.1 '@rushstack/eslint-patch': 1.4.0 '@typescript-eslint/parser': 5.62.0(eslint@8.51.0)(typescript@5.1.6) eslint: 8.51.0 @@ -4362,8 +4366,8 @@ packages: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: false - /exceljs@4.3.0: - resolution: {integrity: sha512-hTAeo5b5TPvf8Z02I2sKIT4kSfCnOO2bCxYX8ABqODCdAjppI3gI9VYiGCQQYVcBaBSKlFDMKlAQRqC+kV9O8w==} + /exceljs@4.4.0: + resolution: {integrity: sha512-XctvKaEMaj1Ii9oDOqbW/6e1gXknSY4g/aLCDicOXqBE4M0nRWkUu0PTp++UPNzoFY12BNHMfs/VadKIS6llvg==} engines: {node: '>=8.3.0'} dependencies: archiver: 5.3.2 @@ -6109,14 +6113,14 @@ packages: - '@babel/core' - babel-plugin-macros - /nextjs-toploader@1.4.2(next@13.5.2)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-FS5+zCdNHLq0YA+SijkbDifOMFNayKfxkCLTiM6TIrvSaf6kAzCGlNjwgVpoG3zpampVMQSVf5L/jrWFJgs23g==} + /nextjs-toploader@1.6.4(next@13.5.2)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-KYLQ+0MvGdFk9JwOQfRtaYBAsyuX67Ca5QTa51RGNO4gQx64KLSE+ryHjUQ5LcDczHotp0l32GgksQW9vucUkw==} peerDependencies: next: '>= 6.0.0' react: '>= 16.0.0' react-dom: '>= 16.0.0' dependencies: - '@types/nprogress': 0.2.0 + '@types/nprogress': 0.2.2 next: 13.5.2(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0) nprogress: 0.2.0 prop-types: 15.8.1 @@ -7505,16 +7509,16 @@ packages: resolution: {integrity: sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==} dev: true - /tailwindcss-animate@1.0.7(tailwindcss@3.3.3): + /tailwindcss-animate@1.0.7(tailwindcss@3.3.5): resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} peerDependencies: tailwindcss: '>=3.0.0 || insiders' dependencies: - tailwindcss: 3.3.3(ts-node@10.9.1) + tailwindcss: 3.3.5(ts-node@10.9.1) dev: true - /tailwindcss@3.3.3(ts-node@10.9.1): - resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} + /tailwindcss@3.3.5(ts-node@10.9.1): + resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==} engines: {node: '>=14.0.0'} hasBin: true dependencies: @@ -8158,7 +8162,3 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: false - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false