Merge dev into fix/log-analytics-adjustments

This commit is contained in:
Fred KISSIE
2025-12-10 03:19:14 +01:00
parent 9db2feff77
commit d490cab48c
555 changed files with 9375 additions and 9287 deletions

View File

@@ -45,8 +45,8 @@ registry.registerPath({
});
const pickSiteDefaultsSchema = z.strictObject({
orgId: z.string()
});
orgId: z.string()
});
export async function pickSiteDefaults(
req: Request,
@@ -74,7 +74,10 @@ export async function pickSiteDefaults(
if (!randomExitNode) {
return next(
createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "No available exit node")
createHttpError(
HttpCode.INTERNAL_SERVER_ERROR,
"No available exit node"
)
);
}
@@ -90,7 +93,10 @@ export async function pickSiteDefaults(
// TODO: we need to lock this subnet for some time so someone else does not take it
const subnets = sitesQuery
.map((site) => site.subnet)
.filter((subnet) => subnet && /^(\d{1,3}\.){3}\d{1,3}\/\d{1,2}$/.test(subnet))
.filter(
(subnet) =>
subnet && /^(\d{1,3}\.){3}\d{1,3}\/\d{1,2}$/.test(subnet)
)
.filter((subnet) => subnet !== null);
// exclude the exit node address by replacing after the / with a site block size
subnets.push(