@mediamonks/canopy-cli 0.7.52 → 0.7.54

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 (66) hide show
  1. package/dist/{ai-BjnuSjmw.mjs → ai-BlqO9NhM.mjs} +2 -2
  2. package/dist/{api-DmJrIsE7.mjs → api-D4KUT6Ly.mjs} +9 -8
  3. package/dist/{audience-BSvOEbco.mjs → audience-Dlrsdthb.mjs} +3 -3
  4. package/dist/{browse-BPLWhoFI.mjs → browse-CW3CnhK_.mjs} +2 -2
  5. package/dist/{calls-COIxX32d.mjs → calls-DFtWVJfv.mjs} +3 -3
  6. package/dist/{db-D5SXZrp5.mjs → db-Dy1csI71.mjs} +15 -18
  7. package/dist/{deploy-D8OZyhH8.mjs → deploy-DHjZj2Pq.mjs} +13 -19
  8. package/dist/{dev-BnzJ8a1u.mjs → dev-BvzqZU_F.mjs} +9 -9
  9. package/dist/dev-wHv8RrDn.mjs +2 -0
  10. package/dist/{dev-worker-DBBN0F6X.mjs → dev-worker-BdVcP-SM.mjs} +1 -1
  11. package/dist/docs/cli-schedule.md +1 -1
  12. package/dist/docs/cli-token.md +1 -1
  13. package/dist/docs/developers-architecture.md +1 -1
  14. package/dist/docs/outside-sign-in.md +1 -1
  15. package/dist/docs/platform-client-access.md +1 -1
  16. package/dist/docs/platform-credentials.md +2 -2
  17. package/dist/docs/platform-egress.md +4 -4
  18. package/dist/docs/platform-schedules.md +4 -4
  19. package/dist/docs/porting-nextjs.md +23 -23
  20. package/dist/docs/staging.md +1 -1
  21. package/dist/docs/static-serving.md +6 -3
  22. package/dist/docs/troubleshooting.md +1 -1
  23. package/dist/{docs-Od4duFhd.mjs → docs-CoH01QrG.mjs} +4 -4
  24. package/dist/{egress-BoGWBHRa.mjs → egress-hKpsJF84.mjs} +4 -10
  25. package/dist/{feedback-XEIHbeor.mjs → feedback-CFaqNiiw.mjs} +4 -4
  26. package/dist/{files-B7toJRlj.mjs → files-DKtyMjY0.mjs} +3 -3
  27. package/dist/index.mjs +39 -52
  28. package/dist/{local-R-INkPbU.mjs → local-B1N4TpE9.mjs} +4 -4
  29. package/dist/{login-DrMr99-A.mjs → login-cbwynFoT.mjs} +3 -3
  30. package/dist/{logs-DJWrL6ja.mjs → logs-ByDPHO28.mjs} +3 -3
  31. package/dist/{mcp-misDO7O8.mjs → mcp-B8VXA-TE.mjs} +3 -3
  32. package/dist/{migrations-BReMlGWP.mjs → migrations-k5pyUUR0.mjs} +3 -3
  33. package/dist/{open-6ev_6m0p.mjs → open-CYfkeTaw.mjs} +2 -2
  34. package/dist/{package-DBdEKZ6u.mjs → package-BDKvR7By.mjs} +1 -1
  35. package/dist/{project-template-Bas1UN2O.mjs → project-template-B297eCQ0.mjs} +3 -3
  36. package/dist/project-template-B6YpesjZ.mjs +2 -0
  37. package/dist/{projects-BEBYhy6k.mjs → projects-ztlDQi0P.mjs} +28 -28
  38. package/dist/{rename-PIJmdzHk.mjs → rename-BZ8hvUUt.mjs} +3 -3
  39. package/dist/{repo-Dry87b9d.mjs → repo-BUIM4d_1.mjs} +4 -10
  40. package/dist/repo-fDD4TcJ4.mjs +2 -0
  41. package/dist/{roles-CXY226VM.mjs → roles-DvywfJ8x.mjs} +1 -1
  42. package/dist/{roles-CUFRTp_R.mjs → roles-Yn8U3cr-.mjs} +3 -3
  43. package/dist/{schedule-DJsclUxC.mjs → schedule-Cv26MIfS.mjs} +3 -3
  44. package/dist/{secrets-CV2IwVwU.mjs → secrets-C6tF7BI9.mjs} +3 -3
  45. package/dist/{site-BL5Ik-yj.mjs → site-C0nf9RXY.mjs} +8 -3
  46. package/dist/{skill-3RZw4vSI.mjs → skill-BXlKClK3.mjs} +2 -2
  47. package/dist/{src-UBUAqzqH.mjs → src-B0WdnVz9.mjs} +26 -4
  48. package/dist/{staging-B9sjqvfh.mjs → staging-C9mn0EBS.mjs} +6 -14
  49. package/dist/templates/spa/AGENTS.md +3 -3
  50. package/dist/templates/spa/README.md +2 -2
  51. package/dist/templates/spa/package.json +2 -2
  52. package/dist/templates/spa/tsconfig.json +1 -0
  53. package/dist/templates/static/AGENTS.md +3 -3
  54. package/dist/templates/static/README.md +2 -2
  55. package/dist/templates/worker/AGENTS.md +3 -3
  56. package/dist/templates/worker/README.md +2 -2
  57. package/dist/templates/worker/package.json +2 -2
  58. package/dist/templates/worker/tsconfig.json +1 -0
  59. package/dist/{token-BT2_ELX6.mjs → token-DIJtUPrE.mjs} +3 -3
  60. package/dist/{ui-Ddw4d2Nn.mjs → ui-BPq6-hKS.mjs} +16 -3
  61. package/dist/{upgrade-Dy4XV7iP.mjs → upgrade-CJln-B-I.mjs} +2 -2
  62. package/dist/{usage-VMT75MZ4.mjs → usage-DBhL6SUo.mjs} +3 -3
  63. package/package.json +2 -2
  64. package/dist/dev-DSI3e4qP.mjs +0 -2
  65. package/dist/project-template-Dti_Mmnb.mjs +0 -2
  66. package/dist/repo-CGTFmIWM.mjs +0 -2
