mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 02:06:41 +00:00
Format all files
This commit is contained in:
@@ -34,7 +34,10 @@ export async function applyNewtDockerBlueprint(
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEmptyObject(blueprint["proxy-resources"]) && isEmptyObject(blueprint["client-resources"])) {
|
||||
if (
|
||||
isEmptyObject(blueprint["proxy-resources"]) &&
|
||||
isEmptyObject(blueprint["client-resources"])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,12 +84,20 @@ export function processContainerLabels(containers: Container[]): {
|
||||
|
||||
// Process proxy resources
|
||||
if (Object.keys(proxyResourceLabels).length > 0) {
|
||||
processResourceLabels(proxyResourceLabels, container, result["proxy-resources"]);
|
||||
processResourceLabels(
|
||||
proxyResourceLabels,
|
||||
container,
|
||||
result["proxy-resources"]
|
||||
);
|
||||
}
|
||||
|
||||
// Process client resources
|
||||
if (Object.keys(clientResourceLabels).length > 0) {
|
||||
processResourceLabels(clientResourceLabels, container, result["client-resources"]);
|
||||
processResourceLabels(
|
||||
clientResourceLabels,
|
||||
container,
|
||||
result["client-resources"]
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -161,8 +169,7 @@ function processResourceLabels(
|
||||
const finalTarget = { ...target };
|
||||
if (!finalTarget.hostname) {
|
||||
finalTarget.hostname =
|
||||
container.name ||
|
||||
container.hostname;
|
||||
container.name || container.hostname;
|
||||
}
|
||||
if (!finalTarget.port) {
|
||||
const containerPort =
|
||||
|
||||
@@ -312,7 +312,7 @@ export const ConfigSchema = z
|
||||
};
|
||||
delete (data as any)["public-resources"];
|
||||
}
|
||||
|
||||
|
||||
// Merge private-resources into client-resources
|
||||
if (data["private-resources"]) {
|
||||
data["client-resources"] = {
|
||||
@@ -321,10 +321,13 @@ export const ConfigSchema = z
|
||||
};
|
||||
delete (data as any)["private-resources"];
|
||||
}
|
||||
|
||||
|
||||
return data as {
|
||||
"proxy-resources": Record<string, z.infer<typeof ResourceSchema>>;
|
||||
"client-resources": Record<string, z.infer<typeof ClientResourceSchema>>;
|
||||
"client-resources": Record<
|
||||
string,
|
||||
z.infer<typeof ClientResourceSchema>
|
||||
>;
|
||||
sites: Record<string, z.infer<typeof SiteSchema>>;
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user