alepha 0.11.6 → 0.11.9
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/LICENSE +1 -1
- package/README.md +15 -100
- package/api/files.d.ts +172 -173
- package/api/jobs.d.ts +220 -183
- package/api/notifications.d.ts +98 -99
- package/api/users.d.ts +497 -498
- package/command.d.ts +1 -1
- package/core.d.ts +90 -63
- package/datetime.d.ts +3 -28
- package/devtools.d.ts +166 -322
- package/email.d.ts +4 -4
- package/logger.d.ts +5 -6
- package/package.json +50 -57
- package/postgres.d.ts +23 -26
- package/react/form.d.ts +4 -1
- package/react.d.ts +31 -29
- package/redis.d.ts +10 -10
- package/security.d.ts +4 -4
- package/server/health.d.ts +17 -18
- package/server.d.ts +20 -20
- package/vite.d.ts +2 -2
- package/ui.cjs +0 -8
- package/ui.d.ts +0 -786
- package/ui.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alepha",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -15,56 +15,55 @@
|
|
|
15
15
|
"main": "./core.js",
|
|
16
16
|
"types": "./core.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alepha/api-files": "0.11.
|
|
19
|
-
"@alepha/api-jobs": "0.11.
|
|
20
|
-
"@alepha/api-notifications": "0.11.
|
|
21
|
-
"@alepha/api-users": "0.11.
|
|
22
|
-
"@alepha/api-verifications": "0.11.
|
|
23
|
-
"@alepha/batch": "0.11.
|
|
24
|
-
"@alepha/bucket": "0.11.
|
|
25
|
-
"@alepha/cache": "0.11.
|
|
26
|
-
"@alepha/cache-redis": "0.11.
|
|
27
|
-
"@alepha/command": "0.11.
|
|
28
|
-
"@alepha/core": "0.11.
|
|
29
|
-
"@alepha/datetime": "0.11.
|
|
30
|
-
"@alepha/devtools": "0.11.
|
|
31
|
-
"@alepha/email": "0.11.
|
|
32
|
-
"@alepha/fake": "0.11.
|
|
33
|
-
"@alepha/file": "0.11.
|
|
34
|
-
"@alepha/lock": "0.11.
|
|
35
|
-
"@alepha/lock-redis": "0.11.
|
|
36
|
-
"@alepha/logger": "0.11.
|
|
37
|
-
"@alepha/postgres": "0.11.
|
|
38
|
-
"@alepha/queue": "0.11.
|
|
39
|
-
"@alepha/queue-redis": "0.11.
|
|
40
|
-
"@alepha/react": "0.11.
|
|
41
|
-
"@alepha/react-auth": "0.11.
|
|
42
|
-
"@alepha/react-form": "0.11.
|
|
43
|
-
"@alepha/react-head": "0.11.
|
|
44
|
-
"@alepha/react-i18n": "0.11.
|
|
45
|
-
"@alepha/redis": "0.11.
|
|
46
|
-
"@alepha/retry": "0.11.
|
|
47
|
-
"@alepha/router": "0.11.
|
|
48
|
-
"@alepha/scheduler": "0.11.
|
|
49
|
-
"@alepha/security": "0.11.
|
|
50
|
-
"@alepha/server": "0.11.
|
|
51
|
-
"@alepha/server-cache": "0.11.
|
|
52
|
-
"@alepha/server-compress": "0.11.
|
|
53
|
-
"@alepha/server-cookies": "0.11.
|
|
54
|
-
"@alepha/server-cors": "0.11.
|
|
55
|
-
"@alepha/server-health": "0.11.
|
|
56
|
-
"@alepha/server-helmet": "0.11.
|
|
57
|
-
"@alepha/server-links": "0.11.
|
|
58
|
-
"@alepha/server-metrics": "0.11.
|
|
59
|
-
"@alepha/server-multipart": "0.11.
|
|
60
|
-
"@alepha/server-proxy": "0.11.
|
|
61
|
-
"@alepha/server-security": "0.11.
|
|
62
|
-
"@alepha/server-static": "0.11.
|
|
63
|
-
"@alepha/server-swagger": "0.11.
|
|
64
|
-
"@alepha/topic": "0.11.
|
|
65
|
-
"@alepha/topic-redis": "0.11.
|
|
66
|
-
"@alepha/
|
|
67
|
-
"@alepha/vite": "0.11.6",
|
|
18
|
+
"@alepha/api-files": "0.11.9",
|
|
19
|
+
"@alepha/api-jobs": "0.11.9",
|
|
20
|
+
"@alepha/api-notifications": "0.11.9",
|
|
21
|
+
"@alepha/api-users": "0.11.9",
|
|
22
|
+
"@alepha/api-verifications": "0.11.9",
|
|
23
|
+
"@alepha/batch": "0.11.9",
|
|
24
|
+
"@alepha/bucket": "0.11.9",
|
|
25
|
+
"@alepha/cache": "0.11.9",
|
|
26
|
+
"@alepha/cache-redis": "0.11.9",
|
|
27
|
+
"@alepha/command": "0.11.9",
|
|
28
|
+
"@alepha/core": "0.11.9",
|
|
29
|
+
"@alepha/datetime": "0.11.9",
|
|
30
|
+
"@alepha/devtools": "0.11.9",
|
|
31
|
+
"@alepha/email": "0.11.9",
|
|
32
|
+
"@alepha/fake": "0.11.9",
|
|
33
|
+
"@alepha/file": "0.11.9",
|
|
34
|
+
"@alepha/lock": "0.11.9",
|
|
35
|
+
"@alepha/lock-redis": "0.11.9",
|
|
36
|
+
"@alepha/logger": "0.11.9",
|
|
37
|
+
"@alepha/postgres": "0.11.9",
|
|
38
|
+
"@alepha/queue": "0.11.9",
|
|
39
|
+
"@alepha/queue-redis": "0.11.9",
|
|
40
|
+
"@alepha/react": "0.11.9",
|
|
41
|
+
"@alepha/react-auth": "0.11.9",
|
|
42
|
+
"@alepha/react-form": "0.11.9",
|
|
43
|
+
"@alepha/react-head": "0.11.9",
|
|
44
|
+
"@alepha/react-i18n": "0.11.9",
|
|
45
|
+
"@alepha/redis": "0.11.9",
|
|
46
|
+
"@alepha/retry": "0.11.9",
|
|
47
|
+
"@alepha/router": "0.11.9",
|
|
48
|
+
"@alepha/scheduler": "0.11.9",
|
|
49
|
+
"@alepha/security": "0.11.9",
|
|
50
|
+
"@alepha/server": "0.11.9",
|
|
51
|
+
"@alepha/server-cache": "0.11.9",
|
|
52
|
+
"@alepha/server-compress": "0.11.9",
|
|
53
|
+
"@alepha/server-cookies": "0.11.9",
|
|
54
|
+
"@alepha/server-cors": "0.11.9",
|
|
55
|
+
"@alepha/server-health": "0.11.9",
|
|
56
|
+
"@alepha/server-helmet": "0.11.9",
|
|
57
|
+
"@alepha/server-links": "0.11.9",
|
|
58
|
+
"@alepha/server-metrics": "0.11.9",
|
|
59
|
+
"@alepha/server-multipart": "0.11.9",
|
|
60
|
+
"@alepha/server-proxy": "0.11.9",
|
|
61
|
+
"@alepha/server-security": "0.11.9",
|
|
62
|
+
"@alepha/server-static": "0.11.9",
|
|
63
|
+
"@alepha/server-swagger": "0.11.9",
|
|
64
|
+
"@alepha/topic": "0.11.9",
|
|
65
|
+
"@alepha/topic-redis": "0.11.9",
|
|
66
|
+
"@alepha/vite": "0.11.9",
|
|
68
67
|
"react": "^19.2.0",
|
|
69
68
|
"react-dom": "^19.2.0"
|
|
70
69
|
},
|
|
@@ -322,11 +321,6 @@
|
|
|
322
321
|
"require": "./topic/redis.cjs",
|
|
323
322
|
"types": "./topic/redis.d.ts"
|
|
324
323
|
},
|
|
325
|
-
"./ui": {
|
|
326
|
-
"import": "./ui.js",
|
|
327
|
-
"require": "./ui.cjs",
|
|
328
|
-
"types": "./ui.d.ts"
|
|
329
|
-
},
|
|
330
324
|
"./vite": {
|
|
331
325
|
"import": "./vite.js",
|
|
332
326
|
"require": "./vite.cjs",
|
|
@@ -383,7 +377,6 @@
|
|
|
383
377
|
"server-swagger",
|
|
384
378
|
"topic",
|
|
385
379
|
"topic-redis",
|
|
386
|
-
"ui",
|
|
387
380
|
"vite"
|
|
388
381
|
]
|
|
389
382
|
}
|
package/postgres.d.ts
CHANGED
|
@@ -14,9 +14,8 @@ import { SQLiteColumnBuilderBase } from "drizzle-orm/sqlite-core";
|
|
|
14
14
|
import * as _alepha_retry0 from "alepha/retry";
|
|
15
15
|
import { DatabaseSync } from "node:sqlite";
|
|
16
16
|
import { PgTransactionConfig } from "drizzle-orm/pg-core/session";
|
|
17
|
-
import * as
|
|
17
|
+
import * as typebox2 from "typebox";
|
|
18
18
|
import * as DrizzleKit from "drizzle-kit/api";
|
|
19
|
-
import * as dayjs0 from "dayjs";
|
|
20
19
|
import { UpdateDeleteAction as UpdateDeleteAction$1 } from "drizzle-orm/pg-core/foreign-keys";
|
|
21
20
|
export * from "drizzle-orm/pg-core";
|
|
22
21
|
|
|
@@ -904,11 +903,11 @@ declare class DrizzleKitProvider {
|
|
|
904
903
|
*/
|
|
905
904
|
protected importDrizzleKit(): typeof DrizzleKit;
|
|
906
905
|
}
|
|
907
|
-
declare const devMigrationsSchema:
|
|
908
|
-
id:
|
|
909
|
-
name:
|
|
910
|
-
snapshot:
|
|
911
|
-
created_at:
|
|
906
|
+
declare const devMigrationsSchema: typebox2.TObject<{
|
|
907
|
+
id: typebox2.TNumber;
|
|
908
|
+
name: typebox2.TString;
|
|
909
|
+
snapshot: typebox2.TString;
|
|
910
|
+
created_at: typebox2.TString;
|
|
912
911
|
}>;
|
|
913
912
|
type DevMigrations = Static<typeof devMigrationsSchema>;
|
|
914
913
|
//#endregion
|
|
@@ -921,6 +920,7 @@ declare abstract class DatabaseProvider {
|
|
|
921
920
|
protected abstract readonly kit: DrizzleKitProvider;
|
|
922
921
|
abstract readonly db: PgDatabase<any>;
|
|
923
922
|
abstract readonly dialect: "postgresql" | "sqlite";
|
|
923
|
+
abstract readonly url: string;
|
|
924
924
|
readonly enums: Map<string, unknown>;
|
|
925
925
|
readonly tables: Map<string, unknown>;
|
|
926
926
|
readonly sequences: Map<string, unknown>;
|
|
@@ -1302,7 +1302,6 @@ declare abstract class Repository<T extends TObject> {
|
|
|
1302
1302
|
* - validate entity against schema
|
|
1303
1303
|
* - undefined values will be set to null, not ignored!
|
|
1304
1304
|
*
|
|
1305
|
-
* @see {@link PostgresTypeProvider#version}
|
|
1306
1305
|
* @see {@link PgVersionMismatchError}
|
|
1307
1306
|
*/
|
|
1308
1307
|
save(entity: Static<T>, opts?: StatementOptions): Promise<void>;
|
|
@@ -1358,11 +1357,6 @@ declare abstract class Repository<T extends TObject> {
|
|
|
1358
1357
|
protected cast(data: any, insert: boolean): PgInsertValue<PgTableWithColumns<SchemaToTableConfig<T>>>;
|
|
1359
1358
|
/**
|
|
1360
1359
|
* Transform a row from the database into a clean entity.
|
|
1361
|
-
*
|
|
1362
|
-
* - Validate against schema
|
|
1363
|
-
* - Replace all null values by undefined
|
|
1364
|
-
* - Fix date-time and date fields to ISO strings
|
|
1365
|
-
* - Cast BigInt to string
|
|
1366
1360
|
*/
|
|
1367
1361
|
protected clean<T extends TObject>(row: Record<string, unknown>, schema: T): Static<T>;
|
|
1368
1362
|
/**
|
|
@@ -1411,7 +1405,7 @@ interface StatementOptions {
|
|
|
1411
1405
|
/**
|
|
1412
1406
|
* Force the current time.
|
|
1413
1407
|
*/
|
|
1414
|
-
now?: DateTime;
|
|
1408
|
+
now?: DateTime | string;
|
|
1415
1409
|
}
|
|
1416
1410
|
//#endregion
|
|
1417
1411
|
//#region src/descriptors/$repository.d.ts
|
|
@@ -1697,10 +1691,12 @@ declare class NodePostgresProvider extends DatabaseProvider {
|
|
|
1697
1691
|
protected client?: postgres.Sql;
|
|
1698
1692
|
protected pg?: PostgresJsDatabase;
|
|
1699
1693
|
readonly dialect = "postgresql";
|
|
1694
|
+
get name(): string;
|
|
1700
1695
|
/**
|
|
1701
1696
|
* In testing mode, the schema name will be generated and deleted after the test.
|
|
1702
1697
|
*/
|
|
1703
1698
|
protected schemaForTesting: string | undefined;
|
|
1699
|
+
get url(): string;
|
|
1704
1700
|
/**
|
|
1705
1701
|
* Execute a SQL statement.
|
|
1706
1702
|
*/
|
|
@@ -1825,10 +1821,10 @@ declare class SqliteModelBuilder extends ModelBuilder {
|
|
|
1825
1821
|
name: string;
|
|
1826
1822
|
dataType: "custom";
|
|
1827
1823
|
columnType: "SQLiteCustomColumn";
|
|
1828
|
-
data:
|
|
1824
|
+
data: typebox2.StaticType<[], "Decode", {}, {}, TDocument>;
|
|
1829
1825
|
driverParam: string;
|
|
1830
1826
|
enumValues: undefined;
|
|
1831
|
-
}>,
|
|
1827
|
+
}>, typebox2.StaticType<[], "Decode", {}, {}, TDocument>>;
|
|
1832
1828
|
sqliteDateTime: {
|
|
1833
1829
|
<TConfig extends Record<string, any>>(fieldConfig: TConfig): pg$1.SQLiteCustomColumnBuilder<{
|
|
1834
1830
|
name: "";
|
|
@@ -1890,8 +1886,8 @@ type SchemaToSqliteBuilder<T extends TObject> = { [key in keyof T["properties"]]
|
|
|
1890
1886
|
/**
|
|
1891
1887
|
* Configuration options for the Node.js SQLite database provider.
|
|
1892
1888
|
*/
|
|
1893
|
-
declare const nodeSqliteOptions: _alepha_core10.Atom<
|
|
1894
|
-
path:
|
|
1889
|
+
declare const nodeSqliteOptions: _alepha_core10.Atom<typebox2.TObject<{
|
|
1890
|
+
path: typebox2.TOptional<typebox2.TString>;
|
|
1895
1891
|
}>, "alepha.postgres.node-sqlite.options">;
|
|
1896
1892
|
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
1897
1893
|
declare module "alepha" {
|
|
@@ -1916,8 +1912,9 @@ declare class NodeSqliteProvider extends DatabaseProvider {
|
|
|
1916
1912
|
path?: string | undefined;
|
|
1917
1913
|
}>;
|
|
1918
1914
|
protected sqlite: DatabaseSync;
|
|
1915
|
+
get name(): string;
|
|
1919
1916
|
readonly dialect = "sqlite";
|
|
1920
|
-
get
|
|
1917
|
+
get url(): string;
|
|
1921
1918
|
execute(query: SQLLike): Promise<Array<Record<string, unknown>>>;
|
|
1922
1919
|
readonly db: PgDatabase<any>;
|
|
1923
1920
|
protected readonly onStart: _alepha_core10.HookDescriptor<"start">;
|
|
@@ -1969,17 +1966,17 @@ declare class PostgresTypeProvider {
|
|
|
1969
1966
|
/**
|
|
1970
1967
|
* Creates a column Created At. So just a datetime column with a default value of the current timestamp.
|
|
1971
1968
|
*/
|
|
1972
|
-
readonly createdAt: (options?: TStringOptions) => PgAttr<PgAttr<
|
|
1969
|
+
readonly createdAt: (options?: TStringOptions) => PgAttr<PgAttr<TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1973
1970
|
/**
|
|
1974
1971
|
* Creates a column Updated At. Like createdAt, but it is updated on every update of the row.
|
|
1975
1972
|
*/
|
|
1976
|
-
readonly updatedAt: (options?: TStringOptions) => PgAttr<PgAttr<
|
|
1973
|
+
readonly updatedAt: (options?: TStringOptions) => PgAttr<PgAttr<TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1977
1974
|
/**
|
|
1978
1975
|
* Creates a column Deleted At for soft delete functionality.
|
|
1979
1976
|
* This is used to mark rows as deleted without actually removing them from the database.
|
|
1980
1977
|
* The column is nullable - NULL means not deleted, timestamp means deleted.
|
|
1981
1978
|
*/
|
|
1982
|
-
readonly deletedAt: (options?: TStringOptions) => PgAttr<
|
|
1979
|
+
readonly deletedAt: (options?: TStringOptions) => PgAttr<typebox2.TOptional<TString>, typeof PG_DELETED_AT>;
|
|
1983
1980
|
/**
|
|
1984
1981
|
* Creates a Postgres ENUM type.
|
|
1985
1982
|
*
|
|
@@ -2011,7 +2008,7 @@ declare const pg: PostgresTypeProvider;
|
|
|
2011
2008
|
declare class RepositoryProvider {
|
|
2012
2009
|
protected readonly alepha: Alepha;
|
|
2013
2010
|
protected readonly registry: Map<EntityDescriptor<any>, Service<Repository<any>>>;
|
|
2014
|
-
getRepositories(provider?: DatabaseProvider): Repository<TObject<
|
|
2011
|
+
getRepositories(provider?: DatabaseProvider): Repository<TObject<typebox2.TProperties>>[];
|
|
2015
2012
|
createClassRepository<T extends TObject>(entity: EntityDescriptor<T>): Service<Repository<T>>;
|
|
2016
2013
|
}
|
|
2017
2014
|
//#endregion
|
|
@@ -2019,7 +2016,7 @@ declare class RepositoryProvider {
|
|
|
2019
2016
|
/**
|
|
2020
2017
|
* @deprecated Use `pg.primaryKey()` instead.
|
|
2021
2018
|
*/
|
|
2022
|
-
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<
|
|
2019
|
+
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<typebox2.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
|
|
2023
2020
|
//#endregion
|
|
2024
2021
|
//#region src/types/schema.d.ts
|
|
2025
2022
|
/**
|
|
@@ -2029,10 +2026,10 @@ declare const schema: <TDocument extends TSchema>(name: string, document: TDocum
|
|
|
2029
2026
|
name: string;
|
|
2030
2027
|
dataType: "custom";
|
|
2031
2028
|
columnType: "PgCustomColumn";
|
|
2032
|
-
data:
|
|
2029
|
+
data: typebox2.StaticType<[], "Decode", {}, {}, TDocument>;
|
|
2033
2030
|
driverParam: string;
|
|
2034
2031
|
enumValues: undefined;
|
|
2035
|
-
}>,
|
|
2032
|
+
}>, typebox2.StaticType<[], "Decode", {}, {}, TDocument>>;
|
|
2036
2033
|
//#endregion
|
|
2037
2034
|
//#region src/index.d.ts
|
|
2038
2035
|
declare module "alepha" {
|
package/react/form.d.ts
CHANGED
|
@@ -19,7 +19,9 @@ declare class FormModel<T extends TObject> {
|
|
|
19
19
|
protected readonly log: _alepha_logger0.Logger;
|
|
20
20
|
protected readonly alepha: Alepha;
|
|
21
21
|
protected readonly values: Record<string, any>;
|
|
22
|
+
protected submitInProgress: boolean;
|
|
22
23
|
input: SchemaToInput<T>;
|
|
24
|
+
get submitting(): boolean;
|
|
23
25
|
constructor(id: string, options: FormCtrlOptions<T>);
|
|
24
26
|
get element(): HTMLFormElement;
|
|
25
27
|
get currentValues(): Record<string, any>;
|
|
@@ -69,7 +71,7 @@ interface InputField {
|
|
|
69
71
|
set: (value: any) => void;
|
|
70
72
|
form: FormModel<any>;
|
|
71
73
|
}
|
|
72
|
-
type InputHTMLAttributesLike = Pick<InputHTMLAttributes<unknown>, "id" | "name" | "type" | "value" | "defaultValue" | "required" | "maxLength" | "minLength" | "aria-label"> & {
|
|
74
|
+
type InputHTMLAttributesLike = Pick<InputHTMLAttributes<unknown>, "id" | "name" | "type" | "value" | "defaultValue" | "required" | "maxLength" | "minLength" | "aria-label" | "autoComplete"> & {
|
|
73
75
|
value?: any;
|
|
74
76
|
defaultValue?: any;
|
|
75
77
|
onChange?: (event: any) => void;
|
|
@@ -170,6 +172,7 @@ declare module "alepha" {
|
|
|
170
172
|
"form:change": {
|
|
171
173
|
id: string;
|
|
172
174
|
path: string;
|
|
175
|
+
value: any;
|
|
173
176
|
};
|
|
174
177
|
"form:reset": {
|
|
175
178
|
id: string;
|
package/react.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Alepha, Async, Descriptor, Hook, Hooks, KIND, Service, State, Static, TObject, TSchema } from "alepha";
|
|
1
|
+
import * as _alepha_core20 from "alepha";
|
|
2
|
+
import { Alepha, Async, Atom, Descriptor, Hook, Hooks, KIND, Service, State, Static, TAtomObject, TObject, TSchema } from "alepha";
|
|
3
3
|
import { DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
4
4
|
import { RequestConfigSchema, ServerHandler, ServerProvider, ServerRequest, ServerRouterProvider, ServerTimingProvider } from "alepha/server";
|
|
5
5
|
import { ServerRouteCache } from "alepha/server/cache";
|
|
6
6
|
import { ClientScope, HttpVirtualClient, LinkProvider, VirtualAction } from "alepha/server/links";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _alepha_logger1 from "alepha/logger";
|
|
8
8
|
import * as react0 from "react";
|
|
9
9
|
import React, { AnchorHTMLAttributes, CSSProperties, DependencyList, ErrorInfo, FC, PropsWithChildren, ReactNode } from "react";
|
|
10
10
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -41,14 +41,14 @@ declare class Redirection extends Error {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/providers/ReactPageProvider.d.ts
|
|
44
|
-
declare const envSchema$2:
|
|
45
|
-
REACT_STRICT_MODE:
|
|
44
|
+
declare const envSchema$2: _alepha_core20.TObject<{
|
|
45
|
+
REACT_STRICT_MODE: _alepha_core20.TBoolean;
|
|
46
46
|
}>;
|
|
47
47
|
declare module "alepha" {
|
|
48
48
|
interface Env extends Partial<Static<typeof envSchema$2>> {}
|
|
49
49
|
}
|
|
50
50
|
declare class ReactPageProvider {
|
|
51
|
-
protected readonly log:
|
|
51
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
52
52
|
protected readonly env: {
|
|
53
53
|
REACT_STRICT_MODE: boolean;
|
|
54
54
|
};
|
|
@@ -85,7 +85,7 @@ declare class ReactPageProvider {
|
|
|
85
85
|
}, params?: Record<string, any>): string;
|
|
86
86
|
compile(path: string, params?: Record<string, string>): string;
|
|
87
87
|
protected renderView(index: number, path: string, view: ReactNode | undefined, page: PageRoute): ReactNode;
|
|
88
|
-
protected readonly configure:
|
|
88
|
+
protected readonly configure: _alepha_core20.HookDescriptor<"configure">;
|
|
89
89
|
protected map(pages: Array<PageDescriptor>, target: PageDescriptor): PageRouteEntry;
|
|
90
90
|
add(entry: PageRouteEntry): void;
|
|
91
91
|
protected createMatch(page: PageRoute): string;
|
|
@@ -499,18 +499,18 @@ interface BrowserRoute extends Route {
|
|
|
499
499
|
page: PageRoute;
|
|
500
500
|
}
|
|
501
501
|
declare class ReactBrowserRouterProvider extends RouterProvider<BrowserRoute> {
|
|
502
|
-
protected readonly log:
|
|
502
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
503
503
|
protected readonly alepha: Alepha;
|
|
504
504
|
protected readonly pageApi: ReactPageProvider;
|
|
505
505
|
add(entry: PageRouteEntry): void;
|
|
506
|
-
protected readonly configure:
|
|
506
|
+
protected readonly configure: _alepha_core20.HookDescriptor<"configure">;
|
|
507
507
|
transition(url: URL, previous?: PreviousLayerData[], meta?: {}): Promise<string | void>;
|
|
508
508
|
root(state: ReactRouterState): ReactNode;
|
|
509
509
|
}
|
|
510
510
|
//#endregion
|
|
511
511
|
//#region src/providers/ReactBrowserProvider.d.ts
|
|
512
|
-
declare const envSchema$1:
|
|
513
|
-
REACT_ROOT_ID:
|
|
512
|
+
declare const envSchema$1: _alepha_core20.TObject<{
|
|
513
|
+
REACT_ROOT_ID: _alepha_core20.TString;
|
|
514
514
|
}>;
|
|
515
515
|
declare module "alepha" {
|
|
516
516
|
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
@@ -518,7 +518,7 @@ declare module "alepha" {
|
|
|
518
518
|
/**
|
|
519
519
|
* React browser renderer configuration atom
|
|
520
520
|
*/
|
|
521
|
-
declare const reactBrowserOptions:
|
|
521
|
+
declare const reactBrowserOptions: _alepha_core20.Atom<_alepha_core20.TObject<{
|
|
522
522
|
scrollRestoration: typebox0.TUnsafe<"top" | "manual">;
|
|
523
523
|
}>, "alepha.react.browser.options">;
|
|
524
524
|
type ReactBrowserRendererOptions = Static<typeof reactBrowserOptions.schema>;
|
|
@@ -531,7 +531,7 @@ declare class ReactBrowserProvider {
|
|
|
531
531
|
protected readonly env: {
|
|
532
532
|
REACT_ROOT_ID: string;
|
|
533
533
|
};
|
|
534
|
-
protected readonly log:
|
|
534
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
535
535
|
protected readonly client: LinkProvider;
|
|
536
536
|
protected readonly alepha: Alepha;
|
|
537
537
|
protected readonly router: ReactBrowserRouterProvider;
|
|
@@ -567,8 +567,8 @@ declare class ReactBrowserProvider {
|
|
|
567
567
|
* Get embedded layers from the server.
|
|
568
568
|
*/
|
|
569
569
|
protected getHydrationState(): ReactHydrationState | undefined;
|
|
570
|
-
protected readonly onTransitionEnd:
|
|
571
|
-
readonly ready:
|
|
570
|
+
protected readonly onTransitionEnd: _alepha_core20.HookDescriptor<"react:transition:end">;
|
|
571
|
+
readonly ready: _alepha_core20.HookDescriptor<"ready">;
|
|
572
572
|
}
|
|
573
573
|
interface RouterGoOptions {
|
|
574
574
|
replace?: boolean;
|
|
@@ -1064,13 +1064,15 @@ declare const ssrSchemaLoading: (alepha: Alepha, name: string) => RequestConfigS
|
|
|
1064
1064
|
/**
|
|
1065
1065
|
* Hook to access and mutate the Alepha state.
|
|
1066
1066
|
*/
|
|
1067
|
-
declare
|
|
1067
|
+
declare function useStore<T$1 extends TAtomObject>(target: Atom<T$1>, defaultValue?: Static<T$1>): UseStoreReturn<Static<T$1>>;
|
|
1068
|
+
declare function useStore<Key extends keyof State>(target: Key, defaultValue?: State[Key]): UseStoreReturn<State[Key]>;
|
|
1069
|
+
type UseStoreReturn<T$1> = [T$1, (value: T$1) => void];
|
|
1068
1070
|
//#endregion
|
|
1069
1071
|
//#region src/providers/ReactServerProvider.d.ts
|
|
1070
|
-
declare const envSchema:
|
|
1071
|
-
REACT_SSR_ENABLED:
|
|
1072
|
-
REACT_ROOT_ID:
|
|
1073
|
-
REACT_SERVER_TEMPLATE:
|
|
1072
|
+
declare const envSchema: _alepha_core20.TObject<{
|
|
1073
|
+
REACT_SSR_ENABLED: _alepha_core20.TOptional<_alepha_core20.TBoolean>;
|
|
1074
|
+
REACT_ROOT_ID: _alepha_core20.TString;
|
|
1075
|
+
REACT_SERVER_TEMPLATE: _alepha_core20.TOptional<_alepha_core20.TString>;
|
|
1074
1076
|
}>;
|
|
1075
1077
|
declare module "alepha" {
|
|
1076
1078
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -1081,11 +1083,11 @@ declare module "alepha" {
|
|
|
1081
1083
|
/**
|
|
1082
1084
|
* React server provider configuration atom
|
|
1083
1085
|
*/
|
|
1084
|
-
declare const reactServerOptions:
|
|
1085
|
-
publicDir:
|
|
1086
|
-
staticServer:
|
|
1087
|
-
disabled:
|
|
1088
|
-
path:
|
|
1086
|
+
declare const reactServerOptions: _alepha_core20.Atom<_alepha_core20.TObject<{
|
|
1087
|
+
publicDir: _alepha_core20.TString;
|
|
1088
|
+
staticServer: _alepha_core20.TObject<{
|
|
1089
|
+
disabled: _alepha_core20.TBoolean;
|
|
1090
|
+
path: _alepha_core20.TString;
|
|
1089
1091
|
}>;
|
|
1090
1092
|
}>, "alepha.react.server.options">;
|
|
1091
1093
|
type ReactServerProviderOptions = Static<typeof reactServerOptions.schema>;
|
|
@@ -1095,7 +1097,7 @@ declare module "alepha" {
|
|
|
1095
1097
|
}
|
|
1096
1098
|
}
|
|
1097
1099
|
declare class ReactServerProvider {
|
|
1098
|
-
protected readonly log:
|
|
1100
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
1099
1101
|
protected readonly alepha: Alepha;
|
|
1100
1102
|
protected readonly env: {
|
|
1101
1103
|
REACT_SSR_ENABLED?: boolean | undefined;
|
|
@@ -1119,7 +1121,7 @@ declare class ReactServerProvider {
|
|
|
1119
1121
|
/**
|
|
1120
1122
|
* Configure the React server provider.
|
|
1121
1123
|
*/
|
|
1122
|
-
readonly onConfigure:
|
|
1124
|
+
readonly onConfigure: _alepha_core20.HookDescriptor<"configure">;
|
|
1123
1125
|
get template(): string;
|
|
1124
1126
|
protected registerPages(templateLoader: TemplateLoader): Promise<void>;
|
|
1125
1127
|
/**
|
|
@@ -1255,7 +1257,7 @@ declare module "alepha" {
|
|
|
1255
1257
|
* @see {@link $page}
|
|
1256
1258
|
* @module alepha.react
|
|
1257
1259
|
*/
|
|
1258
|
-
declare const AlephaReact:
|
|
1260
|
+
declare const AlephaReact: _alepha_core20.Service<_alepha_core20.Module>;
|
|
1259
1261
|
//#endregion
|
|
1260
|
-
export { $page, ActionContext, AlephaContext, AlephaReact, AnchorProps, ClientOnly, CreateLayersResult, ErrorBoundary, ErrorHandler, ErrorViewer, Layer, Link, type LinkProps, _default as NestedView, NotFoundPage as NotFound, PageAnimation, PageConfigSchema, PageDescriptor, PageDescriptorOptions, PageDescriptorRenderOptions, PageDescriptorRenderResult, PageRequestConfig, PageResolve, PageRoute, PageRouteEntry, PreviousLayerData, ReactBrowserProvider, ReactBrowserRendererOptions, ReactHydrationState, ReactPageProvider, ReactRouter, ReactRouterState, ReactServerProvider, ReactServerProviderOptions, Redirection, RouterGoOptions, RouterLayerContext, RouterLayerContextValue, RouterRenderOptions, RouterStackItem, TPropsDefault, TPropsParentDefault, TransitionOptions, UseActionOptions, UseActionReturn, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, UseSchemaReturn, VirtualRouter, isPageRoute, reactBrowserOptions, reactServerOptions, ssrSchemaLoading, useAction, useActive, useAlepha, useClient, useEvents, useInject, useQueryParams, useRouter, useRouterState, useSchema, useStore };
|
|
1262
|
+
export { $page, ActionContext, AlephaContext, AlephaReact, AnchorProps, ClientOnly, CreateLayersResult, ErrorBoundary, ErrorHandler, ErrorViewer, Layer, Link, type LinkProps, _default as NestedView, NotFoundPage as NotFound, PageAnimation, PageConfigSchema, PageDescriptor, PageDescriptorOptions, PageDescriptorRenderOptions, PageDescriptorRenderResult, PageRequestConfig, PageResolve, PageRoute, PageRouteEntry, PreviousLayerData, ReactBrowserProvider, ReactBrowserRendererOptions, ReactHydrationState, ReactPageProvider, ReactRouter, ReactRouterState, ReactServerProvider, ReactServerProviderOptions, Redirection, RouterGoOptions, RouterLayerContext, RouterLayerContextValue, RouterRenderOptions, RouterStackItem, TPropsDefault, TPropsParentDefault, TransitionOptions, UseActionOptions, UseActionReturn, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, UseSchemaReturn, UseStoreReturn, VirtualRouter, isPageRoute, reactBrowserOptions, reactServerOptions, ssrSchemaLoading, useAction, useActive, useAlepha, useClient, useEvents, useInject, useQueryParams, useRouter, useRouterState, useSchema, useStore };
|
|
1261
1263
|
//# sourceMappingURL=index.d.ts.map
|
package/redis.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core3 from "alepha";
|
|
2
2
|
import { Alepha, Static } from "alepha";
|
|
3
3
|
import * as _alepha_logger0 from "alepha/logger";
|
|
4
4
|
import { RedisClientType, SetOptions, createClient } from "@redis/client";
|
|
5
5
|
|
|
6
6
|
//#region src/providers/RedisProvider.d.ts
|
|
7
|
-
declare const envSchema:
|
|
8
|
-
REDIS_PORT:
|
|
9
|
-
REDIS_HOST:
|
|
10
|
-
REDIS_PASSWORD:
|
|
7
|
+
declare const envSchema: _alepha_core3.TObject<{
|
|
8
|
+
REDIS_PORT: _alepha_core3.TInteger;
|
|
9
|
+
REDIS_HOST: _alepha_core3.TString;
|
|
10
|
+
REDIS_PASSWORD: _alepha_core3.TOptional<_alepha_core3.TString>;
|
|
11
11
|
}>;
|
|
12
12
|
declare module "alepha" {
|
|
13
13
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -30,8 +30,8 @@ declare class RedisProvider {
|
|
|
30
30
|
};
|
|
31
31
|
protected readonly client: RedisClient;
|
|
32
32
|
get publisher(): RedisClient;
|
|
33
|
-
protected readonly start:
|
|
34
|
-
protected readonly stop:
|
|
33
|
+
protected readonly start: _alepha_core3.HookDescriptor<"start">;
|
|
34
|
+
protected readonly stop: _alepha_core3.HookDescriptor<"stop">;
|
|
35
35
|
/**
|
|
36
36
|
* Connect to the Redis server.
|
|
37
37
|
*/
|
|
@@ -59,8 +59,8 @@ declare class RedisSubscriberProvider {
|
|
|
59
59
|
protected readonly redisProvider: RedisProvider;
|
|
60
60
|
protected readonly client: RedisClient;
|
|
61
61
|
get subscriber(): RedisClient;
|
|
62
|
-
protected readonly start:
|
|
63
|
-
protected readonly stop:
|
|
62
|
+
protected readonly start: _alepha_core3.HookDescriptor<"start">;
|
|
63
|
+
protected readonly stop: _alepha_core3.HookDescriptor<"stop">;
|
|
64
64
|
connect(): Promise<void>;
|
|
65
65
|
close(): Promise<void>;
|
|
66
66
|
/**
|
|
@@ -76,7 +76,7 @@ declare class RedisSubscriberProvider {
|
|
|
76
76
|
* @see {@link RedisProvider}
|
|
77
77
|
* @module alepha.redis
|
|
78
78
|
*/
|
|
79
|
-
declare const AlephaRedis:
|
|
79
|
+
declare const AlephaRedis: _alepha_core3.Service<_alepha_core3.Module>;
|
|
80
80
|
//#endregion
|
|
81
81
|
export { AlephaRedis, RedisClient, RedisClientOptions, RedisProvider, RedisSetOptions, RedisSubscriberProvider };
|
|
82
82
|
//# sourceMappingURL=index.d.ts.map
|
package/security.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import { Alepha, Descriptor, KIND, Static } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
4
4
|
import { DateTimeProvider, Duration, DurationLike } from "alepha/datetime";
|
|
5
5
|
import { CryptoKey, FlattenedJWSInput, JSONWebKeySet, JWSHeaderParameters, JWTHeaderParameters, JWTPayload, JWTVerifyResult, KeyObject } from "jose";
|
|
6
6
|
import * as typebox0 from "typebox";
|
|
@@ -68,7 +68,7 @@ type Role = Static<typeof roleSchema>;
|
|
|
68
68
|
* Provides utilities for working with JSON Web Tokens (JWT).
|
|
69
69
|
*/
|
|
70
70
|
declare class JwtProvider {
|
|
71
|
-
protected readonly log:
|
|
71
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
72
72
|
protected readonly keystore: KeyLoaderHolder[];
|
|
73
73
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
74
74
|
protected readonly encoder: TextEncoder;
|
|
@@ -141,7 +141,7 @@ declare class SecurityProvider {
|
|
|
141
141
|
protected readonly UNKNOWN_USER_NAME = "Anonymous User";
|
|
142
142
|
protected readonly PERMISSION_REGEXP: RegExp;
|
|
143
143
|
protected readonly PERMISSION_REGEXP_WILDCARD: RegExp;
|
|
144
|
-
protected readonly log:
|
|
144
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
145
145
|
protected readonly jwt: JwtProvider;
|
|
146
146
|
protected readonly env: {
|
|
147
147
|
APP_SECRET: string;
|
|
@@ -400,7 +400,7 @@ declare class RealmDescriptor extends Descriptor<RealmDescriptorOptions> {
|
|
|
400
400
|
protected readonly securityProvider: SecurityProvider;
|
|
401
401
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
402
402
|
protected readonly jwt: JwtProvider;
|
|
403
|
-
protected readonly log:
|
|
403
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
404
404
|
get name(): string;
|
|
405
405
|
get accessTokenExpiration(): Duration;
|
|
406
406
|
get refreshTokenExpiration(): Duration;
|
package/server/health.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import * as _alepha_core0 from "alepha";
|
|
|
2
2
|
import { Alepha } from "alepha";
|
|
3
3
|
import * as _alepha_server0 from "alepha/server";
|
|
4
4
|
import { DateTimeProvider } from "alepha/datetime";
|
|
5
|
-
import * as
|
|
6
|
-
import * as dayjs0 from "dayjs";
|
|
5
|
+
import * as typebox4 from "typebox";
|
|
7
6
|
|
|
8
7
|
//#region src/providers/ServerHealthProvider.d.ts
|
|
9
8
|
/**
|
|
@@ -15,35 +14,35 @@ declare class ServerHealthProvider {
|
|
|
15
14
|
protected readonly time: DateTimeProvider;
|
|
16
15
|
protected readonly alepha: Alepha;
|
|
17
16
|
readonly health: _alepha_server0.RouteDescriptor<{
|
|
18
|
-
response:
|
|
19
|
-
message:
|
|
20
|
-
uptime:
|
|
21
|
-
date:
|
|
22
|
-
ready:
|
|
17
|
+
response: typebox4.TObject<{
|
|
18
|
+
message: typebox4.TString;
|
|
19
|
+
uptime: typebox4.TNumber;
|
|
20
|
+
date: typebox4.TString;
|
|
21
|
+
ready: typebox4.TBoolean;
|
|
23
22
|
}>;
|
|
24
23
|
}>;
|
|
25
24
|
readonly healthz: _alepha_server0.RouteDescriptor<{
|
|
26
|
-
response:
|
|
27
|
-
message:
|
|
28
|
-
uptime:
|
|
29
|
-
date:
|
|
30
|
-
ready:
|
|
25
|
+
response: typebox4.TObject<{
|
|
26
|
+
message: typebox4.TString;
|
|
27
|
+
uptime: typebox4.TNumber;
|
|
28
|
+
date: typebox4.TString;
|
|
29
|
+
ready: typebox4.TBoolean;
|
|
31
30
|
}>;
|
|
32
31
|
}>;
|
|
33
32
|
protected healthCheck(): {
|
|
34
33
|
message: string;
|
|
35
34
|
uptime: number;
|
|
36
|
-
date:
|
|
35
|
+
date: string;
|
|
37
36
|
ready: boolean;
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
39
|
//#endregion
|
|
41
40
|
//#region src/schemas/healthSchema.d.ts
|
|
42
|
-
declare const healthSchema:
|
|
43
|
-
message:
|
|
44
|
-
uptime:
|
|
45
|
-
date:
|
|
46
|
-
ready:
|
|
41
|
+
declare const healthSchema: typebox4.TObject<{
|
|
42
|
+
message: typebox4.TString;
|
|
43
|
+
uptime: typebox4.TNumber;
|
|
44
|
+
date: typebox4.TString;
|
|
45
|
+
ready: typebox4.TBoolean;
|
|
47
46
|
}>;
|
|
48
47
|
//#endregion
|
|
49
48
|
//#region src/index.d.ts
|