@studiometa/forge-core 0.0.1 → 0.2.0
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/README.md +151 -0
- package/dist/constants.d.ts +13 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/context.d.ts +30 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/executors/backups/create.d.ts +8 -0
- package/dist/executors/backups/create.d.ts.map +1 -0
- package/dist/executors/backups/delete.d.ts +7 -0
- package/dist/executors/backups/delete.d.ts.map +1 -0
- package/dist/executors/backups/get.d.ts +8 -0
- package/dist/executors/backups/get.d.ts.map +1 -0
- package/dist/executors/backups/index.d.ts +6 -0
- package/dist/executors/backups/index.d.ts.map +1 -0
- package/dist/executors/backups/list.d.ts +8 -0
- package/dist/executors/backups/list.d.ts.map +1 -0
- package/dist/executors/backups/types.d.ts +31 -0
- package/dist/executors/backups/types.d.ts.map +1 -0
- package/dist/executors/certificates/activate.d.ts +7 -0
- package/dist/executors/certificates/activate.d.ts.map +1 -0
- package/dist/executors/certificates/create.d.ts +8 -0
- package/dist/executors/certificates/create.d.ts.map +1 -0
- package/dist/executors/certificates/delete.d.ts +7 -0
- package/dist/executors/certificates/delete.d.ts.map +1 -0
- package/dist/executors/certificates/get.d.ts +8 -0
- package/dist/executors/certificates/get.d.ts.map +1 -0
- package/dist/executors/certificates/index.d.ts +7 -0
- package/dist/executors/certificates/index.d.ts.map +1 -0
- package/dist/executors/certificates/list.d.ts +8 -0
- package/dist/executors/certificates/list.d.ts.map +1 -0
- package/dist/executors/certificates/types.d.ts +43 -0
- package/dist/executors/certificates/types.d.ts.map +1 -0
- package/dist/executors/commands/create.d.ts +8 -0
- package/dist/executors/commands/create.d.ts.map +1 -0
- package/dist/executors/commands/get.d.ts +8 -0
- package/dist/executors/commands/get.d.ts.map +1 -0
- package/dist/executors/commands/index.d.ts +5 -0
- package/dist/executors/commands/index.d.ts.map +1 -0
- package/dist/executors/commands/list.d.ts +8 -0
- package/dist/executors/commands/list.d.ts.map +1 -0
- package/dist/executors/commands/types.d.ts +27 -0
- package/dist/executors/commands/types.d.ts.map +1 -0
- package/dist/executors/daemons/create.d.ts +8 -0
- package/dist/executors/daemons/create.d.ts.map +1 -0
- package/dist/executors/daemons/delete.d.ts +7 -0
- package/dist/executors/daemons/delete.d.ts.map +1 -0
- package/dist/executors/daemons/get.d.ts +8 -0
- package/dist/executors/daemons/get.d.ts.map +1 -0
- package/dist/executors/daemons/index.d.ts +7 -0
- package/dist/executors/daemons/index.d.ts.map +1 -0
- package/dist/executors/daemons/list.d.ts +8 -0
- package/dist/executors/daemons/list.d.ts.map +1 -0
- package/dist/executors/daemons/restart.d.ts +7 -0
- package/dist/executors/daemons/restart.d.ts.map +1 -0
- package/dist/executors/daemons/types.d.ts +38 -0
- package/dist/executors/daemons/types.d.ts.map +1 -0
- package/dist/executors/database-users/create.d.ts +8 -0
- package/dist/executors/database-users/create.d.ts.map +1 -0
- package/dist/executors/database-users/delete.d.ts +7 -0
- package/dist/executors/database-users/delete.d.ts.map +1 -0
- package/dist/executors/database-users/get.d.ts +8 -0
- package/dist/executors/database-users/get.d.ts.map +1 -0
- package/dist/executors/database-users/index.d.ts +6 -0
- package/dist/executors/database-users/index.d.ts.map +1 -0
- package/dist/executors/database-users/list.d.ts +8 -0
- package/dist/executors/database-users/list.d.ts.map +1 -0
- package/dist/executors/database-users/types.d.ts +31 -0
- package/dist/executors/database-users/types.d.ts.map +1 -0
- package/dist/executors/databases/create.d.ts +8 -0
- package/dist/executors/databases/create.d.ts.map +1 -0
- package/dist/executors/databases/delete.d.ts +7 -0
- package/dist/executors/databases/delete.d.ts.map +1 -0
- package/dist/executors/databases/get.d.ts +8 -0
- package/dist/executors/databases/get.d.ts.map +1 -0
- package/dist/executors/databases/index.d.ts +6 -0
- package/dist/executors/databases/index.d.ts.map +1 -0
- package/dist/executors/databases/list.d.ts +8 -0
- package/dist/executors/databases/list.d.ts.map +1 -0
- package/dist/executors/databases/types.d.ts +31 -0
- package/dist/executors/databases/types.d.ts.map +1 -0
- package/dist/executors/deployments/deploy-and-wait.d.ts +13 -0
- package/dist/executors/deployments/deploy-and-wait.d.ts.map +1 -0
- package/dist/executors/deployments/deploy.d.ts +7 -0
- package/dist/executors/deployments/deploy.d.ts.map +1 -0
- package/dist/executors/deployments/get-log.d.ts +7 -0
- package/dist/executors/deployments/get-log.d.ts.map +1 -0
- package/dist/executors/deployments/get-output.d.ts +7 -0
- package/dist/executors/deployments/get-output.d.ts.map +1 -0
- package/dist/executors/deployments/get-script.d.ts +7 -0
- package/dist/executors/deployments/get-script.d.ts.map +1 -0
- package/dist/executors/deployments/index.d.ts +9 -0
- package/dist/executors/deployments/index.d.ts.map +1 -0
- package/dist/executors/deployments/list.d.ts +8 -0
- package/dist/executors/deployments/list.d.ts.map +1 -0
- package/dist/executors/deployments/types.d.ts +72 -0
- package/dist/executors/deployments/types.d.ts.map +1 -0
- package/dist/executors/deployments/update-script.d.ts +7 -0
- package/dist/executors/deployments/update-script.d.ts.map +1 -0
- package/dist/executors/env/get.d.ts +7 -0
- package/dist/executors/env/get.d.ts.map +1 -0
- package/dist/executors/env/index.d.ts +4 -0
- package/dist/executors/env/index.d.ts.map +1 -0
- package/dist/executors/env/types.d.ts +19 -0
- package/dist/executors/env/types.d.ts.map +1 -0
- package/dist/executors/env/update.d.ts +7 -0
- package/dist/executors/env/update.d.ts.map +1 -0
- package/dist/executors/firewall-rules/create.d.ts +5 -0
- package/dist/executors/firewall-rules/create.d.ts.map +1 -0
- package/dist/executors/firewall-rules/delete.d.ts +4 -0
- package/dist/executors/firewall-rules/delete.d.ts.map +1 -0
- package/dist/executors/firewall-rules/get.d.ts +5 -0
- package/dist/executors/firewall-rules/get.d.ts.map +1 -0
- package/dist/executors/firewall-rules/index.d.ts +6 -0
- package/dist/executors/firewall-rules/index.d.ts.map +1 -0
- package/dist/executors/firewall-rules/list.d.ts +5 -0
- package/dist/executors/firewall-rules/list.d.ts.map +1 -0
- package/dist/executors/firewall-rules/types.d.ts +31 -0
- package/dist/executors/firewall-rules/types.d.ts.map +1 -0
- package/dist/executors/monitors/create.d.ts +5 -0
- package/dist/executors/monitors/create.d.ts.map +1 -0
- package/dist/executors/monitors/delete.d.ts +4 -0
- package/dist/executors/monitors/delete.d.ts.map +1 -0
- package/dist/executors/monitors/get.d.ts +5 -0
- package/dist/executors/monitors/get.d.ts.map +1 -0
- package/dist/executors/monitors/index.d.ts +6 -0
- package/dist/executors/monitors/index.d.ts.map +1 -0
- package/dist/executors/monitors/list.d.ts +5 -0
- package/dist/executors/monitors/list.d.ts.map +1 -0
- package/dist/executors/monitors/types.d.ts +31 -0
- package/dist/executors/monitors/types.d.ts.map +1 -0
- package/dist/executors/nginx/get.d.ts +7 -0
- package/dist/executors/nginx/get.d.ts.map +1 -0
- package/dist/executors/nginx/index.d.ts +4 -0
- package/dist/executors/nginx/index.d.ts.map +1 -0
- package/dist/executors/nginx/types.d.ts +19 -0
- package/dist/executors/nginx/types.d.ts.map +1 -0
- package/dist/executors/nginx/update.d.ts +7 -0
- package/dist/executors/nginx/update.d.ts.map +1 -0
- package/dist/executors/nginx-templates/create.d.ts +5 -0
- package/dist/executors/nginx-templates/create.d.ts.map +1 -0
- package/dist/executors/nginx-templates/delete.d.ts +4 -0
- package/dist/executors/nginx-templates/delete.d.ts.map +1 -0
- package/dist/executors/nginx-templates/get.d.ts +5 -0
- package/dist/executors/nginx-templates/get.d.ts.map +1 -0
- package/dist/executors/nginx-templates/index.d.ts +7 -0
- package/dist/executors/nginx-templates/index.d.ts.map +1 -0
- package/dist/executors/nginx-templates/list.d.ts +5 -0
- package/dist/executors/nginx-templates/list.d.ts.map +1 -0
- package/dist/executors/nginx-templates/types.d.ts +40 -0
- package/dist/executors/nginx-templates/types.d.ts.map +1 -0
- package/dist/executors/nginx-templates/update.d.ts +5 -0
- package/dist/executors/nginx-templates/update.d.ts.map +1 -0
- package/dist/executors/recipes/create.d.ts +5 -0
- package/dist/executors/recipes/create.d.ts.map +1 -0
- package/dist/executors/recipes/delete.d.ts +4 -0
- package/dist/executors/recipes/delete.d.ts.map +1 -0
- package/dist/executors/recipes/get.d.ts +5 -0
- package/dist/executors/recipes/get.d.ts.map +1 -0
- package/dist/executors/recipes/index.d.ts +7 -0
- package/dist/executors/recipes/index.d.ts.map +1 -0
- package/dist/executors/recipes/list.d.ts +5 -0
- package/dist/executors/recipes/list.d.ts.map +1 -0
- package/dist/executors/recipes/run.d.ts +7 -0
- package/dist/executors/recipes/run.d.ts.map +1 -0
- package/dist/executors/recipes/types.d.ts +34 -0
- package/dist/executors/recipes/types.d.ts.map +1 -0
- package/dist/executors/redirect-rules/create.d.ts +5 -0
- package/dist/executors/redirect-rules/create.d.ts.map +1 -0
- package/dist/executors/redirect-rules/delete.d.ts +4 -0
- package/dist/executors/redirect-rules/delete.d.ts.map +1 -0
- package/dist/executors/redirect-rules/get.d.ts +5 -0
- package/dist/executors/redirect-rules/get.d.ts.map +1 -0
- package/dist/executors/redirect-rules/index.d.ts +6 -0
- package/dist/executors/redirect-rules/index.d.ts.map +1 -0
- package/dist/executors/redirect-rules/list.d.ts +5 -0
- package/dist/executors/redirect-rules/list.d.ts.map +1 -0
- package/dist/executors/redirect-rules/types.d.ts +35 -0
- package/dist/executors/redirect-rules/types.d.ts.map +1 -0
- package/dist/executors/scheduled-jobs/create.d.ts +8 -0
- package/dist/executors/scheduled-jobs/create.d.ts.map +1 -0
- package/dist/executors/scheduled-jobs/delete.d.ts +7 -0
- package/dist/executors/scheduled-jobs/delete.d.ts.map +1 -0
- package/dist/executors/scheduled-jobs/get.d.ts +8 -0
- package/dist/executors/scheduled-jobs/get.d.ts.map +1 -0
- package/dist/executors/scheduled-jobs/index.d.ts +6 -0
- package/dist/executors/scheduled-jobs/index.d.ts.map +1 -0
- package/dist/executors/scheduled-jobs/list.d.ts +8 -0
- package/dist/executors/scheduled-jobs/list.d.ts.map +1 -0
- package/dist/executors/scheduled-jobs/types.d.ts +31 -0
- package/dist/executors/scheduled-jobs/types.d.ts.map +1 -0
- package/dist/executors/security-rules/create.d.ts +5 -0
- package/dist/executors/security-rules/create.d.ts.map +1 -0
- package/dist/executors/security-rules/delete.d.ts +4 -0
- package/dist/executors/security-rules/delete.d.ts.map +1 -0
- package/dist/executors/security-rules/get.d.ts +5 -0
- package/dist/executors/security-rules/get.d.ts.map +1 -0
- package/dist/executors/security-rules/index.d.ts +6 -0
- package/dist/executors/security-rules/index.d.ts.map +1 -0
- package/dist/executors/security-rules/list.d.ts +5 -0
- package/dist/executors/security-rules/list.d.ts.map +1 -0
- package/dist/executors/security-rules/types.d.ts +35 -0
- package/dist/executors/security-rules/types.d.ts.map +1 -0
- package/dist/executors/servers/create.d.ts +8 -0
- package/dist/executors/servers/create.d.ts.map +1 -0
- package/dist/executors/servers/delete.d.ts +7 -0
- package/dist/executors/servers/delete.d.ts.map +1 -0
- package/dist/executors/servers/get.d.ts +8 -0
- package/dist/executors/servers/get.d.ts.map +1 -0
- package/dist/executors/servers/index.d.ts +7 -0
- package/dist/executors/servers/index.d.ts.map +1 -0
- package/dist/executors/servers/list.d.ts +8 -0
- package/dist/executors/servers/list.d.ts.map +1 -0
- package/dist/executors/servers/reboot.d.ts +7 -0
- package/dist/executors/servers/reboot.d.ts.map +1 -0
- package/dist/executors/servers/types.d.ts +33 -0
- package/dist/executors/servers/types.d.ts.map +1 -0
- package/dist/executors/sites/create.d.ts +8 -0
- package/dist/executors/sites/create.d.ts.map +1 -0
- package/dist/executors/sites/delete.d.ts +7 -0
- package/dist/executors/sites/delete.d.ts.map +1 -0
- package/dist/executors/sites/get.d.ts +8 -0
- package/dist/executors/sites/get.d.ts.map +1 -0
- package/dist/executors/sites/index.d.ts +6 -0
- package/dist/executors/sites/index.d.ts.map +1 -0
- package/dist/executors/sites/list.d.ts +8 -0
- package/dist/executors/sites/list.d.ts.map +1 -0
- package/dist/executors/sites/types.d.ts +31 -0
- package/dist/executors/sites/types.d.ts.map +1 -0
- package/dist/executors/ssh-keys/create.d.ts +5 -0
- package/dist/executors/ssh-keys/create.d.ts.map +1 -0
- package/dist/executors/ssh-keys/delete.d.ts +4 -0
- package/dist/executors/ssh-keys/delete.d.ts.map +1 -0
- package/dist/executors/ssh-keys/get.d.ts +5 -0
- package/dist/executors/ssh-keys/get.d.ts.map +1 -0
- package/dist/executors/ssh-keys/index.d.ts +6 -0
- package/dist/executors/ssh-keys/index.d.ts.map +1 -0
- package/dist/executors/ssh-keys/list.d.ts +5 -0
- package/dist/executors/ssh-keys/list.d.ts.map +1 -0
- package/dist/executors/ssh-keys/types.d.ts +31 -0
- package/dist/executors/ssh-keys/types.d.ts.map +1 -0
- package/dist/executors/types.d.ts +18 -0
- package/dist/executors/types.d.ts.map +1 -0
- package/dist/executors/user/get.d.ts +8 -0
- package/dist/executors/user/get.d.ts.map +1 -0
- package/dist/executors/user/index.d.ts +3 -0
- package/dist/executors/user/index.d.ts.map +1 -0
- package/dist/executors/user/types.d.ts +9 -0
- package/dist/executors/user/types.d.ts.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1125 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +32 -0
- package/dist/logger.d.ts.map +1 -0
- package/package.json +34 -1
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# @studiometa/forge-core
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@studiometa/forge-core)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Shared business logic for Laravel Forge tools — pure executor functions with injectable dependencies. Used internally by `@studiometa/forge-mcp`.
|
|
7
|
+
|
|
8
|
+
## Architecture
|
|
9
|
+
|
|
10
|
+
Executors are pure functions with dependency injection via `ExecutorContext`:
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { listServers, createTestExecutorContext } from "@studiometa/forge-core";
|
|
14
|
+
|
|
15
|
+
const ctx = createTestExecutorContext({
|
|
16
|
+
client: mockClient,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const result = await listServers({}, ctx);
|
|
20
|
+
console.log(result.text); // "2 server(s): ..."
|
|
21
|
+
console.log(result.data); // ForgeServer[]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Constants
|
|
25
|
+
|
|
26
|
+
`RESOURCES` and `ACTIONS` are the single source of truth for the entire monorepo:
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { RESOURCES, ACTIONS } from "@studiometa/forge-core";
|
|
30
|
+
|
|
31
|
+
// RESOURCES: ['servers', 'sites', 'deployments', 'certificates', 'databases', 'daemons',
|
|
32
|
+
// 'env', 'nginx', 'firewall-rules', 'ssh-keys', 'security-rules', 'redirect-rules',
|
|
33
|
+
// 'nginx-templates', 'monitors', 'recipes']
|
|
34
|
+
// ACTIONS: ['list', 'get', 'create', 'update', 'delete', 'deploy', 'reboot', 'restart',
|
|
35
|
+
// 'activate', 'run', 'help', 'schema']
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Executors
|
|
39
|
+
|
|
40
|
+
### Servers
|
|
41
|
+
|
|
42
|
+
- `listServers(options, ctx)` — List all servers
|
|
43
|
+
- `getServer({ server_id }, ctx)` — Get a server
|
|
44
|
+
- `createServer(data, ctx)` — Create a server
|
|
45
|
+
- `deleteServer({ server_id }, ctx)` — Delete a server
|
|
46
|
+
- `rebootServer({ server_id }, ctx)` — Reboot a server
|
|
47
|
+
|
|
48
|
+
### Sites
|
|
49
|
+
|
|
50
|
+
- `listSites({ server_id }, ctx)` — List sites on a server
|
|
51
|
+
- `getSite({ server_id, site_id }, ctx)` — Get a site
|
|
52
|
+
- `createSite({ server_id, ...data }, ctx)` — Create a site
|
|
53
|
+
- `deleteSite({ server_id, site_id }, ctx)` — Delete a site
|
|
54
|
+
|
|
55
|
+
### Deployments
|
|
56
|
+
|
|
57
|
+
- `listDeployments({ server_id, site_id }, ctx)` — List deployments
|
|
58
|
+
- `deploySite({ server_id, site_id }, ctx)` — Trigger deployment
|
|
59
|
+
- `deploySiteAndWait({ server_id, site_id, timeout_ms?, poll_interval_ms? }, ctx)` — Deploy and poll until complete, returns `DeployResult` with status, log, and elapsed time
|
|
60
|
+
- `getDeploymentLog({ server_id, site_id }, ctx)` — Get the latest deployment log
|
|
61
|
+
- `getDeploymentOutput({ server_id, site_id, deployment_id }, ctx)` — Get output
|
|
62
|
+
- `getDeploymentScript({ server_id, site_id }, ctx)` — Get deploy script
|
|
63
|
+
- `updateDeploymentScript({ server_id, site_id, content }, ctx)` — Update script
|
|
64
|
+
|
|
65
|
+
### Certificates
|
|
66
|
+
|
|
67
|
+
- `listCertificates`, `getCertificate`, `createCertificate`, `deleteCertificate`, `activateCertificate`
|
|
68
|
+
|
|
69
|
+
### Databases
|
|
70
|
+
|
|
71
|
+
- `listDatabases`, `getDatabase`, `createDatabase`, `deleteDatabase`
|
|
72
|
+
|
|
73
|
+
### Daemons
|
|
74
|
+
|
|
75
|
+
- `listDaemons`, `getDaemon`, `createDaemon`, `deleteDaemon`, `restartDaemon`
|
|
76
|
+
|
|
77
|
+
### Firewall Rules
|
|
78
|
+
|
|
79
|
+
- `listFirewallRules`, `getFirewallRule`, `createFirewallRule`, `deleteFirewallRule`
|
|
80
|
+
|
|
81
|
+
### SSH Keys
|
|
82
|
+
|
|
83
|
+
- `listSshKeys`, `getSshKey`, `createSshKey`, `deleteSshKey`
|
|
84
|
+
|
|
85
|
+
### Security Rules
|
|
86
|
+
|
|
87
|
+
- `listSecurityRules`, `getSecurityRule`, `createSecurityRule`, `deleteSecurityRule`
|
|
88
|
+
|
|
89
|
+
### Redirect Rules
|
|
90
|
+
|
|
91
|
+
- `listRedirectRules`, `getRedirectRule`, `createRedirectRule`, `deleteRedirectRule`
|
|
92
|
+
|
|
93
|
+
### Monitors
|
|
94
|
+
|
|
95
|
+
- `listMonitors`, `getMonitor`, `createMonitor`, `deleteMonitor`
|
|
96
|
+
|
|
97
|
+
### Nginx Templates
|
|
98
|
+
|
|
99
|
+
- `listNginxTemplates`, `getNginxTemplate`, `createNginxTemplate`, `updateNginxTemplate`, `deleteNginxTemplate`
|
|
100
|
+
|
|
101
|
+
### Recipes
|
|
102
|
+
|
|
103
|
+
- `listRecipes`, `getRecipe`, `createRecipe`, `deleteRecipe`, `runRecipe`
|
|
104
|
+
|
|
105
|
+
## Audit Logging
|
|
106
|
+
|
|
107
|
+
A shared audit logger for tracking write operations across MCP and CLI:
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
import { createAuditLogger } from "@studiometa/forge-core";
|
|
111
|
+
|
|
112
|
+
const logger = createAuditLogger("mcp"); // or 'cli'
|
|
113
|
+
|
|
114
|
+
logger.log({
|
|
115
|
+
source: "mcp",
|
|
116
|
+
resource: "servers",
|
|
117
|
+
action: "reboot",
|
|
118
|
+
args: { id: "123" },
|
|
119
|
+
status: "success",
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- Logs JSON lines via [pino](https://github.com/pinojs/pino) to `~/.config/forge-tools/audit.log`
|
|
124
|
+
- Override path with `FORGE_AUDIT_LOG` environment variable
|
|
125
|
+
- Sensitive fields (`apiToken`, `token`, `password`, `secret`, `key`, `credentials`) are automatically redacted
|
|
126
|
+
- Silent no-op on failure — never interrupts the actual operation
|
|
127
|
+
|
|
128
|
+
### Utilities
|
|
129
|
+
|
|
130
|
+
- `sanitizeArgs(args)` — Strip sensitive fields from an args object
|
|
131
|
+
- `getAuditLogPath()` — Resolve the audit log file path
|
|
132
|
+
|
|
133
|
+
## Testing
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { createTestExecutorContext } from "@studiometa/forge-core";
|
|
137
|
+
|
|
138
|
+
// Creates a context with a proxy client that throws on unmocked methods
|
|
139
|
+
const ctx = createTestExecutorContext();
|
|
140
|
+
|
|
141
|
+
// Override specific methods
|
|
142
|
+
const ctx = createTestExecutorContext({
|
|
143
|
+
client: {
|
|
144
|
+
get: async () => ({ servers: [{ id: 1, name: "test" }] }),
|
|
145
|
+
} as never,
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT © [Studio Meta](https://www.studiometa.fr)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All supported resources.
|
|
3
|
+
* Single source of truth — MCP schema and handlers derive from this.
|
|
4
|
+
*/
|
|
5
|
+
export declare const RESOURCES: readonly ["servers", "sites", "deployments", "certificates", "databases", "database-users", "daemons", "env", "nginx", "firewall-rules", "ssh-keys", "security-rules", "redirect-rules", "nginx-templates", "monitors", "recipes", "backups", "commands", "scheduled-jobs", "user"];
|
|
6
|
+
export type Resource = (typeof RESOURCES)[number];
|
|
7
|
+
/**
|
|
8
|
+
* All supported actions.
|
|
9
|
+
* Single source of truth — MCP schema and handlers derive from this.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ACTIONS: readonly ["list", "get", "create", "update", "delete", "deploy", "reboot", "restart", "activate", "run", "help", "schema"];
|
|
12
|
+
export type Action = (typeof ACTIONS)[number];
|
|
13
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,SAAS,qRAqBZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,OAAO,4HAaV,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { HttpClient } from "@studiometa/forge-api";
|
|
2
|
+
/**
|
|
3
|
+
* Execution context injected into all executors.
|
|
4
|
+
*
|
|
5
|
+
* Provides access to the HTTP client and other dependencies.
|
|
6
|
+
* Uses DI for testability — tests inject mocks via `createTestExecutorContext()`.
|
|
7
|
+
*/
|
|
8
|
+
export interface ExecutorContext {
|
|
9
|
+
/** HTTP client for Forge API calls. */
|
|
10
|
+
client: HttpClient;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Result of an executor function.
|
|
14
|
+
*/
|
|
15
|
+
export interface ExecutorResult<T> {
|
|
16
|
+
/** The response data. */
|
|
17
|
+
data: T;
|
|
18
|
+
/** Pagination metadata (for list operations). */
|
|
19
|
+
meta?: {
|
|
20
|
+
total_count?: number;
|
|
21
|
+
current_page?: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create a test executor context with a mock HTTP client.
|
|
26
|
+
*
|
|
27
|
+
* @param overrides Partial overrides for the context.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createTestExecutorContext(overrides?: Partial<ExecutorContext>): ExecutorContext;
|
|
30
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,yBAAyB;IACzB,IAAI,EAAE,CAAC,CAAC;IACR,iDAAiD;IACjD,IAAI,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GACvC,eAAe,CAejB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeBackupConfig } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { CreateBackupConfigOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Create a new backup configuration.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createBackupConfig(options: CreateBackupConfigOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeBackupConfig>>;
|
|
8
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/executors/backups/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,EAClC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAW5C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
2
|
+
import type { DeleteBackupConfigOptions } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Delete a backup configuration.
|
|
5
|
+
*/
|
|
6
|
+
export declare function deleteBackupConfig(options: DeleteBackupConfigOptions, ctx: ExecutorContext): Promise<ExecutorResult<void>>;
|
|
7
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/executors/backups/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,EAClC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAM/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeBackupConfig } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { GetBackupConfigOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Get a specific backup configuration.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getBackupConfig(options: GetBackupConfigOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeBackupConfig>>;
|
|
8
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/executors/backups/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,EAC/B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAS5C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createBackupConfig } from "./create.ts";
|
|
2
|
+
export { deleteBackupConfig } from "./delete.ts";
|
|
3
|
+
export { getBackupConfig } from "./get.ts";
|
|
4
|
+
export { listBackupConfigs } from "./list.ts";
|
|
5
|
+
export type { CreateBackupConfigOptions, DeleteBackupConfigOptions, GetBackupConfigOptions, ListBackupConfigsOptions, } from "./types.ts";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/executors/backups/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeBackupConfig } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { ListBackupConfigsOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* List backup configurations for a server.
|
|
6
|
+
*/
|
|
7
|
+
export declare function listBackupConfigs(options: ListBackupConfigsOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeBackupConfig[]>>;
|
|
8
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/executors/backups/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAS9C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Option types for backup configuration executors.
|
|
3
|
+
*/
|
|
4
|
+
import type { CreateBackupConfigData } from "@studiometa/forge-api";
|
|
5
|
+
/**
|
|
6
|
+
* Options for listing backup configurations for a server.
|
|
7
|
+
*/
|
|
8
|
+
export interface ListBackupConfigsOptions {
|
|
9
|
+
server_id: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options for getting a single backup configuration.
|
|
13
|
+
*/
|
|
14
|
+
export interface GetBackupConfigOptions {
|
|
15
|
+
server_id: string;
|
|
16
|
+
id: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Options for creating a backup configuration.
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateBackupConfigOptions extends CreateBackupConfigData {
|
|
22
|
+
server_id: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Options for deleting a backup configuration.
|
|
26
|
+
*/
|
|
27
|
+
export interface DeleteBackupConfigOptions {
|
|
28
|
+
server_id: string;
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executors/backups/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
2
|
+
import type { ActivateCertificateOptions } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Activate an SSL certificate.
|
|
5
|
+
*/
|
|
6
|
+
export declare function activateCertificate(options: ActivateCertificateOptions, ctx: ExecutorContext): Promise<ExecutorResult<void>>;
|
|
7
|
+
//# sourceMappingURL=activate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activate.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/activate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,EACnC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAS/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeCertificate } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { CreateCertificateOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Create a new SSL certificate.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCertificate(options: CreateCertificateOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeCertificate>>;
|
|
8
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAW3C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
2
|
+
import type { DeleteCertificateOptions } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Delete an SSL certificate.
|
|
5
|
+
*/
|
|
6
|
+
export declare function deleteCertificate(options: DeleteCertificateOptions, ctx: ExecutorContext): Promise<ExecutorResult<void>>;
|
|
7
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAQ/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeCertificate } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { GetCertificateOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Get a single SSL certificate.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getCertificate(options: GetCertificateOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeCertificate>>;
|
|
8
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAS3C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { activateCertificate } from "./activate.ts";
|
|
2
|
+
export { createCertificate } from "./create.ts";
|
|
3
|
+
export { deleteCertificate } from "./delete.ts";
|
|
4
|
+
export { getCertificate } from "./get.ts";
|
|
5
|
+
export { listCertificates } from "./list.ts";
|
|
6
|
+
export type { ActivateCertificateOptions, CreateCertificateOptions, DeleteCertificateOptions, GetCertificateOptions, ListCertificatesOptions, } from "./types.ts";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeCertificate } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { ListCertificatesOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* List SSL certificates for a site.
|
|
6
|
+
*/
|
|
7
|
+
export declare function listCertificates(options: ListCertificatesOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeCertificate[]>>;
|
|
8
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,EAChC,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAS7C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Option types for certificate executors.
|
|
3
|
+
*/
|
|
4
|
+
import type { CreateCertificateData } from "@studiometa/forge-api";
|
|
5
|
+
/**
|
|
6
|
+
* Options for listing SSL certificates for a site.
|
|
7
|
+
*/
|
|
8
|
+
export interface ListCertificatesOptions {
|
|
9
|
+
server_id: string;
|
|
10
|
+
site_id: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Options for getting a single SSL certificate.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetCertificateOptions {
|
|
16
|
+
server_id: string;
|
|
17
|
+
site_id: string;
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Options for creating an SSL certificate.
|
|
22
|
+
*/
|
|
23
|
+
export interface CreateCertificateOptions extends CreateCertificateData {
|
|
24
|
+
server_id: string;
|
|
25
|
+
site_id: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Options for deleting an SSL certificate.
|
|
29
|
+
*/
|
|
30
|
+
export interface DeleteCertificateOptions {
|
|
31
|
+
server_id: string;
|
|
32
|
+
site_id: string;
|
|
33
|
+
id: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Options for activating an SSL certificate.
|
|
37
|
+
*/
|
|
38
|
+
export interface ActivateCertificateOptions {
|
|
39
|
+
server_id: string;
|
|
40
|
+
site_id: string;
|
|
41
|
+
id: string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executors/certificates/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeCommand } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { CreateCommandOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Execute a command on a site.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCommand(options: CreateCommandOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeCommand>>;
|
|
8
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/executors/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAUvC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeCommand } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { GetCommandOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Get a specific command.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getCommand(options: GetCommandOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeCommand>>;
|
|
8
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/executors/commands/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CASvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/executors/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeCommand } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { ListCommandsOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* List commands executed on a site.
|
|
6
|
+
*/
|
|
7
|
+
export declare function listCommands(options: ListCommandsOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeCommand[]>>;
|
|
8
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/executors/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;GAEG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC,CAAC,CASzC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Option types for command executors.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Options for listing commands executed on a site.
|
|
6
|
+
*/
|
|
7
|
+
export interface ListCommandsOptions {
|
|
8
|
+
server_id: string;
|
|
9
|
+
site_id: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options for getting a single command.
|
|
13
|
+
*/
|
|
14
|
+
export interface GetCommandOptions {
|
|
15
|
+
server_id: string;
|
|
16
|
+
site_id: string;
|
|
17
|
+
id: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Options for executing a command on a site.
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateCommandOptions {
|
|
23
|
+
server_id: string;
|
|
24
|
+
site_id: string;
|
|
25
|
+
command: string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executors/commands/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeDaemon } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { CreateDaemonOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Create a new daemon (background process).
|
|
6
|
+
*/
|
|
7
|
+
export declare function createDaemon(options: CreateDaemonOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeDaemon>>;
|
|
8
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/executors/daemons/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;GAEG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAQtC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
2
|
+
import type { DeleteDaemonOptions } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Delete a daemon.
|
|
5
|
+
*/
|
|
6
|
+
export declare function deleteDaemon(options: DeleteDaemonOptions, ctx: ExecutorContext): Promise<ExecutorResult<void>>;
|
|
7
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/executors/daemons/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;GAEG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAM/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeDaemon } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { GetDaemonOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Get a single daemon.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getDaemon(options: GetDaemonOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeDaemon>>;
|
|
8
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/executors/daemons/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAStC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { createDaemon } from "./create.ts";
|
|
2
|
+
export { deleteDaemon } from "./delete.ts";
|
|
3
|
+
export { getDaemon } from "./get.ts";
|
|
4
|
+
export { listDaemons } from "./list.ts";
|
|
5
|
+
export { restartDaemon } from "./restart.ts";
|
|
6
|
+
export type { CreateDaemonOptions, DeleteDaemonOptions, GetDaemonOptions, ListDaemonsOptions, RestartDaemonOptions, } from "./types.ts";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/executors/daemons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForgeDaemon } from "@studiometa/forge-api";
|
|
2
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
3
|
+
import type { ListDaemonsOptions } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* List daemons (background processes) on a server.
|
|
6
|
+
*/
|
|
7
|
+
export declare function listDaemons(options: ListDaemonsOptions, ctx: ExecutorContext): Promise<ExecutorResult<ForgeDaemon[]>>;
|
|
8
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/executors/daemons/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC,CAOxC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutorContext, ExecutorResult } from "../../context.ts";
|
|
2
|
+
import type { RestartDaemonOptions } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Restart a daemon.
|
|
5
|
+
*/
|
|
6
|
+
export declare function restartDaemon(options: RestartDaemonOptions, ctx: ExecutorContext): Promise<ExecutorResult<void>>;
|
|
7
|
+
//# sourceMappingURL=restart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restart.d.ts","sourceRoot":"","sources":["../../../src/executors/daemons/restart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAM/B"}
|