@dxos/keys 0.8.4-main.548089c → 0.8.4-main.59c2e9b

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
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/keys",
3
- "version": "0.8.4-main.548089c",
3
+ "version": "0.8.4-main.59c2e9b",
4
4
  "description": "Key utils and definitions.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": false,
@@ -25,15 +29,18 @@
25
29
  "src"
26
30
  ],
27
31
  "dependencies": {
28
- "effect": "3.18.3",
29
32
  "ulidx": "^2.3.0",
30
- "@dxos/debug": "0.8.4-main.548089c",
31
- "@dxos/invariant": "0.8.4-main.548089c",
32
- "@dxos/node-std": "0.8.4-main.548089c"
33
+ "@dxos/debug": "0.8.4-main.59c2e9b",
34
+ "@dxos/node-std": "0.8.4-main.59c2e9b",
35
+ "@dxos/invariant": "0.8.4-main.59c2e9b"
33
36
  },
34
37
  "devDependencies": {
35
38
  "base32-decode": "^1.0.0",
36
- "base32-encode": "^2.0.0"
39
+ "base32-encode": "^2.0.0",
40
+ "effect": "3.19.11"
41
+ },
42
+ "peerDependencies": {
43
+ "effect": "3.19.11"
37
44
  },
38
45
  "publishConfig": {
39
46
  "access": "public"
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(FormatEnum.DXN),
60
+ // FormatAnnotation.set(TypeFormat.DXN),
61
61
  Schema.annotations({
62
62
  title: 'DXN',
63
63
  description: 'DXN URI',
@@ -300,7 +300,7 @@ export class DXN {
300
300
  }
301
301
 
302
302
  return {
303
- subspaceTag,
303
+ subspaceTag: subspaceTag as QueueSubspaceTag,
304
304
  spaceId: spaceId as SpaceId,
305
305
  queueId,
306
306
  objectId: objectId as string | undefined,
@@ -338,7 +338,7 @@ export declare namespace DXN {
338
338
  };
339
339
 
340
340
  export type QueueDXN = {
341
- subspaceTag: string;
341
+ subspaceTag: QueueSubspaceTag;
342
342
  spaceId: SpaceId;
343
343
  queueId: string; // TODO(dmaretskyi): ObjectId.
344
344
  objectId?: string; // TODO(dmaretskyi): ObjectId.
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: string): value is SpaceId => {
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: string) => value is SpaceId;
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)) {