taon 21.0.29 → 21.0.32
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/browser/fesm2022/taon-browser.mjs +2 -14
- package/browser/fesm2022/taon-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon-browser.d.ts +73 -75
- package/browser-prod/fesm2022/taon-browser.mjs +770 -788
- package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
- package/browser-prod/package.json +23 -0
- package/browser-prod/types/taon-browser.d.ts +493 -513
- package/browser-prod.split-namespaces.json +186 -0
- package/icon-menu-taon.svg +15 -15
- package/lib/base-classes/base-controller.d.ts +2 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/decorators/http/http-decorators.d.ts +2 -1
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib/decorators/http/http-params-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +2 -1
- package/lib/endpoint-context.js.map +1 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +2 -3
- package/lib/models.js +0 -7
- package/lib/models.js.map +1 -1
- package/lib/package.json +4 -0
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-class.js +1 -1
- package/lib-prod/base-classes/base-class.js.map +1 -1
- package/lib-prod/base-classes/base-context.d.ts +1 -1
- package/lib-prod/base-classes/base-controller.d.ts +5 -4
- package/lib-prod/base-classes/base-controller.js +2 -2
- package/lib-prod/base-classes/base-controller.js.map +1 -1
- package/lib-prod/base-classes/base-crud-controller.d.ts +13 -13
- package/lib-prod/base-classes/base-crud-controller.js +8 -9
- package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
- package/lib-prod/base-classes/base-injector.js +11 -11
- package/lib-prod/base-classes/base-injector.js.map +1 -1
- package/lib-prod/base-classes/base-middleware.d.ts +2 -2
- package/lib-prod/base-classes/base-migration.js +3 -3
- package/lib-prod/base-classes/base-migration.js.map +1 -1
- package/lib-prod/base-classes/base-repository.js +4 -4
- package/lib-prod/base-classes/base-repository.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/config/method-config.d.ts +2 -2
- package/lib-prod/config/param-config.d.ts +2 -2
- package/lib-prod/context-db-migrations.js +12 -12
- package/lib-prod/context-db-migrations.js.map +1 -1
- package/lib-prod/create-context.d.ts +5 -5
- package/lib-prod/create-context.js +3 -3
- package/lib-prod/create-context.js.map +1 -1
- package/lib-prod/decorators/classes/controller-decorator.js +3 -3
- package/lib-prod/decorators/classes/controller-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/entity-decorator.d.ts +3 -3
- package/lib-prod/decorators/classes/entity-decorator.js +5 -5
- package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/middleware-decorator.js +3 -3
- package/lib-prod/decorators/classes/middleware-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/migration-decorator.js +3 -3
- package/lib-prod/decorators/classes/migration-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/provider-decorator.js +3 -3
- package/lib-prod/decorators/classes/provider-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/repository-decorator.js +3 -3
- package/lib-prod/decorators/classes/repository-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/subscriber-decorator.js +3 -3
- package/lib-prod/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib-prod/decorators/http/http-decorators.d.ts +3 -2
- package/lib-prod/decorators/http/http-decorators.js +2 -2
- package/lib-prod/decorators/http/http-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-methods-decorators.d.ts +5 -5
- package/lib-prod/decorators/http/http-methods-decorators.js +2 -2
- package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-params-decorators.js +1 -1
- package/lib-prod/decorators/http/http-params-decorators.js.map +1 -1
- package/lib-prod/endpoint-context-storage.js +1 -1
- package/lib-prod/endpoint-context-storage.js.map +1 -1
- package/lib-prod/endpoint-context.d.ts +14 -13
- package/lib-prod/endpoint-context.js +171 -171
- package/lib-prod/endpoint-context.js.map +1 -1
- package/lib-prod/entity-process.js +14 -14
- package/lib-prod/entity-process.js.map +1 -1
- package/lib-prod/formly/fromly.d.ts +2 -2
- package/lib-prod/formly/fromly.js +1 -1
- package/lib-prod/formly/fromly.js.map +1 -1
- package/lib-prod/formly/type-from-entity.js +2 -2
- package/lib-prod/formly/type-from-entity.js.map +1 -1
- package/lib-prod/get-response-value.d.ts +2 -2
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.d.ts +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.d.ts +3 -3
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +0 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js.map +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js.map +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.d.ts +1 -3
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +12 -12
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js.map +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.d.ts +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.d.ts +2 -2
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +0 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js.map +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.d.ts +1 -3
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -8
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js.map +1 -1
- package/lib-prod/helpers/class-helpers.d.ts +20 -22
- package/lib-prod/helpers/class-helpers.js +231 -218
- package/lib-prod/helpers/class-helpers.js.map +1 -1
- package/lib-prod/helpers/taon-helpers.d.ts +14 -16
- package/lib-prod/helpers/taon-helpers.js +148 -138
- package/lib-prod/helpers/taon-helpers.js.map +1 -1
- package/lib-prod/index.d.ts +80 -84
- package/lib-prod/index.js +71 -70
- package/lib-prod/index.js.map +1 -1
- package/lib-prod/inject.js +3 -3
- package/lib-prod/inject.js.map +1 -1
- package/lib-prod/models.d.ts +242 -247
- package/lib-prod/models.js +83 -91
- package/lib-prod/models.js.map +1 -1
- package/lib-prod/package.json +4 -0
- package/lib-prod/realtime/realtime-client.d.ts +2 -2
- package/lib-prod/realtime/realtime-client.js +9 -9
- package/lib-prod/realtime/realtime-client.js.map +1 -1
- package/lib-prod/realtime/realtime-server.js +17 -17
- package/lib-prod/realtime/realtime-server.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +3 -3
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +2 -2
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +2 -2
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib-prod/realtime/realtime-subs-manager.d.ts +2 -2
- package/lib-prod/realtime/realtime-subs-manager.js +6 -6
- package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
- package/lib-prod/realtime/realtime.models.d.ts +23 -25
- package/lib-prod/realtime/realtime.models.js +1 -0
- package/lib-prod/realtime/realtime.models.js.map +1 -1
- package/lib-prod/symbols.d.ts +39 -41
- package/lib-prod/symbols.js +44 -45
- package/lib-prod/symbols.js.map +1 -1
- package/lib-prod/ui/index.d.ts +1 -1
- package/lib-prod/ui/index.js +2 -2
- package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/validators.d.ts +4 -6
- package/lib-prod/validators.js +50 -47
- package/lib-prod/validators.js.map +1 -1
- package/lib-prod.split-namespaces.json +188 -0
- package/package.json +28 -6
- package/websql/fesm2022/taon-websql.mjs +2 -10
- package/websql/fesm2022/taon-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon-websql.d.ts +73 -75
- package/websql-prod/fesm2022/taon-websql.mjs +855 -870
- package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
- package/websql-prod/package.json +23 -0
- package/websql-prod/types/taon-websql.d.ts +496 -516
- package/websql-prod.split-namespaces.json +188 -0
- package/migrations/index.d.ts +0 -1
- package/migrations/index.js +0 -19
- package/migrations/index.js.map +0 -1
- package/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/migrations/migrations_index._auto-generated_.js +0 -4
- package/migrations/migrations_index._auto-generated_.js.map +0 -1
package/lib-prod/models.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RequestHandler } from 'express';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { RestResponseWrapper, Models_HttpResponse as ModelsNg2Rest_HttpResponse, Models_Ng2RestAxiosRequestConfig as ModelsNg2Rest_Ng2RestAxiosRequestConfig, Models_PromiseObservableMix as ModelsNg2Rest_PromiseObservableMix } from 'ng2-rest/lib-prod';
|
|
3
|
+
import { CoreModels_DatabaseType } from 'tnp-core/lib-prod';
|
|
4
4
|
import type { EndpointContext } from './endpoint-context';
|
|
5
5
|
import { ExpressRequest, ExpressResponse } from './express-types';
|
|
6
6
|
export declare class TaonRestResponseWrapper extends RestResponseWrapper {
|
|
@@ -8,253 +8,248 @@ export declare class TaonRestResponseWrapper extends RestResponseWrapper {
|
|
|
8
8
|
export declare const BaseTaonClassesNames: readonly ["BaseCrudController", "BaseController", "BaseAbstractEntity", "BaseEntity", "BaseContext", "BaseCustomRepository", "BaseFileUploadMiddleware", "BaseMiddleware", "BaseClass", "BaseInjector", "BaseMigration", "BaseProvider", "BaseRepository", "BaseSubscriberForEntity", "BaseCliWorkerController", "PortsController", "PortsContext"];
|
|
9
9
|
export declare const TaonTempDatabasesFolder = "databases";
|
|
10
10
|
export declare const TaonTempRoutesFolder = "routes";
|
|
11
|
-
export declare
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
export declare const Models_DatabasesFolder = "databases";
|
|
12
|
+
export type Models_FrameworkMode = 'backend-frontend(tcp+udp)' | 'remote-backend(tcp+udp)' | 'backend-frontend(ipc-electron)' | 'backend-frontend(websql-electron)' | 'backend-frontend(websql)';
|
|
13
|
+
export declare enum Models_ClassType {
|
|
14
|
+
ENTITY = "ENTITY",
|
|
15
|
+
CONTROLLER = "CONTROLLER",
|
|
16
|
+
REPOSITORY = "REPOSITORY",
|
|
17
|
+
PROVIDER = "PROVIDER",
|
|
18
|
+
SUBSCRIBER = "SUBSCRIBER",
|
|
19
|
+
MIGRATION = "MIGRATION",
|
|
20
|
+
MIDDLEWARE = "MIDDLEWARE"
|
|
21
|
+
}
|
|
22
|
+
export declare const Models_ClassTypeKey: { [key in Models_ClassType]: keyof Models_ContextOptions<any, any, any, any, any, any, any, any>; };
|
|
23
|
+
export type Models_MiddlewareType = [Function, any[]];
|
|
24
|
+
/**
|
|
25
|
+
* DROP_DB+MIGRATIONS (default for development)
|
|
26
|
+
* Drop all tables + recreate them + run migrations
|
|
27
|
+
* synchronize: true , dropSchema: true
|
|
28
|
+
* use migrations: true
|
|
29
|
+
*
|
|
30
|
+
* MIGRATIONS (default for production)
|
|
31
|
+
* Do not drop tables, only run migrations
|
|
32
|
+
* synchronize: false, dropSchema: false
|
|
33
|
+
* use migrations: true
|
|
34
|
+
*/
|
|
35
|
+
export type Models_DBRecreateMode = 'DROP_DB+MIGRATIONS' | 'PRESERVE_DATA+MIGRATIONS';
|
|
36
|
+
export declare class Models_DatabaseConfigTypeOrm {
|
|
37
|
+
/**
|
|
38
|
+
* database name
|
|
39
|
+
*/
|
|
40
|
+
database?: string;
|
|
41
|
+
/**
|
|
42
|
+
* only for file base db: sqlite, sqljs
|
|
43
|
+
*/
|
|
44
|
+
location?: string;
|
|
45
|
+
synchronize: boolean;
|
|
46
|
+
dropSchema: boolean;
|
|
47
|
+
type?: CoreModels_DatabaseType;
|
|
25
48
|
/**
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
* Persists db on disk/local-storage if serverless db
|
|
50
|
+
*/
|
|
51
|
+
autoSave?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* for websql db mode
|
|
54
|
+
* true by default
|
|
55
|
+
*/
|
|
56
|
+
useLocalForage?: boolean;
|
|
57
|
+
logging: boolean;
|
|
58
|
+
databasePort?: number;
|
|
59
|
+
databaseHost?: string;
|
|
60
|
+
databaseUsername?: string;
|
|
61
|
+
databasePassword?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare class Models_DatabaseConfig extends Models_DatabaseConfigTypeOrm {
|
|
64
|
+
/**
|
|
65
|
+
* Default value 'DROP_ALL'.
|
|
30
66
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* synchronize: false, dropSchema: false
|
|
34
|
-
* use migrations: true
|
|
67
|
+
* Tell framework what is happening with db
|
|
68
|
+
* when context is starting.
|
|
35
69
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
70
|
+
recreateMode?: Models_DBRecreateMode;
|
|
71
|
+
static from(databasePartialConfig: Partial<Omit<Models_DatabaseConfig, 'synchronize' | 'dropSchema' | 'databaseConfigTypeORM'>>): Models_DatabaseConfig;
|
|
72
|
+
get databaseConfigTypeORM(): Models_DatabaseConfigTypeOrm;
|
|
73
|
+
}
|
|
74
|
+
export type Models_ISession = {
|
|
75
|
+
secret?: string;
|
|
76
|
+
saveUninitialized?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* max age of session
|
|
79
|
+
*/
|
|
80
|
+
cookieMaxAge?: number;
|
|
81
|
+
secure?: boolean;
|
|
82
|
+
resave?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type Models_ConnectionOptionsLogs = {
|
|
85
|
+
http?: boolean;
|
|
86
|
+
realtime?: boolean;
|
|
87
|
+
framework?: boolean;
|
|
88
|
+
db?: boolean;
|
|
89
|
+
migrations?: boolean;
|
|
90
|
+
routes?: boolean;
|
|
91
|
+
};
|
|
92
|
+
export interface Models_ContextOptions<CONTEXTS, CONTROLLERS, ENTITIES, REPOSITORIES, PROVIDERS, SUBSCRIBERS, MIGRATIONS, MIDDLEWARES> {
|
|
93
|
+
appId?: string;
|
|
94
|
+
contextName: string;
|
|
95
|
+
/**
|
|
96
|
+
* if defined and different from contextName
|
|
97
|
+
* - context will NOT be initialized
|
|
98
|
+
*/
|
|
99
|
+
activeContext?: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
102
|
+
* host/port for initing backend server
|
|
103
|
+
*/
|
|
104
|
+
host?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Needs to be specified in docker environment only
|
|
107
|
+
*/
|
|
108
|
+
hostPortNumber?: number;
|
|
109
|
+
/**
|
|
110
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
111
|
+
* frontend host only needed when we are
|
|
112
|
+
* using withCredentials for axios
|
|
113
|
+
* and session cookie
|
|
114
|
+
* or realtime communication
|
|
115
|
+
*/
|
|
116
|
+
frontendHost?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Needs to be specified in docker environment only
|
|
119
|
+
*/
|
|
120
|
+
frontendHostPortNumber?: number;
|
|
121
|
+
/**
|
|
122
|
+
* User ipc for communication between BE/FE
|
|
123
|
+
* when electron is used as a platform
|
|
124
|
+
* Default: true
|
|
125
|
+
*/
|
|
126
|
+
useIpcWhenElectron?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* taon contexts here
|
|
129
|
+
* (module like structure)
|
|
130
|
+
*/
|
|
131
|
+
contexts?: CONTEXTS;
|
|
132
|
+
/**
|
|
133
|
+
* taon controller here
|
|
134
|
+
* (glue between frontend and backend)
|
|
135
|
+
*/
|
|
136
|
+
controllers?: CONTROLLERS;
|
|
137
|
+
/**
|
|
138
|
+
* taon entities
|
|
139
|
+
* (entities are used to create tables in db)
|
|
140
|
+
*/
|
|
141
|
+
entities?: ENTITIES;
|
|
142
|
+
/**
|
|
143
|
+
* taon repositories
|
|
144
|
+
* (repositories are used to access data from db)
|
|
145
|
+
*/
|
|
146
|
+
repositories?: REPOSITORIES;
|
|
147
|
+
/**
|
|
148
|
+
* taon providers
|
|
149
|
+
* (context singletons)
|
|
150
|
+
*/
|
|
151
|
+
providers?: PROVIDERS;
|
|
152
|
+
/**
|
|
153
|
+
* taon subscribers
|
|
154
|
+
* (subscribers are used to listen to db events)
|
|
155
|
+
*/
|
|
156
|
+
subscribers?: SUBSCRIBERS;
|
|
157
|
+
/**
|
|
158
|
+
* taon migrations
|
|
159
|
+
* (migrations are used to update db schema and achieve proper CI/CD)
|
|
160
|
+
*/
|
|
161
|
+
migrations?: MIGRATIONS;
|
|
162
|
+
/**
|
|
163
|
+
* taon middlewares
|
|
164
|
+
* middlewares are used to intercept requests
|
|
165
|
+
* and responses in the context
|
|
166
|
+
*/
|
|
167
|
+
middlewares?: MIDDLEWARES;
|
|
168
|
+
/**
|
|
169
|
+
* Config for express session
|
|
170
|
+
*/
|
|
171
|
+
session?: Models_ISession;
|
|
172
|
+
/**
|
|
173
|
+
* taon is not going to write .rest files to cwd()
|
|
174
|
+
*/
|
|
175
|
+
skipWritingServerRoutes?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* TODO - this is still in progress
|
|
178
|
+
* @deprecated
|
|
179
|
+
*/
|
|
180
|
+
productionMode?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* If you want your context to never be started as separated server
|
|
183
|
+
* use abstract: true
|
|
184
|
+
* @default: false
|
|
185
|
+
*/
|
|
186
|
+
abstract?: boolean;
|
|
187
|
+
logs?: boolean | Models_ConnectionOptionsLogs;
|
|
188
|
+
database?: boolean | Partial<Models_DatabaseConfig>;
|
|
189
|
+
/**
|
|
190
|
+
* disable default realtime communication through TCP upgrade sockets
|
|
191
|
+
*/
|
|
192
|
+
disabledRealtime?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Will be removed soon - cloud will handle certs and https
|
|
195
|
+
* @deprecated
|
|
196
|
+
*/
|
|
197
|
+
https?: {
|
|
198
|
+
key: string;
|
|
199
|
+
cert: string;
|
|
92
200
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
repositories?: REPOSITORIES;
|
|
148
|
-
/**
|
|
149
|
-
* taon providers
|
|
150
|
-
* (context singletons)
|
|
151
|
-
*/
|
|
152
|
-
providers?: PROVIDERS;
|
|
153
|
-
/**
|
|
154
|
-
* taon subscribers
|
|
155
|
-
* (subscribers are used to listen to db events)
|
|
156
|
-
*/
|
|
157
|
-
subscribers?: SUBSCRIBERS;
|
|
158
|
-
/**
|
|
159
|
-
* taon migrations
|
|
160
|
-
* (migrations are used to update db schema and achieve proper CI/CD)
|
|
161
|
-
*/
|
|
162
|
-
migrations?: MIGRATIONS;
|
|
163
|
-
/**
|
|
164
|
-
* taon middlewares
|
|
165
|
-
* middlewares are used to intercept requests
|
|
166
|
-
* and responses in the context
|
|
167
|
-
*/
|
|
168
|
-
middlewares?: MIDDLEWARES;
|
|
169
|
-
/**
|
|
170
|
-
* Config for express session
|
|
171
|
-
*/
|
|
172
|
-
session?: ISession;
|
|
173
|
-
/**
|
|
174
|
-
* taon is not going to write .rest files to cwd()
|
|
175
|
-
*/
|
|
176
|
-
skipWritingServerRoutes?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* TODO - this is still in progress
|
|
179
|
-
* @deprecated
|
|
180
|
-
*/
|
|
181
|
-
productionMode?: boolean;
|
|
182
|
-
/**
|
|
183
|
-
* If you want your context to never be started as separated server
|
|
184
|
-
* use abstract: true
|
|
185
|
-
* @default: false
|
|
186
|
-
*/
|
|
187
|
-
abstract?: boolean;
|
|
188
|
-
logs?: boolean | ConnectionOptionsLogs;
|
|
189
|
-
database?: boolean | Partial<DatabaseConfig>;
|
|
190
|
-
/**
|
|
191
|
-
* disable default realtime communication through TCP upgrade sockets
|
|
192
|
-
*/
|
|
193
|
-
disabledRealtime?: boolean;
|
|
194
|
-
/**
|
|
195
|
-
* Will be removed soon - cloud will handle certs and https
|
|
196
|
-
* @deprecated
|
|
197
|
-
*/
|
|
198
|
-
https?: {
|
|
199
|
-
key: string;
|
|
200
|
-
cert: string;
|
|
201
|
-
};
|
|
202
|
-
/**
|
|
203
|
-
* TODO - will be removed soon
|
|
204
|
-
* @deprecated
|
|
205
|
-
*/
|
|
206
|
-
publicAssets?: {
|
|
207
|
-
serverPath: string;
|
|
208
|
-
locationOnDisk: string;
|
|
209
|
-
}[];
|
|
210
|
-
/**
|
|
211
|
-
* by default cwd === process.cwd()
|
|
212
|
-
*/
|
|
213
|
-
cwd?: string;
|
|
214
|
-
}
|
|
215
|
-
namespace Http {
|
|
216
|
-
export import Rest = ModelsNg2Rest;
|
|
217
|
-
type ContextENDPOINT = {
|
|
218
|
-
target: Function;
|
|
219
|
-
initFN: Function;
|
|
220
|
-
};
|
|
221
|
-
type FormlyFromType = 'material' | 'bootstrap';
|
|
222
|
-
type ExpressContext<T> = (req: ExpressRequest<any>, res: ExpressResponse<any>) => T;
|
|
223
|
-
type SyncResponse<T> = string | T;
|
|
224
|
-
type ResponseFuncOpt<T> = {
|
|
225
|
-
limitSize?: (enties: Function | Function[], include: string[], exclude: string[]) => void;
|
|
226
|
-
};
|
|
227
|
-
type SyncResponseFunc<T> = (options?: ResponseFuncOpt<T>) => SyncResponse<T>;
|
|
228
|
-
type MixResponse<T> = SyncResponse<T> | ExpressContext<T>;
|
|
229
|
-
interface ClientAction<T> {
|
|
230
|
-
/**
|
|
231
|
-
* @deprecated use request() mehods instead
|
|
232
|
-
*/
|
|
233
|
-
readonly received?: Rest.PromiseObservableMix<Rest.HttpResponse<T>>;
|
|
234
|
-
request?(axiosConfig?: ModelsNg2Rest.Ng2RestAxiosRequestConfig): Rest.PromiseObservableMix<Rest.HttpResponse<T>>;
|
|
235
|
-
}
|
|
236
|
-
interface AsyncResponse<T> {
|
|
237
|
-
(req?: ExpressRequest<any>, res?: ExpressResponse<any>): Promise<SyncResponse<T> | SyncResponseFunc<T>>;
|
|
238
|
-
}
|
|
239
|
-
type Response<T = string> = AsyncResponse<T> & ClientAction<T>;
|
|
240
|
-
interface AuthCallBack {
|
|
241
|
-
(methodReference: Function): RequestHandler;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
interface StartParams {
|
|
245
|
-
port: number;
|
|
246
|
-
args: string[];
|
|
247
|
-
onlyMigrationRun?: boolean;
|
|
248
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
249
|
-
}
|
|
250
|
-
interface TaonInitializeParams {
|
|
251
|
-
onlyMigrationRun?: boolean;
|
|
252
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
253
|
-
}
|
|
254
|
-
interface TaonCtxCloneParams {
|
|
255
|
-
useAsRemoteContext?: boolean;
|
|
256
|
-
overrideRemoteHost?: string;
|
|
257
|
-
overrideHost?: string;
|
|
258
|
-
sourceContext?: EndpointContext;
|
|
259
|
-
}
|
|
201
|
+
/**
|
|
202
|
+
* TODO - will be removed soon
|
|
203
|
+
* @deprecated
|
|
204
|
+
*/
|
|
205
|
+
publicAssets?: {
|
|
206
|
+
serverPath: string;
|
|
207
|
+
locationOnDisk: string;
|
|
208
|
+
}[];
|
|
209
|
+
/**
|
|
210
|
+
* by default cwd === process.cwd()
|
|
211
|
+
*/
|
|
212
|
+
cwd?: string;
|
|
213
|
+
}
|
|
214
|
+
export type Models_Http_ContextENDPOINT = {
|
|
215
|
+
target: Function;
|
|
216
|
+
initFN: Function;
|
|
217
|
+
};
|
|
218
|
+
export type Models_Http_FormlyFromType = 'material' | 'bootstrap';
|
|
219
|
+
export type Models_Http_ExpressContext<T> = (req: ExpressRequest<any>, res: ExpressResponse<any>) => T;
|
|
220
|
+
export type Models_Http_SyncResponse<T> = string | T;
|
|
221
|
+
export type Models_Http_ResponseFuncOpt<T> = {
|
|
222
|
+
limitSize?: (enties: Function | Function[], include: string[], exclude: string[]) => void;
|
|
223
|
+
};
|
|
224
|
+
export type Models_Http_SyncResponseFunc<T> = (options?: Models_Http_ResponseFuncOpt<T>) => Models_Http_SyncResponse<T>;
|
|
225
|
+
export type Models_Http_MixResponse<T> = Models_Http_SyncResponse<T> | Models_Http_ExpressContext<T>;
|
|
226
|
+
export interface Models_Http_ClientAction<T> {
|
|
227
|
+
/**
|
|
228
|
+
* @deprecated use request() mehods instead
|
|
229
|
+
*/
|
|
230
|
+
readonly received?: ModelsNg2Rest_PromiseObservableMix<ModelsNg2Rest_HttpResponse<T>>;
|
|
231
|
+
request?(axiosConfig?: ModelsNg2Rest_Ng2RestAxiosRequestConfig): ModelsNg2Rest_PromiseObservableMix<ModelsNg2Rest_HttpResponse<T>>;
|
|
232
|
+
}
|
|
233
|
+
export interface Models_Http_AsyncResponse<T> {
|
|
234
|
+
(req?: ExpressRequest<any>, res?: ExpressResponse<any>): Promise<Models_Http_SyncResponse<T> | Models_Http_SyncResponseFunc<T>>;
|
|
235
|
+
}
|
|
236
|
+
export type Models_Http_Response<T = string> = Models_Http_AsyncResponse<T> & Models_Http_ClientAction<T>;
|
|
237
|
+
export interface Models_Http_AuthCallBack {
|
|
238
|
+
(methodReference: Function): RequestHandler;
|
|
239
|
+
}
|
|
240
|
+
export interface Models_StartParams {
|
|
241
|
+
port: number;
|
|
242
|
+
args: string[];
|
|
243
|
+
onlyMigrationRun?: boolean;
|
|
244
|
+
onlyMigrationRevertToTimestamp?: number;
|
|
245
|
+
}
|
|
246
|
+
export interface Models_TaonInitializeParams {
|
|
247
|
+
onlyMigrationRun?: boolean;
|
|
248
|
+
onlyMigrationRevertToTimestamp?: number;
|
|
249
|
+
}
|
|
250
|
+
export interface Models_TaonCtxCloneParams {
|
|
251
|
+
useAsRemoteContext?: boolean;
|
|
252
|
+
overrideRemoteHost?: string;
|
|
253
|
+
overrideHost?: string;
|
|
254
|
+
sourceContext?: EndpointContext;
|
|
260
255
|
}
|