vibora 7.5.2 → 7.5.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/bin/vibora.js +1 -1
- package/package.json +1 -1
- package/server/index.js +36 -23
package/bin/vibora.js
CHANGED
|
@@ -32629,7 +32629,7 @@ function installUv() {
|
|
|
32629
32629
|
var package_default = {
|
|
32630
32630
|
name: "vibora",
|
|
32631
32631
|
private: true,
|
|
32632
|
-
version: "7.5.
|
|
32632
|
+
version: "7.5.3",
|
|
32633
32633
|
description: "Harness Attention. Orchestrate Agents. Ship.",
|
|
32634
32634
|
license: "PolyForm-Shield-1.0.0",
|
|
32635
32635
|
type: "module",
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -178317,7 +178317,11 @@ async function checkConfigDirWritable(configDir) {
|
|
|
178317
178317
|
return false;
|
|
178318
178318
|
}
|
|
178319
178319
|
}
|
|
178320
|
-
function getConfigFilename(appId) {
|
|
178320
|
+
function getConfigFilename(appId, appName) {
|
|
178321
|
+
if (appName) {
|
|
178322
|
+
const sanitized = appName.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
178323
|
+
return `vibora-${sanitized}-${appId}.yml`;
|
|
178324
|
+
}
|
|
178321
178325
|
return `vibora-${appId}.yml`;
|
|
178322
178326
|
}
|
|
178323
178327
|
async function checkRouteConflict(configDir, domain, currentAppId) {
|
|
@@ -178356,7 +178360,7 @@ async function addRoute(config, appId, domain, upstreamUrl, options) {
|
|
|
178356
178360
|
return { success: false, error };
|
|
178357
178361
|
}
|
|
178358
178362
|
const routerId = `vibora-${appId}`;
|
|
178359
|
-
const filename = getConfigFilename(appId);
|
|
178363
|
+
const filename = getConfigFilename(appId, options?.appName);
|
|
178360
178364
|
const filepath = join19(config.configDir, filename);
|
|
178361
178365
|
let tlsConfig;
|
|
178362
178366
|
let tlsStores;
|
|
@@ -178426,22 +178430,33 @@ async function addRoute(config, appId, domain, upstreamUrl, options) {
|
|
|
178426
178430
|
return { success: false, error };
|
|
178427
178431
|
}
|
|
178428
178432
|
}
|
|
178429
|
-
async function removeRoute(config, appId) {
|
|
178430
|
-
const
|
|
178431
|
-
|
|
178432
|
-
|
|
178433
|
-
|
|
178434
|
-
|
|
178435
|
-
|
|
178436
|
-
|
|
178437
|
-
|
|
178433
|
+
async function removeRoute(config, appId, appName) {
|
|
178434
|
+
const filesToTry = [
|
|
178435
|
+
appName ? getConfigFilename(appId, appName) : null,
|
|
178436
|
+
getConfigFilename(appId)
|
|
178437
|
+
].filter(Boolean);
|
|
178438
|
+
let deleted = false;
|
|
178439
|
+
let lastError;
|
|
178440
|
+
for (const filename of filesToTry) {
|
|
178441
|
+
const filepath = join19(config.configDir, filename);
|
|
178442
|
+
try {
|
|
178443
|
+
await unlink2(filepath);
|
|
178444
|
+
log2.deploy.info("Removed Traefik route", { appId, filepath });
|
|
178445
|
+
deleted = true;
|
|
178446
|
+
} catch (err) {
|
|
178447
|
+
if (err.code !== "ENOENT") {
|
|
178448
|
+
lastError = err instanceof Error ? err.message : String(err);
|
|
178449
|
+
}
|
|
178450
|
+
}
|
|
178451
|
+
}
|
|
178452
|
+
if (deleted || !lastError) {
|
|
178453
|
+
if (!deleted) {
|
|
178438
178454
|
log2.deploy.debug("Traefik route file not found, nothing to remove", { appId });
|
|
178439
|
-
return { success: true };
|
|
178440
178455
|
}
|
|
178441
|
-
|
|
178442
|
-
log2.deploy.error("Failed to remove Traefik route", { appId, error });
|
|
178443
|
-
return { success: false, error };
|
|
178456
|
+
return { success: true };
|
|
178444
178457
|
}
|
|
178458
|
+
log2.deploy.error("Failed to remove Traefik route", { appId, error: lastError });
|
|
178459
|
+
return { success: false, error: lastError };
|
|
178445
178460
|
}
|
|
178446
178461
|
|
|
178447
178462
|
// server/services/traefik-docker.ts
|
|
@@ -179000,16 +179015,14 @@ async function deployApp(appId, options = {}, onProgress) {
|
|
|
179000
179015
|
const [subdomain, ...domainParts] = service.domain.split(".");
|
|
179001
179016
|
const rootDomain = domainParts.join(".");
|
|
179002
179017
|
const upstreamUrl = `http://${projectName}_${service.serviceName}:${service.containerPort}`;
|
|
179003
|
-
|
|
179018
|
+
const routeOptions = { appName: app15.name };
|
|
179004
179019
|
if (settings.integrations.cloudflareApiToken && rootDomain) {
|
|
179005
179020
|
onProgress?.({ stage: "configuring", message: `Generating SSL certificate for ${rootDomain}...` });
|
|
179006
179021
|
const certResult = await createOriginCACertificate(rootDomain);
|
|
179007
179022
|
if (certResult.success && certResult.certPath && certResult.keyPath) {
|
|
179008
|
-
routeOptions = {
|
|
179009
|
-
|
|
179010
|
-
|
|
179011
|
-
keyFile: `${TRAEFIK_CERTS_MOUNT}/${rootDomain}/key.pem`
|
|
179012
|
-
}
|
|
179023
|
+
routeOptions.tlsCert = {
|
|
179024
|
+
certFile: `${TRAEFIK_CERTS_MOUNT}/${rootDomain}/cert.pem`,
|
|
179025
|
+
keyFile: `${TRAEFIK_CERTS_MOUNT}/${rootDomain}/key.pem`
|
|
179013
179026
|
};
|
|
179014
179027
|
log2.deploy.info("Using Origin CA certificate for TLS", {
|
|
179015
179028
|
domain: service.domain,
|
|
@@ -179246,7 +179259,7 @@ async function stopApp(appId) {
|
|
|
179246
179259
|
for (const service of services) {
|
|
179247
179260
|
if (service.exposed && service.domain) {
|
|
179248
179261
|
if (traefikConfig) {
|
|
179249
|
-
await removeRoute(traefikConfig, appId);
|
|
179262
|
+
await removeRoute(traefikConfig, appId, app15.name);
|
|
179250
179263
|
}
|
|
179251
179264
|
const [subdomain, ...domainParts] = service.domain.split(".");
|
|
179252
179265
|
const rootDomain = domainParts.join(".");
|
|
@@ -179745,7 +179758,7 @@ app15.delete("/:id", async (c) => {
|
|
|
179745
179758
|
}
|
|
179746
179759
|
const traefikConfig = await detectTraefik();
|
|
179747
179760
|
if (traefikConfig) {
|
|
179748
|
-
await removeRoute(traefikConfig, id).catch((err) => {
|
|
179761
|
+
await removeRoute(traefikConfig, id, existing.name).catch((err) => {
|
|
179749
179762
|
log2.deploy.warn("Failed to remove Traefik route during app deletion", {
|
|
179750
179763
|
appId: id,
|
|
179751
179764
|
error: String(err)
|