Skip to content

Commit 2efdee9

Browse files
committed
chore: sync snapshots with main after rebase
1 parent 296da55 commit 2efdee9

20 files changed

Lines changed: 41 additions & 43 deletions

File tree

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/runtime-config-path/client/types.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export interface ResolvedRequestOptions<
100100
ThrowOnError extends boolean = boolean,
101101
Url extends string = string,
102102
> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
103+
headers: HttpHeaders;
103104
serializedBody?: string;
104105
}
105106

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/runtime-config-path/core/serverSentEvents.gen.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unkn
7979
>;
8080
};
8181

82-
export const createSseClient = <TData = unknown>({
82+
export function createSseClient<TData = unknown>({
8383
onRequest,
8484
onSseError,
8585
onSseEvent,
@@ -91,7 +91,7 @@ export const createSseClient = <TData = unknown>({
9191
sseSleepFn,
9292
url,
9393
...options
94-
}: ServerSentEventsOptions): ServerSentEventsResult<TData> => {
94+
}: ServerSentEventsOptions): ServerSentEventsResult<TData> {
9595
let lastEventId: string | undefined;
9696

9797
const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));
@@ -155,8 +155,7 @@ export const createSseClient = <TData = unknown>({
155155
const { done, value } = await reader.read();
156156
if (done) break;
157157
buffer += value;
158-
// Normalize line endings: CRLF -> LF, then CR -> LF
159-
buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
158+
buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings
160159

161160
const chunks = buffer.split('\n\n');
162161
buffer = chunks.pop() ?? '';
@@ -240,4 +239,4 @@ export const createSseClient = <TData = unknown>({
240239
const stream = createStream();
241240

242241
return { stream };
243-
};
242+
}

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/runtime-config-path/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1979,7 +1979,7 @@ export type ComplexParamsData = {
19791979
readonly key: string | null;
19801980
name: string | null;
19811981
enabled?: boolean;
1982-
type: 'Monkey' | 'Horse' | 'Bird';
1982+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19831983
listOfModels?: Array<ModelWithString> | null;
19841984
listOfStrings?: Array<string> | null;
19851985
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/runtime-config-path/core/serverSentEvents.gen.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unkn
7979
>;
8080
};
8181

82-
export const createSseClient = <TData = unknown>({
82+
export function createSseClient<TData = unknown>({
8383
onRequest,
8484
onSseError,
8585
onSseEvent,
@@ -91,7 +91,7 @@ export const createSseClient = <TData = unknown>({
9191
sseSleepFn,
9292
url,
9393
...options
94-
}: ServerSentEventsOptions): ServerSentEventsResult<TData> => {
94+
}: ServerSentEventsOptions): ServerSentEventsResult<TData> {
9595
let lastEventId: string | undefined;
9696

9797
const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));
@@ -155,8 +155,7 @@ export const createSseClient = <TData = unknown>({
155155
const { done, value } = await reader.read();
156156
if (done) break;
157157
buffer += value;
158-
// Normalize line endings: CRLF -> LF, then CR -> LF
159-
buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
158+
buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings
160159

161160
const chunks = buffer.split('\n\n');
162161
buffer = chunks.pop() ?? '';
@@ -240,4 +239,4 @@ export const createSseClient = <TData = unknown>({
240239
const stream = createStream();
241240

242241
return { stream };
243-
};
242+
}

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/runtime-config-path/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1979,7 +1979,7 @@ export type ComplexParamsData = {
19791979
readonly key: string | null;
19801980
name: string | null;
19811981
enabled?: boolean;
1982-
type: 'Monkey' | 'Horse' | 'Bird';
1982+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19831983
listOfModels?: Array<ModelWithString> | null;
19841984
listOfStrings?: Array<string> | null;
19851985
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/runtime-config-path/client/types.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export interface ResolvedRequestOptions<
9393
ThrowOnError extends boolean = boolean,
9494
Url extends string = string,
9595
> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
96+
headers: Headers;
9697
serializedBody?: string;
9798
}
9899

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/runtime-config-path/core/serverSentEvents.gen.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unkn
7979
>;
8080
};
8181

82-
export const createSseClient = <TData = unknown>({
82+
export function createSseClient<TData = unknown>({
8383
onRequest,
8484
onSseError,
8585
onSseEvent,
@@ -91,7 +91,7 @@ export const createSseClient = <TData = unknown>({
9191
sseSleepFn,
9292
url,
9393
...options
94-
}: ServerSentEventsOptions): ServerSentEventsResult<TData> => {
94+
}: ServerSentEventsOptions): ServerSentEventsResult<TData> {
9595
let lastEventId: string | undefined;
9696

9797
const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));
@@ -155,8 +155,7 @@ export const createSseClient = <TData = unknown>({
155155
const { done, value } = await reader.read();
156156
if (done) break;
157157
buffer += value;
158-
// Normalize line endings: CRLF -> LF, then CR -> LF
159-
buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
158+
buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings
160159

161160
const chunks = buffer.split('\n\n');
162161
buffer = chunks.pop() ?? '';
@@ -240,4 +239,4 @@ export const createSseClient = <TData = unknown>({
240239
const stream = createStream();
241240

242241
return { stream };
243-
};
242+
}

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/runtime-config-path/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1979,7 +1979,7 @@ export type ComplexParamsData = {
19791979
readonly key: string | null;
19801980
name: string | null;
19811981
enabled?: boolean;
1982-
type: 'Monkey' | 'Horse' | 'Bird';
1982+
readonly type: 'Monkey' | 'Horse' | 'Bird';
19831983
listOfModels?: Array<ModelWithString> | null;
19841984
listOfStrings?: Array<string> | null;
19851985
parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/runtime-config-path/client/types.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export interface ResolvedRequestOptions<
125125
ThrowOnError extends boolean = boolean,
126126
Url extends string = string,
127127
> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
128+
headers: Headers;
128129
serializedBody?: string;
129130
}
130131

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/runtime-config-path/core/serverSentEvents.gen.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unkn
7979
>;
8080
};
8181

82-
export const createSseClient = <TData = unknown>({
82+
export function createSseClient<TData = unknown>({
8383
onRequest,
8484
onSseError,
8585
onSseEvent,
@@ -91,7 +91,7 @@ export const createSseClient = <TData = unknown>({
9191
sseSleepFn,
9292
url,
9393
...options
94-
}: ServerSentEventsOptions): ServerSentEventsResult<TData> => {
94+
}: ServerSentEventsOptions): ServerSentEventsResult<TData> {
9595
let lastEventId: string | undefined;
9696

9797
const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));
@@ -155,8 +155,7 @@ export const createSseClient = <TData = unknown>({
155155
const { done, value } = await reader.read();
156156
if (done) break;
157157
buffer += value;
158-
// Normalize line endings: CRLF -> LF, then CR -> LF
159-
buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
158+
buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings
160159

161160
const chunks = buffer.split('\n\n');
162161
buffer = chunks.pop() ?? '';
@@ -240,4 +239,4 @@ export const createSseClient = <TData = unknown>({
240239
const stream = createStream();
241240

242241
return { stream };
243-
};
242+
}

0 commit comments

Comments
 (0)