mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
Compare commits
3 Commits
v0.26.2
...
v2026.2.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ad482351b | ||
|
|
03b1d15a8f | ||
|
|
52c7b04a01 |
16
.github/actions/deploy/deploy.mjs
vendored
16
.github/actions/deploy/deploy.mjs
vendored
@@ -25,7 +25,9 @@ const buildType = BUILD_TYPE || 'canary';
|
||||
|
||||
const isProduction = buildType === 'stable';
|
||||
const isBeta = buildType === 'beta';
|
||||
const isCanary = buildType === 'canary';
|
||||
const isInternal = buildType === 'internal';
|
||||
const isSpotEnabled = isBeta || isCanary;
|
||||
|
||||
const replicaConfig = {
|
||||
stable: {
|
||||
@@ -72,6 +74,9 @@ const createHelmCommand = ({ isDryRun }) => {
|
||||
`--set-string global.indexer.endpoint="${AFFINE_INDEXER_SEARCH_ENDPOINT}"`,
|
||||
`--set-string global.indexer.apiKey="${AFFINE_INDEXER_SEARCH_API_KEY}"`,
|
||||
];
|
||||
const cloudSqlNodeSelector = isBeta
|
||||
? `{ \\"iam.gke.io/gke-metadata-server-enabled\\": \\"true\\", \\"cloud.google.com/gke-spot\\": \\"true\\" }`
|
||||
: `{ \\"iam.gke.io/gke-metadata-server-enabled\\": \\"true\\" }`;
|
||||
const serviceAnnotations = [
|
||||
`--set-json front.serviceAccount.annotations="{ \\"iam.gke.io/gcp-service-account\\": \\"${APP_IAM_ACCOUNT}\\" }"`,
|
||||
`--set-json graphql.serviceAccount.annotations="{ \\"iam.gke.io/gcp-service-account\\": \\"${APP_IAM_ACCOUNT}\\" }"`,
|
||||
@@ -84,10 +89,18 @@ const createHelmCommand = ({ isDryRun }) => {
|
||||
`--set-json front.services.renderer.annotations="{ \\"cloud.google.com/neg\\": \\"{\\\\\\"ingress\\\\\\": true}\\" }"`,
|
||||
`--set-json graphql.service.annotations="{ \\"cloud.google.com/neg\\": \\"{\\\\\\"ingress\\\\\\": true}\\" }"`,
|
||||
`--set-json cloud-sql-proxy.serviceAccount.annotations="{ \\"iam.gke.io/gcp-service-account\\": \\"${CLOUD_SQL_IAM_ACCOUNT}\\" }"`,
|
||||
`--set-json cloud-sql-proxy.nodeSelector="{ \\"iam.gke.io/gke-metadata-server-enabled\\": \\"true\\" }"`,
|
||||
`--set-json cloud-sql-proxy.nodeSelector="${cloudSqlNodeSelector}"`,
|
||||
]
|
||||
: []
|
||||
);
|
||||
const spotNodeSelector = `{ \\"cloud.google.com/gke-spot\\": \\"true\\" }`;
|
||||
const spotScheduling = isSpotEnabled
|
||||
? [
|
||||
`--set-json front.nodeSelector="${spotNodeSelector}"`,
|
||||
`--set-json graphql.nodeSelector="${spotNodeSelector}"`,
|
||||
`--set-json doc.nodeSelector="${spotNodeSelector}"`,
|
||||
]
|
||||
: [];
|
||||
|
||||
const cpu = cpuConfig[buildType];
|
||||
const memory = memoryConfig[buildType];
|
||||
@@ -146,6 +159,7 @@ const createHelmCommand = ({ isDryRun }) => {
|
||||
`--set-string doc.app.host="${primaryHost}"`,
|
||||
`--set doc.replicaCount=${replica.doc}`,
|
||||
...serviceAnnotations,
|
||||
...spotScheduling,
|
||||
...resources,
|
||||
`--timeout 10m`,
|
||||
flag,
|
||||
|
||||
5
.github/helm/affine/charts/doc/values.yaml
vendored
5
.github/helm/affine/charts/doc/values.yaml
vendored
@@ -30,9 +30,12 @@ podSecurityContext:
|
||||
fsGroup: 2000
|
||||
|
||||
resources:
|
||||
requests:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: '1'
|
||||
memory: 2Gi
|
||||
|
||||
probe:
|
||||
initialDelaySeconds: 20
|
||||
|
||||
3
.github/helm/affine/charts/front/values.yaml
vendored
3
.github/helm/affine/charts/front/values.yaml
vendored
@@ -29,6 +29,9 @@ podSecurityContext:
|
||||
fsGroup: 2000
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: '1'
|
||||
memory: 2Gi
|
||||
|
||||
@@ -27,8 +27,11 @@ podSecurityContext:
|
||||
fsGroup: 2000
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: '2'
|
||||
cpu: '1'
|
||||
memory: 2Gi
|
||||
|
||||
probe:
|
||||
|
||||
@@ -37,12 +37,7 @@ function extractTokenFromHeader(authorization: string) {
|
||||
|
||||
@Injectable()
|
||||
export class AuthService implements OnApplicationBootstrap {
|
||||
readonly cookieOptions: CookieOptions = {
|
||||
sameSite: 'lax',
|
||||
httpOnly: true,
|
||||
path: '/',
|
||||
secure: this.config.server.https,
|
||||
};
|
||||
readonly cookieOptions: CookieOptions;
|
||||
static readonly sessionCookieName = 'affine_session';
|
||||
static readonly userCookieName = 'affine_user_id';
|
||||
static readonly csrfCookieName = 'affine_csrf_token';
|
||||
@@ -51,7 +46,14 @@ export class AuthService implements OnApplicationBootstrap {
|
||||
private readonly config: Config,
|
||||
private readonly models: Models,
|
||||
private readonly mailer: Mailer
|
||||
) {}
|
||||
) {
|
||||
this.cookieOptions = {
|
||||
sameSite: 'lax',
|
||||
httpOnly: true,
|
||||
path: '/',
|
||||
secure: this.config.server.https,
|
||||
};
|
||||
}
|
||||
|
||||
async onApplicationBootstrap() {
|
||||
if (env.dev) {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@types/set-cookie-parser": "^2.4.10",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@vitejs/plugin-react-swc": "^3.7.2",
|
||||
"@vitejs/plugin-react-swc": "^4.0.0",
|
||||
"app-builder-lib": "^26.1.0",
|
||||
"builder-util-runtime": "^9.5.0",
|
||||
"cross-env": "^10.1.0",
|
||||
|
||||
120
yarn.lock
120
yarn.lock
@@ -593,7 +593,7 @@ __metadata:
|
||||
"@toeverything/infra": "workspace:*"
|
||||
"@types/set-cookie-parser": "npm:^2.4.10"
|
||||
"@types/uuid": "npm:^11.0.0"
|
||||
"@vitejs/plugin-react-swc": "npm:^3.7.2"
|
||||
"@vitejs/plugin-react-swc": "npm:^4.0.0"
|
||||
app-builder-lib: "npm:^26.1.0"
|
||||
async-call-rpc: "npm:^6.4.2"
|
||||
builder-util-runtime: "npm:^9.5.0"
|
||||
@@ -14886,6 +14886,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rolldown/pluginutils@npm:1.0.0-rc.2":
|
||||
version: 1.0.0-rc.2
|
||||
resolution: "@rolldown/pluginutils@npm:1.0.0-rc.2"
|
||||
checksum: 10/8dba3626ca26f49ed83d4db4a9eaacfcc6715cc8544f2969419489c90a2bb000025976049e0f6c5c2880817bff753fb04bec8fb57df9423f07958ce8da97035e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/pluginutils@npm:^5.0.2, @rollup/pluginutils@npm:^5.1.3, @rollup/pluginutils@npm:^5.3.0":
|
||||
version: 5.3.0
|
||||
resolution: "@rollup/pluginutils@npm:5.3.0"
|
||||
@@ -15817,92 +15824,92 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-darwin-arm64@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-darwin-arm64@npm:1.11.29"
|
||||
"@swc/core-darwin-arm64@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-darwin-arm64@npm:1.15.11"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-darwin-x64@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-darwin-x64@npm:1.11.29"
|
||||
"@swc/core-darwin-x64@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-darwin-x64@npm:1.15.11"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-linux-arm-gnueabihf@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.11.29"
|
||||
"@swc/core-linux-arm-gnueabihf@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.15.11"
|
||||
conditions: os=linux & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-linux-arm64-gnu@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-linux-arm64-gnu@npm:1.11.29"
|
||||
"@swc/core-linux-arm64-gnu@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-linux-arm64-gnu@npm:1.15.11"
|
||||
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-linux-arm64-musl@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-linux-arm64-musl@npm:1.11.29"
|
||||
"@swc/core-linux-arm64-musl@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-linux-arm64-musl@npm:1.15.11"
|
||||
conditions: os=linux & cpu=arm64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-linux-x64-gnu@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-linux-x64-gnu@npm:1.11.29"
|
||||
"@swc/core-linux-x64-gnu@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-linux-x64-gnu@npm:1.15.11"
|
||||
conditions: os=linux & cpu=x64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-linux-x64-musl@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-linux-x64-musl@npm:1.11.29"
|
||||
"@swc/core-linux-x64-musl@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-linux-x64-musl@npm:1.15.11"
|
||||
conditions: os=linux & cpu=x64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-win32-arm64-msvc@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-win32-arm64-msvc@npm:1.11.29"
|
||||
"@swc/core-win32-arm64-msvc@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-win32-arm64-msvc@npm:1.15.11"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-win32-ia32-msvc@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-win32-ia32-msvc@npm:1.11.29"
|
||||
"@swc/core-win32-ia32-msvc@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-win32-ia32-msvc@npm:1.15.11"
|
||||
conditions: os=win32 & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core-win32-x64-msvc@npm:1.11.29":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core-win32-x64-msvc@npm:1.11.29"
|
||||
"@swc/core-win32-x64-msvc@npm:1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core-win32-x64-msvc@npm:1.15.11"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/core@npm:^1.10.1, @swc/core@npm:^1.11.21":
|
||||
version: 1.11.29
|
||||
resolution: "@swc/core@npm:1.11.29"
|
||||
"@swc/core@npm:^1.10.1, @swc/core@npm:^1.15.11":
|
||||
version: 1.15.11
|
||||
resolution: "@swc/core@npm:1.15.11"
|
||||
dependencies:
|
||||
"@swc/core-darwin-arm64": "npm:1.11.29"
|
||||
"@swc/core-darwin-x64": "npm:1.11.29"
|
||||
"@swc/core-linux-arm-gnueabihf": "npm:1.11.29"
|
||||
"@swc/core-linux-arm64-gnu": "npm:1.11.29"
|
||||
"@swc/core-linux-arm64-musl": "npm:1.11.29"
|
||||
"@swc/core-linux-x64-gnu": "npm:1.11.29"
|
||||
"@swc/core-linux-x64-musl": "npm:1.11.29"
|
||||
"@swc/core-win32-arm64-msvc": "npm:1.11.29"
|
||||
"@swc/core-win32-ia32-msvc": "npm:1.11.29"
|
||||
"@swc/core-win32-x64-msvc": "npm:1.11.29"
|
||||
"@swc/core-darwin-arm64": "npm:1.15.11"
|
||||
"@swc/core-darwin-x64": "npm:1.15.11"
|
||||
"@swc/core-linux-arm-gnueabihf": "npm:1.15.11"
|
||||
"@swc/core-linux-arm64-gnu": "npm:1.15.11"
|
||||
"@swc/core-linux-arm64-musl": "npm:1.15.11"
|
||||
"@swc/core-linux-x64-gnu": "npm:1.15.11"
|
||||
"@swc/core-linux-x64-musl": "npm:1.15.11"
|
||||
"@swc/core-win32-arm64-msvc": "npm:1.15.11"
|
||||
"@swc/core-win32-ia32-msvc": "npm:1.15.11"
|
||||
"@swc/core-win32-x64-msvc": "npm:1.15.11"
|
||||
"@swc/counter": "npm:^0.1.3"
|
||||
"@swc/types": "npm:^0.1.21"
|
||||
"@swc/types": "npm:^0.1.25"
|
||||
peerDependencies:
|
||||
"@swc/helpers": ">=0.5.17"
|
||||
dependenciesMeta:
|
||||
@@ -15929,7 +15936,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
"@swc/helpers":
|
||||
optional: true
|
||||
checksum: 10/6945229bf6da91adff26033910e8e02ccc457a8229724d0539a0b32995d05949c7709cb9cae2cd7ab10cf4d346b235e22dd4d6b207ded765597304e21e6b6101
|
||||
checksum: 10/2ee702f6ee39fc68f1e4d03a19191eaa3762d54ab917d5617741196bbe3beba9fb50b1e878af2735f8a42ecdef3632f44acc090611ebf01a0df4dc533a71f5d2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -15958,12 +15965,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@swc/types@npm:^0.1.21":
|
||||
version: 0.1.21
|
||||
resolution: "@swc/types@npm:0.1.21"
|
||||
"@swc/types@npm:^0.1.25":
|
||||
version: 0.1.25
|
||||
resolution: "@swc/types@npm:0.1.25"
|
||||
dependencies:
|
||||
"@swc/counter": "npm:^0.1.3"
|
||||
checksum: 10/6554bf5c78519f49099a2ba448d170191a14b1c7a35df848f10ee4d6c03ecd681e5213884905187de1d1d221589ec8b5cb77f477d099dc1627c3ec9d7f2fcdb0
|
||||
checksum: 10/f6741450224892d12df43e5ca7f3cc0287df644dcd672626eb0cc2a3a8e3e875f4b29eb11336f37c7240cf6e010ba59eb3a79f4fb8bee5cbd168dfc1326ff369
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -18163,14 +18170,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vitejs/plugin-react-swc@npm:^3.7.2":
|
||||
version: 3.9.0
|
||||
resolution: "@vitejs/plugin-react-swc@npm:3.9.0"
|
||||
"@vitejs/plugin-react-swc@npm:^4.0.0":
|
||||
version: 4.2.3
|
||||
resolution: "@vitejs/plugin-react-swc@npm:4.2.3"
|
||||
dependencies:
|
||||
"@swc/core": "npm:^1.11.21"
|
||||
"@rolldown/pluginutils": "npm:1.0.0-rc.2"
|
||||
"@swc/core": "npm:^1.15.11"
|
||||
peerDependencies:
|
||||
vite: ^4 || ^5 || ^6
|
||||
checksum: 10/545dddee3c2f7f35f37c680f79bebb98f3968209470ec56c594556410d498b41cf86df60d2ab9a56c69b02bef12ee3198371becc804b85172ec97ee0d2d7633d
|
||||
vite: ^4 || ^5 || ^6 || ^7
|
||||
checksum: 10/48ab3de0a3833987ff7fc15d4561d930853acf1a2e44523279bc877f8ee81a368465f4b32f21155986986538514cc6aad3dfef62eb25490acde3593c970da521
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user