taon 19.0.56 → 19.0.59
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 +279 -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 +31 -46
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-angular-service.d.ts +16 -0
- package/browser/lib/base-classes/base-context.d.ts +0 -9
- package/browser/lib/base-classes/base-controller.d.ts +1 -1
- package/browser/lib/base-classes/base-file-upload.middleware.d.ts +2 -2
- package/browser/lib/base-classes/base-middleware.d.ts +3 -3
- package/browser/lib/base-classes/base.d.ts +0 -9
- package/browser/lib/constants.d.ts +2 -1
- package/browser/lib/create-context.d.ts +2 -20
- package/browser/lib/index.d.ts +1 -28
- package/browser/package.json +1 -1
- package/icon-menu-taon.svg +15 -0
- package/lib/base-classes/base-angular-service.d.ts +16 -0
- package/lib/base-classes/base-angular-service.js +32 -0
- package/lib/base-classes/base-angular-service.js.map +1 -1
- package/lib/base-classes/base-context.d.ts +0 -9
- package/lib/base-classes/base-controller.d.ts +1 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/base-classes/base-file-upload.middleware.d.ts +2 -2
- package/lib/base-classes/base-file-upload.middleware.js.map +1 -1
- package/lib/base-classes/base-middleware.d.ts +3 -3
- package/lib/base-classes/base.d.ts +0 -9
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/constants.d.ts +2 -1
- package/lib/constants.js +6 -1
- package/lib/constants.js.map +1 -1
- package/lib/create-context.d.ts +2 -20
- package/lib/create-context.js +1 -44
- package/lib/create-context.js.map +1 -1
- package/lib/decorators/classes/controller-config.d.ts +0 -0
- package/lib/decorators/classes/controller-config.js +5 -0
- package/lib/decorators/classes/controller-config.js.map +1 -0
- package/lib/decorators/classes/controller-options.d.ts +0 -0
- package/lib/decorators/classes/controller-options.js +5 -0
- package/lib/decorators/classes/controller-options.js.map +1 -0
- 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 +1 -28
- 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 +21 -1
- package/websql/README.md +24 -24
- package/websql/fesm2022/taon.mjs +31 -46
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-angular-service.d.ts +16 -0
- package/websql/lib/base-classes/base-context.d.ts +0 -9
- package/websql/lib/base-classes/base-controller.d.ts +1 -1
- package/websql/lib/base-classes/base-file-upload.middleware.d.ts +2 -2
- package/websql/lib/base-classes/base-middleware.d.ts +3 -3
- package/websql/lib/base-classes/base.d.ts +0 -9
- package/websql/lib/constants.d.ts +2 -1
- package/websql/lib/create-context.d.ts +2 -20
- package/websql/lib/index.d.ts +1 -28
- package/websql/package.json +1 -1
|
@@ -7,7 +7,23 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class BaseAngularsService {
|
|
9
9
|
protected readonly currentContext: TaonContext;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* current context host backend port (for localhost backend)
|
|
13
|
+
*/
|
|
14
|
+
protected readonly CURRENT_HOST_BACKEND_PORT: number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated
|
|
17
|
+
* current context host URL (for localhost backend)
|
|
18
|
+
*/
|
|
19
|
+
protected readonly CURRENT_HOST_URL: string | undefined;
|
|
10
20
|
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
* Returns the host URL for the backend service
|
|
24
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
25
|
+
*/
|
|
26
|
+
get host(): string;
|
|
11
27
|
injectController<T>(ctor: new (...args: any[]) => T,
|
|
12
28
|
/**
|
|
13
29
|
* optional override context
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
declare const BaseContext: {
|
|
3
|
-
types: {
|
|
4
|
-
readonly controllers: any;
|
|
5
|
-
readonly repositories: any;
|
|
6
|
-
readonly providers: any;
|
|
7
|
-
readonly subscribers: any;
|
|
8
|
-
readonly migrations: any;
|
|
9
|
-
readonly middlewares: any;
|
|
10
|
-
};
|
|
11
|
-
readonly contexts: any;
|
|
12
3
|
readonly contextName: string;
|
|
13
4
|
readonly appId: string;
|
|
14
5
|
__ref(): Promise<import("taon/browser").EndpointContext>;
|
|
@@ -9,7 +9,7 @@ export interface MulterFileUploadResponse {
|
|
|
9
9
|
size: number;
|
|
10
10
|
mimetype: string;
|
|
11
11
|
}
|
|
12
|
-
export declare class BaseController extends BaseInjector {
|
|
12
|
+
export declare class BaseController<T = any> extends BaseInjector {
|
|
13
13
|
uploadFormDataToServer(formData: FormData): Models.Http.Response<MulterFileUploadResponse[]>;
|
|
14
14
|
uploadLocalFileToServer(absFilePath: string): Promise<MulterFileUploadResponse[]>;
|
|
15
15
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import express from 'express';
|
|
3
3
|
import * as multer from 'multer';
|
|
4
4
|
import { TaonServerMiddlewareInterceptOptions } from 'ng2-rest/browser';
|
|
5
|
-
import { BaseMiddleware,
|
|
5
|
+
import { BaseMiddleware, TaonAdditionalMiddlewareMethodInfo } from './base-middleware';
|
|
6
6
|
/**
|
|
7
7
|
* Configurable file upload middleware (multer based)
|
|
8
8
|
*/
|
|
9
9
|
export declare class BaseFileUploadMiddleware extends BaseMiddleware {
|
|
10
|
-
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath }:
|
|
10
|
+
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath }: TaonAdditionalMiddlewareMethodInfo): Promise<void>;
|
|
11
11
|
uploadDir(): string;
|
|
12
12
|
storage(): multer.StorageEngine;
|
|
13
13
|
upload(): multer.Multer;
|
|
@@ -11,7 +11,7 @@ import { BaseInjector } from './base-injector';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class BaseMiddleware extends BaseInjector {
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface TaonAdditionalMiddlewareMethodInfo {
|
|
15
15
|
methodName: string;
|
|
16
16
|
expressPath: string;
|
|
17
17
|
httpRequestType: CoreModels.HttpMethod;
|
|
@@ -30,10 +30,10 @@ export interface BaseMiddleware {
|
|
|
30
30
|
/**
|
|
31
31
|
* Specyfic controller method interceptor
|
|
32
32
|
*/
|
|
33
|
-
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }:
|
|
33
|
+
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }: TaonAdditionalMiddlewareMethodInfo): Promise<void> | void;
|
|
34
34
|
/**
|
|
35
35
|
* Controller method frontned interceptor
|
|
36
36
|
* TODO not needed ?
|
|
37
37
|
*/
|
|
38
|
-
interceptClientMethod({ req, next }: TaonClientMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }:
|
|
38
|
+
interceptClientMethod({ req, next }: TaonClientMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }: TaonAdditionalMiddlewareMethodInfo): Observable<AxiosResponse<any>>;
|
|
39
39
|
}
|
|
@@ -26,15 +26,6 @@ export declare namespace Base {
|
|
|
26
26
|
export import Middleware = baseMiddleware.BaseMiddleware;
|
|
27
27
|
export import AngularService = baseService.BaseAngularsService;
|
|
28
28
|
const Context: {
|
|
29
|
-
types: {
|
|
30
|
-
readonly controllers: any;
|
|
31
|
-
readonly repositories: any;
|
|
32
|
-
readonly providers: any;
|
|
33
|
-
readonly subscribers: any;
|
|
34
|
-
readonly migrations: any;
|
|
35
|
-
readonly middlewares: any;
|
|
36
|
-
};
|
|
37
|
-
readonly contexts: any;
|
|
38
29
|
readonly contextName: string;
|
|
39
30
|
readonly appId: string;
|
|
40
31
|
__ref(): Promise<import("taon/browser").EndpointContext>;
|
|
@@ -5,5 +5,6 @@ import { InjectionToken } from '@angular/core';
|
|
|
5
5
|
import type { TaonContext } from './create-context';
|
|
6
6
|
declare let TAON_CONTEXT: InjectionToken<TaonContext>;
|
|
7
7
|
declare let CURRENT_HOST_BACKEND_PORT: InjectionToken<number>;
|
|
8
|
-
|
|
8
|
+
declare let CURRENT_HOST_URL: InjectionToken<string>;
|
|
9
|
+
export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL };
|
|
9
10
|
export declare const apiPrefix = "api";
|
|
@@ -7,15 +7,6 @@ import { Models } from './models';
|
|
|
7
7
|
* create context with specific configuration.
|
|
8
8
|
*/
|
|
9
9
|
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>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARE>) => () => {
|
|
10
|
-
types: {
|
|
11
|
-
readonly controllers: any;
|
|
12
|
-
readonly repositories: any;
|
|
13
|
-
readonly providers: any;
|
|
14
|
-
readonly subscribers: any;
|
|
15
|
-
readonly migrations: any;
|
|
16
|
-
readonly middlewares: any;
|
|
17
|
-
};
|
|
18
|
-
readonly contexts: any;
|
|
19
10
|
readonly contextName: string;
|
|
20
11
|
readonly appId: string;
|
|
21
12
|
/**
|
|
@@ -42,7 +33,7 @@ export declare const createContextTemplate: <CTX extends Record<string, object>,
|
|
|
42
33
|
}) => Promise<EndpointContext>;
|
|
43
34
|
/**
|
|
44
35
|
* realtime communication with server
|
|
45
|
-
*
|
|
36
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
46
37
|
*/
|
|
47
38
|
readonly realtime: {
|
|
48
39
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
@@ -54,15 +45,6 @@ export declare const createContextTemplate: <CTX extends Record<string, object>,
|
|
|
54
45
|
* - contextName
|
|
55
46
|
*/
|
|
56
47
|
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>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARES>) => {
|
|
57
|
-
types: {
|
|
58
|
-
readonly controllers: any;
|
|
59
|
-
readonly repositories: any;
|
|
60
|
-
readonly providers: any;
|
|
61
|
-
readonly subscribers: any;
|
|
62
|
-
readonly migrations: any;
|
|
63
|
-
readonly middlewares: any;
|
|
64
|
-
};
|
|
65
|
-
readonly contexts: any;
|
|
66
48
|
readonly contextName: string;
|
|
67
49
|
readonly appId: string;
|
|
68
50
|
/**
|
|
@@ -89,7 +71,7 @@ export declare const createContext: <CTX extends Record<string, object>, CTRL ex
|
|
|
89
71
|
}) => Promise<EndpointContext>;
|
|
90
72
|
/**
|
|
91
73
|
* realtime communication with server
|
|
92
|
-
*
|
|
74
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
93
75
|
*/
|
|
94
76
|
readonly realtime: {
|
|
95
77
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
package/browser/lib/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export { BaseProvider } from './base-classes/base-provider';
|
|
|
23
23
|
export { BaseEntity } from './base-classes/base-entity';
|
|
24
24
|
export { BaseContext } from './base-classes/base-context';
|
|
25
25
|
export { BaseMigration } from './base-classes/base-migration';
|
|
26
|
-
export {
|
|
26
|
+
export { TaonAdditionalMiddlewareMethodInfo } from './base-classes/base-middleware';
|
|
27
27
|
export { createContext, TaonContext } from './create-context';
|
|
28
28
|
export { inject } from './inject';
|
|
29
29
|
export { Models } from './models';
|
|
@@ -52,15 +52,6 @@ export declare namespace Taon {
|
|
|
52
52
|
const isWebSQL: boolean;
|
|
53
53
|
const isElectron: boolean;
|
|
54
54
|
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>) => {
|
|
55
|
-
types: {
|
|
56
|
-
readonly controllers: any;
|
|
57
|
-
readonly repositories: any;
|
|
58
|
-
readonly providers: any;
|
|
59
|
-
readonly subscribers: any;
|
|
60
|
-
readonly migrations: any;
|
|
61
|
-
readonly middlewares: any;
|
|
62
|
-
};
|
|
63
|
-
readonly contexts: any;
|
|
64
55
|
readonly contextName: string;
|
|
65
56
|
readonly appId: string;
|
|
66
57
|
__ref(): Promise<endpointContext.EndpointContext>;
|
|
@@ -79,15 +70,6 @@ export declare namespace Taon {
|
|
|
79
70
|
};
|
|
80
71
|
};
|
|
81
72
|
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>) => () => {
|
|
82
|
-
types: {
|
|
83
|
-
readonly controllers: any;
|
|
84
|
-
readonly repositories: any;
|
|
85
|
-
readonly providers: any;
|
|
86
|
-
readonly subscribers: any;
|
|
87
|
-
readonly migrations: any;
|
|
88
|
-
readonly middlewares: any;
|
|
89
|
-
};
|
|
90
|
-
readonly contexts: any;
|
|
91
73
|
readonly contextName: string;
|
|
92
74
|
readonly appId: string;
|
|
93
75
|
__ref(): Promise<endpointContext.EndpointContext>;
|
|
@@ -117,15 +99,6 @@ export declare namespace Taon {
|
|
|
117
99
|
entities: Function[];
|
|
118
100
|
controllers: Function[];
|
|
119
101
|
}) => Promise<{
|
|
120
|
-
types: {
|
|
121
|
-
readonly controllers: any;
|
|
122
|
-
readonly repositories: any;
|
|
123
|
-
readonly providers: any;
|
|
124
|
-
readonly subscribers: any;
|
|
125
|
-
readonly migrations: any;
|
|
126
|
-
readonly middlewares: any;
|
|
127
|
-
};
|
|
128
|
-
readonly contexts: any;
|
|
129
102
|
readonly contextName: string;
|
|
130
103
|
readonly appId: string;
|
|
131
104
|
__ref(): Promise<endpointContext.EndpointContext>;
|
package/browser/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 23.432 23.432004"
|
|
4
|
+
version="1.1"
|
|
5
|
+
id="svg1"
|
|
6
|
+
width="23.431999"
|
|
7
|
+
height="23.432003"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
10
|
+
<defs
|
|
11
|
+
id="defs1" />
|
|
12
|
+
<path
|
|
13
|
+
id="path1"
|
|
14
|
+
d="m 11.521484,1.265625 c -0.953032,1.5597622 -1.9887223,3.0593334 -3.1074215,4.5 C 6.9495642,4.7476223 5.485983,3.7308932 4.0214844,2.7128906 3.8829075,2.6603831 3.738968,2.6414114 3.5917969,2.6582031 2.7651252,6.7213623 1.8733597,10.758159 0.9140625,14.767578 v 0.75 c 1.6097872,1.096932 3.2239518,2.188127 4.8417969,3.273438 v 0.08008 h 0.1171875 c 1.806633,1.211497 3.6188659,2.414261 5.4355471,3.611328 0.07144,0.07147 0.14145,0.143364 0.21289,0.214844 h 0.429688 c 3.432812,-2.431526 6.897745,-4.824781 10.394531,-7.179688 V 14.552734 C 21.353633,10.612741 20.406845,6.6479161 19.505859,2.6582031 19.42892,2.5563391 19.339974,2.5393307 19.238281,2.6054688 17.782054,3.6890192 16.286176,4.7048374 14.75,5.6523438 a 3.4715793,3.1345327 0 0 0 -0.01758,-0.00195 C 13.814421,4.161603 12.851221,2.7003542 11.84375,1.265625 Z M 4.1855469,8.9433594 H 10.810547 V 10.048828 H 8.34375 V 15.46875 H 6.6601562 V 10.048828 H 4.1855469 Z m 7.7285151,0 h 1.638672 l 3.41211,4.3574216 V 8.9433594 h 1.564453 V 15.46875 h -1.689453 l -3.361328,-4.253906 v 4.253906 h -1.564454 z" />
|
|
15
|
+
</svg>
|
|
@@ -5,7 +5,23 @@ import { TaonContext } from '../create-context';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare abstract class BaseAngularsService {
|
|
7
7
|
protected readonly currentContext: TaonContext;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated
|
|
10
|
+
* current context host backend port (for localhost backend)
|
|
11
|
+
*/
|
|
12
|
+
protected readonly CURRENT_HOST_BACKEND_PORT: number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated
|
|
15
|
+
* current context host URL (for localhost backend)
|
|
16
|
+
*/
|
|
17
|
+
protected readonly CURRENT_HOST_URL: string | undefined;
|
|
8
18
|
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
* Returns the host URL for the backend service
|
|
22
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
23
|
+
*/
|
|
24
|
+
get host(): string;
|
|
9
25
|
injectController<T>(ctor: new (...args: any[]) => T,
|
|
10
26
|
/**
|
|
11
27
|
* optional override context
|
|
@@ -10,9 +10,39 @@ const inject_1 = require("../inject");
|
|
|
10
10
|
/* */
|
|
11
11
|
/* */
|
|
12
12
|
class BaseAngularsService {
|
|
13
|
+
/* */
|
|
14
|
+
/* */
|
|
15
|
+
/* */
|
|
16
|
+
/* */
|
|
17
|
+
/* */
|
|
18
|
+
/* */
|
|
19
|
+
/* */
|
|
20
|
+
/* */
|
|
21
|
+
/* */
|
|
22
|
+
/* */
|
|
13
23
|
/* */
|
|
14
24
|
/* */
|
|
15
25
|
constructor() {
|
|
26
|
+
/* */
|
|
27
|
+
/* */
|
|
28
|
+
/* */
|
|
29
|
+
/* */
|
|
30
|
+
/* */
|
|
31
|
+
/* */
|
|
32
|
+
/* */
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
* Returns the host URL for the backend service
|
|
37
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
38
|
+
*/
|
|
39
|
+
get host() {
|
|
40
|
+
/* */
|
|
41
|
+
/* */
|
|
42
|
+
/* */
|
|
43
|
+
/* */
|
|
44
|
+
/* */
|
|
45
|
+
return void 0;
|
|
16
46
|
}
|
|
17
47
|
injectController(ctor,
|
|
18
48
|
/**
|
|
@@ -23,6 +53,8 @@ class BaseAngularsService {
|
|
|
23
53
|
let currentContext;
|
|
24
54
|
/* */
|
|
25
55
|
/* */
|
|
56
|
+
/* */
|
|
57
|
+
/* */
|
|
26
58
|
if (!currentContext) {
|
|
27
59
|
throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
|
|
28
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-angular-service.js","sourceRoot":"","sources":[""],"names":[],"mappings":";AAAA,KAAK;;;
|
|
1
|
+
{"version":3,"file":"base-angular-service.js","sourceRoot":"","sources":[""],"names":[],"mappings":";AAAA,KAAK;;;AAQL,sCAAiD;AAEjD;;;GAGG;AACH,KAAK;AACL,KAAK;AAEL,MAAsB,mBAAmB;IACzC,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IAEH;QACF,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;IAEH,CAAC;IAED;;;;OAIG;IACH,IAAI,IAAI;QACV,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QAED,OAAO,KAAK,CAAC,CAAC;IAChB,CAAC;IAED,gBAAgB,CACd,IAA+B;IAC/B;;OAEG;IACH,sBAAoC;QAEpC,OAAO,IAAA,eAAU,EAAC,GAAG,EAAE;YACrB,IAAI,cAA2B,CAAC;YACtC,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YAEC,IAAI,CAAC,cAAc,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,yFAAyF,CAC1F,CAAC;YACJ,CAAC;YACD,OAAO,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACjE,CAAC,CAAM,CAAC;IACV,CAAC;CACF;AA9DD,kDA8DC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
declare const BaseContext: {
|
|
2
|
-
types: {
|
|
3
|
-
readonly controllers: any;
|
|
4
|
-
readonly repositories: any;
|
|
5
|
-
readonly providers: any;
|
|
6
|
-
readonly subscribers: any;
|
|
7
|
-
readonly migrations: any;
|
|
8
|
-
readonly middlewares: any;
|
|
9
|
-
};
|
|
10
|
-
readonly contexts: any;
|
|
11
2
|
readonly contextName: string;
|
|
12
3
|
readonly appId: string;
|
|
13
4
|
__ref(): Promise<import("..").EndpointContext>;
|
|
@@ -9,7 +9,7 @@ export interface MulterFileUploadResponse {
|
|
|
9
9
|
size: number;
|
|
10
10
|
mimetype: string;
|
|
11
11
|
}
|
|
12
|
-
export declare class BaseController extends BaseInjector {
|
|
12
|
+
export declare class BaseController<T = any> extends BaseInjector {
|
|
13
13
|
uploadFormDataToServer(formData: FormData): Models.Http.Response<MulterFileUploadResponse[]>;
|
|
14
14
|
uploadLocalFileToServer(absFilePath: string): Promise<MulterFileUploadResponse[]>;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-controller.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAsC,CAAC,WAAW;AAClD,sCAA4D,CAAC,WAAW;AAExE,qFAA4E;AAC5E,wFAAkE;AAClE,sFAA8E;AAG9E,+EAAyE;AACzE,mDAA+C;AAcxC,IAAM,cAAc,GAApB,MAAM,
|
|
1
|
+
{"version":3,"file":"base-controller.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAsC,CAAC,WAAW;AAClD,sCAA4D,CAAC,WAAW;AAExE,qFAA4E;AAC5E,wFAAkE;AAClE,sFAA8E;AAG9E,+EAAyE;AACzE,mDAA+C;AAcxC,IAAM,cAAc,GAApB,MAAM,cAAsB,SAAQ,4BAAY;IACrD,oCAAoC;IAQpC,sBAAsB,CACZ,QAAkB;QAE1B,sBAAsB;QACtB,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YACxB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YACxB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,qBAAqB,CAAC;YAC9B,CAAC;YACD,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APC,IAAA,8BAAI,EAAC;QACJ,mBAAmB,EAAE,qBAAqB;QAC1C,WAAW,EAAE,CAAC,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,CAAC;YACvC,GAAG,iBAAiB;YACpB,wBAAwB,EAAxB,sDAAwB;SACzB,CAAC;KACH,CAAC;IAEC,WAAA,IAAA,6BAAI,GAAE,CAAA;4DAwBR;yBAlCU,cAAc;IAH1B,IAAA,qCAAc,EAAiB;QAC9B,SAAS,EAAE,gBAAgB;KAC5B,CAAC;GACW,cAAc,CAwD1B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import * as multer from 'multer';
|
|
3
3
|
import { TaonServerMiddlewareInterceptOptions } from 'ng2-rest';
|
|
4
|
-
import { BaseMiddleware,
|
|
4
|
+
import { BaseMiddleware, TaonAdditionalMiddlewareMethodInfo } from './base-middleware';
|
|
5
5
|
/**
|
|
6
6
|
* Configurable file upload middleware (multer based)
|
|
7
7
|
*/
|
|
8
8
|
export declare class BaseFileUploadMiddleware extends BaseMiddleware {
|
|
9
|
-
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath }:
|
|
9
|
+
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath }: TaonAdditionalMiddlewareMethodInfo): Promise<void>;
|
|
10
10
|
uploadDir(): string;
|
|
11
11
|
storage(): multer.StorageEngine;
|
|
12
12
|
upload(): multer.Multer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-file-upload.middleware.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;;;;;;;AAAA,iBAAiB;AACjB,iCAAiC;AAGjC,iCAAiC;AAMjC,sCAA4D;AAE5D,qFAA4E;AAE5E,uDAG2B;AAC3B,YAAY;AAEZ;;GAEG;AAII,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gCAAc;IAC1D,KAAK,CAAC,qBAAqB,CACz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
|
|
10
10
|
*/
|
|
11
11
|
export declare abstract class BaseMiddleware extends BaseInjector {
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface TaonAdditionalMiddlewareMethodInfo {
|
|
14
14
|
methodName: string;
|
|
15
15
|
expressPath: string;
|
|
16
16
|
httpRequestType: CoreModels.HttpMethod;
|
|
@@ -29,10 +29,10 @@ export interface BaseMiddleware {
|
|
|
29
29
|
/**
|
|
30
30
|
* Specyfic controller method interceptor
|
|
31
31
|
*/
|
|
32
|
-
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }:
|
|
32
|
+
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }: TaonAdditionalMiddlewareMethodInfo): Promise<void> | void;
|
|
33
33
|
/**
|
|
34
34
|
* Controller method frontned interceptor
|
|
35
35
|
* TODO not needed ?
|
|
36
36
|
*/
|
|
37
|
-
interceptClientMethod({ req, next }: TaonClientMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }:
|
|
37
|
+
interceptClientMethod({ req, next }: TaonClientMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType }: TaonAdditionalMiddlewareMethodInfo): Observable<AxiosResponse<any>>;
|
|
38
38
|
}
|
|
@@ -25,15 +25,6 @@ export declare namespace Base {
|
|
|
25
25
|
export import Middleware = baseMiddleware.BaseMiddleware;
|
|
26
26
|
export import AngularService = baseService.BaseAngularsService;
|
|
27
27
|
const Context: {
|
|
28
|
-
types: {
|
|
29
|
-
readonly controllers: any;
|
|
30
|
-
readonly repositories: any;
|
|
31
|
-
readonly providers: any;
|
|
32
|
-
readonly subscribers: any;
|
|
33
|
-
readonly migrations: any;
|
|
34
|
-
readonly middlewares: any;
|
|
35
|
-
};
|
|
36
|
-
readonly contexts: any;
|
|
37
28
|
readonly contextName: string;
|
|
38
29
|
readonly appId: string;
|
|
39
30
|
__ref(): Promise<import("..").EndpointContext>;
|
|
@@ -21,6 +21,6 @@ exports.PROJECT_NPM_NAME = 'taon';
|
|
|
21
21
|
/**
|
|
22
22
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
23
23
|
*/
|
|
24
|
-
exports.CURRENT_PACKAGE_VERSION = '19.0.
|
|
24
|
+
exports.CURRENT_PACKAGE_VERSION = '19.0.59';
|
|
25
25
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
26
26
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
package/lib/constants.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ import { InjectionToken } from '@angular/core';
|
|
|
4
4
|
import type { TaonContext } from './create-context';
|
|
5
5
|
declare let TAON_CONTEXT: InjectionToken<TaonContext>;
|
|
6
6
|
declare let CURRENT_HOST_BACKEND_PORT: InjectionToken<number>;
|
|
7
|
-
|
|
7
|
+
declare let CURRENT_HOST_URL: InjectionToken<string>;
|
|
8
|
+
export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL };
|
|
8
9
|
export declare const apiPrefix = "api";
|
package/lib/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.apiPrefix = exports.CURRENT_HOST_BACKEND_PORT = exports.TAON_CONTEXT = exports.TaonEntityKeysToOmitArr = void 0;
|
|
3
|
+
exports.apiPrefix = exports.CURRENT_HOST_URL = exports.CURRENT_HOST_BACKEND_PORT = exports.TAON_CONTEXT = exports.TaonEntityKeysToOmitArr = void 0;
|
|
4
4
|
exports.TaonEntityKeysToOmitArr = [
|
|
5
5
|
'ctrl',
|
|
6
6
|
'clone',
|
|
@@ -23,5 +23,10 @@ let TAON_CONTEXT;
|
|
|
23
23
|
/* */
|
|
24
24
|
/* */
|
|
25
25
|
let CURRENT_HOST_BACKEND_PORT;
|
|
26
|
+
/* */
|
|
27
|
+
/* */
|
|
28
|
+
/* */
|
|
29
|
+
/* */
|
|
30
|
+
let CURRENT_HOST_URL;
|
|
26
31
|
exports.apiPrefix = 'api';
|
|
27
32
|
//# sourceMappingURL=constants.js.map
|
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAkBa,QAAA,uBAAuB,GAA2B;IAC7D,MAAM;IACN,OAAO;IACP,sBAAsB;IACtB,KAAK;IACL,QAAQ;IACR,GAAG;IACH,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,wBAAwB;IACxB,kBAAkB;IAClB,kBAAkB;IAClB,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;CACnB,CAAC;AAMF,IAAI,YAAyC,CAAC;AAC9C,KAAK;AACL,KAAK;AAGL,IAAI,yBAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAkBa,QAAA,uBAAuB,GAA2B;IAC7D,MAAM;IACN,OAAO;IACP,sBAAsB;IACtB,KAAK;IACL,QAAQ;IACR,GAAG;IACH,UAAU;IACV,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,wBAAwB;IACxB,kBAAkB;IAClB,kBAAkB;IAClB,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;CACnB,CAAC;AAMF,IAAI,YAAyC,CAAC;AAC9C,KAAK;AACL,KAAK;AAGL,IAAI,yBAAiD,CAAC;AACtD,KAAK;AACL,KAAK;AACL,KAAK;AACL,KAAK;AAGL,IAAI,gBAAwC,CAAC;AAShC,QAAA,SAAS,GAAG,KAAK,CAAC"}
|
package/lib/create-context.d.ts
CHANGED
|
@@ -6,15 +6,6 @@ import { Models } from './models';
|
|
|
6
6
|
* create context with specific configuration.
|
|
7
7
|
*/
|
|
8
8
|
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>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARE>) => () => {
|
|
9
|
-
types: {
|
|
10
|
-
readonly controllers: any;
|
|
11
|
-
readonly repositories: any;
|
|
12
|
-
readonly providers: any;
|
|
13
|
-
readonly subscribers: any;
|
|
14
|
-
readonly migrations: any;
|
|
15
|
-
readonly middlewares: any;
|
|
16
|
-
};
|
|
17
|
-
readonly contexts: any;
|
|
18
9
|
readonly contextName: string;
|
|
19
10
|
readonly appId: string;
|
|
20
11
|
/**
|
|
@@ -41,7 +32,7 @@ export declare const createContextTemplate: <CTX extends Record<string, object>,
|
|
|
41
32
|
}) => Promise<EndpointContext>;
|
|
42
33
|
/**
|
|
43
34
|
* realtime communication with server
|
|
44
|
-
*
|
|
35
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
45
36
|
*/
|
|
46
37
|
readonly realtime: {
|
|
47
38
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
@@ -53,15 +44,6 @@ export declare const createContextTemplate: <CTX extends Record<string, object>,
|
|
|
53
44
|
* - contextName
|
|
54
45
|
*/
|
|
55
46
|
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>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => Models.ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARES>) => {
|
|
56
|
-
types: {
|
|
57
|
-
readonly controllers: any;
|
|
58
|
-
readonly repositories: any;
|
|
59
|
-
readonly providers: any;
|
|
60
|
-
readonly subscribers: any;
|
|
61
|
-
readonly migrations: any;
|
|
62
|
-
readonly middlewares: any;
|
|
63
|
-
};
|
|
64
|
-
readonly contexts: any;
|
|
65
47
|
readonly contextName: string;
|
|
66
48
|
readonly appId: string;
|
|
67
49
|
/**
|
|
@@ -88,7 +70,7 @@ export declare const createContext: <CTX extends Record<string, object>, CTRL ex
|
|
|
88
70
|
}) => Promise<EndpointContext>;
|
|
89
71
|
/**
|
|
90
72
|
* realtime communication with server
|
|
91
|
-
*
|
|
73
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
92
74
|
*/
|
|
93
75
|
readonly realtime: {
|
|
94
76
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
package/lib/create-context.js
CHANGED
|
@@ -30,50 +30,7 @@ const createContext = (configFn) => {
|
|
|
30
30
|
// );
|
|
31
31
|
const endpointContextRef = new endpoint_context_1.EndpointContext(config, configFn);
|
|
32
32
|
const res = {
|
|
33
|
-
//#region types
|
|
34
|
-
types: {
|
|
35
|
-
//#region entites for
|
|
36
|
-
// get entities() {
|
|
37
|
-
// return config.entities;
|
|
38
|
-
// },
|
|
39
|
-
// entitiesFor(classInstace: BaseInjector) {
|
|
40
|
-
// const ctx = classInstace.__endpoint_context__;
|
|
41
|
-
// if (!entitiesCache[ctx.contextName]) {
|
|
42
|
-
// entitiesCache[ctx.contextName] = {};
|
|
43
|
-
// for (const entityClassName of Object.keys(config.entities)) {
|
|
44
|
-
// entitiesCache[ctx.contextName][entityClassName] =
|
|
45
|
-
// config.entities[entityClassName][
|
|
46
|
-
// Taon.symbols.orignalClassClonesObj
|
|
47
|
-
// ][ctx.contextName];
|
|
48
|
-
// }
|
|
49
|
-
// }
|
|
50
|
-
// return entitiesCache[ctx.contextName] as typeof config.entities;
|
|
51
|
-
// },
|
|
52
|
-
//#endregion
|
|
53
|
-
get controllers() {
|
|
54
|
-
return config.controllers; // TODO QUICK_FIX new typescript generated wrong types
|
|
55
|
-
},
|
|
56
|
-
get repositories() {
|
|
57
|
-
return config.repositories; // TODO QUICK_FIX new typescript generated wrong types
|
|
58
|
-
},
|
|
59
|
-
get providers() {
|
|
60
|
-
return config.providers; // TODO QUICK_FIX new typescript generated wrong types
|
|
61
|
-
},
|
|
62
|
-
get subscribers() {
|
|
63
|
-
return config.subscribers; // TODO QUICK_FIX new typescript generated wrong types
|
|
64
|
-
},
|
|
65
|
-
get migrations() {
|
|
66
|
-
return config.migrations; // TODO QUICK_FIX new typescript generated wrong types
|
|
67
|
-
},
|
|
68
|
-
get middlewares() {
|
|
69
|
-
return config.middlewares; // TODO QUICK_FIX new typescript generated wrong types
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
//#endregion
|
|
73
33
|
//#region contexts
|
|
74
|
-
get contexts() {
|
|
75
|
-
return config.contexts; // TODO QUICK_FIX new typescript generated wrong types
|
|
76
|
-
},
|
|
77
34
|
get contextName() {
|
|
78
35
|
return config.contextName;
|
|
79
36
|
},
|
|
@@ -207,7 +164,7 @@ const createContext = (configFn) => {
|
|
|
207
164
|
},
|
|
208
165
|
/**
|
|
209
166
|
* realtime communication with server
|
|
210
|
-
*
|
|
167
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
211
168
|
*/
|
|
212
169
|
get realtime() {
|
|
213
170
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-context.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,iBAAiB;AACjB,sCAAmD;AAEnD,yDAAqD;AAErD,KAAK;AACL,YAAY;AAEZ;;;;GAIG;AACI,MAAM,qBAAqB,GAAG,CAYnC,QAWC,EACD,EAAE;IACF,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,qBAAa,EASlB,QAAQ,CAAC,CAAC;IACd,CAAC,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,qBAAqB,yBAqChC;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AA4F;wBAC5F,IAAI;wBACJ,YAAY;wBAEZ,IAAI,kBAAkB,CAAC,gBAAgB,EAAE,CAAC;4BACxC,MAAM,kBAAkB,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC;wBACvE,CAAC;6BAAM,IAAI,kBAAkB,CAAC,8BAA8B,EAAE,CAAC;4BAC7D,MAAM,kBAAkB,CAAC,YAAY,CAAC,0BAA0B,CAC9D,kBAAkB,CAAC,8BAA8B,CAClD,CAAC;wBACJ,CAAC;6BAAM,CAAC;4BACN,MAAM,kBAAkB,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC;wBACvE,CAAC;oBACH,CAAC;oBAED,OAAO,CAAC,kBAAkB,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;gBACH,YAAY;YACd,CAAC,CAAC,CAAC;QACL,CAAC;QACD;;;WAGG;QACH,IAAI,QAAQ;YACV,OAAO;gBACL,IAAI,MAAM;oBACR,OAAO,kBAAkB,CAAC,cAAc,CAAC;gBAC3C,CAAC;gBACD,IAAI,MAAM;oBACR,OAAO,kBAAkB,CAAC,cAAc,CAAC;gBAC3C,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAnNW,QAAA,aAAa,iBAmNxB"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller-config.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAAA,gDAAwC;AAAxC,SAAgB,kBAAkB,KAAK,CAAC"}
|
|
File without changes
|