@dxos/client-services 0.1.57 → 0.1.58-main.31dfb10
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-ZOFA377V.mjs → chunk-OR7IHTVP.mjs} +37 -31
- package/dist/lib/browser/chunk-OR7IHTVP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +2 -2
- package/dist/lib/node/index.cjs +35 -29
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +31 -25
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +35 -35
- package/src/packlets/invitations/invitations-service.ts +6 -0
- package/src/version.ts +1 -5
- package/dist/lib/browser/chunk-ZOFA377V.mjs.map +0 -7
|
@@ -71,7 +71,7 @@ var import_protocols = require("@dxos/protocols");
|
|
|
71
71
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
72
72
|
|
|
73
73
|
// packages/sdk/client-services/src/version.ts
|
|
74
|
-
var DXOS_VERSION = "0.1.
|
|
74
|
+
var DXOS_VERSION = "0.1.58-main.31dfb10";
|
|
75
75
|
|
|
76
76
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
77
77
|
var getPlatform = () => {
|
|
@@ -102,7 +102,7 @@ var getPlatform = () => {
|
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
105
|
-
var __dxlog_file = "/
|
|
105
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
106
106
|
var DEFAULT_TIMEOUT = 1e3;
|
|
107
107
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
108
108
|
const diagnostics = {
|
|
@@ -242,7 +242,7 @@ var import_context = require("@dxos/context");
|
|
|
242
242
|
var import_credentials3 = require("@dxos/credentials");
|
|
243
243
|
var import_log2 = require("@dxos/log");
|
|
244
244
|
var import_protocols2 = require("@dxos/protocols");
|
|
245
|
-
var __dxlog_file2 = "/
|
|
245
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
246
246
|
var Credential = import_protocols2.schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
247
247
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
248
248
|
const credential = await signer.createCredential({
|
|
@@ -372,7 +372,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
372
372
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
373
373
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
374
374
|
}
|
|
375
|
-
var __dxlog_file3 = "/
|
|
375
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
|
|
376
376
|
var Identity = class Identity2 {
|
|
377
377
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
378
378
|
this.stateUpdate = new import_async2.Event();
|
|
@@ -545,7 +545,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
545
545
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
546
546
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
547
547
|
}
|
|
548
|
-
var __dxlog_file4 = "/
|
|
548
|
+
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
|
|
549
549
|
var IdentityManager = class IdentityManager2 {
|
|
550
550
|
// TODO(burdon): IdentityManagerParams.
|
|
551
551
|
// TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
|
|
@@ -898,7 +898,7 @@ var import_codec_protobuf3 = require("@dxos/codec-protobuf");
|
|
|
898
898
|
var import_credentials8 = require("@dxos/credentials");
|
|
899
899
|
var import_debug3 = require("@dxos/debug");
|
|
900
900
|
var import_invariant4 = require("@dxos/invariant");
|
|
901
|
-
var __dxlog_file5 = "/
|
|
901
|
+
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
|
|
902
902
|
var IdentityServiceImpl = class {
|
|
903
903
|
constructor(_createIdentity, _identityManager, _keyring) {
|
|
904
904
|
this._createIdentity = _createIdentity;
|
|
@@ -967,7 +967,7 @@ var IdentityServiceImpl = class {
|
|
|
967
967
|
// packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
|
|
968
968
|
var import_invariant5 = require("@dxos/invariant");
|
|
969
969
|
var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
|
|
970
|
-
var __dxlog_file6 = "/
|
|
970
|
+
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
|
|
971
971
|
var DeviceInvitationProtocol = class {
|
|
972
972
|
constructor(_keyring, _getIdentity, _acceptIdentity) {
|
|
973
973
|
this._keyring = _keyring;
|
|
@@ -1079,7 +1079,7 @@ var import_protocols4 = require("@dxos/protocols");
|
|
|
1079
1079
|
var import_services3 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1080
1080
|
var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
|
|
1081
1081
|
var import_teleport = require("@dxos/teleport");
|
|
1082
|
-
var __dxlog_file7 = "/
|
|
1082
|
+
var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
|
|
1083
1083
|
var OPTIONS_TIMEOUT = 1e4;
|
|
1084
1084
|
var MAX_OTP_ATTEMPTS = 3;
|
|
1085
1085
|
var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
@@ -1410,7 +1410,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1410
1410
|
var isAuthenticationRequired = (invitation) => invitation.authMethod !== import_services3.Invitation.AuthMethod.NONE;
|
|
1411
1411
|
|
|
1412
1412
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1413
|
-
var __dxlog_file8 = "/
|
|
1413
|
+
var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
1414
1414
|
var InvitationsHandler = class {
|
|
1415
1415
|
/**
|
|
1416
1416
|
* @internal
|
|
@@ -1969,7 +1969,7 @@ var import_codec_protobuf4 = require("@dxos/codec-protobuf");
|
|
|
1969
1969
|
var import_invariant8 = require("@dxos/invariant");
|
|
1970
1970
|
var import_log7 = require("@dxos/log");
|
|
1971
1971
|
var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1972
|
-
var __dxlog_file9 = "/
|
|
1972
|
+
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
1973
1973
|
var InvitationsServiceImpl = class {
|
|
1974
1974
|
constructor(_invitationsHandler, _getHandler) {
|
|
1975
1975
|
this._invitationsHandler = _invitationsHandler;
|
|
@@ -2004,6 +2004,9 @@ var InvitationsServiceImpl = class {
|
|
|
2004
2004
|
}, () => {
|
|
2005
2005
|
close();
|
|
2006
2006
|
this._createInvitations.delete(invitation.get().invitationId);
|
|
2007
|
+
if (invitation.get().type !== import_services5.Invitation.Type.MULTIUSE) {
|
|
2008
|
+
this._removedCreated.emit(invitation.get());
|
|
2009
|
+
}
|
|
2007
2010
|
});
|
|
2008
2011
|
});
|
|
2009
2012
|
}
|
|
@@ -2026,19 +2029,22 @@ var InvitationsServiceImpl = class {
|
|
|
2026
2029
|
}, () => {
|
|
2027
2030
|
close();
|
|
2028
2031
|
this._acceptInvitations.delete(invitation.get().invitationId);
|
|
2032
|
+
if (invitation.get().type !== import_services5.Invitation.Type.MULTIUSE) {
|
|
2033
|
+
this._removedAccepted.emit(invitation.get());
|
|
2034
|
+
}
|
|
2029
2035
|
});
|
|
2030
2036
|
});
|
|
2031
2037
|
}
|
|
2032
2038
|
async authenticate({ invitationId, authCode }) {
|
|
2033
2039
|
(0, import_log7.log)("authenticating...", void 0, {
|
|
2034
2040
|
F: __dxlog_file9,
|
|
2035
|
-
L:
|
|
2041
|
+
L: 108,
|
|
2036
2042
|
S: this,
|
|
2037
2043
|
C: (f, a) => f(...a)
|
|
2038
2044
|
});
|
|
2039
2045
|
(0, import_invariant8.invariant)(invitationId, void 0, {
|
|
2040
2046
|
F: __dxlog_file9,
|
|
2041
|
-
L:
|
|
2047
|
+
L: 109,
|
|
2042
2048
|
S: this,
|
|
2043
2049
|
A: [
|
|
2044
2050
|
"invitationId",
|
|
@@ -2051,7 +2057,7 @@ var InvitationsServiceImpl = class {
|
|
|
2051
2057
|
invitationId
|
|
2052
2058
|
}, {
|
|
2053
2059
|
F: __dxlog_file9,
|
|
2054
|
-
L:
|
|
2060
|
+
L: 112,
|
|
2055
2061
|
S: this,
|
|
2056
2062
|
C: (f, a) => f(...a)
|
|
2057
2063
|
});
|
|
@@ -2062,13 +2068,13 @@ var InvitationsServiceImpl = class {
|
|
|
2062
2068
|
async cancelInvitation({ invitationId }) {
|
|
2063
2069
|
(0, import_log7.log)("deleting...", void 0, {
|
|
2064
2070
|
F: __dxlog_file9,
|
|
2065
|
-
L:
|
|
2071
|
+
L: 119,
|
|
2066
2072
|
S: this,
|
|
2067
2073
|
C: (f, a) => f(...a)
|
|
2068
2074
|
});
|
|
2069
2075
|
(0, import_invariant8.invariant)(invitationId, void 0, {
|
|
2070
2076
|
F: __dxlog_file9,
|
|
2071
|
-
L:
|
|
2077
|
+
L: 120,
|
|
2072
2078
|
S: this,
|
|
2073
2079
|
A: [
|
|
2074
2080
|
"invitationId",
|
|
@@ -2090,7 +2096,7 @@ var InvitationsServiceImpl = class {
|
|
|
2090
2096
|
invitationId
|
|
2091
2097
|
}, {
|
|
2092
2098
|
F: __dxlog_file9,
|
|
2093
|
-
L:
|
|
2099
|
+
L: 132,
|
|
2094
2100
|
S: this,
|
|
2095
2101
|
C: (f, a) => f(...a)
|
|
2096
2102
|
});
|
|
@@ -2154,7 +2160,7 @@ var import_feed_store2 = require("@dxos/feed-store");
|
|
|
2154
2160
|
var import_invariant9 = require("@dxos/invariant");
|
|
2155
2161
|
var import_log8 = require("@dxos/log");
|
|
2156
2162
|
var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2157
|
-
var __dxlog_file10 = "/
|
|
2163
|
+
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
2158
2164
|
var SpaceInvitationProtocol = class {
|
|
2159
2165
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
2160
2166
|
this._spaceManager = _spaceManager;
|
|
@@ -2338,7 +2344,7 @@ var import_log9 = require("@dxos/log");
|
|
|
2338
2344
|
var import_protocols6 = require("@dxos/protocols");
|
|
2339
2345
|
var import_teleport2 = require("@dxos/teleport");
|
|
2340
2346
|
var import_util2 = require("@dxos/util");
|
|
2341
|
-
var __dxlog_file11 = "/
|
|
2347
|
+
var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
2342
2348
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
2343
2349
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
2344
2350
|
var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
@@ -2608,7 +2614,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
2608
2614
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2609
2615
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2610
2616
|
}
|
|
2611
|
-
var __dxlog_file12 = "/
|
|
2617
|
+
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
2612
2618
|
var ENABLE_FEED_PURGE = false;
|
|
2613
2619
|
var DataSpace = class DataSpace2 {
|
|
2614
2620
|
constructor(params) {
|
|
@@ -3037,7 +3043,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
3037
3043
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3038
3044
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3039
3045
|
}
|
|
3040
|
-
var __dxlog_file13 = "/
|
|
3046
|
+
var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
|
|
3041
3047
|
var DataSpaceManager = class DataSpaceManager2 {
|
|
3042
3048
|
constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
|
|
3043
3049
|
this._spaceManager = _spaceManager;
|
|
@@ -3368,7 +3374,7 @@ var import_errors4 = require("@dxos/errors");
|
|
|
3368
3374
|
var import_log12 = require("@dxos/log");
|
|
3369
3375
|
var import_protocols8 = require("@dxos/protocols");
|
|
3370
3376
|
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3371
|
-
var __dxlog_file14 = "/
|
|
3377
|
+
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3372
3378
|
var SpacesServiceImpl = class {
|
|
3373
3379
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
3374
3380
|
this._identityManager = _identityManager;
|
|
@@ -3547,7 +3553,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3547
3553
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3548
3554
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3549
3555
|
}
|
|
3550
|
-
var __dxlog_file15 = "/
|
|
3556
|
+
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
3551
3557
|
var ServiceContext = class ServiceContext2 {
|
|
3552
3558
|
// prettier-ignore
|
|
3553
3559
|
constructor(storage, networkManager, signalManager, modelFactory) {
|
|
@@ -4166,7 +4172,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4166
4172
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4167
4173
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4168
4174
|
}
|
|
4169
|
-
var __dxlog_file16 = "/
|
|
4175
|
+
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
4170
4176
|
var Lock = class {
|
|
4171
4177
|
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
4172
4178
|
this._lockPath = lockPath;
|
|
@@ -4497,7 +4503,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4497
4503
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4498
4504
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4499
4505
|
}
|
|
4500
|
-
var __dxlog_file17 = "/
|
|
4506
|
+
var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4501
4507
|
var createDefaultModelFactory = () => {
|
|
4502
4508
|
return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
|
|
4503
4509
|
};
|
|
@@ -4837,7 +4843,7 @@ ClientServicesHost = _ts_decorate7([
|
|
|
4837
4843
|
], ClientServicesHost);
|
|
4838
4844
|
|
|
4839
4845
|
// packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
|
|
4840
|
-
var __dxlog_file18 = "/
|
|
4846
|
+
var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
|
|
4841
4847
|
var sanitizeInvitation = (invitation) => {
|
|
4842
4848
|
return {
|
|
4843
4849
|
invitationId: invitation.invitationId,
|