Update Fluene JS SDK to CRDT interpreter (#19)

This commit is contained in:
folex 2021-08-24 19:27:02 +03:00 committed by GitHub
parent abe3da7952
commit 93327a2e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1022 additions and 1644 deletions

View File

@ -1,72 +1,72 @@
name: build dev
on:
push:
branches-ignore:
- master
workflow_dispatch:
push:
branches-ignore:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
### extract branch name
- name: Extract branch name
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
id: extract_branch
build:
runs-on: ubuntu-latest
steps:
### extract branch name
- name: Extract branch name
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
id: extract_branch
- name: Extract branch name
if: github.event_name == 'pull_request'
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Extract branch name
if: github.event_name == 'pull_request'
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
- run: npm run build
env:
CI: true
### Prepare docker & login to Dockerhub
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Use Node.js 15
uses: actions/setup-node@v1
with:
node-version: 15
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- run: npm install
- run: npm run build
env:
CI: true
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
### Prepare docker & login to Dockerhub
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
### Set version
- run: echo "VERSION=0.1.${{github.run_number}}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- run: echo "CONTAINER_TAG=fluencelabs/dashboard:${{ env.VERSION }}${{ env.BRANCH_NAME }}" >> $GITHUB_ENV
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
### Build and push docker image
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./caddy.Dockerfile
push: true
tags: ${{ env.CONTAINER_TAG }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
### Set version
- run: echo "VERSION=0.1.${{github.run_number}}" >> $GITHUB_ENV
- run: echo "CONTAINER_TAG=fluencelabs/dashboard:${{ env.VERSION }}${{ env.BRANCH_NAME }}" >> $GITHUB_ENV
### Build and push docker image
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./caddy.Dockerfile
push: true
tags: ${{ env.CONTAINER_TAG }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@ -1,68 +1,68 @@
name: build prod
on:
push:
branches:
- master
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
- run: npm run prod
env:
CI: true
### Prepare docker & login to Dockerhub
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Use Node.js 15
uses: actions/setup-node@v1
with:
node-version: 15
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- run: npm install
- run: npm run prod
env:
CI: true
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
### Prepare docker & login to Dockerhub
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
### Set version
- run: echo "VERSION=0.1.${{github.run_number}}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- run: echo "CONTAINER_TAG=fluencelabs/dashboard:latest,fluencelabs/dashboard:${{ env.VERSION }}" >> $GITHUB_ENV
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
### Build and push docker image
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./caddy.Dockerfile
push: true
tags: ${{ env.CONTAINER_TAG }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
### Deploy
- name: Invoke deployment workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy prod
token: ${{ secrets.PERSONAL_TOKEN }}
inputs: '{ "version": "${{ env.VERSION }}" }'
### Set version
- run: echo "VERSION=0.1.${{github.run_number}}" >> $GITHUB_ENV
- run: echo "CONTAINER_TAG=fluencelabs/dashboard:latest,fluencelabs/dashboard:${{ env.VERSION }}" >> $GITHUB_ENV
### Build and push docker image
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./caddy.Dockerfile
push: true
tags: ${{ env.CONTAINER_TAG }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
### Deploy
- name: Invoke deployment workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy prod
token: ${{ secrets.PERSONAL_TOKEN }}
inputs: '{ "version": "${{ env.VERSION }}" }'

2422
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,8 +31,8 @@
},
"homepage": "https://github.com/fluencelabs/fluence-admin#readme",
"dependencies": {
"@fluencelabs/fluence": "0.9.53",
"@fluencelabs/fluence-network-environment": "1.0.9",
"@fluencelabs/fluence": "0.10.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"css-spinners": "^1.0.1",
"tachyons": "^4.12.0",
"yup": "^0.32.9"
@ -40,8 +40,8 @@
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@fluencelabs/aqua-cli": "^0.1.8-161",
"@fluencelabs/aqua-lib": "0.1.6",
"@fluencelabs/aqua-cli": "0.2.0-208",
"@fluencelabs/aqua-lib": "0.1.14",
"@types/yup": "^0.29.11",
"babel-loader": "^8.1.0",
"chokidar-cli": "^2.1.0",

View File

@ -3,7 +3,7 @@
* This file is auto-generated. Do not edit manually: changes may be erased.
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
* Aqua version: 0.1.8-161
* Aqua version: 0.1.14-SNAPSHOT
*
*/
import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable';

View File

@ -20,7 +20,7 @@ import './main.css';
// eslint-disable-next-line import/no-extraneous-dependencies
import log from 'loglevel';
import Multiaddr from 'multiaddr';
import { dev, krasnodar } from '@fluencelabs/fluence-network-environment';
import { stage, krasnodar } from '@fluencelabs/fluence-network-environment';
import {
createClient,
generatePeerId,
@ -37,7 +37,7 @@ import { getAll } from './_aqua/app';
const defaultNetworkName = 'krasnodar';
const defaultEnv = {
relays: krasnodar,
relays: stage,
relayIdx: 3,
logLevel: 'error',
};