mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
Compare commits
19 Commits
v0.26.3-be
...
v0.10.1-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4db811c999 | ||
|
|
9b631f2328 | ||
|
|
01f481a9b6 | ||
|
|
0177ab5c87 | ||
|
|
4db35d341c | ||
|
|
3c4a803c97 | ||
|
|
05154dc7ca | ||
|
|
c90b477f60 | ||
|
|
6f18ddbe85 | ||
|
|
dde779a71d | ||
|
|
bd9f66fbc7 | ||
|
|
92f1f40bfa | ||
|
|
48dc1049b3 | ||
|
|
9add530370 | ||
|
|
b77460d871 | ||
|
|
42db41776b | ||
|
|
075439c74f | ||
|
|
fc6c553ece | ||
|
|
59cb3d5df1 |
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@@ -66,7 +66,6 @@ jobs:
|
|||||||
check-yarn-binary:
|
check-yarn-binary:
|
||||||
name: Check yarn binary
|
name: Check yarn binary
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: development
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Run check
|
- name: Run check
|
||||||
|
|||||||
15
.github/workflows/nightly-build.yml
vendored
15
.github/workflows/nightly-build.yml
vendored
@@ -86,11 +86,11 @@ jobs:
|
|||||||
# For windows, we need a separate approach
|
# For windows, we need a separate approach
|
||||||
matrix:
|
matrix:
|
||||||
spec:
|
spec:
|
||||||
- runner: macos-latest-xlarge
|
- runner: macos-latest
|
||||||
platform: darwin
|
platform: darwin
|
||||||
arch: x64
|
arch: x64
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- runner: macos-latest-xlarge
|
- runner: macos-latest
|
||||||
platform: darwin
|
platform: darwin
|
||||||
arch: arm64
|
arch: arm64
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
@@ -115,6 +115,17 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
timeout-minutes: 10
|
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
|
uses: ./.github/actions/setup-node
|
||||||
with:
|
with:
|
||||||
extra-flags: workspaces focus @affine/electron @affine/monorepo
|
extra-flags: workspaces focus @affine/electron @affine/monorepo
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/monorepo",
|
"name": "@affine/monorepo",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "toeverything",
|
"author": "toeverything",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/server",
|
"name": "@affine/server",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"description": "Affine Node.js server",
|
"description": "Affine Node.js server",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import {
|
|||||||
|
|
||||||
export const NextAuthOptionsProvide = Symbol('NextAuthOptions');
|
export const NextAuthOptionsProvide = Symbol('NextAuthOptions');
|
||||||
|
|
||||||
|
const TrustedProviders = ['google'];
|
||||||
|
|
||||||
export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
|
export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
|
||||||
provide: NextAuthOptionsProvide,
|
provide: NextAuthOptionsProvide,
|
||||||
useFactory(
|
useFactory(
|
||||||
@@ -51,6 +53,23 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
|
|||||||
}
|
}
|
||||||
return createUser(userData);
|
return createUser(userData);
|
||||||
};
|
};
|
||||||
|
// linkAccount exists in the adapter
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
|
const linkAccount = prismaAdapter.linkAccount!.bind(prismaAdapter);
|
||||||
|
prismaAdapter.linkAccount = async account => {
|
||||||
|
// google account must be a verified email
|
||||||
|
if (TrustedProviders.includes(account.provider)) {
|
||||||
|
await prisma.user.update({
|
||||||
|
where: {
|
||||||
|
id: account.userId,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
emailVerified: new Date(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return linkAccount(account) as Promise<void>;
|
||||||
|
};
|
||||||
// getUser exists in the adapter
|
// getUser exists in the adapter
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
const getUser = prismaAdapter.getUser!.bind(prismaAdapter)!;
|
const getUser = prismaAdapter.getUser!.bind(prismaAdapter)!;
|
||||||
|
|||||||
@@ -135,9 +135,17 @@ export class AuthResolver {
|
|||||||
@Args('token') token: string,
|
@Args('token') token: string,
|
||||||
@Args('newPassword') newPassword: string
|
@Args('newPassword') newPassword: string
|
||||||
) {
|
) {
|
||||||
// we only create user account after user sign in with email link
|
|
||||||
const id = await this.session.get(token);
|
const id = await this.session.get(token);
|
||||||
if (!id || id !== user.id || !user.emailVerified) {
|
if (!user.emailVerified) {
|
||||||
|
throw new ForbiddenException('Please verify the email first');
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
!id ||
|
||||||
|
(id !== user.id &&
|
||||||
|
// change password after sign in with email link
|
||||||
|
// we only create user account after user sign in with email link
|
||||||
|
id !== user.email)
|
||||||
|
) {
|
||||||
throw new ForbiddenException('Invalid token');
|
throw new ForbiddenException('Invalid token');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ import {
|
|||||||
import { Snapshot, Update } from '@prisma/client';
|
import { Snapshot, Update } from '@prisma/client';
|
||||||
import { chunk } from 'lodash-es';
|
import { chunk } from 'lodash-es';
|
||||||
import { defer, retry } from 'rxjs';
|
import { defer, retry } from 'rxjs';
|
||||||
import { applyUpdate, Doc, encodeStateAsUpdate, encodeStateVector } from 'yjs';
|
import {
|
||||||
|
applyUpdate,
|
||||||
|
Doc,
|
||||||
|
encodeStateAsUpdate,
|
||||||
|
encodeStateVector,
|
||||||
|
transact,
|
||||||
|
} from 'yjs';
|
||||||
|
|
||||||
import { Config } from '../../config';
|
import { Config } from '../../config';
|
||||||
import { Metrics } from '../../metrics/metrics';
|
import { Metrics } from '../../metrics/metrics';
|
||||||
@@ -84,16 +90,18 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
|
|||||||
const next = () => {
|
const next = () => {
|
||||||
const updates = chunks.shift();
|
const updates = chunks.shift();
|
||||||
if (updates?.length) {
|
if (updates?.length) {
|
||||||
updates.forEach(u => {
|
transact(doc, () => {
|
||||||
try {
|
updates.forEach(u => {
|
||||||
applyUpdate(doc, u);
|
try {
|
||||||
} catch (e) {
|
applyUpdate(doc, u);
|
||||||
this.logger.error(
|
} catch (e) {
|
||||||
`Failed to apply update: ${updates
|
this.logger.error(
|
||||||
.map(u => u.toString('hex'))
|
`Failed to apply update: ${updates
|
||||||
.join('\n')}`
|
.map(u => u.toString('hex'))
|
||||||
);
|
.join('\n')}`
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// avoid applying too many updates in single round which will take the whole cpu time like dead lock
|
// avoid applying too many updates in single round which will take the whole cpu time like dead lock
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ type EventResponse<Data = any> =
|
|||||||
@WebSocketGateway({
|
@WebSocketGateway({
|
||||||
cors: process.env.NODE_ENV !== 'production',
|
cors: process.env.NODE_ENV !== 'production',
|
||||||
transports: ['websocket'],
|
transports: ['websocket'],
|
||||||
|
// see: https://socket.io/docs/v4/server-options/#maxhttpbuffersize
|
||||||
|
maxHttpBufferSize: 1e8, // 100 MB
|
||||||
})
|
})
|
||||||
export class EventsGateway implements OnGatewayConnection, OnGatewayDisconnect {
|
export class EventsGateway implements OnGatewayConnection, OnGatewayDisconnect {
|
||||||
protected logger = new Logger(EventsGateway.name);
|
protected logger = new Logger(EventsGateway.name);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/storage",
|
"name": "@affine/storage",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10.16.0 < 11 || >= 11.8.0"
|
"node": ">= 10.16.0 < 11 || >= 11.8.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,5 +8,5 @@
|
|||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
"@types/debug": "^4.1.9",
|
"@types/debug": "^4.1.9",
|
||||||
"vitest": "0.34.6"
|
"vitest": "0.34.6"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
2
packages/common/env/package.json
vendored
2
packages/common/env/package.json
vendored
@@ -27,5 +27,5 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lit": "^3.0.2"
|
"lit": "^3.0.2"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,5 +111,5 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { Page, PageMeta, Workspace } from '@blocksuite/store';
|
|||||||
import { createIndexeddbStorage } from '@blocksuite/store';
|
import { createIndexeddbStorage } from '@blocksuite/store';
|
||||||
import type { createStore, WritableAtom } from 'jotai/vanilla';
|
import type { createStore, WritableAtom } from 'jotai/vanilla';
|
||||||
import type { Doc } from 'yjs';
|
import type { Doc } from 'yjs';
|
||||||
import { Array as YArray, Doc as YDoc, Map as YMap } from 'yjs';
|
import { Array as YArray, Doc as YDoc, Map as YMap, transact } from 'yjs';
|
||||||
|
|
||||||
export async function initEmptyPage(page: Page, title?: string) {
|
export async function initEmptyPage(page: Page, title?: string) {
|
||||||
await page.waitForLoaded();
|
await page.waitForLoaded();
|
||||||
@@ -537,6 +537,7 @@ function migrateBlocks(
|
|||||||
const originalBlocks = oldDoc.getMap(spaceId) as YMap<unknown>;
|
const originalBlocks = oldDoc.getMap(spaceId) as YMap<unknown>;
|
||||||
const subdoc = new YDoc();
|
const subdoc = new YDoc();
|
||||||
spaces.set(newId, subdoc);
|
spaces.set(newId, subdoc);
|
||||||
|
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]) => {
|
||||||
const blockData = value.clone();
|
const blockData = value.clone();
|
||||||
@@ -597,11 +598,13 @@ export async function forceUpgradePages(
|
|||||||
options: Omit<UpgradeOptions, 'createWorkspace'>
|
options: Omit<UpgradeOptions, 'createWorkspace'>
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const rootDoc = await options.getCurrentRootDoc();
|
const rootDoc = await options.getCurrentRootDoc();
|
||||||
|
guidCompatibilityFix(rootDoc);
|
||||||
|
|
||||||
const spaces = rootDoc.getMap('spaces') as YMap<any>;
|
const spaces = rootDoc.getMap('spaces') as YMap<any>;
|
||||||
const meta = rootDoc.getMap('meta') as YMap<unknown>;
|
const meta = rootDoc.getMap('meta') as YMap<unknown>;
|
||||||
const versions = meta.get('blockVersions') as YMap<number>;
|
const versions = meta.get('blockVersions') as YMap<number>;
|
||||||
const schema = options.getSchema();
|
const schema = options.getSchema();
|
||||||
const oldVersions = versions.toJSON();
|
const oldVersions = versions?.toJSON() ?? {};
|
||||||
spaces.forEach((space: Doc) => {
|
spaces.forEach((space: Doc) => {
|
||||||
try {
|
try {
|
||||||
schema.upgradePage(0, oldVersions, space);
|
schema.upgradePage(0, oldVersions, space);
|
||||||
@@ -623,6 +626,7 @@ async function upgradeV2ToV3(options: UpgradeOptions): Promise<boolean> {
|
|||||||
const meta = rootDoc.getMap('meta') as YMap<unknown>;
|
const meta = rootDoc.getMap('meta') as YMap<unknown>;
|
||||||
const versions = meta.get('blockVersions') as YMap<number>;
|
const versions = meta.get('blockVersions') as YMap<number>;
|
||||||
const schema = options.getSchema();
|
const schema = options.getSchema();
|
||||||
|
guidCompatibilityFix(rootDoc);
|
||||||
spaces.forEach((space: Doc) => {
|
spaces.forEach((space: Doc) => {
|
||||||
schema.upgradePage(
|
schema.upgradePage(
|
||||||
0,
|
0,
|
||||||
@@ -654,6 +658,48 @@ async function upgradeV2ToV3(options: UpgradeOptions): Promise<boolean> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// patch root doc's space guid compatibility issue
|
||||||
|
//
|
||||||
|
// in version 0.10, page id in spaces no longer has prefix "space:"
|
||||||
|
// The data flow for fetching a doc's updates is:
|
||||||
|
// - page id in `meta.pages` -> find `${page-id}` in `doc.spaces` -> `doc` -> `doc.guid`
|
||||||
|
// if `doc` is not found in `doc.spaces`, a new doc will be created and its `doc.guid` is the same with its pageId
|
||||||
|
// - because of guid logic change, the doc that previously prefixed with "space:" will not be found in `doc.spaces`
|
||||||
|
// - when fetching the rows of this doc using the doc id === page id,
|
||||||
|
// it will return empty since there is no updates associated with the page id
|
||||||
|
export function guidCompatibilityFix(rootDoc: YDoc) {
|
||||||
|
let changed = false;
|
||||||
|
transact(rootDoc, () => {
|
||||||
|
const meta = rootDoc.getMap('meta') as YMap<unknown>;
|
||||||
|
const pages = meta.get('pages') as YArray<YMap<unknown>>;
|
||||||
|
pages?.forEach(page => {
|
||||||
|
const pageId = page.get('id') as string | undefined;
|
||||||
|
if (pageId?.includes(':')) {
|
||||||
|
// remove the prefix "space:" from page id
|
||||||
|
page.set('id', pageId.split(':').at(-1));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const spaces = rootDoc.getMap('spaces') as YMap<YDoc>;
|
||||||
|
spaces?.forEach((doc: YDoc, pageId: string) => {
|
||||||
|
if (pageId.includes(':')) {
|
||||||
|
const newPageId = pageId.split(':').at(-1) ?? pageId;
|
||||||
|
const newDoc = new YDoc();
|
||||||
|
// clone the original doc. yjs is not happy to use the same doc instance
|
||||||
|
applyUpdate(newDoc, encodeStateAsUpdate(doc));
|
||||||
|
newDoc.guid = doc.guid;
|
||||||
|
spaces.set(newPageId, newDoc);
|
||||||
|
// should remove the old doc, otherwise we will do it again in the next run
|
||||||
|
spaces.delete(pageId);
|
||||||
|
changed = true;
|
||||||
|
console.debug(
|
||||||
|
`fixed space id ${pageId} -> ${newPageId}, doc id: ${doc.guid}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
export enum WorkspaceVersion {
|
export enum WorkspaceVersion {
|
||||||
// v1 is treated as undefined
|
// v1 is treated as undefined
|
||||||
SubDoc = 2,
|
SubDoc = 2,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/sdk",
|
"name": "@affine/sdk",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@toeverything/y-indexeddb",
|
"name": "@toeverything/y-indexeddb",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"description": "IndexedDB database adapter for Yjs",
|
"description": "IndexedDB database adapter for Yjs",
|
||||||
"repository": "toeverything/AFFiNE",
|
"repository": "toeverything/AFFiNE",
|
||||||
"author": "toeverything",
|
"author": "toeverything",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "y-provider",
|
"name": "y-provider",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"description": "Yjs provider protocol for multi document support",
|
"description": "Yjs provider protocol for multi document support",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
|
|||||||
@@ -98,38 +98,21 @@ export const createLazyProvider = (
|
|||||||
async function syncDoc(doc: Doc) {
|
async function syncDoc(doc: Doc) {
|
||||||
const guid = doc.guid;
|
const guid = doc.guid;
|
||||||
{
|
{
|
||||||
// backport from `@blocksuite/store`
|
const update = await datasource.queryDocState(guid);
|
||||||
const prefixId = guid.startsWith('space:') ? guid.slice(6) : guid;
|
|
||||||
const possible1 = `${rootDoc.guid}:space:${prefixId}`;
|
|
||||||
const possible2 = `space:${prefixId}`;
|
|
||||||
const update1 = await datasource.queryDocState(possible1);
|
|
||||||
const update2 = await datasource.queryDocState(possible2);
|
|
||||||
let hasUpdate = false;
|
let hasUpdate = false;
|
||||||
if (
|
if (
|
||||||
update1 &&
|
update &&
|
||||||
update1.missing.length !== 2 &&
|
update.missing.length !== 2 &&
|
||||||
update1.missing[0] !== 0 &&
|
update.missing[0] !== 0 &&
|
||||||
update1.missing[1] !== 0
|
update.missing[1] !== 0
|
||||||
) {
|
) {
|
||||||
applyUpdate(doc, update1.missing, origin);
|
applyUpdate(doc, update.missing, origin);
|
||||||
hasUpdate = true;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
update2 &&
|
|
||||||
update2.missing.length !== 2 &&
|
|
||||||
update2.missing[0] !== 0 &&
|
|
||||||
update2.missing[1] !== 0
|
|
||||||
) {
|
|
||||||
applyUpdate(doc, update2.missing, origin);
|
|
||||||
hasUpdate = true;
|
hasUpdate = true;
|
||||||
}
|
}
|
||||||
if (hasUpdate) {
|
if (hasUpdate) {
|
||||||
await datasource.sendDocUpdate(
|
await datasource.sendDocUpdate(
|
||||||
guid,
|
guid,
|
||||||
encodeStateAsUpdate(
|
encodeStateAsUpdate(doc, update ? update.state : undefined)
|
||||||
doc,
|
|
||||||
update1 ? update1.state : update2 ? update2.state : undefined
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
"@radix-ui/react-toolbar": "^1.0.4",
|
"@radix-ui/react-toolbar": "^1.0.4",
|
||||||
"@toeverything/hooks": "workspace:*",
|
"@toeverything/hooks": "workspace:*",
|
||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@toeverything/theme": "^0.7.20",
|
"@toeverything/theme": "^0.7.24",
|
||||||
"@vanilla-extract/dynamic": "^2.0.3",
|
"@vanilla-extract/dynamic": "^2.0.3",
|
||||||
"bytes": "^3.1.2",
|
"bytes": "^3.1.2",
|
||||||
"check-password-strength": "^2.0.7",
|
"check-password-strength": "^2.0.7",
|
||||||
@@ -90,5 +90,5 @@
|
|||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"yjs": "^13.6.8"
|
"yjs": "^13.6.8"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import type { ComplexStyleRule } from '@vanilla-extract/css';
|
|||||||
import { globalStyle, style } from '@vanilla-extract/css';
|
import { globalStyle, style } from '@vanilla-extract/css';
|
||||||
|
|
||||||
import { breakpoints } from '../../styles/mui-theme';
|
import { breakpoints } from '../../styles/mui-theme';
|
||||||
|
|
||||||
export const appStyle = style({
|
export const appStyle = style({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
@@ -22,9 +23,11 @@ export const appStyle = style({
|
|||||||
content: '""',
|
content: '""',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
inset: 0,
|
inset: 0,
|
||||||
opacity: 'var(--affine-noise-opacity)',
|
opacity: 'var(--affine-noise-opacity, 0)',
|
||||||
backgroundSize: '25%',
|
backgroundRepeat: 'repeat',
|
||||||
backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.25' numOctaves='10' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,
|
backgroundSize: '2.5%',
|
||||||
|
// todo: figure out how to use vanilla-extract webpack plugin to inject img url
|
||||||
|
backgroundImage: `var(--noise-background)`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,6 +8,10 @@
|
|||||||
/*transition: all 0.1s;*/
|
/*transition: all 0.1s;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--noise-background: url(./noise.png);
|
||||||
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body,
|
body,
|
||||||
h1,
|
h1,
|
||||||
|
|||||||
BIN
packages/frontend/component/src/theme/noise.png
Normal file
BIN
packages/frontend/component/src/theme/noise.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
@@ -33,7 +33,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
enableCaptcha: true,
|
enableCaptcha: true,
|
||||||
enableEnhanceShareMode: false,
|
enableEnhanceShareMode: false,
|
||||||
enablePayment: true,
|
enablePayment: true,
|
||||||
serverUrlPrefix: 'https://app.affine.pro',
|
serverUrlPrefix: 'https://insider.affine.pro', // Let insider be stable environment temporarily.
|
||||||
editorFlags,
|
editorFlags,
|
||||||
appVersion: packageJson.version,
|
appVersion: packageJson.version,
|
||||||
editorVersion: packageJson.dependencies['@blocksuite/editor'],
|
editorVersion: packageJson.dependencies['@blocksuite/editor'],
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "@affine/core",
|
"name": "@affine/core",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn -T run build-core",
|
"build": "yarn -T run build-core",
|
||||||
"dev": "yarn -T run dev-core",
|
"dev": "yarn -T run dev-core",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
currentWorkspaceIdAtom,
|
currentWorkspaceIdAtom,
|
||||||
getCurrentStore,
|
getCurrentStore,
|
||||||
} from '@toeverything/infra/atom';
|
} from '@toeverything/infra/atom';
|
||||||
|
import { guidCompatibilityFix } from '@toeverything/infra/blocksuite';
|
||||||
import type { ReactElement } from 'react';
|
import type { ReactElement } from 'react';
|
||||||
import {
|
import {
|
||||||
type LoaderFunction,
|
type LoaderFunction,
|
||||||
@@ -43,6 +44,7 @@ export const loader: LoaderFunction = async args => {
|
|||||||
|
|
||||||
const workspace = await rootStore.get(workspaceAtom);
|
const workspace = await rootStore.get(workspaceAtom);
|
||||||
return (() => {
|
return (() => {
|
||||||
|
guidCompatibilityFix(workspace.doc);
|
||||||
const blockVersions = workspace.meta.blockVersions;
|
const blockVersions = workspace.meta.blockVersions;
|
||||||
if (!blockVersions) {
|
if (!blockVersions) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/electron",
|
"name": "@affine/electron",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"author": "toeverything",
|
"author": "toeverything",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/toeverything/AFFiNE",
|
"url": "https://github.com/toeverything/AFFiNE",
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
"builder-util-runtime": "^9.2.1",
|
"builder-util-runtime": "^9.2.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"electron": "^27.0.0",
|
"electron": "^27.0.0",
|
||||||
"electron-log": "^5.0.0-rc.1",
|
"electron-log": "^5.0.0",
|
||||||
"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.4",
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ function spawnOrReloadElectron() {
|
|||||||
if (code && code !== 0) {
|
if (code && code !== 0) {
|
||||||
console.log(`Electron exited with code ${code}`);
|
console.log(`Electron exited with code ${code}`);
|
||||||
}
|
}
|
||||||
process.exit(code ?? 0);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
} from '@affine/native';
|
} from '@affine/native';
|
||||||
import { WorkspaceVersion } from '@toeverything/infra/blocksuite';
|
import { WorkspaceVersion } from '@toeverything/infra/blocksuite';
|
||||||
|
|
||||||
import { migrateToLatest } from '../db/migration';
|
import { applyGuidCompatibilityFix, migrateToLatest } from '../db/migration';
|
||||||
import { logger } from '../logger';
|
import { logger } from '../logger';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,6 +29,7 @@ export abstract class BaseSQLiteAdapter {
|
|||||||
if (maxVersion !== WorkspaceVersion.Surface) {
|
if (maxVersion !== WorkspaceVersion.Surface) {
|
||||||
await migrateToLatest(this.path, WorkspaceVersion.Surface);
|
await migrateToLatest(this.path, WorkspaceVersion.Surface);
|
||||||
}
|
}
|
||||||
|
await applyGuidCompatibilityFix(this.db);
|
||||||
logger.info(`[SQLiteAdapter:${this.role}]`, 'connected:', this.path);
|
logger.info(`[SQLiteAdapter:${this.role}]`, 'connected:', this.path);
|
||||||
}
|
}
|
||||||
return this.db;
|
return this.db;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
|||||||
import { Schema } from '@blocksuite/store';
|
import { Schema } from '@blocksuite/store';
|
||||||
import {
|
import {
|
||||||
forceUpgradePages,
|
forceUpgradePages,
|
||||||
|
guidCompatibilityFix,
|
||||||
migrateToSubdoc,
|
migrateToSubdoc,
|
||||||
WorkspaceVersion,
|
WorkspaceVersion,
|
||||||
} from '@toeverything/infra/blocksuite';
|
} from '@toeverything/infra/blocksuite';
|
||||||
@@ -119,3 +120,21 @@ async function replaceRows(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const applyGuidCompatibilityFix = async (db: SqliteConnection) => {
|
||||||
|
const oldRows = await db.getUpdates(undefined);
|
||||||
|
|
||||||
|
const rootDoc = new YDoc();
|
||||||
|
oldRows.forEach(row => applyUpdate(rootDoc, row.data));
|
||||||
|
|
||||||
|
// see comments of guidCompatibilityFix
|
||||||
|
guidCompatibilityFix(rootDoc);
|
||||||
|
|
||||||
|
// todo: backup?
|
||||||
|
await db.replaceUpdates(undefined, [
|
||||||
|
{
|
||||||
|
docId: undefined,
|
||||||
|
data: encodeStateAsUpdate(rootDoc),
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const mode = process.env.NODE_ENV;
|
|||||||
export const isDev = mode === 'development';
|
export const isDev = mode === 'development';
|
||||||
|
|
||||||
const API_URL_MAPPING = {
|
const API_URL_MAPPING = {
|
||||||
stable: `https://app.affine.pro`,
|
stable: `https://insider.affine.pro`, // Let insider be stable environment temporarily.
|
||||||
beta: `https://insider.affine.pro`,
|
beta: `https://insider.affine.pro`,
|
||||||
canary: `https://affine.fail`,
|
canary: `https://affine.fail`,
|
||||||
internal: `https://insider.affine.pro`,
|
internal: `https://insider.affine.pro`,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
|
import { app } from 'electron';
|
||||||
import log from 'electron-log';
|
import log from 'electron-log';
|
||||||
|
|
||||||
export const logger = log.scope('main');
|
export const logger = log.scope('main');
|
||||||
@@ -12,3 +13,7 @@ export async function revealLogFile() {
|
|||||||
const filePath = getLogFilePath();
|
const filePath = getLogFilePath();
|
||||||
return await shell.openPath(filePath);
|
return await shell.openPath(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.on('before-quit', () => {
|
||||||
|
log.transports.console.level = false;
|
||||||
|
});
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import { updaterSubjects } from './event';
|
|||||||
const mode = process.env.NODE_ENV;
|
const mode = process.env.NODE_ENV;
|
||||||
const isDev = mode === 'development';
|
const isDev = mode === 'development';
|
||||||
|
|
||||||
|
// skip auto update in dev mode & internal
|
||||||
|
const disabled = buildType === 'internal' || isDev;
|
||||||
|
|
||||||
export const quitAndInstall = async () => {
|
export const quitAndInstall = async () => {
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
};
|
};
|
||||||
@@ -17,7 +20,7 @@ export const quitAndInstall = async () => {
|
|||||||
let lastCheckTime = 0;
|
let lastCheckTime = 0;
|
||||||
export const checkForUpdates = async (force = true) => {
|
export const checkForUpdates = async (force = true) => {
|
||||||
// check every 30 minutes (1800 seconds) at most
|
// check every 30 minutes (1800 seconds) at most
|
||||||
if (force || lastCheckTime + 1000 * 1800 < Date.now()) {
|
if (!disabled && (force || lastCheckTime + 1000 * 1800 < Date.now())) {
|
||||||
lastCheckTime = Date.now();
|
lastCheckTime = Date.now();
|
||||||
return await autoUpdater.checkForUpdates();
|
return await autoUpdater.checkForUpdates();
|
||||||
}
|
}
|
||||||
@@ -25,8 +28,7 @@ export const checkForUpdates = async (force = true) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const registerUpdater = async () => {
|
export const registerUpdater = async () => {
|
||||||
// skip auto update in dev mode & internal
|
if (disabled) {
|
||||||
if (buildType === 'internal' || isDev) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +45,6 @@ export const registerUpdater = async () => {
|
|||||||
channel: buildType,
|
channel: buildType,
|
||||||
// hack for custom provider
|
// hack for custom provider
|
||||||
provider: 'custom' as 'github',
|
provider: 'custom' as 'github',
|
||||||
// @ts-expect-error - just ignore for now
|
|
||||||
repo: buildType !== 'internal' ? 'AFFiNE' : 'AFFiNE-Releases',
|
repo: buildType !== 'internal' ? 'AFFiNE' : 'AFFiNE-Releases',
|
||||||
owner: 'toeverything',
|
owner: 'toeverything',
|
||||||
releaseType: buildType === 'stable' ? 'release' : 'prerelease',
|
releaseType: buildType === 'stable' ? 'release' : 'prerelease',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/graphql",
|
"name": "@affine/graphql",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"description": "Autogenerated GraphQL client for affine.pro",
|
"description": "Autogenerated GraphQL client for affine.pro",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -66,5 +66,5 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,12 +76,25 @@ describe('useBlockSuitePagePreview', () => {
|
|||||||
page.getBlockByFlavour('affine:note')[0].id
|
page.getBlockByFlavour('affine:note')[0].id
|
||||||
);
|
);
|
||||||
const hook = renderHook(() => useAtomValue(useBlockSuitePagePreview(page)));
|
const hook = renderHook(() => useAtomValue(useBlockSuitePagePreview(page)));
|
||||||
expect(hook.result.current).toBe('\nHello, world!');
|
expect(hook.result.current).toBe('Hello, world!');
|
||||||
page.transact(() => {
|
page.transact(() => {
|
||||||
page.getBlockById(id)!.text!.insert('Test', 0);
|
page.getBlockById(id)!.text!.insert('Test', 0);
|
||||||
});
|
});
|
||||||
await new Promise(resolve => setTimeout(resolve, 100));
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
hook.rerender();
|
hook.rerender();
|
||||||
expect(hook.result.current).toBe('\nTestHello, world!');
|
expect(hook.result.current).toBe('TestHello, world!');
|
||||||
|
|
||||||
|
// Insert before
|
||||||
|
page.addBlock(
|
||||||
|
'affine:paragraph',
|
||||||
|
{
|
||||||
|
text: new page.Text('First block!'),
|
||||||
|
},
|
||||||
|
page.getBlockByFlavour('affine:note')[0].id,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
|
hook.rerender();
|
||||||
|
expect(hook.result.current).toBe('First block! TestHello, world!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,20 +1,49 @@
|
|||||||
import type { ParagraphBlockModel } from '@blocksuite/blocks/models';
|
|
||||||
import type { Page } from '@blocksuite/store';
|
import type { Page } from '@blocksuite/store';
|
||||||
import type { Atom } from 'jotai';
|
import type { Atom } from 'jotai';
|
||||||
import { atom } from 'jotai';
|
import { atom } from 'jotai';
|
||||||
|
|
||||||
|
const MAX_PREVIEW_LENGTH = 150;
|
||||||
|
const MAX_SEARCH_BLOCK_COUNT = 30;
|
||||||
|
|
||||||
const weakMap = new WeakMap<Page, Atom<string>>();
|
const weakMap = new WeakMap<Page, Atom<string>>();
|
||||||
|
|
||||||
export const getPagePreviewText = (page: Page) => {
|
export const getPagePreviewText = (page: Page) => {
|
||||||
// TODO this is incorrect, since the order of blocks is not guaranteed
|
const pageRoot = page.root;
|
||||||
const paragraphBlocks = page.getBlockByFlavour(
|
if (!pageRoot) {
|
||||||
'affine:paragraph'
|
return '';
|
||||||
) as ParagraphBlockModel[];
|
}
|
||||||
const text = paragraphBlocks
|
const preview: string[] = [];
|
||||||
.slice(0, 10)
|
// DFS
|
||||||
.map(block => block.text.toString())
|
const queue = [pageRoot];
|
||||||
.join('\n');
|
let previewLenNeeded = MAX_PREVIEW_LENGTH;
|
||||||
return text.slice(0, 300);
|
let count = MAX_SEARCH_BLOCK_COUNT;
|
||||||
|
while (queue.length && previewLenNeeded > 0 && count-- > 0) {
|
||||||
|
const block = queue.shift();
|
||||||
|
if (!block) {
|
||||||
|
console.error('Unexpected empty block');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (block.children) {
|
||||||
|
queue.unshift(...block.children);
|
||||||
|
}
|
||||||
|
if (block.role !== 'content') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (block.text) {
|
||||||
|
const text = block.text.toString();
|
||||||
|
if (!text.length) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
previewLenNeeded -= text.length;
|
||||||
|
preview.push(text);
|
||||||
|
} else {
|
||||||
|
// image/attachment/bookmark
|
||||||
|
const type = block.flavour.split('affine:')[1] ?? null;
|
||||||
|
previewLenNeeded -= type.length + 2;
|
||||||
|
type && preview.push(`[${type}]`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return preview.join(' ');
|
||||||
};
|
};
|
||||||
|
|
||||||
const emptyAtom = atom<string>('');
|
const emptyAtom = atom<string>('');
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export function loadPage(page: Page, priority = 0) {
|
|||||||
logger.debug('page loaded', page.id);
|
logger.debug('page loaded', page.id);
|
||||||
// we do not know how long it takes to load a page here
|
// we do not know how long it takes to load a page here
|
||||||
// so that we just use 300ms timeout as the default page processing time
|
// so that we just use 300ms timeout as the default page processing time
|
||||||
await awaitForTimeout(1000);
|
await awaitForTimeout(300);
|
||||||
} else {
|
} else {
|
||||||
// do nothing if it is already loaded
|
// do nothing if it is already loaded
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,5 +37,5 @@
|
|||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,5 +58,5 @@
|
|||||||
"test": "ava",
|
"test": "ava",
|
||||||
"version": "napi version"
|
"version": "napi version"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,5 @@
|
|||||||
"./v1/*.json": "./v1/*.json",
|
"./v1/*.json": "./v1/*.json",
|
||||||
"./preloading.json": "./preloading.json"
|
"./preloading.json": "./preloading.json"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,5 +48,5 @@
|
|||||||
"vitest": "0.34.6",
|
"vitest": "0.34.6",
|
||||||
"ws": "^8.14.2"
|
"ws": "^8.14.2"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,12 +140,10 @@ const fetchMetadata: FetchMetadata = async (get, { signal }) => {
|
|||||||
performanceJotaiLogger.info('%s adapter', Adapter.flavour);
|
performanceJotaiLogger.info('%s adapter', Adapter.flavour);
|
||||||
|
|
||||||
const { CRUD, flavour: currentFlavour } = Adapter;
|
const { CRUD, flavour: currentFlavour } = Adapter;
|
||||||
if (
|
const appAccessFn = Adapter.Events['app:access'];
|
||||||
Adapter.Events['app:access'] &&
|
const canAccess = appAccessFn && !(await appAccessFn());
|
||||||
!(await Adapter.Events['app:access']())
|
performanceJotaiLogger.info('%s app:access', Adapter.flavour);
|
||||||
) {
|
if (canAccess) {
|
||||||
performanceJotaiLogger.info('%s app:access', Adapter.flavour);
|
|
||||||
|
|
||||||
// skip the adapter if the user doesn't have access to it
|
// skip the adapter if the user doesn't have access to it
|
||||||
const removed = metadata.filter(
|
const removed = metadata.filter(
|
||||||
meta => meta.flavour === currentFlavour
|
meta => meta.flavour === currentFlavour
|
||||||
|
|||||||
@@ -38,5 +38,5 @@
|
|||||||
"react": "*",
|
"react": "*",
|
||||||
"react-dom": "*"
|
"react-dom": "*"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Hello world plugin",
|
"description": "Hello world plugin",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "af dev",
|
"dev": "af dev",
|
||||||
"build": "af build"
|
"build": "af build"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/image-preview-plugin",
|
"name": "@affine/image-preview-plugin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"description": "Image preview plugin",
|
"description": "Image preview plugin",
|
||||||
"affinePlugin": {
|
"affinePlugin": {
|
||||||
"release": true,
|
"release": true,
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"@affine/sdk": "workspace:*",
|
"@affine/sdk": "workspace:*",
|
||||||
"@blocksuite/icons": "2.1.35",
|
"@blocksuite/icons": "2.1.35",
|
||||||
"@toeverything/components": "^0.0.46",
|
"@toeverything/components": "^0.0.46",
|
||||||
"@toeverything/theme": "^0.7.20",
|
"@toeverything/theme": "^0.7.24",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"foxact": "^0.2.20",
|
"foxact": "^0.2.20",
|
||||||
"react-error-boundary": "^4.0.11",
|
"react-error-boundary": "^4.0.11",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Outline plugin",
|
"description": "Outline plugin",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "af dev",
|
"dev": "af dev",
|
||||||
"build": "af build"
|
"build": "af build"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Vue hello world plugin",
|
"description": "Vue hello world plugin",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "af dev",
|
"dev": "af dev",
|
||||||
"build": "af build"
|
"build": "af build"
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
"@affine-test/kit": "workspace:*",
|
"@affine-test/kit": "workspace:*",
|
||||||
"@playwright/test": "^1.39.0"
|
"@playwright/test": "^1.39.0"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,5 +11,5 @@
|
|||||||
"@types/fs-extra": "^11.0.2",
|
"@types/fs-extra": "^11.0.2",
|
||||||
"fs-extra": "^11.1.1"
|
"fs-extra": "^11.1.1"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"playwright": "^1.39.0"
|
"playwright": "^1.39.0"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
4
tests/affine-legacy/0.6.1-beta.1/.gitignore
vendored
Normal file
4
tests/affine-legacy/0.6.1-beta.1/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
static
|
||||||
|
fixtures/*.ydoc
|
||||||
|
test-results
|
||||||
|
*.zip
|
||||||
12
tests/affine-legacy/0.6.1-beta.1/README.md
Normal file
12
tests/affine-legacy/0.6.1-beta.1/README.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# AFFiNE Legacy 0.6.1-beta.1
|
||||||
|
|
||||||
|
This package is used to record legacy data of 0.6.1-beta.1.
|
||||||
|
Run following commands locally to record data to `tests/fixtures/legacy/0.6.1-beta.1`.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd tests/affine-legacy/0.6.1-beta.1
|
||||||
|
yarn run unzip
|
||||||
|
yarn run e2e
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to debug, running `yarn run e2e --ui` is ok. Or using https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright is more better.
|
||||||
36
tests/affine-legacy/0.6.1-beta.1/e2e/basic.spec.ts
Normal file
36
tests/affine-legacy/0.6.1-beta.1/e2e/basic.spec.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import { patchDataEnhancement } from '@affine-test/kit/e2e-enhance/initializer';
|
||||||
|
import { SnapshotStorage } from '@affine-test/kit/e2e-enhance/snapshot';
|
||||||
|
import { test } from '@affine-test/kit/playwright';
|
||||||
|
import {
|
||||||
|
clickNewPageButton,
|
||||||
|
waitForEditorLoad,
|
||||||
|
} from '@affine-test/kit/utils/page-logic';
|
||||||
|
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await patchDataEnhancement(page);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('record 0.6.1-beta.1 legacy data', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8081/');
|
||||||
|
await waitForEditorLoad(page);
|
||||||
|
await clickNewPageButton(page);
|
||||||
|
const locator = page.locator('v-line').nth(0);
|
||||||
|
await locator.fill('hello');
|
||||||
|
|
||||||
|
await page.keyboard.press('Enter');
|
||||||
|
await page.keyboard.type('TEST CONTENT', { delay: 50 });
|
||||||
|
|
||||||
|
const localStorageData = await page.evaluate(() =>
|
||||||
|
window.readAffineLocalStorage()
|
||||||
|
);
|
||||||
|
const { idbData, binaries } = await page.evaluate(() =>
|
||||||
|
window.readAffineDatabase()
|
||||||
|
);
|
||||||
|
|
||||||
|
const snapshotStorage = new SnapshotStorage('0.6.1-beta.1');
|
||||||
|
await snapshotStorage.write({
|
||||||
|
idbData,
|
||||||
|
localStorageData,
|
||||||
|
binaries,
|
||||||
|
});
|
||||||
|
});
|
||||||
22
tests/affine-legacy/0.6.1-beta.1/package.json
Normal file
22
tests/affine-legacy/0.6.1-beta.1/package.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "@affine-legacy/0.6.1-beta.1",
|
||||||
|
"description": "AFFiNE 0.6.1-beta.1 static output",
|
||||||
|
"scripts": {
|
||||||
|
"unzip": "wget -O static.zip https://github.com/toeverything/AFFiNE/releases/download/v0.6.1-beta.1/web-static.zip && unzip static.zip -d static",
|
||||||
|
"start": "yarn exec serve -s static -l 8081",
|
||||||
|
"e2e": "yarn playwright test"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@affine-test/fixtures": "workspace:*",
|
||||||
|
"@affine-test/kit": "workspace:*",
|
||||||
|
"@blocksuite/block-std": "0.0.0-20231110042432-4fdac4dc-nightly",
|
||||||
|
"@blocksuite/blocks": "0.0.0-20231110042432-4fdac4dc-nightly",
|
||||||
|
"@blocksuite/global": "0.0.0-20231110042432-4fdac4dc-nightly",
|
||||||
|
"@blocksuite/store": "0.0.0-20231110042432-4fdac4dc-nightly",
|
||||||
|
"@playwright/test": "^1.39.0",
|
||||||
|
"express": "^4.18.2",
|
||||||
|
"http-proxy-middleware": "^3.0.0-beta.1",
|
||||||
|
"serve": "^14.2.1"
|
||||||
|
},
|
||||||
|
"version": "0.10.1-beta.0"
|
||||||
|
}
|
||||||
41
tests/affine-legacy/0.6.1-beta.1/playwright.config.ts
Normal file
41
tests/affine-legacy/0.6.1-beta.1/playwright.config.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import type {
|
||||||
|
PlaywrightTestConfig,
|
||||||
|
PlaywrightWorkerOptions,
|
||||||
|
} from '@playwright/test';
|
||||||
|
|
||||||
|
const config: PlaywrightTestConfig = {
|
||||||
|
testDir: './e2e',
|
||||||
|
fullyParallel: true,
|
||||||
|
timeout: process.env.CI ? 50_000 : 30_000,
|
||||||
|
use: {
|
||||||
|
baseURL: 'http://localhost:8081/',
|
||||||
|
browserName:
|
||||||
|
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
|
||||||
|
'chromium',
|
||||||
|
permissions: ['clipboard-read', 'clipboard-write'],
|
||||||
|
viewport: { width: 1440, height: 800 },
|
||||||
|
actionTimeout: 5 * 1000,
|
||||||
|
locale: 'en-US',
|
||||||
|
trace: 'on-first-retry',
|
||||||
|
video: 'on-first-retry',
|
||||||
|
},
|
||||||
|
forbidOnly: !!process.env.CI,
|
||||||
|
workers: 4,
|
||||||
|
retries: 1,
|
||||||
|
reporter: process.env.CI ? 'github' : 'list',
|
||||||
|
webServer: [
|
||||||
|
{
|
||||||
|
command: 'yarn run start',
|
||||||
|
port: 8081,
|
||||||
|
timeout: 120 * 1000,
|
||||||
|
reuseExistingServer: !process.env.CI,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
config.retries = 3;
|
||||||
|
config.workers = '50%';
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config;
|
||||||
16
tests/affine-legacy/0.6.1-beta.1/tsconfig.json
Normal file
16
tests/affine-legacy/0.6.1-beta.1/tsconfig.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"outDir": "lib"
|
||||||
|
},
|
||||||
|
"include": ["e2e"],
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "../../../tests/kit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../../../tests/fixtures"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
"http-proxy-middleware": "^3.0.0-beta.1",
|
"http-proxy-middleware": "^3.0.0-beta.1",
|
||||||
"serve": "^14.2.1"
|
"serve": "^14.2.1"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,5 +18,5 @@
|
|||||||
"http-proxy-middleware": "^3.0.0-beta.1",
|
"http-proxy-middleware": "^3.0.0-beta.1",
|
||||||
"serve": "^14.2.1"
|
"serve": "^14.2.1"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,5 +18,5 @@
|
|||||||
"http-proxy-middleware": "^3.0.0-beta.1",
|
"http-proxy-middleware": "^3.0.0-beta.1",
|
||||||
"serve": "^14.2.1"
|
"serve": "^14.2.1"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
"@affine-test/kit": "workspace:*",
|
"@affine-test/kit": "workspace:*",
|
||||||
"@playwright/test": "^1.39.0"
|
"@playwright/test": "^1.39.0"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,3 +120,41 @@ test('v3 to v4, surface migration', async ({ page }) => {
|
|||||||
expect(workspace.version).toBe(4);
|
expect(workspace.version).toBe(4);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('v0 to v4, subdoc migration', async ({ page }) => {
|
||||||
|
await open404PageToInitData(page, '0.6.1-beta.1');
|
||||||
|
|
||||||
|
await page.goto(coreUrl);
|
||||||
|
await page.waitForTimeout(5000);
|
||||||
|
|
||||||
|
// go to all page
|
||||||
|
await clickSideBarAllPageButton(page);
|
||||||
|
|
||||||
|
// find if page name with "hello" exists and click it
|
||||||
|
await page
|
||||||
|
.locator('[data-testid="page-list-item-title-text"]:has-text("hello")')
|
||||||
|
.click();
|
||||||
|
|
||||||
|
await waitForEditorLoad(page);
|
||||||
|
|
||||||
|
// check if content is correct
|
||||||
|
expect(await page.locator('v-line').nth(0).textContent()).toBe('hello');
|
||||||
|
expect(await page.locator('v-line').nth(1).textContent()).toBe(
|
||||||
|
'TEST CONTENT'
|
||||||
|
);
|
||||||
|
|
||||||
|
// check edgeless mode is correct
|
||||||
|
await clickEdgelessModeButton(page);
|
||||||
|
await expect(page.locator('edgeless-toolbar')).toBeVisible();
|
||||||
|
await expect(page.locator('affine-edgeless-page')).toBeVisible();
|
||||||
|
|
||||||
|
const changedLocalStorageData = await page.evaluate(() =>
|
||||||
|
window.readAffineLocalStorage()
|
||||||
|
);
|
||||||
|
const workspaces = JSON.parse(
|
||||||
|
changedLocalStorageData['jotai-workspaces']
|
||||||
|
) as any[];
|
||||||
|
for (const workspace of workspaces) {
|
||||||
|
expect(workspace.version).toBe(4);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -13,5 +13,5 @@
|
|||||||
"@blocksuite/store": "0.0.0-20231110042432-4fdac4dc-nightly",
|
"@blocksuite/store": "0.0.0-20231110042432-4fdac4dc-nightly",
|
||||||
"@playwright/test": "^1.39.0"
|
"@playwright/test": "^1.39.0"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
"@affine-test/kit": "workspace:*",
|
"@affine-test/kit": "workspace:*",
|
||||||
"@playwright/test": "^1.39.0"
|
"@playwright/test": "^1.39.0"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
tests/fixtures/legacy/0.6.1-beta.1/idb.bin
vendored
Normal file
BIN
tests/fixtures/legacy/0.6.1-beta.1/idb.bin
vendored
Normal file
Binary file not shown.
530
tests/fixtures/legacy/0.6.1-beta.1/idb.json
vendored
Normal file
530
tests/fixtures/legacy/0.6.1-beta.1/idb.json
vendored
Normal file
@@ -0,0 +1,530 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "affine-local",
|
||||||
|
"version": 1,
|
||||||
|
"stores": [
|
||||||
|
{
|
||||||
|
"name": "milestone",
|
||||||
|
"keyPath": "id",
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "workspace",
|
||||||
|
"keyPath": "id",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"id": "sdI1qQamsV",
|
||||||
|
"updates": [
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753756,
|
||||||
|
"update": "__BINARY__1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753757,
|
||||||
|
"update": "__BINARY__2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753757,
|
||||||
|
"update": "__BINARY__3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753757,
|
||||||
|
"update": "__BINARY__4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753757,
|
||||||
|
"update": "__BINARY__5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753757,
|
||||||
|
"update": "__BINARY__6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753758,
|
||||||
|
"update": "__BINARY__7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753758,
|
||||||
|
"update": "__BINARY__8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753758,
|
||||||
|
"update": "__BINARY__9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753759,
|
||||||
|
"update": "__BINARY__10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753760,
|
||||||
|
"update": "__BINARY__11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753760,
|
||||||
|
"update": "__BINARY__12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753761,
|
||||||
|
"update": "__BINARY__13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753762,
|
||||||
|
"update": "__BINARY__14"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753767,
|
||||||
|
"update": "__BINARY__15"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753768,
|
||||||
|
"update": "__BINARY__16"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753770,
|
||||||
|
"update": "__BINARY__17"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753770,
|
||||||
|
"update": "__BINARY__18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753771,
|
||||||
|
"update": "__BINARY__19"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753772,
|
||||||
|
"update": "__BINARY__20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753773,
|
||||||
|
"update": "__BINARY__21"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753774,
|
||||||
|
"update": "__BINARY__22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753775,
|
||||||
|
"update": "__BINARY__23"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753776,
|
||||||
|
"update": "__BINARY__24"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753777,
|
||||||
|
"update": "__BINARY__25"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753778,
|
||||||
|
"update": "__BINARY__26"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753778,
|
||||||
|
"update": "__BINARY__27"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753779,
|
||||||
|
"update": "__BINARY__28"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753780,
|
||||||
|
"update": "__BINARY__29"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753781,
|
||||||
|
"update": "__BINARY__30"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753782,
|
||||||
|
"update": "__BINARY__31"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753783,
|
||||||
|
"update": "__BINARY__32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753783,
|
||||||
|
"update": "__BINARY__33"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753784,
|
||||||
|
"update": "__BINARY__34"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753785,
|
||||||
|
"update": "__BINARY__35"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753786,
|
||||||
|
"update": "__BINARY__36"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753787,
|
||||||
|
"update": "__BINARY__37"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753787,
|
||||||
|
"update": "__BINARY__38"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753788,
|
||||||
|
"update": "__BINARY__39"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753789,
|
||||||
|
"update": "__BINARY__40"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753790,
|
||||||
|
"update": "__BINARY__41"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753791,
|
||||||
|
"update": "__BINARY__42"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753792,
|
||||||
|
"update": "__BINARY__43"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753793,
|
||||||
|
"update": "__BINARY__44"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753794,
|
||||||
|
"update": "__BINARY__45"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753794,
|
||||||
|
"update": "__BINARY__46"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753795,
|
||||||
|
"update": "__BINARY__47"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753796,
|
||||||
|
"update": "__BINARY__48"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753797,
|
||||||
|
"update": "__BINARY__49"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753798,
|
||||||
|
"update": "__BINARY__50"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753799,
|
||||||
|
"update": "__BINARY__51"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753800,
|
||||||
|
"update": "__BINARY__52"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753801,
|
||||||
|
"update": "__BINARY__53"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753802,
|
||||||
|
"update": "__BINARY__54"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753802,
|
||||||
|
"update": "__BINARY__55"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753803,
|
||||||
|
"update": "__BINARY__56"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753804,
|
||||||
|
"update": "__BINARY__57"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753805,
|
||||||
|
"update": "__BINARY__58"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753806,
|
||||||
|
"update": "__BINARY__59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753807,
|
||||||
|
"update": "__BINARY__60"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753807,
|
||||||
|
"update": "__BINARY__61"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753808,
|
||||||
|
"update": "__BINARY__62"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753809,
|
||||||
|
"update": "__BINARY__63"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753810,
|
||||||
|
"update": "__BINARY__64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753811,
|
||||||
|
"update": "__BINARY__65"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753811,
|
||||||
|
"update": "__BINARY__66"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753812,
|
||||||
|
"update": "__BINARY__67"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753813,
|
||||||
|
"update": "__BINARY__68"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753814,
|
||||||
|
"update": "__BINARY__69"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753815,
|
||||||
|
"update": "__BINARY__70"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753816,
|
||||||
|
"update": "__BINARY__71"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753817,
|
||||||
|
"update": "__BINARY__72"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753818,
|
||||||
|
"update": "__BINARY__73"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753818,
|
||||||
|
"update": "__BINARY__74"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753819,
|
||||||
|
"update": "__BINARY__75"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853753820,
|
||||||
|
"update": "__BINARY__76"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853754053,
|
||||||
|
"update": "__BINARY__77"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755314,
|
||||||
|
"update": "__BINARY__78"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755516,
|
||||||
|
"update": "__BINARY__79"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755920,
|
||||||
|
"update": "__BINARY__80"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755921,
|
||||||
|
"update": "__BINARY__81"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755922,
|
||||||
|
"update": "__BINARY__82"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755923,
|
||||||
|
"update": "__BINARY__83"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755924,
|
||||||
|
"update": "__BINARY__84"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755925,
|
||||||
|
"update": "__BINARY__85"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755926,
|
||||||
|
"update": "__BINARY__86"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755930,
|
||||||
|
"update": "__BINARY__87"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755932,
|
||||||
|
"update": "__BINARY__88"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755933,
|
||||||
|
"update": "__BINARY__89"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755934,
|
||||||
|
"update": "__BINARY__90"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853755935,
|
||||||
|
"update": "__BINARY__91"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756122,
|
||||||
|
"update": "__BINARY__92"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756123,
|
||||||
|
"update": "__BINARY__93"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756124,
|
||||||
|
"update": "__BINARY__94"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756125,
|
||||||
|
"update": "__BINARY__95"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756129,
|
||||||
|
"update": "__BINARY__96"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756130,
|
||||||
|
"update": "__BINARY__97"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756131,
|
||||||
|
"update": "__BINARY__98"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756132,
|
||||||
|
"update": "__BINARY__99"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756134,
|
||||||
|
"update": "__BINARY__100"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756135,
|
||||||
|
"update": "__BINARY__101"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756146,
|
||||||
|
"update": "__BINARY__102"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756154,
|
||||||
|
"update": "__BINARY__103"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756155,
|
||||||
|
"update": "__BINARY__104"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756158,
|
||||||
|
"update": "__BINARY__105"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756161,
|
||||||
|
"update": "__BINARY__106"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756162,
|
||||||
|
"update": "__BINARY__107"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756163,
|
||||||
|
"update": "__BINARY__108"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756164,
|
||||||
|
"update": "__BINARY__109"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756165,
|
||||||
|
"update": "__BINARY__110"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756212,
|
||||||
|
"update": "__BINARY__111"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756266,
|
||||||
|
"update": "__BINARY__112"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756321,
|
||||||
|
"update": "__BINARY__113"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756375,
|
||||||
|
"update": "__BINARY__114"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756435,
|
||||||
|
"update": "__BINARY__115"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756490,
|
||||||
|
"update": "__BINARY__116"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756546,
|
||||||
|
"update": "__BINARY__117"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756607,
|
||||||
|
"update": "__BINARY__118"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756672,
|
||||||
|
"update": "__BINARY__119"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756734,
|
||||||
|
"update": "__BINARY__120"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1699853756806,
|
||||||
|
"update": "__BINARY__121"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "page-view",
|
||||||
|
"version": 1,
|
||||||
|
"stores": [
|
||||||
|
{
|
||||||
|
"name": "view",
|
||||||
|
"keyPath": "id",
|
||||||
|
"values": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sdI1qQamsV_blob",
|
||||||
|
"version": 1,
|
||||||
|
"stores": [
|
||||||
|
{
|
||||||
|
"name": "blob",
|
||||||
|
"keyPath": null,
|
||||||
|
"values": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
607
tests/fixtures/legacy/0.6.1-beta.1/idb_index.json
vendored
Normal file
607
tests/fixtures/legacy/0.6.1-beta.1/idb_index.json
vendored
Normal file
@@ -0,0 +1,607 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "__BINARY__1",
|
||||||
|
"start": 0,
|
||||||
|
"end": 189
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__2",
|
||||||
|
"start": 189,
|
||||||
|
"end": 251
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__3",
|
||||||
|
"start": 251,
|
||||||
|
"end": 564
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__4",
|
||||||
|
"start": 564,
|
||||||
|
"end": 626
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__5",
|
||||||
|
"start": 626,
|
||||||
|
"end": 923
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__6",
|
||||||
|
"start": 923,
|
||||||
|
"end": 985
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__7",
|
||||||
|
"start": 985,
|
||||||
|
"end": 1280
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__8",
|
||||||
|
"start": 1280,
|
||||||
|
"end": 1342
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__9",
|
||||||
|
"start": 1342,
|
||||||
|
"end": 126036
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__10",
|
||||||
|
"start": 126036,
|
||||||
|
"end": 126099
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__11",
|
||||||
|
"start": 126099,
|
||||||
|
"end": 126402
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__12",
|
||||||
|
"start": 126402,
|
||||||
|
"end": 126467
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__13",
|
||||||
|
"start": 126467,
|
||||||
|
"end": 126769
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__14",
|
||||||
|
"start": 126769,
|
||||||
|
"end": 126834
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__15",
|
||||||
|
"start": 126834,
|
||||||
|
"end": 127137
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__16",
|
||||||
|
"start": 127137,
|
||||||
|
"end": 127202
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__17",
|
||||||
|
"start": 127202,
|
||||||
|
"end": 127504
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__18",
|
||||||
|
"start": 127504,
|
||||||
|
"end": 127569
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__19",
|
||||||
|
"start": 127569,
|
||||||
|
"end": 127873
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__20",
|
||||||
|
"start": 127873,
|
||||||
|
"end": 127938
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__21",
|
||||||
|
"start": 127938,
|
||||||
|
"end": 128261
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__22",
|
||||||
|
"start": 128261,
|
||||||
|
"end": 128326
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__23",
|
||||||
|
"start": 128326,
|
||||||
|
"end": 128647
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__24",
|
||||||
|
"start": 128647,
|
||||||
|
"end": 128712
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__25",
|
||||||
|
"start": 128712,
|
||||||
|
"end": 129034
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__26",
|
||||||
|
"start": 129034,
|
||||||
|
"end": 129099
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__27",
|
||||||
|
"start": 129099,
|
||||||
|
"end": 129370
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__28",
|
||||||
|
"start": 129370,
|
||||||
|
"end": 129435
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__29",
|
||||||
|
"start": 129435,
|
||||||
|
"end": 129895
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__30",
|
||||||
|
"start": 129895,
|
||||||
|
"end": 129960
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__31",
|
||||||
|
"start": 129960,
|
||||||
|
"end": 130307
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__32",
|
||||||
|
"start": 130307,
|
||||||
|
"end": 130372
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__33",
|
||||||
|
"start": 130372,
|
||||||
|
"end": 130738
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__34",
|
||||||
|
"start": 130738,
|
||||||
|
"end": 130803
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__35",
|
||||||
|
"start": 130803,
|
||||||
|
"end": 131698
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__36",
|
||||||
|
"start": 131698,
|
||||||
|
"end": 131763
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__37",
|
||||||
|
"start": 131763,
|
||||||
|
"end": 131916
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__38",
|
||||||
|
"start": 131916,
|
||||||
|
"end": 131981
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__39",
|
||||||
|
"start": 131981,
|
||||||
|
"end": 132435
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__40",
|
||||||
|
"start": 132435,
|
||||||
|
"end": 132500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__41",
|
||||||
|
"start": 132500,
|
||||||
|
"end": 132730
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__42",
|
||||||
|
"start": 132730,
|
||||||
|
"end": 132795
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__43",
|
||||||
|
"start": 132795,
|
||||||
|
"end": 133172
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__44",
|
||||||
|
"start": 133172,
|
||||||
|
"end": 133237
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__45",
|
||||||
|
"start": 133237,
|
||||||
|
"end": 133466
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__46",
|
||||||
|
"start": 133466,
|
||||||
|
"end": 133531
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__47",
|
||||||
|
"start": 133531,
|
||||||
|
"end": 133935
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__48",
|
||||||
|
"start": 133935,
|
||||||
|
"end": 134000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__49",
|
||||||
|
"start": 134000,
|
||||||
|
"end": 134228
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__50",
|
||||||
|
"start": 134228,
|
||||||
|
"end": 134293
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__51",
|
||||||
|
"start": 134293,
|
||||||
|
"end": 134626
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__52",
|
||||||
|
"start": 134626,
|
||||||
|
"end": 134691
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__53",
|
||||||
|
"start": 134691,
|
||||||
|
"end": 134921
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__54",
|
||||||
|
"start": 134921,
|
||||||
|
"end": 134986
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__55",
|
||||||
|
"start": 134986,
|
||||||
|
"end": 135372
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__56",
|
||||||
|
"start": 135372,
|
||||||
|
"end": 135437
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__57",
|
||||||
|
"start": 135437,
|
||||||
|
"end": 135679
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__58",
|
||||||
|
"start": 135679,
|
||||||
|
"end": 135744
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__59",
|
||||||
|
"start": 135744,
|
||||||
|
"end": 136129
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__60",
|
||||||
|
"start": 136129,
|
||||||
|
"end": 136194
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__61",
|
||||||
|
"start": 136194,
|
||||||
|
"end": 136417
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__62",
|
||||||
|
"start": 136417,
|
||||||
|
"end": 136482
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__63",
|
||||||
|
"start": 136482,
|
||||||
|
"end": 136758
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__64",
|
||||||
|
"start": 136758,
|
||||||
|
"end": 136823
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__65",
|
||||||
|
"start": 136823,
|
||||||
|
"end": 137319
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__66",
|
||||||
|
"start": 137319,
|
||||||
|
"end": 137384
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__67",
|
||||||
|
"start": 137384,
|
||||||
|
"end": 137538
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__68",
|
||||||
|
"start": 137538,
|
||||||
|
"end": 137603
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__69",
|
||||||
|
"start": 137603,
|
||||||
|
"end": 139400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__70",
|
||||||
|
"start": 139400,
|
||||||
|
"end": 139465
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__71",
|
||||||
|
"start": 139465,
|
||||||
|
"end": 139692
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__72",
|
||||||
|
"start": 139692,
|
||||||
|
"end": 139757
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__73",
|
||||||
|
"start": 139757,
|
||||||
|
"end": 139980
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__74",
|
||||||
|
"start": 139980,
|
||||||
|
"end": 140045
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__75",
|
||||||
|
"start": 140045,
|
||||||
|
"end": 140266
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__76",
|
||||||
|
"start": 140266,
|
||||||
|
"end": 140331
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__77",
|
||||||
|
"start": 140331,
|
||||||
|
"end": 278777
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__78",
|
||||||
|
"start": 278777,
|
||||||
|
"end": 278804
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__79",
|
||||||
|
"start": 278804,
|
||||||
|
"end": 417260
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__80",
|
||||||
|
"start": 417260,
|
||||||
|
"end": 417300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__81",
|
||||||
|
"start": 417300,
|
||||||
|
"end": 417388
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__82",
|
||||||
|
"start": 417388,
|
||||||
|
"end": 417475
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__83",
|
||||||
|
"start": 417475,
|
||||||
|
"end": 417565
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__84",
|
||||||
|
"start": 417565,
|
||||||
|
"end": 417655
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__85",
|
||||||
|
"start": 417655,
|
||||||
|
"end": 417743
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__86",
|
||||||
|
"start": 417743,
|
||||||
|
"end": 417832
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__87",
|
||||||
|
"start": 417832,
|
||||||
|
"end": 417922
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__88",
|
||||||
|
"start": 417922,
|
||||||
|
"end": 418014
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__89",
|
||||||
|
"start": 418014,
|
||||||
|
"end": 418103
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__90",
|
||||||
|
"start": 418103,
|
||||||
|
"end": 418193
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__91",
|
||||||
|
"start": 418193,
|
||||||
|
"end": 418230
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__92",
|
||||||
|
"start": 418230,
|
||||||
|
"end": 418344
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__93",
|
||||||
|
"start": 418344,
|
||||||
|
"end": 418493
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__94",
|
||||||
|
"start": 418493,
|
||||||
|
"end": 418523
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__95",
|
||||||
|
"start": 418523,
|
||||||
|
"end": 418676
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__96",
|
||||||
|
"start": 418676,
|
||||||
|
"end": 418706
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__97",
|
||||||
|
"start": 418706,
|
||||||
|
"end": 418979
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__98",
|
||||||
|
"start": 418979,
|
||||||
|
"end": 419009
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__99",
|
||||||
|
"start": 419009,
|
||||||
|
"end": 419210
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__100",
|
||||||
|
"start": 419210,
|
||||||
|
"end": 419240
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__101",
|
||||||
|
"start": 419240,
|
||||||
|
"end": 419281
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__102",
|
||||||
|
"start": 419281,
|
||||||
|
"end": 419323
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__103",
|
||||||
|
"start": 419323,
|
||||||
|
"end": 419360
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__104",
|
||||||
|
"start": 419360,
|
||||||
|
"end": 419397
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__105",
|
||||||
|
"start": 419397,
|
||||||
|
"end": 419438
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__106",
|
||||||
|
"start": 419438,
|
||||||
|
"end": 419473
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__107",
|
||||||
|
"start": 419473,
|
||||||
|
"end": 419673
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__108",
|
||||||
|
"start": 419673,
|
||||||
|
"end": 419708
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__109",
|
||||||
|
"start": 419708,
|
||||||
|
"end": 419729
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__110",
|
||||||
|
"start": 419729,
|
||||||
|
"end": 419772
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__111",
|
||||||
|
"start": 419772,
|
||||||
|
"end": 419792
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__112",
|
||||||
|
"start": 419792,
|
||||||
|
"end": 419812
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__113",
|
||||||
|
"start": 419812,
|
||||||
|
"end": 419832
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__114",
|
||||||
|
"start": 419832,
|
||||||
|
"end": 419852
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__115",
|
||||||
|
"start": 419852,
|
||||||
|
"end": 419872
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__116",
|
||||||
|
"start": 419872,
|
||||||
|
"end": 419892
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__117",
|
||||||
|
"start": 419892,
|
||||||
|
"end": 419912
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__118",
|
||||||
|
"start": 419912,
|
||||||
|
"end": 419932
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__119",
|
||||||
|
"start": 419932,
|
||||||
|
"end": 419952
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__120",
|
||||||
|
"start": 419952,
|
||||||
|
"end": 419972
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "__BINARY__121",
|
||||||
|
"start": 419972,
|
||||||
|
"end": 419992
|
||||||
|
}
|
||||||
|
]
|
||||||
7
tests/fixtures/legacy/0.6.1-beta.1/local-storage.json
vendored
Normal file
7
tests/fixtures/legacy/0.6.1-beta.1/local-storage.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"jotai-workspaces": "[{\"id\":\"sdI1qQamsV\",\"flavour\":\"local\"}]",
|
||||||
|
"last_page_id": "-RlV_W_Ey1",
|
||||||
|
"last_workspace_id": "sdI1qQamsV",
|
||||||
|
"affine-local-workspace": "[\"sdI1qQamsV\"]",
|
||||||
|
"is-first-open": "false"
|
||||||
|
}
|
||||||
2
tests/fixtures/package.json
vendored
2
tests/fixtures/package.json
vendored
@@ -3,5 +3,5 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
"./*": "./*"
|
"./*": "./*"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "@affine-test/kit",
|
"name": "@affine-test/kit",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./electron": "./electron.ts",
|
"./electron": "./electron.ts",
|
||||||
"./playwright": "./playwright.ts",
|
"./playwright": "./playwright.ts",
|
||||||
|
|||||||
@@ -57,5 +57,5 @@
|
|||||||
"@blocksuite/lit": "*",
|
"@blocksuite/lit": "*",
|
||||||
"@blocksuite/store": "*"
|
"@blocksuite/store": "*"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
2
tools/@types/env/package.json
vendored
2
tools/@types/env/package.json
vendored
@@ -7,5 +7,5 @@
|
|||||||
"@affine/env": "workspace:*",
|
"@affine/env": "workspace:*",
|
||||||
"@toeverything/infra": "workspace:*"
|
"@toeverything/infra": "workspace:*"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,5 +22,5 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ts-node": "*"
|
"ts-node": "*"
|
||||||
},
|
},
|
||||||
"version": "0.10.0"
|
"version": "0.10.1-beta.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/plugin-cli",
|
"name": "@affine/plugin-cli",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"af": "./src/af.mjs"
|
"af": "./src/af.mjs"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@affine/workers",
|
"name": "@affine/workers",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1-beta.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "wrangler dev"
|
"dev": "wrangler dev"
|
||||||
|
|||||||
@@ -190,6 +190,9 @@
|
|||||||
{
|
{
|
||||||
"path": "./tests/affine-legacy/0.8.4"
|
"path": "./tests/affine-legacy/0.8.4"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "./tests/affine-legacy/0.6.1-beta.1"
|
||||||
|
},
|
||||||
// Others
|
// Others
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.node.json"
|
"path": "./tsconfig.node.json"
|
||||||
|
|||||||
40
yarn.lock
40
yarn.lock
@@ -19,6 +19,23 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@affine-legacy/0.6.1-beta.1@workspace:tests/affine-legacy/0.6.1-beta.1":
|
||||||
|
version: 0.0.0-use.local
|
||||||
|
resolution: "@affine-legacy/0.6.1-beta.1@workspace:tests/affine-legacy/0.6.1-beta.1"
|
||||||
|
dependencies:
|
||||||
|
"@affine-test/fixtures": "workspace:*"
|
||||||
|
"@affine-test/kit": "workspace:*"
|
||||||
|
"@blocksuite/block-std": "npm:0.0.0-20231110042432-4fdac4dc-nightly"
|
||||||
|
"@blocksuite/blocks": "npm:0.0.0-20231110042432-4fdac4dc-nightly"
|
||||||
|
"@blocksuite/global": "npm:0.0.0-20231110042432-4fdac4dc-nightly"
|
||||||
|
"@blocksuite/store": "npm:0.0.0-20231110042432-4fdac4dc-nightly"
|
||||||
|
"@playwright/test": "npm:^1.39.0"
|
||||||
|
express: "npm:^4.18.2"
|
||||||
|
http-proxy-middleware: "npm:^3.0.0-beta.1"
|
||||||
|
serve: "npm:^14.2.1"
|
||||||
|
languageName: unknown
|
||||||
|
linkType: soft
|
||||||
|
|
||||||
"@affine-legacy/0.7.0-canary.18@workspace:tests/affine-legacy/0.7.0-canary.18":
|
"@affine-legacy/0.7.0-canary.18@workspace:tests/affine-legacy/0.7.0-canary.18":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@affine-legacy/0.7.0-canary.18@workspace:tests/affine-legacy/0.7.0-canary.18"
|
resolution: "@affine-legacy/0.7.0-canary.18@workspace:tests/affine-legacy/0.7.0-canary.18"
|
||||||
@@ -224,7 +241,7 @@ __metadata:
|
|||||||
"@testing-library/react": "npm:^14.0.0"
|
"@testing-library/react": "npm:^14.0.0"
|
||||||
"@toeverything/hooks": "workspace:*"
|
"@toeverything/hooks": "workspace:*"
|
||||||
"@toeverything/infra": "workspace:*"
|
"@toeverything/infra": "workspace:*"
|
||||||
"@toeverything/theme": "npm:^0.7.20"
|
"@toeverything/theme": "npm:^0.7.24"
|
||||||
"@types/bytes": "npm:^3.1.3"
|
"@types/bytes": "npm:^3.1.3"
|
||||||
"@types/react": "npm:^18.2.28"
|
"@types/react": "npm:^18.2.28"
|
||||||
"@types/react-datepicker": "npm:^4.19.0"
|
"@types/react-datepicker": "npm:^4.19.0"
|
||||||
@@ -427,7 +444,7 @@ __metadata:
|
|||||||
builder-util-runtime: "npm:^9.2.1"
|
builder-util-runtime: "npm:^9.2.1"
|
||||||
cross-env: "npm:^7.0.3"
|
cross-env: "npm:^7.0.3"
|
||||||
electron: "npm:^27.0.0"
|
electron: "npm:^27.0.0"
|
||||||
electron-log: "npm:^5.0.0-rc.1"
|
electron-log: "npm:^5.0.0"
|
||||||
electron-squirrel-startup: "npm:1.0.0"
|
electron-squirrel-startup: "npm:1.0.0"
|
||||||
electron-updater: "npm:^6.1.5"
|
electron-updater: "npm:^6.1.5"
|
||||||
electron-window-state: "npm:^5.0.3"
|
electron-window-state: "npm:^5.0.3"
|
||||||
@@ -524,7 +541,7 @@ __metadata:
|
|||||||
"@affine/sdk": "workspace:*"
|
"@affine/sdk": "workspace:*"
|
||||||
"@blocksuite/icons": "npm:2.1.35"
|
"@blocksuite/icons": "npm:2.1.35"
|
||||||
"@toeverything/components": "npm:^0.0.46"
|
"@toeverything/components": "npm:^0.0.46"
|
||||||
"@toeverything/theme": "npm:^0.7.20"
|
"@toeverything/theme": "npm:^0.7.24"
|
||||||
clsx: "npm:^2.0.0"
|
clsx: "npm:^2.0.0"
|
||||||
foxact: "npm:^0.2.20"
|
foxact: "npm:^0.2.20"
|
||||||
react-error-boundary: "npm:^4.0.11"
|
react-error-boundary: "npm:^4.0.11"
|
||||||
@@ -12679,14 +12696,7 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"@toeverything/theme@npm:^0.7.20, @toeverything/theme@npm:^0.7.21":
|
"@toeverything/theme@npm:^0.7.21, @toeverything/theme@npm:^0.7.24":
|
||||||
version: 0.7.23
|
|
||||||
resolution: "@toeverything/theme@npm:0.7.23"
|
|
||||||
checksum: 1576abae43677fff5c9a88aea5c5755db7e07cb397daf3eb3bdfd5629350b066d8ddc1b9922b0c773774a7fed465c45e1bfebe6b809c6fa609d75017f40743ab
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@toeverything/theme@npm:^0.7.24":
|
|
||||||
version: 0.7.24
|
version: 0.7.24
|
||||||
resolution: "@toeverything/theme@npm:0.7.24"
|
resolution: "@toeverything/theme@npm:0.7.24"
|
||||||
checksum: faa97dad2a411e895090497ff6cbb83836e9be963e608cbc7f3421c4a933d86393551250fa015d4b9060778f0abb0e122a41d12a70e6f7fb7c9eadc2324a6035
|
checksum: faa97dad2a411e895090497ff6cbb83836e9be963e608cbc7f3421c4a933d86393551250fa015d4b9060778f0abb0e122a41d12a70e6f7fb7c9eadc2324a6035
|
||||||
@@ -19152,10 +19162,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"electron-log@npm:^5.0.0-rc.1":
|
"electron-log@npm:^5.0.0":
|
||||||
version: 5.0.0-rc.1
|
version: 5.0.0
|
||||||
resolution: "electron-log@npm:5.0.0-rc.1"
|
resolution: "electron-log@npm:5.0.0"
|
||||||
checksum: f4ec437197ec5801a325e062c19f182a14eba960ee683034bfea5854efe452cfa91985b7f7ab159599c8264fde869f7101d4e82303231865a6b7c8e621815f87
|
checksum: 23b14119a5753be24880e7466ee80ae1386f9df4123ed59bc8f4426a814c728875b07de13bf0729cba7202888fcd6230375e2b5302cee0d0c5f25584d9db3334
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user