feat(functions): add functions delete command#381
Merged
yardend-wix merged 6 commits intofeature/functions-commandsfrom Mar 12, 2026
Merged
feat(functions): add functions delete command#381yardend-wix merged 6 commits intofeature/functions-commandsfrom
functions delete command#381yardend-wix merged 6 commits intofeature/functions-commandsfrom
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.44-pr.381.3470954Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.44-pr.381.3470954"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.44-pr.381.3470954"
}
}
Preview published to npm registry — try new features instantly! |
Add a new `functions delete` CLI command that deletes one or more deployed functions by name. Handles 404 (not found) gracefully and supports comma-separated name arguments. - Add deleteSingleFunction API client function - Create parseNames utility for variadic CLI args - Create functions/delete.ts command with multi-name support - Refactor functions command group with index.ts - Add test mocks and 5 tests for the delete command Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
81eefba to
a79cebb
Compare
kfirstri
reviewed
Mar 9, 2026
kfirstri
reviewed
Mar 9, 2026
kfirstri
reviewed
Mar 9, 2026
kfirstri
requested changes
Mar 9, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move parseNames inline into delete.ts, remove separate utility file - Add preAction hook for input validation (following link.ts/create.ts pattern) - Wrap each deletion in runTask for spinner UX - Update test expectations to match new output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kfirstri
approved these changes
Mar 12, 2026
Combines delete command mocks with list command mocks in TestAPIServer, and registers all three subcommands (deploy, delete, list) in index.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
Adds a
base44 functions delete <names...>subcommand that deletes one or more deployed backend functions by name. Each function deletion runs as an individual task spinner, with a bulk summary outro for multi-name invocations. The command handles 404 responses gracefully (reports "not found" rather than erroring) and supports both space-separated variadic args and comma-separated names (e.g.functions delete func-a,func-b).Related Issue
None
Type of Change
Changes Made
packages/cli/src/cli/commands/functions/delete.ts— newdeletesubcommand with per-name task spinners, graceful 404 handling, comma-separated name parsing, and a bulk summary outropackages/cli/src/cli/commands/functions/index.ts— registersgetDeleteCommandalongsidedeployandlistunder thefunctionscommand groupdeleteSingleFunction(name)topackages/cli/src/core/resources/function/api.ts— issuesDELETE backend-functions/:namevia the app client withApiError.fromHttpError()error wrappingpackages/cli/tests/cli/functions_delete.spec.ts— 5 integration test cases: single delete, multi-delete summary, 404 not-found, 500 error handling, and unauthenticated/no-project failureTestAPIServerin the testkit withmockSingleFunctionDelete()andmockSingleFunctionDeleteError()mock route helpersTesting
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The
deletecommand differentiates between missing functions (404) and unexpected API errors in both per-task output and the exit summary. Input validation rejects invocations with no names after parsing, and thepreActionhook ensures the error is surfaced before the action runs.🤖 Generated by Claude | 2026-03-12 14:04 UTC