zerotal 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-surface.md +25 -21
- package/package.json +12 -12
package/api-surface.md
CHANGED
|
@@ -1112,7 +1112,7 @@ type AppScopeInstaller = () => () => void
|
|
|
1112
1112
|
|
|
1113
1113
|
type ArgDef = { name: string; required?: boolean; default?: string;}
|
|
1114
1114
|
|
|
1115
|
-
type BindingToken =
|
|
1115
|
+
type BindingToken = ClassToken<T> | AbstractToken<T> | keyof ContainerBindings
|
|
1116
1116
|
|
|
1117
1117
|
type ClassRef = abstract new (...args: never[]) => unknown
|
|
1118
1118
|
|
|
@@ -1140,7 +1140,7 @@ type FileRouteResolver = (ctx: FileRouteContext) => boolean
|
|
|
1140
1140
|
|
|
1141
1141
|
type FileRoutingConfig = { [x: string]: FileRoutingEntry;}
|
|
1142
1142
|
|
|
1143
|
-
type FileRoutingEntry = string | {
|
|
1143
|
+
type FileRoutingEntry = string | { dir: string; prefix?: string; middleware?: MiddlewareInput }
|
|
1144
1144
|
|
|
1145
1145
|
type FlagDef = { name: string; short?: string; type: 'string' | 'boolean' | 'number'; description?: string; default?: unknown;}
|
|
1146
1146
|
|
|
@@ -1178,7 +1178,7 @@ type RouteTarget = string
|
|
|
1178
1178
|
|
|
1179
1179
|
type RoutingConfig = { [x: string]: RoutingEntry;}
|
|
1180
1180
|
|
|
1181
|
-
type RoutingEntry = string | {
|
|
1181
|
+
type RoutingEntry = string | { file: string; prefix?: string; middleware?: MiddlewareInput }
|
|
1182
1182
|
|
|
1183
1183
|
type SameSite = 'Strict' | 'Lax' | 'None'
|
|
1184
1184
|
|
|
@@ -3106,7 +3106,7 @@ type ResponseInterceptor = (ctx: ResponseContext) => ResponseContext | Promise<R
|
|
|
3106
3106
|
|
|
3107
3107
|
type ResponseOf = `${Method} ${Path}` extends keyof Routes ? Routes[`${Method} ${Path}`] extends { response: infer R;} ? R : unknown : unknown
|
|
3108
3108
|
|
|
3109
|
-
type SocketState = '
|
|
3109
|
+
type SocketState = 'connecting' | 'connected' | 'disconnected' | 'reconnecting' | 'error'
|
|
3110
3110
|
|
|
3111
3111
|
type TokenSource = string | (() => string | null | undefined | Promise<string | null | undefined>)
|
|
3112
3112
|
|
|
@@ -4099,7 +4099,7 @@ interface RegisteredConfigValidator = {
|
|
|
4099
4099
|
validate: ConfigValidator
|
|
4100
4100
|
}
|
|
4101
4101
|
|
|
4102
|
-
type AssetLoaderKind = '
|
|
4102
|
+
type AssetLoaderKind = 'file' | 'dataurl' | 'base64' | 'text' | 'json' | 'toml'
|
|
4103
4103
|
|
|
4104
4104
|
type ConfigIssueLevel = 'error' | 'warning'
|
|
4105
4105
|
|
|
@@ -4316,7 +4316,7 @@ const t = { readonly string: () => Def<string | undefined>; readonly numbe
|
|
|
4316
4316
|
|
|
4317
4317
|
type EnvOutput = { readonly [K in keyof S]: InferDef<S[K]>; }
|
|
4318
4318
|
|
|
4319
|
-
type FieldType = 'string' | 'number' | 'boolean' | '
|
|
4319
|
+
type FieldType = 'string' | 'number' | 'boolean' | 'enum' | 'url' | 'port'
|
|
4320
4320
|
|
|
4321
4321
|
type InferDef = D extends Def<infer T> ? T : never
|
|
4322
4322
|
|
|
@@ -4666,7 +4666,7 @@ interface WebContext = {
|
|
|
4666
4666
|
view: (markup: string | { toString(): string;}, status?: number) => void
|
|
4667
4667
|
}
|
|
4668
4668
|
|
|
4669
|
-
type AnsiColor = '
|
|
4669
|
+
type AnsiColor = 'red' | 'green' | 'yellow' | 'blue' | 'cyan' | 'dim'
|
|
4670
4670
|
|
|
4671
4671
|
type Channel = 'web' | 'json' | 'cli'
|
|
4672
4672
|
|
|
@@ -4927,11 +4927,11 @@ interface LoggingConfigShape = {
|
|
|
4927
4927
|
slowQueryMs?: number
|
|
4928
4928
|
}
|
|
4929
4929
|
|
|
4930
|
-
type ChannelConfig = {
|
|
4930
|
+
type ChannelConfig = { driver: 'console'; level?: LogLevel; format?: 'json' | 'pretty' } | { driver: 'single'; level?: LogLevel; path: string } | { driver: 'daily'; level?: LogLevel; path: string; days?: number } | { driver: 'stack'; level?: LogLevel; channels: string[] } | { driver: 'null' }
|
|
4931
4931
|
|
|
4932
|
-
type LogLevel = '
|
|
4932
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal'
|
|
4933
4933
|
|
|
4934
|
-
type TableData = Record<string, unknown> |
|
|
4934
|
+
type TableData = Record<string, unknown> | ReadonlyArray<Record<string, unknown>>
|
|
4935
4935
|
|
|
4936
4936
|
## ./media `(./src/media.ts)`
|
|
4937
4937
|
|
|
@@ -5379,7 +5379,7 @@ interface ResponsiveImageSet = {
|
|
|
5379
5379
|
placeholder?: string
|
|
5380
5380
|
}
|
|
5381
5381
|
|
|
5382
|
-
type ConversionFit = '
|
|
5382
|
+
type ConversionFit = 'inside' | 'fill' | 'cover'
|
|
5383
5383
|
|
|
5384
5384
|
type ConversionFormat = SafeConversionFormat | 'avif' | 'heic'
|
|
5385
5385
|
|
|
@@ -5387,7 +5387,7 @@ type ConversionMap = { [x: string]: ConversionDefinition;}
|
|
|
5387
5387
|
|
|
5388
5388
|
type MediaCollections = { [x: string]: CollectionDefinition | (() => CollectionDefinition);}
|
|
5389
5389
|
|
|
5390
|
-
type MediaSource =
|
|
5390
|
+
type MediaSource = UploadedFile | File | Blob | Uint8Array | ArrayBuffer
|
|
5391
5391
|
|
|
5392
5392
|
type SafeConversionFormat = 'jpeg' | 'png' | 'webp'
|
|
5393
5393
|
|
|
@@ -5530,7 +5530,7 @@ class Blueprint = {
|
|
|
5530
5530
|
bigInteger: (name: string) => ColumnBuilder
|
|
5531
5531
|
binary: (name: string) => ColumnBuilder
|
|
5532
5532
|
boolean: (name: string) => ColumnBuilder
|
|
5533
|
-
char: (name: string,
|
|
5533
|
+
char: (name: string, length?: number) => ColumnBuilder
|
|
5534
5534
|
date: (name: string) => ColumnBuilder
|
|
5535
5535
|
dateTime: (name: string) => ColumnBuilder
|
|
5536
5536
|
datetime: (name: string) => ColumnBuilder
|
|
@@ -5567,7 +5567,7 @@ class Blueprint = {
|
|
|
5567
5567
|
smallInteger: (name: string) => ColumnBuilder
|
|
5568
5568
|
softDeletes: (column?: string) => void
|
|
5569
5569
|
spatialIndex: (columns: string | string[], name?: string) => Blueprint
|
|
5570
|
-
string: (name: string,
|
|
5570
|
+
string: (name: string, length?: number) => ColumnBuilder
|
|
5571
5571
|
text: (name: string) => ColumnBuilder
|
|
5572
5572
|
time: (name: string) => ColumnBuilder
|
|
5573
5573
|
timestamp: (name: string) => ColumnBuilder
|
|
@@ -5596,7 +5596,7 @@ class Cast = {
|
|
|
5596
5596
|
}
|
|
5597
5597
|
|
|
5598
5598
|
class ColumnBuilder = {
|
|
5599
|
-
new <Locked extends string = never>(name: string, _sqlType: string, isPrimary?: boolean, isAutoIncrement?: boolean, _isBoolean?: boolean): ColumnBuilder<Locked>
|
|
5599
|
+
new <Locked extends string = never>(name: string, _sqlType: string, isPrimary?: boolean, isAutoIncrement?: boolean, _isBoolean?: boolean, _stringLength?: number | undefined): ColumnBuilder<Locked>
|
|
5600
5600
|
after: (_column: string) => ColumnBuilder<Locked>
|
|
5601
5601
|
alter: () => ColumnBuilder<Locked>
|
|
5602
5602
|
before: (_column: string) => ColumnBuilder<Locked>
|
|
@@ -5988,6 +5988,7 @@ class MysqlDialect = {
|
|
|
5988
5988
|
readonly name: 'mysql'
|
|
5989
5989
|
readonly supportsAdvisoryLocks: true
|
|
5990
5990
|
readonly supportsTransactionalDdl: false
|
|
5991
|
+
stringType: (length: number) => string
|
|
5991
5992
|
}
|
|
5992
5993
|
|
|
5993
5994
|
class NPlusOneDetected = {
|
|
@@ -6029,6 +6030,7 @@ class PostgresDialect = {
|
|
|
6029
6030
|
readonly name: 'postgres'
|
|
6030
6031
|
readonly supportsAdvisoryLocks: true
|
|
6031
6032
|
readonly supportsTransactionalDdl: true
|
|
6033
|
+
stringType: () => string
|
|
6032
6034
|
}
|
|
6033
6035
|
|
|
6034
6036
|
class QueryBuilder = {
|
|
@@ -6168,6 +6170,7 @@ class SqliteDialect = {
|
|
|
6168
6170
|
readonly name: 'sqlite'
|
|
6169
6171
|
readonly supportsAdvisoryLocks: false
|
|
6170
6172
|
readonly supportsTransactionalDdl: true
|
|
6173
|
+
stringType: () => string
|
|
6171
6174
|
}
|
|
6172
6175
|
|
|
6173
6176
|
class StateError = {
|
|
@@ -6688,6 +6691,7 @@ interface SqlDialect = {
|
|
|
6688
6691
|
readonly name: DialectName
|
|
6689
6692
|
readonly supportsAdvisoryLocks: boolean
|
|
6690
6693
|
readonly supportsTransactionalDdl: boolean
|
|
6694
|
+
stringType: (length: number) => string
|
|
6691
6695
|
}
|
|
6692
6696
|
|
|
6693
6697
|
interface SQLInstance = {
|
|
@@ -6729,13 +6733,13 @@ type ClassRef = abstract new (...args: never[]) => unknown
|
|
|
6729
6733
|
|
|
6730
6734
|
type Columns = { [K in keyof T & string]: K extends `_${string}` ? never : T[K] extends (...args: any[]) => any ? never : K; }[keyof T & string]
|
|
6731
6735
|
|
|
6732
|
-
type ColumnShorthand = 'string' | '
|
|
6736
|
+
type ColumnShorthand = 'string' | 'text' | 'integer' | 'number' | 'float' | 'boolean' | 'datetime' | 'date' | 'json' | 'array' | 'encrypted' | 'encrypted:json'
|
|
6733
6737
|
|
|
6734
6738
|
type Constructor = new (...args: any[]) => T
|
|
6735
6739
|
|
|
6736
6740
|
type ContextConnectionResolver = (ModelClass?: typeof BaseModel) => SQLInstance | null
|
|
6737
6741
|
|
|
6738
|
-
type DatePart = 'date' | 'time' | '
|
|
6742
|
+
type DatePart = 'date' | 'time' | 'day' | 'month' | 'year'
|
|
6739
6743
|
|
|
6740
6744
|
type DialectName = 'sqlite' | 'postgres' | 'mysql'
|
|
6741
6745
|
|
|
@@ -7070,13 +7074,13 @@ interface WorkerPoolOptions = {
|
|
|
7070
7074
|
size: number
|
|
7071
7075
|
}
|
|
7072
7076
|
|
|
7073
|
-
type BatchStatus = '
|
|
7077
|
+
type BatchStatus = 'pending' | 'complete' | 'failed'
|
|
7074
7078
|
|
|
7075
7079
|
type JobStatus = 'dispatched' | 'completed' | 'failed' | 'retried'
|
|
7076
7080
|
|
|
7077
7081
|
type SerializedJob = { className: string; payload: Record<string, unknown>;}
|
|
7078
7082
|
|
|
7079
|
-
type WorkerResult = {
|
|
7083
|
+
type WorkerResult = { success: true } | { success: false; error: string }
|
|
7080
7084
|
|
|
7081
7085
|
## ./routes `(./src/routes.ts)`
|
|
7082
7086
|
|
|
@@ -7382,7 +7386,7 @@ interface RedactGraphOptions = {
|
|
|
7382
7386
|
tooDeep: string
|
|
7383
7387
|
}
|
|
7384
7388
|
|
|
7385
|
-
type HashAlgorithm = '
|
|
7389
|
+
type HashAlgorithm = 'argon2id' | 'argon2i' | 'argon2d' | 'bcrypt'
|
|
7386
7390
|
|
|
7387
7391
|
## ./session `(./src/session.ts)`
|
|
7388
7392
|
|
|
@@ -8062,7 +8066,7 @@ type FakeFile = { create(name: string, content?: string | Uint8Array, type?:
|
|
|
8062
8066
|
|
|
8063
8067
|
type SessionDecoder = (response: Response) => Promise<Record<string, unknown> | null>
|
|
8064
8068
|
|
|
8065
|
-
type TestFormValue = string | number | boolean |
|
|
8069
|
+
type TestFormValue = string | number | boolean | null | undefined | TestFileInput | File | Blob
|
|
8066
8070
|
|
|
8067
8071
|
## ./validator `(./src/validator.ts)`
|
|
8068
8072
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zerotal",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "stable",
|
|
6
6
|
"private": false,
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
"typecheck": "tsc --noEmit"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@zerotal/auth": "1.7.
|
|
65
|
-
"@zerotal/cache": "1.7.
|
|
66
|
-
"@zerotal/client": "1.7.
|
|
67
|
-
"@zerotal/core": "1.7.
|
|
68
|
-
"@zerotal/media": "1.7.
|
|
69
|
-
"@zerotal/orm": "1.7.
|
|
70
|
-
"@zerotal/queue": "1.7.
|
|
71
|
-
"@zerotal/scheduler": "1.7.
|
|
72
|
-
"@zerotal/session": "1.7.
|
|
73
|
-
"@zerotal/testing": "1.7.
|
|
74
|
-
"@zerotal/validator": "1.7.
|
|
64
|
+
"@zerotal/auth": "1.7.4",
|
|
65
|
+
"@zerotal/cache": "1.7.4",
|
|
66
|
+
"@zerotal/client": "1.7.4",
|
|
67
|
+
"@zerotal/core": "1.7.4",
|
|
68
|
+
"@zerotal/media": "1.7.4",
|
|
69
|
+
"@zerotal/orm": "1.7.4",
|
|
70
|
+
"@zerotal/queue": "1.7.4",
|
|
71
|
+
"@zerotal/scheduler": "1.7.4",
|
|
72
|
+
"@zerotal/session": "1.7.4",
|
|
73
|
+
"@zerotal/testing": "1.7.4",
|
|
74
|
+
"@zerotal/validator": "1.7.4"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"typescript": "^5.8.0"
|