@dxos/echo-generator 0.8.4-main.a4bbb77 → 0.8.4-main.ae835ea

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/echo-generator",
3
- "version": "0.8.4-main.a4bbb77",
3
+ "version": "0.8.4-main.ae835ea",
4
4
  "description": "ECHO data generator for testing.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -27,21 +27,21 @@
27
27
  "dependencies": {
28
28
  "@automerge/automerge": "3.1.2",
29
29
  "effect": "3.18.3",
30
- "@dxos/client": "0.8.4-main.a4bbb77",
31
- "@dxos/echo-schema": "0.8.4-main.a4bbb77",
32
- "@dxos/echo-db": "0.8.4-main.a4bbb77",
33
- "@dxos/invariant": "0.8.4-main.a4bbb77",
34
- "@dxos/log": "0.8.4-main.a4bbb77",
35
- "@dxos/live-object": "0.8.4-main.a4bbb77",
36
- "@dxos/util": "0.8.4-main.a4bbb77",
37
- "@dxos/node-std": "0.8.4-main.a4bbb77"
30
+ "@dxos/client": "0.8.4-main.ae835ea",
31
+ "@dxos/echo": "0.8.4-main.ae835ea",
32
+ "@dxos/echo-db": "0.8.4-main.ae835ea",
33
+ "@dxos/invariant": "0.8.4-main.ae835ea",
34
+ "@dxos/live-object": "0.8.4-main.ae835ea",
35
+ "@dxos/log": "0.8.4-main.ae835ea",
36
+ "@dxos/node-std": "0.8.4-main.ae835ea",
37
+ "@dxos/util": "0.8.4-main.ae835ea"
38
38
  },
39
39
  "devDependencies": {
40
- "@dxos/random": "0.8.4-main.a4bbb77"
40
+ "@dxos/random": "0.8.4-main.ae835ea"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "effect": "^3.13.3",
44
- "@dxos/random": "0.8.4-main.a4bbb77"
44
+ "@dxos/random": "0.8.4-main.ae835ea"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
package/src/data.ts CHANGED
@@ -3,10 +3,10 @@
3
3
  //
4
4
 
5
5
  import { next as A } from '@automerge/automerge';
6
- import { Schema } from 'effect';
6
+ import * as Schema from 'effect/Schema';
7
7
 
8
8
  import { type Space, createDocAccessor } from '@dxos/client/echo';
9
- import { EchoObject, Ref } from '@dxos/echo-schema';
9
+ import { EchoObject, Ref } from '@dxos/echo/internal';
10
10
  import { faker } from '@dxos/random';
11
11
 
12
12
  import { SpaceObjectGenerator, TestObjectGenerator } from './generator';
@@ -3,12 +3,12 @@
3
3
  //
4
4
 
5
5
  import { next as A } from '@automerge/automerge';
6
- import { Schema } from 'effect';
6
+ import * as Schema from 'effect/Schema';
7
7
  import { describe, expect, onTestFinished, test } from 'vitest';
8
8
 
9
9
  import { Client } from '@dxos/client';
10
+ import { TypedObject, getType } from '@dxos/echo/internal';
10
11
  import { getObjectCore } from '@dxos/echo-db';
11
- import { TypedObject, getType } from '@dxos/echo-schema';
12
12
  import { faker } from '@dxos/random';
13
13
 
14
14
  import { TestSchemaType, createSpaceObjectGenerator, createTestObjectGenerator } from './data';
package/src/generator.ts CHANGED
@@ -2,11 +2,12 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Schema } from 'effect';
5
+ import type * as Schema from 'effect/Schema';
6
6
 
7
7
  import { Filter, type Space } from '@dxos/client/echo';
8
+ import { Obj } from '@dxos/echo';
9
+ import { EchoSchema, getSchema, getTypeAnnotation } from '@dxos/echo/internal';
8
10
  import { type AnyLiveObject } from '@dxos/echo-db';
9
- import { EchoSchema, getSchema, getTypeAnnotation } from '@dxos/echo-schema';
10
11
  import { invariant } from '@dxos/invariant';
11
12
  import { type Live, isLiveObject, live } from '@dxos/live-object';
12
13
  import { faker } from '@dxos/random';
@@ -53,7 +54,7 @@ export class TestObjectGenerator<T extends string = TestSchemaType> {
53
54
  }
54
55
 
55
56
  const schema = this.getSchema(type);
56
- return schema ? live(schema, data) : live(data);
57
+ return schema ? Obj.make(schema, data) : live(data);
57
58
  }
58
59
 
59
60
  // TODO(burdon): Based on dependencies (e.g., organization before contact).
package/src/types.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Schema } from 'effect';
5
+ import type * as Schema from 'effect/Schema';
6
6
 
7
+ import { type EchoSchema } from '@dxos/echo/internal';
7
8
  import { type AnyLiveObject } from '@dxos/echo-db';
8
- import { type EchoSchema } from '@dxos/echo-schema';
9
9
  import { type Live } from '@dxos/live-object';
10
10
 
11
11
  // TODO(burdon): Use echo-schema types.