@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.
- package/LICENSE +21 -0
- package/README.md +29 -11
- package/dist/base-command.d.ts +1 -0
- package/dist/base-command.js +2 -2
- package/dist/{chunk-BHYLBKYD.js → chunk-2SELREHW.js} +5 -5
- package/dist/{chunk-5Z3SAIQS.js → chunk-3HGAV5CC.js} +97 -831
- package/dist/{chunk-XMYMIURR.js → chunk-4IVN7QVY.js} +119 -39
- package/dist/{chunk-NXRSAVRU.js → chunk-6LJERPUN.js} +28 -7
- package/dist/{chunk-4OU7KO5Y.js → chunk-6Q7MHFBM.js} +2 -2
- package/dist/{chunk-PARSNTBD.js → chunk-7NAZGZPV.js} +56 -25
- package/dist/{chunk-VOXZWQ3N.js → chunk-BUOWHE36.js} +372 -9
- package/dist/{chunk-TQJSQLWA.js → chunk-DMIWAJRB.js} +38 -10
- package/dist/{chunk-LQXF65MC.js → chunk-GEHPTPNZ.js} +3 -3
- package/dist/chunk-GZREXCQZ.js +207 -0
- package/dist/{chunk-YVDSR4GM.js → chunk-MIRLB5JM.js} +51 -23
- package/dist/{chunk-KIFJGON5.js → chunk-NTUASFQ3.js} +2 -2
- package/dist/{chunk-5QQBTLWO.js → chunk-ORQJVE57.js} +3 -3
- package/dist/{chunk-VMTBLHN2.js → chunk-SC2XHGIS.js} +2 -2
- package/dist/{chunk-X6V2GGDZ.js → chunk-SQPCWGQO.js} +388 -64
- package/dist/chunk-UWAVXC57.js +916 -0
- package/dist/commands/clone.js +10 -10
- package/dist/commands/diff.d.ts +16 -0
- package/dist/commands/diff.js +11 -12
- package/dist/commands/hukam.js +11 -12
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.js +18 -9
- package/dist/commands/migrate/baseline.js +3 -3
- package/dist/commands/migrate/create.js +5 -6
- package/dist/commands/migrate/list.js +4 -4
- package/dist/commands/migrate/run.js +5 -6
- package/dist/commands/report.js +3 -3
- package/dist/commands/restore.js +11 -13
- package/dist/commands/snapshot.js +6 -8
- package/dist/commands/sync.js +11 -12
- package/dist/index.d.ts +5 -0
- package/dist/index.js +16 -16
- package/package.json +10 -8
- package/bin/dev.js +0 -10
- package/dist/base-command.js.map +0 -1
- package/dist/chunk-4OU7KO5Y.js.map +0 -1
- package/dist/chunk-5QQBTLWO.js.map +0 -1
- package/dist/chunk-5Z3SAIQS.js.map +0 -1
- package/dist/chunk-6WAMNZLO.js.map +0 -1
- package/dist/chunk-BHYLBKYD.js.map +0 -1
- package/dist/chunk-BLKJWDTL.js.map +0 -1
- package/dist/chunk-DQQ5E563.js.map +0 -1
- package/dist/chunk-G2DIPIYU.js.map +0 -1
- package/dist/chunk-H5MJ5DFX.js +0 -16
- package/dist/chunk-H5MJ5DFX.js.map +0 -1
- package/dist/chunk-KIFJGON5.js.map +0 -1
- package/dist/chunk-LQXF65MC.js.map +0 -1
- package/dist/chunk-NXRSAVRU.js.map +0 -1
- package/dist/chunk-PARSNTBD.js.map +0 -1
- package/dist/chunk-RRMI5CZD.js +0 -376
- package/dist/chunk-RRMI5CZD.js.map +0 -1
- package/dist/chunk-SF3YA42C.js +0 -506
- package/dist/chunk-SF3YA42C.js.map +0 -1
- package/dist/chunk-TQJSQLWA.js.map +0 -1
- package/dist/chunk-VMTBLHN2.js.map +0 -1
- package/dist/chunk-VOXZWQ3N.js.map +0 -1
- package/dist/chunk-X6V2GGDZ.js.map +0 -1
- package/dist/chunk-XMYMIURR.js.map +0 -1
- package/dist/chunk-YVDSR4GM.js.map +0 -1
- package/dist/commands/clone.js.map +0 -1
- package/dist/commands/diff.js.map +0 -1
- package/dist/commands/help.js.map +0 -1
- package/dist/commands/hukam.js.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/migrate/baseline.js.map +0 -1
- package/dist/commands/migrate/create.js.map +0 -1
- package/dist/commands/migrate/list.js.map +0 -1
- package/dist/commands/migrate/run.js.map +0 -1
- package/dist/commands/report.js.map +0 -1
- package/dist/commands/restore.js.map +0 -1
- package/dist/commands/snapshot.js.map +0 -1
- package/dist/commands/sync.js.map +0 -1
- package/dist/help.js.map +0 -1
- package/dist/index.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Akal Software Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Everything that writes previews first. Add `--apply` to make it happen.
|
|
|
51
51
|
| Vault | Secret names and descriptions (values can't be read) | Command to run |
|
|
52
52
|
| Extensions | `pg_extension` | SQL |
|
|
53
53
|
| Migration history | Local migration files against `supabase_migrations` (target only) | SQL, opt-in |
|
|
54
|
-
| Roles and grants | Custom roles, and grants including `anon`, `authenticated`, `service_role` | SQL |
|
|
54
|
+
| Roles and grants | Custom roles, and grants on tables, views, sequences and functions, including `anon`, `authenticated`, `service_role` | SQL |
|
|
55
55
|
|
|
56
56
|
The schema check covers tables, columns, keys, indexes, partitions, views,
|
|
57
57
|
materialized views, functions, triggers, sequences, enums, composite types,
|
|
@@ -113,9 +113,10 @@ Useful `diff` flags:
|
|
|
113
113
|
a Supabase schema the target lacks, is skipped with the reason, and the rest
|
|
114
114
|
still applies.
|
|
115
115
|
- **`--prove`.** The fixes are replayed on a structure-only copy of the target,
|
|
116
|
-
made on the target's own server
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
made on the target's own server, the way the apply will run them. Nothing is
|
|
117
|
+
applied unless the result matches the source, and nothing is applied if the
|
|
118
|
+
proof can't run. Changes a copy can't hold, such as cron jobs (pg_cron lives
|
|
119
|
+
in one database per server), are listed as not proved.
|
|
119
120
|
|
|
120
121
|
```bash
|
|
121
122
|
supaforge diff --dry-run # the plan, in order
|
|
@@ -239,7 +240,7 @@ supaforge migrate run --env=prod --apply
|
|
|
239
240
|
| `SUPAFORGE_DBDIFF_MEMORY` | `1G` | Memory limit for `@dbdiff/cli` (`2G`, `-1` for none) |
|
|
240
241
|
| `SUPAFORGE_CONNECT_TIMEOUT` | `15` | Seconds to wait for a connection |
|
|
241
242
|
| `SUPAFORGE_CHECK_CONCURRENCY` | `4` | Checks run at once. Lower it behind a tight pooler |
|
|
242
|
-
| `SUPAFORGE_PG_BIN` | — | A directory of PostgreSQL client tools (`pg_dump`, `psql`)
|
|
243
|
+
| `SUPAFORGE_PG_BIN` | — | A directory of PostgreSQL client tools (`pg_dump`, `psql`), used ahead of `PATH` — for a server newer than the tools on `PATH` |
|
|
243
244
|
|
|
244
245
|
## Self-hosted Supabase
|
|
245
246
|
|
|
@@ -271,7 +272,7 @@ would push the clone's shape, absences included, onto the target.
|
|
|
271
272
|
## CI and exit codes
|
|
272
273
|
|
|
273
274
|
```yaml
|
|
274
|
-
- run: npx supaforge diff --ci
|
|
275
|
+
- run: npx @akal/supaforge diff --ci
|
|
275
276
|
env:
|
|
276
277
|
DEV_DATABASE_URL: ${{ secrets.DEV_DATABASE_URL }}
|
|
277
278
|
PROD_DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }}
|
|
@@ -288,9 +289,25 @@ would push the clone's shape, absences included, onto the target.
|
|
|
288
289
|
|
|
289
290
|
## MCP (AI agents)
|
|
290
291
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
SupaForge runs as an MCP server, so an AI agent in your editor can scan for
|
|
293
|
+
drift and fix it, asking you before anything is written.
|
|
294
|
+
|
|
295
|
+
[](https://cursor.com/install-mcp?name=supaforge&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBha2FsL3N1cGFmb3JnZSIsIm1jcCIsIi0tcHJvamVjdCIsIiR7d29ya3NwYWNlRm9sZGVyfSJdfQ==)
|
|
296
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=supaforge&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40akal%2Fsupaforge%22%2C%22mcp%22%2C%22--project%22%2C%22%24%7BworkspaceFolder%7D%22%5D%7D)
|
|
297
|
+
|
|
298
|
+
- **Claude Desktop**: download the extension for your platform
|
|
299
|
+
(`supaforge-<version>-<platform>.mcpb`) from the
|
|
300
|
+
[latest release](https://github.com/akalsoftware/supaforge/releases/latest)
|
|
301
|
+
and open it. It asks for your project directory.
|
|
302
|
+
- **Claude Code**: `claude mcp add supaforge -- npx -y @akal/supaforge mcp`
|
|
303
|
+
- **Any other client**:
|
|
304
|
+
|
|
305
|
+
```json
|
|
306
|
+
{ "mcpServers": { "supaforge": { "command": "npx", "args": ["-y", "@akal/supaforge", "mcp", "--project", "/path/to/project"] } } }
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
It is listed in the [MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.akalsoftware/supaforge)
|
|
310
|
+
as `io.github.akalsoftware/supaforge`.
|
|
294
311
|
|
|
295
312
|
The server exposes these tools:
|
|
296
313
|
|
|
@@ -302,8 +319,9 @@ The server exposes these tools:
|
|
|
302
319
|
| `take_snapshot` | Writes files |
|
|
303
320
|
| `create_migration` | Writes files |
|
|
304
321
|
|
|
305
|
-
It reads
|
|
306
|
-
client unless started
|
|
322
|
+
It reads `supaforge.config.json` in the directory given by `--project` (or the
|
|
323
|
+
one it starts in), and refuses a `configPath` from a client unless started
|
|
324
|
+
with `--allow-config-path`.
|
|
307
325
|
|
|
308
326
|
## Hooks
|
|
309
327
|
|
package/dist/base-command.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ declare abstract class BaseCommand extends Command {
|
|
|
91
91
|
* text came first and the output did not parse.
|
|
92
92
|
*/
|
|
93
93
|
log(message?: string, ...args: unknown[]): void;
|
|
94
|
+
private _jsonWritten;
|
|
94
95
|
/** The command's result as JSON, on stdout. */
|
|
95
96
|
protected json(value: unknown): void;
|
|
96
97
|
/** Call after scan() to attach per-check metadata to the run log entry. */
|
package/dist/base-command.js
CHANGED
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
getAppliedVersions,
|
|
4
4
|
getPendingMigrations,
|
|
5
5
|
runMigration
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SC2XHGIS.js";
|
|
7
7
|
import {
|
|
8
8
|
isDestructiveSql
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BUOWHE36.js";
|
|
10
10
|
import {
|
|
11
11
|
splitSqlStatements
|
|
12
12
|
} from "./chunk-G2DIPIYU.js";
|
|
13
13
|
import {
|
|
14
14
|
BaseCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GZREXCQZ.js";
|
|
16
16
|
import {
|
|
17
17
|
errMsg
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SQPCWGQO.js";
|
|
19
19
|
import {
|
|
20
20
|
bold,
|
|
21
21
|
dim,
|
|
@@ -153,4 +153,4 @@ export {
|
|
|
153
153
|
findDestructiveStatements,
|
|
154
154
|
truncateSql
|
|
155
155
|
};
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-2SELREHW.js.map
|