@mediamonks/canopy-cli 0.7.5 → 0.7.7

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 (55) hide show
  1. package/dist/docs/cli-create.md +46 -0
  2. package/dist/docs/cli-db.md +86 -0
  3. package/dist/docs/cli-delete.md +44 -0
  4. package/dist/docs/cli-deploy.md +58 -0
  5. package/dist/docs/cli-dev.md +63 -0
  6. package/dist/docs/cli-docs.md +47 -0
  7. package/dist/docs/cli-download.md +42 -0
  8. package/dist/docs/cli-egress.md +37 -0
  9. package/dist/docs/cli-feedback.md +51 -0
  10. package/dist/docs/cli-index.md +61 -0
  11. package/dist/docs/cli-init.md +46 -0
  12. package/dist/docs/cli-login.md +43 -0
  13. package/dist/docs/cli-logout.md +32 -0
  14. package/dist/docs/cli-logs.md +57 -0
  15. package/dist/docs/cli-open.md +41 -0
  16. package/dist/docs/cli-projects.md +43 -0
  17. package/dist/docs/cli-promote.md +44 -0
  18. package/dist/docs/cli-rollback.md +45 -0
  19. package/dist/docs/cli-skill.md +39 -0
  20. package/dist/docs/cli-staging.md +54 -0
  21. package/dist/docs/cli-token.md +47 -0
  22. package/dist/docs/cli-upgrade.md +43 -0
  23. package/dist/docs/cli-usage.md +43 -0
  24. package/dist/docs/cli-whoami.md +46 -0
  25. package/dist/docs/developers-agents-and-ai.md +95 -0
  26. package/dist/docs/developers-architecture.md +106 -0
  27. package/dist/docs/index.json +331 -0
  28. package/dist/docs/infrastructure.md +5 -8
  29. package/dist/docs/overview-faq.md +105 -0
  30. package/dist/docs/overview-how-it-works.md +81 -0
  31. package/dist/docs/overview-use-cases.md +76 -0
  32. package/dist/docs/overview-what-is-canopy.md +75 -0
  33. package/dist/docs/platform-ai-usage.md +65 -0
  34. package/dist/docs/platform-client-access.md +53 -0
  35. package/dist/docs/platform-deploys-and-rollbacks.md +93 -0
  36. package/dist/docs/platform-egress.md +75 -0
  37. package/dist/docs/platform-feedback.md +79 -0
  38. package/dist/docs/platform-members-and-access.md +71 -0
  39. package/dist/docs/platform-project-data.md +66 -0
  40. package/dist/docs/platform-schedules.md +90 -0
  41. package/dist/docs/platform-sites-and-profiles.md +61 -0
  42. package/dist/docs/static-serving.md +5 -8
  43. package/dist/docs/troubleshooting.md +6 -8
  44. package/dist/{docs-DQmUReJR.mjs → docs-DOiL2Sw-.mjs} +42 -20
  45. package/dist/feedback-BZG8E8zG.mjs +258 -0
  46. package/dist/index.mjs +10 -9
  47. package/dist/{logs-DBLDS3aQ.mjs → logs-DuzM-_Rn.mjs} +1 -1
  48. package/dist/{package-yVoO2pq4.mjs → package-BNiOibhj.mjs} +1 -1
  49. package/dist/{projects-D2fDeWNU.mjs → projects-C9TBoiW7.mjs} +5 -8
  50. package/dist/skill/canopy/SKILL.md +17 -8
  51. package/dist/{skill-12Ga-2UT.mjs → skill-DRTg-mJR.mjs} +1 -1
  52. package/dist/templates/worker/AGENTS.md +0 -3
  53. package/dist/templates/worker/README.md +1 -5
  54. package/dist/{upgrade-Du6U0xjp.mjs → upgrade-BDaM4M6Y.mjs} +1 -1
  55. package/package.json +1 -1
@@ -30,10 +30,9 @@ const TEMPLATES = [
30
30
  },
