@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.
- package/dist/{ai-FBHTSCLZ.mjs → ai-CWPQiUft.mjs} +2 -2
- package/dist/{api-Bl6SG8Oq.mjs → api-DmJrIsE7.mjs} +134 -19
- package/dist/{browse-B8-0dweq.mjs → browse-BPLWhoFI.mjs} +2 -2
- package/dist/{db-BJJGydgL.mjs → db-DpCMc0uz.mjs} +4 -4
- package/dist/{deploy-ExrIeX_m.mjs → deploy-BnRQusjJ.mjs} +51 -5
- package/dist/{dev-Cq98yblV.mjs → dev-BmKeIdMi.mjs} +7 -7
- package/dist/dev-BvVlq9np.mjs +2 -0
- package/dist/docs/ci.md +112 -50
- package/dist/docs/cli-create.md +2 -0
- package/dist/docs/cli-deploy.md +1 -1
- package/dist/docs/cli-members.md +18 -11
- package/dist/docs/cli-repo.md +34 -2
- package/dist/docs/cli-token.md +8 -6
- package/dist/docs/cli.md +6 -2
- package/dist/docs/deploy.md +3 -2
- package/dist/docs/index.json +5 -5
- package/dist/docs/platform-deploys-and-rollbacks.md +4 -4
- package/dist/docs/platform-members-and-access.md +28 -9
- package/dist/docs/roles.md +1 -1
- package/dist/{docs-KmN6jD1S.mjs → docs-CtMrMpt1.mjs} +4 -4
- package/dist/{egress-C2amvqmE.mjs → egress-BM4EpLBh.mjs} +3 -3
- package/dist/{feedback-B5-95neo.mjs → feedback-BXhbxyXI.mjs} +5 -5
- package/dist/index.mjs +35 -35
- package/dist/{local-CIkL7tXP.mjs → local-C9Bi9f3y.mjs} +2 -2
- package/dist/{login-CREcZfLH.mjs → login-2MW9sGJO.mjs} +3 -3
- package/dist/{logs-BnrNZvLc.mjs → logs-dZMPTJLu.mjs} +3 -3
- package/dist/{mcp-DZdMNTWr.mjs → mcp-CGmWkGN8.mjs} +3 -3
- package/dist/{migrations-D8NqjC5I.mjs → migrations-BReMlGWP.mjs} +2 -2
- package/dist/{open-Bpz4C2Sr.mjs → open-DcQSdfx5.mjs} +2 -2
- package/dist/{package-Bvly8-rB.mjs → package-BdNHq8QV.mjs} +1 -1
- package/dist/{project-template-Cdr1uwwE.mjs → project-template-BPW_Dgxj.mjs} +3 -3
- package/dist/project-template-Dw11151p.mjs +2 -0
- package/dist/{projects-BRG2HnBs.mjs → projects-CnU3194_.mjs} +26 -8
- package/dist/{rename-BGKa25Rq.mjs → rename-BWvERJgA.mjs} +3 -3
- package/dist/{repo-CwT2RDoW.mjs → repo-6a7gRQaf.mjs} +171 -8
- package/dist/repo-C7AXDtFZ.mjs +2 -0
- package/dist/{roles-BDZaN3vi.mjs → roles-CrYf_8wk.mjs} +1 -1
- package/dist/{roles-UM0Iiws6.mjs → roles-S2D9Id0W.mjs} +71 -13
- package/dist/{schedule-BcqBspn3.mjs → schedule-DvHSSzfR.mjs} +3 -3
- package/dist/{secrets-BjbIi7Gp.mjs → secrets-BIn2RPoe.mjs} +3 -3
- package/dist/{site-0i7wAJqg.mjs → site-BL5Ik-yj.mjs} +50 -1
- package/dist/{skill-DRLniv-I.mjs → skill-vzcCD1b4.mjs} +2 -2
- package/dist/{staging-_2Js0Fkc.mjs → staging-Dn8kH9cK.mjs} +3 -3
- package/dist/templates/spa/.github/workflows/canopy-deploy.yml +18 -12
- package/dist/templates/spa/README.md +1 -1
- package/dist/templates/worker/.github/workflows/canopy-deploy.yml +18 -12
- package/dist/templates/worker/README.md +1 -1
- package/dist/{token-7vSNuz-X.mjs → token-DMCj88A-.mjs} +6 -6
- package/dist/{ui-CLnICOne.mjs → ui-26ETk1n8.mjs} +1 -1
- package/dist/{upgrade-D_yrD7zp.mjs → upgrade-8_pFNTo5.mjs} +2 -2
- package/dist/{usage-DGGmTwjJ.mjs → usage-Bpz5B1N1.mjs} +3 -3
- package/package.json +1 -1
- package/dist/dev-CUJKgaqJ.mjs +0 -2
- package/dist/project-template-715H_lnu.mjs +0 -2
- 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
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
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
|
-
(
|
|
17
|
+
(no secret: link the repository once with `canopy repo link` — see the workflow file).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as apiRequest } from "./api-
|
|
3
|
-
import { r as reportErrors, t as formatDateTime } from "./ui-
|
|
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("
|
|
30
|
-
console.log("
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { t as PACKAGE_NAME } from "./version-check-CcsA1QjI.mjs";
|
|
2
|
-
import { r as reportErrors } from "./ui-
|
|
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-
|
|
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 {
|
|
2
|
-
import { a as apiRequest,
|
|
3
|
-
import { r as reportErrors } from "./ui-
|
|
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
package/dist/dev-CUJKgaqJ.mjs
DELETED
package/dist/repo-DmFs6H9m.mjs
DELETED