alepha 0.11.1 → 0.11.3
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/jobs.d.ts +133 -133
- package/api/notifications.d.ts +99 -99
- package/api/users.d.ts +498 -498
- package/command.d.ts +4 -4
- package/core.d.ts +24 -23
- package/datetime.d.ts +3 -2
- package/devtools.d.ts +247 -247
- package/package.json +49 -56
- package/postgres.d.ts +23 -19
- package/react/i18n.d.ts +35 -10
- package/react.d.ts +22 -22
- package/security.d.ts +4 -4
- package/server.d.ts +21 -20
- package/ui.cjs +0 -8
- package/ui.d.ts +0 -619
- 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.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -15,55 +15,54 @@
|
|
|
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/file": "0.11.
|
|
33
|
-
"@alepha/lock": "0.11.
|
|
34
|
-
"@alepha/lock-redis": "0.11.
|
|
35
|
-
"@alepha/logger": "0.11.
|
|
36
|
-
"@alepha/postgres": "0.11.
|
|
37
|
-
"@alepha/queue": "0.11.
|
|
38
|
-
"@alepha/queue-redis": "0.11.
|
|
39
|
-
"@alepha/react": "0.11.
|
|
40
|
-
"@alepha/react-auth": "0.11.
|
|
41
|
-
"@alepha/react-form": "0.11.
|
|
42
|
-
"@alepha/react-head": "0.11.
|
|
43
|
-
"@alepha/react-i18n": "0.11.
|
|
44
|
-
"@alepha/redis": "0.11.
|
|
45
|
-
"@alepha/retry": "0.11.
|
|
46
|
-
"@alepha/router": "0.11.
|
|
47
|
-
"@alepha/scheduler": "0.11.
|
|
48
|
-
"@alepha/security": "0.11.
|
|
49
|
-
"@alepha/server": "0.11.
|
|
50
|
-
"@alepha/server-cache": "0.11.
|
|
51
|
-
"@alepha/server-compress": "0.11.
|
|
52
|
-
"@alepha/server-cookies": "0.11.
|
|
53
|
-
"@alepha/server-cors": "0.11.
|
|
54
|
-
"@alepha/server-health": "0.11.
|
|
55
|
-
"@alepha/server-helmet": "0.11.
|
|
56
|
-
"@alepha/server-links": "0.11.
|
|
57
|
-
"@alepha/server-metrics": "0.11.
|
|
58
|
-
"@alepha/server-multipart": "0.11.
|
|
59
|
-
"@alepha/server-proxy": "0.11.
|
|
60
|
-
"@alepha/server-security": "0.11.
|
|
61
|
-
"@alepha/server-static": "0.11.
|
|
62
|
-
"@alepha/server-swagger": "0.11.
|
|
63
|
-
"@alepha/topic": "0.11.
|
|
64
|
-
"@alepha/topic-redis": "0.11.
|
|
65
|
-
"@alepha/
|
|
66
|
-
"@alepha/vite": "0.11.1",
|
|
18
|
+
"@alepha/api-files": "0.11.3",
|
|
19
|
+
"@alepha/api-jobs": "0.11.3",
|
|
20
|
+
"@alepha/api-notifications": "0.11.3",
|
|
21
|
+
"@alepha/api-users": "0.11.3",
|
|
22
|
+
"@alepha/api-verifications": "0.11.3",
|
|
23
|
+
"@alepha/batch": "0.11.3",
|
|
24
|
+
"@alepha/bucket": "0.11.3",
|
|
25
|
+
"@alepha/cache": "0.11.3",
|
|
26
|
+
"@alepha/cache-redis": "0.11.3",
|
|
27
|
+
"@alepha/command": "0.11.3",
|
|
28
|
+
"@alepha/core": "0.11.3",
|
|
29
|
+
"@alepha/datetime": "0.11.3",
|
|
30
|
+
"@alepha/devtools": "0.11.3",
|
|
31
|
+
"@alepha/email": "0.11.3",
|
|
32
|
+
"@alepha/file": "0.11.3",
|
|
33
|
+
"@alepha/lock": "0.11.3",
|
|
34
|
+
"@alepha/lock-redis": "0.11.3",
|
|
35
|
+
"@alepha/logger": "0.11.3",
|
|
36
|
+
"@alepha/postgres": "0.11.3",
|
|
37
|
+
"@alepha/queue": "0.11.3",
|
|
38
|
+
"@alepha/queue-redis": "0.11.3",
|
|
39
|
+
"@alepha/react": "0.11.3",
|
|
40
|
+
"@alepha/react-auth": "0.11.3",
|
|
41
|
+
"@alepha/react-form": "0.11.3",
|
|
42
|
+
"@alepha/react-head": "0.11.3",
|
|
43
|
+
"@alepha/react-i18n": "0.11.3",
|
|
44
|
+
"@alepha/redis": "0.11.3",
|
|
45
|
+
"@alepha/retry": "0.11.3",
|
|
46
|
+
"@alepha/router": "0.11.3",
|
|
47
|
+
"@alepha/scheduler": "0.11.3",
|
|
48
|
+
"@alepha/security": "0.11.3",
|
|
49
|
+
"@alepha/server": "0.11.3",
|
|
50
|
+
"@alepha/server-cache": "0.11.3",
|
|
51
|
+
"@alepha/server-compress": "0.11.3",
|
|
52
|
+
"@alepha/server-cookies": "0.11.3",
|
|
53
|
+
"@alepha/server-cors": "0.11.3",
|
|
54
|
+
"@alepha/server-health": "0.11.3",
|
|
55
|
+
"@alepha/server-helmet": "0.11.3",
|
|
56
|
+
"@alepha/server-links": "0.11.3",
|
|
57
|
+
"@alepha/server-metrics": "0.11.3",
|
|
58
|
+
"@alepha/server-multipart": "0.11.3",
|
|
59
|
+
"@alepha/server-proxy": "0.11.3",
|
|
60
|
+
"@alepha/server-security": "0.11.3",
|
|
61
|
+
"@alepha/server-static": "0.11.3",
|
|
62
|
+
"@alepha/server-swagger": "0.11.3",
|
|
63
|
+
"@alepha/topic": "0.11.3",
|
|
64
|
+
"@alepha/topic-redis": "0.11.3",
|
|
65
|
+
"@alepha/vite": "0.11.3",
|
|
67
66
|
"react": "^19.2.0",
|
|
68
67
|
"react-dom": "^19.2.0"
|
|
69
68
|
},
|
|
@@ -316,11 +315,6 @@
|
|
|
316
315
|
"require": "./topic/redis.cjs",
|
|
317
316
|
"types": "./topic/redis.d.ts"
|
|
318
317
|
},
|
|
319
|
-
"./ui": {
|
|
320
|
-
"import": "./ui.js",
|
|
321
|
-
"require": "./ui.cjs",
|
|
322
|
-
"types": "./ui.d.ts"
|
|
323
|
-
},
|
|
324
318
|
"./vite": {
|
|
325
319
|
"import": "./vite.js",
|
|
326
320
|
"require": "./vite.cjs",
|
|
@@ -376,7 +370,6 @@
|
|
|
376
370
|
"server-swagger",
|
|
377
371
|
"topic",
|
|
378
372
|
"topic-redis",
|
|
379
|
-
"ui",
|
|
380
373
|
"vite"
|
|
381
374
|
]
|
|
382
375
|
}
|
package/postgres.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, Descriptor, DescriptorArgs, KIND, Static, StaticEncode, TArray, TBigInt, TBoolean, TInteger, TNull, TNumber, TNumberOptions, TObject, TObjectOptions, TOptional, TOptionalAdd, TRecord, TSchema, TString, TStringOptions, TUnion, TUnsafe } from "alepha";
|
|
3
3
|
import { DateTime, DateTimeProvider } from "alepha/datetime";
|
|
4
|
-
import * as _alepha_logger0 from "alepha/logger";
|
|
5
|
-
import * as _alepha_lock0 from "alepha/lock";
|
|
6
|
-
import * as _alepha_retry0 from "alepha/retry";
|
|
7
4
|
import * as drizzle_orm0 from "drizzle-orm";
|
|
8
5
|
import { BuildExtraConfigColumns, SQL, SQLWrapper, sql } from "drizzle-orm";
|
|
9
6
|
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
10
7
|
import { LockConfig, LockStrength, PgColumn, PgColumnBuilderBase, PgDatabase, PgInsertValue, PgSchema, PgSelectBase, PgSequenceOptions, PgTableExtraConfigValue, PgTableWithColumns, PgTransaction, PgTransactionConfig, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
11
|
-
import * as
|
|
8
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
9
|
+
import * as _alepha_lock0 from "alepha/lock";
|
|
10
|
+
import { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
11
|
+
import postgres from "postgres";
|
|
12
|
+
import * as _alepha_retry0 from "alepha/retry";
|
|
13
|
+
import * as typebox8 from "typebox";
|
|
12
14
|
import { PgTransactionConfig as PgTransactionConfig$1 } from "drizzle-orm/pg-core/session";
|
|
13
15
|
import * as DrizzleKit from "drizzle-kit/api";
|
|
14
16
|
import { MigrationConfig } from "drizzle-orm/migrator";
|
|
15
|
-
import { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
16
|
-
import postgres from "postgres";
|
|
17
17
|
import * as dayjs0 from "dayjs";
|
|
18
18
|
import { UpdateDeleteAction as UpdateDeleteAction$1 } from "drizzle-orm/pg-core/foreign-keys";
|
|
19
19
|
export * from "drizzle-orm/pg-core";
|
|
@@ -883,10 +883,10 @@ declare abstract class DatabaseProvider {
|
|
|
883
883
|
}
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region src/schemas/pageQuerySchema.d.ts
|
|
886
|
-
declare const pageQuerySchema:
|
|
887
|
-
page:
|
|
888
|
-
size:
|
|
889
|
-
sort:
|
|
886
|
+
declare const pageQuerySchema: typebox8.TObject<{
|
|
887
|
+
page: typebox8.TOptional<typebox8.TInteger>;
|
|
888
|
+
size: typebox8.TOptional<typebox8.TInteger>;
|
|
889
|
+
sort: typebox8.TOptional<typebox8.TString>;
|
|
890
890
|
}>;
|
|
891
891
|
type PageQuery = Static<typeof pageQuerySchema>;
|
|
892
892
|
//#endregion
|
|
@@ -1196,6 +1196,10 @@ declare class RepositoryDescriptor<T extends TObject = TObject> extends Descript
|
|
|
1196
1196
|
protected readonly alepha: Alepha;
|
|
1197
1197
|
readonly provider: DatabaseProvider;
|
|
1198
1198
|
constructor(args: DescriptorArgs<RepositoryDescriptorOptions<T>>);
|
|
1199
|
+
/**
|
|
1200
|
+
* Get the entity descriptor associated with this repository.
|
|
1201
|
+
*/
|
|
1202
|
+
get entity(): EntityDescriptor<T>;
|
|
1199
1203
|
/**
|
|
1200
1204
|
* Represents the primary key of the table.
|
|
1201
1205
|
* - Key is the name of the primary key column.
|
|
@@ -1657,11 +1661,11 @@ declare class DrizzleKitProvider {
|
|
|
1657
1661
|
*/
|
|
1658
1662
|
protected importDrizzleKit(): typeof DrizzleKit;
|
|
1659
1663
|
}
|
|
1660
|
-
declare const devMigrationsSchema:
|
|
1661
|
-
id:
|
|
1662
|
-
name:
|
|
1663
|
-
snapshot:
|
|
1664
|
-
created_at:
|
|
1664
|
+
declare const devMigrationsSchema: typebox8.TObject<{
|
|
1665
|
+
id: typebox8.TNumber;
|
|
1666
|
+
name: typebox8.TString;
|
|
1667
|
+
snapshot: typebox8.TString;
|
|
1668
|
+
created_at: typebox8.TString;
|
|
1665
1669
|
}>;
|
|
1666
1670
|
type DevMigrations = Static<typeof devMigrationsSchema>;
|
|
1667
1671
|
//#endregion
|
|
@@ -1824,17 +1828,17 @@ declare class PostgresTypeProvider {
|
|
|
1824
1828
|
/**
|
|
1825
1829
|
* Creates a column Created At. So just a datetime column with a default value of the current timestamp.
|
|
1826
1830
|
*/
|
|
1827
|
-
readonly createdAt: (options?: TStringOptions) => PgAttr<PgAttr<
|
|
1831
|
+
readonly createdAt: (options?: TStringOptions) => PgAttr<PgAttr<typebox8.TCodec<TString, dayjs0.Dayjs>, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1828
1832
|
/**
|
|
1829
1833
|
* Creates a column Updated At. Like createdAt, but it is updated on every update of the row.
|
|
1830
1834
|
*/
|
|
1831
|
-
readonly updatedAt: (options?: TStringOptions) => PgAttr<PgAttr<
|
|
1835
|
+
readonly updatedAt: (options?: TStringOptions) => PgAttr<PgAttr<typebox8.TCodec<TString, dayjs0.Dayjs>, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1832
1836
|
/**
|
|
1833
1837
|
* Creates a column Deleted At for soft delete functionality.
|
|
1834
1838
|
* This is used to mark rows as deleted without actually removing them from the database.
|
|
1835
1839
|
* The column is nullable - NULL means not deleted, timestamp means deleted.
|
|
1836
1840
|
*/
|
|
1837
|
-
readonly deletedAt: (options?: TStringOptions) => PgAttr<
|
|
1841
|
+
readonly deletedAt: (options?: TStringOptions) => PgAttr<typebox8.TOptional<typebox8.TCodec<TString, dayjs0.Dayjs>>, typeof PG_DELETED_AT>;
|
|
1838
1842
|
/**
|
|
1839
1843
|
* Creates a Postgres ENUM type.
|
|
1840
1844
|
*
|
|
@@ -1866,7 +1870,7 @@ declare const pg: PostgresTypeProvider;
|
|
|
1866
1870
|
/**
|
|
1867
1871
|
* @deprecated Use `pg.primaryKey()` instead.
|
|
1868
1872
|
*/
|
|
1869
|
-
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<
|
|
1873
|
+
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<typebox8.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
|
|
1870
1874
|
//#endregion
|
|
1871
1875
|
//#region src/types/schema.d.ts
|
|
1872
1876
|
/**
|
package/react/i18n.d.ts
CHANGED
|
@@ -1,25 +1,49 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import { Alepha, Descriptor, KIND } from "alepha";
|
|
2
|
+
import { Alepha, Descriptor, KIND, TypeBoxError } from "alepha";
|
|
3
|
+
import { DateTime, DateTimeProvider } from "alepha/datetime";
|
|
3
4
|
import * as _alepha_logger0 from "alepha/logger";
|
|
4
5
|
import * as _alepha_server_cookies0 from "alepha/server/cookies";
|
|
5
6
|
import * as typebox0 from "typebox";
|
|
6
7
|
|
|
8
|
+
//#region src/components/Localize.d.ts
|
|
9
|
+
interface LocalizeProps {
|
|
10
|
+
value: string | number | Date | DateTime | TypeBoxError;
|
|
11
|
+
/**
|
|
12
|
+
* Options for number formatting (when value is a number)
|
|
13
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat
|
|
14
|
+
*/
|
|
15
|
+
number?: Intl.NumberFormatOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Options for date formatting (when value is a Date or DateTime)
|
|
18
|
+
* Can be:
|
|
19
|
+
* - A dayjs format string (e.g., "LLL", "YYYY-MM-DD", "dddd, MMMM D YYYY")
|
|
20
|
+
* - "fromNow" for relative time (e.g., "2 hours ago")
|
|
21
|
+
* - Intl.DateTimeFormatOptions for native formatting
|
|
22
|
+
* @see https://day.js.org/docs/en/display/format
|
|
23
|
+
* @see https://day.js.org/docs/en/display/from-now
|
|
24
|
+
*/
|
|
25
|
+
date?: string | "fromNow" | Intl.DateTimeFormatOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Timezone to display dates in (when value is a Date or DateTime)
|
|
28
|
+
* Uses IANA timezone names (e.g., "America/New_York", "Europe/Paris", "Asia/Tokyo")
|
|
29
|
+
* @see https://day.js.org/docs/en/timezone/timezone
|
|
30
|
+
*/
|
|
31
|
+
timezone?: string;
|
|
32
|
+
}
|
|
33
|
+
declare const Localize: (props: LocalizeProps) => string;
|
|
34
|
+
//#endregion
|
|
7
35
|
//#region src/hooks/useI18n.d.ts
|
|
8
36
|
/**
|
|
9
37
|
* Hook to access the i18n service.
|
|
10
38
|
*/
|
|
11
|
-
declare const useI18n: <S extends object, K$1 extends keyof ServiceDictionary<S>>() => I18nProvider<S, K$1
|
|
12
|
-
tr(key: keyof ServiceDictionary<S>[K$1] | string, options?: {
|
|
13
|
-
args?: string[];
|
|
14
|
-
default?: string;
|
|
15
|
-
}): string;
|
|
16
|
-
};
|
|
39
|
+
declare const useI18n: <S extends object, K$1 extends keyof ServiceDictionary<S>>() => I18nProvider<S, K$1>;
|
|
17
40
|
type ServiceDictionary<T extends object> = { [K in keyof T]: T[K] extends DictionaryDescriptor<infer U> ? U : never };
|
|
18
41
|
//#endregion
|
|
19
42
|
//#region src/providers/I18nProvider.d.ts
|
|
20
43
|
declare class I18nProvider<S extends object, K$1 extends keyof ServiceDictionary<S>> {
|
|
21
44
|
protected logger: _alepha_logger0.Logger;
|
|
22
45
|
protected alepha: Alepha;
|
|
46
|
+
protected dateTimeProvider: DateTimeProvider;
|
|
23
47
|
protected cookie: _alepha_server_cookies0.AbstractCookieDescriptor<typebox0.TString>;
|
|
24
48
|
readonly registry: Array<{
|
|
25
49
|
name: string;
|
|
@@ -37,14 +61,15 @@ declare class I18nProvider<S extends object, K$1 extends keyof ServiceDictionary
|
|
|
37
61
|
format: (value: number) => string;
|
|
38
62
|
};
|
|
39
63
|
get languages(): string[];
|
|
64
|
+
constructor();
|
|
40
65
|
protected readonly onRender: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
41
66
|
protected readonly onStart: _alepha_core1.HookDescriptor<"start">;
|
|
42
|
-
protected
|
|
67
|
+
protected refreshLocale(): void;
|
|
43
68
|
setLang: (lang: string) => Promise<void>;
|
|
44
69
|
protected readonly mutate: _alepha_core1.HookDescriptor<"state:mutate">;
|
|
45
70
|
get lang(): string;
|
|
46
71
|
translate: (key: string, args?: string[]) => string;
|
|
47
|
-
readonly tr: (key: keyof ServiceDictionary<S>[K$1]
|
|
72
|
+
readonly tr: (key: keyof ServiceDictionary<S>[K$1], options?: {
|
|
48
73
|
args?: string[];
|
|
49
74
|
default?: string;
|
|
50
75
|
}) => string;
|
|
@@ -114,5 +139,5 @@ declare module "alepha" {
|
|
|
114
139
|
*/
|
|
115
140
|
declare const AlephaReactI18n: _alepha_core1.Service<_alepha_core1.Module<{}>>;
|
|
116
141
|
//#endregion
|
|
117
|
-
export { $dictionary, AlephaReactI18n, DictionaryDescriptor, DictionaryDescriptorOptions, I18nProvider, ServiceDictionary, useI18n };
|
|
142
|
+
export { $dictionary, AlephaReactI18n, DictionaryDescriptor, DictionaryDescriptorOptions, I18nProvider, Localize, type LocalizeProps, ServiceDictionary, useI18n };
|
|
118
143
|
//# sourceMappingURL=index.d.ts.map
|
package/react.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import { Alepha, Async, Configurable, Descriptor, Hooks, KIND, Service, State, Static, TObject, TSchema } from "alepha";
|
|
3
3
|
import { RequestConfigSchema, ServerHandler, ServerProvider, ServerRequest, ServerRouterProvider, ServerTimingProvider } from "alepha/server";
|
|
4
4
|
import { ServerRouteCache } from "alepha/server/cache";
|
|
5
5
|
import { ClientScope, HttpVirtualClient, LinkProvider, VirtualAction } from "alepha/server/links";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
7
7
|
import * as react0 from "react";
|
|
8
8
|
import React, { AnchorHTMLAttributes, CSSProperties, ErrorInfo, FC, PropsWithChildren, ReactNode } from "react";
|
|
9
9
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -40,14 +40,14 @@ declare class Redirection extends Error {
|
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/providers/ReactPageProvider.d.ts
|
|
43
|
-
declare const envSchema$2:
|
|
44
|
-
REACT_STRICT_MODE:
|
|
43
|
+
declare const envSchema$2: _alepha_core1.TObject<{
|
|
44
|
+
REACT_STRICT_MODE: _alepha_core1.TBoolean;
|
|
45
45
|
}>;
|
|
46
46
|
declare module "alepha" {
|
|
47
47
|
interface Env extends Partial<Static<typeof envSchema$2>> {}
|
|
48
48
|
}
|
|
49
49
|
declare class ReactPageProvider {
|
|
50
|
-
protected readonly log:
|
|
50
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
51
51
|
protected readonly env: {
|
|
52
52
|
REACT_STRICT_MODE: boolean;
|
|
53
53
|
};
|
|
@@ -83,7 +83,7 @@ declare class ReactPageProvider {
|
|
|
83
83
|
}, params?: Record<string, any>): string;
|
|
84
84
|
compile(path: string, params?: Record<string, string>): string;
|
|
85
85
|
protected renderView(index: number, path: string, view: ReactNode | undefined, page: PageRoute): ReactNode;
|
|
86
|
-
protected readonly configure:
|
|
86
|
+
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
87
87
|
protected map(pages: Array<PageDescriptor>, target: PageDescriptor): PageRouteEntry;
|
|
88
88
|
add(entry: PageRouteEntry): void;
|
|
89
89
|
protected createMatch(page: PageRoute): string;
|
|
@@ -489,18 +489,18 @@ interface BrowserRoute extends Route {
|
|
|
489
489
|
page: PageRoute;
|
|
490
490
|
}
|
|
491
491
|
declare class ReactBrowserRouterProvider extends RouterProvider<BrowserRoute> {
|
|
492
|
-
protected readonly log:
|
|
492
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
493
493
|
protected readonly alepha: Alepha;
|
|
494
494
|
protected readonly pageApi: ReactPageProvider;
|
|
495
495
|
add(entry: PageRouteEntry): void;
|
|
496
|
-
protected readonly configure:
|
|
496
|
+
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
497
497
|
transition(url: URL, previous?: PreviousLayerData[], meta?: {}): Promise<string | void>;
|
|
498
498
|
root(state: ReactRouterState): ReactNode;
|
|
499
499
|
}
|
|
500
500
|
//#endregion
|
|
501
501
|
//#region src/providers/ReactBrowserProvider.d.ts
|
|
502
|
-
declare const envSchema$1:
|
|
503
|
-
REACT_ROOT_ID:
|
|
502
|
+
declare const envSchema$1: _alepha_core1.TObject<{
|
|
503
|
+
REACT_ROOT_ID: _alepha_core1.TString;
|
|
504
504
|
}>;
|
|
505
505
|
declare module "alepha" {
|
|
506
506
|
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
@@ -512,7 +512,7 @@ declare class ReactBrowserProvider {
|
|
|
512
512
|
protected readonly env: {
|
|
513
513
|
REACT_ROOT_ID: string;
|
|
514
514
|
};
|
|
515
|
-
protected readonly log:
|
|
515
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
516
516
|
protected readonly client: LinkProvider;
|
|
517
517
|
protected readonly alepha: Alepha;
|
|
518
518
|
protected readonly router: ReactBrowserRouterProvider;
|
|
@@ -546,8 +546,8 @@ declare class ReactBrowserProvider {
|
|
|
546
546
|
* Get embedded layers from the server.
|
|
547
547
|
*/
|
|
548
548
|
protected getHydrationState(): ReactHydrationState | undefined;
|
|
549
|
-
protected readonly onTransitionEnd:
|
|
550
|
-
readonly ready:
|
|
549
|
+
protected readonly onTransitionEnd: _alepha_core1.HookDescriptor<"react:transition:end">;
|
|
550
|
+
readonly ready: _alepha_core1.HookDescriptor<"ready">;
|
|
551
551
|
}
|
|
552
552
|
interface RouterGoOptions {
|
|
553
553
|
replace?: boolean;
|
|
@@ -800,12 +800,12 @@ declare const ssrSchemaLoading: (alepha: Alepha, name: string) => RequestConfigS
|
|
|
800
800
|
declare const useStore: <Key extends keyof State>(key: Key, defaultValue?: State[Key]) => [State[Key], (value: State[Key]) => void];
|
|
801
801
|
//#endregion
|
|
802
802
|
//#region src/providers/ReactServerProvider.d.ts
|
|
803
|
-
declare const envSchema:
|
|
804
|
-
REACT_SERVER_DIST:
|
|
805
|
-
REACT_SERVER_PREFIX:
|
|
806
|
-
REACT_SSR_ENABLED:
|
|
807
|
-
REACT_ROOT_ID:
|
|
808
|
-
REACT_SERVER_TEMPLATE:
|
|
803
|
+
declare const envSchema: _alepha_core1.TObject<{
|
|
804
|
+
REACT_SERVER_DIST: _alepha_core1.TString;
|
|
805
|
+
REACT_SERVER_PREFIX: _alepha_core1.TString;
|
|
806
|
+
REACT_SSR_ENABLED: _alepha_core1.TOptional<_alepha_core1.TBoolean>;
|
|
807
|
+
REACT_ROOT_ID: _alepha_core1.TString;
|
|
808
|
+
REACT_SERVER_TEMPLATE: _alepha_core1.TOptional<_alepha_core1.TString>;
|
|
809
809
|
}>;
|
|
810
810
|
declare module "alepha" {
|
|
811
811
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -821,7 +821,7 @@ interface ReactServerProviderOptions {
|
|
|
821
821
|
static?: Partial<Omit<ServeDescriptorOptions, "root">>;
|
|
822
822
|
}
|
|
823
823
|
declare class ReactServerProvider implements Configurable {
|
|
824
|
-
protected readonly log:
|
|
824
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
825
825
|
protected readonly alepha: Alepha;
|
|
826
826
|
protected readonly env: {
|
|
827
827
|
REACT_SSR_ENABLED?: boolean | undefined;
|
|
@@ -841,7 +841,7 @@ declare class ReactServerProvider implements Configurable {
|
|
|
841
841
|
/**
|
|
842
842
|
* Configure the React server provider.
|
|
843
843
|
*/
|
|
844
|
-
readonly onConfigure:
|
|
844
|
+
readonly onConfigure: _alepha_core1.HookDescriptor<"configure">;
|
|
845
845
|
get template(): string;
|
|
846
846
|
protected registerPages(templateLoader: TemplateLoader): Promise<void>;
|
|
847
847
|
/**
|
|
@@ -923,7 +923,7 @@ declare module "alepha" {
|
|
|
923
923
|
* @see {@link $page}
|
|
924
924
|
* @module alepha.react
|
|
925
925
|
*/
|
|
926
|
-
declare const AlephaReact:
|
|
926
|
+
declare const AlephaReact: _alepha_core1.Service<_alepha_core1.Module<{}>>;
|
|
927
927
|
//#endregion
|
|
928
928
|
export { $page, AlephaContext, AlephaReact, AnchorProps, ClientOnly, CreateLayersResult, ErrorBoundary, ErrorHandler, ErrorViewer, Layer, Link, 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, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, UseSchemaReturn, VirtualRouter, isPageRoute, ssrSchemaLoading, useActive, useAlepha, useClient, useInject, useQueryParams, useRouter, useRouterEvents, useRouterState, useSchema, useStore };
|
|
929
929
|
//# 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_logger1 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_logger1.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_logger1.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_logger1.Logger;
|
|
404
404
|
get name(): string;
|
|
405
405
|
get accessTokenExpiration(): Duration;
|
|
406
406
|
get refreshTokenExpiration(): Duration;
|
package/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, Async, Descriptor, FileLike, KIND, Static, StreamLike, TArray, TFile, TObject, TRecord, TSchema, TStream, TString, TVoid } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
4
4
|
import { Readable } from "node:stream";
|
|
5
5
|
import { ReadableStream } from "node:stream/web";
|
|
6
6
|
import { Route, RouterProvider } from "alepha/router";
|
|
@@ -186,14 +186,14 @@ declare class ServerRequestParser {
|
|
|
186
186
|
//#region src/providers/ServerTimingProvider.d.ts
|
|
187
187
|
type TimingMap = Record<string, [number, number]>;
|
|
188
188
|
declare class ServerTimingProvider {
|
|
189
|
-
protected readonly log:
|
|
189
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
190
190
|
protected readonly alepha: Alepha;
|
|
191
191
|
options: {
|
|
192
192
|
prefix: string;
|
|
193
193
|
disabled: boolean;
|
|
194
194
|
};
|
|
195
|
-
readonly onRequest:
|
|
196
|
-
readonly onResponse:
|
|
195
|
+
readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
196
|
+
readonly onResponse: _alepha_core1.HookDescriptor<"server:onResponse">;
|
|
197
197
|
protected get handlerName(): string;
|
|
198
198
|
beginTiming(name: string): void;
|
|
199
199
|
endTiming(name: string): void;
|
|
@@ -215,6 +215,7 @@ declare class ServerRouterProvider extends RouterProvider<ServerRouteMatcher> {
|
|
|
215
215
|
protected readonly serverRequestParser: ServerRequestParser;
|
|
216
216
|
getRoutes(): ServerRoute[];
|
|
217
217
|
createRoute<TConfig extends RequestConfigSchema = RequestConfigSchema>(route: ServerRoute<TConfig>): void;
|
|
218
|
+
protected getContextId(headers: Record<string, string>): string;
|
|
218
219
|
protected processRequest(request: ServerRequest, route: ServerRoute, responseKind: ResponseKind): Promise<{
|
|
219
220
|
status: number;
|
|
220
221
|
headers: Record<string, string> & {
|
|
@@ -233,7 +234,7 @@ declare class ServerRouterProvider extends RouterProvider<ServerRouteMatcher> {
|
|
|
233
234
|
//#endregion
|
|
234
235
|
//#region src/services/HttpClient.d.ts
|
|
235
236
|
declare class HttpClient {
|
|
236
|
-
protected readonly log:
|
|
237
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
237
238
|
protected readonly alepha: Alepha;
|
|
238
239
|
readonly cache: _alepha_cache0.CacheDescriptorFn<HttpClientCache, any[]>;
|
|
239
240
|
protected readonly pendingRequests: HttpClientPendingRequests;
|
|
@@ -553,7 +554,7 @@ interface ActionDescriptorOptions<TConfig extends RequestConfigSchema> extends O
|
|
|
553
554
|
handler: ServerActionHandler<TConfig>;
|
|
554
555
|
}
|
|
555
556
|
declare class ActionDescriptor<TConfig extends RequestConfigSchema> extends Descriptor<ActionDescriptorOptions<TConfig>> {
|
|
556
|
-
protected readonly log:
|
|
557
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
557
558
|
protected readonly env: {
|
|
558
559
|
SERVER_API_PREFIX: string;
|
|
559
560
|
};
|
|
@@ -725,9 +726,9 @@ declare const okSchema: typebox0.TObject<{
|
|
|
725
726
|
type Ok = Static<typeof okSchema>;
|
|
726
727
|
//#endregion
|
|
727
728
|
//#region src/providers/NodeHttpServerProvider.d.ts
|
|
728
|
-
declare const envSchema:
|
|
729
|
-
SERVER_PORT:
|
|
730
|
-
SERVER_HOST:
|
|
729
|
+
declare const envSchema: _alepha_core1.TObject<{
|
|
730
|
+
SERVER_PORT: _alepha_core1.TInteger;
|
|
731
|
+
SERVER_HOST: _alepha_core1.TString;
|
|
731
732
|
}>;
|
|
732
733
|
declare module "alepha" {
|
|
733
734
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -735,29 +736,29 @@ declare module "alepha" {
|
|
|
735
736
|
declare class NodeHttpServerProvider extends ServerProvider {
|
|
736
737
|
protected readonly alepha: Alepha;
|
|
737
738
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
738
|
-
protected readonly log:
|
|
739
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
739
740
|
protected readonly env: {
|
|
740
741
|
SERVER_PORT: number;
|
|
741
742
|
SERVER_HOST: string;
|
|
742
743
|
};
|
|
743
744
|
protected readonly router: ServerRouterProvider;
|
|
744
745
|
protected readonly server: http0.Server<typeof IncomingMessage, typeof ServerResponse$1>;
|
|
745
|
-
protected readonly onNodeRequest:
|
|
746
|
+
protected readonly onNodeRequest: _alepha_core1.HookDescriptor<"node:request">;
|
|
746
747
|
handle(req: IncomingMessage, res: ServerResponse$1): Promise<void>;
|
|
747
748
|
get hostname(): string;
|
|
748
|
-
readonly start:
|
|
749
|
-
protected readonly stop:
|
|
749
|
+
readonly start: _alepha_core1.HookDescriptor<"start">;
|
|
750
|
+
protected readonly stop: _alepha_core1.HookDescriptor<"stop">;
|
|
750
751
|
protected listen(): Promise<void>;
|
|
751
752
|
protected close(): Promise<void>;
|
|
752
753
|
}
|
|
753
754
|
//#endregion
|
|
754
755
|
//#region src/providers/ServerLoggerProvider.d.ts
|
|
755
756
|
declare class ServerLoggerProvider {
|
|
756
|
-
protected readonly log:
|
|
757
|
+
protected readonly log: _alepha_logger0.Logger;
|
|
757
758
|
protected readonly alepha: Alepha;
|
|
758
|
-
readonly onRequest:
|
|
759
|
-
readonly onError:
|
|
760
|
-
readonly onResponse:
|
|
759
|
+
readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
760
|
+
readonly onError: _alepha_core1.HookDescriptor<"server:onError">;
|
|
761
|
+
readonly onResponse: _alepha_core1.HookDescriptor<"server:onResponse">;
|
|
761
762
|
}
|
|
762
763
|
//#endregion
|
|
763
764
|
//#region src/providers/ServerNotReadyProvider.d.ts
|
|
@@ -770,7 +771,7 @@ declare class ServerLoggerProvider {
|
|
|
770
771
|
*/
|
|
771
772
|
declare class ServerNotReadyProvider {
|
|
772
773
|
protected readonly alepha: Alepha;
|
|
773
|
-
readonly onRequest:
|
|
774
|
+
readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
774
775
|
}
|
|
775
776
|
//#endregion
|
|
776
777
|
//#region src/index.d.ts
|
|
@@ -842,7 +843,7 @@ declare module "alepha" {
|
|
|
842
843
|
* @see {@link $action}
|
|
843
844
|
* @module alepha.server
|
|
844
845
|
*/
|
|
845
|
-
declare const AlephaServer:
|
|
846
|
+
declare const AlephaServer: _alepha_core1.Service<_alepha_core1.Module<{}>>;
|
|
846
847
|
//#endregion
|
|
847
848
|
export { $action, $route, ActionDescriptor, ActionDescriptorFn, ActionDescriptorOptions, AlephaServer, BadRequestError, ClientRequestEntry, ClientRequestEntryContainer, ClientRequestOptions, ClientRequestResponse, ConflictError, ErrorSchema, FetchActionArgs, FetchOptions, FetchResponse, ForbiddenError, HttpAction, HttpClient, HttpClientPendingRequests, HttpError, HttpErrorLike, NodeHttpServerProvider, NotFoundError, Ok, RequestConfigSchema, RequestInitWithOptions, ResponseBodyType, ResponseKind, RouteDescriptor, RouteDescriptorOptions, RouteMethod, ServerActionHandler, ServerActionRequest, ServerHandler, ServerLoggerProvider, ServerNotReadyProvider, ServerProvider, ServerRawRequest, ServerReply, ServerRequest, ServerRequestConfig, ServerRequestConfigEntry, ServerResponse, ServerResponseBody, ServerRoute, ServerRouteMatcher, ServerRouteRequestHandler, ServerRouterProvider, ServerTimingProvider, TRequestBody, TResponseBody, UnauthorizedError, ValidationError, errorNameByStatus, errorSchema, isHttpError, isMultipart, okSchema, routeMethods };
|
|
848
849
|
//# sourceMappingURL=index.d.ts.map
|
package/ui.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var m = require('@alepha/ui');
|
|
3
|
-
Object.keys(m).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
get: function () { return m[k]; }
|
|
7
|
-
});
|
|
8
|
-
});
|