Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changeset/clever-dragons-make.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@example/openapi-ts-tanstack-angular-query-experimental': patch
'@example/openapi-ts-tanstack-svelte-query': patch
'@example/openapi-ts-tanstack-react-query': patch
'@example/openapi-ts-tanstack-vue-query': patch
'@example/openapi-ts-angular-common': patch
'@example/openapi-ts-pinia-colada': patch
'@example/openapi-ts-angular': patch
'@example/openapi-ts-fastify': patch
'@example/openapi-ts-ofetch': patch
'@example/openapi-ts-openai': patch
'@example/openapi-ts-axios': patch
'@example/openapi-ts-fetch': patch
'@example/openapi-ts-next': patch
'@example/openapi-ts-ky': patch
'@hey-api/openapi-ts': patch
---

fix: return complete event in SSE async iterator (#2641)
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
id: lastEventId
}

onSseEvent?.({
...baseSseEvent,
retry: retryDelay
})

if (dataLines.length) {
yield data as any
yield baseSseEvent as any
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
id: lastEventId
}

onSseEvent?.({
...baseSseEvent,
retry: retryDelay
})

if (dataLines.length) {
yield data as any
yield baseSseEvent as any
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,19 @@ export const createSseClient = <TData = unknown>({
}
}

onSseEvent?.({
const baseSseEvent = {
data,
event: eventName,
id: lastEventId,
};

onSseEvent?.({
...baseSseEvent,
retry: retryDelay,
});

if (dataLines.length) {
yield data as any;
yield baseSseEvent as any;
}
}
}
Expand Down
Loading
Loading