@studiometa/forge-core 0.4.4 → 0.4.5

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/index.js CHANGED
@@ -3,11 +3,12 @@ import { homedir } from "node:os";
3
3
  import { dirname, join } from "node:path";
4
4
  import pino from "pino";
5
5
  import { BackgroundProcessAttributesSchema, BackupConfigAttributesSchema, CertificateAttributesSchema, CommandAttributesSchema, DatabaseAttributesSchema, DatabaseUserAttributesSchema, DeploymentAttributesSchema, DeploymentOutputAttributesSchema, DeploymentScriptAttributesSchema, EnvironmentAttributesSchema, FirewallRuleAttributesSchema, MonitorAttributesSchema, NginxTemplateAttributesSchema, RecipeAttributesSchema, RedirectRuleAttributesSchema, ScheduledJobAttributesSchema, SecurityRuleAttributesSchema, ServerAttributesSchema, SiteAttributesSchema, SshKeyAttributesSchema, UserAttributesSchema, jsonApiDocumentSchema, jsonApiListDocumentSchema, unwrapDocument, unwrapListDocument } from "@studiometa/forge-api";
6
+ //#region src/constants.ts
6
7
  /**
7
8
  * All supported resources.
8
9
  * Single source of truth — MCP schema and handlers derive from this.
9
10
  */
10
- const RESOURCES = [
11
+ var RESOURCES = [
11
12
  "servers",
12
13
  "sites",
13
14
  "deployments",
@@ -34,7 +35,7 @@ const RESOURCES = [
34
35
  * All supported actions.
35
36
  * Single source of truth — MCP schema and handlers derive from this.
36
37
  */
37
- const ACTIONS = [
38
+ var ACTIONS = [
38
39
  "list",
39
40
  "get",
40
41
  "create",
@@ -50,6 +51,8 @@ const ACTIONS = [
50
51
  "schema",
51
52
  "context"
52
53
  ];
54
+ //#endregion
55
+ //#region src/utils/name-matcher.ts
53
56
  /**
54
57
  * Match items by name using case-insensitive exact and partial matching.
55
58
  *
@@ -65,6 +68,8 @@ function matchByName(items, query, getName) {
65
68
  partial: items.filter((item) => getName(item).toLowerCase().includes(lower))
66
69
  };
67
70
  }
71
+ //#endregion
72
+ //#region src/logger.ts
68
73
  /**
69
74
  * Sensitive fields to strip from logged args.
70
75
  * These are replaced with '[REDACTED]' to prevent token leakage.
@@ -124,6 +129,8 @@ function createAuditLogger(source) {
124
129
  } catch {}
125
130
  } };
126
131
  }
132
+ //#endregion
133
+ //#region src/context.ts
127
134
  /**
128
135
  * Create a test executor context with a mock HTTP client.
129
136
  *
@@ -139,6 +146,8 @@ function createTestExecutorContext(overrides = {}) {
139
146
  ...overrides
140
147
  };
141
148
  }
149
+ //#endregion
150
+ //#region src/test-helpers.ts
142
151
  /**
143
152
  * Create a mock JSON:API resource.
144
153
  */
@@ -173,6 +182,8 @@ function mockListDocument(type, items) {
173
182
  }
174
183
  };
175
184
  }
185
+ //#endregion
186
+ //#region ../../node_modules/valibot/dist/index.mjs
176
187
  var store$4;
177
188
  /**
178
189
  * Returns the global configuration.
@@ -219,7 +230,9 @@ function parse(schema, input, config$1) {
219
230
  if (dataset.issues) throw new ValiError(dataset.issues);
220
231
  return dataset.value;
221
232
  }
222
- const ROUTES = {
233
+ //#endregion
234
+ //#region src/routes.ts
235
+ var ROUTES = {
223
236
  servers: {
224
237
  list: {
225
238
  method: "GET",
@@ -687,6 +700,8 @@ async function request(route, ctx, params = {}, options) {
687
700
  if (options?.schema) return parse(options.schema, response);
688
701
  return response;
689
702
  }
703
+ //#endregion
704
+ //#region src/executors/servers/create.ts
690
705
  /**
691
706
  * Create a new server.
692
707
  */
@@ -696,6 +711,8 @@ async function createServer(options, ctx) {
696
711
  schema: jsonApiDocumentSchema(ServerAttributesSchema)
697
712
  })) };
698
713
  }
714
+ //#endregion
715
+ //#region src/executors/servers/delete.ts
699
716
  /**
700
717
  * Delete a server.
701
718
  */
@@ -703,18 +720,24 @@ async function deleteServer(options, ctx) {
703
720
  await request(ROUTES.servers.delete, ctx, { server_id: options.server_id });
704
721
  return { data: void 0 };
705
722
  }
723
+ //#endregion
724
+ //#region src/executors/servers/get.ts
706
725
  /**
707
726
  * Get a specific server by ID.
708
727
  */
709
728
  async function getServer(options, ctx) {
710
729
  return { data: unwrapDocument(await request(ROUTES.servers.get, ctx, { server_id: options.server_id }, { schema: jsonApiDocumentSchema(ServerAttributesSchema) })) };
711
730
  }
