taon 19.0.29 → 19.0.30

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.
Files changed (84) hide show
  1. package/README.md +5 -21
  2. package/browser/package.json +1 -1
  3. package/client/package.json +1 -1
  4. package/lib/build-info._auto-generated_.d.ts +1 -1
  5. package/lib/build-info._auto-generated_.js +1 -1
  6. package/lib/env/env.angular-node-app.d.ts +13 -0
  7. package/lib/env/env.angular-node-app.js +19 -0
  8. package/lib/env/env.angular-node-app.js.map +1 -0
  9. package/lib/env/env.electron-app.d.ts +13 -0
  10. package/lib/env/env.electron-app.js +19 -0
  11. package/lib/env/env.electron-app.js.map +1 -0
  12. package/lib/env/env.mobile-app.d.ts +13 -0
  13. package/lib/env/env.mobile-app.js +19 -0
  14. package/lib/env/env.mobile-app.js.map +1 -0
  15. package/lib/env/env.npm-lib-and-cli-tool.d.ts +13 -0
  16. package/lib/env/env.npm-lib-and-cli-tool.js +19 -0
  17. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -0
  18. package/lib/env/env.vscode-plugin.d.ts +13 -0
  19. package/lib/env/env.vscode-plugin.js +19 -0
  20. package/lib/env/env.vscode-plugin.js.map +1 -0
  21. package/lib/env/index.d.ts +5 -0
  22. package/lib/env/index.js +22 -0
  23. package/lib/env/index.js.map +1 -0
  24. package/lib/ui/index.js +2 -2
  25. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  26. package/package.json +1 -1
  27. package/websql/package.json +1 -1
  28. package/client/README.md +0 -24
  29. package/client/fesm2022/taon.mjs +0 -6454
  30. package/client/fesm2022/taon.mjs.map +0 -1
  31. package/client/index.d.ts +0 -6
  32. package/client/lib/base-classes/base-abstract-entity.d.ts +0 -8
  33. package/client/lib/base-classes/base-angular-service.d.ts +0 -21
  34. package/client/lib/base-classes/base-class.d.ts +0 -9
  35. package/client/lib/base-classes/base-context.d.ts +0 -27
  36. package/client/lib/base-classes/base-controller.d.ts +0 -10
  37. package/client/lib/base-classes/base-crud-controller.d.ts +0 -28
  38. package/client/lib/base-classes/base-custom-repository.d.ts +0 -4
  39. package/client/lib/base-classes/base-entity.d.ts +0 -17
  40. package/client/lib/base-classes/base-injector.d.ts +0 -69
  41. package/client/lib/base-classes/base-migration.d.ts +0 -12
  42. package/client/lib/base-classes/base-provider.d.ts +0 -9
  43. package/client/lib/base-classes/base-repository.d.ts +0 -264
  44. package/client/lib/base-classes/base-subscriber-for-entity.d.ts +0 -82
  45. package/client/lib/base-classes/base.d.ts +0 -51
  46. package/client/lib/constants.d.ts +0 -8
  47. package/client/lib/context-db-migrations.d.ts +0 -18
  48. package/client/lib/create-context.d.ts +0 -86
  49. package/client/lib/decorators/classes/controller-decorator.d.ts +0 -16
  50. package/client/lib/decorators/classes/entity-decorator.d.ts +0 -20
  51. package/client/lib/decorators/classes/migration-decorator.d.ts +0 -8
  52. package/client/lib/decorators/classes/provider-decorator.d.ts +0 -8
  53. package/client/lib/decorators/classes/repository-decorator.d.ts +0 -8
  54. package/client/lib/decorators/classes/subscriber-decorator.d.ts +0 -9
  55. package/client/lib/decorators/http/http-decorators.d.ts +0 -20
  56. package/client/lib/decorators/http/http-methods-decorators.d.ts +0 -24
  57. package/client/lib/decorators/http/http-params-decorators.d.ts +0 -6
  58. package/client/lib/dependency-injection/di-container.d.ts +0 -6
  59. package/client/lib/endpoint-context.d.ts +0 -133
  60. package/client/lib/entity-process.d.ts +0 -40
  61. package/client/lib/env.d.ts +0 -3
  62. package/client/lib/get-response-value.d.ts +0 -7
  63. package/client/lib/helpers/class-helpers.d.ts +0 -19
  64. package/client/lib/helpers/taon-helpers.d.ts +0 -17
  65. package/client/lib/index.d.ts +0 -136
  66. package/client/lib/inject.d.ts +0 -5
  67. package/client/lib/models.d.ts +0 -212
  68. package/client/lib/orm.d.ts +0 -3
  69. package/client/lib/realtime/realtime-client.d.ts +0 -38
  70. package/client/lib/realtime/realtime-core.d.ts +0 -41
  71. package/client/lib/realtime/realtime-server.d.ts +0 -19
  72. package/client/lib/realtime/realtime-strategy/index.d.ts +0 -5
  73. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -82
  74. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -15
  75. package/client/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
  76. package/client/lib/realtime/realtime-strategy/realtime-strategy.d.ts +0 -12
  77. package/client/lib/realtime/realtime-subs-manager.d.ts +0 -15
  78. package/client/lib/realtime/realtime.models.d.ts +0 -15
  79. package/client/lib/symbols.d.ts +0 -68
  80. package/client/lib/ui/index.d.ts +0 -2
  81. package/client/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -2
  82. package/client/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +0 -22
  83. package/client/lib/validators.d.ts +0 -8
  84. package/client/public-api.d.ts +0 -2
