@mediamonks/canopy-cli 0.7.58 → 0.7.60

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 (56) hide show
  1. package/dist/{ai-00f2Mgqh.mjs → ai-4Mr9FbLU.mjs} +2 -2
  2. package/dist/{api-fmc8CEMT.mjs → api-CpG-9WSe.mjs} +13 -1
  3. package/dist/{audience-ByM1jUH3.mjs → audience-BXXdvGC_.mjs} +3 -3
  4. package/dist/{browse-CxwKuka0.mjs → browse-BegddW9V.mjs} +2 -2
  5. package/dist/{calls-DsbRjCcy.mjs → calls-NFUccBaQ.mjs} +3 -3
  6. package/dist/cors-B90J32_O.mjs +129 -0
  7. package/dist/{db-BU-ni9fj.mjs → db-DIxujtt1.mjs} +13 -6
  8. package/dist/{deploy-k2DzsLxO.mjs → deploy-Bp5DMp_U.mjs} +4 -4
  9. package/dist/{dev-qp1VRNM_.mjs → dev-AkM6kLVb.mjs} +9 -9
  10. package/dist/dev-pj6lLjMR.mjs +2 -0
  11. package/dist/{dev-worker-7tqL9UFi.mjs → dev-worker-DEK8fOgz.mjs} +18 -1
  12. package/dist/docs/access-tokens.md +27 -0
  13. package/dist/docs/cli-cors.md +69 -0
  14. package/dist/docs/cli-dev.md +1 -1
  15. package/dist/docs/cli.md +6 -0
  16. package/dist/docs/data.md +18 -0
  17. package/dist/docs/index.json +5 -0
  18. package/dist/docs/migrations.md +22 -0
  19. package/dist/docs/platform-credentials.md +12 -11
  20. package/dist/docs/sdk-database.md +51 -0
  21. package/dist/{docs-ZBBQi3uK.mjs → docs-DH1bWRny.mjs} +4 -4
  22. package/dist/{egress-Bzn2VKDe.mjs → egress-Dwq-d6cB.mjs} +3 -3
  23. package/dist/{feedback-B0-6QTSh.mjs → feedback-Q0UhJ6gI.mjs} +4 -4
  24. package/dist/{files-CBbAtHIK.mjs → files-CUPtGcuZ.mjs} +3 -3
  25. package/dist/index.mjs +40 -39
  26. package/dist/{local-C1i2uhAf.mjs → local-CFxKguzg.mjs} +54 -19
  27. package/dist/{login-Baso-JE0.mjs → login-CP1fO_AH.mjs} +3 -3
  28. package/dist/{logs-c76jVOhb.mjs → logs-BwqG7lYU.mjs} +3 -3
  29. package/dist/{mcp-DmcjX8Kn.mjs → mcp-CmfLQ9Vo.mjs} +3 -3
  30. package/dist/{migrations-ChafLorm.mjs → migrations-DJrRnU7X.mjs} +2 -2
  31. package/dist/{open-Doat726T.mjs → open-5JLHiz_J.mjs} +2 -2
  32. package/dist/{package-BzvVsyRl.mjs → package-CJvO8vJf.mjs} +1 -1
  33. package/dist/{project-template-BnX47DpF.mjs → project-template-CsTOpPto.mjs} +3 -3
  34. package/dist/project-template-xNjGs9ty.mjs +2 -0
  35. package/dist/{projects-DOqpkUVT.mjs → projects-DCFn4zcq.mjs} +6 -6
  36. package/dist/{rename-RA_oYbRT.mjs → rename-OeOI97da.mjs} +3 -3
  37. package/dist/repo-BW7dDQZL.mjs +2 -0
  38. package/dist/{repo-DD3eK1P_.mjs → repo-CIEG53hP.mjs} +3 -3
  39. package/dist/{roles-tqf4sYDM.mjs → roles-2Pkqiwrx.mjs} +1 -1
  40. package/dist/{roles-BS8-Gvv-.mjs → roles-BCJWHeGq.mjs} +3 -3
  41. package/dist/{schedule-D8AQ8MVF.mjs → schedule-Cy-7IFy5.mjs} +3 -3
  42. package/dist/{secrets-Bi7BYCla.mjs → secrets-Cgte8mvq.mjs} +3 -3
  43. package/dist/{site-BcZ0LOvm.mjs → site-Bz-fEyKS.mjs} +1 -1
  44. package/dist/skill/canopy/SKILL.md +10 -0
  45. package/dist/{skill-k3HLr7rK.mjs → skill-CpnX4oLF.mjs} +2 -2
  46. package/dist/{src-DpjA-a59.mjs → src-Dlg7aeRj.mjs} +250 -23
  47. package/dist/{staging-BxG3Cffd.mjs → staging-D6-Ojy39.mjs} +3 -3
  48. package/dist/{token-bHdy_IoX.mjs → token-yAj7pF78.mjs} +3 -3
  49. package/dist/{ui-9f_lF2Ak.mjs → ui-BUeiY_zZ.mjs} +1 -1
  50. package/dist/{upgrade-DkjbsYNs.mjs → upgrade-KYHqugVq.mjs} +2 -2
  51. package/dist/{usage-DFs2TERV.mjs → usage-BXPm04tk.mjs} +3 -3
  52. package/dist/{versions-Cgw7sB3h.mjs → versions-C204ivt9.mjs} +3 -3
  53. package/package.json +1 -1
  54. package/dist/dev-BtacZ4HE.mjs +0 -2
  55. package/dist/project-template--mESzwea.mjs +0 -2
  56. package/dist/repo-DayXVvyj.mjs +0 -2
