@mediamonks/canopy-cli 0.7.44 → 0.7.46

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/{ai-FBHTSCLZ.mjs → ai-CWPQiUft.mjs} +2 -2
  2. package/dist/{api-Bl6SG8Oq.mjs → api-DmJrIsE7.mjs} +134 -19
  3. package/dist/{browse-B8-0dweq.mjs → browse-BPLWhoFI.mjs} +2 -2
  4. package/dist/{db-BJJGydgL.mjs → db-DpCMc0uz.mjs} +4 -4
  5. package/dist/{deploy-ExrIeX_m.mjs → deploy-BnRQusjJ.mjs} +51 -5
  6. package/dist/{dev-Cq98yblV.mjs → dev-BmKeIdMi.mjs} +7 -7
  7. package/dist/dev-BvVlq9np.mjs +2 -0
  8. package/dist/docs/ci.md +112 -50
  9. package/dist/docs/cli-create.md +2 -0
  10. package/dist/docs/cli-deploy.md +1 -1
  11. package/dist/docs/cli-members.md +18 -11
  12. package/dist/docs/cli-repo.md +34 -2
  13. package/dist/docs/cli-token.md +8 -6
  14. package/dist/docs/cli.md +6 -2
  15. package/dist/docs/deploy.md +3 -2
  16. package/dist/docs/index.json +5 -5
  17. package/dist/docs/platform-deploys-and-rollbacks.md +4 -4
  18. package/dist/docs/platform-members-and-access.md +28 -9
  19. package/dist/docs/roles.md +1 -1
  20. package/dist/{docs-KmN6jD1S.mjs → docs-CtMrMpt1.mjs} +4 -4
  21. package/dist/{egress-C2amvqmE.mjs → egress-BM4EpLBh.mjs} +3 -3
  22. package/dist/{feedback-B5-95neo.mjs → feedback-BXhbxyXI.mjs} +5 -5
  23. package/dist/index.mjs +35 -35
  24. package/dist/{local-CIkL7tXP.mjs → local-C9Bi9f3y.mjs} +2 -2
  25. package/dist/{login-CREcZfLH.mjs → login-2MW9sGJO.mjs} +3 -3
  26. package/dist/{logs-BnrNZvLc.mjs → logs-dZMPTJLu.mjs} +3 -3
  27. package/dist/{mcp-DZdMNTWr.mjs → mcp-CGmWkGN8.mjs} +3 -3
  28. package/dist/{migrations-D8NqjC5I.mjs → migrations-BReMlGWP.mjs} +2 -2
  29. package/dist/{open-Bpz4C2Sr.mjs → open-DcQSdfx5.mjs} +2 -2
  30. package/dist/{package-Bvly8-rB.mjs → package-BdNHq8QV.mjs} +1 -1
  31. package/dist/{project-template-Cdr1uwwE.mjs → project-template-BPW_Dgxj.mjs} +3 -3
  32. package/dist/project-template-Dw11151p.mjs +2 -0
  33. package/dist/{projects-BRG2HnBs.mjs → projects-CnU3194_.mjs} +26 -8
  34. package/dist/{rename-BGKa25Rq.mjs → rename-BWvERJgA.mjs} +3 -3
  35. package/dist/{repo-CwT2RDoW.mjs → repo-6a7gRQaf.mjs} +171 -8
  36. package/dist/repo-C7AXDtFZ.mjs +2 -0
  37. package/dist/{roles-BDZaN3vi.mjs → roles-CrYf_8wk.mjs} +1 -1
  38. package/dist/{roles-UM0Iiws6.mjs → roles-S2D9Id0W.mjs} +71 -13
  39. package/dist/{schedule-BcqBspn3.mjs → schedule-DvHSSzfR.mjs} +3 -3
  40. package/dist/{secrets-BjbIi7Gp.mjs → secrets-BIn2RPoe.mjs} +3 -3
  41. package/dist/{site-0i7wAJqg.mjs → site-BL5Ik-yj.mjs} +50 -1
  42. package/dist/{skill-DRLniv-I.mjs → skill-vzcCD1b4.mjs} +2 -2
  43. package/dist/{staging-_2Js0Fkc.mjs → staging-Dn8kH9cK.mjs} +3 -3
  44. package/dist/templates/spa/.github/workflows/canopy-deploy.yml +18 -12
  45. package/dist/templates/spa/README.md +1 -1
  46. package/dist/templates/worker/.github/workflows/canopy-deploy.yml +18 -12
  47. package/dist/templates/worker/README.md +1 -1
  48. package/dist/{token-7vSNuz-X.mjs → token-DMCj88A-.mjs} +6 -6
  49. package/dist/{ui-CLnICOne.mjs → ui-26ETk1n8.mjs} +1 -1
  50. package/dist/{upgrade-D_yrD7zp.mjs → upgrade-8_pFNTo5.mjs} +2 -2
  51. package/dist/{usage-DGGmTwjJ.mjs → usage-Bpz5B1N1.mjs} +3 -3
  52. package/package.json +1 -1
  53. package/dist/dev-CUJKgaqJ.mjs +0 -2
  54. package/dist/project-template-715H_lnu.mjs +0 -2
  55. package/dist/repo-DmFs6H9m.mjs +0 -2
