@akal/supaforge 0.0.31 → 0.0.33

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.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +29 -11
  3. package/dist/base-command.d.ts +1 -0
  4. package/dist/base-command.js +2 -2
  5. package/dist/{chunk-BHYLBKYD.js → chunk-2SELREHW.js} +5 -5
  6. package/dist/{chunk-5Z3SAIQS.js → chunk-3HGAV5CC.js} +97 -831
  7. package/dist/{chunk-XMYMIURR.js → chunk-4IVN7QVY.js} +119 -39
  8. package/dist/{chunk-NXRSAVRU.js → chunk-6LJERPUN.js} +28 -7
  9. package/dist/{chunk-4OU7KO5Y.js → chunk-6Q7MHFBM.js} +2 -2
  10. package/dist/{chunk-PARSNTBD.js → chunk-7NAZGZPV.js} +56 -25
  11. package/dist/{chunk-VOXZWQ3N.js → chunk-BUOWHE36.js} +372 -9
  12. package/dist/{chunk-TQJSQLWA.js → chunk-DMIWAJRB.js} +38 -10
  13. package/dist/{chunk-LQXF65MC.js → chunk-GEHPTPNZ.js} +3 -3
  14. package/dist/chunk-GZREXCQZ.js +207 -0
  15. package/dist/{chunk-YVDSR4GM.js → chunk-MIRLB5JM.js} +51 -23
  16. package/dist/{chunk-KIFJGON5.js → chunk-NTUASFQ3.js} +2 -2
  17. package/dist/{chunk-5QQBTLWO.js → chunk-ORQJVE57.js} +3 -3
  18. package/dist/{chunk-VMTBLHN2.js → chunk-SC2XHGIS.js} +2 -2
  19. package/dist/{chunk-X6V2GGDZ.js → chunk-SQPCWGQO.js} +388 -64
  20. package/dist/chunk-UWAVXC57.js +916 -0
  21. package/dist/commands/clone.js +10 -10
  22. package/dist/commands/diff.d.ts +16 -0
  23. package/dist/commands/diff.js +11 -12
  24. package/dist/commands/hukam.js +11 -12
  25. package/dist/commands/mcp.d.ts +1 -0
  26. package/dist/commands/mcp.js +18 -9
  27. package/dist/commands/migrate/baseline.js +3 -3
  28. package/dist/commands/migrate/create.js +5 -6
  29. package/dist/commands/migrate/list.js +4 -4
  30. package/dist/commands/migrate/run.js +5 -6
  31. package/dist/commands/report.js +3 -3
  32. package/dist/commands/restore.js +11 -13
  33. package/dist/commands/snapshot.js +6 -8
  34. package/dist/commands/sync.js +11 -12
  35. package/dist/index.d.ts +5 -0
  36. package/dist/index.js +16 -16
  37. package/package.json +10 -8
  38. package/bin/dev.js +0 -10
  39. package/dist/base-command.js.map +0 -1
  40. package/dist/chunk-4OU7KO5Y.js.map +0 -1
  41. package/dist/chunk-5QQBTLWO.js.map +0 -1
  42. package/dist/chunk-5Z3SAIQS.js.map +0 -1
  43. package/dist/chunk-6WAMNZLO.js.map +0 -1
  44. package/dist/chunk-BHYLBKYD.js.map +0 -1
  45. package/dist/chunk-BLKJWDTL.js.map +0 -1
  46. package/dist/chunk-DQQ5E563.js.map +0 -1
  47. package/dist/chunk-G2DIPIYU.js.map +0 -1
  48. package/dist/chunk-H5MJ5DFX.js +0 -16
  49. package/dist/chunk-H5MJ5DFX.js.map +0 -1
  50. package/dist/chunk-KIFJGON5.js.map +0 -1
  51. package/dist/chunk-LQXF65MC.js.map +0 -1
  52. package/dist/chunk-NXRSAVRU.js.map +0 -1
  53. package/dist/chunk-PARSNTBD.js.map +0 -1
  54. package/dist/chunk-RRMI5CZD.js +0 -376
  55. package/dist/chunk-RRMI5CZD.js.map +0 -1
  56. package/dist/chunk-SF3YA42C.js +0 -506
  57. package/dist/chunk-SF3YA42C.js.map +0 -1
  58. package/dist/chunk-TQJSQLWA.js.map +0 -1
  59. package/dist/chunk-VMTBLHN2.js.map +0 -1
  60. package/dist/chunk-VOXZWQ3N.js.map +0 -1
  61. package/dist/chunk-X6V2GGDZ.js.map +0 -1
  62. package/dist/chunk-XMYMIURR.js.map +0 -1
  63. package/dist/chunk-YVDSR4GM.js.map +0 -1
  64. package/dist/commands/clone.js.map +0 -1
  65. package/dist/commands/diff.js.map +0 -1
  66. package/dist/commands/help.js.map +0 -1
  67. package/dist/commands/hukam.js.map +0 -1
  68. package/dist/commands/init.js.map +0 -1
  69. package/dist/commands/mcp.js.map +0 -1
  70. package/dist/commands/migrate/baseline.js.map +0 -1
  71. package/dist/commands/migrate/create.js.map +0 -1
  72. package/dist/commands/migrate/list.js.map +0 -1
  73. package/dist/commands/migrate/run.js.map +0 -1
  74. package/dist/commands/report.js.map +0 -1
  75. package/dist/commands/restore.js.map +0 -1
  76. package/dist/commands/snapshot.js.map +0 -1
  77. package/dist/commands/sync.js.map +0 -1
  78. package/dist/help.js.map +0 -1
  79. package/dist/index.js.map +0 -1
