vovk 3.0.0-draft.108 → 3.0.0-draft.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/fetcher.js +2 -2
- package/dist/client/types.d.ts +6 -1
- package/dist/types.d.ts +16 -8
- package/package.json +1 -1
package/dist/client/fetcher.js
CHANGED
|
@@ -27,10 +27,10 @@ const fetcher = async ({ httpMethod, getEndpoint, validate, defaultHandler, defa
|
|
|
27
27
|
}
|
|
28
28
|
const init = {
|
|
29
29
|
method: httpMethod,
|
|
30
|
-
...options,
|
|
30
|
+
...options.init,
|
|
31
31
|
headers: {
|
|
32
|
-
...options.headers,
|
|
33
32
|
accept: 'application/jsonl, application/json',
|
|
33
|
+
...options.init?.headers,
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
if (body instanceof FormData) {
|
package/dist/client/types.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export type VovkClientFetcher<OPTS extends Record<string, KnownAny> = Record<str
|
|
|
80
80
|
[key: string]: string;
|
|
81
81
|
};
|
|
82
82
|
} & OPTS) => KnownAny;
|
|
83
|
-
export interface VovkDefaultFetcherOptions
|
|
83
|
+
export interface VovkDefaultFetcherOptions {
|
|
84
84
|
reactNative?: {
|
|
85
85
|
textStreaming: boolean;
|
|
86
86
|
};
|
|
@@ -90,6 +90,11 @@ export interface VovkDefaultFetcherOptions extends Omit<RequestInit, 'body' | 'm
|
|
|
90
90
|
validateOnClient?: VovkValidateOnClient;
|
|
91
91
|
fetcher?: VovkClientFetcher;
|
|
92
92
|
interpretAs?: string;
|
|
93
|
+
init?: Omit<RequestInit, 'body'> & {
|
|
94
|
+
reactNative?: {
|
|
95
|
+
textStreaming: boolean;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
93
98
|
}
|
|
94
99
|
export type VovkValidateOnClient = (input: {
|
|
95
100
|
body?: unknown;
|
package/dist/types.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ export type StreamAbortMessage = {
|
|
|
98
98
|
type LogLevelNames = 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
|
99
99
|
export type VovkEnv = {
|
|
100
100
|
PORT?: string;
|
|
101
|
+
VOVK_EMIT_FULL_CLIENT?: string;
|
|
102
|
+
VOVK_EMIT_SEGMENT_CLIENT?: string;
|
|
101
103
|
VOVK_CLIENT_OUT_DIR?: string;
|
|
102
104
|
VOVK_SCHEMA_OUT_DIR?: string;
|
|
103
105
|
VOVK_FETCHER_PATH?: string;
|
|
@@ -118,7 +120,7 @@ export type GenerateFromTemplate = {
|
|
|
118
120
|
templatePath: string;
|
|
119
121
|
outDir?: string;
|
|
120
122
|
templateName?: string;
|
|
121
|
-
|
|
123
|
+
fullSchemaJSON?: string | boolean;
|
|
122
124
|
origin?: string | null;
|
|
123
125
|
};
|
|
124
126
|
type GenerateFrom = (string | GenerateFromTemplate)[];
|
|
@@ -126,9 +128,13 @@ export type VovkConfig = {
|
|
|
126
128
|
emitConfig?: boolean | (keyof VovkStrictConfig)[];
|
|
127
129
|
clientOutDir?: string;
|
|
128
130
|
schemaOutDir?: string;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
emitFullClient?: boolean;
|
|
132
|
+
emitSegmentClient?: boolean;
|
|
133
|
+
imports?: {
|
|
134
|
+
fetcher?: string | [string, string] | [string];
|
|
135
|
+
validateOnClient?: string | [string, string] | [string];
|
|
136
|
+
createRPC?: string | [string, string] | [string];
|
|
137
|
+
};
|
|
132
138
|
modulesDir?: string;
|
|
133
139
|
rootEntry?: string;
|
|
134
140
|
origin?: string;
|
|
@@ -144,11 +150,13 @@ export type VovkConfig = {
|
|
|
144
150
|
};
|
|
145
151
|
libs?: Record<string, KnownAny>;
|
|
146
152
|
};
|
|
147
|
-
export type VovkStrictConfig = Required<Omit<VovkConfig, 'emitConfig' | '
|
|
153
|
+
export type VovkStrictConfig = Required<Omit<VovkConfig, 'emitConfig' | 'generateFrom' | 'libs' | 'imports'>> & {
|
|
148
154
|
emitConfig: (keyof VovkStrictConfig)[];
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
imports: {
|
|
156
|
+
fetcher: [string, string] | [string];
|
|
157
|
+
validateOnClient: [string, string] | [string] | null;
|
|
158
|
+
createRPC: [string, string] | [string];
|
|
159
|
+
};
|
|
152
160
|
generateFrom: GenerateFrom;
|
|
153
161
|
libs: Record<string, KnownAny>;
|
|
154
162
|
};
|
package/package.json
CHANGED