@termwire/cli 0.4.0 → 0.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.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -0
- package/dist/program.js +9 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @termwire/cli
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `termwire --version` prints the installed release.
|
|
8
|
+
|
|
9
|
+
There was no way to tell which version was installed: both `--version` and `-V`
|
|
10
|
+
failed with `unknown option`, leaving `npm ls -g @termwire/cli` as the only
|
|
11
|
+
answer. The number is read from the package manifest at runtime, the way
|
|
12
|
+
`@termwire/mcp` already reports its own version, so no build step has to inject
|
|
13
|
+
it and a checkout reports the same way an install does.
|
|
14
|
+
|
|
15
|
+
- @termwire/tmux@0.4.1
|
|
16
|
+
- @termwire/nvim@0.4.1
|
|
17
|
+
|
|
3
18
|
## 0.4.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/README.md
CHANGED
package/dist/program.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
2
3
|
import { appendFile as appendFileToDisk, mkdir as mkdirDirectory, readdir as readDirectory, readFile as readFileFromDisk, stat, unlink as unlinkFile, } from "node:fs/promises";
|
|
3
4
|
import { homedir as getHomeDirectory } from "node:os";
|
|
4
5
|
import { dirname, resolve as resolvePath } from "node:path";
|
|
@@ -16,6 +17,13 @@ import { formatReapFailure, formatReapReport, parseTmuxServerPid, reapLogPath, r
|
|
|
16
17
|
import { ensureReapHook, reapCommandName } from "./reap-hook.js";
|
|
17
18
|
import { up } from "./up.js";
|
|
18
19
|
import { findGitRoot, prepareWorktree } from "./worktree.js";
|
|
20
|
+
/**
|
|
21
|
+
* Read at runtime rather than baked in at build time, the way `@termwire/mcp`
|
|
22
|
+
* reports its own version. `dist/program.js` and `src/program.ts` both sit one
|
|
23
|
+
* level below the package root, so the same specifier resolves in a published
|
|
24
|
+
* install and from a checkout.
|
|
25
|
+
*/
|
|
26
|
+
const manifest = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
19
27
|
export const executeGit = async (argv, options) => {
|
|
20
28
|
const [command, ...args] = argv;
|
|
21
29
|
if (command === undefined) {
|
|
@@ -192,6 +200,7 @@ export function createProgram(dependencies) {
|
|
|
192
200
|
});
|
|
193
201
|
program.exitOverride();
|
|
194
202
|
program.showHelpAfterError();
|
|
203
|
+
program.version(manifest.version, "-V, --version", "print the installed termwire version");
|
|
195
204
|
program
|
|
196
205
|
.command("up <name>")
|
|
197
206
|
.description("create or attach to the workspace tmux session <project>-<name>")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@termwire/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"url": "https://github.com/max-konin/termwire/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@termwire/nvim": "^0.4.
|
|
41
|
-
"@termwire/tmux": "^0.4.
|
|
40
|
+
"@termwire/nvim": "^0.4.1",
|
|
41
|
+
"@termwire/tmux": "^0.4.1",
|
|
42
42
|
"commander": "^15.0.0",
|
|
43
43
|
"jsonc-parser": "^3.3.1",
|
|
44
44
|
"zod": "^4.0.0"
|