diff --git a/.eslintrc.json b/.eslintrc.json index 7603cde7a6..407fa26eab 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,7 +42,16 @@ "@typescript-eslint/no-empty-function": "off", "vue/no-v-for-template-key": "off", "vue/no-multiple-template-root": "off", - "vue/no-v-model-argument": "off" + "vue/no-v-model-argument": "off", + "@typescript-eslint/ban-types": [ + "error", + { + "extendDefaults": true, + "types": { + "{}": false + } + } + ] }, "settings": { "svelte3/typescript": true // load TypeScript as peer dependency diff --git a/.github/workflows/new_stats_build.yaml b/.github/workflows/new_stats_build.yaml new file mode 100644 index 0000000000..879284363d --- /dev/null +++ b/.github/workflows/new_stats_build.yaml @@ -0,0 +1,45 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code using yarn build:app + +name: New Stats Build + +on: + push: + branches: + - development + paths: + - "packages/new_stats/**" + pull_request: + branches: + - development + paths: + - "packages/new_stats/**" + +jobs: + build: + runs-on: ubuntu-latest + env: + NODE_OPTIONS: "--max-old-space-size=8192" + + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + cache-dependency-path: "**/yarn.lock" + + - name: Install dependencies + run: | + yarn install + + - name: Build + run: | + lerna run build --no-private + yarn workspace @threefold/newstats build diff --git a/.github/workflows/new_stats_docker.yaml b/.github/workflows/new_stats_docker.yaml new file mode 100644 index 0000000000..0770f28a2f --- /dev/null +++ b/.github/workflows/new_stats_docker.yaml @@ -0,0 +1,35 @@ +name: New Stats Docker Build/Push +on: + release: + types: [published] + workflow_dispatch: + +jobs: + Build-and-push-docker-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout the repo + uses: actions/checkout@v3 + - name: Log in to the Container registry + uses: docker/login-action@v2.1.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/threefoldtech/newstats + tags: | + type=semver,pattern={{version}} + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + file: packages/new_stats/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/playground_build.yml b/.github/workflows/playground_build.yml index 1593546f6b..4fdbd58997 100644 --- a/.github/workflows/playground_build.yml +++ b/.github/workflows/playground_build.yml @@ -17,6 +17,8 @@ on: jobs: build: runs-on: ubuntu-latest + env: + NODE_OPTIONS: "--max-old-space-size=8192" strategy: matrix: diff --git a/.github/workflows/playground_cd.yml b/.github/workflows/playground_cd.yml index 4fdcfb0ad0..30307679ae 100644 --- a/.github/workflows/playground_cd.yml +++ b/.github/workflows/playground_cd.yml @@ -6,6 +6,7 @@ on: push: branches: - development + - development_313 paths: - "packages/playground/**" workflow_dispatch: @@ -19,6 +20,8 @@ concurrency: jobs: build-and-deploy: runs-on: ubuntu-latest + env: + NODE_OPTIONS: "--max-old-space-size=8192" strategy: matrix: @@ -47,6 +50,7 @@ jobs: VERSION=${VERSION:0:7} NETWORK=dev yarn build - name: Copying files to staging server + if: ${{ github.ref == 'refs/heads/development' }} uses: appleboy/scp-action@master with: host: ${{ secrets.DEV_REMOTE_HOST }} @@ -58,3 +62,17 @@ jobs: source: "packages/playground/dist/" target: "${{ secrets.PLAYGROUND_REMOTE_DIR }}" strip_components: 3 + + - name: Copying files to staging server + if: ${{ github.ref == 'refs/heads/development_313' }} + uses: appleboy/scp-action@master + with: + host: ${{ secrets.DEV_REMOTE_HOST }} + username: ${{ secrets.DEV_REMOTE_USER }} + key: ${{ secrets.DEV_SSH_KEY }} + passphrase: ${{ secrets.DEV_SSH_KEY_PASSPHRASE }} + rm: true + port: ${{ secrets.PORT }} + source: "packages/playground/dist/" + target: "/opt/playground_new/devnet/dist" + strip_components: 3 diff --git a/Makefile b/Makefile index 16719f141f..541bee1601 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,12 @@ else ifeq ($(project), weblets) cd packages/weblets/playground && yarn build else ifeq ($(project), playground) cd packages/playground && yarn build +else ifeq ($(project), graphql_client) + cd packages/graphql_client && yarn build +else ifeq ($(project), gridproxy_client) + cd packages/gridproxy_client && yarn build else ifeq ($(project), UI) cd packages/UI && yarn build else yarn lerna run build --no-private -endif \ No newline at end of file +endif diff --git a/README.md b/README.md index d163caa7cf..85b7f5af3f 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ This repo contains the typescript clients and projects for Threefold grid. - [rmb peer client](./packages/rmb_peer_client/README.md) - [rmb peer server](./packages/rmb_peer_server/README.md) - [Playground](./packages/playground/README.md) +- [graphql_client](./packages/graphql_client/README.md) +- [gridproxy_client](./packages/gridproxy_client/README.md) - [UI](./packages/UI/README.md) ## Requirements diff --git a/packages/dashboard/scripts/build-env.sh b/packages/dashboard/scripts/build-env.sh index 531820e930..fd5640b2cd 100644 --- a/packages/dashboard/scripts/build-env.sh +++ b/packages/dashboard/scripts/build-env.sh @@ -21,7 +21,7 @@ case $TFCHAIN_NETWORK in GRAPHQL_URL='https://graphql.dev.grid.tf/graphql' GRIDPROXY_URL='https://gridproxy.dev.grid.tf' SUBSTRATE_URL='wss://tfchain.dev.grid.tf/ws' - ACTIVATION_SERVICE_URL='https://activation.dev.grid.tf' + ACTIVATION_SERVICE_URL='https://activation.dev.grid.tf/activation/activate' PLAYGROUND_URL='https://play.dev.grid.tf' PLAYGROUND_V2_URL='https://playground.dev.grid.tf' RELAY_DOMAIN='relay.dev.grid.tf' @@ -32,7 +32,7 @@ case $TFCHAIN_NETWORK in GRAPHQL_URL='https://graphql.qa.grid.tf/graphql' GRIDPROXY_URL='https://gridproxy.qa.grid.tf' SUBSTRATE_URL='wss://tfchain.qa.grid.tf/ws' - ACTIVATION_SERVICE_URL='https://activation.qa.grid.tf' + ACTIVATION_SERVICE_URL='https://activation.qa.grid.tf/activation/activate' PLAYGROUND_URL='https://play.qa.grid.tf' PLAYGROUND_V2_URL='https://playground.qa.grid.tf' RELAY_DOMAIN='relay.qa.grid.tf' @@ -43,7 +43,7 @@ case $TFCHAIN_NETWORK in GRAPHQL_URL='https://graphql.test.grid.tf/graphql' GRIDPROXY_URL='https://gridproxy.test.grid.tf' SUBSTRATE_URL='wss://tfchain.test.grid.tf/ws' - ACTIVATION_SERVICE_URL='https://activation.test.grid.tf' + ACTIVATION_SERVICE_URL='https://activation.test.grid.tf/activation/activate' PLAYGROUND_URL='https://play.test.grid.tf' PLAYGROUND_V2_URL='https://playground.test.grid.tf' RELAY_DOMAIN='relay.test.grid.tf' @@ -54,7 +54,7 @@ case $TFCHAIN_NETWORK in GRAPHQL_URL='https://graphql.grid.tf/graphql' GRIDPROXY_URL='https://gridproxy.grid.tf' SUBSTRATE_URL='wss://tfchain.grid.tf/ws' - ACTIVATION_SERVICE_URL='https://activation.grid.tf' + ACTIVATION_SERVICE_URL='https://activation.grid.tf/activation/activate' PLAYGROUND_URL='https://play.grid.tf' PLAYGROUND_V2_URL='https://playground.grid.tf' RELAY_DOMAIN='relay.grid.tf' diff --git a/packages/dashboard/src/components/TfChainConnector.vue b/packages/dashboard/src/components/TfChainConnector.vue index 9dff22a367..39e45e2a7f 100644 --- a/packages/dashboard/src/components/TfChainConnector.vue +++ b/packages/dashboard/src/components/TfChainConnector.vue @@ -45,7 +45,7 @@ - To connect your wallet, you will need to enter your mnemonic which will be encrypted using the password. - Mnemonic will never be shared outside of this device. + To connect your wallet, you will need to enter your Mnemonic or Hex Seed which will be encrypted using + the password. Mnemonic or Hex Seed will never be shared outside of this device.