@xyo-network/archivist-indexeddb 2.86.0 → 2.86.1

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,21 +11,21 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/assert": "^2.13.23",
14
- "@xyo-network/archivist-abstract": "~2.86.0",
15
- "@xyo-network/archivist-model": "~2.86.0",
16
- "@xyo-network/hash": "~2.86.0",
17
- "@xyo-network/module-model": "~2.86.0",
18
- "@xyo-network/payload-model": "~2.86.0",
14
+ "@xyo-network/archivist-abstract": "~2.86.1",
15
+ "@xyo-network/archivist-model": "~2.86.1",
16
+ "@xyo-network/hash": "~2.86.1",
17
+ "@xyo-network/module-model": "~2.86.1",
18
+ "@xyo-network/payload-model": "~2.86.1",
19
19
  "idb-keyval": "^6.2.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@xylabs/delay": "^2.13.23",
23
23
  "@xylabs/promise": "^2.13.23",
24
- "@xylabs/ts-scripts-yarn3": "^3.2.25",
25
- "@xylabs/tsconfig": "^3.2.25",
26
- "@xyo-network/account": "~2.86.0",
27
- "@xyo-network/id-payload-plugin": "~2.86.0",
28
- "@xyo-network/payload-wrapper": "~2.86.0",
24
+ "@xylabs/ts-scripts-yarn3": "^3.2.28",
25
+ "@xylabs/tsconfig": "^3.2.28",
26
+ "@xyo-network/account": "~2.86.1",
27
+ "@xyo-network/id-payload-plugin": "~2.86.1",
28
+ "@xyo-network/payload-wrapper": "~2.86.1",
29
29
  "fake-indexeddb": "^5.0.2",
30
30
  "typescript": "^5.3.3"
31
31
  },
@@ -68,6 +68,6 @@
68
68
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
69
69
  },
70
70
  "sideEffects": false,
71
- "version": "2.86.0",
71
+ "version": "2.86.1",
72
72
  "type": "module"
73
73
  }
@@ -1,50 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
-
5
- import { delay } from '@xylabs/delay'
6
- import { Promisable } from '@xylabs/promise'
7
- import { ArchivistInstance } from '@xyo-network/archivist-model'
8
- import { IdSchema } from '@xyo-network/id-payload-plugin'
9
- import { Payload } from '@xyo-network/payload-model'
10
- import { PayloadWrapper } from '@xyo-network/payload-wrapper'
11
-
12
- export const testArchivistRoundTrip = (archivist: Promisable<ArchivistInstance>, name: string) => {
13
- test(`Archivist RoundTrip [${name}]`, async () => {
14
- const idPayload: Payload<{ salt: string }> = {
15
- salt: Date.now().toString(),
16
- schema: IdSchema,
17
- }
18
- const payloadWrapper = PayloadWrapper.wrap(idPayload)
19
-
20
- const archivistModule = await archivist
21
- const insertResult = await archivistModule.insert([idPayload])
22
- expect(insertResult).toBeDefined()
23
-
24
- const getResult = await archivistModule.get([await payloadWrapper.hashAsync()])
25
- expect(getResult).toBeDefined()
26
- expect(getResult.length).toBe(1)
27
- const gottenPayload = getResult[0]
28
- if (gottenPayload) {
29
- const gottenPayloadWrapper = PayloadWrapper.wrap(gottenPayload)
30
- expect(await gottenPayloadWrapper.hashAsync()).toBe(await payloadWrapper.hashAsync())
31
- }
32
- })
33
- }
34
-
35
- export const testArchivistAll = (archivist: Promisable<ArchivistInstance>, name: string) => {
36
- test(`Archivist All [${name}]`, async () => {
37
- const idPayload = {
38
- salt: Date.now().toString(),
39
- schema: IdSchema,
40
- }
41
- const archivistModule = await archivist
42
- for (let x = 0; x < 10; x++) {
43
- await archivistModule.insert([idPayload])
44
- await delay(10)
45
- }
46
- const getResult = await archivistModule.all?.()
47
- expect(getResult).toBeDefined()
48
- expect(getResult?.length).toBe(2)
49
- })
50
- }