@@ -2,12 +2,8 @@ import {
2
2
  renderTip
3
3
  } from "../chunk-BLKJWDTL.js";
4
4
  import {
5
- BaseCommand,
6
- DEFAULT_LOCAL_PORT,
7
- LOCAL_PG_PASSWORD,
8
- LOCAL_PG_USER,
9
- startLocalPg
10
- } from "../chunk-SF3YA42C.js";
5
+ BaseCommand
6
+ } from "../chunk-GZREXCQZ.js";
11
7
  import {
12
8
  addBranchToManifest,
13
9
  cloneRemoteToLocal,
@@ -15,18 +11,22 @@ import {
15
11
  listBranches,
16
12
  reconcileClones,
17
13
  replaceDbName
18
- } from "../chunk-5QQBTLWO.js";
14
+ } from "../chunk-ORQJVE57.js";
19
15
  import {
20
16
  captureSnapshot,
21
17
  checkPgDumpCompat,
22
18
  formatSnapshotLayers
23
- } from "../chunk-YVDSR4GM.js";
19
+ } from "../chunk-MIRLB5JM.js";
24
20
  import "../chunk-DQQ5E563.js";
25
21
  import {
22
+ DEFAULT_LOCAL_PORT,
23
+ LOCAL_PG_PASSWORD,
24
+ LOCAL_PG_USER,
26
25
  errMsg,
27
26
  pgClientConfig,
28
- redactUrls
29
- } from "../chunk-X6V2GGDZ.js";
27
+ redactUrls,
28
+ startLocalPg
29
+ } from "../chunk-SQPCWGQO.js";
30
30
  import {
31
31
  CLONE_EXTRA_EXCLUDE_SCHEMAS,
32
32
  CLONE_SKIP_FLAGS,
@@ -60,6 +60,22 @@ declare class Diff extends BaseCommand {
60
60
  */
61
61
  private renderApplyResult;
62
62
  run(): Promise<void>;
63
+ /**
64
+ * Stop before applying anything: the proof could not run, or ran and found
65
+ * the migration would not reproduce the source. Under --json the reason is
66
+ * the output, rather than nothing at all.
67
+ */
68
+ private refuseUnproven;
69
+ /** Name the checks that failed, whose drift this run neither saw nor applied. */
70
+ private reportUnchecked;
71
+ /**
72
+ * Abort before scanning when either database can't be reached.
73
+ *
74
+ * Text mode prints the preflight as before. Under --json the report goes to
75
+ * stdout as JSON; under --ci it becomes an error annotation, with exit 2
76
+ * (couldn't run) as the CI contract says.
77
+ */
78
+ private preflightBothDatabases;
63
79
  }
64
80
 
65
81
  export { Diff as default, inertApplyFlags };
@@ -1,21 +1,20 @@
1
1
  import {
2
2
  Diff,
3
3
  inertApplyFlags
4
- } from "../chunk-XMYMIURR.js";
5
- import "../chunk-4OU7KO5Y.js";
6
- import "../chunk-LQXF65MC.js";
7
- import "../chunk-5Z3SAIQS.js";
8
- import "../chunk-TQJSQLWA.js";
9
- import "../chunk-H5MJ5DFX.js";
10
- import "../chunk-VOXZWQ3N.js";
11
- import "../chunk-RRMI5CZD.js";
4
+ } from "../chunk-4IVN7QVY.js";
5
+ import "../chunk-6Q7MHFBM.js";
6
+ import "../chunk-GEHPTPNZ.js";
7
+ import "../chunk-3HGAV5CC.js";
8
+ import "../chunk-DMIWAJRB.js";
9
+ import "../chunk-UWAVXC57.js";
10
+ import "../chunk-BUOWHE36.js";
12
11
  import "../chunk-G2DIPIYU.js";
