Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -1,5 +1,5 @@
/**
* `forms delete --id <formId>` — hard-delete a form and cascade
* `forms delete --tenant <tenantId> --id <formId>` — hard-delete a form and cascade
* its FormSubmission rows. No soft-delete in Phase-1.
*/
import { defineCommand } from "citty";
@@ -8,13 +8,15 @@ import consola from "consola";
export const formsDeleteCommand = defineCommand({
meta: { name: "delete", description: "Delete a form (cascade submissions)." },
args: {
tenant: { type: "string", required: true, description: "Tenant ID." },
id: { type: "string", required: true, description: "Form ID." },
},
async run({ args }) {
const { getDbClient } = await import("@hivegrid/db/client.server");
const prisma = getDbClient();
const id = String(args.id);
const existing = await prisma.form.findUnique({ where: { id }, select: { id: true, name: true } });
const tenantId = String(args.tenant);
const existing = await prisma.form.findFirst({ where: { id, tenantId }, select: { id: true, name: true } });
if (!existing) {
consola.error(`Form ${id} not found.`);
process.exitCode = 1;