ci: tauri build (#2485)

* ci: tauri build

* ci: tauri build

* chore: update appflowy-collab version

* ci: fix build

* ci: tauri with pnpm

* ci: fix build

* ci: comment out includetime

* chore: add the --quiet option (to only output errors and not warnings) to the configuration file

* ci: enable linux platform

---------

Co-authored-by: qinluhe <qinluhe.twodog@gmail.com>
This commit is contained in:
Nathan.fooo 2023-05-10 13:27:50 +08:00 committed by GitHub
parent 376f2d887d
commit a9c06632ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 277 additions and 100 deletions

View File

@ -2,11 +2,12 @@ name: Tauri-CI
on: on:
pull_request: pull_request:
paths: paths:
- "frontend/rust-lib/**" # - "frontend/rust-lib/**"
- "frontend/appflowy_tauri/**" # - "frontend/appflowy_tauri/**"
env: env:
NODE_VERSION: "16" NODE_VERSION: "16"
PNPM_VERSION: "7.17.1"
RUST_TOOLCHAIN: "1.65" RUST_TOOLCHAIN: "1.65"
jobs: jobs:
@ -14,8 +15,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# platform: [macos-latest, ubuntu-20.04, windows-latest] # platform: [macos-latest, ubuntu-20.04, windows-latest]
platform: [macos-latest] platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
steps: steps:
@ -45,6 +46,7 @@ jobs:
cargo install --force duckscript_cli cargo install --force duckscript_cli
vcpkg integrate install vcpkg integrate install
cargo make appflowy-tauri-deps-tools cargo make appflowy-tauri-deps-tools
npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: install dependencies (ubuntu only) - name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04' if: matrix.platform == 'ubuntu-20.04'
@ -54,28 +56,25 @@ jobs:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
cargo install --force cargo-make cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools cargo make appflowy-tauri-deps-tools
npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: install dependencies (macOS only) - name: install dependencies (macOS only)
if: matrix.platform == 'macos-latest' if: matrix.platform == 'macos-latest'
working-directory: frontend working-directory: frontend
run: | run: |
brew install llvm
cargo install --force cargo-make cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools cargo make appflowy-tauri-deps-tools
npm install -g pnpm@${{ env.PNPM_VERSION }}
# - name: lint
# working-directory: frontend/appflowy_tauri
# run: |
# yarn --frozen-lockfile
# yarn test:prettier
# yarn test:code
- name: build - name: build
working-directory: frontend/appflowy_tauri working-directory: frontend/appflowy_tauri
run: | run: |
mkdir dist mkdir dist
npm install pnpm install
cargo make --cwd .. tauri_build cargo make --cwd .. tauri_build
yarn && yarn build pnpm test:errors
- uses: tauri-apps/tauri-action@v0 - uses: tauri-apps/tauri-action@v0
env: env:

View File

@ -180,7 +180,7 @@
{ {
"label": "AF: Tauri UI Build", "label": "AF: Tauri UI Build",
"type": "shell", "type": "shell",
"command": "npm run build", "command": "pnpm run build",
"options": { "options": {
"cwd": "${workspaceFolder}/appflowy_tauri" "cwd": "${workspaceFolder}/appflowy_tauri"
} }

View File

@ -9,7 +9,7 @@
"preview": "vite preview", "preview": "vite preview",
"format": "prettier --write .", "format": "prettier --write .",
"test:code": "eslint --max-warnings=0 --ext .js,.ts,.tsx .", "test:code": "eslint --max-warnings=0 --ext .js,.ts,.tsx .",
"test:errors": "tsc --noEmit", "test:errors": "tsc --noEmit && eslint --quiet --ext .js,.ts,.tsx .",
"test:prettier": "yarn prettier --list-different src", "test:prettier": "yarn prettier --list-different src",
"tauri:clean": "cargo make --cwd .. tauri_clean", "tauri:clean": "cargo make --cwd .. tauri_clean",
"tauri:dev": "tauri dev" "tauri:dev": "tauri dev"

View File

@ -545,10 +545,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552" checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552"
dependencies = [ dependencies = [
"chrono", "chrono",
"chrono-tz-build", "chrono-tz-build 0.0.2",
"phf 0.10.1", "phf 0.10.1",
] ]
[[package]]
name = "chrono-tz"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf9cc2b23599e6d7479755f3594285efb3f74a1bdca7a7374948bc831e23a552"
dependencies = [
"chrono",
"chrono-tz-build 0.1.0",
"phf 0.11.1",
]
[[package]] [[package]]
name = "chrono-tz-build" name = "chrono-tz-build"
version = "0.0.2" version = "0.0.2"
@ -560,6 +571,17 @@ dependencies = [
"phf_codegen 0.10.0", "phf_codegen 0.10.0",
] ]
[[package]]
name = "chrono-tz-build"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9998fb9f7e9b2111641485bf8beb32f92945f97f92a3d061f744cfef335f751"
dependencies = [
"parse-zoneinfo",
"phf 0.11.1",
"phf_codegen 0.11.1",
]
[[package]] [[package]]
name = "clang-sys" name = "clang-sys"
version = "1.6.1" version = "1.6.1"
@ -640,11 +662,10 @@ dependencies = [
[[package]] [[package]]
name = "collab" name = "collab"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
"collab-persistence",
"lib0", "lib0",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"serde", "serde",
@ -655,16 +676,35 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-client-ws"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"bytes",
"collab-sync",
"futures-util",
"serde",
"serde_json",
"thiserror",
"tokio",
"tokio-retry",
"tokio-stream",
"tokio-tungstenite 0.18.0",
"tracing",
]
[[package]] [[package]]
name = "collab-database" name = "collab-database"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
"collab", "collab",
"collab-derive", "collab-derive",
"collab-persistence", "collab-persistence",
"collab-plugins",
"lazy_static", "lazy_static",
"lru", "lru",
"nanoid", "nanoid",
@ -680,7 +720,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-derive" name = "collab-derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -692,7 +732,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-document" name = "collab-document"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -709,7 +749,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-folder" name = "collab-folder"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -727,7 +767,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-persistence" name = "collab-persistence"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"bincode", "bincode",
"chrono", "chrono",
@ -744,6 +784,42 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-plugins"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"collab",
"collab-client-ws",
"collab-persistence",
"collab-sync",
"tracing",
"y-sync",
"yrs",
]
[[package]]
name = "collab-sync"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"bytes",
"collab",
"futures-util",
"lib0",
"md5",
"parking_lot 0.12.1",
"serde",
"serde_json",
"thiserror",
"tokio",
"tokio-stream",
"tokio-util",
"tracing",
"y-sync",
"yrs",
]
[[package]] [[package]]
name = "color_quant" name = "color_quant"
version = "1.1.0" version = "1.1.0"
@ -1458,9 +1534,10 @@ dependencies = [
"async-stream", "async-stream",
"bytes", "bytes",
"chrono", "chrono",
"chrono-tz 0.8.2",
"collab", "collab",
"collab-database", "collab-database",
"collab-persistence", "collab-plugins",
"dashmap", "dashmap",
"database-model", "database-model",
"fancy-regex 0.10.0", "fancy-regex 0.10.0",
@ -1550,7 +1627,7 @@ dependencies = [
"bytes", "bytes",
"collab", "collab",
"collab-document", "collab-document",
"collab-persistence", "collab-plugins",
"flowy-codegen", "flowy-codegen",
"flowy-derive", "flowy-derive",
"flowy-error", "flowy-error",
@ -1600,7 +1677,7 @@ dependencies = [
"chrono", "chrono",
"collab", "collab",
"collab-folder", "collab-folder",
"collab-persistence", "collab-plugins",
"flowy-codegen", "flowy-codegen",
"flowy-derive", "flowy-derive",
"flowy-document", "flowy-document",
@ -2811,7 +2888,7 @@ dependencies = [
"serde_repr", "serde_repr",
"strum_macros", "strum_macros",
"tokio", "tokio",
"tokio-tungstenite", "tokio-tungstenite 0.15.0",
"tracing", "tracing",
"url", "url",
] ]
@ -3547,6 +3624,15 @@ dependencies = [
"proc-macro-hack", "proc-macro-hack",
] ]
[[package]]
name = "phf"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
dependencies = [
"phf_shared 0.11.1",
]
[[package]] [[package]]
name = "phf_codegen" name = "phf_codegen"
version = "0.8.0" version = "0.8.0"
@ -3567,6 +3653,16 @@ dependencies = [
"phf_shared 0.10.0", "phf_shared 0.10.0",
] ]
[[package]]
name = "phf_codegen"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770"
dependencies = [
"phf_generator 0.11.1",
"phf_shared 0.11.1",
]
[[package]] [[package]]
name = "phf_generator" name = "phf_generator"
version = "0.8.0" version = "0.8.0"
@ -3587,6 +3683,16 @@ dependencies = [
"rand 0.8.5", "rand 0.8.5",
] ]
[[package]]
name = "phf_generator"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf"
dependencies = [
"phf_shared 0.11.1",
"rand 0.8.5",
]
[[package]] [[package]]
name = "phf_macros" name = "phf_macros"
version = "0.8.0" version = "0.8.0"
@ -3634,6 +3740,15 @@ dependencies = [
"uncased", "uncased",
] ]
[[package]]
name = "phf_shared"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676"
dependencies = [
"siphasher",
]
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "1.0.12" version = "1.0.12"
@ -4507,6 +4622,17 @@ dependencies = [
"opaque-debug", "opaque-debug",
] ]
[[package]]
name = "sha1"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
dependencies = [
"cfg-if",
"cpufeatures",
"digest 0.10.6",
]
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.10.6" version = "0.10.6"
@ -5037,7 +5163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a665751302f22a03c56721e23094e4dc22b04a80f381e6737a07bf7a7c70c0" checksum = "95a665751302f22a03c56721e23094e4dc22b04a80f381e6737a07bf7a7c70c0"
dependencies = [ dependencies = [
"chrono", "chrono",
"chrono-tz", "chrono-tz 0.6.1",
"globwalk", "globwalk",
"humansize", "humansize",
"lazy_static", "lazy_static",
@ -5211,6 +5337,29 @@ dependencies = [
"tokio", "tokio",
] ]
[[package]]
name = "tokio-retry"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
dependencies = [
"pin-project",
"rand 0.8.5",
"tokio",
]
[[package]]
name = "tokio-stream"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
"tokio-util",
]
[[package]] [[package]]
name = "tokio-tungstenite" name = "tokio-tungstenite"
version = "0.15.0" version = "0.15.0"
@ -5221,7 +5370,19 @@ dependencies = [
"log", "log",
"pin-project", "pin-project",
"tokio", "tokio",
"tungstenite", "tungstenite 0.14.0",
]
[[package]]
name = "tokio-tungstenite"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd"
dependencies = [
"futures-util",
"log",
"tokio",
"tungstenite 0.18.0",
] ]
[[package]] [[package]]
@ -5444,6 +5605,25 @@ dependencies = [
"utf-8", "utf-8",
] ]
[[package]]
name = "tungstenite"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788"
dependencies = [
"base64 0.13.1",
"byteorder",
"bytes",
"http",
"httparse",
"log",
"rand 0.8.5",
"sha1",
"thiserror",
"url",
"utf-8",
]
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.16.0" version = "1.16.0"
@ -6221,9 +6401,9 @@ dependencies = [
[[package]] [[package]]
name = "y-sync" name = "y-sync"
version = "0.3.0" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e77a143afe4dde83bc987ad3119228d0f107053a3da131a00738cb2d7f496641" checksum = "f54d34b68ec4514a0659838c2b1ba867c571b20b3804a1338dacf4fa9062d801"
dependencies = [ dependencies = [
"lib0", "lib0",
"thiserror", "thiserror",

View File

@ -33,11 +33,12 @@ default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"] custom-protocol = ["tauri/custom-protocol"]
[patch.crates-io] [patch.crates-io]
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
#collab = { path = "../../AppFlowy-Collab/collab" } #collab = { path = "../../AppFlowy-Collab/collab" }
#collab-folder = { path = "../../AppFlowy-Collab/collab-folder" } #collab-folder = { path = "../../AppFlowy-Collab/collab-folder" }

View File

@ -1,7 +1,7 @@
{ {
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build", "beforeBuildCommand": "pnpm run build",
"devPath": "http://localhost:1420", "devPath": "http://localhost:1420",
"distDir": "../dist", "distDir": "../dist",
"withGlobalTauri": false "withGlobalTauri": false

View File

@ -24,7 +24,9 @@ export const useDateTimeFormat = (cellIdentifier: CellIdentifier, fieldControlle
await changeFormat((option) => (option.time_format = format)); await changeFormat((option) => (option.time_format = format));
}; };
const includeTime = async (include: boolean) => { const includeTime = async (include: boolean) => {
await changeFormat((option) => (option.include_time = include)); await changeFormat((option) => {
// option.include_time = include;
});
}; };
return { return {

View File

@ -76,11 +76,11 @@ export const DateTypeOptions = ({
}; };
const toggleIncludeTime = async () => { const toggleIncludeTime = async () => {
if (dateType?.includeTime) { // if (dateType?.includeTime) {
await includeTime(false); // await includeTime(false);
} else { // } else {
await includeTime(true); // await includeTime(true);
} // }
}; };
return ( return (
@ -110,9 +110,9 @@ export const DateTypeOptions = ({
</i>*/} </i>*/}
<span>{t('grid.field.includeTime')}</span> <span>{t('grid.field.includeTime')}</span>
</div> </div>
<i className={'h-5 w-5'}> {/*<i className={'h-5 w-5'}>*/}
{dateType?.includeTime ? <EditorCheckSvg></EditorCheckSvg> : <EditorUncheckSvg></EditorUncheckSvg>} {/* {dateType?.includeTime ? <EditorCheckSvg></EditorCheckSvg> : <EditorUncheckSvg></EditorUncheckSvg>}*/}
</i> {/*</i>*/}
</button> </button>
<button <button

View File

@ -84,7 +84,6 @@ export default async function (viewId: string, fieldInfo: FieldInfo, dispatch?:
fieldOptions: { fieldOptions: {
dateFormat: typeOption.date_format, dateFormat: typeOption.date_format,
timeFormat: typeOption.time_format, timeFormat: typeOption.time_format,
includeTime: typeOption.include_time,
}, },
}; };
} }

View File

@ -26,7 +26,6 @@ export class DateCellDataPersistence extends CellDataPersistence<CalendarData> {
save(data: CalendarData): Promise<Result<void, FlowyError>> { save(data: CalendarData): Promise<Result<void, FlowyError>> {
const payload = DateChangesetPB.fromObject({ cell_path: _makeCellPath(this.cellIdentifier) }); const payload = DateChangesetPB.fromObject({ cell_path: _makeCellPath(this.cellIdentifier) });
payload.date = ((data.date.getTime() / 1000) | 0).toString(); payload.date = ((data.date.getTime() / 1000) | 0).toString();
payload.is_utc = true;
if (data.time !== undefined) { if (data.time !== undefined) {
payload.time = data.time; payload.time = data.time;
} }

View File

@ -15,7 +15,7 @@ export interface ISelectOptionType {
export interface IDateType { export interface IDateType {
dateFormat: DateFormatPB; dateFormat: DateFormatPB;
timeFormat: TimeFormatPB; timeFormat: TimeFormatPB;
includeTime: boolean; // includeTime: boolean;
} }
export interface INumberType { export interface INumberType {

View File

@ -566,11 +566,10 @@ dependencies = [
[[package]] [[package]]
name = "collab" name = "collab"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
"collab-persistence",
"lib0", "lib0",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"serde", "serde",
@ -581,10 +580,28 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-client-ws"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"bytes",
"collab-sync",
"futures-util",
"serde",
"serde_json",
"thiserror",
"tokio",
"tokio-retry",
"tokio-stream",
"tokio-tungstenite 0.18.0",
"tracing",
]
[[package]] [[package]]
name = "collab-database" name = "collab-database"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -607,7 +624,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-derive" name = "collab-derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -619,7 +636,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-document" name = "collab-document"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -636,7 +653,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-folder" name = "collab-folder"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -654,7 +671,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-persistence" name = "collab-persistence"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"bincode", "bincode",
"chrono", "chrono",
@ -674,12 +691,12 @@ dependencies = [
[[package]] [[package]]
name = "collab-plugins" name = "collab-plugins"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"collab", "collab",
"collab-client-ws",
"collab-persistence", "collab-persistence",
"collab-sync", "collab-sync",
"collab-ws",
"tracing", "tracing",
"y-sync", "y-sync",
"yrs", "yrs",
@ -688,7 +705,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-sync" name = "collab-sync"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [ dependencies = [
"bytes", "bytes",
"collab", "collab",
@ -707,23 +724,6 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-ws"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=46c9a1#46c9a199af9b2654080bebdcd9637b7a5d7bffe8"
dependencies = [
"bytes",
"futures-util",
"serde",
"serde_json",
"thiserror",
"tokio",
"tokio-retry",
"tokio-stream",
"tokio-tungstenite 0.18.0",
"tracing",
]
[[package]] [[package]]
name = "color-eyre" name = "color-eyre"
version = "0.5.11" version = "0.5.11"
@ -1402,7 +1402,6 @@ dependencies = [
"chrono-tz 0.8.2", "chrono-tz 0.8.2",
"collab", "collab",
"collab-database", "collab-database",
"collab-persistence",
"collab-plugins", "collab-plugins",
"dashmap", "dashmap",
"database-model", "database-model",
@ -1505,7 +1504,6 @@ dependencies = [
"bytes", "bytes",
"collab", "collab",
"collab-document", "collab-document",
"collab-persistence",
"collab-plugins", "collab-plugins",
"flowy-codegen", "flowy-codegen",
"flowy-derive", "flowy-derive",
@ -1558,7 +1556,6 @@ dependencies = [
"chrono", "chrono",
"collab", "collab",
"collab-folder", "collab-folder",
"collab-persistence",
"collab-plugins", "collab-plugins",
"flowy-codegen", "flowy-codegen",
"flowy-derive", "flowy-derive",

View File

@ -40,13 +40,13 @@ opt-level = 3
incremental = false incremental = false
[patch.crates-io] [patch.crates-io]
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
collab-sync= { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" } collab-sync= { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
#collab = { path = "../AppFlowy-Collab/collab" } #collab = { path = "../AppFlowy-Collab/collab" }
#collab-folder = { path = "../AppFlowy-Collab/collab-folder" } #collab-folder = { path = "../AppFlowy-Collab/collab-folder" }

View File

@ -7,7 +7,6 @@ edition = "2021"
[dependencies] [dependencies]
collab = { version = "0.1.0" } collab = { version = "0.1.0" }
collab-persistence = { version = "0.1.0" }
collab-database = { version = "0.1.0" } collab-database = { version = "0.1.0" }
collab-plugins = {version = "0.1.0", feature = ["disk_rocksdb", "sync"]} collab-plugins = {version = "0.1.0", feature = ["disk_rocksdb", "sync"]}

View File

@ -5,8 +5,8 @@ use std::sync::Arc;
use collab_database::database::DatabaseData; use collab_database::database::DatabaseData;
use collab_database::user::UserDatabase as InnerUserDatabase; use collab_database::user::UserDatabase as InnerUserDatabase;
use collab_database::views::{CreateDatabaseParams, CreateViewParams}; use collab_database::views::{CreateDatabaseParams, CreateViewParams};
use collab_persistence::kv::rocks_kv::RocksCollabDB; use collab_plugins::disk::kv::rocks_kv::RocksCollabDB;
use collab_plugins::disk_plugin::rocksdb::Config; use collab_plugins::disk::rocksdb::Config;
use parking_lot::Mutex; use parking_lot::Mutex;
use tokio::sync::RwLock; use tokio::sync::RwLock;

View File

@ -7,7 +7,6 @@ edition = "2021"
[dependencies] [dependencies]
collab = { version = "0.1.0" } collab = { version = "0.1.0" }
collab-persistence = { version = "0.1.0" }
collab-document = { version = "0.1.0" } collab-document = { version = "0.1.0" }
collab-plugins = {version = "0.1.0", feature = ["disk_rocksdb", "sync"]} collab-plugins = {version = "0.1.0", feature = ["disk_rocksdb", "sync"]}

View File

@ -1,9 +1,10 @@
use collab::preclude::{Collab, CollabBuilder};
use collab_persistence::kv::rocks_kv::RocksCollabDB;
use collab_plugins::disk_plugin::rocksdb::RocksdbDiskPlugin;
use parking_lot::RwLock;
use std::{collections::HashMap, sync::Arc}; use std::{collections::HashMap, sync::Arc};
use collab::preclude::{Collab, CollabBuilder};
use collab_plugins::disk::kv::rocks_kv::RocksCollabDB;
use collab_plugins::disk::rocksdb::RocksdbDiskPlugin;
use parking_lot::RwLock;
use flowy_error::{FlowyError, FlowyResult}; use flowy_error::{FlowyError, FlowyResult};
use crate::{ use crate::{

View File

@ -1,10 +1,12 @@
use collab_persistence::kv::rocks_kv::RocksCollabDB;
use flowy_document2::manager::DocumentUser;
use parking_lot::Once;
use std::sync::Arc; use std::sync::Arc;
use collab_plugins::disk::kv::rocks_kv::RocksCollabDB;
use parking_lot::Once;
use tempfile::TempDir; use tempfile::TempDir;
use tracing_subscriber::{fmt::Subscriber, util::SubscriberInitExt, EnvFilter}; use tracing_subscriber::{fmt::Subscriber, util::SubscriberInitExt, EnvFilter};
use flowy_document2::manager::DocumentUser;
pub struct FakeUser { pub struct FakeUser {
kv: Arc<RocksCollabDB>, kv: Arc<RocksCollabDB>,
} }

View File

@ -8,7 +8,6 @@ edition = "2021"
[dependencies] [dependencies]
collab = { version = "0.1.0" } collab = { version = "0.1.0" }
collab-folder = { version = "0.1.0" } collab-folder = { version = "0.1.0" }
collab-persistence = { version = "0.1.0" }
collab-plugins = {version = "0.1.0", feature = ["disk_rocksdb", "sync"]} collab-plugins = {version = "0.1.0", feature = ["disk_rocksdb", "sync"]}
flowy-derive = { path = "../flowy-derive" } flowy-derive = { path = "../flowy-derive" }

View File

@ -7,8 +7,8 @@ use collab_folder::core::{
Folder as InnerFolder, FolderContext, TrashChange, TrashChangeReceiver, TrashInfo, TrashRecord, Folder as InnerFolder, FolderContext, TrashChange, TrashChangeReceiver, TrashInfo, TrashRecord,
View, ViewChange, ViewChangeReceiver, ViewLayout, Workspace, View, ViewChange, ViewChangeReceiver, ViewLayout, Workspace,
}; };
use collab_persistence::kv::rocks_kv::RocksCollabDB; use collab_plugins::disk::kv::rocks_kv::RocksCollabDB;
use collab_plugins::disk_plugin::rocksdb::RocksdbDiskPlugin; use collab_plugins::disk::rocksdb::RocksdbDiskPlugin;
use parking_lot::Mutex; use parking_lot::Mutex;
use tracing::{event, Level}; use tracing::{event, Level};