@dxos/protocols 0.3.11-main.00a28cb → 0.3.11-main.0999ea0
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/errors.d.ts +3 -0
- package/dist/cjs/src/errors/errors.d.ts.map +1 -1
- package/dist/cjs/src/errors/errors.js +8 -1
- package/dist/cjs/src/errors/errors.js.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.d.ts +66 -0
- package/dist/cjs/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.js +14 -1
- package/dist/cjs/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/cjs/src/proto/gen/index.d.ts +2 -0
- 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/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/errors/errors.d.ts +3 -0
- package/dist/esm/src/errors/errors.d.ts.map +1 -1
- package/dist/esm/src/errors/errors.js +6 -0
- package/dist/esm/src/errors/errors.js.map +1 -1
- package/dist/esm/src/proto/gen/dxos/client/services.d.ts +66 -0
- package/dist/esm/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/esm/src/proto/gen/dxos/client/services.js +13 -0
- package/dist/esm/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/esm/src/proto/gen/index.d.ts +2 -0
- 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/package.json +5 -5
- package/src/errors/errors.ts +8 -0
- package/src/proto/dxos/client/services.proto +27 -0
- package/src/proto/gen/dxos/client/services.ts +65 -0
- package/src/proto/gen/index.ts +3 -1
|
@@ -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;AA6DhE,OAAO,aAAa,MAAM,kBAAkB,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;AA6DhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAohB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,oimGAAoimG,CAAC,CAAC,CAAC;AAC7lmG,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/protocols",
|
|
3
|
-
"version": "0.3.11-main.
|
|
3
|
+
"version": "0.3.11-main.0999ea0",
|
|
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.3.11-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
36
|
+
"@dxos/codec-protobuf": "0.3.11-main.0999ea0",
|
|
37
|
+
"@dxos/invariant": "0.3.11-main.0999ea0",
|
|
38
|
+
"@dxos/keys": "0.3.11-main.0999ea0",
|
|
39
|
+
"@dxos/timeframe": "0.3.11-main.0999ea0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"glob": "~7.1.6"
|
package/src/errors/errors.ts
CHANGED
|
@@ -100,6 +100,14 @@ export class InvalidInvitationError extends DatabaseError {
|
|
|
100
100
|
|
|
101
101
|
registerErrorMessageContext('INVALID_INVITATION', InvalidInvitationError);
|
|
102
102
|
|
|
103
|
+
export class AlreadyJoinedError extends DatabaseError {
|
|
104
|
+
constructor(message?: string, context?: Record<string, any>) {
|
|
105
|
+
super('ALREADY_JOINED', message, context);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
registerErrorMessageContext('ALREADY_JOINED', AlreadyJoinedError);
|
|
110
|
+
|
|
103
111
|
export class ConnectionResetError extends BaseError {
|
|
104
112
|
constructor(message?: string, context?: any) {
|
|
105
113
|
super('CONNECTION_RESET', message, context);
|
|
@@ -19,6 +19,7 @@ import "dxos/mesh/signal.proto";
|
|
|
19
19
|
import "dxos/mesh/teleport/gossip.proto";
|
|
20
20
|
import "dxos/mesh/presence.proto";
|
|
21
21
|
import "dxos/value.proto";
|
|
22
|
+
import "dxos/devtools/swarm.proto";
|
|
22
23
|
|
|
23
24
|
// TODO(burdon): Reorganize packages (e.g., client.services, echo.database).
|
|
24
25
|
|
|
@@ -63,6 +64,28 @@ message GetDiagnosticsResponse {
|
|
|
63
64
|
google.protobuf.Struct diagnostics = 2;
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
message Platform {
|
|
68
|
+
enum PLATFORM_TYPE {
|
|
69
|
+
BROWSER = 0;
|
|
70
|
+
SHARED_WORKER = 1;
|
|
71
|
+
NODE = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
PLATFORM_TYPE type = 1;
|
|
75
|
+
/// The User-Agent string from a browser
|
|
76
|
+
optional string user_agent = 2;
|
|
77
|
+
/// e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
|
|
78
|
+
optional string platform = 3;
|
|
79
|
+
/// the Node.JS arch string, e.g. 'arm64', 'x64'
|
|
80
|
+
optional string arch = 4;
|
|
81
|
+
/// the node.js version string
|
|
82
|
+
optional string runtime = 5;
|
|
83
|
+
// TODO(nf): uint64? :)
|
|
84
|
+
/// the number of seconds the client has been up
|
|
85
|
+
optional uint32 uptime = 6;
|
|
86
|
+
/// e.g. NodeJS.MemoryUsage, subject to change
|
|
87
|
+
optional google.protobuf.Struct memory = 7;
|
|
88
|
+
}
|
|
66
89
|
//
|
|
67
90
|
// System
|
|
68
91
|
//
|
|
@@ -82,6 +105,9 @@ service SystemService {
|
|
|
82
105
|
|
|
83
106
|
/// Reset the client.
|
|
84
107
|
rpc Reset(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
108
|
+
|
|
109
|
+
/// Get platform Information
|
|
110
|
+
rpc GetPlatform(google.protobuf.Empty) returns (Platform);
|
|
85
111
|
}
|
|
86
112
|
|
|
87
113
|
//
|
|
@@ -476,6 +502,7 @@ message NetworkStatus {
|
|
|
476
502
|
|
|
477
503
|
ConnectionState swarm = 1;
|
|
478
504
|
repeated Signal signaling = 2;
|
|
505
|
+
repeated dxos.devtools.swarm.SwarmInfo connection_info = 3;
|
|
479
506
|
}
|
|
480
507
|
|
|
481
508
|
message UpdateConfigRequest {
|
|
@@ -122,6 +122,66 @@ export interface GetDiagnosticsResponse {
|
|
|
122
122
|
timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
123
123
|
diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Defined in:
|
|
127
|
+
* {@link file://./../../../dxos/client/services.proto}
|
|
128
|
+
*/
|
|
129
|
+
export interface Platform {
|
|
130
|
+
type: Platform.PLATFORM_TYPE;
|
|
131
|
+
/**
|
|
132
|
+
* The User-Agent string from a browser
|
|
133
|
+
*
|
|
134
|
+
* Options:
|
|
135
|
+
* - proto3_optional = true
|
|
136
|
+
*/
|
|
137
|
+
userAgent?: string;
|
|
138
|
+
/**
|
|
139
|
+
* e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
|
|
140
|
+
*
|
|
141
|
+
* Options:
|
|
142
|
+
* - proto3_optional = true
|
|
143
|
+
*/
|
|
144
|
+
platform?: string;
|
|
145
|
+
/**
|
|
146
|
+
* the Node.JS arch string, e.g. 'arm64', 'x64'
|
|
147
|
+
*
|
|
148
|
+
* Options:
|
|
149
|
+
* - proto3_optional = true
|
|
150
|
+
*/
|
|
151
|
+
arch?: string;
|
|
152
|
+
/**
|
|
153
|
+
* the node.js version string
|
|
154
|
+
*
|
|
155
|
+
* Options:
|
|
156
|
+
* - proto3_optional = true
|
|
157
|
+
*/
|
|
158
|
+
runtime?: string;
|
|
159
|
+
/**
|
|
160
|
+
* the number of seconds the client has been up
|
|
161
|
+
*
|
|
162
|
+
* Options:
|
|
163
|
+
* - proto3_optional = true
|
|
164
|
+
*/
|
|
165
|
+
uptime?: number;
|
|
166
|
+
/**
|
|
167
|
+
* e.g. NodeJS.MemoryUsage, subject to change
|
|
168
|
+
*
|
|
169
|
+
* Options:
|
|
170
|
+
* - proto3_optional = true
|
|
171
|
+
*/
|
|
172
|
+
memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
173
|
+
}
|
|
174
|
+
export namespace Platform {
|
|
175
|
+
/**
|
|
176
|
+
* Defined in:
|
|
177
|
+
* {@link file://./../../../dxos/client/services.proto}
|
|
178
|
+
*/
|
|
179
|
+
export enum PLATFORM_TYPE {
|
|
180
|
+
BROWSER = 0,
|
|
181
|
+
SHARED_WORKER = 1,
|
|
182
|
+
NODE = 2
|
|
183
|
+
}
|
|
184
|
+
}
|
|
125
185
|
/**
|
|
126
186
|
* Defined in:
|
|
127
187
|
* {@link file://./../../../dxos/client/services.proto}
|
|
@@ -147,6 +207,10 @@ export interface SystemService {
|
|
|
147
207
|
* Reset the client.
|
|
148
208
|
*/
|
|
149
209
|
reset: (request: void, options?: RequestOptions) => Promise<void>;
|
|
210
|
+
/**
|
|
211
|
+
* Get platform Information
|
|
212
|
+
*/
|
|
213
|
+
getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
|
|
150
214
|
}
|
|
151
215
|
/**
|
|
152
216
|
* Defined in:
|
|
@@ -765,6 +829,7 @@ export enum ConnectionState {
|
|
|
765
829
|
export interface NetworkStatus {
|
|
766
830
|
swarm: ConnectionState;
|
|
767
831
|
signaling?: NetworkStatus.Signal[];
|
|
832
|
+
connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
|
|
768
833
|
}
|
|
769
834
|
export namespace NetworkStatus {
|
|
770
835
|
/**
|