@akal/supaforge 0.0.0-stage → 0.0.32
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/README.md +350 -2
- package/bin/dev.js +10 -0
- package/bin/run.js +18 -0
- package/dist/base-command.d.ts +135 -0
- package/dist/base-command.js +9 -0
- package/dist/base-command.js.map +1 -0
- package/dist/branch-C4ndfoj5.d.ts +58 -0
- package/dist/chunk-2SELREHW.js +156 -0
- package/dist/chunk-2SELREHW.js.map +1 -0
- package/dist/chunk-3HGAV5CC.js +2073 -0
- package/dist/chunk-3HGAV5CC.js.map +1 -0
- package/dist/chunk-4IVN7QVY.js +632 -0
- package/dist/chunk-4IVN7QVY.js.map +1 -0
- package/dist/chunk-6LJERPUN.js +499 -0
- package/dist/chunk-6LJERPUN.js.map +1 -0
- package/dist/chunk-6Q7MHFBM.js +13 -0
- package/dist/chunk-6Q7MHFBM.js.map +1 -0
- package/dist/chunk-6WAMNZLO.js +336 -0
- package/dist/chunk-6WAMNZLO.js.map +1 -0
- package/dist/chunk-7NAZGZPV.js +868 -0
- package/dist/chunk-7NAZGZPV.js.map +1 -0
- package/dist/chunk-BLKJWDTL.js +153 -0
- package/dist/chunk-BLKJWDTL.js.map +1 -0
- package/dist/chunk-BUOWHE36.js +1311 -0
- package/dist/chunk-BUOWHE36.js.map +1 -0
- package/dist/chunk-DMIWAJRB.js +602 -0
- package/dist/chunk-DMIWAJRB.js.map +1 -0
- package/dist/chunk-DQQ5E563.js +64 -0
- package/dist/chunk-DQQ5E563.js.map +1 -0
- package/dist/chunk-G2DIPIYU.js +94 -0
- package/dist/chunk-G2DIPIYU.js.map +1 -0
- package/dist/chunk-GEHPTPNZ.js +240 -0
- package/dist/chunk-GEHPTPNZ.js.map +1 -0
- package/dist/chunk-GZREXCQZ.js +207 -0
- package/dist/chunk-GZREXCQZ.js.map +1 -0
- package/dist/chunk-MIRLB5JM.js +1292 -0
- package/dist/chunk-MIRLB5JM.js.map +1 -0
- package/dist/chunk-NTUASFQ3.js +248 -0
- package/dist/chunk-NTUASFQ3.js.map +1 -0
- package/dist/chunk-ORQJVE57.js +642 -0
- package/dist/chunk-ORQJVE57.js.map +1 -0
- package/dist/chunk-SC2XHGIS.js +122 -0
- package/dist/chunk-SC2XHGIS.js.map +1 -0
- package/dist/chunk-SQPCWGQO.js +657 -0
- package/dist/chunk-SQPCWGQO.js.map +1 -0
- package/dist/chunk-UWAVXC57.js +916 -0
- package/dist/chunk-UWAVXC57.js.map +1 -0
- package/dist/commands/clone.d.ts +66 -0
- package/dist/commands/clone.js +416 -0
- package/dist/commands/clone.js.map +1 -0
- package/dist/commands/diff.d.ts +81 -0
- package/dist/commands/diff.js +23 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/help.d.ts +32 -0
- package/dist/commands/help.js +36 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/hukam.d.ts +13 -0
- package/dist/commands/hukam.js +28 -0
- package/dist/commands/hukam.js.map +1 -0
- package/dist/commands/init.d.ts +47 -0
- package/dist/commands/init.js +388 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.d.ts +13 -0
- package/dist/commands/mcp.js +43 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/migrate/baseline.d.ts +24 -0
- package/dist/commands/migrate/baseline.js +69 -0
- package/dist/commands/migrate/baseline.js.map +1 -0
- package/dist/commands/migrate/create.d.ts +36 -0
- package/dist/commands/migrate/create.js +127 -0
- package/dist/commands/migrate/create.js.map +1 -0
- package/dist/commands/migrate/list.d.ts +23 -0
- package/dist/commands/migrate/list.js +110 -0
- package/dist/commands/migrate/list.js.map +1 -0
- package/dist/commands/migrate/run.d.ts +61 -0
- package/dist/commands/migrate/run.js +18 -0
- package/dist/commands/migrate/run.js.map +1 -0
- package/dist/commands/report.d.ts +27 -0
- package/dist/commands/report.js +210 -0
- package/dist/commands/report.js.map +1 -0
- package/dist/commands/restore.d.ts +26 -0
- package/dist/commands/restore.js +266 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/snapshot.d.ts +33 -0
- package/dist/commands/snapshot.js +249 -0
- package/dist/commands/snapshot.js.map +1 -0
- package/dist/commands/sync.d.ts +16 -0
- package/dist/commands/sync.js +38 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/config-CTbeRlJk.d.ts +134 -0
- package/dist/help.d.ts +28 -0
- package/dist/help.js +64 -0
- package/dist/help.js.map +1 -0
- package/dist/index.d.ts +498 -0
- package/dist/index.js +147 -0
- package/dist/index.js.map +1 -0
- package/package.json +74 -4
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ensureMigrationsTable,
|
|
3
|
+
getAppliedVersions,
|
|
4
|
+
getPendingMigrations,
|
|
5
|
+
runMigration
|
|
6
|
+
} from "./chunk-SC2XHGIS.js";
|
|
7
|
+
import {
|
|
8
|
+
isDestructiveSql
|
|
9
|
+
} from "./chunk-BUOWHE36.js";
|
|
10
|
+
import {
|
|
11
|
+
splitSqlStatements
|
|
12
|
+
} from "./chunk-G2DIPIYU.js";
|
|
13
|
+
import {
|
|
14
|
+
BaseCommand
|
|
15
|
+
} from "./chunk-GZREXCQZ.js";
|
|
16
|
+
import {
|
|
17
|
+
errMsg
|
|
18
|
+
} from "./chunk-SQPCWGQO.js";
|
|
19
|
+
import {
|
|
20
|
+
bold,
|
|
21
|
+
dim,
|
|
22
|
+
ok,
|
|
23
|
+
warn
|
|
24
|
+
} from "./chunk-6WAMNZLO.js";
|
|
25
|
+
|
|
26
|
+
// src/commands/migrate/run.ts
|
|
27
|
+
import { Flags } from "@oclif/core";
|
|
28
|
+
import { readFile } from "fs/promises";
|
|
29
|
+
var MigrateRun = class _MigrateRun extends BaseCommand {
|
|
30
|
+
static description = "Execute pending migrations against a Supabase environment";
|
|
31
|
+
static examples = [
|
|
32
|
+
"<%= config.bin %> migrate run --env=prod",
|
|
33
|
+
"<%= config.bin %> migrate run --env=prod --apply",
|
|
34
|
+
"<%= config.bin %> migrate run --env=prod --up-to=003 --apply"
|
|
35
|
+
];
|
|
36
|
+
static flags = {
|
|
37
|
+
env: Flags.string({
|
|
38
|
+
char: "e",
|
|
39
|
+
description: "Target environment to run migrations against"
|
|
40
|
+
}),
|
|
41
|
+
apply: Flags.boolean({
|
|
42
|
+
description: "Execute the pending migrations (previews without it)",
|
|
43
|
+
default: false,
|
|
44
|
+
exclusive: ["dry-run"]
|
|
45
|
+
}),
|
|
46
|
+
"dry-run": Flags.boolean({
|
|
47
|
+
description: "Preview which migrations would run (the default; kept for existing scripts)",
|
|
48
|
+
default: false
|
|
49
|
+
}),
|
|
50
|
+
"up-to": Flags.string({
|
|
51
|
+
description: "Stop after applying this migration version (inclusive)"
|
|
52
|
+
}),
|
|
53
|
+
"allow-destructive": Flags.boolean({
|
|
54
|
+
description: "Permit migrations that drop tables or columns, delete rows, or drop policies",
|
|
55
|
+
default: false
|
|
56
|
+
})
|
|
57
|
+
};
|
|
58
|
+
async run() {
|
|
59
|
+
const { flags } = await this.parse(_MigrateRun);
|
|
60
|
+
const config = await this.loadConfigOrFail();
|
|
61
|
+
const { envName, env } = this.resolveEnv(config, flags.env);
|
|
62
|
+
const dir = this.resolveMigrationsDir(config);
|
|
63
|
+
const pre = this.createPreflight("Migrate run preflight checks").addDatabase("Target", envName, env.dbUrl);
|
|
64
|
+
await this.runPreflight(pre, "Migrate run");
|
|
65
|
+
this.log(`${bold("migrate run")} \u2192 ${dim(envName)} (${dim(this.redactUrl(env.dbUrl))})
|
|
66
|
+
`);
|
|
67
|
+
if (flags.apply) await ensureMigrationsTable(env.dbUrl);
|
|
68
|
+
const applied = await getAppliedVersions(env.dbUrl);
|
|
69
|
+
let pending = await getPendingMigrations(dir, applied);
|
|
70
|
+
if (pending.length === 0) {
|
|
71
|
+
this.log(`${ok("All migrations are up to date.")} \u2713`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (flags["up-to"]) {
|
|
75
|
+
const cutoff = flags["up-to"];
|
|
76
|
+
const idx = pending.findIndex((m) => m.version === cutoff);
|
|
77
|
+
if (idx === -1) {
|
|
78
|
+
if (applied.has(cutoff)) {
|
|
79
|
+
this.log(`${ok(`Version "${cutoff}" is already applied.`)} \u2713`);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.error(`Version "${cutoff}" not found in pending migrations. Available: ${pending.map((m) => m.version).join(", ")}`);
|
|
83
|
+
}
|
|
84
|
+
pending = pending.slice(0, idx + 1);
|
|
85
|
+
}
|
|
86
|
+
this.log(`Found ${bold(String(pending.length))} pending migration(s):
|
|
87
|
+
`);
|
|
88
|
+
for (const m of pending) {
|
|
89
|
+
this.log(` ${dim("\u25CB")} ${m.filename}`);
|
|
90
|
+
}
|
|
91
|
+
const destructive = flags["allow-destructive"] ? [] : await findDestructiveStatements(pending);
|
|
92
|
+
if (destructive.length > 0) {
|
|
93
|
+
this.log("");
|
|
94
|
+
this.log(warn(`${destructive.length} destructive statement(s) in the pending migrations:`));
|
|
95
|
+
for (const { filename, sql } of destructive) {
|
|
96
|
+
this.log(` ${warn("\u2717")} ${filename}`);
|
|
97
|
+
this.log(` ${dim(truncateSql(sql))}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (!flags.apply) {
|
|
101
|
+
this.log(`
|
|
102
|
+
${dim("Preview only \u2014 nothing was applied.")} Re-run with ${bold("--apply")} to execute` + (destructive.length > 0 ? `, and ${bold("--allow-destructive")} for the statements above.` : "."));
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (destructive.length > 0) {
|
|
106
|
+
this.log(`
|
|
107
|
+
${warn("Nothing was applied.")} Re-run with ${bold("--allow-destructive")} to proceed.`);
|
|
108
|
+
this.exit(1);
|
|
109
|
+
}
|
|
110
|
+
this.log("");
|
|
111
|
+
let applied_count = 0;
|
|
112
|
+
for (const migration of pending) {
|
|
113
|
+
try {
|
|
114
|
+
const result = await runMigration(env.dbUrl, migration);
|
|
115
|
+
applied_count++;
|
|
116
|
+
this.log(` ${ok("\u2713")} ${result.filename} ${dim(`(${result.durationMs}ms)`)}`);
|
|
117
|
+
} catch (err) {
|
|
118
|
+
this.log(` ${warn("\u2717")} ${migration.filename}: ${err instanceof Error ? err.message : String(err)}`);
|
|
119
|
+
this.log(`
|
|
120
|
+
${warn(`Stopped after ${applied_count} migration(s) due to error.`)}`);
|
|
121
|
+
this.exit(1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
this.log(`
|
|
125
|
+
${ok(`Applied ${applied_count} migration(s) successfully.`)} \u2713`);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
async function findDestructiveStatements(migrations, readFileFn = (path) => readFile(path, "utf-8")) {
|
|
129
|
+
const found = [];
|
|
130
|
+
for (const migration of migrations) {
|
|
131
|
+
let sql;
|
|
132
|
+
try {
|
|
133
|
+
sql = await readFileFn(migration.path);
|
|
134
|
+
} catch (err) {
|
|
135
|
+
found.push({ filename: migration.filename, sql: `<unreadable: ${errMsg(err)}>` });
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
for (const statement of splitSqlStatements(sql)) {
|
|
139
|
+
if (isDestructiveSql(statement)) {
|
|
140
|
+
found.push({ filename: migration.filename, sql: statement });
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return found;
|
|
145
|
+
}
|
|
146
|
+
function truncateSql(sql) {
|
|
147
|
+
const oneLine = sql.split("\n").filter((l) => !/^\s*--/.test(l)).join(" ").replace(/\s+/g, " ").trim();
|
|
148
|
+
return oneLine.length > 100 ? `${oneLine.slice(0, 97)}...` : oneLine;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export {
|
|
152
|
+
MigrateRun,
|
|
153
|
+
findDestructiveStatements,
|
|
154
|
+
truncateSql
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=chunk-2SELREHW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/migrate/run.ts"],"sourcesContent":["import { Flags } from '@oclif/core'\nimport { BaseCommand } from '../../base-command.js'\nimport {\n ensureMigrationsTable,\n getAppliedVersions,\n getPendingMigrations,\n runMigration,\n} from '../../migrate.js'\nimport { ok, warn, dim, bold } from '../../ui.js'\nimport { isDestructiveSql } from '../../dbdiff.js'\nimport { splitSqlStatements } from '../../utils/sql-split.js'\nimport { readFile } from 'node:fs/promises'\nimport { errMsg } from '../../utils/error.js'\n\n/**\n * Execute pending migrations against a Supabase environment.\n *\n * Reads local migration files, executes unapplied ones in order,\n * and records each in supabase_migrations.schema_migrations.\n *\n * Previews unless given `--apply`, like every other command that writes. It\n * used to be the one exception, executing unless given `--dry-run`, so the\n * habit every other command teaches — run it bare to see what it would do —\n * ran migrations against whichever environment was named. `--dry-run` is\n * still accepted, and still previews.\n *\n * Replaces `supabase db push` for self-hosted Supabase instances.\n */\nexport default class MigrateRun extends BaseCommand {\n static override description = 'Execute pending migrations against a Supabase environment'\n\n static override examples = [\n '<%= config.bin %> migrate run --env=prod',\n '<%= config.bin %> migrate run --env=prod --apply',\n '<%= config.bin %> migrate run --env=prod --up-to=003 --apply',\n ]\n\n static override flags = {\n env: Flags.string({\n char: 'e',\n description: 'Target environment to run migrations against',\n }),\n apply: Flags.boolean({\n description: 'Execute the pending migrations (previews without it)',\n default: false,\n exclusive: ['dry-run'],\n }),\n 'dry-run': Flags.boolean({\n description: 'Preview which migrations would run (the default; kept for existing scripts)',\n default: false,\n }),\n 'up-to': Flags.string({\n description: 'Stop after applying this migration version (inclusive)',\n }),\n 'allow-destructive': Flags.boolean({\n description: 'Permit migrations that drop tables or columns, delete rows, or drop policies',\n default: false,\n }),\n }\n\n async run(): Promise<void> {\n const { flags } = await this.parse(MigrateRun)\n\n const config = await this.loadConfigOrFail()\n const { envName, env } = this.resolveEnv(config, flags.env)\n const dir = this.resolveMigrationsDir(config)\n\n // Preflight: verify database is reachable\n const pre = this.createPreflight('Migrate run preflight checks')\n .addDatabase('Target', envName, env.dbUrl)\n await this.runPreflight(pre, 'Migrate run')\n\n this.log(`${bold('migrate run')} → ${dim(envName)} (${dim(this.redactUrl(env.dbUrl))})\\n`)\n\n // The history is created only when migrations are applied: a preview\n // writes nothing, not even the table that records what ran.\n if (flags.apply) await ensureMigrationsTable(env.dbUrl)\n const applied = await getAppliedVersions(env.dbUrl)\n let pending = await getPendingMigrations(dir, applied)\n\n if (pending.length === 0) {\n this.log(`${ok('All migrations are up to date.')} ✓`)\n return\n }\n\n // Apply --up-to filter\n if (flags['up-to']) {\n const cutoff = flags['up-to']\n const idx = pending.findIndex(m => m.version === cutoff)\n if (idx === -1) {\n if (applied.has(cutoff)) {\n this.log(`${ok(`Version \"${cutoff}\" is already applied.`)} ✓`)\n return\n }\n this.error(`Version \"${cutoff}\" not found in pending migrations. Available: ${pending.map(m => m.version).join(', ')}`)\n }\n pending = pending.slice(0, idx + 1)\n }\n\n this.log(`Found ${bold(String(pending.length))} pending migration(s):\\n`)\n for (const m of pending) {\n this.log(` ${dim('○')} ${m.filename}`)\n }\n\n // A DROP TABLE in a migration file used to run with no opt-in at all,\n // while `diff --apply` held the same statement back (issue #88). The gate\n // is the same one, and the same flag opens it. Listed in the preview too,\n // so it is not first heard of when the apply refuses.\n const destructive = flags['allow-destructive'] ? [] : await findDestructiveStatements(pending)\n if (destructive.length > 0) {\n this.log('')\n this.log(warn(`${destructive.length} destructive statement(s) in the pending migrations:`))\n for (const { filename, sql } of destructive) {\n this.log(` ${warn('✗')} ${filename}`)\n this.log(` ${dim(truncateSql(sql))}`)\n }\n }\n\n if (!flags.apply) {\n this.log(`\\n${dim('Preview only — nothing was applied.')} Re-run with ${bold('--apply')} to execute`\n + (destructive.length > 0 ? `, and ${bold('--allow-destructive')} for the statements above.` : '.'))\n return\n }\n\n if (destructive.length > 0) {\n this.log(`\\n${warn('Nothing was applied.')} Re-run with ${bold('--allow-destructive')} to proceed.`)\n this.exit(1)\n }\n\n this.log('')\n\n // Execute migrations in order\n let applied_count = 0\n for (const migration of pending) {\n try {\n const result = await runMigration(env.dbUrl, migration)\n applied_count++\n this.log(` ${ok('✓')} ${result.filename} ${dim(`(${result.durationMs}ms)`)}`)\n } catch (err) {\n this.log(` ${warn('✗')} ${migration.filename}: ${err instanceof Error ? err.message : String(err)}`)\n this.log(`\\n${warn(`Stopped after ${applied_count} migration(s) due to error.`)}`)\n this.exit(1)\n }\n }\n\n this.log(`\\n${ok(`Applied ${applied_count} migration(s) successfully.`)} ✓`)\n }\n}\n\n/**\n * Destructive statements across a set of pending migration files.\n *\n * The SQL lives in the files rather than on the objects — `runMigration` reads\n * each one as it goes — so this reads them too. `readFileFn` is injectable for\n * the same reason `runMigration`'s is: so this can be tested without a\n * filesystem.\n *\n * Flat rather than grouped by file: the caller prints one line per statement,\n * and a migration with several destructive statements is worth seeing in full.\n * A file that cannot be read is not silently treated as safe — it is reported,\n * and `runMigration` will fail on it in a moment anyway.\n */\nexport async function findDestructiveStatements(\n migrations: Array<{ filename: string; path: string }>,\n readFileFn: (path: string) => Promise<string> = (path) => readFile(path, 'utf-8'),\n): Promise<Array<{ filename: string; sql: string }>> {\n const found: Array<{ filename: string; sql: string }> = []\n\n for (const migration of migrations) {\n let sql: string\n try {\n sql = await readFileFn(migration.path)\n } catch (err) {\n found.push({ filename: migration.filename, sql: `<unreadable: ${errMsg(err)}>` })\n continue\n }\n\n for (const statement of splitSqlStatements(sql)) {\n if (isDestructiveSql(statement)) {\n found.push({ filename: migration.filename, sql: statement })\n }\n }\n }\n\n return found\n}\n\n/**\n * One line of SQL for a listing, whatever the statement's shape.\n *\n * Comment lines are dropped first: the first statement of a file carries the\n * file's header, and a generated one its unit marker, which otherwise filled\n * the line before the statement began.\n */\nexport function truncateSql(sql: string): string {\n const oneLine = sql.split('\\n').filter(l => !/^\\s*--/.test(l)).join(' ').replace(/\\s+/g, ' ').trim()\n return oneLine.length > 100 ? `${oneLine.slice(0, 97)}...` : oneLine\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;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