taon 19.0.86 → 21.0.6
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.mjs +1953 -1238
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon.d.ts +2152 -0
- package/lib/base-classes/base-abstract-entity.d.ts +1 -1
- package/lib/base-classes/base-abstract-entity.js +12 -12
- package/lib/base-classes/base-abstract-entity.js.map +1 -1
- package/lib/base-classes/base-angular-service.d.ts +1 -1
- package/lib/base-classes/base-angular-service.js +6 -3
- package/lib/base-classes/base-angular-service.js.map +1 -1
- package/lib/base-classes/base-context.d.ts +2 -2
- package/lib/base-classes/base-controller.js +7 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/base-classes/base-crud-controller.js +52 -12
- package/lib/base-classes/base-crud-controller.js.map +1 -1
- package/lib/base-classes/base-entity.js +2 -6
- package/lib/base-classes/base-entity.js.map +1 -1
- package/lib/base-classes/base-repository.d.ts +1 -1
- package/lib/base-classes/base-repository.js +15 -10
- package/lib/base-classes/base-repository.js.map +1 -1
- package/lib/base-classes/base.d.ts +1 -46
- package/lib/base-classes/base.js +17 -30
- package/lib/base-classes/base.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/build-info._auto-generated_.js.map +1 -1
- package/lib/create-context.d.ts +4 -4
- package/lib/decorators/classes/entity-decorator.js +1 -1
- package/lib/decorators/classes/entity-decorator.js.map +1 -1
- package/lib/decorators/http/http-decorators.d.ts +1 -19
- package/lib/decorators/http/http-decorators.js +20 -22
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +2 -2
- package/lib/formly/{formly-group-wrapper-component.d.ts → formly-group-wrapper.component.d.ts} +1 -1
- package/lib/formly/{formly-repeat-component.d.ts → formly-repeat.component.d.ts} +1 -1
- package/lib/formly/fromly.js +24 -24
- package/lib/formly/fromly.js.map +1 -1
- package/lib/index.d.ts +146 -45
- package/lib/index.js +166 -55
- package/lib/index.js.map +1 -1
- package/lib/orm/columns.d.ts +28 -0
- package/lib/orm/columns.js +102 -0
- package/lib/orm/columns.js.map +1 -0
- package/lib/orm/index.d.ts +1 -0
- package/lib/orm/index.js +73 -0
- package/lib/orm/index.js.map +1 -0
- package/lib/realtime/realtime-core.d.ts +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +1 -2
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy.d.ts +1 -1
- package/lib/realtime/realtime-subs-manager.d.ts +1 -1
- package/lib/symbols.d.ts +31 -31
- package/lib/symbols.js +59 -59
- package/lib/symbols.js.map +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/package.json +6 -6
- package/websql/fesm2022/taon.mjs +1316 -648
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon.d.ts +2161 -0
- package/browser/index.d.ts +0 -6
- package/browser/lib/base-classes/base-abstract-entity.d.ts +0 -8
- package/browser/lib/base-classes/base-angular-service.d.ts +0 -34
- package/browser/lib/base-classes/base-class.d.ts +0 -16
- package/browser/lib/base-classes/base-context.d.ts +0 -21
- package/browser/lib/base-classes/base-controller.d.ts +0 -83
- package/browser/lib/base-classes/base-crud-controller.d.ts +0 -29
- package/browser/lib/base-classes/base-custom-repository.d.ts +0 -4
- package/browser/lib/base-classes/base-entity.d.ts +0 -17
- package/browser/lib/base-classes/base-file-upload.middleware.d.ts +0 -15
- package/browser/lib/base-classes/base-injector.d.ts +0 -68
- package/browser/lib/base-classes/base-middleware.d.ts +0 -39
- package/browser/lib/base-classes/base-migration.d.ts +0 -12
- package/browser/lib/base-classes/base-provider.d.ts +0 -9
- package/browser/lib/base-classes/base-repository.d.ts +0 -267
- package/browser/lib/base-classes/base-subscriber-for-entity.d.ts +0 -82
- package/browser/lib/base-classes/base.d.ts +0 -47
- package/browser/lib/config/controller-config.d.ts +0 -22
- package/browser/lib/config/controller-options.d.ts +0 -17
- package/browser/lib/config/method-config.d.ts +0 -40
- package/browser/lib/config/param-config.d.ts +0 -9
- package/browser/lib/constants.d.ts +0 -10
- package/browser/lib/context-db-migrations.d.ts +0 -18
- package/browser/lib/create-context.d.ts +0 -79
- package/browser/lib/decorators/classes/controller-decorator.d.ts +0 -6
- package/browser/lib/decorators/classes/entity-decorator.d.ts +0 -20
- package/browser/lib/decorators/classes/middleware-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/migration-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/provider-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/repository-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/subscriber-decorator.d.ts +0 -9
- package/browser/lib/decorators/decorator-abstract-opt.d.ts +0 -4
- package/browser/lib/decorators/http/http-decorators.d.ts +0 -21
- package/browser/lib/decorators/http/http-methods-decorators.d.ts +0 -71
- package/browser/lib/decorators/http/http-params-decorators.d.ts +0 -9
- package/browser/lib/dependency-injection/di-container.d.ts +0 -6
- package/browser/lib/endpoint-context-storage.d.ts +0 -12
- package/browser/lib/endpoint-context.d.ts +0 -198
- package/browser/lib/entity-process.d.ts +0 -40
- package/browser/lib/get-response-value.d.ts +0 -7
- package/browser/lib/helpers/class-helpers.d.ts +0 -25
- package/browser/lib/helpers/clone-obj.d.ts +0 -2
- package/browser/lib/helpers/taon-helpers.d.ts +0 -19
- package/browser/lib/index.d.ts +0 -129
- package/browser/lib/inject.d.ts +0 -5
- package/browser/lib/models.d.ts +0 -257
- package/browser/lib/orm.d.ts +0 -3
- package/browser/lib/realtime/realtime-client.d.ts +0 -42
- package/browser/lib/realtime/realtime-core.d.ts +0 -41
- package/browser/lib/realtime/realtime-server.d.ts +0 -44
- package/browser/lib/realtime/realtime-strategy/index.d.ts +0 -5
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -82
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -15
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
- package/browser/lib/realtime/realtime-strategy/realtime-strategy.d.ts +0 -12
- package/browser/lib/realtime/realtime-subs-manager.d.ts +0 -15
- package/browser/lib/realtime/realtime.models.d.ts +0 -28
- package/browser/lib/symbols.d.ts +0 -66
- package/browser/lib/ui/index.d.ts +0 -2
- package/browser/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -2
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +0 -22
- package/browser/lib/validators.d.ts +0 -8
- package/browser/public-api.d.ts +0 -2
- package/lib/formly/formly-group-wrapper-component.js +0 -51
- package/lib/formly/formly-group-wrapper-component.js.map +0 -1
- package/lib/formly/formly-repeat-component.js +0 -95
- package/lib/formly/formly-repeat-component.js.map +0 -1
- package/lib/orm.d.ts +0 -68
- package/lib/orm.js +0 -112
- package/lib/orm.js.map +0 -1
- package/websql/index.d.ts +0 -6
- package/websql/lib/base-classes/base-abstract-entity.d.ts +0 -8
- package/websql/lib/base-classes/base-angular-service.d.ts +0 -34
- package/websql/lib/base-classes/base-class.d.ts +0 -16
- package/websql/lib/base-classes/base-context.d.ts +0 -21
- package/websql/lib/base-classes/base-controller.d.ts +0 -83
- package/websql/lib/base-classes/base-crud-controller.d.ts +0 -29
- package/websql/lib/base-classes/base-custom-repository.d.ts +0 -4
- package/websql/lib/base-classes/base-entity.d.ts +0 -17
- package/websql/lib/base-classes/base-file-upload.middleware.d.ts +0 -15
- package/websql/lib/base-classes/base-injector.d.ts +0 -68
- package/websql/lib/base-classes/base-middleware.d.ts +0 -39
- package/websql/lib/base-classes/base-migration.d.ts +0 -12
- package/websql/lib/base-classes/base-provider.d.ts +0 -9
- package/websql/lib/base-classes/base-repository.d.ts +0 -272
- package/websql/lib/base-classes/base-subscriber-for-entity.d.ts +0 -82
- package/websql/lib/base-classes/base.d.ts +0 -47
- package/websql/lib/config/controller-config.d.ts +0 -22
- package/websql/lib/config/controller-options.d.ts +0 -17
- package/websql/lib/config/method-config.d.ts +0 -40
- package/websql/lib/config/param-config.d.ts +0 -9
- package/websql/lib/constants.d.ts +0 -10
- package/websql/lib/context-db-migrations.d.ts +0 -18
- package/websql/lib/create-context.d.ts +0 -79
- package/websql/lib/decorators/classes/controller-decorator.d.ts +0 -6
- package/websql/lib/decorators/classes/entity-decorator.d.ts +0 -20
- package/websql/lib/decorators/classes/middleware-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/migration-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/provider-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/repository-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/subscriber-decorator.d.ts +0 -9
- package/websql/lib/decorators/decorator-abstract-opt.d.ts +0 -4
- package/websql/lib/decorators/http/http-decorators.d.ts +0 -21
- package/websql/lib/decorators/http/http-methods-decorators.d.ts +0 -71
- package/websql/lib/decorators/http/http-params-decorators.d.ts +0 -9
- package/websql/lib/dependency-injection/di-container.d.ts +0 -6
- package/websql/lib/endpoint-context-storage.d.ts +0 -12
- package/websql/lib/endpoint-context.d.ts +0 -200
- package/websql/lib/entity-process.d.ts +0 -40
- package/websql/lib/get-response-value.d.ts +0 -7
- package/websql/lib/helpers/class-helpers.d.ts +0 -25
- package/websql/lib/helpers/clone-obj.d.ts +0 -2
- package/websql/lib/helpers/taon-helpers.d.ts +0 -19
- package/websql/lib/index.d.ts +0 -129
- package/websql/lib/inject.d.ts +0 -5
- package/websql/lib/models.d.ts +0 -261
- package/websql/lib/orm.d.ts +0 -69
- package/websql/lib/realtime/realtime-client.d.ts +0 -42
- package/websql/lib/realtime/realtime-core.d.ts +0 -41
- package/websql/lib/realtime/realtime-server.d.ts +0 -44
- package/websql/lib/realtime/realtime-strategy/index.d.ts +0 -5
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -82
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -15
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
- package/websql/lib/realtime/realtime-strategy/realtime-strategy.d.ts +0 -12
- package/websql/lib/realtime/realtime-subs-manager.d.ts +0 -15
- package/websql/lib/realtime/realtime.models.d.ts +0 -28
- package/websql/lib/symbols.d.ts +0 -66
- package/websql/lib/ui/index.d.ts +0 -2
- package/websql/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -2
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +0 -22
- package/websql/lib/validators.d.ts +0 -8
- package/websql/public-api.d.ts +0 -2
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import type { Server } from 'http';
|
|
3
|
-
import type { NgZone } from '@angular/core';
|
|
4
|
-
import * as express from 'express';
|
|
5
|
-
import type { Application } from 'express';
|
|
6
|
-
import { DataSource } from 'taon-typeorm/browser';
|
|
7
|
-
import type { TaonBaseInjector } from './base-classes/base-injector';
|
|
8
|
-
import { ContextDbMigrations } from './context-db-migrations';
|
|
9
|
-
import type { ContextsEndpointStorage } from './endpoint-context-storage';
|
|
10
|
-
import { Models } from './models';
|
|
11
|
-
export declare class EndpointContext {
|
|
12
|
-
private originalConfig;
|
|
13
|
-
private configFn;
|
|
14
|
-
/**
|
|
15
|
-
* (@default: false)
|
|
16
|
-
* If TRUE context is NOT going to create db/express server/http endpoints
|
|
17
|
-
* PURPOSE OF THIS PROPERTY
|
|
18
|
-
* -> ONLY remote access from backend or frontend to specific backend
|
|
19
|
-
*/
|
|
20
|
-
private readonly cloneOptions;
|
|
21
|
-
private static ngZone;
|
|
22
|
-
static initNgZone(ngZone: NgZone): void;
|
|
23
|
-
/**
|
|
24
|
-
* JUST FOR TESTING PURPOSES
|
|
25
|
-
*/
|
|
26
|
-
readonly USE_MARIADB_MYSQL_IN_DOCKER: boolean;
|
|
27
|
-
disabledRealtime: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* check whether context is inited
|
|
30
|
-
* (with init() function )
|
|
31
|
-
*/
|
|
32
|
-
inited: boolean;
|
|
33
|
-
readonly dbMigrations: ContextDbMigrations;
|
|
34
|
-
private readonly localInstaceObjSymbol;
|
|
35
|
-
/**
|
|
36
|
-
* all instances of classes from context
|
|
37
|
-
* key is class name
|
|
38
|
-
*/
|
|
39
|
-
readonly allClassesInstances: {};
|
|
40
|
-
private readonly classInstancesByNameObj;
|
|
41
|
-
private readonly objWithClassesInstancesArr;
|
|
42
|
-
readonly activeRoutes: {
|
|
43
|
-
expressPath: string;
|
|
44
|
-
method: Models.Http.Rest.HttpMethod;
|
|
45
|
-
}[];
|
|
46
|
-
get sourceContext(): EndpointContext | undefined;
|
|
47
|
-
readonly skipWritingServerRoutes: boolean;
|
|
48
|
-
private injectableTypesfromContexts;
|
|
49
|
-
private allTypesfromContexts;
|
|
50
|
-
expressApp: Application;
|
|
51
|
-
serverTcpUdp: Server;
|
|
52
|
-
databaseConfig?: Models.DatabaseConfigTypeOrm;
|
|
53
|
-
mode: Models.FrameworkMode;
|
|
54
|
-
readonly onlyMigrationRun?: boolean;
|
|
55
|
-
readonly onlyMigrationRevertToTimestamp?: number;
|
|
56
|
-
get isRunOrRevertOnlyMigrationAppStart(): boolean;
|
|
57
|
-
session?: Models.ISession;
|
|
58
|
-
connection: DataSource;
|
|
59
|
-
private entitiesTriggers;
|
|
60
|
-
private realtime;
|
|
61
|
-
get realtimeClient(): import("./realtime/realtime-client").RealtimeClient;
|
|
62
|
-
get realtimeServer(): import("./realtime/realtime-server").RealtimeServer;
|
|
63
|
-
/**
|
|
64
|
-
* available after init()
|
|
65
|
-
*/
|
|
66
|
-
config: Models.ContextOptions<any, any, any, any, any, any, any, any>;
|
|
67
|
-
get logHttp(): boolean;
|
|
68
|
-
get logRealtime(): boolean;
|
|
69
|
-
get logFramework(): boolean;
|
|
70
|
-
get logRoutes(): boolean;
|
|
71
|
-
get logDb(): boolean;
|
|
72
|
-
get logMigrations(): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Inside docker there is not need for https secure server
|
|
75
|
-
*/
|
|
76
|
-
readonly isRunningInsideDocker: boolean;
|
|
77
|
-
constructor(originalConfig: Models.ContextOptions<any, any, any, any, any, any, any, any>, configFn: (env: any) => Models.ContextOptions<any, any, any, any, any, any, any, any>,
|
|
78
|
-
/**
|
|
79
|
-
* (@default: false)
|
|
80
|
-
* If TRUE context is NOT going to create db/express server/http endpoints
|
|
81
|
-
* PURPOSE OF THIS PROPERTY
|
|
82
|
-
* -> ONLY remote access from backend or frontend to specific backend
|
|
83
|
-
*/
|
|
84
|
-
cloneOptions: Models.TaonCtxCloneParams);
|
|
85
|
-
init(options?: {
|
|
86
|
-
initFromRecrusiveContextResovle?: boolean;
|
|
87
|
-
onlyMigrationRun?: boolean;
|
|
88
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
89
|
-
}): Promise<void>;
|
|
90
|
-
private getAutoGeneratedConfig;
|
|
91
|
-
get ngZone(): any;
|
|
92
|
-
startServer(): Promise<void>;
|
|
93
|
-
displayRoutes(app: any): void;
|
|
94
|
-
get modeAllowsDatabaseCreation(): boolean;
|
|
95
|
-
private cloneClassWithNewMetadata;
|
|
96
|
-
private cloneClassesObjWithNewMetadata;
|
|
97
|
-
private getRecrusiveClassesfromContextsObj;
|
|
98
|
-
private getRecrusiveClassesfromContexts;
|
|
99
|
-
getClassInstanceObjBy(classType: Models.ClassType): any;
|
|
100
|
-
private getClassesInstancesArrBy;
|
|
101
|
-
inject<T>(ctor: new (...args: any[]) => T, options: {
|
|
102
|
-
localInstance?: boolean;
|
|
103
|
-
contextClassInstance?: TaonBaseInjector;
|
|
104
|
-
locaInstanceConstructorArgs?: ConstructorParameters<typeof ctor>;
|
|
105
|
-
parentInstanceThatWillGetInjectedStuff: object;
|
|
106
|
-
}): T;
|
|
107
|
-
/**
|
|
108
|
-
* alias for inject
|
|
109
|
-
*/
|
|
110
|
-
getInstanceBy<T>(ctor: new (...args: any[]) => T): T;
|
|
111
|
-
checkIfContextInitialized(): void;
|
|
112
|
-
getClassFunBy(classType: Models.ClassType): any;
|
|
113
|
-
isCLassType(classType: Models.ClassType, classFn: Function): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Only for injectable types
|
|
116
|
-
* Only for classType: CONTROLLER, REPOSITORY, PROVIDER, MIDDLEWARES
|
|
117
|
-
*/
|
|
118
|
-
getClassFunByClassName(className: string): Function;
|
|
119
|
-
getClassFunByClass(classFunction: Function): Function;
|
|
120
|
-
getClassFunByArr(classType: Models.ClassType): Function[];
|
|
121
|
-
private createInstances;
|
|
122
|
-
initClasses(): Promise<void>;
|
|
123
|
-
isActiveOn(classInstance: object): boolean;
|
|
124
|
-
get frontendHostUri(): URL;
|
|
125
|
-
get uri(): URL | undefined;
|
|
126
|
-
get uriProtocol(): string | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Examples
|
|
129
|
-
* http://localhost:3000
|
|
130
|
-
* https://localhost (from localhost:80) *
|
|
131
|
-
*/
|
|
132
|
-
get uriOrigin(): string | undefined;
|
|
133
|
-
/**
|
|
134
|
-
* Exampels
|
|
135
|
-
* http://localhost:3000/path/to/somewhere
|
|
136
|
-
* https://localhost/path/to/somewhere (from localhost:80)
|
|
137
|
-
*/
|
|
138
|
-
get uriPathname(): string | undefined;
|
|
139
|
-
/**
|
|
140
|
-
* Examples
|
|
141
|
-
* http://localhost:3000/path/to/somewhere -> '/path/to/somewhere'
|
|
142
|
-
* http://localhost:3000 -> '' #
|
|
143
|
-
* https://localhost/path/to/ -> '/path/to/somewhere' # remove last slash
|
|
144
|
-
*/
|
|
145
|
-
get uriPathnameOrNothingIfRoot(): string;
|
|
146
|
-
get uriPort(): string | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* Port from uri as number
|
|
149
|
-
* @returns {Number | undefined}
|
|
150
|
-
*/
|
|
151
|
-
get port(): Number | undefined;
|
|
152
|
-
get isHttpServer(): boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Check if context is for remote only
|
|
155
|
-
*/
|
|
156
|
-
get isRemoteHost(): boolean;
|
|
157
|
-
/**
|
|
158
|
-
* ipc/udp needs this
|
|
159
|
-
*/
|
|
160
|
-
get contextName(): string;
|
|
161
|
-
/**
|
|
162
|
-
* ipc/udp needs this
|
|
163
|
-
*/
|
|
164
|
-
get contextNameForCommunication(): string;
|
|
165
|
-
/**
|
|
166
|
-
* Check context type
|
|
167
|
-
*/
|
|
168
|
-
get contextType(): 'normal' | 'remote' | 'abstract' | 'invalid';
|
|
169
|
-
get cwd(): string;
|
|
170
|
-
get activeContext(): string | null;
|
|
171
|
-
get appId(): string;
|
|
172
|
-
get publicAssets(): {
|
|
173
|
-
serverPath: string;
|
|
174
|
-
locationOnDisk: string;
|
|
175
|
-
}[];
|
|
176
|
-
get isProductionMode(): boolean;
|
|
177
|
-
get host(): string | undefined;
|
|
178
|
-
get origin(): string | undefined;
|
|
179
|
-
initSubscribers(): Promise<any>;
|
|
180
|
-
initEntities(): Promise<void>;
|
|
181
|
-
destroy(): Promise<void>;
|
|
182
|
-
initDatabaseConnection(): Promise<void>;
|
|
183
|
-
private updateCalculatedPathsForControllers;
|
|
184
|
-
private mergeControllerMethodsConfigs;
|
|
185
|
-
initControllersHook(ctxStorage: ContextsEndpointStorage): Promise<void>;
|
|
186
|
-
initControllers(): Promise<void>;
|
|
187
|
-
writeActiveRoutes(): void;
|
|
188
|
-
get middlewares(): Models.MiddlewareType[];
|
|
189
|
-
private initCustomClientMiddlewares;
|
|
190
|
-
private initCustomBackendMiddlewares;
|
|
191
|
-
private initBackendMiddlewares;
|
|
192
|
-
private initServer;
|
|
193
|
-
protected sendError(res: express.Response, error: unknown, req: express.Request, expressPath: string): void;
|
|
194
|
-
/**
|
|
195
|
-
* client can be browser or nodejs (when remote host)
|
|
196
|
-
*/
|
|
197
|
-
private initClient;
|
|
198
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Response } from 'express';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated
|
|
5
|
-
*/
|
|
6
|
-
export declare const getTransformFunction: (target: Function) => (entity: any) => any;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
export declare const singleTransform: (json: any) => any;
|
|
11
|
-
export declare class EntityProcess {
|
|
12
|
-
/**
|
|
13
|
-
* Data from backend
|
|
14
|
-
*/
|
|
15
|
-
private result;
|
|
16
|
-
private response;
|
|
17
|
-
static init(result: any, response: Response): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Data to send
|
|
20
|
-
*/
|
|
21
|
-
data: any;
|
|
22
|
-
/**
|
|
23
|
-
* Say yes to:
|
|
24
|
-
* - circural object
|
|
25
|
-
* - transform browser fn in decorator
|
|
26
|
-
*/
|
|
27
|
-
private advancedManipulation;
|
|
28
|
-
private entityMapping;
|
|
29
|
-
private circural;
|
|
30
|
-
constructor(
|
|
31
|
-
/**
|
|
32
|
-
* Data from backend
|
|
33
|
-
*/
|
|
34
|
-
result: any, response: Response);
|
|
35
|
-
private checkAdvancedManiupulation;
|
|
36
|
-
run(): Promise<void>;
|
|
37
|
-
applayTransformFn(): void;
|
|
38
|
-
setHeaders(): void;
|
|
39
|
-
send(): void;
|
|
40
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Response as ExpressResponse, Request as ExpressRequest } from 'express';
|
|
3
|
-
import { Models } from './models';
|
|
4
|
-
export declare const getResponseValue: <T>(response: Models.Http.Response<T>, options?: {
|
|
5
|
-
req: ExpressRequest;
|
|
6
|
-
res: ExpressResponse;
|
|
7
|
-
}) => Promise<T>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { ControllerConfig } from '../config/controller-config';
|
|
3
|
-
import { MethodConfig } from '../config/method-config';
|
|
4
|
-
export declare namespace ClassHelpers {
|
|
5
|
-
/**
|
|
6
|
-
* TODO - repalce in every place when getting class fn from object
|
|
7
|
-
*/
|
|
8
|
-
const getClassFnFromObject: (json: Object) => any;
|
|
9
|
-
const getName: (classFnOrObject: any) => string;
|
|
10
|
-
const getOrginalClass: (classFnOrObject: any) => any;
|
|
11
|
-
const getFullInternalName: (classFnOrObject: any) => string;
|
|
12
|
-
const getUniqueKey: (classFnOrObject: any) => string;
|
|
13
|
-
const isContextClassObject: (obj: any) => boolean;
|
|
14
|
-
const setName: (target: Function, className: string) => void;
|
|
15
|
-
const hasParentClassWithName: (target: Function, className: string, targets?: any[]) => boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Express async handler for middleware functions.
|
|
18
|
-
*/
|
|
19
|
-
const asyncHandler: (fn: any) => (req: any, res: any, next: any) => void;
|
|
20
|
-
const getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
|
|
21
|
-
const getControllerConfigs: (target: Function, configs?: ControllerConfig[], callerTarget?: Function) => ControllerConfig[];
|
|
22
|
-
const ensureClassConfig: (target: Function) => Partial<ControllerConfig>;
|
|
23
|
-
const ensureMethodConfig: (target: any, propertyKey: string | symbol) => Partial<MethodConfig>;
|
|
24
|
-
const getClassConfig: (constructor: Function) => Partial<ControllerConfig> | undefined;
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import type { ControllerConfig } from '../config/controller-config';
|
|
3
|
-
import { MethodConfig } from '../config/method-config';
|
|
4
|
-
export declare namespace TaonHelpers {
|
|
5
|
-
const fillUpTo: (s: string, nCharacters: number) => string;
|
|
6
|
-
const isGoodPath: (p: string) => boolean;
|
|
7
|
-
const firstStringOrElemFromArray: (stringOrArrayOfString: string[] | string) => string;
|
|
8
|
-
const tryTransformParam: (param: any) => any;
|
|
9
|
-
const getExpressPath: (c: ControllerConfig, pathOrClassConfig: Partial<MethodConfig>) => string;
|
|
10
|
-
const defaultType: (value: any) => {};
|
|
11
|
-
const parseJSONwithStringJSONs: (object: Object, waring?: boolean) => Object;
|
|
12
|
-
const isPlainFileOrFolder: (filePath: any) => boolean;
|
|
13
|
-
const ipcKeyNameResponse: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
|
|
14
|
-
const ipcKeyNameRequest: (target: Function, methodConfig: Partial<MethodConfig>, expressPath: string) => string;
|
|
15
|
-
const websqlMocks: (headers: any) => {
|
|
16
|
-
request: Express.Request;
|
|
17
|
-
response: Express.Response;
|
|
18
|
-
};
|
|
19
|
-
}
|
package/browser/lib/index.d.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import 'reflect-metadata';
|
|
3
|
-
import { NgZone } from '@angular/core';
|
|
4
|
-
import { RestErrorResponseWrapper } from 'ng2-rest/browser';
|
|
5
|
-
import * as base from './base-classes/base';
|
|
6
|
-
import * as controllerDecorator from './decorators/classes/controller-decorator';
|
|
7
|
-
import * as entityDecorator from './decorators/classes/entity-decorator';
|
|
8
|
-
import * as middlewareDecorator from './decorators/classes/middleware-decorator';
|
|
9
|
-
import * as migrationDecorator from './decorators/classes/migration-decorator';
|
|
10
|
-
import * as providerDecorator from './decorators/classes/provider-decorator';
|
|
11
|
-
import * as repositoryDecorator from './decorators/classes/repository-decorator';
|
|
12
|
-
import * as subscriberDecorator from './decorators/classes/subscriber-decorator';
|
|
13
|
-
import * as http from './decorators/http/http-decorators';
|
|
14
|
-
import * as endpointContext from './endpoint-context';
|
|
15
|
-
import * as models from './models';
|
|
16
|
-
import * as orm from './orm';
|
|
17
|
-
import * as allSymbols from './symbols';
|
|
18
|
-
export * from './ui';
|
|
19
|
-
export { EndpointContext } from './endpoint-context';
|
|
20
|
-
export { TaonBaseRepository } from './base-classes/base-repository';
|
|
21
|
-
export { TaonBaseCustomRepository } from './base-classes/base-custom-repository';
|
|
22
|
-
export { TaonBaseController } from './base-classes/base-controller';
|
|
23
|
-
export { TaonBaseProvider } from './base-classes/base-provider';
|
|
24
|
-
export { TaonBaseEntity } from './base-classes/base-entity';
|
|
25
|
-
export { TaonBaseContext } from './base-classes/base-context';
|
|
26
|
-
export { TaonBaseMigration } from './base-classes/base-migration';
|
|
27
|
-
export { TaonBaseClass } from './base-classes/base-class';
|
|
28
|
-
export { TaonAdditionalMiddlewareMethodInfo } from './base-classes/base-middleware';
|
|
29
|
-
export { createContext, TaonContext } from './create-context';
|
|
30
|
-
export { inject } from './inject';
|
|
31
|
-
export { Models, BaseTaonClassesNames, TaonTempDatabasesFolder, TaonTempRoutesFolder, } from './models';
|
|
32
|
-
export { TaonBaseFileUploadMiddleware } from './base-classes/base-file-upload.middleware';
|
|
33
|
-
export * from './constants';
|
|
34
|
-
export { MulterFileUploadResponse } from './base-classes/base-controller';
|
|
35
|
-
export { ContextsEndpointStorage } from './endpoint-context-storage';
|
|
36
|
-
export { ClassHelpers } from './helpers/class-helpers';
|
|
37
|
-
export type { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions, } from 'ng2-rest/browser';
|
|
38
|
-
export declare namespace Taon {
|
|
39
|
-
const error: (opt: Pick<RestErrorResponseWrapper, "message" | "status" | "details" | "code"> | string) => void;
|
|
40
|
-
type ResponseHtml = models.Models.Http.Response<string>;
|
|
41
|
-
export import Response = models.Models.Http.Response;
|
|
42
|
-
export import Http = http.Http;
|
|
43
|
-
export import Base = base.Base;
|
|
44
|
-
export import Orm = orm.Orm;
|
|
45
|
-
export import StartParams = models.Models.StartParams;
|
|
46
|
-
const getResponseValue: <T>(response: Response<T>, options?: {
|
|
47
|
-
req: import("express").Request;
|
|
48
|
-
res: import("express").Response;
|
|
49
|
-
}) => Promise<T>;
|
|
50
|
-
export import Controller = controllerDecorator.TaonController;
|
|
51
|
-
export import Entity = entityDecorator.TaonEntity;
|
|
52
|
-
export import Provider = providerDecorator.TaonProvider;
|
|
53
|
-
export import Repository = repositoryDecorator.TaonRepository;
|
|
54
|
-
export import Subscriber = subscriberDecorator.TaonSubscriber;
|
|
55
|
-
export import Migration = migrationDecorator.TaonMigration;
|
|
56
|
-
export import Middleware = middlewareDecorator.TaonMiddleware;
|
|
57
|
-
const isBrowser: boolean;
|
|
58
|
-
const isNode: boolean;
|
|
59
|
-
const isWebSQL: boolean;
|
|
60
|
-
const isElectron: boolean;
|
|
61
|
-
const createContext: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => models.Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARES>) => {
|
|
62
|
-
readonly contextName: string;
|
|
63
|
-
readonly appId: string;
|
|
64
|
-
cloneAsRemote: (cloneOpt?: {
|
|
65
|
-
overrideRemoteHost?: string;
|
|
66
|
-
}) => /*elided*/ any;
|
|
67
|
-
cloneAsNormal: (cloneOpt?: {
|
|
68
|
-
overrideHost?: string;
|
|
69
|
-
}) => /*elided*/ any;
|
|
70
|
-
__ref(): Promise<endpointContext.EndpointContext>;
|
|
71
|
-
readonly __refSync: endpointContext.EndpointContext;
|
|
72
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
73
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
74
|
-
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
75
|
-
readonly realtime: {
|
|
76
|
-
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
77
|
-
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
const createContextTemplate: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => models.Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARE>) => () => {
|
|
81
|
-
readonly contextName: string;
|
|
82
|
-
readonly appId: string;
|
|
83
|
-
cloneAsRemote: (cloneOpt?: {
|
|
84
|
-
overrideRemoteHost?: string;
|
|
85
|
-
}) => /*elided*/ any;
|
|
86
|
-
cloneAsNormal: (cloneOpt?: {
|
|
87
|
-
overrideHost?: string;
|
|
88
|
-
}) => /*elided*/ any;
|
|
89
|
-
__ref(): Promise<endpointContext.EndpointContext>;
|
|
90
|
-
readonly __refSync: endpointContext.EndpointContext;
|
|
91
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
92
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
93
|
-
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
94
|
-
readonly realtime: {
|
|
95
|
-
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
96
|
-
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
const inject: <T>(entity: () => new (...args: any[]) => T) => T;
|
|
100
|
-
const initNgZone: (ngZone: NgZone) => void;
|
|
101
|
-
const symbols: typeof allSymbols.Symbols;
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated
|
|
104
|
-
* use createContext instead
|
|
105
|
-
*/
|
|
106
|
-
const init: (options: {
|
|
107
|
-
host: string;
|
|
108
|
-
entities: Function[];
|
|
109
|
-
controllers: Function[];
|
|
110
|
-
}) => Promise<{
|
|
111
|
-
readonly contextName: string;
|
|
112
|
-
readonly appId: string;
|
|
113
|
-
cloneAsRemote: (cloneOpt?: {
|
|
114
|
-
overrideRemoteHost?: string;
|
|
115
|
-
}) => /*elided*/ any;
|
|
116
|
-
cloneAsNormal: (cloneOpt?: {
|
|
117
|
-
overrideHost?: string;
|
|
118
|
-
}) => /*elided*/ any;
|
|
119
|
-
__ref(): Promise<endpointContext.EndpointContext>;
|
|
120
|
-
readonly __refSync: endpointContext.EndpointContext;
|
|
121
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
122
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
123
|
-
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
124
|
-
readonly realtime: {
|
|
125
|
-
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
126
|
-
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
127
|
-
};
|
|
128
|
-
}>;
|
|
129
|
-
}
|