@trama-dev/cli 0.3.1 → 0.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.
- package/README.md +1 -0
- package/dist/index.js +8 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ trama run <name> [--timeout <ms>] [--arg key=value ...]
|
|
|
44
44
|
trama update <name> <prompt>
|
|
45
45
|
trama list
|
|
46
46
|
trama logs <name>
|
|
47
|
+
trama journal <name> [run] [--list]
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
See the [main README](https://github.com/NaNhkNaN/trama) for the full picture — why a runtime matters, what generated programs look like, and the runtime API.
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { Command } from "commander";
|
|
4
|
-
import { createProject, runProgram, updateProject, listProjects, showLogs, resolveProject, } from "@trama-dev/runtime/runner";
|
|
4
|
+
import { createProject, runProgram, updateProject, listProjects, showLogs, showJournal, resolveProject, } from "@trama-dev/runtime/runner";
|
|
5
5
|
// The trama command is always a runner of its own, even when a program starts
|
|
6
6
|
// it: what it runs it runs here, and shows here. (Code that is part of a
|
|
7
7
|
// program asks that program's runner instead — see runProgram.) So it does not
|
|
@@ -113,4 +113,11 @@ cli
|
|
|
113
113
|
.command("logs <name>")
|
|
114
114
|
.description("Show logs from last run")
|
|
115
115
|
.action(command(showLogs));
|
|
116
|
+
cli
|
|
117
|
+
.command("journal <name> [run]")
|
|
118
|
+
.description("Show what a run did, call by call (the latest run, or the one named)")
|
|
119
|
+
.option("--list", "List the runs that have a journal")
|
|
120
|
+
.action(command(async (name, run, opts) => {
|
|
121
|
+
await showJournal(name, { run, list: opts.list });
|
|
122
|
+
}));
|
|
116
123
|
cli.parse();
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trama-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"trama": "dist/index.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "tsc && chmod +x dist/index.js"
|
|
9
|
+
"build": "rm -rf dist && tsc && chmod +x dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"node": ">=22.19.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@trama-dev/runtime": "0.
|
|
34
|
-
"@trama-dev/session": "0.
|
|
33
|
+
"@trama-dev/runtime": "0.4.0",
|
|
34
|
+
"@trama-dev/session": "0.4.0",
|
|
35
35
|
"commander": "15.1.0"
|
|
36
36
|
}
|
|
37
37
|
}
|