@geekmidas/cli 1.4.0 → 1.5.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{HostingerProvider-B9N-TKbp.mjs → HostingerProvider-402UdK89.mjs} +34 -1
  3. package/dist/HostingerProvider-402UdK89.mjs.map +1 -0
  4. package/dist/{HostingerProvider-DUV9-Tzg.cjs → HostingerProvider-BiXdHjiq.cjs} +34 -1
  5. package/dist/HostingerProvider-BiXdHjiq.cjs.map +1 -0
  6. package/dist/{Route53Provider-DOWmFnwN.mjs → Route53Provider-DbBo7Uz5.mjs} +55 -2
  7. package/dist/Route53Provider-DbBo7Uz5.mjs.map +1 -0
  8. package/dist/{Route53Provider-xrWuBXih.cjs → Route53Provider-kfJ77LmL.cjs} +55 -2
  9. package/dist/Route53Provider-kfJ77LmL.cjs.map +1 -0
  10. package/dist/backup-provisioner-B5e-F6zX.cjs +164 -0
  11. package/dist/backup-provisioner-B5e-F6zX.cjs.map +1 -0
  12. package/dist/backup-provisioner-BIArpmTr.mjs +163 -0
  13. package/dist/backup-provisioner-BIArpmTr.mjs.map +1 -0
  14. package/dist/{config-C1dM7aZb.cjs → config-BYn5yUt5.cjs} +2 -2
  15. package/dist/{config-C1dM7aZb.cjs.map → config-BYn5yUt5.cjs.map} +1 -1
  16. package/dist/{config-C1bidhvG.mjs → config-dLNQIvDR.mjs} +2 -2
  17. package/dist/{config-C1bidhvG.mjs.map → config-dLNQIvDR.mjs.map} +1 -1
  18. package/dist/config.cjs +2 -2
  19. package/dist/config.d.cts +1 -1
  20. package/dist/config.d.mts +2 -2
  21. package/dist/config.mjs +2 -2
  22. package/dist/{dokploy-api-z0833e7r.mjs → dokploy-api-2ldYoN3i.mjs} +131 -1
  23. package/dist/dokploy-api-2ldYoN3i.mjs.map +1 -0
  24. package/dist/dokploy-api-C93pveuy.mjs +3 -0
  25. package/dist/dokploy-api-CbDh4o93.cjs +3 -0
  26. package/dist/{dokploy-api-CQvhV6Hd.cjs → dokploy-api-DLgvEQlr.cjs} +131 -1
  27. package/dist/dokploy-api-DLgvEQlr.cjs.map +1 -0
  28. package/dist/{index-DzmZ6SUW.d.cts → index-Ba21_lNt.d.cts} +157 -29
  29. package/dist/index-Ba21_lNt.d.cts.map +1 -0
  30. package/dist/{index-DvpWzLD7.d.mts → index-Bj5VNxEL.d.mts} +158 -30
  31. package/dist/index-Bj5VNxEL.d.mts.map +1 -0
  32. package/dist/index.cjs +219 -68
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.mjs +219 -68
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/{openapi-9k6a6VA4.mjs → openapi-CMTyaIJJ.mjs} +2 -2
  37. package/dist/{openapi-9k6a6VA4.mjs.map → openapi-CMTyaIJJ.mjs.map} +1 -1
  38. package/dist/{openapi-Dcja4e1C.cjs → openapi-CqblwJZ4.cjs} +2 -2
  39. package/dist/{openapi-Dcja4e1C.cjs.map → openapi-CqblwJZ4.cjs.map} +1 -1
  40. package/dist/openapi.cjs +3 -3
  41. package/dist/openapi.d.mts +1 -1
  42. package/dist/openapi.mjs +3 -3
  43. package/dist/{types-B9UZ7fOG.d.mts → types-CZg5iUgD.d.mts} +1 -1
  44. package/dist/{types-B9UZ7fOG.d.mts.map → types-CZg5iUgD.d.mts.map} +1 -1
  45. package/dist/workspace/index.cjs +1 -1
  46. package/dist/workspace/index.d.cts +1 -1
  47. package/dist/workspace/index.d.mts +2 -2
  48. package/dist/workspace/index.mjs +1 -1
  49. package/dist/{workspace-CeFgIDC-.cjs → workspace-DIMnYaYt.cjs} +20 -2
  50. package/dist/{workspace-CeFgIDC-.cjs.map → workspace-DIMnYaYt.cjs.map} +1 -1
  51. package/dist/{workspace-Cb_I7oCJ.mjs → workspace-Dy8k7Wru.mjs} +20 -2
  52. package/dist/{workspace-Cb_I7oCJ.mjs.map → workspace-Dy8k7Wru.mjs.map} +1 -1
  53. package/examples/cron-example.ts +6 -6
  54. package/examples/function-example.ts +1 -1
  55. package/package.json +7 -5
  56. package/src/deploy/__tests__/Route53Provider.spec.ts +23 -0
  57. package/src/deploy/__tests__/backup-provisioner.spec.ts +428 -0
  58. package/src/deploy/__tests__/createDnsProvider.spec.ts +23 -0
  59. package/src/deploy/__tests__/env-resolver.spec.ts +239 -0
  60. package/src/deploy/__tests__/sniffer.spec.ts +104 -93
  61. package/src/deploy/__tests__/undeploy.spec.ts +758 -0
  62. package/src/deploy/backup-provisioner.ts +316 -0
  63. package/src/deploy/dns/DnsProvider.ts +39 -1
  64. package/src/deploy/dns/HostingerProvider.ts +74 -0
  65. package/src/deploy/dns/Route53Provider.ts +85 -1
  66. package/src/deploy/dns/index.ts +25 -0
  67. package/src/deploy/dokploy-api.ts +237 -0
  68. package/src/deploy/env-resolver.ts +11 -1
  69. package/src/deploy/index.ts +143 -37
  70. package/src/deploy/sniffer.ts +39 -7
  71. package/src/deploy/state.ts +171 -0
  72. package/src/deploy/undeploy.ts +407 -0
  73. package/src/generators/FunctionGenerator.ts +1 -1
  74. package/src/init/generators/monorepo.ts +4 -0
  75. package/src/init/generators/web.ts +45 -2
  76. package/src/init/versions.ts +2 -2
  77. package/src/workspace/schema.ts +34 -0
  78. package/src/workspace/types.ts +37 -37
  79. package/dist/HostingerProvider-B9N-TKbp.mjs.map +0 -1
  80. package/dist/HostingerProvider-DUV9-Tzg.cjs.map +0 -1
  81. package/dist/Route53Provider-DOWmFnwN.mjs.map +0 -1
  82. package/dist/Route53Provider-xrWuBXih.cjs.map +0 -1
  83. package/dist/dokploy-api-CQvhV6Hd.cjs.map +0 -1
  84. package/dist/dokploy-api-CWc02yyg.cjs +0 -3
  85. package/dist/dokploy-api-DSJYNx88.mjs +0 -3
  86. package/dist/dokploy-api-z0833e7r.mjs.map +0 -1
  87. package/dist/index-DvpWzLD7.d.mts.map +0 -1
  88. package/dist/index-DzmZ6SUW.d.cts.map +0 -1
@@ -94,6 +94,12 @@ var DokployApi = class {
94
94
  });
95
95
  }
96
96
  /**
97
+ * Delete a project and all its resources
98
+ */
99
+ async deleteProject(projectId) {
100
+ await this.post("project.remove", { projectId });
101
+ }
102
+ /**
97
103
  * Create an environment in a project
98
104
  */
99
105
  async createEnvironment(projectId, name, description) {
@@ -196,6 +202,12 @@ var DokployApi = class {
196
202
  await this.post("application.deploy", { applicationId });
197
203
  }
198
204
  /**
205
+ * Delete an application
206
+ */
207
+ async deleteApplication(applicationId) {
208
+ await this.post("application.remove", { applicationId });
209
+ }
210
+ /**
199
211
  * List all registries
200
212
  */
201
213
  async listRegistries() {
@@ -323,6 +335,12 @@ var DokployApi = class {
323
335
  });
324
336
  }
325
337
  /**
338
+ * Delete a Postgres database
339
+ */
340
+ async deletePostgres(postgresId) {
341
+ await this.post("postgres.remove", { postgresId });
342
+ }
343
+ /**
326
344
  * List all Redis instances in a project
327
345
  */
