@dxos/client-services 0.1.56-next.a63ce79 → 0.1.56
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-UR4OBOCI.mjs → chunk-SUKLFUNG.mjs} +68 -64
- package/dist/lib/browser/chunk-SUKLFUNG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +7 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +2 -2
- package/dist/lib/node/index.cjs +73 -69
- 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 +68 -64
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.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 +34 -34
- package/src/packlets/invitations/invitations-handler.ts +2 -0
- package/src/packlets/services/diagnostics.ts +2 -1
- package/src/packlets/services/service-context.ts +4 -4
- package/src/packlets/services/service-host.test.ts +1 -1
- package/src/packlets/spaces/data-space-manager.test.ts +80 -22
- package/src/packlets/spaces/data-space-manager.ts +5 -1
- package/src/packlets/spaces/spaces-service.ts +1 -1
- package/src/packlets/vault/worker-runtime.ts +1 -1
- package/src/version.ts +5 -1
- package/dist/lib/browser/chunk-UR4OBOCI.mjs.map +0 -7
package/dist/lib/node/index.cjs
CHANGED
|
@@ -402,7 +402,7 @@ var import_context2 = require("@dxos/context");
|
|
|
402
402
|
var import_credentials = require("@dxos/credentials");
|
|
403
403
|
var import_log = require("@dxos/log");
|
|
404
404
|
var import_protocols = require("@dxos/protocols");
|
|
405
|
-
var __dxlog_file = "/
|
|
405
|
+
var __dxlog_file = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
|
|
406
406
|
var Credential = import_protocols.schema.getCodecForType("dxos.halo.credentials.Credential");
|
|
407
407
|
var createAuthProvider = (signer) => async (nonce) => {
|
|
408
408
|
const credential = await signer.createCredential({
|
|
@@ -532,7 +532,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
532
532
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
533
533
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
534
534
|
}
|
|
535
|
-
var __dxlog_file2 = "/
|
|
535
|
+
var __dxlog_file2 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity.ts";
|
|
536
536
|
var Identity = class Identity2 {
|
|
537
537
|
constructor({ space, signer, identityKey, deviceKey }) {
|
|
538
538
|
this.stateUpdate = new import_async5.Event();
|
|
@@ -705,7 +705,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
705
705
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
706
706
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
707
707
|
}
|
|
708
|
-
var __dxlog_file3 = "/
|
|
708
|
+
var __dxlog_file3 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-manager.ts";
|
|
709
709
|
var IdentityManager = class IdentityManager2 {
|
|
710
710
|
// TODO(burdon): IdentityManagerParams.
|
|
711
711
|
// TODO(dmaretskyi): Perhaps this should take/generate the peerKey outside of an initialized identity.
|
|
@@ -1055,7 +1055,7 @@ var import_codec_protobuf7 = require("@dxos/codec-protobuf");
|
|
|
1055
1055
|
var import_credentials6 = require("@dxos/credentials");
|
|
1056
1056
|
var import_debug2 = require("@dxos/debug");
|
|
1057
1057
|
var import_invariant3 = require("@dxos/invariant");
|
|
1058
|
-
var __dxlog_file4 = "/
|
|
1058
|
+
var __dxlog_file4 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/identity/identity-service.ts";
|
|
1059
1059
|
var IdentityServiceImpl = class {
|
|
1060
1060
|
constructor(_createIdentity, _identityManager, _keyring) {
|
|
1061
1061
|
this._createIdentity = _createIdentity;
|
|
@@ -1124,7 +1124,7 @@ var IdentityServiceImpl = class {
|
|
|
1124
1124
|
// packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts
|
|
1125
1125
|
var import_invariant4 = require("@dxos/invariant");
|
|
1126
1126
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
1127
|
-
var __dxlog_file5 = "/
|
|
1127
|
+
var __dxlog_file5 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/device-invitation-protocol.ts";
|
|
1128
1128
|
var DeviceInvitationProtocol = class {
|
|
1129
1129
|
constructor(_keyring, _getIdentity, _acceptIdentity) {
|
|
1130
1130
|
this._keyring = _keyring;
|
|
@@ -1236,7 +1236,7 @@ var import_protocols3 = require("@dxos/protocols");
|
|
|
1236
1236
|
var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
|
|
1237
1237
|
var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
|
|
1238
1238
|
var import_teleport = require("@dxos/teleport");
|
|
1239
|
-
var __dxlog_file6 = "/
|
|
1239
|
+
var __dxlog_file6 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitation-extension.ts";
|
|
1240
1240
|
var OPTIONS_TIMEOUT = 1e4;
|
|
1241
1241
|
var MAX_OTP_ATTEMPTS = 3;
|
|
1242
1242
|
var InvitationHostExtension = class extends import_teleport.RpcExtension {
|
|
@@ -1567,7 +1567,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
|
|
|
1567
1567
|
var isAuthenticationRequired = (invitation) => invitation.authMethod !== import_services2.Invitation.AuthMethod.NONE;
|
|
1568
1568
|
|
|
1569
1569
|
// packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts
|
|
1570
|
-
var __dxlog_file7 = "/
|
|
1570
|
+
var __dxlog_file7 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
1571
1571
|
var InvitationsHandler = class {
|
|
1572
1572
|
/**
|
|
1573
1573
|
* @internal
|
|
@@ -1776,7 +1776,8 @@ var InvitationsHandler = class {
|
|
|
1776
1776
|
protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
|
|
1777
1777
|
teleport.addExtension("dxos.halo.invitations", createExtension());
|
|
1778
1778
|
}),
|
|
1779
|
-
topology: new import_network_manager.StarTopology(topic)
|
|
1779
|
+
topology: new import_network_manager.StarTopology(topic),
|
|
1780
|
+
label: "invitation host"
|
|
1780
1781
|
});
|
|
1781
1782
|
ctx.onDispose(() => swarmConnection.close());
|
|
1782
1783
|
stream.next({
|
|
@@ -1801,7 +1802,7 @@ var InvitationsHandler = class {
|
|
|
1801
1802
|
const { timeout = import_client_protocol2.INVITATION_TIMEOUT } = invitation;
|
|
1802
1803
|
(0, import_invariant6.invariant)(protocol, void 0, {
|
|
1803
1804
|
F: __dxlog_file7,
|
|
1804
|
-
L:
|
|
1805
|
+
L: 211,
|
|
1805
1806
|
S: this,
|
|
1806
1807
|
A: [
|
|
1807
1808
|
"protocol",
|
|
@@ -1815,7 +1816,7 @@ var InvitationsHandler = class {
|
|
|
1815
1816
|
const setState = (newData) => {
|
|
1816
1817
|
(0, import_invariant6.invariant)(newData.state !== void 0, void 0, {
|
|
1817
1818
|
F: __dxlog_file7,
|
|
1818
|
-
L:
|
|
1819
|
+
L: 222,
|
|
1819
1820
|
S: this,
|
|
1820
1821
|
A: [
|
|
1821
1822
|
"newData.state !== undefined",
|
|
@@ -1835,7 +1836,7 @@ var InvitationsHandler = class {
|
|
|
1835
1836
|
...protocol.toJSON()
|
|
1836
1837
|
}, {
|
|
1837
1838
|
F: __dxlog_file7,
|
|
1838
|
-
L:
|
|
1839
|
+
L: 230,
|
|
1839
1840
|
S: this,
|
|
1840
1841
|
C: (f, a) => f(...a)
|
|
1841
1842
|
});
|
|
@@ -1845,7 +1846,7 @@ var InvitationsHandler = class {
|
|
|
1845
1846
|
} else {
|
|
1846
1847
|
import_log5.log.warn("auth failed", err, {
|
|
1847
1848
|
F: __dxlog_file7,
|
|
1848
|
-
L:
|
|
1849
|
+
L: 233,
|
|
1849
1850
|
S: this,
|
|
1850
1851
|
C: (f, a) => f(...a)
|
|
1851
1852
|
});
|
|
@@ -1859,7 +1860,7 @@ var InvitationsHandler = class {
|
|
|
1859
1860
|
...protocol.toJSON()
|
|
1860
1861
|
}, {
|
|
1861
1862
|
F: __dxlog_file7,
|
|
1862
|
-
L:
|
|
1863
|
+
L: 241,
|
|
1863
1864
|
S: this,
|
|
1864
1865
|
C: (f, a) => f(...a)
|
|
1865
1866
|
});
|
|
@@ -1874,7 +1875,7 @@ var InvitationsHandler = class {
|
|
|
1874
1875
|
currentState
|
|
1875
1876
|
}, {
|
|
1876
1877
|
F: __dxlog_file7,
|
|
1877
|
-
L:
|
|
1878
|
+
L: 251,
|
|
1878
1879
|
S: this,
|
|
1879
1880
|
C: (f, a) => f(...a)
|
|
1880
1881
|
});
|
|
@@ -1889,7 +1890,7 @@ var InvitationsHandler = class {
|
|
|
1889
1890
|
id: traceId
|
|
1890
1891
|
}), {
|
|
1891
1892
|
F: __dxlog_file7,
|
|
1892
|
-
L:
|
|
1893
|
+
L: 260,
|
|
1893
1894
|
S: this,
|
|
1894
1895
|
C: (f, a) => f(...a)
|
|
1895
1896
|
});
|
|
@@ -1901,7 +1902,7 @@ var InvitationsHandler = class {
|
|
|
1901
1902
|
...protocol.toJSON()
|
|
1902
1903
|
}, {
|
|
1903
1904
|
F: __dxlog_file7,
|
|
1904
|
-
L:
|
|
1905
|
+
L: 268,
|
|
1905
1906
|
S: this,
|
|
1906
1907
|
C: (f, a) => f(...a)
|
|
1907
1908
|
});
|
|
@@ -1912,7 +1913,7 @@ var InvitationsHandler = class {
|
|
|
1912
1913
|
...protocol.toJSON()
|
|
1913
1914
|
}, {
|
|
1914
1915
|
F: __dxlog_file7,
|
|
1915
|
-
L:
|
|
1916
|
+
L: 272,
|
|
1916
1917
|
S: this,
|
|
1917
1918
|
C: (f, a) => f(...a)
|
|
1918
1919
|
});
|
|
@@ -1922,7 +1923,7 @@ var InvitationsHandler = class {
|
|
|
1922
1923
|
response: introductionResponse
|
|
1923
1924
|
}, {
|
|
1924
1925
|
F: __dxlog_file7,
|
|
1925
|
-
L:
|
|
1926
|
+
L: 276,
|
|
1926
1927
|
S: this,
|
|
1927
1928
|
C: (f, a) => f(...a)
|
|
1928
1929
|
});
|
|
@@ -1934,7 +1935,7 @@ var InvitationsHandler = class {
|
|
|
1934
1935
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
1935
1936
|
(0, import_log5.log)("guest waiting for authentication code...", void 0, {
|
|
1936
1937
|
F: __dxlog_file7,
|
|
1937
|
-
L:
|
|
1938
|
+
L: 285,
|
|
1938
1939
|
S: this,
|
|
1939
1940
|
C: (f, a) => f(...a)
|
|
1940
1941
|
});
|
|
@@ -1946,7 +1947,7 @@ var InvitationsHandler = class {
|
|
|
1946
1947
|
});
|
|
1947
1948
|
(0, import_log5.log)("sending authentication request", void 0, {
|
|
1948
1949
|
F: __dxlog_file7,
|
|
1949
|
-
L:
|
|
1950
|
+
L: 289,
|
|
1950
1951
|
S: this,
|
|
1951
1952
|
C: (f, a) => f(...a)
|
|
1952
1953
|
});
|
|
@@ -1967,7 +1968,7 @@ var InvitationsHandler = class {
|
|
|
1967
1968
|
attempt
|
|
1968
1969
|
}, {
|
|
1969
1970
|
F: __dxlog_file7,
|
|
1970
|
-
L:
|
|
1971
|
+
L: 300,
|
|
1971
1972
|
S: this,
|
|
1972
1973
|
C: (f, a) => f(...a)
|
|
1973
1974
|
});
|
|
@@ -1984,7 +1985,7 @@ var InvitationsHandler = class {
|
|
|
1984
1985
|
...protocol.toJSON()
|
|
1985
1986
|
}, {
|
|
1986
1987
|
F: __dxlog_file7,
|
|
1987
|
-
L:
|
|
1988
|
+
L: 311,
|
|
1988
1989
|
S: this,
|
|
1989
1990
|
C: (f, a) => f(...a)
|
|
1990
1991
|
});
|
|
@@ -1996,7 +1997,7 @@ var InvitationsHandler = class {
|
|
|
1996
1997
|
...protocol.toJSON()
|
|
1997
1998
|
}, {
|
|
1998
1999
|
F: __dxlog_file7,
|
|
1999
|
-
L:
|
|
2000
|
+
L: 322,
|
|
2000
2001
|
S: this,
|
|
2001
2002
|
C: (f, a) => f(...a)
|
|
2002
2003
|
});
|
|
@@ -2008,7 +2009,7 @@ var InvitationsHandler = class {
|
|
|
2008
2009
|
id: traceId
|
|
2009
2010
|
}), {
|
|
2010
2011
|
F: __dxlog_file7,
|
|
2011
|
-
L:
|
|
2012
|
+
L: 324,
|
|
2012
2013
|
S: this,
|
|
2013
2014
|
C: (f, a) => f(...a)
|
|
2014
2015
|
});
|
|
@@ -2018,7 +2019,7 @@ var InvitationsHandler = class {
|
|
|
2018
2019
|
...protocol.toJSON()
|
|
2019
2020
|
}, {
|
|
2020
2021
|
F: __dxlog_file7,
|
|
2021
|
-
L:
|
|
2022
|
+
L: 327,
|
|
2022
2023
|
S: this,
|
|
2023
2024
|
C: (f, a) => f(...a)
|
|
2024
2025
|
});
|
|
@@ -2028,7 +2029,7 @@ var InvitationsHandler = class {
|
|
|
2028
2029
|
} else {
|
|
2029
2030
|
(0, import_log5.log)("auth failed", err, {
|
|
2030
2031
|
F: __dxlog_file7,
|
|
2031
|
-
L:
|
|
2032
|
+
L: 330,
|
|
2032
2033
|
S: this,
|
|
2033
2034
|
C: (f, a) => f(...a)
|
|
2034
2035
|
});
|
|
@@ -2039,7 +2040,7 @@ var InvitationsHandler = class {
|
|
|
2039
2040
|
error: err
|
|
2040
2041
|
}), {
|
|
2041
2042
|
F: __dxlog_file7,
|
|
2042
|
-
L:
|
|
2043
|
+
L: 333,
|
|
2043
2044
|
S: this,
|
|
2044
2045
|
C: (f, a) => f(...a)
|
|
2045
2046
|
});
|
|
@@ -2057,7 +2058,7 @@ var InvitationsHandler = class {
|
|
|
2057
2058
|
...protocol.toJSON()
|
|
2058
2059
|
}, {
|
|
2059
2060
|
F: __dxlog_file7,
|
|
2060
|
-
L:
|
|
2061
|
+
L: 344,
|
|
2061
2062
|
S: this,
|
|
2062
2063
|
C: (f, a) => f(...a)
|
|
2063
2064
|
});
|
|
@@ -2067,7 +2068,7 @@ var InvitationsHandler = class {
|
|
|
2067
2068
|
} else {
|
|
2068
2069
|
(0, import_log5.log)("auth failed", err, {
|
|
2069
2070
|
F: __dxlog_file7,
|
|
2070
|
-
L:
|
|
2071
|
+
L: 347,
|
|
2071
2072
|
S: this,
|
|
2072
2073
|
C: (f, a) => f(...a)
|
|
2073
2074
|
});
|
|
@@ -2080,7 +2081,7 @@ var InvitationsHandler = class {
|
|
|
2080
2081
|
(0, import_async8.scheduleTask)(ctx, async () => {
|
|
2081
2082
|
(0, import_invariant6.invariant)(invitation.swarmKey, void 0, {
|
|
2082
2083
|
F: __dxlog_file7,
|
|
2083
|
-
L:
|
|
2084
|
+
L: 357,
|
|
2084
2085
|
S: this,
|
|
2085
2086
|
A: [
|
|
2086
2087
|
"invitation.swarmKey",
|
|
@@ -2094,7 +2095,8 @@ var InvitationsHandler = class {
|
|
|
2094
2095
|
protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
|
|
2095
2096
|
teleport.addExtension("dxos.halo.invitations", createExtension());
|
|
2096
2097
|
}),
|
|
2097
|
-
topology: new import_network_manager.StarTopology(topic)
|
|
2098
|
+
topology: new import_network_manager.StarTopology(topic),
|
|
2099
|
+
label: "invitation guest"
|
|
2098
2100
|
});
|
|
2099
2101
|
ctx.onDispose(() => swarmConnection.close());
|
|
2100
2102
|
setState({
|
|
@@ -2124,7 +2126,7 @@ var import_codec_protobuf8 = require("@dxos/codec-protobuf");
|
|
|
2124
2126
|
var import_invariant7 = require("@dxos/invariant");
|
|
2125
2127
|
var import_log6 = require("@dxos/log");
|
|
2126
2128
|
var import_services4 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2127
|
-
var __dxlog_file8 = "/
|
|
2129
|
+
var __dxlog_file8 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
|
|
2128
2130
|
var InvitationsServiceImpl = class {
|
|
2129
2131
|
constructor(_invitationsHandler, _getHandler) {
|
|
2130
2132
|
this._invitationsHandler = _invitationsHandler;
|
|
@@ -2309,7 +2311,7 @@ var import_feed_store3 = require("@dxos/feed-store");
|
|
|
2309
2311
|
var import_invariant8 = require("@dxos/invariant");
|
|
2310
2312
|
var import_log7 = require("@dxos/log");
|
|
2311
2313
|
var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2312
|
-
var __dxlog_file9 = "/
|
|
2314
|
+
var __dxlog_file9 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/invitations/space-invitation-protocol.ts";
|
|
2313
2315
|
var SpaceInvitationProtocol = class {
|
|
2314
2316
|
constructor(_spaceManager, _signingContext, _keyring, _spaceKey) {
|
|
2315
2317
|
this._spaceManager = _spaceManager;
|
|
@@ -2513,13 +2515,14 @@ var ClientRpcServer = class {
|
|
|
2513
2515
|
var import_codec_protobuf10 = require("@dxos/codec-protobuf");
|
|
2514
2516
|
var import_credentials9 = require("@dxos/credentials");
|
|
2515
2517
|
var import_document_model = require("@dxos/document-model");
|
|
2518
|
+
var import_echo_db = require("@dxos/echo-db");
|
|
2516
2519
|
var import_invariant9 = require("@dxos/invariant");
|
|
2517
2520
|
var import_log8 = require("@dxos/log");
|
|
2518
2521
|
var import_protocols5 = require("@dxos/protocols");
|
|
2519
2522
|
var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
|
|
2520
2523
|
|
|
2521
2524
|
// packages/sdk/client-services/src/version.ts
|
|
2522
|
-
var DXOS_VERSION = "0.1.56
|
|
2525
|
+
var DXOS_VERSION = "0.1.56";
|
|
2523
2526
|
|
|
2524
2527
|
// packages/sdk/client-services/src/packlets/services/platform.ts
|
|
2525
2528
|
var getPlatform = () => {
|
|
@@ -2550,7 +2553,7 @@ var getPlatform = () => {
|
|
|
2550
2553
|
};
|
|
2551
2554
|
|
|
2552
2555
|
// packages/sdk/client-services/src/packlets/services/diagnostics.ts
|
|
2553
|
-
var __dxlog_file10 = "/
|
|
2556
|
+
var __dxlog_file10 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
|
|
2554
2557
|
var DEFAULT_TIMEOUT = 1e3;
|
|
2555
2558
|
var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
2556
2559
|
const diagnostics = {
|
|
@@ -2566,7 +2569,7 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
|
2566
2569
|
{
|
|
2567
2570
|
(0, import_invariant9.invariant)(clientServices.LoggingService, "SystemService is not available.", {
|
|
2568
2571
|
F: __dxlog_file10,
|
|
2569
|
-
L:
|
|
2572
|
+
L: 88,
|
|
2570
2573
|
S: void 0,
|
|
2571
2574
|
A: [
|
|
2572
2575
|
"clientServices.LoggingService",
|
|
@@ -2606,13 +2609,13 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
|
|
|
2606
2609
|
var getProperties = (space) => {
|
|
2607
2610
|
let properties = {};
|
|
2608
2611
|
try {
|
|
2609
|
-
const propertiesItem = space.dataPipeline.itemManager.items.find((item) => item.modelMeta?.type === import_document_model.DocumentModel.meta.type && item.state?.type ===
|
|
2612
|
+
const propertiesItem = space.dataPipeline.itemManager.items.find((item) => item.modelMeta?.type === import_document_model.DocumentModel.meta.type && item.state?.type === import_echo_db.TYPE_PROPERTIES);
|
|
2610
2613
|
const state = propertiesItem?.state;
|
|
2611
2614
|
properties = state?.data;
|
|
2612
2615
|
} catch (err) {
|
|
2613
2616
|
import_log8.log.warn(err.message, void 0, {
|
|
2614
2617
|
F: __dxlog_file10,
|
|
2615
|
-
L:
|
|
2618
|
+
L: 145,
|
|
2616
2619
|
S: void 0,
|
|
2617
2620
|
C: (f, a) => f(...a)
|
|
2618
2621
|
});
|
|
@@ -2719,7 +2722,7 @@ var import_log9 = require("@dxos/log");
|
|
|
2719
2722
|
var import_protocols6 = require("@dxos/protocols");
|
|
2720
2723
|
var import_teleport2 = require("@dxos/teleport");
|
|
2721
2724
|
var import_util3 = require("@dxos/util");
|
|
2722
|
-
var __dxlog_file11 = "/
|
|
2725
|
+
var __dxlog_file11 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
|
|
2723
2726
|
var DEFAULT_RETRY_TIMEOUT = 1e3;
|
|
2724
2727
|
var DEFAULT_SUCCESS_DELAY = 1e3;
|
|
2725
2728
|
var DEFAULT_NOTARIZE_TIMEOUT = 1e4;
|
|
@@ -2989,7 +2992,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
2989
2992
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2990
2993
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2991
2994
|
}
|
|
2992
|
-
var __dxlog_file12 = "/
|
|
2995
|
+
var __dxlog_file12 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space.ts";
|
|
2993
2996
|
var ENABLE_FEED_PURGE = false;
|
|
2994
2997
|
var DataSpace = class DataSpace2 {
|
|
2995
2998
|
constructor(params) {
|
|
@@ -3348,7 +3351,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
3348
3351
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3349
3352
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3350
3353
|
}
|
|
3351
|
-
var __dxlog_file13 = "/
|
|
3354
|
+
var __dxlog_file13 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/data-space-manager.ts";
|
|
3352
3355
|
var DataSpaceManager = class DataSpaceManager2 {
|
|
3353
3356
|
constructor(_spaceManager, _metadataStore, _dataServiceSubscriptions, _keyring, _signingContext, _feedStore) {
|
|
3354
3357
|
this._spaceManager = _spaceManager;
|
|
@@ -3582,7 +3585,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3582
3585
|
onAuthFailure: () => {
|
|
3583
3586
|
import_log11.log.warn("auth failure", void 0, {
|
|
3584
3587
|
F: __dxlog_file13,
|
|
3585
|
-
L:
|
|
3588
|
+
L: 217,
|
|
3586
3589
|
S: this,
|
|
3587
3590
|
C: (f, a) => f(...a)
|
|
3588
3591
|
});
|
|
@@ -3606,7 +3609,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3606
3609
|
space: space.key
|
|
3607
3610
|
}, {
|
|
3608
3611
|
F: __dxlog_file13,
|
|
3609
|
-
L:
|
|
3612
|
+
L: 235,
|
|
3610
3613
|
S: this,
|
|
3611
3614
|
C: (f, a) => f(...a)
|
|
3612
3615
|
});
|
|
@@ -3618,7 +3621,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3618
3621
|
open: this._isOpen
|
|
3619
3622
|
}, {
|
|
3620
3623
|
F: __dxlog_file13,
|
|
3621
|
-
L:
|
|
3624
|
+
L: 242,
|
|
3622
3625
|
S: this,
|
|
3623
3626
|
C: (f, a) => f(...a)
|
|
3624
3627
|
});
|
|
@@ -3631,7 +3634,7 @@ var DataSpaceManager = class DataSpaceManager2 {
|
|
|
3631
3634
|
space: space.key
|
|
3632
3635
|
}, {
|
|
3633
3636
|
F: __dxlog_file13,
|
|
3634
|
-
L:
|
|
3637
|
+
L: 248,
|
|
3635
3638
|
S: this,
|
|
3636
3639
|
C: (f, a) => f(...a)
|
|
3637
3640
|
});
|
|
@@ -3679,7 +3682,7 @@ var import_log12 = require("@dxos/log");
|
|
|
3679
3682
|
var import_protocols8 = require("@dxos/protocols");
|
|
3680
3683
|
var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
|
|
3681
3684
|
var import_util6 = require("@dxos/util");
|
|
3682
|
-
var __dxlog_file14 = "/
|
|
3685
|
+
var __dxlog_file14 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/spaces/spaces-service.ts";
|
|
3683
3686
|
var SpacesServiceImpl = class {
|
|
3684
3687
|
constructor(_identityManager, _spaceManager, _dataServiceSubscriptions, _getDataSpaceManager) {
|
|
3685
3688
|
this._identityManager = _identityManager;
|
|
@@ -3728,7 +3731,7 @@ var SpacesServiceImpl = class {
|
|
|
3728
3731
|
spaces
|
|
3729
3732
|
});
|
|
3730
3733
|
}, {
|
|
3731
|
-
maxFrequency: 2
|
|
3734
|
+
maxFrequency: process.env.NODE_ENV === "test" ? void 0 : 2
|
|
3732
3735
|
});
|
|
3733
3736
|
(0, import_async13.scheduleTask)(ctx, async () => {
|
|
3734
3737
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
@@ -3858,7 +3861,7 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
3858
3861
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3859
3862
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3860
3863
|
}
|
|
3861
|
-
var __dxlog_file15 = "/
|
|
3864
|
+
var __dxlog_file15 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-context.ts";
|
|
3862
3865
|
var ServiceContext = class ServiceContext2 {
|
|
3863
3866
|
// prettier-ignore
|
|
3864
3867
|
constructor(storage, networkManager, signalManager, modelFactory) {
|
|
@@ -3879,7 +3882,8 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3879
3882
|
root: storage.createDirectory("feeds"),
|
|
3880
3883
|
signer: this.keyring,
|
|
3881
3884
|
hypercore: {
|
|
3882
|
-
valueEncoding: import_echo_pipeline3.valueEncoding
|
|
3885
|
+
valueEncoding: import_echo_pipeline3.valueEncoding,
|
|
3886
|
+
stats: true
|
|
3883
3887
|
}
|
|
3884
3888
|
})
|
|
3885
3889
|
});
|
|
@@ -3899,7 +3903,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3899
3903
|
await this._checkStorageVersion();
|
|
3900
3904
|
(0, import_log13.log)("opening...", void 0, {
|
|
3901
3905
|
F: __dxlog_file15,
|
|
3902
|
-
L:
|
|
3906
|
+
L: 135,
|
|
3903
3907
|
S: this,
|
|
3904
3908
|
C: (f, a) => f(...a)
|
|
3905
3909
|
});
|
|
@@ -3907,7 +3911,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3907
3911
|
id: this._instanceId
|
|
3908
3912
|
}), {
|
|
3909
3913
|
F: __dxlog_file15,
|
|
3910
|
-
L:
|
|
3914
|
+
L: 136,
|
|
3911
3915
|
S: this,
|
|
3912
3916
|
C: (f, a) => f(...a)
|
|
3913
3917
|
});
|
|
@@ -3922,13 +3926,13 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3922
3926
|
id: this._instanceId
|
|
3923
3927
|
}), {
|
|
3924
3928
|
F: __dxlog_file15,
|
|
3925
|
-
L:
|
|
3929
|
+
L: 144,
|
|
3926
3930
|
S: this,
|
|
3927
3931
|
C: (f, a) => f(...a)
|
|
3928
3932
|
});
|
|
3929
3933
|
(0, import_log13.log)("opened", void 0, {
|
|
3930
3934
|
F: __dxlog_file15,
|
|
3931
|
-
L:
|
|
3935
|
+
L: 145,
|
|
3932
3936
|
S: this,
|
|
3933
3937
|
C: (f, a) => f(...a)
|
|
3934
3938
|
});
|
|
@@ -3936,7 +3940,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3936
3940
|
async close() {
|
|
3937
3941
|
(0, import_log13.log)("closing...", void 0, {
|
|
3938
3942
|
F: __dxlog_file15,
|
|
3939
|
-
L:
|
|
3943
|
+
L: 149,
|
|
3940
3944
|
S: this,
|
|
3941
3945
|
C: (f, a) => f(...a)
|
|
3942
3946
|
});
|
|
@@ -3952,7 +3956,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3952
3956
|
this.dataServiceSubscriptions.clear();
|
|
3953
3957
|
(0, import_log13.log)("closed", void 0, {
|
|
3954
3958
|
F: __dxlog_file15,
|
|
3955
|
-
L:
|
|
3959
|
+
L: 160,
|
|
3956
3960
|
S: this,
|
|
3957
3961
|
C: (f, a) => f(...a)
|
|
3958
3962
|
});
|
|
@@ -3990,7 +3994,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
3990
3994
|
async _initialize(ctx) {
|
|
3991
3995
|
(0, import_log13.log)("initializing spaces...", void 0, {
|
|
3992
3996
|
F: __dxlog_file15,
|
|
3993
|
-
L:
|
|
3997
|
+
L: 192,
|
|
3994
3998
|
S: this,
|
|
3995
3999
|
C: (f, a) => f(...a)
|
|
3996
4000
|
});
|
|
@@ -4013,7 +4017,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4013
4017
|
this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
|
|
4014
4018
|
(0, import_invariant12.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
|
|
4015
4019
|
F: __dxlog_file15,
|
|
4016
|
-
L:
|
|
4020
|
+
L: 215,
|
|
4017
4021
|
S: this,
|
|
4018
4022
|
A: [
|
|
4019
4023
|
"this.dataSpaceManager",
|
|
@@ -4037,7 +4041,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4037
4041
|
details: assertion
|
|
4038
4042
|
}, {
|
|
4039
4043
|
F: __dxlog_file15,
|
|
4040
|
-
L:
|
|
4044
|
+
L: 231,
|
|
4041
4045
|
S: this,
|
|
4042
4046
|
C: (f, a) => f(...a)
|
|
4043
4047
|
});
|
|
@@ -4048,7 +4052,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4048
4052
|
details: assertion
|
|
4049
4053
|
}, {
|
|
4050
4054
|
F: __dxlog_file15,
|
|
4051
|
-
L:
|
|
4055
|
+
L: 235,
|
|
4052
4056
|
S: this,
|
|
4053
4057
|
C: (f, a) => f(...a)
|
|
4054
4058
|
});
|
|
@@ -4059,7 +4063,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4059
4063
|
details: assertion
|
|
4060
4064
|
}, {
|
|
4061
4065
|
F: __dxlog_file15,
|
|
4062
|
-
L:
|
|
4066
|
+
L: 240,
|
|
4063
4067
|
S: this,
|
|
4064
4068
|
C: (f, a) => f(...a)
|
|
4065
4069
|
});
|
|
@@ -4070,7 +4074,7 @@ var ServiceContext = class ServiceContext2 {
|
|
|
4070
4074
|
} catch (err) {
|
|
4071
4075
|
import_log13.log.catch(err, void 0, {
|
|
4072
4076
|
F: __dxlog_file15,
|
|
4073
|
-
L:
|
|
4077
|
+
L: 246,
|
|
4074
4078
|
S: this,
|
|
4075
4079
|
C: (f, a) => f(...a)
|
|
4076
4080
|
});
|
|
@@ -4165,7 +4169,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
4165
4169
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4166
4170
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4167
4171
|
}
|
|
4168
|
-
var __dxlog_file16 = "/
|
|
4172
|
+
var __dxlog_file16 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/locks/node.ts";
|
|
4169
4173
|
var Lock = class {
|
|
4170
4174
|
constructor({ lockKey: lockPath, onAcquire, onRelease }) {
|
|
4171
4175
|
this._lockPath = lockPath;
|
|
@@ -4497,7 +4501,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
4497
4501
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4498
4502
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4499
4503
|
}
|
|
4500
|
-
var __dxlog_file17 = "/
|
|
4504
|
+
var __dxlog_file17 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/services/service-host.ts";
|
|
4501
4505
|
var createDefaultModelFactory = () => {
|
|
4502
4506
|
return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
|
|
4503
4507
|
};
|
|
@@ -4840,7 +4844,7 @@ var import_client_protocol6 = require("@dxos/client-protocol");
|
|
|
4840
4844
|
var import_invariant15 = require("@dxos/invariant");
|
|
4841
4845
|
var import_iframe = require("@dxos/protocols/proto/dxos/iframe");
|
|
4842
4846
|
var import_rpc2 = require("@dxos/rpc");
|
|
4843
|
-
var __dxlog_file18 = "/
|
|
4847
|
+
var __dxlog_file18 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/vault/shell-runtime.ts";
|
|
4844
4848
|
var ShellRuntimeImpl = class {
|
|
4845
4849
|
constructor(_port) {
|
|
4846
4850
|
this._port = _port;
|
|
@@ -4912,7 +4916,7 @@ function _ts_decorate8(decorators, target, key, desc) {
|
|
|
4912
4916
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4913
4917
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4914
4918
|
}
|
|
4915
|
-
var __dxlog_file19 = "/
|
|
4919
|
+
var __dxlog_file19 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts";
|
|
4916
4920
|
var LOCK_KEY = "DXOS_RESOURCE_LOCK";
|
|
4917
4921
|
var IFrameHostRuntime = class {
|
|
4918
4922
|
constructor({ config, origin, appPort, shellPort }) {
|
|
@@ -5027,7 +5031,7 @@ var import_log18 = require("@dxos/log");
|
|
|
5027
5031
|
var import_network_manager4 = require("@dxos/network-manager");
|
|
5028
5032
|
var import_rpc3 = require("@dxos/rpc");
|
|
5029
5033
|
var import_util12 = require("@dxos/util");
|
|
5030
|
-
var __dxlog_file20 = "/
|
|
5034
|
+
var __dxlog_file20 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts";
|
|
5031
5035
|
var IFrameProxyRuntime = class {
|
|
5032
5036
|
constructor({ config, systemPort, shellPort }) {
|
|
5033
5037
|
this._id = String(Math.floor(Math.random() * 1e6));
|
|
@@ -5119,7 +5123,7 @@ function _ts_decorate9(decorators, target, key, desc) {
|
|
|
5119
5123
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5120
5124
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5121
5125
|
}
|
|
5122
|
-
var __dxlog_file21 = "/
|
|
5126
|
+
var __dxlog_file21 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/vault/worker-session.ts";
|
|
5123
5127
|
var WorkerSession = class {
|
|
5124
5128
|
constructor({ serviceHost, systemPort, appPort, shellPort, readySignal }) {
|
|
5125
5129
|
this._startTrigger = new import_async21.Trigger();
|
|
@@ -5273,7 +5277,7 @@ _ts_decorate9([
|
|
|
5273
5277
|
], WorkerSession.prototype, "lockKey", void 0);
|
|
5274
5278
|
|
|
5275
5279
|
// packages/sdk/client-services/src/packlets/vault/worker-runtime.ts
|
|
5276
|
-
var __dxlog_file22 = "/
|
|
5280
|
+
var __dxlog_file22 = "/mnt/ramdisk/work/packages/sdk/client-services/src/packlets/vault/worker-runtime.ts";
|
|
5277
5281
|
var WorkerRuntime = class {
|
|
5278
5282
|
// prettier-ignore
|
|
5279
5283
|
constructor(_configProvider) {
|
|
@@ -5317,7 +5321,7 @@ var WorkerRuntime = class {
|
|
|
5317
5321
|
});
|
|
5318
5322
|
} catch (err) {
|
|
5319
5323
|
this._ready.wake(err);
|
|
5320
|
-
import_log20.log.
|
|
5324
|
+
import_log20.log.error("starting", err, {
|
|
5321
5325
|
F: __dxlog_file22,
|
|
5322
5326
|
L: 66,
|
|
5323
5327
|
S: this,
|