@dshtrading/client-ui-updater 0.1.5 → 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 +22 -22
- 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
|
+
"availableMeta": "D0_G6G_availableMeta",
|
|
136
|
+
"versionLabel": "D0_G6G_versionLabel",
|
|
137
|
+
"notes": "D0_G6G_notes",
|
|
138
|
+
"versions": "D0_G6G_versions",
|
|
139
|
+
"progressWrap": "D0_G6G_progressWrap",
|
|
140
|
+
"link": "D0_G6G_link",
|
|
141
|
+
"availableCard": "D0_G6G_availableCard",
|
|
135
142
|
"statusTextAvailable": "D0_G6G_statusTextAvailable",
|
|
143
|
+
"progressTrack": "D0_G6G_progressTrack",
|
|
144
|
+
"statusRow": "D0_G6G_statusRow",
|
|
145
|
+
"notesTitle": "D0_G6G_notesTitle",
|
|
136
146
|
"statusTextError": "D0_G6G_statusTextError",
|
|
137
|
-
"availableCard": "D0_G6G_availableCard",
|
|
138
|
-
"versionLabel": "D0_G6G_versionLabel",
|
|
139
147
|
"actions": "D0_G6G_actions",
|
|
140
|
-
"upd-slide": "D0_G6G_upd-slide",
|
|
141
|
-
"progressTrack": "D0_G6G_progressTrack",
|
|
142
|
-
"doneMeta": "D0_G6G_doneMeta",
|
|
143
|
-
"statusTextOk": "D0_G6G_statusTextOk",
|
|
144
|
-
"primaryButton": "D0_G6G_primaryButton",
|
|
145
|
-
"versionItem": "D0_G6G_versionItem",
|
|
146
|
-
"errorText": "D0_G6G_errorText",
|
|
147
148
|
"progressIndeterminate": "D0_G6G_progressIndeterminate",
|
|
149
|
+
"errorText": "D0_G6G_errorText",
|
|
150
|
+
"versionItem": "D0_G6G_versionItem",
|
|
151
|
+
"statusTextOk": "D0_G6G_statusTextOk",
|
|
152
|
+
"progressFill": "D0_G6G_progressFill",
|
|
153
|
+
"upd-slide": "D0_G6G_upd-slide",
|
|
154
|
+
"lead": "D0_G6G_lead",
|
|
148
155
|
"availableTitle": "D0_G6G_availableTitle",
|
|
149
|
-
"root": "D0_G6G_root",
|
|
150
|
-
"statusRow": "D0_G6G_statusRow",
|
|
151
|
-
"versions": "D0_G6G_versions",
|
|
152
156
|
"versionValue": "D0_G6G_versionValue",
|
|
157
|
+
"secondaryButton": "D0_G6G_secondaryButton",
|
|
153
158
|
"statusText": "D0_G6G_statusText",
|
|
154
|
-
"progressLabel": "D0_G6G_progressLabel",
|
|
155
|
-
"availableMeta": "D0_G6G_availableMeta",
|
|
156
|
-
"progressFill": "D0_G6G_progressFill",
|
|
157
|
-
"notesTitle": "D0_G6G_notesTitle",
|
|
158
|
-
"notes": "D0_G6G_notes",
|
|
159
|
-
"lead": "D0_G6G_lead",
|
|
160
|
-
"link": "D0_G6G_link",
|
|
161
|
-
"progressWrap": "D0_G6G_progressWrap",
|
|
162
159
|
"doneCard": "D0_G6G_doneCard",
|
|
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",
|