@vex-chat/libvex 5.4.0 → 5.5.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.
Files changed (40) hide show
  1. package/README.md +25 -23
  2. package/dist/Client.d.ts +113 -77
  3. package/dist/Client.d.ts.map +1 -1
  4. package/dist/Client.js +311 -234
  5. package/dist/Client.js.map +1 -1
  6. package/dist/__tests__/harness/memory-storage.d.ts +1 -1
  7. package/dist/__tests__/harness/memory-storage.d.ts.map +1 -1
  8. package/dist/__tests__/harness/memory-storage.js +1 -1
  9. package/dist/__tests__/harness/memory-storage.js.map +1 -1
  10. package/dist/codecs.d.ts +118 -0
  11. package/dist/codecs.d.ts.map +1 -1
  12. package/dist/codecs.js +41 -0
  13. package/dist/codecs.js.map +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/storage/node/http-agents.d.ts +1 -1
  18. package/dist/storage/node/http-agents.d.ts.map +1 -1
  19. package/dist/storage/node/http-agents.js +4 -4
  20. package/dist/storage/node/http-agents.js.map +1 -1
  21. package/dist/storage/sqlite.d.ts +8 -8
  22. package/dist/storage/sqlite.d.ts.map +1 -1
  23. package/dist/storage/sqlite.js +16 -16
  24. package/dist/storage/sqlite.js.map +1 -1
  25. package/dist/utils/fipsMailExtra.d.ts +9 -9
  26. package/dist/utils/fipsMailExtra.d.ts.map +1 -1
  27. package/dist/utils/fipsMailExtra.js +47 -47
  28. package/dist/utils/fipsMailExtra.js.map +1 -1
  29. package/dist/utils/resolveAtRestAesKey.js +1 -1
  30. package/dist/utils/resolveAtRestAesKey.js.map +1 -1
  31. package/package.json +134 -152
  32. package/src/Client.ts +452 -306
  33. package/src/__tests__/harness/memory-storage.ts +1 -1
  34. package/src/__tests__/harness/shared-suite.ts +177 -177
  35. package/src/codecs.ts +52 -0
  36. package/src/index.ts +4 -0
  37. package/src/storage/node/http-agents.ts +7 -7
  38. package/src/storage/sqlite.ts +23 -23
  39. package/src/utils/fipsMailExtra.ts +80 -80
  40. package/src/utils/resolveAtRestAesKey.ts +1 -1
package/package.json CHANGED
@@ -1,161 +1,143 @@
1
1
  {
2
- "name": "@vex-chat/libvex",
3
- "version": "5.4.0",
4
- "description": "Library for communicating with xchat server.",
5
- "type": "module",
6
- "sideEffects": false,
7
- "main": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "default": "./dist/index.js"
14
- },
15
- "./preset/node": {
16
- "types": "./dist/preset/node.d.ts",
17
- "import": "./dist/preset/node.js",
18
- "default": "./dist/preset/node.js"
19
- },
20
- "./preset/test": {
21
- "types": "./dist/preset/test.d.ts",
22
- "import": "./dist/preset/test.js",
23
- "default": "./dist/preset/test.js"
24
- },
25
- "./storage/node": {
26
- "types": "./dist/storage/node.d.ts",
27
- "import": "./dist/storage/node.js",
28
- "default": "./dist/storage/node.js"
29
- },
30
- "./storage/sqlite": {
31
- "types": "./dist/storage/sqlite.d.ts",
32
- "import": "./dist/storage/sqlite.js",
33
- "default": "./dist/storage/sqlite.js"
34
- },
35
- "./storage/schema": {
36
- "types": "./dist/storage/schema.d.ts",
37
- "import": "./dist/storage/schema.js",
38
- "default": "./dist/storage/schema.js"
39
- },
40
- "./keystore/node": {
41
- "types": "./dist/keystore/node.d.ts",
42
- "import": "./dist/keystore/node.js",
43
- "default": "./dist/keystore/node.js"
44
- },
45
- "./keystore/memory": {
46
- "types": "./dist/keystore/memory.d.ts",
47
- "import": "./dist/keystore/memory.js",
48
- "default": "./dist/keystore/memory.js"
49
- }
2
+ "name": "@vex-chat/libvex",
3
+ "version": "5.5.1",
4
+ "description": "Library for communicating with xchat server.",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
50
14
  },
