taon 19.0.67 → 19.0.68
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 +33 -21
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-middleware.d.ts +2 -2
- package/browser/lib/endpoint-context.d.ts +7 -4
- package/browser/lib/index.d.ts +1 -1
- package/browser/package.json +1 -1
- package/lib/base-classes/base-middleware.d.ts +2 -2
- package/lib/base-classes/base-middleware.js +1 -0
- package/lib/base-classes/base-middleware.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/decorators/classes/controller-config.d.ts +20 -0
- package/lib/decorators/classes/controller-config.js +21 -0
- package/lib/decorators/classes/controller-config.js.map +1 -0
- package/lib/decorators/classes/controller-options.d.ts +16 -0
- package/lib/decorators/classes/controller-options.js +20 -0
- package/lib/decorators/classes/controller-options.js.map +1 -0
- package/lib/endpoint-context.d.ts +7 -4
- package/lib/endpoint-context.js +26 -19
- package/lib/endpoint-context.js.map +1 -1
- package/lib/env/env.angular-node-app.d.ts +1 -2
- package/lib/env/env.angular-node-app.js +3 -4
- package/lib/env/env.angular-node-app.js.map +1 -1
- package/lib/env/env.docs-webapp.d.ts +1 -2
- package/lib/env/env.docs-webapp.js +3 -4
- package/lib/env/env.docs-webapp.js.map +1 -1
- package/lib/env/env.electron-app.d.ts +1 -2
- package/lib/env/env.electron-app.js +3 -4
- package/lib/env/env.electron-app.js.map +1 -1
- package/lib/env/env.mobile-app.d.ts +1 -2
- package/lib/env/env.mobile-app.js +3 -4
- package/lib/env/env.mobile-app.js.map +1 -1
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +1 -2
- package/lib/env/env.npm-lib-and-cli-tool.js +3 -4
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib/env/env.vscode-plugin.d.ts +1 -2
- package/lib/env/env.vscode-plugin.js +3 -4
- package/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- 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/fesm2022/taon.mjs +33 -21
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-middleware.d.ts +2 -2
- package/websql/lib/endpoint-context.d.ts +7 -4
- package/websql/lib/index.d.ts +1 -1
- package/websql/package.json +1 -1
|
@@ -720,10 +720,10 @@ class BaseAngularsService {
|
|
|
720
720
|
return currentContext ? currentContext.getClass(ctor) : void 0;
|
|
721
721
|
});
|
|
722
722
|
}
|
|
723
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
724
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BaseAngularsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
724
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BaseAngularsService }); }
|
|
725
725
|
}
|
|
726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BaseAngularsService, decorators: [{
|
|
727
727
|
type: Injectable
|
|
728
728
|
}], ctorParameters: () => [] });
|
|
729
729
|
|
|
@@ -2827,21 +2827,15 @@ class EndpointContext {
|
|
|
2827
2827
|
this.originalConfig = originalConfig;
|
|
2828
2828
|
this.configFn = configFn;
|
|
2829
2829
|
this.cloneOptions = cloneOptions;
|
|
2830
|
-
//#
|
|
2830
|
+
//#endregion
|
|
2831
|
+
//#endregion
|
|
2832
|
+
//#region fields
|
|
2833
|
+
//#region fields / use mariadb mysql in docker
|
|
2831
2834
|
/**
|
|
2832
2835
|
* JUST FOR TESTING PURPOSES
|
|
2833
2836
|
*/
|
|
2834
2837
|
this.USE_MARIADB_MYSQL_IN_DOCKER = false;
|
|
2835
2838
|
//#endregion
|
|
2836
|
-
// public static findForTraget(classFnOrObject: any): EndpointContext {
|
|
2837
|
-
// const obj = ClassHelpers.getClassFnFromObject(classFnOrObject) || {};
|
|
2838
|
-
// return (
|
|
2839
|
-
// classFnOrObject[Symbols.ctxInClassOrClassObj] ||
|
|
2840
|
-
// obj[Symbols.ctxInClassOrClassObj]
|
|
2841
|
-
// );
|
|
2842
|
-
// }
|
|
2843
|
-
//#endregion
|
|
2844
|
-
//#region fields
|
|
2845
2839
|
//#region fields / flags
|
|
2846
2840
|
this.disabledRealtime = false;
|
|
2847
2841
|
/**
|
|
@@ -2850,8 +2844,12 @@ class EndpointContext {
|
|
|
2850
2844
|
*/
|
|
2851
2845
|
this.inited = false;
|
|
2852
2846
|
//#endregion
|
|
2847
|
+
//#region fields / db migrations
|
|
2853
2848
|
this.dbMigrations = new ContextDbMigrations(this);
|
|
2849
|
+
//#endregion
|
|
2850
|
+
//#region fields / local instance obj symbol
|
|
2854
2851
|
this.localInstaceObjSymbol = Symbol('localInstaceObjSymbol');
|
|
2852
|
+
//#endregion
|
|
2855
2853
|
//#region fields / all instances of classes from context
|
|
2856
2854
|
/**
|
|
2857
2855
|
* all instances of classes from context
|
|
@@ -2868,7 +2866,9 @@ class EndpointContext {
|
|
|
2868
2866
|
//#region fields / active routes
|
|
2869
2867
|
this.activeRoutes = [];
|
|
2870
2868
|
//#endregion
|
|
2869
|
+
//#region fields / skip writing server routes
|
|
2871
2870
|
this.skipWritingServerRoutes = false;
|
|
2871
|
+
//#endregion
|
|
2872
2872
|
//#region fields / types from contexts
|
|
2873
2873
|
this.injectableTypesfromContexts = [
|
|
2874
2874
|
Models.ClassType.CONTROLLER,
|
|
@@ -2879,11 +2879,12 @@ class EndpointContext {
|
|
|
2879
2879
|
Models.ClassType.MIGRATION,
|
|
2880
2880
|
];
|
|
2881
2881
|
//#endregion
|
|
2882
|
+
//#region fields / all types from contexts
|
|
2882
2883
|
this.allTypesfromContexts = [
|
|
2883
2884
|
...this.injectableTypesfromContexts,
|
|
2884
2885
|
Models.ClassType.ENTITY,
|
|
2885
2886
|
];
|
|
2886
|
-
|
|
2887
|
+
//#endregion
|
|
2887
2888
|
//#region fields / express app
|
|
2888
2889
|
this.expressApp = {};
|
|
2889
2890
|
//#endregion
|
|
@@ -3816,7 +3817,7 @@ class EndpointContext {
|
|
|
3816
3817
|
return isNonRootProperPathName ? this.uri.pathname.replace(/\/$/, '') : '';
|
|
3817
3818
|
}
|
|
3818
3819
|
//#endregion
|
|
3819
|
-
//#region port from uri
|
|
3820
|
+
//#region methods & getters / port from uri
|
|
3820
3821
|
get uriPort() {
|
|
3821
3822
|
if (!this.uri?.origin?.includes('localhost')) {
|
|
3822
3823
|
return this.config?.hostPortNumber?.toString();
|
|
@@ -3837,12 +3838,15 @@ class EndpointContext {
|
|
|
3837
3838
|
return this.uriProtocol === 'https:';
|
|
3838
3839
|
}
|
|
3839
3840
|
//#endregion
|
|
3840
|
-
//#region methods & getters /
|
|
3841
|
+
//#region methods & getters / is remote host
|
|
3842
|
+
/**
|
|
3843
|
+
* Check if context is for remote only
|
|
3844
|
+
*/
|
|
3841
3845
|
get isRemoteHost() {
|
|
3842
3846
|
return !!this.cloneOptions?.useAsRemoteContext;
|
|
3843
3847
|
}
|
|
3844
3848
|
//#endregion
|
|
3845
|
-
//#region methods & getters /
|
|
3849
|
+
//#region methods & getters / context name
|
|
3846
3850
|
/**
|
|
3847
3851
|
* ipc/udp needs this
|
|
3848
3852
|
*/
|
|
@@ -3851,7 +3855,7 @@ class EndpointContext {
|
|
|
3851
3855
|
return this.config?.contextName || this.originalConfig?.contextName;
|
|
3852
3856
|
}
|
|
3853
3857
|
//#endregion
|
|
3854
|
-
//#region methods & getters /
|
|
3858
|
+
//#region methods & getters / context name for communication
|
|
3855
3859
|
/**
|
|
3856
3860
|
* ipc/udp needs this
|
|
3857
3861
|
*/
|
|
@@ -3870,7 +3874,7 @@ class EndpointContext {
|
|
|
3870
3874
|
return contextName;
|
|
3871
3875
|
}
|
|
3872
3876
|
//#endregion
|
|
3873
|
-
//#region methods & getters /
|
|
3877
|
+
//#region methods & getters / get context type
|
|
3874
3878
|
/**
|
|
3875
3879
|
* Check context type
|
|
3876
3880
|
*/
|
|
@@ -3914,8 +3918,8 @@ class EndpointContext {
|
|
|
3914
3918
|
return this.config.host;
|
|
3915
3919
|
}
|
|
3916
3920
|
//#endregion
|
|
3917
|
-
//#region methods & getters /
|
|
3918
|
-
get
|
|
3921
|
+
//#region methods & getters / origin
|
|
3922
|
+
get origin() {
|
|
3919
3923
|
return this.uri?.origin;
|
|
3920
3924
|
}
|
|
3921
3925
|
//#endregion
|
|
@@ -4818,6 +4822,7 @@ class EndpointContext {
|
|
|
4818
4822
|
};
|
|
4819
4823
|
}
|
|
4820
4824
|
//#endregion
|
|
4825
|
+
//#region methods & getters / send error
|
|
4821
4826
|
sendError(res, error, req, expressPath) {
|
|
4822
4827
|
/* */
|
|
4823
4828
|
/* */
|
|
@@ -4851,6 +4856,7 @@ class EndpointContext {
|
|
|
4851
4856
|
/* */
|
|
4852
4857
|
return (void 0);
|
|
4853
4858
|
}
|
|
4859
|
+
//#endregion
|
|
4854
4860
|
//#region methods & getters / init client
|
|
4855
4861
|
/**
|
|
4856
4862
|
* client can be browser or nodejs (when remote host)
|
|
@@ -5731,6 +5737,7 @@ class BaseInjector {
|
|
|
5731
5737
|
}
|
|
5732
5738
|
}
|
|
5733
5739
|
|
|
5740
|
+
//#endregion
|
|
5734
5741
|
/**
|
|
5735
5742
|
* TODO
|
|
5736
5743
|
* - global provider available in all contexts
|
|
@@ -7347,6 +7354,11 @@ var Taon;
|
|
|
7347
7354
|
(function (Taon) {
|
|
7348
7355
|
Taon.error = (opt) => {
|
|
7349
7356
|
throw () => {
|
|
7357
|
+
if (typeof opt === 'string') {
|
|
7358
|
+
opt = {
|
|
7359
|
+
message: opt
|
|
7360
|
+
};
|
|
7361
|
+
}
|
|
7350
7362
|
return opt;
|
|
7351
7363
|
};
|
|
7352
7364
|
};
|