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/websql").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/websql';
|
|
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/websql").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/websql/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>;
|