@dxos/client-services 0.1.46-next.c3cc04c → 0.1.46
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-ZHDJQGXL.mjs → chunk-MGKMTUPD.mjs} +28 -12
- package/dist/lib/browser/{chunk-ZHDJQGXL.mjs.map → chunk-MGKMTUPD.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/index.cjs +26 -10
- 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 +26 -10
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/services/service-context.d.ts +1 -0
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/packlets/services/service-context.ts +12 -1
|
@@ -3861,7 +3861,7 @@ import { FeedFactory, FeedStore } from "@dxos/feed-store";
|
|
|
3861
3861
|
import { Keyring } from "@dxos/keyring";
|
|
3862
3862
|
import { PublicKey as PublicKey9 } from "@dxos/keys";
|
|
3863
3863
|
import { log as log17 } from "@dxos/log";
|
|
3864
|
-
import { trace as trace5 } from "@dxos/protocols";
|
|
3864
|
+
import { STORAGE_VERSION, trace as trace5 } from "@dxos/protocols";
|
|
3865
3865
|
import { Invitation as Invitation4 } from "@dxos/protocols/proto/dxos/client/services";
|
|
3866
3866
|
var ServiceContext = class {
|
|
3867
3867
|
// prettier-ignore
|
|
@@ -3909,9 +3909,10 @@ var ServiceContext = class {
|
|
|
3909
3909
|
scope: this,
|
|
3910
3910
|
callSite: (f, a) => f(...a)
|
|
3911
3911
|
});
|
|
3912
|
+
await this._checkStorageVersion();
|
|
3912
3913
|
log17("opening...", {}, {
|
|
3913
3914
|
file: "service-context.ts",
|
|
3914
|
-
line:
|
|
3915
|
+
line: 123,
|
|
3915
3916
|
scope: this,
|
|
3916
3917
|
callSite: (f, a) => f(...a)
|
|
3917
3918
|
});
|
|
@@ -3924,7 +3925,7 @@ var ServiceContext = class {
|
|
|
3924
3925
|
}
|
|
3925
3926
|
log17("opened", {}, {
|
|
3926
3927
|
file: "service-context.ts",
|
|
3927
|
-
line:
|
|
3928
|
+
line: 131,
|
|
3928
3929
|
scope: this,
|
|
3929
3930
|
callSite: (f, a) => f(...a)
|
|
3930
3931
|
});
|
|
@@ -3932,7 +3933,7 @@ var ServiceContext = class {
|
|
|
3932
3933
|
id: this._instanceId
|
|
3933
3934
|
}), {
|
|
3934
3935
|
file: "service-context.ts",
|
|
3935
|
-
line:
|
|
3936
|
+
line: 132,
|
|
3936
3937
|
scope: this,
|
|
3937
3938
|
callSite: (f, a) => f(...a)
|
|
3938
3939
|
});
|
|
@@ -3941,7 +3942,7 @@ var ServiceContext = class {
|
|
|
3941
3942
|
var _a, _b;
|
|
3942
3943
|
log17("closing...", {}, {
|
|
3943
3944
|
file: "service-context.ts",
|
|
3944
|
-
line:
|
|
3945
|
+
line: 136,
|
|
3945
3946
|
scope: this,
|
|
3946
3947
|
callSite: (f, a) => f(...a)
|
|
3947
3948
|
});
|
|
@@ -3955,7 +3956,7 @@ var ServiceContext = class {
|
|
|
3955
3956
|
this.dataServiceSubscriptions.clear();
|
|
3956
3957
|
log17("closed", {}, {
|
|
3957
3958
|
file: "service-context.ts",
|
|
3958
|
-
line:
|
|
3959
|
+
line: 145,
|
|
3959
3960
|
scope: this,
|
|
3960
3961
|
callSite: (f, a) => f(...a)
|
|
3961
3962
|
});
|
|
@@ -3975,12 +3976,27 @@ var ServiceContext = class {
|
|
|
3975
3976
|
await this._initialize();
|
|
3976
3977
|
return identity;
|
|
3977
3978
|
}
|
|
3979
|
+
async _checkStorageVersion() {
|
|
3980
|
+
await this.metadataStore.load();
|
|
3981
|
+
if (this.metadataStore.version !== STORAGE_VERSION) {
|
|
3982
|
+
log17.error("Invalid storage version", {
|
|
3983
|
+
current: this.metadataStore.version,
|
|
3984
|
+
expected: STORAGE_VERSION
|
|
3985
|
+
}, {
|
|
3986
|
+
file: "service-context.ts",
|
|
3987
|
+
line: 171,
|
|
3988
|
+
scope: this,
|
|
3989
|
+
callSite: (f, a) => f(...a)
|
|
3990
|
+
});
|
|
3991
|
+
await this.metadataStore.clear();
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3978
3994
|
// Called when identity is created.
|
|
3979
3995
|
async _initialize() {
|
|
3980
3996
|
var _a;
|
|
3981
3997
|
log17("initializing spaces...", {}, {
|
|
3982
3998
|
file: "service-context.ts",
|
|
3983
|
-
line:
|
|
3999
|
+
line: 179,
|
|
3984
4000
|
scope: this,
|
|
3985
4001
|
callSite: (f, a) => f(...a)
|
|
3986
4002
|
});
|
|
@@ -4019,7 +4035,7 @@ var ServiceContext = class {
|
|
|
4019
4035
|
details: assertion
|
|
4020
4036
|
}, {
|
|
4021
4037
|
file: "service-context.ts",
|
|
4022
|
-
line:
|
|
4038
|
+
line: 218,
|
|
4023
4039
|
scope: this,
|
|
4024
4040
|
callSite: (f, a) => f(...a)
|
|
4025
4041
|
});
|
|
@@ -4030,7 +4046,7 @@ var ServiceContext = class {
|
|
|
4030
4046
|
details: assertion
|
|
4031
4047
|
}, {
|
|
4032
4048
|
file: "service-context.ts",
|
|
4033
|
-
line:
|
|
4049
|
+
line: 222,
|
|
4034
4050
|
scope: this,
|
|
4035
4051
|
callSite: (f, a) => f(...a)
|
|
4036
4052
|
});
|
|
@@ -4041,7 +4057,7 @@ var ServiceContext = class {
|
|
|
4041
4057
|
details: assertion
|
|
4042
4058
|
}, {
|
|
4043
4059
|
file: "service-context.ts",
|
|
4044
|
-
line:
|
|
4060
|
+
line: 227,
|
|
4045
4061
|
scope: this,
|
|
4046
4062
|
callSite: (f, a) => f(...a)
|
|
4047
4063
|
});
|
|
@@ -4052,7 +4068,7 @@ var ServiceContext = class {
|
|
|
4052
4068
|
} catch (err) {
|
|
4053
4069
|
log17.catch(err, {}, {
|
|
4054
4070
|
file: "service-context.ts",
|
|
4055
|
-
line:
|
|
4071
|
+
line: 233,
|
|
4056
4072
|
scope: this,
|
|
4057
4073
|
callSite: (f, a) => f(...a)
|
|
4058
4074
|
});
|
|
@@ -4494,4 +4510,4 @@ export {
|
|
|
4494
4510
|
ClientServicesHost,
|
|
4495
4511
|
LocalClientServices
|
|
4496
4512
|
};
|
|
4497
|
-
//# sourceMappingURL=chunk-
|
|
4513
|
+
//# sourceMappingURL=chunk-MGKMTUPD.mjs.map
|