731
+ //#endregion
732
+ //#region src/executors/servers/list.ts
712
733
  /**
713
734
  * List all servers.
714
735
  */
715
736
  async function listServers(_options, ctx) {
716
737
  return { data: unwrapListDocument(await request(ROUTES.servers.list, ctx, {}, { schema: jsonApiListDocumentSchema(ServerAttributesSchema) })) };
717
738
  }
739
+ //#endregion
740
+ //#region src/executors/servers/reboot.ts
718
741
  /**
719
742
  * Reboot a server.
720
743
  */
@@ -722,6 +745,8 @@ async function rebootServer(options, ctx) {
722
745
  await request(ROUTES.servers.reboot, ctx, { server_id: options.server_id }, { body: { action: "reboot" } });
723
746
  return { data: void 0 };
724
747
  }
748
+ //#endregion
749
+ //#region src/executors/servers/resolve.ts
725
750
  /**
726
751
  * Resolve servers by name — partial, case-insensitive match.
727
752
  *
@@ -740,6 +765,8 @@ async function resolveServers(options, ctx) {
740
765
  total: matches.length
741
766
  } };
742
767
  }
768
+ //#endregion
769
+ //#region src/executors/sites/create.ts
743
770
  /**
744
771
  * Create a new site on a server.
745
772
  */
@@ -750,6 +777,8 @@ async function createSite(options, ctx) {
750
777
  schema: jsonApiDocumentSchema(SiteAttributesSchema)
751
778
  })) };
752
779
  }
780
+ //#endregion
781
+ //#region src/executors/sites/delete.ts
753
782
  /**
754
783
  * Delete a site.
755
784
  */
@@ -760,6 +789,8 @@ async function deleteSite(options, ctx) {
760
789
  });
761
790
  return { data: void 0 };
762
791
  }
792
+ //#endregion
793
+ //#region src/executors/sites/get.ts
763
794
  /**
764
795
  * Get a specific site by ID.
765
796
  *
@@ -769,12 +800,16 @@ async function deleteSite(options, ctx) {
769
800
  async function getSite(options, ctx) {
770
801
  return { data: unwrapDocument(await request(ROUTES.sites.get, ctx, { site_id: options.site_id }, { schema: jsonApiDocumentSchema(SiteAttributesSchema) })) };
771
802
  }
803
+ //#endregion
804
+ //#region src/executors/sites/list.ts
772
805
  /**
773
806
  * List all sites on a server.
774
807
  */
775
808
  async function listSites(options, ctx) {
776
809
  return { data: unwrapListDocument(await request(ROUTES.sites.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(SiteAttributesSchema) })) };
777
810
  }
811
+ //#endregion
812
+ //#region src/executors/sites/resolve.ts
778
813
  /**
779
814
  * Resolve sites by domain name — partial, case-insensitive match.
780
815
  */
@@ -790,6 +825,8 @@ async function resolveSites(options, ctx) {
790
825
  total: matches.length
791
826
  } };
792
827
  }
828
+ //#endregion
829
+ //#region src/executors/sites/update.ts
793
830
  /**
794
831
  * Update an existing site on a server.
795
832
  */
@@ -803,6 +840,8 @@ async function updateSite(options, ctx) {
803
840
  schema: jsonApiDocumentSchema(SiteAttributesSchema)
804
841
  })) };
805
842
  }
843
+ //#endregion
844
+ //#region src/executors/deployments/deploy.ts
806
845
  /**
807
846
  * Trigger a deployment for a site.
808
847
  */
@@ -813,6 +852,8 @@ async function deploySite(options, ctx) {
813
852
  }, { body: {} });
814
853
  return { data: void 0 };
815
854
  }
855
+ //#endregion
856
+ //#region src/executors/deployments/deploy-and-wait.ts
816
857
  /**
817
858
  * Trigger a deployment and wait for it to complete, streaming logs in real time.
818
859
  *
@@ -906,6 +947,8 @@ async function deploySiteAndWait(options, ctx) {
906
947
  elapsed_ms
907
948
  } };
908
949
  }
950
+ //#endregion
951
+ //#region src/executors/deployments/get-log.ts
909
952
  /**
910
953
  * Get the deployment log for a site.
911
954
  */
@@ -916,6 +959,8 @@ async function getDeploymentLog(options, ctx) {
916
959
  id: options.deployment_id
917
960
  }, { schema: jsonApiDocumentSchema(DeploymentOutputAttributesSchema) })).output };
918
961
  }
962
+ //#endregion
963
+ //#region src/executors/deployments/get-script.ts
919
964
  /**
920
965
  * Get the deployment script for a site.
921
966
  */
@@ -925,6 +970,8 @@ async function getDeploymentScript(options, ctx) {
925
970
  site_id: options.site_id
926
971
  }, { schema: jsonApiDocumentSchema(DeploymentScriptAttributesSchema) })).content };
927
972
  }
973
+ //#endregion
974
+ //#region src/executors/deployments/list.ts
928
975
  /**
929
976
  * List all deployments for a site.
930
977
  */
