eslint and build
Some checks failed
CI / Rustfmt (push) Successful in 22s
CI / Cargo Audit & Deny (push) Failing after 32s
CI / Web Blocking Checks (push) Successful in 47s
CI / Security Blocking Checks (push) Successful in 9s
CI / Clippy (push) Successful in 2m9s
CI / Web Advisory Checks (push) Successful in 37s
CI / Security Advisory Checks (push) Successful in 34s
CI / Tests (push) Failing after 8m37s

This commit is contained in:
2026-03-05 08:18:07 -06:00
parent 179180d604
commit c61fe26713
9 changed files with 51 additions and 27 deletions

View File

@@ -4,7 +4,9 @@ import { useCreatePack, useUpdatePack } from "@/hooks/usePacks";
import type { PackResponse } from "@/api";
import { labelToRef } from "@/lib/format-utils";
import SchemaBuilder from "@/components/common/SchemaBuilder";
import ParamSchemaForm from "@/components/common/ParamSchemaForm";
import ParamSchemaForm, {
type ParamSchema,
} from "@/components/common/ParamSchemaForm";
import { RotateCcw } from "lucide-react";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -603,7 +605,7 @@ export default function PackForm({ pack, onSuccess, onCancel }: PackFormProps) {
</p>
</div>
<ParamSchemaForm
schema={confSchema}
schema={confSchema as unknown as ParamSchema}
values={configValues}
onChange={setConfigValues}
errors={errors}

View File

@@ -15,6 +15,7 @@ import type {
TriggerResponse,
ActionResponse,
} from "@/types/api";
import type { CreateRuleRequest, UpdateRuleRequest } from "@/api";
import { labelToRef, extractLocalRef, combineRefs } from "@/lib/format-utils";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -205,7 +206,7 @@ export default function RuleForm({ rule, onSuccess, onCancel }: RuleFormProps) {
// Combine pack ref and local ref to create full ref
const fullRef = combineRefs(selectedPackData?.ref || "", localRef.trim());
const formData: Record<string, JsonValue> = {
const formData: Record<string, JsonValue> & Partial<CreateRuleRequest> = {
pack_ref: selectedPackData?.ref || "",
ref: fullRef,
label: label.trim(),
@@ -232,9 +233,14 @@ export default function RuleForm({ rule, onSuccess, onCancel }: RuleFormProps) {
try {
if (isEditing && rule) {
await updateRule.mutateAsync({ ref: rule.ref, data: formData });
await updateRule.mutateAsync({
ref: rule.ref,
data: formData as unknown as UpdateRuleRequest,
});
} else {
const newRuleResponse = await createRule.mutateAsync(formData);
const newRuleResponse = await createRule.mutateAsync(
formData as unknown as CreateRuleRequest,
);
if (!onSuccess) {
navigate(`/rules/${newRuleResponse.data.ref}`);
}

View File

@@ -68,7 +68,9 @@ export default function TriggerForm({
setPackId(pack.id);
}
// Extract local ref from full ref
setLocalRef(extractLocalRef(initialData.ref, initialData.pack_ref));
setLocalRef(
extractLocalRef(initialData.ref, initialData.pack_ref ?? undefined),
);
}
}
}, [initialData, packs, isEditing]);

View File

@@ -213,7 +213,9 @@ export default function WorkflowInputsPanel({
<SchemaBuilder
value={draftSchema}
onChange={(schema) =>
setDraftSchema(schema as Record<string, ParamDefinition>)
setDraftSchema(
schema as unknown as Record<string, ParamDefinition>,
)
}
placeholder={
modalTarget === "parameters"