node-csfd-api 5.8.0-next.0 → 5.8.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/cli.js +6 -6
- package/package.js +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -141,7 +141,7 @@ async function main() {
|
|
|
141
141
|
}
|
|
142
142
|
case "--version":
|
|
143
143
|
case "-v":
|
|
144
|
-
console.log(c.bold("5.8.0
|
|
144
|
+
console.log(c.bold("5.8.0"));
|
|
145
145
|
break;
|
|
146
146
|
case "update":
|
|
147
147
|
await runUpdate();
|
|
@@ -234,15 +234,15 @@ async function checkForUpdateInBackground() {
|
|
|
234
234
|
} catch {}
|
|
235
235
|
}
|
|
236
236
|
} catch {}
|
|
237
|
-
if (!latestVersion || compareSemver("5.8.0
|
|
237
|
+
if (!latestVersion || compareSemver("5.8.0", latestVersion) >= 0) return;
|
|
238
238
|
console.log("");
|
|
239
239
|
console.log(c.dim(" " + "─".repeat(44)));
|
|
240
|
-
console.log(` ${c.yellow(c.bold("↑ Update available:"))} ${c.dim("5.8.0
|
|
240
|
+
console.log(` ${c.yellow(c.bold("↑ Update available:"))} ${c.dim("5.8.0")} → ${c.bold(c.green(latestVersion))}`);
|
|
241
241
|
console.log(` ${c.dim("Run")} ${c.cyan(getCommandName() + " update")} ${c.dim("for upgrade instructions.")}`);
|
|
242
242
|
} catch {}
|
|
243
243
|
}
|
|
244
244
|
async function runUpdate() {
|
|
245
|
-
console.log(c.dim("Current version: ") + c.bold("5.8.0
|
|
245
|
+
console.log(c.dim("Current version: ") + c.bold("5.8.0"));
|
|
246
246
|
console.log(c.dim("Checking for updates..."));
|
|
247
247
|
let latest;
|
|
248
248
|
try {
|
|
@@ -255,7 +255,7 @@ async function runUpdate() {
|
|
|
255
255
|
console.error(err("Could not determine latest version."));
|
|
256
256
|
process.exit(1);
|
|
257
257
|
}
|
|
258
|
-
const cmp = compareSemver("5.8.0
|
|
258
|
+
const cmp = compareSemver("5.8.0", latest);
|
|
259
259
|
if (cmp === 0) {
|
|
260
260
|
console.log(c.green("✔ Already up to date."));
|
|
261
261
|
return;
|
|
@@ -268,7 +268,7 @@ async function runUpdate() {
|
|
|
268
268
|
}
|
|
269
269
|
function printUsage() {
|
|
270
270
|
const cmd = getCommandName();
|
|
271
|
-
const header = c.bold(c.cyan("csfd")) + " " + c.dim(`v5.8.0
|
|
271
|
+
const header = c.bold(c.cyan("csfd")) + " " + c.dim(`v5.8.0`);
|
|
272
272
|
const usage = c.bold("Usage:") + ` ${c.cyan(cmd)} ${c.dim("<command> [options]")}`;
|
|
273
273
|
const section = (title) => c.bold(title);
|
|
274
274
|
const cmd_ = (name) => " " + c.cyan(name);
|
package/package.js
CHANGED