mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
feat: upgrade dependencies and lockfile (#5016)
- Close https://github.com/toeverything/AFFiNE/security/dependabot/47
This commit is contained in:
4
.github/actions/deploy/deploy.mjs
vendored
4
.github/actions/deploy/deploy.mjs
vendored
@@ -41,8 +41,8 @@ const createHelmCommand = ({ isDryRun }) => {
|
|||||||
const staticIpName = isProduction
|
const staticIpName = isProduction
|
||||||
? 'affine-cluster-production'
|
? 'affine-cluster-production'
|
||||||
: isBeta
|
: isBeta
|
||||||
? 'affine-cluster-beta'
|
? 'affine-cluster-beta'
|
||||||
: 'affine-cluster-dev';
|
: 'affine-cluster-dev';
|
||||||
const redisAndPostgres =
|
const redisAndPostgres =
|
||||||
isProduction || isBeta
|
isProduction || isBeta
|
||||||
? [
|
? [
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -78,3 +78,4 @@ tsconfig.node.tsbuildinfo
|
|||||||
lib
|
lib
|
||||||
affine.db
|
affine.db
|
||||||
apps/web/next-routes.conf
|
apps/web/next-routes.conf
|
||||||
|
.nx
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
diff --git a/package.json b/package.json
|
diff --git a/package.json b/package.json
|
||||||
index 26dcf8217f3e221e4c53722f14d29bb788332772..57a66dcb0943b9dd5cdaac2eaffccd9225a6b735 100644
|
index ca30bca63196b923fa5a27eb85ce2ee890222d36..39e9d08dea40f25568a39bfbc0154458d32c8a66 100644
|
||||||
--- a/package.json
|
--- a/package.json
|
||||||
+++ b/package.json
|
+++ b/package.json
|
||||||
@@ -34,6 +34,10 @@
|
@@ -31,6 +31,10 @@
|
||||||
"./adapters": {
|
"types": "./index.d.ts",
|
||||||
"types": "./adapters.d.ts"
|
"default": "./index.js"
|
||||||
},
|
},
|
||||||
+ "./core": {
|
+ "./core": {
|
||||||
+ "types": "./core/index.d.ts",
|
+ "types": "./core/index.d.ts",
|
||||||
+ "default": "./core/index.js"
|
+ "default": "./core/index.js"
|
||||||
+ },
|
+ },
|
||||||
"./jwt": {
|
"./adapters": {
|
||||||
"types": "./jwt/index.d.ts",
|
"types": "./adapters.d.ts"
|
||||||
"default": "./jwt/index.js"
|
},
|
||||||
60
package.json
60
package.json
@@ -57,58 +57,58 @@
|
|||||||
"@affine-test/kit": "workspace:*",
|
"@affine-test/kit": "workspace:*",
|
||||||
"@affine/cli": "workspace:*",
|
"@affine/cli": "workspace:*",
|
||||||
"@affine/plugin-cli": "workspace:*",
|
"@affine/plugin-cli": "workspace:*",
|
||||||
"@commitlint/cli": "^17.8.0",
|
"@commitlint/cli": "^18.4.3",
|
||||||
"@commitlint/config-conventional": "^17.8.0",
|
"@commitlint/config-conventional": "^18.4.3",
|
||||||
"@faker-js/faker": "^8.2.0",
|
"@faker-js/faker": "^8.3.1",
|
||||||
"@istanbuljs/schema": "^0.1.3",
|
"@istanbuljs/schema": "^0.1.3",
|
||||||
"@magic-works/i18n-codegen": "^0.5.0",
|
"@magic-works/i18n-codegen": "^0.5.0",
|
||||||
"@nx/vite": "16.10.0",
|
"@nx/vite": "17.1.3",
|
||||||
"@perfsee/sdk": "^1.9.0",
|
"@perfsee/sdk": "^1.9.0",
|
||||||
"@playwright/test": "^1.39.0",
|
"@playwright/test": "^1.40.0",
|
||||||
"@taplo/cli": "^0.5.2",
|
"@taplo/cli": "^0.5.2",
|
||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.1.2",
|
||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@types/affine__env": "workspace:*",
|
"@types/affine__env": "workspace:*",
|
||||||
"@types/eslint": "^8.44.4",
|
"@types/eslint": "^8.44.7",
|
||||||
"@types/node": "^18.18.5",
|
"@types/node": "^20.9.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
||||||
"@typescript-eslint/parser": "^6.7.5",
|
"@typescript-eslint/parser": "^6.12.0",
|
||||||
"@vanilla-extract/vite-plugin": "^3.9.0",
|
"@vanilla-extract/vite-plugin": "^3.9.2",
|
||||||
"@vanilla-extract/webpack-plugin": "^2.3.1",
|
"@vanilla-extract/webpack-plugin": "^2.3.1",
|
||||||
"@vitejs/plugin-react-swc": "^3.4.0",
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||||
"@vitest/coverage-istanbul": "0.34.6",
|
"@vitest/coverage-istanbul": "0.34.6",
|
||||||
"@vitest/ui": "0.34.6",
|
"@vitest/ui": "0.34.6",
|
||||||
"electron": "^27.0.0",
|
"electron": "^27.1.0",
|
||||||
"eslint": "^8.51.0",
|
"eslint": "^8.54.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-plugin-i": "^2.28.1",
|
"eslint-plugin-i": "^2.29.0",
|
||||||
"eslint-plugin-prettier": "^5.0.1",
|
"eslint-plugin-prettier": "^5.0.1",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"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.21.0",
|
"eslint-plugin-sonarjs": "^0.23.0",
|
||||||
"eslint-plugin-unicorn": "^48.0.1",
|
"eslint-plugin-unicorn": "^49.0.0",
|
||||||
"eslint-plugin-unused-imports": "^3.0.0",
|
"eslint-plugin-unused-imports": "^3.0.0",
|
||||||
"eslint-plugin-vue": "^9.17.0",
|
"eslint-plugin-vue": "^9.18.1",
|
||||||
"fake-indexeddb": "5.0.0",
|
"fake-indexeddb": "5.0.1",
|
||||||
"happy-dom": "^12.9.1",
|
"happy-dom": "^12.10.3",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"lint-staged": "^15.0.0",
|
"lint-staged": "^15.1.0",
|
||||||
"madge": "^6.1.0",
|
"madge": "^6.1.0",
|
||||||
"msw": "^1.3.2",
|
"msw": "^2.0.8",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"nx": "^16.10.0",
|
"nx": "^17.1.3",
|
||||||
"nx-cloud": "^16.5.2",
|
"nx-cloud": "^16.5.2",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.1.0",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"serve": "^14.2.1",
|
"serve": "^14.2.1",
|
||||||
"string-width": "^6.1.0",
|
"string-width": "^7.0.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.3.2",
|
||||||
"vite": "^4.4.11",
|
"vite": "^5.0.1",
|
||||||
"vite-plugin-istanbul": "^5.0.0",
|
"vite-plugin-istanbul": "^5.0.0",
|
||||||
"vite-plugin-static-copy": "^0.17.0",
|
"vite-plugin-static-copy": "^0.17.1",
|
||||||
"vite-tsconfig-paths": "^4.2.1",
|
"vite-tsconfig-paths": "^4.2.1",
|
||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"vitest-fetch-mock": "^0.2.2",
|
"vitest-fetch-mock": "^0.2.2",
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
"unbox-primitive": "npm:@nolyfill/unbox-primitive@latest",
|
"unbox-primitive": "npm:@nolyfill/unbox-primitive@latest",
|
||||||
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@latest",
|
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@latest",
|
||||||
"which-typed-array": "npm:@nolyfill/which-typed-array@latest",
|
"which-typed-array": "npm:@nolyfill/which-typed-array@latest",
|
||||||
"next-auth@^4.23.2": "patch:next-auth@npm%3A4.23.2#./.yarn/patches/next-auth-npm-4.23.2-5f0e551bc7.patch",
|
"next-auth@^4.24.5": "patch:next-auth@npm%3A4.24.5#~/.yarn/patches/next-auth-npm-4.24.5-8428e11927.patch",
|
||||||
"@electron-forge/core@^6.4.2": "patch:@electron-forge/core@npm%3A6.4.2#./.yarn/patches/@electron-forge-core-npm-6.4.2-ab60c87e75.patch",
|
"@electron-forge/core@^6.4.2": "patch:@electron-forge/core@npm%3A6.4.2#./.yarn/patches/@electron-forge-core-npm-6.4.2-ab60c87e75.patch",
|
||||||
"@electron-forge/core@6.4.2": "patch:@electron-forge/core@npm%3A6.4.2#./.yarn/patches/@electron-forge-core-npm-6.4.2-ab60c87e75.patch",
|
"@electron-forge/core@6.4.2": "patch:@electron-forge/core@npm%3A6.4.2#./.yarn/patches/@electron-forge-core-npm-6.4.2-ab60c87e75.patch",
|
||||||
"macos-alias": "npm:macos-alias-building@latest",
|
"macos-alias": "npm:macos-alias-building@latest",
|
||||||
|
|||||||
@@ -18,43 +18,43 @@
|
|||||||
"predeploy": "yarn prisma migrate deploy && node --es-module-specifier-resolution node ./dist/data/app.js run"
|
"predeploy": "yarn prisma migrate deploy && node --es-module-specifier-resolution node ./dist/data/app.js run"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/server": "^4.9.4",
|
"@apollo/server": "^4.9.5",
|
||||||
"@auth/prisma-adapter": "^1.0.3",
|
"@auth/prisma-adapter": "^1.0.7",
|
||||||
"@aws-sdk/client-s3": "^3.433.0",
|
"@aws-sdk/client-s3": "^3.454.0",
|
||||||
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.17.0",
|
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.17.0",
|
||||||
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
|
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
|
||||||
"@keyv/redis": "^2.8.0",
|
"@keyv/redis": "^2.8.0",
|
||||||
"@nestjs/apollo": "^12.0.9",
|
"@nestjs/apollo": "^12.0.11",
|
||||||
"@nestjs/common": "^10.2.7",
|
"@nestjs/common": "^10.2.10",
|
||||||
"@nestjs/core": "^10.2.7",
|
"@nestjs/core": "^10.2.10",
|
||||||
"@nestjs/event-emitter": "^2.0.2",
|
"@nestjs/event-emitter": "^2.0.3",
|
||||||
"@nestjs/graphql": "^12.0.9",
|
"@nestjs/graphql": "^12.0.11",
|
||||||
"@nestjs/platform-express": "^10.2.7",
|
"@nestjs/platform-express": "^10.2.10",
|
||||||
"@nestjs/platform-socket.io": "^10.2.7",
|
"@nestjs/platform-socket.io": "^10.2.10",
|
||||||
"@nestjs/schedule": "^4.0.0",
|
"@nestjs/schedule": "^4.0.0",
|
||||||
"@nestjs/throttler": "^5.0.0",
|
"@nestjs/throttler": "^5.0.1",
|
||||||
"@nestjs/websockets": "^10.2.7",
|
"@nestjs/websockets": "^10.2.10",
|
||||||
"@node-rs/argon2": "^1.5.2",
|
"@node-rs/argon2": "^1.5.2",
|
||||||
"@node-rs/crc32": "^1.7.2",
|
"@node-rs/crc32": "^1.7.2",
|
||||||
"@node-rs/jsonwebtoken": "^0.2.3",
|
"@node-rs/jsonwebtoken": "^0.2.3",
|
||||||
"@opentelemetry/api": "^1.6.0",
|
"@opentelemetry/api": "^1.7.0",
|
||||||
"@opentelemetry/core": "^1.17.1",
|
"@opentelemetry/core": "^1.18.1",
|
||||||
"@opentelemetry/instrumentation": "^0.44.0",
|
"@opentelemetry/instrumentation": "^0.45.1",
|
||||||
"@opentelemetry/instrumentation-graphql": "^0.35.2",
|
"@opentelemetry/instrumentation-graphql": "^0.36.0",
|
||||||
"@opentelemetry/instrumentation-http": "^0.44.0",
|
"@opentelemetry/instrumentation-http": "^0.45.1",
|
||||||
"@opentelemetry/instrumentation-ioredis": "^0.35.2",
|
"@opentelemetry/instrumentation-ioredis": "^0.35.3",
|
||||||
"@opentelemetry/instrumentation-nestjs-core": "^0.33.2",
|
"@opentelemetry/instrumentation-nestjs-core": "^0.33.3",
|
||||||
"@opentelemetry/instrumentation-socket.io": "^0.34.2",
|
"@opentelemetry/instrumentation-socket.io": "^0.34.3",
|
||||||
"@opentelemetry/sdk-metrics": "^1.17.1",
|
"@opentelemetry/sdk-metrics": "^1.18.1",
|
||||||
"@opentelemetry/sdk-node": "^0.44.0",
|
"@opentelemetry/sdk-node": "^0.45.1",
|
||||||
"@opentelemetry/sdk-trace-node": "^1.17.1",
|
"@opentelemetry/sdk-trace-node": "^1.18.1",
|
||||||
"@prisma/client": "^5.4.2",
|
"@prisma/client": "^5.6.0",
|
||||||
"@prisma/instrumentation": "^5.4.2",
|
"@prisma/instrumentation": "^5.6.0",
|
||||||
"@socket.io/redis-adapter": "^8.2.1",
|
"@socket.io/redis-adapter": "^8.2.1",
|
||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"file-type": "^18.5.0",
|
"file-type": "^18.7.0",
|
||||||
"get-stream": "^8.0.1",
|
"get-stream": "^8.0.1",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"graphql-type-json": "^0.3.2",
|
"graphql-type-json": "^0.3.2",
|
||||||
@@ -62,49 +62,49 @@
|
|||||||
"ioredis": "^5.3.2",
|
"ioredis": "^5.3.2",
|
||||||
"keyv": "^4.5.4",
|
"keyv": "^4.5.4",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"nest-commander": "^3.12.0",
|
"nest-commander": "^3.12.2",
|
||||||
"nestjs-throttler-storage-redis": "^0.4.1",
|
"nestjs-throttler-storage-redis": "^0.4.1",
|
||||||
"next-auth": "^4.23.2",
|
"next-auth": "^4.24.5",
|
||||||
"nodemailer": "^6.9.6",
|
"nodemailer": "^6.9.7",
|
||||||
"on-headers": "^1.0.2",
|
"on-headers": "^1.0.2",
|
||||||
"parse-duration": "^1.1.0",
|
"parse-duration": "^1.1.0",
|
||||||
"pretty-time": "^1.1.0",
|
"pretty-time": "^1.1.0",
|
||||||
"prisma": "^5.4.2",
|
"prisma": "^5.6.0",
|
||||||
"prom-client": "^15.0.0",
|
"prom-client": "^15.0.0",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"socket.io": "^4.7.2",
|
"socket.io": "^4.7.2",
|
||||||
"stripe": "^14.1.0",
|
"stripe": "^14.5.0",
|
||||||
"ws": "^8.14.2",
|
"ws": "^8.14.2",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@affine-test/kit": "workspace:*",
|
"@affine-test/kit": "workspace:*",
|
||||||
"@affine/storage": "workspace:*",
|
"@affine/storage": "workspace:*",
|
||||||
"@napi-rs/image": "^1.7.0",
|
"@napi-rs/image": "^1.7.0",
|
||||||
"@nestjs/testing": "^10.2.7",
|
"@nestjs/testing": "^10.2.10",
|
||||||
"@types/cookie-parser": "^1.4.4",
|
"@types/cookie-parser": "^1.4.6",
|
||||||
"@types/engine.io": "^3.1.8",
|
"@types/engine.io": "^3.1.10",
|
||||||
"@types/express": "^4.17.19",
|
"@types/express": "^4.17.21",
|
||||||
"@types/graphql-upload": "^16.0.3",
|
"@types/graphql-upload": "^16.0.5",
|
||||||
"@types/keyv": "^4.2.0",
|
"@types/keyv": "^4.2.0",
|
||||||
"@types/lodash-es": "^4.17.9",
|
"@types/lodash-es": "^4.17.11",
|
||||||
"@types/node": "^18.18.5",
|
"@types/node": "^20.9.3",
|
||||||
"@types/nodemailer": "^6.4.11",
|
"@types/nodemailer": "^6.4.14",
|
||||||
"@types/on-headers": "^1.0.1",
|
"@types/on-headers": "^1.0.3",
|
||||||
"@types/pretty-time": "^1.1.3",
|
"@types/pretty-time": "^1.1.5",
|
||||||
"@types/sinon": "^10.0.19",
|
"@types/sinon": "^17.0.2",
|
||||||
"@types/supertest": "^2.0.14",
|
"@types/supertest": "^2.0.16",
|
||||||
"@types/ws": "^8.5.7",
|
"@types/ws": "^8.5.10",
|
||||||
"ava": "^5.3.1",
|
"ava": "^5.3.1",
|
||||||
"c8": "^8.0.1",
|
"c8": "^8.0.1",
|
||||||
"nodemon": "^3.0.1",
|
"nodemon": "^3.0.1",
|
||||||
"sinon": "^16.1.0",
|
"sinon": "^17.0.1",
|
||||||
"supertest": "^6.3.3",
|
"supertest": "^6.3.3",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.3.2"
|
||||||
},
|
},
|
||||||
"ava": {
|
"ava": {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
|
|||||||
4
packages/backend/server/src/cache/redis.ts
vendored
4
packages/backend/server/src/cache/redis.ts
vendored
@@ -182,8 +182,8 @@ export class RedisCache implements Cache {
|
|||||||
typeof v === 'string'
|
typeof v === 'string'
|
||||||
? v
|
? v
|
||||||
: Array.isArray(v)
|
: Array.isArray(v)
|
||||||
? (v[0] as string)
|
? (v[0] as string)
|
||||||
: undefined
|
: undefined
|
||||||
)
|
)
|
||||||
.catch(() => undefined);
|
.catch(() => undefined);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ export function parseEnvValue(value: string | undefined, type?: EnvConfigType) {
|
|||||||
return type === 'int'
|
return type === 'int'
|
||||||
? int(value)
|
? int(value)
|
||||||
: type === 'float'
|
: type === 'float'
|
||||||
? float(value)
|
? float(value)
|
||||||
: type === 'boolean'
|
: type === 'boolean'
|
||||||
? boolean(value)
|
? boolean(value)
|
||||||
: value;
|
: value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export type DeepPartial<T> = T extends Array<infer U>
|
export type DeepPartial<T> = T extends Array<infer U>
|
||||||
? DeepPartial<U>[]
|
? DeepPartial<U>[]
|
||||||
: T extends ReadonlyArray<infer U>
|
: T extends ReadonlyArray<infer U>
|
||||||
? ReadonlyArray<DeepPartial<U>>
|
? ReadonlyArray<DeepPartial<U>>
|
||||||
: T extends object
|
: T extends object
|
||||||
? {
|
? {
|
||||||
[K in keyof T]?: DeepPartial<T[K]>;
|
[K in keyof T]?: DeepPartial<T[K]>;
|
||||||
}
|
}
|
||||||
: T;
|
: T;
|
||||||
|
|
||||||
type Join<Prefix, Suffixes> = Prefix extends string | number
|
type Join<Prefix, Suffixes> = Prefix extends string | number
|
||||||
? Suffixes extends string | number
|
? Suffixes extends string | number
|
||||||
@@ -32,11 +32,11 @@ export type LeafPaths<
|
|||||||
> = Depth extends MaxDepth
|
> = Depth extends MaxDepth
|
||||||
? never
|
? never
|
||||||
: T extends Record<string | number, any>
|
: T extends Record<string | number, any>
|
||||||
? {
|
? {
|
||||||
[K in keyof T]-?: K extends string | number
|
[K in keyof T]-?: K extends string | number
|
||||||
? T[K] extends PrimitiveType
|
? T[K] extends PrimitiveType
|
||||||
? K
|
? K
|
||||||
: Join<K, LeafPaths<T[K], Path, MaxDepth, `${Depth}.`>>
|
: Join<K, LeafPaths<T[K], Path, MaxDepth, `${Depth}.`>>
|
||||||
: never;
|
: never;
|
||||||
}[keyof T]
|
}[keyof T]
|
||||||
: never;
|
: never;
|
||||||
|
|||||||
@@ -36,10 +36,10 @@
|
|||||||
"version": "napi version"
|
"version": "napi version"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@napi-rs/cli": "^2.16.3",
|
"@napi-rs/cli": "^2.16.5",
|
||||||
"lib0": "^0.2.87",
|
"lib0": "^0.2.87",
|
||||||
"nx": "^16.10.0",
|
"nx": "^17.1.3",
|
||||||
"nx-cloud": "^16.5.2",
|
"nx-cloud": "^16.5.2",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -496,8 +496,8 @@ const Command = React.forwardRef<HTMLDivElement, CommandProps>(
|
|||||||
index + change < 0
|
index + change < 0
|
||||||
? items[items.length - 1]
|
? items[items.length - 1]
|
||||||
: index + change === items.length
|
: index + change === items.length
|
||||||
? items[0]
|
? items[0]
|
||||||
: items[index + change];
|
: items[index + change];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newSelected)
|
if (newSelected)
|
||||||
@@ -666,10 +666,10 @@ const Item = React.forwardRef<HTMLDivElement, ItemProps>(
|
|||||||
forceMount
|
forceMount
|
||||||
? true
|
? true
|
||||||
: context.filter() === false
|
: context.filter() === false
|
||||||
? true
|
? true
|
||||||
: !state.search
|
: !state.search
|
||||||
? true
|
? true
|
||||||
: state.filtered.items.get(id) > 0
|
: state.filtered.items.get(id) > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@@ -728,10 +728,10 @@ const Group = React.forwardRef<HTMLDivElement, GroupProps>(
|
|||||||
forceMount
|
forceMount
|
||||||
? true
|
? true
|
||||||
: context.filter() === false
|
: context.filter() === false
|
||||||
? true
|
? true
|
||||||
: !state.search
|
: !state.search
|
||||||
? true
|
? true
|
||||||
: state.filtered.groups.has(id)
|
: state.filtered.groups.has(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
|
|||||||
@@ -58,8 +58,8 @@
|
|||||||
"@blocksuite/blocks": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/blocks": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"jotai-effect": "^0.2.2",
|
"jotai-effect": "^0.2.3",
|
||||||
"tinykeys": "^2.1.0",
|
"tinykeys": "^2.1.0",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
@@ -70,13 +70,13 @@
|
|||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"async-call-rpc": "^6.3.1",
|
"async-call-rpc": "^6.3.1",
|
||||||
"electron": "link:../../frontend/electron/node_modules/electron",
|
"electron": "link:../../frontend/electron/node_modules/electron",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"vite": "^4.4.11",
|
"vite": "^4.4.11",
|
||||||
"vite-plugin-dts": "3.6.0",
|
"vite-plugin-dts": "3.6.0",
|
||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@affine/templates": "*",
|
"@affine/templates": "*",
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ function migrateMeta(
|
|||||||
) {
|
) {
|
||||||
const originalMeta = oldDoc.getMap('space:meta');
|
const originalMeta = oldDoc.getMap('space:meta');
|
||||||
const originalVersions = originalMeta.get('versions') as YMap<number>;
|
const originalVersions = originalMeta.get('versions') as YMap<number>;
|
||||||
const originalPages = originalMeta.get('pages') as YArray<YMap<unknown>>;
|
const originalPages = originalMeta.get('pages') as YArray<YMap<string>>;
|
||||||
const meta = newDoc.getMap('meta');
|
const meta = newDoc.getMap('meta');
|
||||||
const pages = new YArray();
|
const pages = new YArray();
|
||||||
const blockVersions = originalVersions.clone();
|
const blockVersions = originalVersions.clone();
|
||||||
@@ -239,6 +239,7 @@ function migrateBlocks(
|
|||||||
subdoc.guid = id;
|
subdoc.guid = id;
|
||||||
const blocks = subdoc.getMap('blocks');
|
const blocks = subdoc.getMap('blocks');
|
||||||
Array.from(originalBlocks.entries()).forEach(([key, value]) => {
|
Array.from(originalBlocks.entries()).forEach(([key, value]) => {
|
||||||
|
// @ts-expect-error clone method exists
|
||||||
const blockData = value.clone();
|
const blockData = value.clone();
|
||||||
blocks.set(key, blockData);
|
blocks.set(key, blockData);
|
||||||
const flavour = blockData.get('sys:flavour') as string;
|
const flavour = blockData.get('sys:flavour') as string;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"@blocksuite/editor": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/editor": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"y-provider": "workspace:*"
|
"y-provider": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"vite-plugin-dts": "3.6.0",
|
"vite-plugin-dts": "3.6.0",
|
||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"y-indexeddb": "^9.0.11",
|
"y-indexeddb": "^9.0.11",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"yjs": "^13"
|
"yjs": "^13"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
"vite": "^4.4.11",
|
"vite": "^4.4.11",
|
||||||
"vite-plugin-dts": "3.6.0",
|
"vite-plugin-dts": "3.6.0",
|
||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"yjs": "^13"
|
"yjs": "^13"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"@affine/workspace": "workspace:*",
|
"@affine/workspace": "workspace:*",
|
||||||
"@dnd-kit/core": "^6.0.8",
|
"@dnd-kit/core": "^6.0.8",
|
||||||
"@dnd-kit/modifiers": "^6.0.1",
|
"@dnd-kit/modifiers": "^6.0.1",
|
||||||
"@dnd-kit/sortable": "^7.0.2",
|
"@dnd-kit/sortable": "^8.0.0",
|
||||||
"@emotion/cache": "^11.11.0",
|
"@emotion/cache": "^11.11.0",
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"foxact": "^0.2.20",
|
"foxact": "^0.2.20",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"jotai-effect": "^0.2.2",
|
"jotai-effect": "^0.2.3",
|
||||||
"jotai-scope": "^0.4.0",
|
"jotai-scope": "^0.4.1",
|
||||||
"lit": "^3.0.2",
|
"lit": "^3.0.2",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"lottie-react": "^2.4.0",
|
"lottie-react": "^2.4.0",
|
||||||
"lottie-web": "^5.12.2",
|
"lottie-web": "^5.12.2",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-datepicker": "^4.20.0",
|
"react-datepicker": "^4.20.0",
|
||||||
@@ -79,10 +79,10 @@
|
|||||||
"@types/react-dom": "^18.2.13",
|
"@types/react-dom": "^18.2.13",
|
||||||
"@vanilla-extract/css": "^1.13.0",
|
"@vanilla-extract/css": "^1.13.0",
|
||||||
"fake-indexeddb": "^5.0.0",
|
"fake-indexeddb": "^5.0.0",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.3.2",
|
||||||
"vite": "^4.4.11",
|
"vite": "^4.4.11",
|
||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
},
|
},
|
||||||
"version": "0.10.3-canary.0"
|
"version": "0.10.3-canary.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,9 +192,9 @@ export const pageGroupsAtom = atom(get => {
|
|||||||
sorter.key === 'createDate' || sorter.key === 'updatedDate'
|
sorter.key === 'createDate' || sorter.key === 'updatedDate'
|
||||||
? sorter.key
|
? sorter.key
|
||||||
: // default sort
|
: // default sort
|
||||||
!sorter.key
|
!sorter.key
|
||||||
? DEFAULT_SORT_KEY
|
? DEFAULT_SORT_KEY
|
||||||
: undefined;
|
: undefined;
|
||||||
}
|
}
|
||||||
return pagesToPageGroups(sorter.pages, groupBy);
|
return pagesToPageGroups(sorter.pages, groupBy);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ export const Checkbox = ({
|
|||||||
const icon = indeterminate
|
const icon = indeterminate
|
||||||
? icons.indeterminate
|
? icons.indeterminate
|
||||||
: checked
|
: checked
|
||||||
? icons.checked
|
? icons.checked
|
||||||
: icons.unchecked;
|
: icons.unchecked;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
enableCaptcha: process.env.ENABLE_CAPTCHA
|
enableCaptcha: process.env.ENABLE_CAPTCHA
|
||||||
? process.env.ENABLE_CAPTCHA === 'true'
|
? process.env.ENABLE_CAPTCHA === 'true'
|
||||||
: buildFlags.mode === 'development'
|
: buildFlags.mode === 'development'
|
||||||
? false
|
? false
|
||||||
: currentBuildPreset.enableCaptcha,
|
: currentBuildPreset.enableCaptcha,
|
||||||
enableEnhanceShareMode: process.env.ENABLE_ENHANCE_SHARE_MODE
|
enableEnhanceShareMode: process.env.ENABLE_ENHANCE_SHARE_MODE
|
||||||
? process.env.ENABLE_ENHANCE_SHARE_MODE === 'true'
|
? process.env.ENABLE_ENHANCE_SHARE_MODE === 'true'
|
||||||
: currentBuildPreset.enableEnhanceShareMode,
|
: currentBuildPreset.enableEnhanceShareMode,
|
||||||
@@ -140,8 +140,8 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
enablePayment: process.env.ENABLE_PAYMENT
|
enablePayment: process.env.ENABLE_PAYMENT
|
||||||
? process.env.ENABLE_PAYMENT !== 'false'
|
? process.env.ENABLE_PAYMENT !== 'false'
|
||||||
: buildFlags.mode === 'development'
|
: buildFlags.mode === 'development'
|
||||||
? true
|
? true
|
||||||
: currentBuildPreset.enablePayment,
|
: currentBuildPreset.enablePayment,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (buildFlags.mode === 'development') {
|
if (buildFlags.mode === 'development') {
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/icons": "2.1.35",
|
"@blocksuite/icons": "2.1.35",
|
||||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/virgo": "0.0.0-20231116023037-31273bb7-nightly",
|
"@blocksuite/virgo": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@dnd-kit/core": "^6.0.8",
|
"@dnd-kit/core": "^6.0.8",
|
||||||
"@dnd-kit/sortable": "^7.0.2",
|
"@dnd-kit/sortable": "^8.0.0",
|
||||||
"@emotion/cache": "^11.11.0",
|
"@emotion/cache": "^11.11.0",
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
@@ -58,13 +58,13 @@
|
|||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
"intl-segmenter-polyfill-rs": "^0.1.6",
|
"intl-segmenter-polyfill-rs": "^0.1.6",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"jotai-devtools": "^0.7.0",
|
"jotai-devtools": "^0.7.0",
|
||||||
"lit": "^3.0.2",
|
"lit": "^3.0.2",
|
||||||
"lottie-web": "^5.12.2",
|
"lottie-web": "^5.12.2",
|
||||||
"mini-css-extract-plugin": "^2.7.6",
|
"mini-css-extract-plugin": "^2.7.6",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"next-auth": "^4.23.2",
|
"next-auth": "^4.24.5",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"postcss-loader": "^7.3.3",
|
"postcss-loader": "^7.3.3",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"valtio": "^1.11.2",
|
"valtio": "^1.11.2",
|
||||||
"y-protocols": "^1.0.6",
|
"y-protocols": "^1.0.6",
|
||||||
"yjs": "^13.6.8",
|
"yjs": "^13.6.10",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -130,7 +130,9 @@ export const pageCollectionBaseAtom =
|
|||||||
await userSetting.loaded;
|
await userSetting.loaded;
|
||||||
const view = userSetting.view;
|
const view = userSetting.view;
|
||||||
if (view) {
|
if (view) {
|
||||||
const collections: DeprecatedCollection[] = [...view.values()];
|
const collections: Omit<DeprecatedCollection, 'workspaceId'>[] = [
|
||||||
|
...view.values(),
|
||||||
|
];
|
||||||
//delete collections
|
//delete collections
|
||||||
view.clear();
|
view.clear();
|
||||||
return collections.map(v => {
|
return collections.map(v => {
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ const SubscriptionSettings = () => {
|
|||||||
plan === SubscriptionPlan.Free
|
plan === SubscriptionPlan.Free
|
||||||
? '0'
|
? '0'
|
||||||
: price
|
: price
|
||||||
? recurring === SubscriptionRecurring.Monthly
|
? recurring === SubscriptionRecurring.Monthly
|
||||||
? String(price.amount / 100)
|
? String(price.amount / 100)
|
||||||
: String(price.yearlyAmount / 100)
|
: String(price.yearlyAmount / 100)
|
||||||
: '?';
|
: '?';
|
||||||
|
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ export const StyledIsland = styled('div')<{
|
|||||||
boxShadow: spread
|
boxShadow: spread
|
||||||
? 'var(--affine-menu-shadow)'
|
? 'var(--affine-menu-shadow)'
|
||||||
: inEdgelessPage
|
: inEdgelessPage
|
||||||
? 'var(--affine-menu-shadow)'
|
? 'var(--affine-menu-shadow)'
|
||||||
: 'unset',
|
: 'unset',
|
||||||
padding: '0 4px 44px',
|
padding: '0 4px 44px',
|
||||||
borderRadius: '10px',
|
borderRadius: '10px',
|
||||||
background: spread
|
background: spread
|
||||||
|
|||||||
@@ -35,35 +35,35 @@
|
|||||||
"@blocksuite/blocks": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/blocks": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/editor": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/editor": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@electron-forge/cli": "^6.4.2",
|
"@electron-forge/cli": "^7.1.0",
|
||||||
"@electron-forge/core": "^6.4.2",
|
"@electron-forge/core": "^7.1.0",
|
||||||
"@electron-forge/core-utils": "^6.4.2",
|
"@electron-forge/core-utils": "^7.1.0",
|
||||||
"@electron-forge/maker-deb": "^6.4.2",
|
"@electron-forge/maker-deb": "^7.1.0",
|
||||||
"@electron-forge/maker-dmg": "^6.4.2",
|
"@electron-forge/maker-dmg": "^7.1.0",
|
||||||
"@electron-forge/maker-squirrel": "^6.4.2",
|
"@electron-forge/maker-squirrel": "^7.1.0",
|
||||||
"@electron-forge/maker-zip": "^6.4.2",
|
"@electron-forge/maker-zip": "^7.1.0",
|
||||||
"@electron-forge/plugin-auto-unpack-natives": "^6.4.2",
|
"@electron-forge/plugin-auto-unpack-natives": "^7.1.0",
|
||||||
"@electron-forge/shared-types": "^6.4.2",
|
"@electron-forge/shared-types": "^7.1.0",
|
||||||
"@electron/remote": "2.0.12",
|
"@electron/remote": "2.1.0",
|
||||||
"@reforged/maker-appimage": "^3.3.1",
|
"@reforged/maker-appimage": "^3.3.1",
|
||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@types/uuid": "^9.0.5",
|
"@types/uuid": "^9.0.7",
|
||||||
"builder-util-runtime": "^9.2.1",
|
"builder-util-runtime": "^9.2.3",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"electron": "^27.1.0",
|
"electron": "^27.1.0",
|
||||||
"electron-log": "^5.0.0",
|
"electron-log": "^5.0.1",
|
||||||
"electron-squirrel-startup": "1.0.0",
|
"electron-squirrel-startup": "1.0.0",
|
||||||
"electron-window-state": "^5.0.3",
|
"electron-window-state": "^5.0.3",
|
||||||
"esbuild": "^0.19.4",
|
"esbuild": "^0.19.7",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"glob": "^10.3.10",
|
"glob": "^10.3.10",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"tinykeys": "^2.1.0",
|
"tinykeys": "^2.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"undici": "^5.26.3",
|
"undici": "^5.27.2",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"which": "^4.0.0",
|
"which": "^4.0.0",
|
||||||
@@ -73,8 +73,8 @@
|
|||||||
"async-call-rpc": "^6.3.1",
|
"async-call-rpc": "^6.3.1",
|
||||||
"electron-updater": "^6.1.5",
|
"electron-updater": "^6.1.5",
|
||||||
"link-preview-js": "^3.0.5",
|
"link-preview-js": "^3.0.5",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.10"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"protocols": [
|
"protocols": [
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ async function buildLayers() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.BUILD_TYPE_OVERRIDE) {
|
if (process.env.BUILD_TYPE_OVERRIDE) {
|
||||||
define[
|
define['process.env.BUILD_TYPE_OVERRIDE'] =
|
||||||
'process.env.BUILD_TYPE_OVERRIDE'
|
`"${process.env.BUILD_TYPE_OVERRIDE}"`;
|
||||||
] = `"${process.env.BUILD_TYPE_OVERRIDE}"`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await esbuild.build({
|
await esbuild.build({
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ async function createWindow() {
|
|||||||
titleBarStyle: isMacOS()
|
titleBarStyle: isMacOS()
|
||||||
? 'hiddenInset'
|
? 'hiddenInset'
|
||||||
: isWindows()
|
: isWindows()
|
||||||
? 'hidden'
|
? 'hidden'
|
||||||
: 'default',
|
: 'default',
|
||||||
trafficLightPosition: { x: 20, y: 16 },
|
trafficLightPosition: { x: 20, y: 16 },
|
||||||
x: mainWindowState.x,
|
x: mainWindowState.x,
|
||||||
y: mainWindowState.y,
|
y: mainWindowState.y,
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ export type _QueryVariables<Q extends GraphQLQuery> =
|
|||||||
Q['id'] extends Queries['name']
|
Q['id'] extends Queries['name']
|
||||||
? Extract<Queries, { name: Q['id'] }>['variables']
|
? Extract<Queries, { name: Q['id'] }>['variables']
|
||||||
: Q['id'] extends Mutations['name']
|
: Q['id'] extends Mutations['name']
|
||||||
? Extract<Mutations, { name: Q['id'] }>['variables']
|
? Extract<Mutations, { name: Q['id'] }>['variables']
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
export type QueryVariables<Q extends GraphQLQuery> = _QueryVariables<Q> extends
|
export type QueryVariables<Q extends GraphQLQuery> = _QueryVariables<Q> extends
|
||||||
| never
|
| never
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foxact": "^0.2.20",
|
"foxact": "^0.2.20",
|
||||||
"image-blob-reduce": "^4.1.0",
|
"image-blob-reduce": "^4.1.0",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"p-queue": "^7.4.1",
|
"p-queue": "^7.4.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
"react-i18next": "^13.3.0"
|
"react-i18next": "^13.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.18.5",
|
|
||||||
"@types/prettier": "^3.0.0",
|
"@types/prettier": "^3.0.0",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import type { i18n, Resource } from 'i18next';
|
|||||||
import i18next from 'i18next';
|
import i18next from 'i18next';
|
||||||
import {
|
import {
|
||||||
I18nextProvider,
|
I18nextProvider,
|
||||||
|
type I18nextProviderProps,
|
||||||
initReactI18next,
|
initReactI18next,
|
||||||
Trans,
|
Trans,
|
||||||
useTranslation as useRootTranslation,
|
useTranslation as useRootTranslation,
|
||||||
@@ -66,8 +67,9 @@ const standardizeLocale = (language: string) => {
|
|||||||
return fallbackLng;
|
return fallbackLng;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createI18n = () => {
|
export const createI18n = (): I18nextProviderProps['i18n'] => {
|
||||||
const i18n = i18next.createInstance();
|
// @ts-expect-error ts bug
|
||||||
|
const i18n: I18nextProviderProps['i18n'] = i18next.createInstance();
|
||||||
i18n
|
i18n
|
||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { Request } from 'undici-types';
|
||||||
|
|
||||||
// cSpell:ignore Tolgee
|
// cSpell:ignore Tolgee
|
||||||
const TOLGEE_API_KEY = process.env['TOLGEE_API_KEY'];
|
const TOLGEE_API_KEY = process.env['TOLGEE_API_KEY'];
|
||||||
const TOLGEE_API_URL = 'https://i18n.affine.pro';
|
const TOLGEE_API_URL = 'https://i18n.affine.pro';
|
||||||
@@ -15,7 +17,7 @@ const withTolgee = (
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
});
|
});
|
||||||
|
|
||||||
const isRequest = (input: RequestInfo | URL): input is Request => {
|
const isRequest = (input: NodeJS.fetch.RequestInfo): input is Request => {
|
||||||
return typeof input === 'object' && !('href' in input);
|
return typeof input === 'object' && !('href' in input);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -31,6 +33,7 @@ const withTolgee = (
|
|||||||
argArray[0] = {
|
argArray[0] = {
|
||||||
...argArray[0],
|
...argArray[0],
|
||||||
url: `${baseUrl}${argArray[0].url}`,
|
url: `${baseUrl}${argArray[0].url}`,
|
||||||
|
// @ts-expect-error Node.js types incorrectly define RequestInit
|
||||||
headers,
|
headers,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,16 +35,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@napi-rs/cli": "^2.16.3",
|
"@napi-rs/cli": "^2.16.5",
|
||||||
"@types/node": "^18.18.5",
|
"@types/node": "^20.9.3",
|
||||||
"@types/uuid": "^9.0.5",
|
"@types/uuid": "^9.0.7",
|
||||||
"ava": "^5.3.1",
|
"ava": "^5.3.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"nx": "^16.10.0",
|
"nx": "^17.1.3",
|
||||||
"nx-cloud": "^16.5.2",
|
"nx-cloud": "^16.5.2",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.3.2",
|
||||||
"uuid": "^9.0.1"
|
"uuid": "^9.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
"async-call-rpc": "^6.3.1",
|
"async-call-rpc": "^6.3.1",
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
"is-svg": "^5.0.0",
|
"is-svg": "^5.0.0",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"js-base64": "^3.7.5",
|
"js-base64": "^3.7.5",
|
||||||
"ky": "^1.0.1",
|
"ky": "^1.0.1",
|
||||||
"lib0": "^0.2.87",
|
"lib0": "^0.2.87",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"nanoid": "^5.0.1",
|
"nanoid": "^5.0.3",
|
||||||
"next-auth": "^4.23.2",
|
"next-auth": "^4.24.5",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"socket.io-client": "^4.7.2",
|
"socket.io-client": "^4.7.2",
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"valtio": "^1.11.2",
|
"valtio": "^1.11.2",
|
||||||
"y-protocols": "^1.0.6",
|
"y-protocols": "^1.0.6",
|
||||||
"y-provider": "workspace:*",
|
"y-provider": "workspace:*",
|
||||||
"yjs": "^13.6.8",
|
"yjs": "^13.6.10",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ export const createCloudBlobStorage = (workspaceId: string): BlobStorage => {
|
|||||||
const suffix = key.startsWith('/')
|
const suffix = key.startsWith('/')
|
||||||
? key
|
? key
|
||||||
: predefinedStaticFiles.includes(key)
|
: predefinedStaticFiles.includes(key)
|
||||||
? `/static/${key}`
|
? `/static/${key}`
|
||||||
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
: `/api/workspaces/${workspaceId}/blobs/${key}`;
|
||||||
|
|
||||||
return fetchWithTraceReport(
|
return fetchWithTraceReport(
|
||||||
runtimeConfig.serverUrlPrefix + suffix
|
runtimeConfig.serverUrlPrefix + suffix
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@affine/plugin-cli": "workspace:*",
|
"@affine/plugin-cli": "workspace:*",
|
||||||
"@types/marked": "^6.0.0",
|
"@types/marked": "^6.0.0",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@affine/plugin-cli": "workspace:*",
|
"@affine/plugin-cli": "workspace:*",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,3 +8,4 @@ yarn up "@blocksuite/blocks@${LATEST_NIGHTLY}"
|
|||||||
yarn up "@blocksuite/editor@${LATEST_NIGHTLY}"
|
yarn up "@blocksuite/editor@${LATEST_NIGHTLY}"
|
||||||
yarn up "@blocksuite/global@${LATEST_NIGHTLY}"
|
yarn up "@blocksuite/global@${LATEST_NIGHTLY}"
|
||||||
yarn up "@blocksuite/block-std@${LATEST_NIGHTLY}"
|
yarn up "@blocksuite/block-std@${LATEST_NIGHTLY}"
|
||||||
|
yarn up "@blocksuite/virgo@${LATEST_NIGHTLY}"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const semver = await import('semver').catch(() =>
|
const semver = await import('semver').catch(
|
||||||
import('../packages/backend/server/node_modules/semver/index.js')
|
() => import('../packages/backend/server/node_modules/semver/index.js')
|
||||||
);
|
);
|
||||||
|
|
||||||
import packageJson from '../package.json' assert { type: 'json' };
|
import packageJson from '../package.json' assert { type: 'json' };
|
||||||
|
|||||||
@@ -9,26 +9,26 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@storybook/addon-actions": "^7.4.6",
|
"@storybook/addon-actions": "^7.5.3",
|
||||||
"@storybook/addon-essentials": "^7.4.6",
|
"@storybook/addon-essentials": "^7.5.3",
|
||||||
"@storybook/addon-interactions": "^7.4.6",
|
"@storybook/addon-interactions": "^7.5.3",
|
||||||
"@storybook/addon-links": "^7.4.6",
|
"@storybook/addon-links": "^7.5.3",
|
||||||
"@storybook/addon-storysource": "^7.4.6",
|
"@storybook/addon-storysource": "^7.5.3",
|
||||||
"@storybook/blocks": "^7.4.6",
|
"@storybook/blocks": "^7.5.3",
|
||||||
"@storybook/builder-vite": "^7.4.6",
|
"@storybook/builder-vite": "^7.5.3",
|
||||||
"@storybook/jest": "^0.2.3",
|
"@storybook/jest": "^0.2.3",
|
||||||
"@storybook/react": "^7.4.6",
|
"@storybook/react": "^7.5.3",
|
||||||
"@storybook/react-vite": "^7.4.6",
|
"@storybook/react-vite": "^7.5.3",
|
||||||
"@storybook/test-runner": "^0.13.0",
|
"@storybook/test-runner": "^0.15.2",
|
||||||
"@storybook/testing-library": "^0.2.2",
|
"@storybook/testing-library": "^0.2.2",
|
||||||
"@vitejs/plugin-react": "^4.1.0",
|
"@vitejs/plugin-react": "^4.2.0",
|
||||||
"concurrently": "^8.2.1",
|
"concurrently": "^8.2.2",
|
||||||
"jest-mock": "^29.7.0",
|
"jest-mock": "^29.7.0",
|
||||||
"serve": "^14.2.1",
|
"serve": "^14.2.1",
|
||||||
"ses": "^0.18.8",
|
"ses": "^0.18.8",
|
||||||
"storybook": "^7.4.6",
|
"storybook": "^7.5.3",
|
||||||
"storybook-dark-mode": "^3.0.1",
|
"storybook-dark-mode": "^3.0.1",
|
||||||
"wait-on": "^7.0.1"
|
"wait-on": "^7.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blocksuite/block-std": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/block-std": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
@@ -37,15 +37,16 @@
|
|||||||
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/global": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@blocksuite/icons": "2.1.35",
|
"@blocksuite/icons": "2.1.35",
|
||||||
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
"@blocksuite/store": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
"@dnd-kit/sortable": "^7.0.2",
|
"@blocksuite/virgo": "0.0.0-20231122113751-6bf81eb3-nightly",
|
||||||
|
"@dnd-kit/sortable": "^8.0.0",
|
||||||
"@tomfreudenberg/next-auth-mock": "^0.5.6",
|
"@tomfreudenberg/next-auth-mock": "^0.5.6",
|
||||||
"chromatic": "^7.4.0",
|
"chromatic": "^9.1.0",
|
||||||
"foxact": "^0.2.20",
|
"foxact": "^0.2.26",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.5.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-router-dom": "^6.16.0",
|
"react-router-dom": "^6.19.0",
|
||||||
"storybook-addon-react-router-v6": "^2.0.7"
|
"storybook-addon-react-router-v6": "^2.0.10"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@blocksuite/blocks": "*",
|
"@blocksuite/blocks": "*",
|
||||||
|
|||||||
Reference in New Issue
Block a user