lakutata 2.0.1 → 2.0.2
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/com/database.d.ts +4 -4
- package/com/docker.d.ts +5 -4
- package/com/entrypoint.cjs +13 -11
- package/com/entrypoint.d.ts +13 -8
- package/com/entrypoint.mjs +2 -2
- package/com/logger.d.ts +3 -3
- package/decorator/asst.d.ts +2 -2
- package/decorator/ctrl.d.ts +5 -5
- package/decorator/di.d.ts +5 -5
- package/decorator/dto.d.ts +5 -5
- package/decorator/orm.d.ts +3 -3
- package/helper.d.ts +2 -2
- package/lakutata.cjs +16 -18
- package/lakutata.d.ts +12 -16
- package/lakutata.mjs +2 -2
- package/orm.d.ts +4 -4
- package/orm.mjs +30 -30
- package/package.json +1 -1
- package/src/components/entrypoint/Entrypoint.cjs +1 -1
- package/src/components/entrypoint/Entrypoint.mjs +1 -1
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +34 -0
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +28 -0
- package/src/decorators/orm/Column.cjs +14 -14
- package/src/decorators/orm/Column.mjs +2 -2
- package/src/decorators/orm/PrimaryColumn.cjs +1 -1
- package/src/decorators/orm/PrimaryColumn.mjs +2 -2
- package/src/lib/core/Application.cjs +1 -1
- package/src/lib/core/Application.mjs +1 -1
- package/vendor/Package.14.cjs +20 -18
- package/vendor/Package.14.mjs +17 -19
- package/vendor/TypeDef.1.d.ts +274 -489
- package/vendor/TypeDef.10.d.ts +5 -6
- package/vendor/TypeDef.11.d.ts +4 -104
- package/vendor/TypeDef.12.d.ts +96 -60
- package/vendor/TypeDef.13.d.ts +71 -0
- package/vendor/TypeDef.2.d.ts +489 -948
- package/vendor/TypeDef.3.d.ts +662 -18813
- package/vendor/TypeDef.4.d.ts +18176 -3169
- package/vendor/TypeDef.5.d.ts +4093 -12
- package/vendor/TypeDef.6.d.ts +11 -2
- package/vendor/TypeDef.7.d.ts +20 -2
- package/vendor/TypeDef.8.d.ts +2 -5
- package/vendor/TypeDef.9.d.ts +2 -294
- package/src/exceptions/ControllerActionNotFoundException.cjs +0 -34
- package/src/exceptions/ControllerActionNotFoundException.mjs +0 -28
package/vendor/TypeDef.10.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface IConstructor<T = any> {
|
|
2
|
+
new (...args: any[]): T;
|
|
3
|
+
[prop: string]: any;
|
|
4
|
+
}
|
|
2
5
|
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
type PropertyDecorator<ClassPrototype> = (target: ClassPrototype, propertyKey: string | symbol) => void;
|
|
6
|
-
|
|
7
|
-
export type { ClassDecorator as C, PropertyDecorator as P };
|
|
6
|
+
export type { IConstructor as I };
|
package/vendor/TypeDef.11.d.ts
CHANGED
|
@@ -1,107 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as IConstructor } from './TypeDef.10.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* Describes all index options.
|
|
5
|
-
*/
|
|
6
|
-
interface IndexOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Indicates if this composite index must be unique or not.
|
|
9
|
-
*/
|
|
10
|
-
unique?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values.
|
|
13
|
-
* Works only in MySQL and PostgreSQL.
|
|
14
|
-
*/
|
|
15
|
-
spatial?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* The FULLTEXT modifier indexes the entire column and does not allow prefixing.
|
|
18
|
-
* Works only in MySQL.
|
|
19
|
-
*/
|
|
20
|
-
fulltext?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* NULL_FILTERED indexes are particularly useful for indexing sparse columns, where most rows contain a NULL value.
|
|
23
|
-
* In these cases, the NULL_FILTERED index can be considerably smaller and more efficient to maintain than
|
|
24
|
-
* a normal index that includes NULL values.
|
|
25
|
-
*
|
|
26
|
-
* Works only in Spanner.
|
|
27
|
-
*/
|
|
28
|
-
nullFiltered?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Fulltext parser.
|
|
31
|
-
* Works only in MySQL.
|
|
32
|
-
*/
|
|
33
|
-
parser?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Index filter condition.
|
|
36
|
-
*/
|
|
37
|
-
where?: string;
|
|
38
|
-
/**
|
|
39
|
-
* If true, the index only references documents with the specified field.
|
|
40
|
-
* These indexes use less space but behave differently in some situations (particularly sorts).
|
|
41
|
-
* This option is only supported for mongodb database.
|
|
42
|
-
*/
|
|
43
|
-
sparse?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Builds the index in the background so that building an index an does not block other database activities.
|
|
46
|
-
* This option is only supported for mongodb database.
|
|
47
|
-
*/
|
|
48
|
-
background?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Create the index using the CONCURRENTLY modifier
|
|
51
|
-
* Works only in postgres.
|
|
52
|
-
*/
|
|
53
|
-
concurrent?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Specifies a time to live, in seconds.
|
|
56
|
-
* This option is only supported for mongodb database.
|
|
57
|
-
*/
|
|
58
|
-
expireAfterSeconds?: number;
|
|
59
|
-
}
|
|
3
|
+
type ClassDecorator<Constructor extends IConstructor> = (target: Constructor) => Constructor | void;
|
|
60
4
|
|
|
61
|
-
|
|
62
|
-
* Describes all entity's options.
|
|
63
|
-
*/
|
|
64
|
-
interface EntityOptions {
|
|
65
|
-
/**
|
|
66
|
-
* Table name.
|
|
67
|
-
* If not specified then naming strategy will generate table name from entity name.
|
|
68
|
-
*/
|
|
69
|
-
name?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Specifies a default order by used for queries from this table when no explicit order by is specified.
|
|
72
|
-
*/
|
|
73
|
-
orderBy?: OrderByCondition | ((object: any) => OrderByCondition | any);
|
|
74
|
-
/**
|
|
75
|
-
* Table's database engine type (like "InnoDB", "MyISAM", etc).
|
|
76
|
-
* It is used only during table creation.
|
|
77
|
-
* If you update this value and table is already created, it will not change table's engine type.
|
|
78
|
-
* Note that not all databases support this option.
|
|
79
|
-
*/
|
|
80
|
-
engine?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Database name. Used in Mysql and Sql Server.
|
|
83
|
-
*/
|
|
84
|
-
database?: string;
|
|
85
|
-
/**
|
|
86
|
-
* Schema name. Used in Postgres and Sql Server.
|
|
87
|
-
*/
|
|
88
|
-
schema?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Indicates if schema synchronization is enabled or disabled for this entity.
|
|
91
|
-
* If it will be set to false then schema sync will and migrations ignore this entity.
|
|
92
|
-
* By default schema synchronization is enabled for all entities.
|
|
93
|
-
*/
|
|
94
|
-
synchronize?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* If set to 'true' this option disables Sqlite's default behaviour of secretly creating
|
|
97
|
-
* an integer primary key column named 'rowid' on table creation.
|
|
98
|
-
* @see https://www.sqlite.org/withoutrowid.html.
|
|
99
|
-
*/
|
|
100
|
-
withoutRowid?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Table comment. Not supported by all database types.
|
|
103
|
-
*/
|
|
104
|
-
comment?: string;
|
|
105
|
-
}
|
|
5
|
+
type PropertyDecorator<ClassPrototype> = (target: ClassPrototype, propertyKey: string | symbol) => void;
|
|
106
6
|
|
|
107
|
-
export type {
|
|
7
|
+
export type { ClassDecorator as C, PropertyDecorator as P };
|
package/vendor/TypeDef.12.d.ts
CHANGED
|
@@ -1,71 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DTO } from './TypeDef.4.js';
|
|
3
|
-
import { A as ActionPattern } from './TypeDef.6.js';
|
|
4
|
-
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
1
|
+
import { i as OrderByCondition } from './TypeDef.4.js';
|
|
5
2
|
|
|
6
3
|
/**
|
|
7
|
-
*
|
|
4
|
+
* Describes all index options.
|
|
8
5
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
6
|
+
interface IndexOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Indicates if this composite index must be unique or not.
|
|
9
|
+
*/
|
|
10
|
+
unique?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values.
|
|
13
|
+
* Works only in MySQL and PostgreSQL.
|
|
14
|
+
*/
|
|
15
|
+
spatial?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The FULLTEXT modifier indexes the entire column and does not allow prefixing.
|
|
18
|
+
* Works only in MySQL.
|
|
19
|
+
*/
|
|
20
|
+
fulltext?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* NULL_FILTERED indexes are particularly useful for indexing sparse columns, where most rows contain a NULL value.
|
|
23
|
+
* In these cases, the NULL_FILTERED index can be considerably smaller and more efficient to maintain than
|
|
24
|
+
* a normal index that includes NULL values.
|
|
25
|
+
*
|
|
26
|
+
* Works only in Spanner.
|
|
27
|
+
*/
|
|
28
|
+
nullFiltered?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Fulltext parser.
|
|
31
|
+
* Works only in MySQL.
|
|
32
|
+
*/
|
|
33
|
+
parser?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Index filter condition.
|
|
36
|
+
*/
|
|
37
|
+
where?: string;
|
|
38
|
+
/**
|
|
39
|
+
* If true, the index only references documents with the specified field.
|
|
40
|
+
* These indexes use less space but behave differently in some situations (particularly sorts).
|
|
41
|
+
* This option is only supported for mongodb database.
|
|
42
|
+
*/
|
|
43
|
+
sparse?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Builds the index in the background so that building an index an does not block other database activities.
|
|
46
|
+
* This option is only supported for mongodb database.
|
|
47
|
+
*/
|
|
48
|
+
background?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Create the index using the CONCURRENTLY modifier
|
|
51
|
+
* Works only in postgres.
|
|
52
|
+
*/
|
|
53
|
+
concurrent?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Specifies a time to live, in seconds.
|
|
56
|
+
* This option is only supported for mongodb database.
|
|
57
|
+
*/
|
|
58
|
+
expireAfterSeconds?: number;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
62
|
+
* Describes all entity's options.
|
|
58
63
|
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
interface EntityOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Table name.
|
|
67
|
+
* If not specified then naming strategy will generate table name from entity name.
|
|
68
|
+
*/
|
|
69
|
+
name?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Specifies a default order by used for queries from this table when no explicit order by is specified.
|
|
72
|
+
*/
|
|
73
|
+
orderBy?: OrderByCondition | ((object: any) => OrderByCondition | any);
|
|
74
|
+
/**
|
|
75
|
+
* Table's database engine type (like "InnoDB", "MyISAM", etc).
|
|
76
|
+
* It is used only during table creation.
|
|
77
|
+
* If you update this value and table is already created, it will not change table's engine type.
|
|
78
|
+
* Note that not all databases support this option.
|
|
79
|
+
*/
|
|
80
|
+
engine?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Database name. Used in Mysql and Sql Server.
|
|
83
|
+
*/
|
|
84
|
+
database?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Schema name. Used in Postgres and Sql Server.
|
|
87
|
+
*/
|
|
88
|
+
schema?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Indicates if schema synchronization is enabled or disabled for this entity.
|
|
91
|
+
* If it will be set to false then schema sync will and migrations ignore this entity.
|
|
92
|
+
* By default schema synchronization is enabled for all entities.
|
|
93
|
+
*/
|
|
94
|
+
synchronize?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* If set to 'true' this option disables Sqlite's default behaviour of secretly creating
|
|
97
|
+
* an integer primary key column named 'rowid' on table creation.
|
|
98
|
+
* @see https://www.sqlite.org/withoutrowid.html.
|
|
99
|
+
*/
|
|
100
|
+
withoutRowid?: boolean;
|
|
64
101
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @protected
|
|
102
|
+
* Table comment. Not supported by all database types.
|
|
67
103
|
*/
|
|
68
|
-
|
|
104
|
+
comment?: string;
|
|
69
105
|
}
|
|
70
106
|
|
|
71
|
-
export {
|
|
107
|
+
export type { EntityOptions as E, IndexOptions as I };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { P as Provider } from './TypeDef.3.js';
|
|
2
|
+
import { D as DTO } from './TypeDef.5.js';
|
|
3
|
+
import { A as ActionPattern } from './TypeDef.8.js';
|
|
4
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Context types
|
|
8
|
+
*/
|
|
9
|
+
declare enum ContextType {
|
|
10
|
+
CLI = "CLI",
|
|
11
|
+
HTTP = "HTTP",
|
|
12
|
+
SERVICE = "SERVICE"
|
|
13
|
+
}
|
|
14
|
+
type ContextParams<T extends {} = {}> = T & Record<string, any>;
|
|
15
|
+
/**
|
|
16
|
+
* Base context class
|
|
17
|
+
*/
|
|
18
|
+
declare class BaseContext<T extends Record<string, any> = {}> extends DTO {
|
|
19
|
+
readonly type: ContextType;
|
|
20
|
+
data: ActionPattern<T>;
|
|
21
|
+
constructor(params: ContextParams);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class CLIContext<T extends Record<string, any> = {}> extends BaseContext<T> {
|
|
25
|
+
readonly type: ContextType;
|
|
26
|
+
command: string;
|
|
27
|
+
constructor(params: ContextParams<{
|
|
28
|
+
readonly command: string;
|
|
29
|
+
readonly data: Record<string, any>;
|
|
30
|
+
}>);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare class HTTPContext<T extends Record<string, any> = {}> extends BaseContext<T> {
|
|
34
|
+
readonly type: ContextType;
|
|
35
|
+
readonly route: string;
|
|
36
|
+
readonly method: string;
|
|
37
|
+
readonly request: IncomingMessage;
|
|
38
|
+
readonly response: ServerResponse;
|
|
39
|
+
constructor(params: ContextParams<{
|
|
40
|
+
readonly route: string;
|
|
41
|
+
readonly method: string;
|
|
42
|
+
readonly request: IncomingMessage;
|
|
43
|
+
readonly response: ServerResponse;
|
|
44
|
+
readonly data: Record<string, any>;
|
|
45
|
+
}>);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class ServiceContext<T extends Record<string, any> = {}> extends BaseContext<T> {
|
|
49
|
+
readonly type: ContextType;
|
|
50
|
+
input: ActionPattern<T>;
|
|
51
|
+
constructor(params: ContextParams<{
|
|
52
|
+
readonly data: ActionPattern;
|
|
53
|
+
}>);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* For action decorator
|
|
58
|
+
*/
|
|
59
|
+
type ControllerProperty<ClassPrototype extends Controller> = Exclude<keyof ClassPrototype, keyof Controller>;
|
|
60
|
+
/**
|
|
61
|
+
* Controller base class
|
|
62
|
+
*/
|
|
63
|
+
declare class Controller extends Provider {
|
|
64
|
+
/**
|
|
65
|
+
* Context, possible be cli context, http context or service context
|
|
66
|
+
* @protected
|
|
67
|
+
*/
|
|
68
|
+
protected readonly context: CLIContext | HTTPContext | ServiceContext;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { BaseContext as B, Controller as C, HTTPContext as H, ServiceContext as S, type ControllerProperty as a, CLIContext as b, ContextType as c };
|