328
346
  async listRedis(projectId) {
@@ -409,6 +427,12 @@ var DokployApi = class {
409
427
  });
410
428
  }
411
429
  /**
430
+ * Delete a Redis instance
431
+ */
432
+ async deleteRedis(redisId) {
433
+ await this.post("redis.remove", { redisId });
434
+ }
435
+ /**
412
436
  * Create a new domain for an application
413
437
  */
414
438
  async createDomain(options) {
@@ -461,6 +485,112 @@ var DokployApi = class {
461
485
  serverId
462
486
  });
463
487
  }
488
+ /**
489
+ * List all backup destinations
490
+ */
491
+ async listDestinations() {
492
+ return this.get("destination.all");
493
+ }
494
+ /**
495
+ * Get a destination by ID
496
+ */
497
+ async getDestination(destinationId) {
498
+ return this.get(`destination.one?destinationId=${destinationId}`);
499
+ }
500
+ /**
501
+ * Create a new S3 backup destination
502
+ */
503
+ async createDestination(options) {
504
+ return this.post("destination.create", { ...options });
505
+ }
506
+ /**
507
+ * Find a destination by name
508
+ */
509
+ async findDestinationByName(name) {
510
+ const destinations = await this.listDestinations();
511
+ return destinations.find((d) => d.name === name);
512
+ }
513
+ /**
514
+ * Find or create a destination by name
515
+ */
516
+ async findOrCreateDestination(name, options) {
517
+ const existing = await this.findDestinationByName(name);
518
+ if (existing) return {
519
+ destination: existing,
520
+ created: false
521
+ };
522
+ const destination = await this.createDestination({
523
+ name,
524
+ ...options
525
+ });
526
+ return {
527
+ destination,
528
+ created: true
529
+ };
530
+ }
531
+ /**
532
+ * Update a destination
533
+ */
534
+ async updateDestination(destinationId, updates) {
535
+ await this.post("destination.update", {
536
+ destinationId,
537
+ ...updates
538
+ });
539
+ }
540
+ /**
541
+ * Delete a destination
542
+ */
543
+ async deleteDestination(destinationId) {
544
+ await this.post("destination.remove", { destinationId });
545
+ }
546
+ /**
547
+ * Test connection to a destination
548
+ */
549
+ async testDestinationConnection(destinationId) {
550
+ return this.post("destination.testConnection", { destinationId });
551
+ }
552
+ /**
553
+ * Create a backup schedule for postgres
554
+ */
555
+ async createPostgresBackup(options) {
556
+ return this.post("backup.create", {
557
+ ...options,
558
+ databaseType: "postgres"
559
+ });
560
+ }
561
+ /**
562
+ * List backups for a postgres database
563
+ */
564
+ async listPostgresBackups(postgresId) {
565
+ return this.get(`backup.all?postgresId=${postgresId}&databaseType=postgres`);
566
+ }
567
+ /**
568
+ * Get a backup by ID
569
+ */
570
+ async getBackup(backupId) {
571
+ return this.get(`backup.one?backupId=${backupId}`);
572
+ }
573
+ /**
574
+ * Update a backup schedule
575
+ */
576
+ async updateBackup(backupId, updates) {
577
+ await this.post("backup.update", {
578
+ backupId,
579
+ ...updates
580
+ });
581
+ }
582
+ /**
583
+ * Delete a backup schedule
584
+ */
585
+ async deleteBackup(backupId) {
586
+ await this.post("backup.remove", { backupId });
587
+ }
588
+ /**
589
+ * Trigger a manual backup run
590
+ */
591
+ async runBackupManually(backupId) {
592
+ await this.post("backup.manualBackup", { backupId });
593
+ }
464
594
  };
465
595
 
466
596
  //#endregion
@@ -476,4 +606,4 @@ Object.defineProperty(exports, 'DokployApiError', {
476
606
  return DokployApiError;
477
607
  }
478
608
  });