13
12
  import "../chunk-BLKJWDTL.js";
14
- import "../chunk-SF3YA42C.js";
15
- import "../chunk-5QQBTLWO.js";
16
- import "../chunk-YVDSR4GM.js";
13
+ import "../chunk-GZREXCQZ.js";
14
+ import "../chunk-ORQJVE57.js";
15
+ import "../chunk-MIRLB5JM.js";
17
16
  import "../chunk-DQQ5E563.js";
18
- import "../chunk-X6V2GGDZ.js";
17
+ import "../chunk-SQPCWGQO.js";
19
18
  import "../chunk-6WAMNZLO.js";
20
19
  export {
21
20
  Diff as default,
@@ -1,20 +1,19 @@
1
1
  import {
2
2
  Diff
3
- } from "../chunk-XMYMIURR.js";
4
- import "../chunk-4OU7KO5Y.js";
5
- import "../chunk-LQXF65MC.js";
6
- import "../chunk-5Z3SAIQS.js";
7
- import "../chunk-TQJSQLWA.js";
8
- import "../chunk-H5MJ5DFX.js";
9
- import "../chunk-VOXZWQ3N.js";
10
- import "../chunk-RRMI5CZD.js";
3
+ } from "../chunk-4IVN7QVY.js";
4
+ import "../chunk-6Q7MHFBM.js";
5
+ import "../chunk-GEHPTPNZ.js";
6
+ import "../chunk-3HGAV5CC.js";
7
+ import "../chunk-DMIWAJRB.js";
8
+ import "../chunk-UWAVXC57.js";
9
+ import "../chunk-BUOWHE36.js";
11
10
  import "../chunk-G2DIPIYU.js";
12
11
  import "../chunk-BLKJWDTL.js";
13
- import "../chunk-SF3YA42C.js";
14
- import "../chunk-5QQBTLWO.js";
15
- import "../chunk-YVDSR4GM.js";
12
+ import "../chunk-GZREXCQZ.js";
13
+ import "../chunk-ORQJVE57.js";
14
+ import "../chunk-MIRLB5JM.js";
16
15
  import "../chunk-DQQ5E563.js";
17
- import "../chunk-X6V2GGDZ.js";
16
+ import "../chunk-SQPCWGQO.js";
18
17
  import "../chunk-6WAMNZLO.js";
19
18
 
20
19
  // src/commands/hukam.ts
