feat(cli): use single-word commands and kebab-case options#1145
feat(cli): use single-word commands and kebab-case options#1145
Conversation
…ionals) - Rename `crash-report` subcommand to `crashreport` (single-word, matching `authconnection` / `staticwebsite`). The legacy `crash-report` name is preserved as a politty native alias for backward compatibility. - Rename positional arguments `executionId` / `executorName` / `jobId` to `execution-id` / `executor-name` / `job-id` on `function logs`, `workflow resume`, `workflow executions`, `executor jobs`, and `executor trigger`. Help output and generated docs now show the kebab-case form. Positional invocations are unchanged because positionals are passed by order, not by name.
🦋 Changeset detectedLatest commit: 56de174 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
⚡ pkg.pr.new@tailor-platform/sdk@tailor-platform/create-sdk
|
Move packages/sdk/src/cli/crash-report/ to packages/sdk/src/cli/crashreport/ to match the renamed user-facing crashreport command. Update import paths in cli/index.ts and the crashreport command handlers. No user-visible behavior change.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove the politty alias that kept tailor-sdk crash-report working alongside the renamed crashreport command. Scripts using the old name must be updated. Bump the changeset to major to reflect the breaking change.
This comment has been minimized.
This comment has been minimized.
The list/send test files were renamed to the crashreport directory, but the describe block labels still referenced the old `crash-report` command name. Update to match the new single-word command.
Code Metrics Report (packages/sdk)
Details | | main (f3674c0) | #1145 (eb37670) | +/- |
|--------------------|----------------|-----------------|------|
| Coverage | 60.9% | 60.9% | 0.0% |
| Files | 358 | 358 | 0 |
| Lines | 12217 | 12217 | 0 |
| Covered | 7448 | 7448 | 0 |
| Code to Test Ratio | 1:0.4 | 1:0.4 | 0.0 |
| Code | 80084 | 80084 | 0 |
| Test | 32929 | 32929 | 0 |Code coverage of files in pull request scope (29.2% → 30.6%)SDK Configure Bundle Size
Runtime Performance
Type Performance (instantiations)
Reported by octocov |
📖 Docs Consistency Check✅ No inconsistencies found between documentation and implementation. Checked areas:
Notes:
|
📖 Docs Consistency Check✅ No inconsistencies found between documentation and implementation. Checked areas: CLI Commands
Positional Arguments (kebab-case)
Additional Checks
Verification: |
|
Documentation Consistency Check: PASSED. No inconsistencies found between documentation and implementation. Command rename (crash-report to crashreport) and positional argument changes (camelCase to kebab-case) are correctly reflected in both code and docs. All 5 affected commands verified: function logs, workflow executions, workflow resume, executor jobs, executor trigger. |
|
Details: CLI command crash-report renamed to crashreport across all files. Positional args executionId, executorName, jobId changed to execution-id, executor-name, job-id. Documentation files updated: cli-reference.md, crashreport.md (new), executor.md, function.md, workflow.md. Implementation uses correct bracket notation for kebab-case keys. Changeset documents breaking changes. |
| .strict(), | ||
| run: async (args) => { | ||
| if (args.jobId) { | ||
| if (args["job-id"]) { |
There was a problem hiding this comment.
I believe it is possible to use camelCase as is within "run".
|
|
||
| export const crashReportCommand = defineCommand({ | ||
| name: "crash-report", | ||
| name: "crashreport", |
There was a problem hiding this comment.
Is it okay to make changes directly here?
Are we assuming it is fine because the command appears in the error message?
Make CLI commands single-word and switch options to kebab-case.
Before / After
Verification
pnpm -C packages/sdk docs:checkgreen; generated docs now show kebab-case positionals (<executor-name>,[execution-id],[job-id]) and the newcrashreportcommand name.pnpm -C packages/sdk test:unitgreen (143 files / 2131 tests).pnpm typecheck:gogreen;pnpm knipgreen.node packages/sdk/dist/cli/index.mjs crashreport list --helpruns as expected.Main Changes
crash-reportsubcommand tocrashreport. Existing scripts that invoketailor-sdk crash-reportmust update totailor-sdk crashreport.packages/sdk/src/cli/commands/crash-report/topackages/sdk/src/cli/commands/crashreport/.packages/sdk/src/cli/crash-report/(crash reporting library) topackages/sdk/src/cli/crashreport/to match the renamed command. Update import paths incli/index.tsand thecrashreportcommand handlers (@/cli/crash-report/...→@/cli/crashreport/...). No user-visible behavior change from this internal move.executionId/executorName/jobIdto"execution-id"/"executor-name"/"job-id"infunction logs,workflow resume,workflow executions,executor jobs, andexecutor trigger. Internal accessors switch to bracket form (args["execution-id"]) to match the existing project convention used byargs["workspace-id"].cli/crashreport/index.tsto referencetailor-sdk crashreport send.docs/cli-reference.md,docs/cli/crashreport.md,docs/cli/executor.md,docs/cli/function.md,docs/cli/workflow.md.Notes
tailor-platform/crash-reports/) and tmp-dir prefixes inside tests (crash-report-*-test-) are intentionally untouched because the former is a filesystem path that requires a separate migration story and the latter has no user-visible effect.