@dohmmit/rtk 0.1.0 → 0.1.2
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/dist/index.js +4 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -105,11 +105,12 @@ export const RtkPlugin = async ({ $, client }) => {
|
|
|
105
105
|
try {
|
|
106
106
|
const result = await $ `rtk rewrite ${command}`.quiet().nothrow();
|
|
107
107
|
const rewritten = String(result.stdout).trim();
|
|
108
|
-
// Exit code
|
|
109
|
-
//
|
|
108
|
+
// Exit code 1 means no rewrite available (rtk convention).
|
|
109
|
+
// Other non-zero exit codes with valid stdout are accepted
|
|
110
|
+
// (e.g. exit 3 on Windows is a known platform artifact).
|
|
110
111
|
// Empty output guard: never set args.command to an empty
|
|
111
112
|
// string (PITFALLS.md security section: undefined behavior).
|
|
112
|
-
if (
|
|
113
|
+
if (!rewritten || rewritten.length === 0)
|
|
113
114
|
return;
|
|
114
115
|
// PITFALLS.md Pitfall 4: mutate args.command in-place only.
|
|
115
116
|
// Never replace the entire args object — that would drop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dohmmit/rtk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "OpenCode plugin that integrates rtk to transparently rewrite bash commands for token savings",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
|
|
18
|
+
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/
|
|
20
|
+
"url": "git+https://github.com/DohmBoy64Bit/opencode-rtk.git"
|
|
21
21
|
},
|
|
22
22
|
"keywords": ["opencode", "rtk", "plugin", "tokens"],
|
|
23
23
|
"scripts": {
|