@supacloud/cli 0.30.0 → 0.31.0
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 +43 -0
- package/dist/index.js +961 -52
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -232,6 +232,7 @@ supacloud-cli task_events inspect_webhook --ref abc123
|
|
|
232
232
|
supacloud-cli database query --sql "select now()"
|
|
233
233
|
supacloud-cli database query --ref abc123 --file ./queries/vector-search.sql
|
|
234
234
|
supacloud-cli database migration_inventory --ref abc123
|
|
235
|
+
supacloud-cli database lint_migrations --dir supabase/migrations
|
|
235
236
|
supacloud-cli database push_migrations --ref abc123 --dir supabase/migrations --dry_run
|
|
236
237
|
supacloud-cli supabase migration_new --name add_accounts
|
|
237
238
|
supacloud-cli supabase db_diff --schema public --name add_accounts
|
|
@@ -277,6 +278,11 @@ it never empties a bucket. Mutation receipts bind `project_ref`, `bucket_id`,
|
|
|
277
278
|
name with another version, or a local version with another name, before either
|
|
278
279
|
dry-run reporting or apply can continue. This keeps the preview consistent with
|
|
279
280
|
the server conflict that would otherwise occur after deployment starts.
|
|
281
|
+
`push_migrations` requires canonical string migration identities; the narrower
|
|
282
|
+
`baseline_migrations` compatibility path also accepts historical safe-integer
|
|
283
|
+
versions and normalizes them before comparison. Repeated historical `cli_push`
|
|
284
|
+
names are treated as generic labels; version and exact content remain the
|
|
285
|
+
authority.
|
|
280
286
|
Mutation failures use the release-control receipt schema and never include the
|
|
281
287
|
server response body. `OUTCOME_UNKNOWN` requires a fresh migration inventory
|
|
282
288
|
read before deciding whether a retry is safe. A migration push failure also
|
|
@@ -285,6 +291,43 @@ can reconcile a partially completed sequence without exposing SQL. Baseline
|
|
|
285
291
|
success requires a bounded migration-inventory readback that confirms every
|
|
286
292
|
requested version, name, baseline marker, and checksum.
|
|
287
293
|
|
|
294
|
+
`database lint_migrations` is local-only and works without Management API
|
|
295
|
+
credentials. Inspect one source with `--sql`, `--file`, or `--dir`; these inputs
|
|
296
|
+
are mutually exclusive. `--strict` (or `--fail_on_high`) exits non-zero for HIGH
|
|
297
|
+
findings, `--fail_on_medium` also fails on MEDIUM findings, and `--json` emits a
|
|
298
|
+
structured report. The analyzer detects destructive DDL (`DROP TABLE`,
|
|
299
|
+
`DROP COLUMN`, `TRUNCATE`, `RENAME`), table-locking risks, opaque `DO` blocks,
|
|
300
|
+
procedural definitions/calls that require manual review, and statements that
|
|
301
|
+
cannot run in the transactional migration executor. Empty migrations,
|
|
302
|
+
unterminated strings/comments/dollar quotes, role or cluster management,
|
|
303
|
+
external database access, server file/process access, transaction-boundary or
|
|
304
|
+
session-identity control, advisory locks, public-schema rename/removal, and
|
|
305
|
+
direct migration-ledger schema, table, recorder, or privilege mutation fail
|
|
306
|
+
before the first remote migration write. Ledger indexes, triggers, rules,
|
|
307
|
+
policies, comments, security labels, and table maintenance commands are covered
|
|
308
|
+
by the same fail-closed rule. Top-level `COPY` is also rejected
|
|
309
|
+
because the HTTP migration executor cannot provide a safe client stream and
|
|
310
|
+
server-file targets cross the project boundary. Unicode-escaped identifiers
|
|
311
|
+
(`U&"..."`) are rejected because the policy cannot safely canonicalize protected
|
|
312
|
+
schema and ledger names. One matching outer `BEGIN`/`COMMIT` wrapper is removed
|
|
313
|
+
because the platform owns the transaction.
|
|
314
|
+
Adding a `NOT NULL` column is assessed per top-level `ALTER TABLE` subcommand;
|
|
315
|
+
function-based defaults remain MEDIUM risk because they may rewrite the table.
|
|
316
|
+
Dry-run exits non-zero for statements the transactional executor cannot apply,
|
|
317
|
+
even when strict destructive-risk mode is not enabled.
|
|
318
|
+
`CREATE/DROP INDEX CONCURRENTLY`, `VACUUM`, and other non-transactional work must
|
|
319
|
+
run through an approved maintenance path outside `push_migrations`.
|
|
320
|
+
|
|
321
|
+
Migration applications and DDL executions send PostgREST schema reload
|
|
322
|
+
notifications (`NOTIFY pgrst_<ref>, 'reload schema'`) so schema changes become
|
|
323
|
+
visible without a manual PostgREST restart. Responses distinguish `notified`
|
|
324
|
+
from `notification_failed` and include `ddl_committed=true` when the platform
|
|
325
|
+
can prove the DDL committed. Admin SQL with explicit transaction control or
|
|
326
|
+
indirect `CALL`/`DO` execution omits `ddl_committed`; for
|
|
327
|
+
`database create_table_rls`, a committed DDL batch followed by a failed reload
|
|
328
|
+
returns `PARTIAL_SUCCESS` instead of claiming complete success or an unknown DDL
|
|
329
|
+
outcome.
|
|
330
|
+
|
|
288
331
|
`edge_functions deploy --path` bundles local TypeScript and dependencies with
|
|
289
332
|
Bun and runs a local syntax check before upload. The Management API validates and
|
|
290
333
|
normalizes the final server-side artifact against the multi-tenant Edge Runtime
|