@diory/client-js 0.1.1 → 0.1.2

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.
@@ -10,7 +10,7 @@ declare class DioryClient implements IDioryClient {
10
10
  diory?: IDiory;
11
11
  constructor(dataClients: IDataClient[]);
12
12
  initialise: (connections: IConnectionObject[]) => Promise<void>;
13
- enterRoom: (roomObject: IRoomObject) => Promise<IRoom>;
13
+ enterRoom: (roomObject: IRoomObject) => Promise<void>;
14
14
  focusDiory: (dioryObject: IDioryObject) => IDiory;
15
15
  getDiosphere: () => Promise<void>;
16
16
  saveDiosphere: () => Promise<void>;
@@ -21,12 +21,14 @@ class DioryClient {
21
21
  this.connections = [];
22
22
  this.initialise = async (connections) => {
23
23
  this.connections = connections;
24
+ this.diosphere.resetRooms();
24
25
  await this.getDiosphere();
25
26
  await this.enterRoom({ id: '/' });
26
27
  return;
27
28
  };
28
29
  this.enterRoom = async (roomObject) => {
29
30
  this.room = this.diosphere.getRoom(roomObject);
31
+ this.diograph.resetDiories();
30
32
  await this.getDiograph();
31
33
  this.focusDiory({ id: '/' });
32
34
  return this.room;
package/dist/types.d.ts CHANGED
@@ -31,10 +31,10 @@ export interface IDioryClient {
31
31
  diograph: IDiograph;
32
32
  diory?: IDiory;
33
33
  initialise: (connections: IConnectionObject[]) => Promise<void>;
34
+ enterRoom: (roomObject: IRoomObject) => Promise<void>;
35
+ focusDiory: (dioryObject: IDioryObject) => IDiory;
34
36
  getDiosphere: () => void;
35
37
  saveDiosphere: () => void;
36
- enterRoom: (roomObject: IRoomObject) => Promise<IRoom>;
37
38
  getDiograph: () => void;
38
39
  saveDiograph: () => void;
39
- focusDiory: (dioryObject: IDioryObject) => IDiory;
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diory/client-js",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Olli-Pekka Pohjola <op@diory.me>, Jouni Alanen <jouni@diory.me>",
@@ -44,15 +44,17 @@ class DioryClient implements IDioryClient {
44
44
  initialise = async (connections: IConnectionObject[]): Promise<void> => {
45
45
  this.connections = connections
46
46
 
47
+ this.diosphere.resetRooms()
47
48
  await this.getDiosphere()
48
49
  await this.enterRoom({ id: '/' })
49
50
 
50
51
  return
51
52
  }
52
53
 
53
- enterRoom = async (roomObject: IRoomObject): Promise<IRoom> => {
54
+ enterRoom = async (roomObject: IRoomObject): Promise<void> => {
54
55
  this.room = this.diosphere.getRoom(roomObject)
55
56
 
57
+ this.diograph.resetDiories()
56
58
  await this.getDiograph()
57
59
  this.focusDiory({ id: '/' })
58
60
 
package/src/types.ts CHANGED
@@ -39,10 +39,10 @@ export interface IDioryClient {
39
39
  diograph: IDiograph
40
40
  diory?: IDiory
41
41
  initialise: (connections: IConnectionObject[]) => Promise<void>
42
+ enterRoom: (roomObject: IRoomObject) => Promise<void>
43
+ focusDiory: (dioryObject: IDioryObject) => IDiory
42
44
  getDiosphere: () => void
43
45
  saveDiosphere: () => void
44
- enterRoom: (roomObject: IRoomObject) => Promise<IRoom>
45
46
  getDiograph: () => void
46
47
  saveDiograph: () => void
47
- focusDiory: (dioryObject: IDioryObject) => IDiory
48
48
  }