@sanoma-ai/connector-supabase 0.0.0-stage → 0.2.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/LICENSE +105 -0
- package/README.md +115 -2
- package/dist/connector.d.ts +96 -0
- package/dist/connector.js +102 -0
- package/dist/connector.js.map +1 -0
- package/dist/driver.d.ts +24 -0
- package/dist/driver.js +67 -0
- package/dist/driver.js.map +1 -0
- package/dist/fake.d.ts +30 -0
- package/dist/fake.js +55 -0
- package/dist/fake.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/management.d.ts +37 -0
- package/dist/management.js +69 -0
- package/dist/management.js.map +1 -0
- package/dist/resources.config.d.ts +13 -0
- package/dist/resources.config.js +15 -0
- package/dist/resources.config.js.map +1 -0
- package/dist/resources.d.ts +19 -0
- package/dist/resources.gen.d.ts +42 -0
- package/dist/resources.gen.js +69 -0
- package/dist/resources.gen.js.map +1 -0
- package/dist/resources.js +7 -0
- package/dist/resources.js.map +1 -0
- package/package.json +70 -3
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanoma-apply-test/apply.json +30 -0
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanoma-apply-test/plan.json +31 -0
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanoma-apply-test-delete/apply.json +23 -0
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanoma-apply-test-delete/plan.json +25 -0
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanomamissingproject/import.json +27 -0
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanomatestprojectref/import.json +27 -0
- package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanomatestprojectref/read.json +25 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { withSetup } from "@sanoma-ai/workflows";
|
|
2
|
+
import { supabaseOps } from "./connector.js";
|
|
3
|
+
import { supabaseDriver } from "./driver.js";
|
|
4
|
+
import { fakeSupabase } from "./fake.js";
|
|
5
|
+
/**
|
|
6
|
+
* Supabase projects: `supabase.project.read` and `.import`, effect `read`, and the change
|
|
7
|
+
* operations apply calls (`plan`, `create`, `update`, `delete`), through the `supabase/supabase`
|
|
8
|
+
* OpenTofu provider; and from the Management API `supabase.project.health` and
|
|
9
|
+
* `supabase.pooler.get` (effect `read`) and `supabase.database.storeUrl` (effect `write`, to the
|
|
10
|
+
* secrets store). It carries its live driver (`supabaseDriver`, on the default bridge) and its
|
|
11
|
+
* fake (`fakeSupabase`), of which each sandbox run makes its own.
|
|
12
|
+
*/
|
|
13
|
+
export const supabase = withSetup(supabaseOps, { driver: supabaseDriver, fake: fakeSupabase });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type Driver, DriverError } from "@sanoma-ai/workflows";
|
|
2
|
+
/** A project as `GET /v1/projects` lists it: the fields read here. */
|
|
3
|
+
export interface ApiProject {
|
|
4
|
+
id: string;
|
|
5
|
+
ref?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
organization_id: string;
|
|
8
|
+
organization_slug?: string;
|
|
9
|
+
status?: string;
|
|
10
|
+
}
|
|
11
|
+
/** One of a project's poolers, as `GET /v1/projects/{ref}/config/database/pooler` lists them. */
|
|
12
|
+
export interface ApiPooler {
|
|
13
|
+
database_type: string;
|
|
14
|
+
db_host: string;
|
|
15
|
+
db_user: string;
|
|
16
|
+
db_name: string;
|
|
17
|
+
}
|
|
18
|
+
/** One service's health, as `GET /v1/projects/{ref}/health` lists them. */
|
|
19
|
+
export interface ApiHealth {
|
|
20
|
+
name: string;
|
|
21
|
+
healthy: boolean;
|
|
22
|
+
status: string;
|
|
23
|
+
}
|
|
24
|
+
/** Supabase's Management API, its answers as it sends them. Each call fails with a `DriverError`. */
|
|
25
|
+
export interface ManagementApi {
|
|
26
|
+
projects(): Promise<ApiProject[]>;
|
|
27
|
+
pooler(ref: string): Promise<ApiPooler[]>;
|
|
28
|
+
health(ref: string, services: readonly string[]): Promise<ApiHealth[]>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* `driver` (the provider's) with the Management API's operations over `api()`, made on each call:
|
|
32
|
+
* `pooler.get`, `project.health`, `database.storeUrl`, and `project.create` refusing a name the
|
|
33
|
+
* organization has a project of already.
|
|
34
|
+
*/
|
|
35
|
+
export declare function withManagement(driver: Driver, api: () => ManagementApi): Driver;
|
|
36
|
+
/** A `DriverError` for the Management API's answer `status` to `GET path`, retryable as the runtime's rule says. */
|
|
37
|
+
export declare function apiError(path: string, status: number, message: string, retryable: boolean): DriverError;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { DriverError } from "@sanoma-ai/workflows";
|
|
2
|
+
/** The services `project.health` reads when none are named: what a worker needs. */
|
|
3
|
+
const HEALTH_SERVICES = ["db", "pooler"];
|
|
4
|
+
/** The secret that holds the database URL of the project a data file exports as `name`: `store` → `SANOMA_DATABASE_URL_STORE`. */
|
|
5
|
+
const databaseUrlSecret = (name) => `SANOMA_DATABASE_URL_${name.replaceAll(/([a-z0-9])([A-Z])/g, "$1_$2").toUpperCase()}`;
|
|
6
|
+
/** The secret the project's declared `database_password` names, which the URL is built with. */
|
|
7
|
+
const PASSWORD_SECRET = "SUPABASE_DB_PASSWORD";
|
|
8
|
+
/** A project's statuses while it is deleted, and after: not a twin of a new one. */
|
|
9
|
+
const GONE = new Set(["GOING_DOWN", "REMOVED"]);
|
|
10
|
+
/** The session pooler's port: the transaction pooler's (6543) does not carry LISTEN/NOTIFY, which DBOS needs. */
|
|
11
|
+
const SESSION_PORT = 5432;
|
|
12
|
+
/**
|
|
13
|
+
* `driver` (the provider's) with the Management API's operations over `api()`, made on each call:
|
|
14
|
+
* `pooler.get`, `project.health`, `database.storeUrl`, and `project.create` refusing a name the
|
|
15
|
+
* organization has a project of already.
|
|
16
|
+
*/
|
|
17
|
+
export function withManagement(driver, api) {
|
|
18
|
+
const create = driver.ops["project.create"];
|
|
19
|
+
const pooler = async (ref) => {
|
|
20
|
+
const primary = (await api().pooler(ref)).find((p) => p.database_type === "PRIMARY");
|
|
21
|
+
if (!primary)
|
|
22
|
+
throw new DriverError(`supabase: ${ref} has no primary database pooler`, { retryable: false });
|
|
23
|
+
return { host: primary.db_host, port: SESSION_PORT, user: primary.db_user, database: primary.db_name };
|
|
24
|
+
};
|
|
25
|
+
const ops = {
|
|
26
|
+
...driver.ops,
|
|
27
|
+
// Not idempotent: a create retried after Supabase made the project, but before the run saw
|
|
28
|
+
// it, finds it here and stops, rather than making a second one.
|
|
29
|
+
"project.create": async (input, call) => {
|
|
30
|
+
const { name, organization_id: org } = input.desired;
|
|
31
|
+
const twin = (await api().projects()).find((p) => p.name === name && (p.organization_id === org || p.organization_slug === org) && !GONE.has(p.status ?? ""));
|
|
32
|
+
if (twin) {
|
|
33
|
+
throw new DriverError(`supabase: project.create: the organization ${org} has a project named ${name} already (${twin.ref ?? twin.id}); bind it instead`, { retryable: false, vendorCode: "exists" });
|
|
34
|
+
}
|
|
35
|
+
return create(input, call);
|
|
36
|
+
},
|
|
37
|
+
"project.health": async ({ ref, services = HEALTH_SERVICES }) => {
|
|
38
|
+
const answers = (await api().health(ref, services)).map(({ name, healthy, status }) => ({
|
|
39
|
+
name,
|
|
40
|
+
healthy,
|
|
41
|
+
status,
|
|
42
|
+
}));
|
|
43
|
+
return { healthy: answers.length > 0 && answers.every((s) => s.healthy), services: answers };
|
|
44
|
+
},
|
|
45
|
+
"pooler.get": ({ ref }) => pooler(ref),
|
|
46
|
+
"database.storeUrl": async ({ ref, export: name }, { secrets }) => {
|
|
47
|
+
const secret = databaseUrlSecret(name);
|
|
48
|
+
const password = await secrets.get(PASSWORD_SECRET);
|
|
49
|
+
if (password === undefined) {
|
|
50
|
+
throw new DriverError(`supabase: database.storeUrl: the secret ${PASSWORD_SECRET} is not set`, {
|
|
51
|
+
retryable: false,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const { host, port, user, database } = await pooler(ref);
|
|
55
|
+
const url = `postgresql://${encodeURIComponent(user)}:${encodeURIComponent(password)}@${host}:${port}/${encodeURIComponent(database)}?sslmode=require`;
|
|
56
|
+
// The store only adds: a URL stored before for another project or password is refused, not kept.
|
|
57
|
+
if ((await secrets.ensure(secret, () => url)) !== url) {
|
|
58
|
+
throw new DriverError(`supabase: database.storeUrl: ${secret} holds another URL (another project, pooler or password); delete it to store this one`, { retryable: false, vendorCode: "stale" });
|
|
59
|
+
}
|
|
60
|
+
return { secret };
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return Object.freeze({ ...driver, ops: Object.freeze(ops) });
|
|
64
|
+
}
|
|
65
|
+
/** A `DriverError` for the Management API's answer `status` to `GET path`, retryable as the runtime's rule says. */
|
|
66
|
+
export function apiError(path, status, message, retryable) {
|
|
67
|
+
return new DriverError(`supabase: GET ${path} answered ${status}: ${message}`, { retryable, status });
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=management.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"management.js","sourceRoot":"","sources":["../src/management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,WAAW,EAAiB,MAAM,sBAA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,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC;AAED,oHAAoH;AACpH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,MAAc,EAAE,OAAe,EAAE,SAAkB;IACxF,OAAO,IAAI,WAAW,CAAC,iBAAiB,IAAI,aAAa,MAAM,KAAK,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of the Supabase provider's resource types `pnpm generate` writes into `resources.gen.ts`,
|
|
3
|
+
* and what its schema does not say. Hand-owned. The release and its sha256 are the pin in
|
|
4
|
+
* `@sanoma-ai/bridge`'s `testdata/pins.json`.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: {
|
|
7
|
+
provider: string;
|
|
8
|
+
types: string[];
|
|
9
|
+
immutable: {
|
|
10
|
+
supabase_project: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of the Supabase provider's resource types `pnpm generate` writes into `resources.gen.ts`,
|
|
3
|
+
* and what its schema does not say. Hand-owned. The release and its sha256 are the pin in
|
|
4
|
+
* `@sanoma-ai/bridge`'s `testdata/pins.json`.
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
provider: "supabase/supabase",
|
|
8
|
+
types: ["supabase_project"],
|
|
9
|
+
// The provider's update refuses both ("Update is not supported for this attribute"), so a
|
|
10
|
+
// change replaces the project.
|
|
11
|
+
immutable: {
|
|
12
|
+
supabase_project: ["organization_id", "region"],
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=resources.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.config.js","sourceRoot":"","sources":["../src/resources.config.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAe;IACb,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,CAAC,kBAAkB,CAAC;IAC3B,0FAA0F;IAC1F,+BAA+B;IAC/B,SAAS,EAAE;QACT,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;KAChD;CACwB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The constructors a data file declares Supabase projects with, without the ref Supabase sets:
|
|
3
|
+
* `export const store = supabase.project({ name: "acme-ops", organization_id: "acme", region: "us-east-1" })`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const supabase: import("@sanoma-ai/bridge/connector").TfResources<"supabase", {
|
|
6
|
+
project: import("zod").ZodObject<{
|
|
7
|
+
database_password: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
8
|
+
id: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
9
|
+
instance_size: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
10
|
+
legacy_api_keys_enabled: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
|
|
11
|
+
name: import("zod").ZodString;
|
|
12
|
+
organization_id: import("zod").ZodString;
|
|
13
|
+
region: import("zod").ZodString;
|
|
14
|
+
timeouts: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
15
|
+
create: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
16
|
+
update: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
17
|
+
}, import("zod/v4/core").$strip>>>;
|
|
18
|
+
}, import("zod/v4/core").$strip>;
|
|
19
|
+
}, {}>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { TfProvider } from "@sanoma-ai/bridge/tfschema";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/** The OpenTofu provider these types are from. */
|
|
4
|
+
export declare const provider: TfProvider;
|
|
5
|
+
/**
|
|
6
|
+
* Project resource
|
|
7
|
+
*/
|
|
8
|
+
export declare const supabase_project: {
|
|
9
|
+
typeName: string;
|
|
10
|
+
schemaVersion: number;
|
|
11
|
+
schema: z.ZodObject<{
|
|
12
|
+
database_password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
instance_size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
legacy_api_keys_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
organization_id: z.ZodString;
|
|
18
|
+
region: z.ZodString;
|
|
19
|
+
timeouts: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
20
|
+
create: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
update: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
fields: {
|
|
25
|
+
immutable: string[];
|
|
26
|
+
vendorOwned: string[];
|
|
27
|
+
writeOnly: string[];
|
|
28
|
+
unordered: never[];
|
|
29
|
+
};
|
|
30
|
+
shape: {
|
|
31
|
+
attributes: string[];
|
|
32
|
+
secret: string[];
|
|
33
|
+
blocks: {
|
|
34
|
+
timeouts: {
|
|
35
|
+
nesting: "single";
|
|
36
|
+
shape: {
|
|
37
|
+
attributes: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The OpenTofu provider these types are from. */
|
|
3
|
+
export const provider = {
|
|
4
|
+
source: "supabase/supabase",
|
|
5
|
+
version: "1.11.0",
|
|
6
|
+
protocol: 6,
|
|
7
|
+
sha256: "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Project resource
|
|
11
|
+
*/
|
|
12
|
+
export const supabase_project = {
|
|
13
|
+
typeName: "supabase_project",
|
|
14
|
+
schemaVersion: 0,
|
|
15
|
+
schema: z.object({
|
|
16
|
+
database_password: z.string().nullish().describe("Password for the project database"),
|
|
17
|
+
id: z.string().nullish().describe("Project identifier"),
|
|
18
|
+
instance_size: z.string().nullish().describe("Desired instance size of the project"),
|
|
19
|
+
legacy_api_keys_enabled: z
|
|
20
|
+
.boolean()
|
|
21
|
+
.nullish()
|
|
22
|
+
.describe("Controls whether `anon` and `service_role` JWT-based api keys should be enabled. Please note: these keys are no longer recommended ([more information here](https://supabase.com/docs/guides/api/api-keys#why-are-anon-and-servicerole-jwt-based-keys-no-longer-recommended)).")
|
|
23
|
+
.meta({ deprecated: true }),
|
|
24
|
+
name: z.string().describe("Name of the project"),
|
|
25
|
+
organization_id: z
|
|
26
|
+
.string()
|
|
27
|
+
.describe("Organization slug (found in the Supabase dashboard URL or organization settings)"),
|
|
28
|
+
region: z.string().describe("Region where the project is located"),
|
|
29
|
+
timeouts: z
|
|
30
|
+
.object({
|
|
31
|
+
create: z
|
|
32
|
+
.string()
|
|
33
|
+
.nullish()
|
|
34
|
+
.describe('A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).'),
|
|
35
|
+
update: z
|
|
36
|
+
.string()
|
|
37
|
+
.nullish()
|
|
38
|
+
.describe('A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).'),
|
|
39
|
+
})
|
|
40
|
+
.nullish(),
|
|
41
|
+
}),
|
|
42
|
+
fields: {
|
|
43
|
+
immutable: ["organization_id", "region"],
|
|
44
|
+
vendorOwned: ["id"],
|
|
45
|
+
writeOnly: ["database_password"],
|
|
46
|
+
unordered: [],
|
|
47
|
+
},
|
|
48
|
+
shape: {
|
|
49
|
+
attributes: [
|
|
50
|
+
"database_password",
|
|
51
|
+
"id",
|
|
52
|
+
"instance_size",
|
|
53
|
+
"legacy_api_keys_enabled",
|
|
54
|
+
"name",
|
|
55
|
+
"organization_id",
|
|
56
|
+
"region",
|
|
57
|
+
],
|
|
58
|
+
secret: ["database_password"],
|
|
59
|
+
blocks: {
|
|
60
|
+
timeouts: {
|
|
61
|
+
nesting: "single",
|
|
62
|
+
shape: {
|
|
63
|
+
attributes: ["create", "update"],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=resources.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.gen.js","sourceRoot":"","sources":["../src/resources.gen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,kDAAkD;AAClD,MAAM,CAAC,MAAM,QAAQ,GAAe;IAClC,MAAM,EAAE,mBAAmB;IAC3B,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,kEAAkE;CAC3E,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,kBAAkB;IAC5B,aAAa,EAAE,CAAC;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QACrF,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACvD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QAC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ors a data file declares Supabase projects with, without the ref Supabase sets:
|
|
4
|
+
* `export const store = supabase.project({ name: "acme-ops", organization_id: "acme", region: "us-east-1" })`.
|
|
5
|
+
*/
|
|
6
|
+
export const supabase = supabaseTf.resources;
|
|
7
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanoma-ai/connector-supabase",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Supabase projects for Sanoma, through the OpenTofu provider and the Management API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"connector",
|
|
7
|
+
"database",
|
|
8
|
+
"opentofu",
|
|
9
|
+
"postgres",
|
|
10
|
+
"resources",
|
|
11
|
+
"sanoma",
|
|
12
|
+
"supabase"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/Sanoma-AI/sanoma/tree/main/connectors/supabase#readme",
|
|
15
|
+
"bugs": "https://github.com/Sanoma-AI/sanoma/issues",
|
|
16
|
+
"license": "FSL-1.1-ALv2",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/Sanoma-AI/sanoma.git",
|
|
20
|
+
"directory": "connectors/supabase"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"testdata/replies",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"default": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./resources": {
|
|
38
|
+
"types": "./dist/resources.d.ts",
|
|
39
|
+
"default": "./dist/resources.js"
|
|
40
|
+
},
|
|
41
|
+
"./driver": {
|
|
42
|
+
"types": "./dist/driver.d.ts",
|
|
43
|
+
"default": "./dist/driver.js"
|
|
44
|
+
},
|
|
45
|
+
"./fake": {
|
|
46
|
+
"types": "./dist/fake.d.ts",
|
|
47
|
+
"default": "./dist/fake.js"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"msw": "^3.0.2",
|
|
55
|
+
"zod": "^4.6.5",
|
|
56
|
+
"@sanoma-ai/bridge": "0.2.0",
|
|
57
|
+
"@sanoma-ai/workflows": "0.2.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@sanoma-ai/bridge": "^0.2.0",
|
|
61
|
+
"@sanoma-ai/workflows": "^0.2.0",
|
|
62
|
+
"zod": "^4"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=24"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsc -p tsconfig.build.json",
|
|
69
|
+
"clean": "rm -rf dist",
|
|
70
|
+
"generate": "node ../../packages/bridge/src/tfschema/cli.ts src/resources.config.ts src/resources.gen.ts && oxfmt src/resources.gen.ts",
|
|
71
|
+
"watch": "tsc -p tsconfig.build.json --watch --preserveWatchOutput"
|
|
72
|
+
}
|
|
6
73
|
}
|
package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanoma-apply-test/apply.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"configJson": "{\"database_password\":\"<scrubbed>\",\"id\":null,\"instance_size\":null,\"legacy_api_keys_enabled\":null,\"name\":\"sanoma-apply-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}",
|
|
16
|
+
"planned": "c3ludGhldGljIHBsYW46IGNyZWF0ZQ=="
|
|
17
|
+
},
|
|
18
|
+
"response": {
|
|
19
|
+
"resource": {
|
|
20
|
+
"typeName": "supabase_project",
|
|
21
|
+
"stateJson": "{\"database_password\":\"<scrubbed>\",\"id\":\"sanomaapplytestrefab\",\"instance_size\":null,\"legacy_api_keys_enabled\":false,\"name\":\"sanoma-apply-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}",
|
|
22
|
+
"schemaVersion": "0"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scrubbed": [
|
|
26
|
+
"$SUPABASE_ACCESS_TOKEN",
|
|
27
|
+
"supabase_project.database_password"
|
|
28
|
+
],
|
|
29
|
+
"synthetic": "Written by hand in bridge-record's --change format to the provider's schema and source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. The password is scrubbed as bridge-record scrubs it; values are made up. Re-record with bridge-record --change (see the README)."
|
|
30
|
+
}
|
package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanoma-apply-test/plan.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"configJson": "{\"database_password\":\"<scrubbed>\",\"id\":null,\"instance_size\":null,\"legacy_api_keys_enabled\":null,\"name\":\"sanoma-apply-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}"
|
|
16
|
+
},
|
|
17
|
+
"response": {
|
|
18
|
+
"action": "ACTION_CREATE",
|
|
19
|
+
"plannedStateJson": "{\"database_password\":\"<scrubbed>\",\"id\":null,\"instance_size\":null,\"legacy_api_keys_enabled\":null,\"name\":\"sanoma-apply-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}",
|
|
20
|
+
"unknownPaths": [
|
|
21
|
+
"id",
|
|
22
|
+
"legacy_api_keys_enabled"
|
|
23
|
+
],
|
|
24
|
+
"planned": "c3ludGhldGljIHBsYW46IGNyZWF0ZQ=="
|
|
25
|
+
},
|
|
26
|
+
"scrubbed": [
|
|
27
|
+
"$SUPABASE_ACCESS_TOKEN",
|
|
28
|
+
"supabase_project.database_password"
|
|
29
|
+
],
|
|
30
|
+
"synthetic": "Written by hand in bridge-record's --change format to the provider's schema and source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. The password is scrubbed as bridge-record scrubs it; values are made up. Re-record with bridge-record --change (see the README)."
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"priorStateJson": "{\"database_password\":\"<scrubbed>\",\"id\":\"sanomaapplytestrefab\",\"instance_size\":null,\"legacy_api_keys_enabled\":false,\"name\":\"sanoma-apply-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}"
|
|
16
|
+
},
|
|
17
|
+
"response": {},
|
|
18
|
+
"scrubbed": [
|
|
19
|
+
"$SUPABASE_ACCESS_TOKEN",
|
|
20
|
+
"supabase_project.database_password"
|
|
21
|
+
],
|
|
22
|
+
"synthetic": "Written by hand in bridge-record's --change format to the provider's schema and source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. The password is scrubbed as bridge-record scrubs it; values are made up. Re-record with bridge-record --change (see the README)."
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"priorStateJson": "{\"database_password\":\"<scrubbed>\",\"id\":\"sanomaapplytestrefab\",\"instance_size\":null,\"legacy_api_keys_enabled\":false,\"name\":\"sanoma-apply-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}"
|
|
16
|
+
},
|
|
17
|
+
"response": {
|
|
18
|
+
"action": "ACTION_DELETE"
|
|
19
|
+
},
|
|
20
|
+
"scrubbed": [
|
|
21
|
+
"$SUPABASE_ACCESS_TOKEN",
|
|
22
|
+
"supabase_project.database_password"
|
|
23
|
+
],
|
|
24
|
+
"synthetic": "Written by hand in bridge-record's --change format to the provider's schema and source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. The password is scrubbed as bridge-record scrubs it; values are made up. Re-record with bridge-record --change (see the README)."
|
|
25
|
+
}
|
package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanomamissingproject/import.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"id": "sanomamissingproject"
|
|
16
|
+
},
|
|
17
|
+
"response": {
|
|
18
|
+
"resources": [
|
|
19
|
+
{
|
|
20
|
+
"typeName": "supabase_project",
|
|
21
|
+
"stateJson": "{\"database_password\":null,\"id\":\"sanomamissingproject\",\"instance_size\":null,\"legacy_api_keys_enabled\":null,\"name\":null,\"organization_id\":null,\"region\":null,\"timeouts\":null}"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"scrubbed": [],
|
|
26
|
+
"synthetic": "Written by hand to the schema's implied type and the provider's source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. Values are made up; re-record with bridge-record."
|
|
27
|
+
}
|
package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanomatestprojectref/import.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"id": "sanomatestprojectref"
|
|
16
|
+
},
|
|
17
|
+
"response": {
|
|
18
|
+
"resources": [
|
|
19
|
+
{
|
|
20
|
+
"typeName": "supabase_project",
|
|
21
|
+
"stateJson": "{\"database_password\":null,\"id\":\"sanomatestprojectref\",\"instance_size\":null,\"legacy_api_keys_enabled\":false,\"name\":\"sanoma-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"scrubbed": [],
|
|
26
|
+
"synthetic": "Written by hand to the schema's implied type and the provider's source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. Values are made up; re-record with bridge-record."
|
|
27
|
+
}
|
package/testdata/replies/supabase_supabase_1.11.0/supabase_project/sanomatestprojectref/read.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"provider": {
|
|
3
|
+
"source": "supabase/supabase",
|
|
4
|
+
"version": "1.11.0",
|
|
5
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94",
|
|
6
|
+
"protocol": 6
|
|
7
|
+
},
|
|
8
|
+
"request": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"source": "supabase/supabase",
|
|
11
|
+
"version": "1.11.0",
|
|
12
|
+
"sha256": "954a01a6847a288c643ad0eaddc3131f48a871384d8d37dc9fe92d57d6aabf94"
|
|
13
|
+
},
|
|
14
|
+
"typeName": "supabase_project",
|
|
15
|
+
"stateJson": "{\"database_password\":null,\"id\":\"sanomatestprojectref\",\"instance_size\":null,\"legacy_api_keys_enabled\":false,\"name\":\"sanoma-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}"
|
|
16
|
+
},
|
|
17
|
+
"response": {
|
|
18
|
+
"resource": {
|
|
19
|
+
"typeName": "supabase_project",
|
|
20
|
+
"stateJson": "{\"database_password\":null,\"id\":\"sanomatestprojectref\",\"instance_size\":null,\"legacy_api_keys_enabled\":false,\"name\":\"sanoma-test\",\"organization_id\":\"sanoma-test-org\",\"region\":\"us-east-1\",\"timeouts\":null}"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scrubbed": [],
|
|
24
|
+
"synthetic": "Written by hand to the schema's implied type and the provider's source (internal/provider/project_resource.go at v1.11.0), not recorded: no Supabase access token was on the recording machine. Values are made up; re-record with bridge-record."
|
|
25
|
+
}
|