vela 0.23.0 → 0.25.0
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/bin.js +366 -215
- package/dist/bin.js.map +4 -4
- package/package.json +4 -4
- package/templates/server/provision.sh +10 -2
package/dist/bin.js
CHANGED
|
@@ -13,14 +13,14 @@ function normalizeArgv(argv) {
|
|
|
13
13
|
// src/program.ts
|
|
14
14
|
import process55 from "node:process";
|
|
15
15
|
import * as p75 from "@clack/prompts";
|
|
16
|
-
import { Command as
|
|
16
|
+
import { Command as Command124 } from "commander";
|
|
17
17
|
import nodePath from "node:path";
|
|
18
18
|
import dotenv2 from "dotenv";
|
|
19
19
|
|
|
20
20
|
// package.json
|
|
21
21
|
var package_default = {
|
|
22
22
|
name: "vela",
|
|
23
|
-
version: "0.
|
|
23
|
+
version: "0.25.0",
|
|
24
24
|
type: "module",
|
|
25
25
|
description: "A CLI for creating and updating SvelteKit projects",
|
|
26
26
|
license: "MIT",
|
|
@@ -64,7 +64,7 @@ var package_default = {
|
|
|
64
64
|
dependencies: {
|
|
65
65
|
"@clack/prompts": "^1.7.0",
|
|
66
66
|
"@faker-js/faker": "^10.6.0",
|
|
67
|
-
"@velastack/patterns": "^0.
|
|
67
|
+
"@velastack/patterns": "^0.12.0",
|
|
68
68
|
"@velastack/pocketbase-codegen": "^0.1.0",
|
|
69
69
|
"@velastack/schema": "^0.3.0",
|
|
70
70
|
"@velastack/schema-ui": "^0.3.1",
|
|
@@ -72,7 +72,7 @@ var package_default = {
|
|
|
72
72
|
commander: "^15.0.0",
|
|
73
73
|
"cross-spawn": "^7.0.6",
|
|
74
74
|
dedent: "^1.7.2",
|
|
75
|
-
devalue: "^
|
|
75
|
+
devalue: "^6.0.3",
|
|
76
76
|
dotenv: "^18.0.1",
|
|
77
77
|
"fetch-cookie": "^3.2.0",
|
|
78
78
|
"json-schema-faker": "^0.6.3",
|
|
@@ -82,7 +82,7 @@ var package_default = {
|
|
|
82
82
|
pocketbase: "^0.28.0",
|
|
83
83
|
"pocketbase-server": "^0.40.6-beta.5",
|
|
84
84
|
stripe: "^23.0.1",
|
|
85
|
-
sv: "~1.
|
|
85
|
+
sv: "~1.2.0",
|
|
86
86
|
svelte: "^5.56.10",
|
|
87
87
|
tar: "^7.5.22",
|
|
88
88
|
tinyexec: "^1.3.0",
|
|
@@ -894,7 +894,7 @@ var entrySchema = v2.object({
|
|
|
894
894
|
),
|
|
895
895
|
/** The schema.org type its JSON-LD describes (`ProfessionalService`, `Restaurant`, …). */
|
|
896
896
|
schemaType: v2.optional(v2.string()),
|
|
897
|
-
/** Tarball location, relative to the index URL. */
|
|
897
|
+
/** Tarball location, relative to the index URL; a paid entry's names velastack.dev's download, which `resolveDownloadUrl` derives itself. */
|
|
898
898
|
file: v2.string(),
|
|
899
899
|
sha256: v2.pipe(v2.string(), v2.regex(/^[0-9a-f]{64}$/)),
|
|
900
900
|
size: v2.optional(v2.number()),
|
|
@@ -957,10 +957,11 @@ async function readBytes(url, options) {
|
|
|
957
957
|
signal: AbortSignal.timeout(options.timeoutMs)
|
|
958
958
|
});
|
|
959
959
|
if (!res.ok) {
|
|
960
|
-
throw new
|
|
960
|
+
throw new DownloadRefused(res.status, res.statusText, await res.text().catch(() => ""));
|
|
961
961
|
}
|
|
962
962
|
return new Uint8Array(await res.arrayBuffer());
|
|
963
963
|
}
|
|
964
|
+
var headersObject = (headers) => headers ? Object.fromEntries(new Headers(headers)) : {};
|
|
964
965
|
async function fetchTemplateIndex(url, options = {}) {
|
|
965
966
|
const now = options.now ?? Date.now();
|
|
966
967
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
@@ -981,9 +982,47 @@ async function fetchTemplateIndex(url, options = {}) {
|
|
|
981
982
|
return { index: null, stale: false, reason };
|
|
982
983
|
}
|
|
983
984
|
}
|
|
984
|
-
|
|
985
|
+
var isPaidEntry = (entry) => (entry.price ?? 0) > 0;
|
|
986
|
+
function resolveDownloadUrl(entry, indexUrl, apiUrl = API_URL) {
|
|
987
|
+
if (isPaidEntry(entry)) return `${apiUrl}/v1/templates/${entry.name}/download`;
|
|
985
988
|
return new URL(entry.file, indexUrl).href;
|
|
986
989
|
}
|
|
990
|
+
var DownloadRefused = class extends Error {
|
|
991
|
+
status;
|
|
992
|
+
body;
|
|
993
|
+
constructor(status3, statusText, body) {
|
|
994
|
+
super(`${status3} ${statusText}`.trim());
|
|
995
|
+
this.status = status3;
|
|
996
|
+
this.body = body;
|
|
997
|
+
}
|
|
998
|
+
};
|
|
999
|
+
var TemplateNotPurchased = class extends Error {
|
|
1000
|
+
constructor(entry, url) {
|
|
1001
|
+
super(
|
|
1002
|
+
`${entry.title ?? entry.name} is a paid template (US$${entry.price}). Buy it for your team at ${url}, then run this again.`
|
|
1003
|
+
);
|
|
1004
|
+
this.entry = entry;
|
|
1005
|
+
this.url = url;
|
|
1006
|
+
}
|
|
1007
|
+
entry;
|
|
1008
|
+
url;
|
|
1009
|
+
name = "TemplateNotPurchased";
|
|
1010
|
+
};
|
|
1011
|
+
function paidDownloadError(entry, error) {
|
|
1012
|
+
if (error.status === 402) {
|
|
1013
|
+
let url = `https://velabase.dev/templates/${entry.name}`;
|
|
1014
|
+
try {
|
|
1015
|
+
const parsed = JSON.parse(error.body);
|
|
1016
|
+
if (typeof parsed.url === "string") url = parsed.url;
|
|
1017
|
+
} catch {
|
|
1018
|
+
}
|
|
1019
|
+
return new TemplateNotPurchased(entry, url);
|
|
1020
|
+
}
|
|
1021
|
+
if (error.status === 401) {
|
|
1022
|
+
return new Error(`velastack.dev did not accept your login. Run \`vela login\` and try again.`);
|
|
1023
|
+
}
|
|
1024
|
+
return new Error(`Could not download template ${entry.name}: ${error.message}`);
|
|
1025
|
+
}
|
|
987
1026
|
function sha256(bytes) {
|
|
988
1027
|
return createHash("sha256").update(bytes).digest("hex");
|
|
989
1028
|
}
|
|
@@ -1003,11 +1042,19 @@ async function downloadTemplate(entry, indexUrl, options = {}) {
|
|
|
1003
1042
|
haveTarball = sha256(cached2) === entry.sha256;
|
|
1004
1043
|
}
|
|
1005
1044
|
if (!haveTarball) {
|
|
1006
|
-
const
|
|
1045
|
+
const paid = isPaidEntry(entry);
|
|
1046
|
+
if (paid && !options.apiKey) {
|
|
1047
|
+
throw new Error(
|
|
1048
|
+
`${entry.title ?? entry.name} is a paid template. Run \`vela login\` (or set VELA_API_KEY) so velastack.dev can check it was bought for you.`
|
|
1049
|
+
);
|
|
1050
|
+
}
|
|
1051
|
+
const url = resolveDownloadUrl(entry, indexUrl, options.apiUrl);
|
|
1052
|
+
const headers = paid ? { ...headersObject(options.headers), Authorization: `Bearer ${options.apiKey}` } : options.headers;
|
|
1007
1053
|
let fetched;
|
|
1008
1054
|
try {
|
|
1009
|
-
fetched = await readBytes(url, { timeoutMs, headers
|
|
1055
|
+
fetched = await readBytes(url, { timeoutMs, headers });
|
|
1010
1056
|
} catch (e) {
|
|
1057
|
+
if (paid && e instanceof DownloadRefused) throw paidDownloadError(entry, e);
|
|
1011
1058
|
throw new Error(`Could not download template ${entry.name}: ${e.message}`);
|
|
1012
1059
|
}
|
|
1013
1060
|
const digest = sha256(fetched);
|
|
@@ -1115,13 +1162,13 @@ function templateChoicesMessage(templates) {
|
|
|
1115
1162
|
}
|
|
1116
1163
|
return [...groups].map(([category, names]) => `${category}: ${names.join(", ")}`).join("; ");
|
|
1117
1164
|
}
|
|
1118
|
-
async function resolveTemplate(template) {
|
|
1165
|
+
async function resolveTemplate(template, options = {}) {
|
|
1119
1166
|
if (!("entry" in template)) {
|
|
1120
1167
|
return { ...template, cleanup() {
|
|
1121
1168
|
} };
|
|
1122
1169
|
}
|
|
1123
1170
|
const { entry, indexUrl, ...info } = template;
|
|
1124
|
-
const dir = await downloadTemplate(entry, indexUrl);
|
|
1171
|
+
const dir = await downloadTemplate(entry, indexUrl, { apiKey: options.apiKey });
|
|
1125
1172
|
return {
|
|
1126
1173
|
...info,
|
|
1127
1174
|
dir,
|
|
@@ -3745,6 +3792,12 @@ async function createProject(apiKey, args) {
|
|
|
3745
3792
|
})
|
|
3746
3793
|
});
|
|
3747
3794
|
}
|
|
3795
|
+
async function purchaseTemplate(apiKey, slug2, teamId) {
|
|
3796
|
+
return apiFetch(apiKey, `/v1/templates/${slug2}/purchase`, {
|
|
3797
|
+
method: "POST",
|
|
3798
|
+
body: JSON.stringify({ team: teamId })
|
|
3799
|
+
});
|
|
3800
|
+
}
|
|
3748
3801
|
async function registerServer(apiKey, input) {
|
|
3749
3802
|
return apiFetch(apiKey, "/v1/servers", {
|
|
3750
3803
|
method: "POST",
|
|
@@ -6414,7 +6467,7 @@ async function createProject2(cwdArg, options, listing) {
|
|
|
6414
6467
|
const template = findTemplate(listing, options.template ?? DEFAULT_TEMPLATE);
|
|
6415
6468
|
checkFlagsForTemplate(template, options);
|
|
6416
6469
|
const gallerySchema = options.schema ? findGallerySchema(options.schema) : void 0;
|
|
6417
|
-
const resolved = await resolveCreatableTemplate(template);
|
|
6470
|
+
const resolved = await resolveCreatableTemplate(template, options);
|
|
6418
6471
|
const onCancel2 = () => {
|
|
6419
6472
|
resolved.cleanup();
|
|
6420
6473
|
p12.cancel("Operation cancelled.");
|
|
@@ -6476,9 +6529,28 @@ async function createProject2(cwdArg, options, listing) {
|
|
|
6476
6529
|
}
|
|
6477
6530
|
return { directory: projectPath, packageManager: packageManager2, installed: installed2, migrated, name, template, link: link2 };
|
|
6478
6531
|
}
|
|
6479
|
-
async function resolveCreatableTemplate(template) {
|
|
6532
|
+
async function resolveCreatableTemplate(template, options = {}) {
|
|
6533
|
+
let apiKey = readApiKey();
|
|
6534
|
+
if ((template.price ?? 0) > 0 && !apiKey) {
|
|
6535
|
+
if (!isInteractive()) {
|
|
6536
|
+
throw new Error(
|
|
6537
|
+
`${template.name} is a paid template. Run \`vela login\` or set VELA_API_KEY, then run this again.`
|
|
6538
|
+
);
|
|
6539
|
+
}
|
|
6540
|
+
p12.log.info(
|
|
6541
|
+
`${template.name} is a paid template (US$${template.price}). Log in to velastack.dev to download it.`
|
|
6542
|
+
);
|
|
6543
|
+
apiKey = await loginInteractively();
|
|
6544
|
+
}
|
|
6480
6545
|
if (template.source === "remote") p12.log.step(`Downloading template ${template.name}...`);
|
|
6481
|
-
|
|
6546
|
+
let resolved;
|
|
6547
|
+
try {
|
|
6548
|
+
resolved = await resolveTemplate(template, { apiKey });
|
|
6549
|
+
} catch (error) {
|
|
6550
|
+
if (!(error instanceof TemplateNotPurchased) || !apiKey || !isInteractive()) throw error;
|
|
6551
|
+
await buyTemplate(error, apiKey, options);
|
|
6552
|
+
resolved = await resolveTemplate(template, { apiKey });
|
|
6553
|
+
}
|
|
6482
6554
|
const blocker = findKit3Blocker(resolved.dir);
|
|
6483
6555
|
if (blocker) {
|
|
6484
6556
|
resolved.cleanup();
|
|
@@ -6486,6 +6558,31 @@ async function resolveCreatableTemplate(template) {
|
|
|
6486
6558
|
}
|
|
6487
6559
|
return resolved;
|
|
6488
6560
|
}
|
|
6561
|
+
async function buyTemplate(refusal, apiKey, options) {
|
|
6562
|
+
const { entry } = refusal;
|
|
6563
|
+
const title = entry.title ?? entry.name;
|
|
6564
|
+
p12.log.warn(`${title} is a paid template (US$${entry.price}).`);
|
|
6565
|
+
const team = await resolveTeam(await listTeams(apiKey), {
|
|
6566
|
+
teamId: options.team,
|
|
6567
|
+
interactive: true
|
|
6568
|
+
});
|
|
6569
|
+
const confirmed = await p12.confirm({
|
|
6570
|
+
message: `Buy ${title} for US$${entry.price} for ${team.name}? The card on file at velastack.dev is charged.`
|
|
6571
|
+
});
|
|
6572
|
+
if (p12.isCancel(confirmed) || !confirmed) throw refusal;
|
|
6573
|
+
if (options.link === void 0 || options.link === "new") options.team = team.id;
|
|
6574
|
+
const outcome = await purchaseTemplate(apiKey, entry.name, team.id);
|
|
6575
|
+
if (outcome.status === "purchased") {
|
|
6576
|
+
const card = outcome.last4 ? ` on the card ending ${outcome.last4}` : "";
|
|
6577
|
+
p12.log.success(`Bought ${title} for ${team.name}${card}. It is yours to deploy again any time.`);
|
|
6578
|
+
return;
|
|
6579
|
+
}
|
|
6580
|
+
p12.log.info(`${outcome.message}
|
|
6581
|
+
Buy it in the browser, then come back here:
|
|
6582
|
+
${outcome.url}`);
|
|
6583
|
+
const done = await p12.confirm({ message: "Bought it? The download is tried again." });
|
|
6584
|
+
if (p12.isCancel(done) || !done) throw refusal;
|
|
6585
|
+
}
|
|
6489
6586
|
async function scaffoldProject(cwdArg, options, template, resolved, onCancel2) {
|
|
6490
6587
|
const interactive = isInteractive();
|
|
6491
6588
|
let directory;
|
|
@@ -7537,7 +7634,7 @@ var NEXT_STEPS = {
|
|
|
7537
7634
|
var generate = new Command11("generate").description("generate scaffolding for database models and forms").configureHelp(helpConfig).addCommand(form).addCommand(schema).addCommand(resource).addCommand(scaffold).addCommand(shop).addCommand(migration).addCommand(workflow);
|
|
7538
7635
|
|
|
7539
7636
|
// src/commands/enable.ts
|
|
7540
|
-
import { Command as
|
|
7637
|
+
import { Command as Command31 } from "commander";
|
|
7541
7638
|
|
|
7542
7639
|
// src/commands/enable/ai.ts
|
|
7543
7640
|
import { Command as Command12 } from "commander";
|
|
@@ -8195,9 +8292,35 @@ var notifications = new Command24("notifications").description("enable in-app no
|
|
|
8195
8292
|
)
|
|
8196
8293
|
);
|
|
8197
8294
|
|
|
8295
|
+
// src/commands/enable/og.ts
|
|
8296
|
+
import { Command as Command25 } from "commander";
|
|
8297
|
+
var og = new Command25("og").description("enable generated Open Graph images (a share card for every page)").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8298
|
+
(_opts, cmd) => runCommand(
|
|
8299
|
+
() => runPattern(
|
|
8300
|
+
"enable-og",
|
|
8301
|
+
cmd.args,
|
|
8302
|
+
{},
|
|
8303
|
+
{
|
|
8304
|
+
summary: "Enabled Open Graph images.",
|
|
8305
|
+
nextSteps: [
|
|
8306
|
+
"Design the card in `src/lib/og/card.svelte`; it is plain markup and CSS.",
|
|
8307
|
+
"Open `/og/index.png` to see the home page card, or `/og/<path>.png` for any other page.",
|
|
8308
|
+
"Set `url` in `src/lib/site.ts` to the deployed address: the image URL in the meta tags is built from it."
|
|
8309
|
+
],
|
|
8310
|
+
task: {
|
|
8311
|
+
title: "Enabling Open Graph images",
|
|
8312
|
+
success: "Enabled Open Graph images",
|
|
8313
|
+
error: "Failed to enable Open Graph images"
|
|
8314
|
+
}
|
|
8315
|
+
}
|
|
8316
|
+
),
|
|
8317
|
+
"Failed to enable Open Graph images."
|
|
8318
|
+
)
|
|
8319
|
+
);
|
|
8320
|
+
|
|
8198
8321
|
// src/commands/enable/cms.ts
|
|
8199
8322
|
import process20 from "node:process";
|
|
8200
|
-
import { Command as
|
|
8323
|
+
import { Command as Command26 } from "commander";
|
|
8201
8324
|
import * as p23 from "@clack/prompts";
|
|
8202
8325
|
import pc8 from "picocolors";
|
|
8203
8326
|
function resolveCmsBackend(facts) {
|
|
@@ -8215,7 +8338,7 @@ function adapterOf(root) {
|
|
|
8215
8338
|
return "none";
|
|
8216
8339
|
}
|
|
8217
8340
|
}
|
|
8218
|
-
var cms = new
|
|
8341
|
+
var cms = new Command26("cms").description("enable an inline-editing CMS with an admin bar").option(
|
|
8219
8342
|
"--endpoint <url>",
|
|
8220
8343
|
"read from a hosted CMS at this URL instead of installing the backend in this app"
|
|
8221
8344
|
).allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
@@ -8264,8 +8387,8 @@ Any one of these gives it one:
|
|
|
8264
8387
|
);
|
|
8265
8388
|
|
|
8266
8389
|
// src/commands/enable/blog.ts
|
|
8267
|
-
import { Command as
|
|
8268
|
-
var blog = new
|
|
8390
|
+
import { Command as Command27 } from "commander";
|
|
8391
|
+
var blog = new Command27("blog").description("enable an mdsvex blog with posts, tags, and RSS").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8269
8392
|
(_opts, cmd) => runCommand(
|
|
8270
8393
|
() => runPattern(
|
|
8271
8394
|
"enable-blog",
|
|
@@ -8291,8 +8414,8 @@ var blog = new Command26("blog").description("enable an mdsvex blog with posts,
|
|
|
8291
8414
|
|
|
8292
8415
|
// src/commands/enable/content-negotiation.ts
|
|
8293
8416
|
import process21 from "node:process";
|
|
8294
|
-
import { Command as
|
|
8295
|
-
var contentNegotiation = new
|
|
8417
|
+
import { Command as Command28 } from "commander";
|
|
8418
|
+
var contentNegotiation = new Command28("content-negotiation").description("enable content negotiation (sveltekit-negotiate)").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8296
8419
|
(_opts, cmd) => runCommand(
|
|
8297
8420
|
() => runPattern(
|
|
8298
8421
|
"enable-content-negotiation",
|
|
@@ -8318,8 +8441,8 @@ var contentNegotiation = new Command27("content-negotiation").description("enabl
|
|
|
8318
8441
|
);
|
|
8319
8442
|
|
|
8320
8443
|
// src/commands/enable/workflows.ts
|
|
8321
|
-
import { Command as
|
|
8322
|
-
var workflows = new
|
|
8444
|
+
import { Command as Command29 } from "commander";
|
|
8445
|
+
var workflows = new Command29("workflows").description("add background workflows to a project created before they were built in").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8323
8446
|
(_opts, cmd) => runCommand(
|
|
8324
8447
|
() => runPattern(
|
|
8325
8448
|
"enable-workflows",
|
|
@@ -8344,8 +8467,8 @@ var workflows = new Command28("workflows").description("add background workflows
|
|
|
8344
8467
|
);
|
|
8345
8468
|
|
|
8346
8469
|
// src/commands/enable/whatsapp.ts
|
|
8347
|
-
import { Command as
|
|
8348
|
-
var whatsapp = new
|
|
8470
|
+
import { Command as Command30 } from "commander";
|
|
8471
|
+
var whatsapp = new Command30("whatsapp").description("enable WhatsApp sign-in on the login and signup pages (requires auth)").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8349
8472
|
(_opts, cmd) => runCommand(
|
|
8350
8473
|
() => runPattern(
|
|
8351
8474
|
"enable-whatsapp",
|
|
@@ -8370,13 +8493,13 @@ var whatsapp = new Command29("whatsapp").description("enable WhatsApp sign-in on
|
|
|
8370
8493
|
);
|
|
8371
8494
|
|
|
8372
8495
|
// src/commands/enable.ts
|
|
8373
|
-
var enable = new
|
|
8496
|
+
var enable = new Command31("enable").description("enable features").configureHelp(helpConfig).addCommand(ai).addCommand(analytics).addCommand(auth).addCommand(api).addCommand(apiKeys).addCommand(backend).addCommand(contentNegotiation).addCommand(i18n).addCommand(teams).addCommand(payments).addCommand(ecommerce).addCommand(subscriptions).addCommand(orders).addCommand(notifications).addCommand(og).addCommand(cms).addCommand(blog).addCommand(workflows).addCommand(whatsapp);
|
|
8374
8497
|
|
|
8375
8498
|
// src/commands/disable.ts
|
|
8376
|
-
import { Command as
|
|
8499
|
+
import { Command as Command48 } from "commander";
|
|
8377
8500
|
|
|
8378
8501
|
// src/commands/disable/ai.ts
|
|
8379
|
-
import { Command as
|
|
8502
|
+
import { Command as Command32 } from "commander";
|
|
8380
8503
|
|
|
8381
8504
|
// src/commands/disable/_shared.ts
|
|
8382
8505
|
import process22 from "node:process";
|
|
@@ -8396,7 +8519,7 @@ async function runDisable(opts, flags, cmdArgs) {
|
|
|
8396
8519
|
}
|
|
8397
8520
|
|
|
8398
8521
|
// src/commands/disable/ai.ts
|
|
8399
|
-
var ai2 = new
|
|
8522
|
+
var ai2 = new Command32("ai").description("disable AI chat").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8400
8523
|
(opts, cmd) => runCommand(
|
|
8401
8524
|
() => runDisable(
|
|
8402
8525
|
{
|
|
@@ -8422,8 +8545,8 @@ var ai2 = new Command31("ai").description("disable AI chat").option("-y, --yes",
|
|
|
8422
8545
|
);
|
|
8423
8546
|
|
|
8424
8547
|
// src/commands/disable/analytics.ts
|
|
8425
|
-
import { Command as
|
|
8426
|
-
var analytics2 = new
|
|
8548
|
+
import { Command as Command33 } from "commander";
|
|
8549
|
+
var analytics2 = new Command33("analytics").description("disable web analytics").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8427
8550
|
(opts, cmd) => runCommand(
|
|
8428
8551
|
() => runDisable(
|
|
8429
8552
|
{
|
|
@@ -8449,8 +8572,8 @@ var analytics2 = new Command32("analytics").description("disable web analytics")
|
|
|
8449
8572
|
);
|
|
8450
8573
|
|
|
8451
8574
|
// src/commands/disable/auth.ts
|
|
8452
|
-
import { Command as
|
|
8453
|
-
var auth2 = new
|
|
8575
|
+
import { Command as Command34 } from "commander";
|
|
8576
|
+
var auth2 = new Command34("auth").description("disable authentication").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8454
8577
|
(opts, cmd) => runCommand(
|
|
8455
8578
|
() => runDisable(
|
|
8456
8579
|
{
|
|
@@ -8476,8 +8599,8 @@ var auth2 = new Command33("auth").description("disable authentication").option("
|
|
|
8476
8599
|
);
|
|
8477
8600
|
|
|
8478
8601
|
// src/commands/disable/api.ts
|
|
8479
|
-
import { Command as
|
|
8480
|
-
var api2 = new
|
|
8602
|
+
import { Command as Command35 } from "commander";
|
|
8603
|
+
var api2 = new Command35("api").description("disable the REST API").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8481
8604
|
(opts, cmd) => runCommand(
|
|
8482
8605
|
() => runDisable(
|
|
8483
8606
|
{
|
|
@@ -8500,8 +8623,8 @@ var api2 = new Command34("api").description("disable the REST API").option("-y,
|
|
|
8500
8623
|
);
|
|
8501
8624
|
|
|
8502
8625
|
// src/commands/disable/api-keys.ts
|
|
8503
|
-
import { Command as
|
|
8504
|
-
var apiKeys2 = new
|
|
8626
|
+
import { Command as Command36 } from "commander";
|
|
8627
|
+
var apiKeys2 = new Command36("api-keys").description("disable API key management").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8505
8628
|
(opts, cmd) => runCommand(
|
|
8506
8629
|
() => runDisable(
|
|
8507
8630
|
{
|
|
@@ -8524,8 +8647,8 @@ var apiKeys2 = new Command35("api-keys").description("disable API key management
|
|
|
8524
8647
|
);
|
|
8525
8648
|
|
|
8526
8649
|
// src/commands/disable/backend.ts
|
|
8527
|
-
import { Command as
|
|
8528
|
-
var backend2 = new
|
|
8650
|
+
import { Command as Command37 } from "commander";
|
|
8651
|
+
var backend2 = new Command37("backend").description("disable the PocketBase backend").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8529
8652
|
(opts, cmd) => runCommand(
|
|
8530
8653
|
() => runDisable(
|
|
8531
8654
|
{
|
|
@@ -8548,8 +8671,8 @@ var backend2 = new Command36("backend").description("disable the PocketBase back
|
|
|
8548
8671
|
);
|
|
8549
8672
|
|
|
8550
8673
|
// src/commands/disable/content-negotiation.ts
|
|
8551
|
-
import { Command as
|
|
8552
|
-
var contentNegotiation2 = new
|
|
8674
|
+
import { Command as Command38 } from "commander";
|
|
8675
|
+
var contentNegotiation2 = new Command38("content-negotiation").description("disable content negotiation").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8553
8676
|
(opts, cmd) => runCommand(
|
|
8554
8677
|
() => runDisable(
|
|
8555
8678
|
{
|
|
@@ -8572,8 +8695,8 @@ var contentNegotiation2 = new Command37("content-negotiation").description("disa
|
|
|
8572
8695
|
);
|
|
8573
8696
|
|
|
8574
8697
|
// src/commands/disable/i18n.ts
|
|
8575
|
-
import { Command as
|
|
8576
|
-
var i18n2 = new
|
|
8698
|
+
import { Command as Command39 } from "commander";
|
|
8699
|
+
var i18n2 = new Command39("i18n").description("disable internationalization").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8577
8700
|
(opts, cmd) => runCommand(
|
|
8578
8701
|
() => runDisable(
|
|
8579
8702
|
{
|
|
@@ -8597,8 +8720,8 @@ var i18n2 = new Command38("i18n").description("disable internationalization").op
|
|
|
8597
8720
|
);
|
|
8598
8721
|
|
|
8599
8722
|
// src/commands/disable/notifications.ts
|
|
8600
|
-
import { Command as
|
|
8601
|
-
var notifications2 = new
|
|
8723
|
+
import { Command as Command40 } from "commander";
|
|
8724
|
+
var notifications2 = new Command40("notifications").description("disable in-app notifications").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8602
8725
|
(opts, cmd) => runCommand(
|
|
8603
8726
|
() => runDisable(
|
|
8604
8727
|
{
|
|
@@ -8623,9 +8746,34 @@ var notifications2 = new Command39("notifications").description("disable in-app
|
|
|
8623
8746
|
)
|
|
8624
8747
|
);
|
|
8625
8748
|
|
|
8749
|
+
// src/commands/disable/og.ts
|
|
8750
|
+
import { Command as Command41 } from "commander";
|
|
8751
|
+
var og2 = new Command41("og").description("disable generated Open Graph images").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8752
|
+
(opts, cmd) => runCommand(
|
|
8753
|
+
() => runDisable(
|
|
8754
|
+
{
|
|
8755
|
+
slug: "disable-og",
|
|
8756
|
+
confirmMessage: "Disable Open Graph images? Deletes the card (including any changes to src/lib/og/card.svelte), its renderer and the /og route, takes withCard off the root layout and uninstalls @takumi-rs/core.",
|
|
8757
|
+
report: {
|
|
8758
|
+
summary: "Disabled Open Graph images.",
|
|
8759
|
+
nextSteps: ["Pages share the site-wide `static/og.jpg` again."],
|
|
8760
|
+
task: {
|
|
8761
|
+
title: "Disabling Open Graph images",
|
|
8762
|
+
success: "Disabled Open Graph images",
|
|
8763
|
+
error: "Failed to disable Open Graph images"
|
|
8764
|
+
}
|
|
8765
|
+
}
|
|
8766
|
+
},
|
|
8767
|
+
opts,
|
|
8768
|
+
cmd.args
|
|
8769
|
+
),
|
|
8770
|
+
"Failed to disable Open Graph images."
|
|
8771
|
+
)
|
|
8772
|
+
);
|
|
8773
|
+
|
|
8626
8774
|
// src/commands/disable/teams.ts
|
|
8627
|
-
import { Command as
|
|
8628
|
-
var teams2 = new
|
|
8775
|
+
import { Command as Command42 } from "commander";
|
|
8776
|
+
var teams2 = new Command42("teams").description("disable teams").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8629
8777
|
(opts, cmd) => runCommand(
|
|
8630
8778
|
() => runDisable(
|
|
8631
8779
|
{
|
|
@@ -8648,7 +8796,7 @@ var teams2 = new Command40("teams").description("disable teams").option("-y, --y
|
|
|
8648
8796
|
);
|
|
8649
8797
|
|
|
8650
8798
|
// src/commands/disable/payments.ts
|
|
8651
|
-
import { Command as
|
|
8799
|
+
import { Command as Command43 } from "commander";
|
|
8652
8800
|
var STRIPE = {
|
|
8653
8801
|
confirmMessage: "Disable payments? Drops Stripe collections, strips Stripe env credentials, reverts nav/signup edits, and removes generated payment files. Stripe dashboard products/prices and the stripe packages are untouched.",
|
|
8654
8802
|
nextSteps: [
|
|
@@ -8670,7 +8818,7 @@ var WHATSAPP = {
|
|
|
8670
8818
|
]
|
|
8671
8819
|
};
|
|
8672
8820
|
var COPY = { shopify: SHOPIFY, whatsapp: WHATSAPP };
|
|
8673
|
-
var payments2 = new
|
|
8821
|
+
var payments2 = new Command43("payments").description("disable payments").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8674
8822
|
(opts, cmd) => runCommand(async () => {
|
|
8675
8823
|
const { detected } = await detectWorkspace();
|
|
8676
8824
|
const provider = detected.providers.payments;
|
|
@@ -8699,8 +8847,8 @@ var payments2 = new Command41("payments").description("disable payments").option
|
|
|
8699
8847
|
);
|
|
8700
8848
|
|
|
8701
8849
|
// src/commands/disable/ecommerce.ts
|
|
8702
|
-
import { Command as
|
|
8703
|
-
var ecommerce2 = new
|
|
8850
|
+
import { Command as Command44 } from "commander";
|
|
8851
|
+
var ecommerce2 = new Command44("ecommerce").description("disable ecommerce").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8704
8852
|
(opts, cmd) => runCommand(
|
|
8705
8853
|
() => runDisable(
|
|
8706
8854
|
{
|
|
@@ -8727,8 +8875,8 @@ var ecommerce2 = new Command42("ecommerce").description("disable ecommerce").opt
|
|
|
8727
8875
|
);
|
|
8728
8876
|
|
|
8729
8877
|
// src/commands/disable/subscriptions.ts
|
|
8730
|
-
import { Command as
|
|
8731
|
-
var subscriptions2 = new
|
|
8878
|
+
import { Command as Command45 } from "commander";
|
|
8879
|
+
var subscriptions2 = new Command45("subscriptions").description("disable Stripe subscriptions").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8732
8880
|
(opts, cmd) => runCommand(
|
|
8733
8881
|
() => runDisable(
|
|
8734
8882
|
{
|
|
@@ -8755,8 +8903,8 @@ var subscriptions2 = new Command43("subscriptions").description("disable Stripe
|
|
|
8755
8903
|
);
|
|
8756
8904
|
|
|
8757
8905
|
// src/commands/disable/orders.ts
|
|
8758
|
-
import { Command as
|
|
8759
|
-
var orders2 = new
|
|
8906
|
+
import { Command as Command46 } from "commander";
|
|
8907
|
+
var orders2 = new Command46("orders").description("disable Stripe Checkout orders").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8760
8908
|
(opts, cmd) => runCommand(
|
|
8761
8909
|
() => runDisable(
|
|
8762
8910
|
{
|
|
@@ -8783,8 +8931,8 @@ var orders2 = new Command44("orders").description("disable Stripe Checkout order
|
|
|
8783
8931
|
);
|
|
8784
8932
|
|
|
8785
8933
|
// src/commands/disable/whatsapp.ts
|
|
8786
|
-
import { Command as
|
|
8787
|
-
var whatsapp2 = new
|
|
8934
|
+
import { Command as Command47 } from "commander";
|
|
8935
|
+
var whatsapp2 = new Command47("whatsapp").description("disable WhatsApp sign-in").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8788
8936
|
(opts, cmd) => runCommand(
|
|
8789
8937
|
() => runDisable(
|
|
8790
8938
|
{
|
|
@@ -8812,13 +8960,13 @@ var whatsapp2 = new Command45("whatsapp").description("disable WhatsApp sign-in"
|
|
|
8812
8960
|
);
|
|
8813
8961
|
|
|
8814
8962
|
// src/commands/disable.ts
|
|
8815
|
-
var disable = new
|
|
8963
|
+
var disable = new Command48("disable").description("disable features").configureHelp(helpConfig).addCommand(ai2).addCommand(analytics2).addCommand(auth2).addCommand(api2).addCommand(apiKeys2).addCommand(backend2).addCommand(contentNegotiation2).addCommand(i18n2).addCommand(notifications2).addCommand(og2).addCommand(teams2).addCommand(payments2).addCommand(ecommerce2).addCommand(subscriptions2).addCommand(orders2).addCommand(whatsapp2);
|
|
8816
8964
|
|
|
8817
8965
|
// src/commands/destroy.ts
|
|
8818
|
-
import { Command as
|
|
8966
|
+
import { Command as Command55 } from "commander";
|
|
8819
8967
|
|
|
8820
8968
|
// src/commands/destroy/form.ts
|
|
8821
|
-
import { Command as
|
|
8969
|
+
import { Command as Command49 } from "commander";
|
|
8822
8970
|
|
|
8823
8971
|
// src/commands/destroy/_shared.ts
|
|
8824
8972
|
import process23 from "node:process";
|
|
@@ -8835,7 +8983,7 @@ async function runDestroy(slug2, model, confirmMessage, report5, flags) {
|
|
|
8835
8983
|
}
|
|
8836
8984
|
|
|
8837
8985
|
// src/commands/destroy/form.ts
|
|
8838
|
-
var form2 = new
|
|
8986
|
+
var form2 = new Command49("form").description("destroy a form generated by `vela generate form`").argument("<model>", "model name used when the form was generated (e.g., contact, login)").option("-y, --yes", "skip confirmation prompt").option(
|
|
8839
8987
|
"--route <route>",
|
|
8840
8988
|
"custom route the form was generated at (must match the --route used at generation)"
|
|
8841
8989
|
).allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
@@ -8859,8 +9007,8 @@ var form2 = new Command47("form").description("destroy a form generated by `vela
|
|
|
8859
9007
|
);
|
|
8860
9008
|
|
|
8861
9009
|
// src/commands/destroy/schema.ts
|
|
8862
|
-
import { Command as
|
|
8863
|
-
var schema2 = new
|
|
9010
|
+
import { Command as Command50 } from "commander";
|
|
9011
|
+
var schema2 = new Command50("schema").description("destroy a zod schema generated by `vela generate schema`").argument("<model>", "schema model name (e.g., contact, login)").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8864
9012
|
(model, opts) => runCommand(
|
|
8865
9013
|
() => runDestroy(
|
|
8866
9014
|
"destroy-schema",
|
|
@@ -8881,8 +9029,8 @@ var schema2 = new Command48("schema").description("destroy a zod schema generate
|
|
|
8881
9029
|
);
|
|
8882
9030
|
|
|
8883
9031
|
// src/commands/destroy/resource.ts
|
|
8884
|
-
import { Command as
|
|
8885
|
-
var resource2 = new
|
|
9032
|
+
import { Command as Command51 } from "commander";
|
|
9033
|
+
var resource2 = new Command51("resource").description("destroy a resource generated by `vela generate resource`").argument("<model>", "model path used when the resource was generated (e.g., contacts, articles)").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
8886
9034
|
(model, opts) => runCommand(
|
|
8887
9035
|
() => runDestroy(
|
|
8888
9036
|
"destroy-resource",
|
|
@@ -8903,8 +9051,8 @@ var resource2 = new Command49("resource").description("destroy a resource genera
|
|
|
8903
9051
|
);
|
|
8904
9052
|
|
|
8905
9053
|
// src/commands/destroy/scaffold.ts
|
|
8906
|
-
import { Command as
|
|
8907
|
-
var scaffold2 = new
|
|
9054
|
+
import { Command as Command52 } from "commander";
|
|
9055
|
+
var scaffold2 = new Command52("scaffold").description("destroy a scaffold generated by `vela generate scaffold`").argument("<model>", "model name used when the scaffold was generated (e.g., contact, todo)").option("-y, --yes", "skip confirmation prompt").option(
|
|
8908
9056
|
"--route <route>",
|
|
8909
9057
|
"custom route the scaffold was generated at (must match the --route used at generation)"
|
|
8910
9058
|
).allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
@@ -8932,7 +9080,7 @@ var scaffold2 = new Command50("scaffold").description("destroy a scaffold genera
|
|
|
8932
9080
|
|
|
8933
9081
|
// src/commands/destroy/deployment.ts
|
|
8934
9082
|
import process27 from "node:process";
|
|
8935
|
-
import { Command as
|
|
9083
|
+
import { Command as Command53 } from "commander";
|
|
8936
9084
|
import * as p29 from "@clack/prompts";
|
|
8937
9085
|
import pc12 from "picocolors";
|
|
8938
9086
|
|
|
@@ -10155,7 +10303,7 @@ ${pc11.dim(err instanceof Error ? err.message : String(err))}`
|
|
|
10155
10303
|
// src/commands/destroy/deployment.ts
|
|
10156
10304
|
var deployment = addLockWaitOption(
|
|
10157
10305
|
addTargetOptions(
|
|
10158
|
-
new
|
|
10306
|
+
new Command53("deployment").description("remove a deployed environment from its server").configureHelp(helpConfig),
|
|
10159
10307
|
"production"
|
|
10160
10308
|
)
|
|
10161
10309
|
).option("--purge", "also delete the database and uploaded files").option("-y, --yes", "skip the confirmation prompt").option(
|
|
@@ -10240,9 +10388,9 @@ async function confirm6(appName, targetName, byName) {
|
|
|
10240
10388
|
|
|
10241
10389
|
// src/commands/destroy/shop.ts
|
|
10242
10390
|
import process28 from "node:process";
|
|
10243
|
-
import { Command as
|
|
10391
|
+
import { Command as Command54 } from "commander";
|
|
10244
10392
|
import * as p30 from "@clack/prompts";
|
|
10245
|
-
var shop2 = new
|
|
10393
|
+
var shop2 = new Command54("shop").description("destroy the shop pages generated by `vela generate shop`").option("-y, --yes", "skip confirmation prompt").allowExcessArguments(true).configureHelp(helpConfig).action(
|
|
10246
10394
|
(opts, cmd) => runCommand(async () => {
|
|
10247
10395
|
if (!opts.yes) {
|
|
10248
10396
|
const ok = await p30.confirm({
|
|
@@ -10271,13 +10419,13 @@ var shop2 = new Command52("shop").description("destroy the shop pages generated
|
|
|
10271
10419
|
);
|
|
10272
10420
|
|
|
10273
10421
|
// src/commands/destroy.ts
|
|
10274
|
-
var destroy = new
|
|
10422
|
+
var destroy = new Command55("destroy").description("destroy scaffolding, or a deployment").configureHelp(helpConfig).addCommand(form2).addCommand(schema2).addCommand(resource2).addCommand(scaffold2).addCommand(shop2).addCommand(deployment);
|
|
10275
10423
|
|
|
10276
10424
|
// src/commands/ui.ts
|
|
10277
|
-
import { Command as
|
|
10425
|
+
import { Command as Command61 } from "commander";
|
|
10278
10426
|
|
|
10279
10427
|
// src/commands/ui/add.ts
|
|
10280
|
-
import { Command as
|
|
10428
|
+
import { Command as Command56 } from "commander";
|
|
10281
10429
|
import * as p31 from "@clack/prompts";
|
|
10282
10430
|
import { installComponents } from "@velastack/patterns";
|
|
10283
10431
|
|
|
@@ -10327,7 +10475,7 @@ function uiAddReport(requested, outcome) {
|
|
|
10327
10475
|
}
|
|
10328
10476
|
|
|
10329
10477
|
// src/commands/ui/add.ts
|
|
10330
|
-
var add = new
|
|
10478
|
+
var add = new Command56("add").description("add ui components (shadcn-svelte items and vela components such as data-table)").argument("<components...>", "the components to add").option("--overwrite", "replace components that already exist", false).configureHelp(helpConfig).action(
|
|
10331
10479
|
(components, options) => runCommand(async () => {
|
|
10332
10480
|
const { workspaceRootDir } = await getWorkspace();
|
|
10333
10481
|
assertShadcn("vela ui add", workspaceRootDir);
|
|
@@ -10350,10 +10498,10 @@ var add = new Command54("add").description("add ui components (shadcn-svelte ite
|
|
|
10350
10498
|
);
|
|
10351
10499
|
|
|
10352
10500
|
// src/commands/ui/base.ts
|
|
10353
|
-
import { Command as
|
|
10501
|
+
import { Command as Command57 } from "commander";
|
|
10354
10502
|
import * as p32 from "@clack/prompts";
|
|
10355
10503
|
import { applyBaseColor } from "@velastack/patterns";
|
|
10356
|
-
var base = new
|
|
10504
|
+
var base = new Command57("base").description("change the base (gray) palette").argument("<color>", `base color to use (${BASE_COLORS.join(", ")})`).configureHelp(helpConfig).action(
|
|
10357
10505
|
(color) => runCommand(async () => {
|
|
10358
10506
|
const { workspaceRootDir } = await getWorkspace();
|
|
10359
10507
|
assertShadcn("vela ui base", workspaceRootDir);
|
|
@@ -10379,7 +10527,7 @@ var base = new Command55("base").description("change the base (gray) palette").a
|
|
|
10379
10527
|
);
|
|
10380
10528
|
|
|
10381
10529
|
// src/commands/ui/list.ts
|
|
10382
|
-
import { Command as
|
|
10530
|
+
import { Command as Command58 } from "commander";
|
|
10383
10531
|
import * as p33 from "@clack/prompts";
|
|
10384
10532
|
import { listComponents } from "@velastack/patterns";
|
|
10385
10533
|
|
|
@@ -10411,7 +10559,7 @@ function uiListReport(result) {
|
|
|
10411
10559
|
}
|
|
10412
10560
|
|
|
10413
10561
|
// src/commands/ui/list.ts
|
|
10414
|
-
var list = new
|
|
10562
|
+
var list = new Command58("list").description("list installed ui components, vela components and the style registry").option("--json", "print the result as JSON", false).configureHelp(helpConfig).action(
|
|
10415
10563
|
(options) => runCommand(async () => {
|
|
10416
10564
|
const { workspaceRootDir } = await getWorkspace();
|
|
10417
10565
|
assertShadcn("vela ui list", workspaceRootDir);
|
|
@@ -10439,7 +10587,7 @@ Registry components are not listed.`);
|
|
|
10439
10587
|
);
|
|
10440
10588
|
|
|
10441
10589
|
// src/commands/ui/style.ts
|
|
10442
|
-
import { Command as
|
|
10590
|
+
import { Command as Command59 } from "commander";
|
|
10443
10591
|
import * as p34 from "@clack/prompts";
|
|
10444
10592
|
import { switchStyle } from "@velastack/patterns";
|
|
10445
10593
|
|
|
@@ -10466,7 +10614,7 @@ function uiStyleReport(result) {
|
|
|
10466
10614
|
}
|
|
10467
10615
|
|
|
10468
10616
|
// src/commands/ui/style.ts
|
|
10469
|
-
var style = new
|
|
10617
|
+
var style = new Command59("style").description("switch the shadcn-svelte style, re-adding its components").argument("<style>", `style to switch to (${STYLES.join(", ")})`).option("-y, --yes", "skip the confirmation prompt").option("--no-font", "keep the current font instead of applying the style's").configureHelp(helpConfig).action(
|
|
10470
10618
|
(name, options) => runCommand(async () => {
|
|
10471
10619
|
const { workspaceRootDir } = await getWorkspace();
|
|
10472
10620
|
assertShadcn("vela ui style", workspaceRootDir);
|
|
@@ -10520,10 +10668,10 @@ ${components.map((c) => `- ${c}`).join("\n")}`
|
|
|
10520
10668
|
);
|
|
10521
10669
|
|
|
10522
10670
|
// src/commands/ui/theme.ts
|
|
10523
|
-
import { Command as
|
|
10671
|
+
import { Command as Command60 } from "commander";
|
|
10524
10672
|
import * as p35 from "@clack/prompts";
|
|
10525
10673
|
import { applyTheme } from "@velastack/patterns";
|
|
10526
|
-
var theme = new
|
|
10674
|
+
var theme = new Command60("theme").description("change the accent color, keeping the base palette").argument("<accent>", `accent to use (${THEMES.join(", ")})`).configureHelp(helpConfig).action(
|
|
10527
10675
|
(accent) => runCommand(async () => {
|
|
10528
10676
|
const { workspaceRootDir } = await getWorkspace();
|
|
10529
10677
|
assertShadcn("vela ui theme", workspaceRootDir);
|
|
@@ -10549,14 +10697,14 @@ var theme = new Command58("theme").description("change the accent color, keeping
|
|
|
10549
10697
|
);
|
|
10550
10698
|
|
|
10551
10699
|
// src/commands/ui.ts
|
|
10552
|
-
var ui = new
|
|
10700
|
+
var ui = new Command61("ui").description("generate ui components").configureHelp(helpConfig).addCommand(add).addCommand(list).addCommand(style).addCommand(base).addCommand(theme);
|
|
10553
10701
|
|
|
10554
10702
|
// src/commands/legal.ts
|
|
10555
|
-
import { Command as
|
|
10703
|
+
import { Command as Command64 } from "commander";
|
|
10556
10704
|
|
|
10557
10705
|
// src/commands/legal/terms.ts
|
|
10558
10706
|
import path42 from "node:path";
|
|
10559
|
-
import { Command as
|
|
10707
|
+
import { Command as Command62 } from "commander";
|
|
10560
10708
|
import * as p37 from "@clack/prompts";
|
|
10561
10709
|
|
|
10562
10710
|
// src/commands/legal/shared.ts
|
|
@@ -11267,11 +11415,11 @@ async function termsAction() {
|
|
|
11267
11415
|
]
|
|
11268
11416
|
});
|
|
11269
11417
|
}
|
|
11270
|
-
var terms = new
|
|
11418
|
+
var terms = new Command62("terms").description("generate placeholder terms and conditions").configureHelp(helpConfig).action(() => runCommand(termsAction, "Failed to generate terms and conditions."));
|
|
11271
11419
|
|
|
11272
11420
|
// src/commands/legal/privacy.ts
|
|
11273
11421
|
import path43 from "node:path";
|
|
11274
|
-
import { Command as
|
|
11422
|
+
import { Command as Command63 } from "commander";
|
|
11275
11423
|
import * as p38 from "@clack/prompts";
|
|
11276
11424
|
var mapLabels = {
|
|
11277
11425
|
personalInfo: {
|
|
@@ -12003,16 +12151,16 @@ async function privacyAction() {
|
|
|
12003
12151
|
]
|
|
12004
12152
|
});
|
|
12005
12153
|
}
|
|
12006
|
-
var privacy = new
|
|
12154
|
+
var privacy = new Command63("privacy").description("generate placeholder privacy policy").configureHelp(helpConfig).action(() => runCommand(privacyAction, "Failed to generate privacy policy."));
|
|
12007
12155
|
|
|
12008
12156
|
// src/commands/legal.ts
|
|
12009
|
-
var legal = new
|
|
12157
|
+
var legal = new Command64("legal").description("generate placeholder legal documents").configureHelp(helpConfig).addCommand(terms).addCommand(privacy);
|
|
12010
12158
|
|
|
12011
12159
|
// src/commands/fixtures.ts
|
|
12012
|
-
import { Command as
|
|
12160
|
+
import { Command as Command70 } from "commander";
|
|
12013
12161
|
|
|
12014
12162
|
// src/commands/fixtures/load.ts
|
|
12015
|
-
import { Command as
|
|
12163
|
+
import { Command as Command65 } from "commander";
|
|
12016
12164
|
|
|
12017
12165
|
// src/lib/data.ts
|
|
12018
12166
|
import fs43 from "node:fs";
|
|
@@ -12202,7 +12350,7 @@ async function hasLoadedFixtures(pb) {
|
|
|
12202
12350
|
}
|
|
12203
12351
|
|
|
12204
12352
|
// src/commands/fixtures/load.ts
|
|
12205
|
-
var load = new
|
|
12353
|
+
var load = new Command65("load").description("load fixtures into the database").configureHelp(helpConfig).action(
|
|
12206
12354
|
() => runCommand(async () => {
|
|
12207
12355
|
const { workspaceRootDir } = await getWorkspace();
|
|
12208
12356
|
let loaded = [];
|
|
@@ -12228,8 +12376,8 @@ var load = new Command63("load").description("load fixtures into the database").
|
|
|
12228
12376
|
);
|
|
12229
12377
|
|
|
12230
12378
|
// src/commands/fixtures/clear.ts
|
|
12231
|
-
import { Command as
|
|
12232
|
-
var clear = new
|
|
12379
|
+
import { Command as Command66 } from "commander";
|
|
12380
|
+
var clear = new Command66("clear").description("clear loaded fixtures").configureHelp(helpConfig).action(
|
|
12233
12381
|
() => runCommand(async () => {
|
|
12234
12382
|
const { workspaceRootDir } = await getWorkspace();
|
|
12235
12383
|
let cleared = [];
|
|
@@ -12258,8 +12406,8 @@ var clear = new Command64("clear").description("clear loaded fixtures").configur
|
|
|
12258
12406
|
);
|
|
12259
12407
|
|
|
12260
12408
|
// src/commands/fixtures/reset.ts
|
|
12261
|
-
import { Command as
|
|
12262
|
-
var reset = new
|
|
12409
|
+
import { Command as Command67 } from "commander";
|
|
12410
|
+
var reset = new Command67("reset").description("clear and reload fixtures").configureHelp(helpConfig).action(
|
|
12263
12411
|
() => runCommand(async () => {
|
|
12264
12412
|
const { workspaceRootDir } = await getWorkspace();
|
|
12265
12413
|
let cleared = [];
|
|
@@ -12291,7 +12439,7 @@ var reset = new Command65("reset").description("clear and reload fixtures").conf
|
|
|
12291
12439
|
// src/commands/fixtures/generate.ts
|
|
12292
12440
|
import fs44 from "node:fs";
|
|
12293
12441
|
import path45 from "node:path";
|
|
12294
|
-
import { Command as
|
|
12442
|
+
import { Command as Command68, InvalidArgumentError } from "commander";
|
|
12295
12443
|
import * as p39 from "@clack/prompts";
|
|
12296
12444
|
import { annotate } from "annotate-json-schema";
|
|
12297
12445
|
import { createGenerator } from "json-schema-faker";
|
|
@@ -12402,7 +12550,7 @@ async function generateFixtureFiles(pb, workspaceRootDir, opts) {
|
|
|
12402
12550
|
}
|
|
12403
12551
|
return { writtenFiles, warnings };
|
|
12404
12552
|
}
|
|
12405
|
-
var generate2 = new
|
|
12553
|
+
var generate2 = new Command68("generate").description("generate fixture data").option("-c, --count <count>", "number of records per collection", parseCount, 10).option("-s, --seed <seed>", "seed for deterministic output", parseSeed).option("-f, --force", "overwrite existing fixture files and clear loaded fixtures").configureHelp(helpConfig).action(
|
|
12406
12554
|
(opts) => runCommand(async () => {
|
|
12407
12555
|
const { workspaceRootDir } = await getWorkspace();
|
|
12408
12556
|
const existing = getFixtureFiles(workspaceRootDir);
|
|
@@ -12455,7 +12603,7 @@ var generate2 = new Command66("generate").description("generate fixture data").o
|
|
|
12455
12603
|
);
|
|
12456
12604
|
|
|
12457
12605
|
// src/commands/fixtures/regen.ts
|
|
12458
|
-
import { Command as
|
|
12606
|
+
import { Command as Command69, InvalidArgumentError as InvalidArgumentError2 } from "commander";
|
|
12459
12607
|
import * as p40 from "@clack/prompts";
|
|
12460
12608
|
function parseCount2(value) {
|
|
12461
12609
|
const n = parseInt(value, 10);
|
|
@@ -12471,7 +12619,7 @@ function parseSeed2(value) {
|
|
|
12471
12619
|
}
|
|
12472
12620
|
return n;
|
|
12473
12621
|
}
|
|
12474
|
-
var regen = new
|
|
12622
|
+
var regen = new Command69("regen").description("clear the database, regenerate fixture files, and reload them").option("-c, --count <count>", "number of records per collection", parseCount2, 10).option("-s, --seed <seed>", "seed for deterministic output", parseSeed2).configureHelp(helpConfig).action(
|
|
12475
12623
|
(opts) => runCommand(async () => {
|
|
12476
12624
|
const { workspaceRootDir } = await getWorkspace();
|
|
12477
12625
|
let cleared = [];
|
|
@@ -12500,14 +12648,14 @@ var regen = new Command67("regen").description("clear the database, regenerate f
|
|
|
12500
12648
|
);
|
|
12501
12649
|
|
|
12502
12650
|
// src/commands/fixtures.ts
|
|
12503
|
-
var fixtures = new
|
|
12651
|
+
var fixtures = new Command70("fixtures").description("manage fixture data").configureHelp(helpConfig).addCommand(generate2).addCommand(load).addCommand(clear).addCommand(reset).addCommand(regen);
|
|
12504
12652
|
|
|
12505
12653
|
// src/commands/seeds.ts
|
|
12506
|
-
import { Command as
|
|
12654
|
+
import { Command as Command74 } from "commander";
|
|
12507
12655
|
|
|
12508
12656
|
// src/commands/seeds/load.ts
|
|
12509
|
-
import { Command as
|
|
12510
|
-
var load2 = new
|
|
12657
|
+
import { Command as Command71 } from "commander";
|
|
12658
|
+
var load2 = new Command71("load").description("load seeds into the database").option("-f, --force", "load even if target collections already have records").configureHelp(helpConfig).action(
|
|
12511
12659
|
(opts) => runCommand(async () => {
|
|
12512
12660
|
const { workspaceRootDir } = await getWorkspace();
|
|
12513
12661
|
const seedFiles = getSeedFiles(workspaceRootDir);
|
|
@@ -12546,7 +12694,7 @@ var load2 = new Command69("load").description("load seeds into the database").op
|
|
|
12546
12694
|
// src/commands/seeds/save.ts
|
|
12547
12695
|
import fs45 from "node:fs";
|
|
12548
12696
|
import path46 from "node:path";
|
|
12549
|
-
import { Command as
|
|
12697
|
+
import { Command as Command72 } from "commander";
|
|
12550
12698
|
var padZeros2 = (num, length) => num.toString().padStart(length, "0");
|
|
12551
12699
|
function filterSystemFields(record, systemFieldNames) {
|
|
12552
12700
|
const out = {};
|
|
@@ -12557,7 +12705,7 @@ function filterSystemFields(record, systemFieldNames) {
|
|
|
12557
12705
|
}
|
|
12558
12706
|
return out;
|
|
12559
12707
|
}
|
|
12560
|
-
var save = new
|
|
12708
|
+
var save = new Command72("save").description("save the current data as seeds").option("-f, --force", "overwrite existing seed files").configureHelp(helpConfig).action(
|
|
12561
12709
|
(opts) => runCommand(async () => {
|
|
12562
12710
|
const { workspaceRootDir } = await getWorkspace();
|
|
12563
12711
|
const seedsPath = dataDir(workspaceRootDir, "seeds");
|
|
@@ -12629,8 +12777,8 @@ var save = new Command70("save").description("save the current data as seeds").o
|
|
|
12629
12777
|
);
|
|
12630
12778
|
|
|
12631
12779
|
// src/commands/seeds/clear.ts
|
|
12632
|
-
import { Command as
|
|
12633
|
-
var clear2 = new
|
|
12780
|
+
import { Command as Command73 } from "commander";
|
|
12781
|
+
var clear2 = new Command73("clear").description("clear seeded records").configureHelp(helpConfig).action(
|
|
12634
12782
|
() => runCommand(async () => {
|
|
12635
12783
|
const { workspaceRootDir } = await getWorkspace();
|
|
12636
12784
|
const seedFiles = getSeedFiles(workspaceRootDir);
|
|
@@ -12661,13 +12809,13 @@ var clear2 = new Command71("clear").description("clear seeded records").configur
|
|
|
12661
12809
|
);
|
|
12662
12810
|
|
|
12663
12811
|
// src/commands/seeds.ts
|
|
12664
|
-
var seeds = new
|
|
12812
|
+
var seeds = new Command74("seeds").description("manage seed data").configureHelp(helpConfig).addCommand(load2).addCommand(save).addCommand(clear2);
|
|
12665
12813
|
|
|
12666
12814
|
// src/commands/signup.ts
|
|
12667
|
-
import { Command as
|
|
12815
|
+
import { Command as Command75 } from "commander";
|
|
12668
12816
|
import * as p41 from "@clack/prompts";
|
|
12669
12817
|
import makeFetchCookie2 from "fetch-cookie";
|
|
12670
|
-
var signup = new
|
|
12818
|
+
var signup = new Command75("signup").description("signup to velastack.dev").configureHelp(helpConfig).action(
|
|
12671
12819
|
() => runCommand(async () => {
|
|
12672
12820
|
const method = await chooseAuthMethod("signup", await fetchAuthMethods());
|
|
12673
12821
|
const fetchCookie = makeFetchCookie2(fetch);
|
|
@@ -12709,9 +12857,9 @@ async function signupWithPassword(fetchCookie) {
|
|
|
12709
12857
|
}
|
|
12710
12858
|
|
|
12711
12859
|
// src/commands/logout.ts
|
|
12712
|
-
import { Command as
|
|
12860
|
+
import { Command as Command76 } from "commander";
|
|
12713
12861
|
import * as p42 from "@clack/prompts";
|
|
12714
|
-
var logout = new
|
|
12862
|
+
var logout = new Command76("logout").alias("signout").description("logout from velastack.dev").configureHelp(helpConfig).action(
|
|
12715
12863
|
() => runCommand(() => {
|
|
12716
12864
|
if (!readConfig()) {
|
|
12717
12865
|
p42.log.info("Not logged in");
|
|
@@ -12723,9 +12871,9 @@ var logout = new Command74("logout").alias("signout").description("logout from v
|
|
|
12723
12871
|
);
|
|
12724
12872
|
|
|
12725
12873
|
// src/commands/whoami.ts
|
|
12726
|
-
import { Command as
|
|
12874
|
+
import { Command as Command77 } from "commander";
|
|
12727
12875
|
import * as p43 from "@clack/prompts";
|
|
12728
|
-
var whoami = new
|
|
12876
|
+
var whoami = new Command77("whoami").description("show the current user").configureHelp(helpConfig).action(
|
|
12729
12877
|
() => runCommand(async () => {
|
|
12730
12878
|
const apiKey = readConfig()?.apiKey;
|
|
12731
12879
|
if (!apiKey) {
|
|
@@ -12744,10 +12892,10 @@ var whoami = new Command75("whoami").description("show the current user").config
|
|
|
12744
12892
|
);
|
|
12745
12893
|
|
|
12746
12894
|
// src/commands/migrate.ts
|
|
12747
|
-
import { Command as
|
|
12895
|
+
import { Command as Command84 } from "commander";
|
|
12748
12896
|
|
|
12749
12897
|
// src/commands/migrate/up.ts
|
|
12750
|
-
import { Command as
|
|
12898
|
+
import { Command as Command78 } from "commander";
|
|
12751
12899
|
|
|
12752
12900
|
// src/lib/migrate.ts
|
|
12753
12901
|
import path47 from "node:path";
|
|
@@ -12789,10 +12937,10 @@ async function runMigrateUp() {
|
|
|
12789
12937
|
]
|
|
12790
12938
|
});
|
|
12791
12939
|
}
|
|
12792
|
-
var up = new
|
|
12940
|
+
var up = new Command78("up").description("apply all pending migrations").configureHelp(helpConfig).action(() => runCommand(runMigrateUp, "Failed to run migrations."));
|
|
12793
12941
|
|
|
12794
12942
|
// src/commands/migrate/down.ts
|
|
12795
|
-
import { Command as
|
|
12943
|
+
import { Command as Command79, InvalidArgumentError as InvalidArgumentError3 } from "commander";
|
|
12796
12944
|
function parseSteps(value) {
|
|
12797
12945
|
const n = parseInt(value, 10);
|
|
12798
12946
|
if (!Number.isFinite(n) || n <= 0) {
|
|
@@ -12800,7 +12948,7 @@ function parseSteps(value) {
|
|
|
12800
12948
|
}
|
|
12801
12949
|
return n;
|
|
12802
12950
|
}
|
|
12803
|
-
var down = new
|
|
12951
|
+
var down = new Command79("down").alias("rollback").description("revert the last N applied migrations").argument("[number]", "how many migrations to revert", parseSteps, 1).configureHelp(helpConfig).action(
|
|
12804
12952
|
(n) => runCommand(async () => {
|
|
12805
12953
|
await runPocketbaseMigrate(["down", String(n)]);
|
|
12806
12954
|
reportResult({
|
|
@@ -12816,8 +12964,8 @@ var down = new Command77("down").alias("rollback").description("revert the last
|
|
|
12816
12964
|
// src/commands/migrate/create.ts
|
|
12817
12965
|
import fs46 from "node:fs";
|
|
12818
12966
|
import path48 from "node:path";
|
|
12819
|
-
import { Command as
|
|
12820
|
-
var create2 = new
|
|
12967
|
+
import { Command as Command80 } from "commander";
|
|
12968
|
+
var create2 = new Command80("create").alias("new").description("create a new blank migration").argument("<name>", "migration name (snake_case)").configureHelp(helpConfig).action(
|
|
12821
12969
|
(name) => runCommand(async () => {
|
|
12822
12970
|
const cwd = migrateRoot();
|
|
12823
12971
|
const before = listMigrationFiles(cwd);
|
|
@@ -12843,8 +12991,8 @@ function listMigrationFiles(cwd) {
|
|
|
12843
12991
|
// src/commands/migrate/collections.ts
|
|
12844
12992
|
import fs47 from "node:fs";
|
|
12845
12993
|
import path49 from "node:path";
|
|
12846
|
-
import { Command as
|
|
12847
|
-
var collections = new
|
|
12994
|
+
import { Command as Command81 } from "commander";
|
|
12995
|
+
var collections = new Command81("collections").alias("snapshot").description("snapshot local collections into a new migration").configureHelp(helpConfig).action(
|
|
12848
12996
|
() => runCommand(async () => {
|
|
12849
12997
|
const cwd = migrateRoot();
|
|
12850
12998
|
const before = listMigrationFiles2(cwd);
|
|
@@ -12875,8 +13023,8 @@ function listMigrationFiles2(cwd) {
|
|
|
12875
13023
|
}
|
|
12876
13024
|
|
|
12877
13025
|
// src/commands/migrate/history-sync.ts
|
|
12878
|
-
import { Command as
|
|
12879
|
-
var historySync = new
|
|
13026
|
+
import { Command as Command82 } from "commander";
|
|
13027
|
+
var historySync = new Command82("history-sync").description("drop _migrations rows whose files no longer exist").configureHelp(helpConfig).action(
|
|
12880
13028
|
() => runCommand(async () => {
|
|
12881
13029
|
await runPocketbaseMigrate(["history-sync"]);
|
|
12882
13030
|
reportResult({
|
|
@@ -12889,10 +13037,10 @@ var historySync = new Command80("history-sync").description("drop _migrations ro
|
|
|
12889
13037
|
// src/commands/migrate/sveltekit-3.ts
|
|
12890
13038
|
import path50 from "node:path";
|
|
12891
13039
|
import process31 from "node:process";
|
|
12892
|
-
import { Command as
|
|
13040
|
+
import { Command as Command83 } from "commander";
|
|
12893
13041
|
import * as p44 from "@clack/prompts";
|
|
12894
13042
|
import pc13 from "picocolors";
|
|
12895
|
-
var sveltekit3 = new
|
|
13043
|
+
var sveltekit3 = new Command83("sveltekit-3").description("upgrade a SvelteKit 2 project to SvelteKit 3 (sv migrate, then the vela steps)").option("--cwd <path>", "the project to migrate (default: the current project)").option("--no-install", "skip installing dependencies").option("--force", "run even when the git working tree has uncommitted changes").option("--skip-sv", "only run the vela steps (sv has already been run)").configureHelp(helpConfig).action(
|
|
12896
13044
|
(options) => runCommand(async () => {
|
|
12897
13045
|
const root = options.cwd ? path50.resolve(options.cwd) : findWorkspaceRoot() ?? process31.cwd();
|
|
12898
13046
|
p44.intro(pc13.bgCyan(pc13.black(" vela migrate sveltekit-3 ")));
|
|
@@ -12966,14 +13114,14 @@ function nextStepsFor(result) {
|
|
|
12966
13114
|
}
|
|
12967
13115
|
|
|
12968
13116
|
// src/commands/migrate.ts
|
|
12969
|
-
var migrate = new
|
|
13117
|
+
var migrate = new Command84("migrate").description("manage database migrations (and `migrate sveltekit-3` to upgrade SvelteKit)").configureHelp(helpConfig).action(() => runCommand(runMigrateUp, "Failed to run migrations.")).addCommand(up).addCommand(down).addCommand(create2).addCommand(collections).addCommand(historySync).addCommand(sveltekit3);
|
|
12970
13118
|
|
|
12971
13119
|
// src/commands/dev.ts
|
|
12972
13120
|
import fs48 from "node:fs";
|
|
12973
13121
|
import path52 from "node:path";
|
|
12974
13122
|
import process33 from "node:process";
|
|
12975
13123
|
import { performance } from "node:perf_hooks";
|
|
12976
|
-
import { Command as
|
|
13124
|
+
import { Command as Command85, InvalidArgumentError as InvalidArgumentError4 } from "commander";
|
|
12977
13125
|
import pc15 from "picocolors";
|
|
12978
13126
|
import PocketBase5 from "pocketbase";
|
|
12979
13127
|
|
|
@@ -13046,7 +13194,7 @@ function parsePort(value) {
|
|
|
13046
13194
|
}
|
|
13047
13195
|
return port;
|
|
13048
13196
|
}
|
|
13049
|
-
var dev = new
|
|
13197
|
+
var dev = new Command85("dev").description("start the development server").option("--open [path]", "open the app in a browser once the server is ready").option("--host [host]", "expose the server on the network").option("--port <port>", "port to listen on", parsePort).option("--strictPort", "exit if the port is already in use instead of taking the next one").option("--cors", "enable CORS").option("--force", "re-bundle dependencies, ignoring the optimizer cache").option("--all-sql", "also print the auth lookup PocketBase runs on every request").configureHelp(helpConfig).action(async (options) => {
|
|
13050
13198
|
const cwd = process33.cwd();
|
|
13051
13199
|
warnIfKit2(findWorkspaceRoot(cwd) ?? cwd, (m) => console.warn(pc15.yellow(`\u25B2 ${m}`)));
|
|
13052
13200
|
process33.env.VELA_DATA_DIR ??= localDataDir(cwd);
|
|
@@ -13171,7 +13319,7 @@ async function startWatchingTypes(cwd, pb) {
|
|
|
13171
13319
|
import fs49 from "node:fs";
|
|
13172
13320
|
import path53 from "node:path";
|
|
13173
13321
|
import process35 from "node:process";
|
|
13174
|
-
import { Command as
|
|
13322
|
+
import { Command as Command86 } from "commander";
|
|
13175
13323
|
import * as p45 from "@clack/prompts";
|
|
13176
13324
|
import pc16 from "picocolors";
|
|
13177
13325
|
import { x as x5 } from "tinyexec";
|
|
@@ -13212,7 +13360,7 @@ function splitHosts(value) {
|
|
|
13212
13360
|
|
|
13213
13361
|
// src/commands/build.ts
|
|
13214
13362
|
var PRERENDERED_DIR = path53.join(".svelte-kit", "output", "prerendered");
|
|
13215
|
-
var build = new
|
|
13363
|
+
var build = new Command86("build").description("build the app").configureHelp(helpConfig).option("-t, --target <target>", "which copy of the app to build for", PRODUCTION_TARGET).action(async (options) => {
|
|
13216
13364
|
const cwd = process35.cwd();
|
|
13217
13365
|
warnIfKit2(findWorkspaceRoot(cwd) ?? cwd, (m) => p45.log.warn(m));
|
|
13218
13366
|
warnIfSsrExternalMissing(findWorkspaceRoot(cwd) ?? cwd);
|
|
@@ -13307,14 +13455,14 @@ Set one with ${pc16.cyan("vela deploy --domain example.com")}, or pass ${pc16.cy
|
|
|
13307
13455
|
import fs50 from "node:fs";
|
|
13308
13456
|
import path54 from "node:path";
|
|
13309
13457
|
import process36 from "node:process";
|
|
13310
|
-
import { Command as
|
|
13458
|
+
import { Command as Command87 } from "commander";
|
|
13311
13459
|
import * as p46 from "@clack/prompts";
|
|
13312
13460
|
import pc17 from "picocolors";
|
|
13313
13461
|
import { x as x6 } from "tinyexec";
|
|
13314
13462
|
import { detect as detect9 } from "package-manager-detector";
|
|
13315
13463
|
import { resolveCommand as resolveCommand7 } from "package-manager-detector/commands";
|
|
13316
13464
|
var ADAPTER_NODE_MODULE = path54.join("build", "adapter-node.js");
|
|
13317
|
-
var preview = new
|
|
13465
|
+
var preview = new Command87("preview").description("preview the built app").configureHelp(helpConfig).action(async () => {
|
|
13318
13466
|
const cwd = process36.cwd();
|
|
13319
13467
|
process36.env.VELA_DATA_DIR ??= localDataDir(cwd);
|
|
13320
13468
|
warnIfKit2(findWorkspaceRoot(cwd) ?? cwd, (m) => p46.log.warn(m));
|
|
@@ -13383,8 +13531,8 @@ set empty so no domain is baked in.`
|
|
|
13383
13531
|
|
|
13384
13532
|
// src/commands/sync.ts
|
|
13385
13533
|
import path55 from "node:path";
|
|
13386
|
-
import { Command as
|
|
13387
|
-
var sync = new
|
|
13534
|
+
import { Command as Command88 } from "commander";
|
|
13535
|
+
var sync = new Command88("sync").description("sync types from the database").configureHelp(helpConfig).action(
|
|
13388
13536
|
() => runCommand(async () => {
|
|
13389
13537
|
const { workspaceRootDir } = await getWorkspace();
|
|
13390
13538
|
const typesDir = path55.join(workspaceRootDir, ".svelte-kit", "types");
|
|
@@ -13397,7 +13545,7 @@ var sync = new Command86("sync").description("sync types from the database").con
|
|
|
13397
13545
|
);
|
|
13398
13546
|
|
|
13399
13547
|
// src/commands/provision.ts
|
|
13400
|
-
import { Command as
|
|
13548
|
+
import { Command as Command89 } from "commander";
|
|
13401
13549
|
import * as p47 from "@clack/prompts";
|
|
13402
13550
|
import pc18 from "picocolors";
|
|
13403
13551
|
import * as v9 from "valibot";
|
|
@@ -13412,7 +13560,7 @@ var OptionsSchema2 = v9.object({
|
|
|
13412
13560
|
)
|
|
13413
13561
|
});
|
|
13414
13562
|
var provision = addSshOptions(
|
|
13415
|
-
new
|
|
13563
|
+
new Command89("provision").description("prepare a server to host vela apps").argument("<target>", "SSH target \u2014 an alias from ~/.ssh/config, or user@host").configureHelp(helpConfig)
|
|
13416
13564
|
).option("--pb-version <version>", "PocketBase version to install").option(
|
|
13417
13565
|
"--node-major <version>",
|
|
13418
13566
|
"Node.js major version to bring the server up to (match the one you build with)",
|
|
@@ -13461,7 +13609,7 @@ var provision = addSshOptions(
|
|
|
13461
13609
|
import path59 from "node:path";
|
|
13462
13610
|
import fs54 from "node:fs";
|
|
13463
13611
|
import process38 from "node:process";
|
|
13464
|
-
import { Command as
|
|
13612
|
+
import { Command as Command90, Option as Option2 } from "commander";
|
|
13465
13613
|
import * as p49 from "@clack/prompts";
|
|
13466
13614
|
import pc20 from "picocolors";
|
|
13467
13615
|
import * as v10 from "valibot";
|
|
@@ -13827,7 +13975,7 @@ var OptionsSchema3 = v10.object({
|
|
|
13827
13975
|
});
|
|
13828
13976
|
var deploy = addLockWaitOption(
|
|
13829
13977
|
addTargetOptions(
|
|
13830
|
-
new
|
|
13978
|
+
new Command90("deploy").description("deploy the app").configureHelp(helpConfig),
|
|
13831
13979
|
"production"
|
|
13832
13980
|
)
|
|
13833
13981
|
).option("--project <name>", "override the project name").option("--domain <hosts>", "hostname(s) to serve on, comma separated").option("--health-path <path>", "path the health check requests").option("--keep <count>", "how many old releases to keep on the server").option("--pb-version <version>", "PocketBase version to run").option("--no-build", "deploy the existing build output without rebuilding").addOption(
|
|
@@ -14261,10 +14409,10 @@ async function serverTimeOrLocal(session) {
|
|
|
14261
14409
|
// src/commands/link.ts
|
|
14262
14410
|
import path60 from "node:path";
|
|
14263
14411
|
import process39 from "node:process";
|
|
14264
|
-
import { Command as
|
|
14412
|
+
import { Command as Command91 } from "commander";
|
|
14265
14413
|
import * as p50 from "@clack/prompts";
|
|
14266
14414
|
var CREATE_NEW = "__new__";
|
|
14267
|
-
var link = new
|
|
14415
|
+
var link = new Command91("link").description("link this project to a velastack.dev project").configureHelp(helpConfig).action(() => runCommand(linkProject, "Failed to link the project."));
|
|
14268
14416
|
async function linkProject() {
|
|
14269
14417
|
const { workspaceRootDir } = await getWorkspace();
|
|
14270
14418
|
const existing = readProjectConfig(workspaceRootDir);
|
|
@@ -14331,10 +14479,10 @@ function defaultProjectName2(workspaceRootDir) {
|
|
|
14331
14479
|
}
|
|
14332
14480
|
|
|
14333
14481
|
// src/commands/env.ts
|
|
14334
|
-
import { Command as
|
|
14482
|
+
import { Command as Command97 } from "commander";
|
|
14335
14483
|
|
|
14336
14484
|
// src/commands/env/list.ts
|
|
14337
|
-
import { Command as
|
|
14485
|
+
import { Command as Command92 } from "commander";
|
|
14338
14486
|
import * as v12 from "valibot";
|
|
14339
14487
|
import * as p53 from "@clack/prompts";
|
|
14340
14488
|
import pc23 from "picocolors";
|
|
@@ -14606,7 +14754,7 @@ var OptionsSchema5 = v12.object({
|
|
|
14606
14754
|
var HIDDEN = "\u2022\u2022\u2022\u2022";
|
|
14607
14755
|
var MAX_VALUE = 32;
|
|
14608
14756
|
var envList = addEnvTargetOptions(
|
|
14609
|
-
new
|
|
14757
|
+
new Command92("list").description("list environment variables \u2014 every scope at once without -t").configureHelp(helpConfig)
|
|
14610
14758
|
).action(
|
|
14611
14759
|
(raw) => runCommand(async () => {
|
|
14612
14760
|
const options = parseOptions(OptionsSchema5, raw);
|
|
@@ -14772,11 +14920,11 @@ function plain(text20) {
|
|
|
14772
14920
|
|
|
14773
14921
|
// src/commands/env/set.ts
|
|
14774
14922
|
import process41 from "node:process";
|
|
14775
|
-
import { Command as
|
|
14923
|
+
import { Command as Command93 } from "commander";
|
|
14776
14924
|
import * as p54 from "@clack/prompts";
|
|
14777
14925
|
import pc24 from "picocolors";
|
|
14778
14926
|
var envSet = addEnvTargetOptions(
|
|
14779
|
-
new
|
|
14927
|
+
new Command93("set").description("set an environment variable \u2014 the value is prompted for, never an argument").argument("<key>", "variable name").option(
|
|
14780
14928
|
"--public",
|
|
14781
14929
|
"readable back with `vela env list` and `vela env get`; PUBLIC_* keys are public regardless"
|
|
14782
14930
|
).configureHelp(helpConfig)
|
|
@@ -14834,11 +14982,11 @@ async function promptValue2(key, visibility) {
|
|
|
14834
14982
|
}
|
|
14835
14983
|
|
|
14836
14984
|
// src/commands/env/unset.ts
|
|
14837
|
-
import { Command as
|
|
14985
|
+
import { Command as Command94 } from "commander";
|
|
14838
14986
|
import * as p55 from "@clack/prompts";
|
|
14839
14987
|
import pc25 from "picocolors";
|
|
14840
14988
|
var envUnset = addEnvTargetOptions(
|
|
14841
|
-
new
|
|
14989
|
+
new Command94("unset").description("remove an environment variable").argument("<key>", "variable name").configureHelp(helpConfig)
|
|
14842
14990
|
).action(
|
|
14843
14991
|
(key, raw) => runCommand(
|
|
14844
14992
|
() => withEnvScope(
|
|
@@ -14882,11 +15030,11 @@ var envUnset = addEnvTargetOptions(
|
|
|
14882
15030
|
import fs56 from "node:fs";
|
|
14883
15031
|
import path61 from "node:path";
|
|
14884
15032
|
import process42 from "node:process";
|
|
14885
|
-
import { Command as
|
|
15033
|
+
import { Command as Command95 } from "commander";
|
|
14886
15034
|
import * as p56 from "@clack/prompts";
|
|
14887
15035
|
import pc26 from "picocolors";
|
|
14888
15036
|
var envImport = addEnvTargetOptions(
|
|
14889
|
-
new
|
|
15037
|
+
new Command95("import").description("merge a dotenv file into the environment").argument("<file>", "dotenv file to read").option("--public", "import as readable values; PUBLIC_* keys are public regardless").configureHelp(helpConfig)
|
|
14890
15038
|
).action(
|
|
14891
15039
|
(file, raw) => runCommand(
|
|
14892
15040
|
() => withEnvScope(
|
|
@@ -14962,11 +15110,11 @@ function read(resolved, shown) {
|
|
|
14962
15110
|
|
|
14963
15111
|
// src/commands/env/get.ts
|
|
14964
15112
|
import process43 from "node:process";
|
|
14965
|
-
import { Command as
|
|
15113
|
+
import { Command as Command96 } from "commander";
|
|
14966
15114
|
import * as p57 from "@clack/prompts";
|
|
14967
15115
|
import pc27 from "picocolors";
|
|
14968
15116
|
var envGet = addEnvTargetOptions(
|
|
14969
|
-
new
|
|
15117
|
+
new Command96("get").description("print a public environment variable").argument("<key>", "variable name").configureHelp(helpConfig)
|
|
14970
15118
|
).action(
|
|
14971
15119
|
(key, raw) => runCommand(
|
|
14972
15120
|
() => withEnvScope(
|
|
@@ -15014,14 +15162,14 @@ Set it again to change it: ${pc27.cyan(`vela env set ${key}`)}`
|
|
|
15014
15162
|
}
|
|
15015
15163
|
|
|
15016
15164
|
// src/commands/env.ts
|
|
15017
|
-
var env = new
|
|
15165
|
+
var env = new Command97("env").description("manage environment variables, locally or on a target").configureHelp(helpConfig).addCommand(envList).addCommand(envGet).addCommand(envSet).addCommand(envUnset).addCommand(envImport);
|
|
15018
15166
|
|
|
15019
15167
|
// src/commands/status.ts
|
|
15020
|
-
import { Command as
|
|
15168
|
+
import { Command as Command98 } from "commander";
|
|
15021
15169
|
import * as p58 from "@clack/prompts";
|
|
15022
15170
|
import pc28 from "picocolors";
|
|
15023
15171
|
var status = addTargetOptions(
|
|
15024
|
-
new
|
|
15172
|
+
new Command98("status").description("show what is deployed").configureHelp(helpConfig),
|
|
15025
15173
|
"production"
|
|
15026
15174
|
).option("--all", "show every app on the server, not just this project").option("--json", "print raw JSON").action(
|
|
15027
15175
|
(raw) => runCommand(async () => {
|
|
@@ -15080,12 +15228,12 @@ function describe2(state) {
|
|
|
15080
15228
|
}
|
|
15081
15229
|
|
|
15082
15230
|
// src/commands/rollback.ts
|
|
15083
|
-
import { Command as
|
|
15231
|
+
import { Command as Command99 } from "commander";
|
|
15084
15232
|
import * as p59 from "@clack/prompts";
|
|
15085
15233
|
import pc29 from "picocolors";
|
|
15086
15234
|
var rollback = addLockWaitOption(
|
|
15087
15235
|
addTargetOptions(
|
|
15088
|
-
new
|
|
15236
|
+
new Command99("rollback").description("put the previous release back").configureHelp(helpConfig),
|
|
15089
15237
|
"production"
|
|
15090
15238
|
)
|
|
15091
15239
|
).option("--to <release>", "roll back to a specific release instead of the previous one").action(
|
|
@@ -15124,7 +15272,7 @@ var rollback = addLockWaitOption(
|
|
|
15124
15272
|
);
|
|
15125
15273
|
|
|
15126
15274
|
// src/commands/logs.ts
|
|
15127
|
-
import { Command as
|
|
15275
|
+
import { Command as Command100 } from "commander";
|
|
15128
15276
|
|
|
15129
15277
|
// src/lib/remote-pocketbase.ts
|
|
15130
15278
|
import PocketBase6 from "pocketbase";
|
|
@@ -15175,7 +15323,7 @@ async function withRemotePocketbase(session, instance, fn) {
|
|
|
15175
15323
|
|
|
15176
15324
|
// src/commands/logs.ts
|
|
15177
15325
|
var logs = addTargetOptions(
|
|
15178
|
-
new
|
|
15326
|
+
new Command100("logs").description("tail the logs of a deployed app").configureHelp(helpConfig),
|
|
15179
15327
|
"production"
|
|
15180
15328
|
).option("-f, --follow", "keep streaming new output").option("-n, --lines <count>", "how many lines of history to show", "100").option("--pocketbase", "show the PocketBase service instead of the app").action(
|
|
15181
15329
|
(raw) => runCommand(async () => {
|
|
@@ -15210,16 +15358,16 @@ var logs = addTargetOptions(
|
|
|
15210
15358
|
);
|
|
15211
15359
|
|
|
15212
15360
|
// src/commands/admin.ts
|
|
15213
|
-
import { Command as
|
|
15361
|
+
import { Command as Command102 } from "commander";
|
|
15214
15362
|
|
|
15215
15363
|
// src/commands/admin/create.ts
|
|
15216
15364
|
import process44 from "node:process";
|
|
15217
|
-
import { Command as
|
|
15365
|
+
import { Command as Command101 } from "commander";
|
|
15218
15366
|
import * as p60 from "@clack/prompts";
|
|
15219
15367
|
import pc30 from "picocolors";
|
|
15220
15368
|
var MIN_PASSWORD = 10;
|
|
15221
15369
|
var adminCreate = addTargetOptions(
|
|
15222
|
-
new
|
|
15370
|
+
new Command101("create").description("create a login for the admin panel").argument("[email]", "email to sign in with \u2014 prompted for when omitted").configureHelp(helpConfig),
|
|
15223
15371
|
"local"
|
|
15224
15372
|
).action(
|
|
15225
15373
|
(email2, raw) => runCommand(
|
|
@@ -15337,15 +15485,15 @@ async function promptPassword() {
|
|
|
15337
15485
|
}
|
|
15338
15486
|
|
|
15339
15487
|
// src/commands/admin.ts
|
|
15340
|
-
var admin = new
|
|
15488
|
+
var admin = new Command102("admin").description("manage admin panel logins").configureHelp(helpConfig).addCommand(adminCreate);
|
|
15341
15489
|
|
|
15342
15490
|
// src/commands/backup.ts
|
|
15343
|
-
import { Command as
|
|
15491
|
+
import { Command as Command108 } from "commander";
|
|
15344
15492
|
|
|
15345
15493
|
// src/commands/backup/create.ts
|
|
15346
15494
|
import fs57 from "node:fs";
|
|
15347
15495
|
import path62 from "node:path";
|
|
15348
|
-
import { Command as
|
|
15496
|
+
import { Command as Command103 } from "commander";
|
|
15349
15497
|
import * as p61 from "@clack/prompts";
|
|
15350
15498
|
import pc32 from "picocolors";
|
|
15351
15499
|
|
|
@@ -15494,7 +15642,7 @@ async function writeSchedule(pb, cron, maxKeep) {
|
|
|
15494
15642
|
// src/commands/backup/create.ts
|
|
15495
15643
|
var DEFAULT_BACKUP_DIR = "backups";
|
|
15496
15644
|
var backupCreate = addTargetOptions(
|
|
15497
|
-
new
|
|
15645
|
+
new Command103("create").description("take a backup of the database and uploads").argument("[name]", "name for the archive \u2014 generated when omitted").option("-o, --output <dir>", "where to save the archive", DEFAULT_BACKUP_DIR).option("--no-download", "leave the archive on the server").configureHelp(helpConfig),
|
|
15498
15646
|
"production"
|
|
15499
15647
|
).action(
|
|
15500
15648
|
(name, raw) => runCommand(() => {
|
|
@@ -15578,11 +15726,11 @@ async function download(ctx, key, outputDir) {
|
|
|
15578
15726
|
}
|
|
15579
15727
|
|
|
15580
15728
|
// src/commands/backup/list.ts
|
|
15581
|
-
import { Command as
|
|
15729
|
+
import { Command as Command104 } from "commander";
|
|
15582
15730
|
import * as p62 from "@clack/prompts";
|
|
15583
15731
|
import pc33 from "picocolors";
|
|
15584
15732
|
var backupList = addTargetOptions(
|
|
15585
|
-
new
|
|
15733
|
+
new Command104("list").description("list the backups on a target").configureHelp(helpConfig),
|
|
15586
15734
|
"production"
|
|
15587
15735
|
).action(
|
|
15588
15736
|
(raw) => runCommand(
|
|
@@ -15610,11 +15758,11 @@ Take one with ${pc33.cyan("vela backup create")}.`
|
|
|
15610
15758
|
// src/commands/backup/download.ts
|
|
15611
15759
|
import fs58 from "node:fs";
|
|
15612
15760
|
import path63 from "node:path";
|
|
15613
|
-
import { Command as
|
|
15761
|
+
import { Command as Command105 } from "commander";
|
|
15614
15762
|
import * as p63 from "@clack/prompts";
|
|
15615
15763
|
import pc34 from "picocolors";
|
|
15616
15764
|
var backupDownload = addTargetOptions(
|
|
15617
|
-
new
|
|
15765
|
+
new Command105("download").description("save a backup off the server").argument("<key>", "archive to download, as shown by `vela backup list`").option("-o, --output <dir>", "where to save the archive", DEFAULT_BACKUP_DIR).configureHelp(helpConfig),
|
|
15618
15766
|
"production"
|
|
15619
15767
|
).action(
|
|
15620
15768
|
(key, raw) => runCommand(() => {
|
|
@@ -15662,11 +15810,11 @@ Fetch it from the bucket directly \u2014 vela does not hold its credentials.`
|
|
|
15662
15810
|
|
|
15663
15811
|
// src/commands/backup/delete.ts
|
|
15664
15812
|
import process45 from "node:process";
|
|
15665
|
-
import { Command as
|
|
15813
|
+
import { Command as Command106 } from "commander";
|
|
15666
15814
|
import * as p64 from "@clack/prompts";
|
|
15667
15815
|
import pc35 from "picocolors";
|
|
15668
15816
|
var backupDelete = addTargetOptions(
|
|
15669
|
-
new
|
|
15817
|
+
new Command106("delete").description("remove a backup from a target").argument("<key>", "archive to delete, as shown by `vela backup list`").option("-y, --yes", "skip the confirmation").configureHelp(helpConfig),
|
|
15670
15818
|
"production"
|
|
15671
15819
|
).action(
|
|
15672
15820
|
(key, raw) => runCommand(() => {
|
|
@@ -15697,12 +15845,12 @@ Run ${pc35.cyan("vela backup list")} to see what it does have.`
|
|
|
15697
15845
|
);
|
|
15698
15846
|
|
|
15699
15847
|
// src/commands/backup/schedule.ts
|
|
15700
|
-
import { Command as
|
|
15848
|
+
import { Command as Command107 } from "commander";
|
|
15701
15849
|
import * as p65 from "@clack/prompts";
|
|
15702
15850
|
import pc36 from "picocolors";
|
|
15703
15851
|
var DEFAULT_KEEP = 7;
|
|
15704
15852
|
var backupSchedule = addTargetOptions(
|
|
15705
|
-
new
|
|
15853
|
+
new Command107("schedule").description("back up automatically on a schedule").argument("[cron]", "when to run, as a cron expression \u2014 shows the current one when omitted").option("--keep <n>", "how many scheduled archives to keep", String(DEFAULT_KEEP)).option("--off", "stop backing up automatically").configureHelp(helpConfig),
|
|
15706
15854
|
"production"
|
|
15707
15855
|
).action(
|
|
15708
15856
|
(cron, raw) => runCommand(() => {
|
|
@@ -15746,18 +15894,18 @@ Set one with ${pc36.cyan('vela backup schedule "0 3 * * *"')}.`
|
|
|
15746
15894
|
);
|
|
15747
15895
|
|
|
15748
15896
|
// src/commands/backup.ts
|
|
15749
|
-
var backup = new
|
|
15897
|
+
var backup = new Command108("backup").description("back up the database and uploads, locally or on a target").configureHelp(helpConfig).addCommand(backupCreate).addCommand(backupList).addCommand(backupDownload).addCommand(backupDelete).addCommand(backupSchedule);
|
|
15750
15898
|
|
|
15751
15899
|
// src/commands/restore.ts
|
|
15752
15900
|
import fs59 from "node:fs";
|
|
15753
15901
|
import path64 from "node:path";
|
|
15754
15902
|
import process46 from "node:process";
|
|
15755
|
-
import { Command as
|
|
15903
|
+
import { Command as Command109 } from "commander";
|
|
15756
15904
|
import * as p66 from "@clack/prompts";
|
|
15757
15905
|
import pc37 from "picocolors";
|
|
15758
15906
|
var restore = addLockWaitOption(
|
|
15759
15907
|
addTargetOptions(
|
|
15760
|
-
new
|
|
15908
|
+
new Command109("restore").description("replace a deployment\u2019s database and uploads from a backup").argument("[source]", "a backup key on the target, or a path to a local archive").configureHelp(helpConfig),
|
|
15761
15909
|
"production"
|
|
15762
15910
|
)
|
|
15763
15911
|
).option("-y, --yes", "skip the confirmation prompt").option("--no-migrate", "do not run migrations against the restored database").option("--keep-previous <n>", "how many replaced databases to keep", "1").action(
|
|
@@ -15906,7 +16054,7 @@ async function confirm14(appName, targetName, envTag, from) {
|
|
|
15906
16054
|
}
|
|
15907
16055
|
|
|
15908
16056
|
// src/commands/targets.ts
|
|
15909
|
-
import { Command as
|
|
16057
|
+
import { Command as Command110 } from "commander";
|
|
15910
16058
|
import * as p67 from "@clack/prompts";
|
|
15911
16059
|
import pc38 from "picocolors";
|
|
15912
16060
|
import * as v13 from "valibot";
|
|
@@ -15916,7 +16064,7 @@ var OptionsSchema6 = v13.object({
|
|
|
15916
16064
|
offline: v13.optional(v13.boolean())
|
|
15917
16065
|
});
|
|
15918
16066
|
var targets = addSshOptions(
|
|
15919
|
-
new
|
|
16067
|
+
new Command110("targets").description("list the targets this project can deploy to").configureHelp(helpConfig)
|
|
15920
16068
|
).option("--json", "print raw JSON").option("--offline", "skip connecting to servers").action(
|
|
15921
16069
|
(raw) => runCommand(async () => {
|
|
15922
16070
|
const options = parseOptions(OptionsSchema6, raw);
|
|
@@ -15994,7 +16142,7 @@ Release and domain are shown from what this project recorded.`
|
|
|
15994
16142
|
|
|
15995
16143
|
// src/commands/test.ts
|
|
15996
16144
|
import process48 from "node:process";
|
|
15997
|
-
import { Command as
|
|
16145
|
+
import { Command as Command111 } from "commander";
|
|
15998
16146
|
import pc39 from "picocolors";
|
|
15999
16147
|
import { x as x7 } from "tinyexec";
|
|
16000
16148
|
import { detect as detect10 } from "package-manager-detector";
|
|
@@ -16147,7 +16295,7 @@ function stubPagesPlugin() {
|
|
|
16147
16295
|
}
|
|
16148
16296
|
|
|
16149
16297
|
// src/commands/test.ts
|
|
16150
|
-
var testServer = new
|
|
16298
|
+
var testServer = new Command111("test:server").description("run server tests").allowUnknownOption(true).allowExcessArguments(true).configureHelp(helpConfig).action(async (_opts, cmd) => {
|
|
16151
16299
|
const cwd = process48.cwd();
|
|
16152
16300
|
warnIfKit2(cwd, (m) => console.warn(pc39.yellow(`\u25B2 ${m}`)));
|
|
16153
16301
|
const extraArgs = (cmd.parent?.args ?? []).slice(1);
|
|
@@ -16174,7 +16322,7 @@ var testServer = new Command109("test:server").description("run server tests").a
|
|
|
16174
16322
|
process48.exitCode = 1;
|
|
16175
16323
|
}
|
|
16176
16324
|
});
|
|
16177
|
-
var testHarness = new
|
|
16325
|
+
var testHarness = new Command111("test:harness").description("start the servers for server tests and wait (used by vela/testing)").configureHelp(helpConfig).action(async () => {
|
|
16178
16326
|
const cwd = process48.cwd();
|
|
16179
16327
|
if (!process48.send) {
|
|
16180
16328
|
console.error(
|
|
@@ -16223,7 +16371,7 @@ var testHarness = new Command109("test:harness").description("start the servers
|
|
|
16223
16371
|
// src/commands/routes.ts
|
|
16224
16372
|
import fs61 from "node:fs";
|
|
16225
16373
|
import path66 from "node:path";
|
|
16226
|
-
import { Command as
|
|
16374
|
+
import { Command as Command112 } from "commander";
|
|
16227
16375
|
var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
16228
16376
|
"GET",
|
|
16229
16377
|
"POST",
|
|
@@ -16234,7 +16382,7 @@ var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
|
16234
16382
|
"HEAD",
|
|
16235
16383
|
"fallback"
|
|
16236
16384
|
]);
|
|
16237
|
-
var routes = new
|
|
16385
|
+
var routes = new Command112("routes").description("list routes").configureHelp(helpConfig).action(async () => {
|
|
16238
16386
|
const { workspaceRootDir, routesDir } = await getWorkspace();
|
|
16239
16387
|
const routesRoot = path66.join(workspaceRootDir, routesDir);
|
|
16240
16388
|
const found = walk(routesRoot, routesRoot).filter((r) => r.methods.length > 0);
|
|
@@ -16312,7 +16460,7 @@ function printTable(routes2) {
|
|
|
16312
16460
|
import fs62 from "node:fs";
|
|
16313
16461
|
import path67 from "node:path";
|
|
16314
16462
|
import process49 from "node:process";
|
|
16315
|
-
import { Command as
|
|
16463
|
+
import { Command as Command113 } from "commander";
|
|
16316
16464
|
import { x as x8 } from "tinyexec";
|
|
16317
16465
|
import { detect as detect11 } from "package-manager-detector";
|
|
16318
16466
|
import { resolveCommand as resolveCommand9 } from "package-manager-detector/commands";
|
|
@@ -16331,24 +16479,24 @@ async function runWuchale(extraArgs) {
|
|
|
16331
16479
|
throwOnError: true
|
|
16332
16480
|
});
|
|
16333
16481
|
}
|
|
16334
|
-
var extract2 = new
|
|
16335
|
-
var watch = new
|
|
16336
|
-
var status2 = new
|
|
16337
|
-
var clean = new
|
|
16338
|
-
var i18n3 = new
|
|
16482
|
+
var extract2 = new Command113("extract").description("extract translatable strings").configureHelp(helpConfig).action(() => runCommand(() => runWuchale([])));
|
|
16483
|
+
var watch = new Command113("watch").description("watch and extract translatable strings").configureHelp(helpConfig).action(() => runCommand(() => runWuchale(["--watch"])));
|
|
16484
|
+
var status2 = new Command113("status").description("show i18n status").configureHelp(helpConfig).action(() => runCommand(() => runWuchale(["status"])));
|
|
16485
|
+
var clean = new Command113("clean").description("clean unused translatable strings").configureHelp(helpConfig).action(() => runCommand(() => runWuchale(["--clean"])));
|
|
16486
|
+
var i18n3 = new Command113("i18n").description("i18n utilities").configureHelp(helpConfig).addCommand(extract2, { isDefault: true }).addCommand(watch).addCommand(status2).addCommand(clean);
|
|
16339
16487
|
|
|
16340
16488
|
// src/commands/cms.ts
|
|
16341
|
-
import { Command as
|
|
16489
|
+
import { Command as Command119 } from "commander";
|
|
16342
16490
|
|
|
16343
16491
|
// src/commands/cms/deploy.ts
|
|
16344
16492
|
import process50 from "node:process";
|
|
16345
|
-
import { Command as
|
|
16493
|
+
import { Command as Command114 } from "commander";
|
|
16346
16494
|
import * as p68 from "@clack/prompts";
|
|
16347
16495
|
import pc40 from "picocolors";
|
|
16348
16496
|
var POLL_INTERVAL2 = 5e3;
|
|
16349
16497
|
var POLL_TIMEOUT = 30 * 6e4;
|
|
16350
16498
|
var inFlight = (run) => run?.status === "pending" || run?.status === "building";
|
|
16351
|
-
var deploy2 = new
|
|
16499
|
+
var deploy2 = new Command114("deploy").description("rebuild the hosted site with the latest published content").option(
|
|
16352
16500
|
"--project <id>",
|
|
16353
16501
|
"velastack.dev project whose site to rebuild, instead of the linked one"
|
|
16354
16502
|
).option("--no-wait", "return once the build has started instead of waiting for it").configureHelp(helpConfig).action(
|
|
@@ -16437,11 +16585,11 @@ async function waitForRun(apiKey, projectId, runId) {
|
|
|
16437
16585
|
}
|
|
16438
16586
|
|
|
16439
16587
|
// src/commands/cms/editor.ts
|
|
16440
|
-
import { Command as
|
|
16588
|
+
import { Command as Command118 } from "commander";
|
|
16441
16589
|
|
|
16442
16590
|
// src/commands/cms/editor/add.ts
|
|
16443
16591
|
import { randomBytes } from "node:crypto";
|
|
16444
|
-
import { Command as
|
|
16592
|
+
import { Command as Command115 } from "commander";
|
|
16445
16593
|
import * as p69 from "@clack/prompts";
|
|
16446
16594
|
import pc42 from "picocolors";
|
|
16447
16595
|
|
|
@@ -16484,7 +16632,7 @@ async function withCmsBackend(fn, cwd = process51.cwd()) {
|
|
|
16484
16632
|
}
|
|
16485
16633
|
|
|
16486
16634
|
// src/commands/cms/editor/add.ts
|
|
16487
|
-
var editorAdd = new
|
|
16635
|
+
var editorAdd = new Command115("add").description("create an editor who can sign in to the admin bar").argument("<email>", "email the editor signs in with").option("--password <password>", "password to set \u2014 generated and shown once when omitted").option("--project <id>", "project the editor may edit", DEFAULT_PROJECT).configureHelp(helpConfig).action(
|
|
16488
16636
|
(email2, options) => runCommand(async () => {
|
|
16489
16637
|
const generated = options.password === void 0;
|
|
16490
16638
|
const password8 = options.password ?? randomBytes(12).toString("base64url");
|
|
@@ -16503,10 +16651,10 @@ var editorAdd = new Command113("add").description("create an editor who can sign
|
|
|
16503
16651
|
);
|
|
16504
16652
|
|
|
16505
16653
|
// src/commands/cms/editor/password.ts
|
|
16506
|
-
import { Command as
|
|
16654
|
+
import { Command as Command116 } from "commander";
|
|
16507
16655
|
import * as p70 from "@clack/prompts";
|
|
16508
16656
|
import pc43 from "picocolors";
|
|
16509
|
-
var editorPassword = new
|
|
16657
|
+
var editorPassword = new Command116("password").description("set an editor's password").argument("<email>", "email of the editor").argument("<password>", "new password").configureHelp(helpConfig).action(
|
|
16510
16658
|
(email2, password8) => runCommand(async () => {
|
|
16511
16659
|
await withCmsBackend((cms3) => cms3.editors.setPassword(email2, password8));
|
|
16512
16660
|
p70.log.success(
|
|
@@ -16516,10 +16664,10 @@ var editorPassword = new Command114("password").description("set an editor's pas
|
|
|
16516
16664
|
);
|
|
16517
16665
|
|
|
16518
16666
|
// src/commands/cms/editor/list.ts
|
|
16519
|
-
import { Command as
|
|
16667
|
+
import { Command as Command117 } from "commander";
|
|
16520
16668
|
import * as p71 from "@clack/prompts";
|
|
16521
16669
|
import pc44 from "picocolors";
|
|
16522
|
-
var editorList = new
|
|
16670
|
+
var editorList = new Command117("list").description("list editors and the projects they may edit").configureHelp(helpConfig).action(
|
|
16523
16671
|
() => runCommand(async () => {
|
|
16524
16672
|
const rows = await withCmsBackend(
|
|
16525
16673
|
async (cms3) => cms3.editors.list().map((editor2) => ({
|
|
@@ -16543,17 +16691,17 @@ var editorList = new Command115("list").description("list editors and the projec
|
|
|
16543
16691
|
);
|
|
16544
16692
|
|
|
16545
16693
|
// src/commands/cms/editor.ts
|
|
16546
|
-
var editor = new
|
|
16694
|
+
var editor = new Command118("editor").description("manage who can sign in to the admin bar").configureHelp(helpConfig).addCommand(editorAdd).addCommand(editorPassword).addCommand(editorList);
|
|
16547
16695
|
|
|
16548
16696
|
// src/commands/cms.ts
|
|
16549
|
-
var cms2 = new
|
|
16697
|
+
var cms2 = new Command119("cms").description("manage the CMS").configureHelp(helpConfig).addCommand(editor).addCommand(deploy2);
|
|
16550
16698
|
|
|
16551
16699
|
// src/commands/workflows.ts
|
|
16552
|
-
import { Command as
|
|
16700
|
+
import { Command as Command123 } from "commander";
|
|
16553
16701
|
|
|
16554
16702
|
// src/commands/workflows/list.ts
|
|
16555
16703
|
import process52 from "node:process";
|
|
16556
|
-
import { Command as
|
|
16704
|
+
import { Command as Command120, InvalidArgumentError as InvalidArgumentError5 } from "commander";
|
|
16557
16705
|
import * as p72 from "@clack/prompts";
|
|
16558
16706
|
import pc45 from "picocolors";
|
|
16559
16707
|
|
|
@@ -16628,7 +16776,7 @@ function formatRun(run, nameWidth) {
|
|
|
16628
16776
|
const error = run.status === "failed" && run.error?.message ? pc45.red(` ${run.error.message}`) : "";
|
|
16629
16777
|
return `${run.id} ${run.workflowName.padEnd(nameWidth)} ${status3}${attempts} ${when}${error}`;
|
|
16630
16778
|
}
|
|
16631
|
-
var workflowsList = new
|
|
16779
|
+
var workflowsList = new Command120("list").description("list recent workflow runs").option("--status <status>", `only runs in this state (${STATUSES.join(", ")})`, parseStatus).option("--name <workflow>", "only runs of this workflow").option("--limit <n>", "how many to show", parseLimit, 50).configureHelp(helpConfig).action(
|
|
16632
16780
|
(options) => runCommand(async () => {
|
|
16633
16781
|
await withPocketbase(process52.cwd(), async (pb) => {
|
|
16634
16782
|
const runs = await listRuns(pb, {
|
|
@@ -16652,7 +16800,7 @@ Start one from server code with ${pc45.cyan("<workflow>.run(input)")}, or with $
|
|
|
16652
16800
|
|
|
16653
16801
|
// src/commands/workflows/run.ts
|
|
16654
16802
|
import process53 from "node:process";
|
|
16655
|
-
import { Command as
|
|
16803
|
+
import { Command as Command121, InvalidArgumentError as InvalidArgumentError6 } from "commander";
|
|
16656
16804
|
import * as p73 from "@clack/prompts";
|
|
16657
16805
|
import pc46 from "picocolors";
|
|
16658
16806
|
function parseInput(value) {
|
|
@@ -16662,7 +16810,7 @@ function parseInput(value) {
|
|
|
16662
16810
|
throw new InvalidArgumentError6(`must be JSON, e.g. '{"userId":"abc"}'.`);
|
|
16663
16811
|
}
|
|
16664
16812
|
}
|
|
16665
|
-
var workflowsRun = new
|
|
16813
|
+
var workflowsRun = new Command121("run").description("start a run of a workflow; the running app picks it up").argument("<name>", "the workflow name, as in its defineWorkflow spec").argument("[input]", "the run input as JSON", parseInput).configureHelp(helpConfig).action(
|
|
16666
16814
|
(name, input) => runCommand(async () => {
|
|
16667
16815
|
await withPocketbase(process53.cwd(), async (pb) => {
|
|
16668
16816
|
const run = await createRun(pb, name, input);
|
|
@@ -16677,10 +16825,10 @@ It runs once the app is up (${pc46.cyan("vela dev")}); ${pc46.cyan("vela workflo
|
|
|
16677
16825
|
|
|
16678
16826
|
// src/commands/workflows/cancel.ts
|
|
16679
16827
|
import process54 from "node:process";
|
|
16680
|
-
import { Command as
|
|
16828
|
+
import { Command as Command122 } from "commander";
|
|
16681
16829
|
import * as p74 from "@clack/prompts";
|
|
16682
16830
|
import pc47 from "picocolors";
|
|
16683
|
-
var workflowsCancel = new
|
|
16831
|
+
var workflowsCancel = new Command122("cancel").description("cancel a pending or running workflow run").argument("<run-id>", "the run id from `vela workflows list`").configureHelp(helpConfig).action(
|
|
16684
16832
|
(id) => runCommand(async () => {
|
|
16685
16833
|
await withPocketbase(process54.cwd(), async (pb) => {
|
|
16686
16834
|
const run = await cancelRun(pb, id);
|
|
@@ -16690,7 +16838,7 @@ var workflowsCancel = new Command120("cancel").description("cancel a pending or
|
|
|
16690
16838
|
);
|
|
16691
16839
|
|
|
16692
16840
|
// src/commands/workflows.ts
|
|
16693
|
-
var workflows2 = new
|
|
16841
|
+
var workflows2 = new Command123("workflows").description("list, start and cancel background workflow runs").configureHelp(helpConfig).addCommand(workflowsList).addCommand(workflowsRun).addCommand(workflowsCancel);
|
|
16694
16842
|
|
|
16695
16843
|
// src/program.ts
|
|
16696
16844
|
var NO_BACKEND_COMMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -16729,6 +16877,9 @@ var NO_BACKEND_COMMMANDS = /* @__PURE__ */ new Set([
|
|
|
16729
16877
|
// Only wires hooks, reroute and the root layout; no collections involved.
|
|
16730
16878
|
"enable content-negotiation",
|
|
16731
16879
|
"disable content-negotiation",
|
|
16880
|
+
// The card is rendered by a SvelteKit endpoint, prerendered on a static site.
|
|
16881
|
+
"enable og",
|
|
16882
|
+
"disable og",
|
|
16732
16883
|
// Posts are mdsvex files on disk.
|
|
16733
16884
|
"enable blog",
|
|
16734
16885
|
// Translations live in wuchale catalogs.
|
|
@@ -16763,7 +16914,7 @@ var PROVIDER_GATED_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
16763
16914
|
]);
|
|
16764
16915
|
var BACKEND_OPTIONAL_COMMANDS = /* @__PURE__ */ new Set(["dev", "build", "preview", "deploy"]);
|
|
16765
16916
|
var SELF_CREDENTIALED_COMMANDS = /* @__PURE__ */ new Set(["test:server", "test:harness"]);
|
|
16766
|
-
var program = new
|
|
16917
|
+
var program = new Command124().name(package_default.name).description(package_default.description).version(package_default.version, "-v, --version").configureHelp(helpConfig);
|
|
16767
16918
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
16768
16919
|
const envRoot = findWorkspaceRoot() ?? process55.cwd();
|
|
16769
16920
|
dotenv2.config({ path: nodePath.join(envRoot, ".env"), quiet: true });
|