@masonator/coolify-mcp 0.2.15 → 0.2.17

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.
Files changed (31) hide show
  1. package/package.json +2 -2
  2. package/dist/__tests__/coolify-client.test.d.ts +0 -1
  3. package/dist/__tests__/coolify-client.test.js +0 -208
  4. package/dist/__tests__/mcp-server.test.d.ts +0 -1
  5. package/dist/__tests__/mcp-server.test.js +0 -282
  6. package/dist/__tests__/resources/application-resources.test.d.ts +0 -1
  7. package/dist/__tests__/resources/application-resources.test.js +0 -33
  8. package/dist/__tests__/resources/database-resources.test.d.ts +0 -1
  9. package/dist/__tests__/resources/database-resources.test.js +0 -68
  10. package/dist/__tests__/resources/deployment-resources.test.d.ts +0 -1
  11. package/dist/__tests__/resources/deployment-resources.test.js +0 -46
  12. package/dist/__tests__/resources/service-resources.test.d.ts +0 -1
  13. package/dist/__tests__/resources/service-resources.test.js +0 -76
  14. package/dist/lib/coolify-client.d.ts +0 -44
  15. package/dist/lib/coolify-client.js +0 -161
  16. package/dist/lib/mcp-server.d.ts +0 -56
  17. package/dist/lib/mcp-server.js +0 -423
  18. package/dist/lib/resource.d.ts +0 -13
  19. package/dist/lib/resource.js +0 -25
  20. package/dist/resources/application-resources.d.ts +0 -14
  21. package/dist/resources/application-resources.js +0 -55
  22. package/dist/resources/database-resources.d.ts +0 -17
  23. package/dist/resources/database-resources.js +0 -51
  24. package/dist/resources/deployment-resources.d.ts +0 -12
  25. package/dist/resources/deployment-resources.js +0 -44
  26. package/dist/resources/index.d.ts +0 -4
  27. package/dist/resources/index.js +0 -4
  28. package/dist/resources/service-resources.d.ts +0 -15
  29. package/dist/resources/service-resources.js +0 -51
  30. package/dist/types/coolify.d.ts +0 -228
  31. package/dist/types/coolify.js +0 -1
