@dshtrading/client-ui-updater 0.1.5 → 0.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.
- 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
|
-
"statusTextAvailable": "D0_G6G_statusTextAvailable",
|
|
136
|
-
"statusTextError": "D0_G6G_statusTextError",
|
|
137
135
|
"availableCard": "D0_G6G_availableCard",
|
|
138
|
-
"
|
|
136
|
+
"secondaryButton": "D0_G6G_secondaryButton",
|
|
139
137
|
"actions": "D0_G6G_actions",
|
|
140
|
-
"
|
|
138
|
+
"progressWrap": "D0_G6G_progressWrap",
|
|
139
|
+
"statusTextError": "D0_G6G_statusTextError",
|
|
140
|
+
"versionValue": "D0_G6G_versionValue",
|
|
141
|
+
"root": "D0_G6G_root",
|
|
141
142
|
"progressTrack": "D0_G6G_progressTrack",
|
|
143
|
+
"versionLabel": "D0_G6G_versionLabel",
|
|
144
|
+
"doneCard": "D0_G6G_doneCard",
|
|
145
|
+
"lead": "D0_G6G_lead",
|
|
146
|
+
"availableTitle": "D0_G6G_availableTitle",
|
|
142
147
|
"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",
|
|
148
|
-
"
|
|
149
|
-
"root": "D0_G6G_root",
|
|
150
|
-
"statusRow": "D0_G6G_statusRow",
|
|
151
|
-
"versions": "D0_G6G_versions",
|
|
152
|
-
"versionValue": "D0_G6G_versionValue",
|
|
149
|
+
"statusTextOk": "D0_G6G_statusTextOk",
|
|
153
150
|
"statusText": "D0_G6G_statusText",
|
|
154
151
|
"progressLabel": "D0_G6G_progressLabel",
|
|
155
152
|
"availableMeta": "D0_G6G_availableMeta",
|
|
156
153
|
"progressFill": "D0_G6G_progressFill",
|
|
157
|
-
"
|
|
158
|
-
"notes": "D0_G6G_notes",
|
|
159
|
-
"lead": "D0_G6G_lead",
|
|
154
|
+
"upd-slide": "D0_G6G_upd-slide",
|
|
160
155
|
"link": "D0_G6G_link",
|
|
161
|
-
"
|
|
162
|
-
"
|
|
156
|
+
"errorText": "D0_G6G_errorText",
|
|
157
|
+
"versionItem": "D0_G6G_versionItem",
|
|
158
|
+
"notes": "D0_G6G_notes",
|
|
159
|
+
"versions": "D0_G6G_versions",
|
|
160
|
+
"notesTitle": "D0_G6G_notesTitle",
|
|
161
|
+
"primaryButton": "D0_G6G_primaryButton",
|
|
162
|
+
"statusRow": "D0_G6G_statusRow",
|
|
163
163
|
"doneTitle": "D0_G6G_doneTitle",
|
|
164
|
-
"
|
|
164
|
+
"statusTextAvailable": "D0_G6G_statusTextAvailable"
|
|
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.
|
|
4
|
+
"version": "0.2.0",
|
|
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.2.0"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@deepseek-ai/cordis": ">=4.0.0",
|