@mks2508/coolify-mks-cli-mcp 0.4.2 → 0.4.3
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/cli/index.js +6 -5
- package/dist/coolify/index.d.ts.map +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/server/stdio.js +6 -5
- package/package.json +1 -1
- package/src/coolify/index.ts +7 -6
package/dist/server/stdio.js
CHANGED
|
@@ -17299,13 +17299,14 @@ class CoolifyService {
|
|
|
17299
17299
|
const listResult = await this.request(`/applications/${appUuid}/envs`);
|
|
17300
17300
|
const existing = listResult.data?.find((v) => v.key === key);
|
|
17301
17301
|
if (existing) {
|
|
17302
|
-
|
|
17303
|
-
|
|
17302
|
+
await this.request(`/applications/${appUuid}/envs/${existing.uuid}`, { method: "DELETE" });
|
|
17303
|
+
const repost = await this.request(`/applications/${appUuid}/envs`, {
|
|
17304
|
+
method: "POST",
|
|
17304
17305
|
body: JSON.stringify({ key, value, is_preview: false })
|
|
17305
17306
|
});
|
|
17306
|
-
if (
|
|
17307
|
-
log.error(`Failed to update env var ${key}: ${
|
|
17308
|
-
return err(new Error(`Failed to update ${key}: ${
|
|
17307
|
+
if (repost.error) {
|
|
17308
|
+
log.error(`Failed to update env var ${key}: ${repost.error}`);
|
|
17309
|
+
return err(new Error(`Failed to update ${key}: ${repost.error}`));
|
|
17309
17310
|
}
|
|
17310
17311
|
log.debug(`Updated existing env var: ${key}`);
|
|
17311
17312
|
} else {
|
package/package.json
CHANGED
package/src/coolify/index.ts
CHANGED
|
@@ -372,17 +372,18 @@ export class CoolifyService {
|
|
|
372
372
|
})
|
|
373
373
|
|
|
374
374
|
if (result.error && result.error.includes('already exists')) {
|
|
375
|
-
// Var exists —
|
|
375
|
+
// Var exists — DELETE + re-POST (Coolify PATCH on envs returns 404)
|
|
376
376
|
const listResult = await this.request<Array<{ uuid: string; key: string }>>(`/applications/${appUuid}/envs`)
|
|
377
377
|
const existing = listResult.data?.find((v) => v.key === key)
|
|
378
378
|
if (existing) {
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
await this.request(`/applications/${appUuid}/envs/${existing.uuid}`, { method: 'DELETE' })
|
|
380
|
+
const repost = await this.request(`/applications/${appUuid}/envs`, {
|
|
381
|
+
method: 'POST',
|
|
381
382
|
body: JSON.stringify({ key, value, is_preview: false }),
|
|
382
383
|
})
|
|
383
|
-
if (
|
|
384
|
-
log.error(`Failed to update env var ${key}: ${
|
|
385
|
-
return err(new Error(`Failed to update ${key}: ${
|
|
384
|
+
if (repost.error) {
|
|
385
|
+
log.error(`Failed to update env var ${key}: ${repost.error}`)
|
|
386
|
+
return err(new Error(`Failed to update ${key}: ${repost.error}`))
|
|
386
387
|
}
|
|
387
388
|
log.debug(`Updated existing env var: ${key}`)
|
|
388
389
|
} else {
|