@jurislm/coolify-plugin 4.0.2 → 4.0.4
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/.codex-plugin/plugin.json +1 -1
- package/api/manifest.json +9 -3
- package/dist/client.js +19 -4
- package/dist/generated/coolify-api.d.ts +299 -86
- package/dist/generated/coolify-zod.d.ts +11 -11
- package/dist/generated/coolify-zod.js +6 -6
- package/dist/generated/operations.js +57 -57
- package/openapi/coolify-openapi.json +837 -112
- package/package.json +1 -1
- package/plugin.json +1 -1
package/api/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sourceUrl": "https://raw.githubusercontent.com/coollabsio/coolify/v4.3.23/openapi.json",
|
|
3
|
-
"fetchedAt": "2026-09-
|
|
4
|
-
"sha256": "
|
|
3
|
+
"fetchedAt": "2026-09-25T02:22:36.551Z",
|
|
4
|
+
"sha256": "cdada83c8199f7b517bb19049ce7cb18773acee51f2fbadfb5a8370bd9d5f892",
|
|
5
5
|
"upstreamSha256": "964360ffb3d4c026252aa4657d6561190f59ac4256395bf0645bf6a4f171ec88",
|
|
6
6
|
"openapiVersion": "3.1.0",
|
|
7
7
|
"infoVersion": "0.1",
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
"Unsupported server validation operation removed",
|
|
16
16
|
"Database PATCH omits unspecified health-check defaults",
|
|
17
17
|
"Server reachability and service status are response fields",
|
|
18
|
-
"Server metadata, deployment git type, and environment descriptions can be null"
|
|
18
|
+
"Server metadata, deployment git type, and environment descriptions can be null",
|
|
19
|
+
"Database responses and nullable service hash match live Coolify payloads",
|
|
20
|
+
"Application settings, destination lists, shared environment variables, and log drain nulls match live responses",
|
|
21
|
+
"Shared environment variable writes accept bodies and return live response shapes",
|
|
22
|
+
"Plain Dockerfile input is encoded for the API",
|
|
23
|
+
"Cloud-init, notifications, GitHub apps, private keys, and team metadata match live response shapes",
|
|
24
|
+
"Resource creation accepts either environment name or UUID as documented"
|
|
19
25
|
]
|
|
20
26
|
}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoolifyApiError } from "./errors.js";
|
|
2
|
-
const sensitiveKey = /(^value$|real_?value|private_?key|token|secret|password|authorization|cookie)/iu;
|
|
2
|
+
const sensitiveKey = /(^value$|real_?value|private_?key|api_?key|user_?key|webhook_?url|token|secret|password|authorization|cookie)/iu;
|
|
3
3
|
export function redactSensitive(value) {
|
|
4
4
|
if (Array.isArray(value))
|
|
5
5
|
return value.map(redactSensitive);
|
|
@@ -59,7 +59,10 @@ export class CoolifyClient {
|
|
|
59
59
|
const init = { method: operation.method, headers, signal: AbortSignal.timeout(this.config.timeoutMs) };
|
|
60
60
|
if (input.body !== undefined && !["GET", "HEAD"].includes(operation.method)) {
|
|
61
61
|
headers.set("content-type", "application/json");
|
|
62
|
-
|
|
62
|
+
const body = input.body;
|
|
63
|
+
init.body = JSON.stringify(operation.path === "/applications/dockerfile" && typeof body.dockerfile === "string"
|
|
64
|
+
? { ...body, dockerfile: Buffer.from(body.dockerfile, "utf8").toString("base64") }
|
|
65
|
+
: body);
|
|
63
66
|
}
|
|
64
67
|
let response;
|
|
65
68
|
try {
|
|
@@ -68,8 +71,20 @@ export class CoolifyClient {
|
|
|
68
71
|
catch (error) {
|
|
69
72
|
throw new CoolifyApiError(0, operation.method, path, `Coolify request failed for ${operation.method} ${path}: ${error instanceof Error ? error.message.replaceAll(token, "[REDACTED]") : "request error"}`);
|
|
70
73
|
}
|
|
71
|
-
if (!response.ok)
|
|
72
|
-
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
let fields = "";
|
|
76
|
+
if (response.status === 422) {
|
|
77
|
+
try {
|
|
78
|
+
const body = await response.json();
|
|
79
|
+
const errors = body?.errors;
|
|
80
|
+
if (errors && typeof errors === "object" && !Array.isArray(errors)) {
|
|
81
|
+
fields = Object.keys(errors).filter((key) => /^[a-z][a-z0-9_.-]{0,63}$/iu.test(key)).slice(0, 8).map((key) => key.replaceAll(token, "[REDACTED]")).join(", ");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch { }
|
|
85
|
+
}
|
|
86
|
+
throw new CoolifyApiError(response.status, operation.method, path, `Coolify API returned ${response.status} for ${operation.method} ${path}${fields ? `; fields: ${fields}` : ""}`);
|
|
87
|
+
}
|
|
73
88
|
let data = null;
|
|
74
89
|
if (response.status !== 204) {
|
|
75
90
|
const contentType = response.headers.get("content-type")?.toLowerCase() ?? "";
|