@arbidocs/cli 0.5.141 → 0.5.143

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.5.143
4
+
5
+ [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.142...HEAD)
6
+
7
+ ### 🚀 Enhancements
8
+
9
+ - **blocks:** Approval requests decided on database rows ([#2401](https://github.com/arbicity/ARBI-frontend/pull/2401))
10
+
11
+ ## v0.5.142
12
+
13
+ [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.141...v0.5.142)
14
+
15
+ ### 🏡 Chore
16
+
17
+ - CLI: flush stdout and stderr before exiting (JSON over a pipe was cut at 64 KiB) (#2399) ([dd2b80af0](https://github.com/arbicity/ARBI-frontend/commit/dd2b80af0c749521e6fdb33ce386efed0c3392a5))
18
+
3
19
  ## v0.5.141
4
20
 
5
21
  [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.140...HEAD)
package/dist/index.js CHANGED
@@ -3700,7 +3700,7 @@ function getLatestVersion(skipCache = false) {
3700
3700
  }
3701
3701
  }
3702
3702
  function getCurrentVersion() {
3703
- return "0.5.141";
3703
+ return "0.5.143";
3704
3704
  }
3705
3705
  function readChangelog(fromVersion, toVersion) {
3706
3706
  try {
@@ -3753,17 +3753,17 @@ function showChangelog(fromVersion, toVersion) {
3753
3753
  async function checkForUpdates(autoUpdate) {
3754
3754
  try {
3755
3755
  const latest = getLatestVersion();
3756
- if (!latest || latest === "0.5.141") return;
3756
+ if (!latest || latest === "0.5.143") return;
3757
3757
  if (autoUpdate) {
3758
3758
  warn(`
3759
- Your arbi version is out of date (${"0.5.141"} \u2192 ${latest}). Updating...`);
3759
+ Your arbi version is out of date (${"0.5.143"} \u2192 ${latest}). Updating...`);
3760
3760
  child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
3761
- showChangelog("0.5.141", latest);
3761
+ showChangelog("0.5.143", latest);
3762
3762
  console.log(`Updated to ${latest}.`);
3763
3763
  } else {
3764
3764
  warn(
3765
3765
  `
3766
- Your arbi version is out of date (${"0.5.141"} \u2192 ${latest}).
3766
+ Your arbi version is out of date (${"0.5.143"} \u2192 ${latest}).
3767
3767
  Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
3768
3768
  );
3769
3769
  }
@@ -3795,10 +3795,10 @@ function markNagShown(latest) {
3795
3795
  function hintUpdateOnError() {
3796
3796
  try {
3797
3797
  const cached = readCache();
3798
- if (!cached || cached.latest === "0.5.141") return;
3798
+ if (!cached || cached.latest === "0.5.143") return;
3799
3799
  if (!shouldShowNag(cached.latest)) return;
3800
3800
  warn(
3801
- `Your arbi version is out of date (${"0.5.141"} \u2192 ${cached.latest}). Run "arbi update".`
3801
+ `Your arbi version is out of date (${"0.5.143"} \u2192 ${cached.latest}). Run "arbi update".`
3802
3802
  );
3803
3803
  markNagShown(cached.latest);
3804
3804
  } catch {
@@ -3985,14 +3985,33 @@ function stringifyApiDetail(value) {
3985
3985
  }
3986
3986
  return String(value);
3987
3987
  }
3988
+ function flushStdio(timeoutMs = 5e3) {
3989
+ const drained = (stream) => new Promise((resolve6) => {
3990
+ try {
3991
+ stream.write("", () => resolve6());
3992
+ } catch {
3993
+ resolve6();
3994
+ }
3995
+ });
3996
+ return new Promise((resolve6) => {
3997
+ const timer = setTimeout(resolve6, timeoutMs);
3998
+ timer.unref?.();
3999
+ void Promise.all([drained(process.stdout), drained(process.stderr)]).then(() => {
4000
+ clearTimeout(timer);
4001
+ resolve6();
4002
+ });
4003
+ });
4004
+ }
3988
4005
  function runAction(fn) {
3989
4006
  return async () => {
3990
4007
  try {
3991
4008
  await fn();
4009
+ await flushStdio();
3992
4010
  process.exit(0);
3993
4011
  } catch (err) {
3994
4012
  error(`Error: ${formatCliError(err)}`);
3995
4013
  hintUpdateOnError();
4014
+ await flushStdio();
3996
4015
  process.exit(1);
3997
4016
  }
3998
4017
  };
@@ -12686,7 +12705,7 @@ console.info = (...args) => {
12686
12705
  _origInfo(...args);
12687
12706
  };
12688
12707
  var program = new commander.Command();
12689
- program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.5.141").showHelpAfterError(true).showSuggestionAfterError(true);
12708
+ program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.5.143").showHelpAfterError(true).showSuggestionAfterError(true);
12690
12709
  registerConfigCommand(program);
12691
12710
  registerLoginCommand(program);
12692
12711
  registerRegisterCommand(program);