@dshtrading/client-ui-updater 0.1.4 → 0.1.6
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/client.js +19 -19
- package/lib/index.js +2 -2
- package/package.json +3 -2
package/lib/client.js
CHANGED
|
@@ -132,36 +132,36 @@ window.__ModuleLoader__.load({
|
|
|
132
132
|
document.head.appendChild(tag);
|
|
133
133
|
}
|
|
134
134
|
var updater_section_module_css_default = {
|
|
135
|
-
"progressLabel": "D0_G6G_progressLabel",
|
|
136
135
|
"availableMeta": "D0_G6G_availableMeta",
|
|
136
|
+
"versionLabel": "D0_G6G_versionLabel",
|
|
137
|
+
"notes": "D0_G6G_notes",
|
|
138
|
+
"versions": "D0_G6G_versions",
|
|
139
|
+
"progressWrap": "D0_G6G_progressWrap",
|
|
137
140
|
"link": "D0_G6G_link",
|
|
141
|
+
"availableCard": "D0_G6G_availableCard",
|
|
138
142
|
"statusTextAvailable": "D0_G6G_statusTextAvailable",
|
|
139
|
-
"
|
|
140
|
-
"root": "D0_G6G_root",
|
|
141
|
-
"doneMeta": "D0_G6G_doneMeta",
|
|
142
|
-
"errorText": "D0_G6G_errorText",
|
|
143
|
+
"progressTrack": "D0_G6G_progressTrack",
|
|
143
144
|
"statusRow": "D0_G6G_statusRow",
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"versions": "D0_G6G_versions",
|
|
145
|
+
"notesTitle": "D0_G6G_notesTitle",
|
|
146
|
+
"statusTextError": "D0_G6G_statusTextError",
|
|
147
147
|
"actions": "D0_G6G_actions",
|
|
148
|
-
"
|
|
148
|
+
"progressIndeterminate": "D0_G6G_progressIndeterminate",
|
|
149
|
+
"errorText": "D0_G6G_errorText",
|
|
149
150
|
"versionItem": "D0_G6G_versionItem",
|
|
150
151
|
"statusTextOk": "D0_G6G_statusTextOk",
|
|
151
|
-
"progressTrack": "D0_G6G_progressTrack",
|
|
152
|
-
"primaryButton": "D0_G6G_primaryButton",
|
|
153
|
-
"notes": "D0_G6G_notes",
|
|
154
152
|
"progressFill": "D0_G6G_progressFill",
|
|
155
|
-
"
|
|
153
|
+
"upd-slide": "D0_G6G_upd-slide",
|
|
154
|
+
"lead": "D0_G6G_lead",
|
|
156
155
|
"availableTitle": "D0_G6G_availableTitle",
|
|
156
|
+
"versionValue": "D0_G6G_versionValue",
|
|
157
157
|
"secondaryButton": "D0_G6G_secondaryButton",
|
|
158
|
-
"
|
|
159
|
-
"statusTextError": "D0_G6G_statusTextError",
|
|
158
|
+
"statusText": "D0_G6G_statusText",
|
|
160
159
|
"doneCard": "D0_G6G_doneCard",
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
160
|
+
"primaryButton": "D0_G6G_primaryButton",
|
|
161
|
+
"progressLabel": "D0_G6G_progressLabel",
|
|
162
|
+
"root": "D0_G6G_root",
|
|
163
|
+
"doneMeta": "D0_G6G_doneMeta",
|
|
164
|
+
"doneTitle": "D0_G6G_doneTitle"
|
|
165
165
|
};
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region src/client/UpdaterSection.tsx
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { discoverEnvironment } from "./environment.js";
|
|
2
2
|
import { UpdaterError, UpdaterService } from "./updater-service.js";
|
|
3
|
-
import
|
|
3
|
+
import { dshHomeDir } from "@dshtrading/dsh-home";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region src/index.ts
|
|
6
6
|
/** 本插件不硬依赖任何服务(headless 宿主零要求);web 面依赖在 apply 内声明。 */
|
|
@@ -31,7 +31,7 @@ function apply(ctx) {
|
|
|
31
31
|
const service = new UpdaterService({
|
|
32
32
|
env,
|
|
33
33
|
repo: repoSlug(),
|
|
34
|
-
statePath: process.env.DSH_TRADING_UPDATER_STATE ?? path.join(
|
|
34
|
+
statePath: process.env.DSH_TRADING_UPDATER_STATE ?? path.join(dshHomeDir(), "trading-updater", "state.json"),
|
|
35
35
|
...process.env.DSH_TRADING_UPDATE_API_BASE !== void 0 && process.env.DSH_TRADING_UPDATE_API_BASE !== "" ? { github: { apiBase: process.env.DSH_TRADING_UPDATE_API_BASE } } : {}
|
|
36
36
|
});
|
|
37
37
|
ctx.effect(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dshtrading/client-ui-updater",
|
|
3
3
|
"description": "dsh-trading auto-update plugin: GitHub Releases version check with release notes, incremental update of the @dshtrading/* plugin family inside a desktop-seeded profile (vendor payload zip, per-package swap), and the '软件更新' first-level settings section. Browser half registers the settings.section; node half registers the /dshtrading/api/updater routes and the update engine.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"fflate": "^0.8.2"
|
|
28
|
+
"fflate": "^0.8.2",
|
|
29
|
+
"@dshtrading/dsh-home": "^0.1.6"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@deepseek-ai/cordis": ">=4.0.0",
|