@susu-eng/trunk-sync 2.3.4 → 2.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trunk-sync",
3
- "version": "2.3.4",
3
+ "version": "2.4.0",
4
4
  "description": "Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately",
5
5
  "author": {
6
6
  "name": "Eli Mydlarz"
@@ -2,6 +2,7 @@ import { readFileSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
  const USAGE = `Usage: trunk-sync config Show all config
5
+ trunk-sync config <key> Get a value
5
6
  trunk-sync config <key>=<value> Set a value
6
7
  trunk-sync config --unset <key> Remove a key
7
8
 
@@ -73,8 +74,15 @@ export function configCommand(args) {
73
74
  const arg = positional[0];
74
75
  const eq = arg.indexOf("=");
75
76
  if (eq === -1) {
76
- console.error(`Expected key=value, got: ${arg}`);
77
- process.exit(1);
77
+ // Single key read its value
78
+ const map = readConfig();
79
+ const value = map.get(arg);
80
+ if (value === undefined) {
81
+ console.error(`Key not found: ${arg}`);
82
+ process.exit(1);
83
+ }
84
+ console.log(value);
85
+ return;
78
86
  }
79
87
  const key = arg.slice(0, eq);
80
88
  const value = arg.slice(eq + 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@susu-eng/trunk-sync",
3
- "version": "2.3.4",
3
+ "version": "2.4.0",
4
4
  "type": "module",
5
5
  "description": "Maximum continuous integration for multi-agent coding — every edit is committed and pushed to trunk immediately",
6
6
  "bin": {