@mediamonks/canopy-cli 0.7.49 → 0.7.50
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-CWPQiUft.mjs → ai-BjnuSjmw.mjs} +1 -1
- package/dist/{audience-B68YZBGy.mjs → audience-BSvOEbco.mjs} +1 -1
- package/dist/{calls-DhkVJ32C.mjs → calls-COIxX32d.mjs} +1 -1
- package/dist/{db-DpCMc0uz.mjs → db-D5SXZrp5.mjs} +4 -4
- package/dist/{deploy-BnRQusjJ.mjs → deploy-D8OZyhH8.mjs} +5 -5
- package/dist/{dev-BLjgtBpg.mjs → dev-BQ77vmCk.mjs} +4 -4
- package/dist/dev-Z3bI5hgh.mjs +2 -0
- package/dist/{docs-DjKdWQkK.mjs → docs-Cd6VzYts.mjs} +2 -2
- package/dist/{egress-BM4EpLBh.mjs → egress-BoGWBHRa.mjs} +1 -1
- package/dist/{feedback-DYWJ-g39.mjs → feedback-BkrdL92o.mjs} +2 -2
- package/dist/index.mjs +35 -35
- package/dist/{local-zQRuHCl2.mjs → local-C6ggy2PQ.mjs} +1 -1
- package/dist/{login-2MW9sGJO.mjs → login-DrMr99-A.mjs} +3 -3
- package/dist/{logs-dZMPTJLu.mjs → logs-DJWrL6ja.mjs} +1 -1
- package/dist/{mcp-ByQm8vmX.mjs → mcp-Bt9Z9kdf.mjs} +1 -1
- package/dist/{open-DcQSdfx5.mjs → open-6ev_6m0p.mjs} +1 -1
- package/dist/{package-JIon4dQ6.mjs → package-Sir3152_.mjs} +1 -1
- package/dist/project-template-ChFb7A_H.mjs +2 -0
- package/dist/{project-template-BPW_Dgxj.mjs → project-template-DHWdVc6E.mjs} +1 -1
- package/dist/{projects-CnU3194_.mjs → projects-Z8ufQIBc.mjs} +5 -5
- package/dist/{rename-BWvERJgA.mjs → rename-PIJmdzHk.mjs} +1 -1
- package/dist/repo-CGTFmIWM.mjs +2 -0
- package/dist/{repo-6a7gRQaf.mjs → repo-Dry87b9d.mjs} +1 -1
- package/dist/{roles-S2D9Id0W.mjs → roles-CUFRTp_R.mjs} +1 -1
- package/dist/{roles-CrYf_8wk.mjs → roles-CXY226VM.mjs} +1 -1
- package/dist/{schedule-DvHSSzfR.mjs → schedule-DJsclUxC.mjs} +1 -1
- package/dist/{secrets-BIn2RPoe.mjs → secrets-CV2IwVwU.mjs} +1 -1
- package/dist/{skill-E31hpdtT.mjs → skill-Bxc5E-wu.mjs} +2 -2
- package/dist/{staging-Dn8kH9cK.mjs → staging-B9sjqvfh.mjs} +3 -3
- package/dist/{token-DMCj88A-.mjs → token-BT2_ELX6.mjs} +1 -1
- package/dist/{ui-26ETk1n8.mjs → ui-Ddw4d2Nn.mjs} +21 -2
- package/dist/{upgrade-iGfgX5fx.mjs → upgrade-DOpeMSWD.mjs} +2 -2
- package/dist/{usage-Bpz5B1N1.mjs → usage-VMT75MZ4.mjs} +1 -1
- package/package.json +1 -1
- package/dist/dev-BhfzaNja.mjs +0 -2
- package/dist/project-template-Dw11151p.mjs +0 -2
- package/dist/repo-C7AXDtFZ.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors } from "./ui-
|
|
3
|
+
import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import * as p from "@clack/prompts";
|
|
6
6
|
//#region src/audience.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors, t as formatDateTime } from "./ui-
|
|
3
|
+
import { r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/calls.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext, r as apiDataRequest } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as spinner$1, i as requireTty, o as unwrap, r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { n as migrateProject, r as readMigrationFiles, t as describeMigrateResult } from "./migrations-BReMlGWP.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
@@ -46,7 +46,7 @@ const pullCommand = defineCommand({
|
|
|
46
46
|
run: reportErrors("db pull", async ({ args }) => {
|
|
47
47
|
const { slug } = resolveProject(args);
|
|
48
48
|
const out = args.out ?? `${slug}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replaceAll(/[:T]/g, "-")}.sql`;
|
|
49
|
-
const spin =
|
|
49
|
+
const spin = spinner$1();
|
|
50
50
|
spin.start(`Exporting ${slug}${channelNote(args)}…`);
|
|
51
51
|
try {
|
|
52
52
|
const { url } = await apiDataRequest("POST", "/db/export", slug, void 0, void 0, channelOf(args));
|
|
@@ -72,7 +72,7 @@ const snapshotCommand = defineCommand({
|
|
|
72
72
|
},
|
|
73
73
|
run: reportErrors("db snapshot", async ({ args }) => {
|
|
74
74
|
const { slug } = resolveProject(args);
|
|
75
|
-
const spin =
|
|
75
|
+
const spin = spinner$1();
|
|
76
76
|
spin.start(`Snapshotting ${slug}${channelNote(args)}…`);
|
|
77
77
|
let created;
|
|
78
78
|
try {
|
|
@@ -327,7 +327,7 @@ const migrateCommand = defineCommand({
|
|
|
327
327
|
for (const line of describeMigrateResult(result)) console.log(line);
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
const spin =
|
|
330
|
+
const spin = spinner$1();
|
|
331
331
|
spin.start(`Migrating ${slug}${channelNote(args)}…`);
|
|
332
332
|
let result;
|
|
333
333
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject, l as projectFlagArgs, m as tryReadCanopyJson, p as stagingUrl, r as siteConfig, u as projectUrl } from "./site-BL5Ik-yj.mjs";
|
|
2
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-DmJrIsE7.mjs";
|
|
3
|
-
import { a as unwrap, r as reportErrors, t as formatDateTime } from "./ui-
|
|
3
|
+
import { a as spinner$1, o as unwrap, r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { n as migrateProject, r as readMigrationFiles, t as describeMigrateResult } from "./migrations-BReMlGWP.mjs";
|
|
5
5
|
import { builtinModules } from "node:module";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
@@ -274,7 +274,7 @@ const deployCommand = defineCommand({
|
|
|
274
274
|
let workerBytes = null;
|
|
275
275
|
if (config.worker && !args.worker) p.log.warn(`Skipping the backend (${config.worker}) — deploying the frontend only.`);
|
|
276
276
|
if (config.worker && args.worker) {
|
|
277
|
-
const spinWorker =
|
|
277
|
+
const spinWorker = spinner$1();
|
|
278
278
|
spinWorker.start(`Bundling worker ${config.worker}`);
|
|
279
279
|
try {
|
|
280
280
|
workerBytes = await bundleWorker(dir, config.worker);
|
|
@@ -286,7 +286,7 @@ const deployCommand = defineCommand({
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
const source = process.env["GITHUB_ACTIONS"] ? { "x-canopy-source": "github-action" } : {};
|
|
289
|
-
const spin =
|
|
289
|
+
const spin = spinner$1();
|
|
290
290
|
const workerNote = workerBytes ? " + worker" : "";
|
|
291
291
|
const channelNote = channel === "staging" ? " [staging]" : "";
|
|
292
292
|
spin.start(`Deploying ${files.length} files${workerNote} (${(total / 1024).toFixed(0)} kB) → ${slug}${channelNote}`);
|
|
@@ -374,7 +374,7 @@ const promoteCommand = defineCommand({
|
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
const spin =
|
|
377
|
+
const spin = spinner$1();
|
|
378
378
|
spin.start(`Promoting ${slug} v${target} → live`);
|
|
379
379
|
let result;
|
|
380
380
|
try {
|
|
@@ -548,7 +548,7 @@ const downloadCommand = defineCommand({
|
|
|
548
548
|
else throw new Error("No live version to download — pass a version, e.g. v1.");
|
|
549
549
|
}
|
|
550
550
|
const out = args.out ?? `${slug}-v${target}.zip`;
|
|
551
|
-
const spin =
|
|
551
|
+
const spin = spinner$1();
|
|
552
552
|
spin.start(`Downloading ${slug} v${target}…`);
|
|
553
553
|
try {
|
|
554
554
|
const zip = await apiDownload(`/projects/${slug}/deploys/${target}/download`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject, m as tryReadCanopyJson, r as siteConfig, s as projectDialect } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext, t as ApiError } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors, t as formatDateTime } from "./ui-
|
|
3
|
+
import { r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { r as readMigrationFiles } from "./migrations-BReMlGWP.mjs";
|
|
5
5
|
import { i as stampWorkerHeaders, n as WORKER_ATTEST_HEADER } from "./src-DzU89gZN.mjs";
|
|
6
|
-
import { a as parseAppRoleFlag } from "./roles-
|
|
6
|
+
import { a as parseAppRoleFlag } from "./roles-CUFRTp_R.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";
|
|
@@ -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-C6ggy2PQ.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-C6ggy2PQ.mjs");
|
|
346
346
|
const sandbox = await createSandbox({
|
|
347
347
|
slug,
|
|
348
348
|
persistDir: join(flags.dir, ".canopy", "local"),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-Sir3152_.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";
|
|
5
|
-
import { r as reportErrors } from "./ui-
|
|
5
|
+
import { r as reportErrors } from "./ui-Ddw4d2Nn.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 { c as projectDirArgs, d as resolveProject } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as requireTty, o as unwrap, r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.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-Sir3152_.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
|
-
import { r as reportErrors, t as formatDateTime } from "./ui-
|
|
4
|
+
import { r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.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";
|
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-Sir3152_.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";
|
|
@@ -63,41 +63,41 @@ const main = defineCommand({
|
|
|
63
63
|
description: "canopy — create and deploy vibecoded projects"
|
|
64
64
|
},
|
|
65
65
|
subCommands: {
|
|
66
|
-
login: () => import("./login-
|
|
67
|
-
whoami: () => import("./login-
|
|
68
|
-
logout: () => import("./login-
|
|
69
|
-
create: () => import("./projects-
|
|
70
|
-
init: () => import("./projects-
|
|
71
|
-
projects: () => import("./projects-
|
|
72
|
-
delete: () => import("./projects-
|
|
73
|
-
rename: () => import("./rename-
|
|
74
|
-
dev: () => import("./dev-
|
|
75
|
-
deploy: () => import("./deploy-
|
|
76
|
-
promote: () => import("./deploy-
|
|
77
|
-
staging: () => import("./staging-
|
|
78
|
-
rollback: () => import("./deploy-
|
|
79
|
-
download: () => import("./deploy-
|
|
80
|
-
token: () => import("./token-
|
|
81
|
-
egress: () => import("./egress-
|
|
82
|
-
calls: () => import("./calls-
|
|
83
|
-
secrets: () => import("./secrets-
|
|
84
|
-
roles: () => import("./roles-
|
|
85
|
-
members: () => import("./roles-
|
|
86
|
-
schedule: () => import("./schedule-
|
|
87
|
-
feedback: () => import("./feedback-
|
|
88
|
-
db: () => import("./db-
|
|
89
|
-
usage: () => import("./usage-
|
|
90
|
-
ai: () => import("./ai-
|
|
91
|
-
open: () => import("./open-
|
|
66
|
+
login: () => import("./login-DrMr99-A.mjs").then((m) => m.loginCommand),
|
|
67
|
+
whoami: () => import("./login-DrMr99-A.mjs").then((m) => m.whoamiCommand),
|
|
68
|
+
logout: () => import("./login-DrMr99-A.mjs").then((m) => m.logoutCommand),
|
|
69
|
+
create: () => import("./projects-Z8ufQIBc.mjs").then((m) => m.createCommand),
|
|
70
|
+
init: () => import("./projects-Z8ufQIBc.mjs").then((m) => m.initCommand),
|
|
71
|
+
projects: () => import("./projects-Z8ufQIBc.mjs").then((m) => m.projectsCommand),
|
|
72
|
+
delete: () => import("./projects-Z8ufQIBc.mjs").then((m) => m.deleteCommand),
|
|
73
|
+
rename: () => import("./rename-PIJmdzHk.mjs").then((m) => m.renameCommand),
|
|
74
|
+
dev: () => import("./dev-Z3bI5hgh.mjs").then((m) => m.devCommand),
|
|
75
|
+
deploy: () => import("./deploy-D8OZyhH8.mjs").then((m) => m.deployCommand),
|
|
76
|
+
promote: () => import("./deploy-D8OZyhH8.mjs").then((m) => m.promoteCommand),
|
|
77
|
+
staging: () => import("./staging-B9sjqvfh.mjs").then((m) => m.stagingCommand),
|
|
78
|
+
rollback: () => import("./deploy-D8OZyhH8.mjs").then((m) => m.rollbackCommand),
|
|
79
|
+
download: () => import("./deploy-D8OZyhH8.mjs").then((m) => m.downloadCommand),
|
|
80
|
+
token: () => import("./token-BT2_ELX6.mjs").then((m) => m.tokenCommand),
|
|
81
|
+
egress: () => import("./egress-BoGWBHRa.mjs").then((m) => m.egressCommand),
|
|
82
|
+
calls: () => import("./calls-COIxX32d.mjs").then((m) => m.callsCommand),
|
|
83
|
+
secrets: () => import("./secrets-CV2IwVwU.mjs").then((m) => m.secretsCommand),
|
|
84
|
+
roles: () => import("./roles-CXY226VM.mjs").then((m) => m.rolesCommand),
|
|
85
|
+
members: () => import("./roles-CXY226VM.mjs").then((m) => m.membersCommand),
|
|
86
|
+
schedule: () => import("./schedule-DJsclUxC.mjs").then((m) => m.scheduleCommand),
|
|
87
|
+
feedback: () => import("./feedback-BkrdL92o.mjs").then((m) => m.feedbackCommand),
|
|
88
|
+
db: () => import("./db-D5SXZrp5.mjs").then((m) => m.dbCommand),
|
|
89
|
+
usage: () => import("./usage-VMT75MZ4.mjs").then((m) => m.usageCommand),
|
|
90
|
+
ai: () => import("./ai-BjnuSjmw.mjs").then((m) => m.aiCommand),
|
|
91
|
+
open: () => import("./open-6ev_6m0p.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-
|
|
96
|
-
logs: () => import("./logs-
|
|
97
|
-
mcp: () => import("./mcp-
|
|
98
|
-
repo: () => import("./repo-
|
|
99
|
-
template: () => import("./project-template-
|
|
100
|
-
audience: () => import("./audience-
|
|
93
|
+
docs: () => import("./docs-Cd6VzYts.mjs").then((m) => m.docsCommand),
|
|
94
|
+
skill: () => import("./skill-Bxc5E-wu.mjs").then((m) => m.skillCommand),
|
|
95
|
+
upgrade: () => import("./upgrade-DOpeMSWD.mjs").then((m) => m.upgradeCommand),
|
|
96
|
+
logs: () => import("./logs-DJWrL6ja.mjs").then((m) => m.logsCommand),
|
|
97
|
+
mcp: () => import("./mcp-Bt9Z9kdf.mjs").then((m) => m.mcpCommand),
|
|
98
|
+
repo: () => import("./repo-CGTFmIWM.mjs").then((m) => m.repoCommand),
|
|
99
|
+
template: () => import("./project-template-ChFb7A_H.mjs").then((m) => m.templateCommand),
|
|
100
|
+
audience: () => import("./audience-BSvOEbco.mjs").then((m) => m.audienceCommand)
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
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 { 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-BQ77vmCk.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,6 +1,6 @@
|
|
|
1
1
|
import { C as isProfileId, S as getBakedProfile, _ as listBakedProfiles, b as upsertProfileAuth, g as clearAllProfileTokens, r as siteConfig, v as readConfigFile, x as writeConfigFile, y as setActiveProfile } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { n as agentHeaders } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { n as openBrowser, r as reportErrors } from "./ui-
|
|
3
|
+
import { a as spinner$1, n as openBrowser, r as reportErrors } from "./ui-Ddw4d2Nn.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";
|
|
@@ -251,7 +251,7 @@ async function login(json, profileFlag) {
|
|
|
251
251
|
}).toString();
|
|
252
252
|
const authorizeHref = authorizeUrl.toString();
|
|
253
253
|
openBrowser(authorizeHref);
|
|
254
|
-
const spin = json ? void 0 :
|
|
254
|
+
const spin = json ? void 0 : spinner$1();
|
|
255
255
|
if (json) console.log(JSON.stringify({
|
|
256
256
|
status: "waiting",
|
|
257
257
|
url: authorizeHref
|
|
@@ -284,7 +284,7 @@ async function login(json, profileFlag) {
|
|
|
284
284
|
if (!tokenRes.ok) throw new Error(`Token exchange failed: ${tokenRes.status} ${await tokenRes.text()}`);
|
|
285
285
|
const { id_token: idToken } = await tokenRes.json();
|
|
286
286
|
if (!idToken) throw new Error("OneLogin returned no id_token.");
|
|
287
|
-
const mintSpin = json ? void 0 :
|
|
287
|
+
const mintSpin = json ? void 0 : spinner$1();
|
|
288
288
|
mintSpin?.start("Minting CLI tokens for each site…");
|
|
289
289
|
const results = [];
|
|
290
290
|
for (const prof of listBakedProfiles()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors } from "./ui-
|
|
3
|
+
import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/logs.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-Sir3152_.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,5 +1,5 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject, p as stagingUrl, u as projectUrl } from "./site-BL5Ik-yj.mjs";
|
|
2
|
-
import { n as openBrowser, r as reportErrors } from "./ui-
|
|
2
|
+
import { n as openBrowser, r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/open.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as requireTty, o as unwrap, r as reportErrors } from "./ui-Ddw4d2Nn.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,8 +1,8 @@
|
|
|
1
1
|
import { m as tryReadCanopyJson, r as siteConfig, u as projectUrl } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { a as
|
|
4
|
-
import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-
|
|
5
|
-
import { a as offerRepoOnCreate, i as githubOrigin, n as cloneProjectRepo } from "./repo-
|
|
3
|
+
import { a as spinner$1, i as requireTty, o as unwrap, r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
|
+
import { i as nextSteps, n as describeCopy, r as fetchTemplate, t as TEMPLATE_FIXES } from "./project-template-DHWdVc6E.mjs";
|
|
5
|
+
import { a as offerRepoOnCreate, i as githubOrigin, n as cloneProjectRepo } from "./repo-Dry87b9d.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { join, relative, resolve, sep } from "node:path";
|
|
@@ -170,7 +170,7 @@ const createCommand = defineCommand({
|
|
|
170
170
|
}
|
|
171
171
|
const targetDir = resolve(slug);
|
|
172
172
|
if (scaffold && existsSync(targetDir)) throw new Error(`Directory ./${slug} already exists — remove it, or use --no-scaffold to only register.`);
|
|
173
|
-
const spin =
|
|
173
|
+
const spin = spinner$1();
|
|
174
174
|
spin.start(`Registering ${slug}…`);
|
|
175
175
|
let project;
|
|
176
176
|
try {
|
|
@@ -228,7 +228,7 @@ async function createFromTemplate(name, slug, from) {
|
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
const spin =
|
|
231
|
+
const spin = spinner$1();
|
|
232
232
|
spin.start(`Creating ${slug} from ${from}…`);
|
|
233
233
|
let project;
|
|
234
234
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject, f as rewriteCanopyJsonSlug, u as projectUrl } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as requireTty, o as unwrap, r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import * as p from "@clack/prompts";
|
|
6
6
|
//#region src/rename.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as parseGithubRemote, c as projectDirArgs, d as resolveProject, l as projectFlagArgs, m as tryReadCanopyJson, o as parseRepositoryArg, r as siteConfig } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, f as noticeRenamesOnly, m as withContext, n as agentHeaders, u as followRename } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as requireTty, o as unwrap, r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { a as parseCredentialInput, i as helperCommand, o as runCredentialHelper, r as fileTokenCache, t as RepoCredentialError } from "./repo-credential-CNDRM-tG.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
import { existsSync, realpathSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as requireTty, o as unwrap, r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import * as p from "@clack/prompts";
|
|
6
6
|
//#region src/roles.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as membersCommand, o as rolesCommand } from "./roles-
|
|
1
|
+
import { i as membersCommand, o as rolesCommand } from "./roles-CUFRTp_R.mjs";
|
|
2
2
|
export { membersCommand, rolesCommand };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors, t as formatDateTime } from "./ui-
|
|
3
|
+
import { r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/schedule.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { o as unwrap, r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import * as p from "@clack/prompts";
|
|
6
6
|
//#region src/secrets.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
2
|
-
import { r as reportErrors } from "./ui-
|
|
1
|
+
import { t as version } from "./package-Sir3152_.mjs";
|
|
2
|
+
import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { cpSync, existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { homedir } from "node:os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as resolveProject, l as projectFlagArgs, p as stagingUrl, u as projectUrl } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as spinner$1, i as requireTty, o as unwrap, r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import * as p from "@clack/prompts";
|
|
6
6
|
//#region src/staging.ts
|
|
@@ -100,7 +100,7 @@ const stagingCommand = defineCommand({
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
const spin =
|
|
103
|
+
const spin = spinner$1();
|
|
104
104
|
spin.start(`Cloning live → staging for ${slug}…`);
|
|
105
105
|
try {
|
|
106
106
|
await withContext(apiRequest("POST", `/projects/${slug}/staging/sync`), {
|
|
@@ -136,7 +136,7 @@ const stagingCommand = defineCommand({
|
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
const spin =
|
|
139
|
+
const spin = spinner$1();
|
|
140
140
|
spin.start(`Destroying staging for ${slug}…`);
|
|
141
141
|
try {
|
|
142
142
|
await withContext(apiRequest("DELETE", `/projects/${slug}/staging`), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as projectDirArgs, d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors, t as formatDateTime } from "./ui-
|
|
3
|
+
import { r as reportErrors, t as formatDateTime } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
const tokenCommand = defineCommand({
|
|
6
6
|
meta: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ApiError } from "./api-DmJrIsE7.mjs";
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
|
-
import { cancel, isCancel } from "@clack/prompts";
|
|
3
|
+
import { cancel, isCancel, spinner } from "@clack/prompts";
|
|
4
4
|
//#region src/ui.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shared terminal UX plumbing: clack prompt unwrapping and uniform
|
|
@@ -14,6 +14,25 @@ function unwrap(result) {
|
|
|
14
14
|
}
|
|
15
15
|
return result;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A progress spinner that degrades to plain lines off a TTY. clack's spinner
|
|
19
|
+
* animates regardless: every frame repaints one line with cursor escapes and
|
|
20
|
+
* the final message lands on that same line, so an agent shell or a log file
|
|
21
|
+
* shows a bare "│" and never the result (dashboard-32: deploys that went live
|
|
22
|
+
* looked silent and got re-run).
|
|
23
|
+
*/
|
|
24
|
+
function spinner$1(output = process.stdout) {
|
|
25
|
+
if (output.isTTY) return spinner({ output });
|
|
26
|
+
const line = (msg) => {
|
|
27
|
+
if (msg) output.write(`${msg}\n`);
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
start: line,
|
|
31
|
+
message: line,
|
|
32
|
+
stop: line,
|
|
33
|
+
error: line
|
|
34
|
+
};
|
|
35
|
+
}
|
|
17
36
|
/** Terminal width to wrap error copy to, bounded so it stays readable. */
|
|
18
37
|
const TEXT_WIDTH = Math.min(process.stdout.columns || 80, 88);
|
|
19
38
|
/** Render ` Label text…`, wrapping and aligning continuation lines under the text. */
|
|
@@ -120,4 +139,4 @@ function openBrowser(url) {
|
|
|
120
139
|
}).on("error", () => {}).unref();
|
|
121
140
|
}
|
|
122
141
|
//#endregion
|
|
123
|
-
export {
|
|
142
|
+
export { spinner$1 as a, requireTty as i, openBrowser as n, unwrap as o, reportErrors as r, formatDateTime as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as PACKAGE_NAME } from "./version-check-CcsA1QjI.mjs";
|
|
2
|
-
import { r as reportErrors } from "./ui-
|
|
2
|
+
import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -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-Bxc5E-wu.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());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as resolveProject, l as projectFlagArgs } from "./site-BL5Ik-yj.mjs";
|
|
2
2
|
import { a as apiRequest, m as withContext } from "./api-DmJrIsE7.mjs";
|
|
3
|
-
import { r as reportErrors } from "./ui-
|
|
3
|
+
import { r as reportErrors } from "./ui-Ddw4d2Nn.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/usage.ts
|
|
6
6
|
/**
|
package/package.json
CHANGED
package/dist/dev-BhfzaNja.mjs
DELETED
package/dist/repo-C7AXDtFZ.mjs
DELETED