@xyo-network/archivist 2.64.7 → 2.64.8

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
@@ -11,18 +11,18 @@
11
11
  "dependencies": {
12
12
  "@xylabs/assert": "^2.9.3",
13
13
  "@xylabs/promise": "^2.9.3",
14
- "@xyo-network/abstract-archivist": "^2.64.7",
15
- "@xyo-network/account": "^2.64.7",
16
- "@xyo-network/account-model": "^2.64.7",
17
- "@xyo-network/archivist-model": "^2.64.7",
18
- "@xyo-network/archivist-wrapper": "^2.64.7",
19
- "@xyo-network/boundwitness-model": "^2.64.7",
20
- "@xyo-network/core": "^2.64.7",
21
- "@xyo-network/memory-archivist": "^2.64.7",
22
- "@xyo-network/module": "^2.64.7",
23
- "@xyo-network/payload-model": "^2.64.7",
24
- "@xyo-network/payload-wrapper": "^2.64.7",
25
- "@xyo-network/promise": "^2.64.7",
14
+ "@xyo-network/abstract-archivist": "^2.64.8",
15
+ "@xyo-network/account": "^2.64.8",
16
+ "@xyo-network/account-model": "^2.64.8",
17
+ "@xyo-network/archivist-model": "^2.64.8",
18
+ "@xyo-network/archivist-wrapper": "^2.64.8",
19
+ "@xyo-network/boundwitness-model": "^2.64.8",
20
+ "@xyo-network/core": "^2.64.8",
21
+ "@xyo-network/memory-archivist": "^2.64.8",
22
+ "@xyo-network/module": "^2.64.8",
23
+ "@xyo-network/payload-model": "^2.64.8",
24
+ "@xyo-network/payload-wrapper": "^2.64.8",
25
+ "@xyo-network/promise": "^2.64.8",
26
26
  "js-cookie": "^3.0.5",
27
27
  "lodash": "^4.17.21",
28
28
  "store2": "^2.14.2"
@@ -33,8 +33,8 @@
33
33
  "@xylabs/delay": "^2.9.3",
34
34
  "@xylabs/ts-scripts-yarn3": "^2.18.5",
35
35
  "@xylabs/tsconfig": "^2.18.5",
36
- "@xyo-network/boundwitness-wrapper": "^2.64.7",
37
- "@xyo-network/plugins": "^2.64.7",
36
+ "@xyo-network/boundwitness-wrapper": "^2.64.8",
37
+ "@xyo-network/plugins": "^2.64.8",
38
38
  "typescript": "^5.1.6"
39
39
  },
40
40
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -71,5 +71,5 @@
71
71
  },
72
72
  "sideEffects": false,
73
73
  "types": "dist/types/index.d.ts",
74
- "version": "2.64.7"
74
+ "version": "2.64.8"
75
75
  }
@@ -4,7 +4,6 @@
4
4
 
5
5
  import { delay } from '@xylabs/delay'
6
6
  import { ArchivistModule } from '@xyo-network/archivist-model'
7
- import { ArchivistWrapper } from '@xyo-network/archivist-wrapper'
8
7
  import { BoundWitnessWrapper } from '@xyo-network/boundwitness-wrapper'
9
8
  import { PayloadHasher } from '@xyo-network/core'
10
9
  import { Payload } from '@xyo-network/payload-model'
@@ -12,7 +11,7 @@ import { PayloadWrapper } from '@xyo-network/payload-wrapper'
12
11
  import { IdSchema } from '@xyo-network/plugins'
13
12
  import { Promisable } from '@xyo-network/promise'
14
13
 
15
- export const testArchivistRoundTrip = (archivist: Promisable<ArchivistModule>, name: string) => {
14
+ export const testArchivistRoundTrip = (archivistPromise: Promisable<ArchivistModule>, name: string) => {
16
15
  test(`Archivist RoundTrip [${name}]`, async () => {
17
16
  const idPayload: Payload<{ salt: string }> = {
18
17
  salt: Date.now().toString(),
@@ -20,14 +19,14 @@ export const testArchivistRoundTrip = (archivist: Promisable<ArchivistModule>, n
20
19
  }
21
20
  const payloadWrapper = PayloadWrapper.wrap(idPayload)
22
21
 
23
- const archivistWrapper = ArchivistWrapper.wrap(await archivist)
24
- const insertResult = await archivistWrapper.insert([idPayload])
22
+ const archivist = await archivistPromise
23
+ const insertResult = await archivist.insert([idPayload])
25
24
  const insertResultWrappers = insertResult.map((bw) => BoundWitnessWrapper.wrap(bw))
26
25
  const insertResultPayload = insertResultWrappers.pop() as BoundWitnessWrapper
27
26
  expect(insertResultPayload).toBeDefined()
28
27
 
29
28
  expect(PayloadHasher.find(insertResultPayload.payloadHashes, await payloadWrapper.hashAsync())).toBeDefined()
30
- const getResult = await archivistWrapper.get([await payloadWrapper.hashAsync()])
29
+ const getResult = await archivist.get([await payloadWrapper.hashAsync()])
31
30
  expect(getResult).toBeDefined()
32
31
  expect(getResult.length).toBe(1)
33
32
  const gottenPayload = getResult[0]
@@ -44,13 +43,13 @@ export const testArchivistAll = (archivist: Promisable<ArchivistModule>, name: s
44
43
  salt: Date.now().toString(),
45
44
  schema: IdSchema,
46
45
  }
47
- const archivistWrapper = ArchivistWrapper.wrap(await archivist)
46
+ const archivistModule = await archivist
48
47
  for (let x = 0; x < 10; x++) {
49
- await archivistWrapper.insert([idPayload])
48
+ await archivistModule.insert([idPayload])
50
49
  await delay(10)
51
50
  }
52
- const getResult = await archivistWrapper.all()
51
+ const getResult = await archivistModule.all?.()
53
52
  expect(getResult).toBeDefined()
54
- expect(getResult.length).toBe(2)
53
+ expect(getResult?.length).toBe(2)
55
54
  })
56
55
  }