Delete a sprite and all its associated data including checkpoints
npm install @tpmjs/tools-sprites-deleteDelete a sprite and all its associated data including checkpoints.
``bash`
npm install @tpmjs/sprites-delete
- SPRITES_TOKEN environment variable - Get your token from https://sprites.dev
`typescript
import { spritesDeleteTool } from '@tpmjs/sprites-delete';
const result = await spritesDeleteTool.execute({
name: 'my-sandbox'
});
console.log(result);
// {
// deleted: true,
// name: 'my-sandbox'
// }
`
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| name | string | Yes | Name of the sprite to delete |
| Field | Type | Description |
|-------|------|-------------|
| deleted | boolean | Whether deletion was successful |name
| | string | Name of the deleted sprite |
This action is irreversible. All data associated with the sprite, including:
- Filesystem contents
- All checkpoints
- Execution history
will be permanently deleted.
The tool throws errors in these cases:
- SPRITES_TOKEN` environment variable is not set
- Sprite not found (HTTP 404)
- Invalid or expired API token (HTTP 401)
- Network timeout (30 second limit)
- API errors with descriptive messages
MIT