deepseek-tui 0.8.0 → 0.8.2
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/package.json +2 -2
- package/scripts/install.js +12 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepseek-tui",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"deepseekBinaryVersion": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
|
+
"deepseekBinaryVersion": "0.8.1",
|
|
5
5
|
"description": "Install and run deepseek and deepseek-tui binaries from GitHub release artifacts.",
|
|
6
6
|
"author": "Hmbown",
|
|
7
7
|
"license": "MIT",
|
package/scripts/install.js
CHANGED
|
@@ -135,7 +135,7 @@ async function loadChecksums(version, repo) {
|
|
|
135
135
|
return parseChecksumManifest(await downloadText(checksumManifestUrl(version, repo)));
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
async function ensureBinary(targetPath, assetName, version, repo,
|
|
138
|
+
async function ensureBinary(targetPath, assetName, version, repo, getChecksums) {
|
|
139
139
|
const marker = `${targetPath}.version`;
|
|
140
140
|
const downloadIfNeeded =
|
|
141
141
|
process.env.DEEPSEEK_TUI_FORCE_DOWNLOAD === "1" || process.env.DEEPSEEK_FORCE_DOWNLOAD === "1";
|
|
@@ -144,11 +144,11 @@ async function ensureBinary(targetPath, assetName, version, repo, checksums) {
|
|
|
144
144
|
if (existing) {
|
|
145
145
|
const markerVersion = await readLocalVersion(marker);
|
|
146
146
|
if (markerVersion === String(version)) {
|
|
147
|
-
await verifyChecksum(targetPath, assetName, checksums);
|
|
148
147
|
return targetPath;
|
|
149
148
|
}
|
|
150
149
|
}
|
|
151
150
|
}
|
|
151
|
+
const checksums = await getChecksums();
|
|
152
152
|
const url = releaseAssetUrl(assetName, version, repo);
|
|
153
153
|
const destination = `${targetPath}.${process.pid}.${Date.now()}.download`;
|
|
154
154
|
await download(url, destination);
|
|
@@ -175,11 +175,18 @@ async function run() {
|
|
|
175
175
|
const paths = binaryPaths();
|
|
176
176
|
const releaseDir = releaseBinaryDirectory();
|
|
177
177
|
await mkdir(releaseDir, { recursive: true });
|
|
178
|
-
|
|
178
|
+
|
|
179
|
+
let checksumsPromise;
|
|
180
|
+
const getChecksums = () => {
|
|
181
|
+
if (!checksumsPromise) {
|
|
182
|
+
checksumsPromise = loadChecksums(version, repo);
|
|
183
|
+
}
|
|
184
|
+
return checksumsPromise;
|
|
185
|
+
};
|
|
179
186
|
|
|
180
187
|
await Promise.all([
|
|
181
|
-
ensureBinary(paths.deepseek.target, paths.deepseek.asset, version, repo,
|
|
182
|
-
ensureBinary(paths.tui.target, paths.tui.asset, version, repo,
|
|
188
|
+
ensureBinary(paths.deepseek.target, paths.deepseek.asset, version, repo, getChecksums),
|
|
189
|
+
ensureBinary(paths.tui.target, paths.tui.asset, version, repo, getChecksums),
|
|
183
190
|
]);
|
|
184
191
|
}
|
|
185
192
|
|