@@ -937,6 +984,8 @@ async function listDeployments(options, ctx) {
937
984
  schema: jsonApiListDocumentSchema(DeploymentAttributesSchema)
938
985
  })) };
939
986
  }
987
+ //#endregion
988
+ //#region src/executors/deployments/update-script.ts
940
989
  /**
941
990
  * Update the deployment script for a site.
942
991
  */
@@ -947,6 +996,8 @@ async function updateDeploymentScript(options, ctx) {
947
996
  }, { body: { content: options.content } });
948
997
  return { data: void 0 };
949
998
  }
999
+ //#endregion
1000
+ //#region src/executors/certificates/activate.ts
950
1001
  /**
951
1002
  * Activate the SSL certificate for a domain.
952
1003
  */
@@ -958,6 +1009,8 @@ async function activateCertificate(options, ctx) {
958
1009
  }, { body: { action: "activate" } });
959
1010
  return { data: void 0 };
960
1011
  }
1012
+ //#endregion
1013
+ //#region src/executors/certificates/create.ts
961
1014
  /**
962
1015
  * Create an SSL certificate for a domain.
963
1016
  */
@@ -972,6 +1025,8 @@ async function createCertificate(options, ctx) {
972
1025
  schema: jsonApiDocumentSchema(CertificateAttributesSchema)
973
1026
  })) };
974
1027
  }
1028
+ //#endregion
1029
+ //#region src/executors/certificates/delete.ts
975
1030
  /**
976
1031
  * Delete the SSL certificate for a domain.
977
1032
  */
@@ -983,6 +1038,8 @@ async function deleteCertificate(options, ctx) {
983
1038
  });
984
1039
  return { data: void 0 };
985
1040
  }
1041
+ //#endregion
1042
+ //#region src/executors/certificates/get.ts
986
1043
  /**
987
1044
  * Get the SSL certificate for a domain.
988
1045
  */
@@ -993,6 +1050,8 @@ async function getCertificate(options, ctx) {
993
1050
  domain_id: options.domain_id
994
1051
  }, { schema: jsonApiDocumentSchema(CertificateAttributesSchema) })) };
995
1052
  }
1053
+ //#endregion
1054
+ //#region src/executors/databases/create.ts
996
1055
  /**
997
1056
  * Create a new database.
998
1057
  */
@@ -1003,6 +1062,8 @@ async function createDatabase(options, ctx) {
1003
1062
  schema: jsonApiDocumentSchema(DatabaseAttributesSchema)
1004
1063
  })) };
1005
1064
  }
1065
+ //#endregion
1066
+ //#region src/executors/databases/delete.ts
1006
1067
  /**
1007
1068
  * Delete a database.
1008
1069
  */
@@ -1013,6 +1074,8 @@ async function deleteDatabase(options, ctx) {
1013
1074
  });
1014
1075
  return { data: void 0 };
1015
1076
  }
1077
+ //#endregion
1078
+ //#region src/executors/databases/get.ts
1016
1079
  /**
1017
1080
  * Get a single database.
1018
1081
  */
@@ -1022,12 +1085,16 @@ async function getDatabase(options, ctx) {
1022
1085
  id: options.id
1023
1086
  }, { schema: jsonApiDocumentSchema(DatabaseAttributesSchema) })) };
1024
1087
  }
1088
+ //#endregion
1089
+ //#region src/executors/databases/list.ts
1025
1090
  /**
1026
1091
  * List databases on a server.
1027
1092
  */
1028
1093
  async function listDatabases(options, ctx) {
1029
1094
  return { data: unwrapListDocument(await request(ROUTES.databases.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(DatabaseAttributesSchema) })) };
1030
1095
  }
1096
+ //#endregion
1097
+ //#region src/executors/database-users/create.ts
1031
1098
  /**
1032
1099
  * Create a new database user.
1033
1100
  */
@@ -1038,6 +1105,8 @@ async function createDatabaseUser(options, ctx) {
1038
1105
  schema: jsonApiDocumentSchema(DatabaseUserAttributesSchema)
1039
1106
  })) };
1040
1107
  }
1108
+ //#endregion
1109
+ //#region src/executors/database-users/delete.ts
1041
1110
  /**
1042
1111
  * Delete a database user.
1043
1112
  */
@@ -1048,6 +1117,8 @@ async function deleteDatabaseUser(options, ctx) {
1048
1117
  });
1049
1118
  return { data: void 0 };
1050
1119
  }
1120
+ //#endregion
1121
+ //#region src/executors/database-users/get.ts
1051
1122
  /**
1052
1123
  * Get a single database user.
1053
1124
  */
@@ -1057,12 +1128,16 @@ async function getDatabaseUser(options, ctx) {
1057
1128
  id: options.id
1058
1129
  }, { schema: jsonApiDocumentSchema(DatabaseUserAttributesSchema) })) };
1059
1130
  }
1131
+ //#endregion
1132
+ //#region src/executors/database-users/list.ts
1060
1133
  /**
1061
1134
  * List database users on a server.
1062
1135
  */