31
31
  {
32
32
  id: "worker",
33
- label: "React SPA + backend Worker",
34
- hint: "adds Hono handlers in worker/ — Phase 2 preview",
35
- needsInstall: true,
36
- hidden: true
33
+ label: "React SPA + backend worker",
34
+ hint: "spa plus server-side handlers in worker/ — for secrets, schedules, external APIs",
35
+ needsInstall: true
37
36
  }
38
37
  ];
39
38
  function templatesRoot() {
@@ -134,7 +133,7 @@ const createCommand = defineCommand({
134
133
  if (scaffold && !args.template && process.stdin.isTTY) {
135
134
  const id = unwrap(await p.select({
136
135
  message: "Template",
137
- options: TEMPLATES.filter((t) => !t.hidden).map((t) => ({
136
+ options: TEMPLATES.map((t) => ({
138
137
  value: t.id,
139
138
  label: t.label,
140
139
  hint: t.hint
@@ -142,7 +141,6 @@ const createCommand = defineCommand({
142
141
  }));
143
142
  template = TEMPLATES.find((t) => t.id === id) ?? template;
144
143
  }
145
- if (template.hidden) p.log.warn("Per-project Workers are not deployable yet (Phase 2) — `canopy deploy` publishes the frontend only for now.");
146
144
  const targetDir = resolve(slug);
147
145
  if (scaffold && existsSync(targetDir)) throw new Error(`Directory ./${slug} already exists — remove it, or use --no-scaffold to only register.`);
148
146
  const spin = p.spinner();
@@ -241,7 +239,7 @@ const initCommand = defineCommand({
241
239
  if (!args.template && process.stdin.isTTY) {
242
240
  const id = unwrap(await p.select({
243
241
  message: "Template",
244
- options: TEMPLATES.filter((t) => !t.hidden).map((t) => ({
242
+ options: TEMPLATES.map((t) => ({
245
243
  value: t.id,
246
244
  label: t.label,
247
245
  hint: t.hint
@@ -249,7 +247,6 @@ const initCommand = defineCommand({
249
247
  }));
250
248
  template = TEMPLATES.find((t) => t.id === id) ?? template;
251
249
  }
252
- if (template.hidden) p.log.warn("Per-project Workers are not deployable yet (Phase 2) — `canopy deploy` publishes the frontend only for now.");
253
250
  scaffoldTemplate(template.id, targetDir, {
254
251
  name: project.name,
255
252
  slug
@@ -75,10 +75,12 @@ canopy docs # list all topics
75
75
  canopy docs deploy # print one topic
76
76
  ```
77
77
 
78
- Available topics include: `getting-started`, `cli` (full command reference),
79
- `deploy`, `dev`, `data`, `ci`, `troubleshooting`. Always prefer `canopy docs`
80
- and `canopy <command> --help` over guessing flags — they are the source of
81
- truth and never go stale.
78
+ The listing is grouped by section: guides (`getting-started`, `deploy`, `dev`,
79
+ `data`, `ci`, `troubleshooting`, …), platform feature pages (`platform-*`), a
80
+ per-command CLI reference (`cli-<command>`, plus `cli` for the one-page
81
+ overview), and the SDK reference (`sdk-*`). Always prefer `canopy docs` and
82
+ `canopy <command> --help` over guessing flags — they are the source of truth
83
+ and never go stale.
82
84
 
83
85
  ## Command map (quick orientation — see `canopy docs cli` for detail)
84
86
 
@@ -94,6 +96,8 @@ truth and never go stale.
94
96
  - Roll back: `canopy rollback`
95
97
  - Open the live site: `canopy open`
96
98
  - Manage data: `canopy db pull | snapshot | snapshots | restore | migrate`
99
+ - Work bug reports & feedback: `canopy feedback list | show | comment | status | report`
100
+ — see `canopy docs platform-feedback` for the triage and reporting loops
97
101
  - CI credentials: `canopy token create | list | revoke`
98
102
 
99
103
  ## Custom tables & migrations (devs; Drizzle recommended)
@@ -133,10 +137,10 @@ Prefer **`spa`** the moment either is true — which covers most real projects:
133
137
  - **The app will grow.** `spa` is Vite + React + TypeScript, giving components,
134
138
  routing, and state a real home; `static` has no build step to organise into.
135
139
 
136
- Use **`worker`** (`--template worker`; hidden from the picker) only when you
137
- need server-side backend code — e.g. calling an external API with a secret the
138
- browser can't hold. Per-project Workers are a Phase 2 preview (frontend deploys
139
- now; `worker/` is picked up once the platform supports it).
140
+ Use **`worker`** when you need server-side backend code — e.g. calling an
141
+ external API with a secret the browser can't hold, or running scheduled jobs.
142
+ It's `spa` plus Hono-style handlers in `worker/`; `canopy deploy` publishes
143
+ the frontend and the worker together.
140
144
 
141
145
  Non-interactive: `canopy create "My App" --template spa`. **When unsure between
142
146
  `static` and `spa`, pick `spa`.**
@@ -149,3 +153,8 @@ Non-interactive: `canopy create "My App" --template spa`. **When unsure between
149
153
  - **Deploys are public.** `canopy deploy` makes a version live. Confirm before
150
154
  deploying unless the user clearly asked you to.
151
155
  - Keep the CLI current: `canopy upgrade` (this also refreshes this skill).
156
+ - **A `canopy` command itself failing?** First rule out user error (re-read
157
+ `canopy docs troubleshooting` and the command's `--help`). If the platform
158
+ really misbehaved, check `canopy feedback mine` for a duplicate, then file it:
159
+ `canopy feedback report "<what happened>" --command "<the command>" --error "<output>"`
160
+ — it reaches the platform team directly (no `--project` needed).
@@ -1,4 +1,4 @@
1
- import { t as version } from "./package-yVoO2pq4.mjs";
1
+ import { t as version } from "./package-BNiOibhj.mjs";
2
2
  import { n as reportErrors } from "./ui-CpdtK7mt.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  import { cpSync, existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
@@ -5,9 +5,6 @@ A Vite + React single-page app plus a per-project backend Worker on
5
5
  projects. Everything is served behind company login; there is no
6
6
  infrastructure to manage and none should be added.
7
7
 
8
- > On GCP, `canopy deploy` publishes the frontend **and** the `worker/`
9
- > backend (Cloud Run). Cloudflare WfP upload is still Phase 2.
10
-
11
8
  ## Canopy skill
12
9
 
13
10
  The full SDK reference (auth, db, blob, ai) and platform guardrails ship as an
@@ -4,14 +4,10 @@ A [Canopy](https://dashboard.thanarie.dev) project — Vite + React with a
4
4
  backend Worker (`worker/`). Live (behind company login) at
5
5
  https://{{slug}}.thanarie.dev after the first `canopy deploy`.
6
6
 
7
- > Per-project Workers are a Canopy Phase 2 capability: `canopy deploy`
8
- > publishes the frontend only for now — `worker/` deploys automatically once
9
- > the platform supports it.
10
-
11
7
  - `npm install` — once, then:
12
8
  - `canopy dev` — develop locally against the live platform (real data!)
13
9
  - `canopy dev --local [--pull]` — offline sandbox with local data instead
14
- - `canopy deploy` — build and publish `dist/`
10
+ - `canopy deploy` — build and publish the frontend and the `worker/` backend
15
11
  - `AGENTS.md` — project guardrails and skill setup for coding agents
16
12
 
17
13
  Push-to-main deploys are prepared in `.github/workflows/canopy-deploy.yml`
@@ -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-12Ga-2UT.mjs");
115
+ const { skillInstalled } = await import("./skill-DRTg-mJR.mjs");
116
116
  const refreshSkill = skillInstalled(process.cwd());
117
117
  console.log(`Upgrading via ${command}: ${command} ${cmd.join(" ")}`);
118
118
  await run(command, cmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediamonks/canopy-cli",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "Canopy CLI — create, develop and deploy Canopy projects.",
5
5
  "bin": {
6
6
  "canopy": "./dist/index.mjs"