@@ -1,6 +1,6 @@
1
1
  # {{name}} — a Canopy static app
2
2
 
3
- A no-build web app on [Canopy](https://dashboard.thanarie.dev), Monks' managed
3
+ A no-build web app on [Canopy]({{dashboardUrl}}), Monks' managed
4
4
  platform for internal projects. Everything is served behind company login;
5
5
  there is no infrastructure to manage and none should be added.
6
6
 
@@ -15,7 +15,7 @@ npx skills add mediamonks/canopy
15
15
  ```
16
16
 
17
17
  If that fails the skill isn't published yet — the SDK surface is documented on
18
- the [Canopy dashboard](https://dashboard.thanarie.dev).
18
+ the [Canopy dashboard]({{dashboardUrl}}).
19
19
 
20
20
  ## Working on this project
21
21
 
@@ -28,7 +28,7 @@ the [Canopy dashboard](https://dashboard.thanarie.dev).
28
28
  - `canopy dev --local [--pull]` — offline sandbox with local data instead;
29
29
  writes never reach the platform. Prefer it for destructive experiments.
30
30
  - `canopy deploy` — publish; live (behind company login) at
31
- https://{{slug}}.thanarie.dev.
31
+ {{url}}.
32
32
  - Risky change (schema migration, backend rework)? `canopy deploy --staging`
33
33
  first — a private copy with its own database cloned from live — verify, then
34
34
  `canopy promote` ships the exact tested version. Never promote with failing
@@ -1,7 +1,7 @@
1
1
  # {{name}}
2
2
 
3
- A [Canopy](https://dashboard.thanarie.dev) project. Live (behind company
4
- login) at https://{{slug}}.thanarie.dev after the first `canopy deploy`.
3
+ A [Canopy]({{dashboardUrl}}) project. Live (behind company
4
+ login) at {{url}} after the first `canopy deploy`.
5
5
 
6
6
  - `canopy dev` — develop locally against the live platform (real data!)
7
7
  - `canopy dev --local [--pull]` — offline sandbox with local data instead
@@ -1,7 +1,7 @@
1
1
  # {{name}} — a Canopy React SPA with a backend Worker
2
2
 
3
3
  A Vite + React single-page app plus a per-project backend Worker on
4
- [Canopy](https://dashboard.thanarie.dev), Monks' managed platform for internal
4
+ [Canopy]({{dashboardUrl}}), Monks' managed platform for internal
5
5
  projects. Everything is served behind company login; there is no
6
6
  infrastructure to manage and none should be added.
7
7
 
@@ -16,7 +16,7 @@ npx skills add mediamonks/canopy
16
16
  ```
17
17
 
18
18
  If that fails the skill isn't published yet — the SDK surface is documented on
19
- the [Canopy dashboard](https://dashboard.thanarie.dev).
19
+ the [Canopy dashboard]({{dashboardUrl}}).
20
20
 
21
21
  ## Working on this project
22
22
 
@@ -42,7 +42,7 @@ the [Canopy dashboard](https://dashboard.thanarie.dev).
42
42
  - `canopy dev --local [--pull]` — offline sandbox with local data instead;
43
43
  writes never reach the platform. Prefer it for destructive experiments.
44
44
  - `canopy deploy` — builds (`npm run build`) and publishes; live (behind
45
- company login) at https://{{slug}}.thanarie.dev.
45
+ company login) at {{url}}.
46
46
  - Defining your own tables (raw `sql()` / Drizzle)? Use the migrations flow —
47
47
  `canopy docs migrations`. Never invent a `DATABASE_URL` (none exists):
48
48
  generate migrations locally, and `canopy deploy` applies them.
@@ -1,8 +1,8 @@
1
1
  # {{name}}
2
2
 
3
- A [Canopy](https://dashboard.thanarie.dev) project — Vite + React with a
3
+ A [Canopy]({{dashboardUrl}}) project — Vite + React with a
4
4
  backend Worker (`worker/`). Live (behind company login) at
5
- https://{{slug}}.thanarie.dev after the first `canopy deploy`.
5
+ {{url}} after the first `canopy deploy`.
6
6
 
7
7
  - `npm install` — once, then:
8
8
  - `canopy dev` — develop locally against the live platform (real data!);
@@ -7,7 +7,7 @@
7
7
  "build": "tsc && vite build"
8
8
  },
9
9
  "dependencies": {
10
- "@mediamonks/canopy": "^0.0.12",
10
+ "@mediamonks/canopy": "^0.0.20",
11
11
  "hono": "^4.8.0",
12
12
  "react": "^19.1.0",
13
13
  "react-dom": "^19.1.0"
@@ -16,7 +16,7 @@
16
16
  "@types/react": "^19.1.0",
17
17
  "@types/react-dom": "^19.1.0",
18
18
  "@vitejs/plugin-react": "^5.0.0",
19
- "typescript": "^5.8.0",
19
+ "typescript": "^7.0.2",
20
20
  "vite": "^7.0.0"
21
21
  }
22
22
  }
@@ -5,6 +5,7 @@
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "bundler",
7
7
  "jsx": "react-jsx",
8
+ "types": ["vite/client"],
8
9
  "strict": true,
9
10
  "noEmit": true,
10
11
  "skipLibCheck": true,
@@ -1,6 +1,6 @@
1
- import { c as projectDirArgs, d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
2
- import { a as apiRequest } from "./api-DmJrIsE7.mjs";
3
- import { r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
1
+ import { f as resolveProject, l as projectDirArgs, u as projectFlagArgs } from "./site-C0nf9RXY.mjs";
2
+ import { a as apiRequest } from "./api-D4KUT6Ly.mjs";
3
+ import { i as reportErrors, n as formatDateTime } from "./ui-BPq6-hKS.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  const tokenCommand = defineCommand({
6
6
  meta: {
@@ -1,6 +1,6 @@
1
- import { t as ApiError } from "./api-DmJrIsE7.mjs";
1
+ import { t as ApiError } from "./api-D4KUT6Ly.mjs";
2
2
  import { spawn } from "node:child_process";
3
- import { cancel, isCancel, spinner } from "@clack/prompts";
3
+ import { cancel, isCancel, spinner, text } from "@clack/prompts";
4
4
  //#region src/ui.ts
5
5
  /**
6
6
  * Shared terminal UX plumbing: clack prompt unwrapping and uniform
@@ -119,6 +119,19 @@ function requireTty(hint) {
119
119
  if (!process.stdin.isTTY) throw new Error(`This needs an interactive terminal — ${hint}`);
120
120
  }
121
121
  /**
122
+ * The type-the-slug guard in front of a destructive command: needs a TTY
123
+ * (`ttyHint` says which flag skips it), shows `message`, and is true only when
124
+ * the answer is the slug. Anything else prints `abortedText` and is false.
125
+ */
126
+ async function confirmTypedSlug(slug, message, ttyHint, abortedText = "Aborted.") {
127
+ requireTty(ttyHint);
128
+ if (unwrap(await text({ message })).trim() !== slug) {
129
+ cancel(abortedText);
130
+ return false;
131
+ }
132
+ return true;
133
+ }
134
+ /**
122
135
  * API timestamps are UTC — ISO with a Z suffix, though a lagging API site may
123
136
  * still send the bare "YYYY-MM-DD HH:MM:SS" form. Parse either as UTC and
124
137
  * render compact local wall-clock time ("2026-08-25 14:23").
@@ -139,4 +152,4 @@ function openBrowser(url) {
139
152
  }).on("error", () => {}).unref();
140
153
  }
141
154
  //#endregion
142
- export { spinner$1 as a, requireTty as i, openBrowser as n, unwrap as o, reportErrors as r, formatDateTime as t };
155
+ export { requireTty as a, reportErrors as i, formatDateTime as n, spinner$1 as o, openBrowser as r, unwrap as s, confirmTypedSlug as t };
@@ -1,5 +1,5 @@
1
1
  import { t as PACKAGE_NAME } from "./version-check-CcsA1QjI.mjs";
2
- import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
2
+ import { i as reportErrors } from "./ui-BPq6-hKS.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  import { spawn } from "node:child_process";
5
5
  import { fileURLToPath } from "node:url";
@@ -112,7 +112,7 @@ const upgradeCommand = defineCommand({
112
112
  const spec = `${PACKAGE_NAME}@${args.version ?? "latest"}`;
113
113
  const command = pmCommand(pm);
114
114
  const cmd = installArgs(pm, spec);
115
- const { skillInstalled } = await import("./skill-3RZw4vSI.mjs");
115
+ const { skillInstalled } = await import("./skill-BXlKClK3.mjs");
116
116
  const { homedir } = await import("node:os");
117
117
  const refreshGlobal = skillInstalled(homedir());
118
118
  const refreshRepo = process.cwd() !== homedir() && skillInstalled(process.cwd());
@@ -1,6 +1,6 @@
1
- import { d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
3
- import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
1
+ import { f as resolveProject, u as projectFlagArgs } from "./site-C0nf9RXY.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-D4KUT6Ly.mjs";
3
+ import { i as reportErrors } from "./ui-BPq6-hKS.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/usage.ts
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediamonks/canopy-cli",
3
- "version": "0.7.52",
3
+ "version": "0.7.54",
4
4
  "description": "Canopy CLI — create, develop and deploy Canopy projects.",
5
5
  "bin": {
6
6
  "canopy": "./dist/index.mjs"
@@ -22,7 +22,7 @@
22
22
  "esbuild": "^0.28.1",
23
23
  "hono": "^4.8.0",
24
24
  "vite-server": "npm:vite@^7",
25
- "@mediamonks/canopy": "0.0.19",
25
+ "@mediamonks/canopy": "0.0.20",
26
26
  "@mediamonks/canopy-data-plane": "0.0.4"
27
27
  },
28
28
  "devDependencies": {
@@ -1,2 +0,0 @@
1
- import { n as devCommand } from "./dev-BnzJ8a1u.mjs";
2
- export { devCommand };
@@ -1,2 +0,0 @@
1
- import { a as templateCommand } from "./project-template-Bas1UN2O.mjs";
2
- export { templateCommand };
@@ -1,2 +0,0 @@
1
- import { o as repoCommand } from "./repo-Dry87b9d.mjs";
2
- export { repoCommand };