1063
1136
  async function listDatabaseUsers(options, ctx) {
1064
1137
  return { data: unwrapListDocument(await request(ROUTES.databaseUsers.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(DatabaseUserAttributesSchema) })) };
1065
1138
  }
1139
+ //#endregion
1140
+ //#region src/executors/database-users/update.ts
1066
1141
  /**
1067
1142
  * Update an existing database user.
1068
1143
  */
@@ -1076,6 +1151,8 @@ async function updateDatabaseUser(options, ctx) {
1076
1151
  schema: jsonApiDocumentSchema(DatabaseUserAttributesSchema)
1077
1152
  })) };
1078
1153
  }
1154
+ //#endregion
1155
+ //#region src/executors/daemons/create.ts
1079
1156
  /**
1080
1157
  * Create a new daemon.
1081
1158
  */
@@ -1086,6 +1163,8 @@ async function createDaemon(options, ctx) {
1086
1163
  schema: jsonApiDocumentSchema(BackgroundProcessAttributesSchema)
1087
1164
  })) };
1088
1165
  }
1166
+ //#endregion
1167
+ //#region src/executors/daemons/delete.ts
1089
1168
  /**
1090
1169
  * Delete a daemon.
1091
1170
  */
@@ -1096,6 +1175,8 @@ async function deleteDaemon(options, ctx) {
1096
1175
  });
1097
1176
  return { data: void 0 };
1098
1177
  }
1178
+ //#endregion
1179
+ //#region src/executors/daemons/get.ts
1099
1180
  /**
1100
1181
  * Get a single daemon.
1101
1182
  */
@@ -1105,12 +1186,16 @@ async function getDaemon(options, ctx) {
1105
1186
  id: options.id
1106
1187
  }, { schema: jsonApiDocumentSchema(BackgroundProcessAttributesSchema) })) };
1107
1188
  }
1189
+ //#endregion
1190
+ //#region src/executors/daemons/list.ts
1108
1191
  /**
1109
1192
  * List daemons on a server.
1110
1193
  */
1111
1194
  async function listDaemons(options, ctx) {
1112
1195
  return { data: unwrapListDocument(await request(ROUTES.daemons.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(BackgroundProcessAttributesSchema) })) };
1113
1196
  }
1197
+ //#endregion
1198
+ //#region src/executors/daemons/restart.ts
1114
1199
  /**
1115
1200
  * Restart a daemon.
1116
1201
  */
@@ -1121,6 +1206,8 @@ async function restartDaemon(options, ctx) {
1121
1206
  }, { body: { action: "restart" } });
1122
1207
  return { data: void 0 };
1123
1208
  }
1209
+ //#endregion
1210
+ //#region src/executors/daemons/update.ts
1124
1211
  /**
1125
1212
  * Update an existing daemon.
1126
1213
  */
@@ -1134,6 +1221,8 @@ async function updateDaemon(options, ctx) {
1134
1221
  schema: jsonApiDocumentSchema(BackgroundProcessAttributesSchema)
1135
1222
  })) };
1136
1223
  }
1224
+ //#endregion
1225
+ //#region src/executors/firewall-rules/create.ts
1137
1226
  /**
1138
1227
  * Create a firewall rule.
1139
1228
  */
@@ -1142,6 +1231,8 @@ async function createFirewallRule(options, ctx) {
1142
1231
  await request(ROUTES.firewallRules.create, ctx, { server_id }, { body: data });
1143
1232
  return { data: void 0 };
1144
1233
  }
1234
+ //#endregion
1235
+ //#region src/executors/firewall-rules/delete.ts
1145
1236
  /**
1146
1237
  * Delete a firewall rule.
1147
1238
  */
@@ -1152,6 +1243,8 @@ async function deleteFirewallRule(options, ctx) {
1152
1243
  });
1153
1244
  return { data: void 0 };
1154
1245
  }
1246
+ //#endregion
1247
+ //#region src/executors/firewall-rules/get.ts
1155
1248
  /**
1156
1249
  * Get a single firewall rule.
1157
1250
  */
@@ -1161,12 +1254,16 @@ async function getFirewallRule(options, ctx) {
1161
1254
  id: options.id
1162
1255
  }, { schema: jsonApiDocumentSchema(FirewallRuleAttributesSchema) })) };
1163
1256
  }
1257
+ //#endregion
1258
+ //#region src/executors/firewall-rules/list.ts
1164
1259
  /**
1165
1260
  * List firewall rules on a server.
1166
1261
  */
1167
1262
  async function listFirewallRules(options, ctx) {
1168
1263
  return { data: unwrapListDocument(await request(ROUTES.firewallRules.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(FirewallRuleAttributesSchema) })) };
1169
1264
  }
1265
+ //#endregion
1266
+ //#region src/executors/ssh-keys/create.ts
1170
1267
  /**
1171
1268
  * Create an SSH key.
1172
1269
  */
@@ -1175,6 +1272,8 @@ async function createSshKey(options, ctx) {
1175
1272
  await request(ROUTES.sshKeys.create, ctx, { server_id }, { body: data });
1176
1273
  return { data: void 0 };
1177
1274
  }