@@ -5,6 +5,7 @@ declare class Mcp extends Command {
5
5
  static description: string;
6
6
  static examples: string[];
7
7
  static flags: {
8
+ project: _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
8
9
  'allow-config-path': _oclif_core_interfaces.BooleanFlag<boolean>;
9
10
  };
10
11
  run(): Promise<void>;
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  createServer
3
- } from "../chunk-NXRSAVRU.js";
4
- import "../chunk-KIFJGON5.js";
5
- import "../chunk-5Z3SAIQS.js";
6
- import "../chunk-H5MJ5DFX.js";
7
- import "../chunk-VOXZWQ3N.js";
8
- import "../chunk-RRMI5CZD.js";
3
+ } from "../chunk-6LJERPUN.js";
4
+ import "../chunk-NTUASFQ3.js";
5
+ import "../chunk-3HGAV5CC.js";
6
+ import "../chunk-UWAVXC57.js";
7
+ import "../chunk-BUOWHE36.js";
9
8
  import "../chunk-G2DIPIYU.js";
10
- import "../chunk-YVDSR4GM.js";
9
+ import "../chunk-MIRLB5JM.js";
11
10
  import "../chunk-DQQ5E563.js";
12
- import "../chunk-X6V2GGDZ.js";
11
+ import "../chunk-SQPCWGQO.js";
13
12
  import "../chunk-6WAMNZLO.js";
14
13
 
15
14
  // src/commands/mcp.ts
15
+ import { existsSync, statSync } from "fs";
16
+ import { resolve } from "path";
16
17
  import { Command, Flags } from "@oclif/core";
