dsh-ds-balance 2.1.2 → 2.2.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.
Files changed (48) hide show
  1. package/README.md +78 -19
  2. package/README_en.md +81 -19
  3. package/lib/adapters/domain-core-store.d.ts +2 -2
  4. package/lib/adapters/domain-core-store.js +3 -1
  5. package/lib/adapters/host-account.d.ts +66 -0
  6. package/lib/adapters/host-account.js +68 -0
  7. package/lib/client.js +473 -114
  8. package/lib/domain/account.d.ts +40 -0
  9. package/lib/domain/account.js +74 -0
  10. package/lib/domain/balance.d.ts +20 -1
  11. package/lib/domain/normalize.d.ts +3 -2
  12. package/lib/domain/normalize.js +3 -2
  13. package/lib/domain/severity.d.ts +8 -2
  14. package/lib/domain/severity.js +11 -4
  15. package/lib/domain/situation.d.ts +104 -0
  16. package/lib/domain/situation.js +93 -0
  17. package/lib/http/handlers.d.ts +1 -1
  18. package/lib/http/handlers.js +29 -5
  19. package/lib/http/wire.d.ts +11 -1
  20. package/lib/http/wire.js +2 -0
  21. package/lib/index.js +122 -6
  22. package/lib/ports/account.d.ts +27 -0
  23. package/lib/ports/account.js +9 -0
  24. package/lib/services/balance-service.d.ts +66 -85
  25. package/lib/services/balance-service.js +132 -181
  26. package/lib/services/balance-source.d.ts +174 -0
  27. package/lib/services/balance-source.js +294 -0
  28. package/lib/services/scheduler.d.ts +31 -2
  29. package/lib/services/scheduler.js +29 -2
  30. package/lib/services/source-readers.d.ts +26 -0
  31. package/lib/services/source-readers.js +73 -0
  32. package/lib/services/source-selector.d.ts +50 -0
  33. package/lib/services/source-selector.js +64 -0
  34. package/lib/types/client/api-types.d.ts +16 -0
  35. package/lib/types/client/data.d.ts +12 -3
  36. package/lib/types/client/index.d.ts +6 -0
  37. package/lib/types/client/locales.d.ts +10 -18
  38. package/lib/types/client/mock/index.d.ts +12 -11
  39. package/lib/types/client/mock/scenarios.d.ts +13 -5
  40. package/lib/types/client/model.d.ts +49 -25
  41. package/lib/types/client/route-hint.d.ts +61 -0
  42. package/lib/types/client/sidebar/BalancePopover.d.ts +7 -0
  43. package/lib/types/client/sidebar/PercentRing.d.ts +13 -5
  44. package/lib/types/client/sidebar/SidebarBalance.d.ts +9 -1
  45. package/lib/types/client/situation.d.ts +164 -0
  46. package/lib/version.d.ts +1 -1
  47. package/lib/version.js +1 -1
  48. package/package.json +25 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ds-balance",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "icon": "./icon.svg",
5
5
  "description": "DSH plugin: shows the DeepSeek account balance at the bottom of the sidebar, with a configuration card on the Plugins page.",
6
6
  "keywords": [
@@ -47,7 +47,7 @@
47
47
  "LICENSE"
48
48
  ],
49
49
  "engines": {
50
- "dsh": ">=0.1.7-alpha.1",
50
+ "dsh": ">=0.2.0-rc.1",
51
51
  "node": ">=20"
52
52
  },
53
53
  "dsh": {
@@ -75,15 +75,16 @@
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@deepseek-ai/cordis": "^4.0.3",
78
- "@deepseek-ai/dsh-client-connection": ">=0.1.7-alpha.1",
79
- "@deepseek-ai/dsh-client-locale": ">=0.1.7-alpha.1",
80
- "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-alpha.1",
81
- "@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-alpha.1",
82
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-alpha.1",
83
- "@deepseek-ai/dsh-credentials": ">=0.1.7-alpha.1",
84
- "@deepseek-ai/dsh-home-paths": ">=0.1.7-alpha.1",
85
- "@deepseek-ai/dsh-settings": ">=0.1.7-alpha.1",
86
- "@deepseek-ai/dsh-storage-domain": ">=0.1.7-alpha.1",
78
+ "@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.1",
79
+ "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1",
80
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.1",
81
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.1",
82
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1",
83
+ "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1",
84
+ "@deepseek-ai/dsh-deepseek-account-platform": ">=0.2.0-rc.1",
85
+ "@deepseek-ai/dsh-home-paths": ">=0.2.0-rc.1",
86
+ "@deepseek-ai/dsh-settings": ">=0.2.0-rc.1",
87
+ "@deepseek-ai/dsh-storage-domain": ">=0.2.0-rc.1",
87
88
  "@deepseek-ai/schemastery": "^3.18.3",
88
89
  "react": "^18.3.1",
89
90
  "react-dom": "^18.3.1"
@@ -91,18 +92,19 @@
91
92
  "devDependencies": {
92
93
  "@deepseek-ai/cordis": "^4.0.3",
93
94
  "@deepseek-ai/cordis-plugin-loader": "^1.0.4",
94
- "@deepseek-ai/dsh-client-connection": ">=0.1.7-alpha.1",
95
- "@deepseek-ai/dsh-client-locale": ">=0.1.7-alpha.1",
96
- "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.1.7-alpha.1",
97
- "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-alpha.1",
98
- "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.7-alpha.1",
99
- "@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-alpha.1",
100
- "@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.7-alpha.1",
101
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-alpha.1",
102
- "@deepseek-ai/dsh-credentials": ">=0.1.7-alpha.1",
103
- "@deepseek-ai/dsh-home-paths": ">=0.1.7-alpha.1",
104
- "@deepseek-ai/dsh-settings": ">=0.1.7-alpha.1",
105
- "@deepseek-ai/dsh-storage-domain": ">=0.1.7-alpha.1",
95
+ "@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.1",
96
+ "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1",
97
+ "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.0-rc.1",
98
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.1",
99
+ "@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.1",
100
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.1",
101
+ "@deepseek-ai/dsh-client-ui-sidebar": ">=0.2.0-rc.1",
102
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1",
103
+ "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1",
104
+ "@deepseek-ai/dsh-deepseek-account-platform": ">=0.2.0-rc.1",
105
+ "@deepseek-ai/dsh-home-paths": ">=0.2.0-rc.1",
106
+ "@deepseek-ai/dsh-settings": ">=0.2.0-rc.1",
107
+ "@deepseek-ai/dsh-storage-domain": ">=0.2.0-rc.1",
106
108
  "@deepseek-ai/schemastery": "^3.18.3",
107
109
  "@eslint/js": "^10.0.1",
108
110
  "@types/node": "^20.0.0",