filecafe 0.3.2 → 0.3.3
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/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as updateCachePath, d as normalizeBaseUrl, f as readConfig, l as configPath, m as writeConfig, n as fetchLatestVersion, o as updateUpdateCache, p as resolveSettings, r as readUpdateCache, s as VERSION, t as CHECK_INTERVAL_MS, u as deleteConfig } from "./update-cache-
|
|
2
|
+
import { a as updateCachePath, d as normalizeBaseUrl, f as readConfig, l as configPath, m as writeConfig, n as fetchLatestVersion, o as updateUpdateCache, p as resolveSettings, r as readUpdateCache, s as VERSION, t as CHECK_INTERVAL_MS, u as deleteConfig } from "./update-cache-tQTolnAo.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { homedir, hostname, tmpdir } from "node:os";
|
|
5
5
|
import { realpath, stat } from "node:fs/promises";
|
|
@@ -1009,7 +1009,7 @@ function startUpdateCheck(context) {
|
|
|
1009
1009
|
async function offerUpdate(context, version) {
|
|
1010
1010
|
const color = colorsFor(context.stderr, context.env);
|
|
1011
1011
|
const run = (command) => color.cyan(command);
|
|
1012
|
-
context.stderr.write(version ? `\nUpdate available for filecafe (${color.gray(VERSION)} → ${color.green(version)})
|
|
1012
|
+
context.stderr.write(version ? `\nUpdate available for filecafe (${color.gray(`v${VERSION}`)} → ${color.green(`v${version}`)})\nChangelog: ${color.cyan.underline(`${RELEASES_URL}/v${version}`)}\n` : "\nA newer version of filecafe may be available.\n");
|
|
1013
1013
|
if (context.env.npm_command === "exec" || context.scriptPath.replaceAll("\\", "/").includes("/_npx/")) {
|
|
1014
1014
|
context.stderr.write(`Run: ${run("npx filecafe@latest")}\n`);
|
|
1015
1015
|
return;
|
|
@@ -1019,7 +1019,8 @@ async function offerUpdate(context, version) {
|
|
|
1019
1019
|
context.stderr.write(installer ? `Run: ${run(installer.join(" "))}\n` : UNKNOWN_INSTALL);
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
1022
|
-
|
|
1022
|
+
const question = `${color.gray("?")} ${color.bold("Would you like to upgrade now?")} ${color.gray("(Y/n)")} `;
|
|
1023
|
+
if (!await context.confirm(question)) return;
|
|
1023
1024
|
const installer = await detectInstaller(context);
|
|
1024
1025
|
if (!installer) {
|
|
1025
1026
|
context.stderr.write(UNKNOWN_INSTALL);
|
|
@@ -108,7 +108,7 @@ async function resolveSettings(environment, urlOption) {
|
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
// src/version.ts
|
|
111
|
-
const VERSION = "0.3.
|
|
111
|
+
const VERSION = "0.3.3";
|
|
112
112
|
// src/update-cache.ts
|
|
113
113
|
const REGISTRY_URL = "https://registry.npmjs.org/filecafe/latest";
|
|
114
114
|
/** Ask npm at most once a day. */
|
package/dist/update-worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as refreshUpdateCache, s as VERSION } from "./update-cache-
|
|
1
|
+
import { i as refreshUpdateCache, s as VERSION } from "./update-cache-tQTolnAo.js";
|
|
2
2
|
// src/update-worker.ts
|
|
3
3
|
/**
|
|
4
4
|
* Spawned detached by the CLI to refresh the update cache, so no command ever waits on npm.
|