Skip to content

Commit bf7d148

Browse files
committed
improvement(cli): use batch- for the tables bulk delete, matching its siblings
The CLI renames a bulk form only when it would collide with its singular sibling, and uses AWS's `batch-` prefix when it does — `files batch-delete`, `tables rows batch-delete`, `knowledge chunks batch-update`. `tables delete` exists, so `tables bulk-delete` was that same rename reaching for the other word, and the only `bulk-` command on the surface. No `bulk-` CLI command has ever shipped, so this costs nothing now and would be permanent later. `files bulk-download` keeps its name: there is no `files download` to collide with, and it is one archive rather than N operations. Its config block now says why it exists at all, since the command is never built — the builder skips non-JSON response modes, but the contract sweeps still read the entry and require the folder-path field to be marked.
1 parent 4f496d0 commit bf7d148

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

apps/docs/content/docs/en/cli/reference.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3203,12 +3203,12 @@ sim tables groups update <tableId> [options]
32033203

32043204
</CommandTable>
32053205

3206-
### sim tables bulk-delete
3206+
### sim tables batch-delete
32073207

32083208
Bulk Delete Tables and Folders
32093209

32103210
```bash
3211-
sim tables bulk-delete [options]
3211+
sim tables batch-delete [options]
32123212
```
32133213

32143214
**Options**

apps/docs/content/docs/en/cli/tables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ sim tables groups update <tableId> [options]
201201
## Bulk delete tables and folders
202202

203203
```bash
204-
sim tables bulk-delete [options]
204+
sim tables batch-delete [options]
205205
```
206206

207207
**Options**

packages/sim-cli/src/contract/commands.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ export const CLI_CONTRACT: CliContract = {
390390
describe: 'Apply a distinct patch to each listed row',
391391
},
392392
bulkDeleteTables: {
393-
command: 'tables bulk-delete',
393+
// `batch-`, not `bulk-`: `tables delete` exists, so this is the same
394+
// collision rename as `files batch-delete` above and takes the same word.
395+
command: 'tables batch-delete',
394396
flags: { folderPaths: FOLDER_PATHS_FLAG },
395397
confirm: 'This deletes every listed table and all of their rows.',
396398
},
@@ -842,6 +844,13 @@ export const CLI_CONTRACT: CliContract = {
842844
describe: 'Unzip an archive into a new folder beside it',
843845
confirm: 'This writes every file in the archive into the workspace.',
844846
},
847+
/**
848+
* Configured even though `buildGeneratedCommands` skips it: it only builds
849+
* operations whose `responseMode` is `json` (runtime/build.ts), so this
850+
* zip-streaming endpoint has no command today. The entry is not inert — the
851+
* contract sweeps read it, and `folderPaths` must be marked for encoding
852+
* here or `folder-path fields` fails.
853+
*/
845854
bulkDownloadFiles: {
846855
command: 'files bulk-download',
847856
describe: 'Download files and folders as a zip archive',

0 commit comments

Comments
 (0)