1275
+ //#endregion
1276
+ //#region src/executors/ssh-keys/delete.ts
1178
1277
  /**
1179
1278
  * Delete an SSH key.
1180
1279
  */
@@ -1185,6 +1284,8 @@ async function deleteSshKey(options, ctx) {
1185
1284
  });
1186
1285
  return { data: void 0 };
1187
1286
  }
1287
+ //#endregion
1288
+ //#region src/executors/ssh-keys/get.ts
1188
1289
  /**
1189
1290
  * Get a single SSH key.
1190
1291
  */
@@ -1194,12 +1295,16 @@ async function getSshKey(options, ctx) {
1194
1295
  id: options.id
1195
1296
  }, { schema: jsonApiDocumentSchema(SshKeyAttributesSchema) })) };
1196
1297
  }
1298
+ //#endregion
1299
+ //#region src/executors/ssh-keys/list.ts
1197
1300
  /**
1198
1301
  * List SSH keys on a server.
1199
1302
  */
1200
1303
  async function listSshKeys(options, ctx) {
1201
1304
  return { data: unwrapListDocument(await request(ROUTES.sshKeys.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(SshKeyAttributesSchema) })) };
1202
1305
  }
1306
+ //#endregion
1307
+ //#region src/executors/security-rules/create.ts
1203
1308
  /**
1204
1309
  * Create a security rule.
1205
1310
  */
@@ -1213,6 +1318,8 @@ async function createSecurityRule(options, ctx) {
1213
1318
  schema: jsonApiDocumentSchema(SecurityRuleAttributesSchema)
1214
1319
  })) };
1215
1320
  }
1321
+ //#endregion
1322
+ //#region src/executors/security-rules/delete.ts
1216
1323
  /**
1217
1324
  * Delete a security rule.
1218
1325
  */
@@ -1224,6 +1331,8 @@ async function deleteSecurityRule(options, ctx) {
1224
1331
  });
1225
1332
  return { data: void 0 };
1226
1333
  }
1334
+ //#endregion
1335
+ //#region src/executors/security-rules/get.ts
1227
1336
  /**
1228
1337
  * Get a single security rule.
1229
1338
  */
@@ -1234,6 +1343,8 @@ async function getSecurityRule(options, ctx) {
1234
1343
  id: options.id
1235
1344
  }, { schema: jsonApiDocumentSchema(SecurityRuleAttributesSchema) })) };
1236
1345
  }
1346
+ //#endregion
1347
+ //#region src/executors/security-rules/list.ts
1237
1348
  /**
1238
1349
  * List security rules for a site.
1239
1350
  */
@@ -1243,6 +1354,8 @@ async function listSecurityRules(options, ctx) {
1243
1354
  site_id: options.site_id
1244
1355
  }, { schema: jsonApiListDocumentSchema(SecurityRuleAttributesSchema) })) };
1245
1356
  }
1357
+ //#endregion
1358
+ //#region src/executors/security-rules/update.ts
1246
1359
  /**
1247
1360
  * Update a security rule.
1248
1361
  */
@@ -1257,6 +1370,8 @@ async function updateSecurityRule(options, ctx) {
1257
1370
  schema: jsonApiDocumentSchema(SecurityRuleAttributesSchema)
1258
1371
  })) };
1259
1372
  }
1373
+ //#endregion
1374
+ //#region src/executors/redirect-rules/create.ts
1260
1375
  /**
1261
1376
  * Create a redirect rule.
1262
1377
  */
@@ -1268,6 +1383,8 @@ async function createRedirectRule(options, ctx) {
1268
1383
  }, { body: data });
1269
1384
  return { data: void 0 };
1270
1385
  }
1386
+ //#endregion
1387
+ //#region src/executors/redirect-rules/delete.ts
1271
1388
  /**
1272
1389
  * Delete a redirect rule.
1273
1390
  */
@@ -1279,6 +1396,8 @@ async function deleteRedirectRule(options, ctx) {
1279
1396
  });
1280
1397
  return { data: void 0 };
1281
1398
  }
1399
+ //#endregion
1400
+ //#region src/executors/redirect-rules/get.ts
1282
1401
  /**
1283
1402
  * Get a single redirect rule.
1284
1403
  */
@@ -1289,6 +1408,8 @@ async function getRedirectRule(options, ctx) {
1289
1408
  id: options.id
1290
1409
  }, { schema: jsonApiDocumentSchema(RedirectRuleAttributesSchema) })) };
1291
1410
  }
1411
+ //#endregion
1412
+ //#region src/executors/redirect-rules/list.ts
1292
1413
  /**
1293
1414
  * List redirect rules for a site.
1294
1415
  */
@@ -1298,6 +1419,8 @@ async function listRedirectRules(options, ctx) {
1298
1419
  site_id: options.site_id
1299
1420
  }, { schema: jsonApiListDocumentSchema(RedirectRuleAttributesSchema) })) };
1300
1421
  }
1422
+ //#endregion
1423
+ //#region src/executors/monitors/create.ts
1301
1424
  /**
1302
1425
  * Create a monitor.
1303
1426
  */
