@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.
- package/dist/{ai-00f2Mgqh.mjs → ai-4Mr9FbLU.mjs} +2 -2
- package/dist/{api-fmc8CEMT.mjs → api-CpG-9WSe.mjs} +13 -1
- package/dist/{audience-ByM1jUH3.mjs → audience-BXXdvGC_.mjs} +3 -3
- package/dist/{browse-CxwKuka0.mjs → browse-BegddW9V.mjs} +2 -2
- package/dist/{calls-DsbRjCcy.mjs → calls-NFUccBaQ.mjs} +3 -3
- package/dist/cors-B90J32_O.mjs +129 -0
- package/dist/{db-BU-ni9fj.mjs → db-DIxujtt1.mjs} +13 -6
- package/dist/{deploy-k2DzsLxO.mjs → deploy-Bp5DMp_U.mjs} +4 -4
- package/dist/{dev-qp1VRNM_.mjs → dev-AkM6kLVb.mjs} +9 -9
- package/dist/dev-pj6lLjMR.mjs +2 -0
- package/dist/{dev-worker-7tqL9UFi.mjs → dev-worker-DEK8fOgz.mjs} +18 -1
- package/dist/docs/access-tokens.md +27 -0
- package/dist/docs/cli-cors.md +69 -0
- package/dist/docs/cli-dev.md +1 -1
- package/dist/docs/cli.md +6 -0
- package/dist/docs/data.md +18 -0
- package/dist/docs/index.json +5 -0
- package/dist/docs/migrations.md +22 -0
- package/dist/docs/platform-credentials.md +12 -11
- package/dist/docs/sdk-database.md +51 -0
- package/dist/{docs-ZBBQi3uK.mjs → docs-DH1bWRny.mjs} +4 -4
- package/dist/{egress-Bzn2VKDe.mjs → egress-Dwq-d6cB.mjs} +3 -3
- package/dist/{feedback-B0-6QTSh.mjs → feedback-Q0UhJ6gI.mjs} +4 -4
- package/dist/{files-CBbAtHIK.mjs → files-CUPtGcuZ.mjs} +3 -3
- package/dist/index.mjs +40 -39
- package/dist/{local-C1i2uhAf.mjs → local-CFxKguzg.mjs} +54 -19
- package/dist/{login-Baso-JE0.mjs → login-CP1fO_AH.mjs} +3 -3
- package/dist/{logs-c76jVOhb.mjs → logs-BwqG7lYU.mjs} +3 -3
- package/dist/{mcp-DmcjX8Kn.mjs → mcp-CmfLQ9Vo.mjs} +3 -3
- package/dist/{migrations-ChafLorm.mjs → migrations-DJrRnU7X.mjs} +2 -2
- package/dist/{open-Doat726T.mjs → open-5JLHiz_J.mjs} +2 -2
- package/dist/{package-BzvVsyRl.mjs → package-CJvO8vJf.mjs} +1 -1
- package/dist/{project-template-BnX47DpF.mjs → project-template-CsTOpPto.mjs} +3 -3
- package/dist/project-template-xNjGs9ty.mjs +2 -0
- package/dist/{projects-DOqpkUVT.mjs → projects-DCFn4zcq.mjs} +6 -6
- package/dist/{rename-RA_oYbRT.mjs → rename-OeOI97da.mjs} +3 -3
- package/dist/repo-BW7dDQZL.mjs +2 -0
- package/dist/{repo-DD3eK1P_.mjs → repo-CIEG53hP.mjs} +3 -3
- package/dist/{roles-tqf4sYDM.mjs → roles-2Pkqiwrx.mjs} +1 -1
- package/dist/{roles-BS8-Gvv-.mjs → roles-BCJWHeGq.mjs} +3 -3
- package/dist/{schedule-D8AQ8MVF.mjs → schedule-Cy-7IFy5.mjs} +3 -3
- package/dist/{secrets-Bi7BYCla.mjs → secrets-Cgte8mvq.mjs} +3 -3
- package/dist/{site-BcZ0LOvm.mjs → site-Bz-fEyKS.mjs} +1 -1
- package/dist/skill/canopy/SKILL.md +10 -0
- package/dist/{skill-k3HLr7rK.mjs → skill-CpnX4oLF.mjs} +2 -2
- package/dist/{src-DpjA-a59.mjs → src-Dlg7aeRj.mjs} +250 -23
- package/dist/{staging-BxG3Cffd.mjs → staging-D6-Ojy39.mjs} +3 -3
- package/dist/{token-bHdy_IoX.mjs → token-yAj7pF78.mjs} +3 -3
- package/dist/{ui-9f_lF2Ak.mjs → ui-BUeiY_zZ.mjs} +1 -1
- package/dist/{upgrade-DkjbsYNs.mjs → upgrade-KYHqugVq.mjs} +2 -2
- package/dist/{usage-DFs2TERV.mjs → usage-BXPm04tk.mjs} +3 -3
- package/dist/{versions-Cgw7sB3h.mjs → versions-C204ivt9.mjs} +3 -3
- package/package.json +1 -1
- package/dist/dev-BtacZ4HE.mjs +0 -2
- package/dist/project-template--mESzwea.mjs +0 -2
- package/dist/repo-DayXVvyj.mjs +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
2
|
-
import { r as siteConfig } from "./site-
|
|
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-
|
|
5
|
-
import { i as reportErrors } from "./ui-
|
|
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-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-
|
|
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-
|
|
2
|
-
import { f as resolveProject, g as tryResolveProject, h as tryReadCanopyJson, l as projectDirArgs, r as siteConfig } from "./site-
|
|
3
|
-
import { a as apiRequest, c as credentials, i as apiDownload, o as apiUpload, s as commonHeaders } from "./api-
|
|
4
|
-
import { i as reportErrors, n as formatDateTime } from "./ui-
|
|
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-
|
|
2
|
-
import { a as apiRequest } from "./api-
|
|
3
|
-
import { i as reportErrors } from "./ui-
|
|
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-
|
|
3
|
-
import { i as siteHeaderLine, n as setInvocationProfile } from "./site-
|
|
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-
|
|
55
|
-
whoami: () => import("./login-
|
|
56
|
-
logout: () => import("./login-
|
|
57
|
-
create: () => import("./projects-
|
|
58
|
-
init: () => import("./projects-
|
|
59
|
-
projects: () => import("./projects-
|
|
60
|
-
delete: () => import("./projects-
|
|
61
|
-
rename: () => import("./rename-
|
|
62
|
-
dev: () => import("./dev-
|
|
63
|
-
deploy: () => import("./deploy-
|
|
64
|
-
promote: () => import("./deploy-
|
|
65
|
-
staging: () => import("./staging-
|
|
66
|
-
rollback: () => import("./deploy-
|
|
67
|
-
download: () => import("./deploy-
|
|
68
|
-
versions: () => import("./versions-
|
|
69
|
-
token: () => import("./token-
|
|
70
|
-
egress: () => import("./egress-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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-
|
|
2
|
-
import { r as apiDataRequest } from "./api-
|
|
3
|
-
import { a as rewriteApiPath } from "./dev-
|
|
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: {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
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: {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
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-
|
|
2
|
-
import { n as agentHeaders } from "./api-
|
|
3
|
-
import { i as reportErrors, o as spinner$1, r as openBrowser } from "./ui-
|
|
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-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors } from "./ui-
|
|
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-
|
|
2
|
-
import { d as projectUrl, g as tryResolveProject, m as stagingUrl, r as siteConfig } from "./site-
|
|
3
|
-
import { a as apiRequest, f as noticeRenamesOnly, l as currentSlug, t as ApiError } from "./api-
|
|
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-
|
|
2
|
-
import { r as apiDataRequest } from "./api-
|
|
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-
|
|
2
|
-
import { i as reportErrors, r as openBrowser } from "./ui-
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { f as resolveProject, l as projectDirArgs } from "./site-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-
|
|
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. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as projectUrl, h as tryReadCanopyJson, r as siteConfig } from "./site-
|
|
2
|
-
import { d as HOST_LABEL_SEPARATOR } from "./src-
|
|
3
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
4
|
-
import { a as requireTty, i as reportErrors, o as spinner$1, s as unwrap, t as confirmTypedSlug } from "./ui-
|
|
5
|
-
import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-
|
|
6
|
-
import { a as offerRepoOnCreate, i as githubOrigin, n as cloneProjectRepo } from "./repo-
|
|
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-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-
|
|
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
|
|
@@ -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-
|
|
2
|
-
import { a as apiRequest, f as noticeRenamesOnly, m as withContext, n as agentHeaders, u as followRename } from "./api-
|
|
3
|
-
import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-
|
|
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-
|
|
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-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { a as requireTty, i as reportErrors, s as unwrap } from "./ui-
|
|
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-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors, n as formatDateTime } from "./ui-
|
|
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-
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors, n as formatDateTime, s as unwrap } from "./ui-
|
|
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-
|
|
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-
|
|
2
|
-
import { i as reportErrors } from "./ui-
|
|
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";
|