@h3ravel/shared 0.27.3 → 0.27.4

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/index.d.mts DELETED
@@ -1,1448 +0,0 @@
1
- /// <reference path="./app.globals.d.ts" />
2
- import { ChalkInstance } from "chalk";
3
- import { ChoiceOrSeparatorArray, ChoiceOrSeparatorArray as ChoiceOrSeparatorArray$1 } from "inquirer-autocomplete-standalone";
4
- import { Separator } from "@inquirer/prompts";
5
- import { H3, H3Event, HTTPResponse, Middleware, MiddlewareOptions, serve } from "h3";
6
- import { Edge } from "edge.js";
7
- import { DotNestedKeys as DotNestedKeys$1, DotNestedValue as DotNestedValue$1 } from "@h3ravel/shared";
8
-
9
- //#region src/Contracts/ObjContract.d.ts
10
- /**
11
- * Adds a dot prefix to nested keys
12
- */
13
- type DotPrefix<T extends string, U extends string> = T extends '' ? U : `${T}.${U}`;
14
- /**
15
- * Converts a union of objects into a single merged object
16
- */
17
- type MergeUnion<T> = (T extends any ? (k: T) => void : never) extends ((k: infer I) => void) ? { [K in keyof I]: I[K] } : never;
18
- /**
19
- * Flattens nested objects into dotted keys
20
- */
21
- type DotFlatten<T, Prefix extends string = ''> = MergeUnion<{ [K in keyof T & string]: T[K] extends Record<string, any> ? DotFlatten<T[K], DotPrefix<Prefix, K>> : { [P in DotPrefix<Prefix, K>]: T[K] } }[keyof T & string]>;
22
- /**
23
- * Builds "nested.key" paths for autocompletion
24
- */
25
- type DotNestedKeys<T> = { [K in keyof T & string]: T[K] extends object ? `${K}` | `${K}.${DotNestedKeys<T[K]>}` : `${K}` }[keyof T & string];
26
- /**
27
- * Retrieves type at a given dot-path
28
- */
29
- type DotNestedValue<T, Path extends string> = Path extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? DotNestedValue<T[Key], Rest> : never : Path extends keyof T ? T[Path] : never;
30
- /**
31
- * A generic object type that supports nullable string values
32
- */
33
- interface GenericWithNullableStringValues {
34
- [name: string]: string | undefined;
35
- }
36
- //#endregion
37
- //#region src/Contracts/IContainer.d.ts
38
- /**
39
- * Interface for the Container contract, defining methods for dependency injection and service resolution.
40
- */
41
- interface IContainer {
42
- /**
43
- * Binds a transient service to the container.
44
- * @param key - The key or constructor for the service.
45
- * @param factory - The factory function to create the service instance.
46
- */
47
- bind<T>(key: new (...args: any[]) => T, factory: () => T): void;
48
- bind<T extends UseKey>(key: T, factory: () => Bindings[T]): void;
49
- /**
50
- * Binds a singleton service to the container.
51
- * @param key - The key or constructor for the service.
52
- * @param factory - The factory function to create the singleton instance.
53
- */
54
- singleton<T extends UseKey>(key: T | (new (...args: any[]) => Bindings[T]), factory: () => Bindings[T]): void;
55
- /**
56
- * Resolves a service from the container.
57
- * @param key - The key or constructor for the service.
58
- * @returns The resolved service instance.
59
- */
60
- make<T extends UseKey, X = undefined>(key: T | (new (..._args: any[]) => Bindings[T])): X extends undefined ? Bindings[T] : X;
61
- /**
62
- * Checks if a service is registered in the container.
63
- * @param key - The key to check.
64
- * @returns True if the service is registered, false otherwise.
65
- */
66
- has(key: UseKey): boolean;
67
- }
68
- //#endregion
69
- //#region src/Contracts/IServiceProvider.d.ts
70
- interface IServiceProvider {
71
- /**
72
- * Unique Identifier for service providers
73
- */
74
- uid?: number;
75
- /**
76
- * Sort order
77
- */
78
- order?: `before:${string}` | `after:${string}` | string | undefined;
79
- /**
80
- * Sort priority
81
- */
82
- priority?: number;
83
- /**
84
- * Indicate that this service provider only runs in console
85
- */
86
- runsInConsole?: boolean;
87
- /**
88
- * List of registered console commands
89
- */
90
- registeredCommands?: (new (app: IApplication, kernel: any) => any)[];
91
- /**
92
- * An array of console commands to register.
93
- */
94
- commands?(commands: (new (app: IApplication, kernel: any) => any)[]): void;
95
- /**
96
- * Register bindings to the container.
97
- * Runs before boot().
98
- */
99
- register?(...app: unknown[]): void | Promise<void>;
100
- /**
101
- * Perform post-registration booting of services.
102
- * Runs after all providers have been registered.
103
- */
104
- boot?(...app: unknown[]): void | Promise<void>;
105
- }
106
- //#endregion
107
- //#region src/Contracts/IApplication.d.ts
108
- type IPathName = 'views' | 'routes' | 'assets' | 'base' | 'public' | 'storage' | 'config' | 'database';
109
- interface IApplication extends IContainer {
110
- /**
111
- * Registers configured service providers.
112
- */
113
- registerConfiguredProviders(): Promise<void>;
114
- /**
115
- * Registers an array of external service provider classes.
116
- * @param providers - Array of service provider constructor functions.
117
- */
118
- registerProviders(providers: Array<(new <A = IApplication, S = IServiceProvider>(app: A) => S)>): void;
119
- /**
120
- * Registers a single service provider.
121
- * @param provider - The service provider instance to register.
122
- */
123
- /**
124
- * Boots all registered providers.
125
- */
126
- boot(): Promise<this>;
127
- /**
128
- * Gets the base path of the application.
129
- * @returns The base path as a string.
130
- */
131
- getBasePath(): string;
132
- /**
133
- * Retrieves a path by name, optionally appending a sub-path.
134
- * @param name - The name of the path property.
135
- * @param pth - Optional sub-path to append.
136
- * @returns The resolved path as a string.
137
- */
138
- getPath(name: string, pth?: string): string;
139
- /**
140
- * Sets a path for a given name.
141
- * @param name - The name of the path property.
142
- * @param path - The path to set.
143
- * @returns
144
- */
145
- setPath(name: IPathName, path: string): void;
146
- /**
147
- * Gets the version of the application or TypeScript.
148
- * @param key - The key to retrieve ('app' or 'ts').
149
- * @returns The version string or undefined.
150
- */
151
- getVersion(key: string): string | undefined;
152
- }
153
- //#endregion
154
- //#region src/Contracts/IHttpResponse.d.ts
155
- /**
156
- * Interface for the Response contract, defining methods for handling HTTP responses.
157
- */
158
- interface IHttpResponse {
159
- /**
160
- * Set HTTP status code.
161
- */
162
- setStatusCode(code: number, text?: string): this;
163
- /**
164
- * Retrieves the status code for the current web response.
165
- */
166
- getStatusCode(): number;
167
- /**
168
- * Sets the response charset.
169
- */
170
- setCharset(charset: string): this;
171
- /**
172
- * Retrieves the response charset.
173
- */
174
- getCharset(): string | undefined;
175
- /**
176
- * Returns true if the response may safely be kept in a shared (surrogate) cache.
177
- *
178
- * Responses marked "private" with an explicit Cache-Control directive are
179
- * considered uncacheable.
180
- *
181
- * Responses with neither a freshness lifetime (Expires, max-age) nor cache
182
- * validator (Last-Modified, ETag) are considered uncacheable because there is
183
- * no way to tell when or how to remove them from the cache.
184
- *
185
- * Note that RFC 7231 and RFC 7234 possibly allow for a more permissive implementation,
186
- * for example "status codes that are defined as cacheable by default [...]
187
- * can be reused by a cache with heuristic expiration unless otherwise indicated"
188
- * (https://tools.ietf.org/html/rfc7231#section-6.1)
189
- *
190
- * @final
191
- */
192
- isCacheable(): boolean;
193
- /**
194
- * Returns true if the response is "fresh".
195
- *
196
- * Fresh responses may be served from cache without any interaction with the
197
- * origin. A response is considered fresh when it includes a Cache-Control/max-age
198
- * indicator or Expires header and the calculated age is less than the freshness lifetime.
199
- */
200
- isFresh(): boolean;
201
- /**
202
- * Returns true if the response includes headers that can be used to validate
203
- * the response with the origin server using a conditional GET request.
204
- */
205
- isValidateable(): boolean;
206
- /**
207
- * Sets the response content.
208
- */
209
- setContent(content?: any): this;
210
- /**
211
- * Gets the current response content.
212
- */
213
- getContent(): any;
214
- /**
215
- * Set a header.
216
- */
217
- setHeader(name: string, value: string): this;
218
- /**
219
- * Sets the HTTP protocol version (1.0 or 1.1).
220
- */
221
- setProtocolVersion(version: string): this;
222
- /**
223
- * Gets the HTTP protocol version.
224
- */
225
- getProtocolVersion(): string;
226
- /**
227
- * Marks the response as "private".
228
- *
229
- * It makes the response ineligible for serving other clients.
230
- */
231
- setPrivate(): this;
232
- /**
233
- * Marks the response as "public".
234
- *
235
- * It makes the response eligible for serving other clients.
236
- */
237
- setPublic(): this;
238
- /**
239
- * Returns the Date header as a DateTime instance.
240
- * @throws {RuntimeException} When the header is not parseable
241
- */
242
- getDate(): any;
243
- /**
244
- * Returns the age of the response in seconds.
245
- *
246
- * @final
247
- */
248
- getAge(): number;
249
- /**
250
- * Marks the response stale by setting the Age header to be equal to the maximum age of the response.
251
- */
252
- expire(): this;
253
- /**
254
- * Returns the value of the Expires header as a DateTime instance.
255
- *
256
- * @final
257
- */
258
- getExpires(): any;
259
- /**
260
- * Returns the number of seconds after the time specified in the response's Date
261
- * header when the response should no longer be considered fresh.
262
- *
263
- * First, it checks for a s-maxage directive, then a max-age directive, and then it falls
264
- * back on an expires header. It returns null when no maximum age can be established.
265
- */
266
- getMaxAge(): number | undefined;
267
- /**
268
- * Sets the number of seconds after which the response should no longer be considered fresh.
269
- *
270
- * This method sets the Cache-Control max-age directive.
271
- */
272
- setMaxAge(value: number): this;
273
- /**
274
- * Sets the number of seconds after which the response should no longer be returned by shared caches when backend is down.
275
- *
276
- * This method sets the Cache-Control stale-if-error directive.
277
- */
278
- setStaleIfError(value: number): this;
279
- /**
280
- * Sets the number of seconds after which the response should no longer return stale content by shared caches.
281
- *
282
- * This method sets the Cache-Control stale-while-revalidate directive.
283
- */
284
- setStaleWhileRevalidate(value: number): this;
285
- /**
286
- * Returns the response's time-to-live in seconds.
287
- *
288
- * It returns null when no freshness information is present in the response.
289
- *
290
- * When the response's TTL is 0, the response may not be served from cache without first
291
- * revalidating with the origin.
292
- *
293
- * @final
294
- */
295
- getTtl(): number | undefined;
296
- /**
297
- * Sets the response's time-to-live for shared caches in seconds.
298
- *
299
- * This method adjusts the Cache-Control/s-maxage directive.
300
- */
301
- setTtl(seconds: number): this;
302
- /**
303
- * Sets the response's time-to-live for private/client caches in seconds.
304
- *
305
- * This method adjusts the Cache-Control/max-age directive.
306
- */
307
- setClientTtl(seconds: number): this;
308
- /**
309
- * Sets the number of seconds after which the response should no longer be considered fresh by shared caches.
310
- *
311
- * This method sets the Cache-Control s-maxage directive.
312
- */
313
- setSharedMaxAge(value: number): this;
314
- /**
315
- * Returns the Last-Modified HTTP header as a DateTime instance.
316
- *
317
- * @throws \RuntimeException When the HTTP header is not parseable
318
- *
319
- * @final
320
- */
321
- getLastModified(): any;
322
- /**
323
- * Sets the Last-Modified HTTP header with a DateTime instance.
324
- *
325
- * Passing null as value will remove the header.
326
- *
327
- * @return $this
328
- *
329
- * @final
330
- */
331
- setLastModified(date?: any): this;
332
- /**
333
- * Returns the literal value of the ETag HTTP header.
334
- */
335
- getEtag(): string | null;
336
- /**
337
- * Sets the ETag value.
338
- *
339
- * @param etag The ETag unique identifier or null to remove the header
340
- * @param weak Whether you want a weak ETag or not
341
- */
342
- setEtag(etag?: string, weak?: boolean): this;
343
- /**
344
- * Sets the response's cache headers (validation and/or expiration).
345
- *
346
- * Available options are: must_revalidate, no_cache, no_store, no_transform, public, private, proxy_revalidate, max_age, s_maxage, immutable, last_modified and etag.
347
- *
348
- * @throws {InvalidArgumentException}
349
- */
350
- setCache(options: any): this;
351
- /**
352
- * Modifies the response so that it conforms to the rules defined for a 304 status code.
353
- *
354
- * This sets the status, removes the body, and discards any headers
355
- * that MUST NOT be included in 304 responses.
356
- * @see https://tools.ietf.org/html/rfc2616#section-10.3.5
357
- */
358
- setNotModified(): this;
359
- /**
360
- * Add an array of headers to the response.
361
- *
362
- */
363
- withHeaders(headers: any): this;
364
- /**
365
- * Set the exception to attach to the response.
366
- */
367
- withException(e: Error): this;
368
- /**
369
- * Throws the response in a HttpResponseException instance.
370
- *
371
- * @throws {HttpResponseException}
372
- */
373
- throwResponse(): void;
374
- /**
375
- * Is response invalid?
376
- *
377
- * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
378
- */
379
- isInvalid(): boolean;
380
- /**
381
- * Is response informative?
382
- */
383
- isInformational(): boolean;
384
- /**
385
- * Is response successful?
386
- */
387
- isSuccessful(): boolean;
388
- /**
389
- * Is the response a redirect?
390
- */
391
- isRedirection(): boolean;
392
- /**
393
- * Is there a client error?
394
- */
395
- isClientError(): boolean;
396
- /**
397
- * Was there a server side error?
398
- */
399
- isServerError(): boolean;
400
- /**
401
- * Is the response OK?
402
- */
403
- isOk(): boolean;
404
- /**
405
- * Is the response forbidden?
406
- */
407
- isForbidden(): boolean;
408
- /**
409
- * Is the response a not found error?
410
- */
411
- isNotFound(): boolean;
412
- /**
413
- * Is the response a redirect of some form?
414
- */
415
- isRedirect(location?: string | null): boolean;
416
- /**
417
- * Is the response empty?
418
- */
419
- isEmpty(): boolean;
420
- /**
421
- * Apply headers before sending response.
422
- */
423
- sendHeaders(statusCode?: number): this;
424
- /**
425
- * Prepares the Response before it is sent to the client.
426
- *
427
- * This method tweaks the Response to ensure that it is
428
- * compliant with RFC 2616. Most of the changes are based on
429
- * the Request that is "associated" with this Response.
430
- **/
431
- prepare(request: IRequest): this;
432
- }
433
- //#endregion
434
- //#region src/Contracts/IResponse.d.ts
435
- /**
436
- * Interface for the Response contract, defining methods for handling HTTP responses.
437
- */
438
- interface IResponse extends IHttpResponse {
439
- /**
440
- * The current app instance
441
- */
442
- app: IApplication;
443
- /**
444
- * Sends content for the current web response.
445
- */
446
- sendContent(type?: 'html' | 'json' | 'text' | 'xml', parse?: boolean): unknown;
447
- /**
448
- * Sends content for the current web response.
449
- */
450
- send(type?: 'html' | 'json' | 'text' | 'xml'): unknown;
451
- /**
452
- *
453
- * @param content The content to serve
454
- * @param send if set to true, the content will be returned, instead of the Response instance
455
- * @returns
456
- */
457
- html(content?: string): this;
458
- html(content: string, parse: boolean): HTTPResponse;
459
- /**
460
- * Send a JSON response.
461
- */
462
- json<T = unknown>(data?: T): this;
463
- json<T = unknown>(data: T, parse: boolean): T;
464
- /**
465
- * Send plain text.
466
- */
467
- text(content?: string): this;
468
- text(content: string, parse: boolean): HTTPResponse;
469
- /**
470
- * Send plain xml.
471
- */
472
- xml(data?: string): this;
473
- xml(data: string, parse: boolean): HTTPResponse;
474
- /**
475
- * Redirect to another URL.
476
- */
477
- redirect(location: string, status?: number, statusText?: string | undefined): HTTPResponse;
478
- /**
479
- * Dump the response.
480
- */
481
- dump(): this;
482
- /**
483
- * Get the base event
484
- */
485
- getEvent(): H3Event;
486
- getEvent<K$1 extends DotNestedKeys$1<H3Event>>(key: K$1): DotNestedValue$1<H3Event, K$1>;
487
- }
488
- //#endregion
489
- //#region src/Contracts/IHttp.d.ts
490
- type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'patch' | 'apiResource' | 'group' | 'route';
491
- type RequestMethod = 'HEAD' | 'GET' | 'PUT' | 'DELETE' | 'TRACE' | 'OPTIONS' | 'PURGE' | 'POST' | 'CONNECT' | 'PATCH';
492
- type RequestObject = Record<string, any>;
493
- type ResponseObject = Record<string, any>;
494
- type ExtractControllerMethods<T> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? K : never }[keyof T];
495
- /**
496
- * Interface for the Router contract, defining methods for HTTP routing.
497
- */
498
- declare class IRouter {
499
- /**
500
- * Registers a GET route.
501
- * @param path - The route path.
502
- * @param definition - The handler function or [controller class, method] array.
503
- * @param name - Optional route name.
504
- * @param middleware - Optional middleware array.
505
- */
506
- get<C extends new (...args: any) => any>(path: string, definition: EventHandler | [C, methodName: ExtractControllerMethods<InstanceType<C>>], name?: string, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
507
- /**
508
- * Registers a POST route.
509
- * @param path - The route path.
510
- * @param definition - The handler function or [controller class, method] array.
511
- * @param name - Optional route name.
512
- * @param middleware - Optional middleware array.
513
- */
514
- post<C extends new (...args: any) => any>(path: string, definition: EventHandler | [C, methodName: ExtractControllerMethods<InstanceType<C>>], name?: string, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
515
- /**
516
- * Registers a PUT route.
517
- * @param path - The route path.
518
- * @param definition - The handler function or [controller class, method] array.
519
- * @param name - Optional route name.
520
- * @param middleware - Optional middleware array.
521
- */
522
- put<C extends new (...args: any) => any>(path: string, definition: EventHandler | [C, methodName: ExtractControllerMethods<InstanceType<C>>], name?: string, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
523
- /**
524
- * Registers a route that responds to HTTP PATCH requests.
525
- *
526
- * @param path The URL pattern to match (can include parameters, e.g., '/users/:id').
527
- * @param definition Either:
528
- * - An EventHandler function
529
- * - A tuple: [ControllerClass, methodName]
530
- * @param name Optional route name (for URL generation or referencing).
531
- * @param middleware Optional array of middleware functions to execute before the handler.
532
- */
533
- patch<C extends new (...args: any) => any>(path: string, definition: EventHandler | [C, methodName: ExtractControllerMethods<InstanceType<C>>], name?: string, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
534
- /**
535
- * Registers a DELETE route.
536
- * @param path - The route path.
537
- * @param definition - The handler function or [controller class, method] array.
538
- * @param name - Optional route name.
539
- * @param middleware - Optional middleware array.
540
- */
541
- delete<C extends new (...args: any) => any>(path: string, definition: EventHandler | [C, methodName: ExtractControllerMethods<InstanceType<C>>], name?: string, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
542
- /**
543
- * Registers an API resource with standard CRUD routes.
544
- * @param path - The base path for the resource.
545
- * @param controller - The controller class handling the resource.
546
- * @param middleware - Optional middleware array.
547
- */
548
- apiResource(path: string, controller: new (app: IApplication) => IController, middleware?: IMiddleware[]): Omit<this, RouterEnd | 'name'>;
549
- /**
550
- * Generates a URL for a named route.
551
- * @param name - The name of the route.
552
- * @param params - Optional parameters to replace in the route path.
553
- * @returns The generated URL or undefined if the route is not found.
554
- */
555
- route(name: string, params?: Record<string, string>): string | undefined;
556
- /**
557
- * Set the name of the current route
558
- *
559
- * @param name
560
- */
561
- name(name: string): this;
562
- /**
563
- * Groups routes with shared prefix or middleware.
564
- * @param options - Configuration for prefix or middleware.
565
- * @param callback - Callback function defining grouped routes.
566
- */
567
- group(options: {
568
- prefix?: string;
569
- middleware?: EventHandler[];
570
- }, callback: () => this): this;
571
- /**
572
- * Registers middleware for a specific path.
573
- * @param path - The path to apply the middleware.
574
- * @param handler - The middleware handler.
575
- * @param opts - Optional middleware options.
576
- */
577
- middleware(path: Middleware, opts?: Middleware | MiddlewareOptions): this;
578
- middleware(path: string | IMiddleware[] | Middleware, handler: Middleware | MiddlewareOptions, opts?: MiddlewareOptions): this;
579
- }
580
- /**
581
- * Represents the HTTP context for a single request lifecycle.
582
- * Encapsulates the application instance, request, and response objects.
583
- */
584
- declare class HttpContext {
585
- app: IApplication;
586
- request: IRequest;
587
- response: IResponse;
588
- private static contexts;
589
- constructor(app: IApplication, request: IRequest, response: IResponse);
590
- /**
591
- * Factory method to create a new HttpContext instance from a context object.
592
- * @param ctx - Object containing app, request, and response
593
- * @returns A new HttpContext instance
594
- */
595
- static init(ctx: {
596
- app: IApplication;
597
- request: IRequest;
598
- response: IResponse;
599
- }, event?: unknown): HttpContext;
600
- /**
601
- * Retrieve an existing HttpContext instance for an event, if any.
602
- */
603
- static get(event: unknown): HttpContext | undefined;
604
- /**
605
- * Delete the cached context for a given event (optional cleanup).
606
- */
607
- static forget(event: unknown): void;
608
- }
609
- /**
610
- * Type for EventHandler, representing a function that handles an H3 event.
611
- */
612
- type EventHandler = (ctx: HttpContext) => any;
613
- type RouteEventHandler = (...args: any[]) => any;
614
- /**
615
- * Defines the contract for all controllers.
616
- * Any controller implementing this must define these methods.
617
- */
618
- declare class IController {
619
- show?(...ctx: any[]): any;
620
- index?(...ctx: any[]): any;
621
- store?(...ctx: any[]): any;
622
- update?(...ctx: any[]): any;
623
- destroy?(...ctx: any[]): any;
624
- }
625
- /**
626
- * Defines the contract for all middlewares.
627
- * Any middleware implementing this must define these methods.
628
- */
629
- declare class IMiddleware {
630
- handle(context: HttpContext, next: () => Promise<any>): Promise<any>;
631
- }
632
- //#endregion
633
- //#region src/Contracts/IParamBag.d.ts
634
- declare class IParamBag implements Iterable<[string, any]> {
635
- /**
636
- * The current H3 H3Event instance
637
- */
638
- readonly event: H3Event;
639
- constructor(parameters: RequestObject | undefined,
640
- /**
641
- * The current H3 H3Event instance
642
- */
643
- event: H3Event);
644
- /**
645
- * Returns the parameters.
646
- * @
647
- * @param key The name of the parameter to return or null to get them all
648
- *
649
- * @throws BadRequestException if the value is not an array
650
- */
651
- all(key?: string): any;
652
- get(key: string, defaultValue?: any): any;
653
- set(key: string, value: any): void;
654
- /**
655
- * Returns true if the parameter is defined.
656
- *
657
- * @param key
658
- */
659
- has(key: string): boolean;
660
- /**
661
- * Removes a parameter.
662
- *
663
- * @param key
664
- */
665
- remove(key: string): void;
666
- /**
667
- *
668
- * Returns the parameter as string.
669
- *
670
- * @param key
671
- * @param defaultValue
672
- * @throws UnexpectedValueException if the value cannot be converted to string
673
- * @returns
674
- */
675
- getString(key: string, defaultValue?: string): string;
676
- /**
677
- * Returns the parameter value converted to integer.
678
- *
679
- * @param key
680
- * @param defaultValue
681
- * @throws UnexpectedValueException if the value cannot be converted to integer
682
- */
683
- getInt(key: string, defaultValue?: number): number;
684
- /**
685
- * Returns the parameter value converted to boolean.
686
- *
687
- * @param key
688
- * @param defaultValue
689
- * @throws UnexpectedValueException if the value cannot be converted to a boolean
690
- */
691
- getBoolean(key: string, defaultValue?: boolean): boolean;
692
- /**
693
- * Returns the alphabetic characters of the parameter value.
694
- *
695
- * @param key
696
- * @param defaultValue
697
- * @throws UnexpectedValueException if the value cannot be converted to string
698
- */
699
- getAlpha(key: string, defaultValue?: string): string;
700
- /**
701
- * Returns the alphabetic characters and digits of the parameter value.
702
- *
703
- * @param key
704
- * @param defaultValue
705
- * @throws UnexpectedValueException if the value cannot be converted to string
706
- */
707
- getAlnum(key: string, defaultValue?: string): string;
708
- /**
709
- * Returns the digits of the parameter value.
710
- *
711
- * @param key
712
- * @param defaultValue
713
- * @throws UnexpectedValueException if the value cannot be converted to string
714
- * @returns
715
- **/
716
- getDigits(key: string, defaultValue?: string): string;
717
- /**
718
- * Returns the parameter keys.
719
- */
720
- keys(): string[];
721
- /**
722
- * Replaces the current parameters by a new set.
723
- */
724
- replace(parameters?: RequestObject): void;
725
- /**
726
- * Adds parameters.
727
- */
728
- add(parameters?: RequestObject): void;
729
- /**
730
- * Returns the number of parameters.
731
- */
732
- count(): number;
733
- /**
734
- * Returns an iterator for parameters.
735
- *
736
- * @returns
737
- */
738
- [Symbol.iterator](): ArrayIterator<[string, any]>;
739
- }
740
- //#endregion
741
- //#region src/Contracts/IUploadedFile.d.ts
742
- declare class IUploadedFile {
743
- originalName: string;
744
- mimeType: string;
745
- size: number;
746
- content: File;
747
- constructor(originalName: string, mimeType: string, size: number, content: File);
748
- static createFromBase(file: File): IUploadedFile;
749
- /**
750
- * Save to disk (Node environment only)
751
- */
752
- moveTo(destination: string): Promise<void>;
753
- }
754
- //#endregion
755
- //#region src/Contracts/IRequest.d.ts
756
- type RequestObject$1 = Record<string, any>;
757
- /**
758
- * Interface for the Request contract, defining methods for handling HTTP request data.
759
- */
760
- declare class IRequest {
761
- /**
762
- * The current app instance
763
- */
764
- app: IApplication;
765
- /**
766
- * Parsed request body
767
- */
768
- body: unknown;
769
- /**
770
- * Gets route parameters.
771
- * @returns An object containing route parameters.
772
- */
773
- params: NonNullable<H3Event['context']['params']>;
774
- /**
775
- * Uploaded files (FILES).
776
- */
777
- constructor(
778
- /**
779
- * The current H3 H3Event instance
780
- */
781
- event: H3Event,
782
- /**
783
- * The current app instance
784
- */
785
- app: IApplication);
786
- /**
787
- * Factory method to create a Request instance from an H3Event.
788
- */
789
- static create(
790
- /**
791
- * The current H3 H3Event instance
792
- */
793
- event: H3Event,
794
- /**
795
- * The current app instance
796
- */
797
- app: IApplication): Promise<Request>;
798
- /**
799
- * Sets the parameters for this request.
800
- *
801
- * This method also re-initializes all properties.
802
- *
803
- * @param attributes
804
- * @param cookies The COOKIE parameters
805
- * @param files The FILES parameters
806
- * @param server The SERVER parameters
807
- * @param content The raw body data
808
- */
809
- initialize(): Promise<void>;
810
- /**
811
- * Retrieve all data from the instance (query + body).
812
- */
813
- all<T = Record<string, any>>(keys?: string | string[]): T;
814
- /**
815
- * Retrieve an input item from the request.
816
- *
817
- * @param key
818
- * @param defaultValue
819
- * @returns
820
- */
821
- input<K$1 extends string | undefined>(key?: K$1, defaultValue?: any): K$1 extends undefined ? RequestObject$1 : any;
822
- /**
823
- * Retrieve a file from the request.
824
- *
825
- * By default a single `UploadedFile` instance will always be returned by
826
- * the method (first file in property when there are multiple), unless
827
- * the `expectArray` parameter is set to true, in which case, the method
828
- * returns an `UploadedFile[]` array.
829
- *
830
- * @param key
831
- * @param defaultValue
832
- * @param expectArray set to true to return an `UploadedFile[]` array.
833
- * @returns
834
- */
835
- file<K$1 extends string | undefined = undefined, E extends boolean | undefined = undefined>(key?: K$1, defaultValue?: any, expectArray?: E): K$1 extends undefined ? Record<string, E extends true ? IUploadedFile[] : IUploadedFile> : E extends true ? IUploadedFile[] : IUploadedFile;
836
- /**
837
- * Determine if the uploaded data contains a file.
838
- *
839
- * @param key
840
- * @return boolean
841
- */
842
- hasFile(key: string): boolean;
843
- /**
844
- * Get an object with all the files on the request.
845
- */
846
- allFiles(): Record<string, IUploadedFile | IUploadedFile[]>;
847
- /**
848
- * Extract and convert uploaded files from FormData.
849
- */
850
- convertUploadedFiles(files: Record<string, IUploadedFile | IUploadedFile[]>): Record<string, IUploadedFile | IUploadedFile[]>;
851
- /**
852
- * Determine if the data contains a given key.
853
- *
854
- * @param keys
855
- * @returns
856
- */
857
- has(keys: string[] | string): boolean;
858
- /**
859
- * Determine if the instance is missing a given key.
860
- */
861
- missing(key: string | string[]): boolean;
862
- /**
863
- * Get a subset containing the provided keys with values from the instance data.
864
- *
865
- * @param keys
866
- * @returns
867
- */
868
- only<T = Record<string, any>>(keys: string[]): T;
869
- /**
870
- * Get all of the data except for a specified array of items.
871
- *
872
- * @param keys
873
- * @returns
874
- */
875
- except<T = Record<string, any>>(keys: string[]): T;
876
- /**
877
- * Merges new input data into the current request's input source.
878
- *
879
- * @param input - An object containing key-value pairs to merge.
880
- * @returns this - For fluent chaining.
881
- */
882
- merge(input: Record<string, any>): this;
883
- /**
884
- * Merge new input into the request's input, but only when that key is missing from the request.
885
- *
886
- * @param input
887
- */
888
- mergeIfMissing(input: Record<string, any>): this;
889
- /**
890
- * Get the keys for all of the input and files.
891
- */
892
- keys(): string[];
893
- /**
894
- * Determine if the request is sending JSON.
895
- *
896
- * @return bool
897
- */
898
- isJson(): boolean;
899
- /**
900
- * Determine if the current request probably expects a JSON response.
901
- *
902
- * @returns
903
- */
904
- expectsJson(): boolean;
905
- /**
906
- * Determine if the current request is asking for JSON.
907
- *
908
- * @returns
909
- */
910
- wantsJson(): boolean;
911
- /**
912
- * Gets a list of content types acceptable by the client browser in preferable order.
913
- * @returns {string[]}
914
- */
915
- getAcceptableContentTypes(): string[];
916
- /**
917
- * Determine if the request is the result of a PJAX call.
918
- *
919
- * @return bool
920
- */
921
- pjax(): boolean;
922
- /**
923
- * Returns true if the request is an XMLHttpRequest (AJAX).
924
- *
925
- * @alias isXmlHttpRequest()
926
- * @returns {boolean}
927
- */
928
- ajax(): boolean;
929
- /**
930
- * Returns true if the request is an XMLHttpRequest (AJAX).
931
- */
932
- isXmlHttpRequest(): boolean;
933
- /**
934
- * Returns the value of the requested header.
935
- */
936
- getHeader(name: string): string | undefined | null;
937
- /**
938
- * Checks if the request method is of specified type.
939
- *
940
- * @param method Uppercase request method (GET, POST etc)
941
- */
942
- isMethod(method: string): boolean;
943
- /**
944
- * Checks whether or not the method is safe.
945
- *
946
- * @see https://tools.ietf.org/html/rfc7231#section-4.2.1
947
- */
948
- isMethodSafe(): boolean;
949
- /**
950
- * Checks whether or not the method is idempotent.
951
- */
952
- isMethodIdempotent(): boolean;
953
- /**
954
- * Checks whether the method is cacheable or not.
955
- *
956
- * @see https://tools.ietf.org/html/rfc7231#section-4.2.3
957
- */
958
- isMethodCacheable(): boolean;
959
- /**
960
- * Gets the request "intended" method.
961
- *
962
- * If the X-HTTP-Method-Override header is set, and if the method is a POST,
963
- * then it is used to determine the "real" intended HTTP method.
964
- *
965
- * The _method request parameter can also be used to determine the HTTP method,
966
- * but only if enableHttpMethodParameterOverride() has been called.
967
- *
968
- * The method is always an uppercased string.
969
- *
970
- * @see getRealMethod()
971
- */
972
- getMethod(): RequestMethod;
973
- /**
974
- * Gets the "real" request method.
975
- *
976
- * @see getMethod()
977
- */
978
- getRealMethod(): RequestMethod;
979
- /**
980
- * Get the client IP address.
981
- */
982
- ip(): string | undefined;
983
- /**
984
- * Get a URI instance for the request.
985
- */
986
- uri(): unknown;
987
- /**
988
- * Get the full URL for the request.
989
- */
990
- fullUrl(): string;
991
- /**
992
- * Return the Request instance.
993
- */
994
- instance(): this;
995
- /**
996
- * Get the request method.
997
- */
998
- method(): RequestMethod;
999
- /**
1000
- * Get the JSON payload for the request.
1001
- *
1002
- * @param key
1003
- * @param defaultValue
1004
- * @return {InputBag}
1005
- */
1006
- json<K$1 extends string | undefined = undefined>(key?: string, defaultValue?: any): K$1 extends undefined ? IParamBag : any;
1007
- /**
1008
- * Returns the request body content.
1009
- *
1010
- * @param asStream If true, returns a ReadableStream instead of the parsed string
1011
- * @return {string | ReadableStream | Promise<string | ReadableStream>}
1012
- */
1013
- getContent(asStream?: boolean): string | ReadableStream;
1014
- /**
1015
- * Gets a "parameter" value from any bag.
1016
- *
1017
- * This method is mainly useful for libraries that want to provide some flexibility. If you don't need the
1018
- * flexibility in controllers, it is better to explicitly get request parameters from the appropriate
1019
- * public property instead (attributes, query, request).
1020
- *
1021
- * Order of precedence: PATH (routing placeholders or custom attributes), GET, POST
1022
- *
1023
- * @internal use explicit input sources instead
1024
- */
1025
- get(key: string, defaultValue?: any): any;
1026
- /**
1027
- * Enables support for the _method request parameter to determine the intended HTTP method.
1028
- *
1029
- * Be warned that enabling this feature might lead to CSRF issues in your code.
1030
- * Check that you are using CSRF tokens when required.
1031
- * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
1032
- * and used to send a "PUT" or "DELETE" request via the _method request parameter.
1033
- * If these methods are not protected against CSRF, this presents a possible vulnerability.
1034
- *
1035
- * The HTTP method can only be overridden when the real HTTP method is POST.
1036
- */
1037
- static enableHttpMethodParameterOverride(): void;
1038
- /**
1039
- * Checks whether support for the _method request parameter is enabled.
1040
- */
1041
- static getHttpMethodParameterOverride(): boolean;
1042
- /**
1043
- * Dump the items.
1044
- *
1045
- * @param keys
1046
- * @return this
1047
- */
1048
- dump(...keys: any[]): this;
1049
- /**
1050
- * Get the base event
1051
- */
1052
- getEvent(): H3Event;
1053
- getEvent<K$1 extends DotNestedKeys<H3Event>>(key: K$1): DotNestedValue<H3Event, K$1>;
1054
- }
1055
- //#endregion
1056
- //#region src/Utils/PathLoader.d.ts
1057
- declare class PathLoader {
1058
- private paths;
1059
- /**
1060
- * Dynamically retrieves a path property from the class.
1061
- * Any property ending with "Path" is accessible automatically.
1062
- *
1063
- * @param name - The base name of the path property
1064
- * @param prefix - The base path to prefix to the path
1065
- * @returns
1066
- */
1067
- getPath(name: IPathName, prefix?: string): string;
1068
- /**
1069
- * Programatically set the paths.
1070
- *
1071
- * @param name - The base name of the path property
1072
- * @param path - The new path
1073
- * @param base - The base path to include to the path
1074
- */
1075
- setPath(name: IPathName, path: string, base?: string): void;
1076
- }
1077
- //#endregion
1078
- //#region src/Contracts/BindingsContract.d.ts
1079
- type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K] };
1080
- type Bindings = {
1081
- [key: string]: any;
1082
- [key: `app.${string}`]: any;
1083
- env(): NodeJS.ProcessEnv;
1084
- env<T extends string>(key: T, def?: any): any;
1085
- view(viewPath: string, params?: Record<string, any>): Promise<HTTPResponse>;
1086
- edge: Edge;
1087
- asset(key: string, def?: string): string;
1088
- router: IRouter;
1089
- config: {
1090
- get<X extends Record<string, any>>(): X;
1091
- get<X extends Record<string, any>, T extends Extract<keyof X, string>>(key: T, def?: any): X[T];
1092
- set<T extends string>(key: T, value: any): void;
1093
- load?(): any;
1094
- };
1095
- 'http.app': H3;
1096
- 'path.base': string;
1097
- 'load.paths': PathLoader;
1098
- 'http.serve': typeof serve;
1099
- 'http.request': IRequest;
1100
- 'http.response': IResponse;
1101
- };
1102
- type UseKey = keyof RemoveIndexSignature<Bindings>;
1103
- //#endregion
1104
- //#region src/Contracts/PromptsContract.d.ts
1105
- type Choice<Value> = {
1106
- value: Value;
1107
- name?: string;
1108
- description?: string;
1109
- short?: string;
1110
- disabled?: boolean | string;
1111
- type?: never;
1112
- };
1113
- type ISeparator = Separator;
1114
- type Choices = readonly (string | Separator)[] | readonly (Separator | Choice<string>)[];
1115
- //#endregion
1116
- //#region src/Contracts/Router.d.ts
1117
- type RouteMethod = 'get' | 'head' | 'put' | 'patch' | 'post' | 'delete';
1118
- interface RouteDefinition {
1119
- method: RouteMethod;
1120
- path: string;
1121
- name?: string | undefined;
1122
- handler: EventHandler;
1123
- signature: [string, string | undefined];
1124
- }
1125
- //#endregion
1126
- //#region src/Utils/Logger.d.ts
1127
- declare class Logger {
1128
- /**
1129
- * Global verbosity configuration
1130
- */
1131
- private static verbosity;
1132
- private static isQuiet;
1133
- private static isSilent;
1134
- /**
1135
- * Configure global verbosity levels
1136
- */
1137
- static configure(options?: {
1138
- verbosity?: number;
1139
- quiet?: boolean;
1140
- silent?: boolean;
1141
- }): void;
1142
- /**
1143
- * Check if output should be suppressed
1144
- */
1145
- private static shouldSuppressOutput;
1146
- /**
1147
- * Logs the message in two columns
1148
- *
1149
- * @param name
1150
- * @param value
1151
- * @param log If set to false, array of [name, dots, value] output will be returned and not logged
1152
- * @returns
1153
- */
1154
- static twoColumnDetail(name: string, value: string, log?: true, spacer?: string): void;
1155
- static twoColumnDetail(name: string, value: string, log?: false, spacer?: string): [string, string, string];
1156
- /**
1157
- * Logs the message in two columns
1158
- *
1159
- * @param name
1160
- * @param desc
1161
- * @param width
1162
- * @param log If set to false, array of [name, dots, value] output will be returned and not logged
1163
- * @returns
1164
- */
1165
- static describe(name: string, desc: string, width?: number, log?: true): void;
1166
- static describe(name: string, desc: string, width?: number, log?: false): [string, string, string];
1167
- /**
1168
- * Logs the message in two columns but allways passing status
1169
- *
1170
- * @param name
1171
- * @param value
1172
- * @param status
1173
- * @param exit
1174
- * @param preserveCol
1175
- */
1176
- static split(name: string, value: string, status?: 'success' | 'info' | 'error', exit?: boolean, preserveCol?: boolean): void;
1177
- /**
1178
- * Wraps text with chalk
1179
- *
1180
- * @param txt
1181
- * @param color
1182
- * @param preserveCol
1183
- * @returns
1184
- */
1185
- static textFormat(txt: unknown, color: (txt: string) => string, preserveCol?: boolean): string;
1186
- /**
1187
- * Logs a success message
1188
- *
1189
- * @param msg
1190
- * @param exit
1191
- * @param preserveCol
1192
- */
1193
- static success(msg: any, exit?: boolean, preserveCol?: boolean): void;
1194
- /**
1195
- * Logs an informational message
1196
- *
1197
- * @param msg
1198
- * @param exit
1199
- * @param preserveCol
1200
- */
1201
- static info(msg: any, exit?: boolean, preserveCol?: boolean): void;
1202
- /**
1203
- * Logs an error message
1204
- *
1205
- * @param msg
1206
- * @param exit
1207
- * @param preserveCol
1208
- */
1209
- static error(msg: string | string[] | Error & {
1210
- detail?: string;
1211
- }, exit?: boolean, preserveCol?: boolean): void;
1212
- /**
1213
- * Logs a warning message
1214
- *
1215
- * @param msg
1216
- * @param exit
1217
- * @param preserveCol
1218
- */
1219
- static warn(msg: any, exit?: boolean, preserveCol?: boolean): void;
1220
- /**
1221
- * Logs a debug message (only shown with verbosity >= 3)
1222
- *
1223
- * @param msg
1224
- * @param exit
1225
- * @param preserveCol
1226
- */
1227
- static debug<M = any>(msg: M | M[], exit?: boolean, preserveCol?: boolean): void;
1228
- /**
1229
- * Terminates the process
1230
- */
1231
- static quiet(): void;
1232
- static chalker(styles: LoggerChalk[]): (input: any) => string;
1233
- /**
1234
- * Parse an array formated message and logs it
1235
- *
1236
- * @param config
1237
- * @param joiner
1238
- * @param log If set to false, string output will be returned and not logged
1239
- * @param sc color to use ue on split text if : is found
1240
- */
1241
- static parse(config: LoggerParseSignature, joiner?: string, log?: true, sc?: LoggerChalk): void;
1242
- static parse(config: LoggerParseSignature, joiner?: string, log?: false, sc?: LoggerChalk): string;
1243
- /**
1244
- * Ouput formater object or format the output
1245
- *
1246
- * @returns
1247
- */
1248
- static log: LoggerLog;
1249
- }
1250
- //#endregion
1251
- //#region src/Contracts/Utils.d.ts
1252
- type LoggerChalk = keyof ChalkInstance | ChalkInstance | (keyof ChalkInstance)[];
1253
- type LoggerParseSignature = [string, LoggerChalk][];
1254
- /**
1255
- * Ouput formater object or format the output
1256
- *
1257
- * @param config
1258
- * @param joiner
1259
- * @param log If set to false, string output will be returned and not logged
1260
- * @param sc color to use ue on split text if : is found
1261
- *
1262
- * @returns
1263
- */
1264
- interface LoggerLog {
1265
- (): typeof Logger;
1266
- <L extends boolean>(config: string, joiner: LoggerChalk, log?: L, sc?: LoggerChalk): L extends true ? void : string;
1267
- <L extends boolean>(config: LoggerParseSignature, joiner?: string, log?: L, sc?: LoggerChalk): L extends true ? void : string;
1268
- <L extends boolean>(config?: LoggerParseSignature, joiner?: string, log?: L, sc?: LoggerChalk): L extends true ? void : string | Logger;
1269
- }
1270
- //#endregion
1271
- //#region src/Utils/EnvParser.d.ts
1272
- declare class EnvParser {
1273
- static parse(initial: GenericWithNullableStringValues): {
1274
- [name: string]: string | undefined;
1275
- };
1276
- static parseValue(value: any): any;
1277
- }
1278
- //#endregion
1279
- //#region src/Utils/FileSystem.d.ts
1280
- declare class FileSystem {
1281
- static findModulePkg(moduleId: string, cwd?: string): string | undefined;
1282
- /**
1283
- * Check if file exists
1284
- *
1285
- * @param path
1286
- * @returns
1287
- */
1288
- static fileExists(path: string): Promise<boolean>;
1289
- /**
1290
- * Recursively find files starting from given cwd
1291
- *
1292
- * @param name
1293
- * @param extensions
1294
- * @param cwd
1295
- *
1296
- * @returns
1297
- */
1298
- static resolveFileUp(name: string, extensions: string[] | ((dir: string, filesNames: string[]) => string | false), cwd?: string): string | undefined;
1299
- }
1300
- //#endregion
1301
- //#region src/Utils/Prompts.d.ts
1302
- declare class Prompts extends Logger {
1303
- /**
1304
- * Allows users to pick from a predefined set of choices when asked a question.
1305
- */
1306
- static choice(
1307
- /**
1308
- * Message to dislpay
1309
- */
1310
- message: string,
1311
- /**
1312
- * The choices available to the user
1313
- */
1314
- choices: Choices,
1315
- /**
1316
- * Item index front of which the cursor will initially appear
1317
- */
1318
- defaultIndex?: number): Promise<string>;
1319
- /**
1320
- * Ask the user for a simple "yes or no" confirmation.
1321
- * By default, this method returns `false`. However, if the user enters y or yes
1322
- * in response to the prompt, the method would return `true`.
1323
- */
1324
- static confirm(
1325
- /**
1326
- * Message to dislpay
1327
- */
1328
- message: string,
1329
- /**
1330
- * The default value
1331
- */
1332
- def?: boolean | undefined): Promise<boolean>;
1333
- /**
1334
- * Prompt the user with the given question, accept their input,
1335
- * and then return the user's input back to your command.
1336
- */
1337
- static ask(
1338
- /**
1339
- * Message to dislpay
1340
- */
1341
- message: string,
1342
- /**
1343
- * The default value
1344
- */
1345
- def?: string | undefined): Promise<string>;
1346
- /**
1347
- * Prompt the user with the given question, accept their input which
1348
- * will not be visible to them as they type in the console,
1349
- * and then return the user's input back to your command.
1350
- */
1351
- static secret(
1352
- /**
1353
- * Message to dislpay
1354
- */
1355
- message: string,
1356
- /**
1357
- * Mask the user input
1358
- *
1359
- * @default true
1360
- */
1361
- mask?: string | boolean): Promise<string>;
1362
- /**
1363
- * Provide auto-completion for possible choices.
1364
- * The user can still provide any answer, regardless of the auto-completion hints.
1365
- */
1366
- static anticipate(
1367
- /**
1368
- * Message to dislpay
1369
- */
1370
- message: string,
1371
- /**
1372
- * The source of completions
1373
- */
1374
- source: string[] | ((input?: string | undefined) => Promise<ChoiceOrSeparatorArray$1<any>>),
1375
- /**
1376
- * Set a default value
1377
- */
1378
- def?: string): Promise<any>;
1379
- }
1380
- //#endregion
1381
- //#region src/Utils/Resolver.d.ts
1382
- declare class Resolver {
1383
- static getPakageInstallCommand(pkg?: string): Promise<string>;
1384
- static getInstallCommand(pkg: string): Promise<string>;
1385
- /**
1386
- * Create a hash for a function or an object
1387
- *
1388
- * @param provider
1389
- * @returns
1390
- */
1391
- static hashObjectOrFunction(provider: object | ((..._: any[]) => any)): string;
1392
- /**
1393
- * Checks if a function is asyncronous
1394
- *
1395
- * @param func
1396
- * @returns
1397
- */
1398
- static isAsyncFunction(func: any): boolean;
1399
- }
1400
- //#endregion
1401
- //#region src/Utils/scripts.d.ts
1402
- declare const mainTsconfig: {
1403
- extends: string;
1404
- compilerOptions: {
1405
- baseUrl: string;
1406
- outDir: string;
1407
- paths: {
1408
- 'src/*': string[];
1409
- 'App/*': string[];
1410
- 'root/*': string[];
1411
- 'routes/*': string[];
1412
- 'config/*': string[];
1413
- 'resources/*': string[];
1414
- };
1415
- target: string;
1416
- module: string;
1417
- moduleResolution: string;
1418
- esModuleInterop: boolean;
1419
- strict: boolean;
1420
- allowJs: boolean;
1421
- skipLibCheck: boolean;
1422
- resolveJsonModule: boolean;
1423
- noEmit: boolean;
1424
- experimentalDecorators: boolean;
1425
- emitDecoratorMetadata: boolean;
1426
- };
1427
- include: string[];
1428
- exclude: string[];
1429
- };
1430
- declare const baseTsconfig: {
1431
- extends: string;
1432
- };
1433
- declare const packageJsonScript: {
1434
- build: string;
1435
- dev: string;
1436
- start: string;
1437
- lint: string;
1438
- test: string;
1439
- postinstall: string;
1440
- };
1441
- //#endregion
1442
- //#region src/Utils/TaskManager.d.ts
1443
- declare class TaskManager {
1444
- static taskRunner(description: string, task: (() => Promise<any>) | (() => any)): Promise<void>;
1445
- static advancedTaskRunner<R = any>(info: [[string, string], [string, string]] | [[string, string]], task: (() => Promise<R>) | (() => R)): Promise<R | undefined>;
1446
- }
1447
- //#endregion
1448
- export { Bindings, Choice, type ChoiceOrSeparatorArray, Choices, DotFlatten, DotNestedKeys, DotNestedValue, EnvParser, EventHandler, ExtractControllerMethods, FileSystem, GenericWithNullableStringValues, HttpContext, IApplication, IContainer, IController, IHttpResponse, IMiddleware, IParamBag, IPathName, IRequest, IResponse, IRouter, ISeparator, IServiceProvider, IUploadedFile, Logger, LoggerChalk, LoggerLog, LoggerParseSignature, PathLoader, Prompts, RequestMethod, RequestObject, Resolver, ResponseObject, RouteDefinition, RouteEventHandler, RouteMethod, RouterEnd, TaskManager, UseKey, baseTsconfig, mainTsconfig, packageJsonScript };