@mediamonks/canopy-cli 0.7.56 → 0.7.58

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.
Files changed (54) hide show
  1. package/dist/{ai-DDVTX_nO.mjs → ai-00f2Mgqh.mjs} +2 -2
  2. package/dist/{api-MIRoGsB6.mjs → api-fmc8CEMT.mjs} +4 -0
  3. package/dist/{audience-8U1dwxcU.mjs → audience-ByM1jUH3.mjs} +2 -2
  4. package/dist/{browse-CVBq2IB4.mjs → browse-CxwKuka0.mjs} +1 -1
  5. package/dist/{calls-Cnt16FiF.mjs → calls-DsbRjCcy.mjs} +2 -2
  6. package/dist/{db-CXeAa-Qy.mjs → db-BU-ni9fj.mjs} +3 -3
  7. package/dist/{deploy-C1mwXvJY.mjs → deploy-k2DzsLxO.mjs} +393 -17
  8. package/dist/dev-BtacZ4HE.mjs +2 -0
  9. package/dist/{dev--vOKyg1k.mjs → dev-qp1VRNM_.mjs} +6 -6
  10. package/dist/docs/cli-deploy.md +20 -3
  11. package/dist/docs/cli-download.md +1 -1
  12. package/dist/docs/cli-promote.md +2 -0
  13. package/dist/docs/cli-rollback.md +3 -1
  14. package/dist/docs/cli-staging.md +2 -0
  15. package/dist/docs/cli-versions.md +79 -0
  16. package/dist/docs/cli.md +2 -0
  17. package/dist/docs/index.json +6 -1
  18. package/dist/docs/platform-deploys-and-rollbacks.md +40 -5
  19. package/dist/docs/platform-project-data.md +7 -0
  20. package/dist/docs/static-serving.md +34 -2
  21. package/dist/{docs-DgMINV-7.mjs → docs-ZBBQi3uK.mjs} +3 -3
  22. package/dist/{egress-Cy3UBgEM.mjs → egress-Bzn2VKDe.mjs} +2 -2
  23. package/dist/{feedback-DymVKtj0.mjs → feedback-B0-6QTSh.mjs} +3 -3
  24. package/dist/{files-CYTMMRC0.mjs → files-CBbAtHIK.mjs} +2 -2
  25. package/dist/index.mjs +38 -37
  26. package/dist/{local-DCo1A00D.mjs → local-C1i2uhAf.mjs} +2 -2
  27. package/dist/{login-BpmefYHv.mjs → login-Baso-JE0.mjs} +2 -2
  28. package/dist/{logs-CWr7tRhN.mjs → logs-c76jVOhb.mjs} +2 -2
  29. package/dist/{mcp-D0TZcRce.mjs → mcp-DmcjX8Kn.mjs} +2 -2
  30. package/dist/{migrations-CkGa1pmn.mjs → migrations-ChafLorm.mjs} +1 -1
  31. package/dist/{open-D2WqNBiq.mjs → open-Doat726T.mjs} +1 -1
  32. package/dist/{package-BpSdSdZI.mjs → package-BzvVsyRl.mjs} +1 -1
  33. package/dist/project-template--mESzwea.mjs +2 -0
  34. package/dist/{project-template-DjbT9RRU.mjs → project-template-BnX47DpF.mjs} +2 -2
  35. package/dist/{projects-Dcq37hny.mjs → projects-DOqpkUVT.mjs} +4 -4
  36. package/dist/{rename-DTg_3_BJ.mjs → rename-RA_oYbRT.mjs} +2 -2
  37. package/dist/{repo-ZjkxQKwh.mjs → repo-DD3eK1P_.mjs} +2 -2
  38. package/dist/repo-DayXVvyj.mjs +2 -0
  39. package/dist/{roles-2dF7LkZB.mjs → roles-BS8-Gvv-.mjs} +2 -2
  40. package/dist/{roles-B5E2tfbN.mjs → roles-tqf4sYDM.mjs} +1 -1
  41. package/dist/{schedule-_u2Ab1WH.mjs → schedule-D8AQ8MVF.mjs} +2 -2
  42. package/dist/{secrets-H1bQRNBr.mjs → secrets-Bi7BYCla.mjs} +2 -2
  43. package/dist/skill/canopy/SKILL.md +8 -0
  44. package/dist/{skill-BHDQdPTC.mjs → skill-k3HLr7rK.mjs} +2 -2
  45. package/dist/{staging-BZJwA_iG.mjs → staging-BxG3Cffd.mjs} +2 -2
  46. package/dist/{token-BEV5lbld.mjs → token-bHdy_IoX.mjs} +2 -2
  47. package/dist/{ui-7cyGNbu5.mjs → ui-9f_lF2Ak.mjs} +1 -1
  48. package/dist/{upgrade-BYTMPnOF.mjs → upgrade-DkjbsYNs.mjs} +2 -2
  49. package/dist/{usage-iYp64st3.mjs → usage-DFs2TERV.mjs} +2 -2
  50. package/dist/versions-Cgw7sB3h.mjs +106 -0
  51. package/package.json +1 -1
  52. package/dist/dev-CCMeTwvP.mjs +0 -2
  53. package/dist/project-template-D-e33lix.mjs +0 -2
  54. package/dist/repo-C_gmPkLX.mjs +0 -2