@@ -1,423 +0,0 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { CoolifyClient } from './coolify-client.js';
3
- import debug from 'debug';
4
- import { z } from 'zod';
5
- const log = debug('coolify:mcp');
6
- // Define valid service types
7
- const serviceTypes = [
8
- 'activepieces',
9
- 'appsmith',
10
- 'appwrite',
11
- 'authentik',
12
- 'babybuddy',
13
- 'budge',
14
- 'changedetection',
15
- 'chatwoot',
16
- 'classicpress-with-mariadb',
17
- 'classicpress-with-mysql',
18
- 'classicpress-without-database',
19
- 'cloudflared',
20
- 'code-server',
21
- 'dashboard',
22
- 'directus',
23
- 'directus-with-postgresql',
24
- 'docker-registry',
25
- 'docuseal',
26
- 'docuseal-with-postgres',
27
- 'dokuwiki',
28
- 'duplicati',
29
- 'emby',
30
- 'embystat',
31
- 'fider',
32
- 'filebrowser',
33
- 'firefly',
34
- 'formbricks',
35
- 'ghost',
36
- 'gitea',
37
- 'gitea-with-mariadb',
38
- 'gitea-with-mysql',
39
- 'gitea-with-postgresql',
40
- 'glance',
41
- 'glances',
42
- 'glitchtip',
43
- 'grafana',
44
- 'grafana-with-postgresql',
45
- 'grocy',
46
- 'heimdall',
47
- 'homepage',
48
- 'jellyfin',
49
- 'kuzzle',
50
- 'listmonk',
51
- 'logto',
52
- 'mediawiki',
53
- 'meilisearch',
54
- 'metabase',
55
- 'metube',
56
- 'minio',
57
- 'moodle',
58
- 'n8n',
59
- 'n8n-with-postgresql',
60
- 'next-image-transformation',
61
- 'nextcloud',
62
- 'nocodb',
63
- 'odoo',
64
- 'openblocks',
65
- 'pairdrop',
66
- 'penpot',
67
- 'phpmyadmin',
68
- 'pocketbase',
69
- 'posthog',
70
- 'reactive-resume',
71
- 'rocketchat',
72
- 'shlink',
73
- 'slash',
74
- 'snapdrop',
75
- 'statusnook',
76
- 'stirling-pdf',
77
- 'supabase',
78
- 'syncthing',
79
- 'tolgee',
80
- 'trigger',
81
- 'trigger-with-external-database',
82
- 'twenty',
83
- 'umami',
84
- 'unleash-with-postgresql',
85
- 'unleash-without-database',
86
- 'uptime-kuma',
87
- 'vaultwarden',
88
- 'vikunja',
89
- 'weblate',
90
- 'whoogle',
91
- 'wordpress-with-mariadb',
92
- 'wordpress-with-mysql',
93
- 'wordpress-without-database'
94
- ];
95
- export class CoolifyMcpServer extends McpServer {
96
- client;
97
- constructor(config) {
98
- super({
99
- name: 'coolify',
100
- version: '0.1.18',
101
- capabilities: {
102
- tools: true,
103
- resources: true,
104
- prompts: true
105
- }
106
- });
107
- log('Initializing server with config: %o', config);
108
- this.client = new CoolifyClient(config);
109
- this.setupTools();
110
- }
111
- setupTools() {
112
- log('Setting up tools');
113
- this.tool('list_servers', 'List all Coolify servers', {}, async (_args, _extra) => {
114
- const servers = await this.client.listServers();
115
- return {
116
- content: [{ type: 'text', text: JSON.stringify(servers, null, 2) }]
117
- };
118
- });
119
- this.tool('get_server', 'Get details about a specific Coolify server', {
120
- uuid: z.string().describe('UUID of the server to get details for')
121
- }, async (args) => {
122
- const server = await this.client.getServer(args.uuid);
123
- return {
124
- content: [{ type: 'text', text: JSON.stringify(server, null, 2) }]
125
- };
126
- });
127
- this.tool('get_server_resources', 'Get the current resources running on a specific Coolify server', {
128
- uuid: z.string()
129
- }, async (args, _extra) => {
130
- const resources = await this.client.getServerResources(args.uuid);
131
- return {
132
- content: [{ type: 'text', text: JSON.stringify(resources, null, 2) }]
133
- };
134
- });
135
- this.tool('get_server_domains', 'Get domains for a specific Coolify server', {
136
- uuid: z.string()
137
- }, async (args, _extra) => {
138
- const domains = await this.client.getServerDomains(args.uuid);
139
- return {
140
- content: [{ type: 'text', text: JSON.stringify(domains, null, 2) }]
141
- };
142
- });
143
- this.tool('validate_server', 'Validate a specific Coolify server', {
144
- uuid: z.string()
145
- }, async (args, _extra) => {
146
- const validation = await this.client.validateServer(args.uuid);
147
- return {
148
- content: [{ type: 'text', text: JSON.stringify(validation, null, 2) }]
149
- };
150
- });
151
- this.tool('list_projects', 'List all Coolify projects', {}, async (_args, _extra) => {
152
- const projects = await this.client.listProjects();
153
- return {
154
- content: [{ type: 'text', text: JSON.stringify(projects, null, 2) }]
155
- };
156
- });
157
- this.tool('get_project', 'Get details about a specific Coolify project', {
158
- uuid: z.string()
159
- }, async (args, _extra) => {
160
- const project = await this.client.getProject(args.uuid);
161
- return {
162
- content: [{ type: 'text', text: JSON.stringify(project, null, 2) }]
163
- };
164
- });
165
- this.tool('create_project', 'Create a new Coolify project', {
166
- name: z.string(),
167
- description: z.string().optional()
168
- }, async (args, _extra) => {
169
- const result = await this.client.createProject({
170
- name: args.name,
171
- description: args.description
172
- });
173
- return {
174
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
175
- };
176
- });
177
- this.tool('update_project', 'Update an existing Coolify project', {
178
- uuid: z.string(),
179
- name: z.string(),
180
- description: z.string().optional()
181
- }, async (args, _extra) => {
182
- const { uuid, ...updateData } = args;
183
- const result = await this.client.updateProject(uuid, updateData);
184
- return {
185
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
186
- };
187
- });
188
- this.tool('delete_project', 'Delete a Coolify project', {
189
- uuid: z.string()
190
- }, async (args, _extra) => {
191
- const result = await this.client.deleteProject(args.uuid);
192
- return {
193
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
194
- };
195
- });
196
- this.tool('get_project_environment', 'Get environment details for a Coolify project', {
197
- project_uuid: z.string(),
198
- environment_name_or_uuid: z.string()
199
- }, async (args, _extra) => {
200
- const environment = await this.client.getProjectEnvironment(args.project_uuid, args.environment_name_or_uuid);
201
- return {
202
- content: [{ type: 'text', text: JSON.stringify(environment, null, 2) }]
203
- };
204
- });
205
- this.tool('list_databases', 'List all Coolify databases', {}, async (_args, _extra) => {
206
- const databases = await this.client.listDatabases();
207
- return {
208
- content: [{ type: 'text', text: JSON.stringify(databases, null, 2) }]
209
- };
210
- });
211
- this.tool('get_database', 'Get details about a specific Coolify database', {
212
- uuid: z.string()
213
- }, async (args, _extra) => {
214
- const database = await this.client.getDatabase(args.uuid);
215
- return {
216
- content: [{ type: 'text', text: JSON.stringify(database, null, 2) }]
217
- };
218
- });
219
- this.tool('update_database', 'Update a Coolify database', {
220
- uuid: z.string(),
221
- data: z.record(z.unknown())
222
- }, async (args, _extra) => {
223
- const result = await this.client.updateDatabase(args.uuid, args.data);
224
- return {
225
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
226
- };
227
- });
228
- const deleteOptionsSchema = {
229
- deleteConfigurations: z.boolean().optional(),
230
- deleteVolumes: z.boolean().optional(),
231
- dockerCleanup: z.boolean().optional(),
232
- deleteConnectedNetworks: z.boolean().optional()
233
- };
234
- this.tool('delete_database', 'Delete a Coolify database', {
235
- uuid: z.string(),
236
- options: z.object(deleteOptionsSchema).optional()
237
- }, async (args, _extra) => {
238
- const result = await this.client.deleteDatabase(args.uuid, args.options);
239
- return {
240
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
241
- };
242
- });
243
- this.tool('deploy_application', 'Deploy a Coolify application', {
244
- uuid: z.string()
245
- }, async (args, _extra) => {
246
- const result = await this.client.deployApplication(args.uuid);
247
- return {
248
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
249
- };
250
- });
251
- this.tool('list_services', 'List all Coolify services', {}, async (_args, _extra) => {
252
- const services = await this.client.listServices();
253
- return {
254
- content: [{ type: 'text', text: JSON.stringify(services, null, 2) }]
255
- };
256
- });
257
- this.tool('get_service', 'Get details about a specific Coolify service', {
258
- uuid: z.string()
259
- }, async (args, _extra) => {
260
- const service = await this.client.getService(args.uuid);
261
- return {
262
- content: [{ type: 'text', text: JSON.stringify(service, null, 2) }]
263
- };
264
- });
265
- this.tool('create_service', 'Create a new Coolify service', {
266
- type: z.enum(serviceTypes),
267
- project_uuid: z.string(),
268
- server_uuid: z.string(),
269
- name: z.string().optional(),
270
- description: z.string().optional(),
271
- environment_name: z.string().optional(),
272
- environment_uuid: z.string().optional(),
273
- destination_uuid: z.string().optional(),
274
- instant_deploy: z.boolean().optional()
275
- }, async (args, _extra) => {
276
- const result = await this.client.createService(args);
277
- return {
278
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
279
- };
280
- });
281
- this.tool('delete_service', 'Delete a Coolify service', {
282
- uuid: z.string(),
283
- options: z.object(deleteOptionsSchema).optional()
284
- }, async (args, _extra) => {
285
- const result = await this.client.deleteService(args.uuid, args.options);
286
- return {
287
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
288
- };
289
- });
290
- }
291
- async connect(transport) {
292
- log('Starting server...');
293
- log('Validating connection...');
294
- await this.client.validateConnection();
295
- await super.connect(transport);
296
- log('Server started successfully');
297
- }
298
- async list_servers() {
299
- return this.client.listServers();
300
- }
301
- async get_server(uuid) {
302
- return this.client.getServer(uuid);
303
- }
304
- async get_server_resources(uuid) {
305
- return this.client.getServerResources(uuid);
306
- }
307
- async get_server_domains(uuid) {
308
- return this.client.getServerDomains(uuid);
309
- }
310
- async validate_server(uuid) {
311
- return this.client.validateServer(uuid);
312
- }
313
- async list_projects() {
314
- return this.client.listProjects();
315
- }
316
- async get_project(uuid) {
317
- return this.client.getProject(uuid);
318
- }
319
- async create_project(project) {
320
- return this.client.createProject(project);
321
- }
322
- async update_project(uuid, project) {
323
- return this.client.updateProject(uuid, project);
324
- }
325
- async delete_project(uuid) {
326
- return this.client.deleteProject(uuid);
327
- }
328
- async get_project_environment(projectUuid, environmentNameOrUuid) {
329
- return this.client.getProjectEnvironment(projectUuid, environmentNameOrUuid);
330
- }
331
- async deploy_application(params) {
332
- return this.client.deployApplication(params.uuid);
333
- }
334
- async list_databases() {
335
- return this.client.listDatabases();
336
- }
337
- async get_database(uuid) {
338
- return this.client.getDatabase(uuid);
339
- }
340
- async update_database(uuid, data) {
341
- return this.client.updateDatabase(uuid, data);
342
- }
343
- async delete_database(uuid, options) {
344
- return this.client.deleteDatabase(uuid, options);
345
- }
346
- async list_services() {
347
- return this.client.listServices();
348
- }
349
- async get_service(uuid) {
350
- return this.client.getService(uuid);
351
- }
352
- async create_service(data) {
353
- return this.client.createService(data);
354
- }
355
- async delete_service(uuid, options) {
356
- return this.client.deleteService(uuid, options);
357
- }
358
- async resources_list() {
359
- return {
360
- resources: [
361
- 'coolify/servers/list',
362
- 'coolify/servers/{id}',
363
- 'coolify/servers/{id}/resources',
364
- 'coolify/servers/{id}/domains',
365
- 'coolify/servers/{id}/validate',
366
- 'coolify/projects/list',
367
- 'coolify/projects/{id}',
368
- 'coolify/projects/create',
369
- 'coolify/projects/{id}/update',
370
- 'coolify/projects/{id}/delete',
371
- 'coolify/projects/{id}/environments/{env}',
372
- 'coolify/databases/list',
373
- 'coolify/databases/{id}',
374
- 'coolify/databases/{id}/update',
375
- 'coolify/databases/{id}/delete',
376
- 'coolify/services/list',
377
- 'coolify/services/{id}',
378
- 'coolify/services/create',
379
- 'coolify/services/{id}/delete',
380
- 'coolify/applications/deploy/{id}'
381
- ]
382
- };
383
- }
384
- async prompts_list() {
385
- return {
386
- prompts: [
387
- 'Show me all Coolify servers in my instance',
388
- 'What\'s the status of server {uuid}?',
389
- 'Show me the resources running on server {uuid}',
390
- 'What domains are configured for server {uuid}?',
391
- 'Can you validate the connection to server {uuid}?',
392
- 'How much CPU and memory is server {uuid} using?',
393
- 'List all resources running on server {uuid}',
394
- 'Show me the current status of all servers',
395
- 'List all my Coolify projects',
396
- 'Create a new project called "{name}" with description "{description}"',
397
- 'Show me the details of project {uuid}',
398
- 'Update project {uuid} to change its name to "{name}"',
399
- 'Delete project {uuid}',
400
- 'Show me the environments in project {uuid}',
401
- 'Get details of the {env} environment in project {uuid}',
402
- 'What variables are set in the {env} environment of project {uuid}?',
403
- 'List all applications',
404
- 'Show me details of application {uuid}',
405
- 'Create a new application called "{name}"',
406
- 'Delete application {uuid}',
407
- 'Show me all running services',
408
- 'Create a new {type} service',
409
- 'What\'s the status of service {uuid}?',
410
- 'Delete service {uuid} and clean up its resources',
411
- 'List all databases',
412
- 'Show me the configuration of database {uuid}',
413
- 'Update database {uuid}',
414
- 'Delete database {uuid} and clean up volumes',
415
- 'Show me all active deployments',
416
- 'What\'s the status of deployment {uuid}?',
417
- 'Deploy application {uuid}',
418
- 'Force rebuild and deploy application {uuid}',
419
- 'List recent deployments for application {uuid}'
420
- ]
421
- };
422
- }
423
- }
@@ -1,13 +0,0 @@
1
- import 'reflect-metadata';
2
- /**
3
- * Decorator for marking methods as MCP resources.
4
- * @param uri The URI pattern for the resource
5
- */
6
- export declare function Resource(uri: string): MethodDecorator;
7
- /**
8
- * Get the resource URI for a decorated method
9
- * @param target The class instance or constructor
10
- * @param propertyKey The method name
11
- * @returns The resource URI or undefined if not a resource
12
- */
13
- export declare function getResourceUri(target: object, propertyKey: string | symbol): string | undefined;
@@ -1,25 +0,0 @@
1
- import 'reflect-metadata';
2
- /**
3
- * Metadata key for storing the resource URI
4
- */
5
- const RESOURCE_URI_KEY = Symbol('resourceUri');
6
- /**
7
- * Decorator for marking methods as MCP resources.
8
- * @param uri The URI pattern for the resource
9
- */
10
- export function Resource(uri) {
11
- return function (target, propertyKey, descriptor) {
12
- // Store the URI pattern in the method's metadata
13
- Reflect.defineMetadata(RESOURCE_URI_KEY, uri, target, propertyKey);
14
- return descriptor;
15
- };
16
- }
17
- /**
18
- * Get the resource URI for a decorated method
19
- * @param target The class instance or constructor
20
- * @param propertyKey The method name
21
- * @returns The resource URI or undefined if not a resource
22
- */
23
- export function getResourceUri(target, propertyKey) {
24
- return Reflect.getMetadata(RESOURCE_URI_KEY, target, propertyKey);
25
- }
@@ -1,14 +0,0 @@
1
- import { CoolifyClient } from '../lib/coolify-client.js';
2
- import { Application, CreateApplicationRequest } from '../types/coolify.js';
3
- export declare class ApplicationResources {
4
- private client;
5
- constructor(client: CoolifyClient);
6
- listApplications(): Promise<Application[]>;
7
- getApplication(_id: string): Promise<Application>;
8
- createApplication(_data: CreateApplicationRequest): Promise<{
9
- uuid: string;
10
- }>;
11
- deleteApplication(_id: string): Promise<{
12
- message: string;
13
- }>;
14
- }
@@ -1,55 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Resource } from '../lib/resource.js';
11
- export class ApplicationResources {
12
- constructor(client) {
13
- this.client = client;
14
- }
15
- async listApplications() {
16
- // TODO: Implement listApplications in CoolifyClient
17
- throw new Error('Not implemented');
18
- }
19
- async getApplication(_id) {
20
- // TODO: Implement getApplication in CoolifyClient
21
- throw new Error('Not implemented');
22
- }
23
- async createApplication(_data) {
24
- // TODO: Implement createApplication in CoolifyClient
25
- throw new Error('Not implemented');
26
- }
27
- async deleteApplication(_id) {
28
- // TODO: Implement deleteApplication in CoolifyClient
29
- throw new Error('Not implemented');
30
- }
31
- }
32
- __decorate([
33
- Resource('coolify/applications/list'),
34
- __metadata("design:type", Function),
35
- __metadata("design:paramtypes", []),
36
- __metadata("design:returntype", Promise)
37
- ], ApplicationResources.prototype, "listApplications", null);
38
- __decorate([
39
- Resource('coolify/applications/{id}'),
40
- __metadata("design:type", Function),
41
- __metadata("design:paramtypes", [String]),
42
- __metadata("design:returntype", Promise)
43
- ], ApplicationResources.prototype, "getApplication", null);
44
- __decorate([
45
- Resource('coolify/applications/create'),
46
- __metadata("design:type", Function),
47
- __metadata("design:paramtypes", [Object]),
48
- __metadata("design:returntype", Promise)
49
- ], ApplicationResources.prototype, "createApplication", null);
50
- __decorate([
51
- Resource('coolify/applications/{id}/delete'),
52
- __metadata("design:type", Function),
53
- __metadata("design:paramtypes", [String]),
54
- __metadata("design:returntype", Promise)
55
- ], ApplicationResources.prototype, "deleteApplication", null);
@@ -1,17 +0,0 @@
1
- import { CoolifyClient } from '../lib/coolify-client.js';
2
- import { Database, DatabaseUpdateRequest } from '../types/coolify.js';
3
- export declare class DatabaseResources {
4
- private client;
5
- constructor(client: CoolifyClient);
6
- listDatabases(): Promise<Database[]>;
7
- getDatabase(id: string): Promise<Database>;
8
- updateDatabase(id: string, data: DatabaseUpdateRequest): Promise<Database>;
9
- deleteDatabase(id: string, options?: {
10
- deleteConfigurations?: boolean;
11
- deleteVolumes?: boolean;
12
- dockerCleanup?: boolean;
13
- deleteConnectedNetworks?: boolean;
14
- }): Promise<{
15
- message: string;
16
- }>;
17
- }
@@ -1,51 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Resource } from '../lib/resource.js';
11
- export class DatabaseResources {
12
- constructor(client) {
13
- this.client = client;
14
- }
15
- async listDatabases() {
16
- return this.client.listDatabases();
17
- }
18
- async getDatabase(id) {
19
- return this.client.getDatabase(id);
20
- }
21
- async updateDatabase(id, data) {
22
- return this.client.updateDatabase(id, data);
23
- }
24
- async deleteDatabase(id, options) {
25
- return this.client.deleteDatabase(id, options);
26
- }
27
- }
28
- __decorate([
29
- Resource('coolify/databases/list'),
30
- __metadata("design:type", Function),
31
- __metadata("design:paramtypes", []),
32
- __metadata("design:returntype", Promise)
33
- ], DatabaseResources.prototype, "listDatabases", null);
34
- __decorate([
35
- Resource('coolify/databases/{id}'),
36
- __metadata("design:type", Function),
37
- __metadata("design:paramtypes", [String]),
38
- __metadata("design:returntype", Promise)
39
- ], DatabaseResources.prototype, "getDatabase", null);
40
- __decorate([
41
- Resource('coolify/databases/{id}/update'),
42
- __metadata("design:type", Function),
43
- __metadata("design:paramtypes", [String, Object]),
44
- __metadata("design:returntype", Promise)
45
- ], DatabaseResources.prototype, "updateDatabase", null);
46
- __decorate([
47
- Resource('coolify/databases/{id}/delete'),
48
- __metadata("design:type", Function),
49
- __metadata("design:paramtypes", [String, Object]),
50
- __metadata("design:returntype", Promise)
51
- ], DatabaseResources.prototype, "deleteDatabase", null);
@@ -1,12 +0,0 @@
1
- import { CoolifyClient } from '../lib/coolify-client.js';
2
- import { Deployment } from '../types/coolify.js';
3
- export declare class DeploymentResources {
4
- private client;
5
- constructor(client: CoolifyClient);
6
- listDeployments(): Promise<Deployment[]>;
7
- getDeployment(_id: string): Promise<Deployment>;
8
- deploy(params: {
9
- uuid: string;
10
- forceRebuild?: boolean;
11
- }): Promise<Deployment>;
12
- }
@@ -1,44 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Resource } from '../lib/resource.js';
11
- export class DeploymentResources {
12
- constructor(client) {
13
- this.client = client;
14
- }
15
- async listDeployments() {
16
- // TODO: Implement listDeployments in CoolifyClient
17
- throw new Error('Not implemented');
18
- }
19
- async getDeployment(_id) {
20
- // TODO: Implement getDeployment in CoolifyClient
21
- throw new Error('Not implemented');
22
- }
23
- async deploy(params) {
24
- return this.client.deployApplication(params.uuid);
25
- }
26
- }
27
- __decorate([
28
- Resource('coolify/deployments/list'),
29
- __metadata("design:type", Function),
30
- __metadata("design:paramtypes", []),
31
- __metadata("design:returntype", Promise)
32
- ], DeploymentResources.prototype, "listDeployments", null);
33
- __decorate([
34
- Resource('coolify/deployments/{id}'),
35
- __metadata("design:type", Function),
36
- __metadata("design:paramtypes", [String]),
37
- __metadata("design:returntype", Promise)
38
- ], DeploymentResources.prototype, "getDeployment", null);
39
- __decorate([
40
- Resource('coolify/deploy'),
41
- __metadata("design:type", Function),
42
- __metadata("design:paramtypes", [Object]),
43
- __metadata("design:returntype", Promise)
44
- ], DeploymentResources.prototype, "deploy", null);
@@ -1,4 +0,0 @@
1
- export * from './database-resources.js';
2
- export * from './deployment-resources.js';
3
- export * from './application-resources.js';
4
- export * from './service-resources.js';
@@ -1,4 +0,0 @@
1
- export * from './database-resources.js';
2
- export * from './deployment-resources.js';
3
- export * from './application-resources.js';
4
- export * from './service-resources.js';