@@ -1,34 +1,40 @@
1
1
  # Deploy to Canopy on every push to main. GitHub's runners are the build
2
2
  # farm — the platform owns no build infrastructure.
3
3
  #
4
- # Needs a CANOPY_DEPLOY_TOKEN repo secret: create a deploy token in the
5
- # dashboard (project → Settings → Deploy tokens) or with `canopy token
6
- # create`, then add it via `gh secret set CANOPY_DEPLOY_TOKEN` or the repo's
7
- # Settings → Secrets. Until the secret is set, this workflow skips itself
8
- # instead of failing the build.
4
+ # No secret needed: the run proves which repository and branch it comes from
5
+ # with GitHub's own identity token (the id-token permission below), and
6
+ # Canopy deploys it once the project owner has linked this repository:
7
+ #
8
+ # canopy repo link (in this folder: links the origin remote)
9
+ #
10
+ # Until then, every run skips the deploy with a warning instead of failing.
11
+ # The owner can pause CI deploys without editing this file:
12
+ #
13
+ # canopy repo deploys off (and `on` to resume)
14
+ #
15
+ # A staging branch (`canopy repo branches --staging-ref develop`) deploys to
16
+ # the project's staging channel only. Add it to `branches` below, e.g.
17
+ # [main, develop], so pushes to it run this workflow.
9
18
  name: Deploy to Canopy
10
19
 
11
20
  on:
12
21
  push:
13
22
  branches: [main]
14
23
 
24
+ permissions:
25
+ id-token: write
26
+ contents: read
27
+
15
28
  jobs:
16
29
  deploy:
17
30
  runs-on: ubuntu-latest
18
- env:
19
- CANOPY_DEPLOY_TOKEN: ${{ secrets.CANOPY_DEPLOY_TOKEN }}
20
31
  steps:
21
32
  - uses: actions/checkout@v7
22
33
  - uses: actions/setup-node@v7
23
34
  with:
24
35
  node-version: 24
25
36
  - name: Install dependencies
26
- if: env.CANOPY_DEPLOY_TOKEN != ''
27
37
  run: |
28
38
  if [ -f package-lock.json ]; then npm ci; else npm install; fi
29
39
  - name: Deploy
30
- if: env.CANOPY_DEPLOY_TOKEN != ''
31
40
  run: npm exec --yes @mediamonks/canopy-cli deploy
32
- - name: Skipped (no deploy token)
33
- if: env.CANOPY_DEPLOY_TOKEN == ''
34
- run: echo "CANOPY_DEPLOY_TOKEN secret not set — skipping deploy."
@@ -14,4 +14,4 @@ https://{{slug}}.thanarie.dev after the first `canopy deploy`.
14
14
  - `AGENTS.md` — project guardrails and skill setup for coding agents
