orval 6.7.1 → 6.9.0
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/README.md +1 -1
- package/dist/bin/orval.js +1 -1
- package/dist/chunk-BV3SLKXZ.js +352 -0
- package/dist/index.d.ts +165 -10
- package/dist/index.js +1 -1
- package/package.json +20 -16
- package/dist/chunk-CV7R5DXP.js +0 -345
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,14 @@ declare type GetterParams = GetterParam[];
|
|
|
54
54
|
declare type GetterQueryParam = {
|
|
55
55
|
schema: GeneratorSchema;
|
|
56
56
|
deps: GeneratorSchema[];
|
|
57
|
+
isOptional: boolean;
|
|
58
|
+
};
|
|
59
|
+
declare type GetterPropType = 'param' | 'body' | 'queryParam' | 'header';
|
|
60
|
+
declare const GetterPropType: {
|
|
61
|
+
PARAM: GetterPropType;
|
|
62
|
+
BODY: GetterPropType;
|
|
63
|
+
QUERY_PARAM: GetterPropType;
|
|
64
|
+
HEADER: GetterPropType;
|
|
57
65
|
};
|
|
58
66
|
declare type GetterProp = {
|
|
59
67
|
name: string;
|
|
@@ -61,7 +69,7 @@ declare type GetterProp = {
|
|
|
61
69
|
implementation: string;
|
|
62
70
|
default: boolean;
|
|
63
71
|
required: boolean;
|
|
64
|
-
type:
|
|
72
|
+
type: GetterPropType;
|
|
65
73
|
};
|
|
66
74
|
declare type GetterProps = GetterProp[];
|
|
67
75
|
|
|
@@ -124,6 +132,9 @@ declare type GeneratorOperation = {
|
|
|
124
132
|
formData?: GeneratorMutator;
|
|
125
133
|
formUrlEncoded?: GeneratorMutator;
|
|
126
134
|
operationName: string;
|
|
135
|
+
types?: {
|
|
136
|
+
result: (title?: string) => string;
|
|
137
|
+
};
|
|
127
138
|
};
|
|
128
139
|
declare type GeneratorVerbOptions = {
|
|
129
140
|
verb: Verbs;
|
|
@@ -134,13 +145,14 @@ declare type GeneratorVerbOptions = {
|
|
|
134
145
|
operationName: string;
|
|
135
146
|
response: GetterResponse;
|
|
136
147
|
body: GetterBody;
|
|
148
|
+
headers?: GetterQueryParam;
|
|
137
149
|
queryParams?: GetterQueryParam;
|
|
138
150
|
params: GetterParams;
|
|
139
151
|
props: GetterProps;
|
|
140
152
|
mutator?: GeneratorMutator;
|
|
141
153
|
formData?: GeneratorMutator;
|
|
142
154
|
formUrlEncoded?: GeneratorMutator;
|
|
143
|
-
override:
|
|
155
|
+
override: NormalizedOverrideOutput;
|
|
144
156
|
};
|
|
145
157
|
declare type GeneratorVerbsOptions = GeneratorVerbOptions[];
|
|
146
158
|
declare type GeneratorOptions = {
|
|
@@ -153,6 +165,9 @@ declare type GeneratorOptions = {
|
|
|
153
165
|
declare type GeneratorClient = {
|
|
154
166
|
implementation: string;
|
|
155
167
|
imports: GeneratorImport[];
|
|
168
|
+
types?: {
|
|
169
|
+
result: (title?: string) => string;
|
|
170
|
+
};
|
|
156
171
|
};
|
|
157
172
|
declare type GeneratorClientExtra = {
|
|
158
173
|
implementation: string;
|
|
@@ -179,13 +194,14 @@ declare type ClientHeaderBuilder = (params: {
|
|
|
179
194
|
isMutator: boolean;
|
|
180
195
|
noFunction?: boolean;
|
|
181
196
|
isGlobalMutator: boolean;
|
|
182
|
-
provideInRoot: boolean;
|
|
183
197
|
provideIn: boolean | 'root' | 'any';
|
|
198
|
+
hasAwaitedType: boolean;
|
|
184
199
|
}) => string;
|
|
185
200
|
declare type ClientFooterBuilder = (params: {
|
|
186
201
|
noFunction?: boolean | undefined;
|
|
187
202
|
operationNames: string[];
|
|
188
203
|
title?: string;
|
|
204
|
+
hasAwaitedType: boolean;
|
|
189
205
|
hasMutator: boolean;
|
|
190
206
|
}) => string;
|
|
191
207
|
declare type ClientTitleBuilder = (title: string) => string;
|
|
@@ -206,6 +222,7 @@ declare type GeneratorClients = Record<OutputClient, ClientGeneratorsBuilder>;
|
|
|
206
222
|
interface Options {
|
|
207
223
|
output?: string | OutputOptions;
|
|
208
224
|
input?: string | InputOptions;
|
|
225
|
+
hooks?: Partial<HooksOptions>;
|
|
209
226
|
}
|
|
210
227
|
declare type OptionsFn = () => Options | Promise<Options>;
|
|
211
228
|
declare type OptionsExport = Options | Promise<Options> | OptionsFn;
|
|
@@ -231,7 +248,9 @@ declare type NormalizedOverrideOutput = {
|
|
|
231
248
|
};
|
|
232
249
|
required?: boolean;
|
|
233
250
|
baseUrl?: string;
|
|
251
|
+
delay?: number;
|
|
234
252
|
};
|
|
253
|
+
contentType?: OverrideOutputContentType;
|
|
235
254
|
header: false | ((info: InfoObject) => string[] | string);
|
|
236
255
|
formData: boolean | NormalizedMutator;
|
|
237
256
|
formUrlEncoded: boolean | NormalizedMutator;
|
|
@@ -250,10 +269,14 @@ declare type NormalizedOverrideOutput = {
|
|
|
250
269
|
};
|
|
251
270
|
};
|
|
252
271
|
query: QueryOptions;
|
|
253
|
-
angular:
|
|
272
|
+
angular: Required<AngularOptions>;
|
|
273
|
+
swr: {
|
|
274
|
+
options?: any;
|
|
275
|
+
};
|
|
254
276
|
operationName?: (operation: OperationObject, route: string, verb: Verbs) => string;
|
|
255
277
|
requestOptions: Record<string, any> | boolean;
|
|
256
278
|
useDates?: boolean;
|
|
279
|
+
useTypeOverInterfaces?: boolean;
|
|
257
280
|
};
|
|
258
281
|
declare type NormalizedMutator = {
|
|
259
282
|
path: string;
|
|
@@ -268,11 +291,16 @@ declare type NormalizedOperationOptions = {
|
|
|
268
291
|
data?: MockProperties;
|
|
269
292
|
properties?: MockProperties;
|
|
270
293
|
};
|
|
294
|
+
contentType?: OverrideOutputContentType;
|
|
271
295
|
query?: QueryOptions;
|
|
296
|
+
angular?: Required<AngularOptions>;
|
|
297
|
+
swr?: {
|
|
298
|
+
options?: any;
|
|
299
|
+
};
|
|
272
300
|
operationName?: (operation: OperationObject, route: string, verb: Verbs) => string;
|
|
273
|
-
formData
|
|
274
|
-
formUrlEncoded
|
|
275
|
-
requestOptions
|
|
301
|
+
formData?: boolean | NormalizedMutator;
|
|
302
|
+
formUrlEncoded?: boolean | NormalizedMutator;
|
|
303
|
+
requestOptions?: object | boolean;
|
|
276
304
|
};
|
|
277
305
|
declare type OutputClientFunc = (clients: GeneratorClients) => ClientGeneratorsBuilder;
|
|
278
306
|
declare type OutputOptions = {
|
|
@@ -287,6 +315,8 @@ declare type OutputOptions = {
|
|
|
287
315
|
prettier?: boolean;
|
|
288
316
|
tslint?: boolean;
|
|
289
317
|
tsconfig?: string | Tsconfig;
|
|
318
|
+
packageJson?: string;
|
|
319
|
+
headers?: boolean;
|
|
290
320
|
};
|
|
291
321
|
declare type SwaggerParserOptions = Omit<SwaggerParser.Options, 'validate'> & {
|
|
292
322
|
validate?: boolean;
|
|
@@ -305,6 +335,7 @@ declare const OutputClient: {
|
|
|
305
335
|
AXIOS_FUNCTIONS: OutputClient;
|
|
306
336
|
REACT_QUERY: OutputClient;
|
|
307
337
|
SVELTE_QUERY: OutputClient;
|
|
338
|
+
VUE_QUERY: OutputClient;
|
|
308
339
|
};
|
|
309
340
|
declare type OutputMode = 'single' | 'split' | 'tags' | 'tags-split';
|
|
310
341
|
declare const OutputMode: {
|
|
@@ -345,6 +376,7 @@ declare type OverrideOutput = {
|
|
|
345
376
|
required?: boolean;
|
|
346
377
|
baseUrl?: string;
|
|
347
378
|
};
|
|
379
|
+
contentType?: OverrideOutputContentType;
|
|
348
380
|
header?: boolean | ((info: InfoObject) => string[] | string);
|
|
349
381
|
formData?: boolean | Mutator;
|
|
350
382
|
formUrlEncoded?: boolean | Mutator;
|
|
@@ -363,19 +395,27 @@ declare type OverrideOutput = {
|
|
|
363
395
|
};
|
|
364
396
|
};
|
|
365
397
|
query?: QueryOptions;
|
|
398
|
+
swr?: {
|
|
399
|
+
options?: any;
|
|
400
|
+
};
|
|
366
401
|
angular?: AngularOptions;
|
|
367
402
|
operationName?: (operation: OperationObject, route: string, verb: Verbs) => string;
|
|
368
403
|
requestOptions?: Record<string, any> | boolean;
|
|
369
404
|
useDates?: boolean;
|
|
405
|
+
useTypeOverInterfaces?: boolean;
|
|
406
|
+
};
|
|
407
|
+
declare type OverrideOutputContentType = {
|
|
408
|
+
include?: string[];
|
|
409
|
+
exclude?: string[];
|
|
370
410
|
};
|
|
371
411
|
declare type QueryOptions = {
|
|
372
412
|
useQuery?: boolean;
|
|
373
413
|
useInfinite?: boolean;
|
|
374
414
|
useInfiniteQueryParam?: string;
|
|
375
415
|
options?: any;
|
|
416
|
+
signal?: boolean;
|
|
376
417
|
};
|
|
377
418
|
declare type AngularOptions = {
|
|
378
|
-
provideInRoot?: boolean;
|
|
379
419
|
provideIn?: 'root' | 'any' | boolean;
|
|
380
420
|
};
|
|
381
421
|
declare type InputTransformerFn = (spec: OpenAPIObject) => OpenAPIObject;
|
|
@@ -391,11 +431,20 @@ declare type OperationOptions = {
|
|
|
391
431
|
properties?: MockProperties;
|
|
392
432
|
};
|
|
393
433
|
query?: QueryOptions;
|
|
434
|
+
angular?: Required<AngularOptions>;
|
|
435
|
+
swr?: {
|
|
436
|
+
options?: any;
|
|
437
|
+
};
|
|
394
438
|
operationName?: (operation: OperationObject, route: string, verb: Verbs) => string;
|
|
395
439
|
formData?: boolean | Mutator;
|
|
396
440
|
formUrlEncoded?: boolean | Mutator;
|
|
397
441
|
requestOptions?: object | boolean;
|
|
398
442
|
};
|
|
443
|
+
declare type Hook = 'afterAllFilesWrite';
|
|
444
|
+
declare type HookFunction = (...args: any[]) => void | Promise<void>;
|
|
445
|
+
declare type HookCommand = string | HookFunction | (string | HookFunction)[];
|
|
446
|
+
declare type NormalizedHookCommand = HookCommand[];
|
|
447
|
+
declare type HooksOptions<T = HookCommand | NormalizedHookCommand> = Partial<Record<Hook, T>>;
|
|
399
448
|
declare type Verbs = 'post' | 'put' | 'get' | 'patch' | 'delete' | 'head';
|
|
400
449
|
declare const Verbs: {
|
|
401
450
|
POST: Verbs;
|
|
@@ -413,6 +462,7 @@ interface ContextSpecs {
|
|
|
413
462
|
specs: Record<string, OpenAPIObject>;
|
|
414
463
|
override: NormalizedOverrideOutput;
|
|
415
464
|
tsconfig?: Tsconfig;
|
|
465
|
+
packageJson?: PackageJson;
|
|
416
466
|
}
|
|
417
467
|
interface GlobalOptions {
|
|
418
468
|
projectName?: string;
|
|
@@ -423,16 +473,21 @@ interface GlobalOptions {
|
|
|
423
473
|
mock?: boolean;
|
|
424
474
|
client?: OutputClient;
|
|
425
475
|
mode?: OutputMode;
|
|
426
|
-
tsconfig?: Tsconfig;
|
|
476
|
+
tsconfig?: string | Tsconfig;
|
|
477
|
+
packageJson?: string;
|
|
427
478
|
}
|
|
428
479
|
interface Tsconfig {
|
|
429
480
|
baseUrl?: string;
|
|
430
481
|
compilerOptions?: {
|
|
431
482
|
esModuleInterop?: boolean;
|
|
432
483
|
allowSyntheticDefaultImports?: boolean;
|
|
484
|
+
exactOptionalPropertyTypes?: boolean;
|
|
433
485
|
paths?: Record<string, string[]>;
|
|
434
486
|
};
|
|
435
487
|
}
|
|
488
|
+
interface PackageJson {
|
|
489
|
+
dependencies?: Record<string, string>;
|
|
490
|
+
}
|
|
436
491
|
|
|
437
492
|
/**
|
|
438
493
|
* Type helper to make it easier to use orval.config.ts
|
|
@@ -440,6 +495,106 @@ interface Tsconfig {
|
|
|
440
495
|
*/
|
|
441
496
|
declare function defineConfig(options: ConfigExternal): ConfigExternal;
|
|
442
497
|
|
|
498
|
+
declare const generalJSTypes: string[];
|
|
499
|
+
declare const generalJSTypesWithArray: string[];
|
|
500
|
+
declare const VERBS_WITH_BODY: Verbs[];
|
|
501
|
+
declare const URL_REGEX: RegExp;
|
|
502
|
+
|
|
503
|
+
declare const generateImports: ({ imports, target, isRootKey, specsName, }: {
|
|
504
|
+
imports: GeneratorImport[];
|
|
505
|
+
target: string;
|
|
506
|
+
isRootKey: boolean;
|
|
507
|
+
specsName: Record<string, string>;
|
|
508
|
+
}) => string;
|
|
509
|
+
declare const generateMutatorImports: ({ mutators, implementation, oneMore, }: {
|
|
510
|
+
mutators: GeneratorMutator[];
|
|
511
|
+
implementation?: string | undefined;
|
|
512
|
+
oneMore?: boolean | undefined;
|
|
513
|
+
}) => string;
|
|
514
|
+
declare const addDependency: ({ implementation, exports, dependency, specsName, hasSchemaDir, isAllowSyntheticDefaultImports, }: {
|
|
515
|
+
implementation: string;
|
|
516
|
+
exports: GeneratorImport[];
|
|
517
|
+
dependency: string;
|
|
518
|
+
specsName: Record<string, string>;
|
|
519
|
+
hasSchemaDir: boolean;
|
|
520
|
+
isAllowSyntheticDefaultImports: boolean;
|
|
521
|
+
}) => string | undefined;
|
|
522
|
+
declare const generateDependencyImports: (implementation: string, imports: {
|
|
523
|
+
exports: GeneratorImport[];
|
|
524
|
+
dependency: string;
|
|
525
|
+
}[], specsName: Record<string, string>, hasSchemaDir: boolean, isAllowSyntheticDefaultImports: boolean) => string;
|
|
526
|
+
declare const generateVerbImports: ({ response, body, queryParams, headers, params, }: GeneratorVerbOptions) => GeneratorImport[];
|
|
527
|
+
|
|
528
|
+
declare const generateBodyOptions: (body: GetterBody, isFormData: boolean, isFormUrlEncoded: boolean) => string;
|
|
529
|
+
declare const generateAxiosOptions: ({ response, isExactOptionalPropertyTypes, queryParams, headers, requestOptions, hasSignal, }: {
|
|
530
|
+
response: GetterResponse;
|
|
531
|
+
isExactOptionalPropertyTypes: boolean;
|
|
532
|
+
queryParams?: GeneratorSchema | undefined;
|
|
533
|
+
headers?: GeneratorSchema | undefined;
|
|
534
|
+
requestOptions?: boolean | object | undefined;
|
|
535
|
+
hasSignal: boolean;
|
|
536
|
+
}) => string;
|
|
537
|
+
declare const generateOptions: ({ route, body, headers, queryParams, response, verb, requestOptions, isFormData, isFormUrlEncoded, isAngular, isExactOptionalPropertyTypes, hasSignal, }: {
|
|
538
|
+
route: string;
|
|
539
|
+
body: GetterBody;
|
|
540
|
+
headers?: GetterQueryParam | undefined;
|
|
541
|
+
queryParams?: GetterQueryParam | undefined;
|
|
542
|
+
response: GetterResponse;
|
|
543
|
+
verb: Verbs;
|
|
544
|
+
requestOptions?: boolean | object | undefined;
|
|
545
|
+
isFormData: boolean;
|
|
546
|
+
isFormUrlEncoded: boolean;
|
|
547
|
+
isAngular?: boolean | undefined;
|
|
548
|
+
isExactOptionalPropertyTypes: boolean;
|
|
549
|
+
hasSignal: boolean;
|
|
550
|
+
}) => string;
|
|
551
|
+
declare const generateBodyMutatorConfig: (body: GetterBody, isFormData: boolean, isFormUrlEncoded: boolean) => string;
|
|
552
|
+
declare const generateQueryParamsAxiosConfig: (response: GetterResponse, queryParams?: GetterQueryParam | undefined) => string;
|
|
553
|
+
declare const generateMutatorConfig: ({ route, body, headers, queryParams, response, verb, isFormData, isFormUrlEncoded, isBodyVerb, hasSignal, isExactOptionalPropertyTypes, }: {
|
|
554
|
+
route: string;
|
|
555
|
+
body: GetterBody;
|
|
556
|
+
headers?: GetterQueryParam | undefined;
|
|
557
|
+
queryParams?: GetterQueryParam | undefined;
|
|
558
|
+
response: GetterResponse;
|
|
559
|
+
verb: Verbs;
|
|
560
|
+
isFormData: boolean;
|
|
561
|
+
isFormUrlEncoded: boolean;
|
|
562
|
+
isBodyVerb: boolean;
|
|
563
|
+
hasSignal: boolean;
|
|
564
|
+
isExactOptionalPropertyTypes: boolean;
|
|
565
|
+
}) => string;
|
|
566
|
+
declare const generateMutatorRequestOptions: (requestOptions: boolean | object | undefined, hasSecondArgument: boolean) => string | undefined;
|
|
567
|
+
declare const generateFormDataAndUrlEncodedFunction: ({ body, formData, formUrlEncoded, isFormData, isFormUrlEncoded, }: {
|
|
568
|
+
body: GetterBody;
|
|
569
|
+
formData?: GeneratorMutator | undefined;
|
|
570
|
+
formUrlEncoded?: GeneratorMutator | undefined;
|
|
571
|
+
isFormData: boolean;
|
|
572
|
+
isFormUrlEncoded: boolean;
|
|
573
|
+
}) => string;
|
|
574
|
+
|
|
575
|
+
declare const loadTsconfig: (tsconfig?: string | Tsconfig | undefined, workspace?: string) => Promise<Tsconfig | undefined>;
|
|
576
|
+
declare const isSyntheticDefaultImportsAllow: (config?: Tsconfig | undefined) => boolean;
|
|
577
|
+
|
|
578
|
+
declare const stringify: (data?: string | any[] | {
|
|
579
|
+
[key: string]: any;
|
|
580
|
+
} | undefined) => string | undefined;
|
|
581
|
+
declare const sanitize: (value: string, options?: {
|
|
582
|
+
whitespace?: string | true | undefined;
|
|
583
|
+
underscore?: string | true | undefined;
|
|
584
|
+
dot?: string | true | undefined;
|
|
585
|
+
dash?: string | true | undefined;
|
|
586
|
+
es5keyword?: boolean | undefined;
|
|
587
|
+
} | undefined) => string;
|
|
588
|
+
declare const toObjectString: <T>(props: T[], path?: keyof T | undefined) => string;
|
|
589
|
+
declare const getNumberWord: (num: number) => string;
|
|
590
|
+
declare const escape: (str: string, char?: string) => string;
|
|
591
|
+
|
|
592
|
+
declare const pascal: (s: string) => string;
|
|
593
|
+
declare const camel: (s: string) => string;
|
|
594
|
+
declare const snake: (s: string) => string;
|
|
595
|
+
declare const kebab: (s: string) => string;
|
|
596
|
+
declare const upper: (s: string, fillWith?: string | undefined, isDeapostrophe?: boolean | undefined) => string;
|
|
597
|
+
|
|
443
598
|
declare const generate: (optionsExport?: string | OptionsExport | undefined, workspace?: string, options?: GlobalOptions | undefined) => Promise<void>;
|
|
444
599
|
|
|
445
|
-
export { ClientBuilder, ClientDependenciesBuilder, ClientFooterBuilder, ClientGeneratorsBuilder, ClientHeaderBuilder, ClientMSWBuilder, ClientTitleBuilder, GeneratorApiResponse, GeneratorClient, GeneratorClientExtra, GeneratorClients, GeneratorDependency, GeneratorImport, GeneratorMutator, GeneratorMutatorParsingInfo, GeneratorOperation, GeneratorOperations, GeneratorOptions, GeneratorSchema, GeneratorTarget, GeneratorTargetFull, GeneratorVerbOptions, GeneratorVerbsOptions, Options, generate as default, defineConfig, generate };
|
|
600
|
+
export { ClientBuilder, ClientDependenciesBuilder, ClientFooterBuilder, ClientGeneratorsBuilder, ClientHeaderBuilder, ClientMSWBuilder, ClientTitleBuilder, GeneratorApiResponse, GeneratorClient, GeneratorClientExtra, GeneratorClients, GeneratorDependency, GeneratorImport, GeneratorMutator, GeneratorMutatorParsingInfo, GeneratorOperation, GeneratorOperations, GeneratorOptions, GeneratorSchema, GeneratorTarget, GeneratorTargetFull, GeneratorVerbOptions, GeneratorVerbsOptions, Options, URL_REGEX, VERBS_WITH_BODY, addDependency, camel, generate as default, defineConfig, escape, generalJSTypes, generalJSTypesWithArray, generate, generateAxiosOptions, generateBodyMutatorConfig, generateBodyOptions, generateDependencyImports, generateFormDataAndUrlEncodedFunction, generateImports, generateMutatorConfig, generateMutatorImports, generateMutatorRequestOptions, generateOptions, generateQueryParamsAxiosConfig, generateVerbImports, getNumberWord, isSyntheticDefaultImportsAllow, kebab, loadTsconfig, pascal, sanitize, snake, stringify, toObjectString, upper };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use strict";var _chunkBV3SLKXZjs = require('./chunk-BV3SLKXZ.js');_chunkBV3SLKXZjs.b.call(void 0, );var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);_chunkBV3SLKXZjs.b.call(void 0, );var c=async(t,o=process.cwd(),e)=>{if(!t||_chunkBV3SLKXZjs.c.call(void 0, t))return _chunkBV3SLKXZjs.M.call(void 0, t,e);let n=await _chunkBV3SLKXZjs.H.call(void 0, t,o,e);if(e!=null&&e.watch)_chunkBV3SLKXZjs.K.call(void 0, e==null?void 0:e.watch,async()=>{try{await _chunkBV3SLKXZjs.L.call(void 0, o,n)}catch(a){_chunkBV3SLKXZjs.d.call(void 0, _chalk2.default.red(`\u{1F6D1} ${e!=null&&e.projectName?`${e==null?void 0:e.projectName} - `:""}${a}`))}},n.input.target);else try{return await _chunkBV3SLKXZjs.L.call(void 0, o,n)}catch(a){_chunkBV3SLKXZjs.d.call(void 0, _chalk2.default.red(`\u{1F6D1} ${e!=null&&e.projectName?`${e==null?void 0:e.projectName} - `:""}${a}`))}};var te=c;exports.URL_REGEX = _chunkBV3SLKXZjs.s; exports.VERBS_WITH_BODY = _chunkBV3SLKXZjs.r; exports.addDependency = _chunkBV3SLKXZjs.v; exports.camel = _chunkBV3SLKXZjs.g; exports.default = te; exports.defineConfig = _chunkBV3SLKXZjs.G; exports.escape = _chunkBV3SLKXZjs.o; exports.generalJSTypes = _chunkBV3SLKXZjs.p; exports.generalJSTypesWithArray = _chunkBV3SLKXZjs.q; exports.generate = c; exports.generateAxiosOptions = _chunkBV3SLKXZjs.z; exports.generateBodyMutatorConfig = _chunkBV3SLKXZjs.B; exports.generateBodyOptions = _chunkBV3SLKXZjs.y; exports.generateDependencyImports = _chunkBV3SLKXZjs.w; exports.generateFormDataAndUrlEncodedFunction = _chunkBV3SLKXZjs.F; exports.generateImports = _chunkBV3SLKXZjs.t; exports.generateMutatorConfig = _chunkBV3SLKXZjs.D; exports.generateMutatorImports = _chunkBV3SLKXZjs.u; exports.generateMutatorRequestOptions = _chunkBV3SLKXZjs.E; exports.generateOptions = _chunkBV3SLKXZjs.A; exports.generateQueryParamsAxiosConfig = _chunkBV3SLKXZjs.C; exports.generateVerbImports = _chunkBV3SLKXZjs.x; exports.getNumberWord = _chunkBV3SLKXZjs.n; exports.isSyntheticDefaultImportsAllow = _chunkBV3SLKXZjs.J; exports.kebab = _chunkBV3SLKXZjs.i; exports.loadTsconfig = _chunkBV3SLKXZjs.I; exports.pascal = _chunkBV3SLKXZjs.f; exports.sanitize = _chunkBV3SLKXZjs.l; exports.snake = _chunkBV3SLKXZjs.h; exports.stringify = _chunkBV3SLKXZjs.k; exports.toObjectString = _chunkBV3SLKXZjs.m; exports.upper = _chunkBV3SLKXZjs.j;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orval",
|
|
3
3
|
"description": "A swagger client generator for typescript",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.9.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"dev": "tsup ./src/bin/orval.ts ./src/index.ts --clean --watch src --onSuccess 'yarn generate-api'",
|
|
46
46
|
"lint": "eslint src/**/*.ts",
|
|
47
47
|
"test": "vitest --global test.ts",
|
|
48
|
-
"format": "prettier --write
|
|
48
|
+
"format": "prettier --write .",
|
|
49
|
+
"format:staged": "pretty-quick --staged",
|
|
49
50
|
"prerelease": "yarn build && cd ./tests && yarn generate && yarn build",
|
|
50
51
|
"release": "dotenv release-it",
|
|
51
52
|
"postrelease": "yarn build && yarn update-samples",
|
|
@@ -55,10 +56,10 @@
|
|
|
55
56
|
"update-samples": "zx ./scripts/update-samples.mjs"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@commitlint/cli": "^
|
|
59
|
-
"@commitlint/config-conventional": "^
|
|
60
|
-
"@faker-js/faker": "^
|
|
61
|
-
"@release-it/conventional-changelog": "^
|
|
59
|
+
"@commitlint/cli": "^17.0.2",
|
|
60
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
61
|
+
"@faker-js/faker": "^7.3.0",
|
|
62
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
62
63
|
"@types/chalk": "^2.2.0",
|
|
63
64
|
"@types/commander": "^2.12.2",
|
|
64
65
|
"@types/fs-extra": "^9.0.12",
|
|
@@ -70,33 +71,35 @@
|
|
|
70
71
|
"@types/lodash.uniqby": "^4.7.6",
|
|
71
72
|
"@types/lodash.uniqwith": "^4.5.6",
|
|
72
73
|
"@types/micromatch": "^4.0.2",
|
|
73
|
-
"@types/node": "^
|
|
74
|
+
"@types/node": "^18.0.0",
|
|
74
75
|
"@types/prettier": "^2.4.4",
|
|
75
76
|
"@types/request": "^2.48.8",
|
|
76
77
|
"@types/validator": "^13.7.1",
|
|
77
78
|
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
|
78
79
|
"@typescript-eslint/parser": "^5.14.0",
|
|
79
|
-
"dotenv-cli": "^
|
|
80
|
+
"dotenv-cli": "^5.1.0",
|
|
80
81
|
"eslint": "^8.10.0",
|
|
81
82
|
"eslint-config-prettier": "^8.5.0",
|
|
82
83
|
"eslint-plugin-prettier": "^4.0.0",
|
|
83
|
-
"husky": "^
|
|
84
|
-
"lint-staged": "^
|
|
84
|
+
"husky": "^8.0.1",
|
|
85
|
+
"lint-staged": "^13.0.3",
|
|
85
86
|
"npm-run-all": "^4.1.5",
|
|
86
|
-
"prettier": "
|
|
87
|
-
"
|
|
87
|
+
"prettier": "2.6.2",
|
|
88
|
+
"pretty-quick": "^3.1.3",
|
|
89
|
+
"release-it": "^15.1.0",
|
|
88
90
|
"rimraf": "^3.0.2",
|
|
89
91
|
"tsup": "^5.12.0",
|
|
90
92
|
"typescript": "^4.6.2",
|
|
91
93
|
"vitest": "^0.6.0",
|
|
92
|
-
"zx": "^
|
|
94
|
+
"zx": "^7.0.2"
|
|
93
95
|
},
|
|
94
96
|
"dependencies": {
|
|
95
|
-
"@apidevtools/swagger-parser": "^10.0
|
|
97
|
+
"@apidevtools/swagger-parser": "^10.1.0",
|
|
96
98
|
"acorn": "^8.7.0",
|
|
97
99
|
"cac": "^6.7.12",
|
|
98
100
|
"chalk": "^4.1.2",
|
|
99
101
|
"chokidar": "^3.5.3",
|
|
102
|
+
"compare-versions": "^4.1.3",
|
|
100
103
|
"cuid": "^2.1.8",
|
|
101
104
|
"debug": "^4.3.3",
|
|
102
105
|
"esbuild": "^0.14.25",
|
|
@@ -105,7 +108,7 @@
|
|
|
105
108
|
"find-up": "5.0.0",
|
|
106
109
|
"fs-extra": "^10.0.1",
|
|
107
110
|
"globby": "11.0.4",
|
|
108
|
-
"ibm-openapi-validator": "^0.
|
|
111
|
+
"ibm-openapi-validator": "^0.83.0",
|
|
109
112
|
"inquirer": "^8.2.0",
|
|
110
113
|
"lodash.get": "^4.4.2",
|
|
111
114
|
"lodash.omit": "^4.5.0",
|
|
@@ -115,8 +118,9 @@
|
|
|
115
118
|
"lodash.uniqwith": "^4.5.0",
|
|
116
119
|
"micromatch": "^4.0.4",
|
|
117
120
|
"openapi3-ts": "^2.0.2",
|
|
121
|
+
"string-argv": "^0.3.1",
|
|
118
122
|
"swagger2openapi": "^7.0.8",
|
|
119
|
-
"tsconfck": "^
|
|
123
|
+
"tsconfck": "^2.0.1",
|
|
120
124
|
"upath": "^2.0.1",
|
|
121
125
|
"url": "^0.11.0",
|
|
122
126
|
"validator": "^13.7.0"
|