@mediamonks/canopy-cli 0.7.57 → 0.7.59
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/{db-BU-ni9fj.mjs → db-DIxujtt1.mjs} +13 -6
- package/dist/{deploy-7tgGJZUK.mjs → deploy-Bp5DMp_U.mjs} +381 -16
- 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/cli-deploy.md +20 -3
- package/dist/docs/cli-dev.md +1 -1
- package/dist/docs/data.md +18 -0
- package/dist/docs/migrations.md +22 -0
- package/dist/docs/platform-deploys-and-rollbacks.md +3 -0
- package/dist/docs/platform-project-data.md +7 -0
- package/dist/docs/sdk-database.md +51 -0
- package/dist/docs/static-serving.md +34 -2
- package/dist/{docs-hcHwEc6n.mjs → docs-F0GxdMrn.mjs} +4 -4
- package/dist/{egress-Bzn2VKDe.mjs → egress-Dwq-d6cB.mjs} +3 -3
- package/dist/{feedback-COujxFBV.mjs → feedback-ClCjUP3z.mjs} +4 -4
- package/dist/{files-CBbAtHIK.mjs → files-CUPtGcuZ.mjs} +3 -3
- package/dist/index.mjs +39 -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-aWskwkXw.mjs → mcp-CnTfFA0U.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-BpOFa8Qi.mjs → package-tnyqU_dN.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 +3 -0
- package/dist/{skill-984KseKb.mjs → skill-CoPNcCaM.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-DhK_PlAN.mjs → upgrade-CLFrKuJS.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,4 +1,4 @@
|
|
|
1
|
-
import { a as readPersonCaller, i as CALLER_HEADER, n as redactCanopyCredentials, o as readUser, r as stampWorkerHeaders, t as WORKER_ATTEST_HEADER } from "./src-
|
|
1
|
+
import { a as readPersonCaller, i as CALLER_HEADER, n as redactCanopyCredentials, o as readUser, r as stampWorkerHeaders, t as WORKER_ATTEST_HEADER } from "./src-Dlg7aeRj.mjs";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { relative, resolve, sep } from "node:path";
|
|
4
4
|
//#region src/dev-worker.ts
|
|
@@ -148,6 +148,23 @@ function createDevDb(canopyFetch, dialect) {
|
|
|
148
148
|
rows,
|
|
149
149
|
rowCount: rows.length
|
|
150
150
|
};
|
|
151
|
+
},
|
|
152
|
+
batch: async (statements) => {
|
|
153
|
+
const response = await canopyFetch("/data/v1/db/sql/batch", {
|
|
154
|
+
method: "POST",
|
|
155
|
+
headers: { "content-type": "application/json" },
|
|
156
|
+
body: JSON.stringify({ statements })
|
|
157
|
+
});
|
|
158
|
+
if (!response.ok) {
|
|
159
|
+
const text = await response.text();
|
|
160
|
+
let detail = text.slice(0, 300);
|
|
161
|
+
try {
|
|
162
|
+
const body = JSON.parse(text);
|
|
163
|
+
detail = body.detail ?? body.error ?? detail;
|
|
164
|
+
} catch {}
|
|
165
|
+
throw new Error(`env.DB batch failed (HTTP ${response.status}): ${detail}`);
|
|
166
|
+
}
|
|
167
|
+
return (await response.json()).results;
|
|
151
168
|
}
|
|
152
169
|
};
|
|
153
170
|
}
|
package/dist/docs/cli-deploy.md
CHANGED
|
@@ -20,6 +20,7 @@ canopy deploy --project my-app ./out
|
|
|
20
20
|
- `--build` / `--no-build` — run the `canopy.json` build command first (default on). Use `--no-build` when the output is already built, e.g. a CI step that built earlier.
|
|
21
21
|
- `--migrate` / `--no-migrate` — apply pending schema migrations before the new version goes live (default on; only does anything when `canopy.json` configures a `"migrations"` directory — see the [migrations guide](https://docs.canopy.website/guides/migrations)).
|
|
22
22
|
- `--staging` — deploy to the project's [staging channel](https://docs.canopy.website/guides/staging) instead of live: created on first use with a copy of the live database, served at `staging-dot-<slug>`, promoted with [canopy promote](https://docs.canopy.website/cli/promote). Pending migrations apply to the _staging_ database (the rehearsal). Not to be confused with `--profile staging`, which picks a whole different site.
|
|
23
|
+
- `--prune-media` — delete stored [site media](https://docs.canopy.website/guides/static-serving#site-media) files that are no longer in the build, including folders you took out of `canopy.json`. Without it, site media only grows. The CLI prints how many it removed and which.
|
|
23
24
|
- `--profile <site>` / `CANOPY_PROFILE` — which site to deploy to (`main`, `staging`, …). Always pass it explicitly when the target matters; a `canopy.json` profile pin is the fallback.
|
|
24
25
|
|
|
25
26
|
## How it works
|
|
@@ -27,12 +28,28 @@ canopy deploy --project my-app ./out
|
|
|
27
28
|
1. **Build.** If `canopy.json` has a `build` command and you didn't pass `--no-build`, it runs in the project directory with your shell; a non-zero exit aborts the deploy.
|
|
28
29
|
2. **Collect files.** Everything under the `dist` directory from `canopy.json` (default: the project directory itself) is gathered, skipping `canopy.json`, `README.md`, `AGENTS.md`, `CLAUDE.md`, `.gitignore`, `.DS_Store`, and any dot-directories plus `.git`, `node_modules`, and `.claude`. An empty or missing output directory is an error.
|
|
29
30
|
3. **Bundle the backend (if any).** When `canopy.json` names a `worker` entry, that backend code is bundled into a single file (dependencies included) and ships in the same version as the static files — frontend and backend always move together.
|
|
30
|
-
4. **
|
|
31
|
-
5. **
|
|
32
|
-
6. **
|
|
31
|
+
4. **Site media (if declared).** Folders listed in `canopy.json` `"media"` don't go into the version. The CLI compares them with what the project already stores and uploads only new and changed files; unchanged ones cost nothing. They are live as soon as they are uploaded. One line reports what happened, e.g. `media: 3 uploaded, 3,255 unchanged, 175 MB stored`.
|
|
32
|
+
5. **Upload.** The files upload in parallel; the new version is staged alongside the old one, so the live site keeps serving until everything has arrived.
|
|
33
|
+
6. **Migrate (if configured).** With a `"migrations"` directory in `canopy.json`, pending schema migrations apply now — after the bundle is staged, before the version flips — so the incoming code never runs against the old schema. The platform stores an automatic pre-migrate snapshot first. If a migration fails, the deploy aborts and the live version is unchanged; the error names the snapshot to restore if needed.
|
|
34
|
+
7. **Go live.** The platform validates the staged version and switches the site over to it in one step. The upload must contain an `index.html` at the top level — the deploy is rejected otherwise — so double-check `dist` points at the folder that actually holds `index.html`. On success the CLI prints the live URL and version number (plus the backend service URL for worker projects).
|
|
33
35
|
|
|
34
36
|
Deploys are versioned and immutable: nothing overwrites an old version, so [canopy rollback](https://docs.canopy.website/cli/rollback) can always take you back.
|
|
35
37
|
|
|
38
|
+
## Site media
|
|
39
|
+
|
|
40
|
+
A folder of large data or media that rarely changes, such as Storybook mock data or demo video, can be stored once per project instead of in every version:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"dist": "storybook-static",
|
|
45
|
+
"media": ["mocks/", "demo-assets/"]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
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 SVG 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
|
+
|
|
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
|
+
|
|
36
53
|
**CI.** In GitHub Actions, `canopy deploy` needs no secret and no `canopy login`: with `permissions: id-token: write` in the workflow, it proves which repository and branch the run comes from and deploys a project [linked](https://docs.canopy.website/cli/repo) to that repository. A run on the project's staging branch deploys to staging without `--staging`. An unlinked project, or one whose CI deploys are off, skips the deploy with a warning instead of failing. Elsewhere, set `CANOPY_DEPLOY_TOKEN` to a project-scoped deploy token (from [canopy token create](https://docs.canopy.website/cli/token)); it wins over the linked repository when both are there. Deploys from GitHub Actions are tagged with their source in the deploy history. See [CI deploys](https://docs.canopy.website/guides/ci).
|
|
37
54
|
|
|
38
55
|
## Examples
|
package/dist/docs/cli-dev.md
CHANGED
|
@@ -40,7 +40,7 @@ With the lock in place, `--local` runs on an embedded SQLite engine instead —
|
|
|
40
40
|
|
|
41
41
|
**Your backend worker.** If `canopy.json` names a `worker` entry (the worker scaffold does), `canopy dev` serves it too: requests to `/api/*` go to your worker, everything else to the SPA — the same split the platform makes once you deploy. There's no build step; save the file and the next request runs the new code.
|
|
42
42
|
|
|
43
|
-
Your worker gets the same `env` it gets in production: `env.CANOPY.fetch` for the SDK, `env.DB` and `env.BLOB` for raw database and file access, `env.CALLER` and `env.USER` for whoever is calling, `env.PROJECT_SLUG`, and `env.CANOPY_CHANNEL` (`"staging"` with `--staging`, otherwise `"live"`). They all follow the mode you're in — live project data by default, your sandbox under `--local`. Three differences worth knowing: `env.CALLER` and `env.USER` are you (the account you logged in with), since there's no company login in front of a local server; there's no [access token](https://docs.canopy.website/guides/access-tokens) check, so `env.CALLER.token` is always `null` and `requireScope` lets every request through; and a write through `env.DB` reports no row count locally.
|
|
43
|
+
Your worker gets the same `env` it gets in production: `env.CANOPY.fetch` for the SDK, `env.DB` (with [`batch()`](https://docs.canopy.website/sdk/database#in-your-worker), still all or nothing) and `env.BLOB` for raw database and file access, `env.CALLER` and `env.USER` for whoever is calling, `env.PROJECT_SLUG`, and `env.CANOPY_CHANNEL` (`"staging"` with `--staging`, otherwise `"live"`). They all follow the mode you're in — live project data by default, your sandbox under `--local`. Three differences worth knowing: `env.CALLER` and `env.USER` are you (the account you logged in with), since there's no company login in front of a local server; there's no [access token](https://docs.canopy.website/guides/access-tokens) check, so `env.CALLER.token` is always `null` and `requireScope` lets every request through; and a write through `env.DB.query()` reports no row count locally (`env.DB.batch()` does).
|
|
44
44
|
|
|
45
45
|
To tick a schedule by hand, post its name to the same path the platform uses:
|
|
46
46
|
|
package/dist/docs/data.md
CHANGED
|
@@ -72,6 +72,24 @@ canopy db snapshots delete <key> # delete one for
|
|
|
72
72
|
The same settings are on the dashboard's Data tab. See
|
|
73
73
|
[`canopy db`](https://docs.canopy.website/cli/db#canopy-db-snapshots-settings) for every option.
|
|
74
74
|
|
|
75
|
+
### Your own full-text search tables
|
|
76
|
+
|
|
77
|
+
On sqlite, a project can create its own full-text search tables in a
|
|
78
|
+
[migration](https://docs.canopy.website/guides/migrations) (`CREATE VIRTUAL TABLE … USING fts5(…)`).
|
|
79
|
+
Dumps, snapshots and restores include them:
|
|
80
|
+
|
|
81
|
+
- A table that stores its own text comes back with all its rows.
|
|
82
|
+
- A table that indexes another of your tables (`content='posts'`) is rebuilt from
|
|
83
|
+
that table on restore.
|
|
84
|
+
- A **contentless** table (`content=''`) only keeps an index, which can't be
|
|
85
|
+
exported, so it comes back **empty**. `canopy db pull` and `canopy db snapshot`
|
|
86
|
+
print a note naming it. After a restore, rebuild it from your own data.
|
|
87
|
+
- Settings you changed with FTS5's configuration commands, such as a custom
|
|
88
|
+
`rank`, aren't carried over. Set them again after a restore.
|
|
89
|
+
|
|
90
|
+
Other kinds of virtual tables can't be exported; `canopy db snapshot` names the
|
|
91
|
+
table and stops (`export_unsupported`).
|
|
92
|
+
|
|
75
93
|
## Restore — destructive
|
|
76
94
|
|
|
77
95
|
> **Warning:** Restoring **replaces ALL project data**. Take a snapshot first — a snapshot taken seconds earlier
|
package/dist/docs/migrations.md
CHANGED
|
@@ -135,6 +135,28 @@ export default {
|
|
|
135
135
|
};
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
On a sqlite site the backend proxy can also take a second callback for
|
|
139
|
+
`db.batch([...])`. Hand it to [`env.DB.batch()`](https://docs.canopy.website/sdk/database#in-your-worker)
|
|
140
|
+
and Drizzle's batches run in one round trip, all or nothing:
|
|
141
|
+
|
|
142
|
+
```ts title="worker/index.ts"
|
|
143
|
+
const db = drizzle(
|
|
144
|
+
async (sql, params, method) => {
|
|
145
|
+
/* as above */
|
|
146
|
+
},
|
|
147
|
+
async (queries) => {
|
|
148
|
+
const results = await env.DB.batch(queries.map(({ sql, params }) => ({ sql, params })));
|
|
149
|
+
return results.map(({ rows }, i) => {
|
|
150
|
+
const values = rows.map((row) => Object.values(row));
|
|
151
|
+
return { rows: queries[i]?.method === "get" ? (values[0] ?? []) : values };
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Drizzle's `pg-proxy` driver has no batch callback; on a postgres site, call
|
|
158
|
+
`env.DB.batch()` directly with the SQL you need.
|
|
159
|
+
|
|
138
160
|
**In the browser (or anywhere the SDK runs)**, wrap `canopy.db.sql()` the same
|
|
139
161
|
way:
|
|
140
162
|
|
|
@@ -54,6 +54,9 @@ You can also "roll forward": after reverting to v3, making v5 live again is
|
|
|
54
54
|
the same one-step operation. Any version in the history can be live, as long
|
|
55
55
|
as it hasn't expired (see below).
|
|
56
56
|
|
|
57
|
+
Folders you declared as [site media](https://docs.canopy.website/guides/static-serving#site-media) are
|
|
58
|
+
not part of a version: a rollback keeps serving the current media files.
|
|
59
|
+
|
|
57
60
|
## Version retention
|
|
58
61
|
|
|
59
62
|
Old versions take up storage, and after a while nobody rolls back to them.
|
|
@@ -43,6 +43,13 @@ One file can be up to 200 MB on `main` and `staging` (100 MB when a browser
|
|
|
43
43
|
uploads it) and up to 25 MB on `gcp-pilot`. See
|
|
44
44
|
[how big a file can be](https://docs.canopy.website/sdk/files#how-big-a-file-can-be).
|
|
45
45
|
|
|
46
|
+
## Site media on the Files tab
|
|
47
|
+
|
|
48
|
+
The Files tab also shows a project's [site media](https://docs.canopy.website/guides/static-serving#site-media)
|
|
49
|
+
when it has any: how much it stores against its limit, how many files, and
|
|
50
|
+
which folders the live version serves from it. Site media isn't file storage.
|
|
51
|
+
Your app's code can't list or change it; only `canopy deploy` writes it.
|
|
52
|
+
|
|
46
53
|
## Snapshots and restores
|
|
47
54
|
|
|
48
55
|
The Data tab's **Data safety** card is your undo button for data:
|
|
@@ -122,6 +122,57 @@ per SDK instance, so calling it often is free.
|
|
|
122
122
|
> `db.sql()` only when you genuinely need SQL (aggregates, joins, bulk updates), and branch on
|
|
123
123
|
> `db.dialect()` whenever the syntax differs.
|
|
124
124
|
|
|
125
|
+
## In your worker
|
|
126
|
+
|
|
127
|
+
Your [backend](https://docs.canopy.website/developers/architecture) also gets the database directly, as
|
|
128
|
+
`env.DB`. It speaks the same SQL as `db.sql()` — your site's own dialect — and
|
|
129
|
+
has no connection string to manage:
|
|
130
|
+
|
|
131
|
+
```ts title="worker/index.ts"
|
|
132
|
+
// What env.DB looks like; declare it in your worker's Env type.
|
|
133
|
+
interface ProjectDb {
|
|
134
|
+
dialect: "sqlite" | "postgres";
|
|
135
|
+
query(
|
|
136
|
+
sql: string,
|
|
137
|
+
params?: unknown[],
|
|
138
|
+
): Promise<{ rows: Record<string, unknown>[]; rowCount: number | null }>;
|
|
139
|
+
batch(
|
|
140
|
+
statements: { sql: string; params?: unknown[] }[],
|
|
141
|
+
): Promise<{ rows: Record<string, unknown>[]; rowCount: number | null }[]>;
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- **`dialect`** — `"sqlite"` or `"postgres"`, so your code can pick the right
|
|
146
|
+
placeholders (`?1` versus `$1`).
|
|
147
|
+
- **`query(sql, params?)`** — one statement. `rows` holds what it returned;
|
|
148
|
+
`rowCount` is the number of rows returned, or for a write the number of rows
|
|
149
|
+
it changed.
|
|
150
|
+
- **`batch(statements)`** — several statements in one call, each with its own
|
|
151
|
+
parameters. You get one `{ rows, rowCount }` back per statement, in order.
|
|
152
|
+
|
|
153
|
+
Every `query()` is a round trip to the database. When you write many rows — an
|
|
154
|
+
import, a sync — send them as a batch instead:
|
|
155
|
+
|
|
156
|
+
```ts title="worker/index.ts"
|
|
157
|
+
const insert = "INSERT INTO texts (key, value) VALUES (?1, ?2)";
|
|
158
|
+
for (let i = 0; i < texts.length; i += 500) {
|
|
159
|
+
await env.DB.batch(
|
|
160
|
+
texts.slice(i, i + 500).map((t) => ({ sql: insert, params: [t.key, t.value] })),
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
A batch is **all or nothing**. If any statement fails, none of the batch's
|
|
166
|
+
changes are kept and the call throws with the database's own message. That
|
|
167
|
+
also makes a batch the way to change several tables together: `BEGIN` and
|
|
168
|
+
`COMMIT` through `query()` do not hold a transaction.
|
|
169
|
+
|
|
170
|
+
A batch holds at most 1,000 statements. Each statement keeps the database's
|
|
171
|
+
own limits, such as 100 bound parameters per statement on a SQLite site. A
|
|
172
|
+
statement cannot use an earlier one's result as a parameter; use a subquery or
|
|
173
|
+
`RETURNING` in SQL for that. `canopy dev` gives your worker the same `env.DB`,
|
|
174
|
+
batches included.
|
|
175
|
+
|
|
125
176
|
## Who can call this from the browser
|
|
126
177
|
|
|
127
178
|
Everything above works from a page as well as from your worker — that is the
|
|
@@ -75,8 +75,40 @@ without deploying anything.
|
|
|
75
75
|
|
|
76
76
|
`canopy deploy` checks both limits before it uploads anything. If you're over
|
|
77
77
|
the file count, it's almost always un-bundled assets that a build
|
|
78
|
-
step would combine
|
|
79
|
-
|
|
78
|
+
step would combine. Over the size limit, it's usually data or media that
|
|
79
|
+
belongs in [site media](#site-media) instead of every version.
|
|
80
|
+
|
|
81
|
+
## Site media
|
|
82
|
+
|
|
83
|
+
Some sites carry a lot of data or media that rarely changes, such as Storybook
|
|
84
|
+
mock data, demo images and video. Copying that into every version makes every
|
|
85
|
+
deploy slow and heavy. Name those folders in `canopy.json`, and Canopy stores
|
|
86
|
+
them once for the whole project:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{ "dist": "storybook-static", "media": ["mocks/", "demo-assets/"] }
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- **Same URLs.** `/mocks/users.json` stays `/mocks/users.json`. Your app and
|
|
93
|
+
`canopy dev` need no changes.
|
|
94
|
+
- **Only changes upload.** Each deploy sends new and changed files only.
|
|
95
|
+
- **Not versioned.** Rolling back, or opening a pinned version, serves the
|
|
96
|
+
current files. The staging channel shares them with live. A changed file goes
|
|
97
|
+
live as soon as it's uploaded, before the rest of the deploy.
|
|
98
|
+
- **Data, not code.** JSON, CSV, text, images, video, audio, fonts and 3D
|
|
99
|
+
models. HTML, JavaScript, CSS and SVG must stay in the version.
|
|
100
|
+
- **Adds up, until you prune.** A file you delete locally stays stored until
|
|
101
|
+
you deploy with `canopy deploy --prune-media`.
|
|
102
|
+
- **Limits.** 1 GB and 10,000 files per project, and per file the same limit
|
|
103
|
+
as [file storage](https://docs.canopy.website/sdk/files). A Canopy admin can raise the total.
|
|
104
|
+
- **Video plays.** Byte ranges are served, so video seeks and plays in every
|
|
105
|
+
browser, from site media or from the version itself.
|
|
106
|
+
- A path in a media folder that isn't stored answers 404, never your
|
|
107
|
+
`index.html`.
|
|
108
|
+
|
|
109
|
+
`canopy deploy` suggests folders when a version grows past 30% of the limit.
|
|
110
|
+
See [canopy deploy](https://docs.canopy.website/cli/deploy#site-media). The Files tab in the dashboard
|
|
111
|
+
shows how much site media a project holds.
|
|
80
112
|
|
|
81
113
|
## What this rules out
|
|
82
114
|
|
|
@@ -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-tnyqU_dN.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-tnyqU_dN.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-tnyqU_dN.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,43 @@ 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
|
-
calls: () => import("./calls-
|
|
72
|
-
secrets: () => import("./secrets-
|
|
73
|
-
roles: () => import("./roles-
|
|
74
|
-
members: () => import("./roles-
|
|
75
|
-
schedule: () => import("./schedule-
|
|
76
|
-
feedback: () => import("./feedback-
|
|
77
|
-
db: () => import("./db-
|
|
78
|
-
files: () => import("./files-
|
|
79
|
-
usage: () => import("./usage-
|
|
80
|
-
ai: () => import("./ai-
|
|
81
|
-
open: () => import("./open-
|
|
82
|
-
browse: () => import("./browse-
|
|
83
|
-
docs: () => import("./docs-
|
|
84
|
-
skill: () => import("./skill-
|
|
85
|
-
upgrade: () => import("./upgrade-
|
|
86
|
-
logs: () => import("./logs-
|
|
87
|
-
mcp: () => import("./mcp-
|
|
88
|
-
repo: () => import("./repo-
|
|
89
|
-
template: () => import("./project-template
|
|
90
|
-
audience: () => import("./audience-
|
|
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
|
+
calls: () => import("./calls-NFUccBaQ.mjs").then((m) => m.callsCommand),
|
|
72
|
+
secrets: () => import("./secrets-Cgte8mvq.mjs").then((m) => m.secretsCommand),
|
|
73
|
+
roles: () => import("./roles-2Pkqiwrx.mjs").then((m) => m.rolesCommand),
|
|
74
|
+
members: () => import("./roles-2Pkqiwrx.mjs").then((m) => m.membersCommand),
|
|
75
|
+
schedule: () => import("./schedule-Cy-7IFy5.mjs").then((m) => m.scheduleCommand),
|
|
76
|
+
feedback: () => import("./feedback-ClCjUP3z.mjs").then((m) => m.feedbackCommand),
|
|
77
|
+
db: () => import("./db-DIxujtt1.mjs").then((m) => m.dbCommand),
|
|
78
|
+
files: () => import("./files-CUPtGcuZ.mjs").then((m) => m.filesCommand),
|
|
79
|
+
usage: () => import("./usage-BXPm04tk.mjs").then((m) => m.usageCommand),
|
|
80
|
+
ai: () => import("./ai-4Mr9FbLU.mjs").then((m) => m.aiCommand),
|
|
81
|
+
open: () => import("./open-5JLHiz_J.mjs").then((m) => m.openCommand),
|
|
82
|
+
browse: () => import("./browse-BegddW9V.mjs").then((m) => m.browseCommand),
|
|
83
|
+
docs: () => import("./docs-F0GxdMrn.mjs").then((m) => m.docsCommand),
|
|
84
|
+
skill: () => import("./skill-CoPNcCaM.mjs").then((m) => m.skillCommand),
|
|
85
|
+
upgrade: () => import("./upgrade-CLFrKuJS.mjs").then((m) => m.upgradeCommand),
|
|
86
|
+
logs: () => import("./logs-BwqG7lYU.mjs").then((m) => m.logsCommand),
|
|
87
|
+
mcp: () => import("./mcp-CnTfFA0U.mjs").then((m) => m.mcpCommand),
|
|
88
|
+
repo: () => import("./repo-BW7dDQZL.mjs").then((m) => m.repoCommand),
|
|
89
|
+
template: () => import("./project-template-xNjGs9ty.mjs").then((m) => m.templateCommand),
|
|
90
|
+
audience: () => import("./audience-BXXdvGC_.mjs").then((m) => m.audienceCommand)
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
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-tnyqU_dN.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
|