fix: wire XOR validation to production + check abort signal after auth await

- Apply zComboInputOptionsValidated (which enforces remote XOR remote_combo) inside zComboInputSpec/V2 so the refinement actually runs during validateComfyNodeDef parsing. Previously zComboInputOptions (without refinement) was used and the XOR check only fired in standalone unit tests.
- After awaiting authStore.getAuthHeader() in executeRemoteRequest, check signal.aborted and throw AbortError if the request was canceled during the await — keeps abort semantics correct when a component unmounts mid-fetch.
This commit is contained in:
Glary-Bot
2026-05-22 00:04:51 +00:00
parent 25d40db2aa
commit b99b4e825b
2 changed files with 5 additions and 2 deletions

View File

@@ -35,6 +35,9 @@ async function executeRemoteRequest(
if (descriptor.client === 'comfyApi') {
const authStore = useAuthStore()
const authHeader = await authStore.getAuthHeader()
if (signal.aborted) {
throw new DOMException('Aborted', 'AbortError')
}
headers = authHeader ? { ...authHeader } : undefined
}
const url = resolveUrl(descriptor, getComfyApiBaseUrl())

View File

@@ -160,11 +160,11 @@ const zStringInputSpec = z.tuple([
*/
const zComboInputSpec = z.tuple([
z.array(zComboOption),
zComboInputOptions.optional()
zComboInputOptionsValidated.optional()
])
const zComboInputSpecV2 = z.tuple([
z.literal('COMBO'),
zComboInputOptions.optional()
zComboInputOptionsValidated.optional()
])
export function isComboInputSpecV1(