mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 07:06:28 +08:00
Merge branch 'toeverything:develop' into fix/typos-in-readme
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
NX_LOCAL=true
|
||||
NX_E2E=true
|
||||
@@ -10,6 +10,9 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Nx Cloud - Main Job
|
||||
@@ -20,9 +23,10 @@ jobs:
|
||||
number-of-agents: 2
|
||||
parallel-commands: |
|
||||
pnpm exec nx-cloud record -- pnpm exec nx format:check
|
||||
pnpm e2e:ci
|
||||
parallel-commands-on-agents: |
|
||||
pnpm exec nx affected --target=lint --parallel=3 --exclude=components-common,keck,theme
|
||||
pnpm exec nx affected --target=build --parallel=3
|
||||
pnpm exec nx affected --target=lint --parallel=2 --exclude=components-common,keck,theme
|
||||
pnpm exec nx affected --target=build --parallel=2
|
||||
|
||||
agents:
|
||||
name: Nx Cloud - Agents
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
# 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
|
||||
@@ -5,15 +5,15 @@
|
||||
"author": "DarkSky <darksky2048@gmail.com>",
|
||||
"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",
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["src/plugins/index.js"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"no-undef": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
supportFile: './src/support/index.ts',
|
||||
specPattern: './src/integration',
|
||||
setupNodeEvents(on, config) {
|
||||
// implement node event listeners here
|
||||
},
|
||||
},
|
||||
fileServerFolder: '.',
|
||||
fixturesFolder: './src/fixtures',
|
||||
video: false,
|
||||
// videosFolder: '../../dist/cypress/apps/ligo-virgo-e2e/videos',
|
||||
screenshotsFolder: '../../dist/cypress/apps/ligo-virgo-e2e/screenshots',
|
||||
chromeWebSecurity: false,
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/ligo-virgo-e2e/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": {
|
||||
"cypressConfig": "apps/ligo-virgo-e2e/cypress.config.ts",
|
||||
"devServerTarget": "ligo-virgo:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "ligo-virgo:serve:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/ligo-virgo-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
"implicitDependencies": ["ligo-virgo"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { getTitle, getBoard } from '../support/app.po';
|
||||
|
||||
describe('ligo-virgo', () => {
|
||||
beforeEach(() => cy.visit('/'));
|
||||
|
||||
it('basic load check', () => {
|
||||
getTitle().contains('Get Started with AFFiNE');
|
||||
|
||||
cy.get('.block_container').contains('The Essentials');
|
||||
|
||||
getBoard().click();
|
||||
cy.get('.tl-inner-div').contains('Graduating');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
export const getTitle = () => cy.get('span[title]');
|
||||
export const getDoc = () => cy.contains('Doc');
|
||||
export const getBoard = () => cy.contains('Board');
|
||||
@@ -0,0 +1,33 @@
|
||||
// ***********************************************
|
||||
// This example commands.js shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
declare namespace Cypress {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
interface Chainable<Subject> {
|
||||
login(email: string, password: string): void;
|
||||
}
|
||||
}
|
||||
//
|
||||
// -- This is a parent command --
|
||||
Cypress.Commands.add('login', (email, password) => {
|
||||
console.log('Custom command example: Login', email, password);
|
||||
});
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
||||
@@ -0,0 +1,17 @@
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands';
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": false,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"allowJs": true,
|
||||
"types": ["cypress", "node"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.js"]
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"configurations": {
|
||||
"production": {
|
||||
"buildTarget": "ligo-virgo:build:production",
|
||||
"hmr": false
|
||||
"hmr": false,
|
||||
"open": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- local dev index.html -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="https://app.affine.pro/favicon.ico" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<title>AFFiNE - All In One Workos</title>
|
||||
<script>
|
||||
window.global = window;
|
||||
|
||||
@@ -16,6 +16,7 @@ module.exports = function (webpackConfig) {
|
||||
const config = getNxWebpackConfig(webpackConfig);
|
||||
|
||||
const isProd = config.mode === 'production';
|
||||
const isE2E = process.env.NX_E2E;
|
||||
|
||||
const style9 = {
|
||||
test: /\.(tsx|ts|js|mjs|jsx)$/,
|
||||
@@ -158,6 +159,7 @@ module.exports = function (webpackConfig) {
|
||||
global: {},
|
||||
}),
|
||||
isProd &&
|
||||
!isE2E &&
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'AFFiNE - All In One Workos',
|
||||
favicon: path.resolve(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<base href="/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@authing/react-ui-components": "^3.1.23",
|
||||
"@authing/react-ui-components": "^3.1.39",
|
||||
"@emotion/styled": "^11.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"authing-js-sdk": "^4.23.33"
|
||||
"authing-js-sdk": "^4.23.35"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
"@codemirror/lang-css": "^6.0.0",
|
||||
"@codemirror/lang-html": "~6.1.0",
|
||||
"@codemirror/lang-java": "~6.0.0",
|
||||
"@codemirror/lang-javascript": "~6.0.1",
|
||||
"@codemirror/lang-javascript": "~6.0.2",
|
||||
"@codemirror/lang-json": "~6.0.0",
|
||||
"@codemirror/lang-lezer": "~6.0.0",
|
||||
"@codemirror/lang-markdown": "~6.0.0",
|
||||
"@codemirror/lang-markdown": "~6.0.1",
|
||||
"@codemirror/lang-php": "~6.0.0",
|
||||
"@codemirror/lang-python": "~6.0.0",
|
||||
"@codemirror/lang-python": "~6.0.1",
|
||||
"@codemirror/lang-rust": "~6.0.0",
|
||||
"@codemirror/lang-sql": "~6.0.0",
|
||||
"@codemirror/lang-sql": "~6.1.0",
|
||||
"@codemirror/lang-xml": "~6.0.0",
|
||||
"@codemirror/language": "^6.2.0",
|
||||
"@codemirror/language": "^6.2.1",
|
||||
"@codemirror/legacy-modes": "~6.1.0",
|
||||
"@codemirror/next": "^0.16.0",
|
||||
"@codemirror/state": "^6.1.0",
|
||||
"@codemirror/state": "^6.1.1",
|
||||
"@codemirror/theme-one-dark": "^6.0.0",
|
||||
"@codemirror/view": "^6.0.2",
|
||||
"@codemirror/view": "^6.2.0",
|
||||
"@dnd-kit/core": "^6.0.5",
|
||||
"@dnd-kit/sortable": "^7.0.1",
|
||||
"@dnd-kit/utilities": "^3.2.0",
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"license": "MIT",
|
||||
"author": "DarkSky <darksky2048@gmail.com>",
|
||||
"dependencies": {
|
||||
"lib0": "^0.2.51",
|
||||
"yjs": "^13.5.39",
|
||||
"lib0": "^0.2.52",
|
||||
"yjs": "^13.5.41",
|
||||
"y-protocols": "^1.0.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
"file-saver": "^2.0.5",
|
||||
"file-selector": "^0.6.0",
|
||||
"flexsearch": "^0.7.21",
|
||||
"lib0": "^0.2.51",
|
||||
"lru-cache": "^7.12.0",
|
||||
"lib0": "^0.2.52",
|
||||
"lru-cache": "^7.13.2",
|
||||
"ts-debounce": "^4.0.0",
|
||||
"y-indexeddb": "^9.0.8"
|
||||
"y-indexeddb": "^9.0.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/flexsearch": "^0.7.3",
|
||||
@@ -29,6 +29,6 @@
|
||||
"sift": "^16.0.0",
|
||||
"uuid": "^8.3.2",
|
||||
"y-protocols": "^1.0.5",
|
||||
"yjs": "^13.5.39"
|
||||
"yjs": "^13.5.41"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.1167.0",
|
||||
"aws-sdk": "^2.1189.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"util": "^0.12.4"
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"jotai": "^1.7.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"authing-js-sdk": "^4.23.33",
|
||||
"firebase": "^9.8.4"
|
||||
"authing-js-sdk": "^4.23.35",
|
||||
"firebase": "^9.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
+10
-5
@@ -4,12 +4,14 @@
|
||||
"license": "MIT",
|
||||
"author": "AFFiNE <developer@affine.pro>",
|
||||
"scripts": {
|
||||
"start": "env-cmd -f .env.local-dev nx serve ligo-virgo",
|
||||
"e2e": "env-cmd -f .github/env/.env.e2e nx e2e ligo-virgo-e2e --watch",
|
||||
"e2e:ci": "env-cmd -f .github/env/.env.e2e nx e2e ligo-virgo-e2e --prod",
|
||||
"start": "env-cmd -f .github/env/.env.local-dev nx serve ligo-virgo",
|
||||
"start:affine": "nx serve ligo-virgo",
|
||||
"start:keck": "nx serve keck",
|
||||
"start:venus": "nx serve venus",
|
||||
"build": "nx build ligo-virgo",
|
||||
"build:local": "env-cmd -f .env.local-dev nx build ligo-virgo",
|
||||
"build:local": "env-cmd -f .github/env/.env.local-dev nx build ligo-virgo",
|
||||
"build:keck": "nx build keck",
|
||||
"build:venus": "nx build venus",
|
||||
"build:analytic": "cross-env BUNDLE_ANALYZER=true nx build --skip-nx-cache",
|
||||
@@ -80,10 +82,11 @@
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@firebase/auth": "^0.20.4",
|
||||
"@firebase/auth": "^0.20.5",
|
||||
"@headlessui/react": "^1.6.5",
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@nrwl/cli": "^14.4.0",
|
||||
"@nrwl/cypress": "^14.4.0",
|
||||
"@nrwl/eslint-plugin-nx": "^14.4.0",
|
||||
"@nrwl/jest": "^14.4.0",
|
||||
"@nrwl/js": "^14.4.0",
|
||||
@@ -117,18 +120,20 @@
|
||||
"compression-webpack-plugin": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-minimizer-webpack-plugin": "^4.0.0",
|
||||
"cypress": "^10.4.0",
|
||||
"cz-customizable": "^5.3.0",
|
||||
"env-cmd": "^10.1.0",
|
||||
"eslint": "^8.19.0",
|
||||
"eslint-config-next": "12.2.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-cypress": "^2.10.3",
|
||||
"eslint-plugin-filename-rules": "^1.2.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"firebase": "^9.8.4",
|
||||
"firebase": "^9.9.2",
|
||||
"fs-extra": "^10.1.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"husky": "^8.0.1",
|
||||
@@ -142,7 +147,7 @@
|
||||
"ts-jest": "^28.0.5",
|
||||
"ts-node": "^10.8.2",
|
||||
"typescript": "^4.7.4",
|
||||
"webpack": "^5.73.0",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-bundle-analyzer": "^4.5.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
|
||||
Generated
+1015
-591
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,7 @@
|
||||
"framework-virgo": "libs/framework/virgo",
|
||||
"keck": "apps/keck",
|
||||
"ligo-virgo": "apps/ligo-virgo",
|
||||
"ligo-virgo-e2e": "apps/ligo-virgo-e2e",
|
||||
"utils": "libs/utils",
|
||||
"venus": "apps/venus"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user