@dxos/client-services 0.1.57 → 0.1.58-main.03af36b
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-MHM6KWZ5.mjs} +37 -31
- package/dist/lib/browser/chunk-MHM6KWZ5.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
|
@@ -344,7 +344,7 @@ import { Context as Context2 } from "@dxos/context";
|
|
|
344
344
|
import { verifyCredential } from "@dxos/credentials";
|
|
345
345
|
import { log } from "@dxos/log";
|
|
346
346
|
import { schema } from "@dxos/protocols";
|
|
347
|
-
var __dxlog_file = "/
|
|
347
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
348
348
|
var Credential = schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
349
349
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
350
350
|
const credential = await signer.createCredential({
|
|
@@ -474,7 +474,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
474
474
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
475
475
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
476
476
|
}
|
|
477
|
-
var __dxlog_file2 = "/
|
|
477
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity.ts";
|
|
478
478
|
var Identity = class Identity2 {
|
|
479
479
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
480
480
|
this.stateUpdate = new Event();
|
|
@@ -647,7 +647,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
647
647
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
648
648
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
649
649
|
}
|
|
650
|
-
var __dxlog_file3 = "/
|
|
650
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
|
|
651
651
|
var IdentityManager = class IdentityManager2 {
|
|
652
652
|
// TODO(burdon): IdentityManagerParams.
|
|
653
653
|
// TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
|
|
@@ -1000,7 +1000,7 @@ import { Stream as Stream7 } from "@dxos/codec-protobuf";
|
|
|
1000
1000
|
import { signPresentation } from "@dxos/credentials";
|
|
1001
1001
|
import { todo } from "@dxos/debug";
|
|
1002
1002
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
1003
|
-
var __dxlog_file4 = "/
|
|
1003
|
+
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
|
|
1004
1004
|
var IdentityServiceImpl = class {
|
|
1005
1005
|
constructor(_createIdentity, _identityManager, _keyring) {
|
|
1006
1006
|
this._createIdentity = _createIdentity;
|
|
@@ -1069,7 +1069,7 @@ var IdentityServiceImpl = class {
|
|
|
1069
1069
|
// packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
|
|
1070
1070
|
import { invariant as invariant4 } from "@dxos/invariant";
|
|
1071
1071
|
import { Invitation } from "@dxos/protocols/proto/dxos/client/services";
|
|
1072
|
-
var __dxlog_file5 = "/
|
|
1072
|
+
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
|
|
1073
1073
|
var DeviceInvitationProtocol = class {
|
|
1074
1074
|
constructor(_keyring, _getIdentity, _acceptIdentity) {
|
|
1075
1075
|
this._keyring = _keyring;
|
|
@@ -1181,7 +1181,7 @@ import { schema as schema2, trace as trace3 } from "@dxos/protocols";
|
|
|
1181
1181
|
import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
|
|
1182
1182
|
import { AuthenticationResponse, Options } from "@dxos/protocols/proto/dxos/halo/invitations";
|
|
1183
1183
|
import { RpcExtension } from "@dxos/teleport";
|
|
1184
|
-
var __dxlog_file6 = "/
|
|
1184
|
+
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
|
|
1185
1185
|
var OPTIONS_TIMEOUT = 1e4;
|
|
1186
1186
|
var MAX_OTP_ATTEMPTS = 3;
|
|
1187
1187
|
var InvitationHostExtension = class extends RpcExtension {
|
|
@@ -1512,7 +1512,7 @@ var InvitationGuestExtension = class extends RpcExtension {
|
|
|
1512
1512
|
var isAuthenticationRequired = (invitation) => invitation.authMethod !== Invitation2.AuthMethod.NONE;
|
|
1513
1513
|
|
|
1514
1514
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1515
|
-
var __dxlog_file7 = "/
|
|
1515
|
+
var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
1516
1516
|
var InvitationsHandler = class {
|
|
1517
1517
|
/**
|
|
1518
1518
|
* @internal
|
|
@@ -2070,8 +2070,8 @@ import { Event as Event3 } from "@dxos/async";
|
|
|
2070
2070
|
import { Stream as Stream8 } from "@dxos/codec-protobuf";
|
|
2071
2071
|
import { invariant as invariant7 } from "@dxos/invariant";
|
|
2072
2072
|
import { log as log6 } from "@dxos/log";
|
|
2073
|
-
import { QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
2074
|
-
var __dxlog_file8 = "/
|
|
2073
|
+
import { Invitation as Invitation4, QueryInvitationsResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
2074
|
+
var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
2075
2075
|
var InvitationsServiceImpl = class {
|
|
2076
2076
|
constructor(_invitationsHandler, _getHandler) {
|
|
2077
2077
|
this._invitationsHandler = _invitationsHandler;
|
|
@@ -2106,6 +2106,9 @@ var InvitationsServiceImpl = class {
|
|
|
2106
2106
|
}, () => {
|
|
2107
2107
|
close();
|
|
2108
2108
|
this._createInvitations.delete(invitation.get().invitationId);
|
|
2109
|
+
if (invitation.get().type !== Invitation4.Type.MULTIUSE) {
|
|
2110
|
+
this._removedCreated.emit(invitation.get());
|
|
2111
|
+
}
|
|
2109
2112
|
});
|
|
2110
2113
|
});
|
|
2111
2114
|
}
|
|
@@ -2128,19 +2131,22 @@ var InvitationsServiceImpl = class {
|
|
|
2128
2131
|
}, () => {
|
|
2129
2132
|
close();
|
|
2130
2133
|
this._acceptInvitations.delete(invitation.get().invitationId);
|
|
2134
|
+
if (invitation.get().type !== Invitation4.Type.MULTIUSE) {
|
|
2135
|
+
this._removedAccepted.emit(invitation.get());
|
|
2136
|
+
}
|
|
2131
2137
|
});
|
|
2132
2138
|
});
|
|
2133
2139
|
}
|
|
2134
2140
|
async authenticate({ invitationId, authCode }) {
|
|
2135
2141
|
log6("authenticating...", void 0, {
|
|
2136
2142
|
F: __dxlog_file8,
|
|
2137
|
-
L:
|
|
2143
|
+
L: 108,
|
|
2138
2144
|
S: this,
|
|
2139
2145
|
C: (f, a) => f(...a)
|
|
2140
2146
|
});
|
|
2141
2147
|
invariant7(invitationId, void 0, {
|
|
2142
2148
|
F: __dxlog_file8,
|
|
2143
|
-
L:
|
|
2149
|
+
L: 109,
|
|
2144
2150
|
S: this,
|
|
2145
2151
|
A: [
|
|
2146
2152
|
"invitationId",
|
|
@@ -2153,7 +2159,7 @@ var InvitationsServiceImpl = class {
|
|
|
2153
2159
|
invitationId
|
|
2154
2160
|
}, {
|
|
2155
2161
|
F: __dxlog_file8,
|
|
2156
|
-
L:
|
|
2162
|
+
L: 112,
|
|
2157
2163
|
S: this,
|
|
2158
2164
|
C: (f, a) => f(...a)
|
|
2159
2165
|
});
|
|
@@ -2164,13 +2170,13 @@ var InvitationsServiceImpl = class {
|
|
|
2164
2170
|
async cancelInvitation({ invitationId }) {
|
|
2165
2171
|
log6("deleting...", void 0, {
|
|
2166
2172
|
F: __dxlog_file8,
|
|
2167
|
-
L:
|
|
2173
|
+
L: 119,
|
|
2168
2174
|
S: this,
|
|
2169
2175
|
C: (f, a) => f(...a)
|
|
2170
2176
|
});
|
|
2171
2177
|
invariant7(invitationId, void 0, {
|
|
2172
2178
|
F: __dxlog_file8,
|
|
2173
|
-
L:
|
|
2179
|
+
L: 120,
|
|
2174
2180
|
S: this,
|
|
2175
2181
|
A: [
|
|
2176
2182
|
"invitationId",
|
|
@@ -2192,7 +2198,7 @@ var InvitationsServiceImpl = class {
|
|
|
2192
2198
|
invitationId
|
|
2193
2199
|
}, {
|
|
2194
2200
|
F: __dxlog_file8,
|
|
2195
|
-
L:
|
|
2201
|
+
L: 132,
|
|
2196
2202
|
S: this,
|
|
2197
2203
|
C: (f, a) => f(...a)
|
|
2198
2204
|
});
|
|
@@ -2255,8 +2261,8 @@ import { createAdmissionCredentials, getCredentialAssertion } from "@dxos/creden
|
|
|
2255
2261
|
import { writeMessages as writeMessages2 } from "@dxos/feed-store";
|
|
2256
2262
|
import { invariant as invariant8 } from "@dxos/invariant";
|
|
2257
2263
|
import { log as log7 } from "@dxos/log";
|
|
2258
|
-
import { Invitation as
|
|
2259
|
-
var __dxlog_file9 = "/
|
|
2264
|
+
import { Invitation as Invitation5 } from "@dxos/protocols/proto/dxos/client/services";
|
|
2265
|
+
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
2260
2266
|
var SpaceInvitationProtocol = class {
|
|
2261
2267
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
2262
2268
|
this._spaceManager = _spaceManager;
|
|
@@ -2272,7 +2278,7 @@ var SpaceInvitationProtocol = class {
|
|
|
2272
2278
|
}
|
|
2273
2279
|
getInvitationContext() {
|
|
2274
2280
|
return {
|
|
2275
|
-
kind:
|
|
2281
|
+
kind: Invitation5.Kind.SPACE,
|
|
2276
2282
|
spaceKey: this._spaceKey
|
|
2277
2283
|
};
|
|
2278
2284
|
}
|
|
@@ -2467,7 +2473,7 @@ import { STORAGE_VERSION } from "@dxos/protocols";
|
|
|
2467
2473
|
import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
|
|
2468
2474
|
|
|
2469
2475
|
// packages/sdk/client-services/src/version.ts
|
|
2470
|
-
var DXOS_VERSION = "0.1.
|
|
2476
|
+
var DXOS_VERSION = "0.1.58-main.03af36b";
|
|
2471
2477
|
|
|
2472
2478
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
2473
2479
|
var getPlatform = () => {
|
|
@@ -2498,7 +2504,7 @@ var getPlatform = () => {
|
|
|
2498
2504
|
};
|
|
2499
2505
|
|
|
2500
2506
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2501
|
-
var __dxlog_file10 = "/
|
|
2507
|
+
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
2502
2508
|
var DEFAULT_TIMEOUT = 1e3;
|
|
2503
2509
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
2504
2510
|
const diagnostics = {
|
|
@@ -2639,7 +2645,7 @@ import { log as log9 } from "@dxos/log";
|
|
|
2639
2645
|
import { schema as schema3 } from "@dxos/protocols";
|
|
2640
2646
|
import { RpcExtension as RpcExtension2 } from "@dxos/teleport";
|
|
2641
2647
|
import { ComplexMap as ComplexMap2, ComplexSet, entry } from "@dxos/util";
|
|
2642
|
-
var __dxlog_file11 = "/
|
|
2648
|
+
var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
2643
2649
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
2644
2650
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
2645
2651
|
var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
@@ -2909,7 +2915,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
2909
2915
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2910
2916
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2911
2917
|
}
|
|
2912
|
-
var __dxlog_file12 = "/
|
|
2918
|
+
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
2913
2919
|
var ENABLE_FEED_PURGE = false;
|
|
2914
2920
|
var DataSpace = class DataSpace2 {
|
|
2915
2921
|
constructor(params) {
|
|
@@ -3350,7 +3356,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
3350
3356
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3351
3357
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3352
3358
|
}
|
|
3353
|
-
var __dxlog_file13 = "/
|
|
3359
|
+
var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
|
|
3354
3360
|
var DataSpaceManager = class DataSpaceManager2 {
|
|
3355
3361
|
constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
|
|
3356
3362
|
this._spaceManager = _spaceManager;
|
|
@@ -3681,7 +3687,7 @@ import { ApiError } from "@dxos/errors";
|
|
|
3681
3687
|
import { log as log12 } from "@dxos/log";
|
|
3682
3688
|
import { encodeError } from "@dxos/protocols";
|
|
3683
3689
|
import { SpaceMember as SpaceMember3, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
3684
|
-
var __dxlog_file14 = "/
|
|
3690
|
+
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3685
3691
|
var SpacesServiceImpl = class {
|
|
3686
3692
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
3687
3693
|
this._identityManager = _identityManager;
|
|
@@ -3861,7 +3867,7 @@ import { Keyring } from "@dxos/keyring";
|
|
|
3861
3867
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
3862
3868
|
import { log as log13 } from "@dxos/log";
|
|
3863
3869
|
import { STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
|
|
3864
|
-
import { Invitation as
|
|
3870
|
+
import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
|
|
3865
3871
|
import { BlobStore } from "@dxos/teleport-extension-object-sync";
|
|
3866
3872
|
import { trace as Trace2 } from "@dxos/tracing";
|
|
3867
3873
|
import { safeInstanceof } from "@dxos/util";
|
|
@@ -3875,7 +3881,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3875
3881
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3876
3882
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3877
3883
|
}
|
|
3878
|
-
var __dxlog_file15 = "/
|
|
3884
|
+
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
3879
3885
|
var ServiceContext = class ServiceContext2 {
|
|
3880
3886
|
// prettier-ignore
|
|
3881
3887
|
constructor(storage, networkManager, signalManager, modelFactory) {
|
|
@@ -3911,7 +3917,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3911
3917
|
});
|
|
3912
3918
|
this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
|
|
3913
3919
|
this.invitations = new InvitationsHandler(this.networkManager);
|
|
3914
|
-
this._handlerFactories.set(
|
|
3920
|
+
this._handlerFactories.set(Invitation6.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? failUndefined3(), this._acceptIdentity.bind(this)));
|
|
3915
3921
|
}
|
|
3916
3922
|
async open(ctx) {
|
|
3917
3923
|
await this._checkStorageVersion();
|
|
@@ -4030,7 +4036,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4030
4036
|
};
|
|
4031
4037
|
this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore);
|
|
4032
4038
|
await this.dataSpaceManager.open();
|
|
4033
|
-
this._handlerFactories.set(
|
|
4039
|
+
this._handlerFactories.set(Invitation6.Kind.SPACE, (invitation) => {
|
|
4034
4040
|
invariant12(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4035
4041
|
F: __dxlog_file15,
|
|
4036
4042
|
L: 218,
|
|
@@ -4125,7 +4131,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4125
4131
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4126
4132
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4127
4133
|
}
|
|
4128
|
-
var __dxlog_file16 = "/
|
|
4134
|
+
var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/browser.ts";
|
|
4129
4135
|
var Message;
|
|
4130
4136
|
(function(Message2) {
|
|
4131
4137
|
Message2["ACQUIRING"] = "acquiring";
|
|
@@ -4583,7 +4589,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4583
4589
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4584
4590
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4585
4591
|
}
|
|
4586
|
-
var __dxlog_file17 = "/
|
|
4592
|
+
var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4587
4593
|
var createDefaultModelFactory = () => {
|
|
4588
4594
|
return new ModelFactory().registerModel(DocumentModel2).registerModel(TextModel);
|
|
4589
4595
|
};
|
|
@@ -4955,4 +4961,4 @@ export {
|
|
|
4955
4961
|
createDefaultModelFactory,
|
|
4956
4962
|
ClientServicesHost
|
|
4957
4963
|
};
|
|
4958
|
-
//# sourceMappingURL=chunk-
|
|
4964
|
+
//# sourceMappingURL=chunk-MHM6KWZ5.mjs.map
|