asphodelos 0.3.0 → 0.3.2
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 +55 -3
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +23 -15
- package/dist/{format-B0W7HIAg.mjs → format-DC258z--.mjs} +2 -3
- package/dist/index.d.mts +169 -171
- package/dist/index.mjs +27 -14
- package/dist/{openapi-C8b6Ibiu.mjs → openapi-4yNuDK_n.mjs} +15 -7
- package/dist/{rolldown-runtime-wcPFST8Q.mjs → rolldown-runtime-D8jQpDG7.mjs} +1 -2
- package/dist/{shared-Becl66EY.mjs → shared-nkpRcjdg.mjs} +795 -440
- package/dist/vite-plugin/index.d.mts +1 -4
- package/dist/vite-plugin/index.mjs +6 -13
- package/package.json +17 -17
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { Effect, FileSystem, Schema } from "effect";
|
|
2
2
|
import { FormatConfig } from "oxfmt";
|
|
3
|
-
import * as _$effect_Cause0 from "effect/Cause";
|
|
4
|
-
|
|
5
|
-
//#region src/config/index.d.ts
|
|
6
3
|
/** OpenAPI 3.x Components Object kinds, in declaration / config-field order. */
|
|
7
|
-
declare const COMPONENT_KINDS: readonly [
|
|
4
|
+
export declare const COMPONENT_KINDS: readonly ['schemas', 'responses', 'parameters', 'examples', 'requestBodies', 'headers', 'securitySchemes', 'links', 'callbacks', 'pathItems', 'mediaTypes'];
|
|
8
5
|
/** The client libraries a hooks file can be generated for, in config-field order. */
|
|
9
|
-
declare const HOOK_KINDS: readonly [
|
|
6
|
+
export declare const HOOK_KINDS: readonly ['swr', 'tanstack-query', 'preact-query', 'solid-query', 'vue-query', 'svelte-query', 'angular-query'];
|
|
10
7
|
declare const ConfigError_base: Schema.Class<ConfigError, Schema.TaggedStruct<"ConfigError", {
|
|
11
8
|
readonly message: Schema.String;
|
|
12
9
|
readonly notFound: Schema.optionalKey<Schema.Boolean>;
|
|
13
|
-
}>,
|
|
10
|
+
}>, import("effect/Cause").YieldableError>;
|
|
14
11
|
/**
|
|
15
12
|
* The config file is missing, is not a module with a default export, or does not validate.
|
|
16
13
|
*
|
|
@@ -22,9 +19,11 @@ declare const ConfigError_base: Schema.Class<ConfigError, Schema.TaggedStruct<"C
|
|
|
22
19
|
* into, which makes the failure a schema in its own right. The errors that never meet a schema
|
|
23
20
|
* (`FormatError`, `GenerateError`, `OpenAPIError`) stay plain `Data.TaggedError`.
|
|
24
21
|
*/
|
|
25
|
-
declare class ConfigError extends ConfigError_base {}
|
|
22
|
+
export declare class ConfigError extends ConfigError_base {}
|
|
23
|
+
/** Extensions an input document is recognized by, and that a change has to carry to be worth regenerating for. */
|
|
24
|
+
export declare const INPUT_EXTENSIONS: readonly ['.yaml', '.yml', '.json', '.tsp'];
|
|
26
25
|
declare const ConfigSchema: Schema.Struct<{
|
|
27
|
-
readonly input: Schema.declare<`${string}.yaml` | `${string}.json` | `${string}.tsp
|
|
26
|
+
readonly input: Schema.declare<`${string}.json` | `${string}.tsp` | `${string}.yaml` | `${string}.yml` | `http://${string}` | `https://${string}`, `${string}.json` | `${string}.tsp` | `${string}.yaml` | `${string}.yml` | `http://${string}` | `https://${string}`>;
|
|
28
27
|
readonly output: Schema.optionalKey<Schema.declare<`${string}.ts`, `${string}.ts`>>;
|
|
29
28
|
readonly prefix: Schema.optionalKey<Schema.String>;
|
|
30
29
|
readonly format: Schema.optionalKey<Schema.declare<FormatConfig, FormatConfig>>;
|
|
@@ -206,10 +205,10 @@ declare const ConfigSchema: Schema.Struct<{
|
|
|
206
205
|
readonly sameOrigin: Schema.optionalKey<Schema.withDecodingDefault<Schema.Boolean, never>>;
|
|
207
206
|
}>>;
|
|
208
207
|
readonly eden: Schema.optionalKey<Schema.Struct<{
|
|
209
|
-
readonly docs: Schema.optionalKey<Schema.Never>;
|
|
210
208
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
211
209
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
212
210
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
211
|
+
readonly docs: Schema.optionalKey<Schema.Never>;
|
|
213
212
|
}>>;
|
|
214
213
|
readonly types: Schema.optionalKey<Schema.Struct<{
|
|
215
214
|
readonly output: Schema.declare<`${string}.ts`, `${string}.ts`>;
|
|
@@ -228,100 +227,57 @@ declare const ConfigSchema: Schema.Struct<{
|
|
|
228
227
|
readonly arrayMax: Schema.optionalKey<Schema.Number>;
|
|
229
228
|
}>>;
|
|
230
229
|
readonly swr: Schema.optionalKey<Schema.Struct<{
|
|
231
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
232
230
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
233
231
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
234
232
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
233
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
235
234
|
}>>;
|
|
236
235
|
readonly 'tanstack-query': Schema.optionalKey<Schema.Struct<{
|
|
237
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
238
236
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
239
237
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
240
238
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
239
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
241
240
|
}>>;
|
|
242
241
|
readonly 'preact-query': Schema.optionalKey<Schema.Struct<{
|
|
243
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
244
242
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
245
243
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
246
244
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
245
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
247
246
|
}>>;
|
|
248
247
|
readonly 'solid-query': Schema.optionalKey<Schema.Struct<{
|
|
249
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
250
248
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
251
249
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
252
250
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
251
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
253
252
|
}>>;
|
|
254
253
|
readonly 'vue-query': Schema.optionalKey<Schema.Struct<{
|
|
255
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
256
254
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
257
255
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
258
256
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
257
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
259
258
|
}>>;
|
|
260
259
|
readonly 'svelte-query': Schema.optionalKey<Schema.Struct<{
|
|
261
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
262
260
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
263
261
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
264
262
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
263
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
265
264
|
}>>;
|
|
266
265
|
readonly 'angular-query': Schema.optionalKey<Schema.Struct<{
|
|
267
|
-
readonly split: Schema.optionalKey<Schema.Never>;
|
|
268
266
|
readonly import: Schema.optionalKey<Schema.Never>;
|
|
269
267
|
readonly client: Schema.optionalKey<Schema.Never>;
|
|
270
268
|
readonly output: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
269
|
+
readonly split: Schema.optionalKey<Schema.Never>;
|
|
271
270
|
}>>;
|
|
272
271
|
}>;
|
|
273
|
-
type Config = typeof ConfigSchema.Type;
|
|
272
|
+
export type Config = typeof ConfigSchema.Type;
|
|
274
273
|
/**
|
|
275
274
|
* Validates an already-loaded config object.
|
|
276
275
|
*
|
|
277
276
|
* The first issue is reported as `<a.b.c>: <message>`: a config file is written by hand, so
|
|
278
277
|
* naming the field that is wrong matters more than listing every consequence of it.
|
|
279
278
|
*/
|
|
280
|
-
declare function parseConfig(config: unknown): Effect.Effect<{
|
|
281
|
-
readonly input: `${string}.
|
|
282
|
-
readonly swr?: {
|
|
283
|
-
readonly output: string;
|
|
284
|
-
readonly split?: undefined;
|
|
285
|
-
readonly import?: undefined;
|
|
286
|
-
readonly client?: undefined;
|
|
287
|
-
} | undefined;
|
|
288
|
-
readonly 'tanstack-query'?: {
|
|
289
|
-
readonly output: string;
|
|
290
|
-
readonly split?: undefined;
|
|
291
|
-
readonly import?: undefined;
|
|
292
|
-
readonly client?: undefined;
|
|
293
|
-
} | undefined;
|
|
294
|
-
readonly 'preact-query'?: {
|
|
295
|
-
readonly output: string;
|
|
296
|
-
readonly split?: undefined;
|
|
297
|
-
readonly import?: undefined;
|
|
298
|
-
readonly client?: undefined;
|
|
299
|
-
} | undefined;
|
|
300
|
-
readonly 'solid-query'?: {
|
|
301
|
-
readonly output: string;
|
|
302
|
-
readonly split?: undefined;
|
|
303
|
-
readonly import?: undefined;
|
|
304
|
-
readonly client?: undefined;
|
|
305
|
-
} | undefined;
|
|
306
|
-
readonly 'vue-query'?: {
|
|
307
|
-
readonly output: string;
|
|
308
|
-
readonly split?: undefined;
|
|
309
|
-
readonly import?: undefined;
|
|
310
|
-
readonly client?: undefined;
|
|
311
|
-
} | undefined;
|
|
312
|
-
readonly 'svelte-query'?: {
|
|
313
|
-
readonly output: string;
|
|
314
|
-
readonly split?: undefined;
|
|
315
|
-
readonly import?: undefined;
|
|
316
|
-
readonly client?: undefined;
|
|
317
|
-
} | undefined;
|
|
318
|
-
readonly 'angular-query'?: {
|
|
319
|
-
readonly output: string;
|
|
320
|
-
readonly split?: undefined;
|
|
321
|
-
readonly import?: undefined;
|
|
322
|
-
readonly client?: undefined;
|
|
323
|
-
} | undefined;
|
|
324
|
-
readonly readonly?: boolean | undefined;
|
|
279
|
+
export declare function parseConfig(config: unknown): Effect.Effect<{
|
|
280
|
+
readonly input: `${string}.json` | `${string}.tsp` | `${string}.yaml` | `${string}.yml` | `http://${string}` | `https://${string}`;
|
|
325
281
|
readonly output?: `${string}.ts` | undefined;
|
|
326
282
|
readonly prefix?: string | undefined;
|
|
327
283
|
readonly format?: FormatConfig | undefined;
|
|
@@ -329,145 +285,148 @@ declare function parseConfig(config: unknown): Effect.Effect<{
|
|
|
329
285
|
readonly pathAlias?: string | undefined;
|
|
330
286
|
readonly integration?: boolean | undefined;
|
|
331
287
|
readonly package?: string | undefined;
|
|
288
|
+
readonly readonly?: boolean | undefined;
|
|
332
289
|
readonly components?: {
|
|
290
|
+
readonly output?: `${string}.ts` | undefined;
|
|
291
|
+
readonly package?: string | undefined;
|
|
333
292
|
readonly schemas?: {
|
|
334
293
|
readonly split: true;
|
|
335
294
|
readonly output: string;
|
|
336
|
-
readonly exportTypes: boolean;
|
|
337
|
-
readonly package?: string | undefined;
|
|
338
295
|
readonly import?: undefined;
|
|
296
|
+
readonly package?: string | undefined;
|
|
297
|
+
readonly exportTypes: boolean;
|
|
339
298
|
} | {
|
|
340
299
|
readonly split: false;
|
|
341
300
|
readonly output: string;
|
|
342
|
-
readonly exportTypes: boolean;
|
|
343
|
-
readonly package?: string | undefined;
|
|
344
301
|
readonly import?: undefined;
|
|
302
|
+
readonly package?: string | undefined;
|
|
303
|
+
readonly exportTypes: boolean;
|
|
345
304
|
} | undefined;
|
|
346
305
|
readonly responses?: {
|
|
347
306
|
readonly split: true;
|
|
348
307
|
readonly output: string;
|
|
349
|
-
readonly exportTypes: boolean;
|
|
350
|
-
readonly package?: string | undefined;
|
|
351
308
|
readonly import?: undefined;
|
|
309
|
+
readonly package?: string | undefined;
|
|
310
|
+
readonly exportTypes: boolean;
|
|
352
311
|
} | {
|
|
353
312
|
readonly split: false;
|
|
354
313
|
readonly output: string;
|
|
355
|
-
readonly exportTypes: boolean;
|
|
356
|
-
readonly package?: string | undefined;
|
|
357
314
|
readonly import?: undefined;
|
|
315
|
+
readonly package?: string | undefined;
|
|
316
|
+
readonly exportTypes: boolean;
|
|
358
317
|
} | undefined;
|
|
359
318
|
readonly parameters?: {
|
|
360
319
|
readonly split: true;
|
|
361
320
|
readonly output: string;
|
|
362
|
-
readonly exportTypes: boolean;
|
|
363
|
-
readonly package?: string | undefined;
|
|
364
321
|
readonly import?: undefined;
|
|
322
|
+
readonly package?: string | undefined;
|
|
323
|
+
readonly exportTypes: boolean;
|
|
365
324
|
} | {
|
|
366
325
|
readonly split: false;
|
|
367
326
|
readonly output: string;
|
|
368
|
-
readonly exportTypes: boolean;
|
|
369
|
-
readonly package?: string | undefined;
|
|
370
327
|
readonly import?: undefined;
|
|
328
|
+
readonly package?: string | undefined;
|
|
329
|
+
readonly exportTypes: boolean;
|
|
371
330
|
} | undefined;
|
|
372
331
|
readonly examples?: {
|
|
373
332
|
readonly split: true;
|
|
374
333
|
readonly output: string;
|
|
375
|
-
readonly package?: string | undefined;
|
|
376
334
|
readonly import?: undefined;
|
|
335
|
+
readonly package?: string | undefined;
|
|
377
336
|
} | {
|
|
378
337
|
readonly split: false;
|
|
379
338
|
readonly output: string;
|
|
380
|
-
readonly package?: string | undefined;
|
|
381
339
|
readonly import?: undefined;
|
|
340
|
+
readonly package?: string | undefined;
|
|
382
341
|
} | undefined;
|
|
383
342
|
readonly requestBodies?: {
|
|
384
343
|
readonly split: true;
|
|
385
344
|
readonly output: string;
|
|
386
|
-
readonly exportTypes: boolean;
|
|
387
|
-
readonly package?: string | undefined;
|
|
388
345
|
readonly import?: undefined;
|
|
346
|
+
readonly package?: string | undefined;
|
|
347
|
+
readonly exportTypes: boolean;
|
|
389
348
|
} | {
|
|
390
349
|
readonly split: false;
|
|
391
350
|
readonly output: string;
|
|
392
|
-
readonly exportTypes: boolean;
|
|
393
|
-
readonly package?: string | undefined;
|
|
394
351
|
readonly import?: undefined;
|
|
352
|
+
readonly package?: string | undefined;
|
|
353
|
+
readonly exportTypes: boolean;
|
|
395
354
|
} | undefined;
|
|
396
355
|
readonly headers?: {
|
|
397
356
|
readonly split: true;
|
|
398
357
|
readonly output: string;
|
|
399
|
-
readonly exportTypes: boolean;
|
|
400
|
-
readonly package?: string | undefined;
|
|
401
358
|
readonly import?: undefined;
|
|
359
|
+
readonly package?: string | undefined;
|
|
360
|
+
readonly exportTypes: boolean;
|
|
402
361
|
} | {
|
|
403
362
|
readonly split: false;
|
|
404
363
|
readonly output: string;
|
|
405
|
-
readonly exportTypes: boolean;
|
|
406
|
-
readonly package?: string | undefined;
|
|
407
364
|
readonly import?: undefined;
|
|
365
|
+
readonly package?: string | undefined;
|
|
366
|
+
readonly exportTypes: boolean;
|
|
408
367
|
} | undefined;
|
|
409
368
|
readonly securitySchemes?: {
|
|
410
369
|
readonly split: true;
|
|
411
370
|
readonly output: string;
|
|
412
|
-
readonly package?: string | undefined;
|
|
413
371
|
readonly import?: undefined;
|
|
372
|
+
readonly package?: string | undefined;
|
|
414
373
|
} | {
|
|
415
374
|
readonly split: false;
|
|
416
375
|
readonly output: string;
|
|
417
|
-
readonly package?: string | undefined;
|
|
418
376
|
readonly import?: undefined;
|
|
377
|
+
readonly package?: string | undefined;
|
|
419
378
|
} | undefined;
|
|
420
379
|
readonly links?: {
|
|
421
380
|
readonly split: true;
|
|
422
381
|
readonly output: string;
|
|
423
|
-
readonly package?: string | undefined;
|
|
424
382
|
readonly import?: undefined;
|
|
383
|
+
readonly package?: string | undefined;
|
|
425
384
|
} | {
|
|
426
385
|
readonly split: false;
|
|
427
386
|
readonly output: string;
|
|
428
|
-
readonly package?: string | undefined;
|
|
429
387
|
readonly import?: undefined;
|
|
388
|
+
readonly package?: string | undefined;
|
|
430
389
|
} | undefined;
|
|
431
390
|
readonly callbacks?: {
|
|
432
391
|
readonly split: true;
|
|
433
392
|
readonly output: string;
|
|
434
|
-
readonly package?: string | undefined;
|
|
435
393
|
readonly import?: undefined;
|
|
394
|
+
readonly package?: string | undefined;
|
|
436
395
|
} | {
|
|
437
396
|
readonly split: false;
|
|
438
397
|
readonly output: string;
|
|
439
|
-
readonly package?: string | undefined;
|
|
440
398
|
readonly import?: undefined;
|
|
399
|
+
readonly package?: string | undefined;
|
|
441
400
|
} | undefined;
|
|
442
401
|
readonly pathItems?: {
|
|
443
402
|
readonly split: true;
|
|
444
403
|
readonly output: string;
|
|
445
|
-
readonly package?: string | undefined;
|
|
446
404
|
readonly import?: undefined;
|
|
405
|
+
readonly package?: string | undefined;
|
|
447
406
|
} | {
|
|
448
407
|
readonly split: false;
|
|
449
408
|
readonly output: string;
|
|
450
|
-
readonly package?: string | undefined;
|
|
451
409
|
readonly import?: undefined;
|
|
410
|
+
readonly package?: string | undefined;
|
|
452
411
|
} | undefined;
|
|
453
412
|
readonly mediaTypes?: {
|
|
454
413
|
readonly split: true;
|
|
455
414
|
readonly output: string;
|
|
456
|
-
readonly exportTypes: boolean;
|
|
457
|
-
readonly package?: string | undefined;
|
|
458
415
|
readonly import?: undefined;
|
|
416
|
+
readonly package?: string | undefined;
|
|
417
|
+
readonly exportTypes: boolean;
|
|
459
418
|
} | {
|
|
460
419
|
readonly split: false;
|
|
461
420
|
readonly output: string;
|
|
462
|
-
readonly exportTypes: boolean;
|
|
463
|
-
readonly package?: string | undefined;
|
|
464
421
|
readonly import?: undefined;
|
|
422
|
+
readonly package?: string | undefined;
|
|
423
|
+
readonly exportTypes: boolean;
|
|
465
424
|
} | undefined;
|
|
466
|
-
readonly output?: `${string}.ts` | undefined;
|
|
467
|
-
readonly package?: string | undefined;
|
|
468
425
|
} | undefined;
|
|
469
426
|
readonly client?: {
|
|
470
427
|
readonly output: `${string}.ts`;
|
|
428
|
+
readonly import?: undefined;
|
|
429
|
+
readonly package?: string | undefined;
|
|
471
430
|
readonly baseUrl: {
|
|
472
431
|
readonly import: string;
|
|
473
432
|
readonly value: string;
|
|
@@ -475,14 +434,12 @@ declare function parseConfig(config: unknown): Effect.Effect<{
|
|
|
475
434
|
readonly env: string;
|
|
476
435
|
readonly source: "import.meta.env" | "process.env";
|
|
477
436
|
};
|
|
478
|
-
readonly package?: string | undefined;
|
|
479
|
-
readonly import?: undefined;
|
|
480
437
|
readonly sameOrigin?: boolean | undefined;
|
|
481
438
|
} | undefined;
|
|
482
439
|
readonly eden?: {
|
|
483
|
-
readonly output: string;
|
|
484
440
|
readonly import?: undefined;
|
|
485
441
|
readonly client?: undefined;
|
|
442
|
+
readonly output: string;
|
|
486
443
|
readonly docs?: undefined;
|
|
487
444
|
} | undefined;
|
|
488
445
|
readonly types?: {
|
|
@@ -491,7 +448,7 @@ declare function parseConfig(config: unknown): Effect.Effect<{
|
|
|
491
448
|
readonly test?: undefined;
|
|
492
449
|
readonly mock?: {
|
|
493
450
|
readonly output: string;
|
|
494
|
-
readonly useExamples?:
|
|
451
|
+
readonly useExamples?: "all" | boolean | undefined;
|
|
495
452
|
readonly seed?: number | readonly [number, ...number[]] | undefined;
|
|
496
453
|
readonly locale?: string | undefined;
|
|
497
454
|
readonly delay?: number | false | {
|
|
@@ -501,59 +458,58 @@ declare function parseConfig(config: unknown): Effect.Effect<{
|
|
|
501
458
|
readonly arrayMin?: number | undefined;
|
|
502
459
|
readonly arrayMax?: number | undefined;
|
|
503
460
|
} | undefined;
|
|
504
|
-
}, ConfigError, never>;
|
|
505
|
-
/**
|
|
506
|
-
* Loads and validates a config file, resolved against the current directory.
|
|
507
|
-
*
|
|
508
|
-
* `reload` re-reads a config that has already been imported — what `--watch` needs after the file
|
|
509
|
-
* changes, and nothing else should ask for, since every reload leaves another copy of the module
|
|
510
|
-
* behind.
|
|
511
|
-
*/
|
|
512
|
-
declare function readConfig(configPath?: string, reload?: boolean): Effect.Effect<{
|
|
513
|
-
readonly input: `${string}.yaml` | `${string}.json` | `${string}.tsp`;
|
|
514
461
|
readonly swr?: {
|
|
515
|
-
readonly output: string;
|
|
516
|
-
readonly split?: undefined;
|
|
517
462
|
readonly import?: undefined;
|
|
518
463
|
readonly client?: undefined;
|
|
519
|
-
} | undefined;
|
|
520
|
-
readonly 'tanstack-query'?: {
|
|
521
464
|
readonly output: string;
|
|
522
465
|
readonly split?: undefined;
|
|
466
|
+
} | undefined;
|
|
467
|
+
readonly 'tanstack-query'?: {
|
|
523
468
|
readonly import?: undefined;
|
|
524
469
|
readonly client?: undefined;
|
|
525
|
-
} | undefined;
|
|
526
|
-
readonly 'preact-query'?: {
|
|
527
470
|
readonly output: string;
|
|
528
471
|
readonly split?: undefined;
|
|
472
|
+
} | undefined;
|
|
473
|
+
readonly 'preact-query'?: {
|
|
529
474
|
readonly import?: undefined;
|
|
530
475
|
readonly client?: undefined;
|
|
531
|
-
} | undefined;
|
|
532
|
-
readonly 'solid-query'?: {
|
|
533
476
|
readonly output: string;
|
|
534
477
|
readonly split?: undefined;
|
|
478
|
+
} | undefined;
|
|
479
|
+
readonly 'solid-query'?: {
|
|
535
480
|
readonly import?: undefined;
|
|
536
481
|
readonly client?: undefined;
|
|
537
|
-
} | undefined;
|
|
538
|
-
readonly 'vue-query'?: {
|
|
539
482
|
readonly output: string;
|
|
540
483
|
readonly split?: undefined;
|
|
484
|
+
} | undefined;
|
|
485
|
+
readonly 'vue-query'?: {
|
|
541
486
|
readonly import?: undefined;
|
|
542
487
|
readonly client?: undefined;
|
|
543
|
-
} | undefined;
|
|
544
|
-
readonly 'svelte-query'?: {
|
|
545
488
|
readonly output: string;
|
|
546
489
|
readonly split?: undefined;
|
|
490
|
+
} | undefined;
|
|
491
|
+
readonly 'svelte-query'?: {
|
|
547
492
|
readonly import?: undefined;
|
|
548
493
|
readonly client?: undefined;
|
|
549
|
-
} | undefined;
|
|
550
|
-
readonly 'angular-query'?: {
|
|
551
494
|
readonly output: string;
|
|
552
495
|
readonly split?: undefined;
|
|
496
|
+
} | undefined;
|
|
497
|
+
readonly 'angular-query'?: {
|
|
553
498
|
readonly import?: undefined;
|
|
554
499
|
readonly client?: undefined;
|
|
500
|
+
readonly output: string;
|
|
501
|
+
readonly split?: undefined;
|
|
555
502
|
} | undefined;
|
|
556
|
-
|
|
503
|
+
}, ConfigError, never>;
|
|
504
|
+
/**
|
|
505
|
+
* Loads and validates a config file, resolved against the current directory.
|
|
506
|
+
*
|
|
507
|
+
* `reload` re-reads a config that has already been imported — what `--watch` needs after the file
|
|
508
|
+
* changes, and nothing else should ask for, since every reload leaves another copy of the module
|
|
509
|
+
* behind.
|
|
510
|
+
*/
|
|
511
|
+
export declare function readConfig(configPath?: string, reload?: boolean): Effect.Effect<{
|
|
512
|
+
readonly input: `${string}.json` | `${string}.tsp` | `${string}.yaml` | `${string}.yml` | `http://${string}` | `https://${string}`;
|
|
557
513
|
readonly output?: `${string}.ts` | undefined;
|
|
558
514
|
readonly prefix?: string | undefined;
|
|
559
515
|
readonly format?: FormatConfig | undefined;
|
|
@@ -561,145 +517,148 @@ declare function readConfig(configPath?: string, reload?: boolean): Effect.Effec
|
|
|
561
517
|
readonly pathAlias?: string | undefined;
|
|
562
518
|
readonly integration?: boolean | undefined;
|
|
563
519
|
readonly package?: string | undefined;
|
|
520
|
+
readonly readonly?: boolean | undefined;
|
|
564
521
|
readonly components?: {
|
|
522
|
+
readonly output?: `${string}.ts` | undefined;
|
|
523
|
+
readonly package?: string | undefined;
|
|
565
524
|
readonly schemas?: {
|
|
566
525
|
readonly split: true;
|
|
567
526
|
readonly output: string;
|
|
568
|
-
readonly exportTypes: boolean;
|
|
569
|
-
readonly package?: string | undefined;
|
|
570
527
|
readonly import?: undefined;
|
|
528
|
+
readonly package?: string | undefined;
|
|
529
|
+
readonly exportTypes: boolean;
|
|
571
530
|
} | {
|
|
572
531
|
readonly split: false;
|
|
573
532
|
readonly output: string;
|
|
574
|
-
readonly exportTypes: boolean;
|
|
575
|
-
readonly package?: string | undefined;
|
|
576
533
|
readonly import?: undefined;
|
|
534
|
+
readonly package?: string | undefined;
|
|
535
|
+
readonly exportTypes: boolean;
|
|
577
536
|
} | undefined;
|
|
578
537
|
readonly responses?: {
|
|
579
538
|
readonly split: true;
|
|
580
539
|
readonly output: string;
|
|
581
|
-
readonly exportTypes: boolean;
|
|
582
|
-
readonly package?: string | undefined;
|
|
583
540
|
readonly import?: undefined;
|
|
541
|
+
readonly package?: string | undefined;
|
|
542
|
+
readonly exportTypes: boolean;
|
|
584
543
|
} | {
|
|
585
544
|
readonly split: false;
|
|
586
545
|
readonly output: string;
|
|
587
|
-
readonly exportTypes: boolean;
|
|
588
|
-
readonly package?: string | undefined;
|
|
589
546
|
readonly import?: undefined;
|
|
547
|
+
readonly package?: string | undefined;
|
|
548
|
+
readonly exportTypes: boolean;
|
|
590
549
|
} | undefined;
|
|
591
550
|
readonly parameters?: {
|
|
592
551
|
readonly split: true;
|
|
593
552
|
readonly output: string;
|
|
594
|
-
readonly exportTypes: boolean;
|
|
595
|
-
readonly package?: string | undefined;
|
|
596
553
|
readonly import?: undefined;
|
|
554
|
+
readonly package?: string | undefined;
|
|
555
|
+
readonly exportTypes: boolean;
|
|
597
556
|
} | {
|
|
598
557
|
readonly split: false;
|
|
599
558
|
readonly output: string;
|
|
600
|
-
readonly exportTypes: boolean;
|
|
601
|
-
readonly package?: string | undefined;
|
|
602
559
|
readonly import?: undefined;
|
|
560
|
+
readonly package?: string | undefined;
|
|
561
|
+
readonly exportTypes: boolean;
|
|
603
562
|
} | undefined;
|
|
604
563
|
readonly examples?: {
|
|
605
564
|
readonly split: true;
|
|
606
565
|
readonly output: string;
|
|
607
|
-
readonly package?: string | undefined;
|
|
608
566
|
readonly import?: undefined;
|
|
567
|
+
readonly package?: string | undefined;
|
|
609
568
|
} | {
|
|
610
569
|
readonly split: false;
|
|
611
570
|
readonly output: string;
|
|
612
|
-
readonly package?: string | undefined;
|
|
613
571
|
readonly import?: undefined;
|
|
572
|
+
readonly package?: string | undefined;
|
|
614
573
|
} | undefined;
|
|
615
574
|
readonly requestBodies?: {
|
|
616
575
|
readonly split: true;
|
|
617
576
|
readonly output: string;
|
|
618
|
-
readonly exportTypes: boolean;
|
|
619
|
-
readonly package?: string | undefined;
|
|
620
577
|
readonly import?: undefined;
|
|
578
|
+
readonly package?: string | undefined;
|
|
579
|
+
readonly exportTypes: boolean;
|
|
621
580
|
} | {
|
|
622
581
|
readonly split: false;
|
|
623
582
|
readonly output: string;
|
|
624
|
-
readonly exportTypes: boolean;
|
|
625
|
-
readonly package?: string | undefined;
|
|
626
583
|
readonly import?: undefined;
|
|
584
|
+
readonly package?: string | undefined;
|
|
585
|
+
readonly exportTypes: boolean;
|
|
627
586
|
} | undefined;
|
|
628
587
|
readonly headers?: {
|
|
629
588
|
readonly split: true;
|
|
630
589
|
readonly output: string;
|
|
631
|
-
readonly exportTypes: boolean;
|
|
632
|
-
readonly package?: string | undefined;
|
|
633
590
|
readonly import?: undefined;
|
|
591
|
+
readonly package?: string | undefined;
|
|
592
|
+
readonly exportTypes: boolean;
|
|
634
593
|
} | {
|
|
635
594
|
readonly split: false;
|
|
636
595
|
readonly output: string;
|
|
637
|
-
readonly exportTypes: boolean;
|
|
638
|
-
readonly package?: string | undefined;
|
|
639
596
|
readonly import?: undefined;
|
|
597
|
+
readonly package?: string | undefined;
|
|
598
|
+
readonly exportTypes: boolean;
|
|
640
599
|
} | undefined;
|
|
641
600
|
readonly securitySchemes?: {
|
|
642
601
|
readonly split: true;
|
|
643
602
|
readonly output: string;
|
|
644
|
-
readonly package?: string | undefined;
|
|
645
603
|
readonly import?: undefined;
|
|
604
|
+
readonly package?: string | undefined;
|
|
646
605
|
} | {
|
|
647
606
|
readonly split: false;
|
|
648
607
|
readonly output: string;
|
|
649
|
-
readonly package?: string | undefined;
|
|
650
608
|
readonly import?: undefined;
|
|
609
|
+
readonly package?: string | undefined;
|
|
651
610
|
} | undefined;
|
|
652
611
|
readonly links?: {
|
|
653
612
|
readonly split: true;
|
|
654
613
|
readonly output: string;
|
|
655
|
-
readonly package?: string | undefined;
|
|
656
614
|
readonly import?: undefined;
|
|
615
|
+
readonly package?: string | undefined;
|
|
657
616
|
} | {
|
|
658
617
|
readonly split: false;
|
|
659
618
|
readonly output: string;
|
|
660
|
-
readonly package?: string | undefined;
|
|
661
619
|
readonly import?: undefined;
|
|
620
|
+
readonly package?: string | undefined;
|
|
662
621
|
} | undefined;
|
|
663
622
|
readonly callbacks?: {
|
|
664
623
|
readonly split: true;
|
|
665
624
|
readonly output: string;
|
|
666
|
-
readonly package?: string | undefined;
|
|
667
625
|
readonly import?: undefined;
|
|
626
|
+
readonly package?: string | undefined;
|
|
668
627
|
} | {
|
|
669
628
|
readonly split: false;
|
|
670
629
|
readonly output: string;
|
|
671
|
-
readonly package?: string | undefined;
|
|
672
630
|
readonly import?: undefined;
|
|
631
|
+
readonly package?: string | undefined;
|
|
673
632
|
} | undefined;
|
|
674
633
|
readonly pathItems?: {
|
|
675
634
|
readonly split: true;
|
|
676
635
|
readonly output: string;
|
|
677
|
-
readonly package?: string | undefined;
|
|
678
636
|
readonly import?: undefined;
|
|
637
|
+
readonly package?: string | undefined;
|
|
679
638
|
} | {
|
|
680
639
|
readonly split: false;
|
|
681
640
|
readonly output: string;
|
|
682
|
-
readonly package?: string | undefined;
|
|
683
641
|
readonly import?: undefined;
|
|
642
|
+
readonly package?: string | undefined;
|
|
684
643
|
} | undefined;
|
|
685
644
|
readonly mediaTypes?: {
|
|
686
645
|
readonly split: true;
|
|
687
646
|
readonly output: string;
|
|
688
|
-
readonly exportTypes: boolean;
|
|
689
|
-
readonly package?: string | undefined;
|
|
690
647
|
readonly import?: undefined;
|
|
648
|
+
readonly package?: string | undefined;
|
|
649
|
+
readonly exportTypes: boolean;
|
|
691
650
|
} | {
|
|
692
651
|
readonly split: false;
|
|
693
652
|
readonly output: string;
|
|
694
|
-
readonly exportTypes: boolean;
|
|
695
|
-
readonly package?: string | undefined;
|
|
696
653
|
readonly import?: undefined;
|
|
654
|
+
readonly package?: string | undefined;
|
|
655
|
+
readonly exportTypes: boolean;
|
|
697
656
|
} | undefined;
|
|
698
|
-
readonly output?: `${string}.ts` | undefined;
|
|
699
|
-
readonly package?: string | undefined;
|
|
700
657
|
} | undefined;
|
|
701
658
|
readonly client?: {
|
|
702
659
|
readonly output: `${string}.ts`;
|
|
660
|
+
readonly import?: undefined;
|
|
661
|
+
readonly package?: string | undefined;
|
|
703
662
|
readonly baseUrl: {
|
|
704
663
|
readonly import: string;
|
|
705
664
|
readonly value: string;
|
|
@@ -707,14 +666,12 @@ declare function readConfig(configPath?: string, reload?: boolean): Effect.Effec
|
|
|
707
666
|
readonly env: string;
|
|
708
667
|
readonly source: "import.meta.env" | "process.env";
|
|
709
668
|
};
|
|
710
|
-
readonly package?: string | undefined;
|
|
711
|
-
readonly import?: undefined;
|
|
712
669
|
readonly sameOrigin?: boolean | undefined;
|
|
713
670
|
} | undefined;
|
|
714
671
|
readonly eden?: {
|
|
715
|
-
readonly output: string;
|
|
716
672
|
readonly import?: undefined;
|
|
717
673
|
readonly client?: undefined;
|
|
674
|
+
readonly output: string;
|
|
718
675
|
readonly docs?: undefined;
|
|
719
676
|
} | undefined;
|
|
720
677
|
readonly types?: {
|
|
@@ -723,7 +680,7 @@ declare function readConfig(configPath?: string, reload?: boolean): Effect.Effec
|
|
|
723
680
|
readonly test?: undefined;
|
|
724
681
|
readonly mock?: {
|
|
725
682
|
readonly output: string;
|
|
726
|
-
readonly useExamples?:
|
|
683
|
+
readonly useExamples?: "all" | boolean | undefined;
|
|
727
684
|
readonly seed?: number | readonly [number, ...number[]] | undefined;
|
|
728
685
|
readonly locale?: string | undefined;
|
|
729
686
|
readonly delay?: number | false | {
|
|
@@ -733,6 +690,48 @@ declare function readConfig(configPath?: string, reload?: boolean): Effect.Effec
|
|
|
733
690
|
readonly arrayMin?: number | undefined;
|
|
734
691
|
readonly arrayMax?: number | undefined;
|
|
735
692
|
} | undefined;
|
|
693
|
+
readonly swr?: {
|
|
694
|
+
readonly import?: undefined;
|
|
695
|
+
readonly client?: undefined;
|
|
696
|
+
readonly output: string;
|
|
697
|
+
readonly split?: undefined;
|
|
698
|
+
} | undefined;
|
|
699
|
+
readonly 'tanstack-query'?: {
|
|
700
|
+
readonly import?: undefined;
|
|
701
|
+
readonly client?: undefined;
|
|
702
|
+
readonly output: string;
|
|
703
|
+
readonly split?: undefined;
|
|
704
|
+
} | undefined;
|
|
705
|
+
readonly 'preact-query'?: {
|
|
706
|
+
readonly import?: undefined;
|
|
707
|
+
readonly client?: undefined;
|
|
708
|
+
readonly output: string;
|
|
709
|
+
readonly split?: undefined;
|
|
710
|
+
} | undefined;
|
|
711
|
+
readonly 'solid-query'?: {
|
|
712
|
+
readonly import?: undefined;
|
|
713
|
+
readonly client?: undefined;
|
|
714
|
+
readonly output: string;
|
|
715
|
+
readonly split?: undefined;
|
|
716
|
+
} | undefined;
|
|
717
|
+
readonly 'vue-query'?: {
|
|
718
|
+
readonly import?: undefined;
|
|
719
|
+
readonly client?: undefined;
|
|
720
|
+
readonly output: string;
|
|
721
|
+
readonly split?: undefined;
|
|
722
|
+
} | undefined;
|
|
723
|
+
readonly 'svelte-query'?: {
|
|
724
|
+
readonly import?: undefined;
|
|
725
|
+
readonly client?: undefined;
|
|
726
|
+
readonly output: string;
|
|
727
|
+
readonly split?: undefined;
|
|
728
|
+
} | undefined;
|
|
729
|
+
readonly 'angular-query'?: {
|
|
730
|
+
readonly import?: undefined;
|
|
731
|
+
readonly client?: undefined;
|
|
732
|
+
readonly output: string;
|
|
733
|
+
readonly split?: undefined;
|
|
734
|
+
} | undefined;
|
|
736
735
|
}, ConfigError, FileSystem.FileSystem>;
|
|
737
736
|
type ConfigInput = typeof ConfigSchema.Encoded;
|
|
738
737
|
/**
|
|
@@ -740,7 +739,7 @@ type ConfigInput = typeof ConfigSchema.Encoded;
|
|
|
740
739
|
* names one of them without the block is refused as it is typed, the way `parseConfig` refuses
|
|
741
740
|
* it: the block's key is the message.
|
|
742
741
|
*/
|
|
743
|
-
type ClientRequired<T> = 'client' extends keyof T ? unknown : { readonly [K in (typeof HOOK_KINDS)[number] | 'eden']?: 'needs the top-level client it imports: add client: { output }' };
|
|
742
|
+
type ClientRequired<T> = 'client' extends keyof T ? unknown : { readonly [K in (typeof HOOK_KINDS)[number] | 'eden']?: 'needs the top-level client it imports: add client: { output }'; };
|
|
744
743
|
/**
|
|
745
744
|
* The config as it is typed.
|
|
746
745
|
*
|
|
@@ -750,6 +749,5 @@ type ClientRequired<T> = 'client' extends keyof T ? unknown : { readonly [K in (
|
|
|
750
749
|
* output, a prefix without its slash. The one exception is the client the hooks need, which is
|
|
751
750
|
* told on the hook's key.
|
|
752
751
|
*/
|
|
753
|
-
declare function defineConfig<const T extends ConfigInput>(config: T & ClientRequired<T>): T & ClientRequired<T>;
|
|
754
|
-
|
|
755
|
-
export { COMPONENT_KINDS, Config, ConfigError, HOOK_KINDS, defineConfig, parseConfig, readConfig };
|
|
752
|
+
export declare function defineConfig<const T extends ConfigInput>(config: T & ClientRequired<T>): T & ClientRequired<T>;
|
|
753
|
+
export {};
|