itsvertical 0.0.6 → 0.0.7
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/cli/dist/index.js +6 -4
- package/package.json +1 -1
package/cli/dist/index.js
CHANGED
|
@@ -2262,7 +2262,7 @@ import os from "os";
|
|
|
2262
2262
|
import path3 from "path";
|
|
2263
2263
|
var CACHE_DIR = path3.join(os.homedir(), ".itsvertical");
|
|
2264
2264
|
var CACHE_FILE = path3.join(CACHE_DIR, "update-check.json");
|
|
2265
|
-
var CHECK_INTERVAL =
|
|
2265
|
+
var CHECK_INTERVAL = 36e5;
|
|
2266
2266
|
var FETCH_TIMEOUT = 5e3;
|
|
2267
2267
|
var REGISTRY_URL = "https://registry.npmjs.org/itsvertical/latest";
|
|
2268
2268
|
function compareSemver(a, b) {
|
|
@@ -2414,8 +2414,8 @@ async function fetchLatestVersion() {
|
|
|
2414
2414
|
return null;
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
async function checkForUpdate(currentVersion) {
|
|
2418
|
-
if (!shouldCheckForUpdate(currentVersion)) {
|
|
2417
|
+
async function checkForUpdate(currentVersion, { skipCache = false } = {}) {
|
|
2418
|
+
if (!skipCache && !shouldCheckForUpdate(currentVersion)) {
|
|
2419
2419
|
const cache = readCache();
|
|
2420
2420
|
if (cache && compareSemver(cache.latestVersion, currentVersion) > 0) {
|
|
2421
2421
|
return {
|
|
@@ -2831,7 +2831,9 @@ layer.command("status").description("Set the status of a layer").argument("<file
|
|
|
2831
2831
|
}
|
|
2832
2832
|
);
|
|
2833
2833
|
program.command("update").description("Check for and install updates").option("--json", "Output as JSON").option("--check", "Only check, do not install").action(async (options) => {
|
|
2834
|
-
const result = await checkForUpdate(packageJson.version
|
|
2834
|
+
const result = await checkForUpdate(packageJson.version, {
|
|
2835
|
+
skipCache: true
|
|
2836
|
+
});
|
|
2835
2837
|
if (!result) {
|
|
2836
2838
|
if (options.json) {
|
|
2837
2839
|
console.log(
|