@mediamonks/canopy-cli 0.7.60 → 0.7.62
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-4Mr9FbLU.mjs → ai-CGYbKeZq.mjs} +2 -2
- package/dist/{api-CpG-9WSe.mjs → api-C2cvuMD1.mjs} +6 -5
- package/dist/{audience-BXXdvGC_.mjs → audience-BspIO-MA.mjs} +2 -2
- package/dist/{browse-BegddW9V.mjs → browse-CAidI-BT.mjs} +1 -1
- package/dist/{calls-NFUccBaQ.mjs → calls-CSO-qNB2.mjs} +2 -2
- package/dist/{cors-B90J32_O.mjs → cors-Csvzy1Oo.mjs} +2 -2
- package/dist/{db-DIxujtt1.mjs → db-BKo39uJt.mjs} +3 -3
- package/dist/{deploy-Bp5DMp_U.mjs → deploy-D57a-99C.mjs} +15 -4
- package/dist/dev-CiMcqGqA.mjs +2 -0
- package/dist/{dev-AkM6kLVb.mjs → dev-CtjY0gJX.mjs} +6 -6
- package/dist/docs/cli-deploy.md +1 -1
- package/dist/docs/cli-preview.md +55 -0
- package/dist/docs/cli.md +4 -0
- package/dist/docs/index.json +10 -0
- package/dist/docs/platform-link-previews.md +53 -0
- package/dist/docs/platform-members-and-access.md +3 -0
- package/dist/{docs-DH1bWRny.mjs → docs-D1SWYMZ-.mjs} +3 -3
- package/dist/{egress-Dwq-d6cB.mjs → egress-bVy6U5ho.mjs} +2 -2
- package/dist/{feedback-Q0UhJ6gI.mjs → feedback-w28FscrZ.mjs} +3 -3
- package/dist/{files-CUPtGcuZ.mjs → files-DVFs1rmn.mjs} +2 -2
- package/dist/index.mjs +40 -39
- package/dist/{local-CFxKguzg.mjs → local-BZWFMNJI.mjs} +2 -2
- package/dist/login-DAHC8CD3.mjs +355 -0
- package/dist/{logs-BwqG7lYU.mjs → logs-DTXFm5DB.mjs} +2 -2
- package/dist/{mcp-CmfLQ9Vo.mjs → mcp-LQyQtnsW.mjs} +2 -2
- package/dist/{migrations-DJrRnU7X.mjs → migrations-Bmid64rT.mjs} +1 -1
- package/dist/{open-5JLHiz_J.mjs → open-B2fimu3z.mjs} +1 -1
- package/dist/{package-CJvO8vJf.mjs → package-Cc9gi9C-.mjs} +1 -1
- package/dist/preview-BRehGrPg.mjs +134 -0
- package/dist/{project-template-CsTOpPto.mjs → project-template-BGMJlxXz.mjs} +2 -2
- package/dist/project-template-Ckh8JDkS.mjs +2 -0
- package/dist/{projects-DCFn4zcq.mjs → projects-B3ycJGaX.mjs} +4 -4
- package/dist/{rename-OeOI97da.mjs → rename-BY2_4F4b.mjs} +2 -2
- package/dist/{repo-CIEG53hP.mjs → repo-DW3fAOnG.mjs} +2 -2
- package/dist/repo-xl6Rb6BC.mjs +2 -0
- package/dist/{roles-BCJWHeGq.mjs → roles-IYzhMOb4.mjs} +2 -2
- package/dist/{roles-2Pkqiwrx.mjs → roles-wEgE5ICf.mjs} +1 -1
- package/dist/{schedule-Cy-7IFy5.mjs → schedule-D6tTBal3.mjs} +2 -2
- package/dist/{secrets-Cgte8mvq.mjs → secrets-CBVVCn6s.mjs} +2 -2
- package/dist/{skill-CpnX4oLF.mjs → skill-BUWRlQd3.mjs} +2 -2
- package/dist/{staging-D6-Ojy39.mjs → staging-CSv8OWNT.mjs} +2 -2
- package/dist/{token-yAj7pF78.mjs → token-DakMHZEr.mjs} +2 -2
- package/dist/{ui-BUeiY_zZ.mjs → ui-CVzXhfWN.mjs} +1 -1
- package/dist/{upgrade-KYHqugVq.mjs → upgrade-B-ELQVun.mjs} +2 -2
- package/dist/{usage-BXPm04tk.mjs → usage-DcDBqrLf.mjs} +2 -2
- package/dist/{versions-C204ivt9.mjs → versions-DKVNY2Zo.mjs} +2 -2
- package/package.json +1 -1
- package/dist/dev-pj6lLjMR.mjs +0 -2
- package/dist/login-CP1fO_AH.mjs +0 -355
- package/dist/project-template-xNjGs9ty.mjs +0 -2
- package/dist/repo-BW7dDQZL.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
2
|
-
import { i as reportErrors } from "./ui-
|
|
1
|
+
import { a as apiRequest, m as withContext } from "./api-C2cvuMD1.mjs";
|
|
2
|
+
import { i as reportErrors } from "./ui-CVzXhfWN.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/ai.ts
|
|
5
5
|
/**
|
|
@@ -542,13 +542,14 @@ async function apiRequest(method, path, body, opts = {}) {
|
|
|
542
542
|
return await response.json();
|
|
543
543
|
}
|
|
544
544
|
/**
|
|
545
|
-
* Authenticated
|
|
546
|
-
* the bytes itself, so `contentType` is a hint, not
|
|
545
|
+
* Authenticated upload of raw bytes (a screenshot attachment, a link-preview
|
|
546
|
+
* image). The server types the bytes itself, so `contentType` is a hint, not
|
|
547
|
+
* a claim it trusts.
|
|
547
548
|
*/
|
|
548
|
-
async function apiUpload(path, bytes, contentType) {
|
|
549
|
+
async function apiUpload(path, bytes, contentType, method = "POST") {
|
|
549
550
|
const { apiUrl, token, kind } = await credentials();
|
|
550
551
|
const response = await fetch(`${apiUrl}/control/v1${path}`, {
|
|
551
|
-
method
|
|
552
|
+
method,
|
|
552
553
|
headers: {
|
|
553
554
|
...commonHeaders(),
|
|
554
555
|
authorization: `Bearer ${token}`,
|
|
@@ -557,7 +558,7 @@ async function apiUpload(path, bytes, contentType) {
|
|
|
557
558
|
body: bytes
|
|
558
559
|
});
|
|
559
560
|
followRename(response, slugInPath(path));
|
|
560
|
-
if (!response.ok) return fail(response, kind,
|
|
561
|
+
if (!response.ok) return fail(response, kind, method, path);
|
|
561
562
|
return await response.json();
|
|
562
563
|
}
|
|
563
564
|
/** Authenticated GET returning raw bytes (e.g. a deploy zip). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as resolveProject, l as projectDirArgs, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors } from "./ui-
|
|
2
|
+
import { a as apiRequest, m as withContext } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { i as reportErrors } from "./ui-CVzXhfWN.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import * as p from "@clack/prompts";
|
|
6
6
|
//#region src/audience.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as tryResolveProject, r as siteConfig } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest, t as ApiError } from "./api-
|
|
2
|
+
import { a as apiRequest, t as ApiError } from "./api-C2cvuMD1.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/browse.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors, n as formatDateTime } from "./ui-
|
|
2
|
+
import { a as apiRequest, m as withContext } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { i as reportErrors, n as formatDateTime } from "./ui-CVzXhfWN.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/calls.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest, m as withContext } from "./api-
|
|
3
|
-
import { i as reportErrors } from "./ui-
|
|
2
|
+
import { a as apiRequest, m as withContext } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { i as reportErrors } from "./ui-CVzXhfWN.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/cors.ts
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as resolveProject, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest, m as withContext, r as apiDataRequest } from "./api-
|
|
3
|
-
import { a as requireTty, i as reportErrors, o as spinner$1, s as unwrap, t as confirmTypedSlug } from "./ui-
|
|
4
|
-
import { n as migrateProject, r as readMigrationFiles, t as describeMigrateResult } from "./migrations-
|
|
2
|
+
import { a as apiRequest, m as withContext, r as apiDataRequest } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { a as requireTty, i as reportErrors, o as spinner$1, s as unwrap, t as confirmTypedSlug } from "./ui-CVzXhfWN.mjs";
|
|
4
|
+
import { n as migrateProject, r as readMigrationFiles, t as describeMigrateResult } from "./migrations-Bmid64rT.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import * as p from "@clack/prompts";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as projectUrl, f as resolveProject, h as tryReadCanopyJson, l as projectDirArgs, m as stagingUrl, r as siteConfig, s as parseVersionArg, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest, d as githubActionsCredentials, i as apiDownload, l as currentSlug, m as withContext, p as onGithubActions, r as apiDataRequest, t as ApiError } from "./api-
|
|
3
|
-
import { i as reportErrors, n as formatDateTime, o as spinner$1, s as unwrap } from "./ui-
|
|
4
|
-
import { n as migrateProject, r as readMigrationFiles, t as describeMigrateResult } from "./migrations-
|
|
2
|
+
import { a as apiRequest, d as githubActionsCredentials, i as apiDownload, l as currentSlug, m as withContext, p as onGithubActions, r as apiDataRequest, t as ApiError } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { i as reportErrors, n as formatDateTime, o as spinner$1, s as unwrap } from "./ui-CVzXhfWN.mjs";
|
|
4
|
+
import { n as migrateProject, r as readMigrationFiles, t as describeMigrateResult } from "./migrations-Bmid64rT.mjs";
|
|
5
5
|
import { builtinModules } from "node:module";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import { mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -165,6 +165,8 @@ const MEDIA_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
165
165
|
"json",
|
|
166
166
|
"csv",
|
|
167
167
|
"txt",
|
|
168
|
+
"vtt",
|
|
169
|
+
"srt",
|
|
168
170
|
"png",
|
|
169
171
|
"jpg",
|
|
170
172
|
"jpeg",
|
|
@@ -174,14 +176,23 @@ const MEDIA_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
174
176
|
"ico",
|
|
175
177
|
"mp4",
|
|
176
178
|
"webm",
|
|
179
|
+
"m4v",
|
|
180
|
+
"mov",
|
|
181
|
+
"ogv",
|
|
177
182
|
"mp3",
|
|
178
183
|
"wav",
|
|
179
184
|
"ogg",
|
|
180
185
|
"m4a",
|
|
186
|
+
"aac",
|
|
187
|
+
"flac",
|
|
188
|
+
"opus",
|
|
181
189
|
"woff",
|
|
182
190
|
"woff2",
|
|
191
|
+
"ttf",
|
|
192
|
+
"otf",
|
|
183
193
|
"glb",
|
|
184
194
|
"gltf",
|
|
195
|
+
"usdz",
|
|
185
196
|
"bin"
|
|
186
197
|
]);
|
|
187
198
|
function isMediaFile(path) {
|
|
@@ -520,7 +531,7 @@ const deployCommand = defineCommand({
|
|
|
520
531
|
for (const folder of mediaFolders) if (!media.some((f) => f.path.startsWith(folder))) p.log.warn(`canopy.json "media": ${folder} is not in the build output; nothing to upload from it.`);
|
|
521
532
|
const notMedia = media.filter((f) => !isMediaFile(f.path)).map((f) => f.path);
|
|
522
533
|
if (notMedia.length > 0) throw new Error([
|
|
523
|
-
"Site media holds data and media files only (JSON, CSV, text, images, video, audio, fonts, 3D models). These can't be media:",
|
|
534
|
+
"Site media holds data and media files only (JSON, CSV, text, captions, images, video, audio, fonts, 3D models). These can't be media:",
|
|
524
535
|
...notMedia.slice(0, 20).map((path) => ` ${path}`),
|
|
525
536
|
...notMedia.length > 20 ? [` … and ${notMedia.length - 20} more`] : [],
|
|
526
537
|
"Move them out of the media folders, or take the folder out of canopy.json \"media\"."
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as projectDialect, f as resolveProject, h as tryReadCanopyJson, l as projectDirArgs, r as siteConfig } from "./site-Bz-fEyKS.mjs";
|
|
2
2
|
import { r as stampWorkerHeaders, t as WORKER_ATTEST_HEADER } from "./src-Dlg7aeRj.mjs";
|
|
3
|
-
import { a as apiRequest, m as withContext, t as ApiError } from "./api-
|
|
4
|
-
import { i as reportErrors, n as formatDateTime } from "./ui-
|
|
5
|
-
import { r as readMigrationFiles } from "./migrations-
|
|
6
|
-
import { s as parseAppRoleFlag } from "./roles-
|
|
3
|
+
import { a as apiRequest, m as withContext, t as ApiError } from "./api-C2cvuMD1.mjs";
|
|
4
|
+
import { i as reportErrors, n as formatDateTime } from "./ui-CVzXhfWN.mjs";
|
|
5
|
+
import { r as readMigrationFiles } from "./migrations-Bmid64rT.mjs";
|
|
6
|
+
import { s as parseAppRoleFlag } from "./roles-IYzhMOb4.mjs";
|
|
7
7
|
import { n as writeDevServerRecord } from "./dev-server-file-Dk9pk4AR.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { defineCommand } from "citty";
|
|
@@ -326,7 +326,7 @@ async function devRemote(flags, slug) {
|
|
|
326
326
|
async function devLocal(flags, slug) {
|
|
327
327
|
let dump;
|
|
328
328
|
if (flags.pull) {
|
|
329
|
-
const { fetchProjectDump } = await import("./local-
|
|
329
|
+
const { fetchProjectDump } = await import("./local-BZWFMNJI.mjs");
|
|
330
330
|
console.log(`Pulling a fresh export of ${slug}${flags.staging ? " [staging]" : ""}…`);
|
|
331
331
|
dump = await fetchProjectDump(slug, flags.staging ? "staging" : "live");
|
|
332
332
|
}
|
|
@@ -343,7 +343,7 @@ async function devLocal(flags, slug) {
|
|
|
343
343
|
}
|
|
344
344
|
const workerAttest = randomBytes(24).toString("base64url");
|
|
345
345
|
const devRoles = await resolveDevRoles(slug, flags.asRoles);
|
|
346
|
-
const { createSandbox } = await import("./local-
|
|
346
|
+
const { createSandbox } = await import("./local-BZWFMNJI.mjs");
|
|
347
347
|
const sandbox = await createSandbox({
|
|
348
348
|
slug,
|
|
349
349
|
persistDir: join(flags.dir, ".canopy", "local"),
|
package/dist/docs/cli-deploy.md
CHANGED
|
@@ -46,7 +46,7 @@ A folder of large data or media that rarely changes, such as Storybook mock data
|
|
|
46
46
|
}
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
The folders are paths inside the build output. Their files keep their URLs (`/mocks/users.json`), and don't count toward the deploy limit. They may hold data and media only: JSON, CSV, text, images, video, audio, fonts and 3D models. A folder with HTML, JavaScript, CSS or
|
|
49
|
+
The folders are paths inside the build output. Their files keep their URLs (`/mocks/users.json`), and don't count toward the deploy limit. They may hold data and media only: JSON, CSV, text, captions, images, video, audio, fonts and 3D models. A folder with HTML, JavaScript, CSS, SVG or PDF in it is refused before anything uploads. **Media is not versioned:** a rollback or a pinned version serves the current files, and it is shared with the staging channel.
|
|
50
50
|
|
|
51
51
|
The CLI suggests folders for you. When the version reaches 30% of the deploy limit, the deploy ends with a hint naming the folders that could move and the exact `"media"` line to add. When it is over the limit, the refusal names the folders that would bring it under. The CLI never edits `canopy.json` itself. See [Site media](https://docs.canopy.website/guides/static-serving#site-media) for limits and details.
|
|
52
52
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: canopy preview
|
|
3
|
+
description: Choose what a shared link to your project shows, and set its icon.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`canopy preview` controls the card a link to your project gets when someone
|
|
7
|
+
shares it in Slack, Teams or email. The project itself stays behind sign-in.
|
|
8
|
+
It also sets the project's icon, which the dashboard shows as its mark. Read
|
|
9
|
+
[Link previews](https://docs.canopy.website/platform/link-previews).
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
canopy preview show
|
|
15
|
+
canopy preview on
|
|
16
|
+
canopy preview off
|
|
17
|
+
canopy preview image <file>
|
|
18
|
+
canopy preview image --remove
|
|
19
|
+
canopy preview icon <file>
|
|
20
|
+
canopy preview icon --remove
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Arguments & flags
|
|
24
|
+
|
|
25
|
+
Each subcommand works on the project in the current folder (`canopy.json`),
|
|
26
|
+
or the one you name with `--project <slug>`. All of them honour the global
|
|
27
|
+
`--profile <site>` / `CANOPY_PROFILE`. Owners, managers and editors can change
|
|
28
|
+
them.
|
|
29
|
+
|
|
30
|
+
- `show`: whether link preview is on, and the preview image and icon.
|
|
31
|
+
- `on`: shared links show the project's name, description, preview image and
|
|
32
|
+
icon. Anyone with a link can see those without signing in.
|
|
33
|
+
- `off`: shared links only show `<slug> · Sign in · Canopy`. This is the
|
|
34
|
+
default.
|
|
35
|
+
- `image <file>`: the large picture in the card. PNG, JPEG or WebP, up to
|
|
36
|
+
1 MB; 1200 × 630 works everywhere. `--remove` takes it away.
|
|
37
|
+
- `icon <file>`: a square logo for the browser tab and the dashboard. PNG,
|
|
38
|
+
WebP, ICO or SVG, up to 256 KB. An SVG with scripts, event handlers,
|
|
39
|
+
embedded HTML or links to other files is refused. `--remove` takes it away.
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
canopy preview icon logo.svg
|
|
45
|
+
canopy preview image card.png
|
|
46
|
+
canopy preview on
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Sets an icon and a preview image, then turns the preview on.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
canopy preview off --project retro-board
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Stops showing `retro-board`'s name and pictures in shared links.
|
package/dist/docs/cli.md
CHANGED
|
@@ -29,6 +29,10 @@ has a full page per command.
|
|
|
29
29
|
- `canopy projects` — list your projects. `--all` includes ones you can't edit.
|
|
30
30
|
- `canopy delete [slug]` — full teardown of a project. `--yes` skips the
|
|
31
31
|
type-the-slug confirmation.
|
|
32
|
+
- `canopy preview show|on|off` — what a shared link to the project shows
|
|
33
|
+
([reference](https://docs.canopy.website/cli/preview)). `canopy preview image <file>` and
|
|
34
|
+
`canopy preview icon <file>` set the card's picture and the project icon;
|
|
35
|
+
`--remove` takes either away.
|
|
32
36
|
|
|
33
37
|
## Develop
|
|
34
38
|
|
package/dist/docs/index.json
CHANGED
|
@@ -179,6 +179,11 @@
|
|
|
179
179
|
"title": "Members & access",
|
|
180
180
|
"summary": "Everything on Canopy sits behind Monks sign-in. Editors manage a project, managers also run its members list, viewers open it, and your app can hand out its own roles on top."
|
|
181
181
|
},
|
|
182
|
+
{
|
|
183
|
+
"slug": "platform-link-previews",
|
|
184
|
+
"title": "Link previews",
|
|
185
|
+
"summary": "What a link to your project shows when it's shared in Slack, Teams or email, and the project icon."
|
|
186
|
+
},
|
|
182
187
|
{
|
|
183
188
|
"slug": "platform-credentials",
|
|
184
189
|
"title": "Which credential do I need?",
|
|
@@ -271,6 +276,11 @@
|
|
|
271
276
|
"title": "canopy audience",
|
|
272
277
|
"summary": "Say who a project is for and whether it's still a draft."
|
|
273
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"slug": "cli-preview",
|
|
281
|
+
"title": "canopy preview",
|
|
282
|
+
"summary": "Choose what a shared link to your project shows, and set its icon."
|
|
283
|
+
},
|
|
274
284
|
{
|
|
275
285
|
"slug": "cli-dev",
|
|
276
286
|
"title": "canopy dev",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Link previews
|
|
3
|
+
description: What a link to your project shows when it's shared in Slack, Teams or email, and the project icon.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
When you paste a link into Slack, Teams or an email, the app fetches the page
|
|
7
|
+
to build a little card. Canopy projects sit behind sign-in, so by default that
|
|
8
|
+
card can only show the sign-in page. Link previews let your project show its
|
|
9
|
+
own card instead, while the project itself stays behind sign-in.
|
|
10
|
+
|
|
11
|
+
## What shared links show
|
|
12
|
+
|
|
13
|
+
- **Link preview off** (the default): the card reads
|
|
14
|
+
`<slug> · Sign in · Canopy`. The slug is already in the link, so nothing new
|
|
15
|
+
is given away.
|
|
16
|
+
- **Link preview on**: the card shows the project's name and description, its
|
|
17
|
+
preview image and its icon.
|
|
18
|
+
|
|
19
|
+
The name and description are the ones under **Settings → General**, the same
|
|
20
|
+
ones the dashboard's project list shows. Without a description, the card shows
|
|
21
|
+
only the name.
|
|
22
|
+
|
|
23
|
+
## Turning it on
|
|
24
|
+
|
|
25
|
+
Open **Settings → Link preview**. Owners, managers and editors can:
|
|
26
|
+
|
|
27
|
+
- switch **Show this project's preview in shared links** on or off,
|
|
28
|
+
- upload or remove the **preview image**: PNG, JPEG or WebP, up to 1 MB.
|
|
29
|
+
1200 × 630 works everywhere,
|
|
30
|
+
- upload or remove the **icon**: PNG, WebP, ICO or SVG, up to 256 KB. Use a
|
|
31
|
+
square logo, 256 × 256 or larger.
|
|
32
|
+
|
|
33
|
+
The section shows a sample of the card as you go. From the CLI, use
|
|
34
|
+
[`canopy preview`](https://docs.canopy.website/cli/preview).
|
|
35
|
+
|
|
36
|
+
While the preview is on, anyone who has a link can see the project's name,
|
|
37
|
+
description, preview image and icon without signing in. Nothing else in the
|
|
38
|
+
project becomes visible. Leave it off when any of those should stay private,
|
|
39
|
+
for example a client's name on a members-only project.
|
|
40
|
+
|
|
41
|
+
Chat apps keep a card for a while after they first fetch it. After a change,
|
|
42
|
+
share the link again or add something like `?v=2` to see the new card.
|
|
43
|
+
|
|
44
|
+
## The project icon
|
|
45
|
+
|
|
46
|
+
The icon is also the project's mark on the dashboard: on the project list, on
|
|
47
|
+
the platform's own project cards and next to the project's name on its page.
|
|
48
|
+
That works whether link preview is on or off. Projects without an icon keep
|
|
49
|
+
their coloured initials.
|
|
50
|
+
|
|
51
|
+
SVG icons must be plain pictures. An SVG with scripts, event handlers,
|
|
52
|
+
embedded HTML or links to other files is refused; exporting it again from a
|
|
53
|
+
design tool usually fixes that.
|
|
@@ -143,6 +143,9 @@ Both are labels only. They never change who can open the project; that's
|
|
|
143
143
|
what members-only and the client password are for. From the CLI, use
|
|
144
144
|
[`canopy audience`](https://docs.canopy.website/cli/audience).
|
|
145
145
|
|
|
146
|
+
To choose what a shared link to the project shows, and to give it an icon,
|
|
147
|
+
read [Link previews](https://docs.canopy.website/platform/link-previews).
|
|
148
|
+
|
|
146
149
|
## Access tokens
|
|
147
150
|
|
|
148
151
|
Software that isn't a browser, like a design-tool plugin or a CI job, can call
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-Cc9gi9C-.mjs";
|
|
2
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-C2cvuMD1.mjs";
|
|
5
|
+
import { i as reportErrors } from "./ui-CVzXhfWN.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
1
|
import { f as resolveProject, l as projectDirArgs } from "./site-Bz-fEyKS.mjs";
|
|
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-
|
|
2
|
+
import { a as apiRequest, m as withContext } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { i as reportErrors, n as formatDateTime, s as unwrap, t as confirmTypedSlug } from "./ui-CVzXhfWN.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-
|
|
1
|
+
import { t as version } from "./package-Cc9gi9C-.mjs";
|
|
2
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-
|
|
4
|
-
import { i as reportErrors, n as formatDateTime } from "./ui-
|
|
3
|
+
import { a as apiRequest, c as credentials, i as apiDownload, o as apiUpload, s as commonHeaders } from "./api-C2cvuMD1.mjs";
|
|
4
|
+
import { i as reportErrors, n as formatDateTime } from "./ui-CVzXhfWN.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
1
|
import { f as resolveProject, u as projectFlagArgs } from "./site-Bz-fEyKS.mjs";
|
|
2
|
-
import { a as apiRequest } from "./api-
|
|
3
|
-
import { i as reportErrors } from "./ui-
|
|
2
|
+
import { a as apiRequest } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { i as reportErrors } from "./ui-CVzXhfWN.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/files.ts
|
|
6
6
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-Cc9gi9C-.mjs";
|
|
3
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";
|
|
@@ -51,44 +51,45 @@ 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
|
-
cors: () => import("./cors-
|
|
72
|
-
calls: () => import("./calls-
|
|
73
|
-
secrets: () => import("./secrets-
|
|
74
|
-
roles: () => import("./roles-
|
|
75
|
-
members: () => import("./roles-
|
|
76
|
-
schedule: () => import("./schedule-
|
|
77
|
-
feedback: () => import("./feedback-
|
|
78
|
-
db: () => import("./db-
|
|
79
|
-
files: () => import("./files-
|
|
80
|
-
usage: () => import("./usage-
|
|
81
|
-
ai: () => import("./ai-
|
|
82
|
-
open: () => import("./open-
|
|
83
|
-
browse: () => import("./browse-
|
|
84
|
-
docs: () => import("./docs-
|
|
85
|
-
skill: () => import("./skill-
|
|
86
|
-
upgrade: () => import("./upgrade-
|
|
87
|
-
logs: () => import("./logs-
|
|
88
|
-
mcp: () => import("./mcp-
|
|
89
|
-
repo: () => import("./repo-
|
|
90
|
-
template: () => import("./project-template-
|
|
91
|
-
audience: () => import("./audience-
|
|
54
|
+
login: () => import("./login-DAHC8CD3.mjs").then((m) => m.loginCommand),
|
|
55
|
+
whoami: () => import("./login-DAHC8CD3.mjs").then((m) => m.whoamiCommand),
|
|
56
|
+
logout: () => import("./login-DAHC8CD3.mjs").then((m) => m.logoutCommand),
|
|
57
|
+
create: () => import("./projects-B3ycJGaX.mjs").then((m) => m.createCommand),
|
|
58
|
+
init: () => import("./projects-B3ycJGaX.mjs").then((m) => m.initCommand),
|
|
59
|
+
projects: () => import("./projects-B3ycJGaX.mjs").then((m) => m.projectsCommand),
|
|
60
|
+
delete: () => import("./projects-B3ycJGaX.mjs").then((m) => m.deleteCommand),
|
|
61
|
+
rename: () => import("./rename-BY2_4F4b.mjs").then((m) => m.renameCommand),
|
|
62
|
+
dev: () => import("./dev-CiMcqGqA.mjs").then((m) => m.devCommand),
|
|
63
|
+
deploy: () => import("./deploy-D57a-99C.mjs").then((m) => m.deployCommand),
|
|
64
|
+
promote: () => import("./deploy-D57a-99C.mjs").then((m) => m.promoteCommand),
|
|
65
|
+
staging: () => import("./staging-CSv8OWNT.mjs").then((m) => m.stagingCommand),
|
|
66
|
+
rollback: () => import("./deploy-D57a-99C.mjs").then((m) => m.rollbackCommand),
|
|
67
|
+
download: () => import("./deploy-D57a-99C.mjs").then((m) => m.downloadCommand),
|
|
68
|
+
versions: () => import("./versions-DKVNY2Zo.mjs").then((m) => m.versionsCommand),
|
|
69
|
+
token: () => import("./token-DakMHZEr.mjs").then((m) => m.tokenCommand),
|
|
70
|
+
egress: () => import("./egress-bVy6U5ho.mjs").then((m) => m.egressCommand),
|
|
71
|
+
cors: () => import("./cors-Csvzy1Oo.mjs").then((m) => m.corsCommand),
|
|
72
|
+
calls: () => import("./calls-CSO-qNB2.mjs").then((m) => m.callsCommand),
|
|
73
|
+
secrets: () => import("./secrets-CBVVCn6s.mjs").then((m) => m.secretsCommand),
|
|
74
|
+
roles: () => import("./roles-wEgE5ICf.mjs").then((m) => m.rolesCommand),
|
|
75
|
+
members: () => import("./roles-wEgE5ICf.mjs").then((m) => m.membersCommand),
|
|
76
|
+
schedule: () => import("./schedule-D6tTBal3.mjs").then((m) => m.scheduleCommand),
|
|
77
|
+
feedback: () => import("./feedback-w28FscrZ.mjs").then((m) => m.feedbackCommand),
|
|
78
|
+
db: () => import("./db-BKo39uJt.mjs").then((m) => m.dbCommand),
|
|
79
|
+
files: () => import("./files-DVFs1rmn.mjs").then((m) => m.filesCommand),
|
|
80
|
+
usage: () => import("./usage-DcDBqrLf.mjs").then((m) => m.usageCommand),
|
|
81
|
+
ai: () => import("./ai-CGYbKeZq.mjs").then((m) => m.aiCommand),
|
|
82
|
+
open: () => import("./open-B2fimu3z.mjs").then((m) => m.openCommand),
|
|
83
|
+
browse: () => import("./browse-CAidI-BT.mjs").then((m) => m.browseCommand),
|
|
84
|
+
docs: () => import("./docs-D1SWYMZ-.mjs").then((m) => m.docsCommand),
|
|
85
|
+
skill: () => import("./skill-BUWRlQd3.mjs").then((m) => m.skillCommand),
|
|
86
|
+
upgrade: () => import("./upgrade-B-ELQVun.mjs").then((m) => m.upgradeCommand),
|
|
87
|
+
logs: () => import("./logs-DTXFm5DB.mjs").then((m) => m.logsCommand),
|
|
88
|
+
mcp: () => import("./mcp-LQyQtnsW.mjs").then((m) => m.mcpCommand),
|
|
89
|
+
repo: () => import("./repo-xl6Rb6BC.mjs").then((m) => m.repoCommand),
|
|
90
|
+
template: () => import("./project-template-Ckh8JDkS.mjs").then((m) => m.templateCommand),
|
|
91
|
+
audience: () => import("./audience-BspIO-MA.mjs").then((m) => m.audienceCommand),
|
|
92
|
+
preview: () => import("./preview-BRehGrPg.mjs").then((m) => m.previewCommand)
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
95
|
const quiet = process.argv[2] === "mcp" && process.argv[3] === "serve" || process.argv[2] === "repo" && process.argv[3] === "credential";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { a as rewriteApiPath } from "./dev-
|
|
2
|
+
import { r as apiDataRequest } from "./api-C2cvuMD1.mjs";
|
|
3
|
+
import { a as rewriteApiPath } from "./dev-CtjY0gJX.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";
|