@roc-db/test-utils 0.2.0-pre.4 → 0.2.0-pre.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +474 -138
- package/dist/types/inMemoryAdapter.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/operations/applyDraft.d.ts +5 -0
- package/dist/types/operations/createBlockImage.d.ts +7 -0
- package/dist/types/operations/createBlockParagraph.d.ts +7 -0
- package/dist/types/operations/createBlockRow.d.ts +7 -0
- package/dist/types/operations/createBlockTitle.d.ts +7 -0
- package/dist/types/operations/createDraft.d.ts +7 -0
- package/dist/types/operations/createPost.d.ts +7 -0
- package/dist/types/operations/deleteBlocks.d.ts +7 -0
- package/dist/types/operations/deletePost.d.ts +5 -0
- package/dist/types/operations/index.d.ts +83 -0
- package/dist/types/operations/moveBlocks.d.ts +5 -0
- package/dist/types/operations/readEntity.d.ts +1 -0
- package/dist/types/operations/readPost.d.ts +1 -0
- package/dist/types/operations/testTransactionalEdits.d.ts +7 -0
- package/dist/types/operations/updateBlockParagraph.d.ts +5 -0
- package/dist/types/operations/updatePost.d.ts +7 -0
- package/dist/types/operations/updatePostDescription.d.ts +7 -0
- package/dist/types/operations/updatePostTitle.d.ts +7 -0
- package/dist/types/schemas/ApplyDraftMutationSchema.d.ts +61 -0
- package/dist/types/schemas/BlockImageRefSchema.d.ts +1 -0
- package/dist/types/schemas/BlockImageSchema.d.ts +32 -0
- package/dist/types/schemas/BlockParagraphRefSchema.d.ts +1 -0
- package/dist/types/schemas/BlockParagraphSchema.d.ts +33 -0
- package/dist/types/schemas/BlockRefSchema.d.ts +2 -0
- package/dist/types/schemas/BlockRowRefSchema.d.ts +1 -0
- package/dist/types/schemas/BlockRowSchema.d.ts +33 -0
- package/dist/types/schemas/BlockTitleRefSchema.d.ts +1 -0
- package/dist/types/schemas/BlockTitleSchema.d.ts +32 -0
- package/dist/types/schemas/CreateBlockImageMutationSchema.d.ts +61 -0
- package/dist/types/schemas/CreateBlockParagraphMutationSchema.d.ts +61 -0
- package/dist/types/schemas/CreateBlockRowMutationSchema.d.ts +61 -0
- package/dist/types/schemas/CreateBlockTitleMutationSchema.d.ts +61 -0
- package/dist/types/schemas/CreateDraftMutationSchema.d.ts +61 -0
- package/dist/types/schemas/CreatePostMutationSchema.d.ts +71 -0
- package/dist/types/schemas/CreateUserMutationSchema.d.ts +61 -0
- package/dist/types/schemas/DeleteBlocksMutationSchema.d.ts +51 -0
- package/dist/types/schemas/DeletePostMutationSchema.d.ts +50 -0
- package/dist/types/schemas/DraftRefSchema.d.ts +1 -0
- package/dist/types/schemas/DraftSchema.d.ts +32 -0
- package/dist/types/schemas/MoveBlocksMutationSchema.d.ts +66 -0
- package/dist/types/schemas/PostRefSchema.d.ts +1 -0
- package/dist/types/schemas/PostSchema.d.ts +33 -0
- package/dist/types/schemas/TestTransactionalEditsMutationSchema.d.ts +71 -0
- package/dist/types/schemas/UpdateBlockParagraphMutationSchema.d.ts +66 -0
- package/dist/types/schemas/UpdatePostDescriptionMutationSchema.d.ts +66 -0
- package/dist/types/schemas/UpdatePostMutationSchema.d.ts +76 -0
- package/dist/types/schemas/UpdatePostTitleMutationSchema.d.ts +66 -0
- package/dist/types/schemas/UserRefSchema.d.ts +1 -0
- package/dist/types/schemas/index.d.ts +44 -0
- package/dist/types/testAdapterImplementation.d.ts +1 -0
- package/package.json +10 -17
- package/dist/tarball/roc-db-test-utils-0.2.0-pre.4.tgz +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdatePostDescriptionMutationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
ref: z.ZodType<`Mutation/${string}`, z.ZodTypeDef, `Mutation/${string}`>;
|
|
4
|
+
timestamp: z.ZodString;
|
|
5
|
+
changeSetRef: z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
6
|
+
payload: z.ZodAny;
|
|
7
|
+
log: z.ZodArray<z.ZodAny, "many">;
|
|
8
|
+
debounceCount: z.ZodNumber;
|
|
9
|
+
identityRef: z.ZodString;
|
|
10
|
+
sessionRef: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, {
|
|
12
|
+
operation: z.ZodObject<{
|
|
13
|
+
name: z.ZodLiteral<"updatePostDescription">;
|
|
14
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
name: "updatePostDescription";
|
|
17
|
+
version: number;
|
|
18
|
+
}, {
|
|
19
|
+
name: "updatePostDescription";
|
|
20
|
+
version?: number | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
changeSetRef: z.ZodType<never, z.ZodTypeDef, never> | z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
23
|
+
payload: z.ZodObject<{
|
|
24
|
+
ref: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
|
|
25
|
+
description: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
ref: `Post/${string}`;
|
|
28
|
+
description: string;
|
|
29
|
+
}, {
|
|
30
|
+
ref: `Post/${string}`;
|
|
31
|
+
description: string;
|
|
32
|
+
}>;
|
|
33
|
+
log: z.ZodType<any[], z.ZodTypeDef, any[]>;
|
|
34
|
+
}>, "strict", z.ZodTypeAny, {
|
|
35
|
+
ref: `Mutation/${string}`;
|
|
36
|
+
timestamp: string;
|
|
37
|
+
changeSetRef: null;
|
|
38
|
+
payload: {
|
|
39
|
+
ref: `Post/${string}`;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
log: any[];
|
|
43
|
+
debounceCount: number;
|
|
44
|
+
identityRef: string;
|
|
45
|
+
operation: {
|
|
46
|
+
name: "updatePostDescription";
|
|
47
|
+
version: number;
|
|
48
|
+
};
|
|
49
|
+
sessionRef?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
ref: `Mutation/${string}`;
|
|
52
|
+
timestamp: string;
|
|
53
|
+
changeSetRef: null;
|
|
54
|
+
payload: {
|
|
55
|
+
ref: `Post/${string}`;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
log: any[];
|
|
59
|
+
debounceCount: number;
|
|
60
|
+
identityRef: string;
|
|
61
|
+
operation: {
|
|
62
|
+
name: "updatePostDescription";
|
|
63
|
+
version?: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
sessionRef?: string | undefined;
|
|
66
|
+
}>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdatePostMutationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
ref: z.ZodType<`Mutation/${string}`, z.ZodTypeDef, `Mutation/${string}`>;
|
|
4
|
+
timestamp: z.ZodString;
|
|
5
|
+
changeSetRef: z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
6
|
+
payload: z.ZodAny;
|
|
7
|
+
log: z.ZodArray<z.ZodAny, "many">;
|
|
8
|
+
debounceCount: z.ZodNumber;
|
|
9
|
+
identityRef: z.ZodString;
|
|
10
|
+
sessionRef: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, {
|
|
12
|
+
operation: z.ZodObject<{
|
|
13
|
+
name: z.ZodLiteral<"updatePost">;
|
|
14
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
name: "updatePost";
|
|
17
|
+
version: number;
|
|
18
|
+
}, {
|
|
19
|
+
name: "updatePost";
|
|
20
|
+
version?: number | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
changeSetRef: z.ZodType<never, z.ZodTypeDef, never> | z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
23
|
+
payload: z.ZodObject<{
|
|
24
|
+
ref: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
|
|
25
|
+
title: z.ZodOptional<z.ZodString>;
|
|
26
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
27
|
+
authorRef: z.ZodOptional<z.ZodType<`User/${string}`, z.ZodTypeDef, `User/${string}`>>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
ref: `Post/${string}`;
|
|
30
|
+
tags: string[];
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
authorRef?: `User/${string}` | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
ref: `Post/${string}`;
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
tags?: string[] | undefined;
|
|
37
|
+
authorRef?: `User/${string}` | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
log: z.ZodType<any[], z.ZodTypeDef, any[]>;
|
|
40
|
+
}>, "strict", z.ZodTypeAny, {
|
|
41
|
+
ref: `Mutation/${string}`;
|
|
42
|
+
timestamp: string;
|
|
43
|
+
changeSetRef: null;
|
|
44
|
+
payload: {
|
|
45
|
+
ref: `Post/${string}`;
|
|
46
|
+
tags: string[];
|
|
47
|
+
title?: string | undefined;
|
|
48
|
+
authorRef?: `User/${string}` | undefined;
|
|
49
|
+
};
|
|
50
|
+
log: any[];
|
|
51
|
+
debounceCount: number;
|
|
52
|
+
identityRef: string;
|
|
53
|
+
operation: {
|
|
54
|
+
name: "updatePost";
|
|
55
|
+
version: number;
|
|
56
|
+
};
|
|
57
|
+
sessionRef?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
ref: `Mutation/${string}`;
|
|
60
|
+
timestamp: string;
|
|
61
|
+
changeSetRef: null;
|
|
62
|
+
payload: {
|
|
63
|
+
ref: `Post/${string}`;
|
|
64
|
+
title?: string | undefined;
|
|
65
|
+
tags?: string[] | undefined;
|
|
66
|
+
authorRef?: `User/${string}` | undefined;
|
|
67
|
+
};
|
|
68
|
+
log: any[];
|
|
69
|
+
debounceCount: number;
|
|
70
|
+
identityRef: string;
|
|
71
|
+
operation: {
|
|
72
|
+
name: "updatePost";
|
|
73
|
+
version?: number | undefined;
|
|
74
|
+
};
|
|
75
|
+
sessionRef?: string | undefined;
|
|
76
|
+
}>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdatePostTitleMutationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
ref: z.ZodType<`Mutation/${string}`, z.ZodTypeDef, `Mutation/${string}`>;
|
|
4
|
+
timestamp: z.ZodString;
|
|
5
|
+
changeSetRef: z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
6
|
+
payload: z.ZodAny;
|
|
7
|
+
log: z.ZodArray<z.ZodAny, "many">;
|
|
8
|
+
debounceCount: z.ZodNumber;
|
|
9
|
+
identityRef: z.ZodString;
|
|
10
|
+
sessionRef: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, {
|
|
12
|
+
operation: z.ZodObject<{
|
|
13
|
+
name: z.ZodLiteral<"updatePostTitle">;
|
|
14
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
name: "updatePostTitle";
|
|
17
|
+
version: number;
|
|
18
|
+
}, {
|
|
19
|
+
name: "updatePostTitle";
|
|
20
|
+
version?: number | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
changeSetRef: z.ZodType<never, z.ZodTypeDef, never> | z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
23
|
+
payload: z.ZodObject<{
|
|
24
|
+
ref: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
|
|
25
|
+
title: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
ref: `Post/${string}`;
|
|
28
|
+
title: string;
|
|
29
|
+
}, {
|
|
30
|
+
ref: `Post/${string}`;
|
|
31
|
+
title: string;
|
|
32
|
+
}>;
|
|
33
|
+
log: z.ZodType<any[], z.ZodTypeDef, any[]>;
|
|
34
|
+
}>, "strict", z.ZodTypeAny, {
|
|
35
|
+
ref: `Mutation/${string}`;
|
|
36
|
+
timestamp: string;
|
|
37
|
+
changeSetRef: null;
|
|
38
|
+
payload: {
|
|
39
|
+
ref: `Post/${string}`;
|
|
40
|
+
title: string;
|
|
41
|
+
};
|
|
42
|
+
log: any[];
|
|
43
|
+
debounceCount: number;
|
|
44
|
+
identityRef: string;
|
|
45
|
+
operation: {
|
|
46
|
+
name: "updatePostTitle";
|
|
47
|
+
version: number;
|
|
48
|
+
};
|
|
49
|
+
sessionRef?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
ref: `Mutation/${string}`;
|
|
52
|
+
timestamp: string;
|
|
53
|
+
changeSetRef: null;
|
|
54
|
+
payload: {
|
|
55
|
+
ref: `Post/${string}`;
|
|
56
|
+
title: string;
|
|
57
|
+
};
|
|
58
|
+
log: any[];
|
|
59
|
+
debounceCount: number;
|
|
60
|
+
identityRef: string;
|
|
61
|
+
operation: {
|
|
62
|
+
name: "updatePostTitle";
|
|
63
|
+
version?: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
sessionRef?: string | undefined;
|
|
66
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserRefSchema: import("zod").ZodType<`User/${string}`, import("zod").ZodTypeDef, `User/${string}`>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BlockImageSchema } from "./BlockImageSchema";
|
|
2
|
+
import { BlockParagraphSchema } from "./BlockParagraphSchema";
|
|
3
|
+
import { BlockTitleSchema } from "./BlockTitleSchema";
|
|
4
|
+
import { DraftSchema } from "./DraftSchema";
|
|
5
|
+
import { PostSchema } from "./PostSchema";
|
|
6
|
+
export { BlockImageSchema, BlockParagraphSchema, BlockTitleSchema, DraftSchema, PostSchema, };
|
|
7
|
+
export declare const entities: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
8
|
+
ref: import("zod").ZodType<never, import("zod").ZodTypeDef, never>;
|
|
9
|
+
entity: import("zod").ZodString;
|
|
10
|
+
created: import("zod").ZodObject<{
|
|
11
|
+
mutationRef: import("zod").ZodType<`Mutation/${string}`, import("zod").ZodTypeDef, `Mutation/${string}`>;
|
|
12
|
+
timestamp: import("zod").ZodString;
|
|
13
|
+
}, "strict", import("zod").ZodTypeAny, {
|
|
14
|
+
mutationRef: `Mutation/${string}`;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
}, {
|
|
17
|
+
mutationRef: `Mutation/${string}`;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
}>;
|
|
20
|
+
updated: import("zod").ZodObject<{
|
|
21
|
+
mutationRef: import("zod").ZodType<`Mutation/${string}`, import("zod").ZodTypeDef, `Mutation/${string}`>;
|
|
22
|
+
timestamp: import("zod").ZodString;
|
|
23
|
+
}, "strict", import("zod").ZodTypeAny, {
|
|
24
|
+
mutationRef: `Mutation/${string}`;
|
|
25
|
+
timestamp: string;
|
|
26
|
+
}, {
|
|
27
|
+
mutationRef: `Mutation/${string}`;
|
|
28
|
+
timestamp: string;
|
|
29
|
+
}>;
|
|
30
|
+
data: import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
31
|
+
parents: import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
32
|
+
ancestors: import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
33
|
+
}, import("zod").ZodRawShape>, "strict", import("zod").ZodTypeAny, {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
}, {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
}>[];
|
|
38
|
+
export { DraftRefSchema } from "./DraftRefSchema";
|
|
39
|
+
export { PostRefSchema } from "./PostRefSchema";
|
|
40
|
+
export { UserRefSchema } from "./UserRefSchema";
|
|
41
|
+
export { CreatePostMutationSchema } from "./CreatePostMutationSchema";
|
|
42
|
+
export { CreateUserMutationSchema } from "./CreateUserMutationSchema";
|
|
43
|
+
export { UpdatePostMutationSchema } from "./UpdatePostMutationSchema";
|
|
44
|
+
export { UpdatePostTitleMutationSchema } from "./UpdatePostTitleMutationSchema";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const testAdapterImplementation: <EngineOptions extends {}>(adapterConstructor: any, generateArgs: () => EngineOptions) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roc-db/test-utils",
|
|
3
|
-
"version": "0.2.0-pre.
|
|
3
|
+
"version": "0.2.0-pre.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
|
-
".":
|
|
7
|
-
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.js",
|
|
8
|
+
"types": "./dist/types/index.d.ts"
|
|
9
|
+
},
|
|
10
|
+
"./setup": {
|
|
11
|
+
"import": "./dist/setup/index.js",
|
|
12
|
+
"types": "./dist/types/setup/index.d.ts"
|
|
13
|
+
}
|
|
8
14
|
},
|
|
9
15
|
"files": [
|
|
10
16
|
"dist"
|
|
11
17
|
],
|
|
12
18
|
"sideEffects": false,
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "NODE_ENV=production bun run scripts/build.ts",
|
|
15
|
-
"build:types": "rm -rf dist/types && bun run tsc --noCheck",
|
|
16
|
-
"test": "echo"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@faker-js/faker": "9.6.0",
|
|
20
|
-
"@types/bun": "1.2.5",
|
|
21
|
-
"@types/sanitize-html": "2.13.0",
|
|
22
|
-
"bun": "1.2.5",
|
|
23
|
-
"expect-type": "1.2.0",
|
|
24
|
-
"roc-db": "0.2.0-pre.4"
|
|
25
|
-
},
|
|
26
19
|
"peerDependencies": {
|
|
27
|
-
"roc-db": "0.2.0-pre.
|
|
20
|
+
"roc-db": "0.2.0-pre.40",
|
|
28
21
|
"zod": "3.24.2"
|
|
29
22
|
},
|
|
30
23
|
"keywords": [],
|
|
Binary file
|