@susu-eng/trunk-sync 2.3.4 → 2.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trunk-sync",
3
- "version": "2.3.4",
3
+ "version": "2.4.1",
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"
@@ -1,7 +1,11 @@
1
1
  import { readFileSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { homedir } from "node:os";
4
+ const DEFAULTS = {
5
+ "commit-transcripts": "false",
6
+ };
4
7
  const USAGE = `Usage: trunk-sync config Show all config
8
+ trunk-sync config <key> Get a value
5
9
  trunk-sync config <key>=<value> Set a value
6
10
  trunk-sync config --unset <key> Remove a key
7
11
 
@@ -73,8 +77,15 @@ export function configCommand(args) {
73
77
  const arg = positional[0];
74
78
  const eq = arg.indexOf("=");
75
79
  if (eq === -1) {
76
- console.error(`Expected key=value, got: ${arg}`);
77
- process.exit(1);
80
+ // Single key read its value
81
+ const map = readConfig();
82
+ const value = map.get(arg) ?? DEFAULTS[arg];
83
+ if (value === undefined) {
84
+ console.error(`Unknown key: ${arg}`);
85
+ process.exit(1);
86
+ }
87
+ console.log(value);
88
+ return;
78
89
  }
79
90
  const key = arg.slice(0, eq);
80
91
  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.1",
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": {
@@ -32,6 +32,9 @@
32
32
  "sync",
33
33
  "trunk-based-development"
34
34
  ],
35
+ "dependencies": {
36
+ "@susu-eng/trunk-sync": "^2.4.0"
37
+ },
35
38
  "scripts": {
36
39
  "build": "tsc",
37
40
  "postbuild": "chmod +x dist/cli.js",