alepha 0.11.3 → 0.11.5
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/api/files.d.ts +1 -1
- package/api/jobs.d.ts +140 -140
- package/api/users.d.ts +496 -496
- package/batch.d.ts +3 -0
- package/bucket.d.ts +4 -0
- package/command.d.ts +14 -0
- package/core.d.ts +274 -11
- package/datetime.d.ts +2 -1
- package/devtools.d.ts +261 -259
- package/fake.cjs +8 -0
- package/fake.d.ts +73 -0
- package/fake.js +1 -0
- package/file.d.ts +476 -1
- package/logger.d.ts +2 -1
- package/package.json +63 -49
- package/postgres.d.ts +34 -104
- package/react/i18n.d.ts +26 -1
- package/react.d.ts +373 -64
- package/security.d.ts +28 -28
- package/server/swagger.d.ts +3 -3
- package/server.d.ts +20 -20
- package/ui.cjs +8 -0
- package/ui.d.ts +683 -0
- package/ui.js +1 -0
- package/vite.d.ts +18 -29
package/batch.d.ts
CHANGED
|
@@ -533,6 +533,9 @@ declare class BatchDescriptor<TItem extends TSchema, TResponse = any> extends De
|
|
|
533
533
|
protected readonly dateTime: DateTimeProvider;
|
|
534
534
|
protected readonly partitions: Map<any, any>;
|
|
535
535
|
protected activeHandlers: PromiseWithResolvers<void>[];
|
|
536
|
+
protected get maxSize(): number;
|
|
537
|
+
protected get concurrency(): number;
|
|
538
|
+
protected get maxDuration(): DurationLike;
|
|
536
539
|
protected retry: _alepha_retry0.RetryDescriptorFn<(items: typebox0.StaticType<[], "Decode", {}, {}, TItem>[]) => TResponse>;
|
|
537
540
|
/**
|
|
538
541
|
* Pushes an item into the batch. The item will be processed
|
package/bucket.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, Descriptor, FileLike, KIND, Service } from "alepha";
|
|
3
|
+
import { FileSystem } from "alepha/file";
|
|
3
4
|
import * as fs from "node:fs";
|
|
4
5
|
import * as _alepha_logger0 from "alepha/logger";
|
|
5
6
|
import * as typebox0 from "typebox";
|
|
@@ -43,6 +44,7 @@ declare abstract class FileStorageProvider {
|
|
|
43
44
|
//#region src/providers/MemoryFileStorageProvider.d.ts
|
|
44
45
|
declare class MemoryFileStorageProvider implements FileStorageProvider {
|
|
45
46
|
readonly files: Record<string, FileLike>;
|
|
47
|
+
private readonly fileSystem;
|
|
46
48
|
upload(bucketName: string, file: FileLike, fileId?: string): Promise<string>;
|
|
47
49
|
download(bucketName: string, fileId: string): Promise<FileLike>;
|
|
48
50
|
exists(bucketName: string, fileId: string): Promise<boolean>;
|
|
@@ -326,6 +328,7 @@ interface BucketFileOptions {
|
|
|
326
328
|
}
|
|
327
329
|
declare class BucketDescriptor extends Descriptor<BucketDescriptorOptions> {
|
|
328
330
|
readonly provider: FileStorageProvider | MemoryFileStorageProvider;
|
|
331
|
+
private readonly fileSystem;
|
|
329
332
|
get name(): string;
|
|
330
333
|
/**
|
|
331
334
|
* Uploads a file to the bucket.
|
|
@@ -449,6 +452,7 @@ declare class LocalFileStorageProvider implements FileStorageProvider {
|
|
|
449
452
|
protected readonly alepha: Alepha;
|
|
450
453
|
protected readonly log: _alepha_logger0.Logger;
|
|
451
454
|
protected readonly metadataService: FileMetadataService;
|
|
455
|
+
protected readonly fileSystem: FileSystem;
|
|
452
456
|
options: {
|
|
453
457
|
storagePath: string;
|
|
454
458
|
};
|
package/command.d.ts
CHANGED
|
@@ -141,8 +141,14 @@ interface CommandDescriptorOptions<T extends TObject, A extends TSchema> {
|
|
|
141
141
|
args?: A;
|
|
142
142
|
/**
|
|
143
143
|
* If false, skip summary message at the end of the command execution.
|
|
144
|
+
* Summary will display only if ({ run }) method calls were made.
|
|
144
145
|
*/
|
|
145
146
|
summary?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Marks this command as the root command.
|
|
149
|
+
* Equivalent to setting name to an empty string "".
|
|
150
|
+
*/
|
|
151
|
+
root?: boolean;
|
|
146
152
|
}
|
|
147
153
|
declare class CommandDescriptor<T extends TObject = TObject, A extends TSchema = TSchema> extends Descriptor<CommandDescriptorOptions<T, A>> {
|
|
148
154
|
readonly flags: TObject<{}>;
|
|
@@ -195,6 +201,14 @@ declare class CliProvider {
|
|
|
195
201
|
protected readonly onReady: _alepha_core1.HookDescriptor<"ready">;
|
|
196
202
|
get commands(): CommandDescriptor<any>[];
|
|
197
203
|
private findCommand;
|
|
204
|
+
/**
|
|
205
|
+
* Get all global flags including those from the root command (name === "")
|
|
206
|
+
*/
|
|
207
|
+
protected getAllGlobalFlags(): Record<string, {
|
|
208
|
+
aliases: string[];
|
|
209
|
+
description?: string;
|
|
210
|
+
schema: TSchema;
|
|
211
|
+
}>;
|
|
198
212
|
protected parseCommandFlags(argv: string[], schema: TObject): Record<string, any>;
|
|
199
213
|
protected parseFlags(argv: string[], flagDefs: {
|
|
200
214
|
key: string;
|
package/core.d.ts
CHANGED
|
@@ -804,27 +804,31 @@ declare class EventManager {
|
|
|
804
804
|
}
|
|
805
805
|
//#endregion
|
|
806
806
|
//#region src/providers/StateManager.d.ts
|
|
807
|
-
declare class StateManager<
|
|
807
|
+
declare class StateManager<State$1 extends object = State> {
|
|
808
808
|
protected readonly als: AlsProvider;
|
|
809
809
|
protected readonly events: EventManager;
|
|
810
|
-
protected store: Partial<
|
|
811
|
-
constructor(store?: Partial<
|
|
810
|
+
protected store: Partial<State$1>;
|
|
811
|
+
constructor(store?: Partial<State$1>);
|
|
812
812
|
/**
|
|
813
813
|
* Get a value from the state with proper typing
|
|
814
814
|
*/
|
|
815
|
-
get<Key extends keyof
|
|
815
|
+
get<Key extends keyof State$1>(key: Key): State$1[Key] | undefined;
|
|
816
816
|
/**
|
|
817
817
|
* Set a value in the state
|
|
818
818
|
*/
|
|
819
|
-
set<Key extends keyof
|
|
819
|
+
set<Key extends keyof State$1>(key: Key, value: State$1[Key] | undefined): this;
|
|
820
820
|
/**
|
|
821
821
|
* Check if a key exists in the state
|
|
822
822
|
*/
|
|
823
|
-
has<Key extends keyof
|
|
823
|
+
has<Key extends keyof State$1>(key: Key): boolean;
|
|
824
824
|
/**
|
|
825
825
|
* Delete a key from the state (set to undefined)
|
|
826
826
|
*/
|
|
827
|
-
del<Key extends keyof
|
|
827
|
+
del<Key extends keyof State$1>(key: Key): this;
|
|
828
|
+
/**
|
|
829
|
+
* Push a value to an array in the state
|
|
830
|
+
*/
|
|
831
|
+
push<Key extends keyof OnlyArray<State$1>>(key: Key, value: NonNullable<State$1[Key]> extends Array<infer U> ? U : never): this;
|
|
828
832
|
/**
|
|
829
833
|
* Clear all state
|
|
830
834
|
*/
|
|
@@ -832,8 +836,9 @@ declare class StateManager<S extends Record<string, any> = State> {
|
|
|
832
836
|
/**
|
|
833
837
|
* Get all keys that exist in the state
|
|
834
838
|
*/
|
|
835
|
-
keys(): (keyof
|
|
839
|
+
keys(): (keyof State$1)[];
|
|
836
840
|
}
|
|
841
|
+
type OnlyArray<T extends object> = { [K in keyof T]: NonNullable<T[K]> extends Array<any> ? K : never };
|
|
837
842
|
//#endregion
|
|
838
843
|
//#region src/Alepha.d.ts
|
|
839
844
|
/**
|
|
@@ -1049,7 +1054,7 @@ declare class Alepha {
|
|
|
1049
1054
|
/**
|
|
1050
1055
|
* State manager to store arbitrary values.
|
|
1051
1056
|
*/
|
|
1052
|
-
get state(): StateManager<
|
|
1057
|
+
get state(): StateManager<State>;
|
|
1053
1058
|
/**
|
|
1054
1059
|
* Codec manager for encoding and decoding data with different formats.
|
|
1055
1060
|
*
|
|
@@ -1294,9 +1299,16 @@ interface State {
|
|
|
1294
1299
|
afterAll?: (run: any) => any;
|
|
1295
1300
|
afterEach?: (run: any) => any;
|
|
1296
1301
|
onTestFinished?: (run: any) => any;
|
|
1302
|
+
/**
|
|
1303
|
+
* List of static assets to be copied to the output directory.
|
|
1304
|
+
*/
|
|
1305
|
+
assets?: Array<string>;
|
|
1297
1306
|
}
|
|
1298
1307
|
interface Hooks {
|
|
1299
|
-
|
|
1308
|
+
/**
|
|
1309
|
+
* Used for testing purposes.
|
|
1310
|
+
*/
|
|
1311
|
+
echo: unknown;
|
|
1300
1312
|
/**
|
|
1301
1313
|
* Triggered during the configuration phase. Before the start phase.
|
|
1302
1314
|
*/
|
|
@@ -1365,6 +1377,12 @@ interface RunOptions {
|
|
|
1365
1377
|
cluster?: boolean;
|
|
1366
1378
|
}
|
|
1367
1379
|
//#endregion
|
|
1380
|
+
//#region src/helpers/boot.d.ts
|
|
1381
|
+
declare const boot: {
|
|
1382
|
+
getClientEntry: (root?: string) => Promise<string | undefined>;
|
|
1383
|
+
getServerEntry: (root?: string, explicitEntry?: string) => Promise<string>;
|
|
1384
|
+
};
|
|
1385
|
+
//#endregion
|
|
1368
1386
|
//#region src/constants/OPTIONS.d.ts
|
|
1369
1387
|
/**
|
|
1370
1388
|
* Used for descriptors options.
|
|
@@ -1543,6 +1561,251 @@ declare class TooLateSubstitutionError extends AlephaError {
|
|
|
1543
1561
|
constructor(original: string, substitution: string);
|
|
1544
1562
|
}
|
|
1545
1563
|
//#endregion
|
|
1564
|
+
//#region src/schemas/pageSchema.d.ts
|
|
1565
|
+
/**
|
|
1566
|
+
* Create a pagination schema for the given object schema.
|
|
1567
|
+
*
|
|
1568
|
+
* Provides a standardized pagination response format compatible with Spring Data's Page interface.
|
|
1569
|
+
* This schema can be used across any data source (databases, APIs, caches, etc.).
|
|
1570
|
+
*
|
|
1571
|
+
* @example
|
|
1572
|
+
* ```ts
|
|
1573
|
+
* const userSchema = t.object({ id: t.int(), name: t.text() });
|
|
1574
|
+
* const userPageSchema = pageSchema(userSchema);
|
|
1575
|
+
* ```
|
|
1576
|
+
*
|
|
1577
|
+
* @example In an API endpoint
|
|
1578
|
+
* ```ts
|
|
1579
|
+
* $action({
|
|
1580
|
+
* output: pageSchema(UserSchema),
|
|
1581
|
+
* handler: async () => {
|
|
1582
|
+
* return await userRepo.paginate();
|
|
1583
|
+
* }
|
|
1584
|
+
* })
|
|
1585
|
+
* ```
|
|
1586
|
+
*/
|
|
1587
|
+
declare const pageSchema: <T extends TObject | TRecord>(objectSchema: T, options?: TObjectOptions) => TPage<T>;
|
|
1588
|
+
type TPage<T extends TObject | TRecord> = TObject<{
|
|
1589
|
+
content: TArray<T>;
|
|
1590
|
+
page: TObject<{
|
|
1591
|
+
number: TInteger;
|
|
1592
|
+
size: TInteger;
|
|
1593
|
+
offset: TInteger;
|
|
1594
|
+
numberOfElements: TInteger;
|
|
1595
|
+
totalElements: TOptionalAdd<TInteger>;
|
|
1596
|
+
totalPages: TOptionalAdd<TInteger>;
|
|
1597
|
+
isEmpty: TBoolean;
|
|
1598
|
+
isFirst: TBoolean;
|
|
1599
|
+
isLast: TBoolean;
|
|
1600
|
+
sort: TOptionalAdd<TObject<{
|
|
1601
|
+
sorted: TBoolean;
|
|
1602
|
+
fields: TArray<TObject<{
|
|
1603
|
+
field: TString;
|
|
1604
|
+
direction: TSchema;
|
|
1605
|
+
}>>;
|
|
1606
|
+
}>>;
|
|
1607
|
+
}>;
|
|
1608
|
+
}>;
|
|
1609
|
+
/**
|
|
1610
|
+
* Opinionated type definition for a paginated response.
|
|
1611
|
+
*
|
|
1612
|
+
* Inspired by Spring Data's Page interface with all essential pagination metadata.
|
|
1613
|
+
* This generic type can be used with any data source.
|
|
1614
|
+
*
|
|
1615
|
+
* @example
|
|
1616
|
+
* ```ts
|
|
1617
|
+
* const page: Page<User> = {
|
|
1618
|
+
* content: [user1, user2, ...],
|
|
1619
|
+
* page: {
|
|
1620
|
+
* number: 0,
|
|
1621
|
+
* size: 10,
|
|
1622
|
+
* offset: 0,
|
|
1623
|
+
* numberOfElements: 10,
|
|
1624
|
+
* totalElements: 1200,
|
|
1625
|
+
* totalPages: 120,
|
|
1626
|
+
* isEmpty: false,
|
|
1627
|
+
* isFirst: true,
|
|
1628
|
+
* isLast: false,
|
|
1629
|
+
* sort: {
|
|
1630
|
+
* sorted: true,
|
|
1631
|
+
* fields: [
|
|
1632
|
+
* { field: "name", direction: "asc" }
|
|
1633
|
+
* ]
|
|
1634
|
+
* }
|
|
1635
|
+
* }
|
|
1636
|
+
* }
|
|
1637
|
+
* ```
|
|
1638
|
+
*/
|
|
1639
|
+
type Page<T> = {
|
|
1640
|
+
/**
|
|
1641
|
+
* Array of items on the current page.
|
|
1642
|
+
*/
|
|
1643
|
+
content: T[];
|
|
1644
|
+
page: {
|
|
1645
|
+
/**
|
|
1646
|
+
* Page number, starting from 0.
|
|
1647
|
+
*/
|
|
1648
|
+
number: number;
|
|
1649
|
+
/**
|
|
1650
|
+
* Number of items per page (requested page size).
|
|
1651
|
+
*/
|
|
1652
|
+
size: number;
|
|
1653
|
+
/**
|
|
1654
|
+
* Offset in the dataset (page × size).
|
|
1655
|
+
*/
|
|
1656
|
+
offset: number;
|
|
1657
|
+
/**
|
|
1658
|
+
* Number of elements in THIS page (content.length).
|
|
1659
|
+
* Different from totalElements which is the total across all pages.
|
|
1660
|
+
*/
|
|
1661
|
+
numberOfElements: number;
|
|
1662
|
+
/**
|
|
1663
|
+
* Total number of elements across all pages.
|
|
1664
|
+
* Only available when counting is enabled.
|
|
1665
|
+
*/
|
|
1666
|
+
totalElements?: number;
|
|
1667
|
+
/**
|
|
1668
|
+
* Total number of pages.
|
|
1669
|
+
* Only available when `totalElements` is present.
|
|
1670
|
+
*/
|
|
1671
|
+
totalPages?: number;
|
|
1672
|
+
/**
|
|
1673
|
+
* Indicates if the current page has no items (numberOfElements === 0).
|
|
1674
|
+
*/
|
|
1675
|
+
isEmpty: boolean;
|
|
1676
|
+
/**
|
|
1677
|
+
* Indicates if this is the first page (number === 0).
|
|
1678
|
+
*/
|
|
1679
|
+
isFirst: boolean;
|
|
1680
|
+
/**
|
|
1681
|
+
* Indicates if this is the last page (no more pages after this).
|
|
1682
|
+
*/
|
|
1683
|
+
isLast: boolean;
|
|
1684
|
+
/**
|
|
1685
|
+
* Sort metadata indicating what sorting was applied.
|
|
1686
|
+
* Only present when sorting is applied.
|
|
1687
|
+
*/
|
|
1688
|
+
sort?: {
|
|
1689
|
+
/**
|
|
1690
|
+
* Whether the results are sorted.
|
|
1691
|
+
*/
|
|
1692
|
+
sorted: boolean;
|
|
1693
|
+
/**
|
|
1694
|
+
* The fields and directions used for sorting.
|
|
1695
|
+
*/
|
|
1696
|
+
fields: Array<{
|
|
1697
|
+
field: string;
|
|
1698
|
+
direction: "asc" | "desc";
|
|
1699
|
+
}>;
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1702
|
+
};
|
|
1703
|
+
//#endregion
|
|
1704
|
+
//#region src/helpers/createPagination.d.ts
|
|
1705
|
+
/**
|
|
1706
|
+
* Create a pagination object from an array of entities.
|
|
1707
|
+
*
|
|
1708
|
+
* This is a pure function that works with any data source (databases, APIs, caches, arrays, etc.).
|
|
1709
|
+
* It handles the core pagination logic including:
|
|
1710
|
+
* - Slicing the content to the requested page size
|
|
1711
|
+
* - Calculating pagination metadata (offset, page number, etc.)
|
|
1712
|
+
* - Determining navigation state (isFirst, isLast)
|
|
1713
|
+
* - Including sort metadata when provided
|
|
1714
|
+
*
|
|
1715
|
+
* @param entities - The entities to paginate (should include one extra item to detect if there's a next page)
|
|
1716
|
+
* @param limit - The limit of the pagination (page size)
|
|
1717
|
+
* @param offset - The offset of the pagination (starting position)
|
|
1718
|
+
* @param sort - Optional sort metadata to include in response
|
|
1719
|
+
* @returns A complete Page object with content and metadata
|
|
1720
|
+
*
|
|
1721
|
+
* @example Basic pagination
|
|
1722
|
+
* ```ts
|
|
1723
|
+
* const users = await fetchUsers({ limit: 11, offset: 0 }); // Fetch limit + 1
|
|
1724
|
+
* const page = createPagination(users, 10, 0);
|
|
1725
|
+
* // page.content has max 10 items
|
|
1726
|
+
* // page.page.isLast tells us if there are more pages
|
|
1727
|
+
* ```
|
|
1728
|
+
*
|
|
1729
|
+
* @example With sorting
|
|
1730
|
+
* ```ts
|
|
1731
|
+
* const page = createPagination(
|
|
1732
|
+
* entities,
|
|
1733
|
+
* 10,
|
|
1734
|
+
* 0,
|
|
1735
|
+
* [{ column: "name", direction: "asc" }]
|
|
1736
|
+
* );
|
|
1737
|
+
* ```
|
|
1738
|
+
*
|
|
1739
|
+
* @example In a custom service
|
|
1740
|
+
* ```ts
|
|
1741
|
+
* class MyService {
|
|
1742
|
+
* async listItems(page: number, size: number) {
|
|
1743
|
+
* const items = await this.fetchItems({ limit: size + 1, offset: page * size });
|
|
1744
|
+
* return createPagination(items, size, page * size);
|
|
1745
|
+
* }
|
|
1746
|
+
* }
|
|
1747
|
+
* ```
|
|
1748
|
+
*/
|
|
1749
|
+
declare function createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
|
|
1750
|
+
column: string;
|
|
1751
|
+
direction: "asc" | "desc";
|
|
1752
|
+
}>): Page<T>;
|
|
1753
|
+
//#endregion
|
|
1754
|
+
//#region src/interfaces/Pagination.d.ts
|
|
1755
|
+
/**
|
|
1756
|
+
* Generic pagination request parameters.
|
|
1757
|
+
*
|
|
1758
|
+
* This interface defines the common structure for pagination queries
|
|
1759
|
+
* across all data sources. Individual packages can extend or adapt this
|
|
1760
|
+
* interface for their specific needs.
|
|
1761
|
+
*
|
|
1762
|
+
* @example Basic usage
|
|
1763
|
+
* ```ts
|
|
1764
|
+
* const query: PageRequest = {
|
|
1765
|
+
* page: 0,
|
|
1766
|
+
* size: 20
|
|
1767
|
+
* };
|
|
1768
|
+
* ```
|
|
1769
|
+
*
|
|
1770
|
+
* @example With all parameters
|
|
1771
|
+
* ```ts
|
|
1772
|
+
* const query: PageRequest = {
|
|
1773
|
+
* page: 2,
|
|
1774
|
+
* size: 50
|
|
1775
|
+
* };
|
|
1776
|
+
* ```
|
|
1777
|
+
*/
|
|
1778
|
+
interface PageRequest {
|
|
1779
|
+
/**
|
|
1780
|
+
* The page number to retrieve (0-indexed).
|
|
1781
|
+
* @default 0
|
|
1782
|
+
*/
|
|
1783
|
+
page?: number;
|
|
1784
|
+
/**
|
|
1785
|
+
* The number of items per page.
|
|
1786
|
+
* @default 10
|
|
1787
|
+
*/
|
|
1788
|
+
size?: number;
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Sort direction for ordering results.
|
|
1792
|
+
*/
|
|
1793
|
+
type SortDirection = "asc" | "desc";
|
|
1794
|
+
/**
|
|
1795
|
+
* Sort field specification.
|
|
1796
|
+
*/
|
|
1797
|
+
interface SortField {
|
|
1798
|
+
/**
|
|
1799
|
+
* The field/column name to sort by.
|
|
1800
|
+
*/
|
|
1801
|
+
field: string;
|
|
1802
|
+
/**
|
|
1803
|
+
* The sort direction.
|
|
1804
|
+
* @default "asc"
|
|
1805
|
+
*/
|
|
1806
|
+
direction: SortDirection;
|
|
1807
|
+
}
|
|
1808
|
+
//#endregion
|
|
1546
1809
|
//#region src/index.d.ts
|
|
1547
1810
|
/**
|
|
1548
1811
|
* Run Alepha application, trigger start lifecycle.
|
|
@@ -1560,5 +1823,5 @@ declare class TooLateSubstitutionError extends AlephaError {
|
|
|
1560
1823
|
*/
|
|
1561
1824
|
declare const run: (entry: Alepha | Service | Array<Service>, opts?: RunOptions) => Alepha;
|
|
1562
1825
|
//#endregion
|
|
1563
|
-
export { $cursor, $env, $hook, $inject, $module, AbstractClass, Alepha, AlephaError, AlsProvider, AppNotStartedError, Async, AsyncFn, AsyncLocalStorageData, CircularDependencyError, CodecManager, Configurable, ContainerLockedError, CursorDescriptor, DecodeOptions, Descriptor, DescriptorArgs, DescriptorConfig, DescriptorFactory, DescriptorFactoryLike, EncodeOptions, EncodeResult, Encoding, Env, FileLike, Hook, HookDescriptor, HookOptions, Hooks, InjectDescriptor, InjectOptions, InstantiableClass, JsonSchemaCodec, KIND, LogLevel, LoggerInterface, MaybePromise, Module, ModuleDescriptorOptions, OPTIONS, RunFunction, SchemaCodec, 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, TTextOptions, type TTuple, type TUnion, type TUnsafe, type TVoid, TextLength, TooLateSubstitutionError, TypeBox, TypeBoxError, TypeBoxErrorParams, TypeBoxFormat, TypeBoxValue, TypeGuard, TypeProvider, WithModule, __alephaRef, createDescriptor, isClass, isEmail, isFileLike, isTypeFile, isURL, isUUID, run, t };
|
|
1826
|
+
export { $cursor, $env, $hook, $inject, $module, AbstractClass, Alepha, AlephaError, AlsProvider, AppNotStartedError, Async, AsyncFn, AsyncLocalStorageData, CircularDependencyError, CodecManager, Configurable, ContainerLockedError, CursorDescriptor, DecodeOptions, Descriptor, DescriptorArgs, DescriptorConfig, DescriptorFactory, DescriptorFactoryLike, EncodeOptions, EncodeResult, Encoding, Env, FileLike, Hook, HookDescriptor, HookOptions, Hooks, InjectDescriptor, InjectOptions, InstantiableClass, JsonSchemaCodec, KIND, LogLevel, LoggerInterface, MaybePromise, Module, ModuleDescriptorOptions, OPTIONS, Page, PageRequest, RunFunction, SchemaCodec, Service, ServiceEntry, ServiceSubstitution, SortDirection, SortField, 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, TPage, type TPick, type TProperties, type TRecord, type TSchema, TStream, type TString, type TStringOptions, TTextOptions, type TTuple, type TUnion, type TUnsafe, type TVoid, TextLength, TooLateSubstitutionError, TypeBox, TypeBoxError, TypeBoxErrorParams, TypeBoxFormat, TypeBoxValue, TypeGuard, TypeProvider, WithModule, __alephaRef, boot, createDescriptor, createPagination, isClass, isEmail, isFileLike, isTypeFile, isURL, isUUID, pageSchema, run, t };
|
|
1564
1827
|
//# sourceMappingURL=index.d.ts.map
|
package/datetime.d.ts
CHANGED
|
@@ -85,12 +85,13 @@ declare class DateTimeProvider {
|
|
|
85
85
|
signal?: AbortSignal;
|
|
86
86
|
now?: number;
|
|
87
87
|
}): Promise<void>;
|
|
88
|
-
createInterval(run: () => unknown, distance: DurationLike): Interval;
|
|
88
|
+
createInterval(run: () => unknown, distance: DurationLike, start?: boolean): Interval;
|
|
89
89
|
/**
|
|
90
90
|
* Run a callback after a certain duration.
|
|
91
91
|
*/
|
|
92
92
|
createTimeout(callback: () => void, duration: DurationLike, now?: number): Timeout;
|
|
93
93
|
clearTimeout(timeout: Timeout): void;
|
|
94
|
+
clearInterval(interval: Interval): void;
|
|
94
95
|
/**
|
|
95
96
|
* Run a function with a deadline.
|
|
96
97
|
*/
|