@dxos/client-protocol 0.8.3-staging.0fa589b → 0.8.4-main.84f28bd
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 +8 -8
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +8 -8
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/space.d.ts +1 -6
- package/dist/types/src/space.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/space.ts +1 -8
- package/dist/lib/node/index.cjs +0 -289
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-protocol",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.84f28bd",
|
|
4
4
|
"description": "Core DXOS Client API.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"base-x": "~3.0.9",
|
|
29
|
-
"effect": "3.
|
|
30
|
-
"@dxos/async": "0.8.
|
|
31
|
-
"@dxos/config": "0.8.
|
|
32
|
-
"@dxos/context": "0.8.
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/echo
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/echo-schema": "0.8.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/rpc": "0.8.
|
|
29
|
+
"effect": "3.16.13",
|
|
30
|
+
"@dxos/async": "0.8.4-main.84f28bd",
|
|
31
|
+
"@dxos/config": "0.8.4-main.84f28bd",
|
|
32
|
+
"@dxos/context": "0.8.4-main.84f28bd",
|
|
33
|
+
"@dxos/credentials": "0.8.4-main.84f28bd",
|
|
34
|
+
"@dxos/echo": "0.8.4-main.84f28bd",
|
|
35
|
+
"@dxos/echo-db": "0.8.4-main.84f28bd",
|
|
36
|
+
"@dxos/echo-schema": "0.8.4-main.84f28bd",
|
|
37
|
+
"@dxos/invariant": "0.8.4-main.84f28bd",
|
|
38
|
+
"@dxos/keys": "0.8.4-main.84f28bd",
|
|
39
|
+
"@dxos/node-std": "0.8.4-main.84f28bd",
|
|
40
|
+
"@dxos/protocols": "0.8.4-main.84f28bd",
|
|
41
|
+
"@dxos/rpc": "0.8.4-main.84f28bd"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"effect": "^3.13.3"
|
package/src/space.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type MulticastObservable, type CleanupFn } from '@dxos/async';
|
|
6
6
|
import { type SpecificCredential } from '@dxos/credentials';
|
|
7
|
-
import { type QueueFactory, type
|
|
7
|
+
import { type QueueFactory, type EchoDatabase, type AnyLiveObject } from '@dxos/echo-db';
|
|
8
8
|
import { type PublicKey, type SpaceId } from '@dxos/keys';
|
|
9
9
|
import {
|
|
10
10
|
type Contact,
|
|
@@ -72,13 +72,6 @@ export interface Space {
|
|
|
72
72
|
*/
|
|
73
73
|
get queues(): QueueFactory;
|
|
74
74
|
|
|
75
|
-
/**
|
|
76
|
-
* Echo database CRUD API.
|
|
77
|
-
* @deprecated Use the database api with the `plain` format.
|
|
78
|
-
*/
|
|
79
|
-
// TODO(burdon): Remove.
|
|
80
|
-
get crud(): CoreDatabase;
|
|
81
|
-
|
|
82
75
|
get isOpen(): boolean;
|
|
83
76
|
|
|
84
77
|
/**
|
package/dist/lib/node/index.cjs
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var node_exports = {};
|
|
30
|
-
__export(node_exports, {
|
|
31
|
-
AUTHENTICATION_CODE_LENGTH: () => AUTHENTICATION_CODE_LENGTH,
|
|
32
|
-
AUTH_TIMEOUT: () => AUTH_TIMEOUT,
|
|
33
|
-
AuthenticatingInvitation: () => AuthenticatingInvitation,
|
|
34
|
-
CREATE_SPACE_TIMEOUT: () => CREATE_SPACE_TIMEOUT,
|
|
35
|
-
CancellableInvitation: () => CancellableInvitation,
|
|
36
|
-
ClientServicesProviderResource: () => ClientServicesProviderResource,
|
|
37
|
-
DEFAULT_CLIENT_CHANNEL: () => DEFAULT_CLIENT_CHANNEL,
|
|
38
|
-
DEFAULT_INTERNAL_CHANNEL: () => DEFAULT_INTERNAL_CHANNEL,
|
|
39
|
-
DEFAULT_SHELL_CHANNEL: () => DEFAULT_SHELL_CHANNEL,
|
|
40
|
-
DEFAULT_VAULT_URL: () => DEFAULT_VAULT_URL,
|
|
41
|
-
DEFAULT_WORKER_BROADCAST_CHANNEL: () => DEFAULT_WORKER_BROADCAST_CHANNEL,
|
|
42
|
-
DX_CACHE: () => DX_CACHE,
|
|
43
|
-
DX_CONFIG: () => DX_CONFIG,
|
|
44
|
-
DX_DATA: () => DX_DATA,
|
|
45
|
-
DX_RUNTIME: () => DX_RUNTIME,
|
|
46
|
-
DX_STATE: () => DX_STATE,
|
|
47
|
-
ENV_DX_CONFIG: () => ENV_DX_CONFIG,
|
|
48
|
-
ENV_DX_NO_AGENT: () => ENV_DX_NO_AGENT,
|
|
49
|
-
ENV_DX_PROFILE: () => ENV_DX_PROFILE,
|
|
50
|
-
ENV_DX_PROFILE_DEFAULT: () => ENV_DX_PROFILE_DEFAULT,
|
|
51
|
-
EXPECTED_CONFIG_VERSION: () => EXPECTED_CONFIG_VERSION,
|
|
52
|
-
INVITATION_TIMEOUT: () => INVITATION_TIMEOUT,
|
|
53
|
-
InvitationEncoder: () => InvitationEncoder,
|
|
54
|
-
LOAD_CONTROL_FEEDS_TIMEOUT: () => LOAD_CONTROL_FEEDS_TIMEOUT,
|
|
55
|
-
LOAD_PROPERTIES_TIMEOUT: () => LOAD_PROPERTIES_TIMEOUT,
|
|
56
|
-
PROXY_CONNECTION_TIMEOUT: () => PROXY_CONNECTION_TIMEOUT,
|
|
57
|
-
PropertiesType: () => PropertiesType,
|
|
58
|
-
RESOURCE_LOCK_TIMEOUT: () => RESOURCE_LOCK_TIMEOUT,
|
|
59
|
-
STATUS_TIMEOUT: () => STATUS_TIMEOUT,
|
|
60
|
-
TYPE_PROPERTIES: () => TYPE_PROPERTIES,
|
|
61
|
-
appServiceBundle: () => appServiceBundle,
|
|
62
|
-
clientServiceBundle: () => clientServiceBundle,
|
|
63
|
-
defaultConfig: () => defaultConfig,
|
|
64
|
-
getExpirationTime: () => getExpirationTime,
|
|
65
|
-
getProfilePath: () => getProfilePath,
|
|
66
|
-
iframeServiceBundle: () => iframeServiceBundle,
|
|
67
|
-
shellServiceBundle: () => shellServiceBundle,
|
|
68
|
-
workerServiceBundle: () => workerServiceBundle,
|
|
69
|
-
wrapObservable: () => wrapObservable
|
|
70
|
-
});
|
|
71
|
-
module.exports = __toCommonJS(node_exports);
|
|
72
|
-
var import_base_x = __toESM(require("base-x"));
|
|
73
|
-
var import_proto = require("@dxos/protocols/proto");
|
|
74
|
-
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
75
|
-
var import_async = require("@dxos/async");
|
|
76
|
-
var import_invariant = require("@dxos/invariant");
|
|
77
|
-
var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
|
|
78
|
-
var import_proto2 = require("@dxos/protocols/proto");
|
|
79
|
-
var import_rpc = require("@dxos/rpc");
|
|
80
|
-
var import_effect = require("effect");
|
|
81
|
-
var import_echo = require("@dxos/echo");
|
|
82
|
-
var import_echo_schema = require("@dxos/echo-schema");
|
|
83
|
-
var ClientServicesProviderResource = Symbol.for("dxos.resource.ClientServices");
|
|
84
|
-
var DEFAULT_INTERNAL_CHANNEL = "dxos:vault";
|
|
85
|
-
var DEFAULT_CLIENT_CHANNEL = "dxos:app";
|
|
86
|
-
var DEFAULT_SHELL_CHANNEL = "dxos:shell";
|
|
87
|
-
var DEFAULT_WORKER_BROADCAST_CHANNEL = "dxos:shared-worker";
|
|
88
|
-
var DEFAULT_VAULT_URL = "https://halo.dxos.org/vault.html";
|
|
89
|
-
var EXPECTED_CONFIG_VERSION = 1;
|
|
90
|
-
var defaultConfig = {
|
|
91
|
-
version: 1
|
|
92
|
-
};
|
|
93
|
-
var HOME = typeof process !== "undefined" ? process?.env?.HOME ?? "" : "";
|
|
94
|
-
var getProfilePath = (root, profile, file = void 0) => `${root}/profile/${profile}` + (file ? `/${file}` : "");
|
|
95
|
-
var DX_CONFIG = `${HOME}/.config/dx`;
|
|
96
|
-
var DX_CACHE = `${HOME}/.cache/dx`;
|
|
97
|
-
var DX_DATA = `${HOME}/.local/share/dx`;
|
|
98
|
-
var DX_STATE = `${HOME}/.local/state/dx`;
|
|
99
|
-
var DX_RUNTIME = "/tmp/dx/run";
|
|
100
|
-
var ENV_DX_CONFIG = "DX_CONFIG";
|
|
101
|
-
var ENV_DX_NO_AGENT = "DX_NO_AGENT";
|
|
102
|
-
var ENV_DX_PROFILE = "DX_PROFILE";
|
|
103
|
-
var ENV_DX_PROFILE_DEFAULT = "default";
|
|
104
|
-
var base62 = (0, import_base_x.default)("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
|
105
|
-
var codec = import_proto.schema.getCodecForType("dxos.client.services.Invitation");
|
|
106
|
-
var InvitationEncoder = class {
|
|
107
|
-
static decode(text) {
|
|
108
|
-
const decodedInvitation = codec.decode(base62.decode(text));
|
|
109
|
-
if (decodedInvitation.type === import_services.Invitation.Type.MULTIUSE) {
|
|
110
|
-
decodedInvitation.type = import_services.Invitation.Type.INTERACTIVE;
|
|
111
|
-
decodedInvitation.multiUse = true;
|
|
112
|
-
}
|
|
113
|
-
return decodedInvitation;
|
|
114
|
-
}
|
|
115
|
-
static encode(invitation) {
|
|
116
|
-
return base62.encode(codec.encode({
|
|
117
|
-
invitationId: invitation.invitationId,
|
|
118
|
-
type: invitation.type,
|
|
119
|
-
kind: invitation.kind,
|
|
120
|
-
authMethod: invitation.authMethod,
|
|
121
|
-
swarmKey: invitation.swarmKey,
|
|
122
|
-
state: invitation.state,
|
|
123
|
-
timeout: invitation.timeout,
|
|
124
|
-
guestKeypair: invitation.guestKeypair,
|
|
125
|
-
spaceId: invitation.spaceId,
|
|
126
|
-
lifetime: invitation.lifetime,
|
|
127
|
-
created: invitation.created,
|
|
128
|
-
// TODO(wittjosiah): Make these optional to encode for greater privacy.
|
|
129
|
-
...invitation.spaceKey ? {
|
|
130
|
-
spaceKey: invitation.spaceKey
|
|
131
|
-
} : {},
|
|
132
|
-
...invitation.target ? {
|
|
133
|
-
target: invitation.target
|
|
134
|
-
} : {}
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-protocol/src/invitations/invitations.ts";
|
|
139
|
-
var AUTHENTICATION_CODE_LENGTH = 6;
|
|
140
|
-
var INVITATION_TIMEOUT = 3 * 6e4;
|
|
141
|
-
var CancellableInvitation = class extends import_async.MulticastObservable {
|
|
142
|
-
constructor({ subscriber, initialInvitation, onCancel }) {
|
|
143
|
-
super(subscriber, initialInvitation);
|
|
144
|
-
this._onCancel = onCancel;
|
|
145
|
-
}
|
|
146
|
-
cancel() {
|
|
147
|
-
return this._onCancel();
|
|
148
|
-
}
|
|
149
|
-
get expired() {
|
|
150
|
-
const expiration = getExpirationTime(this.get());
|
|
151
|
-
return expiration && expiration.getTime() < Date.now();
|
|
152
|
-
}
|
|
153
|
-
get expiry() {
|
|
154
|
-
return getExpirationTime(this.get());
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
var AuthenticatingInvitation = class extends CancellableInvitation {
|
|
158
|
-
constructor({ subscriber, initialInvitation, onCancel, onAuthenticate }) {
|
|
159
|
-
super({
|
|
160
|
-
subscriber,
|
|
161
|
-
initialInvitation,
|
|
162
|
-
onCancel
|
|
163
|
-
});
|
|
164
|
-
this._onAuthenticate = onAuthenticate;
|
|
165
|
-
}
|
|
166
|
-
async authenticate(authCode) {
|
|
167
|
-
return this._onAuthenticate(authCode);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
var wrapObservable = async (observable) => {
|
|
171
|
-
return new Promise((resolve, reject) => {
|
|
172
|
-
const subscription = observable.subscribe((invitation) => {
|
|
173
|
-
(0, import_invariant.invariant)(invitation?.state === import_services2.Invitation.State.SUCCESS, void 0, {
|
|
174
|
-
F: __dxlog_file,
|
|
175
|
-
L: 90,
|
|
176
|
-
S: void 0,
|
|
177
|
-
A: [
|
|
178
|
-
"invitation?.state === Invitation.State.SUCCESS",
|
|
179
|
-
""
|
|
180
|
-
]
|
|
181
|
-
});
|
|
182
|
-
subscription.unsubscribe();
|
|
183
|
-
resolve(invitation);
|
|
184
|
-
}, (err) => {
|
|
185
|
-
subscription.unsubscribe();
|
|
186
|
-
reject(err);
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
var getExpirationTime = (invitation) => {
|
|
191
|
-
if (!(invitation.created && invitation.lifetime)) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
return new Date(invitation.created.getTime() + invitation.lifetime * 1e3);
|
|
195
|
-
};
|
|
196
|
-
var clientServiceBundle = (0, import_rpc.createServiceBundle)({
|
|
197
|
-
SystemService: import_proto2.schema.getService("dxos.client.services.SystemService"),
|
|
198
|
-
NetworkService: import_proto2.schema.getService("dxos.client.services.NetworkService"),
|
|
199
|
-
LoggingService: import_proto2.schema.getService("dxos.client.services.LoggingService"),
|
|
200
|
-
IdentityService: import_proto2.schema.getService("dxos.client.services.IdentityService"),
|
|
201
|
-
QueryService: import_proto2.schema.getService("dxos.echo.query.QueryService"),
|
|
202
|
-
InvitationsService: import_proto2.schema.getService("dxos.client.services.InvitationsService"),
|
|
203
|
-
DevicesService: import_proto2.schema.getService("dxos.client.services.DevicesService"),
|
|
204
|
-
SpacesService: import_proto2.schema.getService("dxos.client.services.SpacesService"),
|
|
205
|
-
DataService: import_proto2.schema.getService("dxos.echo.service.DataService"),
|
|
206
|
-
ContactsService: import_proto2.schema.getService("dxos.client.services.ContactsService"),
|
|
207
|
-
EdgeAgentService: import_proto2.schema.getService("dxos.client.services.EdgeAgentService"),
|
|
208
|
-
// Agent-only.
|
|
209
|
-
FunctionRegistryService: import_proto2.schema.getService("dxos.agent.functions.FunctionRegistryService"),
|
|
210
|
-
// TODO(burdon): Deprecated.
|
|
211
|
-
DevtoolsHost: import_proto2.schema.getService("dxos.devtools.host.DevtoolsHost"),
|
|
212
|
-
TracingService: import_proto2.schema.getService("dxos.tracing.TracingService")
|
|
213
|
-
});
|
|
214
|
-
var iframeServiceBundle = {
|
|
215
|
-
BridgeService: import_proto2.schema.getService("dxos.mesh.bridge.BridgeService")
|
|
216
|
-
};
|
|
217
|
-
var workerServiceBundle = {
|
|
218
|
-
WorkerService: import_proto2.schema.getService("dxos.iframe.WorkerService")
|
|
219
|
-
};
|
|
220
|
-
var appServiceBundle = {
|
|
221
|
-
AppService: import_proto2.schema.getService("dxos.iframe.AppService")
|
|
222
|
-
};
|
|
223
|
-
var shellServiceBundle = {
|
|
224
|
-
ShellService: import_proto2.schema.getService("dxos.iframe.ShellService")
|
|
225
|
-
};
|
|
226
|
-
var PROXY_CONNECTION_TIMEOUT = 3e4;
|
|
227
|
-
var AUTH_TIMEOUT = 3e4;
|
|
228
|
-
var STATUS_TIMEOUT = 1e4;
|
|
229
|
-
var RESOURCE_LOCK_TIMEOUT = 3e3;
|
|
230
|
-
var LOAD_PROPERTIES_TIMEOUT = 3e3;
|
|
231
|
-
var CREATE_SPACE_TIMEOUT = 5e3;
|
|
232
|
-
var LOAD_CONTROL_FEEDS_TIMEOUT = 3e3;
|
|
233
|
-
var TYPE_PROPERTIES = "dxos.org/type/Properties";
|
|
234
|
-
var PropertiesType = class extends (0, import_echo_schema.TypedObject)({
|
|
235
|
-
typename: TYPE_PROPERTIES,
|
|
236
|
-
version: "0.1.0"
|
|
237
|
-
})({
|
|
238
|
-
name: import_effect.Schema.optional(import_effect.Schema.String),
|
|
239
|
-
// TODO(wittjosiah): Make generic?
|
|
240
|
-
hue: import_effect.Schema.optional(import_effect.Schema.String),
|
|
241
|
-
icon: import_effect.Schema.optional(import_effect.Schema.String),
|
|
242
|
-
invocationTraceQueue: import_effect.Schema.optional(import_echo.Type.Ref(import_echo.Type.Expando))
|
|
243
|
-
}, {
|
|
244
|
-
record: true
|
|
245
|
-
}) {
|
|
246
|
-
};
|
|
247
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
248
|
-
0 && (module.exports = {
|
|
249
|
-
AUTHENTICATION_CODE_LENGTH,
|
|
250
|
-
AUTH_TIMEOUT,
|
|
251
|
-
AuthenticatingInvitation,
|
|
252
|
-
CREATE_SPACE_TIMEOUT,
|
|
253
|
-
CancellableInvitation,
|
|
254
|
-
ClientServicesProviderResource,
|
|
255
|
-
DEFAULT_CLIENT_CHANNEL,
|
|
256
|
-
DEFAULT_INTERNAL_CHANNEL,
|
|
257
|
-
DEFAULT_SHELL_CHANNEL,
|
|
258
|
-
DEFAULT_VAULT_URL,
|
|
259
|
-
DEFAULT_WORKER_BROADCAST_CHANNEL,
|
|
260
|
-
DX_CACHE,
|
|
261
|
-
DX_CONFIG,
|
|
262
|
-
DX_DATA,
|
|
263
|
-
DX_RUNTIME,
|
|
264
|
-
DX_STATE,
|
|
265
|
-
ENV_DX_CONFIG,
|
|
266
|
-
ENV_DX_NO_AGENT,
|
|
267
|
-
ENV_DX_PROFILE,
|
|
268
|
-
ENV_DX_PROFILE_DEFAULT,
|
|
269
|
-
EXPECTED_CONFIG_VERSION,
|
|
270
|
-
INVITATION_TIMEOUT,
|
|
271
|
-
InvitationEncoder,
|
|
272
|
-
LOAD_CONTROL_FEEDS_TIMEOUT,
|
|
273
|
-
LOAD_PROPERTIES_TIMEOUT,
|
|
274
|
-
PROXY_CONNECTION_TIMEOUT,
|
|
275
|
-
PropertiesType,
|
|
276
|
-
RESOURCE_LOCK_TIMEOUT,
|
|
277
|
-
STATUS_TIMEOUT,
|
|
278
|
-
TYPE_PROPERTIES,
|
|
279
|
-
appServiceBundle,
|
|
280
|
-
clientServiceBundle,
|
|
281
|
-
defaultConfig,
|
|
282
|
-
getExpirationTime,
|
|
283
|
-
getProfilePath,
|
|
284
|
-
iframeServiceBundle,
|
|
285
|
-
shellServiceBundle,
|
|
286
|
-
workerServiceBundle,
|
|
287
|
-
wrapObservable
|
|
288
|
-
});
|
|
289
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/client.ts", "../../../src/config.ts", "../../../src/invitations/encoder.ts", "../../../src/invitations/invitations.ts", "../../../src/service-definitions.ts", "../../../src/timeouts.ts", "../../../src/schema.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport const ClientServicesProviderResource = Symbol.for('dxos.resource.ClientServices');\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type ConfigProto } from '@dxos/config';\n\nexport const DEFAULT_INTERNAL_CHANNEL = 'dxos:vault';\nexport const DEFAULT_CLIENT_CHANNEL = 'dxos:app';\nexport const DEFAULT_SHELL_CHANNEL = 'dxos:shell';\nexport const DEFAULT_WORKER_BROADCAST_CHANNEL = 'dxos:shared-worker';\n\n/**\n * @deprecated\n */\nexport const DEFAULT_VAULT_URL = 'https://halo.dxos.org/vault.html';\n\nexport const EXPECTED_CONFIG_VERSION = 1;\nexport const defaultConfig: ConfigProto = { version: 1 };\n\n// TODO(burdon): Allow override via env? Generalize since currently NodeJS only.\nconst HOME = typeof process !== 'undefined' ? process?.env?.HOME ?? '' : '';\n\n// Base directories.\n// TODO(burdon): Consider Windows, Linux, OSX.\n// https://wiki.archlinux.org/title/XDG_Base_Directory\n// Each `/dx` directory should contain `/profile/<DX_PROFILE>` subdirectories.\nexport const getProfilePath = (root: string, profile: string, file: string | undefined = undefined) =>\n `${root}/profile/${profile}` + (file ? `/${file}` : '');\n\n// XDG_CONFIG_HOME (Analogous to /etc.)\nexport const DX_CONFIG = `${HOME}/.config/dx`;\n\n// XDG_CACHE_HOME (Analogous to /var/cache).\nexport const DX_CACHE = `${HOME}/.cache/dx`;\n\n// TODO(burdon): Storage should use this by default (make path optional).\n// XDG_DATA_HOME (Analogous to /usr/share).\nexport const DX_DATA = `${HOME}/.local/share/dx`;\n\n// XDG_STATE_HOME (Analogous to /var/lib).\nexport const DX_STATE = `${HOME}/.local/state/dx`;\n\n// XDG_RUNTIME_DIR (Non-essential files, sockets, etc.)\nexport const DX_RUNTIME = '/tmp/dx/run';\n\nexport const ENV_DX_CONFIG = 'DX_CONFIG';\nexport const ENV_DX_NO_AGENT = 'DX_NO_AGENT';\nexport const ENV_DX_PROFILE = 'DX_PROFILE';\nexport const ENV_DX_PROFILE_DEFAULT = 'default';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport base from 'base-x';\n\nimport { schema } from '@dxos/protocols/proto';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\n// Encode with URL-safe alpha-numeric characters.\nconst base62 = base('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');\n\nconst codec = schema.getCodecForType('dxos.client.services.Invitation');\n\n/**\n * Encodes and decodes an invitation proto into/from alphanumeric chars.\n */\nexport class InvitationEncoder {\n static decode(text: string): Invitation {\n const decodedInvitation = codec.decode(base62.decode(text));\n if (decodedInvitation.type === Invitation.Type.MULTIUSE) {\n decodedInvitation.type = Invitation.Type.INTERACTIVE;\n decodedInvitation.multiUse = true;\n }\n return decodedInvitation;\n }\n\n static encode(invitation: Invitation): string {\n return base62.encode(\n codec.encode({\n invitationId: invitation.invitationId,\n type: invitation.type,\n kind: invitation.kind,\n authMethod: invitation.authMethod,\n swarmKey: invitation.swarmKey,\n state: invitation.state,\n timeout: invitation.timeout,\n guestKeypair: invitation.guestKeypair,\n spaceId: invitation.spaceId,\n lifetime: invitation.lifetime,\n created: invitation.created,\n // TODO(wittjosiah): Make these optional to encode for greater privacy.\n ...(invitation.spaceKey ? { spaceKey: invitation.spaceKey } : {}),\n ...(invitation.target ? { target: invitation.target } : {}),\n }),\n );\n }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { MulticastObservable, type Observable, type Subscriber } from '@dxos/async';\nimport { invariant } from '@dxos/invariant';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\nexport const AUTHENTICATION_CODE_LENGTH = 6;\n\nexport const INVITATION_TIMEOUT = 3 * 60_000; // 3 mins.\n\nexport interface Invitations {\n created: MulticastObservable<CancellableInvitation[]>;\n accepted: MulticastObservable<AuthenticatingInvitation[]>;\n share(options?: Partial<Invitation>): CancellableInvitation;\n join(invitation: Invitation): AuthenticatingInvitation;\n}\n\n/**\n * Base class for all invitation observables and providers.\n */\nexport class CancellableInvitation extends MulticastObservable<Invitation> {\n private readonly _onCancel: () => Promise<void>;\n\n constructor({\n subscriber,\n initialInvitation,\n onCancel,\n }: {\n subscriber: Observable<Invitation> | Subscriber<Invitation>;\n initialInvitation: Invitation;\n onCancel: () => Promise<void>;\n }) {\n super(subscriber, initialInvitation);\n this._onCancel = onCancel;\n }\n\n cancel(): Promise<void> {\n return this._onCancel();\n }\n\n get expired() {\n const expiration = getExpirationTime(this.get());\n return expiration && expiration.getTime() < Date.now();\n }\n\n get expiry() {\n return getExpirationTime(this.get());\n }\n}\n\n/**\n * Cancelable observer that relays authentication requests.\n */\nexport class AuthenticatingInvitation extends CancellableInvitation {\n private readonly _onAuthenticate: (authCode: string) => Promise<void>;\n\n constructor({\n subscriber,\n initialInvitation,\n onCancel,\n onAuthenticate,\n }: {\n subscriber: Observable<Invitation> | Subscriber<Invitation>;\n initialInvitation: Invitation;\n onCancel: () => Promise<void>;\n onAuthenticate: (authCode: string) => Promise<void>;\n }) {\n super({ subscriber, initialInvitation, onCancel });\n this._onAuthenticate = onAuthenticate;\n }\n\n async authenticate(authCode: string): Promise<void> {\n return this._onAuthenticate(authCode);\n }\n}\n\n/**\n * Testing util to wrap non-authenticating observable with promise.\n * Don't use this in production code.\n * @deprecated\n */\n// TODO(wittjosiah): Move to testing.\nexport const wrapObservable = async (observable: CancellableInvitation): Promise<Invitation> => {\n return new Promise((resolve, reject) => {\n const subscription = observable.subscribe(\n (invitation: Invitation | undefined) => {\n // TODO(burdon): Throw error if auth requested.\n invariant(invitation?.state === Invitation.State.SUCCESS);\n subscription.unsubscribe();\n resolve(invitation);\n },\n (err: Error) => {\n subscription.unsubscribe();\n reject(err);\n },\n );\n });\n};\n\nexport const getExpirationTime = (invitation: Partial<Invitation>): Date | undefined => {\n if (!(invitation.created && invitation.lifetime)) {\n return;\n }\n return new Date(invitation.created.getTime() + invitation.lifetime * 1000);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Event } from '@dxos/async';\nimport { schema } from '@dxos/protocols/proto';\nimport type { FunctionRegistryService } from '@dxos/protocols/proto/dxos/agent/functions';\nimport type {\n DevicesService,\n IdentityService,\n InvitationsService,\n LoggingService,\n NetworkService,\n SpacesService,\n SystemService,\n ContactsService,\n EdgeAgentService,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport type { DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';\nimport type { QueryService } from '@dxos/protocols/proto/dxos/echo/query';\nimport type { DataService } from '@dxos/protocols/proto/dxos/echo/service';\nimport type { AppService, ShellService, WorkerService } from '@dxos/protocols/proto/dxos/iframe';\nimport type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';\nimport type { TracingService } from '@dxos/protocols/proto/dxos/tracing';\nimport { type ServiceBundle, createServiceBundle } from '@dxos/rpc';\n\n//\n// NOTE: Should contain client/proxy dependencies only.\n//\n\nexport type ClientServices = {\n SystemService: SystemService;\n NetworkService: NetworkService;\n LoggingService: LoggingService;\n\n IdentityService: IdentityService;\n InvitationsService: InvitationsService;\n QueryService: QueryService;\n DevicesService: DevicesService;\n SpacesService: SpacesService;\n DataService: DataService;\n ContactsService: ContactsService;\n EdgeAgentService: EdgeAgentService;\n\n FunctionRegistryService: FunctionRegistryService;\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: DevtoolsHost;\n\n TracingService: TracingService;\n};\n\n/**\n * Provide access to client services definitions and service handler.\n */\nexport interface ClientServicesProvider {\n /**\n * The connection to the services provider was terminated.\n * This should fire if the services disconnect unexpectedly or during a client reset.\n */\n closed: Event<Error | undefined>;\n descriptors: ServiceBundle<ClientServices>;\n services: Partial<ClientServices>;\n\n // TODO(burdon): Should take context from parent?\n open(): Promise<void>;\n close(): Promise<void>;\n}\n\n/**\n * Services supported by host.\n */\nexport const clientServiceBundle = createServiceBundle<ClientServices>({\n SystemService: schema.getService('dxos.client.services.SystemService'),\n NetworkService: schema.getService('dxos.client.services.NetworkService'),\n LoggingService: schema.getService('dxos.client.services.LoggingService'),\n\n IdentityService: schema.getService('dxos.client.services.IdentityService'),\n QueryService: schema.getService('dxos.echo.query.QueryService'),\n InvitationsService: schema.getService('dxos.client.services.InvitationsService'),\n DevicesService: schema.getService('dxos.client.services.DevicesService'),\n SpacesService: schema.getService('dxos.client.services.SpacesService'),\n DataService: schema.getService('dxos.echo.service.DataService'),\n ContactsService: schema.getService('dxos.client.services.ContactsService'),\n EdgeAgentService: schema.getService('dxos.client.services.EdgeAgentService'),\n\n // Agent-only.\n FunctionRegistryService: schema.getService('dxos.agent.functions.FunctionRegistryService'),\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: schema.getService('dxos.devtools.host.DevtoolsHost'),\n\n TracingService: schema.getService('dxos.tracing.TracingService'),\n});\n\nexport type IframeServiceBundle = {\n BridgeService: BridgeService;\n};\n\nexport const iframeServiceBundle: ServiceBundle<IframeServiceBundle> = {\n BridgeService: schema.getService('dxos.mesh.bridge.BridgeService'),\n};\n\nexport type WorkerServiceBundle = {\n WorkerService: WorkerService;\n};\n\nexport const workerServiceBundle: ServiceBundle<WorkerServiceBundle> = {\n WorkerService: schema.getService('dxos.iframe.WorkerService'),\n};\n\nexport type AppServiceBundle = {\n AppService: AppService;\n};\n\nexport const appServiceBundle: ServiceBundle<AppServiceBundle> = {\n AppService: schema.getService('dxos.iframe.AppService'),\n};\n\nexport type ShellServiceBundle = {\n ShellService: ShellService;\n};\n\nexport const shellServiceBundle: ServiceBundle<ShellServiceBundle> = {\n ShellService: schema.getService('dxos.iframe.ShellService'),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n/**\n * Timeout for making rpc connections from remote proxies.\n */\nexport const PROXY_CONNECTION_TIMEOUT = 30_000;\n\n/**\n * Timeout for the device to be added to the trusted set during auth.\n */\nexport const AUTH_TIMEOUT = 30_000;\n\n/**\n * Timeout for how long the remote client will wait before assuming the connection is lost.\n */\nexport const STATUS_TIMEOUT = 10_000;\n\n/**\n * Timeout for waiting before stealing resource lock.\n */\nexport const RESOURCE_LOCK_TIMEOUT = 3_000;\n\n/**\n * Timeout for space properties to be loaded in the set of tracked items.\n * Accounts for latency between SpaceService reporting the space as READY and DataService streaming the item states.\n */\nexport const LOAD_PROPERTIES_TIMEOUT = 3_000;\n\n/**\n * Timeout for creating new spaces.\n */\nexport const CREATE_SPACE_TIMEOUT = 5_000;\n\n/**\n * Timeout for loading of control feeds.\n */\nexport const LOAD_CONTROL_FEEDS_TIMEOUT = 3_000;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { Type } from '@dxos/echo';\nimport { TypedObject } from '@dxos/echo-schema';\n\nexport const TYPE_PROPERTIES = 'dxos.org/type/Properties';\n\n// TODO(burdon): Factor out (co-locate with TYPE_PROPERTIES).\nexport class PropertiesType extends TypedObject({\n typename: TYPE_PROPERTIES,\n version: '0.1.0',\n})(\n {\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): Make generic?\n hue: Schema.optional(Schema.String),\n icon: Schema.optional(Schema.String),\n invocationTraceQueue: Schema.optional(Type.Ref(Type.Expando)),\n },\n { record: true },\n) {}\n\n// TODO(burdon): Remove? Use PropertiesType instead?\nexport type PropertiesTypeProps = Pick<PropertiesType, 'name' | 'hue' | 'icon' | 'invocationTraceQueue'>;\n"],
|
|
5
|
-
"mappings": ";;;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AAW,gCAAA;AACnC;AAMO,IAAMgB,sBAA0D;EACrEC,eAAehF,cAAAA,OAAO+D,WAAW,2BAAA;AACnC;AAMO,IAAMkB,mBAAoD;EAC/DC,YAAYlF,cAAAA,OAAO+D,WAAW,wBAAA;AAChC;AAMO,IAAMoB,qBAAwD;EACnEC,cAAcpF,cAAAA,OAAO+D,WAAW,0BAAA;AAClC;ACtHO,IAAMsB,2BAA2B;AAKjC,IAAMC,eAAe;AAKrB,IAAMC,iBAAiB;AAKvB,IAAMC,wBAAwB;AAM9B,IAAMC,0BAA0B;AAKhC,IAAMC,uBAAuB;AAK7B,IAAMC,6BAA6B;AC7BnC,IAAMC,kBAAkB;AAGxB,IAAMC,iBAAN,kBAA6BC,gCAAY;EAC9CC,UAAUH;EACVjH,SAAS;AACX,CAAA,EACE;EACEqH,MAAMC,qBAAOC,SAASD,qBAAOE,MAAM;;EAEnCC,KAAKH,qBAAOC,SAASD,qBAAOE,MAAM;EAClCE,MAAMJ,qBAAOC,SAASD,qBAAOE,MAAM;EACnCG,sBAAsBL,qBAAOC,SAAS1F,iBAAK+F,IAAI/F,iBAAKgG,OAAO,CAAA;AAC7D,GACA;EAAEC,QAAQ;AAAK,CAAA,EAAA;AACd;",
|
|
6
|
-
"names": ["import_services", "import_proto", "ClientServicesProviderResource", "Symbol", "for", "DEFAULT_INTERNAL_CHANNEL", "DEFAULT_CLIENT_CHANNEL", "DEFAULT_SHELL_CHANNEL", "DEFAULT_WORKER_BROADCAST_CHANNEL", "DEFAULT_VAULT_URL", "EXPECTED_CONFIG_VERSION", "defaultConfig", "version", "HOME", "process", "env", "getProfilePath", "root", "profile", "file", "undefined", "DX_CONFIG", "DX_CACHE", "DX_DATA", "DX_STATE", "DX_RUNTIME", "ENV_DX_CONFIG", "ENV_DX_NO_AGENT", "ENV_DX_PROFILE", "ENV_DX_PROFILE_DEFAULT", "base62", "base", "codec", "schema", "getCodecForType", "InvitationEncoder", "decode", "text", "decodedInvitation", "type", "Invitation", "Type", "MULTIUSE", "INTERACTIVE", "multiUse", "encode", "invitation", "invitationId", "kind", "authMethod", "swarmKey", "state", "timeout", "guestKeypair", "spaceId", "lifetime", "created", "spaceKey", "target", "AUTHENTICATION_CODE_LENGTH", "INVITATION_TIMEOUT", "CancellableInvitation", "MulticastObservable", "subscriber", "initialInvitation", "onCancel", "_onCancel", "cancel", "expired", "expiration", "getExpirationTime", "get", "getTime", "Date", "now", "expiry", "AuthenticatingInvitation", "onAuthenticate", "_onAuthenticate", "authenticate", "authCode", "wrapObservable", "observable", "Promise", "resolve", "reject", "subscription", "subscribe", "invariant", "State", "SUCCESS", "unsubscribe", "err", "clientServiceBundle", "createServiceBundle", "SystemService", "getService", "NetworkService", "LoggingService", "IdentityService", "QueryService", "InvitationsService", "DevicesService", "SpacesService", "DataService", "ContactsService", "EdgeAgentService", "FunctionRegistryService", "DevtoolsHost", "TracingService", "iframeServiceBundle", "BridgeService", "workerServiceBundle", "WorkerService", "appServiceBundle", "AppService", "shellServiceBundle", "ShellService", "PROXY_CONNECTION_TIMEOUT", "AUTH_TIMEOUT", "STATUS_TIMEOUT", "RESOURCE_LOCK_TIMEOUT", "LOAD_PROPERTIES_TIMEOUT", "CREATE_SPACE_TIMEOUT", "LOAD_CONTROL_FEEDS_TIMEOUT", "TYPE_PROPERTIES", "PropertiesType", "TypedObject", "typename", "name", "Schema", "optional", "String", "hue", "icon", "invocationTraceQueue", "Ref", "Expando", "record"]
|
|
7
|
-
}
|
package/dist/lib/node/meta.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"packages/sdk/client-protocol/src/client.ts":{"bytes":723,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/config.ts":{"bytes":6076,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":3106,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":2789,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":5832,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":9370,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":578,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":9581,"imports":[{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1468,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":5847,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3134,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/schema.ts":{"bytes":2833,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1254,"imports":[{"path":"packages/sdk/client-protocol/src/client.ts","kind":"import-statement","original":"./client"},{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"},{"path":"packages/sdk/client-protocol/src/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19130},"packages/sdk/client-protocol/dist/lib/node/index.cjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","ClientServicesProviderResource","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_URL","DEFAULT_WORKER_BROADCAST_CHANNEL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_NO_AGENT","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","PropertiesType","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","TYPE_PROPERTIES","appServiceBundle","clientServiceBundle","defaultConfig","getExpirationTime","getProfilePath","iframeServiceBundle","shellServiceBundle","workerServiceBundle","wrapObservable"],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/client.ts":{"bytesInOutput":81},"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":841},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":1355},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1902},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1660},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224},"packages/sdk/client-protocol/src/schema.ts":{"bytesInOutput":517}},"bytes":7854}}}
|