479
- //# sourceMappingURL=dokploy-api-CQvhV6Hd.cjs.map
609
+ //# sourceMappingURL=dokploy-api-DLgvEQlr.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dokploy-api-DLgvEQlr.cjs","names":["message: string","status: number","statusText: string","issues?: Array<{ message: string }>","options: DokployApiOptions","endpoint: string","body?: Record<string, unknown>","method: 'GET' | 'POST' | 'PUT' | 'DELETE'","issues: Array<{ message: string }> | undefined","projectId: string","name: string","description?: string","environmentId: string","applicationId: string","updates: Partial<DokployApplicationUpdate>","env: string","dockerImage: string","options?: {\n\t\t\t/** Registry ID in Dokploy (for pre-configured registries) */\n\t\t\tregistryId?: string;\n\t\t\t/** Registry username (for direct auth) */\n\t\t\tusername?: string;\n\t\t\t/** Registry password (for direct auth) */\n\t\t\tpassword?: string;\n\t\t\t/** Registry URL (for direct auth, e.g., ghcr.io) */\n\t\t\tregistryUrl?: string;\n\t\t}","registryName: string","registryUrl: string","username: string","password: string","options?: {\n\t\t\timagePrefix?: string;\n\t\t}","registryId: string","updates: Partial<{\n\t\t\tregistryName: string;\n\t\t\tregistryUrl: string;\n\t\t\tusername: string;\n\t\t\tpassword: string;\n\t\t\timagePrefix: string;\n\t\t}>","options?: {\n\t\t\tappName?: string;\n\t\t\tdatabaseName?: string;\n\t\t\tdatabaseUser?: string;\n\t\t\tdatabasePassword?: string;\n\t\t\tdockerImage?: string;\n\t\t\tdescription?: string;\n\t\t}","options?: {\n\t\t\tdatabaseName?: string;\n\t\t\tdatabasePassword?: string;\n\t\t}","postgresId: string","externalPort: number | null","updates: Partial<DokployPostgresUpdate>","options?: {\n\t\t\tappName?: string;\n\t\t\tdatabasePassword?: string;\n\t\t\tdockerImage?: string;\n\t\t\tdescription?: string;\n\t\t}","options?: {\n\t\t\tdatabasePassword?: string;\n\t\t}","redisId: string","updates: Partial<DokployRedisUpdate>","options: DokployDomainCreate","domainId: string","updates: Partial<DokployDomainCreate>","domain: string","appName: string","serverId?: string","destinationId: string","options: DokployDestinationCreate","options: Omit<DokployDestinationCreate, 'name'>","updates: Partial<DokployDestinationCreate>","options: DokployBackupCreate","backupId: string","updates: Partial<DokployBackupUpdate>"],"sources":["../src/deploy/dokploy-api.ts"],"sourcesContent":["/**\n * Centralized Dokploy API client\n *\n * Handles authentication, error handling, and provides typed methods for all Dokploy API endpoints.\n */\n\nexport interface DokployApiOptions {\n\t/** Dokploy server URL (e.g., https://dokploy.example.com) */\n\tbaseUrl: string;\n\t/** API token for authentication */\n\ttoken: string;\n}\n\nexport interface DokployErrorResponse {\n\tmessage?: string;\n\tissues?: Array<{ message: string }>;\n}\n\nexport class DokployApiError extends Error {\n\tconstructor(\n\t\tmessage: string,\n\t\tpublic status: number,\n\t\tpublic statusText: string,\n\t\tpublic issues?: Array<{ message: string }>,\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'DokployApiError';\n\t}\n}\n\n/**\n * Dokploy API client\n */\nexport class DokployApi {\n\tprivate baseUrl: string;\n\tprivate token: string;\n\n\tconstructor(options: DokployApiOptions) {\n\t\tthis.baseUrl = options.baseUrl.replace(/\\/$/, ''); // Remove trailing slash\n\t\tthis.token = options.token;\n\t}\n\n\t/**\n\t * Make a GET request to the Dokploy API\n\t */\n\tasync get<T>(endpoint: string): Promise<T> {\n\t\treturn this.request<T>('GET', endpoint);\n\t}\n\n\t/**\n\t * Make a POST request to the Dokploy API\n\t */\n\tasync post<T>(endpoint: string, body?: Record<string, unknown>): Promise<T> {\n\t\treturn this.request<T>('POST', endpoint, body);\n\t}\n\n\t/**\n\t * Make a request to the Dokploy API\n\t */\n\tprivate async request<T>(\n\t\tmethod: 'GET' | 'POST' | 'PUT' | 'DELETE',\n\t\tendpoint: string,\n\t\tbody?: Record<string, unknown>,\n\t): Promise<T> {\n\t\tconst url = `${this.baseUrl}/api/${endpoint}`;\n\n\t\tconst response = await fetch(url, {\n\t\t\tmethod,\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t'x-api-key': this.token,\n\t\t\t},\n\t\t\tbody: body ? JSON.stringify(body) : undefined,\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tlet errorMessage = `Dokploy API error: ${response.status} ${response.statusText}`;\n\t\t\tlet issues: Array<{ message: string }> | undefined;\n\n\t\t\ttry {\n\t\t\t\tconst errorBody = (await response.json()) as DokployErrorResponse;\n\t\t\t\tif (errorBody.message) {\n\t\t\t\t\terrorMessage = `Dokploy API error: ${errorBody.message}`;\n\t\t\t\t}\n\t\t\t\tif (errorBody.issues?.length) {\n\t\t\t\t\tissues = errorBody.issues;\n\t\t\t\t\terrorMessage += `\\n Issues: ${errorBody.issues.map((i) => i.message).join(', ')}`;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// Ignore JSON parse errors\n\t\t\t}\n\n\t\t\tthrow new DokployApiError(\n\t\t\t\terrorMessage,\n\t\t\t\tresponse.status,\n\t\t\t\tresponse.statusText,\n\t\t\t\tissues,\n\t\t\t);\n\t\t}\n\n\t\t// Handle empty responses (204 No Content or empty body)\n\t\tconst text = await response.text();\n\t\tif (!text || text.trim() === '') {\n\t\t\treturn undefined as T;\n\t\t}\n\t\treturn JSON.parse(text) as T;\n\t}\n\n\t/**\n\t * Validate the API token by making a test request\n\t */\n\tasync validateToken(): Promise<boolean> {\n\t\ttry {\n\t\t\tawait this.get('project.all');\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// ============================================\n\t// Project endpoints\n\t// ============================================\n\n\t/**\n\t * List all projects\n\t */\n\tasync listProjects(): Promise<DokployProject[]> {\n\t\treturn this.get<DokployProject[]>('project.all');\n\t}\n\n\t/**\n\t * Get a single project by ID\n\t */\n\tasync getProject(projectId: string): Promise<DokployProjectDetails> {\n\t\treturn this.get<DokployProjectDetails>(\n\t\t\t`project.one?projectId=${projectId}`,\n\t\t);\n\t}\n\n\t/**\n\t * Create a new project\n\t */\n\tasync createProject(\n\t\tname: string,\n\t\tdescription?: string,\n\t): Promise<{ project: DokployProject; environment: DokployEnvironment }> {\n\t\treturn this.post<{\n\t\t\tproject: DokployProject;\n\t\t\tenvironment: DokployEnvironment;\n\t\t}>('project.create', {\n\t\t\tname,\n\t\t\tdescription: description ?? `Created by gkm CLI`,\n\t\t});\n\t}\n\n\t/**\n\t * Delete a project and all its resources\n\t */\n\tasync deleteProject(projectId: string): Promise<void> {\n\t\tawait this.post('project.remove', { projectId });\n\t}\n\n\t// ============================================\n\t// Environment endpoints\n\t// ============================================\n\n\t/**\n\t * Create an environment in a project\n\t */\n\tasync createEnvironment(\n\t\tprojectId: string,\n\t\tname: string,\n\t\tdescription?: string,\n\t): Promise<DokployEnvironment> {\n\t\treturn this.post<DokployEnvironment>('environment.create', {\n\t\t\tprojectId,\n\t\t\tname,\n\t\t\tdescription: description ?? `${name} environment`,\n\t\t});\n\t}\n\n\t// ============================================\n\t// Application endpoints\n\t// ============================================\n\n\t/**\n\t * List all applications in a project\n\t */\n\tasync listApplications(projectId: string): Promise<DokployApplication[]> {\n\t\ttry {\n\t\t\treturn await this.get<DokployApplication[]>(\n\t\t\t\t`application.all?projectId=${projectId}`,\n\t\t\t);\n\t\t} catch {\n\t\t\t// Fallback: endpoint might not exist in older Dokploy versions\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * Find an application by name in a project\n\t */\n\tasync findApplicationByName(\n\t\tprojectId: string,\n\t\tname: string,\n\t): Promise<DokployApplication | undefined> {\n\t\tconst applications = await this.listApplications(projectId);\n\t\tconst normalizedName = name.toLowerCase().replace(/[^a-z0-9-]/g, '-');\n\t\treturn applications.find(\n\t\t\t(app) => app.name === name || app.appName === normalizedName,\n\t\t);\n\t}\n\n\t/**\n\t * Create a new application\n\t */\n\tasync createApplication(\n\t\tname: string,\n\t\tprojectId: string,\n\t\tenvironmentId: string,\n\t): Promise<DokployApplication> {\n\t\treturn this.post<DokployApplication>('application.create', {\n\t\t\tname,\n\t\t\tprojectId,\n\t\t\tenvironmentId,\n\t\t\tappName: name.toLowerCase().replace(/[^a-z0-9-]/g, '-'),\n\t\t});\n\t}\n\n\t/**\n\t * Find or create an application by name\n\t */\n\tasync findOrCreateApplication(\n\t\tname: string,\n\t\tprojectId: string,\n\t\tenvironmentId: string,\n\t): Promise<{ application: DokployApplication; created: boolean }> {\n\t\tconst existing = await this.findApplicationByName(projectId, name);\n\t\tif (existing) {\n\t\t\treturn { application: existing, created: false };\n\t\t}\n\t\tconst application = await this.createApplication(\n\t\t\tname,\n\t\t\tprojectId,\n\t\t\tenvironmentId,\n\t\t);\n\t\treturn { application, created: true };\n\t}\n\n\t/**\n\t * Get an application by ID\n\t */\n\tasync getApplication(\n\t\tapplicationId: string,\n\t): Promise<DokployApplication | null> {\n\t\ttry {\n\t\t\treturn await this.get<DokployApplication>(\n\t\t\t\t`application.one?applicationId=${applicationId}`,\n\t\t\t);\n\t\t} catch {\n\t\t\t// Application not found\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Update an application\n\t */\n\tasync updateApplication(\n\t\tapplicationId: string,\n\t\tupdates: Partial<DokployApplicationUpdate>,\n\t): Promise<void> {\n\t\tawait this.post('application.update', {\n\t\t\tapplicationId,\n\t\t\t...updates,\n\t\t});\n\t}\n\n\t/**\n\t * Save environment variables for an application\n\t */\n\tasync saveApplicationEnv(applicationId: string, env: string): Promise<void> {\n\t\tawait this.post('application.saveEnvironment', {\n\t\t\tapplicationId,\n\t\t\tenv,\n\t\t});\n\t}\n\n\t/**\n\t * Configure application to use Docker provider (pull from registry)\n\t *\n\t * For private registries, either:\n\t * - Use `registryId` if the registry is configured in Dokploy\n\t * - Or provide `username`, `password`, and `registryUrl` directly\n\t */\n\tasync saveDockerProvider(\n\t\tapplicationId: string,\n\t\tdockerImage: string,\n\t\toptions?: {\n\t\t\t/** Registry ID in Dokploy (for pre-configured registries) */\n\t\t\tregistryId?: string;\n\t\t\t/** Registry username (for direct auth) */\n\t\t\tusername?: string;\n\t\t\t/** Registry password (for direct auth) */\n\t\t\tpassword?: string;\n\t\t\t/** Registry URL (for direct auth, e.g., ghcr.io) */\n\t\t\tregistryUrl?: string;\n\t\t},\n\t): Promise<void> {\n\t\tawait this.post('application.saveDockerProvider', {\n\t\t\tapplicationId,\n\t\t\tdockerImage,\n\t\t\t...options,\n\t\t});\n\t}\n\n\t/**\n\t * Deploy an application\n\t */\n\tasync deployApplication(applicationId: string): Promise<void> {\n\t\tawait this.post('application.deploy', { applicationId });\n\t}\n\n\t/**\n\t * Delete an application\n\t */\n\tasync deleteApplication(applicationId: string): Promise<void> {\n\t\tawait this.post('application.remove', { applicationId });\n\t}\n\n\t// ============================================\n\t// Registry endpoints\n\t// ============================================\n\n\t/**\n\t * List all registries\n\t */\n\tasync listRegistries(): Promise<DokployRegistry[]> {\n\t\treturn this.get<DokployRegistry[]>('registry.all');\n\t}\n\n\t/**\n\t * Create a new registry\n\t */\n\tasync createRegistry(\n\t\tregistryName: string,\n\t\tregistryUrl: string,\n\t\tusername: string,\n\t\tpassword: string,\n\t\toptions?: {\n\t\t\timagePrefix?: string;\n\t\t},\n\t): Promise<DokployRegistry> {\n\t\treturn this.post<DokployRegistry>('registry.create', {\n\t\t\tregistryName,\n\t\t\tregistryUrl,\n\t\t\tusername,\n\t\t\tpassword,\n\t\t\timagePrefix: options?.imagePrefix,\n\t\t});\n\t}\n\n\t/**\n\t * Get a registry by ID\n\t */\n\tasync getRegistry(registryId: string): Promise<DokployRegistry> {\n\t\treturn this.get<DokployRegistry>(`registry.one?registryId=${registryId}`);\n\t}\n\n\t/**\n\t * Update a registry\n\t */\n\tasync updateRegistry(\n\t\tregistryId: string,\n\t\tupdates: Partial<{\n\t\t\tregistryName: string;\n\t\t\tregistryUrl: string;\n\t\t\tusername: string;\n\t\t\tpassword: string;\n\t\t\timagePrefix: string;\n\t\t}>,\n\t): Promise<void> {\n\t\tawait this.post('registry.update', { registryId, ...updates });\n\t}\n\n\t/**\n\t * Delete a registry\n\t */\n\tasync deleteRegistry(registryId: string): Promise<void> {\n\t\tawait this.post('registry.remove', { registryId });\n\t}\n\n\t// ============================================\n\t// Postgres endpoints\n\t// ============================================\n\n\t/**\n\t * List all Postgres databases in a project\n\t */\n\tasync listPostgres(projectId: string): Promise<DokployPostgres[]> {\n\t\ttry {\n\t\t\treturn await this.get<DokployPostgres[]>(\n\t\t\t\t`postgres.all?projectId=${projectId}`,\n\t\t\t);\n\t\t} catch {\n\t\t\t// Fallback: endpoint might not exist in older Dokploy versions\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * Find a Postgres database by name in a project\n\t */\n\tasync findPostgresByName(\n\t\tprojectId: string,\n\t\tname: string,\n\t): Promise<DokployPostgres | undefined> {\n\t\tconst databases = await this.listPostgres(projectId);\n\t\tconst normalizedName = name.toLowerCase().replace(/[^a-z0-9-]/g, '-');\n\t\treturn databases.find(\n\t\t\t(db) => db.name === name || db.appName === normalizedName,\n\t\t);\n\t}\n\n\t/**\n\t * Create a new Postgres database\n\t */\n\tasync createPostgres(\n\t\tname: string,\n\t\tprojectId: string,\n\t\tenvironmentId: string,\n\t\toptions?: {\n\t\t\tappName?: string;\n\t\t\tdatabaseName?: string;\n\t\t\tdatabaseUser?: string;\n\t\t\tdatabasePassword?: string;\n\t\t\tdockerImage?: string;\n\t\t\tdescription?: string;\n\t\t},\n\t): Promise<DokployPostgres> {\n\t\treturn this.post<DokployPostgres>('postgres.create', {\n\t\t\tname,\n\t\t\tprojectId,\n\t\t\tenvironmentId,\n\t\t\tappName:\n\t\t\t\toptions?.appName ?? name.toLowerCase().replace(/[^a-z0-9-]/g, '-'),\n\t\t\tdatabaseName: options?.databaseName,\n\t\t\tdatabaseUser: options?.databaseUser ?? 'postgres',\n\t\t\tdatabasePassword: options?.databasePassword,\n\t\t\tdockerImage: options?.dockerImage ?? 'postgres:18',\n\t\t\tdescription: options?.description ?? `Postgres database for ${name}`,\n\t\t});\n\t}\n\n\t/**\n\t * Find or create a Postgres database by name\n\t */\n\tasync findOrCreatePostgres(\n\t\tname: string,\n\t\tprojectId: string,\n\t\tenvironmentId: string,\n\t\toptions?: {\n\t\t\tdatabaseName?: string;\n\t\t\tdatabasePassword?: string;\n\t\t},\n\t): Promise<{ postgres: DokployPostgres; created: boolean }> {\n\t\tconst existing = await this.findPostgresByName(projectId, name);\n\t\tif (existing) {\n\t\t\treturn { postgres: existing, created: false };\n\t\t}\n\t\tconst postgres = await this.createPostgres(\n\t\t\tname,\n\t\t\tprojectId,\n\t\t\tenvironmentId,\n\t\t\toptions,\n\t\t);\n\t\treturn { postgres, created: true };\n\t}\n\n\t/**\n\t * Get a Postgres database by ID\n\t */\n\tasync getPostgres(postgresId: string): Promise<DokployPostgres> {\n\t\treturn this.get<DokployPostgres>(`postgres.one?postgresId=${postgresId}`);\n\t}\n\n\t/**\n\t * Deploy a Postgres database\n\t */\n\tasync deployPostgres(postgresId: string): Promise<void> {\n\t\tawait this.post('postgres.deploy', { postgresId });\n\t}\n\n\t/**\n\t * Save environment variables for Postgres\n\t */\n\tasync savePostgresEnv(postgresId: string, env: string): Promise<void> {\n\t\tawait this.post('postgres.saveEnvironment', { postgresId, env });\n\t}\n\n\t/**\n\t * Set external port for Postgres (for external access)\n\t */\n\tasync savePostgresExternalPort(\n\t\tpostgresId: string,\n\t\texternalPort: number | null,\n\t): Promise<void> {\n\t\tawait this.post('postgres.saveExternalPort', { postgresId, externalPort });\n\t}\n\n\t/**\n\t * Update Postgres configuration\n\t */\n\tasync updatePostgres(\n\t\tpostgresId: string,\n\t\tupdates: Partial<DokployPostgresUpdate>,\n\t): Promise<void> {\n\t\tawait this.post('postgres.update', { postgresId, ...updates });\n\t}\n\n\t/**\n\t * Delete a Postgres database\n\t */\n\tasync deletePostgres(postgresId: string): Promise<void> {\n\t\tawait this.post('postgres.remove', { postgresId });\n\t}\n\n\t// ============================================\n\t// Redis endpoints\n\t// ============================================\n\n\t/**\n\t * List all Redis instances in a project\n\t */\n\tasync listRedis(projectId: string): Promise<DokployRedis[]> {\n\t\ttry {\n\t\t\treturn await this.get<DokployRedis[]>(`redis.all?projectId=${projectId}`);\n\t\t} catch {\n\t\t\t// Fallback: endpoint might not exist in older Dokploy versions\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * Find a Redis instance by name in a project\n\t */\n\tasync findRedisByName(\n\t\tprojectId: string,\n\t\tname: string,\n\t): Promise<DokployRedis | undefined> {\n\t\tconst instances = await this.listRedis(projectId);\n\t\tconst normalizedName = name.toLowerCase().replace(/[^a-z0-9-]/g, '-');\n\t\treturn instances.find(\n\t\t\t(redis) => redis.name === name || redis.appName === normalizedName,\n\t\t);\n\t}\n\n\t/**\n\t * Create a new Redis instance\n\t */\n\tasync createRedis(\n\t\tname: string,\n\t\tprojectId: string,\n\t\tenvironmentId: string,\n\t\toptions?: {\n\t\t\tappName?: string;\n\t\t\tdatabasePassword?: string;\n\t\t\tdockerImage?: string;\n\t\t\tdescription?: string;\n\t\t},\n\t): Promise<DokployRedis> {\n\t\treturn this.post<DokployRedis>('redis.create', {\n\t\t\tname,\n\t\t\tprojectId,\n\t\t\tenvironmentId,\n\t\t\tappName:\n\t\t\t\toptions?.appName ?? name.toLowerCase().replace(/[^a-z0-9-]/g, '-'),\n\t\t\tdatabasePassword: options?.databasePassword,\n\t\t\tdockerImage: options?.dockerImage ?? 'redis:8',\n\t\t\tdescription: options?.description ?? `Redis instance for ${name}`,\n\t\t});\n\t}\n\n\t/**\n\t * Find or create a Redis instance by name\n\t */\n\tasync findOrCreateRedis(\n\t\tname: string,\n\t\tprojectId: string,\n\t\tenvironmentId: string,\n\t\toptions?: {\n\t\t\tdatabasePassword?: string;\n\t\t},\n\t): Promise<{ redis: DokployRedis; created: boolean }> {\n\t\tconst existing = await this.findRedisByName(projectId, name);\n\t\tif (existing) {\n\t\t\treturn { redis: existing, created: false };\n\t\t}\n\t\tconst redis = await this.createRedis(\n\t\t\tname,\n\t\t\tprojectId,\n\t\t\tenvironmentId,\n\t\t\toptions,\n\t\t);\n\t\treturn { redis, created: true };\n\t}\n\n\t/**\n\t * Get a Redis instance by ID\n\t */\n\tasync getRedis(redisId: string): Promise<DokployRedis> {\n\t\treturn this.get<DokployRedis>(`redis.one?redisId=${redisId}`);\n\t}\n\n\t/**\n\t * Deploy a Redis instance\n\t */\n\tasync deployRedis(redisId: string): Promise<void> {\n\t\tawait this.post('redis.deploy', { redisId });\n\t}\n\n\t/**\n\t * Save environment variables for Redis\n\t */\n\tasync saveRedisEnv(redisId: string, env: string): Promise<void> {\n\t\tawait this.post('redis.saveEnvironment', { redisId, env });\n\t}\n\n\t/**\n\t * Set external port for Redis (for external access)\n\t */\n\tasync saveRedisExternalPort(\n\t\tredisId: string,\n\t\texternalPort: number | null,\n\t): Promise<void> {\n\t\tawait this.post('redis.saveExternalPort', { redisId, externalPort });\n\t}\n\n\t/**\n\t * Update Redis configuration\n\t */\n\tasync updateRedis(\n\t\tredisId: string,\n\t\tupdates: Partial<DokployRedisUpdate>,\n\t): Promise<void> {\n\t\tawait this.post('redis.update', { redisId, ...updates });\n\t}\n\n\t/**\n\t * Delete a Redis instance\n\t */\n\tasync deleteRedis(redisId: string): Promise<void> {\n\t\tawait this.post('redis.remove', { redisId });\n\t}\n\n\t// ============================================\n\t// Domain endpoints\n\t// ============================================\n\n\t/**\n\t * Create a new domain for an application\n\t */\n\tasync createDomain(options: DokployDomainCreate): Promise<DokployDomain> {\n\t\treturn this.post<DokployDomain>(\n\t\t\t'domain.create',\n\t\t\toptions as unknown as Record<string, unknown>,\n\t\t);\n\t}\n\n\t/**\n\t * Update an existing domain\n\t */\n\tasync updateDomain(\n\t\tdomainId: string,\n\t\tupdates: Partial<DokployDomainCreate>,\n\t): Promise<void> {\n\t\tawait this.post('domain.update', { domainId, ...updates });\n\t}\n\n\t/**\n\t * Delete a domain\n\t */\n\tasync deleteDomain(domainId: string): Promise<void> {\n\t\tawait this.post('domain.delete', { domainId });\n\t}\n\n\t/**\n\t * Get a domain by ID\n\t */\n\tasync getDomain(domainId: string): Promise<DokployDomain> {\n\t\treturn this.get<DokployDomain>(`domain.one?domainId=${domainId}`);\n\t}\n\n\t/**\n\t * Get all domains for an application\n\t */\n\tasync getDomainsByApplicationId(\n\t\tapplicationId: string,\n\t): Promise<DokployDomain[]> {\n\t\treturn this.get<DokployDomain[]>(\n\t\t\t`domain.byApplicationId?applicationId=${applicationId}`,\n\t\t);\n\t}\n\n\t/**\n\t * Validate a domain and trigger SSL certificate generation\n\t *\n\t * This should be called after DNS records are created and propagated.\n\t * It triggers Let's Encrypt certificate generation for HTTPS domains.\n\t *\n\t * @param domain - The domain hostname to validate (e.g., 'api.example.com')\n\t */\n\tasync validateDomain(\n\t\tdomain: string,\n\t): Promise<{ isValid: boolean; resolvedIp: string }> {\n\t\treturn this.post<{ isValid: boolean; resolvedIp: string }>(\n\t\t\t'domain.validateDomain',\n\t\t\t{ domain },\n\t\t);\n\t}\n\n\t/**\n\t * Auto-generate a domain name for an application\n\t */\n\tasync generateDomain(\n\t\tappName: string,\n\t\tserverId?: string,\n\t): Promise<{ domain: string }> {\n\t\treturn this.post<{ domain: string }>('domain.generateDomain', {\n\t\t\tappName,\n\t\t\tserverId,\n\t\t});\n\t}\n\n\t// ============================================\n\t// Destination endpoints (backup storage)\n\t// ============================================\n\n\t/**\n\t * List all backup destinations\n\t */\n\tasync listDestinations(): Promise<DokployDestination[]> {\n\t\treturn this.get<DokployDestination[]>('destination.all');\n\t}\n\n\t/**\n\t * Get a destination by ID\n\t */\n\tasync getDestination(destinationId: string): Promise<DokployDestination> {\n\t\treturn this.get<DokployDestination>(\n\t\t\t`destination.one?destinationId=${destinationId}`,\n\t\t);\n\t}\n\n\t/**\n\t * Create a new S3 backup destination\n\t */\n\tasync createDestination(\n\t\toptions: DokployDestinationCreate,\n\t): Promise<DokployDestination> {\n\t\treturn this.post<DokployDestination>('destination.create', { ...options });\n\t}\n\n\t/**\n\t * Find a destination by name\n\t */\n\tasync findDestinationByName(\n\t\tname: string,\n\t): Promise<DokployDestination | undefined> {\n\t\tconst destinations = await this.listDestinations();\n\t\treturn destinations.find((d) => d.name === name);\n\t}\n\n\t/**\n\t * Find or create a destination by name\n\t */\n\tasync findOrCreateDestination(\n\t\tname: string,\n\t\toptions: Omit<DokployDestinationCreate, 'name'>,\n\t): Promise<{ destination: DokployDestination; created: boolean }> {\n\t\tconst existing = await this.findDestinationByName(name);\n\t\tif (existing) {\n\t\t\treturn { destination: existing, created: false };\n\t\t}\n\t\tconst destination = await this.createDestination({ name, ...options });\n\t\treturn { destination, created: true };\n\t}\n\n\t/**\n\t * Update a destination\n\t */\n\tasync updateDestination(\n\t\tdestinationId: string,\n\t\tupdates: Partial<DokployDestinationCreate>,\n\t): Promise<void> {\n\t\tawait this.post('destination.update', { destinationId, ...updates });\n\t}\n\n\t/**\n\t * Delete a destination\n\t */\n\tasync deleteDestination(destinationId: string): Promise<void> {\n\t\tawait this.post('destination.remove', { destinationId });\n\t}\n\n\t/**\n\t * Test connection to a destination\n\t */\n\tasync testDestinationConnection(\n\t\tdestinationId: string,\n\t): Promise<{ success: boolean }> {\n\t\treturn this.post<{ success: boolean }>('destination.testConnection', {\n\t\t\tdestinationId,\n\t\t});\n\t}\n\n\t// ============================================\n\t// Backup endpoints (scheduled backups)\n\t// ============================================\n\n\t/**\n\t * Create a backup schedule for postgres\n\t */\n\tasync createPostgresBackup(\n\t\toptions: DokployBackupCreate,\n\t): Promise<DokployBackup> {\n\t\treturn this.post<DokployBackup>('backup.create', {\n\t\t\t...options,\n\t\t\tdatabaseType: 'postgres',\n\t\t});\n\t}\n\n\t/**\n\t * List backups for a postgres database\n\t */\n\tasync listPostgresBackups(postgresId: string): Promise<DokployBackup[]> {\n\t\treturn this.get<DokployBackup[]>(\n\t\t\t`backup.all?postgresId=${postgresId}&databaseType=postgres`,\n\t\t);\n\t}\n\n\t/**\n\t * Get a backup by ID\n\t */\n\tasync getBackup(backupId: string): Promise<DokployBackup> {\n\t\treturn this.get<DokployBackup>(`backup.one?backupId=${backupId}`);\n\t}\n\n\t/**\n\t * Update a backup schedule\n\t */\n\tasync updateBackup(\n\t\tbackupId: string,\n\t\tupdates: Partial<DokployBackupUpdate>,\n\t): Promise<void> {\n\t\tawait this.post('backup.update', { backupId, ...updates });\n\t}\n\n\t/**\n\t * Delete a backup schedule\n\t */\n\tasync deleteBackup(backupId: string): Promise<void> {\n\t\tawait this.post('backup.remove', { backupId });\n\t}\n\n\t/**\n\t * Trigger a manual backup run\n\t */\n\tasync runBackupManually(backupId: string): Promise<void> {\n\t\tawait this.post('backup.manualBackup', { backupId });\n\t}\n}\n\n// ============================================\n// Type definitions for Dokploy API responses\n// ============================================\n\nexport interface DokployProject {\n\tprojectId: string;\n\tname: string;\n\tdescription: string | null;\n\tcreatedAt?: string;\n\tadminId?: string;\n}\n\nexport interface DokployEnvironment {\n\tenvironmentId: string;\n\tname: string;\n\tdescription: string | null;\n}\n\nexport interface DokployProjectDetails extends DokployProject {\n\tenvironments: DokployEnvironment[];\n}\n\nexport interface DokployApplication {\n\tapplicationId: string;\n\tname: string;\n\tappName: string;\n\tprojectId: string;\n\tenvironmentId?: string;\n}\n\nexport interface DokployApplicationUpdate {\n\tregistryId: string;\n\tdockerImage: string;\n\tsourceType: 'docker';\n}\n\nexport interface DokployRegistry {\n\tregistryId: string;\n\tregistryName: string;\n\tregistryUrl: string;\n\tusername: string;\n\timagePrefix: string | null;\n}\n\nexport interface DokployPostgres {\n\tpostgresId: string;\n\tname: string;\n\tappName: string;\n\tdatabaseName: string;\n\tdatabaseUser: string;\n\tdatabasePassword: string;\n\tdockerImage: string;\n\tdescription: string | null;\n\tprojectId: string;\n\tenvironmentId: string;\n\tapplicationStatus: 'idle' | 'running' | 'done' | 'error';\n\texternalPort: number | null;\n\tcreatedAt?: string;\n}\n\nexport interface DokployPostgresUpdate {\n\tname: string;\n\tappName: string;\n\tdatabaseName: string;\n\tdatabaseUser: string;\n\tdatabasePassword: string;\n\tdockerImage: string;\n\tdescription: string;\n}\n\nexport interface DokployRedis {\n\tredisId: string;\n\tname: string;\n\tappName: string;\n\tdatabasePassword: string;\n\tdockerImage: string;\n\tdescription: string | null;\n\tprojectId: string;\n\tenvironmentId: string;\n\tapplicationStatus: 'idle' | 'running' | 'done' | 'error';\n\texternalPort: number | null;\n\tcreatedAt?: string;\n}\n\nexport interface DokployRedisUpdate {\n\tname: string;\n\tappName: string;\n\tdatabasePassword: string;\n\tdockerImage: string;\n\tdescription: string;\n}\n\nexport type DokployCertificateType = 'letsencrypt' | 'none' | 'custom';\nexport type DokployDomainType = 'application' | 'compose' | 'preview';\n\nexport interface DokployDomainCreate {\n\t/** Domain hostname (e.g., 'api.example.com') */\n\thost: string;\n\t/** URL path (optional, e.g., '/api') */\n\tpath?: string | null;\n\t/** Container port to route to (1-65535) */\n\tport?: number | null;\n\t/** Enable HTTPS */\n\thttps?: boolean;\n\t/** Associated application ID */\n\tapplicationId?: string | null;\n\t/** Certificate type for HTTPS */\n\tcertificateType?: DokployCertificateType;\n\t/** Custom certificate resolver name */\n\tcustomCertResolver?: string | null;\n\t/** Docker Compose service ID */\n\tcomposeId?: string | null;\n\t/** Service name for compose */\n\tserviceName?: string | null;\n\t/** Domain type */\n\tdomainType?: DokployDomainType | null;\n\t/** Preview deployment ID */\n\tpreviewDeploymentId?: string | null;\n\t/** Internal routing path */\n\tinternalPath?: string | null;\n\t/** Strip path from forwarded requests */\n\tstripPath?: boolean;\n}\n\nexport interface DokployDomain extends DokployDomainCreate {\n\tdomainId: string;\n\tcreatedAt?: string;\n}\n\n// ============================================\n// Destination types (backup storage)\n// ============================================\n\nexport interface DokployDestination {\n\tdestinationId: string;\n\tname: string;\n\taccessKey: string;\n\tbucket: string;\n\tregion: string;\n\tendpoint: string | null;\n\tcreatedAt?: string;\n}\n\nexport interface DokployDestinationCreate {\n\t/** User-friendly name for the destination */\n\tname: string;\n\t/** S3 access key ID */\n\taccessKey: string;\n\t/** S3 secret access key */\n\tsecretAccessKey: string;\n\t/** S3 bucket name */\n\tbucket: string;\n\t/** AWS region (e.g., 'us-east-1') */\n\tregion: string;\n\t/** Optional endpoint for S3-compatible services */\n\tendpoint?: string;\n}\n\n// ============================================\n// Backup types (scheduled backups)\n// ============================================\n\nexport type DokployDatabaseType = 'postgres' | 'mysql' | 'mariadb' | 'mongo';\n\nexport interface DokployBackup {\n\tbackupId: string;\n\tschedule: string;\n\tprefix: string;\n\tenabled: boolean;\n\tdestinationId: string;\n\tpostgresId?: string;\n\tdatabaseType: DokployDatabaseType;\n\tkeepLatestCount: number | null;\n\tcreatedAt?: string;\n}\n\nexport interface DokployBackupCreate {\n\t/** Cron schedule (e.g., '0 2 * * *' for 2 AM daily) */\n\tschedule: string;\n\t/** Backup file prefix (e.g., 'production/postgres') */\n\tprefix: string;\n\t/** Destination ID for backup storage */\n\tdestinationId: string;\n\t/** Database name to backup */\n\tdatabase: string;\n\t/** Postgres instance ID */\n\tpostgresId: string;\n\t/** Enable/disable backup (default: true) */\n\tenabled?: boolean;\n\t/** Number of backups to keep (default: keep all) */\n\tkeepLatestCount?: number;\n}\n\nexport interface DokployBackupUpdate {\n\tschedule?: string;\n\tprefix?: string;\n\tenabled?: boolean;\n\tkeepLatestCount?: number;\n}\n\n/**\n * Create a Dokploy API client from stored credentials or environment\n */\nexport async function createDokployApi(\n\tendpoint?: string,\n): Promise<DokployApi | null> {\n\tconst { getDokployCredentials } = await import('../auth/credentials');\n\n\t// Try environment variable first\n\tconst envToken = process.env.DOKPLOY_API_TOKEN;\n\tconst envEndpoint = endpoint || process.env.DOKPLOY_ENDPOINT;\n\n\tif (envToken && envEndpoint) {\n\t\treturn new DokployApi({ baseUrl: envEndpoint, token: envToken });\n\t}\n\n\t// Fall back to stored credentials\n\tconst creds = await getDokployCredentials();\n\tif (creds) {\n\t\treturn new DokployApi({\n\t\t\tbaseUrl: endpoint || creds.endpoint,\n\t\t\ttoken: creds.token,\n\t\t});\n\t}\n\n\treturn null;\n}\n"],"mappings":";;AAkBA,IAAa,kBAAb,cAAqC,MAAM;CAC1C,YACCA,SACOC,QACAC,YACAC,QACN;AACD,QAAM,QAAQ;EAJP;EACA;EACA;AAG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ChD;;;;CAKD,MAAM,wBACLA,MACAgC,SACiE;EACjE,MAAM,WAAW,MAAM,KAAK,sBAAsB,KAAK;AACvD,MAAI,SACH,QAAO;GAAE,aAAa;GAAU,SAAS;EAAO;EAEjD,MAAM,cAAc,MAAM,KAAK,kBAAkB;GAAE;GAAM,GAAG;EAAS,EAAC;AACtE,SAAO;GAAE;GAAa,SAAS;EAAM;CACrC;;;;CAKD,MAAM,kBACLF,eACAG,SACgB;AAChB,QAAM,KAAK,KAAK,sBAAsB;GAAE;GAAe,GAAG;EAAS,EAAC;CACpE;;;;CAKD,MAAM,kBAAkBH,eAAsC;AAC7D,QAAM,KAAK,KAAK,sBAAsB,EAAE,cAAe,EAAC;CACxD;;;;CAKD,MAAM,0BACLA,eACgC;AAChC,SAAO,KAAK,KAA2B,8BAA8B,EACpE,cACA,EAAC;CACF;;;;CASD,MAAM,qBACLI,SACyB;AACzB,SAAO,KAAK,KAAoB,iBAAiB;GAChD,GAAG;GACH,cAAc;EACd,EAAC;CACF;;;;CAKD,MAAM,oBAAoBjB,YAA8C;AACvE,SAAO,KAAK,KACV,wBAAwB,WAAW,wBACpC;CACD;;;;CAKD,MAAM,UAAUkB,UAA0C;AACzD,SAAO,KAAK,KAAoB,sBAAsB,SAAS,EAAE;CACjE;;;;CAKD,MAAM,aACLA,UACAC,SACgB;AAChB,QAAM,KAAK,KAAK,iBAAiB;GAAE;GAAU,GAAG;EAAS,EAAC;CAC1D;;;;CAKD,MAAM,aAAaD,UAAiC;AACnD,QAAM,KAAK,KAAK,iBAAiB,EAAE,SAAU,EAAC;CAC9C;;;;CAKD,MAAM,kBAAkBA,UAAiC;AACxD,QAAM,KAAK,KAAK,uBAAuB,EAAE,SAAU,EAAC;CACpD;AACD"}
@@ -23,6 +23,46 @@ interface DnsVerificationRecord {
23
23
  serverIp: string;
24
24
  verifiedAt: string;
25
25
  }
