@treeseed/cli 0.10.10 → 0.10.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ const handleDestroy = async (invocation, context) => {
27
27
  plan: invocation.args.plan === true || invocation.args.dryRun === true,
28
28
  dryRun: invocation.args.dryRun === true,
29
29
  force: invocation.args.force === true,
30
+ deleteData: invocation.args.deleteData === true,
30
31
  removeBuildArtifacts: invocation.args.removeBuildArtifacts === true
31
32
  });
32
33
  const payload = result.payload;
@@ -36,6 +37,7 @@ const handleDestroy = async (invocation, context) => {
36
37
  facts: [
37
38
  { label: "Environment", value: payload.scope },
38
39
  { label: "Dry run", value: payload.dryRun ? "yes" : "no" },
40
+ { label: "Delete data", value: payload.deleteData ? "yes" : "no" },
39
41
  { label: "Removed build artifacts", value: payload.removeBuildArtifacts ? "yes" : "no" }
40
42
  ],
41
43
  nextSteps: renderWorkflowNextSteps(result),
@@ -1116,18 +1116,19 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1116
1116
  handlerName: "release"
1117
1117
  })],
1118
1118
  ["destroy", command({
1119
- usage: "treeseed destroy --environment <local|staging|prod> [--plan|--dry-run] [--force] [--skip-confirmation] [--confirm <slug>] [--remove-build-artifacts]",
1119
+ usage: "treeseed destroy --environment <local|staging|prod> [--plan|--dry-run] [--delete-data] [--force] [--skip-confirmation] [--confirm <slug>] [--remove-build-artifacts]",
1120
1120
  options: [
1121
1121
  { name: "environment", flags: "--environment <scope>", description: "Select the persistent environment to destroy.", kind: "enum", values: ["local", "staging", "prod"] },
1122
1122
  { name: "plan", flags: "--plan", description: "Compute the destroy plan without mutating the environment.", kind: "boolean" },
1123
1123
  { name: "dryRun", flags: "--dry-run", description: "Alias for --plan.", kind: "boolean" },
1124
+ { name: "deleteData", flags: "--delete-data", description: "Also delete data repositories such as PostgreSQL, D1, and R2 for the target environment.", kind: "boolean" },
1124
1125
  { name: "force", flags: "--force", description: "Force worker deletion when supported.", kind: "boolean" },
1125
1126
  { name: "skipConfirmation", flags: "--skip-confirmation", description: "Skip the interactive confirmation prompt.", kind: "boolean" },
1126
1127
  { name: "confirm", flags: "--confirm <slug>", description: "Provide the expected slug confirmation non-interactively.", kind: "string" },
1127
1128
  { name: "removeBuildArtifacts", flags: "--remove-build-artifacts", description: "Also remove local build artifacts after destroy.", kind: "boolean" },
1128
1129
  { name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }
1129
1130
  ],
1130
- examples: ["treeseed destroy --environment staging --plan", "treeseed destroy --environment prod --confirm example --skip-confirmation"],
1131
+ examples: ["treeseed destroy --environment staging --delete-data --plan", "treeseed destroy --environment prod --delete-data --confirm example --skip-confirmation"],
1131
1132
  notes: ["Only for persistent environments. Task cleanup belongs to treeseed close.", "This command is destructive and requires explicit confirmation."],
1132
1133
  help: {
1133
1134
  workflowPosition: "tear down environment",
@@ -1136,7 +1137,8 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1136
1137
  ],
1137
1138
  whenToUse: [
1138
1139
  "Use this when a persistent environment should be intentionally removed rather than rolled back or updated.",
1139
- "Use `--plan` first when you want to inspect the destroy plan without committing to it."
1140
+ "Use `--plan` first when you want to inspect the destroy plan without committing to it.",
1141
+ "Use `--delete-data` only when PostgreSQL, D1, and R2 data repositories should be removed instead of preserved."
1140
1142
  ],
1141
1143
  beforeYouRun: [
1142
1144
  "Confirm the environment scope exactly. This command does not target task-branch cleanup; it targets persistent environments only.",
@@ -1147,9 +1149,9 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1147
1149
  "Optionally removes local build artifacts if requested."
1148
1150
  ],
1149
1151
  examples: [
1150
- example("treeseed destroy --environment staging --plan", "Preview the destroy plan", "Inspect what would be removed from staging without actually performing the destroy."),
1151
- example("treeseed destroy --environment prod --confirm example --skip-confirmation", "Run a deliberate non-interactive destroy", "Provide the expected slug explicitly when operating in a scripted or no-prompt environment."),
1152
- example("treeseed destroy --environment local --remove-build-artifacts", "Remove a local environment and its artifacts", "Destroy the local environment and also delete local build outputs.")
1152
+ example("treeseed destroy --environment staging --delete-data --plan", "Preview the full destroy plan", "Inspect what would be removed from staging, including data repositories, without actually performing the destroy."),
1153
+ example("treeseed destroy --environment prod --delete-data --confirm example --skip-confirmation", "Run a deliberate non-interactive destroy", "Provide the expected slug explicitly when operating in a scripted or no-prompt environment."),
1154
+ example("treeseed destroy --environment local --delete-data --remove-build-artifacts", "Remove a local environment and its artifacts", "Destroy the local environment and also delete local runtime data and build outputs.")
1153
1155
  ],
1154
1156
  warnings: [
1155
1157
  "This command is destructive.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/cli",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "description": "Operator-facing Treeseed CLI package.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -45,7 +45,7 @@
45
45
  "release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
46
46
  },
47
47
  "dependencies": {
48
- "@treeseed/sdk": "github:treeseed-ai/sdk#0.10.16",
48
+ "@treeseed/sdk": "github:treeseed-ai/sdk#0.10.17",
49
49
  "ink": "^7.0.0",
50
50
  "react": "^19.2.5"
51
51
  },