@@ -1,86 +0,0 @@
1
- // @ts-nocheck
2
- import { EndpointContext } from './endpoint-context';
3
- import { Models } from './models';
4
- export declare 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>>(configFn: (env: any) => Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION>) => () => {
5
- types: {
6
- readonly controllers: any;
7
- readonly repositories: any;
8
- readonly providers: any;
9
- readonly subscribers: any;
10
- readonly migrations: any;
11
- };
12
- readonly contexts: any;
13
- readonly contextName: string;
14
- /**
15
- * @deprecated
16
- * - get reference to internal context
17
- */
18
- __ref(): Promise<EndpointContext>;
19
- /**
20
- * only for internal use
21
- * @deprecated
22
- */
23
- readonly __refSync: EndpointContext;
24
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
25
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
26
- /**
27
- * - create controller instances for context
28
- * - init database (if enable) + migation scripts
29
- */
30
- initialize: (overrideOptions?: {
31
- overrideHost?: string;
32
- overrideRemoteHost?: string;
33
- onlyMigrationRun?: boolean;
34
- onlyMigrationRevertToTimestamp?: number;
35
- }) => Promise<EndpointContext>;
36
- /**
37
- * realtime communication with server
38
- * Udp socket.io (or ipc) based.
39
- */
40
- readonly realtime: {
41
- readonly client: import("./realtime/realtime-client").RealtimeClient;
42
- readonly server: import("./realtime/realtime-server").RealtimeServer;
43
- };
44
- };
45
- export declare 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>>(configFn: (env: any) => Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION>) => {
46
- types: {
47
- readonly controllers: any;
48
- readonly repositories: any;
49
- readonly providers: any;
50
- readonly subscribers: any;
51
- readonly migrations: any;
52
- };
53
- readonly contexts: any;
54
- readonly contextName: string;
55
- /**
56
- * @deprecated
57
- * - get reference to internal context
58
- */
59
- __ref(): Promise<EndpointContext>;
60
- /**
61
- * only for internal use
62
- * @deprecated
63
- */
64
- readonly __refSync: EndpointContext;
65
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
66
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
67
- /**
68
- * - create controller instances for context
69
- * - init database (if enable) + migation scripts
70
- */
71
- initialize: (overrideOptions?: {
72
- overrideHost?: string;
73
- overrideRemoteHost?: string;
74
- onlyMigrationRun?: boolean;
75
- onlyMigrationRevertToTimestamp?: number;
76
- }) => Promise<EndpointContext>;
77
- /**
78
- * realtime communication with server
79
- * Udp socket.io (or ipc) based.
80
- */
81
- readonly realtime: {
82
- readonly client: import("./realtime/realtime-client").RealtimeClient;
83
- readonly server: import("./realtime/realtime-server").RealtimeServer;
84
- };
85
- };
86
- export type TaonContext = ReturnType<typeof createContext>;
@@ -1,16 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../../models';
3
- /**
4
- * Controller decorator
5
- */
6
- export declare function TaonController(options?: TaonControllerOptions): (constructor: Function) => void;
7
- export declare class TaonControllerOptions extends Models.DecoratorAbstractOpt {
8
- /**
9
- * typeorm realtime subscribtion // TODO disabled for now, does not make sense ?s
10
- */
11
- realtime?: boolean;
12
- /**
13
- * override default path for controller api
14
- */
15
- path?: string;
16
- }
@@ -1,20 +0,0 @@
1
- // @ts-nocheck
2
- import { Mapping } from 'ng2-rest/browser';
3
- import { Models } from '../../models';
4
- /**
5
- * Entity decorator
6
- */
7
- export declare function TaonEntity<T = any>(options?: TaonEntityOptions<T>): (constructor: Function) => void;
8
- export declare class TaonEntityOptions<T = any> extends Models.DecoratorAbstractOpt {
9
- /**
10
- * default unique property is "id"
11
- * for your entity it may be something else
12
- */
13
- uniqueKeyProp?: string;
14
- createTable?: boolean;
15
- defaultModelValues?: Mapping.ModelValue<T>;
16
- defaultModelMapping?: Mapping.Mapping<T>;
17
- defaultModelMappingDeep?: {
18
- [lodashPathes: string]: string | [string];
19
- };
20
- }
@@ -1,8 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../../models';
3
- /**
4
- * Migration decorator
5
- */
6
- export declare function TaonMigration(options: TaonMigrationOptions): any;
7
- export declare class TaonMigrationOptions<T = any> extends Models.DecoratorAbstractOpt {
8
- }
@@ -1,8 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../../models';
3
- /**
4
- * Provider decorator
5
- */
6
- export declare function TaonProvider<T = any>(options?: TaonProviderOptions<T>): (constructor: Function) => void;
7
- export declare class TaonProviderOptions<T = any> extends Models.DecoratorAbstractOpt {
8
- }
@@ -1,8 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../../models';
3
- /**
4
- * Repository decorator
5
- */
6
- export declare function TaonRepository(options: TaonRepositoryOptions): (constructor: Function) => void;
7
- export declare class TaonRepositoryOptions<T = any> extends Models.DecoratorAbstractOpt {
8
- }
@@ -1,9 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../../models';
3
- /**
4
- * Subscriber decorator
5
- */
6
- export declare function TaonSubscriber(options: TaonSubscriberOptions): any;
7
- export declare class TaonSubscriberOptions<T = any> extends Models.DecoratorAbstractOpt {
8
- allowedEvents?: (keyof T)[];
9
- }
@@ -1,20 +0,0 @@
1
- // @ts-nocheck
2
- import * as methods from './http-methods-decorators';
3
- import * as params from './http-params-decorators';
4
- import { Models } from 'ng2-rest/browser';
5
- export declare namespace Http {
6
- export import GET = methods.GET;
7
- export import POST = methods.POST;
8
- export import PUT = methods.PUT;
9
- export import DELETE = methods.DELETE;
10
- export import PATCH = methods.PATCH;
11
- export import HEAD = methods.HEAD;
12
- export import Response = Models.HttpResponse;
13
- namespace Param {
14
- export import Query = params.Query;
15
- export import Path = params.Path;
16
- export import Body = params.Body;
17
- export import Cookie = params.Cookie;
18
- export import Header = params.Header;
19
- }
20
- }
@@ -1,24 +0,0 @@
1
- // @ts-nocheck
2
- import { CoreModels } from 'tnp-core/browser';
3
- import { Models as ModelsNg2Rest } from 'ng2-rest/browser';
4
- export interface TaonHttpDecoratorOptions {
5
- /**
6
- * ! BE CAREFULL
7
- * This method is only for very special cases
8
- * Path for the method is automatically generated
9
- */
10
- path?: string;
11
- /**
12
- * ! BE CAREFULL
13
- * If true, the path will be global
14
- */
15
- pathIsGlobal?: boolean;
16
- overrideContentType?: CoreModels.ContentType;
17
- overridResponseType?: ModelsNg2Rest.ResponseTypeAxios;
18
- }
19
- export declare function GET(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
20
- export declare function HEAD(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
21
- export declare function POST(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
22
- export declare function PUT(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
23
- export declare function PATCH(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
24
- export declare function DELETE(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
@@ -1,6 +0,0 @@
1
- // @ts-nocheck
2
- export declare function Path(name: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
3
- export declare function Query(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
4
- export declare function Cookie(name: string, expireInSecond?: number): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
5
- export declare function Header(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
6
- export declare function Body(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
@@ -1,6 +0,0 @@
1
- // @ts-nocheck
2
- export declare class DITaonContainer {
3
- private static instances;
4
- static resolve<T>(target: Function): T;
5
- static inject<T>(target: new (...args: any[]) => T): T;
6
- }
@@ -1,133 +0,0 @@
1
- // @ts-nocheck
2
- import type { Server } from 'http';
3
- import type { NgZone } from '@angular/core';
4
- import type { Application } from 'express';
5
- import { DataSource } from 'taon-typeorm/browser';
6
- import type { BaseInjector } from './base-classes/base-injector';
7
- import { ContextDbMigrations } from './context-db-migrations';
8
- import { Models } from './models';
9
- export declare class EndpointContext {
10
- private originalConfig;
11
- private configFn;
12
- private static ngZone;
13
- static initNgZone(ngZone: NgZone): void;
14
- disabledRealtime: boolean;
15
- /**
16
- * check whether context is inited
17
- * (with init() function )
18
- */
19
- inited: boolean;
20
- readonly dbMigrations: ContextDbMigrations;
21
- private readonly localInstaceObjSymbol;
22
- /**
23
- * all instances of classes from context
24
- * key is class name
25
- */
26
- readonly allClassesInstances: {};
27
- private readonly classInstancesByNameObj;
28
- private readonly objWithClassesInstancesArr;
29
- readonly activeRoutes: {
30
- routePath: string;
31
- method: Models.Http.Rest.HttpMethod;
32
- }[];
33
- readonly skipWritingServerRoutes: boolean;
34
- private injectableTypesfromContexts;
35
- private allTypesfromContexts;
36
- expressApp: Application;
37
- serverTcpUdp: Server;
38
- databaseConfig?: Models.DatabaseConfigTypeOrm;
39
- mode: Models.FrameworkMode;
40
- readonly onlyMigrationRun?: boolean;
41
- readonly onlyMigrationRevertToTimestamp?: number;
42
- get isRunOrRevertOnlyMigrationAppStart(): boolean;
43
- session?: Models.ISession;
44
- connection: DataSource;
45
- private entitiesTriggers;
46
- private realtime;
47
- get realtimeClient(): import("./realtime/realtime-client").RealtimeClient;
48
- get realtimeServer(): import("./realtime/realtime-server").RealtimeServer;
49
- /**
50
- * available after init()
51
- */
52
- config: Models.ContextOptions<any, any, any, any, any, any, any>;
53
- get logHttp(): boolean;
54
- get logRealtime(): boolean;
55
- get logFramework(): boolean;
56
- get logDb(): boolean;
57
- get logMigrations(): boolean;
58
- constructor(originalConfig: Models.ContextOptions<any, any, any, any, any, any, any>, configFn: (env: any) => Models.ContextOptions<any, any, any, any, any, any, any>);
59
- init(options?: {
60
- initFromRecrusiveContextResovle?: boolean;
61
- overrideHost?: string | null;
62
- overrideRemoteHost?: string | null;
63
- onlyMigrationRun?: boolean;
64
- onlyMigrationRevertToTimestamp?: number;
65
- }): Promise<void>;
66
- private getAutoGeneratedConfig;
67
- get ngZone(): any;
68
- startServer(): Promise<void>;
69
- displayRoutes(app: any): void;
70
- get modeAllowsDatabaseCreation(): boolean;
71
- private cloneClassWithNewMetadata;
72
- private cloneClassesObjWithNewMetadata;
73
- private getRecrusiveClassesfromContextsObj;
74
- private getRecrusiveClassesfromContexts;
75
- getClassInstanceObjBy(classType: Models.ClassType): any;
76
- private getClassesInstancesArrBy;
77
- inject<T>(ctor: new (...args: any[]) => T, options: {
78
- localInstance?: boolean;
79
- contextClassInstance?: BaseInjector;
80
- locaInstanceConstructorArgs?: ConstructorParameters<typeof ctor>;
81
- parentInstanceThatWillGetInjectedStuff: object;
82
- }): T;
83
- /**
84
- * alias for inject
85
- */
86
- getInstanceBy<T>(ctor: new (...args: any[]) => T): T;
87
- checkIfContextInitialized(): void;
88
- getClassFunBy(classType: Models.ClassType): any;
89
- isCLassType(classType: Models.ClassType, classFn: Function): boolean;
90
- /**
91
- * Only for injectable types
92
- * Only for classType: CONTROLLER, REPOSITORY, PROVIDER
93
- */
94
- getClassFunByClassName(className: string): Function;
95
- getClassFunByClass(classFunction: Function): Function;
96
- getClassFunByArr(classType: Models.ClassType): Function[];
97
- private createInstances;
98
- reinitControllers(): Promise<void>;
99
- initClasses(): Promise<void>;
100
- isActiveOn(classInstance: object): boolean;
101
- get uri(): URL;
102
- /**
103
- * Port from uri as number
104
- * @returns {Number | undefined}
105
- */
106
- get port(): Number | undefined;
107
- get isHttpServer(): boolean;
108
- /**
109
- * ipc/udp needs this
110
- */
111
- get contextName(): string;
112
- get publicAssets(): {
113
- serverPath: string;
114
- locationOnDisk: string;
115
- }[];
116
- get isProductionMode(): boolean;
117
- get remoteHost(): string;
118
- get host(): string;
119
- get orgin(): string;
120
- initSubscribers(): Promise<any>;
121
- initEntities(): Promise<void>;
122
- destroy(): Promise<void>;
123
- initDatabaseConnection(): Promise<void>;
124
- initControllers(): Promise<void>;
125
- writeActiveRoutes(): void;
126
- get middlewares(): Models.MiddlewareType[];
127
- private initMiddlewares;
128
- private initServer;
129
- /**
130
- * client can be browser or nodejs (when remote host)
131
- */
132
- private initClient;
133
- }
@@ -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,3 +0,0 @@
1
- // @ts-nocheck
2
- declare const ENV: any;
3
- export { ENV };
@@ -1,7 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from './models';
3
- import { Response as ExpressResponse, Request as ExpressRequest } from 'express';
4
- export declare const getResponseValue: <T>(response: Models.Http.Response<T>, options?: {
5
- req: ExpressRequest;
6
- res: ExpressResponse;
7
- }) => Promise<T>;
@@ -1,19 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../models';
3
- export declare namespace ClassHelpers {
4
- /**
5
- * TODO - repalce in every place when getting class fn from object
6
- */
7
- const getClassFnFromObject: (json: Object) => any;
8
- const getName: (classFnOrObject: any) => string;
9
- const getOrginalClass: (classFnOrObject: any) => any;
10
- const getFullInternalName: (classFnOrObject: any) => string;
11
- const getUniqueKey: (classFnOrObject: any) => string;
12
- const isContextClassObject: (obj: any) => boolean;
13
- const setName: (target: Function, className: string) => void;
14
- const hasParentClassWithName: (target: Function, className: string, targets?: any[]) => boolean;
15
- const getControllerConfig: (target: Function) => Models.ControllerConfig | undefined;
16
- const getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
17
- const getControllerConfigs: (target: Function, configs?: Models.ControllerConfig[], callerTarget?: Function) => Models.RuntimeControllerConfig[];
18
- const getCalculatedPathFor: (target: Function) => string;
19
- }
@@ -1,17 +0,0 @@
1
- // @ts-nocheck
2
- import { Models } from '../models';
3
- export declare namespace TaonHelpers {
4
- const fillUpTo: (s: string, nCharacters: number) => string;
5
- const isGoodPath: (p: string) => boolean;
6
- const tryTransformParam: (param: any) => any;
7
- const getExpressPath: (c: Models.RuntimeControllerConfig, pathOrClassConfig: Models.MethodConfig) => string;
8
- const defaultType: (value: any) => {};
9
- const parseJSONwithStringJSONs: (object: Object, waring?: boolean) => Object;
10
- const isPlainFileOrFolder: (filePath: any) => boolean;
11
- const ipcKeyNameResponse: (target: Function, methodConfig: Models.MethodConfig, expressPath: string) => string;
12
- const ipcKeyNameRequest: (target: Function, methodConfig: Models.MethodConfig, expressPath: string) => string;
13
- const websqlMocks: (headers: any) => {
14
- request: Express.Request;
15
- response: Express.Response;
16
- };
17
- }
@@ -1,136 +0,0 @@
1
- // @ts-nocheck
2
- import 'reflect-metadata';
3
- import { NgZone } from '@angular/core';
4
- import * as base from './base-classes/base';
5
- import * as controllerDecorator from './decorators/classes/controller-decorator';
6
- import * as entityDecorator from './decorators/classes/entity-decorator';
7
- import * as migrationDecorator from './decorators/classes/migration-decorator';
8
- import * as providerDecorator from './decorators/classes/provider-decorator';
9
- import * as repositoryDecorator from './decorators/classes/repository-decorator';
10
- import * as subscriberDecorator from './decorators/classes/subscriber-decorator';
11
- import * as http from './decorators/http/http-decorators';
12
- import * as endpointContext from './endpoint-context';
13
- import * as models from './models';
14
- import * as orm from './orm';
15
- import * as allSymbols from './symbols';
16
- export * from './ui';
17
- export { EndpointContext } from './endpoint-context';
18
- export { BaseRepository } from './base-classes/base-repository';
19
- export { BaseCustomRepository } from './base-classes/base-custom-repository';
20
- export { BaseController } from './base-classes/base-controller';
21
- export { BaseProvider } from './base-classes/base-provider';
22
- export { BaseEntity } from './base-classes/base-entity';
23
- export { BaseContext } from './base-classes/base-context';
24
- export { BaseMigration } from './base-classes/base-migration';
25
- export { createContext, TaonContext } from './create-context';
26
- export { inject } from './inject';
27
- export { Models } from './models';
28
- export * from './constants';
29
- export { ClassHelpers } from './helpers/class-helpers';
30
- export declare namespace Taon {
31
- export import Response = models.Models.Http.Response;
32
- export import Http = http.Http;
33
- export import Base = base.Base;
34
- export import Orm = orm.Orm;
35
- export import StartParams = models.Models.StartParams;
36
- const getResponseValue: <T>(response: Response<T>, options?: {
37
- req: import("express").Request;
38
- res: import("express").Response;
39
- }) => Promise<T>;
40
- export import Controller = controllerDecorator.TaonController;
41
- export import Entity = entityDecorator.TaonEntity;
42
- export import Provider = providerDecorator.TaonProvider;
43
- export import Repository = repositoryDecorator.TaonRepository;
44
- export import Subscriber = subscriberDecorator.TaonSubscriber;
45
- export import Migration = migrationDecorator.TaonMigration;
46
- const isBrowser: boolean;
47
- const isNode: boolean;
48
- const isWebSQL: boolean;
49
- const isElectron: boolean;
50
- 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>>(configFn: (env: any) => models.Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION>) => {
51
- types: {
52
- readonly controllers: any;
53
- readonly repositories: any;
54
- readonly providers: any;
55
- readonly subscribers: any;
56
- readonly migrations: any;
57
- };
58
- readonly contexts: any;
59
- readonly contextName: string;
60
- __ref(): Promise<endpointContext.EndpointContext>;
61
- readonly __refSync: endpointContext.EndpointContext;
62
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
63
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
64
- initialize: (overrideOptions?: {
65
- overrideHost?: string;
66
- overrideRemoteHost?: string;
67
- onlyMigrationRun?: boolean;
68
- onlyMigrationRevertToTimestamp?: number;
69
- }) => Promise<endpointContext.EndpointContext>;
70
- readonly realtime: {
71
- readonly client: import("./realtime/realtime-client").RealtimeClient;
72
- readonly server: import("./realtime/realtime-server").RealtimeServer;
73
- };
74
- };
75
- 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>>(configFn: (env: any) => models.Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION>) => () => {
76
- types: {
77
- readonly controllers: any;
78
- readonly repositories: any;
79
- readonly providers: any;
80
- readonly subscribers: any;
81
- readonly migrations: any;
82
- };
83
- readonly contexts: any;
84
- readonly contextName: string;
85
- __ref(): Promise<endpointContext.EndpointContext>;
86
- readonly __refSync: endpointContext.EndpointContext;
87
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
88
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
89
- initialize: (overrideOptions?: {
90
- overrideHost?: string;
91
- overrideRemoteHost?: string;
92
- onlyMigrationRun?: boolean;
93
- onlyMigrationRevertToTimestamp?: number;
94
- }) => Promise<endpointContext.EndpointContext>;
95
- readonly realtime: {
96
- readonly client: import("./realtime/realtime-client").RealtimeClient;
97
- readonly server: import("./realtime/realtime-server").RealtimeServer;
98
- };
99
- };
100
- const inject: <T>(entity: () => new (...args: any[]) => T) => T;
101
- const initNgZone: (ngZone: NgZone) => void;
102
- const symbols: typeof allSymbols.Symbols;
103
- /**
104
- * @deprecated
105
- * use createContext instead
106
- */
107
- const init: (options: {
108
- host: string;
109
- entities: Function[];
110
- controllers: Function[];
111
- }) => Promise<{
112
- types: {
113
- readonly controllers: any;
114
- readonly repositories: any;
115
- readonly providers: any;
116
- readonly subscribers: any;
117
- readonly migrations: any;
118
- };
119
- readonly contexts: any;
120
- readonly contextName: string;
121
- __ref(): Promise<endpointContext.EndpointContext>;
122
- readonly __refSync: endpointContext.EndpointContext;
123
- getClassInstance<T>(ctor: new (...args: any[]) => T): T;
124
- getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
125
- initialize: (overrideOptions?: {
126
- overrideHost?: string;
127
- overrideRemoteHost?: string;
128
- onlyMigrationRun?: boolean;
129
- onlyMigrationRevertToTimestamp?: number;
130
- }) => Promise<endpointContext.EndpointContext>;
131
- readonly realtime: {
132
- readonly client: import("./realtime/realtime-client").RealtimeClient;
133
- readonly server: import("./realtime/realtime-server").RealtimeServer;
134
- };
135
- }>;
136
- }
@@ -1,5 +0,0 @@
1
- // @ts-nocheck
2
- export declare const inject: <T>(entity: () => new (...args: any[]) => T) => T;
3
- /**
4
- * TODO
5
- */