feat: release 2.7.0-rc2

This commit is contained in:
2026-10-06 15:31:51 +00:00 Unverified
parent cd9fb512cd
commit c8de9ddcba
42 changed files with 6127 additions and 593 deletions
+22 -4
View File
@@ -16,10 +16,28 @@ let composeSchema: Promise<z.ZodType<ComposeSpecification>> | undefined;
function getComposeSchema(): Promise<z.ZodType<ComposeSpecification>> {
if (!composeSchema) {
composeSchema = import("../schema/docker.ts")
.then(({ default: schema }) =>
z.fromJSONSchema(
schema as unknown as Parameters<typeof z.fromJSONSchema>[0],
) as z.ZodType<ComposeSpecification>,
.then(
({ default: schema }) =>
z
.fromJSONSchema(
schema as unknown as Parameters<typeof z.fromJSONSchema>[0],
)
.superRefine((value, context) => {
if (!value || typeof value !== "object" || Array.isArray(value))
return;
for (const key of Object.keys(value)) {
if (
Object.hasOwn(schema.properties, key) ||
key.startsWith("x-")
)
continue;
context.addIssue({
code: "custom",
path: [key],
message: `Unrecognized Compose property: ${key}`,
});
}
}) as z.ZodType<ComposeSpecification>,
)
.catch((error) => {
composeSchema = undefined;