chore: move client folders (#948)

This commit is contained in:
DarkSky 2023-02-10 20:41:01 +08:00 committed by GitHub
parent cb118149f3
commit 8a7393a961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
235 changed files with 114 additions and 215 deletions

View File

@ -1,6 +1,6 @@
FROM node:16-alpine as relocate FROM node:16-alpine as relocate
WORKDIR /app WORKDIR /app
COPY ./packages/app/out ./dist COPY ./apps/web/out ./dist
COPY ./.github/deployment/Caddyfile ./Caddyfile COPY ./.github/deployment/Caddyfile ./Caddyfile
FROM caddy:2.6.2-alpine FROM caddy:2.6.2-alpine

View File

@ -78,7 +78,7 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
path: ./packages/app/out path: ./apps/web/out
push_to_registry: push_to_registry:
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images # See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
@ -104,7 +104,7 @@ jobs:
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: artifact name: artifact
path: packages/app/out/ path: apps/web/out/
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2

View File

@ -63,7 +63,7 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
path: ./packages/app/.next path: ./apps/web/.next
lint: lint:
name: Lint and E2E Test name: Lint and E2E Test
@ -99,7 +99,7 @@ jobs:
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: artifact name: artifact
path: packages/app/.next/ path: apps/web/.next/
- name: Lint & E2E Test & Unit Test - name: Lint & E2E Test & Unit Test
run: | run: |
@ -187,7 +187,7 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
path: ./packages/app/out path: ./apps/web/out
publish-community: publish-community:
name: Push Community Image name: Push Community Image
@ -213,7 +213,7 @@ jobs:
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: artifact name: artifact
path: packages/app/out/ path: apps/web/out/
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2
@ -316,7 +316,7 @@ jobs:
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: artifact name: artifact
path: packages/app/out/ path: apps/web/out/
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2

View File

@ -57,7 +57,7 @@ jobs:
- name: Make macOS (x64) - name: Make macOS (x64)
run: pnpm build:app run: pnpm build:app
working-directory: client-app working-directory: apps/desktop
env: env:
CI: true CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }} CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
@ -69,6 +69,6 @@ jobs:
with: with:
draft: true draft: true
generate_release_notes: true generate_release_notes: true
files: client-app/src-tauri/target/release/bundle/dmg/*.dmg files: apps/desktop/src-tauri/target/release/bundle/dmg/*.dmg
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -63,7 +63,7 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
path: ./packages/app/out path: ./apps/web/out
publish-self-hosted: publish-self-hosted:
name: Push Community Image name: Push Community Image
@ -88,7 +88,7 @@ jobs:
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: artifact name: artifact
path: packages/app/out/ path: apps/web/out/
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2

4
.gitignore vendored
View File

@ -60,5 +60,5 @@ module-resolve.cjs
.eslintcache .eslintcache
# generated assets # generated assets
client-app/public/affine-out apps/desktop/public/affine-out
client-app/public/preload apps/desktop/public/preload

5
.gitmodules vendored
View File

@ -1,3 +1,4 @@
[submodule "client-app/src-OctoBase"] [submodule "apps/desktop/src-OctoBase"]
path = client-app/src-OctoBase path = apps/desktop/src-OctoBase
url = https://github.com/toeverything/OctoBase url = https://github.com/toeverything/OctoBase
branch = master

View File

@ -27,5 +27,5 @@
"[toml]": { "[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml" "editor.defaultFormatter": "tamasfe.even-better-toml"
}, },
"rust-analyzer.linkedProjects": ["client-app/src-tauri/Cargo.toml"] "rust-analyzer.linkedProjects": ["apps/desktop/src-tauri/Cargo.toml"]
} }

View File

@ -14,7 +14,7 @@ pnpm tauri dev
## Development ## Development
Currently client-app depends on a rapidly developing rust library "Octobase", we use git-submodule to link it currently. Currently desktop client depends on a rapidly developing rust library "Octobase", we use git-submodule to link it currently.
We will provide its binary binding soon, to replace the git-submodule, before Octobase become opensource. We will provide its binary binding soon, to replace the git-submodule, before Octobase become opensource.

View File

@ -7,7 +7,7 @@
"module": "true", "module": "true",
"scripts": { "scripts": {
"dev:app": "pnpm build:preload && cross-env NODE_ENV=development tauri dev", "dev:app": "pnpm build:preload && cross-env NODE_ENV=development tauri dev",
"dev:prerequisite": "concurrently \"cd ../packages/data-center && pnpm dev\" \"cd ../packages/app && pnpm dev\"", "dev:prerequisite": "concurrently \"cd ../packages/data-center && pnpm dev\" \"cd ../apps/web && pnpm dev\"",
"build:prerequisite": "pnpm build:submodules && pnpm build:rs-types && pnpm build:affine && pnpm build:preload", "build:prerequisite": "pnpm build:submodules && pnpm build:rs-types && pnpm build:affine && pnpm build:preload",
"build:rs-types": "zx scripts/generateTsTypingsFromJsonSchema.mjs", "build:rs-types": "zx scripts/generateTsTypingsFromJsonSchema.mjs",
"build:submodules": "zx scripts/buildSubModules.mjs", "build:submodules": "zx scripts/buildSubModules.mjs",

View File

@ -4,7 +4,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
const repoDirectory = path.join(__dirname, '..', '..'); const repoDirectory = path.join(__dirname, '..', '..', '..');
const clientAppDirectory = path.join(__dirname, '..'); const clientAppDirectory = path.join(__dirname, '..');
const publicDistributionDirectory = path.join(clientAppDirectory, 'public'); const publicDistributionDirectory = path.join(clientAppDirectory, 'public');
const affineSrcDirectory = path.join(repoDirectory, 'packages', 'app'); const affineSrcDirectory = path.join(repoDirectory, 'packages', 'app');

@ -0,0 +1 @@
Subproject commit f8ce0c0f0547b04efe50d249643217bec7b85c77

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 947 B

After

Width:  |  Height:  |  Size: 947 B

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -30,6 +30,7 @@ const getRedirectConfig = profile => {
}, },
], ],
target, target,
profile || 'dev',
]; ];
}; };
@ -62,10 +63,10 @@ const nextConfig = {
unoptimized: true, unoptimized: true,
}, },
rewrites: async () => { rewrites: async () => {
const [profile, desc] = getRedirectConfig(process.env.NODE_API_SERVER); const [profile, target, desc] = getRedirectConfig(
printer.info( process.env.NODE_API_SERVER
`API request proxy to [${process.env.NODE_API_SERVER} Server]: ` + desc
); );
printer.info(`API request proxy to [${desc} Server]: ` + target);
return profile; return profile;
}, },
basePath: process.env.BASE_PATH, basePath: process.env.BASE_PATH,

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 299 KiB

After

Width:  |  Height:  |  Size: 299 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Some files were not shown because too many files have changed in this diff Show More