@mediamonks/canopy-cli 0.7.48 → 0.7.49
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/{dev-BE48xClT.mjs → dev-BLjgtBpg.mjs} +4 -3
- package/dist/dev-BhfzaNja.mjs +2 -0
- package/dist/docs/calling-projects.md +8 -4
- package/dist/docs/cli-calls.md +42 -0
- package/dist/docs/cli.md +6 -0
- package/dist/docs/index.json +17 -2
- package/dist/docs/platform-members-and-access.md +3 -1
- package/dist/docs/roles.md +4 -0
- package/dist/docs/sdk-members.md +79 -0
- package/dist/docs/sdk-projects.md +76 -0
- package/dist/docs/sdk.md +4 -3
- package/dist/{docs-BZquSJej.mjs → docs-DjKdWQkK.mjs} +1 -1
- package/dist/{feedback-CAM-DJH9.mjs → feedback-DYWJ-g39.mjs} +1 -1
- package/dist/index.mjs +7 -7
- package/dist/{local-DRcoiNcy.mjs → local-zQRuHCl2.mjs} +1 -1
- package/dist/{mcp-q9wWZ2yk.mjs → mcp-ByQm8vmX.mjs} +1 -1
- package/dist/{package-Df9caKjj.mjs → package-JIon4dQ6.mjs} +1 -1
- package/dist/{skill-BtL5ANQO.mjs → skill-E31hpdtT.mjs} +1 -1
- package/dist/{upgrade-DrEk3nqk.mjs → upgrade-iGfgX5fx.mjs} +1 -1
- package/package.json +3 -3
- package/dist/dev-z2KvqkF9.mjs +0 -2
|
@@ -325,7 +325,7 @@ async function devRemote(flags, slug) {
|
|
|
325
325
|
async function devLocal(flags, slug) {
|
|
326
326
|
let dump;
|
|
327
327
|
if (flags.pull) {
|
|
328
|
-
const { fetchProjectDump } = await import("./local-
|
|
328
|
+
const { fetchProjectDump } = await import("./local-zQRuHCl2.mjs");
|
|
329
329
|
console.log(`Pulling a fresh export of ${slug}${flags.staging ? " [staging]" : ""}…`);
|
|
330
330
|
dump = await fetchProjectDump(slug, flags.staging ? "staging" : "live");
|
|
331
331
|
}
|
|
@@ -342,7 +342,7 @@ async function devLocal(flags, slug) {
|
|
|
342
342
|
}
|
|
343
343
|
const workerAttest = randomBytes(24).toString("base64url");
|
|
344
344
|
const devRoles = await resolveDevRoles(slug, flags.asRoles);
|
|
345
|
-
const { createSandbox } = await import("./local-
|
|
345
|
+
const { createSandbox } = await import("./local-zQRuHCl2.mjs");
|
|
346
346
|
const sandbox = await createSandbox({
|
|
347
347
|
slug,
|
|
348
348
|
persistDir: join(flags.dir, ".canopy", "local"),
|
|
@@ -386,7 +386,8 @@ async function devLocal(flags, slug) {
|
|
|
386
386
|
"/_api/data/v1/ai": remoteEntry,
|
|
387
387
|
"/_api/data/v1/services": remoteEntry,
|
|
388
388
|
"/_api/data/v1/google": remoteEntry,
|
|
389
|
-
"/_api/data/v1/calls": remoteEntry
|
|
389
|
+
"/_api/data/v1/calls": remoteEntry,
|
|
390
|
+
"/_api/data/v1/members": remoteEntry
|
|
390
391
|
},
|
|
391
392
|
"/_api": {
|
|
392
393
|
target: `http://127.0.0.1:${apiAddress.port}`,
|
|
@@ -21,7 +21,8 @@ canopy calls allow campaign-site
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Or use **Incoming calls** on the project's Backend tab. Only the owner can
|
|
24
|
-
change this list; managers and editors can see it.
|
|
24
|
+
change this list; managers and editors can see it. All the options are in
|
|
25
|
+
[`canopy calls`](https://docs.canopy.website/cli/calls).
|
|
25
26
|
|
|
26
27
|
One allow covers both channels of each project and every path under `/api`.
|
|
27
28
|
It also covers every visitor of the calling project and its scheduled runs,
|
|
@@ -43,8 +44,8 @@ if (!res.ok) throw new Error(`asset-library said ${res.status}`);
|
|
|
43
44
|
const assets = await res.json();
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
`projects.fetch` works like `fetch`: pass a method, headers
|
|
47
|
-
usual. It calls the live channel unless you pass `{ channel: "staging" }`.
|
|
47
|
+
[`projects.fetch`](https://docs.canopy.website/sdk/projects) works like `fetch`: pass a method, headers
|
|
48
|
+
and a body as usual. It calls the live channel unless you pass `{ channel: "staging" }`.
|
|
48
49
|
The other project needs no entry on your [outbound hosts](https://docs.canopy.website/platform/egress).
|
|
49
50
|
|
|
50
51
|
You get the other project's response back as it is. When Canopy refuses the
|
|
@@ -84,7 +85,8 @@ app.get("/api/assets", (c) => {
|
|
|
84
85
|
[app roles](https://docs.canopy.website/guides/roles) on _your_ project. They don't need to be a member
|
|
85
86
|
of it. It is `null` when nobody was behind the call, such as a scheduled run.
|
|
86
87
|
- `env.USER` is `null` on these calls, and your backend's own `canopy.db` and
|
|
87
|
-
other calls act as your project.
|
|
88
|
+
other calls act as your project. Every field is listed in
|
|
89
|
+
[Projects](https://docs.canopy.website/sdk/projects#on-the-other-side).
|
|
88
90
|
|
|
89
91
|
If your project calls another one while handling a call, that next project
|
|
90
92
|
sees your project, acting for nobody.
|
|
@@ -95,5 +97,7 @@ sees your project, acting for nobody.
|
|
|
95
97
|
canopy calls remove campaign-site
|
|
96
98
|
```
|
|
97
99
|
|
|
100
|
+
Or remove it on the Backend tab. See [`canopy calls`](https://docs.canopy.website/cli/calls).
|
|
101
|
+
|
|
98
102
|
New calls are refused within a few seconds. A call that had already started
|
|
99
103
|
may still finish within five minutes.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: canopy calls
|
|
3
|
+
description: Manage which other projects may call this project's backend.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`canopy calls` manages which other projects may call this project's `/api`
|
|
7
|
+
from their backend with [`canopy.projects.fetch`](https://docs.canopy.website/sdk/projects). See
|
|
8
|
+
[Calling another project](https://docs.canopy.website/guides/calling-projects) for the whole flow.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
canopy calls list
|
|
14
|
+
canopy calls allow campaign-site
|
|
15
|
+
canopy calls remove campaign-site
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Arguments & flags
|
|
19
|
+
|
|
20
|
+
All subcommands resolve the project the usual way — `canopy.json` in the
|
|
21
|
+
target directory, or `--project <slug>` to override — and honor the global
|
|
22
|
+
`--profile <site>` / `CANOPY_PROFILE`.
|
|
23
|
+
|
|
24
|
+
- `list` — the projects allowed to call this one, with their owner and who
|
|
25
|
+
allowed them when.
|
|
26
|
+
- `allow <project>` — let that project's backend call this one, by its slug.
|
|
27
|
+
Only the project owner (or a platform admin) can do this.
|
|
28
|
+
- `remove <project>` — stop it. New calls are refused within a few seconds; a
|
|
29
|
+
call already under way may finish within five minutes. Owner only, like
|
|
30
|
+
`allow`.
|
|
31
|
+
|
|
32
|
+
Owners, managers and editors can run `list`.
|
|
33
|
+
|
|
34
|
+
## How it works
|
|
35
|
+
|
|
36
|
+
One allow covers both channels of each project and every path under `/api`.
|
|
37
|
+
It also covers every visitor of the calling project and its scheduled runs,
|
|
38
|
+
so this project's backend decides what each caller may do: it sees them as
|
|
39
|
+
`env.CALLER.kind === "project"`, with the visitor behind the call in
|
|
40
|
+
`actingFor`. A project can always call itself without being allowed.
|
|
41
|
+
|
|
42
|
+
The same list is on the project's Backend tab, under **Incoming calls**.
|
package/dist/docs/cli.md
CHANGED
|
@@ -82,6 +82,12 @@ See `canopy docs ci` for wiring push-to-main deploys.
|
|
|
82
82
|
- `canopy egress allow <host>` — allow a hostname (or `"*.sub.wildcard"`).
|
|
83
83
|
- `canopy egress remove <host>` — remove an entry.
|
|
84
84
|
|
|
85
|
+
## Calls from other projects
|
|
86
|
+
|
|
87
|
+
- `canopy calls list` — projects allowed to call this project's backend.
|
|
88
|
+
- `canopy calls allow <project>` — let a project call it (owner only).
|
|
89
|
+
- `canopy calls remove <project>` — stop it (owner only).
|
|
90
|
+
|
|
85
91
|
## Maintenance
|
|
86
92
|
|
|
87
93
|
- `canopy upgrade` — update the CLI to the latest version. `--version <v>` pins a
|
package/dist/docs/index.json
CHANGED
|
@@ -306,6 +306,11 @@
|
|
|
306
306
|
"title": "canopy egress",
|
|
307
307
|
"summary": "Manage which outbound hosts the project's backend worker may fetch."
|
|
308
308
|
},
|
|
309
|
+
{
|
|
310
|
+
"slug": "cli-calls",
|
|
311
|
+
"title": "canopy calls",
|
|
312
|
+
"summary": "Manage which other projects may call this project's backend."
|
|
313
|
+
},
|
|
309
314
|
{
|
|
310
315
|
"slug": "cli-secrets",
|
|
311
316
|
"title": "canopy secrets",
|
|
@@ -386,12 +391,12 @@
|
|
|
386
391
|
{
|
|
387
392
|
"key": "sdk",
|
|
388
393
|
"title": "SDK reference",
|
|
389
|
-
"description": "The typed client your project code uses — auth, data, files, AI, email, notify, realtime, services.",
|
|
394
|
+
"description": "The typed client your project code uses — auth, data, files, AI, email, notify, realtime, project calls, members, services.",
|
|
390
395
|
"topics": [
|
|
391
396
|
{
|
|
392
397
|
"slug": "sdk",
|
|
393
398
|
"title": "Using the SDK",
|
|
394
|
-
"summary": "One typed client for auth, data, files, AI, email, notify, realtime, and services — no keys, no connection strings, the platform authenticates for you."
|
|
399
|
+
"summary": "One typed client for auth, data, files, AI, email, notify, realtime, project calls, members, and services — no keys, no connection strings, the platform authenticates for you."
|
|
395
400
|
},
|
|
396
401
|
{
|
|
397
402
|
"slug": "sdk-auth",
|
|
@@ -428,6 +433,16 @@
|
|
|
428
433
|
"title": "Realtime",
|
|
429
434
|
"summary": "Live updates between the people using your app — subscribe to a topic, publish to it, no backend needed."
|
|
430
435
|
},
|
|
436
|
+
{
|
|
437
|
+
"slug": "sdk-projects",
|
|
438
|
+
"title": "Projects",
|
|
439
|
+
"summary": "Call another project's backend API from your backend, with no keys to manage."
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"slug": "sdk-members",
|
|
443
|
+
"title": "Members",
|
|
444
|
+
"summary": "List who is on your project, with their app roles, from your backend — including people who haven't opened the app yet."
|
|
445
|
+
},
|
|
431
446
|
{
|
|
432
447
|
"slug": "sdk-mcp",
|
|
433
448
|
"title": "Agent tools (MCP)",
|
|
@@ -81,7 +81,9 @@ App roles cover that without a table of emails in your code.
|
|
|
81
81
|
Under **Settings → Access → App roles**, create the roles your app needs. Each
|
|
82
82
|
has a name and a slug, like `approver`. Then give members their roles from the
|
|
83
83
|
Members card. Your app reads them as `roles` on the signed-in user, from
|
|
84
|
-
[`auth.user()`](https://docs.canopy.website/sdk/auth) or `env.CALLER` in a backend worker.
|
|
84
|
+
[`auth.user()`](https://docs.canopy.website/sdk/auth) or `env.CALLER` in a backend worker. To list
|
|
85
|
+
everyone on the project with their roles, your backend calls
|
|
86
|
+
[`members.list()`](https://docs.canopy.website/sdk/members).
|
|
85
87
|
|
|
86
88
|
One role is always the **default**. Everyone who can open the app has it,
|
|
87
89
|
client-password visitors included, so you don't have to hand it out. The first
|
package/dist/docs/roles.md
CHANGED
|
@@ -58,6 +58,10 @@ user.roles; // ["user", "approver"]
|
|
|
58
58
|
In a backend worker, `env.CALLER.roles` holds the same list without a round
|
|
59
59
|
trip, and so does `env.USER.roles` for a signed-in Monk.
|
|
60
60
|
|
|
61
|
+
To list everyone who has a role, including people who haven't opened the app
|
|
62
|
+
yet, call [`canopy.members.list({ appRole })`](https://docs.canopy.website/sdk/members) from your
|
|
63
|
+
backend.
|
|
64
|
+
|
|
61
65
|
## Check roles where it counts
|
|
62
66
|
|
|
63
67
|
A check that only runs in the browser hides buttons. It doesn't protect
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Members
|
|
3
|
+
description: List who is on your project, with their app roles, from your backend — including people who haven't opened the app yet.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`canopy.members` gives your backend the project's roster: the owner, every
|
|
7
|
+
member, and everyone invited who hasn't signed in yet, each with their
|
|
8
|
+
[app roles](https://docs.canopy.website/guides/roles). Use it for a "People" page, a picker of
|
|
9
|
+
approvers, or a weekly email to everyone with the `qa` role.
|
|
10
|
+
|
|
11
|
+
Backend code only. A page that calls it straight from the browser is
|
|
12
|
+
refused, even for the owner. Your backend route decides what of the list to
|
|
13
|
+
send to whoever is asking.
|
|
14
|
+
|
|
15
|
+
## members.list(options?)
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createCanopy } from "@mediamonks/canopy";
|
|
19
|
+
|
|
20
|
+
const canopy = createCanopy({ fetch: env.CANOPY.fetch.bind(env.CANOPY) });
|
|
21
|
+
|
|
22
|
+
// Everyone on the project.
|
|
23
|
+
const people = await canopy.members.list();
|
|
24
|
+
|
|
25
|
+
// Only the people with the `qa` role, invites included.
|
|
26
|
+
const qa = await canopy.members.list({ appRole: "qa" });
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Options:**
|
|
30
|
+
|
|
31
|
+
- `appRole` — optional. Only people whose roles include this slug. A slug
|
|
32
|
+
your project doesn't have gives an empty list.
|
|
33
|
+
|
|
34
|
+
**Returns** an array of `ProjectMember`, the owner first, then members by
|
|
35
|
+
name, then invites:
|
|
36
|
+
|
|
37
|
+
| Field | Meaning |
|
|
38
|
+
| ---------- | --------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `id` | Their Canopy user id, the same as `env.CALLER.id` on their requests. `null` for someone still invited. |
|
|
40
|
+
| `email` | The email they sign in with. |
|
|
41
|
+
| `name` | Their name. Empty for someone still invited. |
|
|
42
|
+
| `appRoles` | Their app roles: the project's default role first, then the ones given to them. The same as `env.CALLER.roles`. |
|
|
43
|
+
| `pending` | `true` for someone invited who hasn't signed in to Canopy yet. |
|
|
44
|
+
|
|
45
|
+
The list has no Canopy roles (owner, manager, editor, viewer). Those decide
|
|
46
|
+
who manages the project in Canopy; app roles are the ones your app uses.
|
|
47
|
+
|
|
48
|
+
## Link your own data to people
|
|
49
|
+
|
|
50
|
+
Store the `id`, not the email, next to your own data (a region, a team, a
|
|
51
|
+
desk). It's what `env.CALLER.id` gives you when that person makes a
|
|
52
|
+
request, so you can find their row without a lookup.
|
|
53
|
+
|
|
54
|
+
Someone still invited has no id yet. Key their row by email until they sign
|
|
55
|
+
in; from then on their entry has an id, and you can switch that one row
|
|
56
|
+
over.
|
|
57
|
+
|
|
58
|
+
## A list to show, not a permission check
|
|
59
|
+
|
|
60
|
+
The list can be a few seconds behind: a role change, a new invite or a
|
|
61
|
+
removed member shows up within a few seconds. To decide what the person
|
|
62
|
+
making a request may do, check `env.CALLER.roles`, as in
|
|
63
|
+
[Check roles where it counts](https://docs.canopy.website/guides/roles#check-roles-where-it-counts).
|
|
64
|
+
|
|
65
|
+
## Errors
|
|
66
|
+
|
|
67
|
+
| Status | Error | What happened |
|
|
68
|
+
| ------ | -------------- | ---------------------------------------------------------------------------------------- |
|
|
69
|
+
| 403 | `backend_only` | The call came from a browser page, or from a credential that isn't your backend. |
|
|
70
|
+
| 403 | `members_only` | Your backend forwarded a request from someone who isn't on a collaborators-only project. |
|
|
71
|
+
|
|
72
|
+
## Good to know
|
|
73
|
+
|
|
74
|
+
- The live and staging channels list the same people: the roster belongs to
|
|
75
|
+
the project, not to a channel.
|
|
76
|
+
- In [`canopy dev`](https://docs.canopy.website/cli/dev) the list is your deployed project's real
|
|
77
|
+
roster. Nothing you do locally changes it.
|
|
78
|
+
- To change the roster, use the dashboard or
|
|
79
|
+
[`canopy members`](https://docs.canopy.website/cli/members).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Projects
|
|
3
|
+
description: Call another project's backend API from your backend, with no keys to manage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`canopy.projects` lets your project's backend call another project's `/api`.
|
|
7
|
+
The other project's owner allows yours first; after that, Canopy proves who
|
|
8
|
+
is calling on every call, so your code holds no key or token. The walkthrough
|
|
9
|
+
is in [Calling another project](https://docs.canopy.website/guides/calling-projects).
|
|
10
|
+
|
|
11
|
+
Backend code only: a call is made as your project, so it doesn't work from a
|
|
12
|
+
browser.
|
|
13
|
+
|
|
14
|
+
## projects.fetch(project, path, init?)
|
|
15
|
+
|
|
16
|
+
Works like `fetch`, aimed at another project:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { createCanopy } from "@mediamonks/canopy";
|
|
20
|
+
|
|
21
|
+
const canopy = createCanopy({ fetch: env.CANOPY.fetch.bind(env.CANOPY) });
|
|
22
|
+
|
|
23
|
+
const res = await canopy.projects.fetch("asset-library", "/api/assets?tag=summer");
|
|
24
|
+
if (!res.ok) throw new Error(`asset-library said ${res.status}`);
|
|
25
|
+
const assets = await res.json();
|
|
26
|
+
|
|
27
|
+
// Any method, headers and body; the staging channel when you need it.
|
|
28
|
+
await canopy.projects.fetch("asset-library", "/api/assets", {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: { "content-type": "application/json" },
|
|
31
|
+
body: JSON.stringify({ name: "hero.jpg" }),
|
|
32
|
+
channel: "staging",
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Arguments:**
|
|
37
|
+
|
|
38
|
+
- `project` — the other project's slug.
|
|
39
|
+
- `path` — a path under its `/api`, with a query string if you need one.
|
|
40
|
+
Anything else is refused before it is sent.
|
|
41
|
+
- `init` — optional. The usual fetch options (`method`, `headers`, `body`, …)
|
|
42
|
+
plus `channel`: `"live"` (the default) or `"staging"`.
|
|
43
|
+
|
|
44
|
+
**Returns** a `Response`: the other project's answer as it is. It doesn't
|
|
45
|
+
throw on an error status, so check `res.ok` like any fetch.
|
|
46
|
+
|
|
47
|
+
When Canopy refuses the call, the response is a JSON error instead:
|
|
48
|
+
|
|
49
|
+
| Status | Error | What happened |
|
|
50
|
+
| ------ | --------------------- | --------------------------------------------------------------- |
|
|
51
|
+
| 400 | `invalid_call_path` | The path isn't under `/api`. |
|
|
52
|
+
| 403 | `call_not_granted` | That project hasn't allowed yours, or there is no such project. |
|
|
53
|
+
| 404 | `no_backend` | That project has no backend on that channel. |
|
|
54
|
+
| 508 | `call_depth_exceeded` | Projects called each other more than four times in a row. |
|
|
55
|
+
| 503 | `calls_unavailable` | This site can't make project calls. |
|
|
56
|
+
|
|
57
|
+
Calls don't go through your [outbound hosts](https://docs.canopy.website/platform/egress), so the other
|
|
58
|
+
project needs no entry there. In [`canopy dev`](https://docs.canopy.website/cli/dev) they go to the
|
|
59
|
+
deployed project, as your project.
|
|
60
|
+
|
|
61
|
+
## On the other side
|
|
62
|
+
|
|
63
|
+
The project you call sees the call in its backend as `env.CALLER`, typed
|
|
64
|
+
`CanopyProjectCaller`:
|
|
65
|
+
|
|
66
|
+
| Field | Meaning |
|
|
67
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| `kind` | `"project"`. |
|
|
69
|
+
| `id` | The calling project's id. It stays the same if the project is renamed. |
|
|
70
|
+
| `project` | The calling project's current slug. |
|
|
71
|
+
| `channel` | Which of its channels called: `"live"` or `"staging"`. |
|
|
72
|
+
| `name` | The calling project's name. |
|
|
73
|
+
| `actingFor` | The visitor whose request caused the call, with their [app roles](https://docs.canopy.website/guides/roles) on the called project; `null` for a scheduled run. |
|
|
74
|
+
|
|
75
|
+
`env.USER` is `null` on these calls. See [Auth](https://docs.canopy.website/sdk/auth) for the other
|
|
76
|
+
kinds of caller.
|
package/dist/docs/sdk.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Using the SDK
|
|
3
|
-
description: One typed client for auth, data, files, AI, email, notify, realtime, and services — no keys, no connection strings, the platform authenticates for you.
|
|
3
|
+
description: One typed client for auth, data, files, AI, email, notify, realtime, project calls, members, and services — no keys, no connection strings, the platform authenticates for you.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`@mediamonks/canopy` is a thin, typed client over the platform's project API.
|
|
7
7
|
One `createCanopy()` call gives you its modules — `auth`, `db`, `blob`, `ai`,
|
|
8
|
-
`email`, `notify`, `realtime`, `google`, `slack`, and `services` — and that is the entire surface. There are no API keys,
|
|
8
|
+
`email`, `notify`, `realtime`, `projects`, `members`, `google`, `slack`, and `services` — and that is the entire surface. There are no API keys,
|
|
9
9
|
connection strings, or environment variables to manage: every call rides the
|
|
10
10
|
session the platform already established before your code ran.
|
|
11
11
|
|
|
@@ -36,7 +36,8 @@ import { createCanopy } from "@mediamonks/canopy";
|
|
|
36
36
|
|
|
37
37
|
const canopy = createCanopy();
|
|
38
38
|
// canopy.auth, canopy.db, canopy.blob, canopy.ai, canopy.email, canopy.notify,
|
|
39
|
-
// canopy.realtime, canopy.
|
|
39
|
+
// canopy.realtime, canopy.projects, canopy.members, canopy.google, canopy.slack,
|
|
40
|
+
// canopy.services
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
| Option | Type | Default | What it does |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-JIon4dQ6.mjs";
|
|
2
2
|
import { r as siteConfig } from "./site-BL5Ik-yj.mjs";
|
|
3
3
|
import { i as latestKnownVersion, r as compareSemver } from "./version-check-CcsA1QjI.mjs";
|
|
4
4
|
import { n as agentHeaders } from "./api-DmJrIsE7.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-JIon4dQ6.mjs";
|
|
2
2
|
import { c as projectDirArgs, d as resolveProject, h as tryResolveProject, m as tryReadCanopyJson, r as siteConfig } from "./site-BL5Ik-yj.mjs";
|
|
3
3
|
import { a as apiRequest, c as credentials, i as apiDownload, o as apiUpload, s as commonHeaders } from "./api-DmJrIsE7.mjs";
|
|
4
4
|
import { r as reportErrors, t as formatDateTime } from "./ui-26ETk1n8.mjs";
|
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-JIon4dQ6.mjs";
|
|
3
3
|
import { i as siteHeaderLine, n as setInvocationProfile } from "./site-BL5Ik-yj.mjs";
|
|
4
4
|
import { a as notifyOfUpdate, o as runRefresh } from "./version-check-CcsA1QjI.mjs";
|
|
5
5
|
import { defineCommand, runMain } from "citty";
|
|
@@ -71,7 +71,7 @@ const main = defineCommand({
|
|
|
71
71
|
projects: () => import("./projects-CnU3194_.mjs").then((m) => m.projectsCommand),
|
|
72
72
|
delete: () => import("./projects-CnU3194_.mjs").then((m) => m.deleteCommand),
|
|
73
73
|
rename: () => import("./rename-BWvERJgA.mjs").then((m) => m.renameCommand),
|
|
74
|
-
dev: () => import("./dev-
|
|
74
|
+
dev: () => import("./dev-BhfzaNja.mjs").then((m) => m.devCommand),
|
|
75
75
|
deploy: () => import("./deploy-BnRQusjJ.mjs").then((m) => m.deployCommand),
|
|
76
76
|
promote: () => import("./deploy-BnRQusjJ.mjs").then((m) => m.promoteCommand),
|
|
77
77
|
staging: () => import("./staging-Dn8kH9cK.mjs").then((m) => m.stagingCommand),
|
|
@@ -84,17 +84,17 @@ const main = defineCommand({
|
|
|
84
84
|
roles: () => import("./roles-CrYf_8wk.mjs").then((m) => m.rolesCommand),
|
|
85
85
|
members: () => import("./roles-CrYf_8wk.mjs").then((m) => m.membersCommand),
|
|
86
86
|
schedule: () => import("./schedule-DvHSSzfR.mjs").then((m) => m.scheduleCommand),
|
|
87
|
-
feedback: () => import("./feedback-
|
|
87
|
+
feedback: () => import("./feedback-DYWJ-g39.mjs").then((m) => m.feedbackCommand),
|
|
88
88
|
db: () => import("./db-DpCMc0uz.mjs").then((m) => m.dbCommand),
|
|
89
89
|
usage: () => import("./usage-Bpz5B1N1.mjs").then((m) => m.usageCommand),
|
|
90
90
|
ai: () => import("./ai-CWPQiUft.mjs").then((m) => m.aiCommand),
|
|
91
91
|
open: () => import("./open-DcQSdfx5.mjs").then((m) => m.openCommand),
|
|
92
92
|
browse: () => import("./browse-BPLWhoFI.mjs").then((m) => m.browseCommand),
|
|
93
|
-
docs: () => import("./docs-
|
|
94
|
-
skill: () => import("./skill-
|
|
95
|
-
upgrade: () => import("./upgrade-
|
|
93
|
+
docs: () => import("./docs-DjKdWQkK.mjs").then((m) => m.docsCommand),
|
|
94
|
+
skill: () => import("./skill-E31hpdtT.mjs").then((m) => m.skillCommand),
|
|
95
|
+
upgrade: () => import("./upgrade-iGfgX5fx.mjs").then((m) => m.upgradeCommand),
|
|
96
96
|
logs: () => import("./logs-dZMPTJLu.mjs").then((m) => m.logsCommand),
|
|
97
|
-
mcp: () => import("./mcp-
|
|
97
|
+
mcp: () => import("./mcp-ByQm8vmX.mjs").then((m) => m.mcpCommand),
|
|
98
98
|
repo: () => import("./repo-C7AXDtFZ.mjs").then((m) => m.repoCommand),
|
|
99
99
|
template: () => import("./project-template-Dw11151p.mjs").then((m) => m.templateCommand),
|
|
100
100
|
audience: () => import("./audience-B68YZBGy.mjs").then((m) => m.audienceCommand)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as apiDataRequest } from "./api-DmJrIsE7.mjs";
|
|
2
2
|
import { a as realtimeRouter, c as META_COLUMNS, l as blobRouter, n as WORKER_ATTEST_HEADER, o as dbRouter, s as hasPrivateNames } from "./src-DzU89gZN.mjs";
|
|
3
|
-
import { a as rewriteApiPath } from "./dev-
|
|
3
|
+
import { a as rewriteApiPath } from "./dev-BLjgtBpg.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { dirname, join, relative, sep } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-JIon4dQ6.mjs";
|
|
2
2
|
import { h as tryResolveProject, p as stagingUrl, r as siteConfig, u as projectUrl } from "./site-BL5Ik-yj.mjs";
|
|
3
3
|
import { a as apiRequest, f as noticeRenamesOnly, l as currentSlug, t as ApiError } from "./api-DmJrIsE7.mjs";
|
|
4
4
|
import { t as liveDevServer } from "./dev-server-file-Dk9pk4AR.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-JIon4dQ6.mjs";
|
|
2
2
|
import { r as reportErrors } from "./ui-26ETk1n8.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { cpSync, existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
@@ -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-E31hpdtT.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());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediamonks/canopy-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.49",
|
|
4
4
|
"description": "Canopy CLI — create, develop and deploy Canopy projects.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"canopy": "./dist/index.mjs"
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"esbuild": "^0.28.1",
|
|
23
23
|
"hono": "^4.8.0",
|
|
24
24
|
"vite-server": "npm:vite@^7",
|
|
25
|
-
"@mediamonks/canopy
|
|
26
|
-
"@mediamonks/canopy": "0.0.
|
|
25
|
+
"@mediamonks/canopy": "0.0.15",
|
|
26
|
+
"@mediamonks/canopy-data-plane": "0.0.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^26.1.1",
|
package/dist/dev-z2KvqkF9.mjs
DELETED