@@ -1308,6 +1431,8 @@ async function createMonitor(options, ctx) {
1308
1431
  schema: jsonApiDocumentSchema(MonitorAttributesSchema)
1309
1432
  })) };
1310
1433
  }
1434
+ //#endregion
1435
+ //#region src/executors/monitors/delete.ts
1311
1436
  /**
1312
1437
  * Delete a monitor.
1313
1438
  */
@@ -1318,6 +1443,8 @@ async function deleteMonitor(options, ctx) {
1318
1443
  });
1319
1444
  return { data: void 0 };
1320
1445
  }
1446
+ //#endregion
1447
+ //#region src/executors/monitors/get.ts
1321
1448
  /**
1322
1449
  * Get a single monitor.
1323
1450
  */
@@ -1327,12 +1454,16 @@ async function getMonitor(options, ctx) {
1327
1454
  id: options.id
1328
1455
  }, { schema: jsonApiDocumentSchema(MonitorAttributesSchema) })) };
1329
1456
  }
1457
+ //#endregion
1458
+ //#region src/executors/monitors/list.ts
1330
1459
  /**
1331
1460
  * List monitors on a server.
1332
1461
  */
1333
1462
  async function listMonitors(options, ctx) {
1334
1463
  return { data: unwrapListDocument(await request(ROUTES.monitors.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(MonitorAttributesSchema) })) };
1335
1464
  }
1465
+ //#endregion
1466
+ //#region src/executors/nginx-templates/create.ts
1336
1467
  /**
1337
1468
  * Create a Nginx template.
1338
1469
  */
@@ -1343,6 +1474,8 @@ async function createNginxTemplate(options, ctx) {
1343
1474
  schema: jsonApiDocumentSchema(NginxTemplateAttributesSchema)
1344
1475
  })) };
1345
1476
  }
1477
+ //#endregion
1478
+ //#region src/executors/nginx-templates/delete.ts
1346
1479
  /**
1347
1480
  * Delete a Nginx template.
1348
1481
  */
@@ -1353,6 +1486,8 @@ async function deleteNginxTemplate(options, ctx) {
1353
1486
  });
1354
1487
  return { data: void 0 };
1355
1488
  }
1489
+ //#endregion
1490
+ //#region src/executors/nginx-templates/get.ts
1356
1491
  /**
1357
1492
  * Get a single Nginx template.
1358
1493
  */
@@ -1362,12 +1497,16 @@ async function getNginxTemplate(options, ctx) {
1362
1497
  id: options.id
1363
1498
  }, { schema: jsonApiDocumentSchema(NginxTemplateAttributesSchema) })) };
1364
1499
  }
1500
+ //#endregion
1501
+ //#region src/executors/nginx-templates/list.ts
1365
1502
  /**
1366
1503
  * List Nginx templates on a server.
1367
1504
  */
1368
1505
  async function listNginxTemplates(options, ctx) {
1369
1506
  return { data: unwrapListDocument(await request(ROUTES.nginxTemplates.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(NginxTemplateAttributesSchema) })) };
1370
1507
  }
1508
+ //#endregion
1509
+ //#region src/executors/nginx-templates/update.ts
1371
1510
  /**
1372
1511
  * Update a Nginx template.
1373
1512
  */
@@ -1381,6 +1520,8 @@ async function updateNginxTemplate(options, ctx) {
1381
1520
  schema: jsonApiDocumentSchema(NginxTemplateAttributesSchema)
1382
1521
  })) };
1383
1522
  }
1523
+ //#endregion
1524
+ //#region src/executors/env/get.ts
1384
1525
  /**
1385
1526
  * Get environment variables for a site.
1386
1527
  */
@@ -1390,6 +1531,8 @@ async function getEnv(options, ctx) {
1390
1531
  site_id: options.site_id
1391
1532
  }, { schema: jsonApiDocumentSchema(EnvironmentAttributesSchema) })).content };
1392
1533
  }
1534
+ //#endregion
1535
+ //#region src/executors/env/update.ts
1393
1536
  /**
1394
1537
  * Update environment variables for a site.
1395
1538
  */
@@ -1400,6 +1543,8 @@ async function updateEnv(options, ctx) {
1400
1543
  }, { body: { content: options.content } });
1401
1544
  return { data: void 0 };
1402
1545
  }
1546
+ //#endregion
1547
+ //#region src/executors/nginx/get.ts
1403
1548
  /**
1404
1549
  * Get Nginx configuration for a site.
1405
1550
  */
@@ -1409,6 +1554,8 @@ async function getNginxConfig(options, ctx) {
1409
1554
  site_id: options.site_id
1410
1555
  }, { schema: jsonApiDocumentSchema(EnvironmentAttributesSchema) })).content };
1411
1556
  }
1557
+ //#endregion
1558
+ //#region src/executors/nginx/update.ts
1412
1559
  /**
1413
1560
  * Update Nginx configuration for a site.
1414
1561
  */
@@ -1419,6 +1566,8 @@ async function updateNginxConfig(options, ctx) {
1419
1566
  }, { body: { content: options.content } });