26
+ /**
27
+ * A DNS record that was created during deploy
28
+ */
29
+ interface CreatedDnsRecord {
30
+ /** The domain this record belongs to (e.g., 'example.com') */
31
+ domain: string;
32
+ /** Record name/subdomain (e.g., 'api' or '@' for root) */
33
+ name: string;
34
+ /** Record type (A, CNAME, etc.) */
35
+ type: string;
36
+ /** Record value (IP address, hostname, etc.) */
37
+ value: string;
38
+ /** TTL in seconds */
39
+ ttl: number;
40
+ /** When this record was created */
41
+ createdAt: string;
42
+ }
43
+ /**
44
+ * Backup destination state
45
+ */
46
+ interface BackupState {
47
+ /** S3 bucket name for backups */
48
+ bucketName: string;
49
+ /** S3 bucket ARN */
50
+ bucketArn: string;
51
+ /** IAM user name created for backup access */
52
+ iamUserName: string;
53
+ /** IAM access key ID */
54
+ iamAccessKeyId: string;
55
+ /** IAM secret access key */
56
+ iamSecretAccessKey: string;
57
+ /** Dokploy destination ID */
58
+ destinationId: string;
59
+ /** Dokploy backup schedule ID for postgres (if configured) */
60
+ postgresBackupId?: string;
61
+ /** AWS region where bucket was created */
62
+ region: string;
63
+ /** Timestamp when backup was configured */
64
+ createdAt: string;
65
+ }
26
66
  /**
27
67
  * State for a single stage deployment
28
68
  */
