taon 19.0.48 → 19.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/fesm2022/taon.mjs +304 -198
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/constants.d.ts +2 -1
- package/browser/lib/endpoint-context.d.ts +28 -1
- package/browser/lib/helpers/class-helpers.d.ts +0 -1
- package/browser/lib/models.d.ts +19 -0
- package/browser/lib/realtime/realtime-core.d.ts +2 -2
- package/browser/lib/realtime/realtime-server.d.ts +2 -2
- package/browser/package.json +1 -1
- package/lib/base-classes/base-subscriber.d.ts +4 -0
- package/lib/base-classes/base-subscriber.js +25 -0
- package/lib/base-classes/base-subscriber.js.map +1 -0
- package/lib/build-info._auto-generated_.d.ts +17 -1
- package/lib/build-info._auto-generated_.js +18 -2
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/constants.d.ts +1 -0
- package/lib/constants.js +2 -1
- package/lib/constants.js.map +1 -1
- package/lib/create-context.js +15 -0
- package/lib/create-context.js.map +1 -1
- package/lib/endpoint-context.d.ts +28 -1
- package/lib/endpoint-context.js +132 -56
- package/lib/endpoint-context.js.map +1 -1
- package/lib/env.js +5 -1
- package/lib/env.js.map +1 -1
- package/lib/helpers/class-helpers.d.ts +0 -1
- package/lib/helpers/class-helpers.js +13 -14
- package/lib/helpers/class-helpers.js.map +1 -1
- package/lib/models.d.ts +19 -0
- package/lib/models.js +3 -0
- package/lib/models.js.map +1 -1
- package/lib/realtime/realtime-client.js +9 -0
- package/lib/realtime/realtime-client.js.map +1 -1
- package/lib/realtime/realtime-core.d.ts +2 -2
- package/lib/realtime/realtime-core.js +6 -5
- package/lib/realtime/realtime-core.js.map +1 -1
- package/lib/realtime/realtime-server.d.ts +2 -2
- package/lib/realtime/realtime-server.js +20 -23
- package/lib/realtime/realtime-server.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.js +214 -0
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +5 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +139 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +16 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +68 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +56 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +50 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +13 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +3 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +2 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +6 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +16 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +54 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +17 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +52 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +11 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +39 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +13 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +46 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +11 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +3 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js +2 -2
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib/storage.d.ts +1 -1
- package/lib/storage.js +5 -1
- package/lib/storage.js.map +1 -1
- package/lib/ui/directives/firedev-inject-html.directive.d.ts +6 -0
- package/lib/ui/directives/firedev-long-press.directive.d.ts +22 -0
- package/lib/ui/directives/index.d.ts +3 -0
- package/lib/ui/directives/index.js +5 -0
- package/lib/ui/directives/index.js.map +1 -0
- package/lib/ui/directives/safe.pipe.d.ts +7 -0
- package/lib/ui/directives/taon-inject-html.directive.d.ts +6 -0
- package/lib/ui/directives/taon-long-press.directive.d.ts +22 -0
- package/lib/ui/directives/view-mode.d.ts +5 -0
- package/lib/ui/directives/view-mode.js +10 -0
- package/lib/ui/directives/view-mode.js.map +1 -0
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +29 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +8 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +13 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +5 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +3 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +14 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +43 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin.models.d.ts +5 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js +3 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js.map +1 -0
- package/lib/ui/taon-full-material.module.d.ts +5 -0
- package/lib/ui/taon-github-fork-me-corner/index.d.ts +2 -0
- package/lib/ui/taon-github-fork-me-corner/index.js +5 -0
- package/lib/ui/taon-github-fork-me-corner/index.js.map +1 -0
- package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +3 -0
- package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +2 -0
- package/lib/ui/taon-github-fork-me-ribbon/index.d.ts +2 -0
- package/lib/ui/taon-github-fork-me-ribbon/index.js +5 -0
- package/lib/ui/taon-github-fork-me-ribbon/index.js.map +1 -0
- package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.component.d.ts +3 -0
- package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.module.d.ts +2 -0
- package/lib/ui/taon-notifications/index.d.ts +4 -0
- package/lib/ui/taon-notifications/index.js +24 -0
- package/lib/ui/taon-notifications/index.js.map +1 -0
- package/lib/ui/taon-notifications/taon-notifications.component.d.ts +9 -0
- package/lib/ui/taon-notifications/taon-notifications.models.d.ts +6 -0
- package/lib/ui/taon-notifications/taon-notifications.models.js +5 -0
- package/lib/ui/taon-notifications/taon-notifications.models.js.map +1 -0
- package/lib/ui/taon-notifications/taon-notifications.module.d.ts +2 -0
- package/lib/ui/taon-notifications/taon-notifications.service.d.ts +11 -0
- package/lib/ui/taon-progress-bar/index.d.ts +2 -0
- package/lib/ui/taon-progress-bar/index.js +5 -0
- package/lib/ui/taon-progress-bar/index.js.map +1 -0
- package/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +13 -0
- package/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +2 -0
- package/lib/ui/taon-session-passcode/index.d.ts +1 -0
- package/lib/ui/taon-session-passcode/index.js +5 -0
- package/lib/ui/taon-session-passcode/index.js.map +1 -0
- package/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +35 -0
- package/lib/ui/taon-table/index.d.ts +2 -0
- package/lib/ui/taon-table/index.js +5 -0
- package/lib/ui/taon-table/index.js.map +1 -0
- package/lib/ui/taon-table/taon-table.component.d.ts +34 -0
- package/lib/ui/taon-table/taon-table.module.d.ts +2 -0
- package/lib/ui/taon.models.d.ts +11 -0
- package/lib/ui/taon.models.js +3 -0
- package/lib/ui/taon.models.js.map +1 -0
- package/lib/ui/toan-full-material.module.d.ts +2 -0
- package/package.json +1 -1
- package/tmp-environment.json +43 -0
- package/websql/fesm2022/taon.mjs +335 -230
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/constants.d.ts +2 -1
- package/websql/lib/endpoint-context.d.ts +28 -1
- package/websql/lib/helpers/class-helpers.d.ts +0 -1
- package/websql/lib/models.d.ts +19 -0
- package/websql/lib/realtime/realtime-core.d.ts +2 -2
- package/websql/lib/realtime/realtime-server.d.ts +2 -2
- package/websql/package.json +1 -1
|
@@ -5,4 +5,5 @@ 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
|
-
export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT };
|
|
8
|
+
export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT };
|
|
9
|
+
export declare const apiPrefix = "api";
|
|
@@ -31,7 +31,7 @@ export declare class EndpointContext {
|
|
|
31
31
|
private readonly classInstancesByNameObj;
|
|
32
32
|
private readonly objWithClassesInstancesArr;
|
|
33
33
|
readonly activeRoutes: {
|
|
34
|
-
|
|
34
|
+
expressPath: string;
|
|
35
35
|
method: Models.Http.Rest.HttpMethod;
|
|
36
36
|
}[];
|
|
37
37
|
readonly skipWritingServerRoutes: boolean;
|
|
@@ -59,6 +59,10 @@ export declare class EndpointContext {
|
|
|
59
59
|
get logFramework(): boolean;
|
|
60
60
|
get logDb(): boolean;
|
|
61
61
|
get logMigrations(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Inside docker there is not need for https secure server
|
|
64
|
+
*/
|
|
65
|
+
private isRunningInsideDocker;
|
|
62
66
|
constructor(originalConfig: Models.ContextOptions<any, any, any, any, any, any, any>, configFn: (env: any) => Models.ContextOptions<any, any, any, any, any, any, any>);
|
|
63
67
|
init(options?: {
|
|
64
68
|
initFromRecrusiveContextResovle?: boolean;
|
|
@@ -102,7 +106,29 @@ export declare class EndpointContext {
|
|
|
102
106
|
reinitControllers(): Promise<void>;
|
|
103
107
|
initClasses(): Promise<void>;
|
|
104
108
|
isActiveOn(classInstance: object): boolean;
|
|
109
|
+
get frontendHostUri(): URL;
|
|
105
110
|
get uri(): URL;
|
|
111
|
+
get uriPort(): string | undefined;
|
|
112
|
+
get uriProtocol(): string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Examples
|
|
115
|
+
* http://localhost:3000
|
|
116
|
+
* https://localhost (from localhost:80) *
|
|
117
|
+
*/
|
|
118
|
+
get uriOrigin(): string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Exampels
|
|
121
|
+
* http://localhost:3000/path/to/somewhere
|
|
122
|
+
* https://localhost/path/to/somewhere (from localhost:80)
|
|
123
|
+
*/
|
|
124
|
+
get uriPathname(): string | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Examples
|
|
127
|
+
* http://localhost:3000/path/to/somewhere -> '/path/to/somewhere'
|
|
128
|
+
* http://localhost:3000 -> '' #
|
|
129
|
+
* https://localhost/path/to/ -> '/path/to/somewhere' # remove last slash
|
|
130
|
+
*/
|
|
131
|
+
get uriPathnameOrNothingIfRoot(): string;
|
|
106
132
|
/**
|
|
107
133
|
* Port from uri as number
|
|
108
134
|
* @returns {Number | undefined}
|
|
@@ -113,6 +139,7 @@ export declare class EndpointContext {
|
|
|
113
139
|
* ipc/udp needs this
|
|
114
140
|
*/
|
|
115
141
|
get contextName(): string;
|
|
142
|
+
get activeContext(): string | null;
|
|
116
143
|
get appId(): string;
|
|
117
144
|
get publicAssets(): {
|
|
118
145
|
serverPath: string;
|
|
@@ -15,5 +15,4 @@ export declare namespace ClassHelpers {
|
|
|
15
15
|
const getControllerConfig: (target: Function) => Models.ControllerConfig | undefined;
|
|
16
16
|
const getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
|
|
17
17
|
const getControllerConfigs: (target: Function, configs?: Models.ControllerConfig[], callerTarget?: Function) => Models.RuntimeControllerConfig[];
|
|
18
|
-
const getCalculatedPathFor: (target: Function) => string;
|
|
19
18
|
}
|
package/browser/lib/models.d.ts
CHANGED
|
@@ -85,10 +85,21 @@ export declare namespace Models {
|
|
|
85
85
|
appId?: string;
|
|
86
86
|
contextName: string;
|
|
87
87
|
/**
|
|
88
|
+
* if defined and different from contextName
|
|
89
|
+
* - context will NOT be initialized
|
|
90
|
+
*/
|
|
91
|
+
activeContext?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
88
94
|
* host/port for initing backend server
|
|
89
95
|
*/
|
|
90
96
|
host?: string;
|
|
91
97
|
/**
|
|
98
|
+
* Needs to be specified in docker environment only
|
|
99
|
+
*/
|
|
100
|
+
hostPortNumber?: number;
|
|
101
|
+
/**
|
|
102
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
92
103
|
* frontend host only needed when we are
|
|
93
104
|
* using withCredentials for axios
|
|
94
105
|
* and session cookie
|
|
@@ -96,6 +107,11 @@ export declare namespace Models {
|
|
|
96
107
|
*/
|
|
97
108
|
frontendHost?: string;
|
|
98
109
|
/**
|
|
110
|
+
* Needs to be specified in docker environment only
|
|
111
|
+
*/
|
|
112
|
+
frontendHostPortNumber?: number;
|
|
113
|
+
/**
|
|
114
|
+
* IMPORTANT! provide full url that starts with http:// or https://
|
|
99
115
|
* backend way of communication
|
|
100
116
|
* between taon backends/processes
|
|
101
117
|
*/
|
|
@@ -143,7 +159,10 @@ export declare namespace Models {
|
|
|
143
159
|
class MethodConfig {
|
|
144
160
|
methodName: string;
|
|
145
161
|
/**
|
|
162
|
+
* @deprecated don't use in production - keep stuff encapsulated
|
|
146
163
|
* path is global in express app
|
|
164
|
+
* ! BE CAREFUL ! global path IS NOT GLOBAL inside dockerized app
|
|
165
|
+
* (/api/contextName is automatically added to global path in docker)
|
|
147
166
|
*/
|
|
148
167
|
global?: boolean;
|
|
149
168
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import { Server } from 'socket.io';
|
|
3
|
+
import { DefaultEventsMap } from 'socket.io/dist/typed-events';
|
|
2
4
|
import { Socket as SocketClient } from 'socket.io-client';
|
|
3
5
|
import type { EndpointContext } from '../endpoint-context';
|
|
4
6
|
import { RealtimeClient } from './realtime-client';
|
|
5
7
|
import { RealtimeServer } from './realtime-server';
|
|
6
8
|
import type { RealtimeStrategy } from './realtime-strategy';
|
|
7
|
-
import { DefaultEventsMap } from 'socket.io/dist/typed-events';
|
|
8
|
-
import { Server } from 'socket.io';
|
|
9
9
|
/**
|
|
10
10
|
* Realtime class
|
|
11
11
|
* - mock (when browser-browser)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { RealtimeCore } from './realtime-core';
|
|
3
|
-
import type { BaseEntity } from '../base-classes/base-entity';
|
|
4
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import type { BaseEntity } from '../base-classes/base-entity';
|
|
4
|
+
import { RealtimeCore } from './realtime-core';
|
|
5
5
|
export declare class RealtimeServer {
|
|
6
6
|
private core;
|
|
7
7
|
constructor(core: RealtimeCore);
|
package/browser/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSubscriber = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var base_injector_1 = require("./base-injector");
|
|
6
|
+
var subscriber_decorator_1 = require("../decorators/classes/subscriber-decorator");
|
|
7
|
+
var BaseSubscriber = /** @class */ (function (_super) {
|
|
8
|
+
tslib_1.__extends(BaseSubscriber, _super);
|
|
9
|
+
function BaseSubscriber() {
|
|
10
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
BaseSubscriber.prototype.__trigger_event__ = function (eventName) {
|
|
13
|
+
var ctx = this.__endpoint_context__;
|
|
14
|
+
console.log('Trigger event', eventName, ctx);
|
|
15
|
+
// ctx.realtimeServer.triggerCustomEvent/
|
|
16
|
+
};
|
|
17
|
+
BaseSubscriber = tslib_1.__decorate([
|
|
18
|
+
(0, subscriber_decorator_1.TaonSubscriber)({
|
|
19
|
+
className: 'BaseSubscriber',
|
|
20
|
+
})
|
|
21
|
+
], BaseSubscriber);
|
|
22
|
+
return BaseSubscriber;
|
|
23
|
+
}(base_injector_1.BaseInjector));
|
|
24
|
+
exports.BaseSubscriber = BaseSubscriber;
|
|
25
|
+
//# sourceMappingURL=base-subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-subscriber.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;;AAWA,iDAA+C;AAC/C,mFAA4E;AAK5E;IAA2D,0CAAY;IAAvE;;IAMA,CAAC;IALW,0CAAiB,GAA3B,UAA4B,SAAuB;QACjD,IAAM,GAAG,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAC7C,yCAAyC;IAC3C,CAAC;IALmB,cAAc;QAHnC,IAAA,qCAAc,EAAC;YACd,SAAS,EAAE,gBAAgB;SAC5B,CAAC;OACoB,cAAc,CAMnC;IAAD,qBAAC;CAAA,AAND,CAA2D,4BAAY,GAMtE;AANqB,wCAAc"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated by current cli tool
|
|
3
|
+
*/
|
|
1
4
|
export declare const BUILD_FRAMEWORK_CLI_NAME = "tnp";
|
|
5
|
+
/**
|
|
6
|
+
* This value can be change in taon.jsonc (appId)
|
|
7
|
+
*/
|
|
2
8
|
export declare const APP_ID = "dev.taon.app";
|
|
9
|
+
/**
|
|
10
|
+
* Autogenerated by current cli tool
|
|
11
|
+
*/
|
|
12
|
+
export declare const BUILD_BASE_HREF = "";
|
|
13
|
+
/**
|
|
14
|
+
* This value can be change in taon.jsonc (overrideNpmName)
|
|
15
|
+
*/
|
|
3
16
|
export declare const PROJECT_NPM_NAME = "taon";
|
|
4
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CURRENT_PACKAGE_VERSION = "19.0.50";
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CURRENT_PACKAGE_VERSION = exports.PROJECT_NPM_NAME = exports.APP_ID = exports.BUILD_FRAMEWORK_CLI_NAME = void 0;
|
|
3
|
+
exports.CURRENT_PACKAGE_VERSION = exports.PROJECT_NPM_NAME = exports.BUILD_BASE_HREF = exports.APP_ID = exports.BUILD_FRAMEWORK_CLI_NAME = void 0;
|
|
4
4
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
5
|
+
/**
|
|
6
|
+
* Autogenerated by current cli tool
|
|
7
|
+
*/
|
|
5
8
|
exports.BUILD_FRAMEWORK_CLI_NAME = 'tnp';
|
|
9
|
+
/**
|
|
10
|
+
* This value can be change in taon.jsonc (appId)
|
|
11
|
+
*/
|
|
6
12
|
exports.APP_ID = 'dev.taon.app';
|
|
13
|
+
/**
|
|
14
|
+
* Autogenerated by current cli tool
|
|
15
|
+
*/
|
|
16
|
+
exports.BUILD_BASE_HREF = '';
|
|
17
|
+
/**
|
|
18
|
+
* This value can be change in taon.jsonc (overrideNpmName)
|
|
19
|
+
*/
|
|
7
20
|
exports.PROJECT_NPM_NAME = 'taon';
|
|
8
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
23
|
+
*/
|
|
24
|
+
exports.CURRENT_PACKAGE_VERSION = '19.0.50';
|
|
9
25
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
10
26
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info._auto-generated_.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,yCAAyC;
|
|
1
|
+
{"version":3,"file":"build-info._auto-generated_.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC;;GAEG;AACU,QAAA,wBAAwB,GAAG,KAAK,CAAC;AAC9C;;GAEG;AACU,QAAA,MAAM,GAAG,cAAc,CAAC;AACrC;;GAEG;AACU,QAAA,eAAe,GAAG,EAAE,CAAC;AAClC;;GAEG;AACU,QAAA,gBAAgB,GAAG,MAAM,CAAC;AACvC;;GAEG;AACU,QAAA,uBAAuB,GAAG,SAAS,CAAC;AACjD,yCAAyC"}
|
package/lib/constants.d.ts
CHANGED
package/lib/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CURRENT_HOST_BACKEND_PORT = exports.TAON_CONTEXT = exports.TaonEntityKeysToOmitArr = void 0;
|
|
3
|
+
exports.apiPrefix = exports.CURRENT_HOST_BACKEND_PORT = exports.TAON_CONTEXT = exports.TaonEntityKeysToOmitArr = void 0;
|
|
4
4
|
exports.TaonEntityKeysToOmitArr = [
|
|
5
5
|
'ctrl',
|
|
6
6
|
'clone',
|
|
@@ -24,4 +24,5 @@ let TAON_CONTEXT;
|
|
|
24
24
|
/* */
|
|
25
25
|
/* */
|
|
26
26
|
let CURRENT_HOST_BACKEND_PORT;
|
|
27
|
+
exports.apiPrefix = 'api';
|
|
27
28
|
//# sourceMappingURL=constants.js.map
|
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAmBa,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,sBAAsB;IACtB,qBAAqB;IACrB,uBAAuB;CACxB,CAAC;AAMF,IAAI,YAAyC,CAAC;AAC9C,KAAK;AACL,KAAK;AAGL,IAAI,yBAAiD,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAmBa,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,sBAAsB;IACtB,qBAAqB;IACrB,uBAAuB;CACxB,CAAC;AAMF,IAAI,YAAyC,CAAC;AAC9C,KAAK;AACL,KAAK;AAGL,IAAI,yBAAiD,CAAC;AASzC,QAAA,SAAS,GAAG,KAAK,CAAC"}
|
package/lib/create-context.js
CHANGED
|
@@ -23,6 +23,11 @@ exports.createContextTemplate = createContextTemplate;
|
|
|
23
23
|
*/
|
|
24
24
|
const createContext = (configFn) => {
|
|
25
25
|
let config = configFn({});
|
|
26
|
+
// console.log(
|
|
27
|
+
// `
|
|
28
|
+
// [Taon] Creating context ${config.contextName}...`,
|
|
29
|
+
// {config},
|
|
30
|
+
// );
|
|
26
31
|
const endpointContextRef = new endpoint_context_1.EndpointContext(config, configFn);
|
|
27
32
|
const res = {
|
|
28
33
|
//#region types
|
|
@@ -123,6 +128,16 @@ const createContext = (configFn) => {
|
|
|
123
128
|
return await new Promise(async (resolve, reject) => {
|
|
124
129
|
//#region init in set timeout
|
|
125
130
|
setTimeout(async () => {
|
|
131
|
+
if (lib_1.UtilsOs.isRunningInDocker()) {
|
|
132
|
+
const activeContext = config?.activeContext || null;
|
|
133
|
+
if (lib_1._.isString(activeContext) &&
|
|
134
|
+
activeContext !== '' &&
|
|
135
|
+
activeContext !== config?.contextName) {
|
|
136
|
+
console.warn(`[taon] Context ${endpointContextRef.contextName} is not active context, skipping initialization.`);
|
|
137
|
+
resolve(endpointContextRef);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
126
141
|
await endpointContextRef.init({
|
|
127
142
|
...overrideOptions,
|
|
128
143
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-context.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,iBAAiB;AACjB,
|
|
1
|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O,GAAG,CAAC;AACb,CAAC,CAAC;AAvPW,QAAA,aAAa,iBAuPxB"}
|
|
@@ -32,7 +32,7 @@ export declare class EndpointContext {
|
|
|
32
32
|
private readonly classInstancesByNameObj;
|
|
33
33
|
private readonly objWithClassesInstancesArr;
|
|
34
34
|
readonly activeRoutes: {
|
|
35
|
-
|
|
35
|
+
expressPath: string;
|
|
36
36
|
method: Models.Http.Rest.HttpMethod;
|
|
37
37
|
}[];
|
|
38
38
|
repos: Map<string, Repository<any>>;
|
|
@@ -61,6 +61,10 @@ export declare class EndpointContext {
|
|
|
61
61
|
get logFramework(): boolean;
|
|
62
62
|
get logDb(): boolean;
|
|
63
63
|
get logMigrations(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Inside docker there is not need for https secure server
|
|
66
|
+
*/
|
|
67
|
+
private isRunningInsideDocker;
|
|
64
68
|
constructor(originalConfig: Models.ContextOptions<any, any, any, any, any, any, any>, configFn: (env: any) => Models.ContextOptions<any, any, any, any, any, any, any>);
|
|
65
69
|
init(options?: {
|
|
66
70
|
initFromRecrusiveContextResovle?: boolean;
|
|
@@ -104,7 +108,29 @@ export declare class EndpointContext {
|
|
|
104
108
|
reinitControllers(): Promise<void>;
|
|
105
109
|
initClasses(): Promise<void>;
|
|
106
110
|
isActiveOn(classInstance: object): boolean;
|
|
111
|
+
get frontendHostUri(): URL;
|
|
107
112
|
get uri(): URL;
|
|
113
|
+
get uriPort(): string | undefined;
|
|
114
|
+
get uriProtocol(): string | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Examples
|
|
117
|
+
* http://localhost:3000
|
|
118
|
+
* https://localhost (from localhost:80) *
|
|
119
|
+
*/
|
|
120
|
+
get uriOrigin(): string | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Exampels
|
|
123
|
+
* http://localhost:3000/path/to/somewhere
|
|
124
|
+
* https://localhost/path/to/somewhere (from localhost:80)
|
|
125
|
+
*/
|
|
126
|
+
get uriPathname(): string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Examples
|
|
129
|
+
* http://localhost:3000/path/to/somewhere -> '/path/to/somewhere'
|
|
130
|
+
* http://localhost:3000 -> '' #
|
|
131
|
+
* https://localhost/path/to/ -> '/path/to/somewhere' # remove last slash
|
|
132
|
+
*/
|
|
133
|
+
get uriPathnameOrNothingIfRoot(): string;
|
|
108
134
|
/**
|
|
109
135
|
* Port from uri as number
|
|
110
136
|
* @returns {Number | undefined}
|
|
@@ -115,6 +141,7 @@ export declare class EndpointContext {
|
|
|
115
141
|
* ipc/udp needs this
|
|
116
142
|
*/
|
|
117
143
|
get contextName(): string;
|
|
144
|
+
get activeContext(): string | null;
|
|
118
145
|
get appId(): string;
|
|
119
146
|
get publicAssets(): {
|
|
120
147
|
serverPath: string;
|