eventsourcingdb 1.8.3 → 1.8.5
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/dist/Container.js +0 -4
- package/dist/types/hasShapeOf.js +6 -6
- package/package.json +5 -5
package/dist/Container.js
CHANGED
|
@@ -84,10 +84,6 @@ class Container {
|
|
|
84
84
|
if (this.#signingKey === undefined) {
|
|
85
85
|
throw new Error('Signing key not set.');
|
|
86
86
|
}
|
|
87
|
-
// @types/node >= 26.0.0 dropped the KeyObject overload from createPublicKey,
|
|
88
|
-
// even though Node accepts a (private) KeyObject at runtime to derive the public
|
|
89
|
-
// key. Remove this suppression once DefinitelyTyped restores the overload.
|
|
90
|
-
// @ts-expect-error
|
|
91
87
|
const verificationKey = crypto.createPublicKey(this.#signingKey);
|
|
92
88
|
return verificationKey;
|
|
93
89
|
}
|
package/dist/types/hasShapeOf.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { isRecord } from './isRecord.js';
|
|
2
|
+
const isGuard = (value) => typeof value === 'function';
|
|
3
|
+
const isShape = (value) => isRecord(value);
|
|
2
4
|
const hasShapeOf = (value, shape) => {
|
|
3
5
|
if (!isRecord(value)) {
|
|
4
6
|
return false;
|
|
5
7
|
}
|
|
6
|
-
for (const key of Object.
|
|
7
|
-
const spec = shape[key];
|
|
8
|
+
for (const [key, spec] of Object.entries(shape)) {
|
|
8
9
|
const val = value[key];
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
if (!guard(val)) {
|
|
10
|
+
if (isGuard(spec)) {
|
|
11
|
+
if (!spec(val)) {
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
continue;
|
|
15
15
|
}
|
|
16
|
-
if (!isRecord(val)) {
|
|
16
|
+
if (!(isRecord(val) && isShape(spec))) {
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
19
|
if (!hasShapeOf(val, spec)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eventsourcingdb",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
4
4
|
"description": "The official JavaScript client SDK for EventSourcingDB.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "the native web GmbH",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"testcontainers": "12.0
|
|
21
|
+
"testcontainers": "12.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@biomejs/biome": "2.5.
|
|
25
|
-
"@types/node": "26.
|
|
24
|
+
"@biomejs/biome": "2.5.11",
|
|
25
|
+
"@types/node": "26.4.0",
|
|
26
26
|
"get-port": "7.2.0",
|
|
27
|
-
"tsx": "4.23.
|
|
27
|
+
"tsx": "4.23.12",
|
|
28
28
|
"typescript": "7.0.2"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|