@kaynooo/cli-forgejo 0.28.0 → 0.28.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +13 -11
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -9,6 +9,7 @@ import { parseArgs } from "util";
9
9
 
10
10
  // ../kit/src/format.ts
11
11
  import process7 from "process";
12
+
12
13
  // ../../node_modules/.bun/@kaynooo+utils@3.0.0+4c7ddab9986847c5/node_modules/@kaynooo/utils/dist/chunk-rxztfxgv.js
13
14
  var ct = /[aeiou]y$/;
14
15
  var N = new Map;
@@ -45,6 +46,7 @@ function ko(t, e, r = "...") {
45
46
  }
46
47
  var be = new Map(["\u20AC", "", "\u201A", "\u0192", "\u201E", "\u2026", "\u2020", "\u2021", "\u02C6", "\u2030", "\u0160", "\u2039", "\u0152", "", "\u017D", "", "", "\u2018", "\u2019", "\u201C", "\u201D", "\u2022", "\u2013", "\u2014", "\u02DC", "\u2122", "\u0161", "\u203A", "\u0153", "", "\u017E", "\u0178"].map((t, e) => [t, 128 + e]).filter(([t]) => t));
47
48
  var z = new Map;
49
+
48
50
  // ../kit/src/mode.ts
49
51
  import process2 from "process";
50
52
  var MODES = new Set(["terminal", "ci", "agent", "pipe"]);
@@ -90,7 +92,7 @@ function C(r, e = globalThis.process?.env ?? {}) {
90
92
  return false;
91
93
  return r?.isTTY === true;
92
94
  }
93
- function f2(r, e = []) {
95
+ function f(r, e = []) {
94
96
  let l = "", n = "";
95
97
  for (let t = 0, i = e.length;t < i; t++)
96
98
  l += `\x1B[${e[t][0]}m`, n = `\x1B[${e[t][1]}m${n}`;
@@ -100,7 +102,7 @@ function f2(r, e = []) {
100
102
  if (Array.isArray(a)) {
101
103
  let s = g.get(i);
102
104
  if (s === undefined)
103
- s = f2(r, [...e, a]), g.set(i, s);
105
+ s = f(r, [...e, a]), g.set(i, s);
104
106
  return s;
105
107
  }
106
108
  if (typeof a === "function")
@@ -109,17 +111,17 @@ function f2(r, e = []) {
109
111
  if (u === undefined) {
110
112
  if (g.size >= 64)
111
113
  g.clear();
112
- u = f2(r, [...e, a(...s)]), g.set(y, u);
114
+ u = f(r, [...e, a(...s)]), g.set(y, u);
113
115
  }
114
116
  return u;
115
117
  };
116
118
  throw Error(`Unknown style: ${String(i)}`);
117
119
  } });
118
120
  }
119
- function Fe2(r = {}) {
120
- return f2(r);
121
+ function Fe(r = {}) {
122
+ return f(r);
121
123
  }
122
- var o2 = Fe2();
124
+ var o = Fe();
123
125
 
124
126
  // ../kit/src/theme.ts
125
127
  import { existsSync as existsSync3, readFileSync, statSync } from "fs";
@@ -384,7 +386,7 @@ function takesControlCodes(stream, env = process6.env) {
384
386
  return stream.isTTY === true && env.NO_COLOR === undefined && env.NODE_DISABLE_COLORS === undefined && env.TERM !== "dumb" && outputMode(stream, env) === "terminal";
385
387
  }
386
388
  function paint(stream, env = process6.env) {
387
- return Fe2({ stream: { isTTY: takesControlCodes(stream, env) }, env });
389
+ return Fe({ stream: { isTTY: takesControlCodes(stream, env) }, env });
388
390
  }
389
391
  function marked(mark, text, stream, detail, env = process6.env) {
390
392
  const colors = paint(stream, env);
@@ -2472,7 +2474,7 @@ async function board(args) {
2472
2474
  console.log(rows.length === 0 && (query !== undefined || state !== undefined) ? "no open issue matches" : renderBoard(rows, Date.now(), limit));
2473
2475
  return 0;
2474
2476
  }
2475
- async function me2(as, sessions) {
2477
+ async function me(as, sessions) {
2476
2478
  if (as !== undefined)
2477
2479
  return as;
2478
2480
  const session = await currentSession(sessions);
@@ -2496,7 +2498,7 @@ var takeOptions = {
2496
2498
  ...repoOption
2497
2499
  };
2498
2500
  async function claimant(values, sessions) {
2499
- const name = await me2(values.as, sessions);
2501
+ const name = await me(values.as, sessions);
2500
2502
  if (values.lane !== true)
2501
2503
  return () => name;
2502
2504
  const suffix = laneSuffix(name);
@@ -2844,7 +2846,7 @@ function commitsToAsk(commits, passedOver, max = MAX_LOOKUPS) {
2844
2846
  function settled(latest) {
2845
2847
  return latest !== undefined && latest.every((run) => FINISHED.has(run.status)) && judge(latest, false, false).kind === "runs" ? latest : undefined;
2846
2848
  }
2847
- async function ci3(args) {
2849
+ async function ci2(args) {
2848
2850
  const parsed = parse(args, usage2, options);
2849
2851
  const { values, positionals } = parsed;
2850
2852
  const branch = values.branch ?? await defaultBranch();
@@ -4591,7 +4593,7 @@ process28.exitCode = await runCli({
4591
4593
  examples: [["ft ci", "wait for the runs of origin's tip, failures printed"], ["ft issue 12 -c", "an issue with its boxes numbered and its comments"]],
4592
4594
  commands: {
4593
4595
  runs: { run: runs, summary: "recent runs with workflow, ref, duration and age", group: "CI and release" },
4594
- ci: { run: ci3, summary: "wait for the runs covering a commit, printing what failed", group: "CI and release" },
4596
+ ci: { run: ci2, summary: "wait for the runs covering a commit, printing what failed", group: "CI and release" },
4595
4597
  watch: { run: watch2, summary: "wait for runs newer than an id, or those in progress", group: "CI and release" },
4596
4598
  logs: { run: logs2, summary: "what the failed jobs of a run say went wrong", group: "CI and release" },
4597
4599
  release: { run: release, summary: "bump, push branch and tag atomically, wait for runs and registry", group: "CI and release" },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kaynooo/cli-forgejo",
3
3
  "type": "module",
4
- "version": "0.28.0",
4
+ "version": "0.28.1",
5
5
  "description": "ft: Forgejo CI runs, logs, releases and issue checklists from the terminal, through tea.",
6
6
  "author": "Kaynooo <contact@kaynooo.fr>",
7
7
  "license": "MIT",
@@ -31,6 +31,6 @@
31
31
  "@kaynooo/utils": "3.0.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@kaynooo/cli-kit": "0.35.0"
34
+ "@kaynooo/cli-kit": "0.36.0"
35
35
  }
36
36
  }