File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,11 +117,11 @@ jobs:
117117 )
118118
119119 if [ "${{ matrix.runtime }}" = "bun" ]; then
120- bun run src/cli.ts query --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
120+ bun run src/cli.ts --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
121121 elif [ "${{ matrix.runtime }}" = "node" ]; then
122- node dist/cli.js query --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
122+ node dist/cli.js --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
123123 else
124- deno run -A dist/cli.js query --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
124+ deno run -A dist/cli.js --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
125125 fi
126126
127127 - name : Validate output
Original file line number Diff line number Diff line change @@ -30,18 +30,12 @@ mdbasequery --help
3030
3131### Command Model
3232
33- Primary form:
33+ Command form:
3434
3535``` bash
3636mdbasequery [options]
3737```
3838
39- Compatibility alias (also supported):
40-
41- ``` bash
42- mdbasequery query [options]
43- ```
44-
4539There is one command surface; all behavior is controlled through options.
4640
4741### Query Input Modes
Original file line number Diff line number Diff line change @@ -103,10 +103,6 @@ function parseCli(argv: string[]): CliOptions {
103103
104104 const args = [ ...argv ] ;
105105
106- if ( args [ 0 ] === "query" ) {
107- args . shift ( ) ;
108- }
109-
110106 for ( let index = 0 ; index < args . length ; index += 1 ) {
111107 const token = args [ index ] ;
112108
Original file line number Diff line number Diff line change @@ -75,4 +75,11 @@ describe("cli integration", () => {
7575 expect ( result . status ) . toBe ( 1 ) ;
7676 expect ( result . stderr ) . toContain ( "view not found" ) ;
7777 } ) ;
78+
79+ test ( "rejects deprecated query subcommand" , ( ) => {
80+ const result = runCli ( [ "query" , "--help" ] ) ;
81+
82+ expect ( result . status ) . toBe ( 1 ) ;
83+ expect ( result . stderr ) . toContain ( "unknown option: query" ) ;
84+ } ) ;
7885} ) ;
You can’t perform that action at this time.
0 commit comments