1420
1567
  return { data: void 0 };
1421
1568
  }
1569
+ //#endregion
1570
+ //#region src/executors/recipes/create.ts
1422
1571
  /**
1423
1572
  * Create a recipe.
1424
1573
  */
@@ -1428,6 +1577,8 @@ async function createRecipe(options, ctx) {
1428
1577
  schema: jsonApiDocumentSchema(RecipeAttributesSchema)
1429
1578
  })) };
1430
1579
  }
1580
+ //#endregion
1581
+ //#region src/executors/recipes/delete.ts
1431
1582
  /**
1432
1583
  * Delete a recipe.
1433
1584
  */
@@ -1435,18 +1586,24 @@ async function deleteRecipe(options, ctx) {
1435
1586
  await request(ROUTES.recipes.delete, ctx, { id: options.id });
1436
1587
  return { data: void 0 };
1437
1588
  }
1589
+ //#endregion
1590
+ //#region src/executors/recipes/get.ts
1438
1591
  /**
1439
1592
  * Get a single recipe.
1440
1593
  */
1441
1594
  async function getRecipe(options, ctx) {
1442
1595
  return { data: unwrapDocument(await request(ROUTES.recipes.get, ctx, { id: options.id }, { schema: jsonApiDocumentSchema(RecipeAttributesSchema) })) };
1443
1596
  }
1597
+ //#endregion
1598
+ //#region src/executors/recipes/list.ts
1444
1599
  /**
1445
1600
  * List all recipes.
1446
1601
  */
1447
1602
  async function listRecipes(_options, ctx) {
1448
1603
  return { data: unwrapListDocument(await request(ROUTES.recipes.list, ctx, {}, { schema: jsonApiListDocumentSchema(RecipeAttributesSchema) })) };
1449
1604
  }
1605
+ //#endregion
1606
+ //#region src/executors/recipes/run.ts
1450
1607
  /**
1451
1608
  * Run a recipe on specified servers.
1452
1609
  */
@@ -1454,6 +1611,8 @@ async function runRecipe(options, ctx) {
1454
1611
  await request(ROUTES.recipes.run, ctx, { id: options.id }, { body: { servers: options.servers } });
1455
1612
  return { data: void 0 };
1456
1613
  }
1614
+ //#endregion
1615
+ //#region src/executors/recipes/update.ts
1457
1616
  /**
1458
1617
  * Update a recipe.
1459
1618
  */
@@ -1464,6 +1623,8 @@ async function updateRecipe(options, ctx) {
1464
1623
  schema: jsonApiDocumentSchema(RecipeAttributesSchema)
1465
1624
  })) };
1466
1625
  }
1626
+ //#endregion
1627
+ //#region src/executors/backups/create.ts
1467
1628
  /**
1468
1629
  * Create a backup configuration.
1469
1630
  */
@@ -1472,6 +1633,8 @@ async function createBackupConfig(options, ctx) {
1472
1633
  await request(ROUTES.backups.create, ctx, { server_id }, { body: data });
1473
1634
  return { data: void 0 };
1474
1635
  }
1636
+ //#endregion
1637
+ //#region src/executors/backups/delete.ts
1475
1638
  /**
1476
1639
  * Delete a backup configuration.
1477
1640
  */
@@ -1482,6 +1645,8 @@ async function deleteBackupConfig(options, ctx) {
1482
1645
  });
1483
1646
  return { data: void 0 };
1484
1647
  }
1648
+ //#endregion
1649
+ //#region src/executors/backups/update.ts
1485
1650
  /**
1486
1651
  * Update a backup configuration.
1487
1652
  */
@@ -1493,6 +1658,8 @@ async function updateBackupConfig(options, ctx) {
1493
1658
  }, { body: data });
1494
1659
  return { data: void 0 };
1495
1660
  }
1661
+ //#endregion
1662
+ //#region src/executors/backups/get.ts
1496
1663
  /**
1497
1664
  * Get a single backup configuration.
1498
1665
  */
@@ -1502,12 +1669,16 @@ async function getBackupConfig(options, ctx) {
1502
1669
  id: options.id
1503
1670
  }, { schema: jsonApiDocumentSchema(BackupConfigAttributesSchema) })) };
1504
1671
  }
1672
+ //#endregion
1673
+ //#region src/executors/backups/list.ts
1505
1674
  /**
1506
1675
  * List backup configurations for a server.
1507
1676
  */
1508
1677
  async function listBackupConfigs(options, ctx) {
1509
1678
  return { data: unwrapListDocument(await request(ROUTES.backups.list, ctx, { server_id: options.server_id }, { schema: jsonApiListDocumentSchema(BackupConfigAttributesSchema) })) };
1510
1679
  }
1680
+ //#endregion
1681
+ //#region src/executors/commands/create.ts
1511
1682
  /**
1512
1683
  * Execute a command on a site.
1513
1684
  */
@@ -1518,6 +1689,8 @@ async function createCommand(options, ctx) {
1518
1689
  }, { body: { command: options.command } });
1519
1690
  return { data: void 0 };
1520
1691
  }