17
18
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18
19
  var Mcp = class _Mcp extends Command {
@@ -20,9 +21,13 @@ var Mcp = class _Mcp extends Command {
20
21
  static examples = [
21
22
  "<%= config.bin %> mcp",
22
23
  "<%= config.bin %> mcp --allow-config-path",
24
+ "<%= config.bin %> mcp --project ~/code/my-app",
23
25
  '# Claude Desktop / Cursor config:\n# { "mcpServers": { "supaforge": { "command": "supaforge", "args": ["mcp"] } } }'
24
26
  ];
25
27
  static flags = {
28
+ project: Flags.string({
29
+ description: "The project directory, holding supaforge.config.json. Defaults to the directory the server starts in \u2014 which an AI client may not let you choose, so name it here."
30
+ }),
26
31
  "allow-config-path": Flags.boolean({
27
32
  description: "Let a client choose which supaforge.config.json to load. Off by default: a tool call, or a prompt injected into one, could otherwise point the server at any config on disk \u2014 including one holding production credentials \u2014 bypassing the one it was started with.",
28
33
  default: false
@@ -30,7 +35,11 @@ var Mcp = class _Mcp extends Command {
30
35
  };
31
36
  async run() {
32
37
  const { flags } = await this.parse(_Mcp);
33
- const server = createServer(process.cwd(), {
38
+ const project = resolve(flags.project ?? process.cwd());
39
+ if (!existsSync(project) || !statSync(project).isDirectory()) {
40
+ this.error(`--project: ${project} is not a directory`);
41
+ }
42
+ const server = createServer(project, {
34
43
  allowConfigPath: flags["allow-config-path"]
35
44
  });
36
45
  const transport = new StdioServerTransport();
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  baselineMigrations
3
- } from "../../chunk-VMTBLHN2.js";
3
+ } from "../../chunk-SC2XHGIS.js";
4
4
  import {
5
5
  BaseCommand
6
- } from "../../chunk-SF3YA42C.js";
7
- import "../../chunk-X6V2GGDZ.js";
6
+ } from "../../chunk-GZREXCQZ.js";
7
+ import "../../chunk-SQPCWGQO.js";
8
8
  import {
9
9
  bold,
10
10
  dim,
@@ -1,22 +1,21 @@
1
1
  import {
2
2
  truncateSql
3
- } from "../../chunk-BHYLBKYD.js";
4
- import "../../chunk-VMTBLHN2.js";
3
+ } from "../../chunk-2SELREHW.js";
4
+ import "../../chunk-SC2XHGIS.js";
5
5
  import {
6
6
  isDestructiveSql,
7
7
  runDbDiff
8
- } from "../../chunk-VOXZWQ3N.js";
9
- import "../../chunk-RRMI5CZD.js";
8
+ } from "../../chunk-BUOWHE36.js";
10
9
  import {
11
10
  splitSqlStatements
12
11
  } from "../../chunk-G2DIPIYU.js";
13
12
  import {
14
13
  BaseCommand
15
- } from "../../chunk-SF3YA42C.js";
14
+ } from "../../chunk-GZREXCQZ.js";
16
15
  import {
17
16
  slugify
18
17
  } from "../../chunk-DQQ5E563.js";
19
- import "../../chunk-X6V2GGDZ.js";
18
+ import "../../chunk-SQPCWGQO.js";
20
19
  import {
21
20
  DEFAULT_IGNORE_SCHEMAS,
22
21
  bold,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  getAppliedVersions
3
- } from "../../chunk-VMTBLHN2.js";
3
+ } from "../../chunk-SC2XHGIS.js";
4
4
  import {
5
5
  BaseCommand
6
- } from "../../chunk-SF3YA42C.js";
6
+ } from "../../chunk-GZREXCQZ.js";
7
7
  import {
8
8
  errMsg,
9
9
  pgQuery,
10
10
  readLocalMigrations
11
- } from "../../chunk-X6V2GGDZ.js";
11
+ } from "../../chunk-SQPCWGQO.js";
12
12
  import {
13
13
  bold,
14
14
  dim,
@@ -42,7 +42,7 @@ var MigrateList = class _MigrateList extends BaseCommand {
42
42
  const config = await this.loadConfigOrFail();
43
43
  const dir = this.resolveMigrationsDir(config);
44
44
  const migrations = await readLocalMigrations(dir).catch(() => []);
45
- if (flags.offline || !config.source) {
45
+ if (flags.offline || !config.source && !flags.env) {
46
46
  if (flags.json) {
47
47
  this.json(migrations);
48
48
  return;
@@ -2,14 +2,13 @@ import {
2
2
  MigrateRun,
3
3
  findDestructiveStatements,
4
4
  truncateSql
5
- } from "../../chunk-BHYLBKYD.js";
6
- import "../../chunk-VMTBLHN2.js";
7
- import "../../chunk-VOXZWQ3N.js";
8
- import "../../chunk-RRMI5CZD.js";
5
+ } from "../../chunk-2SELREHW.js";
6
+ import "../../chunk-SC2XHGIS.js";
7
+ import "../../chunk-BUOWHE36.js";
9
8
  import "../../chunk-G2DIPIYU.js";
10
- import "../../chunk-SF3YA42C.js";
9
+ import "../../chunk-GZREXCQZ.js";
11
10
  import "../../chunk-DQQ5E563.js";
12
- import "../../chunk-X6V2GGDZ.js";
11
+ import "../../chunk-SQPCWGQO.js";
13
12
  import "../../chunk-6WAMNZLO.js";
14
13
  export {
15
14
  MigrateRun as default,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  sanitizeForReport
3
- } from "../chunk-4OU7KO5Y.js";
3
+ } from "../chunk-6Q7MHFBM.js";
4
4
  import {
5
5
  BaseCommand,
6
6
  readRunLog,
7
7
  runLogPath
8
- } from "../chunk-SF3YA42C.js";
9
- import "../chunk-X6V2GGDZ.js";
8
+ } from "../chunk-GZREXCQZ.js";
9
+ import "../chunk-SQPCWGQO.js";
10
10
  import {
11
11
  bold,
12
12
  cmd,
@@ -5,25 +5,25 @@ import {
5
5
  restoreFromMigrations,
6
6
  restoreFromSnapshot,
7
7
  summarizeStatement
8
- } from "../chunk-PARSNTBD.js";
9
- import "../chunk-KIFJGON5.js";
10
- import "../chunk-VMTBLHN2.js";
11
- import "../chunk-TQJSQLWA.js";
12
- import "../chunk-H5MJ5DFX.js";
13
- import "../chunk-RRMI5CZD.js";
8
+ } from "../chunk-7NAZGZPV.js";
9
+ import "../chunk-NTUASFQ3.js";
10
+ import "../chunk-SC2XHGIS.js";
11
+ import "../chunk-DMIWAJRB.js";
12
+ import "../chunk-UWAVXC57.js";
13
+ import "../chunk-BUOWHE36.js";
14
14
  import "../chunk-G2DIPIYU.js";
15
15
  import {
16
16
  renderTip
17
17
  } from "../chunk-BLKJWDTL.js";
18
18
  import {
19
19
  BaseCommand
20
- } from "../chunk-SF3YA42C.js";
20
+ } from "../chunk-GZREXCQZ.js";
21
21
  import {
22
22
  findLatestSnapshot,
23
23
  listSnapshots
24
- } from "../chunk-YVDSR4GM.js";
24
+ } from "../chunk-MIRLB5JM.js";
25
25
  import "../chunk-DQQ5E563.js";
