@lmzhen/dsh-evolution-state 0.26.15 → 0.27.0
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/lib/index.js +4 -0
- package/package.json +8 -5
package/lib/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var EvolutionState = class extends Service {
|
|
|
17
17
|
super(ctx, "evolutionState");
|
|
18
18
|
this.providerName = config.provider ?? "";
|
|
19
19
|
if (this.providerName && ctx.evolutionStateStorage.hasProviders()) ctx.evolutionStateStorage.provider(this.providerName);
|
|
20
|
+
if (this.providerName === "" && ctx.evolutionStateStorage.providerNames().length > 1) {
|
|
21
|
+
const names = ctx.evolutionStateStorage.providerNames().join(", ");
|
|
22
|
+
throw new Error("evolution-state: " + String(ctx.evolutionStateStorage.providerNames().length) + " state providers are registered (" + names + ") and this row pins none, so the effective medium would be registration order — a silent rebind that leaves existing state on disk and unreadable. Pin one: provider: <name>.");
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
storage() {
|
|
22
26
|
return this.ctx.evolutionStateStorage.provider(this.providerName || void 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-state",
|
|
3
3
|
"description": "Durable evolution state consumer over pluggable storage providers (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -26,13 +26,16 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
29
|
+
"@deepseek-ai/schemastery": "^3.18.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
33
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.
|
|
32
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
33
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.27.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.
|
|
36
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.27.0"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"dsh": ">=0.2.1-rc.1 <0.2.2-0"
|
|
37
40
|
}
|
|
38
41
|
}
|