@brainervirus/workit-core 8.22.2 → 8.22.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/package.json
CHANGED
|
@@ -1068,10 +1068,6 @@ export const advertisedOperationSchemas = {
|
|
|
1068
1068
|
} as const;
|
|
1069
1069
|
export type TaskStartRequest = z.infer<typeof taskOperations.start>;
|
|
1070
1070
|
|
|
1071
|
-
const compiledOperationSchemas = Object.fromEntries(
|
|
1072
|
-
OPERATION_FAMILIES.map((family) => [family, z.compile(operationSchemas[family])]),
|
|
1073
|
-
) as typeof operationSchemas;
|
|
1074
|
-
|
|
1075
1071
|
export type Id = string;
|
|
1076
1072
|
export type Revision = string;
|
|
1077
1073
|
export type Digest = string;
|
|
@@ -1165,8 +1161,7 @@ export function parseOperation(family: OperationFamily, input: unknown): Result<
|
|
|
1165
1161
|
(input as { schemaVersion?: unknown }).schemaVersion !== SCHEMA_VERSION
|
|
1166
1162
|
)
|
|
1167
1163
|
return failure("unsupported_version", "unsupported schema version", { operation: family });
|
|
1168
|
-
const
|
|
1169
|
-
const parsed = compiled.success ? operationSchemas[family].safeParse(input) : compiled;
|
|
1164
|
+
const parsed = operationSchemas[family].safeParse(input);
|
|
1170
1165
|
if (parsed.success) return success(null, null, parsed.data);
|
|
1171
1166
|
const fields = parsed.error.issues.map((issue) => ({
|
|
1172
1167
|
path: issue.code === "unrecognized_keys" ? issue.keys.join(".") : issue.path.join("."),
|