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
|
@@ -556,6 +556,10 @@ TAON_CONTEXT = new InjectionToken('TAON_CONTEXT');
|
|
|
556
556
|
let CURRENT_HOST_BACKEND_PORT;
|
|
557
557
|
//#region @browser
|
|
558
558
|
CURRENT_HOST_BACKEND_PORT = new InjectionToken('CURRENT_HOST_BACKEND_PORT');
|
|
559
|
+
//#endregion
|
|
560
|
+
let CURRENT_HOST_URL;
|
|
561
|
+
//#region @browser
|
|
562
|
+
CURRENT_HOST_URL = new InjectionToken('CURRENT_HOST_URL');
|
|
559
563
|
const apiPrefix = 'api';
|
|
560
564
|
|
|
561
565
|
const inject = (entity) => {
|
|
@@ -658,6 +662,28 @@ class BaseAngularsService {
|
|
|
658
662
|
constructor() {
|
|
659
663
|
//#region @browser
|
|
660
664
|
this.currentContext = inject$1(TAON_CONTEXT);
|
|
665
|
+
//#region @browser
|
|
666
|
+
this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT, {
|
|
667
|
+
optional: true,
|
|
668
|
+
});
|
|
669
|
+
this.CURRENT_HOST_URL = inject$1(CURRENT_HOST_URL, {
|
|
670
|
+
optional: true,
|
|
671
|
+
});
|
|
672
|
+
// #endregion
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* @deprecated
|
|
676
|
+
* Returns the host URL for the backend service
|
|
677
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
678
|
+
*/
|
|
679
|
+
get host() {
|
|
680
|
+
//#region @browser
|
|
681
|
+
if (this.CURRENT_HOST_URL) {
|
|
682
|
+
return this.CURRENT_HOST_URL;
|
|
683
|
+
}
|
|
684
|
+
return `http://localhost:${this.CURRENT_HOST_BACKEND_PORT}`;
|
|
685
|
+
//#endregion
|
|
686
|
+
return void 0;
|
|
661
687
|
}
|
|
662
688
|
injectController(ctor,
|
|
663
689
|
/**
|
|
@@ -667,7 +693,9 @@ class BaseAngularsService {
|
|
|
667
693
|
return inject(() => {
|
|
668
694
|
let currentContext;
|
|
669
695
|
//#region @browser
|
|
670
|
-
currentContext = overrideCurrentContext
|
|
696
|
+
currentContext = overrideCurrentContext
|
|
697
|
+
? overrideCurrentContext
|
|
698
|
+
: this.currentContext;
|
|
671
699
|
//#endregion
|
|
672
700
|
if (!currentContext) {
|
|
673
701
|
throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
|
|
@@ -5143,50 +5171,7 @@ const createContext = (configFn) => {
|
|
|
5143
5171
|
// );
|
|
5144
5172
|
const endpointContextRef = new EndpointContext(config, configFn);
|
|
5145
5173
|
const res = {
|
|
5146
|
-
//#region types
|
|
5147
|
-
types: {
|
|
5148
|
-
//#region entites for
|
|
5149
|
-
// get entities() {
|
|
5150
|
-
// return config.entities;
|
|
5151
|
-
// },
|
|
5152
|
-
// entitiesFor(classInstace: BaseInjector) {
|
|
5153
|
-
// const ctx = classInstace.__endpoint_context__;
|
|
5154
|
-
// if (!entitiesCache[ctx.contextName]) {
|
|
5155
|
-
// entitiesCache[ctx.contextName] = {};
|
|
5156
|
-
// for (const entityClassName of Object.keys(config.entities)) {
|
|
5157
|
-
// entitiesCache[ctx.contextName][entityClassName] =
|
|
5158
|
-
// config.entities[entityClassName][
|
|
5159
|
-
// Taon.symbols.orignalClassClonesObj
|
|
5160
|
-
// ][ctx.contextName];
|
|
5161
|
-
// }
|
|
5162
|
-
// }
|
|
5163
|
-
// return entitiesCache[ctx.contextName] as typeof config.entities;
|
|
5164
|
-
// },
|
|
5165
|
-
//#endregion
|
|
5166
|
-
get controllers() {
|
|
5167
|
-
return config.controllers; // TODO QUICK_FIX new typescript generated wrong types
|
|
5168
|
-
},
|
|
5169
|
-
get repositories() {
|
|
5170
|
-
return config.repositories; // TODO QUICK_FIX new typescript generated wrong types
|
|
5171
|
-
},
|
|
5172
|
-
get providers() {
|
|
5173
|
-
return config.providers; // TODO QUICK_FIX new typescript generated wrong types
|
|
5174
|
-
},
|
|
5175
|
-
get subscribers() {
|
|
5176
|
-
return config.subscribers; // TODO QUICK_FIX new typescript generated wrong types
|
|
5177
|
-
},
|
|
5178
|
-
get migrations() {
|
|
5179
|
-
return config.migrations; // TODO QUICK_FIX new typescript generated wrong types
|
|
5180
|
-
},
|
|
5181
|
-
get middlewares() {
|
|
5182
|
-
return config.middlewares; // TODO QUICK_FIX new typescript generated wrong types
|
|
5183
|
-
},
|
|
5184
|
-
},
|
|
5185
|
-
//#endregion
|
|
5186
5174
|
//#region contexts
|
|
5187
|
-
get contexts() {
|
|
5188
|
-
return config.contexts; // TODO QUICK_FIX new typescript generated wrong types
|
|
5189
|
-
},
|
|
5190
5175
|
get contextName() {
|
|
5191
5176
|
return config.contextName;
|
|
5192
5177
|
},
|
|
@@ -5320,7 +5305,7 @@ const createContext = (configFn) => {
|
|
|
5320
5305
|
},
|
|
5321
5306
|
/**
|
|
5322
5307
|
* realtime communication with server
|
|
5323
|
-
*
|
|
5308
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
5324
5309
|
*/
|
|
5325
5310
|
get realtime() {
|
|
5326
5311
|
return {
|
|
@@ -7049,5 +7034,5 @@ var Taon;
|
|
|
7049
7034
|
* Generated bundle index. Do not edit.
|
|
7050
7035
|
*/
|
|
7051
7036
|
|
|
7052
|
-
export { BaseContext, BaseController, BaseCustomRepository, BaseEntity, BaseMigration, BaseProvider, BaseRepository, CURRENT_HOST_BACKEND_PORT, ClassHelpers, EndpointContext, Models, TAON_CONTEXT, Taon, TaonAdminService, TaonEntityKeysToOmitArr, apiPrefix, createContext, inject };
|
|
7037
|
+
export { BaseContext, BaseController, BaseCustomRepository, BaseEntity, BaseMigration, BaseProvider, BaseRepository, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers, EndpointContext, Models, TAON_CONTEXT, Taon, TaonAdminService, TaonEntityKeysToOmitArr, apiPrefix, createContext, inject };
|
|
7053
7038
|
//# sourceMappingURL=taon.mjs.map
|