@akal/supaforge 0.0.34 → 0.0.36
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 +32 -13
- package/dist/base-command.d.ts +1 -1
- package/dist/base-command.js +4 -4
- package/dist/{branch-C4ndfoj5.d.ts → branch-BppjQBv_.d.ts} +1 -1
- package/dist/{chunk-ICSCHS72.js → chunk-5UHIWFQG.js} +76 -186
- package/dist/{chunk-S5L4A3UR.js → chunk-AL6INEFX.js} +3 -3
- package/dist/{chunk-OB5GP7UB.js → chunk-CAQ3QQFP.js} +437 -45
- package/dist/{chunk-TPX2MAO4.js → chunk-CCB7ARZU.js} +54 -5
- package/dist/{chunk-V2SBZERO.js → chunk-EWNZIRCD.js} +4 -4
- package/dist/{chunk-EFKQOQGG.js → chunk-FD2JKEJA.js} +7 -5
- package/dist/{chunk-3WKWPSFN.js → chunk-GGZ7YWBZ.js} +191 -32
- package/dist/{chunk-F46FFUKC.js → chunk-JX5L253P.js} +56 -18
- package/dist/{chunk-GQPGH6YR.js → chunk-KHXEES2M.js} +2 -2
- package/dist/{chunk-MG3SFV5J.js → chunk-KT7NMELZ.js} +77 -7
- package/dist/{chunk-PYAGSMFB.js → chunk-M2564IGT.js} +159 -19
- package/dist/{chunk-7DL63NWP.js → chunk-MRXIE55Y.js} +7 -3
- package/dist/{chunk-6ERVCWLY.js → chunk-MZPWRWBL.js} +7 -7
- package/dist/{chunk-5STH2A6K.js → chunk-OXS42LJH.js} +4 -4
- package/dist/{chunk-HNJ6BNNZ.js → chunk-Q43MN6NE.js} +2 -2
- package/dist/{chunk-ZI435CAU.js → chunk-RQCXGO37.js} +2 -2
- package/dist/{chunk-KNXHLVF7.js → chunk-SQ52YBKK.js} +3 -2
- package/dist/{chunk-N5VNNOA2.js → chunk-YUJ2MHLM.js} +1236 -22
- package/dist/chunk-Z2YUOA4W.js +242 -0
- package/dist/commands/clone.d.ts +2 -2
- package/dist/commands/clone.js +10 -9
- package/dist/commands/diff.d.ts +25 -22
- package/dist/commands/diff.js +14 -15
- package/dist/commands/hukam.d.ts +2 -3
- package/dist/commands/hukam.js +14 -15
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/commands/mcp.js +9 -10
- package/dist/commands/migrate/baseline.d.ts +1 -1
- package/dist/commands/migrate/baseline.js +5 -5
- package/dist/commands/migrate/create.d.ts +1 -1
- package/dist/commands/migrate/create.js +27 -13
- package/dist/commands/migrate/list.d.ts +1 -1
- package/dist/commands/migrate/list.js +5 -5
- package/dist/commands/migrate/run.d.ts +4 -1
- package/dist/commands/migrate/run.js +9 -8
- package/dist/commands/report.d.ts +1 -1
- package/dist/commands/report.js +5 -5
- package/dist/commands/restore.d.ts +1 -1
- package/dist/commands/restore.js +14 -13
- package/dist/commands/snapshot.d.ts +1 -1
- package/dist/commands/snapshot.js +8 -8
- package/dist/commands/sync.d.ts +2 -3
- package/dist/commands/sync.js +14 -15
- package/dist/{config-CTbeRlJk.d.ts → config-l3ggjw9r.d.ts} +2 -0
- package/dist/index.d.ts +38 -4
- package/dist/index.js +13 -14
- package/package.json +2 -2
- package/dist/chunk-DQJSSTIJ.js +0 -940
- package/dist/chunk-DQQ5E563.js +0 -64
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAppliedVersions
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-AL6INEFX.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-OXS42LJH.js";
|
|
7
7
|
import {
|
|
8
8
|
pgQuery,
|
|
9
9
|
readLocalMigrations
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-KT7NMELZ.js";
|
|
11
|
+
import "../../chunk-KHXEES2M.js";
|
|
12
12
|
import {
|
|
13
13
|
bold,
|
|
14
14
|
dim,
|
|
15
15
|
errMsg,
|
|
16
16
|
ok,
|
|
17
17
|
warn
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-SQ52YBKK.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/migrate/list.ts
|
|
21
21
|
import { Flags } from "@oclif/core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _oclif_core_interfaces from '@oclif/core/interfaces';
|
|
2
2
|
import { BaseCommand } from '../../base-command.js';
|
|
3
3
|
import '@oclif/core';
|
|
4
|
-
import '../../config-
|
|
4
|
+
import '../../config-l3ggjw9r.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Execute pending migrations against a Supabase environment.
|
|
@@ -26,8 +26,11 @@ declare class MigrateRun extends BaseCommand {
|
|
|
26
26
|
'dry-run': _oclif_core_interfaces.BooleanFlag<boolean>;
|
|
27
27
|
'up-to': _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
|
|
28
28
|
'allow-destructive': _oclif_core_interfaces.BooleanFlag<boolean>;
|
|
29
|
+
force: _oclif_core_interfaces.BooleanFlag<boolean>;
|
|
29
30
|
};
|
|
30
31
|
run(): Promise<void>;
|
|
32
|
+
/** The first pending migration written against `envName`, if the target has changed since. */
|
|
33
|
+
private changedSinceWritten;
|
|
31
34
|
}
|
|
32
35
|
/**
|
|
33
36
|
* Destructive statements across a set of pending migration files.
|
|
@@ -2,15 +2,16 @@ import {
|
|
|
2
2
|
MigrateRun,
|
|
3
3
|
findDestructiveStatements,
|
|
4
4
|
truncateSql
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-CCB7ARZU.js";
|
|
6
|
+
import "../../chunk-AL6INEFX.js";
|
|
7
|
+
import "../../chunk-GGZ7YWBZ.js";
|
|
8
|
+
import "../../chunk-YUJ2MHLM.js";
|
|
8
9
|
import "../../chunk-WK5YTINL.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-OXS42LJH.js";
|
|
11
|
+
import "../../chunk-Z2YUOA4W.js";
|
|
12
|
+
import "../../chunk-KT7NMELZ.js";
|
|
13
|
+
import "../../chunk-KHXEES2M.js";
|
|
14
|
+
import "../../chunk-SQ52YBKK.js";
|
|
14
15
|
export {
|
|
15
16
|
MigrateRun as default,
|
|
16
17
|
findDestructiveStatements,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _oclif_core_interfaces from '@oclif/core/interfaces';
|
|
2
2
|
import { BaseCommand } from '../base-command.js';
|
|
3
3
|
import '@oclif/core';
|
|
4
|
-
import '../config-
|
|
4
|
+
import '../config-l3ggjw9r.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Display recent supaforge command history from the local run log.
|
package/dist/commands/report.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sanitizeForReport
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-Q43MN6NE.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand,
|
|
6
6
|
readRunLog,
|
|
7
7
|
runLogPath
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-OXS42LJH.js";
|
|
9
|
+
import "../chunk-KT7NMELZ.js";
|
|
10
|
+
import "../chunk-KHXEES2M.js";
|
|
11
11
|
import {
|
|
12
12
|
bold,
|
|
13
13
|
cmd,
|
|
14
14
|
dim,
|
|
15
15
|
ok,
|
|
16
16
|
warn
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-SQ52YBKK.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/report.ts
|
|
20
20
|
import { Flags } from "@oclif/core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _oclif_core_interfaces from '@oclif/core/interfaces';
|
|
2
2
|
import { BaseCommand } from '../base-command.js';
|
|
3
3
|
import '@oclif/core';
|
|
4
|
-
import '../config-
|
|
4
|
+
import '../config-l3ggjw9r.js';
|
|
5
5
|
|
|
6
6
|
declare class Restore extends BaseCommand {
|
|
7
7
|
static description: string;
|
package/dist/commands/restore.js
CHANGED
|
@@ -5,30 +5,29 @@ import {
|
|
|
5
5
|
restoreFromMigrations,
|
|
6
6
|
restoreFromSnapshot,
|
|
7
7
|
summarizeStatement
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-N5VNNOA2.js";
|
|
8
|
+
} from "../chunk-JX5L253P.js";
|
|
9
|
+
import "../chunk-EWNZIRCD.js";
|
|
10
|
+
import "../chunk-AL6INEFX.js";
|
|
11
|
+
import "../chunk-GGZ7YWBZ.js";
|
|
12
|
+
import "../chunk-YUJ2MHLM.js";
|
|
14
13
|
import "../chunk-WK5YTINL.js";
|
|
15
14
|
import {
|
|
16
15
|
renderTip
|
|
17
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-RQCXGO37.js";
|
|
18
17
|
import {
|
|
19
18
|
BaseCommand
|
|
20
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-OXS42LJH.js";
|
|
21
20
|
import {
|
|
22
21
|
findLatestSnapshot,
|
|
23
22
|
listSnapshots
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-5UHIWFQG.js";
|
|
24
|
+
import "../chunk-Z2YUOA4W.js";
|
|
25
|
+
import "../chunk-KT7NMELZ.js";
|
|
26
|
+
import "../chunk-KHXEES2M.js";
|
|
28
27
|
import {
|
|
29
28
|
cmd,
|
|
30
29
|
warn
|
|
31
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-SQ52YBKK.js";
|
|
32
31
|
|
|
33
32
|
// src/commands/restore.ts
|
|
34
33
|
import { Flags } from "@oclif/core";
|
|
@@ -221,6 +220,8 @@ Restoring from migrations...
|
|
|
221
220
|
if (result.errors.length > 0 || result.incomplete) this.exit(1);
|
|
222
221
|
return;
|
|
223
222
|
}
|
|
223
|
+
for (const warning of result.warnings ?? []) this.log(`\u26A0 ${warning}
|
|
224
|
+
`);
|
|
224
225
|
if (result.applied.length > 0) {
|
|
225
226
|
this.log(`\u2705 Applied ${result.applied.length} operation(s):`);
|
|
226
227
|
for (const op of result.applied.slice(0, 20)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _oclif_core_interfaces from '@oclif/core/interfaces';
|
|
2
2
|
import { BaseCommand } from '../base-command.js';
|
|
3
3
|
import '@oclif/core';
|
|
4
|
-
import '../config-
|
|
4
|
+
import '../config-l3ggjw9r.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Capture and manage environment state snapshots.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
backup,
|
|
3
3
|
listMigrationFiles
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EWNZIRCD.js";
|
|
5
5
|
import "../chunk-WK5YTINL.js";
|
|
6
6
|
import {
|
|
7
7
|
renderTip
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-RQCXGO37.js";
|
|
9
9
|
import {
|
|
10
10
|
BaseCommand
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-OXS42LJH.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_KEEP_COUNT,
|
|
14
14
|
captureSnapshot,
|
|
@@ -16,17 +16,17 @@ import {
|
|
|
16
16
|
listSnapshots,
|
|
17
17
|
pruneSnapshots,
|
|
18
18
|
unrestorableSchema
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-5UHIWFQG.js";
|
|
20
|
+
import "../chunk-Z2YUOA4W.js";
|
|
21
|
+
import "../chunk-KT7NMELZ.js";
|
|
22
|
+
import "../chunk-KHXEES2M.js";
|
|
23
23
|
import {
|
|
24
24
|
bold,
|
|
25
25
|
cmd,
|
|
26
26
|
dim,
|
|
27
27
|
ok,
|
|
28
28
|
warn
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-SQ52YBKK.js";
|
|
30
30
|
|
|
31
31
|
// src/commands/snapshot.ts
|
|
32
32
|
import { Flags } from "@oclif/core";
|
package/dist/commands/sync.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import Diff from './diff.js';
|
|
2
|
-
import '@oclif/core/interfaces';
|
|
3
|
-
import '../base-command.js';
|
|
4
2
|
import '@oclif/core';
|
|
5
|
-
import '../
|
|
3
|
+
import '../base-command.js';
|
|
4
|
+
import '../config-l3ggjw9r.js';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Alias for `diff --apply` — detect and fix drift in one step.
|
package/dist/commands/sync.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Diff
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-N5VNNOA2.js";
|
|
3
|
+
} from "../chunk-M2564IGT.js";
|
|
4
|
+
import "../chunk-Q43MN6NE.js";
|
|
5
|
+
import "../chunk-MRXIE55Y.js";
|
|
6
|
+
import "../chunk-CAQ3QQFP.js";
|
|
7
|
+
import "../chunk-GGZ7YWBZ.js";
|
|
8
|
+
import "../chunk-YUJ2MHLM.js";
|
|
10
9
|
import "../chunk-WK5YTINL.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-RQCXGO37.js";
|
|
11
|
+
import "../chunk-OXS42LJH.js";
|
|
12
|
+
import "../chunk-FD2JKEJA.js";
|
|
13
|
+
import "../chunk-5UHIWFQG.js";
|
|
14
|
+
import "../chunk-Z2YUOA4W.js";
|
|
15
|
+
import "../chunk-KT7NMELZ.js";
|
|
16
|
+
import "../chunk-KHXEES2M.js";
|
|
17
|
+
import "../chunk-SQ52YBKK.js";
|
|
19
18
|
|
|
20
19
|
// src/commands/sync.ts
|
|
21
20
|
var Sync = class extends Diff {
|
|
@@ -82,6 +82,8 @@ interface SupaForgeConfig {
|
|
|
82
82
|
source?: string;
|
|
83
83
|
target?: string;
|
|
84
84
|
ignoreSchemas?: string[];
|
|
85
|
+
/** Extensions the extensions check does not report as extra on the target. */
|
|
86
|
+
ignoreExtensions?: string[];
|
|
85
87
|
checks?: ChecksConfig;
|
|
86
88
|
}
|
|
87
89
|
interface SnapshotLayerInfo {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EnvironmentConfig, S as SupaForgeConfig, a as SnapshotManifest, M as MigrationFile } from './config-
|
|
2
|
-
export { C as ChecksConfig, b as MigrationAction, c as SnapshotLayerInfo } from './config-
|
|
3
|
-
export { B as BRANCH_DB_PREFIX, a as BranchMeta, b as BranchesManifest, C as CreateBranchOptions, c as branchDbName, d as createBranch, e as deleteBranch, l as listBranches, f as loadManifest, r as replaceDbName } from './branch-
|
|
1
|
+
import { E as EnvironmentConfig, S as SupaForgeConfig, a as SnapshotManifest, M as MigrationFile } from './config-l3ggjw9r.js';
|
|
2
|
+
export { C as ChecksConfig, b as MigrationAction, c as SnapshotLayerInfo } from './config-l3ggjw9r.js';
|
|
3
|
+
export { B as BRANCH_DB_PREFIX, a as BranchMeta, b as BranchesManifest, C as CreateBranchOptions, c as branchDbName, d as createBranch, e as deleteBranch, l as listBranches, f as loadManifest, r as replaceDbName } from './branch-BppjQBv_.js';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -19,7 +19,7 @@ declare class HookBus {
|
|
|
19
19
|
clear(): void;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
declare const CHECK_NAMES: readonly ["schema", "rls", "rls-coverage", "edge-functions", "storage", "auth", "cron", "data", "webhooks", "realtime", "vault", "extensions", "migrations", "roles"];
|
|
22
|
+
declare const CHECK_NAMES: readonly ["schema", "rls", "rls-coverage", "edge-functions", "storage", "auth", "cron", "data", "webhooks", "realtime", "vault", "extensions", "migrations", "roles", "queues", "partitions"];
|
|
23
23
|
type CheckName = (typeof CHECK_NAMES)[number];
|
|
24
24
|
type Severity = 'critical' | 'warning' | 'info';
|
|
25
25
|
declare const CHECK_META: Record<CheckName, {
|
|
@@ -72,6 +72,15 @@ interface DriftIssue {
|
|
|
72
72
|
* its SQL: a webhook is a trigger, and dropping a trigger usually isn't.
|
|
73
73
|
*/
|
|
74
74
|
destructive?: string;
|
|
75
|
+
/**
|
|
76
|
+
* What applying the fix does to a live database beyond what it changes —
|
|
77
|
+
* the locks it holds, a table rewrite, a full scan. See hazards.ts.
|
|
78
|
+
*/
|
|
79
|
+
hazards?: Array<{
|
|
80
|
+
kind: string;
|
|
81
|
+
on?: string;
|
|
82
|
+
detail: string;
|
|
83
|
+
}>;
|
|
75
84
|
}
|
|
76
85
|
interface CheckResult {
|
|
77
86
|
check: CheckName;
|
|
@@ -97,6 +106,12 @@ interface CheckResult {
|
|
|
97
106
|
count: number;
|
|
98
107
|
into: CheckName;
|
|
99
108
|
}>;
|
|
109
|
+
/**
|
|
110
|
+
* What the check could not compare or decide, said beside its findings:
|
|
111
|
+
* objects of a kind it does not compare, a rename it would not guess. Not
|
|
112
|
+
* drift — nothing to apply — so neither counted nor scored.
|
|
113
|
+
*/
|
|
114
|
+
notices?: string[];
|
|
100
115
|
durationMs: number;
|
|
101
116
|
}
|
|
102
117
|
interface ScanResult {
|
|
@@ -153,6 +168,8 @@ interface CheckContext {
|
|
|
153
168
|
* fine-grained to report simply ignore it.
|
|
154
169
|
*/
|
|
155
170
|
onDetail?: (detail: string) => void;
|
|
171
|
+
/** Sink for what the check could not compare — see CheckResult.notices. */
|
|
172
|
+
onNotice?: (notice: string) => void;
|
|
156
173
|
source: EnvironmentConfig;
|
|
157
174
|
target: EnvironmentConfig;
|
|
158
175
|
config: SupaForgeConfig;
|
|
@@ -199,6 +216,11 @@ interface ScanOptions {
|
|
|
199
216
|
* Merged with the config's own `checks.tables` / `checks.excludeTables`.
|
|
200
217
|
*/
|
|
201
218
|
tableFilter?: TableFilter;
|
|
219
|
+
/**
|
|
220
|
+
* Read each database as of one instant (see holdSnapshot). On by default;
|
|
221
|
+
* what the scan reads stays locked until it ends, as with pg_dump.
|
|
222
|
+
*/
|
|
223
|
+
snapshot?: boolean;
|
|
202
224
|
}
|
|
203
225
|
declare function scan(registry: CheckRegistry, options: ScanOptions, bus?: HookBus): Promise<ScanResult>;
|
|
204
226
|
|
|
@@ -248,6 +270,12 @@ type FetchFn$2 = (url: string, init?: RequestInit) => Promise<Response>;
|
|
|
248
270
|
interface PromoteOptions {
|
|
249
271
|
/** Target database connection string */
|
|
250
272
|
dbUrl: string;
|
|
273
|
+
/**
|
|
274
|
+
* The source's connection string. Its PostgreSQL version tells a fix an
|
|
275
|
+
* older target cannot parse — a feature it does not have — from any other
|
|
276
|
+
* failure: that fix is left out, as one needing a missing extension is.
|
|
277
|
+
*/
|
|
278
|
+
sourceUrl?: string;
|
|
251
279
|
/** The scan result with SQL fixes to apply */
|
|
252
280
|
scanResult: ScanResult;
|
|
253
281
|
/** Only promote specific checks */
|
|
@@ -299,9 +327,11 @@ type PlannedSkip = FixOrigin & {
|
|
|
299
327
|
reason: string;
|
|
300
328
|
};
|
|
301
329
|
interface PromoteResult {
|
|
330
|
+
/** `note`: why a fix that did nothing still counts — see revokesFromAbsent. */
|
|
302
331
|
applied: (FixOrigin & {
|
|
303
332
|
sql?: string;
|
|
304
333
|
action?: string;
|
|
334
|
+
note?: string;
|
|
305
335
|
})[];
|
|
306
336
|
skipped: PlannedSkip[];
|
|
307
337
|
errors: (FixOrigin & {
|
|
@@ -315,6 +345,8 @@ interface PromoteResult {
|
|
|
315
345
|
rolledBack?: (FixOrigin & {
|
|
316
346
|
sql?: string;
|
|
317
347
|
})[];
|
|
348
|
+
/** Said before the fixes ran: they may need more locks than the target has — see lock-budget. */
|
|
349
|
+
warnings?: string[];
|
|
318
350
|
}
|
|
319
351
|
declare function promote(options: PromoteOptions): Promise<PromoteResult>;
|
|
320
352
|
|
|
@@ -451,6 +483,8 @@ interface RestoreResult {
|
|
|
451
483
|
type: 'sql' | 'api';
|
|
452
484
|
label: string;
|
|
453
485
|
}[];
|
|
486
|
+
/** Said before the restore started: it may need more locks than the target has — see lock-budget. */
|
|
487
|
+
warnings?: string[];
|
|
454
488
|
}
|
|
455
489
|
/**
|
|
456
490
|
* Restore a Supabase environment from a snapshot directory.
|
package/dist/index.js
CHANGED
|
@@ -3,37 +3,36 @@ import {
|
|
|
3
3
|
createServer,
|
|
4
4
|
getLastScanResult,
|
|
5
5
|
setLastScanResult
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MZPWRWBL.js";
|
|
7
7
|
import {
|
|
8
8
|
previewMigrationRestore,
|
|
9
9
|
previewSnapshotRestore,
|
|
10
10
|
restoreFromMigrations,
|
|
11
11
|
restoreFromSnapshot
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JX5L253P.js";
|
|
13
13
|
import {
|
|
14
14
|
backup,
|
|
15
15
|
listMigrationFiles,
|
|
16
16
|
loadMigrations
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-EWNZIRCD.js";
|
|
18
|
+
import "./chunk-AL6INEFX.js";
|
|
19
19
|
import {
|
|
20
20
|
renderDetailed,
|
|
21
21
|
renderSummary
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MRXIE55Y.js";
|
|
23
23
|
import {
|
|
24
24
|
CheckRegistry,
|
|
25
25
|
computeScore,
|
|
26
26
|
createDefaultRegistry,
|
|
27
27
|
scan,
|
|
28
28
|
summarize
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-CAQ3QQFP.js";
|
|
30
|
+
import "./chunk-GGZ7YWBZ.js";
|
|
31
31
|
import {
|
|
32
32
|
CHECK_META,
|
|
33
33
|
CHECK_NAMES,
|
|
34
34
|
promote
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-N5VNNOA2.js";
|
|
35
|
+
} from "./chunk-YUJ2MHLM.js";
|
|
37
36
|
import "./chunk-WK5YTINL.js";
|
|
38
37
|
import {
|
|
39
38
|
BRANCH_DB_PREFIX,
|
|
@@ -43,23 +42,23 @@ import {
|
|
|
43
42
|
listBranches,
|
|
44
43
|
loadManifest,
|
|
45
44
|
replaceDbName
|
|
46
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-FD2JKEJA.js";
|
|
47
46
|
import {
|
|
48
47
|
captureSnapshot,
|
|
49
48
|
findLatestSnapshot,
|
|
50
49
|
listSnapshots,
|
|
51
50
|
loadSnapshot
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-5UHIWFQG.js";
|
|
52
|
+
import "./chunk-Z2YUOA4W.js";
|
|
54
53
|
import {
|
|
55
54
|
Check
|
|
56
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-KT7NMELZ.js";
|
|
57
56
|
import {
|
|
58
57
|
loadConfig,
|
|
59
58
|
resolveConfig,
|
|
60
59
|
validateConfig,
|
|
61
60
|
validateSingleEnvConfig
|
|
62
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-SQ52YBKK.js";
|
|
63
62
|
|
|
64
63
|
// src/hooks.ts
|
|
65
64
|
var HookBus = class {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akal/supaforge",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"mcpName": "io.github.akalsoftware/supaforge",
|
|
5
5
|
"description": "Diff and sync your Supabase environments",
|
|
6
6
|
"author": "Akal Software Ltd",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@akal/pg-conformance": "~0.0.16",
|
|
59
|
-
"@dbdiff/cli": "3.0.0-rc.
|
|
59
|
+
"@dbdiff/cli": "3.0.0-rc.30",
|
|
60
60
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
61
61
|
"@oclif/core": "^4",
|
|
62
62
|
"@supabase/supabase-js": "^2.103.0",
|