@dxos/echo-generator 0.6.13-main.548ca8d → 0.6.13-staging.1e988a3
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/lib/browser/index.mjs +7 -19
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +6 -18
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/data.d.ts.map +1 -1
- package/dist/types/src/generator.d.ts +2 -2
- package/dist/types/src/generator.d.ts.map +1 -1
- package/package.json +11 -15
- package/src/data.ts +10 -10
- package/src/generator.test.ts +3 -2
- package/src/generator.ts +4 -4
- package/dist/lib/node-esm/index.mjs +0 -705
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
package/src/generator.test.ts
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { expect } from 'chai';
|
|
6
6
|
|
|
7
7
|
import { next as A } from '@dxos/automerge/automerge';
|
|
8
8
|
import { Client } from '@dxos/client';
|
|
9
9
|
import { getObjectCore } from '@dxos/echo-db';
|
|
10
10
|
import { getType, S, TypedObject } from '@dxos/echo-schema';
|
|
11
11
|
import { faker } from '@dxos/random';
|
|
12
|
+
import { afterTest, describe, test } from '@dxos/test';
|
|
12
13
|
|
|
13
14
|
import { createSpaceObjectGenerator, createTestObjectGenerator, TestSchemaType } from './data';
|
|
14
15
|
import { SpaceObjectGenerator } from './generator';
|
|
@@ -116,7 +117,7 @@ describe('TestObjectGenerator', () => {
|
|
|
116
117
|
const setupTest = async () => {
|
|
117
118
|
const client = new Client();
|
|
118
119
|
await client.initialize();
|
|
119
|
-
|
|
120
|
+
afterTest(async () => await client.destroy());
|
|
120
121
|
await client.halo.createIdentity();
|
|
121
122
|
const space = await client.spaces.create();
|
|
122
123
|
return { client, space };
|
package/src/generator.ts
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { type Space, Filter } from '@dxos/client/echo';
|
|
6
6
|
import {
|
|
7
7
|
type EchoReactiveObject,
|
|
8
|
-
DynamicSchema,
|
|
9
8
|
type ReactiveObject,
|
|
9
|
+
DynamicSchema,
|
|
10
10
|
getEchoObjectAnnotation,
|
|
11
11
|
getSchema,
|
|
12
|
-
isReactiveObject,
|
|
13
12
|
type S,
|
|
13
|
+
isReactiveObject,
|
|
14
14
|
} from '@dxos/echo-schema';
|
|
15
15
|
import { create } from '@dxos/echo-schema';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
@@ -18,11 +18,11 @@ import { faker } from '@dxos/random';
|
|
|
18
18
|
|
|
19
19
|
import { type TestSchemaType } from './data';
|
|
20
20
|
import {
|
|
21
|
-
type MutationsProviderParams,
|
|
22
|
-
type TestGeneratorMap,
|
|
23
21
|
type TestMutationsMap,
|
|
22
|
+
type TestGeneratorMap,
|
|
24
23
|
type TestObjectProvider,
|
|
25
24
|
type TestSchemaMap,
|
|
25
|
+
type MutationsProviderParams,
|
|
26
26
|
} from './types';
|
|
27
27
|
import { range } from './util';
|
|
28
28
|
|