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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller-options.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAAA,gDAAwC;AAAxC,SAAgB,kBAAkB,KAAK,CAAC"}
|
package/lib/env.d.ts
ADDED
package/lib/env.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ENV = void 0;
|
|
4
|
+
const lib_1 = require("tnp-core/lib");
|
|
5
|
+
const ENV = lib_1.Helpers.isBrowser ? window['ENV'] : global['ENV'];
|
|
6
|
+
exports.ENV = ENV;
|
|
7
|
+
//# sourceMappingURL=env.js.map
|
package/lib/env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,sCAAuC;AAEvC,MAAM,GAAG,GAAG,aAAO,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAErD,kBAAG"}
|
package/lib/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { BaseProvider } from './base-classes/base-provider';
|
|
|
22
22
|
export { BaseEntity } from './base-classes/base-entity';
|
|
23
23
|
export { BaseContext } from './base-classes/base-context';
|
|
24
24
|
export { BaseMigration } from './base-classes/base-migration';
|
|
25
|
-
export {
|
|
25
|
+
export { TaonAdditionalMiddlewareMethodInfo } from './base-classes/base-middleware';
|
|
26
26
|
export { createContext, TaonContext } from './create-context';
|
|
27
27
|
export { inject } from './inject';
|
|
28
28
|
export { Models } from './models';
|
|
@@ -51,15 +51,6 @@ export declare namespace Taon {
|
|
|
51
51
|
const isWebSQL: boolean;
|
|
52
52
|
const isElectron: boolean;
|
|
53
53
|
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>) => {
|
|
54
|
-
types: {
|
|
55
|
-
readonly controllers: any;
|
|
56
|
-
readonly repositories: any;
|
|
57
|
-
readonly providers: any;
|
|
58
|
-
readonly subscribers: any;
|
|
59
|
-
readonly migrations: any;
|
|
60
|
-
readonly middlewares: any;
|
|
61
|
-
};
|
|
62
|
-
readonly contexts: any;
|
|
63
54
|
readonly contextName: string;
|
|
64
55
|
readonly appId: string;
|
|
65
56
|
__ref(): Promise<endpointContext.EndpointContext>;
|
|
@@ -78,15 +69,6 @@ export declare namespace Taon {
|
|
|
78
69
|
};
|
|
79
70
|
};
|
|
80
71
|
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>) => () => {
|
|
81
|
-
types: {
|
|
82
|
-
readonly controllers: any;
|
|
83
|
-
readonly repositories: any;
|
|
84
|
-
readonly providers: any;
|
|
85
|
-
readonly subscribers: any;
|
|
86
|
-
readonly migrations: any;
|
|
87
|
-
readonly middlewares: any;
|
|
88
|
-
};
|
|
89
|
-
readonly contexts: any;
|
|
90
72
|
readonly contextName: string;
|
|
91
73
|
readonly appId: string;
|
|
92
74
|
__ref(): Promise<endpointContext.EndpointContext>;
|
|
@@ -116,15 +98,6 @@ export declare namespace Taon {
|
|
|
116
98
|
entities: Function[];
|
|
117
99
|
controllers: Function[];
|
|
118
100
|
}) => Promise<{
|
|
119
|
-
types: {
|
|
120
|
-
readonly controllers: any;
|
|
121
|
-
readonly repositories: any;
|
|
122
|
-
readonly providers: any;
|
|
123
|
-
readonly subscribers: any;
|
|
124
|
-
readonly migrations: any;
|
|
125
|
-
readonly middlewares: any;
|
|
126
|
-
};
|
|
127
|
-
readonly contexts: any;
|
|
128
101
|
readonly contextName: string;
|
|
129
102
|
readonly appId: string;
|
|
130
103
|
__ref(): Promise<endpointContext.EndpointContext>;
|
package/lib/storage.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const globalPublicStorage: typeof globalThis;
|
package/lib/storage.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.globalPublicStorage = void 0;
|
|
4
|
+
const lib_1 = require("tnp-core/lib");
|
|
5
|
+
exports.globalPublicStorage = lib_1.Helpers.isBrowser ? window : global;
|
|
6
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,sCAAuC;AAE1B,QAAA,mBAAmB,GAAG,aAAO,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC"}
|
package/lib/ui/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.dummy1756667478735 = dummy1756667478735;
|
|
4
|
+
function dummy1756667478735() { }
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.dummy1756667479384 = dummy1756667479384;
|
|
4
|
+
function dummy1756667479384() { }
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taon",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.59",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"mkdocs": "python3 -m mkdocs",
|
|
6
6
|
"taon init": "taon init",
|
|
@@ -28,6 +28,25 @@
|
|
|
28
28
|
"bugs": {
|
|
29
29
|
"url": "https://github.com/darekf77/taon/issues"
|
|
30
30
|
},
|
|
31
|
+
"contributes": {
|
|
32
|
+
"views": {
|
|
33
|
+
"projectsContainerTaon": [
|
|
34
|
+
{
|
|
35
|
+
"id": "projectsViewTaon",
|
|
36
|
+
"name": "Taon Projects"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"viewsContainers": {
|
|
41
|
+
"activitybar": [
|
|
42
|
+
{
|
|
43
|
+
"icon": "./icon-menu-taon.svg",
|
|
44
|
+
"id": "projectsContainerTaon",
|
|
45
|
+
"title": "Taon Projects"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
31
50
|
"dependencies": {
|
|
32
51
|
"tnp": "~19.0.1",
|
|
33
52
|
"tslib": "~2.8.1",
|
|
@@ -40,6 +59,7 @@
|
|
|
40
59
|
},
|
|
41
60
|
"description": "Isomorphic solution for backend and frontend",
|
|
42
61
|
"main": "dist/app.electron.js",
|
|
62
|
+
"optionalDependencies": {},
|
|
43
63
|
"publisher": "taon-dev",
|
|
44
64
|
"repository": {
|
|
45
65
|
"type": "git",
|
package/websql/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# MyLib
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
|
|
8
|
-
> Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# MyLib
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
|
|
8
|
+
> Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
package/websql/fesm2022/taon.mjs
CHANGED
|
@@ -676,6 +676,10 @@ TAON_CONTEXT = new InjectionToken('TAON_CONTEXT');
|
|
|
676
676
|
let CURRENT_HOST_BACKEND_PORT;
|
|
677
677
|
//#region @browser
|
|
678
678
|
CURRENT_HOST_BACKEND_PORT = new InjectionToken('CURRENT_HOST_BACKEND_PORT');
|
|
679
|
+
//#endregion
|
|
680
|
+
let CURRENT_HOST_URL;
|
|
681
|
+
//#region @browser
|
|
682
|
+
CURRENT_HOST_URL = new InjectionToken('CURRENT_HOST_URL');
|
|
679
683
|
const apiPrefix = 'api';
|
|
680
684
|
|
|
681
685
|
const inject = (entity) => {
|
|
@@ -778,6 +782,28 @@ class BaseAngularsService {
|
|
|
778
782
|
constructor() {
|
|
779
783
|
//#region @browser
|
|
780
784
|
this.currentContext = inject$1(TAON_CONTEXT);
|
|
785
|
+
//#region @browser
|
|
786
|
+
this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT, {
|
|
787
|
+
optional: true,
|
|
788
|
+
});
|
|
789
|
+
this.CURRENT_HOST_URL = inject$1(CURRENT_HOST_URL, {
|
|
790
|
+
optional: true,
|
|
791
|
+
});
|
|
792
|
+
// #endregion
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* @deprecated
|
|
796
|
+
* Returns the host URL for the backend service
|
|
797
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
798
|
+
*/
|
|
799
|
+
get host() {
|
|
800
|
+
//#region @browser
|
|
801
|
+
if (this.CURRENT_HOST_URL) {
|
|
802
|
+
return this.CURRENT_HOST_URL;
|
|
803
|
+
}
|
|
804
|
+
return `http://localhost:${this.CURRENT_HOST_BACKEND_PORT}`;
|
|
805
|
+
//#endregion
|
|
806
|
+
return void 0;
|
|
781
807
|
}
|
|
782
808
|
injectController(ctor,
|
|
783
809
|
/**
|
|
@@ -787,7 +813,9 @@ class BaseAngularsService {
|
|
|
787
813
|
return inject(() => {
|
|
788
814
|
let currentContext;
|
|
789
815
|
//#region @browser
|
|
790
|
-
currentContext = overrideCurrentContext
|
|
816
|
+
currentContext = overrideCurrentContext
|
|
817
|
+
? overrideCurrentContext
|
|
818
|
+
: this.currentContext;
|
|
791
819
|
//#endregion
|
|
792
820
|
if (!currentContext) {
|
|
793
821
|
throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
|
|
@@ -4967,50 +4995,7 @@ const createContext = (configFn) => {
|
|
|
4967
4995
|
// );
|
|
4968
4996
|
const endpointContextRef = new EndpointContext(config, configFn);
|
|
4969
4997
|
const res = {
|
|
4970
|
-
//#region types
|
|
4971
|
-
types: {
|
|
4972
|
-
//#region entites for
|
|
4973
|
-
// get entities() {
|
|
4974
|
-
// return config.entities;
|
|
4975
|
-
// },
|
|
4976
|
-
// entitiesFor(classInstace: BaseInjector) {
|
|
4977
|
-
// const ctx = classInstace.__endpoint_context__;
|
|
4978
|
-
// if (!entitiesCache[ctx.contextName]) {
|
|
4979
|
-
// entitiesCache[ctx.contextName] = {};
|
|
4980
|
-
// for (const entityClassName of Object.keys(config.entities)) {
|
|
4981
|
-
// entitiesCache[ctx.contextName][entityClassName] =
|
|
4982
|
-
// config.entities[entityClassName][
|
|
4983
|
-
// Taon.symbols.orignalClassClonesObj
|
|
4984
|
-
// ][ctx.contextName];
|
|
4985
|
-
// }
|
|
4986
|
-
// }
|
|
4987
|
-
// return entitiesCache[ctx.contextName] as typeof config.entities;
|
|
4988
|
-
// },
|
|
4989
|
-
//#endregion
|
|
4990
|
-
get controllers() {
|
|
4991
|
-
return config.controllers; // TODO QUICK_FIX new typescript generated wrong types
|
|
4992
|
-
},
|
|
4993
|
-
get repositories() {
|
|
4994
|
-
return config.repositories; // TODO QUICK_FIX new typescript generated wrong types
|
|
4995
|
-
},
|
|
4996
|
-
get providers() {
|
|
4997
|
-
return config.providers; // TODO QUICK_FIX new typescript generated wrong types
|
|
4998
|
-
},
|
|
4999
|
-
get subscribers() {
|
|
5000
|
-
return config.subscribers; // TODO QUICK_FIX new typescript generated wrong types
|
|
5001
|
-
},
|
|
5002
|
-
get migrations() {
|
|
5003
|
-
return config.migrations; // TODO QUICK_FIX new typescript generated wrong types
|
|
5004
|
-
},
|
|
5005
|
-
get middlewares() {
|
|
5006
|
-
return config.middlewares; // TODO QUICK_FIX new typescript generated wrong types
|
|
5007
|
-
},
|
|
5008
|
-
},
|
|
5009
|
-
//#endregion
|
|
5010
4998
|
//#region contexts
|
|
5011
|
-
get contexts() {
|
|
5012
|
-
return config.contexts; // TODO QUICK_FIX new typescript generated wrong types
|
|
5013
|
-
},
|
|
5014
4999
|
get contextName() {
|
|
5015
5000
|
return config.contextName;
|
|
5016
5001
|
},
|
|
@@ -5145,7 +5130,7 @@ const createContext = (configFn) => {
|
|
|
5145
5130
|
},
|
|
5146
5131
|
/**
|
|
5147
5132
|
* realtime communication with server
|
|
5148
|
-
*
|
|
5133
|
+
* TCP(upgrade) socket.io (or ipc) based.
|
|
5149
5134
|
*/
|
|
5150
5135
|
get realtime() {
|
|
5151
5136
|
return {
|
|
@@ -6842,5 +6827,5 @@ var Taon;
|
|
|
6842
6827
|
* Generated bundle index. Do not edit.
|
|
6843
6828
|
*/
|
|
6844
6829
|
|
|
6845
|
-
export { BaseContext, BaseController, BaseCustomRepository, BaseEntity, BaseMigration, BaseProvider, BaseRepository, CURRENT_HOST_BACKEND_PORT, ClassHelpers, EndpointContext, Models, TAON_CONTEXT, Taon, TaonAdminService, TaonEntityKeysToOmitArr, apiPrefix, createContext, inject };
|
|
6830
|
+
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 };
|
|
6846
6831
|
//# sourceMappingURL=taon.mjs.map
|