@supabase/mcp-server-supabase 0.4.5-alpha.1 → 0.5.0-alpha.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.
- package/dist/chunk-3ZRWMUMF.js +311 -0
- package/dist/chunk-3ZRWMUMF.js.map +1 -0
- package/dist/chunk-4ET572GE.cjs +311 -0
- package/dist/chunk-4ET572GE.cjs.map +1 -0
- package/dist/chunk-LL3OYJR7.cjs +2 -0
- package/dist/chunk-LL3OYJR7.cjs.map +1 -0
- package/dist/chunk-W2V6ITSZ.js +2 -0
- package/dist/chunk-W2V6ITSZ.js.map +1 -0
- package/dist/chunk-X63UTBYC.cjs +2 -0
- package/dist/chunk-X63UTBYC.cjs.map +1 -0
- package/dist/chunk-YFZN5EJN.js +2 -0
- package/dist/chunk-YFZN5EJN.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -28
- package/dist/index.d.ts +4 -28
- package/dist/index.js +1 -1
- package/dist/platform/api-platform.cjs +2 -0
- package/dist/platform/api-platform.cjs.map +1 -0
- package/dist/platform/api-platform.d.cts +20 -0
- package/dist/platform/api-platform.d.ts +20 -0
- package/dist/platform/api-platform.js +2 -0
- package/dist/platform/api-platform.js.map +1 -0
- package/dist/platform/index.cjs +1 -1
- package/dist/platform/index.cjs.map +1 -1
- package/dist/platform/index.d.cts +62 -41
- package/dist/platform/index.d.ts +62 -41
- package/dist/platform/index.js +1 -1
- package/dist/transports/stdio.cjs +1 -1
- package/dist/transports/stdio.cjs.map +1 -1
- package/dist/transports/stdio.js +1 -1
- package/dist/transports/stdio.js.map +1 -1
- package/package.json +8 -3
- package/dist/chunk-42U7HZZC.cjs +0 -3
- package/dist/chunk-42U7HZZC.cjs.map +0 -1
- package/dist/chunk-HBGPPQOZ.js +0 -310
- package/dist/chunk-HBGPPQOZ.js.map +0 -1
- package/dist/chunk-J5OV62WS.cjs +0 -310
- package/dist/chunk-J5OV62WS.cjs.map +0 -1
- package/dist/chunk-TSIYIWSV.js +0 -3
- package/dist/chunk-TSIYIWSV.js.map +0 -1
|
@@ -9,19 +9,19 @@ declare const storageBucketSchema: z.ZodObject<{
|
|
|
9
9
|
updated_at: z.ZodString;
|
|
10
10
|
public: z.ZodBoolean;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
public: boolean;
|
|
13
|
-
name: string;
|
|
14
12
|
id: string;
|
|
15
|
-
|
|
13
|
+
name: string;
|
|
16
14
|
created_at: string;
|
|
17
15
|
updated_at: string;
|
|
18
|
-
}, {
|
|
19
16
|
public: boolean;
|
|
20
|
-
name: string;
|
|
21
|
-
id: string;
|
|
22
17
|
owner: string;
|
|
18
|
+
}, {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
23
21
|
created_at: string;
|
|
24
22
|
updated_at: string;
|
|
23
|
+
public: boolean;
|
|
24
|
+
owner: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const storageConfigSchema: z.ZodObject<{
|
|
27
27
|
fileSizeLimit: z.ZodNumber;
|
|
@@ -83,14 +83,14 @@ declare const organizationSchema: z.ZodObject<{
|
|
|
83
83
|
allowed_release_channels: z.ZodArray<z.ZodString, "many">;
|
|
84
84
|
opt_in_tags: z.ZodArray<z.ZodString, "many">;
|
|
85
85
|
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
name: string;
|
|
87
86
|
id: string;
|
|
87
|
+
name: string;
|
|
88
88
|
allowed_release_channels: string[];
|
|
89
89
|
opt_in_tags: string[];
|
|
90
90
|
plan?: string | undefined;
|
|
91
91
|
}, {
|
|
92
|
-
name: string;
|
|
93
92
|
id: string;
|
|
93
|
+
name: string;
|
|
94
94
|
allowed_release_channels: string[];
|
|
95
95
|
opt_in_tags: string[];
|
|
96
96
|
plan?: string | undefined;
|
|
@@ -104,18 +104,18 @@ declare const projectSchema: z.ZodObject<{
|
|
|
104
104
|
region: z.ZodString;
|
|
105
105
|
}, "strip", z.ZodTypeAny, {
|
|
106
106
|
status: string;
|
|
107
|
-
name: string;
|
|
108
|
-
region: string;
|
|
109
107
|
id: string;
|
|
110
|
-
|
|
108
|
+
name: string;
|
|
111
109
|
organization_id: string;
|
|
110
|
+
created_at: string;
|
|
111
|
+
region: string;
|
|
112
112
|
}, {
|
|
113
113
|
status: string;
|
|
114
|
-
name: string;
|
|
115
|
-
region: string;
|
|
116
114
|
id: string;
|
|
117
|
-
|
|
115
|
+
name: string;
|
|
118
116
|
organization_id: string;
|
|
117
|
+
created_at: string;
|
|
118
|
+
region: string;
|
|
119
119
|
}>;
|
|
120
120
|
declare const branchSchema: z.ZodObject<{
|
|
121
121
|
id: z.ZodString;
|
|
@@ -132,27 +132,27 @@ declare const branchSchema: z.ZodObject<{
|
|
|
132
132
|
updated_at: z.ZodString;
|
|
133
133
|
}, "strip", z.ZodTypeAny, {
|
|
134
134
|
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
135
|
-
name: string;
|
|
136
135
|
id: string;
|
|
136
|
+
name: string;
|
|
137
137
|
created_at: string;
|
|
138
|
-
updated_at: string;
|
|
139
138
|
project_ref: string;
|
|
140
139
|
parent_project_ref: string;
|
|
141
140
|
is_default: boolean;
|
|
142
141
|
persistent: boolean;
|
|
142
|
+
updated_at: string;
|
|
143
143
|
git_branch?: string | undefined;
|
|
144
144
|
pr_number?: number | undefined;
|
|
145
145
|
latest_check_run_id?: number | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
148
|
-
name: string;
|
|
149
148
|
id: string;
|
|
149
|
+
name: string;
|
|
150
150
|
created_at: string;
|
|
151
|
-
updated_at: string;
|
|
152
151
|
project_ref: string;
|
|
153
152
|
parent_project_ref: string;
|
|
154
153
|
is_default: boolean;
|
|
155
154
|
persistent: boolean;
|
|
155
|
+
updated_at: string;
|
|
156
156
|
git_branch?: string | undefined;
|
|
157
157
|
pr_number?: number | undefined;
|
|
158
158
|
latest_check_run_id?: number | undefined;
|
|
@@ -173,21 +173,21 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
173
173
|
name: z.ZodString;
|
|
174
174
|
content: z.ZodString;
|
|
175
175
|
}, "strip", z.ZodTypeAny, {
|
|
176
|
-
content: string;
|
|
177
176
|
name: string;
|
|
178
|
-
}, {
|
|
179
177
|
content: string;
|
|
178
|
+
}, {
|
|
180
179
|
name: string;
|
|
180
|
+
content: string;
|
|
181
181
|
}>, "many">;
|
|
182
182
|
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
version: number;
|
|
184
183
|
status: string;
|
|
185
|
-
name: string;
|
|
186
184
|
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
version: number;
|
|
187
187
|
slug: string;
|
|
188
188
|
files: {
|
|
189
|
-
content: string;
|
|
190
189
|
name: string;
|
|
190
|
+
content: string;
|
|
191
191
|
}[];
|
|
192
192
|
created_at?: number | undefined;
|
|
193
193
|
updated_at?: number | undefined;
|
|
@@ -196,14 +196,14 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
196
196
|
import_map_path?: string | undefined;
|
|
197
197
|
entrypoint_path?: string | undefined;
|
|
198
198
|
}, {
|
|
199
|
-
version: number;
|
|
200
199
|
status: string;
|
|
201
|
-
name: string;
|
|
202
200
|
id: string;
|
|
201
|
+
name: string;
|
|
202
|
+
version: number;
|
|
203
203
|
slug: string;
|
|
204
204
|
files: {
|
|
205
|
-
content: string;
|
|
206
205
|
name: string;
|
|
206
|
+
content: string;
|
|
207
207
|
}[];
|
|
208
208
|
created_at?: number | undefined;
|
|
209
209
|
updated_at?: number | undefined;
|
|
@@ -215,17 +215,17 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
215
215
|
declare const createProjectOptionsSchema: z.ZodObject<{
|
|
216
216
|
name: z.ZodString;
|
|
217
217
|
organization_id: z.ZodString;
|
|
218
|
-
region: z.ZodOptional<z.ZodEnum<["sa-east-1", "ap-
|
|
218
|
+
region: z.ZodOptional<z.ZodEnum<["sa-east-1", "ap-southeast-2", "ap-northeast-2", "ap-northeast-1", "ap-southeast-1", "ap-south-1", "eu-north-1", "eu-central-2", "eu-central-1", "eu-west-3", "eu-west-2", "eu-west-1", "ca-central-1", "us-east-2", "us-east-1", "us-west-1"]>>;
|
|
219
219
|
db_pass: z.ZodOptional<z.ZodString>;
|
|
220
220
|
}, "strip", z.ZodTypeAny, {
|
|
221
221
|
name: string;
|
|
222
222
|
organization_id: string;
|
|
223
|
-
region?: "us-
|
|
223
|
+
region?: "us-west-1" | "us-east-1" | "us-east-2" | "ca-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "ap-south-1" | "ap-southeast-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-southeast-2" | "sa-east-1" | undefined;
|
|
224
224
|
db_pass?: string | undefined;
|
|
225
225
|
}, {
|
|
226
226
|
name: string;
|
|
227
227
|
organization_id: string;
|
|
228
|
-
region?: "us-
|
|
228
|
+
region?: "us-west-1" | "us-east-1" | "us-east-2" | "ca-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "ap-south-1" | "ap-southeast-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-southeast-2" | "sa-east-1" | undefined;
|
|
229
229
|
db_pass?: string | undefined;
|
|
230
230
|
}>;
|
|
231
231
|
declare const createBranchOptionsSchema: z.ZodObject<{
|
|
@@ -250,26 +250,26 @@ declare const deployEdgeFunctionOptionsSchema: z.ZodObject<{
|
|
|
250
250
|
name: z.ZodString;
|
|
251
251
|
content: z.ZodString;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
content: string;
|
|
254
253
|
name: string;
|
|
255
|
-
}, {
|
|
256
254
|
content: string;
|
|
255
|
+
}, {
|
|
257
256
|
name: string;
|
|
257
|
+
content: string;
|
|
258
258
|
}>, "many">;
|
|
259
259
|
}, "strip", z.ZodTypeAny, {
|
|
260
260
|
name: string;
|
|
261
261
|
entrypoint_path: string;
|
|
262
262
|
files: {
|
|
263
|
-
content: string;
|
|
264
263
|
name: string;
|
|
264
|
+
content: string;
|
|
265
265
|
}[];
|
|
266
266
|
import_map_path?: string | undefined;
|
|
267
267
|
}, {
|
|
268
268
|
name: string;
|
|
269
269
|
entrypoint_path: string;
|
|
270
270
|
files: {
|
|
271
|
-
content: string;
|
|
272
271
|
name: string;
|
|
272
|
+
content: string;
|
|
273
273
|
}[];
|
|
274
274
|
import_map_path?: string | undefined;
|
|
275
275
|
}>;
|
|
@@ -287,11 +287,11 @@ declare const applyMigrationOptionsSchema: z.ZodObject<{
|
|
|
287
287
|
name: z.ZodString;
|
|
288
288
|
query: z.ZodString;
|
|
289
289
|
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
name: string;
|
|
291
290
|
query: string;
|
|
292
|
-
}, {
|
|
293
291
|
name: string;
|
|
292
|
+
}, {
|
|
294
293
|
query: string;
|
|
294
|
+
name: string;
|
|
295
295
|
}>;
|
|
296
296
|
declare const migrationSchema: z.ZodObject<{
|
|
297
297
|
version: z.ZodString;
|
|
@@ -339,11 +339,12 @@ type GetLogsOptions = z.infer<typeof getLogsOptionsSchema>;
|
|
|
339
339
|
type GenerateTypescriptTypesResult = z.infer<typeof generateTypescriptTypesResultSchema>;
|
|
340
340
|
type StorageConfig = z.infer<typeof storageConfigSchema>;
|
|
341
341
|
type StorageBucket = z.infer<typeof storageBucketSchema>;
|
|
342
|
-
type
|
|
343
|
-
init?(info: InitData): Promise<void>;
|
|
342
|
+
type DatabaseOperations = {
|
|
344
343
|
executeSql<T>(projectId: string, options: ExecuteSqlOptions): Promise<T[]>;
|
|
345
344
|
listMigrations(projectId: string): Promise<Migration[]>;
|
|
346
345
|
applyMigration(projectId: string, options: ApplyMigrationOptions): Promise<void>;
|
|
346
|
+
};
|
|
347
|
+
type AccountOperations = {
|
|
347
348
|
listOrganizations(): Promise<Pick<Organization, 'id' | 'name'>[]>;
|
|
348
349
|
getOrganization(organizationId: string): Promise<Organization>;
|
|
349
350
|
listProjects(): Promise<Project[]>;
|
|
@@ -351,24 +352,44 @@ type SupabasePlatform = {
|
|
|
351
352
|
createProject(options: CreateProjectOptions): Promise<Project>;
|
|
352
353
|
pauseProject(projectId: string): Promise<void>;
|
|
353
354
|
restoreProject(projectId: string): Promise<void>;
|
|
355
|
+
};
|
|
356
|
+
type EdgeFunctionsOperations = {
|
|
354
357
|
listEdgeFunctions(projectId: string): Promise<EdgeFunction[]>;
|
|
355
358
|
getEdgeFunction(projectId: string, functionSlug: string): Promise<EdgeFunction>;
|
|
356
359
|
deployEdgeFunction(projectId: string, options: DeployEdgeFunctionOptions): Promise<Omit<EdgeFunction, 'files'>>;
|
|
360
|
+
};
|
|
361
|
+
type DebuggingOperations = {
|
|
357
362
|
getLogs(projectId: string, options: GetLogsOptions): Promise<unknown>;
|
|
358
363
|
getSecurityAdvisors(projectId: string): Promise<unknown>;
|
|
359
364
|
getPerformanceAdvisors(projectId: string): Promise<unknown>;
|
|
365
|
+
};
|
|
366
|
+
type DevelopmentOperations = {
|
|
360
367
|
getProjectUrl(projectId: string): Promise<string>;
|
|
361
368
|
getAnonKey(projectId: string): Promise<string>;
|
|
362
369
|
generateTypescriptTypes(projectId: string): Promise<GenerateTypescriptTypesResult>;
|
|
370
|
+
};
|
|
371
|
+
type StorageOperations = {
|
|
372
|
+
getStorageConfig(projectId: string): Promise<StorageConfig>;
|
|
373
|
+
updateStorageConfig(projectId: string, config: StorageConfig): Promise<void>;
|
|
374
|
+
listAllBuckets(projectId: string): Promise<StorageBucket[]>;
|
|
375
|
+
};
|
|
376
|
+
type BranchingOperations = {
|
|
363
377
|
listBranches(projectId: string): Promise<Branch[]>;
|
|
364
378
|
createBranch(projectId: string, options: CreateBranchOptions): Promise<Branch>;
|
|
365
379
|
deleteBranch(branchId: string): Promise<void>;
|
|
366
380
|
mergeBranch(branchId: string): Promise<void>;
|
|
367
381
|
resetBranch(branchId: string, options: ResetBranchOptions): Promise<void>;
|
|
368
382
|
rebaseBranch(branchId: string): Promise<void>;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
383
|
+
};
|
|
384
|
+
type SupabasePlatform = {
|
|
385
|
+
init?(info: InitData): Promise<void>;
|
|
386
|
+
account?: AccountOperations;
|
|
387
|
+
database?: DatabaseOperations;
|
|
388
|
+
functions?: EdgeFunctionsOperations;
|
|
389
|
+
debugging?: DebuggingOperations;
|
|
390
|
+
development?: DevelopmentOperations;
|
|
391
|
+
storage?: StorageOperations;
|
|
392
|
+
branching?: BranchingOperations;
|
|
372
393
|
};
|
|
373
394
|
|
|
374
|
-
export { type ApplyMigrationOptions, type Branch, type CreateBranchOptions, type CreateProjectOptions, type DeployEdgeFunctionOptions, type EdgeFunction, type ExecuteSqlOptions, type GenerateTypescriptTypesResult, type GetLogsOptions, type ListMigrationsResult, type Migration, type Organization, type Project, type ResetBranchOptions, type StorageBucket, type StorageConfig, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema, storageBucketSchema, storageConfigSchema };
|
|
395
|
+
export { type AccountOperations, type ApplyMigrationOptions, type Branch, type BranchingOperations, type CreateBranchOptions, type CreateProjectOptions, type DatabaseOperations, type DebuggingOperations, type DeployEdgeFunctionOptions, type DevelopmentOperations, type EdgeFunction, type EdgeFunctionsOperations, type ExecuteSqlOptions, type GenerateTypescriptTypesResult, type GetLogsOptions, type ListMigrationsResult, type Migration, type Organization, type Project, type ResetBranchOptions, type StorageBucket, type StorageConfig, type StorageOperations, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema, storageBucketSchema, storageConfigSchema };
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -9,19 +9,19 @@ declare const storageBucketSchema: z.ZodObject<{
|
|
|
9
9
|
updated_at: z.ZodString;
|
|
10
10
|
public: z.ZodBoolean;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
public: boolean;
|
|
13
|
-
name: string;
|
|
14
12
|
id: string;
|
|
15
|
-
|
|
13
|
+
name: string;
|
|
16
14
|
created_at: string;
|
|
17
15
|
updated_at: string;
|
|
18
|
-
}, {
|
|
19
16
|
public: boolean;
|
|
20
|
-
name: string;
|
|
21
|
-
id: string;
|
|
22
17
|
owner: string;
|
|
18
|
+
}, {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
23
21
|
created_at: string;
|
|
24
22
|
updated_at: string;
|
|
23
|
+
public: boolean;
|
|
24
|
+
owner: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const storageConfigSchema: z.ZodObject<{
|
|
27
27
|
fileSizeLimit: z.ZodNumber;
|
|
@@ -83,14 +83,14 @@ declare const organizationSchema: z.ZodObject<{
|
|
|
83
83
|
allowed_release_channels: z.ZodArray<z.ZodString, "many">;
|
|
84
84
|
opt_in_tags: z.ZodArray<z.ZodString, "many">;
|
|
85
85
|
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
name: string;
|
|
87
86
|
id: string;
|
|
87
|
+
name: string;
|
|
88
88
|
allowed_release_channels: string[];
|
|
89
89
|
opt_in_tags: string[];
|
|
90
90
|
plan?: string | undefined;
|
|
91
91
|
}, {
|
|
92
|
-
name: string;
|
|
93
92
|
id: string;
|
|
93
|
+
name: string;
|
|
94
94
|
allowed_release_channels: string[];
|
|
95
95
|
opt_in_tags: string[];
|
|
96
96
|
plan?: string | undefined;
|
|
@@ -104,18 +104,18 @@ declare const projectSchema: z.ZodObject<{
|
|
|
104
104
|
region: z.ZodString;
|
|
105
105
|
}, "strip", z.ZodTypeAny, {
|
|
106
106
|
status: string;
|
|
107
|
-
name: string;
|
|
108
|
-
region: string;
|
|
109
107
|
id: string;
|
|
110
|
-
|
|
108
|
+
name: string;
|
|
111
109
|
organization_id: string;
|
|
110
|
+
created_at: string;
|
|
111
|
+
region: string;
|
|
112
112
|
}, {
|
|
113
113
|
status: string;
|
|
114
|
-
name: string;
|
|
115
|
-
region: string;
|
|
116
114
|
id: string;
|
|
117
|
-
|
|
115
|
+
name: string;
|
|
118
116
|
organization_id: string;
|
|
117
|
+
created_at: string;
|
|
118
|
+
region: string;
|
|
119
119
|
}>;
|
|
120
120
|
declare const branchSchema: z.ZodObject<{
|
|
121
121
|
id: z.ZodString;
|
|
@@ -132,27 +132,27 @@ declare const branchSchema: z.ZodObject<{
|
|
|
132
132
|
updated_at: z.ZodString;
|
|
133
133
|
}, "strip", z.ZodTypeAny, {
|
|
134
134
|
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
135
|
-
name: string;
|
|
136
135
|
id: string;
|
|
136
|
+
name: string;
|
|
137
137
|
created_at: string;
|
|
138
|
-
updated_at: string;
|
|
139
138
|
project_ref: string;
|
|
140
139
|
parent_project_ref: string;
|
|
141
140
|
is_default: boolean;
|
|
142
141
|
persistent: boolean;
|
|
142
|
+
updated_at: string;
|
|
143
143
|
git_branch?: string | undefined;
|
|
144
144
|
pr_number?: number | undefined;
|
|
145
145
|
latest_check_run_id?: number | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
148
|
-
name: string;
|
|
149
148
|
id: string;
|
|
149
|
+
name: string;
|
|
150
150
|
created_at: string;
|
|
151
|
-
updated_at: string;
|
|
152
151
|
project_ref: string;
|
|
153
152
|
parent_project_ref: string;
|
|
154
153
|
is_default: boolean;
|
|
155
154
|
persistent: boolean;
|
|
155
|
+
updated_at: string;
|
|
156
156
|
git_branch?: string | undefined;
|
|
157
157
|
pr_number?: number | undefined;
|
|
158
158
|
latest_check_run_id?: number | undefined;
|
|
@@ -173,21 +173,21 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
173
173
|
name: z.ZodString;
|
|
174
174
|
content: z.ZodString;
|
|
175
175
|
}, "strip", z.ZodTypeAny, {
|
|
176
|
-
content: string;
|
|
177
176
|
name: string;
|
|
178
|
-
}, {
|
|
179
177
|
content: string;
|
|
178
|
+
}, {
|
|
180
179
|
name: string;
|
|
180
|
+
content: string;
|
|
181
181
|
}>, "many">;
|
|
182
182
|
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
version: number;
|
|
184
183
|
status: string;
|
|
185
|
-
name: string;
|
|
186
184
|
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
version: number;
|
|
187
187
|
slug: string;
|
|
188
188
|
files: {
|
|
189
|
-
content: string;
|
|
190
189
|
name: string;
|
|
190
|
+
content: string;
|
|
191
191
|
}[];
|
|
192
192
|
created_at?: number | undefined;
|
|
193
193
|
updated_at?: number | undefined;
|
|
@@ -196,14 +196,14 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
196
196
|
import_map_path?: string | undefined;
|
|
197
197
|
entrypoint_path?: string | undefined;
|
|
198
198
|
}, {
|
|
199
|
-
version: number;
|
|
200
199
|
status: string;
|
|
201
|
-
name: string;
|
|
202
200
|
id: string;
|
|
201
|
+
name: string;
|
|
202
|
+
version: number;
|
|
203
203
|
slug: string;
|
|
204
204
|
files: {
|
|
205
|
-
content: string;
|
|
206
205
|
name: string;
|
|
206
|
+
content: string;
|
|
207
207
|
}[];
|
|
208
208
|
created_at?: number | undefined;
|
|
209
209
|
updated_at?: number | undefined;
|
|
@@ -215,17 +215,17 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
215
215
|
declare const createProjectOptionsSchema: z.ZodObject<{
|
|
216
216
|
name: z.ZodString;
|
|
217
217
|
organization_id: z.ZodString;
|
|
218
|
-
region: z.ZodOptional<z.ZodEnum<["sa-east-1", "ap-
|
|
218
|
+
region: z.ZodOptional<z.ZodEnum<["sa-east-1", "ap-southeast-2", "ap-northeast-2", "ap-northeast-1", "ap-southeast-1", "ap-south-1", "eu-north-1", "eu-central-2", "eu-central-1", "eu-west-3", "eu-west-2", "eu-west-1", "ca-central-1", "us-east-2", "us-east-1", "us-west-1"]>>;
|
|
219
219
|
db_pass: z.ZodOptional<z.ZodString>;
|
|
220
220
|
}, "strip", z.ZodTypeAny, {
|
|
221
221
|
name: string;
|
|
222
222
|
organization_id: string;
|
|
223
|
-
region?: "us-
|
|
223
|
+
region?: "us-west-1" | "us-east-1" | "us-east-2" | "ca-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "ap-south-1" | "ap-southeast-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-southeast-2" | "sa-east-1" | undefined;
|
|
224
224
|
db_pass?: string | undefined;
|
|
225
225
|
}, {
|
|
226
226
|
name: string;
|
|
227
227
|
organization_id: string;
|
|
228
|
-
region?: "us-
|
|
228
|
+
region?: "us-west-1" | "us-east-1" | "us-east-2" | "ca-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "ap-south-1" | "ap-southeast-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-southeast-2" | "sa-east-1" | undefined;
|
|
229
229
|
db_pass?: string | undefined;
|
|
230
230
|
}>;
|
|
231
231
|
declare const createBranchOptionsSchema: z.ZodObject<{
|
|
@@ -250,26 +250,26 @@ declare const deployEdgeFunctionOptionsSchema: z.ZodObject<{
|
|
|
250
250
|
name: z.ZodString;
|
|
251
251
|
content: z.ZodString;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
content: string;
|
|
254
253
|
name: string;
|
|
255
|
-
}, {
|
|
256
254
|
content: string;
|
|
255
|
+
}, {
|
|
257
256
|
name: string;
|
|
257
|
+
content: string;
|
|
258
258
|
}>, "many">;
|
|
259
259
|
}, "strip", z.ZodTypeAny, {
|
|
260
260
|
name: string;
|
|
261
261
|
entrypoint_path: string;
|
|
262
262
|
files: {
|
|
263
|
-
content: string;
|
|
264
263
|
name: string;
|
|
264
|
+
content: string;
|
|
265
265
|
}[];
|
|
266
266
|
import_map_path?: string | undefined;
|
|
267
267
|
}, {
|
|
268
268
|
name: string;
|
|
269
269
|
entrypoint_path: string;
|
|
270
270
|
files: {
|
|
271
|
-
content: string;
|
|
272
271
|
name: string;
|
|
272
|
+
content: string;
|
|
273
273
|
}[];
|
|
274
274
|
import_map_path?: string | undefined;
|
|
275
275
|
}>;
|
|
@@ -287,11 +287,11 @@ declare const applyMigrationOptionsSchema: z.ZodObject<{
|
|
|
287
287
|
name: z.ZodString;
|
|
288
288
|
query: z.ZodString;
|
|
289
289
|
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
name: string;
|
|
291
290
|
query: string;
|
|
292
|
-
}, {
|
|
293
291
|
name: string;
|
|
292
|
+
}, {
|
|
294
293
|
query: string;
|
|
294
|
+
name: string;
|
|
295
295
|
}>;
|
|
296
296
|
declare const migrationSchema: z.ZodObject<{
|
|
297
297
|
version: z.ZodString;
|
|
@@ -339,11 +339,12 @@ type GetLogsOptions = z.infer<typeof getLogsOptionsSchema>;
|
|
|
339
339
|
type GenerateTypescriptTypesResult = z.infer<typeof generateTypescriptTypesResultSchema>;
|
|
340
340
|
type StorageConfig = z.infer<typeof storageConfigSchema>;
|
|
341
341
|
type StorageBucket = z.infer<typeof storageBucketSchema>;
|
|
342
|
-
type
|
|
343
|
-
init?(info: InitData): Promise<void>;
|
|
342
|
+
type DatabaseOperations = {
|
|
344
343
|
executeSql<T>(projectId: string, options: ExecuteSqlOptions): Promise<T[]>;
|
|
345
344
|
listMigrations(projectId: string): Promise<Migration[]>;
|
|
346
345
|
applyMigration(projectId: string, options: ApplyMigrationOptions): Promise<void>;
|
|
346
|
+
};
|
|
347
|
+
type AccountOperations = {
|
|
347
348
|
listOrganizations(): Promise<Pick<Organization, 'id' | 'name'>[]>;
|
|
348
349
|
getOrganization(organizationId: string): Promise<Organization>;
|
|
349
350
|
listProjects(): Promise<Project[]>;
|
|
@@ -351,24 +352,44 @@ type SupabasePlatform = {
|
|
|
351
352
|
createProject(options: CreateProjectOptions): Promise<Project>;
|
|
352
353
|
pauseProject(projectId: string): Promise<void>;
|
|
353
354
|
restoreProject(projectId: string): Promise<void>;
|
|
355
|
+
};
|
|
356
|
+
type EdgeFunctionsOperations = {
|
|
354
357
|
listEdgeFunctions(projectId: string): Promise<EdgeFunction[]>;
|
|
355
358
|
getEdgeFunction(projectId: string, functionSlug: string): Promise<EdgeFunction>;
|
|
356
359
|
deployEdgeFunction(projectId: string, options: DeployEdgeFunctionOptions): Promise<Omit<EdgeFunction, 'files'>>;
|
|
360
|
+
};
|
|
361
|
+
type DebuggingOperations = {
|
|
357
362
|
getLogs(projectId: string, options: GetLogsOptions): Promise<unknown>;
|
|
358
363
|
getSecurityAdvisors(projectId: string): Promise<unknown>;
|
|
359
364
|
getPerformanceAdvisors(projectId: string): Promise<unknown>;
|
|
365
|
+
};
|
|
366
|
+
type DevelopmentOperations = {
|
|
360
367
|
getProjectUrl(projectId: string): Promise<string>;
|
|
361
368
|
getAnonKey(projectId: string): Promise<string>;
|
|
362
369
|
generateTypescriptTypes(projectId: string): Promise<GenerateTypescriptTypesResult>;
|
|
370
|
+
};
|
|
371
|
+
type StorageOperations = {
|
|
372
|
+
getStorageConfig(projectId: string): Promise<StorageConfig>;
|
|
373
|
+
updateStorageConfig(projectId: string, config: StorageConfig): Promise<void>;
|
|
374
|
+
listAllBuckets(projectId: string): Promise<StorageBucket[]>;
|
|
375
|
+
};
|
|
376
|
+
type BranchingOperations = {
|
|
363
377
|
listBranches(projectId: string): Promise<Branch[]>;
|
|
364
378
|
createBranch(projectId: string, options: CreateBranchOptions): Promise<Branch>;
|
|
365
379
|
deleteBranch(branchId: string): Promise<void>;
|
|
366
380
|
mergeBranch(branchId: string): Promise<void>;
|
|
367
381
|
resetBranch(branchId: string, options: ResetBranchOptions): Promise<void>;
|
|
368
382
|
rebaseBranch(branchId: string): Promise<void>;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
383
|
+
};
|
|
384
|
+
type SupabasePlatform = {
|
|
385
|
+
init?(info: InitData): Promise<void>;
|
|
386
|
+
account?: AccountOperations;
|
|
387
|
+
database?: DatabaseOperations;
|
|
388
|
+
functions?: EdgeFunctionsOperations;
|
|
389
|
+
debugging?: DebuggingOperations;
|
|
390
|
+
development?: DevelopmentOperations;
|
|
391
|
+
storage?: StorageOperations;
|
|
392
|
+
branching?: BranchingOperations;
|
|
372
393
|
};
|
|
373
394
|
|
|
374
|
-
export { type ApplyMigrationOptions, type Branch, type CreateBranchOptions, type CreateProjectOptions, type DeployEdgeFunctionOptions, type EdgeFunction, type ExecuteSqlOptions, type GenerateTypescriptTypesResult, type GetLogsOptions, type ListMigrationsResult, type Migration, type Organization, type Project, type ResetBranchOptions, type StorageBucket, type StorageConfig, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema, storageBucketSchema, storageConfigSchema };
|
|
395
|
+
export { type AccountOperations, type ApplyMigrationOptions, type Branch, type BranchingOperations, type CreateBranchOptions, type CreateProjectOptions, type DatabaseOperations, type DebuggingOperations, type DeployEdgeFunctionOptions, type DevelopmentOperations, type EdgeFunction, type EdgeFunctionsOperations, type ExecuteSqlOptions, type GenerateTypescriptTypesResult, type GetLogsOptions, type ListMigrationsResult, type Migration, type Organization, type Project, type ResetBranchOptions, type StorageBucket, type StorageConfig, type StorageOperations, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema, storageBucketSchema, storageConfigSchema };
|
package/dist/platform/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-YFZN5EJN.js";import"../chunk-3ZRWMUMF.js";export{l as applyMigrationOptionsSchema,e as branchSchema,h as createBranchOptionsSchema,g as createProjectOptionsSchema,j as deployEdgeFunctionOptionsSchema,f as edgeFunctionSchema,k as executeSqlOptionsSchema,o as generateTypescriptTypesResultSchema,n as getLogsOptionsSchema,m as migrationSchema,c as organizationSchema,d as projectSchema,i as resetBranchOptionsSchema,a as storageBucketSchema,b as storageConfigSchema};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var
|
|
2
|
+
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkX63UTBYCcjs = require('../chunk-X63UTBYC.cjs');require('../chunk-LL3OYJR7.cjs');var _chunk4ET572GEcjs = require('../chunk-4ET572GE.cjs');var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');var _util = require('util');function p(r,o=","){return r.split(o).map(e=>e.trim()).filter(e=>e!=="")}var{version:d}=_chunk4ET572GEcjs.a;async function g(){let{values:{["access-token"]:r,["project-ref"]:o,["read-only"]:t,["api-url"]:e,["version"]:l,["features"]:s}}=_util.parseArgs.call(void 0, {options:{"access-token":{type:"string"},"project-ref":{type:"string"},"read-only":{type:"boolean",default:!1},"api-url":{type:"string"},version:{type:"boolean"},features:{type:"string"}}});l&&(console.log(d),process.exit(0));let n=_nullishCoalesce(r, () => (process.env.SUPABASE_ACCESS_TOKEN));n||(console.error("Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable"),process.exit(1));let f=s?p(s):void 0,m=_chunkX63UTBYCcjs.a.call(void 0, {accessToken:n,apiUrl:e}),u=_chunk4ET572GEcjs.i.call(void 0, {platform:m,projectId:o,readOnly:t,features:f}),S=new _stdiojs.StdioServerTransport;await u.connect(S)}g().catch(console.error);
|
|
3
3
|
//# sourceMappingURL=stdio.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/grichardson/Documents/dev/supabase/mcp-server-supabase/packages/mcp-server-supabase/dist/transports/stdio.cjs","../../src/transports/stdio.ts","../../src/transports/util.ts"],"names":["parseList","list","delimiter","feature","version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","cliFeatures","parseArgs","accessToken","features","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"],"mappings":"AAAA;AACA,
|
|
1
|
+
{"version":3,"sources":["/Users/grichardson/Documents/dev/supabase/mcp-server-supabase/packages/mcp-server-supabase/dist/transports/stdio.cjs","../../src/transports/stdio.ts","../../src/transports/util.ts"],"names":["parseList","list","delimiter","feature","version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","cliFeatures","parseArgs","accessToken","features","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"],"mappings":"AAAA;AACA,0KAAyC,iCAA8B,yDAAuC,oECCzE,4BACX,SCGVA,CAAAA,CAAUC,CAAAA,CAAcC,CAAAA,CAAY,GAAA,CAAe,CAEjE,OADcD,CAAAA,CAAK,KAAA,CAAMC,CAAS,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAYA,CAAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CACtD,MAAA,CAAQA,CAAAA,EAAYA,CAAAA,GAAY,EAAE,CACjD,CDAA,GAAM,CAAE,OAAA,CAAAC,CAAQ,CAAA,CAAIC,mBAAAA,CAEpB,MAAA,SAAeC,CAAAA,CAAAA,CAAO,CACpB,GAAM,CACJ,MAAA,CAAQ,CACN,CAAC,cAAc,CAAA,CAAGC,CAAAA,CAClB,CAAC,aAAa,CAAA,CAAGC,CAAAA,CACjB,CAAC,WAAW,CAAA,CAAGC,CAAAA,CACf,CAAC,SAAS,CAAA,CAAGC,CAAAA,CACb,CAAC,SAAS,CAAA,CAAGC,CAAAA,CACb,CAAC,UAAU,CAAA,CAAGC,CAChB,CACF,CAAA,CAAIC,6BAAAA,CACF,OAAA,CAAS,CACN,cAAA,CAAiB,CAChB,IAAA,CAAM,QACR,CAAA,CACC,aAAA,CAAgB,CACf,IAAA,CAAM,QACR,CAAA,CACC,WAAA,CAAc,CACb,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,CAAA,CACX,CAAA,CACC,SAAA,CAAY,CACX,IAAA,CAAM,QACR,CAAA,CACC,OAAA,CAAY,CACX,IAAA,CAAM,SACR,CAAA,CACC,QAAA,CAAa,CACZ,IAAA,CAAM,QACR,CACF,CACF,CAAC,CAAA,CAEGF,CAAAA,EAAAA,CACF,OAAA,CAAQ,GAAA,CAAIP,CAAO,CAAA,CACnB,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMU,CAAAA,kBAAcP,CAAAA,SAAkB,OAAA,CAAQ,GAAA,CAAI,uBAAA,CAE7CO,CAAAA,EAAAA,CACH,OAAA,CAAQ,KAAA,CACN,iIACF,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMC,CAAAA,CAAWH,CAAAA,CAAcZ,CAAAA,CAAUY,CAAW,CAAA,CAAI,KAAA,CAAA,CAElDI,CAAAA,CAAWC,iCAAAA,CACf,WAAA,CAAAH,CAAAA,CACA,MAAA,CAAAJ,CACF,CAAC,CAAA,CAEKQ,CAAAA,CAASC,iCAAAA,CACb,QAAA,CAAAH,CAAAA,CACA,SAAA,CAAAR,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAM,CACF,CAAC,CAAA,CAEKK,CAAAA,CAAY,IAAIC,6BAAAA,CAEtB,MAAMH,CAAAA,CAAO,OAAA,CAAQE,CAAS,CAChC,CAEAd,CAAAA,CAAK,CAAA,CAAE,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA","file":"/Users/grichardson/Documents/dev/supabase/mcp-server-supabase/packages/mcp-server-supabase/dist/transports/stdio.cjs","sourcesContent":[null,"#!/usr/bin/env node\n\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { parseArgs } from 'node:util';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { createSupabaseApiPlatform } from '../platform/api-platform.js';\nimport { createSupabaseMcpServer } from '../server.js';\nimport { parseList } from './util.js';\n\nconst { version } = packageJson;\n\nasync function main() {\n const {\n values: {\n ['access-token']: cliAccessToken,\n ['project-ref']: projectId,\n ['read-only']: readOnly,\n ['api-url']: apiUrl,\n ['version']: showVersion,\n ['features']: cliFeatures,\n },\n } = parseArgs({\n options: {\n ['access-token']: {\n type: 'string',\n },\n ['project-ref']: {\n type: 'string',\n },\n ['read-only']: {\n type: 'boolean',\n default: false,\n },\n ['api-url']: {\n type: 'string',\n },\n ['version']: {\n type: 'boolean',\n },\n ['features']: {\n type: 'string',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\n const accessToken = cliAccessToken ?? process.env.SUPABASE_ACCESS_TOKEN;\n\n if (!accessToken) {\n console.error(\n 'Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable'\n );\n process.exit(1);\n }\n\n const features = cliFeatures ? parseList(cliFeatures) : undefined;\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n features,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n","/**\n * Parses a delimited list of items into an array,\n * trimming whitespace and filtering out empty items.\n *\n * Default delimiter is a comma (`,`).\n */\nexport function parseList(list: string, delimiter = ','): string[] {\n const items = list.split(delimiter).map((feature) => feature.trim());\n return items.filter((feature) => feature !== '');\n}\n"]}
|
package/dist/transports/stdio.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a
|
|
2
|
+
import{a as c}from"../chunk-W2V6ITSZ.js";import"../chunk-YFZN5EJN.js";import{a,i}from"../chunk-3ZRWMUMF.js";import{StdioServerTransport as v}from"@modelcontextprotocol/sdk/server/stdio.js";import{parseArgs as y}from"node:util";function p(r,o=","){return r.split(o).map(e=>e.trim()).filter(e=>e!=="")}var{version:d}=a;async function g(){let{values:{["access-token"]:r,["project-ref"]:o,["read-only"]:t,["api-url"]:e,["version"]:l,["features"]:s}}=y({options:{"access-token":{type:"string"},"project-ref":{type:"string"},"read-only":{type:"boolean",default:!1},"api-url":{type:"string"},version:{type:"boolean"},features:{type:"string"}}});l&&(console.log(d),process.exit(0));let n=r??process.env.SUPABASE_ACCESS_TOKEN;n||(console.error("Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable"),process.exit(1));let f=s?p(s):void 0,m=c({accessToken:n,apiUrl:e}),u=i({platform:m,projectId:o,readOnly:t,features:f}),S=new v;await u.connect(S)}g().catch(console.error);
|
|
3
3
|
//# sourceMappingURL=stdio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/transports/stdio.ts","../../src/transports/util.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { parseArgs } from 'node:util';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { createSupabaseApiPlatform } from '../platform/api-platform.js';\nimport { createSupabaseMcpServer } from '../server.js';\nimport { parseList } from './util.js';\n\nconst { version } = packageJson;\n\nasync function main() {\n const {\n values: {\n ['access-token']: cliAccessToken,\n ['project-ref']: projectId,\n ['read-only']: readOnly,\n ['api-url']: apiUrl,\n ['version']: showVersion,\n ['features']: cliFeatures,\n },\n } = parseArgs({\n options: {\n ['access-token']: {\n type: 'string',\n },\n ['project-ref']: {\n type: 'string',\n },\n ['read-only']: {\n type: 'boolean',\n default: false,\n },\n ['api-url']: {\n type: 'string',\n },\n ['version']: {\n type: 'boolean',\n },\n ['features']: {\n type: 'string',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\n const accessToken = cliAccessToken ?? process.env.SUPABASE_ACCESS_TOKEN;\n\n if (!accessToken) {\n console.error(\n 'Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable'\n );\n process.exit(1);\n }\n\n const features = cliFeatures ? parseList(cliFeatures) : undefined;\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n features,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n","/**\n * Parses a delimited list of items into an array,\n * trimming whitespace and filtering out empty items.\n *\n * Default delimiter is a comma (`,`).\n */\nexport function parseList(list: string, delimiter = ','): string[] {\n const items = list.split(delimiter).map((feature) => feature.trim());\n return items.filter((feature) => feature !== '');\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../src/transports/stdio.ts","../../src/transports/util.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { parseArgs } from 'node:util';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { createSupabaseApiPlatform } from '../platform/api-platform.js';\nimport { createSupabaseMcpServer } from '../server.js';\nimport { parseList } from './util.js';\n\nconst { version } = packageJson;\n\nasync function main() {\n const {\n values: {\n ['access-token']: cliAccessToken,\n ['project-ref']: projectId,\n ['read-only']: readOnly,\n ['api-url']: apiUrl,\n ['version']: showVersion,\n ['features']: cliFeatures,\n },\n } = parseArgs({\n options: {\n ['access-token']: {\n type: 'string',\n },\n ['project-ref']: {\n type: 'string',\n },\n ['read-only']: {\n type: 'boolean',\n default: false,\n },\n ['api-url']: {\n type: 'string',\n },\n ['version']: {\n type: 'boolean',\n },\n ['features']: {\n type: 'string',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\n const accessToken = cliAccessToken ?? process.env.SUPABASE_ACCESS_TOKEN;\n\n if (!accessToken) {\n console.error(\n 'Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable'\n );\n process.exit(1);\n }\n\n const features = cliFeatures ? parseList(cliFeatures) : undefined;\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n features,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n","/**\n * Parses a delimited list of items into an array,\n * trimming whitespace and filtering out empty items.\n *\n * Default delimiter is a comma (`,`).\n */\nexport function parseList(list: string, delimiter = ','): string[] {\n const items = list.split(delimiter).map((feature) => feature.trim());\n return items.filter((feature) => feature !== '');\n}\n"],"mappings":";4GAEA,OAAS,wBAAAA,MAA4B,4CACrC,OAAS,aAAAC,MAAiB,YCGnB,SAASC,EAAUC,EAAcC,EAAY,IAAe,CAEjE,OADcD,EAAK,MAAMC,CAAS,EAAE,IAAKC,GAAYA,EAAQ,KAAK,CAAC,EACtD,OAAQA,GAAYA,IAAY,EAAE,CACjD,CDAA,GAAM,CAAE,QAAAC,CAAQ,EAAIC,EAEpB,eAAeC,GAAO,CACpB,GAAM,CACJ,OAAQ,CACN,CAAC,cAAc,EAAGC,EAClB,CAAC,aAAa,EAAGC,EACjB,CAAC,WAAW,EAAGC,EACf,CAAC,SAAS,EAAGC,EACb,CAAC,SAAS,EAAGC,EACb,CAAC,UAAU,EAAGC,CAChB,CACF,EAAIC,EAAU,CACZ,QAAS,CACN,eAAiB,CAChB,KAAM,QACR,EACC,cAAgB,CACf,KAAM,QACR,EACC,YAAc,CACb,KAAM,UACN,QAAS,EACX,EACC,UAAY,CACX,KAAM,QACR,EACC,QAAY,CACX,KAAM,SACR,EACC,SAAa,CACZ,KAAM,QACR,CACF,CACF,CAAC,EAEGF,IACF,QAAQ,IAAIP,CAAO,EACnB,QAAQ,KAAK,CAAC,GAGhB,IAAMU,EAAcP,GAAkB,QAAQ,IAAI,sBAE7CO,IACH,QAAQ,MACN,iIACF,EACA,QAAQ,KAAK,CAAC,GAGhB,IAAMC,EAAWH,EAAcI,EAAUJ,CAAW,EAAI,OAElDK,EAAWC,EAA0B,CACzC,YAAAJ,EACA,OAAAJ,CACF,CAAC,EAEKS,EAASC,EAAwB,CACrC,SAAAH,EACA,UAAAT,EACA,SAAAC,EACA,SAAAM,CACF,CAAC,EAEKM,EAAY,IAAIC,EAEtB,MAAMH,EAAO,QAAQE,CAAS,CAChC,CAEAf,EAAK,EAAE,MAAM,QAAQ,KAAK","names":["StdioServerTransport","parseArgs","parseList","list","delimiter","feature","version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","cliFeatures","parseArgs","accessToken","features","parseList","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"]}
|