@protobase/cli 0.55.7 → 0.55.9
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/dist/cli/package.js +1 -1
- package/dist/supabase/dump-phase.js +2 -2
- package/dist/supabase/register.js +4 -8
- package/dist/supabase/sso-users.js +29 -9
- package/dist/supabase/storage-download.js +11 -5
- package/dist/supabase/storage-url.js +19 -0
- package/package.json +9 -9
- package/skills/protobase/references/reference/cli.md +2 -2
package/dist/cli/package.js
CHANGED
|
@@ -14,7 +14,7 @@ import { runPgTool } from "./pg-tools.js";
|
|
|
14
14
|
import { realtimeMigration, realtimePolicies } from "./realtime-policies.js";
|
|
15
15
|
import { replayScript } from "./replay.js";
|
|
16
16
|
import { schemaMigration } from "./schema-migration.js";
|
|
17
|
-
import {
|
|
17
|
+
import { countSsoUsers, refuseSsoUsers } from "./sso-users.js";
|
|
18
18
|
import { appSchemas, cronJobs, cronTimezone, dumpedTables, extensions, httpTriggers, hypertables, pgmqQueues, pgsodiumColumns, platformMigrationTables, realtimeTables, routinesIn, tablesSize, vaultSecretValues, vaultSecrets } from "./source-facts.js";
|
|
19
19
|
import { ensureApiRoles, existingSchemas, existingTables } from "./target-checks.js";
|
|
20
20
|
import { creatableExtensions } from "./target-extensions.js";
|
|
@@ -144,7 +144,7 @@ const runDumpPhase = async (options, out) => {
|
|
|
144
144
|
await reserved`begin isolation level repeatable read read only`;
|
|
145
145
|
const [exported] = await reserved`select pg_export_snapshot() as snapshot`;
|
|
146
146
|
const snapshot = exported.snapshot;
|
|
147
|
-
refuseSsoUsers(await
|
|
147
|
+
refuseSsoUsers(await countSsoUsers((text) => reserved.unsafe(text)));
|
|
148
148
|
const { manifest: source, plan, realtimePolicies: policies, replay } = await readSource(reserved, options.targetUrl);
|
|
149
149
|
const created = await checkTarget(options.targetUrl, [...source.schemas, "realtime"], source.tables);
|
|
150
150
|
if (created.length > 0) out(`created the roles ${created.join(", ")} in the project's database\n`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { loadNearestEnvFile } from "../dev/env.js";
|
|
2
|
+
import { projectUrl } from "./storage-url.js";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
//#region src/supabase/register.ts
|
|
4
5
|
const out = (text) => process.stdout.write(text);
|
|
@@ -7,14 +8,9 @@ const variable = (name) => {
|
|
|
7
8
|
if (!value) throw new Error(`Environment variable ${name} is not set`);
|
|
8
9
|
return value;
|
|
9
10
|
};
|
|
10
|
-
const projectUrl = (text) => {
|
|
11
|
-
const url = URL.canParse(text) ? new URL(text) : void 0;
|
|
12
|
-
if (!url || url.protocol !== "https:" && url.protocol !== "http:") throw new Error("--storage-url is not a URL; write it like https://<ref>.supabase.co");
|
|
13
|
-
if (url.username || url.password) throw new Error("--storage-url must not hold credentials; put the secret key in the variable --storage-key-env names");
|
|
14
|
-
return `${url.origin}${url.pathname.replace(/\/+$/, "")}`;
|
|
15
|
-
};
|
|
16
11
|
const registerImport = (program) => {
|
|
17
12
|
program.command("import").description("Turn another platform's project into this Protobase project").command("supabase").description("Import a Supabase database into the project in the current directory. The first run dumps it and writes its schemas as the project's next migration; once the project's migrations are applied, the second run loads the data, scaffolds the config, writes the migrations that sign its users in with Better Auth and writes supabase-import/report.md. With --storage-url, the second run, or any later one, copies Storage's files into the app's file provider").argument("[source]", "the Supabase database's connection string, for the first run").option("--source-env <variable>", "read the Supabase connection string from this environment variable").option("--env <variable>", "environment variable holding the project's database URL", "DATABASE_URL").option("--dir <dir>", "migrations folder", "db/migrations").option("--config <dir>", "config folder", "config").option("--storage-url <url>", "the Supabase project's URL, such as https://<ref>.supabase.co, to copy Storage's files from").option("--storage-key-env <variable>", "environment variable holding the Supabase project's secret key, for --storage-url", "SUPABASE_SERVICE_ROLE_KEY").option("--yes", "copy Storage's files even when they exceed the file provider's max_bytes", false).action(async (source, opts) => {
|
|
13
|
+
const storageUrl = opts.storageUrl ? projectUrl(opts.storageUrl) : void 0;
|
|
18
14
|
if (source && opts.sourceEnv) throw new Error("Pass either a connection string or --source-env, not both");
|
|
19
15
|
const projectDir = process.cwd();
|
|
20
16
|
loadNearestEnvFile(projectDir);
|
|
@@ -25,8 +21,8 @@ const registerImport = (program) => {
|
|
|
25
21
|
projectDir,
|
|
26
22
|
migrationsDir: path.resolve(opts.dir),
|
|
27
23
|
configDir: path.resolve(opts.config),
|
|
28
|
-
storage:
|
|
29
|
-
url:
|
|
24
|
+
storage: storageUrl ? {
|
|
25
|
+
url: storageUrl,
|
|
30
26
|
key: variable(opts.storageKeyEnv)
|
|
31
27
|
} : void 0,
|
|
32
28
|
yes: opts.yes
|
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
//#region src/supabase/sso-users.ts
|
|
2
|
-
/**
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
2
|
+
/** The query that lists the SSO users, which the refusal prints instead of their addresses. */
|
|
3
|
+
const ssoUsersQuery = "select id, email from auth.users where is_sso_user";
|
|
4
|
+
/** Counts the SSO users of auth.users; none where GoTrue's schema predates `is_sso_user`. */
|
|
5
|
+
const countSsoUsers = async (query) => {
|
|
6
|
+
if ((await query(`select 1 from information_schema.columns where table_schema = 'auth' and table_name = 'users' and column_name = 'is_sso_user'`)).length === 0) return {
|
|
7
|
+
shared: 0,
|
|
8
|
+
alone: 0
|
|
9
|
+
};
|
|
10
|
+
const [row] = await query(`select count(*) filter (where shared)::int as shared, count(*) filter (where not shared)::int as alone from (select exists (select 1 from auth.users other where other.id <> sso.id and lower(other.email) = lower(sso.email)) as shared from auth.users sso where sso.is_sso_user) as sso`);
|
|
11
|
+
return {
|
|
12
|
+
shared: row.shared,
|
|
13
|
+
alone: row.alone
|
|
14
|
+
};
|
|
7
15
|
};
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
const users = (count) => `${count} ${count === 1 ? "user" : "users"}`;
|
|
17
|
+
/**
|
|
18
|
+
* Fails when the Supabase project has SSO users, saying how many, how to list them and what deleting one does. It
|
|
19
|
+
* prints no address, since CLI output gets pasted into issues, and offers no fix: what to do with the users is the
|
|
20
|
+
* developer's call.
|
|
21
|
+
*/
|
|
22
|
+
const refuseSsoUsers = ({ shared, alone }) => {
|
|
23
|
+
const count = shared + alone;
|
|
10
24
|
if (count === 0) return;
|
|
11
|
-
throw new Error(
|
|
25
|
+
throw new Error([
|
|
26
|
+
`The Supabase project has ${count} single sign-on (SAML) ${count === 1 ? "user" : "users"}, which the import cannot carry over: Supabase opens them only through their identity provider, and Better Auth would find them by email.`,
|
|
27
|
+
`${users(shared)} ${shared === 1 ? "shares its" : "share their"} address with another user of auth.users, ${users(alone)} ${alone === 1 ? "has" : "have"} an address of ${alone === 1 ? "its" : "their"} own.`,
|
|
28
|
+
`List them in Supabase with: ${ssoUsersQuery}`,
|
|
29
|
+
`Deleting a user in Supabase deletes or breaks the app's rows that reference it: a foreign key to auth.users that cascades deletes them, one that sets null leaves them without their user, and any other refuses the delete.`,
|
|
30
|
+
`What to do about these users is your decision, not the import's: decide it in Supabase, then import again`
|
|
31
|
+
].join("\n"));
|
|
12
32
|
};
|
|
13
33
|
//#endregion
|
|
14
|
-
export { refuseSsoUsers,
|
|
34
|
+
export { countSsoUsers, refuseSsoUsers, ssoUsersQuery };
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
//#region src/supabase/storage-download.ts
|
|
2
2
|
/** Where Supabase's Storage API serves an object's bytes to the secret key: each segment of the name encoded. */
|
|
3
3
|
const objectUrl = (projectUrl, bucket, name) => `${projectUrl.replace(/\/+$/, "")}/storage/v1/object/authenticated/${encodeURIComponent(bucket)}/${name.split("/").map(encodeURIComponent).join("/")}`;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Downloads from the Supabase project `source` with its secret key, which goes in the request's headers only. A redirect
|
|
6
|
+
* is not followed, since fetch would send the `apikey` header on to another host too: the 3xx answer fails that object.
|
|
7
|
+
*/
|
|
8
|
+
const supabaseDownload = (source) => (bucket, name) => fetch(objectUrl(source.url, bucket, name), {
|
|
9
|
+
headers: {
|
|
10
|
+
apikey: source.key,
|
|
11
|
+
authorization: `Bearer ${source.key}`
|
|
12
|
+
},
|
|
13
|
+
redirect: "manual"
|
|
14
|
+
});
|
|
9
15
|
//#endregion
|
|
10
16
|
export { objectUrl, supabaseDownload };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/supabase/storage-url.ts
|
|
2
|
+
const loopback = /* @__PURE__ */ new Set([
|
|
3
|
+
"localhost",
|
|
4
|
+
"127.0.0.1",
|
|
5
|
+
"[::1]"
|
|
6
|
+
]);
|
|
7
|
+
/**
|
|
8
|
+
* The Supabase project's URL, such as https://<ref>.supabase.co, which the storage report names, so never with
|
|
9
|
+
* credentials. The secret key goes to it, so plain http is refused but on loopback. No message repeats the URL.
|
|
10
|
+
*/
|
|
11
|
+
const projectUrl = (text) => {
|
|
12
|
+
const url = URL.canParse(text) ? new URL(text) : void 0;
|
|
13
|
+
if (!url || url.protocol !== "https:" && url.protocol !== "http:") throw new Error("--storage-url is not a URL; write it like https://<ref>.supabase.co");
|
|
14
|
+
if (url.username || url.password) throw new Error("--storage-url must not hold credentials; put the secret key in the variable --storage-key-env names");
|
|
15
|
+
if (url.protocol === "http:" && !loopback.has(url.hostname)) throw new Error("--storage-url must use https, as it sends the secret key; plain http is only for a local Supabase on localhost, 127.0.0.1 or [::1]");
|
|
16
|
+
return `${url.origin}${url.pathname.replace(/\/+$/, "")}`;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { projectUrl };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.9",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"skills"
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
|
-
"build": "tsdown",
|
|
37
|
-
"prepack": "
|
|
36
|
+
"build": "bun ../../scripts/protobase-skill.ts && tsdown",
|
|
37
|
+
"prepack": "bun run build"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@better-auth/core": "^1.7.12",
|
|
44
44
|
"@hono/node-server": "^2.1.3",
|
|
45
|
-
"@protobase/config": "0.55.
|
|
46
|
-
"@protobase/layout": "0.55.
|
|
47
|
-
"@protobase/query": "0.55.
|
|
48
|
-
"@protobase/schema": "0.55.
|
|
49
|
-
"@protobase/server": "0.55.
|
|
50
|
-
"@protobase/ui": "0.55.
|
|
45
|
+
"@protobase/config": "0.55.9",
|
|
46
|
+
"@protobase/layout": "0.55.9",
|
|
47
|
+
"@protobase/query": "0.55.9",
|
|
48
|
+
"@protobase/schema": "0.55.9",
|
|
49
|
+
"@protobase/server": "0.55.9",
|
|
50
|
+
"@protobase/ui": "0.55.9",
|
|
51
51
|
"@react-email/render": "^2.1.0",
|
|
52
52
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
53
53
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -538,12 +538,12 @@ protobase import supabase [<connection> | --source-env <variable>] [--env DATABA
|
|
|
538
538
|
|
|
539
539
|
Turns a Supabase project's database into the project in the current directory, in two runs with the project's migrations between them. It needs PostgreSQL's `pg_dump` and `psql` on `PATH`, of the Supabase database's major version or newer, and reads the `.env` nearest the current directory for the project's database (`--env`).
|
|
540
540
|
|
|
541
|
-
1. **The first run** takes the Supabase database's connection string, for its `postgres` role (the session pooler's or the direct one; the transaction pooler cannot hold the snapshot the dumps share). It fails unless the database has Supabase's `auth` and `storage` schemas and its `supabase_admin` role, and while `auth.users` has single sign-on (SAML) users, which Supabase opens only through their identity provider and Better Auth would find by email
|
|
541
|
+
1. **The first run** takes the Supabase database's connection string, for its `postgres` role (the session pooler's or the direct one; the transaction pooler cannot hold the snapshot the dumps share). It fails unless the database has Supabase's `auth` and `storage` schemas and its `supabase_admin` role, and while `auth.users` has single sign-on (SAML) users, which Supabase opens only through their identity provider and Better Auth would find by email, so the import cannot carry them over. It then says how many share their address with another user and how many have one of their own, and prints `select id, email from auth.users where is_sso_user` to list them rather than their addresses. Deleting a user in Supabase deletes or breaks the app's rows that reference it, so what to do about these users is the developer's decision, made in Supabase before importing again. It notes the Supabase CLI's `supabase/config.toml`, `supabase/migrations/` and `supabase/functions/` when the checkout has them. It converts `supabase/functions` into the project's `functions/` (see [functions moved from Supabase](../guides/api-functions.md#functions-moved-from-supabase)): `Deno.serve(handler)` and std's `serve(handler)` become `export default defineFunction({ supabase: true }, { fetch: handler })`, an existing default export is wrapped the same way, so each function also answers at `/api/sb/functions/v1/<name>`, `npm:`, `jsr:` and esm.sh imports become bare imports of packages it adds to `package.json`, `Deno.env.get(name)` becomes `process.env[name]`, `EdgeRuntime.waitUntil` becomes `waitUntil` of `@protobase/server`, a function with `verify_jwt = false` in `config.toml` becomes public (`{ public: true, supabase: true }`), and `_shared` and the like are converted beside them. It stops before anything else when `functions/` already has one of their names. It dumps `auth`, `storage` and every schema the app made, schema and data apart, as of one snapshot, leaving out the platform's own migration tables, and writes the schemas as the project's next migration, `NNN_supabase_schema.sql`. It asks the project's database which of the app's extensions its role may create, by trying each in a transaction it rolls back: Postgres alone allows the trusted ones, Supabase's Postgres image all it allowlists, such as pg_net, pgmq and Vault. The migration creates those first, then, where pg_net is among them and the app has Database Webhooks, the `supabase_functions.http_request` function their triggers call, over pg_net; then the dump without what fails there, as comments: grants and default privileges for `dashboard_user`, `supabase_*`, `authenticator` and `postgres`, statements about the `public` schema, Realtime's publication, pgsodium's security labels, the views that decrypt with it and the triggers that encrypt with it, database webhooks without pg_net, functions in plv8, plls or plcoffee where the database has no such language, and a timescaledb hypertable's insert-blocking trigger. It then writes `NNN_supabase_users.sql`, the nullable columns Better Auth needs on `auth.users` (`name`, `email_verified`, `image`, `app_role`, `banned`, `ban_reason`, `ban_expires`) and GoTrue's `'authenticated'` as the default of `role` and `aud`. It writes `NNN_supabase_realtime.sql`, which makes `realtime.messages`, `realtime.topic()`, and Supabase's `realtime.send()` and `realtime.broadcast_changes()`, so the app's triggers and SQL keep [broadcasting from the database](supabase-realtime.md#broadcast-from-the-database), with the source's row security policies on `realtime.messages`, so its [private channels](supabase-realtime.md#private-channels) keep their access; a policy that names only Supabase's own roles is left out as a comment. It points the app at `auth.users`: the `auth` of `protobase.config.ts` gets `users: { table: 'users', columns: { role: 'app_role' }, metadata: 'raw_user_meta_data' }`, `passwordHashes: ['bcrypt']` and `generateUserId: 'uuid'`, or the config gets an `auth` of them when it has none (see [an existing users table](auth.md#an-existing-users-table)). It removes the migrations `protobase auth migration` or `protobase migration` wrote for Protobase's own user table, since `auth.users` replaces it, and stops before writing anything when the project has no `protobase.config.ts`, or one whose `auth` is not an object it can see, or when the project's database has a schema the dump creates already, such as the `auth` schema those migrations made. The project's database needs the roles `anon`, `authenticated` and `service_role` that the dump's grants and policies name; the command makes them when its role may, and otherwise stops, naming them. The data dump goes to `supabase-import/`, which it adds to `.gitignore`, since it holds every row and the users' password hashes. Where the project's database can create Vault, pgmq and pg_cron, `supabase-import/replay.sql` holds what a dump cannot carry: Vault's secrets with their values, read decrypted since only Supabase's key opens their ciphertext, pgmq's queues with their messages, since pgmq owns their tables, and pg_cron's jobs, which live in its own schema.
|
|
542
542
|
2. **Apply the migration** with the project's other migrations, such as `bun run db:migrate`.
|
|
543
543
|
3. **The second run**, without a connection string, loads the data in one transaction, with the app's triggers off so a sign-up trigger on `auth.users` does not run again for users who already have their rows, and fails the transaction unless every table holds the source's number of rows. In the same transaction it makes Vault's secrets and pgmq's queues again through `vault.create_secret`, `pgmq.create` and `pgmq.send`, each message with its headers and the time it becomes visible. Where the project's database has pg_cron, as Supabase's Postgres image does when it serves that database, it schedules pg_cron's jobs again there with `cron.schedule`, run by the importing role, an inactive one inactive. Elsewhere it writes each job of plain SQL as a [recurring job](jobs.md#recurring-jobs) of its own in `jobs/`, of the same name, schedule and `cron.timezone`, that runs its SQL as the app's database role, tried once each time as pg_cron did, and declares it in the `jobs` of `protobase.config.ts` (or writes one); they run once [`migration`](#migration) has added the jobs schema. Recurring jobs wake an app that sleeps, so they run where a host stops an idle app too. A job that calls what the database lacks, such as pg_net's `net.http_*`, `cron` or Vault, an inactive one and a schedule recurring jobs do not take, such as `30 seconds` or `$`, stay in the report, as does a job of another database. It loads only into empty tables, deletes the data dump and the replay, runs [`scaffold`](#scaffold) on the imported tables of the app's schemas (not `auth` or `storage`), giving the tables of the `supabase_realtime` publication [`.live()`](live.md) so [`/api/sb/realtime/v1`](supabase-realtime.md) keeps sending their `postgres_changes` once [`migration`](#migration) has written their capture triggers, writes Better Auth's other tables next to `auth.users` as [`auth migration`](#auth-migration) does (`NNN_auth.sql`), then `NNN_supabase_accounts.sql`, and writes `supabase-import/report.md`: the rows loaded, the API keys `/api/sb` needs and the `createClient` change to the app's `/api/sb` and its publishable key, the imported tables' size against the Starter plan's 500 MB, each sign-in provider's identities, what it made again, the tables it made live, and what needs a person: the pg_cron jobs it could not carry over, each with why, Realtime tables it made no resource of, Vault secrets by name and pgmq queues where the database has no such extension (and partitioned queues), the columns pgsodium encrypts, still holding Supabase's ciphertext, whose values to export decrypted in Supabase before declaring them [`.encrypted()`](data-config.md#encrypted-fields) and running [`encryption apply`](#encryption-apply), the extensions it cannot create, hypertables and plv8, plls or plcoffee functions to convert, triggers that call out over HTTP without pg_net, the converted Edge Functions with the packages to install and the code the conversion left (`deno.land/x` imports, Deno's file, KV and WebSocket APIs, `Supabase.ai`), and the indexes [`doctor`](#doctor) finds missing. `NNN_supabase_accounts.sql` fills the user columns from what Supabase Auth recorded and leaves them empty where it recorded nothing: the name from `raw_user_meta_data`'s `full_name` or `name`, the picture from its `avatar_url` or `picture`, `email_verified` from `email_confirmed_at`, and a ban from `banned_until`, which Better Auth lifts once it has passed. It gives each password of a confirmed address, as Supabase hashed it, a `credential` account (a user who never confirmed theirs signs in by code or resets the password, since GoTrue refused their password sign-in too), and each identity of a social provider an account under Better Auth's name for it (`azure` is `microsoft`, keyed on the `oid` claim; `linkedin_oidc` is `linkedin`, `slack_oidc` is `slack`, `x` is `twitter`), unless its user has an address they never confirmed, since GoTrue refused that sign-in too. Email, phone, anonymous and single sign-on identities and sessions do not carry over. <gap>The import cannot carry over MFA factors because that is not implemented.</gap> <gap>The import cannot carry over passkeys because that is not implemented.</gap>
|
|
544
544
|
4. **Apply the migrations** again. Supabase's users then sign in with their own passwords, and with a social provider once it is in the `socialProviders` of the config's `auth`; new users get a UUID in `auth.users`, so the app's triggers there run for them.
|
|
545
545
|
|
|
546
|
-
5. **Storage's files**: with `--storage-url https://<ref>.supabase.co` and the project's secret key in the variable `--storage-key-env` names, `SUPABASE_SERVICE_ROLE_KEY` by default, the second run, or any run after it, copies the bytes of every object in `storage.objects` from the Supabase project's Storage API into the app's [Storage file provider](supabase-storage.md#where-things-are-kept), where [`/api/sb/storage/v1`](supabase-storage.md) serves them, with the type and cache control the rows recorded. It streams each object, checks its byte count against the size Supabase recorded and its MD5 against the ETag where that is one, and deletes a copy that does not match. It first prints each bucket's size and stops when what is left to copy and what the provider holds exceed the provider's `max_bytes`, unless `--yes`. An object that fails does not stop the rest; the run then fails, listing them in `supabase-import/storage.md`, and a rerun copies only what the provider does not hold yet. The key goes only in the requests' headers, never in a file.
|
|
546
|
+
5. **Storage's files**: with `--storage-url https://<ref>.supabase.co` and the project's secret key in the variable `--storage-key-env` names, `SUPABASE_SERVICE_ROLE_KEY` by default, the second run, or any run after it, copies the bytes of every object in `storage.objects` from the Supabase project's Storage API into the app's [Storage file provider](supabase-storage.md#where-things-are-kept), where [`/api/sb/storage/v1`](supabase-storage.md) serves them, with the type and cache control the rows recorded. It streams each object, checks its byte count against the size Supabase recorded and its MD5 against the ETag where that is one, and deletes a copy that does not match. It first prints each bucket's size and stops when what is left to copy and what the provider holds exceed the provider's `max_bytes`, unless `--yes`. An object that fails does not stop the rest; the run then fails, listing them in `supabase-import/storage.md`, and a rerun copies only what the provider does not hold yet. The key goes only in the requests' headers, never in a file. Plain `http://` is accepted only for a local Supabase on `localhost`, `127.0.0.1` or `[::1]`, such as `supabase start`'s `http://127.0.0.1:54321`, since the key bypasses every Storage policy; a download Supabase answers with a redirect is not followed, so the key goes to no other host, and that object fails.
|
|
547
547
|
|
|
548
548
|
An agent with the `supabase-move` skill of [`skill install`](#skill) finishes what the report leaves: it rewrites each item, checking the project's database for the extensions an item needs, and runs `doctor` and the typecheck until both pass, leaving the values of Vault's secrets for you to enter.
|
|
549
549
|
|