@@ -43,6 +83,10 @@ interface DokployStageState {
43
83
  generatedSecrets?: Record<string, Record<string, string>>;
44
84
  /** DNS verification state per hostname */
45
85
  dnsVerified?: Record<string, DnsVerificationRecord>;
86
+ /** DNS records created during deploy (keyed by "name:type", e.g., "api:A") */
87
+ dnsRecords?: Record<string, CreatedDnsRecord>;
88
+ /** Backup destination state */
89
+ backups?: BackupState;
46
90
  lastDeployedAt: string;
47
91
  }
48
92
  /**
@@ -249,6 +293,49 @@ declare const DnsConfigWithLegacySchema: z.ZodUnion<readonly [z.ZodRecord<z.ZodS
249
293
  ttl: z.ZodOptional<z.ZodNumber>;
250
294
  domain: z.ZodString;
251
295
  }, z.core.$strip>]>]>;
296
+ type DnsConfig = z.infer<typeof DnsConfigWithLegacySchema>;
297
+ /**
298
+ * Backups configuration schema.
299
+ *
300
+ * Configures automatic backup destinations for database services.
301
+ * On first deploy, creates S3 bucket with unique name and IAM credentials.
302
+ */
303
+ declare const BackupsConfigSchema: z.ZodObject<{
304
+ type: z.ZodLiteral<"s3">;
305
+ profile: z.ZodOptional<z.ZodString>;
306
+ region: z.ZodEnum<{
307
+ "us-east-1": "us-east-1";
308
+ "us-east-2": "us-east-2";
309
+ "us-west-1": "us-west-1";
310
+ "us-west-2": "us-west-2";
311
+ "af-south-1": "af-south-1";
312
+ "ap-east-1": "ap-east-1";
313
+ "ap-south-1": "ap-south-1";
314
+ "ap-south-2": "ap-south-2";
315
+ "ap-southeast-1": "ap-southeast-1";
316
+ "ap-southeast-2": "ap-southeast-2";
317
+ "ap-southeast-3": "ap-southeast-3";
318
+ "ap-southeast-4": "ap-southeast-4";
319
+ "ap-northeast-1": "ap-northeast-1";
320
+ "ap-northeast-2": "ap-northeast-2";
321
+ "ap-northeast-3": "ap-northeast-3";
322
+ "ca-central-1": "ca-central-1";
323
+ "eu-central-1": "eu-central-1";
324
+ "eu-central-2": "eu-central-2";
325
+ "eu-west-1": "eu-west-1";
326
+ "eu-west-2": "eu-west-2";
327
+ "eu-west-3": "eu-west-3";
328
+ "eu-south-1": "eu-south-1";
329
+ "eu-south-2": "eu-south-2";
330
+ "eu-north-1": "eu-north-1";
331
+ "me-south-1": "me-south-1";
332
+ "me-central-1": "me-central-1";
333
+ "sa-east-1": "sa-east-1";
334
+ }>;
335
+ schedule: z.ZodOptional<z.ZodString>;
336
+ retention: z.ZodOptional<z.ZodNumber>;
337
+ }, z.core.$strip>;
338
+ type BackupsConfig = z.infer<typeof BackupsConfigSchema>;
252
339
  /**
253
340
  * Workspace configuration schema.
254
341
  */