51
- "files": [
52
- "dist",
53
- "src",
54
- "LICENSE",
55
- "LICENSE-COMMERCIAL",
56
- "LICENSING.md",
57
- "CLA.md"
58
- ],
59
- "author": "Extra <extrahash@protonmail.com>",
60
- "license": "AGPL-3.0-or-later",
61
- "engines": {
62
- "node": ">=24.0.0",
63
- "npm": ">=10.0.0"
15
+ "./preset/node": {
16
+ "types": "./dist/preset/node.d.ts",
17
+ "import": "./dist/preset/node.js",
18
+ "default": "./dist/preset/node.js"
64
19
  },
65
- "packageManager": "npm@10.9.2",
66
- "scripts": {
67
- "preinstall": "npx only-allow npm",
68
- "build": "rimraf dist && tsc -p tsconfig.build.json",
69
- "format": "prettier --write .",
70
- "format:check": "prettier --check .",
71
- "copyright:check": "node scripts/copyright-headers.mjs --check",
72
- "copyright:apply": "node scripts/copyright-headers.mjs",
73
- "lint": "eslint src/",
74
- "lint:fix": "eslint src/ --fix",
75
- "lint:pkg": "publint --strict",
76
- "lint:pkgjson": "npx npm-package-json-lint .",
77
- "lint:types": "attw --pack . --ignore-rules cjs-resolves-to-esm no-resolution",
78
- "lint:api": "api-extractor run --local --verbose",
79
- "prepare": "husky",
80
- "prepack": "npm run build",
81
- "docs": "npx typedoc --options typedoc.json",
82
- "test": "vitest run --project unit --silent",
83
- "test:local-spire": "node scripts/test-local-spire.mjs",
84
- "probe:mail": "node scripts/probe-multi-device-mail.mjs",
85
- "test:e2e": "vitest run --project node --project browser --silent",
86
- "license:check": "npx @onebeyond/license-checker scan --allowOnly MIT ISC BSD-2-Clause BSD-3-Clause Apache-2.0 0BSD MPL-2.0 CC0-1.0 CC-BY-4.0 Unlicense BlueOak-1.0.0 Python-2.0 Zlib PSF-2.0 Artistic-2.0 AGPL-3.0-or-later WTFPL --ignoreRootPackageLicense --disableReport"
20
+ "./preset/test": {
21
+ "types": "./dist/preset/test.d.ts",
22
+ "import": "./dist/preset/test.js",
23
+ "default": "./dist/preset/test.js"
87
24
  },
88
- "devDependencies": {
89
- "@arethetypeswrong/cli": "0.18.2",
90
- "@changesets/cli": "2.30.0",
91
- "@microsoft/api-extractor": "7.58.2",
92
- "@types/better-sqlite3": "7.6.13",
93
- "@types/ed2curve": "0.2.4",
94
- "@types/node": "24.12.2",
95
- "@vitest/eslint-plugin": "1.6.15",
96
- "better-sqlite3": "11.10.0",
97
- "eslint": "10.2.0",
98
- "eslint-config-prettier": "10.1.8",
99
- "eslint-plugin-perfectionist": "5.8.0",
100
- "fast-check": "4.6.0",
101
- "husky": "9.1.7",
102
- "lint-staged": "16.4.0",
103
- "prettier": "3.8.2",
104
- "publint": "0.3.18",
105
- "rimraf": "6.1.3",
106
- "type-coverage": "2.29.7",
107
- "typedoc": "0.28.18",
108
- "typescript": "6.0.2",
109
- "typescript-eslint": "8.58.1",
110
- "vitest": "3.2.4"
25
+ "./storage/node": {
26
+ "types": "./dist/storage/node.d.ts",
27
+ "import": "./dist/storage/node.js",
28
+ "default": "./dist/storage/node.js"
111
29
  },
112
- "dependencies": {
113
- "@vex-chat/crypto": "2.1.2",
114
- "@vex-chat/types": "2.0.0",
115
- "axios": "1.15.0",
116
- "eventemitter3": "5.0.4",
117
- "kysely": "0.28.16",
118
- "msgpackr": "1.11.8",
119
- "uuid": "14.0.0",
120
- "zod": "4.3.6"
30
+ "./storage/sqlite": {
31
+ "types": "./dist/storage/sqlite.d.ts",
32
+ "import": "./dist/storage/sqlite.js",
33
+ "default": "./dist/storage/sqlite.js"
121
34
  },
122
- "overrides": {
123
- "postcss": "8.5.10"
35
+ "./storage/schema": {
36
+ "types": "./dist/storage/schema.d.ts",
37
+ "import": "./dist/storage/schema.js",
38
+ "default": "./dist/storage/schema.js"
124
39
  },
125
- "peerDependencies": {
126
- "better-sqlite3": ">=11.0.0"
40
+ "./keystore/node": {
41
+ "types": "./dist/keystore/node.d.ts",
42
+ "import": "./dist/keystore/node.js",
43
+ "default": "./dist/keystore/node.js"
127
44
  },
128
- "peerDependenciesMeta": {
129
- "better-sqlite3": {
130
- "optional": true
131
- }
132
- },
133
- "directories": {
134
- "doc": "docs"
135
- },
136
- "repository": {
137
- "type": "git",
138
- "url": "git+https://github.com/vex-protocol/libvex-js.git"
139
- },
140
- "bugs": {
141
- "url": "https://github.com/vex-protocol/libvex-js/issues"
142
- },
143
- "homepage": "https://github.com/vex-protocol/libvex-js#readme",
144
- "publishConfig": {
145
- "access": "public",
146
- "registry": "https://registry.npmjs.org/"
147
- },
148
- "lint-staged": {
149
- "src/**/*.ts": [
150
- "eslint --fix",
151
- "prettier --write"
152
- ],
153
- "*.{json,md}": [
154
- "prettier --write"
155
- ]
156
- },
157
- "typeCoverage": {
158
- "atLeast": 95,
159
- "ignoreCatch": true
45
+ "./keystore/memory": {
46
+ "types": "./dist/keystore/memory.d.ts",
47
+ "import": "./dist/keystore/memory.js",
48
+ "default": "./dist/keystore/memory.js"
49
+ }
50
+ },
51
+ "files": [
52
+ "dist",
53
+ "src",
54
+ "LICENSE",
55
+ "LICENSE-COMMERCIAL",
56
+ "LICENSING.md",
57
+ "CLA.md"
58
+ ],
59
+ "author": "Extra <extrahash@protonmail.com>",
60
+ "license": "AGPL-3.0-or-later",
61
+ "engines": {
62
+ "node": ">=24.0.0"
63
+ },
64
+ "devDependencies": {
65
+ "@arethetypeswrong/cli": "0.18.2",
66
+ "@changesets/cli": "2.30.0",
67
+ "@microsoft/api-extractor": "7.58.2",
68
+ "@types/better-sqlite3": "7.6.13",
69
+ "@types/ed2curve": "0.2.4",
70
+ "@types/node": "^25.6.0",
71
+ "@vitest/eslint-plugin": "1.6.15",
72
+ "better-sqlite3": "11.10.0",
73
+ "eslint": "10.2.0",
74
+ "eslint-config-prettier": "10.1.8",
75
+ "eslint-plugin-perfectionist": "5.8.0",
76
+ "fast-check": "4.6.0",
77
+ "husky": "9.1.7",
78
+ "lint-staged": "16.4.0",
79
+ "prettier": "3.8.2",
80
+ "publint": "0.3.18",
81
+ "rimraf": "6.1.3",
82
+ "type-coverage": "2.29.7",
83
+ "typedoc": "0.28.18",
84
+ "typescript": "6.0.2",
85
+ "typescript-eslint": "8.58.1",
86
+ "vitest": "4.1.4",
87
+ "@vex-chat/eslint-config": "0.0.1"
88
+ },
89
+ "dependencies": {
90
+ "axios": "1.15.0",
91
+ "eventemitter3": "5.0.4",
92
+ "kysely": "^0.28.16",
93
+ "msgpackr": "^1.11.9",
94
+ "uuid": "^14.0.0",
95
+ "zod": "^4.3.6",
96
+ "@vex-chat/crypto": "^2.1.2",
97
+ "@vex-chat/types": "^2.0.0"
98
+ },
99
+ "peerDependencies": {
100
+ "better-sqlite3": ">=11.0.0"
101
+ },
102
+ "peerDependenciesMeta": {
103
+ "better-sqlite3": {
104
+ "optional": true
160
105
  }
161
- }
106
+ },
107
+ "directories": {
108
+ "doc": "docs"
109
+ },
110
+ "repository": {
111
+ "type": "git",
112
+ "url": "git+https://github.com/vex-protocol/protocol.git",
113
+ "directory": "packages/libvex"
114
+ },
115
+ "bugs": {
116
+ "url": "https://github.com/vex-protocol/protocol/issues"
117
+ },
118
+ "homepage": "https://github.com/vex-protocol/protocol/tree/master/packages/libvex#readme",
119
+ "publishConfig": {
120
+ "access": "public",
121
+ "registry": "https://registry.npmjs.org/"
122
+ },
123
+ "typeCoverage": {
124
+ "atLeast": 95,
125
+ "ignoreCatch": true
126
+ },
127
+ "scripts": {
128
+ "build": "rimraf dist && tsc -p tsconfig.build.json",
129
+ "format": "prettier --write .",
130
+ "format:check": "prettier --check .",
131
+ "lint": "eslint src/",
132
+ "lint:fix": "eslint src/ --fix",
133
+ "lint:pkg": "publint --strict",
134
+ "lint:types": "attw --pack . --ignore-rules cjs-resolves-to-esm no-resolution",
135
+ "lint:api": "api-extractor run --local --verbose",
136
+ "docs": "npx typedoc --options typedoc.json",
137
+ "test": "vitest run --project unit --silent",
138
+ "test:local-spire": "node scripts/test-local-spire.mjs",
139
+ "probe:mail": "node scripts/probe-multi-device-mail.mjs",
140
+ "test:e2e": "vitest run --project node --project browser --silent",
141
+ "license:check": "license-checker scan --allowOnly MIT ISC BSD-2-Clause BSD-3-Clause Apache-2.0 0BSD MPL-2.0 CC0-1.0 CC-BY-4.0 Unlicense BlueOak-1.0.0 Python-2.0 Zlib PSF-2.0 Artistic-2.0 AGPL-3.0-or-later WTFPL --ignoreRootPackageLicense --disableReport"
142
+ }
143
+ }