Коммит e3e37413 создал по автору DarkSky's avatar DarkSky
Просмотр файлов

init: the first public commit for AFFiNE

владельцы
{
"projectName": "Ligo-Virgo",
"projectOwner": "toeverything",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "angular",
"contributorsPerLine": 7,
"contributors": [
{
"login": "darkskygit",
"name": "DarkSky",
"avatar_url": "https://avatars.githubusercontent.com/u/25152247?v=4",
"profile": "https://darksky.eu.org/",
"contributions": [
"code",
"doc"
]
},
{
"login": "tzhangchi",
"name": "Chi Zhang",
"avatar_url": "https://avatars.githubusercontent.com/u/5910926?v=4",
"profile": "https://zhangchi.blog.csdn.net/",
"contributions": [
"code",
"doc"
]
},
{
"login": "alt1o",
"name": "alt1o",
"avatar_url": "https://avatars.githubusercontent.com/u/21084335?v=4",
"profile": "https://github.com/alt1o",
"contributions": [
"code",
"doc"
]
},
{
"login": "DiamondThree",
"name": "Diamond",
"avatar_url": "https://avatars.githubusercontent.com/u/24630517?v=4",
"profile": "https://github.com/DiamondThree",
"contributions": [
"code",
"doc"
]
},
{
"login": "lawvs",
"name": "Whitewater",
"avatar_url": "https://avatars.githubusercontent.com/u/18554747?v=4",
"profile": "https://lawvs.github.io/profile/",
"contributions": [
"code",
"doc"
]
},
{
"login": "zuoxiaodong0815",
"name": "zuoxiaodong0815",
"avatar_url": "https://avatars.githubusercontent.com/u/53252747?v=4",
"profile": "https://github.com/zuoxiaodong0815",
"contributions": [
"code",
"doc"
]
},
{
"login": "SaikaSakura",
"name": "SaikaSakura",
"avatar_url": "https://avatars.githubusercontent.com/u/11530942?v=4",
"profile": "https://github.com/SaikaSakura",
"contributions": [
"code",
"doc"
]
},
{
"login": "QiShaoXuan",
"name": "Qi",
"avatar_url": "https://avatars.githubusercontent.com/u/22772830?v=4",
"profile": "https://github.com/QiShaoXuan",
"contributions": [
"code",
"doc"
]
},
{
"login": "tuluffy",
"name": "tuluffy",
"avatar_url": "https://avatars.githubusercontent.com/u/26808339?v=4",
"profile": "https://tuluffy.github.io/angular.github.io/",
"contributions": [
"code",
"doc"
]
},
{
"login": "Austaras",
"name": "Austaras",
"avatar_url": "https://avatars.githubusercontent.com/u/15013925?v=4",
"profile": "https://shockwave.me/",
"contributions": [
"code",
"doc"
]
},
{
"login": "uptonking",
"name": "Jin Yao",
"avatar_url": "https://avatars.githubusercontent.com/u/11391549?v=4",
"profile": "https://github.com/uptonking?tab=repositories&type=source",
"contributions": [
"code",
"doc"
]
}
]
}
module.exports = {
types: [
{ value: 'feat', name: 'feat 🍄: add new features' },
{ value: 'fix', name: 'fix 🐛: fix bug' },
{ value: 'docs', name: 'docs 📄: modify documentation, comments' },
{
value: 'refactor',
name: 'refactor 🎸: code refactoring, pay attention to distinguish it from features and fixes',
},
{ value: 'perf', name: 'perf ⚡: improve performance' },
{ value: 'test', name: 'test 👀: add a test' },
{
value: 'tool',
name: 'tool 🚗: Development tool changes (build, scaffolding tools, etc.)',
},
{
value: 'style',
name: 'style ✂: Modifications to code formatting do not affect logic',
},
{ value: 'revert', name: 'revert 🌝: version rollback' },
{
value: 'editor',
name: 'editor 🔧: editor configuration modification',
},
{ value: 'update', name: 'update ⬆: third-party library upgrade' },
],
scopes: [
{ name: 'selection' },
{ name: 'whiteboard' },
{ name: 'point' },
{ name: 'group' },
{ name: 'page' },
{ name: 'component' },
{ name: 'config' },
{ name: 'others' },
],
// it needs to match the value for field type. Eg.: 'fix'
/*
scopeOverrides: {
fix: [
{name: 'merge'},
{name: 'style'}
]
},
*/
// override the messages, de faults are as follows
messages: {
type: 'Choose a type of your submission:',
scope: 'Choose a scope (optional):',
// used if allowCustomScopes is true
customScope: 'Denote the SCOPE of this change:',
subject: 'Brief description:\n',
body: 'Detailed description, use "|" newline (optional):\n',
breaking: 'Incompatibility specification (optional):\n',
footer: 'Associate closed issues, for example: #31, #34 (optional):\n',
confirmCommit: 'Are you sure to commit?',
},
allowCustomScopes: true,
allowBreakingChanges: ['Added', 'Repair'],
// limit subject length
subjectLimit: 100,
};
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
# use for download icon from figma
FIGMA_TOKEN
NODE_ENV
AFFINE_FEATURE_FLAG_TOKEN
\ No newline at end of file
**/webpack.config.js
**/jest.config.js
**/node_modules/**
.github/**
\ No newline at end of file
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "react", "filename-rules", "import", "prettier"],
"parserOptions": {
"project": ["./tsconfig.base.json"]
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"prettier/prettier": "warn",
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "library:utils",
"onlyDependOnLibsWithTags": ["library:utils"]
},
{
"sourceTag": "datasource:jwt",
"onlyDependOnLibsWithTags": [
"library:utils",
"datasource:remote-kv",
"datasource:jwt-rpc"
]
},
{
"sourceTag": "datasource:db-services",
"onlyDependOnLibsWithTags": [
"library:utils",
"datasource:jwt"
]
},
{
"sourceTag": "datasource:hooks",
"onlyDependOnLibsWithTags": [
"library:utils",
"datasource:jwt",
"datasource:db-services"
]
},
{
"sourceTag": "datasource:http",
"onlyDependOnLibsWithTags": ["library:utils"]
},
{
"sourceTag": "datasource:state",
"onlyDependOnLibsWithTags": [
"library:utils",
"library:feature-flags",
"datasource:http",
"datasource:jwt"
]
},
{
"sourceTag": "components:common",
"onlyDependOnLibsWithTags": [
"library:utils",
"components:icons",
"components:ui"
]
},
{
"sourceTag": "components:editor-core",
"onlyDependOnLibsWithTags": [
"library:utils",
"library:feature-flags",
"datasource:db-services",
"datasource:state",
"datasource:commands",
"datasource:jwt",
"components:ui",
"components:common",
"components:icons"
]
},
{
"sourceTag": "components:editor-blocks",
"onlyDependOnLibsWithTags": [
"library:utils",
"library:feature-flags",
"components:common",
"components:editor-core",
"framework:editor",
"datasource:db-services",
"components:ui",
"components:icons"
]
},
{
"sourceTag": "components:editor-plugins",
"onlyDependOnLibsWithTags": [
"library:utils",
"components:common",
"components:editor-core",
"framework:editor",
"components:editor-blocks",
"datasource:db-services",
"components:ui",
"components:icons",
"library:feature-flags"
]
},
{
"sourceTag": "components:ui",
"onlyDependOnLibsWithTags": [
"components:icons",
"library:utils"
]
},
{
"sourceTag": "framework:editor",
"onlyDependOnLibsWithTags": [
"components:editor-core"
]
},
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
],
"allowCircularSelfDependency": false
}
],
"filename-rules/match": [
"warn",
{
".tsx": "PascalCase",
".ts": "kebab-case",
".json": "kebab-case",
"": "kebab-case"
}
],
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["lodash"],
"message": "Forbid direct import of lodash, use @toeverything/utils"
},
{
"group": ["lodash-es"],
"message": "Forbid direct import of lodash-es, use @toeverything/utils"
},
{
"group": ["@mui/material", "@mui/material/*"],
"message": "Forbid direct import of @mui/material, use @toeverything/components/ui"
}
]
}
],
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": [
"property",
"parameterProperty",
"accessor",
"enumMember"
],
"format": ["strictCamelCase"]
},
{
"selector": ["property", "accessor"],
"modifiers": ["private"],
"format": ["strictCamelCase"],
"leadingUnderscore": "require"
},
{
"selector": ["method"],
"modifiers": ["public"],
"format": ["strictCamelCase"]
},
// Private methods
{
"selector": ["method"],
"modifiers": ["private"],
"format": ["strictCamelCase"],
"leadingUnderscore": "require"
},
{
"selector": ["method"],
"modifiers": ["protected"],
"format": ["strictCamelCase"],
"leadingUnderscore": "require"
},
// Top Level Methods
// const func: Function
// allow PascalCase for react components
{
"selector": ["variable"],
"modifiers": ["global"],
"types": ["function"],
"format": ["strictCamelCase", "StrictPascalCase"],
"leadingUnderscore": "allow"
},
// function something() { }
{
"selector": ["function"],
"modifiers": ["global"],
"format": ["strictCamelCase"],
"leadingUnderscore": "require"
},
// export const func: Function
{
"selector": ["variable"],
"modifiers": ["exported"],
"types": ["function"],
"format": ["strictCamelCase", "StrictPascalCase"],
"leadingUnderscore": "forbid"
},
// export function something() { }
{
"selector": ["function"],
"modifiers": ["exported"],
"format": ["strictCamelCase", "StrictPascalCase"],
"leadingUnderscore": "forbid"
},
// Top Level Variables
{
"selector": ["variable"],
"modifiers": ["global", "const"],
"types": ["boolean", "string", "number"],
"format": ["UPPER_CASE"]
},
{
"selector": ["variable"],
"modifiers": ["global"],
"format": ["strictCamelCase"],
"leadingUnderscore": "require"
},
{
"selector": ["variable"],
"modifiers": ["exported"],
"format": ["strictCamelCase"]
},
// types, enums
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "variableLike",
"format": ["strictCamelCase"]
}
],
"react/self-closing-comp": "warn",
"no-restricted-syntax": [
"warn",
{
"selector": ":matches(PropertyDefinition)[accessibility!='private'][accessibility!='protected'][key.name!='constructor']",
"message": "Use private instead, please implement getter or setXxx for external read and write requirements"
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {
"prefer-const": "warn",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-empty-function": "warn",
// https://github.com/nrwl/nx/issues/10445
"react/jsx-key": "error",
"import/no-default-export": "warn",
"import/no-duplicates": "warn",
"max-lines": [
"warn",
{ "max": 300, "skipComments": true, "skipBlankLines": true }
]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
}
]
}
# About code owners
# You can use a CODEOWNERS file to define individuals or teams that are responsible for code in a repository.
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# =================
# configs
# =================
.* @darkskygit
babel.config.json @darkskygit
nx.json @darkskygit
tsconfig.base.json @darkskygit
**/project.json @darkskygit
**/tsconfig.json @darkskygit
**/tsconfig.*.json @darkskygit
**/.babelrc @darkskygit
**/babel.config.js @darkskygit
**/.* @darkskygit
# =================
# components
# =================
# editor-core
libs/components/editor-core @lawvs
# editor-blocks
# group block
libs/components/editor-blocks/src/blocks/group @lawvs
# todo block
libs/components/editor-blocks/src/blocks/todo @lawvs
libs/framework/virgo @SaikaSakura
# =================
# datasource
# =================
# feature flags
libs/datasource/feature-flags @lawvs
# jwt
libs/datasource/jwt @darkskygit
name: Lint
on:
push:
branches: [master]
pull_request:
branches: [master]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
main:
strategy:
matrix:
node-version: [16]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
# TODO Remove the next line after cleaning all errors
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
# https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install node modules
run: pnpm install
- name: Lint
if: always()
run: pnpm run lint:with-cache
# - name: Check
# if: always()
# run: pnpm run check
# - name: Format Check
# if: always()
# run: pnpm run format:ci
# - name: Build
# run: pnpm run build
# - name: Test
# run: pnpm run test
name: Build Lisa
on:
push:
branches: [master]
pull_request:
branches: [master]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
NAMESPACE: toeverything
LISA_IMAGE_NAME: lisa
IMAGE_TAG: canary-${{ github.sha }}
IMAGE_TAG_LATEST: nightly-latest
jobs:
ligo-virgo:
runs-on: self-hosted
environment: development
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker (lisa)
id: meta_lisa
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.LISA_IMAGE_NAME }}
tags: |
${{ env.IMAGE_TAG }}
${{ env.IMAGE_TAG_LATEST }}
- name: Build and push Docker image (lisa)
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: ${{ github.ref == 'refs/heads/master' && true || false }}
tags: ${{ steps.meta_lisa.outputs.tags }}
labels: ${{ steps.meta_lisa.outputs.labels }}
target: lisa
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
*dist
/tmp
/out-tsc
# dependencies
node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
.pnpm-debug.log
/typings
# System Files
.DS_Store
Thumbs.db
# env
*.env.local
*.local.env
.history
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# npx lint-staged
pnpm run lint:with-cache
pnpm run check
pnpm run format:ci
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# Show just the current branch in Git
# See https://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git/1418022#1418022
current_branch=$(git rev-parse --abbrev-ref HEAD)
default_branch="master"
if test $current_branch != $default_branch; then
exit 0
fi
npm run type:check
registry=https://registry.npmjs.org
engine-strict=true
auto-install-peers=true
\ No newline at end of file
# Add files here to ignore them from prettier formatting
/dist
/coverage
pnpm-lock.yaml
# Editoe assets
apps/editoe/src/app/assets/svg
# Automatically generated from Figma
libs/components/icons/src/auto-icons
libs/components/common/src/lib/icon
# DevOps
.github/**
{
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 4,
"arrowParens": "avoid"
}
{
"recommendations": [
"mikestead.dotenv",
"esbenp.prettier-vscode",
"visualstudioexptteam.vscodeintellicode",
"nrwl.angular-console",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker"
]
}
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"prettier.prettierPath": "./node_modules/prettier",
"cSpell.words": [
"Backlinks",
"blockdb",
"booktitle",
"Cascader",
"clsx",
"cssmodule",
"datasource",
"fflate",
"groq",
"howpublished",
"immer",
"inbook",
"incollection",
"inproceedings",
"Kanban",
"keyval",
"ligo",
"lozad",
"mastersthesis",
"nrwl",
"phdthesis",
"pnpm",
"reindex",
"ROOTNODE",
"techreport",
"tldr",
"tldraw",
"tldtaw",
"toeverything",
"Unstyled",
"unversioned",
"uuidv",
"webm"
]
}
:80 {
reverse_proxy /api/* keck:3001
@websockets {
path /collaboration/*
}
reverse_proxy @websockets keck:3000
reverse_proxy /* lisa:3001 {
header_up Host lisa:3001
}
}
http://lisa:3001 {
root /* ./dist
file_server {
precompressed br
}
encode {
zstd
gzip 9
}
@notStatic {
not path /*.css
not path /*.js
not path /*.png
not path /*.jpg
not path /*.svg
not path /*.ttf
not path /*.eot
not path /*.woff
not path /*.woff2
}
handle @notStatic {
try_files {path} /index.html
}
}
FROM node:16-alpine as builder
WORKDIR /app
COPY . .
RUN apk add g++ make python3 git
RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build
FROM node:16-alpine as relocate
WORKDIR /app
COPY --from=builder /app/dist/apps/ligo-virgo ./dist
COPY --from=builder /app/Caddyfile ./
RUN rm ./dist/*.txt
# =============
# lisa image
# =============
FROM caddy:2.4.6-alpine as lisa
WORKDIR /app
COPY --from=relocate /app .
EXPOSE 3000
CMD ["caddy", "run"]
\ No newline at end of file
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать