@praise166/vire 0.1.7 → 0.1.8

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 (2) hide show
  1. package/dist/vire.js +9 -10
  2. package/package.json +2 -2
package/dist/vire.js CHANGED
@@ -214,20 +214,19 @@ async function checkForUpdate(status) {
214
214
  return null;
215
215
  }
216
216
  if (!remoteBuild) {
217
- return downloadRuntime(status.download_url, 'latest');
217
+ return downloadRuntime(status.download_url, 'latest', true);
218
218
  }
219
219
  if (remoteBuild === currentBuild) {
220
- const existing = await downloadedRuntimePath(remoteBuild);
220
+ return downloadRuntime(status.download_url, remoteBuild, true);
221
+ }
222
+ return downloadRuntime(status.download_url, remoteBuild, true);
223
+ }
224
+ async function downloadRuntime(url, build, refresh = false) {
225
+ if (!refresh) {
226
+ const existing = await downloadedRuntimePath(build);
221
227
  if (existing)
222
228
  return existing;
223
- return downloadRuntime(status.download_url, remoteBuild);
224
229
  }
225
- return downloadRuntime(status.download_url, remoteBuild);
226
- }
227
- async function downloadRuntime(url, build) {
228
- const existing = await downloadedRuntimePath(build);
229
- if (existing)
230
- return existing;
231
230
  if (!url) {
232
231
  return null;
233
232
  }
@@ -408,7 +407,7 @@ async function ensureReleaseBinary(downloadedRuntime) {
408
407
  await access(binary).catch(() => {
409
408
  exists = false;
410
409
  });
411
- if (exists && process.env.VIRE_USE_UPDATED_RUNTIME !== 'true') {
410
+ if (exists && process.env.VIRE_USE_LOCAL_RUNTIME === 'true') {
412
411
  return binary;
413
412
  }
414
413
  const updateBinary = await newestDownloadedRuntime();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praise166/vire",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,7 +8,7 @@
8
8
  "vire.self": "./dist/vire.js"
9
9
  },
10
10
  "vire": {
11
- "statusUrl": "https://vire-self-status.your-subdomain.workers.dev"
11
+ "statusUrl": "https://seo.manipu.lat"
12
12
  },
13
13
  "scripts": {
14
14
  "dev": "tsx cli/vire.ts",