@arbidocs/cli 0.3.7 → 0.3.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.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.3.8
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/arbitrationcity/ARBI-frontend/compare/v0.3.7...HEAD)
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- Bypass version cache on explicit arbi update ([570d013d](https://github.com/arbitrationcity/ARBI-frontend/commit/570d013d))
|
|
10
|
+
|
|
11
|
+
### ❤️ Contributors
|
|
12
|
+
|
|
13
|
+
- Dmitri Evseev <dmitri.evseev@arbi.city>
|
|
14
|
+
|
|
3
15
|
## v0.3.7
|
|
4
16
|
|
|
5
17
|
[compare changes](https://github.com/arbitrationcity/ARBI-frontend/compare/v0.3.6...HEAD)
|
package/dist/index.js
CHANGED
|
@@ -3485,9 +3485,11 @@ function writeCache(latest) {
|
|
|
3485
3485
|
} catch {
|
|
3486
3486
|
}
|
|
3487
3487
|
}
|
|
3488
|
-
function getLatestVersion() {
|
|
3489
|
-
|
|
3490
|
-
|
|
3488
|
+
function getLatestVersion(skipCache = false) {
|
|
3489
|
+
if (!skipCache) {
|
|
3490
|
+
const cached = readCache();
|
|
3491
|
+
if (cached) return cached.latest;
|
|
3492
|
+
}
|
|
3491
3493
|
try {
|
|
3492
3494
|
const latest = child_process.execSync("npm view @arbidocs/cli version 2>/dev/null", {
|
|
3493
3495
|
encoding: "utf8",
|
|
@@ -3500,7 +3502,7 @@ function getLatestVersion() {
|
|
|
3500
3502
|
}
|
|
3501
3503
|
}
|
|
3502
3504
|
function getCurrentVersion() {
|
|
3503
|
-
return "0.3.
|
|
3505
|
+
return "0.3.8";
|
|
3504
3506
|
}
|
|
3505
3507
|
function readChangelog(fromVersion, toVersion) {
|
|
3506
3508
|
try {
|
|
@@ -3543,17 +3545,17 @@ function showChangelog(fromVersion, toVersion) {
|
|
|
3543
3545
|
async function checkForUpdates(autoUpdate) {
|
|
3544
3546
|
try {
|
|
3545
3547
|
const latest = getLatestVersion();
|
|
3546
|
-
if (!latest || latest === "0.3.
|
|
3548
|
+
if (!latest || latest === "0.3.8") return;
|
|
3547
3549
|
if (autoUpdate) {
|
|
3548
3550
|
warn(`
|
|
3549
|
-
Your arbi version is out of date (${"0.3.
|
|
3551
|
+
Your arbi version is out of date (${"0.3.8"} \u2192 ${latest}). Updating...`);
|
|
3550
3552
|
child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
|
|
3551
|
-
showChangelog("0.3.
|
|
3553
|
+
showChangelog("0.3.8", latest);
|
|
3552
3554
|
console.log(`Updated to ${latest}.`);
|
|
3553
3555
|
} else {
|
|
3554
3556
|
warn(
|
|
3555
3557
|
`
|
|
3556
|
-
Your arbi version is out of date (${"0.3.
|
|
3558
|
+
Your arbi version is out of date (${"0.3.8"} \u2192 ${latest}).
|
|
3557
3559
|
Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
|
|
3558
3560
|
);
|
|
3559
3561
|
}
|
|
@@ -3563,9 +3565,9 @@ Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
|
|
|
3563
3565
|
function hintUpdateOnError() {
|
|
3564
3566
|
try {
|
|
3565
3567
|
const cached = readCache();
|
|
3566
|
-
if (cached && cached.latest !== "0.3.
|
|
3568
|
+
if (cached && cached.latest !== "0.3.8") {
|
|
3567
3569
|
warn(
|
|
3568
|
-
`Your arbi version is out of date (${"0.3.
|
|
3570
|
+
`Your arbi version is out of date (${"0.3.8"} \u2192 ${cached.latest}). Run "arbi update".`
|
|
3569
3571
|
);
|
|
3570
3572
|
}
|
|
3571
3573
|
} catch {
|
|
@@ -5248,7 +5250,7 @@ function registerUpdateCommand(program2) {
|
|
|
5248
5250
|
label("Current version:", current);
|
|
5249
5251
|
console.log("Checking for updates...\n");
|
|
5250
5252
|
try {
|
|
5251
|
-
const latest = getLatestVersion() || child_process.execSync("npm view @arbidocs/cli version", { encoding: "utf8" }).trim();
|
|
5253
|
+
const latest = getLatestVersion(true) || child_process.execSync("npm view @arbidocs/cli version", { encoding: "utf8" }).trim();
|
|
5252
5254
|
if (latest === current) {
|
|
5253
5255
|
success("Already up to date.");
|
|
5254
5256
|
return;
|
|
@@ -5282,7 +5284,7 @@ console.info = (...args) => {
|
|
|
5282
5284
|
_origInfo(...args);
|
|
5283
5285
|
};
|
|
5284
5286
|
var program = new commander.Command();
|
|
5285
|
-
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.3.
|
|
5287
|
+
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.3.8");
|
|
5286
5288
|
registerConfigCommand(program);
|
|
5287
5289
|
registerLoginCommand(program);
|
|
5288
5290
|
registerRegisterCommand(program);
|