26
- import "../chunk-X6V2GGDZ.js";
26
+ import "../chunk-SQPCWGQO.js";
27
27
  import {
28
28
  cmd,
29
29
  warn
@@ -82,10 +82,8 @@ var Restore = class _Restore extends BaseCommand {
82
82
  const config = await this.loadConfigOrFail();
83
83
  const envName = flags.env;
84
84
  const { env } = this.resolveEnv(config, envName);
85
- if (!flags.json) {
86
- const pre = this.createPreflight("Restore preflight checks").addDatabase("Target", envName, env.dbUrl);
87
- await this.runPreflight(pre, "Restore");
88
- }
85
+ const pre = this.createPreflight("Restore preflight checks").addDatabase("Target", envName, env.dbUrl);
86
+ await this.runPreflight(pre, "Restore");
89
87
  if (flags.apply) {
90
88
  const tables = await getPublicTables(env.dbUrl);
91
89
  if (tables.length > 0 && !flags.force) {
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  backup,
3
3
  listMigrationFiles
4
- } from "../chunk-KIFJGON5.js";
4
+ } from "../chunk-NTUASFQ3.js";
5
5
  import "../chunk-G2DIPIYU.js";
6
6
  import {
7
7
  renderTip
8
8
  } from "../chunk-BLKJWDTL.js";
9
9
  import {
10
10
  BaseCommand
11
- } from "../chunk-SF3YA42C.js";
11
+ } from "../chunk-GZREXCQZ.js";
12
12
  import {
13
13
  DEFAULT_KEEP_COUNT,
14
14
  captureSnapshot,
15
15
  formatSnapshotLayers,
16
16
  listSnapshots,
17
17
  pruneSnapshots
18
- } from "../chunk-YVDSR4GM.js";
18
+ } from "../chunk-MIRLB5JM.js";
19
19
  import "../chunk-DQQ5E563.js";