@@ -316,6 +403,10 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
316
403
  client: z.ZodOptional<z.ZodObject<{
317
404
  output: z.ZodOptional<z.ZodString>;
318
405
  }, z.core.$strip>>;
406
+ config: z.ZodOptional<z.ZodObject<{
407
+ client: z.ZodOptional<z.ZodString>;
408
+ server: z.ZodOptional<z.ZodString>;
409
+ }, z.core.$strip>>;
319
410
  provider: z.ZodOptional<z.ZodEnum<{
320
411
  "better-auth": "better-auth";
321
412
  }>>;
@@ -454,6 +545,41 @@ declare const WorkspaceConfigSchema: z.ZodObject<{
454
545
  ttl: z.ZodOptional<z.ZodNumber>;
455
546
  domain: z.ZodString;
456
547
  }, z.core.$strip>]>]>>;
548
+ backups: z.ZodOptional<z.ZodObject<{
549
+ type: z.ZodLiteral<"s3">;
550
+ profile: z.ZodOptional<z.ZodString>;
551
+ region: z.ZodEnum<{
552
+ "us-east-1": "us-east-1";
553
+ "us-east-2": "us-east-2";
554
+ "us-west-1": "us-west-1";
555
+ "us-west-2": "us-west-2";
556
+ "af-south-1": "af-south-1";
557
+ "ap-east-1": "ap-east-1";
558
+ "ap-south-1": "ap-south-1";
559
+ "ap-south-2": "ap-south-2";
560
+ "ap-southeast-1": "ap-southeast-1";
561
+ "ap-southeast-2": "ap-southeast-2";
562
+ "ap-southeast-3": "ap-southeast-3";
563
+ "ap-southeast-4": "ap-southeast-4";
564
+ "ap-northeast-1": "ap-northeast-1";
565
+ "ap-northeast-2": "ap-northeast-2";
566
+ "ap-northeast-3": "ap-northeast-3";
567
+ "ca-central-1": "ca-central-1";
568
+ "eu-central-1": "eu-central-1";
569
+ "eu-central-2": "eu-central-2";
570
+ "eu-west-1": "eu-west-1";
571
+ "eu-west-2": "eu-west-2";
572
+ "eu-west-3": "eu-west-3";
573
+ "eu-south-1": "eu-south-1";
574
+ "eu-south-2": "eu-south-2";
575
+ "eu-north-1": "eu-north-1";
576
+ "me-south-1": "me-south-1";
577
+ "me-central-1": "me-central-1";
578
+ "sa-east-1": "sa-east-1";
579
+ }>;
580
+ schedule: z.ZodOptional<z.ZodString>;
581
+ retention: z.ZodOptional<z.ZodNumber>;
582
+ }, z.core.$strip>>;
457
583
  }, z.core.$strip>>;
