alepha 0.9.5 → 0.10.1
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 +77 -38
- package/batch.d.ts +2 -3
- package/bucket.d.ts +7 -7
- package/command.d.ts +77 -16
- package/core.d.ts +374 -329
- package/datetime.d.ts +2 -1
- package/email.d.ts +105 -23
- package/logger.d.ts +45 -12
- package/package.json +56 -45
- package/postgres.d.ts +104 -133
- package/queue/redis.d.ts +3 -3
- package/queue.d.ts +105 -171
- package/react/auth.d.ts +99 -107
- package/react/form.d.ts +4 -1
- package/react/i18n.d.ts +8 -3
- package/react.d.ts +123 -30
- package/redis.d.ts +5 -5
- package/security.d.ts +24 -24
- package/server/cache.d.ts +1 -0
- package/server/compress.d.ts +4 -4
- package/server/health.d.ts +6 -6
- package/server/links.d.ts +29 -29
- package/server.d.ts +58 -73
- package/topic.d.ts +0 -1
- package/vite.d.ts +24 -0
package/core.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { Validator } from "typebox/compile";
|
|
3
|
+
import * as TypeBox from "typebox";
|
|
4
|
+
import { Static, Static as Static$1, StaticDecode, StaticEncode, TAny, TAny as TAny$1, TArray, TArray as TArray$1, TArrayOptions, TBigInt, TBoolean, TBoolean as TBoolean$1, TInteger, TInteger as TInteger$1, TKeysToIndexer, TNull, TNull as TNull$1, TNumber, TNumber as TNumber$1, TNumberOptions, TNumberOptions as TNumberOptions$1, TObject, TObject as TObject$1, TObjectOptions, TObjectOptions as TObjectOptions$1, TOptional, TOptionalAdd, TOptionalAdd as TOptionalAdd$1, TPick, TProperties, TProperties as TProperties$1, TRecord, TRecord as TRecord$1, TSchema, TSchema as TSchema$1, TSchemaOptions, TString, TString as TString$1, TStringOptions, TStringOptions as TStringOptions$1, TTuple, TUnion, TUnion as TUnion$1, TUnsafe, TVoid } from "typebox";
|
|
5
|
+
import Format from "typebox/format";
|
|
6
|
+
import * as TypeBoxValue from "typebox/value";
|
|
7
7
|
import { Readable } from "node:stream";
|
|
8
8
|
import { ReadableStream as ReadableStream$1 } from "node:stream/web";
|
|
9
|
+
import { TLocalizedValidationError } from "typebox/error";
|
|
9
10
|
|
|
10
11
|
//#region src/constants/KIND.d.ts
|
|
11
12
|
/**
|
|
@@ -255,6 +256,45 @@ interface LoggerInterface {
|
|
|
255
256
|
error(message: string, data?: unknown): void;
|
|
256
257
|
}
|
|
257
258
|
//#endregion
|
|
259
|
+
//#region src/helpers/EventManager.d.ts
|
|
260
|
+
declare class EventManager {
|
|
261
|
+
protected logFn?: () => LoggerInterface | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* List of events that can be triggered. Powered by $hook().
|
|
264
|
+
*/
|
|
265
|
+
protected events: Record<string, Array<Hook>>;
|
|
266
|
+
constructor(logFn?: () => LoggerInterface | undefined);
|
|
267
|
+
protected get log(): LoggerInterface | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* Registers a hook for the specified event.
|
|
270
|
+
*/
|
|
271
|
+
on<T extends keyof Hooks>(event: T, hookOrFunc: Hook<T> | ((payload: Hooks[T]) => Async<void>)): () => void;
|
|
272
|
+
/**
|
|
273
|
+
* Emits the specified event with the given payload.
|
|
274
|
+
*/
|
|
275
|
+
emit<T extends keyof Hooks>(func: keyof Hooks, payload: Hooks[T], options?: {
|
|
276
|
+
/**
|
|
277
|
+
* If true, the hooks will be executed in reverse order.
|
|
278
|
+
* This is useful for "stop" hooks that should be executed in reverse order.
|
|
279
|
+
*
|
|
280
|
+
* @default false
|
|
281
|
+
*/
|
|
282
|
+
reverse?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* If true, the hooks will be logged with their execution time.
|
|
285
|
+
*
|
|
286
|
+
* @default false
|
|
287
|
+
*/
|
|
288
|
+
log?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* If true, errors will be caught and logged instead of throwing.
|
|
291
|
+
*
|
|
292
|
+
* @default false
|
|
293
|
+
*/
|
|
294
|
+
catch?: boolean;
|
|
295
|
+
}): Promise<void>;
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
258
298
|
//#region src/providers/AlsProvider.d.ts
|
|
259
299
|
type AsyncLocalStorageData = any;
|
|
260
300
|
declare class AlsProvider {
|
|
@@ -268,6 +308,313 @@ declare class AlsProvider {
|
|
|
268
308
|
set<T>(key: string, value: T): void;
|
|
269
309
|
}
|
|
270
310
|
//#endregion
|
|
311
|
+
//#region src/helpers/StateManager.d.ts
|
|
312
|
+
declare class StateManager<S extends Record<string, any> = State> {
|
|
313
|
+
protected store: Partial<S>;
|
|
314
|
+
protected readonly events?: EventManager;
|
|
315
|
+
protected readonly als?: AlsProvider;
|
|
316
|
+
constructor(events?: EventManager, als?: AlsProvider);
|
|
317
|
+
/**
|
|
318
|
+
* Get a value from the state with proper typing
|
|
319
|
+
*/
|
|
320
|
+
get<Key extends keyof S>(key: Key): S[Key] | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* Set a value in the state
|
|
323
|
+
*/
|
|
324
|
+
set<Key extends keyof S>(key: Key, value: S[Key] | undefined): this;
|
|
325
|
+
/**
|
|
326
|
+
* Check if a key exists in the state
|
|
327
|
+
*/
|
|
328
|
+
has<Key extends keyof S>(key: Key): boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Delete a key from the state (set to undefined)
|
|
331
|
+
*/
|
|
332
|
+
del<Key extends keyof S>(key: Key): this;
|
|
333
|
+
/**
|
|
334
|
+
* Clear all state
|
|
335
|
+
*/
|
|
336
|
+
clear(): this;
|
|
337
|
+
/**
|
|
338
|
+
* Get all keys that exist in the state
|
|
339
|
+
*/
|
|
340
|
+
keys(): (keyof S)[];
|
|
341
|
+
}
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region src/helpers/FileLike.d.ts
|
|
344
|
+
interface FileLike {
|
|
345
|
+
/**
|
|
346
|
+
* Filename.
|
|
347
|
+
* @default "file"
|
|
348
|
+
*/
|
|
349
|
+
name: string;
|
|
350
|
+
/**
|
|
351
|
+
* Mandatory MIME type of the file.
|
|
352
|
+
* @default "application/octet-stream"
|
|
353
|
+
*/
|
|
354
|
+
type: string;
|
|
355
|
+
/**
|
|
356
|
+
* Size of the file in bytes.
|
|
357
|
+
*
|
|
358
|
+
* Always 0 for streams, as the size is not known until the stream is fully read.
|
|
359
|
+
*
|
|
360
|
+
* @default 0
|
|
361
|
+
*/
|
|
362
|
+
size: number;
|
|
363
|
+
/**
|
|
364
|
+
* Last modified timestamp in milliseconds since epoch.
|
|
365
|
+
*
|
|
366
|
+
* Always the current timestamp for streams, as the last modified time is not known.
|
|
367
|
+
* We use this field to ensure compatibility with File API.
|
|
368
|
+
*
|
|
369
|
+
* @default Date.now()
|
|
370
|
+
*/
|
|
371
|
+
lastModified: number;
|
|
372
|
+
/**
|
|
373
|
+
* Returns a ReadableStream or Node.js Readable stream of the file content.
|
|
374
|
+
*
|
|
375
|
+
* For streams, this is the original stream.
|
|
376
|
+
*/
|
|
377
|
+
stream(): StreamLike;
|
|
378
|
+
/**
|
|
379
|
+
* Returns the file content as an ArrayBuffer.
|
|
380
|
+
*
|
|
381
|
+
* For streams, this reads the entire stream into memory.
|
|
382
|
+
*/
|
|
383
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
384
|
+
/**
|
|
385
|
+
* Returns the file content as a string.
|
|
386
|
+
*
|
|
387
|
+
* For streams, this reads the entire stream into memory and converts it to a string.
|
|
388
|
+
*/
|
|
389
|
+
text(): Promise<string>;
|
|
390
|
+
/**
|
|
391
|
+
* Optional file path, if the file is stored on disk.
|
|
392
|
+
*
|
|
393
|
+
* This is not from the File API, but rather a custom field to indicate where the file is stored.
|
|
394
|
+
*/
|
|
395
|
+
filepath?: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* TypeBox view of FileLike.
|
|
399
|
+
*/
|
|
400
|
+
type TFile = TUnsafe<FileLike>;
|
|
401
|
+
declare const isTypeFile: (value: TSchema$1) => value is TFile;
|
|
402
|
+
declare const isFileLike: (value: any) => value is FileLike;
|
|
403
|
+
type StreamLike = ReadableStream | ReadableStream$1 | Readable | NodeJS.ReadableStream;
|
|
404
|
+
type TStream = TUnsafe<StreamLike>;
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/providers/TypeProvider.d.ts
|
|
407
|
+
declare class TypeGuard {
|
|
408
|
+
isSchema: typeof TypeBox.IsSchema;
|
|
409
|
+
isObject: typeof TypeBox.IsObject;
|
|
410
|
+
isNumber: typeof TypeBox.IsNumber;
|
|
411
|
+
isString: typeof TypeBox.IsString;
|
|
412
|
+
isBoolean: typeof TypeBox.IsBoolean;
|
|
413
|
+
isAny: typeof TypeBox.IsAny;
|
|
414
|
+
isArray: typeof TypeBox.IsArray;
|
|
415
|
+
isOptional: typeof TypeBox.IsOptional;
|
|
416
|
+
isUnion: typeof TypeBox.IsUnion;
|
|
417
|
+
isInteger: typeof TypeBox.IsInteger;
|
|
418
|
+
isNull: typeof TypeBox.IsNull;
|
|
419
|
+
isUndefined: typeof TypeBox.IsUndefined;
|
|
420
|
+
isUnsafe: typeof TypeBox.IsUnsafe;
|
|
421
|
+
isRecord: typeof TypeBox.IsRecord;
|
|
422
|
+
isTuple: typeof TypeBox.IsTuple;
|
|
423
|
+
isVoid: typeof TypeBox.IsVoid;
|
|
424
|
+
isFile: (value: TSchema$1) => value is TFile;
|
|
425
|
+
isBigInt: (value: TSchema$1) => value is TString$1;
|
|
426
|
+
isDate: (value: TSchema$1) => value is TString$1;
|
|
427
|
+
isDatetime: (value: TSchema$1) => value is TString$1;
|
|
428
|
+
isUuid: (value: TSchema$1) => value is TString$1;
|
|
429
|
+
}
|
|
430
|
+
declare module "typebox" {
|
|
431
|
+
interface TString {
|
|
432
|
+
format?: string;
|
|
433
|
+
minLength?: number;
|
|
434
|
+
maxLength?: number;
|
|
435
|
+
}
|
|
436
|
+
interface TNumber {
|
|
437
|
+
format?: "int64";
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
declare class TypeProvider {
|
|
441
|
+
static format: typeof Format;
|
|
442
|
+
static isValidBigInt(value: string | number): boolean;
|
|
443
|
+
/**
|
|
444
|
+
* Default maximum length for strings.
|
|
445
|
+
*
|
|
446
|
+
* It can be set to a larger value:
|
|
447
|
+
* ```ts
|
|
448
|
+
* TypeProvider.DEFAULT_STRING_MAX_LENGTH = 1000000;
|
|
449
|
+
* TypeProvider.DEFAULT_STRING_MAX_LENGTH = undefined; // no limit (not recommended)
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
452
|
+
static DEFAULT_STRING_MAX_LENGTH: number | undefined;
|
|
453
|
+
/**
|
|
454
|
+
* Maximum length for short strings, such as names or titles.
|
|
455
|
+
*/
|
|
456
|
+
static DEFAULT_SHORT_STRING_MAX_LENGTH: number | undefined;
|
|
457
|
+
/**
|
|
458
|
+
* Maximum length for long strings, such as descriptions or comments.
|
|
459
|
+
* It can be overridden in the string options.
|
|
460
|
+
*
|
|
461
|
+
* It can be set to a larger value:
|
|
462
|
+
* ```ts
|
|
463
|
+
* TypeProvider.DEFAULT_LONG_STRING_MAX_LENGTH = 2048;
|
|
464
|
+
* ```
|
|
465
|
+
*/
|
|
466
|
+
static DEFAULT_LONG_STRING_MAX_LENGTH: number | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* Maximum length for rich strings, such as HTML or Markdown.
|
|
469
|
+
* This is a large value to accommodate rich text content.
|
|
470
|
+
* > It's also the maximum length of PG's TEXT type.
|
|
471
|
+
*
|
|
472
|
+
* It can be overridden in the string options.
|
|
473
|
+
*
|
|
474
|
+
* It can be set to a larger value:
|
|
475
|
+
* ```ts
|
|
476
|
+
* TypeProvider.DEFAULT_RICH_STRING_MAX_LENGTH = 1000000;
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
static DEFAULT_RICH_STRING_MAX_LENGTH: number | undefined;
|
|
480
|
+
/**
|
|
481
|
+
* Maximum number of items in an array.
|
|
482
|
+
* This is a default value to prevent excessive memory usage.
|
|
483
|
+
* It can be overridden in the array options.
|
|
484
|
+
*/
|
|
485
|
+
static DEFAULT_ARRAY_MAX_ITEMS: number;
|
|
486
|
+
raw: typeof TypeBox.Type;
|
|
487
|
+
any: typeof TypeBox.Any;
|
|
488
|
+
void: typeof TypeBox.Void;
|
|
489
|
+
undefined: typeof TypeBox.Undefined;
|
|
490
|
+
record: typeof TypeBox.Record;
|
|
491
|
+
omit: typeof TypeBox.Omit;
|
|
492
|
+
partial: typeof TypeBox.Partial;
|
|
493
|
+
union: typeof TypeBox.Union;
|
|
494
|
+
pick: typeof TypeBox.Pick;
|
|
495
|
+
tuple: typeof TypeBox.Tuple;
|
|
496
|
+
interface: typeof TypeBox.Interface;
|
|
497
|
+
readonly schema: TypeGuard;
|
|
498
|
+
/**
|
|
499
|
+
* Create a schema for an object.
|
|
500
|
+
*/
|
|
501
|
+
object<T extends TProperties$1>(properties: T, options?: TObjectOptions$1): TObject$1<T>;
|
|
502
|
+
/**
|
|
503
|
+
* Create a schema for an array.
|
|
504
|
+
*
|
|
505
|
+
* @param schema
|
|
506
|
+
* @param options
|
|
507
|
+
*/
|
|
508
|
+
array<T extends TSchema$1>(schema: T, options?: TArrayOptions): TArray$1<T>;
|
|
509
|
+
/**
|
|
510
|
+
* Create a schema for a string.
|
|
511
|
+
*/
|
|
512
|
+
string(options?: AlephaStringOptions): TString$1;
|
|
513
|
+
/**
|
|
514
|
+
* Create a schema for a JSON object.
|
|
515
|
+
* This is a record with string keys and any values.
|
|
516
|
+
*/
|
|
517
|
+
json(options?: TSchemaOptions): TRecord$1<string, TAny$1>;
|
|
518
|
+
/**
|
|
519
|
+
* Create a schema for a boolean.
|
|
520
|
+
*/
|
|
521
|
+
boolean(options?: TSchemaOptions): TBoolean$1;
|
|
522
|
+
/**
|
|
523
|
+
* Create a schema for a number.
|
|
524
|
+
*/
|
|
525
|
+
number(options?: TNumberOptions$1): TNumber$1;
|
|
526
|
+
/**
|
|
527
|
+
* Create a schema for a signed 32-bit integer.
|
|
528
|
+
*/
|
|
529
|
+
int(options?: TNumberOptions$1): TInteger$1;
|
|
530
|
+
/**
|
|
531
|
+
* Mimic a signed 64-bit integer.
|
|
532
|
+
*
|
|
533
|
+
* This is NOT a true int64, as JavaScript cannot represent all int64 values.
|
|
534
|
+
* It is a number that is an integer and between -9007199254740991 and 9007199254740991.
|
|
535
|
+
* Use `t.bigint()` for true int64 values represented as strings.
|
|
536
|
+
*/
|
|
537
|
+
int64(options?: TNumberOptions$1): TNumber$1;
|
|
538
|
+
/**
|
|
539
|
+
* Make a schema optional.
|
|
540
|
+
*/
|
|
541
|
+
optional<T extends TSchema$1>(schema: T): TOptionalAdd$1<T>;
|
|
542
|
+
/**
|
|
543
|
+
* Make a schema nullable.
|
|
544
|
+
*/
|
|
545
|
+
nullable<T extends TSchema$1>(schema: T, options?: TObjectOptions$1): TUnion$1<[TNull$1, T]>;
|
|
546
|
+
/**
|
|
547
|
+
* Create a schema that maps all properties of an object schema to nullable.
|
|
548
|
+
*/
|
|
549
|
+
nullify: <T extends TSchema$1>(schema: T, options?: TObjectOptions$1) => TypeBox.TMappedInstantiate<{}, {
|
|
550
|
+
callstack: [];
|
|
551
|
+
}, TypeBox.TIdentifier<"K">, TypeBox.TKeyOfInstantiate<{}, {
|
|
552
|
+
callstack: [];
|
|
553
|
+
}, T>, TypeBox.TRef<"K">, TUnion$1<[TypeBox.TIndexInstantiate<{}, {
|
|
554
|
+
callstack: [];
|
|
555
|
+
}, T, TypeBox.TRef<"K">>, TNull$1]>>;
|
|
556
|
+
/**
|
|
557
|
+
* Create a schema for a string enum.
|
|
558
|
+
*/
|
|
559
|
+
enum<T extends string[]>(values: [...T], options?: TStringOptions$1): TUnsafe<T[number]>;
|
|
560
|
+
/**
|
|
561
|
+
* Create a schema for a bigint.
|
|
562
|
+
* This is NOT a BigInt object, but a string that represents a bigint.
|
|
563
|
+
*/
|
|
564
|
+
bigint(options?: TStringOptions$1): TString$1;
|
|
565
|
+
/**
|
|
566
|
+
* Create a schema for a datetime.
|
|
567
|
+
* This is NOT a Date object, but a string in ISO 8601 format.
|
|
568
|
+
*/
|
|
569
|
+
datetime(options?: TStringOptions$1): TString$1;
|
|
570
|
+
/**
|
|
571
|
+
* Create a schema for a date.
|
|
572
|
+
* This is NOT a Date object, but a string in ISO 8601 date format (YYYY-MM-DD).
|
|
573
|
+
*/
|
|
574
|
+
date(options?: TStringOptions$1): TString$1;
|
|
575
|
+
/**
|
|
576
|
+
* Create a schema for a url.
|
|
577
|
+
*/
|
|
578
|
+
url(options?: TStringOptions$1): TString$1;
|
|
579
|
+
/**
|
|
580
|
+
* Create a schema for uuid.
|
|
581
|
+
*/
|
|
582
|
+
uuid(options?: TStringOptions$1): TString$1;
|
|
583
|
+
/**
|
|
584
|
+
* Create a schema for a file-like object.
|
|
585
|
+
*
|
|
586
|
+
* File like mimics the File API in browsers, but is adapted to work in Node.js as well.
|
|
587
|
+
*
|
|
588
|
+
* Implementation of file-like objects is handled by "alepha/file" package.
|
|
589
|
+
*/
|
|
590
|
+
file(options?: {
|
|
591
|
+
maxSize?: number;
|
|
592
|
+
}): TFile;
|
|
593
|
+
/**
|
|
594
|
+
* @experimental
|
|
595
|
+
*/
|
|
596
|
+
stream(): TStream;
|
|
597
|
+
/**
|
|
598
|
+
* Create a schema for a string enum e.g. LIKE_THIS.
|
|
599
|
+
*
|
|
600
|
+
* @param options
|
|
601
|
+
*/
|
|
602
|
+
snakeCase: (options?: TStringOptions$1) => TString$1;
|
|
603
|
+
/**
|
|
604
|
+
* Create a schema for an object with a value and label.
|
|
605
|
+
*/
|
|
606
|
+
valueLabel: (options?: TObjectOptions$1) => TObject$1<{
|
|
607
|
+
value: TString$1;
|
|
608
|
+
label: TString$1;
|
|
609
|
+
description: TypeBox.TOptional<TString$1>;
|
|
610
|
+
}>;
|
|
611
|
+
}
|
|
612
|
+
type TextLength = "short" | "long" | "rich";
|
|
613
|
+
interface AlephaStringOptions extends TStringOptions$1 {
|
|
614
|
+
size?: TextLength;
|
|
615
|
+
}
|
|
616
|
+
declare const t: TypeProvider;
|
|
617
|
+
//#endregion
|
|
271
618
|
//#region src/Alepha.d.ts
|
|
272
619
|
/**
|
|
273
620
|
* Core container of the Alepha framework.
|
|
@@ -375,7 +722,7 @@ declare class AlsProvider {
|
|
|
375
722
|
* Alepha.create()
|
|
376
723
|
* .with(App)
|
|
377
724
|
* .start()
|
|
378
|
-
* .then(alepha => alepha.emit("my:custom:hook"));
|
|
725
|
+
* .then(alepha => alepha.events.emit("my:custom:hook"));
|
|
379
726
|
* ```
|
|
380
727
|
*
|
|
381
728
|
* Hooks are fully typed. You can create your own hooks by using module augmentation:
|
|
@@ -464,16 +811,12 @@ declare class Alepha {
|
|
|
464
811
|
* Cache for environment variables.
|
|
465
812
|
* > It allows us to avoid parsing the same schema multiple times.
|
|
466
813
|
*/
|
|
467
|
-
protected cacheEnv: Map<TSchema
|
|
814
|
+
protected cacheEnv: Map<TSchema, any>;
|
|
468
815
|
/**
|
|
469
816
|
* Cache for TypeBox type checks.
|
|
470
817
|
* > It allows us to avoid compiling the same schema multiple times.
|
|
471
818
|
*/
|
|
472
|
-
protected cacheTypeCheck: Map<TSchema
|
|
473
|
-
/**
|
|
474
|
-
* List of events that can be triggered. Powered by $hook().
|
|
475
|
-
*/
|
|
476
|
-
protected events: Record<string, Array<Hook>>;
|
|
819
|
+
protected cacheTypeCheck: Map<TSchema, Validator>;
|
|
477
820
|
/**
|
|
478
821
|
* List of modules that are registered in the container.
|
|
479
822
|
*
|
|
@@ -493,6 +836,14 @@ declare class Alepha {
|
|
|
493
836
|
* Mocked for browser environments.
|
|
494
837
|
*/
|
|
495
838
|
readonly context: AlsProvider;
|
|
839
|
+
/**
|
|
840
|
+
* Event manager to handle lifecycle events and custom events.
|
|
841
|
+
*/
|
|
842
|
+
readonly events: EventManager;
|
|
843
|
+
/**
|
|
844
|
+
* State manager to store arbitrary values.
|
|
845
|
+
*/
|
|
846
|
+
readonly state: StateManager<State>;
|
|
496
847
|
/**
|
|
497
848
|
* Get logger instance.
|
|
498
849
|
*/
|
|
@@ -502,10 +853,6 @@ declare class Alepha {
|
|
|
502
853
|
*/
|
|
503
854
|
get env(): Readonly<Env>;
|
|
504
855
|
constructor(state?: Partial<State>);
|
|
505
|
-
/**
|
|
506
|
-
* State accessor and mutator.
|
|
507
|
-
*/
|
|
508
|
-
state<Key extends keyof State>(key: Key, value?: State[Key]): State[Key];
|
|
509
856
|
/**
|
|
510
857
|
* True when start() is called.
|
|
511
858
|
*
|
|
@@ -660,45 +1007,12 @@ declare class Alepha {
|
|
|
660
1007
|
configure<T extends {
|
|
661
1008
|
options: object;
|
|
662
1009
|
}>(service: Service<T>, state: Partial<T["options"]>): this;
|
|
663
|
-
/**
|
|
664
|
-
* Registers a hook for the specified event.
|
|
665
|
-
*/
|
|
666
|
-
on<T extends keyof Hooks>(event: T, hookOrFunc: Hook<T> | ((payload: Hooks[T]) => Async<void>)): () => void;
|
|
667
|
-
/**
|
|
668
|
-
* Emits the specified event with the given payload.
|
|
669
|
-
*/
|
|
670
|
-
emit<T extends keyof Hooks>(func: keyof Hooks, payload: Hooks[T], options?: {
|
|
671
|
-
/**
|
|
672
|
-
* If true, the hooks will be executed in reverse order.
|
|
673
|
-
* This is useful for "stop" hooks that should be executed in reverse order.
|
|
674
|
-
*
|
|
675
|
-
* @default false
|
|
676
|
-
*/
|
|
677
|
-
reverse?: boolean;
|
|
678
|
-
/**
|
|
679
|
-
* If true, the hooks will be logged with their execution time.
|
|
680
|
-
*
|
|
681
|
-
* @default false
|
|
682
|
-
*/
|
|
683
|
-
log?: boolean;
|
|
684
|
-
/**
|
|
685
|
-
* If true, errors will be caught and logged instead of throwing.
|
|
686
|
-
*
|
|
687
|
-
* @default false
|
|
688
|
-
*/
|
|
689
|
-
catch?: boolean;
|
|
690
|
-
}): Promise<void>;
|
|
691
1010
|
/**
|
|
692
1011
|
* Casts the given value to the specified schema.
|
|
693
1012
|
*
|
|
694
1013
|
* It uses the TypeBox library to validate the value against the schema.
|
|
695
1014
|
*/
|
|
696
|
-
parse<T extends TSchema
|
|
697
|
-
/**
|
|
698
|
-
* Convert `null` to `undefined`
|
|
699
|
-
* @default true
|
|
700
|
-
*/
|
|
701
|
-
convertNullToUndefined?: boolean;
|
|
1015
|
+
parse<T extends TSchema>(schema: T, value?: unknown, opts?: {
|
|
702
1016
|
/**
|
|
703
1017
|
* Clone the value before parsing.
|
|
704
1018
|
* @default true
|
|
@@ -719,6 +1033,11 @@ declare class Alepha {
|
|
|
719
1033
|
* @default true
|
|
720
1034
|
*/
|
|
721
1035
|
convert?: boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* Convert `null` to `undefined`
|
|
1038
|
+
* @default true
|
|
1039
|
+
*/
|
|
1040
|
+
convertNullToUndefined?: boolean;
|
|
722
1041
|
/**
|
|
723
1042
|
* Prepare value after being deserialized.
|
|
724
1043
|
* @default true
|
|
@@ -871,16 +1190,6 @@ interface RunOptions {
|
|
|
871
1190
|
*/
|
|
872
1191
|
declare const OPTIONS: unique symbol;
|
|
873
1192
|
//#endregion
|
|
874
|
-
//#region src/constants/PRIMITIVE.d.ts
|
|
875
|
-
/**
|
|
876
|
-
* Symbol to mark a value as a primitive.
|
|
877
|
-
*
|
|
878
|
-
* Used to enhance TypeBox types with metadata. See @alepha/protobuf.
|
|
879
|
-
*
|
|
880
|
-
* @internal
|
|
881
|
-
*/
|
|
882
|
-
declare const PRIMITIVE: unique symbol;
|
|
883
|
-
//#endregion
|
|
884
1193
|
//#region src/descriptors/$cursor.d.ts
|
|
885
1194
|
/**
|
|
886
1195
|
* Get Alepha instance and Class definition from the current context.
|
|
@@ -992,7 +1301,7 @@ declare const $env: <T extends TObject$1>(type: T) => Static$1<T>;
|
|
|
992
1301
|
* }
|
|
993
1302
|
* }
|
|
994
1303
|
*
|
|
995
|
-
* await alepha.emit("my:custom:hook", { arg1: "value" });
|
|
1304
|
+
* await alepha.events.emit("my:custom:hook", { arg1: "value" });
|
|
996
1305
|
* ```
|
|
997
1306
|
*
|
|
998
1307
|
*/
|
|
@@ -1062,274 +1371,10 @@ declare class TooLateSubstitutionError extends AlephaError {
|
|
|
1062
1371
|
//#region src/errors/TypeBoxError.d.ts
|
|
1063
1372
|
declare class TypeBoxError extends AlephaError {
|
|
1064
1373
|
readonly name = "TypeBoxError";
|
|
1065
|
-
readonly
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
//#endregion
|
|
1069
|
-
//#region src/providers/TypeProvider.d.ts
|
|
1070
|
-
declare class TypeProvider {
|
|
1071
|
-
/**
|
|
1072
|
-
* Default maximum length for strings.
|
|
1073
|
-
*
|
|
1074
|
-
* It can be set to a larger value:
|
|
1075
|
-
* ```ts
|
|
1076
|
-
* TypeProvider.DEFAULT_STRING_MAX_LENGTH = 1000000;
|
|
1077
|
-
* TypeProvider.DEFAULT_STRING_MAX_LENGTH = undefined; // no limit (not recommended)
|
|
1078
|
-
* ```
|
|
1079
|
-
*/
|
|
1080
|
-
static DEFAULT_STRING_MAX_LENGTH: number | undefined;
|
|
1081
|
-
static DEFAULT_SHORT_STRING_MAX_LENGTH: number | undefined;
|
|
1082
|
-
/**
|
|
1083
|
-
* Maximum length for long strings, such as descriptions or comments.
|
|
1084
|
-
* It can be overridden in the string options.
|
|
1085
|
-
*
|
|
1086
|
-
* It can be set to a larger value:
|
|
1087
|
-
* ```ts
|
|
1088
|
-
* TypeProvider.DEFAULT_LONG_STRING_MAX_LENGTH = 2048;
|
|
1089
|
-
* ```
|
|
1090
|
-
*/
|
|
1091
|
-
static DEFAULT_LONG_STRING_MAX_LENGTH: number | undefined;
|
|
1092
|
-
/**
|
|
1093
|
-
* Maximum length for rich strings, such as HTML or Markdown.
|
|
1094
|
-
* This is a large value to accommodate rich text content.
|
|
1095
|
-
* > It's also the maximum length of PG's TEXT type.
|
|
1096
|
-
*
|
|
1097
|
-
* It can be overridden in the string options.
|
|
1098
|
-
*
|
|
1099
|
-
* It can be set to a larger value:
|
|
1100
|
-
* ```ts
|
|
1101
|
-
* TypeProvider.DEFAULT_RICH_STRING_MAX_LENGTH = 1000000;
|
|
1102
|
-
* ```
|
|
1103
|
-
*/
|
|
1104
|
-
static DEFAULT_RICH_STRING_MAX_LENGTH: number | undefined;
|
|
1105
|
-
/**
|
|
1106
|
-
* Maximum number of items in an array.
|
|
1107
|
-
* This is a default value to prevent excessive memory usage.
|
|
1108
|
-
* It can be overridden in the array options.
|
|
1109
|
-
*/
|
|
1110
|
-
static DEFAULT_ARRAY_MAX_ITEMS: number;
|
|
1111
|
-
static FormatRegistry: typeof FormatRegistry;
|
|
1112
|
-
raw: TypeBox.JavaScriptTypeBuilder;
|
|
1113
|
-
any: (options?: SchemaOptions) => TAny$1;
|
|
1114
|
-
void: (options?: SchemaOptions) => TypeBox.TVoid;
|
|
1115
|
-
undefined: (options?: SchemaOptions) => TypeBox.TUndefined;
|
|
1116
|
-
record: <Key extends TSchema$1, Value extends TSchema$1>(key: Key, value: Value, options?: ObjectOptions) => TypeBox.TRecordOrObject<Key, Value>;
|
|
1117
|
-
omit: {
|
|
1118
|
-
<Type extends TSchema$1, Key extends PropertyKey[]>(type: Type, key: readonly [...Key], options?: SchemaOptions): TOmit<Type, Key>;
|
|
1119
|
-
<Type extends TSchema$1, Key extends TSchema$1>(type: Type, key: Key, options?: SchemaOptions): TOmit<Type, Key>;
|
|
1120
|
-
};
|
|
1121
|
-
partial: {
|
|
1122
|
-
<MappedResult extends TypeBox.TMappedResult>(type: MappedResult, options?: SchemaOptions): TypeBox.TPartialFromMappedResult<MappedResult>;
|
|
1123
|
-
<Type extends TSchema$1>(type: Type, options?: SchemaOptions): TPartial<Type>;
|
|
1124
|
-
};
|
|
1125
|
-
union: <Types extends TSchema$1[]>(types: [...Types], options?: SchemaOptions) => TypeBox.Union<Types>;
|
|
1126
|
-
composite: <T extends TSchema$1[]>(schemas: [...T], options?: ObjectOptions) => TComposite<T>;
|
|
1127
|
-
pick: {
|
|
1128
|
-
<Type extends TSchema$1, Key extends PropertyKey[]>(type: Type, key: readonly [...Key], options?: SchemaOptions): TPick<Type, Key>;
|
|
1129
|
-
<Type extends TSchema$1, Key extends TSchema$1>(type: Type, key: Key, options?: SchemaOptions): TPick<Type, Key>;
|
|
1130
|
-
};
|
|
1131
|
-
/**
|
|
1132
|
-
* Create a schema for an object.
|
|
1133
|
-
*
|
|
1134
|
-
* @param properties The properties of the object.
|
|
1135
|
-
* @param options The options for the object.
|
|
1136
|
-
*/
|
|
1137
|
-
object<T extends TProperties$1>(properties: T, options?: ObjectOptions): TObject$1<T>;
|
|
1138
|
-
/**
|
|
1139
|
-
* Create a schema for an array.
|
|
1140
|
-
*
|
|
1141
|
-
* @param schema
|
|
1142
|
-
* @param options
|
|
1143
|
-
*/
|
|
1144
|
-
array<T extends TSchema$1>(schema: T, options?: ArrayOptions): TArray$1<T>;
|
|
1145
|
-
/**
|
|
1146
|
-
* Create a schema for a string.
|
|
1147
|
-
*
|
|
1148
|
-
* @param options
|
|
1149
|
-
*/
|
|
1150
|
-
string(options?: AlephaStringOptions): TString$1;
|
|
1151
|
-
/**
|
|
1152
|
-
* Create a schema for a JSON object.
|
|
1153
|
-
*
|
|
1154
|
-
* @param options
|
|
1155
|
-
*/
|
|
1156
|
-
json(options?: SchemaOptions): TRecord$1<TString$1, TAny$1>;
|
|
1157
|
-
/**
|
|
1158
|
-
* Create a schema for a boolean.
|
|
1159
|
-
*
|
|
1160
|
-
* @param options
|
|
1161
|
-
*/
|
|
1162
|
-
boolean(options?: SchemaOptions): TBoolean$1;
|
|
1163
|
-
/**
|
|
1164
|
-
* Create a schema for a number.
|
|
1165
|
-
*
|
|
1166
|
-
* @param options
|
|
1167
|
-
*/
|
|
1168
|
-
number(options?: NumberOptions): TNumber$1;
|
|
1169
|
-
/**
|
|
1170
|
-
* Create a schema for an unsigned 8-bit integer.
|
|
1171
|
-
*
|
|
1172
|
-
* @param options
|
|
1173
|
-
*/
|
|
1174
|
-
uchar(options?: IntegerOptions): TInteger;
|
|
1175
|
-
/**
|
|
1176
|
-
* Create a schema for an unsigned 32-bit integer.
|
|
1177
|
-
*/
|
|
1178
|
-
uint(options?: IntegerOptions): TNumber$1;
|
|
1179
|
-
/**
|
|
1180
|
-
* Create a schema for a signed 32-bit integer.
|
|
1181
|
-
*/
|
|
1182
|
-
int(options?: IntegerOptions): TInteger;
|
|
1183
|
-
/**
|
|
1184
|
-
* Create a schema for a signed 32-bit integer.
|
|
1185
|
-
*/
|
|
1186
|
-
integer(options?: IntegerOptions): TInteger;
|
|
1187
|
-
/**
|
|
1188
|
-
* Create a schema for a bigint. Bigint is a 64-bit integer.
|
|
1189
|
-
* This is a workaround for TypeBox, which does not support bigint natively.
|
|
1190
|
-
*/
|
|
1191
|
-
bigint(options?: NumberOptions): TNumber$1;
|
|
1192
|
-
/**
|
|
1193
|
-
* Make a schema optional.
|
|
1194
|
-
*
|
|
1195
|
-
* @param schema The schema to make optional.
|
|
1196
|
-
*/
|
|
1197
|
-
optional<T extends TSchema$1>(schema: T): TOptionalWithFlag<T, true>;
|
|
1198
|
-
/**
|
|
1199
|
-
* Make a schema nullable.
|
|
1200
|
-
*
|
|
1201
|
-
* @param schema The schema to make nullable.
|
|
1202
|
-
* @param options The options for the schema.
|
|
1203
|
-
*/
|
|
1204
|
-
nullable<T extends TSchema$1>(schema: T, options?: ObjectOptions): TUnion$1<[TNull$1, T]>;
|
|
1205
|
-
nullify: <T extends TSchema$1>(schema: T, options?: ObjectOptions) => TObject$1<TypeBox.Evaluate<TypeBox.TMappedFunctionReturnType<TypeBox.TIndexPropertyKeys<TypeBox.TKeyOf<T>>, TUnion$1<[TNull$1, TypeBox.TMappedResult<TypeBox.Evaluate<TypeBox.TIndexPropertyKeys<TypeBox.TKeyOf<T>> extends infer T_1 ? T_1 extends TypeBox.TIndexPropertyKeys<TypeBox.TKeyOf<T>> ? T_1 extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? Right extends [infer Left extends PropertyKey, ...infer Right extends PropertyKey[]] ? /*elided*/any : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : { [_ in Left]: TypeBox.Assert<TypeBox.TIndexFromPropertyKey<T, Left>, TSchema$1> } : {} : never : never>>]>, {}>>>;
|
|
1206
|
-
/**
|
|
1207
|
-
* Map a schema to another schema.
|
|
1208
|
-
*
|
|
1209
|
-
* @param schema The schema to map.
|
|
1210
|
-
* @param operations The operations to perform on the schema.
|
|
1211
|
-
* @param options The options for the schema.
|
|
1212
|
-
* @returns The mapped schema.
|
|
1213
|
-
*/
|
|
1214
|
-
map<T extends TObject$1 | TIntersect, Omit extends (keyof T["properties"])[], Optional extends (keyof T["properties"])[]>(schema: T, operations: {
|
|
1215
|
-
omit: readonly [...Omit];
|
|
1216
|
-
optional: [...Optional];
|
|
1217
|
-
}, options?: ObjectOptions): TComposite<[TOmit<T, [...Omit, ...Optional]>, TPartial<TPick<T, Optional>>]>;
|
|
1218
|
-
/**
|
|
1219
|
-
* Create a schema for a string enum.
|
|
1220
|
-
*
|
|
1221
|
-
* @param values
|
|
1222
|
-
* @param options
|
|
1223
|
-
*/
|
|
1224
|
-
enum<T extends string[]>(values: [...T], options?: StringOptions): TUnsafe<T[number]>;
|
|
1225
|
-
/**
|
|
1226
|
-
* Create a schema for a datetime.
|
|
1227
|
-
*
|
|
1228
|
-
* @param options The options for the date.
|
|
1229
|
-
*/
|
|
1230
|
-
datetime(options?: StringOptions): TString$1;
|
|
1231
|
-
/**
|
|
1232
|
-
* Create a schema for a date.
|
|
1233
|
-
*
|
|
1234
|
-
* @param options
|
|
1235
|
-
*/
|
|
1236
|
-
date(options?: StringOptions): TString$1;
|
|
1237
|
-
/**
|
|
1238
|
-
* Create a schema for uuid.
|
|
1239
|
-
*
|
|
1240
|
-
* @param options The options for the duration.
|
|
1241
|
-
*/
|
|
1242
|
-
uuid(options?: StringOptions): TString$1;
|
|
1243
|
-
unsafe<T>(kind: string, options?: UnsafeOptions): TUnsafe<T>;
|
|
1244
|
-
file(options?: {
|
|
1245
|
-
max?: number;
|
|
1246
|
-
}): TFile;
|
|
1247
|
-
stream(): TStream;
|
|
1248
|
-
/**
|
|
1249
|
-
* Create a schema for a string enum e.g. LIKE_THIS.
|
|
1250
|
-
*
|
|
1251
|
-
* @param options
|
|
1252
|
-
*/
|
|
1253
|
-
snakeCase: (options?: StringOptions) => TString$1;
|
|
1254
|
-
/**
|
|
1255
|
-
* Create a schema for an object with a value and label.
|
|
1256
|
-
*/
|
|
1257
|
-
valueLabel: (options?: ObjectOptions) => TObject$1<{
|
|
1258
|
-
value: TString$1;
|
|
1259
|
-
label: TString$1;
|
|
1260
|
-
description: TypeBox.TOptional<TString$1>;
|
|
1261
|
-
}>;
|
|
1374
|
+
readonly cause: TLocalizedValidationError;
|
|
1375
|
+
readonly value: any;
|
|
1376
|
+
constructor(error: TLocalizedValidationError, value: any);
|
|
1262
1377
|
}
|
|
1263
|
-
interface FileLike {
|
|
1264
|
-
/**
|
|
1265
|
-
* Filename.
|
|
1266
|
-
* @default "file"
|
|
1267
|
-
*/
|
|
1268
|
-
name: string;
|
|
1269
|
-
/**
|
|
1270
|
-
* Mandatory MIME type of the file.
|
|
1271
|
-
* @default "application/octet-stream"
|
|
1272
|
-
*/
|
|
1273
|
-
type: string;
|
|
1274
|
-
/**
|
|
1275
|
-
* Size of the file in bytes.
|
|
1276
|
-
*
|
|
1277
|
-
* Always 0 for streams, as the size is not known until the stream is fully read.
|
|
1278
|
-
*
|
|
1279
|
-
* @default 0
|
|
1280
|
-
*/
|
|
1281
|
-
size: number;
|
|
1282
|
-
/**
|
|
1283
|
-
* Last modified timestamp in milliseconds since epoch.
|
|
1284
|
-
*
|
|
1285
|
-
* Always the current timestamp for streams, as the last modified time is not known.
|
|
1286
|
-
* We use this field to ensure compatibility with File API.
|
|
1287
|
-
*
|
|
1288
|
-
* @default Date.now()
|
|
1289
|
-
*/
|
|
1290
|
-
lastModified: number;
|
|
1291
|
-
/**
|
|
1292
|
-
* Returns a ReadableStream or Node.js Readable stream of the file content.
|
|
1293
|
-
*
|
|
1294
|
-
* For streams, this is the original stream.
|
|
1295
|
-
*/
|
|
1296
|
-
stream(): StreamLike;
|
|
1297
|
-
/**
|
|
1298
|
-
* Returns the file content as an ArrayBuffer.
|
|
1299
|
-
*
|
|
1300
|
-
* For streams, this reads the entire stream into memory.
|
|
1301
|
-
*/
|
|
1302
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1303
|
-
/**
|
|
1304
|
-
* Returns the file content as a string.
|
|
1305
|
-
*
|
|
1306
|
-
* For streams, this reads the entire stream into memory and converts it to a string.
|
|
1307
|
-
*/
|
|
1308
|
-
text(): Promise<string>;
|
|
1309
|
-
/**
|
|
1310
|
-
* Optional file path, if the file is stored on disk.
|
|
1311
|
-
*
|
|
1312
|
-
* This is not from the File API, but rather a custom field to indicate where the file is stored.
|
|
1313
|
-
*/
|
|
1314
|
-
filepath?: string;
|
|
1315
|
-
}
|
|
1316
|
-
/**
|
|
1317
|
-
* TypeBox view of FileLike.
|
|
1318
|
-
*/
|
|
1319
|
-
type TFile = TUnsafe<FileLike>;
|
|
1320
|
-
declare const isTypeFile: (value: TSchema$1) => value is TFile;
|
|
1321
|
-
declare const isFileLike: (value: any) => value is FileLike;
|
|
1322
|
-
type StreamLike = ReadableStream | ReadableStream$1 | Readable | NodeJS.ReadableStream;
|
|
1323
|
-
type TStream = TUnsafe<StreamLike>;
|
|
1324
|
-
type TextLength = "short" | "long" | "rich";
|
|
1325
|
-
interface AlephaStringOptions extends StringOptions {
|
|
1326
|
-
size?: TextLength;
|
|
1327
|
-
}
|
|
1328
|
-
declare const t: TypeProvider;
|
|
1329
|
-
declare function isISODate(str: string): boolean;
|
|
1330
|
-
declare function isISODateTime(value: string): boolean;
|
|
1331
|
-
declare function isUUID(value: string): boolean;
|
|
1332
|
-
declare function isEmail(value: string): boolean;
|
|
1333
1378
|
//#endregion
|
|
1334
1379
|
//#region src/index.d.ts
|
|
1335
1380
|
declare global {
|
|
@@ -1345,5 +1390,5 @@ declare global {
|
|
|
1345
1390
|
*/
|
|
1346
1391
|
declare const run: (entry: Alepha | Service | Array<Service>, opts?: RunOptions) => void;
|
|
1347
1392
|
//#endregion
|
|
1348
|
-
export { $cursor, $env, $hook, $inject, $module, AbstractClass, Alepha, AlephaError, AlephaStringOptions, AlsProvider, AppNotStartedError, Async, AsyncFn, AsyncLocalStorageData, CircularDependencyError, ContainerLockedError, CursorDescriptor, Descriptor, DescriptorArgs, DescriptorConfig, DescriptorFactory, DescriptorFactoryLike, Env, FileLike, Hook, HookDescriptor, HookOptions, Hooks, InjectDescriptor, InjectOptions, InstantiableClass, KIND, LogLevel, LoggerInterface, MaybePromise, Module, ModuleDescriptorOptions, OPTIONS,
|
|
1393
|
+
export { $cursor, $env, $hook, $inject, $module, AbstractClass, Alepha, AlephaError, AlephaStringOptions, AlsProvider, AppNotStartedError, Async, AsyncFn, AsyncLocalStorageData, CircularDependencyError, ContainerLockedError, CursorDescriptor, Descriptor, DescriptorArgs, DescriptorConfig, DescriptorFactory, DescriptorFactoryLike, Env, FileLike, Hook, HookDescriptor, HookOptions, Hooks, InjectDescriptor, InjectOptions, InstantiableClass, KIND, LogLevel, LoggerInterface, MaybePromise, Module, ModuleDescriptorOptions, OPTIONS, Service, ServiceEntry, ServiceSubstitution, State, StateManager, type Static, type StaticDecode, type StaticEncode, StreamLike, type TAny, type TArray, type TBigInt, type TBoolean, TFile, type TInteger, type TKeysToIndexer, type TNull, type TNumber, type TNumberOptions, type TObject, type TObjectOptions, type TOptional, type TOptionalAdd, type TPick, type TProperties, type TRecord, type TSchema, TStream, type TString, type TStringOptions, type TTuple, type TUnion, type TVoid, TextLength, TooLateSubstitutionError, TypeBox, TypeBoxError, TypeBoxValue, TypeGuard, TypeProvider, WithModule, __alephaRef, createDescriptor, isFileLike, isTypeFile, run, t };
|
|
1349
1394
|
//# sourceMappingURL=index.d.ts.map
|