@@ -1,8 +1,8 @@
1
- import { t as version } from "./package-BzvVsyRl.mjs";
2
- import { r as siteConfig } from "./site-BcZ0LOvm.mjs";
1
+ import { t as version } from "./package-CJvO8vJf.mjs";
2
+ import { r as siteConfig } from "./site-Bz-fEyKS.mjs";
3
3
  import { i as latestKnownVersion, r as compareSemver } from "./version-check-CcsA1QjI.mjs";
4
- import { n as agentHeaders } from "./api-fmc8CEMT.mjs";
5
- import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
4
+ import { n as agentHeaders } from "./api-CpG-9WSe.mjs";
5
+ import { i as reportErrors } from "./ui-BUeiY_zZ.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
- import { f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.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";
1
+ import { f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-BUeiY_zZ.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-BzvVsyRl.mjs";
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-fmc8CEMT.mjs";
4
- import { i as reportErrors, n as formatDateTime } from "./ui-9f_lF2Ak.mjs";
1
+ import { t as version } from "./package-CJvO8vJf.mjs";
2
+ import { f as resolveProject, g as tryResolveProject, h as tryReadCanopyJson, l as projectDirArgs, r as siteConfig } from "./site-Bz-fEyKS.mjs";
3
+ import { a as apiRequest, c as credentials, i as apiDownload, o as apiUpload, s as commonHeaders } from "./api-CpG-9WSe.mjs";
4
+ import { i as reportErrors, n as formatDateTime } from "./ui-BUeiY_zZ.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
- import { f as resolveProject, u as projectFlagArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest } from "./api-fmc8CEMT.mjs";
3
- import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
1
+ import { f as resolveProject, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors } from "./ui-BUeiY_zZ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/files.ts
6
6
  /**
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "./package-BzvVsyRl.mjs";
3
- import { i as siteHeaderLine, n as setInvocationProfile } from "./site-BcZ0LOvm.mjs";
2
+ import { t as version } from "./package-CJvO8vJf.mjs";
3
+ import { i as siteHeaderLine, n as setInvocationProfile } from "./site-Bz-fEyKS.mjs";
4
4
  import { a as notifyOfUpdate, o as runRefresh } from "./version-check-CcsA1QjI.mjs";
5
5
  import { defineCommand, runMain } from "citty";
6
6
  //#region src/index.ts
@@ -51,43 +51,44 @@ const main = defineCommand({
51
51
  description: "canopy — create and deploy vibecoded projects"
52
52
  },
53
53
  subCommands: {
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)
54
+ login: () => import("./login-CP1fO_AH.mjs").then((m) => m.loginCommand),
55
+ whoami: () => import("./login-CP1fO_AH.mjs").then((m) => m.whoamiCommand),
56
+ logout: () => import("./login-CP1fO_AH.mjs").then((m) => m.logoutCommand),
57
+ create: () => import("./projects-DCFn4zcq.mjs").then((m) => m.createCommand),
58
+ init: () => import("./projects-DCFn4zcq.mjs").then((m) => m.initCommand),
59
+ projects: () => import("./projects-DCFn4zcq.mjs").then((m) => m.projectsCommand),
60
+ delete: () => import("./projects-DCFn4zcq.mjs").then((m) => m.deleteCommand),
61
+ rename: () => import("./rename-OeOI97da.mjs").then((m) => m.renameCommand),
62
+ dev: () => import("./dev-pj6lLjMR.mjs").then((m) => m.devCommand),
63
+ deploy: () => import("./deploy-Bp5DMp_U.mjs").then((m) => m.deployCommand),
64
+ promote: () => import("./deploy-Bp5DMp_U.mjs").then((m) => m.promoteCommand),
65
+ staging: () => import("./staging-D6-Ojy39.mjs").then((m) => m.stagingCommand),
66
+ rollback: () => import("./deploy-Bp5DMp_U.mjs").then((m) => m.rollbackCommand),
67
+ download: () => import("./deploy-Bp5DMp_U.mjs").then((m) => m.downloadCommand),
68
+ versions: () => import("./versions-C204ivt9.mjs").then((m) => m.versionsCommand),
69
+ token: () => import("./token-yAj7pF78.mjs").then((m) => m.tokenCommand),
70
+ egress: () => import("./egress-Dwq-d6cB.mjs").then((m) => m.egressCommand),
71
+ cors: () => import("./cors-B90J32_O.mjs").then((m) => m.corsCommand),
72
+ calls: () => import("./calls-NFUccBaQ.mjs").then((m) => m.callsCommand),
73
+ secrets: () => import("./secrets-Cgte8mvq.mjs").then((m) => m.secretsCommand),
74
+ roles: () => import("./roles-2Pkqiwrx.mjs").then((m) => m.rolesCommand),
75
+ members: () => import("./roles-2Pkqiwrx.mjs").then((m) => m.membersCommand),
76
+ schedule: () => import("./schedule-Cy-7IFy5.mjs").then((m) => m.scheduleCommand),
77
+ feedback: () => import("./feedback-Q0UhJ6gI.mjs").then((m) => m.feedbackCommand),
78
+ db: () => import("./db-DIxujtt1.mjs").then((m) => m.dbCommand),
79
+ files: () => import("./files-CUPtGcuZ.mjs").then((m) => m.filesCommand),
80
+ usage: () => import("./usage-BXPm04tk.mjs").then((m) => m.usageCommand),
81
+ ai: () => import("./ai-4Mr9FbLU.mjs").then((m) => m.aiCommand),
82
+ open: () => import("./open-5JLHiz_J.mjs").then((m) => m.openCommand),
83
+ browse: () => import("./browse-BegddW9V.mjs").then((m) => m.browseCommand),
84
+ docs: () => import("./docs-DH1bWRny.mjs").then((m) => m.docsCommand),
85
+ skill: () => import("./skill-CpnX4oLF.mjs").then((m) => m.skillCommand),
86
+ upgrade: () => import("./upgrade-KYHqugVq.mjs").then((m) => m.upgradeCommand),
87
+ logs: () => import("./logs-BwqG7lYU.mjs").then((m) => m.logsCommand),
88
+ mcp: () => import("./mcp-CmfLQ9Vo.mjs").then((m) => m.mcpCommand),
89
+ repo: () => import("./repo-BW7dDQZL.mjs").then((m) => m.repoCommand),
90
+ template: () => import("./project-template-xNjGs9ty.mjs").then((m) => m.templateCommand),
91
+ audience: () => import("./audience-BXXdvGC_.mjs").then((m) => m.audienceCommand)
91
92
  }
92
93
  });
93
94
  const quiet = process.argv[2] === "mcp" && process.argv[3] === "serve" || process.argv[2] === "repo" && process.argv[3] === "credential";
@@ -1,6 +1,6 @@
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-fmc8CEMT.mjs";
3
- import { a as rewriteApiPath } from "./dev-qp1VRNM_.mjs";
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-Dlg7aeRj.mjs";
2
+ import { r as apiDataRequest } from "./api-CpG-9WSe.mjs";
3
+ import { a as rewriteApiPath } from "./dev-AkM6kLVb.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";
@@ -818,13 +818,28 @@ async function createPgliteDb(persistDir) {
818
818
  const db = dataDir ? new PGlite(dataDir) : new PGlite();
819
819
  await db.waitReady;
820
820
  return {
821
- store: { query: async (sql, params = []) => {
822
- const result = await db.query(sql, params);
823
- return {
824
- results: result.rows,
825
- meta: { changes: Number(result.affectedRows ?? 0) }
826
- };
827
- } },
821
+ store: {
822
+ query: async (sql, params = []) => {
823
+ const result = await db.query(sql, params);
824
+ return {
825
+ results: result.rows,
826
+ meta: { changes: Number(result.affectedRows ?? 0) }
827
+ };
828
+ },
829
+ batch: (statements) => db.transaction(async (tx) => {
830
+ const out = [];
831
+ for (const [i, s] of statements.entries()) {
832
+ const result = await tx.query(s.sql, s.params).catch((err) => {
833
+ throw new Error(`statement ${i}: ${err instanceof Error ? err.message : String(err)}`);
834
+ });
835
+ out.push({
836
+ results: result.rows,
837
+ meta: { changes: Number(result.affectedRows ?? 0) }
838
+ });
839
+ }
840
+ return out;
841
+ })
842
+ },
828
843
  exec: async (sql) => {
829
844
  await db.exec(sql);
830
845
  },
@@ -849,16 +864,36 @@ async function createSqliteDb(persistDir) {
849
864
  if (persistDir) mkdirSync(persistDir, { recursive: true });
850
865
  const db = new DatabaseSync(persistDir ? join(persistDir, "sqlite.db") : ":memory:");
851
866
  const listTables = (where) => db.prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND ${where}`).all().map((row) => row.name);
867
+ const run = (sql, params) => {
868
+ const bound = params.map((p) => typeof p === "boolean" ? p ? 1 : 0 : p);
869
+ const results = db.prepare(sql).all(...bound);
870
+ const { c } = db.prepare("SELECT changes() AS c").get();
871
+ return {
872
+ results,
873
+ meta: { changes: Number(c) }
874
+ };
875
+ };
852
876
  return {
853
- store: { query: async (sql, params = []) => {
854
- const bound = params.map((p) => typeof p === "boolean" ? p ? 1 : 0 : p);
855
- const results = db.prepare(sql).all(...bound);
856
- const { c } = db.prepare("SELECT changes() AS c").get();
857
- return {
858
- results,
859
- meta: { changes: Number(c) }
860
- };
861
- } },
877
+ store: {
878
+ query: async (sql, params = []) => run(sql, params),
879
+ batch: async (statements) => {
880
+ db.exec("BEGIN");
881
+ try {
882
+ const out = statements.map((s, i) => {
883
+ try {
884
+ return run(s.sql, s.params);
885
+ } catch (err) {
886
+ throw new Error(`statement ${i}: ${err instanceof Error ? err.message : String(err)}`);
887
+ }
888
+ });
889
+ db.exec("COMMIT");
890
+ return out;
891
+ } catch (err) {
892
+ db.exec("ROLLBACK");
893
+ throw err;
894
+ }
895
+ }
896
+ },
862
897
  exec: async (sql) => {
863
898
  db.exec(sql);
864
899
  },
@@ -1,6 +1,6 @@
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-fmc8CEMT.mjs";
3
- import { i as reportErrors, o as spinner$1, r as openBrowser } from "./ui-9f_lF2Ak.mjs";
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-Bz-fEyKS.mjs";
2
+ import { n as agentHeaders } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors, o as spinner$1, r as openBrowser } from "./ui-BUeiY_zZ.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
- import { f as resolveProject, u as projectFlagArgs } from "./site-BcZ0LOvm.mjs";
2
- import { a as apiRequest, m as withContext } from "./api-fmc8CEMT.mjs";
3
- import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
1
+ import { f as resolveProject, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors } from "./ui-BUeiY_zZ.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-BzvVsyRl.mjs";
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-fmc8CEMT.mjs";
1
+ import { t as version } from "./package-CJvO8vJf.mjs";
2
+ import { d as projectUrl, g as tryResolveProject, m as stagingUrl, r as siteConfig } from "./site-Bz-fEyKS.mjs";
3
+ import { a as apiRequest, f as noticeRenamesOnly, l as currentSlug, t as ApiError } from "./api-CpG-9WSe.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
- import { h as tryReadCanopyJson } from "./site-BcZ0LOvm.mjs";
2
- import { r as apiDataRequest } from "./api-fmc8CEMT.mjs";
1
+ import { h as tryReadCanopyJson } from "./site-Bz-fEyKS.mjs";
2
+ import { r as apiDataRequest } from "./api-CpG-9WSe.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
- 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-9f_lF2Ak.mjs";
1
+ import { d as projectUrl, f as resolveProject, l as projectDirArgs, m as stagingUrl } from "./site-Bz-fEyKS.mjs";
2
+ import { i as reportErrors, r as openBrowser } from "./ui-BUeiY_zZ.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.58";
2
+ var version = "0.7.60";
3
3
  //#endregion
4
4
  export { version as t };
@@ -1,6 +1,6 @@
1
- import { f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.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";
1
+ import { f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-BUeiY_zZ.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. */
@@ -0,0 +1,2 @@
1
+ import { a as templateCommand } from "./project-template-CsTOpPto.mjs";
2
+ export { templateCommand };
@@ -1,9 +1,9 @@
1
- import { d as projectUrl, h as tryReadCanopyJson, r as siteConfig } from "./site-BcZ0LOvm.mjs";
2
- import { d as HOST_LABEL_SEPARATOR } from "./src-DpjA-a59.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";
1
+ import { d as projectUrl, h as tryReadCanopyJson, r as siteConfig } from "./site-Bz-fEyKS.mjs";
2
+ import { d as HOST_LABEL_SEPARATOR } from "./src-Dlg7aeRj.mjs";
3
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
4
+ import { a as requireTty, i as reportErrors, o as spinner$1, s as unwrap, t as confirmTypedSlug } from "./ui-BUeiY_zZ.mjs";
5
+ import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-CsTOpPto.mjs";
6
+ import { a as offerRepoOnCreate, i as githubOrigin, n as cloneProjectRepo } from "./repo-CIEG53hP.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
- 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-fmc8CEMT.mjs";
3
- import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-9f_lF2Ak.mjs";
1
+ import { d as projectUrl, f as resolveProject, l as projectDirArgs, p as rewriteCanopyJsonSlug } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-BUeiY_zZ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/rename.ts
@@ -0,0 +1,2 @@
1
+ import { o as repoCommand } from "./repo-CIEG53hP.mjs";
2
+ export { repoCommand };
@@ -1,6 +1,6 @@
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-fmc8CEMT.mjs";
3
- import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-9f_lF2Ak.mjs";
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-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, f as noticeRenamesOnly, m as withContext, n as agentHeaders, u as followRename } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-BUeiY_zZ.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";
@@ -1,2 +1,2 @@
1
- import { c as rolesCommand, o as membersCommand } from "./roles-BS8-Gvv-.mjs";
1
+ import { c as rolesCommand, o as membersCommand } from "./roles-BCJWHeGq.mjs";
2
2
  export { membersCommand, rolesCommand };
@@ -1,6 +1,6 @@
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-fmc8CEMT.mjs";
3
- import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-9f_lF2Ak.mjs";
1
+ import { d as projectUrl, f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-BUeiY_zZ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/roles.ts
@@ -1,6 +1,6 @@
1
- import { f as resolveProject, u as projectFlagArgs } from "./site-BcZ0LOvm.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";
1
+ import { f as resolveProject, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors, n as formatDateTime } from "./ui-BUeiY_zZ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/schedule.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { f as resolveProject, l as projectDirArgs } from "./site-BcZ0LOvm.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";
1
+ import { f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
2
+ import { a as apiRequest, m as withContext } from "./api-CpG-9WSe.mjs";
3
+ import { i as reportErrors, n as formatDateTime, s as unwrap } from "./ui-BUeiY_zZ.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  import * as p from "@clack/prompts";
6
6
  //#region src/secrets.ts
@@ -1,4 +1,4 @@
1
- import { f as STAGING_LABEL_PREFIX } from "./src-DpjA-a59.mjs";
1
+ import { f as STAGING_LABEL_PREFIX } from "./src-Dlg7aeRj.mjs";
2
2
  import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join, resolve } from "node:path";
@@ -128,6 +128,16 @@ create | list | revoke`). Software that **calls the project's `/api`** — a
128
128
  `env.CALLER.token` and checks the project's scopes with `requireScope`; give
129
129
  every `switch (env.CALLER.kind)` a refusing `default`. Never put any token in
130
130
  the repository.
131
+ - **A web app on another address calling `/api`** (Figma Make, a page on
132
+ another host) with an access token, and the browser says "blocked by CORS
133
+ policy": run `canopy cors list`, then `canopy cors allow <the app's origin>`
134
+ (e.g. `https://app.example.com`, or `"https://*.figma.site"`). Reproduce the
135
+ preflight with `curl -X OPTIONS -H "Origin: …" -H "Access-Control-Request-Method: GET"`
136
+ to read the reason (`cors_origin_not_allowed`). Only the owner can change
137
+ the list, and it needs access tokens on. Don't add CORS handling to the
138
+ worker: the platform answers preflights. Tell the user that a token in a
139
+ page can be read by anyone who loads it, so use a GET-only project key with
140
+ a path prefix (`canopy docs cli/cors`).
131
141
  - Git: `canopy repo show --json` (is there a repository, and its remote) ·
132
142
  `canopy repo create` · `canopy repo clone <slug>` · `canopy repo connect`
133
143
  (set up an existing folder). Then plain `git`: the CLI gives git
@@ -1,5 +1,5 @@
1
- import { t as version } from "./package-BzvVsyRl.mjs";
2
- import { i as reportErrors } from "./ui-9f_lF2Ak.mjs";
1
+ import { t as version } from "./package-CJvO8vJf.mjs";
2
+ import { i as reportErrors } from "./ui-BUeiY_zZ.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";