@r8s/supabase 0.2.0 → 0.2.1

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.
@@ -0,0 +1,131 @@
1
+ export interface SupabaseProps {
2
+ /** Resource name — base for every derived resource (defaults to 'supabase') */
3
+ name?: string;
4
+ /** Kubernetes namespace (defaults to 'default') */
5
+ namespace?: string;
6
+ /** Public hostname for the REST API root — PostgREST (required) */
7
+ host: string;
8
+ /** Replicas per service (defaults to 1; PostgREST/GoTrue scale horizontally) */
9
+ replicas?: number;
10
+ /** Postgres cluster storage size for the Database core (defaults to '10Gi') */
11
+ storage?: string;
12
+ /**
13
+ * Render the Storage API service (defaults to true). Set false to run a
14
+ * minimal auth + REST-only Supabase. The S3 objectStorage prop is always
15
+ * required so a bucket is declared for the platform.
16
+ */
17
+ storageApi?: boolean;
18
+ /**
19
+ * S3-compatible object storage for the Storage API (RustFS in the platform).
20
+ * Reference a bucket whose credentials live in a Secret provisioned by
21
+ * the secrets backend (keys: accessKey, secretKey) — never plaintext.
22
+ */
23
+ objectStorage: {
24
+ /** S3 endpoint URL, e.g. https://s3.internal.example.com */
25
+ endpoint: string;
26
+ /** Bucket for uploads and stored files */
27
+ bucket: string;
28
+ /** Name of the Secret holding accessKey / secretKey */
29
+ credentialsSecret: string;
30
+ };
31
+ /**
32
+ * S3 region reported to the Storage API (GLOBAL_S3_REGION, defaults to
33
+ * 'us-east-1'). For S3-compatible stores like RustFS any consistent
34
+ * region works — keep it aligned with the provider's default.
35
+ */
36
+ region?: string;
37
+ /**
38
+ * Name of an existing Secret holding the Supabase JWT bundle with keys
39
+ * `jwtSecret`, `anonKey`, `serviceRoleKey` and `referrerURLs`. Required
40
+ * unless a secrets backend (openbao/vault) is configured on the
41
+ * surrounding Platform — the backend then provisions the bundle at
42
+ * path `<path>/<name>/jwt`. Plaintext JWT secrets are not supported.
43
+ */
44
+ jwtSecretsName?: string;
45
+ /**
46
+ * Additional redirect URLs GoTrue may send users to after signup,
47
+ * magic-link or OAuth flows (GOTRUE_URI_ALLOW_LIST). The site URL is
48
+ * always allowed; pass a list (joined with ',') or a pre-joined string.
49
+ */
50
+ uriAllowList?: string | string[];
51
+ /** Requested resources — applied to every service in the suite */
52
+ resources?: {
53
+ requests?: {
54
+ cpu?: string;
55
+ memory?: string;
56
+ };
57
+ limits?: {
58
+ cpu?: string;
59
+ memory?: string;
60
+ };
61
+ };
62
+ /** TLS configuration (defaults to letsencrypt-prod cluster issuer) */
63
+ tls?: {
64
+ secretName: string;
65
+ clusterIssuer: string;
66
+ };
67
+ }
68
+ /**
69
+ * Supabase — open-source Firebase alternative: auth, REST, realtime and
70
+ * storage on Postgres. This is the Supabase backend platform, NOT Apache
71
+ * Superset (which ships in the separate r8s/superset package).
72
+ *
73
+ * @title Supabase
74
+ * @category Backend Platforms
75
+ *
76
+ * Composes:
77
+ * - CNPG Postgres cluster (the Supabase database core) bootstrapped with
78
+ * the Supabase roles (anon, authenticated, service_role, authenticator),
79
+ * extensions (pgcrypto, pgjwt) and schemas (auth, storage, realtime)
80
+ * - GoTrue auth service (`${name}-gotrue`, port 9999)
81
+ * - PostgREST REST API (`${name}-postgrest`, port 3000)
82
+ * - Realtime websockets service (`${name}-realtime`, port 4000)
83
+ * - Storage API on S3/RustFS (`${name}-storage-api`, port 5000)
84
+ * - ImgProxy image transform service (`${name}-imgproxy`, port 8080)
85
+ * - Endpoints on one host: `/rest/v1` (PostgREST), `/auth/v1` (GoTrue),
86
+ * `/realtime/v1` (Realtime, with WebSocket-friendly nginx annotations)
87
+ * and `/storage/v1` (Storage API), plus the REST root at `/`
88
+ * - JWT bundle (jwtSecret, anonKey, serviceRoleKey, referrerURLs)
89
+ * provisioned through the Platform secrets backend (openbao / vault),
90
+ * or referenced from an existing Secret
91
+ *
92
+ * Wrap the component in `<Platform secrets={{ backend: 'openbao' }}>` and
93
+ * the `${name}-jwt` bundle is provisioned for you. Without a backend you
94
+ * must point `jwtSecretsName` at a pre-created Secret.
95
+ *
96
+ * @example
97
+ * import { Platform } from '@r8s/recipes'
98
+ * import { Supabase } from '@r8s/supabase'
99
+ *
100
+ * export default (
101
+ * <Platform secrets={{ backend: 'openbao', mount: 'kv', path: 'apps' }}>
102
+ * <Supabase
103
+ * name="backend"
104
+ * host="backend.example.com"
105
+ * objectStorage={{
106
+ * endpoint: 'https://s3.internal.example.com',
107
+ * bucket: 'backend-uploads',
108
+ * credentialsSecret: 'backend-object-store-credentials',
109
+ * }}
110
+ * />
111
+ * </Platform>
112
+ * )
113
+ *
114
+ * @example
115
+ * // Reference a pre-created JWT bundle instead of provisioning one
116
+ * import { Supabase } from '@r8s/supabase'
117
+ *
118
+ * export default (
119
+ * <Supabase
120
+ * host="backend.example.com"
121
+ * jwtSecretsName="backend-jwt"
122
+ * objectStorage={{
123
+ * endpoint: 'https://s3.internal.example.com',
124
+ * bucket: 'backend-uploads',
125
+ * credentialsSecret: 'backend-object-store-credentials',
126
+ * }}
127
+ * />
128
+ * )
129
+ */
130
+ export declare function Supabase(props: SupabaseProps): import("@r8s/core").r8sElement;
131
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAA;IACZ,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,aAAa,EAAE;QACb,4DAA4D;QAC5D,QAAQ,EAAE,MAAM,CAAA;QAChB,0CAA0C;QAC1C,MAAM,EAAE,MAAM,CAAA;QACd,uDAAuD;QACvD,iBAAiB,EAAE,MAAM,CAAA;KAC1B,CAAA;IACD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAChC,kEAAkE;IAClE,SAAS,CAAC,EAAE;QACV,QAAQ,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QAC5C,MAAM,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAC3C,CAAA;IACD,sEAAsE;IACtE,GAAG,CAAC,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;QAClB,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCAqU5C"}
package/dist/index.js ADDED
@@ -0,0 +1,258 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Supabase = Supabase;
4
+ const jsx_runtime_1 = require("@r8s/core/jsx-runtime");
5
+ const core_1 = require("@r8s/core");
6
+ const defaults_1 = require("@r8s/core/defaults");
7
+ const recipes_1 = require("@r8s/recipes");
8
+ /**
9
+ * Supabase — open-source Firebase alternative: auth, REST, realtime and
10
+ * storage on Postgres. This is the Supabase backend platform, NOT Apache
11
+ * Superset (which ships in the separate r8s/superset package).
12
+ *
13
+ * @title Supabase
14
+ * @category Backend Platforms
15
+ *
16
+ * Composes:
17
+ * - CNPG Postgres cluster (the Supabase database core) bootstrapped with
18
+ * the Supabase roles (anon, authenticated, service_role, authenticator),
19
+ * extensions (pgcrypto, pgjwt) and schemas (auth, storage, realtime)
20
+ * - GoTrue auth service (`${name}-gotrue`, port 9999)
21
+ * - PostgREST REST API (`${name}-postgrest`, port 3000)
22
+ * - Realtime websockets service (`${name}-realtime`, port 4000)
23
+ * - Storage API on S3/RustFS (`${name}-storage-api`, port 5000)
24
+ * - ImgProxy image transform service (`${name}-imgproxy`, port 8080)
25
+ * - Endpoints on one host: `/rest/v1` (PostgREST), `/auth/v1` (GoTrue),
26
+ * `/realtime/v1` (Realtime, with WebSocket-friendly nginx annotations)
27
+ * and `/storage/v1` (Storage API), plus the REST root at `/`
28
+ * - JWT bundle (jwtSecret, anonKey, serviceRoleKey, referrerURLs)
29
+ * provisioned through the Platform secrets backend (openbao / vault),
30
+ * or referenced from an existing Secret
31
+ *
32
+ * Wrap the component in `<Platform secrets={{ backend: 'openbao' }}>` and
33
+ * the `${name}-jwt` bundle is provisioned for you. Without a backend you
34
+ * must point `jwtSecretsName` at a pre-created Secret.
35
+ *
36
+ * @example
37
+ * import { Platform } from '@r8s/recipes'
38
+ * import { Supabase } from '@r8s/supabase'
39
+ *
40
+ * export default (
41
+ * <Platform secrets={{ backend: 'openbao', mount: 'kv', path: 'apps' }}>
42
+ * <Supabase
43
+ * name="backend"
44
+ * host="backend.example.com"
45
+ * objectStorage={{
46
+ * endpoint: 'https://s3.internal.example.com',
47
+ * bucket: 'backend-uploads',
48
+ * credentialsSecret: 'backend-object-store-credentials',
49
+ * }}
50
+ * />
51
+ * </Platform>
52
+ * )
53
+ *
54
+ * @example
55
+ * // Reference a pre-created JWT bundle instead of provisioning one
56
+ * import { Supabase } from '@r8s/supabase'
57
+ *
58
+ * export default (
59
+ * <Supabase
60
+ * host="backend.example.com"
61
+ * jwtSecretsName="backend-jwt"
62
+ * objectStorage={{
63
+ * endpoint: 'https://s3.internal.example.com',
64
+ * bucket: 'backend-uploads',
65
+ * credentialsSecret: 'backend-object-store-credentials',
66
+ * }}
67
+ * />
68
+ * )
69
+ */
70
+ function Supabase(props) {
71
+ const { name = 'supabase', namespace = 'default', host, replicas = 1, storage = '10Gi', storageApi = true, region = 'us-east-1', objectStorage, jwtSecretsName, uriAllowList, resources = {
72
+ requests: { memory: '512Mi', cpu: '250m' },
73
+ limits: { memory: '2Gi', cpu: '1000m' },
74
+ }, tls = { secretName: `${name}-tls`, clusterIssuer: 'letsencrypt-prod' }, } = props;
75
+ const secretProvider = (0, core_1.useContext)(defaults_1.SecretContext);
76
+ const resources_ = [];
77
+ const dbHost = `${name}-rw`;
78
+ const dbCredentialsName = `${name}-db-credentials`;
79
+ const jwtBundleName = jwtSecretsName ?? `${name}-jwt`;
80
+ // Static parts only — the password arrives via $(PGPASSWORD), which every
81
+ // service declares through secretKeyRef (WebService resolves secrets
82
+ // before plain env, so Kubernetes dependent expansion sees it).
83
+ const dbUri = `postgresql://${name}:$(PGPASSWORD)@${dbHost}:5432/${name}`;
84
+ // --- Bootstrap SQL ---------------------------------------------------------
85
+ // Minimal Supabase bootstrap applied once by CNPG after initdb
86
+ // (bootstrap.initdb.postInitApplicationSQL). Every statement is
87
+ // idempotent where the SQL grammar allows it.
88
+ const postInitSQL = [
89
+ 'CREATE EXTENSION IF NOT EXISTS pgcrypto;',
90
+ 'CREATE EXTENSION IF NOT EXISTS pgjwt;',
91
+ 'CREATE ROLE anon NOLOGIN;',
92
+ 'CREATE ROLE authenticated NOLOGIN;',
93
+ 'CREATE ROLE service_role NOLOGIN;',
94
+ 'CREATE ROLE authenticator NOLOGIN;',
95
+ 'GRANT USAGE ON SCHEMA public TO anon, authenticated, service_role;',
96
+ 'CREATE SCHEMA IF NOT EXISTS auth;',
97
+ 'CREATE SCHEMA IF NOT EXISTS storage;',
98
+ 'CREATE SCHEMA IF NOT EXISTS realtime;',
99
+ 'GRANT USAGE ON SCHEMA auth TO anon, authenticated, service_role;',
100
+ 'GRANT USAGE ON SCHEMA storage TO anon, authenticated, service_role;',
101
+ 'GRANT USAGE ON SCHEMA realtime TO anon, authenticated, service_role;',
102
+ 'GRANT anon TO authenticator;',
103
+ 'GRANT authenticated TO authenticator;',
104
+ 'GRANT service_role TO authenticator;',
105
+ ];
106
+ // --- JWT bundle provisioning ----------------------------------------------
107
+ // GoTrue, PostgREST and Storage API all verify Supabase JWTs. The bundle
108
+ // (jwtSecret, anonKey, serviceRoleKey, referrerURLs) must never be
109
+ // rendered as plaintext: with a secrets backend it is provisioned through
110
+ // the backend (keys live at <path>/<name>/jwt); otherwise reference a
111
+ // pre-created Secret.
112
+ if (!jwtSecretsName) {
113
+ if (!secretProvider ||
114
+ (secretProvider.backend !== 'vault' && secretProvider.backend !== 'openbao')) {
115
+ throw new Error(`Supabase "${name}" requires a JWT secret bundle (keys: jwtSecret, anonKey, serviceRoleKey, referrerURLs).\n` +
116
+ `\n` +
117
+ `GoTrue, PostgREST and Storage API verify Supabase JWTs — the bundle ` +
118
+ `must not be rendered as plaintext.\n` +
119
+ `\n` +
120
+ `Fix: configure a secrets backend on the Platform holding the bundle ` +
121
+ `at path <mount-path>/${name}/jwt:\n` +
122
+ ` <Platform secrets={{ backend: 'openbao', mount: 'kv', path: 'apps' }}>\n` +
123
+ ` <Supabase name="${name}" host="${host}" objectStorage={{ endpoint: '...', bucket: '...', credentialsSecret: '...' }} />\n` +
124
+ ` </Platform>\n` +
125
+ `\n` +
126
+ `Or reference a pre-created Secret (keys: jwtSecret, anonKey, serviceRoleKey, referrerURLs):\n` +
127
+ ` <Supabase name="${name}" host="${host}" jwtSecretsName="${name}-jwt" />`);
128
+ }
129
+ const spec = {
130
+ ...(secretProvider.backend === 'vault'
131
+ ? { vaultAuthRef: secretProvider.authRef }
132
+ : { openbaoAuthRef: secretProvider.authRef }),
133
+ mount: secretProvider.mount,
134
+ type: 'kv-v2',
135
+ path: `${secretProvider.path ?? name}/${name}/jwt`,
136
+ destination: { create: true, name: jwtBundleName },
137
+ };
138
+ resources_.push(secretProvider.backend === 'vault'
139
+ ? (0, core_1.jsx)('VaultStaticSecret', {
140
+ apiVersion: 'secrets.hashicorp.com/v1beta1',
141
+ kind: 'VaultStaticSecret',
142
+ metadata: { name: `${name}-jwt`, namespace },
143
+ spec,
144
+ })
145
+ : (0, core_1.jsx)('OpenBaoStaticSecret', {
146
+ apiVersion: 'secrets.openbao.org/v1beta1',
147
+ kind: 'OpenBaoStaticSecret',
148
+ metadata: { name: `${name}-jwt`, namespace },
149
+ spec,
150
+ }));
151
+ }
152
+ // --- Database (CNPG) — the Postgres core -----------------------------------
153
+ // Wraps every Postgres-backed service so credentials stay consistent with
154
+ // the r8s Database recipe (CNPG dedicated cluster provisions the secret).
155
+ resources_.push((0, core_1.jsx)(recipes_1.Database, {
156
+ name,
157
+ namespace,
158
+ storage,
159
+ postInitSQL,
160
+ children: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(recipes_1.WebService, { name: `${name}-gotrue`, namespace: namespace, image: "supabase/gotrue:v2", port: 9999, replicas: replicas, resources: resources, probes: {
161
+ liveness: { path: '/health', initialDelaySeconds: 15 },
162
+ readiness: { path: '/health', initialDelaySeconds: 15 },
163
+ }, env: {
164
+ GOTRUE_API_HOST: '0.0.0.0',
165
+ GOTRUE_API_PORT: '9999',
166
+ GOTRUE_SITE_URL: `https://${host}`,
167
+ API_EXTERNAL_URL: `https://${host}`,
168
+ GOTRUE_DB_DRIVER: 'postgres',
169
+ GOTRUE_DB_DATABASE_URL: dbUri,
170
+ GOTRUE_JWT_ISSUER: `https://${host}/auth/v1`,
171
+ GOTRUE_JWT_ADMIN_ROLES: 'service_role',
172
+ GOTRUE_JWT_AUD: 'authenticated',
173
+ GOTRUE_JWT_DEFAULT_GROUP_NAME: 'authenticated',
174
+ GOTRUE_JWT_EXP: '3600',
175
+ ...(uriAllowList && {
176
+ GOTRUE_URI_ALLOW_LIST: Array.isArray(uriAllowList)
177
+ ? uriAllowList.join(',')
178
+ : uriAllowList,
179
+ }),
180
+ }, secrets: {
181
+ PGPASSWORD: { secret: dbCredentialsName, key: 'password' },
182
+ GOTRUE_JWT_SECRET: { secret: jwtBundleName, key: 'jwtSecret' },
183
+ } }), (0, jsx_runtime_1.jsx)(recipes_1.WebService, { name: `${name}-postgrest`, namespace: namespace, image: "postgrest/postgrest:v12", port: 3000, replicas: replicas, resources: resources, probes: {
184
+ liveness: { path: '/' },
185
+ readiness: { path: '/' },
186
+ }, env: {
187
+ PGRST_SERVER_PORT: '3000',
188
+ PGRST_DB_URI: dbUri,
189
+ PGRST_DB_SCHEMAS: 'public,storage,graphql_public',
190
+ PGRST_DB_ANON_ROLE: 'anon',
191
+ PGRST_DB_USE_LEGACY_GUCS: 'false',
192
+ }, secrets: {
193
+ PGPASSWORD: { secret: dbCredentialsName, key: 'password' },
194
+ PGRST_JWT_SECRET: { secret: jwtBundleName, key: 'jwtSecret' },
195
+ } }), (0, jsx_runtime_1.jsx)(recipes_1.WebService, { name: `${name}-realtime`, namespace: namespace, image: "supabase/realtime:v2", port: 4000, replicas: replicas, resources: resources, probes: {
196
+ liveness: { path: '/health' },
197
+ readiness: { path: '/health' },
198
+ }, env: {
199
+ PORT: '4000',
200
+ DB_HOST: dbHost,
201
+ DB_PORT: '5432',
202
+ DB_USER: name,
203
+ DB_NAME: name,
204
+ DB_ENC_KEY: 'supabaserealtime',
205
+ SECURE_CHANNELS: 'true',
206
+ }, secrets: {
207
+ DB_PASSWORD: { secret: dbCredentialsName, key: 'password' },
208
+ API_JWT_SECRET: { secret: jwtBundleName, key: 'jwtSecret' },
209
+ } }), storageApi && ((0, jsx_runtime_1.jsx)(recipes_1.WebService, { name: `${name}-storage-api`, namespace: namespace, image: "supabase/storage-api:v0", port: 5000, replicas: replicas, resources: resources, probes: {
210
+ liveness: { path: '/status' },
211
+ readiness: { path: '/status' },
212
+ }, env: {
213
+ PORT: '5000',
214
+ DATABASE_URL: dbUri,
215
+ STORAGE_BACKEND: 's3',
216
+ GLOBAL_S3_BUCKET: objectStorage.bucket,
217
+ GLOBAL_S3_ENDPOINT: objectStorage.endpoint,
218
+ GLOBAL_S3_REGION: region,
219
+ GLOBAL_S3_FORCE_PATH_STYLE: 'true',
220
+ IMGPROXY_URL: `http://${name}-imgproxy:8080`,
221
+ FILE_SIZE_LIMIT: '50GiB',
222
+ }, secrets: {
223
+ PGPASSWORD: { secret: dbCredentialsName, key: 'password' },
224
+ PGRST_JWT_SECRET: { secret: jwtBundleName, key: 'jwtSecret' },
225
+ ANON_KEY: { secret: jwtBundleName, key: 'anonKey' },
226
+ SERVICE_KEY: { secret: jwtBundleName, key: 'serviceRoleKey' },
227
+ GLOBAL_S3_ACCESS_KEY: {
228
+ secret: objectStorage.credentialsSecret,
229
+ key: 'accessKey',
230
+ },
231
+ GLOBAL_S3_SECRET_KEY: {
232
+ secret: objectStorage.credentialsSecret,
233
+ key: 'secretKey',
234
+ },
235
+ } }))] })),
236
+ }));
237
+ // --- ImgProxy — image transforms for the Storage API ------------------------
238
+ // Stateful-free image resizer; no database or secrets needed.
239
+ resources_.push((0, jsx_runtime_1.jsx)(recipes_1.WebService, { name: `${name}-imgproxy`, namespace: namespace, image: "darthsim/imgproxy:v3", port: 8080, replicas: replicas, resources: resources, probes: {
240
+ liveness: { path: '/health' },
241
+ readiness: { path: '/health' },
242
+ }, env: {
243
+ IMGPROXY_ALLOW_ORIGIN: '*',
244
+ IMGPROXY_ENABLE_WEBP_DETECTION: 'true',
245
+ IMGPROXY_MAX_SRC_RESOLUTION: '50',
246
+ } }));
247
+ // --- Endpoints — one host, path-based routes --------------------------------
248
+ // The REST root (PostgREST) serves `/`; GoTrue, Realtime and Storage API
249
+ // are exposed as Prefix routes on the same host so clients use a single
250
+ // origin (`/auth/v1`, `/rest/v1`, `/realtime/v1`, `/storage/v1`).
251
+ resources_.push((0, jsx_runtime_1.jsx)(recipes_1.Endpoint, { name: `${name}-endpoint`, namespace: namespace, host: host, serviceName: `${name}-postgrest`, servicePort: 3000, tls: tls }), (0, jsx_runtime_1.jsx)(recipes_1.Endpoint, { name: `${name}-auth-endpoint`, namespace: namespace, host: host, path: "/auth/v1", serviceName: `${name}-gotrue`, servicePort: 9999, tls: tls }), (0, jsx_runtime_1.jsx)(recipes_1.Endpoint, { name: `${name}-rest-endpoint`, namespace: namespace, host: host, path: "/rest/v1", serviceName: `${name}-postgrest`, servicePort: 3000, tls: tls }), (0, jsx_runtime_1.jsx)(recipes_1.Endpoint, { name: `${name}-realtime-endpoint`, namespace: namespace, host: host, path: "/realtime/v1", serviceName: `${name}-realtime`, servicePort: 4000, tls: tls, annotations: {
252
+ 'nginx.ingress.kubernetes.io/proxy-buffering': 'off',
253
+ 'nginx.ingress.kubernetes.io/proxy-read-timeout': '3600',
254
+ 'nginx.ingress.kubernetes.io/proxy-send-timeout': '3600',
255
+ } }), storageApi && ((0, jsx_runtime_1.jsx)(recipes_1.Endpoint, { name: `${name}-storage-endpoint`, namespace: namespace, host: host, path: "/storage/v1", serviceName: `${name}-storage-api`, servicePort: 5000, tls: tls })));
256
+ return (0, core_1.jsx)(core_1.Fragment, { children: resources_ });
257
+ }
258
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;AAgIA,4BAqUC;;AArcD,oCAAqD;AACrD,iDAAkD;AAClD,0CAA6D;AAgE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,SAAgB,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EACJ,IAAI,GAAG,UAAU,EACjB,SAAS,GAAG,SAAS,EACrB,IAAI,EACJ,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,MAAM,EAChB,UAAU,GAAG,IAAI,EACjB,MAAM,GAAG,WAAW,EACpB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,SAAS,GAAG;QACV,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE;QAC1C,MAA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B,EACjC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,cAAc,EACnB,WAAW,EAAE,GAAG,IAAI,WAAW,EAC/B,WAAW,EAAE,IAAI,EACjB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE;YACX,6CAA6C,EAAE,KAAK;YACpD,gDAAgD,EAAE,MAAM;YACxD,gDAAgD,EAAE,MAAM;SACzD,GACD,EACF,UAAU,IAAI,CACZ,uBAAC,kBAAQ,IACP,IAAI,EAAE,GAAG,IAAI,mBAAmB,EAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,aAAa,EAClB,WAAW,EAAE,GAAG,IAAI,cAAc,EAClC,WAAW,EAAE,IAAI,EACjB,GAAG,EAAE,GAAG,GACR,CACH,CACF,CAAA;IAED,OAAO,IAAA,UAAG,EAAC,eAAQ,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAA;AAChD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r8s/supabase",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Supabase backend platform — Postgres core with GoTrue auth, PostgREST, Realtime, Storage API (S3/RustFS) and ImgProxy. This is Supabase, NOT Apache Superset.",
5
5
  "license": "MIT",
6
6
  "author": "Berget AI AB",
@@ -38,5 +38,8 @@
38
38
  "devDependencies": {
39
39
  "typescript": "^5.3.0",
40
40
  "vitest": "^1.0.0"
41
- }
41
+ },
42
+ "files": [
43
+ "dist"
44
+ ]
42
45
  }