@dxos/client-services 0.5.6-main.1a02a59 → 0.5.6-main.71968f1
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-LXZA3QAF.mjs → chunk-CNZWXJL4.mjs} +16 -30
- package/dist/lib/browser/{chunk-LXZA3QAF.mjs.map → chunk-CNZWXJL4.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-MH7NTR34.cjs → chunk-SAYEF4KN.cjs} +28 -42
- package/dist/lib/node/{chunk-MH7NTR34.cjs.map → chunk-SAYEF4KN.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +44 -44
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +0 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +36 -36
- package/src/packlets/spaces/spaces-service.ts +0 -13
- package/src/version.ts +1 -1
|
@@ -4745,7 +4745,6 @@ import { invariant as invariant14 } from "@dxos/invariant";
|
|
|
4745
4745
|
import { log as log13 } from "@dxos/log";
|
|
4746
4746
|
import { ApiError, SpaceNotFoundError as SpaceNotFoundError2, encodeError, IdentityNotInitializedError, AuthorizationError as AuthorizationError2 } from "@dxos/protocols";
|
|
4747
4747
|
import { SpaceMember as SpaceMember6, SpaceState as SpaceState3 } from "@dxos/protocols/proto/dxos/client/services";
|
|
4748
|
-
import { trace as trace8 } from "@dxos/tracing";
|
|
4749
4748
|
var __dxlog_file15 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
4750
4749
|
var SpacesServiceImpl = class {
|
|
4751
4750
|
constructor(_identityManager, _spaceManager, _getDataSpaceManager) {
|
|
@@ -4757,7 +4756,6 @@ var SpacesServiceImpl = class {
|
|
|
4757
4756
|
this._requireIdentity();
|
|
4758
4757
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
4759
4758
|
const space = await dataSpaceManager.createSpace();
|
|
4760
|
-
await this._updateMetrics();
|
|
4761
4759
|
return this._serializeSpace(space);
|
|
4762
4760
|
}
|
|
4763
4761
|
async updateSpace({ spaceKey, state }) {
|
|
@@ -4791,7 +4789,7 @@ var SpacesServiceImpl = class {
|
|
|
4791
4789
|
const credentials = await createAdmissionCredentials2(identity.getIdentityCredentialSigner(), request.memberKey, space.key, space.genesisFeedKey, request.newRole, space.spaceState.membershipChainHeads);
|
|
4792
4790
|
invariant14(credentials[0].credential, void 0, {
|
|
4793
4791
|
F: __dxlog_file15,
|
|
4794
|
-
L:
|
|
4792
|
+
L: 95,
|
|
4795
4793
|
S: this,
|
|
4796
4794
|
A: [
|
|
4797
4795
|
"credentials[0].credential",
|
|
@@ -4801,7 +4799,7 @@ var SpacesServiceImpl = class {
|
|
|
4801
4799
|
const spaceMemberCredential = credentials[0].credential.credential;
|
|
4802
4800
|
invariant14(getCredentialAssertion3(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
|
|
4803
4801
|
F: __dxlog_file15,
|
|
4804
|
-
L:
|
|
4802
|
+
L: 97,
|
|
4805
4803
|
S: this,
|
|
4806
4804
|
A: [
|
|
4807
4805
|
"getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
|
|
@@ -4819,11 +4817,10 @@ var SpacesServiceImpl = class {
|
|
|
4819
4817
|
spaces
|
|
4820
4818
|
}, {
|
|
4821
4819
|
F: __dxlog_file15,
|
|
4822
|
-
L:
|
|
4820
|
+
L: 108,
|
|
4823
4821
|
S: this,
|
|
4824
4822
|
C: (f, a) => f(...a)
|
|
4825
4823
|
});
|
|
4826
|
-
await this._updateMetrics();
|
|
4827
4824
|
next({
|
|
4828
4825
|
spaces
|
|
4829
4826
|
});
|
|
@@ -4903,7 +4900,7 @@ var SpacesServiceImpl = class {
|
|
|
4903
4900
|
} else {
|
|
4904
4901
|
invariant14(!credential.id, "Id on unsigned credentials is not allowed", {
|
|
4905
4902
|
F: __dxlog_file15,
|
|
4906
|
-
L:
|
|
4903
|
+
L: 195,
|
|
4907
4904
|
S: this,
|
|
4908
4905
|
A: [
|
|
4909
4906
|
"!credential.id",
|
|
@@ -4912,7 +4909,7 @@ var SpacesServiceImpl = class {
|
|
|
4912
4909
|
});
|
|
4913
4910
|
invariant14(this._identityManager.identity, "Identity is not available", {
|
|
4914
4911
|
F: __dxlog_file15,
|
|
4915
|
-
L:
|
|
4912
|
+
L: 196,
|
|
4916
4913
|
S: this,
|
|
4917
4914
|
A: [
|
|
4918
4915
|
"this._identityManager.identity",
|
|
@@ -4922,7 +4919,7 @@ var SpacesServiceImpl = class {
|
|
|
4922
4919
|
const signer = this._identityManager.identity.getIdentityCredentialSigner();
|
|
4923
4920
|
invariant14(credential.issuer.equals(signer.getIssuer()), void 0, {
|
|
4924
4921
|
F: __dxlog_file15,
|
|
4925
|
-
L:
|
|
4922
|
+
L: 198,
|
|
4926
4923
|
S: this,
|
|
4927
4924
|
A: [
|
|
4928
4925
|
"credential.issuer.equals(signer.getIssuer())",
|
|
@@ -4993,17 +4990,6 @@ var SpacesServiceImpl = class {
|
|
|
4993
4990
|
}
|
|
4994
4991
|
return this._identityManager.identity;
|
|
4995
4992
|
}
|
|
4996
|
-
async _updateMetrics() {
|
|
4997
|
-
const dataSpaceManager = await this._getDataSpaceManager();
|
|
4998
|
-
const identity = this._identityManager.identity?.identityKey.truncate();
|
|
4999
|
-
if (identity) {
|
|
5000
|
-
trace8.metrics.gauge("echo.space.count", dataSpaceManager.spaces.size, {
|
|
5001
|
-
tags: {
|
|
5002
|
-
identity
|
|
5003
|
-
}
|
|
5004
|
-
});
|
|
5005
|
-
}
|
|
5006
|
-
}
|
|
5007
4993
|
};
|
|
5008
4994
|
var getChannelId = (channel) => `user-channel/${channel}`;
|
|
5009
4995
|
|
|
@@ -5019,7 +5005,7 @@ import { invariant as invariant15 } from "@dxos/invariant";
|
|
|
5019
5005
|
import { Keyring } from "@dxos/keyring";
|
|
5020
5006
|
import { PublicKey as PublicKey12 } from "@dxos/keys";
|
|
5021
5007
|
import { log as log14 } from "@dxos/log";
|
|
5022
|
-
import { InvalidStorageVersionError, STORAGE_VERSION, trace as
|
|
5008
|
+
import { InvalidStorageVersionError, STORAGE_VERSION, trace as trace8 } from "@dxos/protocols";
|
|
5023
5009
|
import { Invitation as Invitation8 } from "@dxos/protocols/proto/dxos/client/services";
|
|
5024
5010
|
import { BlobStore } from "@dxos/teleport-extension-object-sync";
|
|
5025
5011
|
import { trace as Trace3 } from "@dxos/tracing";
|
|
@@ -5084,7 +5070,7 @@ var ServiceContext = class extends Resource {
|
|
|
5084
5070
|
S: this,
|
|
5085
5071
|
C: (f, a) => f(...a)
|
|
5086
5072
|
});
|
|
5087
|
-
log14.trace("dxos.sdk.service-context.open",
|
|
5073
|
+
log14.trace("dxos.sdk.service-context.open", trace8.begin({
|
|
5088
5074
|
id: this._instanceId
|
|
5089
5075
|
}), {
|
|
5090
5076
|
F: __dxlog_file16,
|
|
@@ -5110,7 +5096,7 @@ var ServiceContext = class extends Resource {
|
|
|
5110
5096
|
S: this,
|
|
5111
5097
|
C: (f, a) => f(...a)
|
|
5112
5098
|
});
|
|
5113
|
-
log14.trace("dxos.sdk.service-context.open",
|
|
5099
|
+
log14.trace("dxos.sdk.service-context.open", trace8.end({
|
|
5114
5100
|
id: this._instanceId
|
|
5115
5101
|
}), {
|
|
5116
5102
|
F: __dxlog_file16,
|
|
@@ -5326,7 +5312,7 @@ import { SpaceMember as SpaceMember7 } from "@dxos/protocols/proto/dxos/client/s
|
|
|
5326
5312
|
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
5327
5313
|
|
|
5328
5314
|
// packages/sdk/client-services/src/version.ts
|
|
5329
|
-
var DXOS_VERSION = "0.5.6-main.
|
|
5315
|
+
var DXOS_VERSION = "0.5.6-main.71968f1";
|
|
5330
5316
|
|
|
5331
5317
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
5332
5318
|
import { Platform } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -5588,7 +5574,7 @@ import { PublicKey as PublicKey15 } from "@dxos/keys";
|
|
|
5588
5574
|
import { log as log18 } from "@dxos/log";
|
|
5589
5575
|
import { WebsocketSignalManager } from "@dxos/messaging";
|
|
5590
5576
|
import { NetworkManager, createSimplePeerTransportFactory } from "@dxos/network-manager";
|
|
5591
|
-
import { trace as
|
|
5577
|
+
import { trace as trace9 } from "@dxos/protocols";
|
|
5592
5578
|
import { SystemStatus } from "@dxos/protocols/proto/dxos/client/services";
|
|
5593
5579
|
import { TRACE_PROCESSOR as TRACE_PROCESSOR2, trace as Trace4 } from "@dxos/tracing";
|
|
5594
5580
|
import { assignDeep as assignDeep2 } from "@dxos/util";
|
|
@@ -6255,7 +6241,7 @@ var ClientServicesHost = class {
|
|
|
6255
6241
|
return;
|
|
6256
6242
|
}
|
|
6257
6243
|
const traceId = PublicKey15.random().toHex();
|
|
6258
|
-
log18.trace("dxos.client-services.host.open",
|
|
6244
|
+
log18.trace("dxos.client-services.host.open", trace9.begin({
|
|
6259
6245
|
id: traceId
|
|
6260
6246
|
}), {
|
|
6261
6247
|
F: __dxlog_file21,
|
|
@@ -6360,7 +6346,7 @@ var ClientServicesHost = class {
|
|
|
6360
6346
|
S: this,
|
|
6361
6347
|
C: (f, a) => f(...a)
|
|
6362
6348
|
});
|
|
6363
|
-
log18.trace("dxos.client-services.host.open",
|
|
6349
|
+
log18.trace("dxos.client-services.host.open", trace9.end({
|
|
6364
6350
|
id: traceId
|
|
6365
6351
|
}), {
|
|
6366
6352
|
F: __dxlog_file21,
|
|
@@ -6403,7 +6389,7 @@ var ClientServicesHost = class {
|
|
|
6403
6389
|
}
|
|
6404
6390
|
async reset() {
|
|
6405
6391
|
const traceId = PublicKey15.random().toHex();
|
|
6406
|
-
log18.trace("dxos.sdk.client-services-host.reset",
|
|
6392
|
+
log18.trace("dxos.sdk.client-services-host.reset", trace9.begin({
|
|
6407
6393
|
id: traceId
|
|
6408
6394
|
}), {
|
|
6409
6395
|
F: __dxlog_file21,
|
|
@@ -6425,7 +6411,7 @@ var ClientServicesHost = class {
|
|
|
6425
6411
|
S: this,
|
|
6426
6412
|
C: (f, a) => f(...a)
|
|
6427
6413
|
});
|
|
6428
|
-
log18.trace("dxos.sdk.client-services-host.reset",
|
|
6414
|
+
log18.trace("dxos.sdk.client-services-host.reset", trace9.end({
|
|
6429
6415
|
id: traceId
|
|
6430
6416
|
}), {
|
|
6431
6417
|
F: __dxlog_file21,
|
|
@@ -6573,4 +6559,4 @@ export {
|
|
|
6573
6559
|
ClientServicesHost,
|
|
6574
6560
|
ClientServicesProviderResource
|
|
6575
6561
|
};
|
|
6576
|
-
//# sourceMappingURL=chunk-
|
|
6562
|
+
//# sourceMappingURL=chunk-CNZWXJL4.mjs.map
|