@xyo-network/archivist-wrapper 5.1.21 → 5.1.23
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 +16 -13
- package/dist/neutral/spec/ArchivistWrapper.spec.d.ts +0 -2
- package/dist/neutral/spec/ArchivistWrapper.spec.d.ts.map +0 -1
- package/dist/neutral/spec/MemoryArchivist.spec.d.ts +0 -2
- package/dist/neutral/spec/MemoryArchivist.spec.d.ts.map +0 -1
- package/src/spec/ArchivistWrapper.spec.ts +0 -25
- package/src/spec/MemoryArchivist.spec.ts +0 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/archivist-wrapper",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.23",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,25 +30,28 @@
|
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
33
|
-
"src"
|
|
33
|
+
"src",
|
|
34
|
+
"!**/*.bench.*",
|
|
35
|
+
"!**/*.spec.*",
|
|
36
|
+
"!**/*.test.*"
|
|
34
37
|
],
|
|
35
38
|
"dependencies": {
|
|
36
|
-
"@xylabs/hex": "~5.0.
|
|
37
|
-
"@xyo-network/account-model": "~5.1.
|
|
38
|
-
"@xyo-network/archivist-model": "~5.1.
|
|
39
|
-
"@xyo-network/module-model": "~5.1.
|
|
40
|
-
"@xyo-network/module-wrapper": "~5.1.
|
|
41
|
-
"@xyo-network/payload-model": "~5.1.
|
|
39
|
+
"@xylabs/hex": "~5.0.33",
|
|
40
|
+
"@xyo-network/account-model": "~5.1.23",
|
|
41
|
+
"@xyo-network/archivist-model": "~5.1.23",
|
|
42
|
+
"@xyo-network/module-model": "~5.1.23",
|
|
43
|
+
"@xyo-network/module-wrapper": "~5.1.23",
|
|
44
|
+
"@xyo-network/payload-model": "~5.1.23"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
44
47
|
"@xylabs/ts-scripts-yarn3": "~7.2.8",
|
|
45
48
|
"@xylabs/tsconfig": "~7.2.8",
|
|
46
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
47
|
-
"@xyo-network/account": "~5.1.
|
|
48
|
-
"@xyo-network/archivist-memory": "~5.1.
|
|
49
|
-
"@xyo-network/payload-builder": "~5.1.
|
|
49
|
+
"@xylabs/vitest-extended": "~5.0.33",
|
|
50
|
+
"@xyo-network/account": "~5.1.23",
|
|
51
|
+
"@xyo-network/archivist-memory": "~5.1.23",
|
|
52
|
+
"@xyo-network/payload-builder": "~5.1.23",
|
|
50
53
|
"typescript": "~5.9.3",
|
|
51
|
-
"vitest": "~4.0.
|
|
54
|
+
"vitest": "~4.0.9"
|
|
52
55
|
},
|
|
53
56
|
"publishConfig": {
|
|
54
57
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArchivistWrapper.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/ArchivistWrapper.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryArchivist.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/MemoryArchivist.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import '@xylabs/vitest-extended'
|
|
2
|
-
|
|
3
|
-
import { Account } from '@xyo-network/account'
|
|
4
|
-
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
5
|
-
import { isArchivistInstance, isArchivistModule } from '@xyo-network/archivist-model'
|
|
6
|
-
import {
|
|
7
|
-
describe, expect, it,
|
|
8
|
-
} from 'vitest'
|
|
9
|
-
|
|
10
|
-
import { ArchivistWrapper } from '../ArchivistWrapper.ts'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @group module
|
|
14
|
-
* @group archivist
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
describe('ArchivistWrapper', () => {
|
|
18
|
-
it('check is type check', async () => {
|
|
19
|
-
const archivist = await MemoryArchivist.create({ account: 'random', config: { schema: MemoryArchivist.defaultConfigSchema } })
|
|
20
|
-
const wrapper = ArchivistWrapper.wrap(archivist, await Account.random())
|
|
21
|
-
expect(isArchivistInstance(wrapper)).toBeTruthy()
|
|
22
|
-
expect(isArchivistModule(wrapper)).toBeTruthy()
|
|
23
|
-
expect(ArchivistWrapper.is(wrapper)).toBe(true)
|
|
24
|
-
})
|
|
25
|
-
})
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Account } from '@xyo-network/account'
|
|
2
|
-
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
3
|
-
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
4
|
-
import {
|
|
5
|
-
describe, expect, it,
|
|
6
|
-
} from 'vitest'
|
|
7
|
-
|
|
8
|
-
import { ArchivistWrapper } from '../ArchivistWrapper.ts'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @group module
|
|
12
|
-
* @group archivist
|
|
13
|
-
*/
|
|
14
|
-
describe('MemoryArchivist (Wrapped)', () => {
|
|
15
|
-
it('should return same items inserted (wrapped)', async () => {
|
|
16
|
-
const archivist = ArchivistWrapper.wrap(
|
|
17
|
-
await MemoryArchivist.create({ account: 'random', config: { schema: MemoryArchivist.defaultConfigSchema } }),
|
|
18
|
-
await Account.random(),
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
const payloads = [{ schema: 'network.xyo.test' }]
|
|
22
|
-
const result = await archivist.insert(payloads)
|
|
23
|
-
|
|
24
|
-
expect(result[0]._hash).toEqual(await PayloadBuilder.hash(payloads[0]))
|
|
25
|
-
expect(result.length).toEqual(payloads.length)
|
|
26
|
-
expect(result[0].schema).toEqual(payloads[0].schema)
|
|
27
|
-
})
|
|
28
|
-
})
|