15
15
 
16
16
  Push-to-main deploys are prepared in `.github/workflows/canopy-deploy.yml`
17
- (needs a `CANOPY_DEPLOY_TOKEN` repo secret — see the workflow file).
17
+ (no secret: link the repository once with `canopy repo link` — see the workflow file).
@@ -1,6 +1,6 @@
1
- import { l as resolveProject, o as projectDirArgs, s as projectFlagArgs } from "./site-0i7wAJqg.mjs";
2
- import { a as apiRequest } from "./api-Bl6SG8Oq.mjs";
3
- import { r as reportErrors, t as formatDateTime } from "./ui-CLnICOne.mjs";
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-26ETk1n8.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  const tokenCommand = defineCommand({
6
6
  meta: {
@@ -23,12 +23,12 @@ const tokenCommand = defineCommand({
23
23
  run: reportErrors("token create", async ({ args }) => {
24
24
  const { slug } = resolveProject(args);
25
25
  const { token, idle_days } = await apiRequest("POST", `/projects/${slug}/deploy-tokens`, { name: args.name });
26
+ console.log("You do not need this for GitHub Actions — link the repository instead (`canopy repo link <owner/name>`) and pushes deploy with no secret.\n");
26
27
  console.log(`Deploy token for ${slug} (shown once — store it now):\n`);
27
28
  console.log(` ${token}\n`);
28
29
  console.log(`It belongs to the project and stops working after ${idle_days} days without a deploy.`);
29
- console.log("Add it to the GitHub repo as secret CANOPY_DEPLOY_TOKEN");
30
- console.log("(gh secret set CANOPY_DEPLOY_TOKEN, or repo Settings → Secrets).");
31
- console.log("Pushes to main then deploy via .github/workflows/canopy-deploy.yml.");
30
+ console.log("For other CI, set it as the CANOPY_DEPLOY_TOKEN environment variable;");
31
+ console.log("`canopy deploy` then deploys as this project with no `canopy login`.");
32
32
  })
33
33
  }),
34
34
  list: defineCommand({
@@ -1,4 +1,4 @@
1
- import { t as ApiError } from "./api-Bl6SG8Oq.mjs";
1
+ import { t as ApiError } from "./api-DmJrIsE7.mjs";
2
2
  import { spawn } from "node:child_process";
3
3
  import { cancel, isCancel } from "@clack/prompts";
4
4
  //#region src/ui.ts
@@ -1,5 +1,5 @@
1
1
  import { t as PACKAGE_NAME } from "./version-check-CcsA1QjI.mjs";
2
- import { r as reportErrors } from "./ui-CLnICOne.mjs";
2
+ import { r as reportErrors } from "./ui-26ETk1n8.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-DRLniv-I.mjs");
115
+ const { skillInstalled } = await import("./skill-vzcCD1b4.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 { l as resolveProject, s as projectFlagArgs } from "./site-0i7wAJqg.mjs";
2
- import { a as apiRequest, f as withContext } from "./api-Bl6SG8Oq.mjs";
3
- import { r as reportErrors } from "./ui-CLnICOne.mjs";
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-26ETk1n8.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.44",
3
+ "version": "0.7.46",
4
4
  "description": "Canopy CLI — create, develop and deploy Canopy projects.",
5
5
  "bin": {
6
6
  "canopy": "./dist/index.mjs"
@@ -1,2 +0,0 @@
1
- import { n as devCommand } from "./dev-Cq98yblV.mjs";
2
- export { devCommand };
@@ -1,2 +0,0 @@
1
- import { a as templateCommand } from "./project-template-Cdr1uwwE.mjs";
2
- export { templateCommand };
@@ -1,2 +0,0 @@
1
- import { a as repoCommand } from "./repo-CwT2RDoW.mjs";
2
- export { repoCommand };