1692
+ //#endregion
1693
+ //#region src/executors/commands/get.ts
1521
1694
  /**
1522
1695
  * Get a specific command.
1523
1696
  */
@@ -1528,6 +1701,8 @@ async function getCommand(options, ctx) {
1528
1701
  id: options.id
1529
1702
  }, { schema: jsonApiDocumentSchema(CommandAttributesSchema) })) };
1530
1703
  }
1704
+ //#endregion
1705
+ //#region src/executors/commands/list.ts
1531
1706
  /**
1532
1707
  * List commands executed on a site.
1533
1708
  */
@@ -1537,6 +1712,8 @@ async function listCommands(options, ctx) {
1537
1712
  site_id: options.site_id
1538
1713
  }, { schema: jsonApiListDocumentSchema(CommandAttributesSchema) })) };
1539
1714
  }
1715
+ //#endregion
1716
+ //#region src/executors/scheduled-jobs/create.ts
1540
1717
  /**
1541
1718
  * Create a scheduled job.
1542
1719
  */
@@ -1550,6 +1727,8 @@ async function createScheduledJob(options, ctx) {
1550
1727
  schema: jsonApiDocumentSchema(ScheduledJobAttributesSchema)
1551
1728
  })) };
1552
1729
  }
1730
+ //#endregion
1731
+ //#region src/executors/scheduled-jobs/delete.ts
1553
1732
  /**
1554
1733
  * Delete a scheduled job.
1555
1734
  */
@@ -1563,6 +1742,8 @@ async function deleteScheduledJob(options, ctx) {
1563
1742
  await request(route, ctx, params);
1564
1743
  return { data: void 0 };
1565
1744
  }
1745
+ //#endregion
1746
+ //#region src/executors/scheduled-jobs/get.ts
1566
1747
  /**
1567
1748
  * Get a specific scheduled job.
1568
1749
  */
@@ -1575,6 +1756,8 @@ async function getScheduledJob(options, ctx) {
1575
1756
  if (options.site_id) params.site_id = options.site_id;
1576
1757
  return { data: unwrapDocument(await request(route, ctx, params, { schema: jsonApiDocumentSchema(ScheduledJobAttributesSchema) })) };
1577
1758
  }
1759
+ //#endregion
1760
+ //#region src/executors/scheduled-jobs/list.ts
1578
1761
  /**
1579
1762
  * List scheduled jobs on a server.
1580
1763
  */
@@ -1584,12 +1767,15 @@ async function listScheduledJobs(options, ctx) {
1584
1767
  if (options.site_id) params.site_id = options.site_id;
1585
1768
  return { data: unwrapListDocument(await request(route, ctx, params, { schema: jsonApiListDocumentSchema(ScheduledJobAttributesSchema) })) };
1586
1769
  }
1770
+ //#endregion
1771
+ //#region src/executors/user/get.ts
1587
1772
  /**
1588
1773
  * Get the currently authenticated user.
1589
1774
  */
1590
1775
  async function getUser(_options, ctx) {
1591
1776
  return { data: unwrapDocument(await request(ROUTES.user.get, ctx, {}, { schema: jsonApiDocumentSchema(UserAttributesSchema) })) };
1592
1777
  }
1778
+ //#endregion
1593
1779
  export { ACTIONS, RESOURCES, activateCertificate, createAuditLogger, createBackupConfig, createCertificate, createCommand, createDaemon, createDatabase, createDatabaseUser, createFirewallRule, createMonitor, createNginxTemplate, createRecipe, createRedirectRule, createScheduledJob, createSecurityRule, createServer, createSite, createSshKey, createTestExecutorContext, deleteBackupConfig, deleteCertificate, deleteDaemon, deleteDatabase, deleteDatabaseUser, deleteFirewallRule, deleteMonitor, deleteNginxTemplate, deleteRecipe, deleteRedirectRule, deleteScheduledJob, deleteSecurityRule, deleteServer, deleteSite, deleteSshKey, deploySite, deploySiteAndWait, getAuditLogPath, getBackupConfig, getCertificate, getCommand, getDaemon, getDatabase, getDatabaseUser, getDeploymentLog, getDeploymentScript, getEnv, getFirewallRule, getMonitor, getNginxConfig, getNginxTemplate, getRecipe, getRedirectRule, getScheduledJob, getSecurityRule, getServer, getSite, getSshKey, getUser, listBackupConfigs, listCommands, listDaemons, listDatabaseUsers, listDatabases, listDeployments, listFirewallRules, listMonitors, listNginxTemplates, listRecipes, listRedirectRules, listScheduledJobs, listSecurityRules, listServers, listSites, listSshKeys, matchByName, mockDocument, mockListDocument, mockResource, rebootServer, resolveServers, resolveSites, restartDaemon, runRecipe, sanitizeArgs, updateBackupConfig, updateDaemon, updateDatabaseUser, updateDeploymentScript, updateEnv, updateNginxConfig, updateNginxTemplate, updateRecipe, updateSecurityRule, updateSite };
1594
1780
 
1595
1781
  //# sourceMappingURL=index.js.map