20
- import "../chunk-X6V2GGDZ.js";
20
+ import "../chunk-SQPCWGQO.js";
21
21
  import {
22
22
  bold,
23
23
  cmd,
@@ -151,10 +151,8 @@ Prune: ${snapshots.length} snapshot(s) found, keeping ${keepCount}.`);
151
151
  return;
152
152
  }
153
153
  const { envName, env } = this.resolveEnv(config, flags.env);
154
- if (!flags.json) {
155
- const pre = this.createPreflight("Snapshot preflight checks").addDatabase("Database", envName, env.dbUrl);
156
- await this.runPreflight(pre, "Snapshot");
157
- }
154
+ const pre = this.createPreflight("Snapshot preflight checks").addDatabase("Database", envName, env.dbUrl);
155
+ await this.runPreflight(pre, "Snapshot");
158
156
  if (!flags.apply) {
159
157
  if (flags.json) {
160
158
  this.json({ dryRun: true, environment: envName, migration: flags.migration });
@@ -1,20 +1,19 @@
1
1
  import {
2
2
  Diff
3
- } from "../chunk-XMYMIURR.js";
4
- import "../chunk-4OU7KO5Y.js";
5
- import "../chunk-LQXF65MC.js";
6
- import "../chunk-5Z3SAIQS.js";
7
- import "../chunk-TQJSQLWA.js";
8
- import "../chunk-H5MJ5DFX.js";
9
- import "../chunk-VOXZWQ3N.js";
10
- import "../chunk-RRMI5CZD.js";
3
+ } from "../chunk-4IVN7QVY.js";
4
+ import "../chunk-6Q7MHFBM.js";
5
+ import "../chunk-GEHPTPNZ.js";
6
+ import "../chunk-3HGAV5CC.js";
7
+ import "../chunk-DMIWAJRB.js";
8
+ import "../chunk-UWAVXC57.js";
9
+ import "../chunk-BUOWHE36.js";
11
10
  import "../chunk-G2DIPIYU.js";
12
11
  import "../chunk-BLKJWDTL.js";
13
- import "../chunk-SF3YA42C.js";
14
- import "../chunk-5QQBTLWO.js";
15
- import "../chunk-YVDSR4GM.js";
12
+ import "../chunk-GZREXCQZ.js";
13
+ import "../chunk-ORQJVE57.js";
14
+ import "../chunk-MIRLB5JM.js";
16
15
  import "../chunk-DQQ5E563.js";
17
- import "../chunk-X6V2GGDZ.js";
16
+ import "../chunk-SQPCWGQO.js";
18
17
  import "../chunk-6WAMNZLO.js";
19
18
 
20
19
  // src/commands/sync.ts
package/dist/index.d.ts CHANGED
@@ -67,6 +67,11 @@ interface DriftIssue {
67
67
  * instead of being told there is nothing to be done.
68
68
  */
69
69
  manualOnly?: string;
70
+ /**
71
+ * Why this fix waits for --allow-destructive, when that isn't visible from
72
+ * its SQL: a webhook is a trigger, and dropping a trigger usually isn't.
73
+ */
74
+ destructive?: string;
70
75
  }
71
76
  interface CheckResult {
72
77
  check: CheckName;
package/dist/index.js CHANGED
@@ -3,37 +3,37 @@ import {
3
3
  createServer,
4
4
  getLastScanResult,
5
5
  setLastScanResult
6
- } from "./chunk-NXRSAVRU.js";
6
+ } from "./chunk-6LJERPUN.js";
7
7
  import {
8
8
  previewMigrationRestore,
9
9
  previewSnapshotRestore,
10
10
  restoreFromMigrations,
11
11
  restoreFromSnapshot
12
- } from "./chunk-PARSNTBD.js";
12
+ } from "./chunk-7NAZGZPV.js";
13
13
  import {
14
14
  backup,
15
15
  listMigrationFiles,
16
16
  loadMigrations
17
- } from "./chunk-KIFJGON5.js";
18
- import "./chunk-VMTBLHN2.js";
17
+ } from "./chunk-NTUASFQ3.js";
18
+ import "./chunk-SC2XHGIS.js";
19
19
  import {
20
20
  renderDetailed,
21
21
  renderSummary
22
- } from "./chunk-LQXF65MC.js";
22
+ } from "./chunk-GEHPTPNZ.js";
23
23
  import {
24
- CHECK_META,
25
- CHECK_NAMES,
26
24
  CheckRegistry,
27
25
  computeScore,
28
26
  createDefaultRegistry,
29
- promote,
30
27
  scan,
31
28
  summarize
32
- } from "./chunk-5Z3SAIQS.js";
33
- import "./chunk-TQJSQLWA.js";
34
- import "./chunk-H5MJ5DFX.js";
35
- import "./chunk-VOXZWQ3N.js";
36
- import "./chunk-RRMI5CZD.js";
29
+ } from "./chunk-3HGAV5CC.js";
30
+ import "./chunk-DMIWAJRB.js";
31
+ import {
32
+ CHECK_META,
33
+ CHECK_NAMES,
34
+ promote
35
+ } from "./chunk-UWAVXC57.js";
36
+ import "./chunk-BUOWHE36.js";
37
37
  import "./chunk-G2DIPIYU.js";
38
38
  import {
39
39
  BRANCH_DB_PREFIX,
@@ -43,17 +43,17 @@ import {
43
43
  listBranches,
44
44
  loadManifest,
45
45
  replaceDbName
46
- } from "./chunk-5QQBTLWO.js";
46
+ } from "./chunk-ORQJVE57.js";
47
47
  import {
48
48
  captureSnapshot,
49
49
  findLatestSnapshot,
50
50
  listSnapshots,
51
51
  loadSnapshot
52
- } from "./chunk-YVDSR4GM.js";
52
+ } from "./chunk-MIRLB5JM.js";
53
53
  import "./chunk-DQQ5E563.js";
54
54
  import {
55
55
  Check
56
- } from "./chunk-X6V2GGDZ.js";
56
+ } from "./chunk-SQPCWGQO.js";
57
57
  import {
58
58
  loadConfig,
59
59
  resolveConfig,
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@akal/supaforge",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
+ "mcpName": "io.github.akalsoftware/supaforge",
4
5
  "description": "Diff and sync your Supabase environments",
5
6
  "author": "Akal Software Ltd",
6
7
  "license": "MIT",
@@ -20,8 +21,9 @@
20
21
  "main": "dist/index.js",
21
22
  "types": "dist/index.d.ts",
22
23
  "files": [
23
- "bin",
24
- "dist"
24
+ "bin/run.js",
25
+ "dist",
26
+ "!dist/**/*.map"
25
27
  ],
26
28
  "publishConfig": {
27
29
  "access": "public"
@@ -53,9 +55,9 @@
53
55
  "topicSeparator": " "
54
56
  },
55
57
  "dependencies": {
56
- "@akal/pg-conformance": "~0.0.15",
57
- "@dbdiff/cli": "3.0.0-rc.24",
58
- "@modelcontextprotocol/sdk": "^1.12.1",
58
+ "@akal/pg-conformance": "~0.0.16",
59
+ "@dbdiff/cli": "3.0.0-rc.27",
60
+ "@modelcontextprotocol/sdk": "^1.32.1",
59
61
  "@oclif/core": "^4",
60
62
  "@supabase/supabase-js": "^2.103.0",
61
63
  "libpg-query": "~18.1.5",
@@ -68,9 +70,9 @@
68
70
  "tsup": "^8.5.1",
69
71
  "tsx": "^4",
70
72
  "typescript": "^5",
71
- "vitest": "^3"
73
+ "vitest": "^4.1.11"
72
74
  },
73
75
  "engines": {
74
- "node": ">=18.0.0"
76
+ "node": ">=20.0.0"
75
77
  }
76
78
  }
package/bin/dev.js DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env tsx
2
- import {execute} from '@oclif/core'
3
-
4
- await execute({development: true, dir: import.meta.url}).catch((err) => {
5
- if (err && typeof err === 'object' && 'oclif' in err) return
6
- process.stderr.write(`\nUnexpected error: ${err?.message ?? err}\n`)
7
- process.stderr.write('If this looks like a bug, please report it:\n')
8
- process.stderr.write(' https://github.com/akalsoftware/supaforge/issues/new\n\n')
9
- process.exitCode = 1
10
- })
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/sanitize.ts"],"sourcesContent":["import { redactUrls } from './error.js'\n\n/**\n * Strip PII from a string at source — before it ever leaves the user's machine.\n *\n * Covers the realistic surface area without over-engineering:\n * • DB credentials via redactUrls (postgres://user:PASSWORD@host)\n * • Local file-system paths (/Users/alice/... or /home/alice/...)\n * • Bare IPv4 addresses\n */\nexport function sanitizeForReport(text: string): string {\n return redactUrls(text)\n .replace(/\\/(?:Users|home)\\/[^/\\s\"'`]+/g, '~')\n .replace(/\\b\\d{1,3}(?:\\.\\d{1,3}){3}\\b/g, '[ip]')\n}\n"],"mappings":";;;;;AAUO,SAAS,kBAAkB,MAAsB;AACtD,SAAO,WAAW,IAAI,EACnB,QAAQ,iCAAiC,GAAG,EAC5C,QAAQ,gCAAgC,MAAM;AACnD;","names":[]}