@dxos/client-services 0.8.3 → 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/{chunk-LBG3C332.mjs → chunk-OCFDRCSN.mjs} +103 -103
- package/dist/lib/browser/chunk-OCFDRCSN.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +6 -6
- package/dist/lib/node-esm/{chunk-SKGQLRKS.mjs → chunk-D7F3FYZS.mjs} +102 -102
- package/dist/lib/node-esm/chunk-D7F3FYZS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +6 -6
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +6 -6
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
- package/src/packlets/services/service-host.ts +4 -4
- package/src/version.ts +1 -5
- package/README.yml +0 -5
- package/dist/lib/browser/chunk-LBG3C332.mjs.map +0 -7
- package/dist/lib/node/chunk-LMGLGOUU.cjs +0 -9311
- package/dist/lib/node/chunk-LMGLGOUU.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -437
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/testing/index.cjs +0 -452
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-SKGQLRKS.mjs.map +0 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "@dxos/node-std/globals";
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// src/packlets/devtools/feeds.ts
|
|
4
4
|
import { SubscriptionList } from "@dxos/async";
|
|
5
5
|
import { Stream } from "@dxos/codec-protobuf/stream";
|
|
6
6
|
import { FeedIterator } from "@dxos/feed-store";
|
|
7
7
|
import { PublicKey } from "@dxos/keys";
|
|
8
8
|
import { log } from "@dxos/log";
|
|
9
9
|
import { ComplexMap } from "@dxos/util";
|
|
10
|
-
var __dxlog_file = "/
|
|
10
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/devtools/feeds.ts";
|
|
11
11
|
var subscribeToFeeds = ({ feedStore, spaceManager }, { feedKeys }) => {
|
|
12
12
|
return new Stream(({ next }) => {
|
|
13
13
|
const subscriptions = new SubscriptionList();
|
|
@@ -112,11 +112,11 @@ var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
|
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
//
|
|
115
|
+
// src/packlets/devtools/network.ts
|
|
116
116
|
import { Stream as Stream2 } from "@dxos/codec-protobuf/stream";
|
|
117
117
|
import { Context } from "@dxos/context";
|
|
118
118
|
import { PublicKey as PublicKey2 } from "@dxos/keys";
|
|
119
|
-
var __dxlog_file2 = "/
|
|
119
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/devtools/network.ts";
|
|
120
120
|
var subscribeToNetworkStatus = ({ signalManager }) => new Stream2(({ next, close }) => {
|
|
121
121
|
const update = () => {
|
|
122
122
|
try {
|
|
@@ -209,7 +209,7 @@ var getNetworkPeers = ({ networkManager }, request) => {
|
|
|
209
209
|
};
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
-
//
|
|
212
|
+
// src/packlets/devtools/spaces.ts
|
|
213
213
|
import { Stream as Stream3 } from "@dxos/codec-protobuf/stream";
|
|
214
214
|
var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
215
215
|
return new Stream3(({ next }) => {
|
|
@@ -245,11 +245,11 @@ var subscribeToSpaces = (context, { spaceKeys = [] }) => {
|
|
|
245
245
|
});
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
//
|
|
248
|
+
// src/packlets/devtools/devtools.ts
|
|
249
249
|
import { Event as AsyncEvent } from "@dxos/async";
|
|
250
250
|
import { Stream as Stream6 } from "@dxos/codec-protobuf/stream";
|
|
251
251
|
|
|
252
|
-
//
|
|
252
|
+
// src/packlets/devtools/keys.ts
|
|
253
253
|
import { scheduleTask } from "@dxos/async";
|
|
254
254
|
import { Stream as Stream4 } from "@dxos/codec-protobuf/stream";
|
|
255
255
|
var subscribeToKeyringKeys = ({ keyring }) => new Stream4(({ next, ctx }) => {
|
|
@@ -262,7 +262,7 @@ var subscribeToKeyringKeys = ({ keyring }) => new Stream4(({ next, ctx }) => {
|
|
|
262
262
|
scheduleTask(ctx, update);
|
|
263
263
|
});
|
|
264
264
|
|
|
265
|
-
//
|
|
265
|
+
// src/packlets/devtools/metadata.ts
|
|
266
266
|
import { Stream as Stream5 } from "@dxos/codec-protobuf/stream";
|
|
267
267
|
var subscribeToMetadata = ({ context }) => new Stream5(({ next, ctx }) => {
|
|
268
268
|
context.metadataStore.update.on(ctx, (data) => next({
|
|
@@ -273,7 +273,7 @@ var subscribeToMetadata = ({ context }) => new Stream5(({ next, ctx }) => {
|
|
|
273
273
|
});
|
|
274
274
|
});
|
|
275
275
|
|
|
276
|
-
//
|
|
276
|
+
// src/packlets/devtools/devtools.ts
|
|
277
277
|
var DevtoolsHostEvents = class {
|
|
278
278
|
constructor() {
|
|
279
279
|
this.ready = new AsyncEvent();
|
|
@@ -387,7 +387,7 @@ var DevtoolsServiceImpl = class {
|
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
|
|
390
|
-
//
|
|
390
|
+
// src/packlets/diagnostics/diagnostics.ts
|
|
391
391
|
import { asyncTimeout } from "@dxos/async";
|
|
392
392
|
import { getFirstStreamValue } from "@dxos/codec-protobuf";
|
|
393
393
|
import { createDidFromIdentityKey, credentialTypeFilter } from "@dxos/credentials";
|
|
@@ -396,10 +396,10 @@ import { STORAGE_VERSION } from "@dxos/protocols";
|
|
|
396
396
|
import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
397
397
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
398
398
|
|
|
399
|
-
//
|
|
400
|
-
var DXOS_VERSION = "0.8.
|
|
399
|
+
// src/version.ts
|
|
400
|
+
var DXOS_VERSION = "0.8.4-main.84f28bd";
|
|
401
401
|
|
|
402
|
-
//
|
|
402
|
+
// src/packlets/services/platform.ts
|
|
403
403
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
404
404
|
var getPlatform = () => {
|
|
405
405
|
if (process.browser) {
|
|
@@ -429,8 +429,8 @@ var getPlatform = () => {
|
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
|
|
432
|
-
//
|
|
433
|
-
var __dxlog_file3 = "/
|
|
432
|
+
// src/packlets/diagnostics/diagnostics.ts
|
|
433
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/diagnostics/diagnostics.ts";
|
|
434
434
|
var DEFAULT_TIMEOUT = 1e3;
|
|
435
435
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
436
436
|
const diagnostics = {
|
|
@@ -551,10 +551,10 @@ var getStorageDiagnostics = async () => {
|
|
|
551
551
|
}));
|
|
552
552
|
};
|
|
553
553
|
|
|
554
|
-
//
|
|
554
|
+
// src/packlets/diagnostics/browser-diagnostics-broadcast.ts
|
|
555
555
|
import { Trigger } from "@dxos/async";
|
|
556
556
|
import { log as log2 } from "@dxos/log";
|
|
557
|
-
var __dxlog_file4 = "/
|
|
557
|
+
var __dxlog_file4 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/diagnostics/browser-diagnostics-broadcast.ts";
|
|
558
558
|
var CHANNEL_NAME = "dxos.diagnostics.broadcast";
|
|
559
559
|
var createCollectDiagnosticsBroadcastSender = () => {
|
|
560
560
|
return {
|
|
@@ -637,7 +637,7 @@ var safeClose = (channel) => {
|
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
639
|
|
|
640
|
-
//
|
|
640
|
+
// src/packlets/diagnostics/diagnostics-collector.ts
|
|
641
641
|
import { ClientServicesProviderResource } from "@dxos/client-protocol";
|
|
642
642
|
import { ConfigResource } from "@dxos/config";
|
|
643
643
|
import { GetDiagnosticsRequest } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -678,13 +678,13 @@ var findConfigs = () => {
|
|
|
678
678
|
return configs.map((r) => r.instance.deref()).filter(isNonNullable);
|
|
679
679
|
};
|
|
680
680
|
|
|
681
|
-
//
|
|
681
|
+
// src/packlets/identity/authenticator.ts
|
|
682
682
|
import { Trigger as Trigger2 } from "@dxos/async";
|
|
683
683
|
import { Context as Context2 } from "@dxos/context";
|
|
684
684
|
import { verifyCredential } from "@dxos/credentials";
|
|
685
685
|
import { log as log3 } from "@dxos/log";
|
|
686
686
|
import { schema } from "@dxos/protocols/proto";
|
|
687
|
-
var __dxlog_file5 = "/
|
|
687
|
+
var __dxlog_file5 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
688
688
|
var Credential = schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
689
689
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
690
690
|
const credential = await signer.createCredential({
|
|
@@ -799,7 +799,7 @@ var TrustedKeySetAuthVerifier = class {
|
|
|
799
799
|
}
|
|
800
800
|
};
|
|
801
801
|
|
|
802
|
-
//
|
|
802
|
+
// src/packlets/spaces/edge-feed-replicator.ts
|
|
803
803
|
import { decode as decodeCbor, encode as encodeCbor } from "cbor-x";
|
|
804
804
|
import { Event, Mutex, scheduleMicroTask } from "@dxos/async";
|
|
805
805
|
import { Context as Context3, Resource } from "@dxos/context";
|
|
@@ -883,7 +883,7 @@ function _ts_dispose_resources(env) {
|
|
|
883
883
|
return next();
|
|
884
884
|
})(env);
|
|
885
885
|
}
|
|
886
|
-
var __dxlog_file6 = "/
|
|
886
|
+
var __dxlog_file6 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/edge-feed-replicator.ts";
|
|
887
887
|
var EdgeFeedReplicator = class extends Resource {
|
|
888
888
|
constructor({ messenger, spaceId }) {
|
|
889
889
|
super();
|
|
@@ -1312,7 +1312,7 @@ var bufferizeBlock = (block) => ({
|
|
|
1312
1312
|
signature: arrayToBuffer(block.signature)
|
|
1313
1313
|
});
|
|
1314
1314
|
|
|
1315
|
-
//
|
|
1315
|
+
// src/packlets/spaces/data-space.ts
|
|
1316
1316
|
import { save } from "@automerge/automerge";
|
|
1317
1317
|
import { Event as Event7, Mutex as Mutex2, scheduleTask as scheduleTask4, sleep as sleep3, synchronized as synchronized2, trackLeaks as trackLeaks2 } from "@dxos/async";
|
|
1318
1318
|
import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
|
|
@@ -1330,7 +1330,7 @@ import { Timeframe as Timeframe4 } from "@dxos/timeframe";
|
|
|
1330
1330
|
import { trace as trace5 } from "@dxos/tracing";
|
|
1331
1331
|
import { CallbackCollection, ComplexSet as ComplexSet3 } from "@dxos/util";
|
|
1332
1332
|
|
|
1333
|
-
//
|
|
1333
|
+
// src/packlets/spaces/automerge-space-state.ts
|
|
1334
1334
|
import { Event as Event2 } from "@dxos/async";
|
|
1335
1335
|
import { Resource as Resource2 } from "@dxos/context";
|
|
1336
1336
|
import { checkCredentialType } from "@dxos/credentials";
|
|
@@ -1370,10 +1370,10 @@ var AutomergeSpaceState = class extends Resource2 {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
};
|
|
1372
1372
|
|
|
1373
|
-
//
|
|
1373
|
+
// src/packlets/spaces/epoch-migrations.ts
|
|
1374
1374
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
1375
1375
|
import { CreateEpochRequest } from "@dxos/protocols/proto/dxos/client/services";
|
|
1376
|
-
var __dxlog_file7 = "/
|
|
1376
|
+
var __dxlog_file7 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/epoch-migrations.ts";
|
|
1377
1377
|
var LOAD_DOC_TIMEOUT = 1e4;
|
|
1378
1378
|
var runEpochMigration = async (ctx, context) => {
|
|
1379
1379
|
switch (context.migration) {
|
|
@@ -1423,7 +1423,7 @@ var runEpochMigration = async (ctx, context) => {
|
|
|
1423
1423
|
return {};
|
|
1424
1424
|
};
|
|
1425
1425
|
|
|
1426
|
-
//
|
|
1426
|
+
// src/packlets/spaces/notarization-plugin.ts
|
|
1427
1427
|
import { DeferredTask, Event as Event3, scheduleTask as scheduleTask2, sleep, TimeoutError, Trigger as Trigger3, scheduleMicroTask as scheduleMicroTask2 } from "@dxos/async";
|
|
1428
1428
|
import { rejectOnDispose, Resource as Resource3 } from "@dxos/context";
|
|
1429
1429
|
import { verifyCredential as verifyCredential2 } from "@dxos/credentials";
|
|
@@ -1440,7 +1440,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
1440
1440
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1441
1441
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1442
1442
|
}
|
|
1443
|
-
var __dxlog_file8 = "/
|
|
1443
|
+
var __dxlog_file8 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
1444
1444
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
1445
1445
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
1446
1446
|
var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
@@ -1875,7 +1875,7 @@ var NotarizationTeleportExtension = class extends RpcExtension {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
};
|
|
1877
1877
|
|
|
1878
|
-
//
|
|
1878
|
+
// src/packlets/identity/identity.ts
|
|
1879
1879
|
import { Event as Event5 } from "@dxos/async";
|
|
1880
1880
|
import { AUTH_TIMEOUT, LOAD_CONTROL_FEEDS_TIMEOUT } from "@dxos/client-protocol";
|
|
1881
1881
|
import { DeviceStateMachine, createCredentialSignerWithKey, createCredentialSignerWithChain, ProfileStateMachine } from "@dxos/credentials";
|
|
@@ -1888,11 +1888,11 @@ import { Timeframe as Timeframe2 } from "@dxos/timeframe";
|
|
|
1888
1888
|
import { trace as trace3 } from "@dxos/tracing";
|
|
1889
1889
|
import { ComplexSet as ComplexSet2 } from "@dxos/util";
|
|
1890
1890
|
|
|
1891
|
-
//
|
|
1891
|
+
// src/packlets/identity/default-space-state-machine.ts
|
|
1892
1892
|
import { getCredentialAssertion } from "@dxos/credentials";
|
|
1893
1893
|
import { SpaceId } from "@dxos/keys";
|
|
1894
1894
|
import { log as log6 } from "@dxos/log";
|
|
1895
|
-
var __dxlog_file9 = "/
|
|
1895
|
+
var __dxlog_file9 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/default-space-state-machine.ts";
|
|
1896
1896
|
var DefaultSpaceStateMachine = class {
|
|
1897
1897
|
constructor(_params) {
|
|
1898
1898
|
this._params = _params;
|
|
@@ -1934,7 +1934,7 @@ var DefaultSpaceStateMachine = class {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
};
|
|
1936
1936
|
|
|
1937
|
-
//
|
|
1937
|
+
// src/packlets/spaces/data-space-manager.ts
|
|
1938
1938
|
import { interpretAsDocumentId } from "@automerge/automerge-repo";
|
|
1939
1939
|
import { Event as Event4, synchronized, trackLeaks } from "@dxos/async";
|
|
1940
1940
|
import { PropertiesType, TYPE_PROPERTIES } from "@dxos/client-protocol";
|
|
@@ -1955,7 +1955,7 @@ import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
|
|
|
1955
1955
|
import { trace } from "@dxos/tracing";
|
|
1956
1956
|
import { ComplexMap as ComplexMap4, setDeep, deferFunction, forEachAsync } from "@dxos/util";
|
|
1957
1957
|
|
|
1958
|
-
//
|
|
1958
|
+
// src/packlets/spaces/genesis.ts
|
|
1959
1959
|
import { createCredential } from "@dxos/credentials";
|
|
1960
1960
|
import { failUndefined } from "@dxos/debug";
|
|
1961
1961
|
import { AdmittedFeed, SpaceMember as SpaceMember2 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
@@ -2025,14 +2025,14 @@ var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
|
|
|
2025
2025
|
return credentials;
|
|
2026
2026
|
};
|
|
2027
2027
|
|
|
2028
|
-
//
|
|
2028
|
+
// src/packlets/spaces/data-space-manager.ts
|
|
2029
2029
|
function _ts_decorate3(decorators, target, key, desc) {
|
|
2030
2030
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2031
2031
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2032
2032
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2033
2033
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2034
2034
|
}
|
|
2035
|
-
var __dxlog_file10 = "/
|
|
2035
|
+
var __dxlog_file10 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
|
|
2036
2036
|
var PRESENCE_ANNOUNCE_INTERVAL = 1e4;
|
|
2037
2037
|
var PRESENCE_OFFLINE_TIMEOUT = 2e4;
|
|
2038
2038
|
var DEFAULT_SPACE_KEY = "__DEFAULT__";
|
|
@@ -2760,7 +2760,7 @@ DataSpaceManager = _ts_decorate3([
|
|
|
2760
2760
|
trackLeaks("open", "close")
|
|
2761
2761
|
], DataSpaceManager);
|
|
2762
2762
|
|
|
2763
|
-
//
|
|
2763
|
+
// src/packlets/spaces/spaces-service.ts
|
|
2764
2764
|
import { SubscriptionList as SubscriptionList2, UpdateScheduler, scheduleTask as scheduleTask3 } from "@dxos/async";
|
|
2765
2765
|
import { Stream as Stream7 } from "@dxos/codec-protobuf/stream";
|
|
2766
2766
|
import { createAdmissionCredentials as createAdmissionCredentials2, createDidFromIdentityKey as createDidFromIdentityKey2, getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credentials";
|
|
@@ -2773,7 +2773,7 @@ import { encodeError, ApiError, AuthorizationError, IdentityNotInitializedError,
|
|
|
2773
2773
|
import { SpaceMember as SpaceMember4, SpaceState as SpaceState2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
2774
2774
|
import { trace as trace2 } from "@dxos/tracing";
|
|
2775
2775
|
|
|
2776
|
-
//
|
|
2776
|
+
// src/packlets/space-export/space-archive-writer.ts
|
|
2777
2777
|
import { Resource as Resource5 } from "@dxos/context";
|
|
2778
2778
|
import { assertArgument as assertArgument2, assertState as assertState2 } from "@dxos/invariant";
|
|
2779
2779
|
import { SpaceArchiveFileStructure, SpaceArchiveVersion } from "@dxos/protocols";
|
|
@@ -2829,11 +2829,11 @@ var SpaceArchiveWriter = class extends Resource5 {
|
|
|
2829
2829
|
}
|
|
2830
2830
|
};
|
|
2831
2831
|
|
|
2832
|
-
//
|
|
2832
|
+
// src/packlets/space-export/space-archive-reader.ts
|
|
2833
2833
|
import { assertArgument as assertArgument3, failedInvariant as failedInvariant2, invariant as invariant6 } from "@dxos/invariant";
|
|
2834
2834
|
import { log as log8 } from "@dxos/log";
|
|
2835
2835
|
import { SpaceArchiveFileStructure as SpaceArchiveFileStructure2 } from "@dxos/protocols";
|
|
2836
|
-
var __dxlog_file11 = "/
|
|
2836
|
+
var __dxlog_file11 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/space-export/space-archive-reader.ts";
|
|
2837
2837
|
var extractSpaceArchive = async (archive) => {
|
|
2838
2838
|
const { Archive } = await import("@obsidize/tar-browserify");
|
|
2839
2839
|
const { entries } = await Archive.extract(archive.contents);
|
|
@@ -2869,7 +2869,7 @@ var extractSpaceArchive = async (archive) => {
|
|
|
2869
2869
|
};
|
|
2870
2870
|
};
|
|
2871
2871
|
|
|
2872
|
-
//
|
|
2872
|
+
// src/packlets/spaces/spaces-service.ts
|
|
2873
2873
|
function _ts_add_disposable_resource2(env, value, async) {
|
|
2874
2874
|
if (value !== null && value !== void 0) {
|
|
2875
2875
|
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
@@ -2935,7 +2935,7 @@ function _ts_dispose_resources2(env) {
|
|
|
2935
2935
|
return next();
|
|
2936
2936
|
})(env);
|
|
2937
2937
|
}
|
|
2938
|
-
var __dxlog_file12 = "/
|
|
2938
|
+
var __dxlog_file12 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
2939
2939
|
var SpacesServiceImpl = class {
|
|
2940
2940
|
constructor(_identityManager, _spaceManager, _getDataSpaceManager) {
|
|
2941
2941
|
this._identityManager = _identityManager;
|
|
@@ -3322,14 +3322,14 @@ var SpacesServiceImpl = class {
|
|
|
3322
3322
|
};
|
|
3323
3323
|
var getChannelId = (channel) => `user-channel/${channel}`;
|
|
3324
3324
|
|
|
3325
|
-
//
|
|
3325
|
+
// src/packlets/identity/identity.ts
|
|
3326
3326
|
function _ts_decorate4(decorators, target, key, desc) {
|
|
3327
3327
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3328
3328
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3329
3329
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3330
3330
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3331
3331
|
}
|
|
3332
|
-
var __dxlog_file13 = "/
|
|
3332
|
+
var __dxlog_file13 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
|
|
3333
3333
|
var Identity = class {
|
|
3334
3334
|
constructor(params) {
|
|
3335
3335
|
this._edgeFeedReplicator = void 0;
|
|
@@ -3546,7 +3546,7 @@ Identity = _ts_decorate4([
|
|
|
3546
3546
|
trace3.resource()
|
|
3547
3547
|
], Identity);
|
|
3548
3548
|
|
|
3549
|
-
//
|
|
3549
|
+
// src/packlets/identity/identity-manager.ts
|
|
3550
3550
|
import platform from "platform";
|
|
3551
3551
|
import { Event as Event6 } from "@dxos/async";
|
|
3552
3552
|
import { Context as Context5 } from "@dxos/context";
|
|
@@ -3567,7 +3567,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3567
3567
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3568
3568
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3569
3569
|
}
|
|
3570
|
-
var __dxlog_file14 = "/
|
|
3570
|
+
var __dxlog_file14 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
|
|
3571
3571
|
var DEVICE_PRESENCE_ANNOUNCE_INTERVAL = 1e4;
|
|
3572
3572
|
var DEVICE_PRESENCE_OFFLINE_TIMEOUT = 2e4;
|
|
3573
3573
|
var IdentityManager = class {
|
|
@@ -4027,7 +4027,7 @@ IdentityManager = _ts_decorate5([
|
|
|
4027
4027
|
Trace2.resource()
|
|
4028
4028
|
], IdentityManager);
|
|
4029
4029
|
|
|
4030
|
-
//
|
|
4030
|
+
// src/packlets/identity/identity-service.ts
|
|
4031
4031
|
import { Trigger as Trigger4, sleep as sleep2 } from "@dxos/async";
|
|
4032
4032
|
import { Stream as Stream8 } from "@dxos/codec-protobuf/stream";
|
|
4033
4033
|
import { Resource as Resource6 } from "@dxos/context";
|
|
@@ -4036,7 +4036,7 @@ import { invariant as invariant10 } from "@dxos/invariant";
|
|
|
4036
4036
|
import { log as log12 } from "@dxos/log";
|
|
4037
4037
|
import { SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
4038
4038
|
import { safeAwaitAll } from "@dxos/util";
|
|
4039
|
-
var __dxlog_file15 = "/
|
|
4039
|
+
var __dxlog_file15 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
|
|
4040
4040
|
var DEFAULT_SPACE_SEARCH_TIMEOUT = 1e4;
|
|
4041
4041
|
var IdentityServiceImpl = class extends Resource6 {
|
|
4042
4042
|
constructor(_identityManager, _recoveryManager, _keyring, _dataSpaceManagerProvider, _createIdentity, _onProfileUpdate) {
|
|
@@ -4218,7 +4218,7 @@ var IdentityServiceImpl = class extends Resource6 {
|
|
|
4218
4218
|
}
|
|
4219
4219
|
};
|
|
4220
4220
|
|
|
4221
|
-
//
|
|
4221
|
+
// src/packlets/spaces/data-space.ts
|
|
4222
4222
|
function _ts_decorate6(decorators, target, key, desc) {
|
|
4223
4223
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4224
4224
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4290,7 +4290,7 @@ function _ts_dispose_resources3(env) {
|
|
|
4290
4290
|
return next();
|
|
4291
4291
|
})(env);
|
|
4292
4292
|
}
|
|
4293
|
-
var __dxlog_file16 = "/
|
|
4293
|
+
var __dxlog_file16 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
4294
4294
|
var DataSpace = class {
|
|
4295
4295
|
constructor(params) {
|
|
4296
4296
|
this._ctx = new Context6(void 0, {
|
|
@@ -4889,12 +4889,12 @@ DataSpace = _ts_decorate6([
|
|
|
4889
4889
|
trace5.resource()
|
|
4890
4890
|
], DataSpace);
|
|
4891
4891
|
|
|
4892
|
-
//
|
|
4892
|
+
// src/packlets/invitations/device-invitation-protocol.ts
|
|
4893
4893
|
import { getCredentialAssertion as getCredentialAssertion4 } from "@dxos/credentials";
|
|
4894
4894
|
import { invariant as invariant12 } from "@dxos/invariant";
|
|
4895
4895
|
import { AlreadyJoinedError as AlreadyJoinedError2 } from "@dxos/protocols";
|
|
4896
4896
|
import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
4897
|
-
var __dxlog_file17 = "/
|
|
4897
|
+
var __dxlog_file17 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
|
|
4898
4898
|
var DeviceInvitationProtocol = class {
|
|
4899
4899
|
constructor(_keyring, _getIdentity, _acceptIdentity) {
|
|
4900
4900
|
this._keyring = _keyring;
|
|
@@ -5014,7 +5014,7 @@ var DeviceInvitationProtocol = class {
|
|
|
5014
5014
|
}
|
|
5015
5015
|
};
|
|
5016
5016
|
|
|
5017
|
-
//
|
|
5017
|
+
// src/packlets/invitations/invitations-handler.ts
|
|
5018
5018
|
import { scheduleTask as scheduleTask7, TimeoutError as TimeoutError2 } from "@dxos/async";
|
|
5019
5019
|
import { INVITATION_TIMEOUT, getExpirationTime } from "@dxos/client-protocol";
|
|
5020
5020
|
import { ContextDisposedError as ContextDisposedError3 } from "@dxos/context";
|
|
@@ -5030,7 +5030,7 @@ import { InvitationOptions as InvitationOptions4 } from "@dxos/protocols/proto/d
|
|
|
5030
5030
|
import { trace as _trace } from "@dxos/tracing";
|
|
5031
5031
|
import { ComplexSet as ComplexSet5 } from "@dxos/util";
|
|
5032
5032
|
|
|
5033
|
-
//
|
|
5033
|
+
// src/packlets/invitations/edge-invitation-handler.ts
|
|
5034
5034
|
import { scheduleMicroTask as scheduleMicroTask3, scheduleTask as scheduleTask5 } from "@dxos/async";
|
|
5035
5035
|
import { sign } from "@dxos/crypto";
|
|
5036
5036
|
import { invariant as invariant13 } from "@dxos/invariant";
|
|
@@ -5040,7 +5040,7 @@ import { EdgeAuthChallengeError, EdgeCallFailedError as EdgeCallFailedError2 } f
|
|
|
5040
5040
|
import { schema as schema3 } from "@dxos/protocols/proto";
|
|
5041
5041
|
import { Invitation as Invitation4 } from "@dxos/protocols/proto/dxos/client/services";
|
|
5042
5042
|
|
|
5043
|
-
//
|
|
5043
|
+
// src/packlets/invitations/utils.ts
|
|
5044
5044
|
import { cancelWithContext as cancelWithContext3, ContextDisposedError as ContextDisposedError2 } from "@dxos/context";
|
|
5045
5045
|
import { Invitation as Invitation3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
5046
5046
|
var stateToString = (state) => {
|
|
@@ -5065,8 +5065,8 @@ var tryAcquireBeforeContextDisposed = async (ctx, mutex) => {
|
|
|
5065
5065
|
})());
|
|
5066
5066
|
};
|
|
5067
5067
|
|
|
5068
|
-
//
|
|
5069
|
-
var __dxlog_file18 = "/
|
|
5068
|
+
// src/packlets/invitations/edge-invitation-handler.ts
|
|
5069
|
+
var __dxlog_file18 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/edge-invitation-handler.ts";
|
|
5070
5070
|
var MAX_RETRIES_PER_INVITATION = 5;
|
|
5071
5071
|
var DEFAULT_REQUEST_RETRY_INTERVAL_MS = 3e3;
|
|
5072
5072
|
var DEFAULT_REQUEST_RETRY_JITTER_MS = 500;
|
|
@@ -5221,7 +5221,7 @@ var EdgeInvitationHandler = class {
|
|
|
5221
5221
|
}
|
|
5222
5222
|
};
|
|
5223
5223
|
|
|
5224
|
-
//
|
|
5224
|
+
// src/packlets/invitations/invitation-guest-extenstion.ts
|
|
5225
5225
|
import { Trigger as Trigger5 } from "@dxos/async";
|
|
5226
5226
|
import { cancelWithContext as cancelWithContext4, Context as Context7 } from "@dxos/context";
|
|
5227
5227
|
import { invariant as invariant14 } from "@dxos/invariant";
|
|
@@ -5230,7 +5230,7 @@ import { InvalidInvitationExtensionRoleError } from "@dxos/protocols";
|
|
|
5230
5230
|
import { schema as schema4 } from "@dxos/protocols/proto";
|
|
5231
5231
|
import { InvitationOptions } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
5232
5232
|
import { RpcExtension as RpcExtension2 } from "@dxos/teleport";
|
|
5233
|
-
var __dxlog_file19 = "/
|
|
5233
|
+
var __dxlog_file19 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-guest-extenstion.ts";
|
|
5234
5234
|
var OPTIONS_TIMEOUT = 1e4;
|
|
5235
5235
|
var InvitationGuestExtension = class extends RpcExtension2 {
|
|
5236
5236
|
constructor(_invitationFlowMutex, _callbacks) {
|
|
@@ -5349,7 +5349,7 @@ var InvitationGuestExtension = class extends RpcExtension2 {
|
|
|
5349
5349
|
}
|
|
5350
5350
|
};
|
|
5351
5351
|
|
|
5352
|
-
//
|
|
5352
|
+
// src/packlets/invitations/invitation-host-extension.ts
|
|
5353
5353
|
import { Trigger as Trigger6, scheduleTask as scheduleTask6 } from "@dxos/async";
|
|
5354
5354
|
import { cancelWithContext as cancelWithContext5, Context as Context8 } from "@dxos/context";
|
|
5355
5355
|
import { randomBytes, verify } from "@dxos/crypto";
|
|
@@ -5361,7 +5361,7 @@ import { schema as schema5 } from "@dxos/protocols/proto";
|
|
|
5361
5361
|
import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
|
|
5362
5362
|
import { AuthenticationResponse, InvitationOptions as InvitationOptions2 } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
5363
5363
|
import { RpcExtension as RpcExtension3 } from "@dxos/teleport";
|
|
5364
|
-
var __dxlog_file20 = "/
|
|
5364
|
+
var __dxlog_file20 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-host-extension.ts";
|
|
5365
5365
|
var OPTIONS_TIMEOUT2 = 1e4;
|
|
5366
5366
|
var MAX_OTP_ATTEMPTS = 3;
|
|
5367
5367
|
var InvitationHostExtension = class extends RpcExtension3 {
|
|
@@ -5681,11 +5681,11 @@ var InvitationHostExtension = class extends RpcExtension3 {
|
|
|
5681
5681
|
};
|
|
5682
5682
|
var isAuthenticationRequired = (invitation) => invitation.authMethod !== Invitation5.AuthMethod.NONE;
|
|
5683
5683
|
|
|
5684
|
-
//
|
|
5684
|
+
// src/packlets/invitations/invitation-state.ts
|
|
5685
5685
|
import { Mutex as Mutex3 } from "@dxos/async";
|
|
5686
5686
|
import { log as log17 } from "@dxos/log";
|
|
5687
5687
|
import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
|
|
5688
|
-
var __dxlog_file21 = "/
|
|
5688
|
+
var __dxlog_file21 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-state.ts";
|
|
5689
5689
|
var createGuardedInvitationState = (ctx, invitation, stream) => {
|
|
5690
5690
|
const mutex = new Mutex3();
|
|
5691
5691
|
let lastActiveLockHolder = null;
|
|
@@ -5777,13 +5777,13 @@ var isNonTerminalState = (currentState) => {
|
|
|
5777
5777
|
].includes(currentState);
|
|
5778
5778
|
};
|
|
5779
5779
|
|
|
5780
|
-
//
|
|
5780
|
+
// src/packlets/invitations/invitation-topology.ts
|
|
5781
5781
|
import { invariant as invariant16 } from "@dxos/invariant";
|
|
5782
5782
|
import { PublicKey as PublicKey10 } from "@dxos/keys";
|
|
5783
5783
|
import { log as log18 } from "@dxos/log";
|
|
5784
5784
|
import { InvitationOptions as InvitationOptions3 } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
5785
5785
|
import { ComplexSet as ComplexSet4 } from "@dxos/util";
|
|
5786
|
-
var __dxlog_file22 = "/
|
|
5786
|
+
var __dxlog_file22 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-topology.ts";
|
|
5787
5787
|
var InvitationTopology = class {
|
|
5788
5788
|
constructor(_role) {
|
|
5789
5789
|
this._role = _role;
|
|
@@ -5855,8 +5855,8 @@ var InvitationTopology = class {
|
|
|
5855
5855
|
}
|
|
5856
5856
|
};
|
|
5857
5857
|
|
|
5858
|
-
//
|
|
5859
|
-
var __dxlog_file23 = "/
|
|
5858
|
+
// src/packlets/invitations/invitations-handler.ts
|
|
5859
|
+
var __dxlog_file23 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
5860
5860
|
var metrics = _trace.metrics;
|
|
5861
5861
|
var MAX_DELEGATED_INVITATION_HOST_TRIES = 3;
|
|
5862
5862
|
var InvitationsHandler = class {
|
|
@@ -6454,7 +6454,7 @@ var createAdmissionKeypair = () => {
|
|
|
6454
6454
|
};
|
|
6455
6455
|
};
|
|
6456
6456
|
|
|
6457
|
-
//
|
|
6457
|
+
// src/packlets/invitations/invitations-service.ts
|
|
6458
6458
|
import { Stream as Stream9 } from "@dxos/codec-protobuf/stream";
|
|
6459
6459
|
import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
6460
6460
|
import { trace as trace8 } from "@dxos/tracing";
|
|
@@ -6555,7 +6555,7 @@ var InvitationsServiceImpl = class {
|
|
|
6555
6555
|
}
|
|
6556
6556
|
};
|
|
6557
6557
|
|
|
6558
|
-
//
|
|
6558
|
+
// src/packlets/invitations/space-invitation-protocol.ts
|
|
6559
6559
|
import { createCancelDelegatedSpaceInvitationCredential, createDelegatedSpaceInvitationCredential, getCredentialAssertion as getCredentialAssertion5 } from "@dxos/credentials";
|
|
6560
6560
|
import { writeMessages as writeMessages4 } from "@dxos/feed-store";
|
|
6561
6561
|
import { invariant as invariant18 } from "@dxos/invariant";
|
|
@@ -6563,7 +6563,7 @@ import { log as log20 } from "@dxos/log";
|
|
|
6563
6563
|
import { AlreadyJoinedError as AlreadyJoinedError3, AuthorizationError as AuthorizationError2, InvalidInvitationError as InvalidInvitationError2, SpaceNotFoundError as SpaceNotFoundError2 } from "@dxos/protocols";
|
|
6564
6564
|
import { Invitation as Invitation8 } from "@dxos/protocols/proto/dxos/client/services";
|
|
6565
6565
|
import { SpaceMember as SpaceMember6 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
6566
|
-
var __dxlog_file24 = "/
|
|
6566
|
+
var __dxlog_file24 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
6567
6567
|
var SpaceInvitationProtocol = class {
|
|
6568
6568
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
6569
6569
|
this._spaceManager = _spaceManager;
|
|
@@ -6837,7 +6837,7 @@ var SpaceInvitationProtocol = class {
|
|
|
6837
6837
|
}
|
|
6838
6838
|
};
|
|
6839
6839
|
|
|
6840
|
-
//
|
|
6840
|
+
// src/packlets/invitations/invitations-manager.ts
|
|
6841
6841
|
import { Event as Event8, PushStream, TimeoutError as TimeoutError3, Trigger as Trigger7 } from "@dxos/async";
|
|
6842
6842
|
import { AuthenticatingInvitation, AUTHENTICATION_CODE_LENGTH, CancellableInvitation, INVITATION_TIMEOUT as INVITATION_TIMEOUT2 } from "@dxos/client-protocol";
|
|
6843
6843
|
import { Context as Context9 } from "@dxos/context";
|
|
@@ -6848,7 +6848,7 @@ import { PublicKey as PublicKey12 } from "@dxos/keys";
|
|
|
6848
6848
|
import { log as log21 } from "@dxos/log";
|
|
6849
6849
|
import { Invitation as Invitation9 } from "@dxos/protocols/proto/dxos/client/services";
|
|
6850
6850
|
import { SpaceMember as SpaceMember7 } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
6851
|
-
var __dxlog_file25 = "/
|
|
6851
|
+
var __dxlog_file25 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-manager.ts";
|
|
6852
6852
|
var InvitationsManager = class {
|
|
6853
6853
|
constructor(_invitationsHandler, _getHandler, _metadataStore) {
|
|
6854
6854
|
this._invitationsHandler = _invitationsHandler;
|
|
@@ -7209,7 +7209,7 @@ var InvitationsManager = class {
|
|
|
7209
7209
|
}
|
|
7210
7210
|
};
|
|
7211
7211
|
|
|
7212
|
-
//
|
|
7212
|
+
// src/packlets/locks/browser.ts
|
|
7213
7213
|
import { asyncTimeout as asyncTimeout2, Trigger as Trigger8 } from "@dxos/async";
|
|
7214
7214
|
import { RESOURCE_LOCK_TIMEOUT } from "@dxos/client-protocol";
|
|
7215
7215
|
import { log as log22, logInfo as logInfo3 } from "@dxos/log";
|
|
@@ -7219,7 +7219,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
7219
7219
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7220
7220
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7221
7221
|
}
|
|
7222
|
-
var __dxlog_file26 = "/
|
|
7222
|
+
var __dxlog_file26 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/locks/browser.ts";
|
|
7223
7223
|
var Lock = class {
|
|
7224
7224
|
constructor({ lockKey, onAcquire, onRelease }) {
|
|
7225
7225
|
this._broadcastChannel = new BroadcastChannel("vault-resource-lock");
|
|
@@ -7325,7 +7325,7 @@ var isLocked = (lockPath) => {
|
|
|
7325
7325
|
throw new Error("Not implemented");
|
|
7326
7326
|
};
|
|
7327
7327
|
|
|
7328
|
-
//
|
|
7328
|
+
// src/packlets/services/client-rpc-server.ts
|
|
7329
7329
|
import { Stream as Stream10 } from "@dxos/codec-protobuf";
|
|
7330
7330
|
import { raise as raise2 } from "@dxos/debug";
|
|
7331
7331
|
import { parseMethodName, RpcPeer } from "@dxos/rpc";
|
|
@@ -7402,7 +7402,7 @@ ClientRpcServer = _ts_decorate8([
|
|
|
7402
7402
|
trace9.resource()
|
|
7403
7403
|
], ClientRpcServer);
|
|
7404
7404
|
|
|
7405
|
-
//
|
|
7405
|
+
// src/packlets/agents/edge-agent-manager.ts
|
|
7406
7406
|
import { DeferredTask as DeferredTask2, Event as Event9, scheduleTask as scheduleTask8, synchronized as synchronized3 } from "@dxos/async";
|
|
7407
7407
|
import { Resource as Resource7 } from "@dxos/context";
|
|
7408
7408
|
import { invariant as invariant20 } from "@dxos/invariant";
|
|
@@ -7417,7 +7417,7 @@ function _ts_decorate9(decorators, target, key, desc) {
|
|
|
7417
7417
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7418
7418
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7419
7419
|
}
|
|
7420
|
-
var __dxlog_file27 = "/
|
|
7420
|
+
var __dxlog_file27 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/agents/edge-agent-manager.ts";
|
|
7421
7421
|
var AGENT_STATUS_QUERY_RETRY_INTERVAL = 5e3;
|
|
7422
7422
|
var AGENT_STATUS_QUERY_RETRY_JITTER = 1e3;
|
|
7423
7423
|
var AGENT_FEED_ADDED_CHECK_INTERVAL_MS = 3e3;
|
|
@@ -7638,7 +7638,7 @@ _ts_decorate9([
|
|
|
7638
7638
|
synchronized3
|
|
7639
7639
|
], EdgeAgentManager.prototype, "createAgent", null);
|
|
7640
7640
|
|
|
7641
|
-
//
|
|
7641
|
+
// src/packlets/agents/edge-agent-service.ts
|
|
7642
7642
|
import { Stream as Stream11 } from "@dxos/codec-protobuf/stream";
|
|
7643
7643
|
import { EdgeAgentStatus as EdgeAgentStatus2 } from "@dxos/protocols";
|
|
7644
7644
|
import { QueryAgentStatusResponse, EdgeStatus as EdgeStatus2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -7693,7 +7693,7 @@ var mapStatus = (agentStatus) => {
|
|
|
7693
7693
|
}
|
|
7694
7694
|
};
|
|
7695
7695
|
|
|
7696
|
-
//
|
|
7696
|
+
// src/packlets/services/service-context.ts
|
|
7697
7697
|
import { Mutex as Mutex4, Trigger as Trigger9 } from "@dxos/async";
|
|
7698
7698
|
import { Context as Context10, Resource as Resource8 } from "@dxos/context";
|
|
7699
7699
|
import { getCredentialAssertion as getCredentialAssertion6 } from "@dxos/credentials";
|
|
@@ -7711,7 +7711,7 @@ import { BlobStore } from "@dxos/teleport-extension-object-sync";
|
|
|
7711
7711
|
import { trace as Trace3 } from "@dxos/tracing";
|
|
7712
7712
|
import { safeInstanceof } from "@dxos/util";
|
|
7713
7713
|
|
|
7714
|
-
//
|
|
7714
|
+
// src/packlets/identity/identity-recovery-manager.ts
|
|
7715
7715
|
import { generateSeedPhrase, keyPairFromSeedPhrase } from "@dxos/credentials";
|
|
7716
7716
|
import { sign as sign3 } from "@dxos/crypto";
|
|
7717
7717
|
import { invariant as invariant21 } from "@dxos/invariant";
|
|
@@ -7720,7 +7720,7 @@ import { log as log24 } from "@dxos/log";
|
|
|
7720
7720
|
import { EdgeAuthChallengeError as EdgeAuthChallengeError2 } from "@dxos/protocols";
|
|
7721
7721
|
import { schema as schema6 } from "@dxos/protocols/proto";
|
|
7722
7722
|
import { Timeframe as Timeframe5 } from "@dxos/timeframe";
|
|
7723
|
-
var __dxlog_file28 = "/
|
|
7723
|
+
var __dxlog_file28 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-recovery-manager.ts";
|
|
7724
7724
|
var EdgeIdentityRecoveryManager = class {
|
|
7725
7725
|
constructor(_keyring, _edgeClient, _identityProvider, _acceptRecoveredIdentity) {
|
|
7726
7726
|
this._keyring = _keyring;
|
|
@@ -7927,7 +7927,7 @@ var decodeCredential = (credentialBase64) => {
|
|
|
7927
7927
|
return codec.decode(credentialBytes);
|
|
7928
7928
|
};
|
|
7929
7929
|
|
|
7930
|
-
//
|
|
7930
|
+
// src/packlets/services/service-context.ts
|
|
7931
7931
|
function _ts_decorate10(decorators, target, key, desc) {
|
|
7932
7932
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7933
7933
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -7999,7 +7999,7 @@ function _ts_dispose_resources4(env) {
|
|
|
7999
7999
|
return next();
|
|
8000
8000
|
})(env);
|
|
8001
8001
|
}
|
|
8002
|
-
var __dxlog_file29 = "/
|
|
8002
|
+
var __dxlog_file29 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
8003
8003
|
var ServiceContext = class extends Resource8 {
|
|
8004
8004
|
constructor(storage, level, networkManager, signalManager, _edgeConnection, _edgeHttpClient, _runtimeParams, _edgeFeatures) {
|
|
8005
8005
|
super(), this.storage = storage, this.level = level, this.networkManager = networkManager, this.signalManager = signalManager, this._edgeConnection = _edgeConnection, this._edgeHttpClient = _edgeHttpClient, this._runtimeParams = _runtimeParams, this._edgeFeatures = _edgeFeatures, this._edgeIdentityUpdateMutex = new Mutex4(), this.initialized = new Trigger9(), this._meshReplicator = void 0, this._echoEdgeReplicator = void 0, this._handlerFactories = /* @__PURE__ */ new Map(), this._instanceId = PublicKey15.random().toHex();
|
|
@@ -8369,7 +8369,7 @@ ServiceContext = _ts_decorate10([
|
|
|
8369
8369
|
Trace3.resource()
|
|
8370
8370
|
], ServiceContext);
|
|
8371
8371
|
|
|
8372
|
-
//
|
|
8372
|
+
// src/packlets/services/service-registry.ts
|
|
8373
8373
|
var ServiceRegistry = class {
|
|
8374
8374
|
// prettier-ignore
|
|
8375
8375
|
constructor(_serviceBundle, _handlers = {}) {
|
|
@@ -8393,12 +8393,12 @@ var ServiceRegistry = class {
|
|
|
8393
8393
|
}
|
|
8394
8394
|
};
|
|
8395
8395
|
|
|
8396
|
-
//
|
|
8396
|
+
// src/packlets/storage/storage.ts
|
|
8397
8397
|
import { InvalidConfigError } from "@dxos/protocols";
|
|
8398
8398
|
import { Runtime as Runtime2 } from "@dxos/protocols/proto/dxos/config";
|
|
8399
8399
|
import { createStorage, StorageType } from "@dxos/random-access-storage";
|
|
8400
8400
|
|
|
8401
|
-
//
|
|
8401
|
+
// src/packlets/storage/util.ts
|
|
8402
8402
|
import { DX_DATA } from "@dxos/client-protocol";
|
|
8403
8403
|
import { Runtime } from "@dxos/protocols/proto/dxos/config";
|
|
8404
8404
|
import { isNode as isNode2 } from "@dxos/util";
|
|
@@ -8411,7 +8411,7 @@ var isPersistent = (config) => {
|
|
|
8411
8411
|
return config.dataStore !== void 0 && config.dataStore !== Runtime.Client.Storage.StorageDriver.RAM || persistent;
|
|
8412
8412
|
};
|
|
8413
8413
|
|
|
8414
|
-
//
|
|
8414
|
+
// src/packlets/storage/storage.ts
|
|
8415
8415
|
var StorageDriver = Runtime2.Client.Storage.StorageDriver;
|
|
8416
8416
|
var createStorageObjects = (config) => {
|
|
8417
8417
|
const { persistent = false, keyStore, dataStore } = config ?? {};
|
|
@@ -8455,7 +8455,7 @@ var toStorageType = (type) => {
|
|
|
8455
8455
|
}
|
|
8456
8456
|
};
|
|
8457
8457
|
|
|
8458
|
-
//
|
|
8458
|
+
// src/packlets/storage/level.ts
|
|
8459
8459
|
import path from "@dxos/node-std/path";
|
|
8460
8460
|
import { PublicKey as PublicKey16 } from "@dxos/keys";
|
|
8461
8461
|
import { createLevel as createKV } from "@dxos/kv-store";
|
|
@@ -8467,13 +8467,13 @@ var createLevel = async (config) => {
|
|
|
8467
8467
|
return level;
|
|
8468
8468
|
};
|
|
8469
8469
|
|
|
8470
|
-
//
|
|
8470
|
+
// src/packlets/storage/profile-archive.ts
|
|
8471
8471
|
import { cbor } from "@automerge/automerge-repo";
|
|
8472
8472
|
import { invariant as invariant23 } from "@dxos/invariant";
|
|
8473
8473
|
import { log as log26 } from "@dxos/log";
|
|
8474
8474
|
import { ProfileArchiveEntryType } from "@dxos/protocols";
|
|
8475
8475
|
import { arrayToBuffer as arrayToBuffer2 } from "@dxos/util";
|
|
8476
|
-
var __dxlog_file30 = "/
|
|
8476
|
+
var __dxlog_file30 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/storage/profile-archive.ts";
|
|
8477
8477
|
var encodeProfileArchive = (profile) => cbor.encode(profile);
|
|
8478
8478
|
var decodeProfileArchive = (data) => cbor.decode(data);
|
|
8479
8479
|
var exportProfileData = async ({ storage, level }) => {
|
|
@@ -8626,7 +8626,7 @@ var importProfileData = async ({ storage, level }, archive) => {
|
|
|
8626
8626
|
await batch.write();
|
|
8627
8627
|
};
|
|
8628
8628
|
|
|
8629
|
-
//
|
|
8629
|
+
// src/packlets/services/service-host.ts
|
|
8630
8630
|
import { Event as Event11, synchronized as synchronized4 } from "@dxos/async";
|
|
8631
8631
|
import { clientServiceBundle } from "@dxos/client-protocol";
|
|
8632
8632
|
import { Context as Context11 } from "@dxos/context";
|
|
@@ -8641,12 +8641,12 @@ import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
|
8641
8641
|
import { TRACE_PROCESSOR as TRACE_PROCESSOR3, trace as Trace4 } from "@dxos/tracing";
|
|
8642
8642
|
import { WebsocketRpcClient } from "@dxos/websocket-rpc";
|
|
8643
8643
|
|
|
8644
|
-
//
|
|
8644
|
+
// src/packlets/devices/devices-service.ts
|
|
8645
8645
|
import { SubscriptionList as SubscriptionList3 } from "@dxos/async";
|
|
8646
8646
|
import { Stream as Stream12 } from "@dxos/codec-protobuf/stream";
|
|
8647
8647
|
import { invariant as invariant24 } from "@dxos/invariant";
|
|
8648
8648
|
import { Device as Device2, DeviceKind as DeviceKind2, EdgeStatus as EdgeStatus3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
8649
|
-
var __dxlog_file31 = "/
|
|
8649
|
+
var __dxlog_file31 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
|
|
8650
8650
|
var DevicesServiceImpl = class {
|
|
8651
8651
|
constructor(_identityManager, _edgeConnection) {
|
|
8652
8652
|
this._identityManager = _identityManager;
|
|
@@ -8731,7 +8731,7 @@ var DevicesServiceImpl = class {
|
|
|
8731
8731
|
}
|
|
8732
8732
|
};
|
|
8733
8733
|
|
|
8734
|
-
//
|
|
8734
|
+
// src/packlets/identity/contacts-service.ts
|
|
8735
8735
|
import { scheduleTask as scheduleTask9, UpdateScheduler as UpdateScheduler2, SubscriptionList as SubscriptionList4 } from "@dxos/async";
|
|
8736
8736
|
import { Stream as Stream13 } from "@dxos/codec-protobuf/stream";
|
|
8737
8737
|
import { PublicKey as PublicKey17 } from "@dxos/keys";
|
|
@@ -8814,7 +8814,7 @@ var ContactsServiceImpl = class {
|
|
|
8814
8814
|
}
|
|
8815
8815
|
};
|
|
8816
8816
|
|
|
8817
|
-
//
|
|
8817
|
+
// src/packlets/logging/logging-service.ts
|
|
8818
8818
|
import { Event as Event10 } from "@dxos/async";
|
|
8819
8819
|
import { Stream as Stream14 } from "@dxos/codec-protobuf/stream";
|
|
8820
8820
|
import { PublicKey as PublicKey18 } from "@dxos/keys";
|
|
@@ -8938,7 +8938,7 @@ var shouldLog = (entry2, request) => {
|
|
|
8938
8938
|
};
|
|
8939
8939
|
var LOG_PROCESSING = 0;
|
|
8940
8940
|
|
|
8941
|
-
//
|
|
8941
|
+
// src/packlets/network/network-service.ts
|
|
8942
8942
|
import { Stream as Stream15 } from "@dxos/codec-protobuf/stream";
|
|
8943
8943
|
var NetworkServiceImpl = class {
|
|
8944
8944
|
constructor(networkManager, signalManager, edgeConnection) {
|
|
@@ -8998,7 +8998,7 @@ var NetworkServiceImpl = class {
|
|
|
8998
8998
|
}
|
|
8999
8999
|
};
|
|
9000
9000
|
|
|
9001
|
-
//
|
|
9001
|
+
// src/packlets/system/system-service.ts
|
|
9002
9002
|
import { Stream as Stream16 } from "@dxos/codec-protobuf/stream";
|
|
9003
9003
|
import { GetDiagnosticsRequest as GetDiagnosticsRequest2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
9004
9004
|
import { jsonKeyReplacer as jsonKeyReplacer2 } from "@dxos/util";
|
|
@@ -9055,14 +9055,14 @@ var SystemServiceImpl = class {
|
|
|
9055
9055
|
}
|
|
9056
9056
|
};
|
|
9057
9057
|
|
|
9058
|
-
//
|
|
9058
|
+
// src/packlets/services/service-host.ts
|
|
9059
9059
|
function _ts_decorate11(decorators, target, key, desc) {
|
|
9060
9060
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9061
9061
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9062
9062
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9063
9063
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9064
9064
|
}
|
|
9065
|
-
var __dxlog_file32 = "/
|
|
9065
|
+
var __dxlog_file32 = "/__w/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
9066
9066
|
var ClientServicesHost = class {
|
|
9067
9067
|
constructor({
|
|
9068
9068
|
config,
|
|
@@ -9200,12 +9200,12 @@ var ClientServicesHost = class {
|
|
|
9200
9200
|
C: (f, a) => f(...a)
|
|
9201
9201
|
});
|
|
9202
9202
|
}
|
|
9203
|
-
const
|
|
9204
|
-
if (
|
|
9203
|
+
const endpoint = config?.get("runtime.services.edge.url");
|
|
9204
|
+
if (endpoint) {
|
|
9205
9205
|
this._edgeConnection = new EdgeClient(createStubEdgeIdentity(), {
|
|
9206
|
-
socketEndpoint:
|
|
9206
|
+
socketEndpoint: endpoint
|
|
9207
9207
|
});
|
|
9208
|
-
this._edgeHttpClient = new EdgeHttpClient(
|
|
9208
|
+
this._edgeHttpClient = new EdgeHttpClient(endpoint);
|
|
9209
9209
|
}
|
|
9210
9210
|
const { connectionLog = true, transportFactory = createRtcTransportFactory({
|
|
9211
9211
|
iceServers: this._config?.get("runtime.services.ice")
|
|
@@ -9506,4 +9506,4 @@ export {
|
|
|
9506
9506
|
importProfileData,
|
|
9507
9507
|
ClientServicesHost
|
|
9508
9508
|
};
|
|
9509
|
-
//# sourceMappingURL=chunk-
|
|
9509
|
+
//# sourceMappingURL=chunk-OCFDRCSN.mjs.map
|