@cmodjs/rulebook 0.6.0 → 0.7.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/package.json +2 -2
- package/src/api.ts +1 -0
- package/src/rules.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmodjs/rulebook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Checks every file, reply, tool call, and commit against your rules and linters before it lands.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@ast-grep/lang-yaml": "0.0.6",
|
|
47
47
|
"@ast-grep/napi": "0.51.1",
|
|
48
48
|
"@biomejs/biome": "2.6.4",
|
|
49
|
-
"@cmodjs/core": "6.0
|
|
49
|
+
"@cmodjs/core": "6.2.0",
|
|
50
50
|
"diff": "9.0.0",
|
|
51
51
|
"marked": "15.0.0",
|
|
52
52
|
"oxlint": "1.86.0",
|
package/src/api.ts
CHANGED
package/src/rules.ts
CHANGED
|
@@ -162,9 +162,9 @@ function linesOf({ path, lines }: CheckedFile): readonly Line[] {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
function commandsOf({ shell, lines }: CheckedFile): readonly Command[] {
|
|
165
|
-
return (shell?.commands ?? []).map(({ argv, folder, input }) => {
|
|
165
|
+
return (shell?.commands ?? []).map(({ argv, folder, input, runner }) => {
|
|
166
166
|
const index = lines.findIndex((line) => line.includes(argv[0]))
|
|
167
|
-
return { lineNumber: index === -1 ? 1 : index + 1, program: basename(argv[0]), args: argv.slice(1), argv, folder, ...(input === undefined ? {} : { input }) }
|
|
167
|
+
return { lineNumber: index === -1 ? 1 : index + 1, program: basename(argv[0]), args: argv.slice(1), argv, folder, ...(input === undefined ? {} : { input }), ...(runner === undefined ? {} : { runner }) }
|
|
168
168
|
})
|
|
169
169
|
}
|
|
170
170
|
|