@dxos/protocols 0.1.58-main.88ec9da → 0.1.58-main.8fb8ffa
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/cjs/src/errors/encoding.d.ts.map +1 -1
- package/dist/cjs/src/errors/encoding.js.map +1 -1
- package/dist/cjs/src/errors/errors.js +2 -2
- package/dist/cjs/src/errors/errors.js.map +1 -1
- package/dist/cjs/src/errors/helpers.d.ts +1 -1
- package/dist/cjs/src/errors/helpers.d.ts.map +1 -1
- package/dist/cjs/src/errors/helpers.js.map +1 -1
- package/dist/cjs/src/index.d.ts +2 -2
- package/dist/cjs/src/index.d.ts.map +1 -1
- package/dist/cjs/src/index.js +2 -2
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/config.d.ts +5 -5
- package/dist/cjs/src/proto/gen/dxos/config.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/index.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/index.js +1 -1
- package/dist/cjs/src/proto/gen/index.js.map +1 -1
- package/dist/cjs/src/storage.d.ts +2 -3
- package/dist/cjs/src/storage.d.ts.map +1 -1
- package/dist/cjs/src/storage.js +2 -3
- package/dist/cjs/src/storage.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/errors/encoding.d.ts.map +1 -1
- package/dist/esm/src/errors/encoding.js.map +1 -1
- package/dist/esm/src/errors/errors.js +2 -2
- package/dist/esm/src/errors/errors.js.map +1 -1
- package/dist/esm/src/errors/helpers.d.ts +1 -1
- package/dist/esm/src/errors/helpers.d.ts.map +1 -1
- package/dist/esm/src/errors/helpers.js.map +1 -1
- package/dist/esm/src/index.d.ts +2 -2
- package/dist/esm/src/index.d.ts.map +1 -1
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/proto/gen/dxos/config.d.ts +5 -5
- package/dist/esm/src/proto/gen/dxos/config.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/index.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/index.js +1 -1
- package/dist/esm/src/proto/gen/index.js.map +1 -1
- package/dist/esm/src/storage.d.ts +2 -3
- package/dist/esm/src/storage.d.ts.map +1 -1
- package/dist/esm/src/storage.js +2 -3
- package/dist/esm/src/storage.js.map +1 -1
- package/package.json +5 -5
- package/src/errors/encoding.ts +1 -1
- package/src/errors/errors.ts +2 -2
- package/src/errors/helpers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/proto/dxos/config.proto +13 -9
- package/src/proto/gen/dxos/config.ts +5 -5
- package/src/proto/gen/index.ts +1 -1
- package/src/storage.ts +2 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAuDhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AA+e7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAuDhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AA+e7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,gn0FAAgn0F,CAAC,CAAC,CAAC;AACzq0F,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Version for the schema of the stored data as defined in dxos.echo.metadata.EchoMetadata.
|
|
3
|
-
*
|
|
4
|
-
* Should be incremented every time there's a breaking change to the stored data.
|
|
3
|
+
* update when making breaking changes to the protocols or other stored data.
|
|
5
4
|
*/
|
|
6
|
-
export declare const STORAGE_VERSION =
|
|
5
|
+
export declare const STORAGE_VERSION = 2;
|
|
7
6
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/storage.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/storage.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,eAAe,IAAI,CAAC"}
|
package/dist/esm/src/storage.js
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
/**
|
|
5
5
|
* Version for the schema of the stored data as defined in dxos.echo.metadata.EchoMetadata.
|
|
6
|
-
*
|
|
7
|
-
* Should be incremented every time there's a breaking change to the stored data.
|
|
6
|
+
* update when making breaking changes to the protocols or other stored data.
|
|
8
7
|
*/
|
|
9
|
-
export const STORAGE_VERSION =
|
|
8
|
+
export const STORAGE_VERSION = 2;
|
|
10
9
|
//# sourceMappingURL=storage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/storage.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/storage.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/protocols",
|
|
3
|
-
"version": "0.1.58-main.
|
|
3
|
+
"version": "0.1.58-main.8fb8ffa",
|
|
4
4
|
"description": "Protobuf definitions for DXOS protocols.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"src"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dxos/codec-protobuf": "0.1.58-main.
|
|
37
|
-
"@dxos/invariant": "0.1.58-main.
|
|
38
|
-
"@dxos/keys": "0.1.58-main.
|
|
39
|
-
"@dxos/timeframe": "0.1.58-main.
|
|
36
|
+
"@dxos/codec-protobuf": "0.1.58-main.8fb8ffa",
|
|
37
|
+
"@dxos/invariant": "0.1.58-main.8fb8ffa",
|
|
38
|
+
"@dxos/keys": "0.1.58-main.8fb8ffa",
|
|
39
|
+
"@dxos/timeframe": "0.1.58-main.8fb8ffa"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"glob": "~7.1.6"
|
package/src/errors/encoding.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Error as SerializedErrorProto } from '../proto/gen/dxos/error';
|
|
6
5
|
import { reconstructError } from './helpers';
|
|
6
|
+
import { Error as SerializedErrorProto } from '../proto/gen/dxos/error';
|
|
7
7
|
|
|
8
8
|
export const encodeError = (err: any): SerializedErrorProto => {
|
|
9
9
|
if (typeof err === 'object' && err?.message) {
|
package/src/errors/errors.ts
CHANGED
|
@@ -121,14 +121,14 @@ export class TimeoutError extends BaseError {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
// General protocol error
|
|
124
|
+
// General protocol error.
|
|
125
125
|
export class ProtocolError extends BaseError {
|
|
126
126
|
constructor(message?: string, context?: any) {
|
|
127
127
|
super('PROTOCOL_ERROR', message, context);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
// General connectivity errors
|
|
131
|
+
// General connectivity errors.
|
|
132
132
|
export class ConnectivityError extends BaseError {
|
|
133
133
|
constructor(message?: string, context?: any) {
|
|
134
134
|
super('CONNECTIVITY_ERROR', message, context);
|
package/src/errors/helpers.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { invariant } from '@dxos/invariant';
|
|
6
6
|
import { PublicKey } from '@dxos/keys';
|
|
7
7
|
|
|
8
|
-
import { Error as SerializedErrorProto } from '../proto/gen/dxos/error';
|
|
9
8
|
import {
|
|
10
9
|
CancelledError,
|
|
11
10
|
ConnectionResetError,
|
|
@@ -28,6 +27,7 @@ import {
|
|
|
28
27
|
UnknownModelError,
|
|
29
28
|
UnknownProtocolError,
|
|
30
29
|
} from './errors';
|
|
30
|
+
import { Error as SerializedErrorProto } from '../proto/gen/dxos/error';
|
|
31
31
|
|
|
32
32
|
export const reconstructError = (error: SerializedErrorProto) => {
|
|
33
33
|
const { name, message, context } = error;
|
package/src/index.ts
CHANGED
|
@@ -45,6 +45,9 @@ message Repo {
|
|
|
45
45
|
optional string version = 3;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
//
|
|
49
|
+
// Unit of deployment.
|
|
50
|
+
//
|
|
48
51
|
message Module {
|
|
49
52
|
message Build {
|
|
50
53
|
optional string command = 1;
|
|
@@ -55,22 +58,23 @@ message Module {
|
|
|
55
58
|
optional google.protobuf.Struct env = 10;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
optional string name = 1; // TODO(burdon): Replace with id (or key?)
|
|
59
61
|
optional string id = 8; // TODO(burdon): Ensured FQ (e.g., 'dxos.app.xxx')
|
|
60
|
-
optional string
|
|
62
|
+
optional string name = 1; // TODO(burdon): Replace with id (or key?)
|
|
63
|
+
optional string type = 2; // TODO(burdon): Define namespace (e.g., 'dxos.org/type/frame' vs. 'dxos.type.frame')
|
|
61
64
|
|
|
62
65
|
// TODO(burdon): Developer info message.
|
|
63
66
|
|
|
67
|
+
// TODO(burdon): Start at 10.
|
|
64
68
|
optional string display_name = 3;
|
|
65
69
|
optional string description = 4;
|
|
66
70
|
repeated string tags = 5;
|
|
67
|
-
optional bytes bundle = 6;
|
|
71
|
+
optional bytes bundle = 6; // TODO(burdon): ???
|
|
68
72
|
|
|
69
73
|
// TODO(burdon): Remove.
|
|
70
74
|
optional bool tunnel = 7;
|
|
71
75
|
|
|
76
|
+
// TODO(burdon): Start at 100.
|
|
72
77
|
repeated Module deps = 10; // TODO(burdon): E.g., types.
|
|
73
|
-
|
|
74
78
|
optional Build build = 100;
|
|
75
79
|
repeated Repo repos = 101;
|
|
76
80
|
|
|
@@ -90,15 +94,15 @@ message Runtime {
|
|
|
90
94
|
NODE = 4;
|
|
91
95
|
WEBFS = 5;
|
|
92
96
|
|
|
93
|
-
// Key storage only
|
|
97
|
+
// Key storage only.
|
|
94
98
|
LEVELJS = 11;
|
|
95
99
|
JSONDOWN = 12;
|
|
96
100
|
}
|
|
97
101
|
|
|
98
|
-
optional bool persistent = 1;
|
|
99
|
-
optional StorageDriver
|
|
100
|
-
optional StorageDriver
|
|
101
|
-
optional string
|
|
102
|
+
optional bool persistent = 1;
|
|
103
|
+
optional StorageDriver key_store = 2;
|
|
104
|
+
optional StorageDriver data_store = 3;
|
|
105
|
+
optional string data_root = 4;
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
message Log {
|
|
@@ -117,12 +117,12 @@ export interface Module {
|
|
|
117
117
|
* Options:
|
|
118
118
|
* - proto3_optional = true
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
id?: string;
|
|
121
121
|
/**
|
|
122
122
|
* Options:
|
|
123
123
|
* - proto3_optional = true
|
|
124
124
|
*/
|
|
125
|
-
|
|
125
|
+
name?: string;
|
|
126
126
|
/**
|
|
127
127
|
* Options:
|
|
128
128
|
* - proto3_optional = true
|
|
@@ -307,17 +307,17 @@ export namespace Runtime {
|
|
|
307
307
|
* Options:
|
|
308
308
|
* - proto3_optional = true
|
|
309
309
|
*/
|
|
310
|
-
|
|
310
|
+
keyStore?: Runtime.Client.Storage.StorageDriver;
|
|
311
311
|
/**
|
|
312
312
|
* Options:
|
|
313
313
|
* - proto3_optional = true
|
|
314
314
|
*/
|
|
315
|
-
|
|
315
|
+
dataStore?: Runtime.Client.Storage.StorageDriver;
|
|
316
316
|
/**
|
|
317
317
|
* Options:
|
|
318
318
|
* - proto3_optional = true
|
|
319
319
|
*/
|
|
320
|
-
|
|
320
|
+
dataRoot?: string;
|
|
321
321
|
}
|
|
322
322
|
export namespace Storage {
|
|
323
323
|
/**
|