@dxos/keys 0.8.4-main.72ec0f3 → 0.8.4-main.7ace549
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/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/space-id.d.ts +1 -1
- package/dist/types/src/space-id.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/dxn.ts +1 -1
- package/src/space-id.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/keys",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.7ace549",
|
|
4
4
|
"description": "Key utils and definitions.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"effect": "3.18.3",
|
|
29
29
|
"ulidx": "^2.3.0",
|
|
30
|
-
"@dxos/debug": "0.8.4-main.
|
|
31
|
-
"@dxos/invariant": "0.8.4-main.
|
|
32
|
-
"@dxos/node-std": "0.8.4-main.
|
|
30
|
+
"@dxos/debug": "0.8.4-main.7ace549",
|
|
31
|
+
"@dxos/invariant": "0.8.4-main.7ace549",
|
|
32
|
+
"@dxos/node-std": "0.8.4-main.7ace549"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"base32-decode": "^1.0.0",
|
package/src/dxn.ts
CHANGED
|
@@ -57,7 +57,7 @@ export class DXN {
|
|
|
57
57
|
static Schema = Schema.NonEmptyString.pipe(
|
|
58
58
|
Schema.pattern(/^dxn:([^:]+):(?:[^:]+:?)+[^:]$/),
|
|
59
59
|
// TODO(dmaretskyi): To set the format we need to move the annotation IDs out of the echo-schema package.
|
|
60
|
-
// FormatAnnotation.set(
|
|
60
|
+
// FormatAnnotation.set(TypeFormat.DXN),
|
|
61
61
|
Schema.annotations({
|
|
62
62
|
title: 'DXN',
|
|
63
63
|
description: 'DXN URI',
|
package/src/space-id.ts
CHANGED
|
@@ -17,7 +17,7 @@ const MULTIBASE_PREFIX = 'B';
|
|
|
17
17
|
|
|
18
18
|
const ENCODED_LENGTH = 33;
|
|
19
19
|
|
|
20
|
-
const isValid = (value:
|
|
20
|
+
const isValid = (value: unknown): value is SpaceId => {
|
|
21
21
|
return typeof value === 'string' && value.startsWith(MULTIBASE_PREFIX) && value.length === ENCODED_LENGTH;
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ export const SpaceId: Schema.Schema<SpaceId, string> & {
|
|
|
33
33
|
byteLength: number;
|
|
34
34
|
encode: (value: Uint8Array) => SpaceId;
|
|
35
35
|
decode: (value: SpaceId) => Uint8Array;
|
|
36
|
-
isValid: (value:
|
|
36
|
+
isValid: (value: unknown) => value is SpaceId;
|
|
37
37
|
make: (value: string) => SpaceId;
|
|
38
38
|
random: () => SpaceId;
|
|
39
39
|
} = class extends Schema.String.pipe(Schema.filter(isValid)) {
|