mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
Compare commits
11 Commits
v0.11.0-ca
...
v0.11.0-ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06912c6885 | ||
|
|
ec7f73f168 | ||
|
|
cfb77e8243 | ||
|
|
aa4d42b36c | ||
|
|
9fbd9b39d6 | ||
|
|
aeec68b0d7 | ||
|
|
fb1ed90ecc | ||
|
|
cc73124259 | ||
|
|
c2db8b356c | ||
|
|
eaa62df2dd | ||
|
|
332a5c6685 |
4
.github/actions/setup-version/action.yml
vendored
4
.github/actions/setup-version/action.yml
vendored
@@ -1,5 +1,9 @@
|
|||||||
name: Setup Version
|
name: Setup Version
|
||||||
description: 'Setup Version'
|
description: 'Setup Version'
|
||||||
|
outputs:
|
||||||
|
APP_VERSION:
|
||||||
|
description: 'App Version'
|
||||||
|
value: ${{ steps.version.outputs.APP_VERSION }}
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
4
.github/workflows/deploy-automatically.yml
vendored
4
.github/workflows/deploy-automatically.yml
vendored
@@ -1,11 +1,11 @@
|
|||||||
name: Deploy by tag or schedule
|
name: Deploy Automatically
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-canary.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-canary.[0-9]+'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 7 * * *'
|
- cron: '0 9 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dispatch-deploy:
|
dispatch-deploy:
|
||||||
|
|||||||
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
@@ -23,6 +23,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Version
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
uses: ./.github/actions/setup-version
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -43,6 +44,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Version
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
uses: ./.github/actions/setup-version
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -76,6 +78,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Version
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
uses: ./.github/actions/setup-version
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -99,6 +102,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Version
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
uses: ./.github/actions/setup-version
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -220,6 +224,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Version
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
uses: ./.github/actions/setup-version
|
uses: ./.github/actions/setup-version
|
||||||
- name: Deploy to ${{ github.event.inputs.flavor }}
|
- name: Deploy to ${{ github.event.inputs.flavor }}
|
||||||
uses: ./.github/actions/deploy
|
uses: ./.github/actions/deploy
|
||||||
|
|||||||
258
.github/workflows/nightly-build.yml
vendored
258
.github/workflows/nightly-build.yml
vendored
@@ -1,258 +0,0 @@
|
|||||||
name: Build Canary Desktop App on Staging Branch
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
channel_override:
|
|
||||||
description: 'channel type (canary, beta, or stable)'
|
|
||||||
type: choice
|
|
||||||
default: beta
|
|
||||||
options:
|
|
||||||
- canary
|
|
||||||
- beta
|
|
||||||
- stable
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
# 0.6.x-staging
|
|
||||||
- v[0-9]+.[0-9]+.x-staging
|
|
||||||
# 0.6.1-staging
|
|
||||||
- v[0-9]+.[0-9]+.[0-9]+-staging
|
|
||||||
paths-ignore:
|
|
||||||
- README.md
|
|
||||||
- .github/**
|
|
||||||
- '!.github/workflows/nightly-build.yml'
|
|
||||||
- '!.github/actions/build-rust/action.yml'
|
|
||||||
- '!.github/actions/setup-node/action.yml'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
contents: write
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
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:
|
|
||||||
# BUILD_TYPE => app icon, app name, etc
|
|
||||||
BUILD_TYPE: internal
|
|
||||||
# BUILD_TYPE_OVERRIDE => channel type (canary, beta, or stable) - get the channel type (the api configs)
|
|
||||||
BUILD_TYPE_OVERRIDE: ${{ github.event.inputs.channel_override || 'beta' }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
set-build-version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
version: 0.0.0-internal.${{ steps.version.outputs.version }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: toeverything/set-build-version@latest
|
|
||||||
- id: version
|
|
||||||
run: echo ::set-output name=version::${{ env.BUILD_VERSION }}
|
|
||||||
|
|
||||||
before-make:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- set-build-version
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
- name: Setup @sentry/cli
|
|
||||||
uses: ./.github/actions/setup-sentry
|
|
||||||
- name: Replace Version
|
|
||||||
run: ./scripts/set-version.sh ${{ needs.set-build-version.outputs.version }}
|
|
||||||
- name: generate-assets
|
|
||||||
run: yarn workspace @affine/electron generate-assets
|
|
||||||
env:
|
|
||||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
||||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
||||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
||||||
RELEASE_VERSION: ${{ needs.set-build-version.outputs.version }}
|
|
||||||
SKIP_PLUGIN_BUILD: 'true'
|
|
||||||
SKIP_NX_CACHE: 'true'
|
|
||||||
|
|
||||||
- name: Upload core artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: core
|
|
||||||
path: packages/frontend/electron/resources/web-static
|
|
||||||
|
|
||||||
make-distribution:
|
|
||||||
strategy:
|
|
||||||
# all combinations: macos-latest x64, macos-latest arm64, ubuntu-latest x64
|
|
||||||
# For windows, we need a separate approach
|
|
||||||
matrix:
|
|
||||||
spec:
|
|
||||||
- runner: macos-latest
|
|
||||||
platform: darwin
|
|
||||||
arch: x64
|
|
||||||
target: x86_64-apple-darwin
|
|
||||||
- runner: macos-latest
|
|
||||||
platform: darwin
|
|
||||||
arch: arm64
|
|
||||||
target: aarch64-apple-darwin
|
|
||||||
- runner: ubuntu-latest
|
|
||||||
platform: linux
|
|
||||||
arch: x64
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- runner: windows-latest
|
|
||||||
platform: win32
|
|
||||||
arch: x64
|
|
||||||
target: x86_64-pc-windows-msvc
|
|
||||||
runs-on: ${{ matrix.spec.runner }}
|
|
||||||
needs:
|
|
||||||
- before-make
|
|
||||||
- set-build-version
|
|
||||||
env:
|
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
SKIP_GENERATE_ASSETS: 1
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Node.js
|
|
||||||
timeout-minutes: 10
|
|
||||||
if: ${{ matrix.spec.platform == 'darwin' }}
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
with:
|
|
||||||
extra-flags: workspaces focus @affine/electron @affine/monorepo
|
|
||||||
hard-link-nm: false
|
|
||||||
build-plugins: false
|
|
||||||
nmHoistingLimits: workspaces
|
|
||||||
enableScripts: false
|
|
||||||
- name: Setup Node.js
|
|
||||||
timeout-minutes: 10
|
|
||||||
if: ${{ matrix.spec.platform != 'darwin' }}
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
with:
|
|
||||||
extra-flags: workspaces focus @affine/electron @affine/monorepo
|
|
||||||
hard-link-nm: false
|
|
||||||
build-plugins: false
|
|
||||||
nmHoistingLimits: workspaces
|
|
||||||
- name: Build AFFiNE native
|
|
||||||
uses: ./.github/actions/build-rust
|
|
||||||
with:
|
|
||||||
target: ${{ matrix.spec.target }}
|
|
||||||
package: '@affine/native'
|
|
||||||
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
|
||||||
- name: Replace Version
|
|
||||||
run: ./scripts/set-version.sh ${{ needs.set-build-version.outputs.version }}
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: core
|
|
||||||
path: packages/frontend/electron/resources/web-static
|
|
||||||
|
|
||||||
- name: Build Plugins
|
|
||||||
run: yarn run build:plugins
|
|
||||||
|
|
||||||
- name: Build Desktop Layers
|
|
||||||
run: yarn workspace @affine/electron build
|
|
||||||
|
|
||||||
- name: Signing By Apple Developer ID
|
|
||||||
if: ${{ matrix.spec.platform == 'darwin' }}
|
|
||||||
uses: apple-actions/import-codesign-certs@v2
|
|
||||||
with:
|
|
||||||
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
|
|
||||||
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
|
||||||
|
|
||||||
- name: make
|
|
||||||
run: yarn workspace @affine/electron make --platform=${{ matrix.spec.platform }} --arch=${{ matrix.spec.arch }}
|
|
||||||
env:
|
|
||||||
SKIP_PLUGIN_BUILD: 1
|
|
||||||
SKIP_WEB_BUILD: 1
|
|
||||||
HOIST_NODE_MODULES: 1
|
|
||||||
|
|
||||||
- name: Save artifacts (mac)
|
|
||||||
if: ${{ matrix.spec.platform == 'darwin' }}
|
|
||||||
run: |
|
|
||||||
mkdir -p builds
|
|
||||||
mv packages/frontend/electron/out/*/make/*.dmg ./builds/affine-${{ env.BUILD_TYPE }}-macos-${{ matrix.spec.arch }}.dmg
|
|
||||||
mv packages/frontend/electron/out/*/make/zip/darwin/${{ matrix.spec.arch }}/*.zip ./builds/affine-${{ env.BUILD_TYPE }}-macos-${{ matrix.spec.arch }}.zip
|
|
||||||
- name: Save artifacts (windows)
|
|
||||||
if: ${{ matrix.spec.platform == 'win32' }}
|
|
||||||
run: |
|
|
||||||
mkdir -p builds
|
|
||||||
mv packages/frontend/electron/out/*/make/zip/win32/x64/AFFiNE*-win32-x64-*.zip ./builds/affine-${{ env.BUILD_TYPE }}-windows-x64.zip
|
|
||||||
mv packages/frontend/electron/out/*/make/squirrel.windows/x64/*.exe ./builds/affine-${{ env.BUILD_TYPE }}-windows-x64.exe
|
|
||||||
mv packages/frontend/electron/out/*/make/squirrel.windows/x64/*.msi ./builds/affine-${{ env.BUILD_TYPE }}-windows-x64.msi
|
|
||||||
mv packages/frontend/electron/out/*/make/squirrel.windows/x64/*.nupkg ./builds/affine-${{ env.BUILD_TYPE }}-windows-x64.nupkg
|
|
||||||
|
|
||||||
- name: Save artifacts (linux)
|
|
||||||
if: ${{ matrix.spec.platform == 'linux' }}
|
|
||||||
run: |
|
|
||||||
mkdir -p builds
|
|
||||||
mv packages/frontend/electron/out/*/make/zip/linux/x64/*.zip ./builds/affine-${{ env.BUILD_TYPE }}-linux-x64.zip
|
|
||||||
mv packages/frontend/electron/out/*/make/AppImage/x64/*.AppImage ./builds/affine-${{ env.BUILD_TYPE }}-linux-x64.AppImage
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: affine-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}-builds
|
|
||||||
path: builds
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs:
|
|
||||||
- make-distribution
|
|
||||||
- set-build-version
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Download Artifacts (macos-x64)
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: affine-darwin-x64-builds
|
|
||||||
path: ./
|
|
||||||
- name: Download Artifacts (macos-arm64)
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: affine-darwin-arm64-builds
|
|
||||||
path: ./
|
|
||||||
- name: Download Artifacts (windows-x64)
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: affine-win32-x64-builds
|
|
||||||
path: ./
|
|
||||||
- name: Download Artifacts (linux-x64)
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: affine-linux-x64-builds
|
|
||||||
path: ./
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
- name: Generate Release yml
|
|
||||||
run: |
|
|
||||||
node ./packages/frontend/electron/scripts/generate-yml.js
|
|
||||||
env:
|
|
||||||
RELEASE_VERSION: ${{ needs.set-build-version.outputs.version }}
|
|
||||||
- name: Generate SHA512 checksums
|
|
||||||
run: |
|
|
||||||
sha512sum *-linux-* > SHA512SUMS.txt
|
|
||||||
sha512sum *-macos-* >> SHA512SUMS.txt
|
|
||||||
sha512sum *-windows-* >> SHA512SUMS.txt
|
|
||||||
- name: Create Release Draft
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
with:
|
|
||||||
repository: 'toeverything/AFFiNE-Releases'
|
|
||||||
name: ${{ needs.set-build-version.outputs.version }}
|
|
||||||
tag_name: ${{ needs.set-build-version.outputs.version }}
|
|
||||||
prerelease: true
|
|
||||||
files: |
|
|
||||||
./SHA512SUMS.txt
|
|
||||||
./VERSION
|
|
||||||
./*.zip
|
|
||||||
./*.dmg
|
|
||||||
./*.exe
|
|
||||||
./*.nupkg
|
|
||||||
./RELEASES
|
|
||||||
./*.AppImage
|
|
||||||
./*.apk
|
|
||||||
./*.yml
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
name: Release Desktop by tag or schedule
|
name: Release Desktop Automatically
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-canary.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-canary.[0-9]+'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 7 * * *'
|
- cron: '0 9 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dispatch-release-desktop:
|
dispatch-release-desktop:
|
||||||
@@ -17,11 +17,11 @@ jobs:
|
|||||||
uses: benc-uk/workflow-dispatch@v1
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
with:
|
with:
|
||||||
workflow: release-desktop.yml
|
workflow: release-desktop.yml
|
||||||
inputs: '{ "build-type": "canary", "is-draft": true, "is-pre-release": true }'
|
inputs: '{ "build-type": "canary", "is-draft": false, "is-pre-release": true }'
|
||||||
- name: dispatch desktop release by schedule
|
- name: dispatch desktop release by schedule
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
uses: benc-uk/workflow-dispatch@v1
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
with:
|
with:
|
||||||
workflow: release-desktop.yml
|
workflow: release-desktop.yml
|
||||||
inputs: '{ "build-type": "canary", "is-draft": true, "is-pre-release": true }'
|
inputs: '{ "build-type": "canary", "is-draft": false, "is-pre-release": true }'
|
||||||
ref: canary
|
ref: canary
|
||||||
|
|||||||
11
.github/workflows/release-desktop.yml
vendored
11
.github/workflows/release-desktop.yml
vendored
@@ -43,6 +43,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Version
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
uses: ./.github/actions/setup-version
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -92,6 +93,9 @@ jobs:
|
|||||||
SKIP_GENERATE_ASSETS: 1
|
SKIP_GENERATE_ASSETS: 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -166,6 +170,9 @@ jobs:
|
|||||||
SKIP_GENERATE_ASSETS: 1
|
SKIP_GENERATE_ASSETS: 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@@ -355,8 +362,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.before-make.outputs.RELEASE_VERSION }}
|
name: ${{ needs.before-make.outputs.RELEASE_VERSION }}
|
||||||
body: ''
|
body: ''
|
||||||
draft: ${{ github.event.inputs.is-draft || true }}
|
draft: ${{ github.event.inputs.is-draft }}
|
||||||
prerelease: ${{ github.event.inputs.is-pre-release || true }}
|
prerelease: ${{ github.event.inputs.is-pre-release }}
|
||||||
files: |
|
files: |
|
||||||
./VERSION
|
./VERSION
|
||||||
./*.zip
|
./*.zip
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||||
"eslint-plugin-sonarjs": "^0.23.0",
|
"eslint-plugin-sonarjs": "^0.23.0",
|
||||||
"eslint-plugin-unicorn": "^49.0.0",
|
"eslint-plugin-unicorn": "^50.0.0",
|
||||||
"eslint-plugin-unused-imports": "^3.0.0",
|
"eslint-plugin-unused-imports": "^3.0.0",
|
||||||
"eslint-plugin-vue": "^9.18.1",
|
"eslint-plugin-vue": "^9.18.1",
|
||||||
"fake-indexeddb": "5.0.1",
|
"fake-indexeddb": "5.0.1",
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ export class ServerConfigType {
|
|||||||
|
|
||||||
@Field({ description: 'server flavor' })
|
@Field({ description: 'server flavor' })
|
||||||
flavor!: string;
|
flavor!: string;
|
||||||
|
|
||||||
|
@Field({ description: 'server base url' })
|
||||||
|
baseUrl!: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ServerConfigResolver {
|
export class ServerConfigResolver {
|
||||||
@@ -20,6 +23,7 @@ export class ServerConfigResolver {
|
|||||||
return {
|
return {
|
||||||
version: AFFiNE.version,
|
version: AFFiNE.version,
|
||||||
flavor: SERVER_FLAVOR,
|
flavor: SERVER_FLAVOR,
|
||||||
|
baseUrl: AFFiNE.baseUrl,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ type ServerConfigType {
|
|||||||
|
|
||||||
"""server flavor"""
|
"""server flavor"""
|
||||||
flavor: String!
|
flavor: String!
|
||||||
|
|
||||||
|
"""server base url"""
|
||||||
|
baseUrl: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserQuotaHumanReadable {
|
type UserQuotaHumanReadable {
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ export async function migratePages(
|
|||||||
const oldVersions = versions?.toJSON() ?? {};
|
const oldVersions = versions?.toJSON() ?? {};
|
||||||
|
|
||||||
spaces.forEach((space: YDoc) => {
|
spaces.forEach((space: YDoc) => {
|
||||||
schema.upgradePage(0, oldVersions, space);
|
try {
|
||||||
|
// Catch page upgrade error to avoid blocking the whole workspace migration.
|
||||||
|
schema.upgradePage(0, oldVersions, space);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
schema.upgradeWorkspace(rootDoc);
|
schema.upgradeWorkspace(rootDoc);
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ interface ExportMenuItemProps<T> {
|
|||||||
|
|
||||||
interface ExportProps {
|
interface ExportProps {
|
||||||
exportHandler: (type: 'pdf' | 'html' | 'png' | 'markdown') => Promise<void>;
|
exportHandler: (type: 'pdf' | 'html' | 'png' | 'markdown') => Promise<void>;
|
||||||
|
pageMode?: 'page' | 'edgeless';
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ export function ExportMenuItem<T>({
|
|||||||
export const ExportMenuItems = ({
|
export const ExportMenuItems = ({
|
||||||
exportHandler,
|
exportHandler,
|
||||||
className = transitionStyle,
|
className = transitionStyle,
|
||||||
|
pageMode = 'page',
|
||||||
}: ExportProps) => {
|
}: ExportProps) => {
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
const itemMap = useMemo(
|
const itemMap = useMemo(
|
||||||
@@ -94,16 +96,23 @@ export const ExportMenuItems = ({
|
|||||||
],
|
],
|
||||||
[className, exportHandler, t]
|
[className, exportHandler, t]
|
||||||
);
|
);
|
||||||
const items = itemMap.map(({ component: Component, props }) => (
|
const items = itemMap.map(({ component: Component, props }) =>
|
||||||
<Component key={props.label} {...props} />
|
pageMode === 'edgeless' &&
|
||||||
));
|
(props.type === 'pdf' || props.type === 'png') ? null : (
|
||||||
|
<Component key={props.label} {...props} />
|
||||||
|
)
|
||||||
|
);
|
||||||
return items;
|
return items;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Export = ({ exportHandler, className }: ExportProps) => {
|
export const Export = ({ exportHandler, className, pageMode }: ExportProps) => {
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
const items = (
|
const items = (
|
||||||
<ExportMenuItems exportHandler={exportHandler} className={className} />
|
<ExportMenuItems
|
||||||
|
exportHandler={exportHandler}
|
||||||
|
className={className}
|
||||||
|
pageMode={pageMode}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<MenuSub
|
<MenuSub
|
||||||
|
|||||||
@@ -391,7 +391,6 @@ export const createConfiguration: (
|
|||||||
proxy: {
|
proxy: {
|
||||||
'/api/worker/': {
|
'/api/worker/': {
|
||||||
target: 'https://affine-worker.toeverything.workers.dev',
|
target: 'https://affine-worker.toeverything.workers.dev',
|
||||||
pathRewrite: { '^/api/worker/': '/api/' },
|
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
enablePayment: true,
|
enablePayment: true,
|
||||||
enablePageHistory: false,
|
enablePageHistory: false,
|
||||||
enableCopilot: false,
|
enableCopilot: false,
|
||||||
serverUrlPrefix: 'https://insider.affine.pro', // Let insider be stable environment temporarily.
|
serverUrlPrefix: 'https://app.affine.pro',
|
||||||
editorFlags,
|
editorFlags,
|
||||||
appVersion: packageJson.version,
|
appVersion: packageJson.version,
|
||||||
editorVersion: packageJson.dependencies['@blocksuite/presets'],
|
editorVersion: packageJson.dependencies['@blocksuite/presets'],
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
"@radix-ui/react-dialog": "^1.0.4",
|
"@radix-ui/react-dialog": "^1.0.4",
|
||||||
"@radix-ui/react-scroll-area": "^1.0.5",
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
||||||
"@radix-ui/react-select": "^2.0.0",
|
"@radix-ui/react-select": "^2.0.0",
|
||||||
"@react-hookz/web": "^23.1.0",
|
"@react-hookz/web": "^24.0.0",
|
||||||
"@sentry/integrations": "^7.83.0",
|
"@sentry/integrations": "^7.83.0",
|
||||||
"@sentry/react": "^7.83.0",
|
"@sentry/react": "^7.83.0",
|
||||||
"@toeverything/theme": "^0.7.20",
|
"@toeverything/theme": "^0.7.20",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
|||||||
import { useWorkspace } from '@toeverything/hooks/use-workspace';
|
import { useWorkspace } from '@toeverything/hooks/use-workspace';
|
||||||
import { useWorkspaceInfo } from '@toeverything/hooks/use-workspace-info';
|
import { useWorkspaceInfo } from '@toeverything/hooks/use-workspace-info';
|
||||||
|
|
||||||
import { useSelfHosted } from '../../../hooks/affine/use-server-flavor';
|
import { useSelfHosted } from '../../../hooks/affine/use-server-config';
|
||||||
import { DeleteLeaveWorkspace } from './delete-leave-workspace';
|
import { DeleteLeaveWorkspace } from './delete-leave-workspace';
|
||||||
import { EnableCloudPanel } from './enable-cloud';
|
import { EnableCloudPanel } from './enable-cloud';
|
||||||
import { ExportPanel } from './export';
|
import { ExportPanel } from './export';
|
||||||
|
|||||||
@@ -2,7 +2,15 @@ import { Button } from '@affine/component';
|
|||||||
|
|
||||||
import * as styles from './animate-in-tooltip.css';
|
import * as styles from './animate-in-tooltip.css';
|
||||||
|
|
||||||
export const AnimateInTooltip = ({ onNext }: { onNext: () => void }) => {
|
interface AnimateInTooltipProps {
|
||||||
|
onNext: () => void;
|
||||||
|
visible?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const AnimateInTooltip = ({
|
||||||
|
onNext,
|
||||||
|
visible,
|
||||||
|
}: AnimateInTooltipProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.tooltip}>
|
<div className={styles.tooltip}>
|
||||||
@@ -10,9 +18,11 @@ export const AnimateInTooltip = ({ onNext }: { onNext: () => void }) => {
|
|||||||
whiteboards and databases
|
whiteboards and databases
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.next}>
|
<div className={styles.next}>
|
||||||
<Button type="primary" size="extraLarge" onClick={onNext}>
|
{visible ? (
|
||||||
Next
|
<Button type="primary" size="extraLarge" onClick={onNext}>
|
||||||
</Button>
|
Next
|
||||||
|
</Button>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ export const Onboarding = ({ onOpenApp }: OnboardingProps) => {
|
|||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const onTooltipNext = useCallback(() => {
|
||||||
|
if (status.activeId) return;
|
||||||
|
setStatus({ activeId: null, unfoldingId: '4' });
|
||||||
|
}, [status.activeId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={styles.onboarding}
|
className={styles.onboarding}
|
||||||
@@ -80,9 +85,7 @@ export const Onboarding = ({ onOpenApp }: OnboardingProps) => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className={styles.tipsWrapper} data-visible={!status.activeId}>
|
<div className={styles.tipsWrapper} data-visible={!status.activeId}>
|
||||||
<AnimateInTooltip
|
<AnimateInTooltip onNext={onTooltipNext} visible={!status.activeId} />
|
||||||
onNext={() => setStatus({ activeId: null, unfoldingId: '4' })}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ export const onboarding = style([
|
|||||||
animation: `${fadeIn} 0.8s linear`,
|
animation: `${fadeIn} 0.8s linear`,
|
||||||
// content: 'unset',
|
// content: 'unset',
|
||||||
background:
|
background:
|
||||||
// 'linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 99.58%)',
|
'linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 99.58%)',
|
||||||
'linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 80%)',
|
|
||||||
},
|
},
|
||||||
'&[data-is-window="true"][data-is-desktop="true"]::after': {
|
'&[data-is-window="true"][data-is-desktop="true"]::after': {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import {
|
|||||||
openSignOutModalAtom,
|
openSignOutModalAtom,
|
||||||
} from '../../../../atoms';
|
} from '../../../../atoms';
|
||||||
import { useCurrentUser } from '../../../../hooks/affine/use-current-user';
|
import { useCurrentUser } from '../../../../hooks/affine/use-current-user';
|
||||||
import { useSelfHosted } from '../../../../hooks/affine/use-server-flavor';
|
import { useSelfHosted } from '../../../../hooks/affine/use-server-config';
|
||||||
import { useUserSubscription } from '../../../../hooks/use-subscription';
|
import { useUserSubscription } from '../../../../hooks/use-subscription';
|
||||||
import { validateAndReduceImage } from '../../../../utils/reduce-image';
|
import { validateAndReduceImage } from '../../../../utils/reduce-image';
|
||||||
import { Upload } from '../../../pure/file-upload';
|
import { Upload } from '../../../pure/file-upload';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
import type { ReactElement, SVGProps } from 'react';
|
import type { ReactElement, SVGProps } from 'react';
|
||||||
|
|
||||||
import { useCurrentLoginStatus } from '../../../../hooks/affine/use-current-login-status';
|
import { useCurrentLoginStatus } from '../../../../hooks/affine/use-current-login-status';
|
||||||
import { useSelfHosted } from '../../../../hooks/affine/use-server-flavor';
|
import { useSelfHosted } from '../../../../hooks/affine/use-server-config';
|
||||||
import { AboutAffine } from './about';
|
import { AboutAffine } from './about';
|
||||||
import { AppearanceSettings } from './appearance';
|
import { AppearanceSettings } from './appearance';
|
||||||
import { BillingSettings } from './billing';
|
import { BillingSettings } from './billing';
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ import { Divider } from '@affine/component/ui/divider';
|
|||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { LinkIcon } from '@blocksuite/icons';
|
import { LinkIcon } from '@blocksuite/icons';
|
||||||
|
import { useAtomValue } from 'jotai';
|
||||||
|
|
||||||
|
import { currentModeAtom } from '../../../../atoms/mode';
|
||||||
import { useExportPage } from '../../../../hooks/affine/use-export-page';
|
import { useExportPage } from '../../../../hooks/affine/use-export-page';
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
import type { ShareMenuProps } from './share-menu';
|
import type { ShareMenuProps } from './share-menu';
|
||||||
@@ -17,12 +19,13 @@ export const ShareExport = ({
|
|||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
const workspaceId = workspace.id;
|
const workspaceId = workspace.id;
|
||||||
const pageId = currentPage.id;
|
const pageId = currentPage.id;
|
||||||
const { onClickCopyLink } = useSharingUrl({
|
const { sharingUrl, onClickCopyLink } = useSharingUrl({
|
||||||
workspaceId,
|
workspaceId,
|
||||||
pageId,
|
pageId,
|
||||||
urlType: 'workspace',
|
urlType: 'workspace',
|
||||||
});
|
});
|
||||||
const exportHandler = useExportPage(currentPage);
|
const exportHandler = useExportPage(currentPage);
|
||||||
|
const currentMode = useAtomValue(currentModeAtom);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -36,6 +39,7 @@ export const ShareExport = ({
|
|||||||
<ExportMenuItems
|
<ExportMenuItems
|
||||||
exportHandler={exportHandler}
|
exportHandler={exportHandler}
|
||||||
className={styles.menuItemStyle}
|
className={styles.menuItemStyle}
|
||||||
|
pageMode={currentMode}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{workspace.flavour !== WorkspaceFlavour.LOCAL ? (
|
{workspace.flavour !== WorkspaceFlavour.LOCAL ? (
|
||||||
@@ -53,6 +57,7 @@ export const ShareExport = ({
|
|||||||
onClick={onClickCopyLink}
|
onClick={onClickCopyLink}
|
||||||
icon={<LinkIcon />}
|
icon={<LinkIcon />}
|
||||||
type="plain"
|
type="plain"
|
||||||
|
disabled={!sharingUrl}
|
||||||
>
|
>
|
||||||
{t['com.affine.share-menu.copy-private-link']()}
|
{t['com.affine.share-menu.copy-private-link']()}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { useCallback } from 'react';
|
|||||||
import type { PageMode } from '../../../../atoms';
|
import type { PageMode } from '../../../../atoms';
|
||||||
import { currentModeAtom } from '../../../../atoms/mode';
|
import { currentModeAtom } from '../../../../atoms/mode';
|
||||||
import { useIsSharedPage } from '../../../../hooks/affine/use-is-shared-page';
|
import { useIsSharedPage } from '../../../../hooks/affine/use-is-shared-page';
|
||||||
|
import { useServerBaseUrl } from '../../../../hooks/affine/use-server-config';
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
import type { ShareMenuProps } from './share-menu';
|
import type { ShareMenuProps } from './share-menu';
|
||||||
import { useSharingUrl } from './use-share-url';
|
import { useSharingUrl } from './use-share-url';
|
||||||
@@ -98,6 +99,7 @@ export const AffineSharePage = (props: ShareMenuProps) => {
|
|||||||
pageId,
|
pageId,
|
||||||
urlType: 'share',
|
urlType: 'share',
|
||||||
});
|
});
|
||||||
|
const baseUrl = useServerBaseUrl();
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
|
|
||||||
const onClickCreateLink = useCallback(() => {
|
const onClickCreateLink = useCallback(() => {
|
||||||
@@ -140,9 +142,13 @@ export const AffineSharePage = (props: ShareMenuProps) => {
|
|||||||
lineHeight: '20px',
|
lineHeight: '20px',
|
||||||
}}
|
}}
|
||||||
value={
|
value={
|
||||||
isSharedPage
|
(isSharedPage && sharingUrl) ||
|
||||||
? sharingUrl
|
`${
|
||||||
: `${location.protocol}//${location.hostname}/...`
|
baseUrl ||
|
||||||
|
`${location.protocol}${
|
||||||
|
location.port ? `:${location.port}` : ''
|
||||||
|
}//${location.hostname}`
|
||||||
|
}/...`
|
||||||
}
|
}
|
||||||
readOnly
|
readOnly
|
||||||
/>
|
/>
|
||||||
@@ -151,6 +157,7 @@ export const AffineSharePage = (props: ShareMenuProps) => {
|
|||||||
onClick={onClickCopyLink}
|
onClick={onClickCopyLink}
|
||||||
data-testid="share-menu-copy-link-button"
|
data-testid="share-menu-copy-link-button"
|
||||||
style={{ padding: '4px 12px', whiteSpace: 'nowrap' }}
|
style={{ padding: '4px 12px', whiteSpace: 'nowrap' }}
|
||||||
|
disabled={!sharingUrl}
|
||||||
>
|
>
|
||||||
{t.Copy()}
|
{t.Copy()}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { toast } from '@affine/component';
|
import { toast } from '@affine/component';
|
||||||
|
import { useServerBaseUrl } from '@affine/core/hooks/affine/use-server-config';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
@@ -10,22 +11,27 @@ type UseSharingUrl = {
|
|||||||
urlType: UrlType;
|
urlType: UrlType;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateUrl = ({
|
const useGenerateUrl = ({ workspaceId, pageId, urlType }: UseSharingUrl) => {
|
||||||
workspaceId,
|
// to generate a private url like https://app.affine.app/workspace/123/456
|
||||||
pageId,
|
// to generate a public url like https://app.affine.app/share/123/456
|
||||||
urlType,
|
// or https://app.affine.app/share/123/456?mode=edgeless
|
||||||
}: UseSharingUrl) => {
|
|
||||||
// to generate a private url like https://affine.app/workspace/123/456
|
|
||||||
// to generate a public url like https://affine.app/share/123/456
|
|
||||||
// or https://affine.app/share/123/456?mode=edgeless
|
|
||||||
|
|
||||||
const { protocol, hostname, port } = window.location;
|
const baseUrl = useServerBaseUrl();
|
||||||
const url = new URL(
|
|
||||||
`${protocol}//${hostname}${
|
const url = useMemo(() => {
|
||||||
port ? `:${port}` : ''
|
// baseUrl is null when running in electron and without network
|
||||||
}/${urlType}/${workspaceId}/${pageId}`
|
if (!baseUrl) return null;
|
||||||
);
|
|
||||||
return url.toString();
|
try {
|
||||||
|
return new URL(
|
||||||
|
`${baseUrl}/${urlType}/${workspaceId}/${pageId}`
|
||||||
|
).toString();
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, [baseUrl, pageId, urlType, workspaceId]);
|
||||||
|
|
||||||
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useSharingUrl = ({
|
export const useSharingUrl = ({
|
||||||
@@ -34,20 +40,21 @@ export const useSharingUrl = ({
|
|||||||
urlType,
|
urlType,
|
||||||
}: UseSharingUrl) => {
|
}: UseSharingUrl) => {
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
const sharingUrl = useMemo(
|
const sharingUrl = useGenerateUrl({ workspaceId, pageId, urlType });
|
||||||
() => generateUrl({ workspaceId, pageId, urlType }),
|
|
||||||
[workspaceId, pageId, urlType]
|
|
||||||
);
|
|
||||||
|
|
||||||
const onClickCopyLink = useCallback(() => {
|
const onClickCopyLink = useCallback(() => {
|
||||||
navigator.clipboard
|
if (sharingUrl) {
|
||||||
.writeText(sharingUrl)
|
navigator.clipboard
|
||||||
.then(() => {
|
.writeText(sharingUrl)
|
||||||
toast(t['Copied link to clipboard']());
|
.then(() => {
|
||||||
})
|
toast(t['Copied link to clipboard']());
|
||||||
.catch(err => {
|
})
|
||||||
console.error(err);
|
.catch(err => {
|
||||||
});
|
console.error(err);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
toast('Network not available');
|
||||||
|
}
|
||||||
}, [sharingUrl, t]);
|
}, [sharingUrl, t]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ export const PageHeaderMenuButton = ({ rename, pageId }: PageMenuProps) => {
|
|||||||
>
|
>
|
||||||
{t['Import']()}
|
{t['Import']()}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Export exportHandler={exportHandler} />
|
<Export exportHandler={exportHandler} pageMode={currentMode} />
|
||||||
|
|
||||||
{workspace.flavour === WorkspaceFlavour.AFFINE_CLOUD &&
|
{workspace.flavour === WorkspaceFlavour.AFFINE_CLOUD &&
|
||||||
runtimeConfig.enablePageHistory ? (
|
runtimeConfig.enablePageHistory ? (
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ export function useRegisterBlocksuiteEditorCommands(
|
|||||||
unsubs.push(
|
unsubs.push(
|
||||||
registerAffineCommand({
|
registerAffineCommand({
|
||||||
id: `editor:${mode}-export-to-pdf`,
|
id: `editor:${mode}-export-to-pdf`,
|
||||||
preconditionStrategy,
|
preconditionStrategy: () => mode === 'page' && !trash,
|
||||||
category: `editor:${mode}`,
|
category: `editor:${mode}`,
|
||||||
icon: mode === 'page' ? <PageIcon /> : <EdgelessIcon />,
|
icon: mode === 'page' ? <PageIcon /> : <EdgelessIcon />,
|
||||||
label: t['Export to PDF'](),
|
label: t['Export to PDF'](),
|
||||||
@@ -167,7 +167,7 @@ export function useRegisterBlocksuiteEditorCommands(
|
|||||||
unsubs.push(
|
unsubs.push(
|
||||||
registerAffineCommand({
|
registerAffineCommand({
|
||||||
id: `editor:${mode}-export-to-png`,
|
id: `editor:${mode}-export-to-png`,
|
||||||
preconditionStrategy,
|
preconditionStrategy: () => mode === 'page' && !trash,
|
||||||
category: `editor:${mode}`,
|
category: `editor:${mode}`,
|
||||||
icon: mode === 'page' ? <PageIcon /> : <EdgelessIcon />,
|
icon: mode === 'page' ? <PageIcon /> : <EdgelessIcon />,
|
||||||
label: t['Export to PNG'](),
|
label: t['Export to PNG'](),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const errorHandler: Middleware = useSWRNext => (key, fetcher, config) => {
|
|||||||
return useSWRNext(key, wrappedFetcher.bind(null, fetcher), config);
|
return useSWRNext(key, wrappedFetcher.bind(null, fetcher), config);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useServerFlavor = () => {
|
const useServerConfig = () => {
|
||||||
const { data: config, error } = useQueryImmutable(
|
const { data: config, error } = useQueryImmutable(
|
||||||
{ query: serverConfigQuery },
|
{ query: serverConfigQuery },
|
||||||
{
|
{
|
||||||
@@ -18,10 +18,20 @@ export const useServerFlavor = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (error || !config) {
|
if (error || !config) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return config.serverConfig;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const useServerFlavor = () => {
|
||||||
|
const config = useServerConfig();
|
||||||
|
|
||||||
|
if (!config) {
|
||||||
return 'local';
|
return 'local';
|
||||||
}
|
}
|
||||||
|
|
||||||
return config.serverConfig.flavor;
|
return config.flavor;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useSelfHosted = () => {
|
export const useSelfHosted = () => {
|
||||||
@@ -29,3 +39,18 @@ export const useSelfHosted = () => {
|
|||||||
|
|
||||||
return ['local', 'selfhosted'].includes(serverFlavor);
|
return ['local', 'selfhosted'].includes(serverFlavor);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const useServerBaseUrl = () => {
|
||||||
|
const config = useServerConfig();
|
||||||
|
|
||||||
|
if (!config) {
|
||||||
|
if (environment.isDesktop) {
|
||||||
|
// don't use window.location in electron
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const { protocol, hostname, port } = window.location;
|
||||||
|
return `${protocol}//${hostname}${port ? `:${port}` : ''}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return config.baseUrl;
|
||||||
|
};
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
'use client';
|
|
||||||
import { useMemo } from 'react';
|
|
||||||
|
|
||||||
export function useShareLink(workspaceId: string): string {
|
|
||||||
return useMemo(() => {
|
|
||||||
if (environment.isServer) {
|
|
||||||
throw new Error('useShareLink is not available on server side');
|
|
||||||
}
|
|
||||||
if (environment.isDesktop) {
|
|
||||||
return '???';
|
|
||||||
} else {
|
|
||||||
return origin + '/share/' + workspaceId;
|
|
||||||
}
|
|
||||||
}, [workspaceId]);
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@ import { type SubscriptionQuery, subscriptionQuery } from '@affine/graphql';
|
|||||||
import { useQuery } from '@affine/workspace/affine/gql';
|
import { useQuery } from '@affine/workspace/affine/gql';
|
||||||
import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks';
|
import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks';
|
||||||
|
|
||||||
import { useSelfHosted } from './affine/use-server-flavor';
|
import { useSelfHosted } from './affine/use-server-config';
|
||||||
|
|
||||||
export type Subscription = NonNullable<
|
export type Subscription = NonNullable<
|
||||||
NonNullable<SubscriptionQuery['currentUser']>['subscription']
|
NonNullable<SubscriptionQuery['currentUser']>['subscription']
|
||||||
|
|||||||
@@ -17,13 +17,14 @@ const affineCoreOutDir = path.join(affineCoreDir, 'dist');
|
|||||||
const publicAffineOutDir = path.join(publicDistDir, `web-static`);
|
const publicAffineOutDir = path.join(publicDistDir, `web-static`);
|
||||||
const releaseVersionEnv = process.env.RELEASE_VERSION || '';
|
const releaseVersionEnv = process.env.RELEASE_VERSION || '';
|
||||||
|
|
||||||
console.log('build with following dir', {
|
console.log('build with following variables', {
|
||||||
repoRootDir,
|
repoRootDir,
|
||||||
electronRootDir,
|
electronRootDir,
|
||||||
publicDistDir,
|
publicDistDir,
|
||||||
affineSrcDir: affineCoreDir,
|
affineSrcDir: affineCoreDir,
|
||||||
affineSrcOutDir: affineCoreOutDir,
|
affineSrcOutDir: affineCoreOutDir,
|
||||||
publicAffineOutDir,
|
publicAffineOutDir,
|
||||||
|
releaseVersionEnv,
|
||||||
});
|
});
|
||||||
|
|
||||||
// step 0: check version match
|
// step 0: check version match
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
import { BrowserWindow, screen } from 'electron';
|
import { BrowserWindow, type Display, screen } from 'electron';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
|
||||||
|
import { isMacOS } from '../shared/utils';
|
||||||
import { mainWindowOrigin } from './constants';
|
import { mainWindowOrigin } from './constants';
|
||||||
// import { getExposedMeta } from './exposed';
|
// import { getExposedMeta } from './exposed';
|
||||||
import { logger } from './logger';
|
import { logger } from './logger';
|
||||||
|
|
||||||
|
const getScreenSize = (display: Display) => {
|
||||||
|
const { width, height } = isMacOS() ? display.bounds : display.workArea;
|
||||||
|
return { width, height };
|
||||||
|
};
|
||||||
|
|
||||||
// todo: not all window need all of the exposed meta
|
// todo: not all window need all of the exposed meta
|
||||||
const getWindowAdditionalArguments = async () => {
|
const getWindowAdditionalArguments = async () => {
|
||||||
const { getExposedMeta } = await import('./exposed');
|
const { getExposedMeta } = await import('./exposed');
|
||||||
@@ -15,11 +21,24 @@ const getWindowAdditionalArguments = async () => {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function fullscreenAndCenter(browserWindow: BrowserWindow) {
|
||||||
|
const position = browserWindow.getPosition();
|
||||||
|
const size = browserWindow.getSize();
|
||||||
|
const currentDisplay = screen.getDisplayNearestPoint({
|
||||||
|
x: position[0] + size[0] / 2,
|
||||||
|
y: position[1] + size[1] / 2,
|
||||||
|
});
|
||||||
|
if (!currentDisplay) return;
|
||||||
|
const { width, height } = getScreenSize(currentDisplay);
|
||||||
|
browserWindow.setSize(width, height);
|
||||||
|
browserWindow.center();
|
||||||
|
}
|
||||||
|
|
||||||
async function createOnboardingWindow(additionalArguments: string[]) {
|
async function createOnboardingWindow(additionalArguments: string[]) {
|
||||||
logger.info('creating onboarding window');
|
logger.info('creating onboarding window');
|
||||||
|
|
||||||
// get user's screen size
|
// get user's screen size
|
||||||
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
|
const { width, height } = getScreenSize(screen.getPrimaryDisplay());
|
||||||
|
|
||||||
const browserWindow = new BrowserWindow({
|
const browserWindow = new BrowserWindow({
|
||||||
width,
|
width,
|
||||||
@@ -36,6 +55,7 @@ async function createOnboardingWindow(additionalArguments: string[]) {
|
|||||||
// skipTaskbar: true,
|
// skipTaskbar: true,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
hasShadow: false,
|
hasShadow: false,
|
||||||
|
roundedCorners: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webgl: true,
|
webgl: true,
|
||||||
preload: join(__dirname, './preload.js'),
|
preload: join(__dirname, './preload.js'),
|
||||||
@@ -56,12 +76,18 @@ async function createOnboardingWindow(additionalArguments: string[]) {
|
|||||||
browserWindow.on('ready-to-show', () => {
|
browserWindow.on('ready-to-show', () => {
|
||||||
// forcing zoom factor to 1 to avoid onboarding display issues
|
// forcing zoom factor to 1 to avoid onboarding display issues
|
||||||
browserWindow.webContents.setZoomFactor(1);
|
browserWindow.webContents.setZoomFactor(1);
|
||||||
|
fullscreenAndCenter(browserWindow);
|
||||||
// TODO: add a timeout to avoid flickering, window is ready, but dom is not ready
|
// TODO: add a timeout to avoid flickering, window is ready, but dom is not ready
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
browserWindow.show();
|
browserWindow.show();
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// When moved to another screen, resize to fit the screen
|
||||||
|
browserWindow.on('moved', () => {
|
||||||
|
fullscreenAndCenter(browserWindow);
|
||||||
|
});
|
||||||
|
|
||||||
await browserWindow.loadURL(
|
await browserWindow.loadURL(
|
||||||
`${mainWindowOrigin}${mainWindowOrigin.endsWith('/') ? '' : '/'}onboarding`
|
`${mainWindowOrigin}${mainWindowOrigin.endsWith('/') ? '' : '/'}onboarding`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -655,6 +655,7 @@ query serverConfig {
|
|||||||
serverConfig {
|
serverConfig {
|
||||||
version
|
version
|
||||||
flavor
|
flavor
|
||||||
|
baseUrl
|
||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ query serverConfig {
|
|||||||
serverConfig {
|
serverConfig {
|
||||||
version
|
version
|
||||||
flavor
|
flavor
|
||||||
|
baseUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -632,6 +632,7 @@ export type ServerConfigQuery = {
|
|||||||
__typename?: 'ServerConfigType';
|
__typename?: 'ServerConfigType';
|
||||||
version: string;
|
version: string;
|
||||||
flavor: string;
|
flavor: string;
|
||||||
|
baseUrl: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,25 @@ import { Manager } from 'socket.io-client';
|
|||||||
|
|
||||||
let ioManager: Manager | null = null;
|
let ioManager: Manager | null = null;
|
||||||
|
|
||||||
|
function getBaseUrl(): string {
|
||||||
|
if (environment.isDesktop) {
|
||||||
|
return runtimeConfig.serverUrlPrefix;
|
||||||
|
}
|
||||||
|
const { protocol, hostname, port } = window.location;
|
||||||
|
return `${protocol === 'https:' ? 'wss' : 'ws'}://${hostname}${
|
||||||
|
port ? `:${port}` : ''
|
||||||
|
}`;
|
||||||
|
}
|
||||||
|
|
||||||
// use lazy initialization socket.io io manager
|
// use lazy initialization socket.io io manager
|
||||||
export function getIoManager(): Manager {
|
export function getIoManager(): Manager {
|
||||||
if (ioManager) {
|
if (ioManager) {
|
||||||
return ioManager;
|
return ioManager;
|
||||||
}
|
}
|
||||||
const { protocol, hostname, port } = window.location;
|
ioManager = new Manager(`${getBaseUrl()}/`, {
|
||||||
ioManager = new Manager(
|
autoConnect: false,
|
||||||
`${protocol === 'https:' ? 'wss' : 'ws'}://${hostname}${
|
transports: ['websocket'],
|
||||||
port ? `:${port}` : ''
|
secure: location.protocol === 'https:',
|
||||||
}/`,
|
});
|
||||||
{
|
|
||||||
autoConnect: false,
|
|
||||||
transports: ['websocket'],
|
|
||||||
secure: location.protocol === 'https:',
|
|
||||||
}
|
|
||||||
);
|
|
||||||
return ioManager;
|
return ioManager;
|
||||||
}
|
}
|
||||||
|
|||||||
89
yarn.lock
89
yarn.lock
@@ -372,7 +372,7 @@ __metadata:
|
|||||||
"@radix-ui/react-dialog": "npm:^1.0.4"
|
"@radix-ui/react-dialog": "npm:^1.0.4"
|
||||||
"@radix-ui/react-scroll-area": "npm:^1.0.5"
|
"@radix-ui/react-scroll-area": "npm:^1.0.5"
|
||||||
"@radix-ui/react-select": "npm:^2.0.0"
|
"@radix-ui/react-select": "npm:^2.0.0"
|
||||||
"@react-hookz/web": "npm:^23.1.0"
|
"@react-hookz/web": "npm:^24.0.0"
|
||||||
"@sentry/integrations": "npm:^7.83.0"
|
"@sentry/integrations": "npm:^7.83.0"
|
||||||
"@sentry/react": "npm:^7.83.0"
|
"@sentry/react": "npm:^7.83.0"
|
||||||
"@sentry/webpack-plugin": "npm:^2.8.0"
|
"@sentry/webpack-plugin": "npm:^2.8.0"
|
||||||
@@ -628,7 +628,7 @@ __metadata:
|
|||||||
eslint-plugin-react-hooks: "npm:^4.6.0"
|
eslint-plugin-react-hooks: "npm:^4.6.0"
|
||||||
eslint-plugin-simple-import-sort: "npm:^10.0.0"
|
eslint-plugin-simple-import-sort: "npm:^10.0.0"
|
||||||
eslint-plugin-sonarjs: "npm:^0.23.0"
|
eslint-plugin-sonarjs: "npm:^0.23.0"
|
||||||
eslint-plugin-unicorn: "npm:^49.0.0"
|
eslint-plugin-unicorn: "npm:^50.0.0"
|
||||||
eslint-plugin-unused-imports: "npm:^3.0.0"
|
eslint-plugin-unused-imports: "npm:^3.0.0"
|
||||||
eslint-plugin-vue: "npm:^9.18.1"
|
eslint-plugin-vue: "npm:^9.18.1"
|
||||||
fake-indexeddb: "npm:5.0.1"
|
fake-indexeddb: "npm:5.0.1"
|
||||||
@@ -5863,6 +5863,23 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@eslint/eslintrc@npm:^2.1.4":
|
||||||
|
version: 2.1.4
|
||||||
|
resolution: "@eslint/eslintrc@npm:2.1.4"
|
||||||
|
dependencies:
|
||||||
|
ajv: "npm:^6.12.4"
|
||||||
|
debug: "npm:^4.3.2"
|
||||||
|
espree: "npm:^9.6.0"
|
||||||
|
globals: "npm:^13.19.0"
|
||||||
|
ignore: "npm:^5.2.0"
|
||||||
|
import-fresh: "npm:^3.2.1"
|
||||||
|
js-yaml: "npm:^4.1.0"
|
||||||
|
minimatch: "npm:^3.1.2"
|
||||||
|
strip-json-comments: "npm:^3.1.1"
|
||||||
|
checksum: 7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@eslint/js@npm:8.54.0":
|
"@eslint/js@npm:8.54.0":
|
||||||
version: 8.54.0
|
version: 8.54.0
|
||||||
resolution: "@eslint/js@npm:8.54.0"
|
resolution: "@eslint/js@npm:8.54.0"
|
||||||
@@ -11221,9 +11238,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@react-hookz/web@npm:^23.1.0":
|
"@react-hookz/web@npm:^24.0.0":
|
||||||
version: 23.1.0
|
version: 24.0.0
|
||||||
resolution: "@react-hookz/web@npm:23.1.0"
|
resolution: "@react-hookz/web@npm:24.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@react-hookz/deep-equal": "npm:^1.0.4"
|
"@react-hookz/deep-equal": "npm:^1.0.4"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -11233,7 +11250,7 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
js-cookie:
|
js-cookie:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 7f345fc286ee3bae74b76b909898213a589250856783805d0356d8ef9ca0e3d1638e7499d8b77ae1dff6350dec230fda468e0e4c8fc05a9997902569d3d81b49
|
checksum: 85ec7ebecf3a69f098fecb89c1515ffd8c119f29a74521277df34af637059320669cf8ff6273063cec6a4c86cee4849e24fa8772191d08f81b2b88de69749670
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -17329,6 +17346,20 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"browserslist@npm:^4.22.2":
|
||||||
|
version: 4.22.2
|
||||||
|
resolution: "browserslist@npm:4.22.2"
|
||||||
|
dependencies:
|
||||||
|
caniuse-lite: "npm:^1.0.30001565"
|
||||||
|
electron-to-chromium: "npm:^1.4.601"
|
||||||
|
node-releases: "npm:^2.0.14"
|
||||||
|
update-browserslist-db: "npm:^1.0.13"
|
||||||
|
bin:
|
||||||
|
browserslist: cli.js
|
||||||
|
checksum: e3590793db7f66ad3a50817e7b7f195ce61e029bd7187200244db664bfbe0ac832f784e4f6b9c958aef8ea4abe001ae7880b7522682df521f4bc0a5b67660b5e
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"bser@npm:2.1.1":
|
"bser@npm:2.1.1":
|
||||||
version: 2.1.1
|
version: 2.1.1
|
||||||
resolution: "bser@npm:2.1.1"
|
resolution: "bser@npm:2.1.1"
|
||||||
@@ -17646,6 +17677,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"caniuse-lite@npm:^1.0.30001565":
|
||||||
|
version: 1.0.30001570
|
||||||
|
resolution: "caniuse-lite@npm:1.0.30001570"
|
||||||
|
checksum: a9b939e003dd70580cc18bce54627af84f298af7c774415c8d6c99871e7cee13bd8278b67955a979cd338369c73e8821a10b37e607d1fff2fbc8ff92fc489653
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"capital-case@npm:^1.0.4":
|
"capital-case@npm:^1.0.4":
|
||||||
version: 1.0.4
|
version: 1.0.4
|
||||||
resolution: "capital-case@npm:1.0.4"
|
resolution: "capital-case@npm:1.0.4"
|
||||||
@@ -17971,7 +18009,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"ci-info@npm:^3.2.0, ci-info@npm:^3.8.0":
|
"ci-info@npm:^3.2.0":
|
||||||
version: 3.9.0
|
version: 3.9.0
|
||||||
resolution: "ci-info@npm:3.9.0"
|
resolution: "ci-info@npm:3.9.0"
|
||||||
checksum: 75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397
|
checksum: 75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397
|
||||||
@@ -18787,6 +18825,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"core-js-compat@npm:^3.34.0":
|
||||||
|
version: 3.34.0
|
||||||
|
resolution: "core-js-compat@npm:3.34.0"
|
||||||
|
dependencies:
|
||||||
|
browserslist: "npm:^4.22.2"
|
||||||
|
checksum: e29571cc524b4966e331b5876567f13c2b82ed48ac9b02784f3156b29ee1cd82fe3e60052d78b017c429eb61969fd238c22684bb29180908d335266179a29155
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"core-js-pure@npm:^3.23.3":
|
"core-js-pure@npm:^3.23.3":
|
||||||
version: 3.33.3
|
version: 3.33.3
|
||||||
resolution: "core-js-pure@npm:3.33.3"
|
resolution: "core-js-pure@npm:3.33.3"
|
||||||
@@ -20095,6 +20142,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"electron-to-chromium@npm:^1.4.601":
|
||||||
|
version: 1.4.615
|
||||||
|
resolution: "electron-to-chromium@npm:1.4.615"
|
||||||
|
checksum: dbf9deb234cbd381a91f41f6c6729cc8b4bed9b1580d6aea589d689d5f2a8aadf88837ef6887e761c143a1e1015f5eb3ae1bd2728a3068fa6a235c16c0fd76ae
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"electron-updater@npm:^6.1.5":
|
"electron-updater@npm:^6.1.5":
|
||||||
version: 6.1.7
|
version: 6.1.7
|
||||||
resolution: "electron-updater@npm:6.1.7"
|
resolution: "electron-updater@npm:6.1.7"
|
||||||
@@ -20916,14 +20970,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint-plugin-unicorn@npm:^49.0.0":
|
"eslint-plugin-unicorn@npm:^50.0.0":
|
||||||
version: 49.0.0
|
version: 50.0.0
|
||||||
resolution: "eslint-plugin-unicorn@npm:49.0.0"
|
resolution: "eslint-plugin-unicorn@npm:50.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/helper-validator-identifier": "npm:^7.22.20"
|
"@babel/helper-validator-identifier": "npm:^7.22.20"
|
||||||
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
||||||
ci-info: "npm:^3.8.0"
|
"@eslint/eslintrc": "npm:^2.1.4"
|
||||||
|
ci-info: "npm:^4.0.0"
|
||||||
clean-regexp: "npm:^1.0.0"
|
clean-regexp: "npm:^1.0.0"
|
||||||
|
core-js-compat: "npm:^3.34.0"
|
||||||
esquery: "npm:^1.5.0"
|
esquery: "npm:^1.5.0"
|
||||||
indent-string: "npm:^4.0.0"
|
indent-string: "npm:^4.0.0"
|
||||||
is-builtin-module: "npm:^3.2.1"
|
is-builtin-module: "npm:^3.2.1"
|
||||||
@@ -20935,8 +20991,8 @@ __metadata:
|
|||||||
semver: "npm:^7.5.4"
|
semver: "npm:^7.5.4"
|
||||||
strip-indent: "npm:^3.0.0"
|
strip-indent: "npm:^3.0.0"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ">=8.52.0"
|
eslint: ">=8.56.0"
|
||||||
checksum: 7f73f41356cdf720675998c558ab13872d76302dde3a49661df0b5219fd328627e3d7e418aaa3e94cf8764d1ef8b606f7ea01f019eccc0bf0522def8e6769caa
|
checksum: 09d069bac3d4c7d3d3d4ddf8a9992718cd1acc6bbba99cfcb0fb581d9dd0d64378c55d6cc5579aadf23d199c53b539a4351446e0855b363c95e8926be15c95e6
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -29033,6 +29089,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"node-releases@npm:^2.0.14":
|
||||||
|
version: 2.0.14
|
||||||
|
resolution: "node-releases@npm:2.0.14"
|
||||||
|
checksum: 0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"nodemailer@npm:^6.9.7":
|
"nodemailer@npm:^6.9.7":
|
||||||
version: 6.9.7
|
version: 6.9.7
|
||||||
resolution: "nodemailer@npm:6.9.7"
|
resolution: "nodemailer@npm:6.9.7"
|
||||||
|
|||||||
Reference in New Issue
Block a user