diff --git a/.github/actions/setup-and-build/action.yml b/.github/actions/setup-and-build/action.yml index 934fcd298c..72212df906 100644 --- a/.github/actions/setup-and-build/action.yml +++ b/.github/actions/setup-and-build/action.yml @@ -26,6 +26,11 @@ runs: path: .local key: ${{ runner.os }}-local-${{ hashFiles('**/install.sh') }} + - name: Install redis + uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: "7.x" + - name: Install dependencies shell: bash run: | @@ -36,28 +41,28 @@ runs: fi source ./scripts/devenv.sh - - name: Setup pnpm - uses: pnpm/action-setup@v2.4.0 - with: - version: 8 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install pnpm dependencies - shell: bash - run: pnpm install +# - name: Setup pnpm +# uses: pnpm/action-setup@v2.4.0 +# with: +# version: 8 +# run_install: false +# +# - name: Get pnpm store directory +# shell: bash +# run: | +# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV +# +# - uses: actions/cache@v3 +# name: Setup pnpm cache +# with: +# path: ${{ env.STORE_PATH }} +# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} +# restore-keys: | +# ${{ runner.os }}-pnpm- +# +# - name: Install pnpm dependencies +# shell: bash +# run: pnpm install - name: Build and prepare for tests shell: bash @@ -65,4 +70,3 @@ runs: source ./scripts/devenv.sh mkdir -p /home/runner/.config/solana/ solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json - npx nx build @lightprotocol/cli diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..ebe3238f44 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.number || github.ref }} +# cancel-in-progress: true + +jobs: + lint-build-test: + name: Nx Cloud - Main Job + permissions: + contents: 'read' + actions: 'read' + uses: ./.github/workflows/nx-main.yml + with: + working-directory: "." + pnpm-version: "8.8.0" + parallel-commands-on-agents: | + npx nx affected --target=lint --parallel=1 + npx nx affected --target=build --parallel=1 + npx nx affected --target=test --parallel=1 + + agents: + name: Nx Cloud - Agents + uses: ./.github/workflows/nx-agents.yml + with: + working-directory: "." + pnpm-version: "8.8.0" + number-of-agents: 1 \ No newline at end of file diff --git a/.github/workflows/light-sdk-tests.yml b/.github/workflows/light-sdk-tests.yml deleted file mode 100644 index 5d06e156af..0000000000 --- a/.github/workflows/light-sdk-tests.yml +++ /dev/null @@ -1,59 +0,0 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main - types: - - opened - - synchronize - - ready_for_review - - reopened - -name: light-sdk-tests - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - light-sdk-tests: - name: light-sdk-tests - if: github.event.pull_request.draft == false - runs-on: buildjet-16vcpu-ubuntu-2204 - strategy: - matrix: - include: - - name: sdk-tests-light-zk-relayer-cli - sub-tests: '[ - "@lightprotocol/zk.js", - "@lightprotocol/relayer", - "@lightprotocol/cli", - "@lightprotocol/prover.js"]' - - name: circuit-tests - sub-tests: '[ - "@lightprotocol/circuit-lib.js", - "@lightprotocol/circuit-lib.circom" - ]' - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Setup and build - uses: ./.github/actions/setup-and-build - with: - enable_redis: "true" - - - name: ${{ matrix.test.name }} - run: | - source ./scripts/devenv.sh - - IFS=', ' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}" - for subtest in "${sub_tests[@]}" - do - npx nx test $subtest - if [[ "$subtest" == "circuit-lib/circuit-lib.circom" ]]; then - npx nx test-build-light-circuits $subtest - fi - done diff --git a/.github/workflows/light-system-programs-tests.yml b/.github/workflows/light-system-programs-tests.yml deleted file mode 100644 index e767c148c2..0000000000 --- a/.github/workflows/light-system-programs-tests.yml +++ /dev/null @@ -1,57 +0,0 @@ -on: - push: - branches: - - main - paths: - - "zk.js/**" - - "programs/**" - - "light-circuits/**" - - ".github/workflows/system-programs-tests.yml" - pull_request: - branches: - - main - paths: - - "zk.js/**" - - "programs/**" - - "light-circuits/**" - - ".github/workflows/system-programs-tests.yml" - types: - - opened - - synchronize - - reopened - - ready_for_review - -name: system-programs-tests - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - - -jobs: - system-programs: - name: system-programs - if: github.event.pull_request.draft == false - runs-on: buildjet-16vcpu-ubuntu-2204 - strategy: - matrix: - include: - - test: system-programs-tests-transaction-user-verifiers-merkle-tree-provider - sub-tests: '["functional", "user", "verifiers", "merkle-tree", "provider"]' - - test: system-programs-tests-user-merge - sub-tests: '["user-merge"]' - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Setup and build - uses: ./.github/actions/setup-and-build - - - name: ${{ matrix.test }} - run: | - source ./scripts/devenv.sh - IFS=', ' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}" - for subtest in "${sub_tests[@]}" - do - npx nx test-sp-$subtest "@lightprotocol/zk.js" - done diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 0cdf070c4b..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,62 +0,0 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main - types: - - opened - - synchronize - - reopened - - ready_for_review - -name: lint - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - lint: - name: lint - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Cache .local directory - uses: buildjet/cache@v3 - with: - path: .local - key: ${{ runner.os }}-local-${{ hashFiles('**/install.sh') }} - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 8 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: | - ./scripts/install.sh - - - name: Run linters - run: | - pnpm install - source ./scripts/devenv.sh - ./scripts/lint.sh diff --git a/.github/workflows/nx-agents.yml b/.github/workflows/nx-agents.yml new file mode 100644 index 0000000000..110d1dfbe7 --- /dev/null +++ b/.github/workflows/nx-agents.yml @@ -0,0 +1,270 @@ +name: Nx Cloud Agents + +on: + workflow_call: + secrets: + NPM_TOKEN: + required: false + NX_CLOUD_ACCESS_TOKEN: + required: false + NX_CLOUD_AUTH_TOKEN: + required: false + inputs: + number-of-agents: + required: true + type: number + environment-variables: + required: false + type: string + node-version: + required: false + type: string + yarn-version: + required: false + type: string + npm-version: + required: false + type: string + pnpm-version: + required: false + type: string + install-commands: + required: false + type: string + runs-on: + required: false + type: string + default: ubuntu-latest + working-directory: + required: false + type: string + timeout: + required: false + type: number + +env: + NX_CLOUD_DISTRIBUTED_EXECUTION: true + NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: ${{ inputs.number-of-agents }} + NX_BRANCH: ${{ github.event.number || github.ref_name }} + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + +jobs: + set-agents: + runs-on: ${{ inputs.runs-on }} + name: Init + permissions: + contents: 'read' + actions: 'read' + # GitHub's default timeout is 360 minutes + timeout-minutes: ${{ inputs.timeout || 360 }} + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - id: set-matrix + shell: bash + # Turn the number-of-agents input into a JSON structure which is compatible with a Github job matrix strategy + run: | + AGENTS_JSON_ARRAY=$(node -e "console.log(JSON.stringify(Array.from(new Array(${{ inputs.number-of-agents }})).map((_, i) => i + 1)));") + echo $AGENTS_JSON_ARRAY + echo "matrix=$AGENTS_JSON_ARRAY" >> $GITHUB_OUTPUT + + # Intentionally using capital letter in order to make the Github UI for the matrix look better + Run: + needs: set-agents + runs-on: ${{ inputs.runs-on }} + name: Agent ${{ matrix.agent }} + # GitHub's default timeout is 360 minutes + timeout-minutes: ${{ inputs.timeout || 360 }} + strategy: + matrix: + agent: + - ${{fromJson(needs.set-agents.outputs.matrix)}} + defaults: + run: + working-directory: ${{ inputs.working-directory || github.workspace }} + # Specify shell to help normalize across different operating systems + shell: bash + + services: + redis: + image: redis + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + + steps: + - uses: actions/checkout@v3 + + - name: Detect package manager + id: package_manager + run: | + echo "name=$([[ -f ./yarn.lock ]] && echo "yarn" || ([[ -f ./pnpm-lock.yaml ]] && echo "pnpm") || echo "npm")" >> $GITHUB_OUTPUT + + # Set node/npm/yarn versions using volta, with optional overrides provided by the consumer + - uses: volta-cli/action@v4 + with: + node-version: "${{ inputs.node-version }}" + npm-version: "${{ inputs.npm-version }}" + yarn-version: "${{ inputs.yarn-version }}" + package-json-path: "${{ inputs.working-directory || github.workspace }}/package.json" + + # Install pnpm with exact version provided by consumer or fallback to latest + - name: Install PNPM + if: steps.package_manager.outputs.name == 'pnpm' + uses: pnpm/action-setup@v2 + with: + version: ${{ inputs.pnpm-version }} + package_json_file: "${{ inputs.working-directory || github.workspace }}/package.json" + + - name: Print node/npm/yarn versions + id: versions + run: | + node_ver=$( node --version ) + yarn_ver=$( yarn --version || true ) + pnpm_ver=$( pnpm --version || true ) + + echo "Node: ${node_ver:1}" + echo "NPM: $( npm --version )" + if [[ $yarn_ver != '' ]]; then echo "Yarn: $yarn_ver"; fi + if [[ $pnpm_ver != '' ]]; then echo "PNPM: $pnpm_ver"; fi + + echo "node_version=${node_ver:1}" >> $GITHUB_OUTPUT + echo "yarn_version=${yarn_ver}" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [npm] + if: steps.package_manager.outputs.name == 'npm' + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}- + + - name: Get pnpm cache directory path + if: steps.package_manager.outputs.name == 'pnpm' + id: pnpm-cache-dir-path + run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [pnpm] + if: steps.package_manager.outputs.name == 'pnpm' + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}- + + - name: Get yarn cache directory path [yarn 1.x] + if: steps.package_manager.outputs.name == 'yarn' && startsWith(steps.versions.outputs.yarn_version, '1.') + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [yarn 1.x] + if: steps.package_manager.outputs.name == 'yarn' && startsWith(steps.versions.outputs.yarn_version, '1.') + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn- + + - name: Get yarn cache directory path [yarn berry] + if: steps.package_manager.outputs.name == 'yarn' && !startsWith(steps.versions.outputs.yarn_version, '1.') + id: yarn-berry-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [yarn berry] + if: steps.package_manager.outputs.name == 'yarn' && !startsWith(steps.versions.outputs.yarn_version, '1.') + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-berry-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-berry-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-berry- + + - name: Process environment-variables + if: ${{ inputs.environment-variables != '' }} + uses: actions/github-script@v6 + env: + ENV_VARS: ${{ inputs.environment-variables }} + with: + script: | + const { appendFileSync } = require('fs'); + + // trim spaces and escape quotes + const cleanStr = str => str + .trim() + .replaceAll(/`/g, "\`"); + + // parse variable to correct type + const parseStr = str => + str === 'true' || str === 'TRUE' + ? true + : str === 'false' || str === 'FALSE' + ? false + : isNaN(str) + ? str + : parseFloat(str); + + const varsStr = process.env.ENV_VARS || ''; + const vars = varsStr + .split('\n') + .map(variable => variable.trim()) + .filter(variable => variable.indexOf('=') > 0) + .map(variable => ({ + name: cleanStr(variable.split('=')[0]), + value: cleanStr(variable.slice(variable.indexOf('=') + 1)) + })); + + for (const v of vars) { + console.log(`Appending environment variable \`${v.name}\` with value \`${v.value}\` to ${process.env.GITHUB_ENV}`); + appendFileSync(process.env.GITHUB_ENV, `${v.name}=${parseStr(v.value)}\n`); + } + + - name: Run any configured install-commands + if: ${{ inputs.install-commands != '' }} + run: | + ${{ inputs.install-commands }} + + - name: Install npm dependencies + if: ${{ inputs.install-commands == '' }} + run: | + if [ "${{ steps.package_manager.outputs.name == 'yarn' }}" == "true" ]; then + if [ "${{ startsWith(steps.versions.outputs.yarn_version, '1.') }}" == "true" ]; then + echo "Running yarn install --frozen-lockfile" + yarn install --frozen-lockfile + else + echo "Running yarn install --immutable" + yarn install --immutable + fi + elif [ "${{ steps.package_manager.outputs.name == 'pnpm' }}" == "true" ]; then + echo "Running pnpm install --frozen-lockfile --recursive" + pnpm install --frozen-lockfile --recursive + else + echo "Running npm ci" + npm ci + fi + + - name: Install Solana & Anchor + shell: bash + run: | + ./scripts/install.sh + . ./scripts/devenv.sh + mkdir -p /home/runner/.config/solana/ + solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json + + - name: Add .local/bin to PATH + shell: bash + run: | + echo ".local/bin" >> $GITHUB_PATH + + - name: Start Nx Agent ${{ matrix.agent }} + run: . ./scripts/devenv.sh && pnpm install --frozen-lockfile --recursive && npx nx-cloud start-agent + env: + NX_AGENT_NAME: ${{matrix.agent}} \ No newline at end of file diff --git a/.github/workflows/nx-main.yml b/.github/workflows/nx-main.yml new file mode 100644 index 0000000000..157d23e958 --- /dev/null +++ b/.github/workflows/nx-main.yml @@ -0,0 +1,372 @@ +name: Nx Cloud Main + +on: + workflow_call: + secrets: + NPM_TOKEN: + required: false + NX_CLOUD_ACCESS_TOKEN: + required: false + NX_CLOUD_AUTH_TOKEN: + required: false + inputs: + number-of-agents: + required: false + type: number + environment-variables: + required: false + type: string + init-commands: + required: false + type: string + final-commands: + required: false + type: string + parallel-commands: + required: false + type: string + parallel-commands-on-agents: + required: false + type: string + node-version: + required: false + type: string + yarn-version: + required: false + type: string + npm-version: + required: false + type: string + pnpm-version: + required: false + type: string + install-commands: + required: false + type: string + main-branch-name: + required: false + type: string + default: main + runs-on: + required: false + type: string + default: ubuntu-latest + artifacts-path: + required: false + type: string + default: "" + artifacts-name: + required: false + type: string + default: "nx-main-artifacts" + working-directory: + required: false + type: string + timeout: + required: false + type: number + +env: + NX_CLOUD_DISTRIBUTED_EXECUTION: true + NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: ${{ inputs.number-of-agents }} + NX_BRANCH: ${{ github.event.number || github.ref_name }} + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + +jobs: + main: + runs-on: ${{ inputs.runs-on }} + # The name of the job which will invoke this one is expected to be "Nx Cloud - Main Job", and whatever we call this will be appended + # to that one after a forward slash, so we keep this one intentionally short to produce "Nx Cloud - Main Job / Run" in the Github UI + name: Run + permissions: + contents: 'read' + actions: 'read' + # GitHub's default timeout is 360 minutes + timeout-minutes: ${{ inputs.timeout || 360 }} + defaults: + run: + working-directory: ${{ inputs.working-directory || github.workspace }} + # Specify shell to help normalize across different operating systems + shell: bash + steps: + - uses: actions/checkout@v3 + name: Checkout [Pull Request] + if: ${{ github.event_name == 'pull_request' }} + with: + # By default, PRs will be checked-out based on the Merge Commit, but we want the actual branch HEAD. + ref: ${{ github.event.pull_request.head.sha }} + # We need to fetch all branches and commits so that Nx affected has a base to compare against. + fetch-depth: 0 + + - uses: actions/checkout@v3 + name: Checkout [Default Branch] + if: ${{ github.event_name != 'pull_request' }} + with: + # We need to fetch all branches and commits so that Nx affected has a base to compare against. + fetch-depth: 0 + + - name: Derive appropriate SHAs for base and head for `nx affected` commands + uses: nrwl/nx-set-shas@v3 + with: + main-branch-name: ${{ inputs.main-branch-name }} + + - name: Detect package manager + id: package_manager + shell: bash + run: | + echo "name=$([[ -f ./yarn.lock ]] && echo "yarn" || ([[ -f ./pnpm-lock.yaml ]] && echo "pnpm") || echo "npm")" >> $GITHUB_OUTPUT + + # Set node/npm/yarn versions using volta, with optional overrides provided by the consumer + - uses: volta-cli/action@v4 + with: + node-version: "${{ inputs.node-version }}" + npm-version: "${{ inputs.npm-version }}" + yarn-version: "${{ inputs.yarn-version }}" + package-json-path: "${{ inputs.working-directory || github.workspace }}/package.json" + + # Install pnpm with exact version provided by consumer or fallback to latest + - name: Install PNPM + if: steps.package_manager.outputs.name == 'pnpm' + uses: pnpm/action-setup@v2 + with: + version: ${{ inputs.pnpm-version }} + package_json_file: "${{ inputs.working-directory || github.workspace }}/package.json" + + - name: Print node/npm/yarn versions + id: versions + run: | + node_ver=$( node --version ) + yarn_ver=$( yarn --version || true ) + pnpm_ver=$( pnpm --version || true ) + + echo "Node: ${node_ver:1}" + echo "NPM: $( npm --version )" + if [[ $yarn_ver != '' ]]; then echo "Yarn: $yarn_ver"; fi + if [[ $pnpm_ver != '' ]]; then echo "PNPM: $pnpm_ver"; fi + + echo "node_version=${node_ver:1}" >> $GITHUB_OUTPUT + echo "yarn_version=${yarn_ver}" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [npm] + if: steps.package_manager.outputs.name == 'npm' + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}- + + - name: Get pnpm cache directory path + if: steps.package_manager.outputs.name == 'pnpm' + id: pnpm-cache-dir-path + run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [pnpm] + if: steps.package_manager.outputs.name == 'pnpm' + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}- + + - name: Get yarn cache directory path [yarn 1.x] + if: steps.package_manager.outputs.name == 'yarn' && startsWith(steps.versions.outputs.yarn_version, '1.') + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [yarn 1.x] + if: steps.package_manager.outputs.name == 'yarn' && startsWith(steps.versions.outputs.yarn_version, '1.') + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn- + + - name: Get yarn cache directory path [yarn berry] + if: steps.package_manager.outputs.name == 'yarn' && !startsWith(steps.versions.outputs.yarn_version, '1.') + id: yarn-berry-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - name: Use the node_modules cache if available [yarn berry] + if: steps.package_manager.outputs.name == 'yarn' && !startsWith(steps.versions.outputs.yarn_version, '1.') + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-berry-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-berry-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-berry- + + - name: Process environment-variables + if: ${{ inputs.environment-variables != '' }} + uses: actions/github-script@v6 + env: + ENV_VARS: ${{ inputs.environment-variables }} + with: + script: | + const { appendFileSync } = require('fs'); + + // trim spaces and escape quotes + const cleanStr = str => str + .trim() + .replaceAll(/`/g, "\`"); + + // parse variable to correct type + const parseStr = str => + str === 'true' || str === 'TRUE' + ? true + : str === 'false' || str === 'FALSE' + ? false + : isNaN(str) + ? str + : parseFloat(str); + + const varsStr = process.env.ENV_VARS || ''; + const vars = varsStr + .split('\n') + .map(variable => variable.trim()) + .filter(variable => variable.indexOf('=') > 0) + .map(variable => ({ + name: cleanStr(variable.split('=')[0]), + value: cleanStr(variable.slice(variable.indexOf('=') + 1)) + })); + + for (const v of vars) { + console.log(`Appending environment variable \`${v.name}\` with value \`${v.value}\` to ${process.env.GITHUB_ENV}`); + appendFileSync(process.env.GITHUB_ENV, `${v.name}=${parseStr(v.value)}\n`); + } + + - name: Run any configured install-commands + if: ${{ inputs.install-commands != '' }} + run: | + ${{ inputs.install-commands }} + + - name: Install dependencies + if: ${{ inputs.install-commands == '' }} + run: | + if [ "${{ steps.package_manager.outputs.name == 'yarn' }}" == "true" ]; then + if [ "${{ startsWith(steps.versions.outputs.yarn_version, '1.') }}" == "true" ]; then + echo "Running yarn install --frozen-lockfile" + yarn install --frozen-lockfile + else + echo "Running yarn install --immutable" + yarn install --immutable + fi + elif [ "${{ steps.package_manager.outputs.name == 'pnpm' }}" == "true" ]; then + echo "Running pnpm install --frozen-lockfile --recursive" + pnpm install --frozen-lockfile --recursive + else + echo "Running npm ci" + npm ci + fi + + # An unfortunate side-effect of the way reusable workflows work is that by the time they are pulled into the "caller" + # repo, they are effectively completely embedded in that context. This means that we cannot reference any files which + # are local to this repo which defines the workflow, and we therefore need to work around this by embedding the contents + # of the shell utilities for executing commands into the workflow directly. + - name: Create command utils + uses: actions/github-script@v6 + with: + script: | + const { writeFileSync } = require('fs'); + const runCommandsInParallelScript = ` + # Extract the provided commands from the stringified JSON array. + IFS=$'\n' read -d '' -a userCommands < <((jq -c -r '.[]') <<<"$1") + + # Invoke the provided commands in parallel and collect their exit codes. + pids=() + for userCommand in "\${userCommands[@]}"; do + eval "$userCommand" & pids+=($!) + done + + # If any one of the invoked commands exited with a non-zero exit code, exit the whole thing with code 1. + for pid in \${pids[*]}; do + if ! wait $pid; then + exit 1 + fi + done + + # All the invoked commands must have exited with code zero. + exit 0 + `; + writeFileSync('./.github/workflows/run-commands-in-parallel.sh', runCommandsInParallelScript); + + - name: Prepare command utils + # We need to escape the workspace path to be consistent cross-platform: https://github.com/actions/runner/issues/1066 + run: chmod +x ${GITHUB_WORKSPACE//\\//}/.github/workflows/run-commands-in-parallel.sh + + - name: Initialize the Nx Cloud distributed CI run + run: npx nx-cloud start-ci-run + + # The good thing about the multi-line string input for sequential commands is that we can simply forward it on as is to the bash shell and it will behave + # how we want it to in terms of quote escaping, variable assignment etc + - name: Run any configured init-commands sequentially + if: ${{ inputs.init-commands != '' }} + run: | + ${{ inputs.init-commands }} + + - name: Process parallel commands configuration + uses: actions/github-script@v6 + id: parallel_commands_config + env: + PARALLEL_COMMANDS: ${{ inputs.parallel-commands }} + PARALLEL_COMMANDS_ON_AGENTS: ${{ inputs.parallel-commands-on-agents }} + with: + # For the ones configured for main, explicitly set NX_CLOUD_DISTRIBUTED_EXECUTION to false, taking into account commands chained with && + # within the strings. In order to properly escape single quotes we need to do some manual replacing and escaping so that the commands + # are forwarded onto the run-commands-in-parallel.sh script appropriately. + script: | + const parallelCommandsOnMainStr = process.env.PARALLEL_COMMANDS || ''; + const parallelCommandsOnAgentsStr = process.env.PARALLEL_COMMANDS_ON_AGENTS || ''; + + const parallelCommandsOnMain = parallelCommandsOnMainStr + .split('\n') + .map(command => command.trim()) + .filter(command => command.length > 0) + .map(s => s.replace(/'/g, '%27')); + const parallelCommandsOnAgents = parallelCommandsOnAgentsStr + .split('\n') + .map(command => command.trim()) + .filter(command => command.length > 0) + .map(s => s.replace(/'/g, '%27')); + + const formattedArrayOfCommands = [ + ...parallelCommandsOnMain.map(s => s + .split(' && ') + .map(s => `NX_CLOUD_DISTRIBUTED_EXECUTION=false ${s}`) + .join(' && ') + ), + ...parallelCommandsOnAgents, + ]; + + const stringifiedEncodedArrayOfCommands = JSON.stringify(formattedArrayOfCommands) + .replace(/%27/g, "'\\''"); + + return stringifiedEncodedArrayOfCommands + result-encoding: string + + - name: Run any configured parallel commands on main and agent jobs + # We need to escape the workspace path to be consistent cross-platform: https://github.com/actions/runner/issues/1066 + run: ${GITHUB_WORKSPACE//\\//}/.github/workflows/run-commands-in-parallel.sh '${{ steps.parallel_commands_config.outputs.result }}' + + # The good thing about the multi-line string input for sequential commands is that we can simply forward it on as is to the bash shell and it will behave + # how we want it to in terms of quote escaping, variable assignment etc + - name: Run any configured final-commands sequentially + if: ${{ inputs.final-commands != '' }} + run: | + ${{ inputs.final-commands }} + + - name: Stop all running agents for this CI run + # It's important that we always run this step, otherwise in the case of any failures in preceding non-Nx steps, the agents will keep running and waste billable minutes + if: ${{ always() }} + run: npx nx-cloud stop-all-agents + + - name: Uploading artifacts + uses: actions/upload-artifact@v3 + if: ${{ inputs.artifacts-path != '' }} + with: + name: ${{ inputs.artifacts-name }} + path: ${{ inputs.artifacts-path }} \ No newline at end of file diff --git a/.github/workflows/psp-examples-tests.yml b/.github/workflows/psp-examples-tests.yml deleted file mode 100644 index 1abe43c32f..0000000000 --- a/.github/workflows/psp-examples-tests.yml +++ /dev/null @@ -1,52 +0,0 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main - types: - - opened - - synchronize - - ready_for_review - - reopened - -name: psp-examples - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - psp-examples: - name: psp-examples - if: github.event.pull_request.draft == false - runs-on: buildjet-16vcpu-ubuntu-2204 - strategy: - matrix: - include: - - name: psp-examples-projects - sub-tests: '[ - "@lightprotocol/encrypted-messaging", - "@lightprotocol/private-payments", - "@lightprotocol/rock-paper-scissors", - "@lightprotocol/streaming-payments", - "@lightprotocol/swap" - ]' - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Setup and build - uses: ./.github/actions/setup-and-build - with: - enable_redis: "true" - - - name: ${{ matrix.test.name }} - run: | - source ./scripts/devenv.sh - IFS=', ' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}" - for subtest in "${sub_tests[@]}" - do - npx nx test $subtest - done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a3d9086f4..a4c81d2ef2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Relase programs +name: Release programs on: push: diff --git a/Cargo.lock b/Cargo.lock index 0d5fa8c3ee..29a5c659fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2418,18 +2418,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "light-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f032792df1b0157cee19e7e5de18009e171b22154e07432fe92f1c7e8bb5e1d5" -dependencies = [ - "bs58 0.4.0", - "proc-macro2 1.0.68", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "light-macros" version = "0.3.0" @@ -2474,7 +2462,7 @@ dependencies = [ "bytemuck", "byteorder", "getrandom 0.2.10", - "light-macros 0.1.0", + "light-macros", "light-merkle-tree", "serde_json", "solana-program-test", @@ -2490,7 +2478,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", @@ -2503,7 +2491,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", @@ -2516,7 +2504,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", ] @@ -2528,7 +2516,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", diff --git a/cli/package.json b/cli/package.json index ca7e88f973..fe92b7b1aa 100644 --- a/cli/package.json +++ b/cli/package.json @@ -127,5 +127,14 @@ "keywords": [ "oclif" ], - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "nx": { + "targets": { + "build": { + "dependsOn": [ + { "projects": ["@lightprotocol/programs", "@lightprotocol/zk.js"], "target" : "build" } + ] + } + } + } } diff --git a/nx.json b/nx.json index bad8333eb2..955f7445bc 100644 --- a/nx.json +++ b/nx.json @@ -1,39 +1,30 @@ { "tasksRunnerOptions": { "default": { - "runner": "nx/tasks-runners/default", + "runner": "nx-cloud", "options": { - "cacheableOperations": [ - "build", - "test" - ] + "cacheableOperations": ["build", "test", "lint"], + "accessToken": "MTdjMjM5MjMtOGJjMS00OTJlLTgyYzYtYTAwMmY2ZjljZjM3fHJlYWQtd3JpdGU=" } } }, "namedInputs": { - "noMarkdown": [ - "!{projectRoot}/**/*.md" - ] + "noMarkdown": ["!{projectRoot}/**/*.md"] }, "targetDefaults": { "build": { - "inputs": [ - "noMarkdown", - "^noMarkdown" - ], - "dependsOn": [ - "^build" + "dependsOn": ["^build"], + "inputs": ["noMarkdown", "^noMarkdown"], + "outputs": [ + "{projectRoot}/dist", + "{projectRoot}/lib", + "{projectRoot}/build-circuit", + "{projectRoot}/target" ] }, "test": { - "inputs": [ - "noMarkdown", - "^noMarkdown" - ], - "dependsOn": [ - "^build", - "build" - ] + "inputs": ["noMarkdown", "^noMarkdown"], + "dependsOn": ["^build", "build"] } } } diff --git a/package.json b/package.json index d0b8849de6..f3f1ae4434 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "devDependencies": { "husky": "^8.0.3", - "nx": "^16.9.1", - "nx-cloud": "^16.4.0", + "nx": "^16.10.0", + "nx-cloud": "^16.5.2", "snarkjs": "^0.7.1", "typescript": "^5.2.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f1b6a5597..7897acf875 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,11 +12,11 @@ importers: specifier: ^8.0.3 version: 8.0.3 nx: - specifier: ^16.9.1 - version: 16.9.1 + specifier: ^16.10.0 + version: 16.10.0 nx-cloud: - specifier: ^16.4.0 - version: 16.4.0 + specifier: ^16.5.2 + version: 16.5.2 snarkjs: specifier: ^0.7.1 version: 0.7.1 @@ -278,7 +278,7 @@ importers: version: 20.6.4 '@typescript-eslint/eslint-plugin': specifier: ^6.4.0 - version: 6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.50.0)(typescript@5.2.2) + version: 6.7.4(@typescript-eslint/parser@6.8.0)(eslint@8.50.0)(typescript@5.2.2) chai: specifier: ^4.3.7 version: 4.3.8 @@ -296,7 +296,7 @@ importers: version: 39.1.0(@typescript-eslint/eslint-plugin@6.7.4)(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.1.0)(eslint-plugin-promise@6.1.1)(eslint@8.50.0)(typescript@5.2.2) eslint-plugin-import: specifier: ^2.25.2 - version: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint@8.50.0) + version: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.50.0) eslint-plugin-n: specifier: '^15.0.0 || ^16.0.0 ' version: 16.1.0(eslint@8.50.0) @@ -369,13 +369,13 @@ importers: version: link:../../zk.js '@oclif/core': specifier: ^2 - version: 2.15.0(@types/node@20.8.0)(typescript@5.2.2) + version: 2.15.0(@types/node@20.8.6)(typescript@5.2.2) '@oclif/plugin-help': specifier: ^5 - version: 5.2.19(@types/node@20.8.0)(typescript@5.2.2) + version: 5.2.19(@types/node@20.8.6)(typescript@5.2.2) '@oclif/plugin-plugins': specifier: ^3.8.4 - version: 3.9.1(@types/node@20.8.0)(typescript@5.2.2) + version: 3.9.1(@types/node@20.8.6)(typescript@5.2.2) '@project-serum/anchor': specifier: 0.26.0 version: 0.26.0 @@ -403,7 +403,7 @@ importers: version: link:../../cli '@oclif/test': specifier: 2.3.33 - version: 2.3.33(@types/node@20.8.0)(typescript@5.2.2) + version: 2.3.33(@types/node@20.8.6)(typescript@5.2.2) '@types/bn.js': specifier: ^5.1.0 version: 5.1.2 @@ -421,7 +421,7 @@ importers: version: 10.2.0 oclif: specifier: ^3.17.2 - version: 3.17.2(@types/node@20.8.0)(typescript@5.2.2) + version: 3.17.2(@types/node@20.8.6)(typescript@5.2.2) prettier: specifier: ^3.0.3 version: 3.0.3 @@ -433,7 +433,7 @@ importers: version: 10.0.0(mocha@10.2.0) ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.8.0)(typescript@5.2.2) + version: 10.9.1(@types/node@20.8.6)(typescript@5.2.2) tslib: specifier: ^2.6.2 version: 2.6.2 @@ -531,7 +531,7 @@ importers: version: 10.0.0(mocha@10.2.0) ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.8.0)(typescript@5.2.2) + version: 10.9.1(@types/node@20.8.6)(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -1809,19 +1809,19 @@ packages: - supports-color dev: true - /@nrwl/nx-cloud@16.4.0: - resolution: {integrity: sha512-QitrYK6z9ceagetBlgLMZnC0T85k2JTk+oK0MxZ5p/woclqeYN7SiGNZgMzDq8TjJwt8Fm/MDnsSo3xtufmLBg==} + /@nrwl/nx-cloud@16.5.2: + resolution: {integrity: sha512-oHO5T1HRJsR9mbRd8eUqMBPCgqVZLSbAh3zJoPFmhEmjbM4YB9ePRpgYFT8dRNeZUOUd/8Yt7Pb6EVWOHvpD/w==} dependencies: - nx-cloud: 16.4.0 + nx-cloud: 16.5.2 transitivePeerDependencies: - debug dev: true - /@nrwl/tao@16.9.1: - resolution: {integrity: sha512-KsRBRAE5mSP83ZjO9cPW6ZQZWOtkMfCBih/WE9qpaiHn+hCydtYStyAO2QSic4tHVV+8VpPUQWYnpf5rhkNzWg==} + /@nrwl/tao@16.10.0: + resolution: {integrity: sha512-QNAanpINbr+Pod6e1xNgFbzK1x5wmZl+jMocgiEFXZ67KHvmbD6MAQQr0MMz+GPhIu7EE4QCTLTyCEMlAG+K5Q==} hasBin: true dependencies: - nx: 16.9.1 + nx: 16.10.0 tslib: 2.6.2 transitivePeerDependencies: - '@swc-node/register' @@ -1829,8 +1829,8 @@ packages: - debug dev: true - /@nx/nx-darwin-arm64@16.9.1: - resolution: {integrity: sha512-JWGrPxxt3XjgIYzvnaNAeNmK24wyF6yEE1bV+wnnKzd7yavVps3c2TOVE/AT4sgvdVj3xFzztyixYGV58tCYrg==} + /@nx/nx-darwin-arm64@16.10.0: + resolution: {integrity: sha512-YF+MIpeuwFkyvM5OwgY/rTNRpgVAI/YiR0yTYCZR+X3AAvP775IVlusNgQ3oedTBRUzyRnI4Tknj1WniENFsvQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1838,8 +1838,8 @@ packages: dev: true optional: true - /@nx/nx-darwin-x64@16.9.1: - resolution: {integrity: sha512-b1Hw1AmKrR+Kp361WTiKC1RFoQwERyW9R/9XJGNIdgtr+V2wa775eCEdxB9r9mwCqyEmM9iVadpRHPaFSAfQfQ==} + /@nx/nx-darwin-x64@16.10.0: + resolution: {integrity: sha512-ypi6YxwXgb0kg2ixKXE3pwf5myVNUgWf1CsV5OzVccCM8NzheMO51KDXTDmEpXdzUsfT0AkO1sk5GZeCjhVONg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1847,8 +1847,8 @@ packages: dev: true optional: true - /@nx/nx-freebsd-x64@16.9.1: - resolution: {integrity: sha512-jscl/Xu86tLQYbC8b1wy9FjEgGyuLpYnvP9d+34AHDi6CbCNSodbv93xFDlfYcLOeOD/mJXqR1Ru/1MF86OB5A==} + /@nx/nx-freebsd-x64@16.10.0: + resolution: {integrity: sha512-UeEYFDmdbbDkTQamqvtU8ibgu5jQLgFF1ruNb/U4Ywvwutw2d4ruOMl2e0u9hiNja9NFFAnDbvzrDcMo7jYqYw==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] @@ -1856,8 +1856,8 @@ packages: dev: true optional: true - /@nx/nx-linux-arm-gnueabihf@16.9.1: - resolution: {integrity: sha512-NMAyxjYv9y4LwzU76htcPWfdmRoN/ZziTNKT3jaMbn38x4e7DoXYs9GGh267z45yWHscQWoV0v+X39LmB819aQ==} + /@nx/nx-linux-arm-gnueabihf@16.10.0: + resolution: {integrity: sha512-WV3XUC2DB6/+bz1sx+d1Ai9q2Cdr+kTZRN50SOkfmZUQyEBaF6DRYpx/a4ahhxH3ktpNfyY8Maa9OEYxGCBkQA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1865,8 +1865,8 @@ packages: dev: true optional: true - /@nx/nx-linux-arm64-gnu@16.9.1: - resolution: {integrity: sha512-A5UbK5rFhqzs3kMiEKA+xr3LAJsQBA97VDyMH6WPraSl+XRIt4EePx0MyEqo1pnEgeuoOCvR1tjDot5E7ldInw==} + /@nx/nx-linux-arm64-gnu@16.10.0: + resolution: {integrity: sha512-aWIkOUw995V3ItfpAi5FuxQ+1e9EWLS1cjWM1jmeuo+5WtaKToJn5itgQOkvSlPz+HSLgM3VfXMvOFALNk125g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1874,8 +1874,8 @@ packages: dev: true optional: true - /@nx/nx-linux-arm64-musl@16.9.1: - resolution: {integrity: sha512-eIn5PnKH7Y/u1LuanAM0wPNdcb9Z7seDjQzQ0hFMCCvV75Z8A02ztbiueLGaEsDLx35MPBdBmuyo4hsmvmLgpg==} + /@nx/nx-linux-arm64-musl@16.10.0: + resolution: {integrity: sha512-uO6Gg+irqpVcCKMcEPIQcTFZ+tDI02AZkqkP7koQAjniLEappd8DnUBSQdcn53T086pHpdc264X/ZEpXFfrKWQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1883,8 +1883,8 @@ packages: dev: true optional: true - /@nx/nx-linux-x64-gnu@16.9.1: - resolution: {integrity: sha512-MMvhoS1pZjyIjwfeZNH2dDZuVF2xxURLTXC4UmmpY/wOWCuXhvD7QUv5A5QShxfaVXmXceo/fGLK+/Qm5e2+7g==} + /@nx/nx-linux-x64-gnu@16.10.0: + resolution: {integrity: sha512-134PW/u/arNFAQKpqMJniC7irbChMPz+W+qtyKPAUXE0XFKPa7c1GtlI/wK2dvP9qJDZ6bKf0KtA0U/m2HMUOA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1892,8 +1892,8 @@ packages: dev: true optional: true - /@nx/nx-linux-x64-musl@16.9.1: - resolution: {integrity: sha512-ca0d00YCHo0+OIT80MZdtseJj9wTlWMucmdm0OCXLf/l+Dma4MO4LR09WMH2VIpjoz4Gj7+xP0QtKtH4fWFD8Q==} + /@nx/nx-linux-x64-musl@16.10.0: + resolution: {integrity: sha512-q8sINYLdIJxK/iUx9vRk5jWAWb/2O0PAbOJFwv4qkxBv4rLoN7y+otgCZ5v0xfx/zztFgk/oNY4lg5xYjIso2Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1901,8 +1901,8 @@ packages: dev: true optional: true - /@nx/nx-win32-arm64-msvc@16.9.1: - resolution: {integrity: sha512-UIDAWH6/LfouFaXLJWyZKggzH/698lSrLkEE1fa9VrrGEOhumk7MPAVQc/XxgkWgPDDR1TJl0ij+J1bOREn73Q==} + /@nx/nx-win32-arm64-msvc@16.10.0: + resolution: {integrity: sha512-moJkL9kcqxUdJSRpG7dET3UeLIciwrfP08mzBQ12ewo8K8FzxU8ZUsTIVVdNrwt01CXOdXoweGfdQLjJ4qTURA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1910,8 +1910,8 @@ packages: dev: true optional: true - /@nx/nx-win32-x64-msvc@16.9.1: - resolution: {integrity: sha512-isnElU5RaQEGPAJhx6VNY0P/avD79s146kmZOn1Ff5fAjReqR7kRxSWXQOdIqc6nPH9Y0c9wNwEAuhBJoor+Mw==} + /@nx/nx-win32-x64-msvc@16.10.0: + resolution: {integrity: sha512-5iV2NKZnzxJwZZ4DM5JVbRG/nkhAbzEskKaLBB82PmYGKzaDHuMHP1lcPoD/rtYMlowZgNA/RQndfKvPBPwmXA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1957,7 +1957,7 @@ packages: - '@types/node' - typescript - /@oclif/core@2.15.0(@types/node@20.8.0)(typescript@5.2.2): + /@oclif/core@2.15.0(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==} engines: {node: '>=14.0.0'} dependencies: @@ -1984,7 +1984,7 @@ packages: strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - ts-node: 10.9.1(@types/node@20.8.0)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@20.8.6)(typescript@5.2.2) tslib: 2.6.2 widest-line: 3.1.0 wordwrap: 1.0.0 @@ -2021,11 +2021,11 @@ packages: - '@types/node' - typescript - /@oclif/plugin-help@5.2.19(@types/node@20.8.0)(typescript@5.2.2): + /@oclif/plugin-help@5.2.19(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-gf6/dFtzMJ8RA4ovlBCBGJsZsd4jPXhYWJho+Gh6KmA+Ev9LupoExbE0qT+a2uHJyHEvIg4uX/MBW3qdERD/8g==} engines: {node: '>=12.0.0'} dependencies: - '@oclif/core': 2.15.0(@types/node@20.8.0)(typescript@5.2.2) + '@oclif/core': 2.15.0(@types/node@20.8.6)(typescript@5.2.2) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -2045,11 +2045,11 @@ packages: - '@types/node' - typescript - /@oclif/plugin-not-found@2.4.1(@types/node@20.8.0)(typescript@5.2.2): + /@oclif/plugin-not-found@2.4.1(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-LqW7qpw5Q8ploRiup2jEIMQJXcxHP1tpwj45GApKQMe7GRdGdRdjBT9Tu+U2tdEgMqgMplAIhOsYCx2nc2nMSw==} engines: {node: '>=12.0.0'} dependencies: - '@oclif/core': 2.15.0(@types/node@20.8.0)(typescript@5.2.2) + '@oclif/core': 2.15.0(@types/node@20.8.6)(typescript@5.2.2) chalk: 4.1.2 fast-levenshtein: 3.0.0 transitivePeerDependencies: @@ -2083,11 +2083,11 @@ packages: - typescript dev: false - /@oclif/plugin-plugins@3.9.1(@types/node@20.8.0)(typescript@5.2.2): + /@oclif/plugin-plugins@3.9.1(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-86155GW6fQ8ZsmscffIOuvjjCCnXfuUJ/3dA+s6vqVgyGu8VshsHxnA9LCVja/Gz53j9TeaEog08IMcMDsmS7g==} engines: {node: '>=16'} dependencies: - '@oclif/core': 2.15.0(@types/node@20.8.0)(typescript@5.2.2) + '@oclif/core': 2.15.0(@types/node@20.8.6)(typescript@5.2.2) chalk: 4.1.2 debug: 4.3.4(supports-color@8.1.1) http-call: 5.3.0 @@ -2125,11 +2125,11 @@ packages: - typescript dev: true - /@oclif/plugin-warn-if-update-available@2.1.0(@types/node@20.8.0)(typescript@5.2.2): + /@oclif/plugin-warn-if-update-available@2.1.0(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-liTWd/qSIqALsikr88CAB9o2xGFt0LdT5REbhxtrx16/trRmkxQ+0RHK1FieGZAzEENx/4D3YcC/Y67a0uyO0g==} engines: {node: '>=12.0.0'} dependencies: - '@oclif/core': 2.15.0(@types/node@20.8.0)(typescript@5.2.2) + '@oclif/core': 2.15.0(@types/node@20.8.6)(typescript@5.2.2) chalk: 4.1.2 debug: 4.3.4(supports-color@8.1.1) http-call: 5.3.0 @@ -2157,11 +2157,11 @@ packages: - typescript dev: true - /@oclif/test@2.3.33(@types/node@20.8.0)(typescript@5.2.2): + /@oclif/test@2.3.33(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-AmhsxZRDDqJHTk1mDQ+Rl3mNUvb7GIXNcNdP7G7r5l3fRYBUsbzflSy3M760WZfAW4r85rnB+SNG5OBvmajWow==} engines: {node: '>=12.0.0'} dependencies: - '@oclif/core': 2.15.0(@types/node@20.8.0)(typescript@5.2.2) + '@oclif/core': 2.15.0(@types/node@20.8.6)(typescript@5.2.2) fancy-test: 2.0.42 transitivePeerDependencies: - '@swc/core' @@ -2781,6 +2781,11 @@ packages: /@types/node@20.8.0: resolution: {integrity: sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==} + /@types/node@20.8.6: + resolution: {integrity: sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==} + dependencies: + undici-types: 5.25.3 + /@types/normalize-package-data@2.4.2: resolution: {integrity: sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==} dev: true @@ -2889,7 +2894,7 @@ packages: transitivePeerDependencies: - supports-color - /@typescript-eslint/eslint-plugin@6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.50.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@6.7.4(@typescript-eslint/parser@6.8.0)(eslint@8.50.0)(typescript@5.2.2): resolution: {integrity: sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2901,7 +2906,7 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.8.1 - '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.8.0(eslint@8.50.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.7.4 '@typescript-eslint/type-utils': 6.7.4(eslint@8.50.0)(typescript@5.2.2) '@typescript-eslint/utils': 6.7.4(eslint@8.50.0)(typescript@5.2.2) @@ -2959,6 +2964,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.8.0(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.8.0 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.50.0 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager@6.7.4: resolution: {integrity: sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2966,6 +2992,14 @@ packages: '@typescript-eslint/types': 6.7.4 '@typescript-eslint/visitor-keys': 6.7.4 + /@typescript-eslint/scope-manager@6.8.0: + resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 + dev: true + /@typescript-eslint/type-utils@6.7.4(eslint@8.50.0)(typescript@4.9.5): resolution: {integrity: sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3009,6 +3043,11 @@ packages: resolution: {integrity: sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==} engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/types@6.8.0: + resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@6.7.4(typescript@4.9.5): resolution: {integrity: sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3050,6 +3089,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.8.0(typescript@5.2.2): + resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@6.7.4(eslint@8.50.0)(typescript@4.9.5): resolution: {integrity: sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3094,6 +3154,14 @@ packages: '@typescript-eslint/types': 6.7.4 eslint-visitor-keys: 3.4.3 + /@typescript-eslint/visitor-keys@6.8.0: + resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.8.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/promise-all-settled@1.1.2: resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} dev: true @@ -3432,6 +3500,16 @@ packages: transitivePeerDependencies: - debug + /axios@1.5.1: + resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==} + dependencies: + follow-redirects: 1.15.3 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: true + /b4a@1.6.4: resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} @@ -3663,8 +3741,8 @@ packages: base64-js: 1.5.1 ieee754: 1.2.1 - /bufferutil@4.0.7: - resolution: {integrity: sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==} + /bufferutil@4.0.8: + resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} requiresBuild: true dependencies: @@ -4669,7 +4747,7 @@ packages: '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@4.9.5) eslint-config-xo-space: 0.34.0(eslint@8.50.0) eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.7.4)(eslint-plugin-import@2.28.1)(eslint@8.50.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint@8.50.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0) eslint-plugin-mocha: 10.2.0(eslint@8.50.0) eslint-plugin-node: 11.1.0(eslint@8.50.0) transitivePeerDependencies: @@ -4702,11 +4780,11 @@ packages: eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.7.4(@typescript-eslint/parser@6.8.0)(eslint@8.50.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) eslint: 8.50.0 eslint-config-standard: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.1.0)(eslint-plugin-promise@6.1.1)(eslint@8.50.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint@8.50.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.50.0) eslint-plugin-n: 16.1.0(eslint@8.50.0) eslint-plugin-promise: 6.1.1(eslint@8.50.0) typescript: 5.2.2 @@ -4724,7 +4802,7 @@ packages: eslint-plugin-promise: ^6.0.0 dependencies: eslint: 8.50.0 - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint@8.50.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.50.0) eslint-plugin-n: 16.1.0(eslint@8.50.0) eslint-plugin-promise: 6.1.1(eslint@8.50.0) dev: true @@ -4770,7 +4848,7 @@ packages: enhanced-resolve: 5.15.0 eslint: 8.50.0 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint@8.50.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0) fast-glob: 3.3.1 get-tsconfig: 4.7.2 is-core-module: 2.13.0 @@ -4812,7 +4890,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -4833,7 +4911,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.8.0(eslint@8.50.0)(typescript@5.2.2) debug: 3.2.7 eslint: 8.50.0 eslint-import-resolver-node: 0.3.9 @@ -4863,7 +4941,7 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4)(eslint@8.50.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -4873,7 +4951,42 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@4.9.5) + array-includes: 3.1.7 + array.prototype.findlastindex: 1.2.3 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.50.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0) + has: 1.0.3 + is-core-module: 2.13.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.7 + object.groupby: 1.0.1 + object.values: 1.1.7 + semver: 6.3.1 + tsconfig-paths: 3.14.2 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.50.0): + resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + dependencies: + '@typescript-eslint/parser': 6.8.0(eslint@8.50.0)(typescript@5.2.2) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -4882,7 +4995,7 @@ packages: doctrine: 2.1.0 eslint: 8.50.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -5659,7 +5772,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.1.2 + minimatch: 3.0.5 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -6468,7 +6581,7 @@ packages: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 12.0.1 - ws: 8.14.2(bufferutil@4.0.7)(utf-8-validate@5.0.10) + ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -7671,11 +7784,11 @@ packages: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true - /nx-cloud@16.4.0: - resolution: {integrity: sha512-jbq4hWvDwRlJVpxgMgbmNSkue+6XZSn53R6Vo6qmCAWODJ9KY1BZdZ/9VRL8IX/BRKebVFiXp3SapFB1qPhH8A==} + /nx-cloud@16.5.2: + resolution: {integrity: sha512-1t1Ii9gojl8r/8hFGaZ/ZyYR0Cb0hzvXLCsaFuvg+EJEFdvua3P4cfNya/0bdRrm+7Eb/ITUOskbvYq4TSlyGg==} hasBin: true dependencies: - '@nrwl/nx-cloud': 16.4.0 + '@nrwl/nx-cloud': 16.5.2 axios: 1.1.3 chalk: 4.1.2 dotenv: 10.0.0 @@ -7689,8 +7802,8 @@ packages: - debug dev: true - /nx@16.9.1: - resolution: {integrity: sha512-h6jp0fXzEsBO3pwCNS2JbfzJZRgE2DnIo7Sj1/1oBo82o44jNqsPo3nMTj95qhcveJ0qBiKIh+Xw/fghXiRiSQ==} + /nx@16.10.0: + resolution: {integrity: sha512-gZl4iCC0Hx0Qe1VWmO4Bkeul2nttuXdPpfnlcDKSACGu3ZIo+uySqwOF8yBAxSTIf8xe2JRhgzJN1aFkuezEBg==} hasBin: true requiresBuild: true peerDependencies: @@ -7702,16 +7815,16 @@ packages: '@swc/core': optional: true dependencies: - '@nrwl/tao': 16.9.1 + '@nrwl/tao': 16.10.0 '@parcel/watcher': 2.0.4 '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.6 - axios: 1.5.0 + axios: 1.5.1 chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 - cliui: 7.0.4 + cliui: 8.0.1 dotenv: 16.3.1 dotenv-expand: 10.0.0 enquirer: 2.3.6 @@ -7739,16 +7852,16 @@ packages: yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 16.9.1 - '@nx/nx-darwin-x64': 16.9.1 - '@nx/nx-freebsd-x64': 16.9.1 - '@nx/nx-linux-arm-gnueabihf': 16.9.1 - '@nx/nx-linux-arm64-gnu': 16.9.1 - '@nx/nx-linux-arm64-musl': 16.9.1 - '@nx/nx-linux-x64-gnu': 16.9.1 - '@nx/nx-linux-x64-musl': 16.9.1 - '@nx/nx-win32-arm64-msvc': 16.9.1 - '@nx/nx-win32-x64-msvc': 16.9.1 + '@nx/nx-darwin-arm64': 16.10.0 + '@nx/nx-darwin-x64': 16.10.0 + '@nx/nx-freebsd-x64': 16.10.0 + '@nx/nx-linux-arm-gnueabihf': 16.10.0 + '@nx/nx-linux-arm64-gnu': 16.10.0 + '@nx/nx-linux-arm64-musl': 16.10.0 + '@nx/nx-linux-x64-gnu': 16.10.0 + '@nx/nx-linux-x64-musl': 16.10.0 + '@nx/nx-win32-arm64-msvc': 16.10.0 + '@nx/nx-win32-x64-msvc': 16.10.0 transitivePeerDependencies: - debug dev: true @@ -7842,15 +7955,15 @@ packages: - typescript dev: true - /oclif@3.17.2(@types/node@20.8.0)(typescript@5.2.2): + /oclif@3.17.2(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-+vFXxgmR7dGGz+g6YiqSZu2LXVkBMaS9/rhtsLGkYw45e53CW/3kBgPRnOvxcTDM3Td9JPeBD2JWxXnPKGQW3A==} engines: {node: '>=12.0.0'} hasBin: true dependencies: - '@oclif/core': 2.15.0(@types/node@20.8.0)(typescript@5.2.2) - '@oclif/plugin-help': 5.2.19(@types/node@20.8.0)(typescript@5.2.2) - '@oclif/plugin-not-found': 2.4.1(@types/node@20.8.0)(typescript@5.2.2) - '@oclif/plugin-warn-if-update-available': 2.1.0(@types/node@20.8.0)(typescript@5.2.2) + '@oclif/core': 2.15.0(@types/node@20.8.6)(typescript@5.2.2) + '@oclif/plugin-help': 5.2.19(@types/node@20.8.6)(typescript@5.2.2) + '@oclif/plugin-not-found': 2.4.1(@types/node@20.8.6)(typescript@5.2.2) + '@oclif/plugin-warn-if-update-available': 2.1.0(@types/node@20.8.6)(typescript@5.2.2) async-retry: 1.3.3 aws-sdk: 2.1463.0 concurrently: 7.6.0 @@ -8633,9 +8746,9 @@ packages: '@babel/runtime': 7.22.15 eventemitter3: 4.0.7 uuid: 8.3.2 - ws: 8.14.2(bufferutil@4.0.7)(utf-8-validate@5.0.10) + ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - bufferutil: 4.0.7 + bufferutil: 4.0.8 utf-8-validate: 5.0.10 /rrweb-cssom@0.6.0: @@ -9517,7 +9630,7 @@ packages: yn: 3.1.1 dev: true - /ts-node@10.9.1(@types/node@20.8.0)(typescript@5.2.2): + /ts-node@10.9.1(@types/node@20.8.6)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -9536,7 +9649,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.8.0 + '@types/node': 20.8.6 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -9711,6 +9824,9 @@ packages: /underscore@1.12.1: resolution: {integrity: sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==} + /undici-types@5.25.3: + resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} + /unique-filename@1.1.1: resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} dependencies: @@ -10097,7 +10213,7 @@ packages: utf-8-validate: optional: true - /ws@8.14.2(bufferutil@4.0.7)(utf-8-validate@5.0.10): + /ws@8.14.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} peerDependencies: @@ -10109,7 +10225,7 @@ packages: utf-8-validate: optional: true dependencies: - bufferutil: 4.0.7 + bufferutil: 4.0.8 utf-8-validate: 5.0.10 /xml-name-validator@4.0.0: diff --git a/programs/package.json b/programs/package.json index 9511b8f78f..78c2570d0a 100644 --- a/programs/package.json +++ b/programs/package.json @@ -3,6 +3,6 @@ "version": "0.3.0", "license": "GPL-3.0", "scripts": { - "build": "light-anchor build" + "build": "`git rev-parse --show-toplevel`/.local/bin/light-anchor build" } } diff --git a/psp-examples/private-compressed-account/Cargo.lock b/psp-examples/private-compressed-account/Cargo.lock index b8e320222c..e03b5b3066 100644 --- a/psp-examples/private-compressed-account/Cargo.lock +++ b/psp-examples/private-compressed-account/Cargo.lock @@ -1506,18 +1506,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "light-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f032792df1b0157cee19e7e5de18009e171b22154e07432fe92f1c7e8bb5e1d5" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "light-macros" version = "0.3.0" @@ -1558,7 +1546,7 @@ dependencies = [ "bytemuck", "byteorder", "getrandom 0.2.10", - "light-macros 0.1.0", + "light-macros", "light-merkle-tree", "solana-security-txt", "spl-token", @@ -1571,7 +1559,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", @@ -1846,7 +1834,7 @@ dependencies = [ "anchor-spl", "bytemuck", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-psp4in4out-app-storage", "light-verifier-sdk", diff --git a/psp-examples/rock-paper-scissors/Cargo.lock b/psp-examples/rock-paper-scissors/Cargo.lock index 29748bef38..7dd24ac95d 100644 --- a/psp-examples/rock-paper-scissors/Cargo.lock +++ b/psp-examples/rock-paper-scissors/Cargo.lock @@ -1506,18 +1506,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "light-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f032792df1b0157cee19e7e5de18009e171b22154e07432fe92f1c7e8bb5e1d5" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "light-macros" version = "0.3.0" @@ -1558,7 +1546,7 @@ dependencies = [ "bytemuck", "byteorder", "getrandom 0.2.10", - "light-macros 0.1.0", + "light-macros", "light-merkle-tree", "solana-security-txt", "spl-token", @@ -1571,7 +1559,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", @@ -2031,7 +2019,7 @@ dependencies = [ "anchor-spl", "bytemuck", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-psp4in4out-app-storage", "light-verifier-sdk", diff --git a/psp-examples/streaming-payments/Cargo.lock b/psp-examples/streaming-payments/Cargo.lock index 610e42c85c..0b2c3be234 100644 --- a/psp-examples/streaming-payments/Cargo.lock +++ b/psp-examples/streaming-payments/Cargo.lock @@ -1505,18 +1505,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "light-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f032792df1b0157cee19e7e5de18009e171b22154e07432fe92f1c7e8bb5e1d5" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "light-macros" version = "0.3.0" @@ -1557,7 +1545,7 @@ dependencies = [ "bytemuck", "byteorder", "getrandom 0.2.10", - "light-macros 0.1.0", + "light-macros", "light-merkle-tree", "solana-security-txt", "spl-token", @@ -1570,7 +1558,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", @@ -1872,7 +1860,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-psp4in4out-app-storage", "light-verifier-sdk", diff --git a/psp-examples/swap/Cargo.lock b/psp-examples/swap/Cargo.lock index 2b063eabf6..cb793860cd 100644 --- a/psp-examples/swap/Cargo.lock +++ b/psp-examples/swap/Cargo.lock @@ -1506,18 +1506,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "light-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f032792df1b0157cee19e7e5de18009e171b22154e07432fe92f1c7e8bb5e1d5" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "light-macros" version = "0.3.0" @@ -1558,7 +1546,7 @@ dependencies = [ "bytemuck", "byteorder", "getrandom 0.2.10", - "light-macros 0.1.0", + "light-macros", "light-merkle-tree", "solana-security-txt", "spl-token", @@ -1571,7 +1559,7 @@ dependencies = [ "anchor-lang", "anchor-spl", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-verifier-sdk", "solana-security-txt", @@ -2508,7 +2496,7 @@ dependencies = [ "anchor-spl", "bytemuck", "groth16-solana", - "light-macros 0.3.0", + "light-macros", "light-merkle-tree-program", "light-psp4in4out-app-storage", "light-verifier-sdk", diff --git a/scripts/build.sh b/scripts/build.sh index 7562058fd8..06be3b81f4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -7,4 +7,5 @@ command -v npx >/dev/null 2>&1 || { echo >&2 "npx is not installed. Aborting."; set -eux -pnpm install || { echo >&2 "Failed to install dependencies. Aborting."; exit 1; } +pnpm install +NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx affected --target=build \ No newline at end of file diff --git a/scripts/clean.sh b/scripts/clean.sh new file mode 100755 index 0000000000..dd69489e62 --- /dev/null +++ b/scripts/clean.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +find . -type d \( -name "test-ledger" \) -exec rm -rf {} + + +npx nx reset \ No newline at end of file diff --git a/scripts/format.sh b/scripts/format.sh index 6611b145e6..9e04db08d3 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -2,8 +2,8 @@ set -e -npx nx run-many --target=format --all -npx nx run-many --target=lint:fix --all +NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many --target=format --all +NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many --target=lint:fix --all cargo +nightly fmt --all cargo clippy --all -- -A clippy::result_large_err -D warnings diff --git a/scripts/install.sh b/scripts/install.sh index 66565e6fce..a86a8a965a 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -183,27 +183,27 @@ cargo install cargo-expand rustup component add rustfmt -echo "📥 Downloading Node.js" -download_and_extract \ - "node-v${NODE_VERSION}-${ARCH_SUFFIX_NODE}.tar.gz" \ - "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-${ARCH_SUFFIX_NODE}.tar.gz" \ - z \ - "${PREFIX}" \ - 1 - -NPM_DIR="${PREFIX}/npm-global" -mkdir -p "${NPM_DIR}" -export PATH="${PREFIX}/bin:${NPM_DIR}/bin:${PATH}" -export NPM_CONFIG_PREFIX="${NPM_DIR}" - -echo "📥 Downloading pnpm" -download_file_github \ - pnpm \ - pnpm \ - "v${PNPM_VERSION}" \ - "pnpm-${ARCH_SUFFIX_PNPM}" \ - pnpm \ - "${PREFIX}/bin" +#echo "📥 Downloading Node.js" +#download_and_extract \ +# "node-v${NODE_VERSION}-${ARCH_SUFFIX_NODE}.tar.gz" \ +# "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-${ARCH_SUFFIX_NODE}.tar.gz" \ +# z \ +# "${PREFIX}" \ +# 1 +# +#NPM_DIR="${PREFIX}/npm-global" +#mkdir -p "${NPM_DIR}" +#export PATH="${PREFIX}/bin:${NPM_DIR}/bin:${PATH}" +#export NPM_CONFIG_PREFIX="${NPM_DIR}" +# +#echo "📥 Downloading pnpm" +#download_file_github \ +# pnpm \ +# pnpm \ +# "v${PNPM_VERSION}" \ +# "pnpm-${ARCH_SUFFIX_PNPM}" \ +# pnpm \ +# "${PREFIX}/bin" echo "📥 Downloading Solana toolchain" download_and_extract_github \ diff --git a/zk.js/package.json b/zk.js/package.json index e184e5328f..c12a546ff0 100644 --- a/zk.js/package.json +++ b/zk.js/package.json @@ -97,5 +97,14 @@ "ts-node": "^10.9.1", "typescript": "^4.3.5", "typescript-collections": "^1.3.3" + }, + "nx": { + "targets": { + "test": { + "dependsOn": [ + { "projects": ["@lightprotocol/cli"], "target" : "build" } + ] + } + } } }