Skip to content

Commit b5b5a10

Browse files
Copilotmrlubos
andcommitted
fix(client-nuxt): add AbortSignal, FormData, ReadableStream as pass-through in unwrapRefs
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
1 parent aec3b68 commit b5b5a10

14 files changed

Lines changed: 115 additions & 13 deletions

File tree

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/utils.gen.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
346346
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
347347
}
348348

349-
if (value instanceof Blob) {
349+
if (
350+
value instanceof Blob ||
351+
value instanceof FormData ||
352+
value instanceof ReadableStream ||
353+
value instanceof AbortSignal
354+
) {
350355
return value as UnwrapRefs<T>;
351356
}
352357

0 commit comments

Comments
 (0)