mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 16:16:46 +08:00
refactor: setup files (#8201)
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
type WorkspaceMetadata,
|
||||
type WorkspaceProfileInfo,
|
||||
} from '@toeverything/infra';
|
||||
import { effect, globalBlockSuiteSchema, Service } from '@toeverything/infra';
|
||||
import { effect, getAFFiNEWorkspaceSchema, Service } from '@toeverything/infra';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { EMPTY, map, mergeMap } from 'rxjs';
|
||||
@@ -96,7 +96,7 @@ export class CloudWorkspaceFlavourProviderService
|
||||
const docCollection = new DocCollection({
|
||||
id: workspaceId,
|
||||
idGenerator: () => nanoid(),
|
||||
schema: globalBlockSuiteSchema,
|
||||
schema: getAFFiNEWorkspaceSchema(),
|
||||
blobSources: {
|
||||
main: blobStorage,
|
||||
},
|
||||
@@ -216,7 +216,7 @@ export class CloudWorkspaceFlavourProviderService
|
||||
|
||||
const bs = new DocCollection({
|
||||
id,
|
||||
schema: globalBlockSuiteSchema,
|
||||
schema: getAFFiNEWorkspaceSchema(),
|
||||
});
|
||||
|
||||
if (localData) applyUpdate(bs.doc, localData);
|
||||
|
||||
@@ -9,7 +9,11 @@ import type {
|
||||
WorkspaceMetadata,
|
||||
WorkspaceProfileInfo,
|
||||
} from '@toeverything/infra';
|
||||
import { globalBlockSuiteSchema, LiveData, Service } from '@toeverything/infra';
|
||||
import {
|
||||
getAFFiNEWorkspaceSchema,
|
||||
LiveData,
|
||||
Service,
|
||||
} from '@toeverything/infra';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -70,7 +74,7 @@ export class LocalWorkspaceFlavourProvider
|
||||
const docCollection = new DocCollection({
|
||||
id: id,
|
||||
idGenerator: () => nanoid(),
|
||||
schema: globalBlockSuiteSchema,
|
||||
schema: getAFFiNEWorkspaceSchema(),
|
||||
blobSources: { main: blobStorage },
|
||||
});
|
||||
|
||||
@@ -143,7 +147,7 @@ export class LocalWorkspaceFlavourProvider
|
||||
|
||||
const bs = new DocCollection({
|
||||
id,
|
||||
schema: globalBlockSuiteSchema,
|
||||
schema: getAFFiNEWorkspaceSchema(),
|
||||
});
|
||||
|
||||
if (localData) applyUpdate(bs.doc, localData);
|
||||
|
||||
Reference in New Issue
Block a user