@gentbajko/slopify 1.1.1 → 1.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/dist/main.js +10 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -220,12 +220,16 @@ export async function boot(config) {
|
|
|
220
220
|
currentVersion: version,
|
|
221
221
|
previousUpdateFailed: process.env.SLOPIFY_UPDATE_FAILED === "1",
|
|
222
222
|
now: () => Date.now(),
|
|
223
|
-
latest: () =>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
latest: () => process.env.SLOPIFY_DISABLE_UPDATES === "1"
|
|
224
|
+
? Promise.resolve(version)
|
|
225
|
+
: publishedVersion(globalThis.fetch),
|
|
226
|
+
unsupported: () => process.env.SLOPIFY_DISABLE_UPDATES === "1"
|
|
227
|
+
? "This container is updated by pulling a new image and recreating it."
|
|
228
|
+
: !existsSync(oldEntry) || !existsSync(workerEntry)
|
|
229
|
+
? "Run Slopify from its installed package to use in-app updates."
|
|
230
|
+
: npm === undefined
|
|
231
|
+
? "npm is unavailable. Install Node.js with npm to use in-app updates."
|
|
232
|
+
: undefined,
|
|
229
233
|
busy: () => updateDb.prepare("SELECT 1 FROM stages WHERE state = 'running' LIMIT 1").get() !==
|
|
230
234
|
undefined ||
|
|
231
235
|
updateDb
|