458
584
  services: z.ZodOptional<z.ZodObject<{
459
585
  db: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
@@ -787,33 +913,6 @@ interface DokployWorkspaceConfig {
787
913
  * DNS provider types for automatic DNS record creation.
788
914
  */
789
915
 
790
- /**
791
- * DNS configuration for automatic record creation during deployment.
792
- *
793
- * Maps root domains to their DNS provider configuration.
794
- * When configured, the deploy command will automatically create DNS
795
- * A records pointing to your Dokploy server for each app's domain.
796
- *
797
- * @example
798
- * ```ts
799
- * // Multi-domain with different providers
800
- * dns: {
801
- * 'geekmidas.dev': { provider: 'hostinger' },
802
- * 'geekmidas.com': { provider: 'route53' },
803
- * }
804
- *
805
- * // Single domain
806
- * dns: {
807
- * 'traflabs.io': { provider: 'hostinger', ttl: 300 },
808
- * }
809
- *
810
- * // Manual mode - just print required records
811
- * dns: {
812
- * 'myapp.com': { provider: 'manual' },
813
- * }
814
- * ```
815
- */
816
- type DnsConfig = z.infer<typeof DnsConfigWithLegacySchema>;
817
916
  /**
818
917
  * Deployment configuration for the workspace.
819
918
  *
@@ -824,7 +923,7 @@ type DnsConfig = z.infer<typeof DnsConfigWithLegacySchema>;
824
923
  * default: 'dokploy',
825
924
  * }
826
925
  *
827
- * // Full configuration with DNS
926
+ * // Full configuration with DNS and backups
828
927
  * deploy: {
829
928
  * default: 'dokploy',
830
929
  * dokploy: {
@@ -839,6 +938,10 @@ type DnsConfig = z.infer<typeof DnsConfigWithLegacySchema>;
839
938
  * provider: 'hostinger',
840
939
  * domain: 'myapp.com',
841
940
  * },
941
+ * backups: {
942
+ * type: 's3',
943
+ * region: 'us-east-1',
944
+ * },
842
945
  * }
843
946
  * ```
844
947
  */
@@ -849,6 +952,8 @@ interface DeployConfig {
849
952
  dokploy?: DokployWorkspaceConfig;
850
953
  /** DNS configuration for automatic record creation */
851
954
  dns?: DnsConfig;
955
+ /** Backup destination configuration for database services */
956
+ backups?: BackupsConfig;
852
957
  }
853
958
  /**
854
959
  * Models package configuration for shared schemas.
@@ -1095,6 +1200,28 @@ interface AppConfigBase {
1095
1200
  * Generates typed API client from backend dependencies.
1096
1201
  */
1097
1202
  client?: ClientConfig;
1203
+ /**
1204
+ * Config file paths for frontend environment sniffing.
1205
+ *
1206
+ * Points to file(s) that call EnvironmentParser.parse() at import time.
1207
+ * The sniffer imports these files and captures all env vars accessed.
1208
+ *
1209
+ * Dependencies are auto-generated as NEXT_PUBLIC_{DEP}_URL variables.
1210
+ *
1211
+ * @example
1212
+ * ```ts
1213
+ * config: {
1214
+ * client: './src/config/client.ts', // NEXT_PUBLIC_* vars for browser
1215
+ * server: './src/config/server.ts', // Server-only vars for SSR
1216
+ * }
1217
+ * ```
1218
+ */
1219
+ config?: {
1220
+ /** Client-side config (NEXT_PUBLIC_* vars, available in browser) */
1221
+ client?: string;
1222
+ /** Server-side config (all env vars, for SSR/API routes) */
1223
+ server?: string;
1224
+ };
1098
1225
  /**
1099
1226
  * Override domain for this app.
1100
1227
  *
@@ -1409,6 +1536,7 @@ interface LoadedConfig {
1409
1536
  * ```
1410
1537
  */
1411
1538
  declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
1539
+ //# sourceMappingURL=types.d.ts.map
1412
1540
  //#endregion
1413
1541
  //#region src/workspace/index.d.ts
1414
1542
  /**
@@ -1517,4 +1645,4 @@ declare function getEndpointForStage(dokployConfig: {
1517
1645
 
1518
1646
  //#endregion
1519
1647
  export { AppConfig, AppConfigInput, AppInput, AppsRecord, BackendFramework, ClientConfig, ConstrainedApps, DeployConfig, DeployTarget, DokployWorkspaceConfig, FrontendFramework, InferAppNames, InferredWorkspaceConfig, LoadedConfig, MailServiceConfig, ModelsConfig, NormalizedAppConfig, NormalizedWorkspace, PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, SecretsConfig, ServiceImageConfig, ServicesConfig, SharedConfig, WorkspaceConfig, WorkspaceConfigSchema, WorkspaceInput, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
1520
- //# sourceMappingURL=index-DzmZ6SUW.d.cts.map
1648
+ //# sourceMappingURL=index-Ba21_lNt.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Ba21_lNt.d.cts","names":[],"sources":["../src/deploy/state.ts","../src/deploy/StateProvider.ts","../src/workspace/schema.ts","../src/workspace/types.ts","../src/workspace/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAaA;AAQA;AAQA;AAkBA;AAwBA;AAAkC,UA1DjB,gBAAA,CA0DiB;EAAA,MAMnB,EAAA,MAAA;EAAM,UAMY,EAAA,MAAA;;;;;AAIlB,UAlEE,qBAAA,CAkEF;EAAM,QAEQ,EAAA,MAAA;EAAgB,UAA/B,EAAA,MAAA;;AAEQ;;;UA9DL,gBAAA;ECZA;EAAa,MAAA,EAAA,MAAA;EAAA;EAOiB,IAAzB,EAAA,MAAA;EAAO;EAQiB,IAAG,EAAA,MAAA;EAAO;EAM5C,KAAA,EAAA,MAAS;EAgCJ;EAOA,GAAA,EAAA,MAAA;EAWA;EAQL,SAAA,EAAA,MAAW;;;;;AAAwD,UDjD9D,WAAA,CCiD8D;;;;ECJzE,SAAA,EAAA,MAAA;EAKA;EAKU,WAAA,EAAA,MAAA;EASA;EASA,cAAA,EAAA,MAAA;EAuSH;EAGX,kBAAA,EAAA,MAAA;EAAA;EAHoC,aAAA,EAAA,MAAA;;;;QAAA,EAAA,MAAA;EAAA;;;;;;UFxVrB,iBAAA;;;;;;gBAMF;;;;;;mBAMG,eAAe;;EE4UK,gBAzFxB,CAAA,EFjPM,MEiPN,CAAA,MAAA,EFjPqB,MEiPrB,CAAA,MAAA,EAAA,MAAA,CAAA,CAAA;EAAQ;EACG,WADX,CAAA,EF/OC,ME+OD,CAAA,MAAA,EF/OgB,qBE+OhB,CAAA;EAAQ;EACG,UAAA,CAAA,EF9OX,ME8OW,CAAA,MAAA,EF9OI,gBE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