@@ -23,7 +23,7 @@ canopy download --project my-app --out backup.zip
23
23
 
24
24
  ## How it works
25
25
 
26
- The CLI resolves the target version (argument, picker, or live), asks the platform for that deploy's assets as a zip, and writes the archive to `--out`. The zip contains the deployed bundle as uploaded — the static files, and for worker projects the bundled `_canopy/worker.mjs`. It does not include files [canopy deploy](https://docs.canopy.website/cli/deploy) skips (like `canopy.json` itself), nor your project's database or blobs — those are handled by the data tooling, not deploy versions. A project with no deploys yet has nothing to download.
26
+ The CLI resolves the target version (argument, picker, or live), asks the platform for that deploy's assets as a zip, and writes the archive to `--out`. The zip contains the deployed bundle as uploaded — the static files, and for worker projects the bundled `_canopy/worker.mjs`. It does not include files [canopy deploy](https://docs.canopy.website/cli/deploy) skips (like `canopy.json` itself), nor your project's database or blobs — those are handled by the data tooling, not deploy versions. A project with no deploys yet has nothing to download. A version that [version retention](https://docs.canopy.website/cli/versions) expired has no files left, and fails with `version_expired`.
27
27
 
28
28
  ## Examples
29
29
 
@@ -19,6 +19,8 @@ canopy promote --yes # skip the confirmation (CI)
19
19
 
20
20
  - `[version]` — the version to make live, as `8` or `v8`. Defaults to whatever
21
21
  is currently staged; errors when nothing is staged and no version is given.
22
+ A version that [version retention](https://docs.canopy.website/cli/versions) expired fails with
23
+ `version_expired`.
22
24
  - `--project <slug>` — project slug, overriding `canopy.json`.
23
25
  - `--dir <path>` — project directory (defaults to the current directory).
24
26
  - `--yes` — skip the confirmation prompt.
@@ -24,7 +24,9 @@ canopy rollback --project my-app 3
24
24
 
25
25
  Every deploy is stored immutably as a numbered version; "live" is just a pointer to one of them. Rolling back moves that pointer — no files are rebuilt, uploaded, or deleted. Projects with a custom backend also get their backend rolled to the bundle matching the target version, so frontend and backend stay in step. The command prints the target, asks the platform to repoint, and confirms with the live URL, the now-live version, and the version that was live before.
26
26
 
27
- Because versions are never destroyed, rolling back is symmetric: "roll forward" is simply `canopy rollback <newer-version>` — pass the number of the newer deploy you want live again. Picking the version that's already live is an error, and a project with fewer than two deploys has nothing to roll back to.
27
+ Rolling back is symmetric: "roll forward" is simply `canopy rollback <newer-version>` — pass the number of the newer deploy you want live again. Picking the version that's already live is an error, and a project with fewer than two deploys has nothing to roll back to.
28
+
29
+ With [version retention](https://docs.canopy.website/cli/versions) on, old versions expire: their files are removed, and they leave the picker. Rolling back to an expired version fails with `version_expired`. The version before live is always kept, so a one-step rollback always works.
28
30
 
29
31
  Deploy history is also visible in the dashboard, where the same rollback is a button.
30
32
 
@@ -32,6 +32,8 @@ rebuilt, and the version's backend (if any) is redeployed to the staging
32
32
  worker. Omit the version on a terminal to pick from the history. Requires the
33
33
  staging channel to exist; it applies no migrations, so an old version runs
34
34
  against staging's current schema (the same caveat version previews have).
35
+ A version that [version retention](https://docs.canopy.website/cli/versions) expired fails with
36
+ `version_expired`.
35
37
 
36
38
  ### `sync`
37
39
 
@@ -0,0 +1,79 @@
1
+ ---
2
+ title: canopy versions
3
+ description: See how many deploy versions a project keeps, and turn version retention on or off.
4
+ ---
5
+
6
+ `canopy versions` shows how many of a project's deploy versions still have
7
+ their files, and whether **version retention** cleans up the old ones.
8
+
9
+ ## Usage
10
+
11
+ ```bash
12
+ canopy versions [--project <slug>]
13
+ canopy versions retention [--project <slug>]
14
+ canopy versions retention on|off [--yes] [--project <slug>]
15
+ ```
16
+
17
+ The project comes from `canopy.json` in the current directory, or from
18
+ `--project <slug>`. The global `--profile <site>` / `CANOPY_PROFILE` picks the
19
+ site.
20
+
21
+ ### canopy versions
22
+
23
+ Prints whether retention is on, how many versions are kept and how much they
24
+ store, and how many have expired. With retention off it also says how many
25
+ versions turning it on would expire.
26
+
27
+ ### canopy versions retention
28
+
29
+ Without an argument, prints the same summary. `on` turns retention on, `off`
30
+ turns it off.
31
+
32
+ With retention on, Canopy keeps:
33
+
34
+ - the 20 most recent versions
35
+ - the live version and the one before it
36
+ - every version newer than live (the ones a rollback stepped back from)
37
+ - the staging version and the one before it
38
+
39
+ Once a day, Canopy removes the files of every other version. A project that
40
+ never passes 20 versions keeps all of them. Expired versions stay in the
41
+ deploy history, but they can no longer be made live, staged, promoted,
42
+ previewed or downloaded.
43
+
44
+ Turning it on first shows how many versions it would expire, and asks before
45
+ going ahead. Pass `--yes` to skip the question, for example in a script. Without
46
+ a terminal and without `--yes`, the command stops instead of guessing.
47
+ Turning it off never asks: from then on every version keeps its files.
48
+
49
+ Only you can change it, signed in as yourself (`canopy login` or the
50
+ dashboard). Deploy tokens and other project tokens can't.
51
+
52
+ New projects start with retention on. Projects created before it existed start
53
+ with it off.
54
+
55
+ ## The hint on deploy
56
+
57
+ When a project without retention passes 100 versions or 500 MB of deploy
58
+ files, every `canopy deploy` ends with a hint saying how many versions it keeps
59
+ and that `canopy versions retention on` would clean them up. The deploy itself
60
+ is unaffected.
61
+
62
+ ## Examples
63
+
64
+ ```bash
65
+ canopy versions
66
+ ```
67
+
68
+ Prints for example `notes: version retention is off — every version keeps its
69
+ files.` and `432 versions kept (1.3 GB)`.
70
+
71
+ ```bash
72
+ canopy versions retention on --project client-site --profile main
73
+ ```
74
+
75
+ Shows how many old versions of `client-site` would expire and asks before
76
+ turning retention on.
77
+
78
+ See also [canopy rollback](https://docs.canopy.website/cli/rollback), [canopy download](https://docs.canopy.website/cli/download), and
79
+ [Deploys & rollbacks](https://docs.canopy.website/platform/deploys-and-rollbacks).
package/dist/docs/cli.md CHANGED
@@ -49,6 +49,8 @@ has a full page per command.
49
49
  - `canopy download [version]` — download a deploy's assets as a zip, e.g. `v3`
50
50
  (the live version when omitted, or picked from history interactively).
51
51
  `--out <file>` to name it.
52
+ - `canopy versions` — how many deploy versions are kept.
53
+ `canopy versions retention on|off` turns version retention on or off.
52
54
  - `canopy open` — open the deployed project in your browser.
53
55
 
54
56
  ## Data
@@ -142,7 +142,7 @@
142
142
  {
143
143
  "slug": "platform-deploys-and-rollbacks",
144
144
  "title": "Deploys & rollbacks",
145
- "summary": "Every deploy is a numbered version you can preview, download, and make live again — rolling back is instant and loses nothing."
145
+ "summary": "Every deploy is a numbered version you can preview, download, and make live again. Rolling back is instant, and version retention clears out the old ones."
146
146
  },
147
147
  {
148
148
  "slug": "platform-project-data",
@@ -301,6 +301,11 @@
301
301
  "title": "canopy download",
302
302
  "summary": "Download the deployed files of any version of a project as a zip archive."
303
303
  },
304
+ {
305
+ "slug": "cli-versions",
306
+ "title": "canopy versions",
307
+ "summary": "See how many deploy versions a project keeps, and turn version retention on or off."
308
+ },
304
309
  {
305
310
  "slug": "cli-token",
306
311
  "title": "canopy token",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Deploys & rollbacks
3
- description: Every deploy is a numbered version you can preview, download, and make live again — rolling back is instant and loses nothing.
3
+ description: Every deploy is a numbered version you can preview, download, and make live again. Rolling back is instant, and version retention clears out the old ones.
4
4
  ---
5
5
 
6
6
  Every time you publish a project, Canopy records it as a numbered version —
@@ -51,7 +51,41 @@ canopy rollback v3 # make v3 live directly
51
51
  ```
52
52
 
53
53
  You can also "roll forward": after reverting to v3, making v5 live again is
54
- the same one-step operation. Any version in the history can be live.
54
+ the same one-step operation. Any version in the history can be live, as long
55
+ as it hasn't expired (see below).
56
+
57
+ Folders you declared as [site media](https://docs.canopy.website/guides/static-serving#site-media) are
58
+ not part of a version: a rollback keeps serving the current media files.
59
+
60
+ ## Version retention
61
+
62
+ Old versions take up storage, and after a while nobody rolls back to them.
63
+ With **version retention** on, Canopy keeps:
64
+
65
+ - the 20 most recent versions
66
+ - the live version and the one before it
67
+ - every version newer than live (the ones a rollback stepped back from)
68
+ - the staging version and the one before it
69
+
70
+ Once a day, Canopy removes the files of every other version. A project that
71
+ never passes 20 versions keeps all of them, and a one-step rollback always
72
+ works.
73
+
74
+ An expired version stays in the deploy history, marked **expired**, but it
75
+ can no longer be made live, staged, promoted, previewed or downloaded. If you
76
+ ever need it back, rebuild it from your source and deploy.
77
+
78
+ New projects have retention on. Projects from before it existed have it off
79
+ until someone turns it on:
80
+
81
+ - **Dashboard** — the **Version retention** card on the project's Deploys tab.
82
+ Turning it on shows how many versions would expire and asks first.
83
+ - **CLI** — `canopy versions retention on` (see
84
+ [canopy versions](https://docs.canopy.website/cli/versions)).
85
+
86
+ Only project editors signed in as themselves can change it. When a project
87
+ without retention passes 100 versions or 500 MB of deploy files, every deploy
88
+ ends with a hint to turn it on.
55
89
 
56
90
  ## The staging channel
57
91
 
@@ -76,12 +110,13 @@ Preview URLs sit behind the same sign-in as the live site — they're for
76
110
  comparing builds and reviewing history, not for sharing something different
77
111
  from what access settings allow. A preview shows an old frontend against the
78
112
  live data; for a full candidate environment (frontend + backend + own
79
- database) use the staging channel above.
113
+ database) use the staging channel above. The preview URL of an expired version
114
+ shows a page saying it has expired, never another version.
80
115
 
81
116
  ## Downloading a version
82
117
 
83
- You can download the exact files behind any past version as a zip — handy for
84
- comparing builds or restoring something by hand:
118
+ You can download the exact files behind any past version that hasn't expired
119
+ as a zip — handy for comparing builds or restoring something by hand:
85
120
 
86
121
  - **Dashboard** — from the version's entry in the deploy history.
87
122
  - **CLI** — `canopy download`, which lets you pick a version.
@@ -43,6 +43,13 @@ One file can be up to 200 MB on `main` and `staging` (100 MB when a browser
43
43
  uploads it) and up to 25 MB on `gcp-pilot`. See
44
44
  [how big a file can be](https://docs.canopy.website/sdk/files#how-big-a-file-can-be).
45
45
 
46
+ ## Site media on the Files tab
47
+
48
+ The Files tab also shows a project's [site media](https://docs.canopy.website/guides/static-serving#site-media)
49
+ when it has any: how much it stores against its limit, how many files, and
50
+ which folders the live version serves from it. Site media isn't file storage.
51
+ Your app's code can't list or change it; only `canopy deploy` writes it.
52
+
46
53
  ## Snapshots and restores
47
54
 
48
55
  The Data tab's **Data safety** card is your undo button for data:
@@ -75,8 +75,40 @@ without deploying anything.
75
75
 
76
76
  `canopy deploy` checks both limits before it uploads anything. If you're over
77
77
  the file count, it's almost always un-bundled assets that a build
78
- step would combine; over the size limit, it's usually images or fonts that
79
- belong in [file storage](https://docs.canopy.website/sdk/files) instead of the bundle.
78
+ step would combine. Over the size limit, it's usually data or media that
79
+ belongs in [site media](#site-media) instead of every version.
80
+
81
+ ## Site media
82
+
83
+ Some sites carry a lot of data or media that rarely changes, such as Storybook
84
+ mock data, demo images and video. Copying that into every version makes every
85
+ deploy slow and heavy. Name those folders in `canopy.json`, and Canopy stores
86
+ them once for the whole project:
87
+
88
+ ```json
89
+ { "dist": "storybook-static", "media": ["mocks/", "demo-assets/"] }
90
+ ```
91
+
92
+ - **Same URLs.** `/mocks/users.json` stays `/mocks/users.json`. Your app and
93
+ `canopy dev` need no changes.
94
+ - **Only changes upload.** Each deploy sends new and changed files only.
95
+ - **Not versioned.** Rolling back, or opening a pinned version, serves the
96
+ current files. The staging channel shares them with live. A changed file goes
97
+ live as soon as it's uploaded, before the rest of the deploy.
98
+ - **Data, not code.** JSON, CSV, text, images, video, audio, fonts and 3D
99
+ models. HTML, JavaScript, CSS and SVG must stay in the version.
100
+ - **Adds up, until you prune.** A file you delete locally stays stored until
101
+ you deploy with `canopy deploy --prune-media`.
102
+ - **Limits.** 1 GB and 10,000 files per project, and per file the same limit
103
+ as [file storage](https://docs.canopy.website/sdk/files). A Canopy admin can raise the total.
104
+ - **Video plays.** Byte ranges are served, so video seeks and plays in every
105
+ browser, from site media or from the version itself.
106
+ - A path in a media folder that isn't stored answers 404, never your
107
+ `index.html`.
108
+
109
+ `canopy deploy` suggests folders when a version grows past 30% of the limit.
110
+ See [canopy deploy](https://docs.canopy.website/cli/deploy#site-media). The Files tab in the dashboard
111
+ shows how much site media a project holds.
80
112
 
81
113
  ## What this rules out
82
114
 
@@ -1,8 +1,8 @@
1
- import { t as version } from "./package-BpSdSdZI.mjs";
1
+ import { t as version } from "./package-BzvVsyRl.mjs";
2
2
  import { r as siteConfig } from "./site-BcZ0LOvm.mjs";
3
3
  import { i as latestKnownVersion, r as compareSemver } from "./version-check-CcsA1QjI.mjs";
4
- import { n as agentHeaders } from "./api-MIRoGsB6.mjs";
5
- import { i as reportErrors } from "./ui-7cyGNbu5.mjs";
4
+ import { n as agentHeaders } from "./api-fmc8CEMT.mjs";
5
+ import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
8
8
  import { homedir } from "node:os";
@@ -1,6 +1,6 @@
1
1
  import { f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/egress.ts
@@ -1,7 +1,7 @@
1
- import { t as version } from "./package-BpSdSdZI.mjs";
1
+ import { t as version } from "./package-BzvVsyRl.mjs";
2
2
  import { f as resolveProject, g as tryResolveProject, h as tryReadCanopyJson, l as projectDirArgs, r as siteConfig } from "./site-BcZ0LOvm.mjs";
3
- import { a as apiRequest, c as credentials, i as apiDownload, o as apiUpload, s as commonHeaders } from "./api-MIRoGsB6.mjs";
4
- import { i as reportErrors, n as formatDateTime } from "./ui-7cyGNbu5.mjs";
3
+ import { a as apiRequest, c as credentials, i as apiDownload, o as apiUpload, s as commonHeaders } from "./api-fmc8CEMT.mjs";
4
+ import { i as reportErrors, n as formatDateTime } from "./ui-9f_lF2Ak.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  import { basename, extname, join } from "node:path";
7
7
  import { readFile, writeFile } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { f as resolveProject, u as projectFlagArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/files.ts
6
6
  /**
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "./package-BpSdSdZI.mjs";
2
+ import { t as version } from "./package-BzvVsyRl.mjs";
3
3
  import { i as siteHeaderLine, n as setInvocationProfile } from "./site-BcZ0LOvm.mjs";
4
4
  import { a as notifyOfUpdate, o as runRefresh } from "./version-check-CcsA1QjI.mjs";
5
5
  import { defineCommand, runMain } from "citty";
@@ -51,42 +51,43 @@ const main = defineCommand({
51
51
  description: "canopy — create and deploy vibecoded projects"
52
52
  },
53
53
  subCommands: {
54
- login: () => import("./login-BpmefYHv.mjs").then((m) => m.loginCommand),
55
- whoami: () => import("./login-BpmefYHv.mjs").then((m) => m.whoamiCommand),
56
- logout: () => import("./login-BpmefYHv.mjs").then((m) => m.logoutCommand),
57
- create: () => import("./projects-Dcq37hny.mjs").then((m) => m.createCommand),
58
- init: () => import("./projects-Dcq37hny.mjs").then((m) => m.initCommand),
59
- projects: () => import("./projects-Dcq37hny.mjs").then((m) => m.projectsCommand),
60
- delete: () => import("./projects-Dcq37hny.mjs").then((m) => m.deleteCommand),
61
- rename: () => import("./rename-DTg_3_BJ.mjs").then((m) => m.renameCommand),
62
- dev: () => import("./dev-CCMeTwvP.mjs").then((m) => m.devCommand),
63
- deploy: () => import("./deploy-C1mwXvJY.mjs").then((m) => m.deployCommand),
64
- promote: () => import("./deploy-C1mwXvJY.mjs").then((m) => m.promoteCommand),
65
- staging: () => import("./staging-BZJwA_iG.mjs").then((m) => m.stagingCommand),
66
- rollback: () => import("./deploy-C1mwXvJY.mjs").then((m) => m.rollbackCommand),
67
- download: () => import("./deploy-C1mwXvJY.mjs").then((m) => m.downloadCommand),
68
- token: () => import("./token-BEV5lbld.mjs").then((m) => m.tokenCommand),
69
- egress: () => import("./egress-Cy3UBgEM.mjs").then((m) => m.egressCommand),
70
- calls: () => import("./calls-Cnt16FiF.mjs").then((m) => m.callsCommand),
71
- secrets: () => import("./secrets-H1bQRNBr.mjs").then((m) => m.secretsCommand),
72
- roles: () => import("./roles-B5E2tfbN.mjs").then((m) => m.rolesCommand),
73
- members: () => import("./roles-B5E2tfbN.mjs").then((m) => m.membersCommand),
74
- schedule: () => import("./schedule-_u2Ab1WH.mjs").then((m) => m.scheduleCommand),
75
- feedback: () => import("./feedback-DymVKtj0.mjs").then((m) => m.feedbackCommand),
76
- db: () => import("./db-CXeAa-Qy.mjs").then((m) => m.dbCommand),
77
- files: () => import("./files-CYTMMRC0.mjs").then((m) => m.filesCommand),
78
- usage: () => import("./usage-iYp64st3.mjs").then((m) => m.usageCommand),
79
- ai: () => import("./ai-DDVTX_nO.mjs").then((m) => m.aiCommand),
80
- open: () => import("./open-D2WqNBiq.mjs").then((m) => m.openCommand),
81
- browse: () => import("./browse-CVBq2IB4.mjs").then((m) => m.browseCommand),
82
- docs: () => import("./docs-DgMINV-7.mjs").then((m) => m.docsCommand),
83
- skill: () => import("./skill-BHDQdPTC.mjs").then((m) => m.skillCommand),
84
- upgrade: () => import("./upgrade-BYTMPnOF.mjs").then((m) => m.upgradeCommand),
85
- logs: () => import("./logs-CWr7tRhN.mjs").then((m) => m.logsCommand),
86
- mcp: () => import("./mcp-D0TZcRce.mjs").then((m) => m.mcpCommand),
87
- repo: () => import("./repo-C_gmPkLX.mjs").then((m) => m.repoCommand),
88
- template: () => import("./project-template-D-e33lix.mjs").then((m) => m.templateCommand),
89
- audience: () => import("./audience-8U1dwxcU.mjs").then((m) => m.audienceCommand)
54
+ login: () => import("./login-Baso-JE0.mjs").then((m) => m.loginCommand),
55
+ whoami: () => import("./login-Baso-JE0.mjs").then((m) => m.whoamiCommand),
56
+ logout: () => import("./login-Baso-JE0.mjs").then((m) => m.logoutCommand),
57
+ create: () => import("./projects-DOqpkUVT.mjs").then((m) => m.createCommand),
58
+ init: () => import("./projects-DOqpkUVT.mjs").then((m) => m.initCommand),
59
+ projects: () => import("./projects-DOqpkUVT.mjs").then((m) => m.projectsCommand),
60
+ delete: () => import("./projects-DOqpkUVT.mjs").then((m) => m.deleteCommand),
61
+ rename: () => import("./rename-RA_oYbRT.mjs").then((m) => m.renameCommand),
62
+ dev: () => import("./dev-BtacZ4HE.mjs").then((m) => m.devCommand),
63
+ deploy: () => import("./deploy-k2DzsLxO.mjs").then((m) => m.deployCommand),
64
+ promote: () => import("./deploy-k2DzsLxO.mjs").then((m) => m.promoteCommand),
65
+ staging: () => import("./staging-BxG3Cffd.mjs").then((m) => m.stagingCommand),
66
+ rollback: () => import("./deploy-k2DzsLxO.mjs").then((m) => m.rollbackCommand),
67
+ download: () => import("./deploy-k2DzsLxO.mjs").then((m) => m.downloadCommand),
68
+ versions: () => import("./versions-Cgw7sB3h.mjs").then((m) => m.versionsCommand),
69
+ token: () => import("./token-bHdy_IoX.mjs").then((m) => m.tokenCommand),
70
+ egress: () => import("./egress-Bzn2VKDe.mjs").then((m) => m.egressCommand),
71
+ calls: () => import("./calls-DsbRjCcy.mjs").then((m) => m.callsCommand),
72
+ secrets: () => import("./secrets-Bi7BYCla.mjs").then((m) => m.secretsCommand),
73
+ roles: () => import("./roles-tqf4sYDM.mjs").then((m) => m.rolesCommand),
74
+ members: () => import("./roles-tqf4sYDM.mjs").then((m) => m.membersCommand),
75
+ schedule: () => import("./schedule-D8AQ8MVF.mjs").then((m) => m.scheduleCommand),
76
+ feedback: () => import("./feedback-B0-6QTSh.mjs").then((m) => m.feedbackCommand),
77
+ db: () => import("./db-BU-ni9fj.mjs").then((m) => m.dbCommand),
78
+ files: () => import("./files-CBbAtHIK.mjs").then((m) => m.filesCommand),
79
+ usage: () => import("./usage-DFs2TERV.mjs").then((m) => m.usageCommand),
80
+ ai: () => import("./ai-00f2Mgqh.mjs").then((m) => m.aiCommand),
81
+ open: () => import("./open-Doat726T.mjs").then((m) => m.openCommand),
82
+ browse: () => import("./browse-CxwKuka0.mjs").then((m) => m.browseCommand),
83
+ docs: () => import("./docs-ZBBQi3uK.mjs").then((m) => m.docsCommand),
84
+ skill: () => import("./skill-k3HLr7rK.mjs").then((m) => m.skillCommand),
85
+ upgrade: () => import("./upgrade-DkjbsYNs.mjs").then((m) => m.upgradeCommand),
86
+ logs: () => import("./logs-c76jVOhb.mjs").then((m) => m.logsCommand),
87
+ mcp: () => import("./mcp-DmcjX8Kn.mjs").then((m) => m.mcpCommand),
88
+ repo: () => import("./repo-DayXVvyj.mjs").then((m) => m.repoCommand),
89
+ template: () => import("./project-template--mESzwea.mjs").then((m) => m.templateCommand),
90
+ audience: () => import("./audience-ByM1jUH3.mjs").then((m) => m.audienceCommand)
90
91
  }
91
92
  });
92
93
  const quiet = process.argv[2] === "mcp" && process.argv[3] === "serve" || process.argv[2] === "repo" && process.argv[3] === "credential";
@@ -1,6 +1,6 @@
1
1
  import { c as dbRouter, h as isCreateOnly, l as hasPrivateNames, m as blobRouter, p as STREAMED_BLOB_BYTES, s as realtimeRouter, t as WORKER_ATTEST_HEADER, u as META_COLUMNS } from "./src-DpjA-a59.mjs";
2
- import { r as apiDataRequest } from "./api-MIRoGsB6.mjs";
3
- import { a as rewriteApiPath } from "./dev--vOKyg1k.mjs";
2
+ import { r as apiDataRequest } from "./api-fmc8CEMT.mjs";
3
+ import { a as rewriteApiPath } from "./dev-qp1VRNM_.mjs";
4
4
  import { createRequire } from "node:module";
5
5
  import { createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
6
6
  import { dirname, join, relative, sep } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { C as upsertProfileAuth, E as isProfileId, S as setActiveProfile, T as getBakedProfile, b as listBakedProfiles, r as siteConfig, w as writeConfigFile, x as readConfigFile, y as clearAllProfileTokens } from "./site-BcZ0LOvm.mjs";
2
- import { n as agentHeaders } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors, o as spinner$1, r as openBrowser } from "./ui-7cyGNbu5.mjs";
2
+ import { n as agentHeaders } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors, o as spinner$1, r as openBrowser } from "./ui-9f_lF2Ak.mjs";
4
4
  import { n as clearRepoTokenCache } from "./repo-credential-CNDRM-tG.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  import { hostname } from "node:os";
@@ -1,6 +1,6 @@
1
1
  import { f as resolveProject, u as projectFlagArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/logs.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { t as version } from "./package-BpSdSdZI.mjs";
1
+ import { t as version } from "./package-BzvVsyRl.mjs";
2
2
  import { d as projectUrl, g as tryResolveProject, m as stagingUrl, r as siteConfig } from "./site-BcZ0LOvm.mjs";
3
- import { a as apiRequest, f as noticeRenamesOnly, l as currentSlug, t as ApiError } from "./api-MIRoGsB6.mjs";
3
+ import { a as apiRequest, f as noticeRenamesOnly, l as currentSlug, t as ApiError } from "./api-fmc8CEMT.mjs";
4
4
  import { t as liveDevServer } from "./dev-server-file-Dk9pk4AR.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
@@ -1,5 +1,5 @@
1
1
  import { h as tryReadCanopyJson } from "./site-BcZ0LOvm.mjs";
2
- import { r as apiDataRequest } from "./api-MIRoGsB6.mjs";
2
+ import { r as apiDataRequest } from "./api-fmc8CEMT.mjs";
3
3
  import { readFileSync, readdirSync } from "node:fs";
4
4
  import { join, resolve } from "node:path";
5
5
  //#region src/migrations.ts
@@ -1,5 +1,5 @@
1
1
  import { d as projectUrl, f as resolveProject, l as projectDirArgs, m as stagingUrl } from "./site-BcZ0LOvm.mjs";
2
- import { i as reportErrors, r as openBrowser } from "./ui-7cyGNbu5.mjs";
2
+ import { i as reportErrors, r as openBrowser } from "./ui-9f_lF2Ak.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/open.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.7.56";
2
+ var version = "0.7.58";
3
3
  //#endregion
4
4
  export { version as t };
@@ -0,0 +1,2 @@
1
+ import { a as templateCommand } from "./project-template-BnX47DpF.mjs";
2
+ export { templateCommand };
@@ -1,6 +1,6 @@
1
1
  import { f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  /** Plain words for the API's template errors. */
@@ -1,9 +1,9 @@
1
1
  import { d as projectUrl, h as tryReadCanopyJson, r as siteConfig } from "./site-BcZ0LOvm.mjs";
2
2
  import { d as HOST_LABEL_SEPARATOR } from "./src-DpjA-a59.mjs";
3
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
4
- import { a as requireTty, i as reportErrors, o as spinner$1, s as unwrap, t as confirmTypedSlug } from "./ui-7cyGNbu5.mjs";
5
- import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-DjbT9RRU.mjs";
6
- import { a as offerRepoOnCreate, i as githubOrigin, n as cloneProjectRepo } from "./repo-ZjkxQKwh.mjs";
3
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
4
+ import { a as requireTty, i as reportErrors, o as spinner$1, s as unwrap, t as confirmTypedSlug } from "./ui-9f_lF2Ak.mjs";
5
+ import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-BnX47DpF.mjs";
6
+ import { a as offerRepoOnCreate, i as githubOrigin, n as cloneProjectRepo } from "./repo-DD3eK1P_.mjs";
7
7
  import { defineCommand } from "citty";
8
8
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
9
9
  import { join, relative, resolve, sep } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { d as projectUrl, f as resolveProject, l as projectDirArgs, p as rewriteCanopyJsonSlug } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/rename.ts
@@ -1,6 +1,6 @@
1
1
  import { a as parseGithubRemote, f as resolveProject, h as tryReadCanopyJson, l as projectDirArgs, o as parseRepositoryArg, r as siteConfig, u as projectFlagArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, f as noticeRenamesOnly, m as withContext, n as agentHeaders, u as followRename } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, f as noticeRenamesOnly, m as withContext, n as agentHeaders, u as followRename } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-9f_lF2Ak.mjs";
4
4
  import { a as parseCredentialInput, i as helperCommand, o as runCredentialHelper, r as fileTokenCache, t as RepoCredentialError } from "./repo-credential-CNDRM-tG.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  import { existsSync, realpathSync } from "node:fs";
@@ -0,0 +1,2 @@
1
+ import { o as repoCommand } from "./repo-DD3eK1P_.mjs";
2
+ export { repoCommand };
@@ -1,6 +1,6 @@
1
1
  import { d as projectUrl, f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/roles.ts
@@ -1,2 +1,2 @@
1
- import { c as rolesCommand, o as membersCommand } from "./roles-2dF7LkZB.mjs";
1
+ import { c as rolesCommand, o as membersCommand } from "./roles-BS8-Gvv-.mjs";
2
2
  export { membersCommand, rolesCommand };
@@ -1,6 +1,6 @@
1
1
  import { f as resolveProject, u as projectFlagArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors, n as formatDateTime } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors, n as formatDateTime } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/schedule.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-MIRoGsB6.mjs";
3
- import { i as reportErrors, n as formatDateTime, s as unwrap } from "./ui-7cyGNbu5.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
+ import { i as reportErrors, n as formatDateTime, s as unwrap } from "./ui-9f_lF2Ak.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/secrets.ts
@@ -96,6 +96,7 @@ and never go stale.
96
96
  - Test first on staging: `canopy deploy --staging` → verify → `canopy promote`
97
97
  (own database cloned from live; `canopy staging status | sync | destroy`)
98
98
  - Roll back: `canopy rollback`
99
+ - Old versions: `canopy versions` (retention keeps the 20 newest plus live and staging)
99
100
  - Open the live site: `canopy open`
100
101
  - **Look at a deployed project in your own browser** (Playwright, a browser
101
102
  tool, curl): `canopy browse <slug> --json` prints a one-time sign-in link
@@ -220,6 +221,13 @@ Non-interactive: `canopy create "My App" --template spa`. **When unsure between
220
221
  restores.
221
222
  - **Deploys are public.** `canopy deploy` makes a version live. Confirm before
222
223
  deploying unless the user clearly asked you to.
224
+ - **Site media isn't versioned.** When a deploy suggests moving a folder to
225
+ `canopy.json` `"media"`, do it only for data or media that rarely changes,
226
+ or when the user agrees: a rollback keeps serving the current media.
227
+ - **Version retention deletes old versions.** When a deploy prints a retention
228
+ hint, pass it on to the user and ask before running
229
+ `canopy versions retention on`: expired versions can no longer be rolled
230
+ back to, pinned or downloaded.
223
231
  - Keep the CLI current: `canopy upgrade` (this also refreshes this skill).
224
232
  - **A `canopy` command itself failing?** First rule out user error (re-read
225
233
  `canopy docs troubleshooting` and the command's `--help`). If the platform
@@ -1,5 +1,5 @@
1
- import { t as version } from "./package-BpSdSdZI.mjs";
2
- import { i as reportErrors } from "./ui-7cyGNbu5.mjs";
1
+ import { t as version } from "./package-BzvVsyRl.mjs";
2
+ import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  import { cpSync, existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";