From 478e3d79d37fde57a19cba7ac5359417442270a1 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Sat, 6 Aug 2022 18:10:31 +0800 Subject: [PATCH 01/33] Beautify the header style --- apps/venus/src/app/index.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/venus/src/app/index.tsx b/apps/venus/src/app/index.tsx index dea6dc0b7b..42c008138f 100644 --- a/apps/venus/src/app/index.tsx +++ b/apps/venus/src/app/index.tsx @@ -204,6 +204,10 @@ const GitHub = (props: { center?: boolean; flat?: boolean }) => { {...{ sx: { margin: 'auto 1em', + fontSize: '24px', + '@media (max-width: 768px)': { + fontSize: '16px', + }, ...(props.flat ? { padding: matches ? '0' : '0 0.5em', @@ -256,6 +260,10 @@ export function App() { sx={{ padding: matches ? '0' : '0 0.5em', ':hover': { backgroundColor: 'unset' }, + fontSize: '24px', + '@media (max-width: 768px)': { + fontSize: '16px', + }, }} > AFFiNE @@ -276,6 +284,10 @@ export function App() { sx={{ padding: matches ? '0' : '0 0.5em', ':hover': { backgroundColor: 'unset' }, + fontSize: '24px', + '@media (max-width: 768px)': { + fontSize: '16px', + }, }} size="lg" > From 7ac160a368ca4572a8153ad3169277625db069cd Mon Sep 17 00:00:00 2001 From: DarkSky <25152247+darkskygit@users.noreply.github.com> Date: Mon, 8 Aug 2022 00:04:15 +0800 Subject: [PATCH 02/33] Update check.yml --- .github/workflows/check.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e1a982e4f1..5359258440 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,9 +2,13 @@ name: standard check on: push: - branches: [master] + branches: [develop] pull_request: - branches: [master] + branches: [develop] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true jobs: main: @@ -12,8 +16,8 @@ jobs: uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.6 secrets: inherit with: - main-branch-name: master - number-of-agents: 3 + main-branch-name: develop + number-of-agents: 2 parallel-commands: | pnpm exec nx-cloud record -- pnpm exec nx format:check parallel-commands-on-agents: | @@ -23,6 +27,5 @@ jobs: agents: name: Nx Cloud - Agents uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.6 - secrets: inherit with: - number-of-agents: 3 + number-of-agents: 2 From 578eeb39284c7f37c78eabd1af765d005e88898d Mon Sep 17 00:00:00 2001 From: DarkSky <25152247+darkskygit@users.noreply.github.com> Date: Mon, 8 Aug 2022 00:07:38 +0800 Subject: [PATCH 03/33] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000000..75ff3a8010 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "develop", master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "develop" ] + schedule: + - cron: '27 1 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From d5f62c0df0686524a1d9abeb064cd8ff862ef3eb Mon Sep 17 00:00:00 2001 From: DarkSky <25152247+darkskygit@users.noreply.github.com> Date: Mon, 8 Aug 2022 00:22:16 +0800 Subject: [PATCH 04/33] Create sonarcloud.yml --- .github/workflows/sonarcloud.yml | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000000..f40abe6ca6 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,68 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow helps you trigger a SonarCloud analysis of your code and populates +# GitHub Code Scanning alerts with the vulnerabilities found. +# Free for open source project. + +# 1. Login to SonarCloud.io using your GitHub account + +# 2. Import your project on SonarCloud +# * Add your GitHub organization first, then add your repository as a new project. +# * Please note that many languages are eligible for automatic analysis, +# which means that the analysis will start automatically without the need to set up GitHub Actions. +# * This behavior can be changed in Administration > Analysis Method. +# +# 3. Follow the SonarCloud in-product tutorial +# * a. Copy/paste the Project Key and the Organization Key into the args parameter below +# (You'll find this information in SonarCloud. Click on "Information" at the bottom left) +# +# * b. Generate a new token and add it to your Github repository's secrets using the name SONAR_TOKEN +# (On SonarCloud, click on your avatar on top-right > My account > Security +# or go directly to https://sonarcloud.io/account/security/) + +# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/) +# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9) + +name: SonarCloud analysis + +on: + push: + branches: [ "develop", master ] + pull_request: + branches: [ "develop" ] + workflow_dispatch: + +permissions: + pull-requests: read # allows SonarCloud to decorate PRs with analysis results + +jobs: + Analysis: + runs-on: ubuntu-latest + + steps: + - name: Analyze with SonarCloud + + # You can pin the exact commit or the version. + # uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049 + uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) + with: + # Additional arguments for the sonarcloud scanner + args: + # Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu) + # mandatory + -Dsonar.projectKey=toeverything_AFFiNE + -Dsonar.organization=toeverything + # Comma-separated paths to directories containing main source files. + #-Dsonar.sources= # optional, default is project base directory + # When you need the analysis to take place in a directory other than the one from which it was launched + #-Dsonar.projectBaseDir= # optional, default is . + # Comma-separated paths to directories containing test source files. + #-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/ + # Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing. + #-Dsonar.verbose= # optional, default is false From 45763aa4e38e56b41d65672e7251cbef945a6738 Mon Sep 17 00:00:00 2001 From: DarkSky Date: Mon, 8 Aug 2022 01:16:25 +0800 Subject: [PATCH 05/33] chore: update deps --- apps/keck/package.json | 12 ++++++------ apps/ligo-virgo/package.json | 4 ++-- apps/ligo-virgo/src/index.html | 2 +- apps/venus/src/index.html | 2 +- libs/components/account/package.json | 4 ++-- libs/components/editor-blocks/package.json | 14 +++++++------- libs/datasource/jwt-rpc/package.json | 4 ++-- libs/datasource/jwt/package.json | 8 ++++---- libs/datasource/remote-kv/package.json | 2 +- libs/datasource/state/package.json | 4 ++-- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/apps/keck/package.json b/apps/keck/package.json index d0cc69ceed..d960ea7694 100644 --- a/apps/keck/package.json +++ b/apps/keck/package.json @@ -5,15 +5,15 @@ "author": "DarkSky ", "main": "jest.config.ts", "dependencies": { - "authing-js-sdk": "^4.23.33", - "firebase-admin": "^11.0.0", - "lib0": "^0.2.51", - "lru-cache": "^7.13.0", + "authing-js-sdk": "^4.23.35", + "firebase-admin": "^11.0.1", + "lib0": "^0.2.52", + "lru-cache": "^7.13.2", "nanoid": "^4.0.0", "readable-stream": "^4.1.0", - "ws": "^8.8.0", + "ws": "^8.8.1", "y-protocols": "^1.0.5", - "yjs": "^13.5.39" + "yjs": "^13.5.41" }, "devDependencies": { "@types/readable-stream": "^2.3.13", diff --git a/apps/ligo-virgo/package.json b/apps/ligo-virgo/package.json index 54c68924c5..5bb0d78eaa 100644 --- a/apps/ligo-virgo/package.json +++ b/apps/ligo-virgo/package.json @@ -13,8 +13,8 @@ "@mui/icons-material": "^5.8.4" }, "devDependencies": { - "firebase": "^9.8.4", + "firebase": "^9.9.2", "mini-css-extract-plugin": "^2.6.1", - "webpack": "^5.73.0" + "webpack": "^5.74.0" } } diff --git a/apps/ligo-virgo/src/index.html b/apps/ligo-virgo/src/index.html index a5b9fda47a..2d1ed8fb85 100644 --- a/apps/ligo-virgo/src/index.html +++ b/apps/ligo-virgo/src/index.html @@ -4,7 +4,7 @@ - + AFFiNE - All In One Workos