taon 19.0.60 → 19.0.61
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/README.md +160 -160
- package/bin/start.js +281 -279
- package/bin/taon +6 -6
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +5 -5
- package/browser/README.md +24 -24
- package/browser/fesm2022/taon.mjs +81 -24
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-context.d.ts +1 -6
- package/browser/lib/base-classes/base-controller.d.ts +18 -2
- package/browser/lib/base-classes/base-repository.d.ts +1 -1
- package/browser/lib/base-classes/base.d.ts +1 -6
- package/browser/lib/create-context.d.ts +2 -12
- package/browser/lib/endpoint-context.d.ts +3 -0
- package/browser/lib/index.d.ts +5 -18
- package/browser/lib/models.d.ts +6 -0
- package/browser/lib/realtime/realtime-client.d.ts +2 -2
- package/browser/package.json +1 -1
- package/lib/base-classes/base-context.d.ts +1 -6
- package/lib/base-classes/base-controller.d.ts +18 -2
- package/lib/base-classes/base-controller.js +25 -5
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/base-classes/base-repository.d.ts +1 -1
- package/lib/base-classes/base-repository.js +12 -6
- package/lib/base-classes/base-repository.js.map +1 -1
- package/lib/base-classes/base.d.ts +1 -6
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/create-context.d.ts +2 -12
- package/lib/create-context.js +21 -11
- package/lib/create-context.js.map +1 -1
- package/lib/decorators/classes/controller-config.d.ts +0 -20
- package/lib/decorators/classes/controller-config.js +2 -18
- package/lib/decorators/classes/controller-config.js.map +1 -1
- package/lib/decorators/classes/controller-options.d.ts +0 -16
- package/lib/decorators/classes/controller-options.js +2 -17
- package/lib/decorators/classes/controller-options.js.map +1 -1
- package/lib/endpoint-context.d.ts +3 -0
- package/lib/endpoint-context.js +24 -6
- package/lib/endpoint-context.js.map +1 -1
- package/lib/env/env.angular-node-app.d.ts +2 -0
- package/lib/env/env.angular-node-app.js +4 -2
- package/lib/env/env.angular-node-app.js.map +1 -1
- package/lib/env/env.docs-webapp.d.ts +2 -0
- package/lib/env/env.docs-webapp.js +4 -2
- package/lib/env/env.docs-webapp.js.map +1 -1
- package/lib/env/env.electron-app.d.ts +2 -0
- package/lib/env/env.electron-app.js +4 -2
- package/lib/env/env.electron-app.js.map +1 -1
- package/lib/env/env.mobile-app.d.ts +2 -0
- package/lib/env/env.mobile-app.js +4 -2
- package/lib/env/env.mobile-app.js.map +1 -1
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +2 -0
- package/lib/env/env.npm-lib-and-cli-tool.js +4 -2
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib/env/env.vscode-plugin.d.ts +2 -0
- package/lib/env/env.vscode-plugin.js +4 -2
- package/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib/env.d.ts +2 -0
- package/lib/env.js +7 -0
- package/lib/env.js.map +1 -0
- package/lib/index.d.ts +5 -18
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +6 -0
- package/lib/models.js.map +1 -1
- package/lib/realtime/realtime-client.d.ts +2 -2
- package/lib/realtime/realtime-client.js +13 -7
- package/lib/realtime/realtime-client.js.map +1 -1
- package/lib/realtime/realtime-server.js +17 -14
- package/lib/realtime/realtime-server.js.map +1 -1
- package/lib/storage.d.ts +1 -0
- package/lib/storage.js +6 -0
- package/lib/storage.js.map +1 -0
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/package.json +1 -1
- package/websql/README.md +24 -24
- package/websql/fesm2022/taon.mjs +75 -20
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-context.d.ts +1 -6
- package/websql/lib/base-classes/base-controller.d.ts +18 -2
- package/websql/lib/base-classes/base-repository.d.ts +1 -1
- package/websql/lib/base-classes/base.d.ts +1 -6
- package/websql/lib/create-context.d.ts +2 -12
- package/websql/lib/endpoint-context.d.ts +3 -0
- package/websql/lib/index.d.ts +5 -18
- package/websql/lib/models.d.ts +6 -0
- package/websql/lib/realtime/realtime-client.d.ts +2 -2
- package/websql/package.json +1 -1
|
@@ -6,12 +6,7 @@ declare const BaseContext: {
|
|
|
6
6
|
readonly __refSync: import("taon/websql").EndpointContext;
|
|
7
7
|
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
8
8
|
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
9
|
-
initialize: (overrideOptions?:
|
|
10
|
-
overrideHost?: string;
|
|
11
|
-
overrideRemoteHost?: string;
|
|
12
|
-
onlyMigrationRun?: boolean;
|
|
13
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
14
|
-
}) => Promise<import("taon/websql").EndpointContext>;
|
|
9
|
+
initialize: (overrideOptions?: import("taon/websql").Models.TaonInitializeParams) => Promise<import("taon/websql").EndpointContext>;
|
|
15
10
|
readonly realtime: {
|
|
16
11
|
readonly client: import("../realtime/realtime-client").RealtimeClient;
|
|
17
12
|
readonly server: import("../realtime/realtime-server").RealtimeServer;
|
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import type { EndpointContext } from '../endpoint-context';
|
|
2
3
|
import type { Models } from '../models';
|
|
3
4
|
import { BaseInjector } from './base-injector';
|
|
4
5
|
export interface MulterFileUploadResponse {
|
|
5
6
|
ok: boolean;
|
|
6
7
|
originalName: string;
|
|
8
|
+
/**
|
|
9
|
+
* name change to this to avoid confusion with originalname
|
|
10
|
+
* (similar to originalname with added uniq part)
|
|
11
|
+
*/
|
|
7
12
|
savedAs: string;
|
|
8
|
-
savedPath: string;
|
|
9
13
|
size: number;
|
|
10
14
|
mimetype: string;
|
|
11
15
|
}
|
|
12
16
|
export declare class BaseController<T = any> extends BaseInjector {
|
|
17
|
+
/**
|
|
18
|
+
* Hook that is called when taon app is inited
|
|
19
|
+
* (all contexts are created and inited)
|
|
20
|
+
*/
|
|
21
|
+
afterAllCtxInited(allContexts?: {
|
|
22
|
+
[contextName: string]: EndpointContext;
|
|
23
|
+
}): Promise<void>;
|
|
13
24
|
uploadFormDataToServer(formData: FormData): Models.Http.Response<MulterFileUploadResponse[]>;
|
|
14
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Hook after file is uploaded
|
|
27
|
+
* through `uploadFormDataToServer` or `uploadLocalFileToServer`
|
|
28
|
+
*/
|
|
29
|
+
protected afterFileUploadAction(file: MulterFileUploadResponse): void | Promise<void>;
|
|
30
|
+
uploadLocalFileToServer(absFilePath: string, options?: Pick<Models.Http.Rest.Ng2RestAxiosRequestConfig, 'onUploadProgress'>): Promise<MulterFileUploadResponse[]>;
|
|
15
31
|
}
|
|
@@ -89,7 +89,7 @@ export declare abstract class BaseRepository<Entity extends {
|
|
|
89
89
|
/**
|
|
90
90
|
* alias to remove
|
|
91
91
|
*/
|
|
92
|
-
delete(idOrEntity: number | string | Entity): Promise<Entity>;
|
|
92
|
+
delete(idOrEntity: number | string | Partial<Entity>): Promise<Entity>;
|
|
93
93
|
/**
|
|
94
94
|
* alias to removeById
|
|
95
95
|
*/
|
|
@@ -32,12 +32,7 @@ export declare namespace Base {
|
|
|
32
32
|
readonly __refSync: import("taon/websql").EndpointContext;
|
|
33
33
|
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
34
34
|
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
35
|
-
initialize: (overrideOptions?:
|
|
36
|
-
overrideHost?: string;
|
|
37
|
-
overrideRemoteHost?: string;
|
|
38
|
-
onlyMigrationRun?: boolean;
|
|
39
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
40
|
-
}) => Promise<import("taon/websql").EndpointContext>;
|
|
35
|
+
initialize: (overrideOptions?: import("taon/websql").Models.TaonInitializeParams) => Promise<import("taon/websql").EndpointContext>;
|
|
41
36
|
readonly realtime: {
|
|
42
37
|
readonly client: import("../realtime/realtime-client").RealtimeClient;
|
|
43
38
|
readonly server: import("../realtime/realtime-server").RealtimeServer;
|
|
@@ -25,12 +25,7 @@ export declare const createContextTemplate: <CTX extends Record<string, object>,
|
|
|
25
25
|
* - create controller instances for context
|
|
26
26
|
* - init database (if enable) + migation scripts
|
|
27
27
|
*/
|
|
28
|
-
initialize: (overrideOptions?:
|
|
29
|
-
overrideHost?: string;
|
|
30
|
-
overrideRemoteHost?: string;
|
|
31
|
-
onlyMigrationRun?: boolean;
|
|
32
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
33
|
-
}) => Promise<EndpointContext>;
|
|
28
|
+
initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
|
|
34
29
|
/**
|
|
35
30
|
* realtime communication with server
|
|
36
31
|
* TCP(upgrade) socket.io (or ipc) based.
|
|
@@ -63,12 +58,7 @@ export declare const createContext: <CTX extends Record<string, object>, CTRL ex
|
|
|
63
58
|
* - create controller instances for context
|
|
64
59
|
* - init database (if enable) + migation scripts
|
|
65
60
|
*/
|
|
66
|
-
initialize: (overrideOptions?:
|
|
67
|
-
overrideHost?: string;
|
|
68
|
-
overrideRemoteHost?: string;
|
|
69
|
-
onlyMigrationRun?: boolean;
|
|
70
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
71
|
-
}) => Promise<EndpointContext>;
|
|
61
|
+
initialize: (overrideOptions?: Models.TaonInitializeParams) => Promise<EndpointContext>;
|
|
72
62
|
/**
|
|
73
63
|
* realtime communication with server
|
|
74
64
|
* TCP(upgrade) socket.io (or ipc) based.
|
|
@@ -157,6 +157,9 @@ export declare class EndpointContext {
|
|
|
157
157
|
initDatabaseConnection(): Promise<void>;
|
|
158
158
|
private updateCalculatedPathsForControllers;
|
|
159
159
|
private mergeControllerMethodsConfigs;
|
|
160
|
+
initControllersHook(allInitedEndpointContexts: {
|
|
161
|
+
[contextName: string]: EndpointContext;
|
|
162
|
+
}): Promise<void>;
|
|
160
163
|
initControllers(): Promise<void>;
|
|
161
164
|
writeActiveRoutes(): void;
|
|
162
165
|
get middlewares(): Models.MiddlewareType[];
|
package/websql/lib/index.d.ts
CHANGED
|
@@ -27,7 +27,9 @@ export { TaonAdditionalMiddlewareMethodInfo } from './base-classes/base-middlewa
|
|
|
27
27
|
export { createContext, TaonContext } from './create-context';
|
|
28
28
|
export { inject } from './inject';
|
|
29
29
|
export { Models } from './models';
|
|
30
|
+
export { BaseFileUploadMiddleware } from './base-classes/base-file-upload.middleware';
|
|
30
31
|
export * from './constants';
|
|
32
|
+
export { MulterFileUploadResponse } from './base-classes/base-controller';
|
|
31
33
|
export { ClassHelpers } from './helpers/class-helpers';
|
|
32
34
|
export type { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions, } from 'ng2-rest/websql';
|
|
33
35
|
export declare namespace Taon {
|
|
@@ -58,12 +60,7 @@ export declare namespace Taon {
|
|
|
58
60
|
readonly __refSync: endpointContext.EndpointContext;
|
|
59
61
|
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
60
62
|
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
61
|
-
initialize: (overrideOptions?:
|
|
62
|
-
overrideHost?: string;
|
|
63
|
-
overrideRemoteHost?: string;
|
|
64
|
-
onlyMigrationRun?: boolean;
|
|
65
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
66
|
-
}) => Promise<endpointContext.EndpointContext>;
|
|
63
|
+
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
67
64
|
readonly realtime: {
|
|
68
65
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
69
66
|
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
@@ -76,12 +73,7 @@ export declare namespace Taon {
|
|
|
76
73
|
readonly __refSync: endpointContext.EndpointContext;
|
|
77
74
|
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
78
75
|
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
79
|
-
initialize: (overrideOptions?:
|
|
80
|
-
overrideHost?: string;
|
|
81
|
-
overrideRemoteHost?: string;
|
|
82
|
-
onlyMigrationRun?: boolean;
|
|
83
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
84
|
-
}) => Promise<endpointContext.EndpointContext>;
|
|
76
|
+
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
85
77
|
readonly realtime: {
|
|
86
78
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
87
79
|
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
@@ -105,12 +97,7 @@ export declare namespace Taon {
|
|
|
105
97
|
readonly __refSync: endpointContext.EndpointContext;
|
|
106
98
|
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
107
99
|
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
108
|
-
initialize: (overrideOptions?:
|
|
109
|
-
overrideHost?: string;
|
|
110
|
-
overrideRemoteHost?: string;
|
|
111
|
-
onlyMigrationRun?: boolean;
|
|
112
|
-
onlyMigrationRevertToTimestamp?: number;
|
|
113
|
-
}) => Promise<endpointContext.EndpointContext>;
|
|
100
|
+
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
114
101
|
readonly realtime: {
|
|
115
102
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
116
103
|
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
package/websql/lib/models.d.ts
CHANGED
|
@@ -255,4 +255,10 @@ export declare namespace Models {
|
|
|
255
255
|
onlyMigrationRun?: boolean;
|
|
256
256
|
onlyMigrationRevertToTimestamp?: number;
|
|
257
257
|
}
|
|
258
|
+
interface TaonInitializeParams {
|
|
259
|
+
overrideHost?: string;
|
|
260
|
+
overrideRemoteHost?: string;
|
|
261
|
+
onlyMigrationRun?: boolean;
|
|
262
|
+
onlyMigrationRevertToTimestamp?: number;
|
|
263
|
+
}
|
|
258
264
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { RealtimeCore } from './realtime-core';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { RealtimeModels } from './realtime.models';
|
|
5
3
|
import type { BaseEntity } from '../base-classes/base-entity';
|
|
4
|
+
import { RealtimeCore } from './realtime-core';
|
|
5
|
+
import { RealtimeModels } from './realtime.models';
|
|
6
6
|
export declare class RealtimeClient {
|
|
7
7
|
private core;
|
|
8
8
|
private subsManagers;
|