taon 19.0.28 → 19.0.30
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 +5 -21
- package/browser/fesm2022/taon.mjs +100 -91
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-angular-service.d.ts +1 -0
- package/browser/package.json +1 -1
- package/client/package.json +1 -1
- package/lib/base-classes/base-angular-service.d.ts +1 -0
- package/lib/base-classes/base-angular-service.js +9 -0
- package/lib/base-classes/base-angular-service.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/endpoint-context.js +1 -1
- package/lib/endpoint-context.js.map +1 -1
- package/lib/env/env.angular-node-app.d.ts +13 -0
- package/lib/env/env.angular-node-app.js +19 -0
- package/lib/env/env.angular-node-app.js.map +1 -0
- package/lib/env/env.electron-app.d.ts +13 -0
- package/lib/env/env.electron-app.js +19 -0
- package/lib/env/env.electron-app.js.map +1 -0
- package/lib/env/env.mobile-app.d.ts +13 -0
- package/lib/env/env.mobile-app.js +19 -0
- package/lib/env/env.mobile-app.js.map +1 -0
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +13 -0
- package/lib/env/env.npm-lib-and-cli-tool.js +19 -0
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -0
- package/lib/env/env.vscode-plugin.d.ts +13 -0
- package/lib/env/env.vscode-plugin.js +19 -0
- package/lib/env/env.vscode-plugin.js.map +1 -0
- package/lib/env/index.d.ts +5 -0
- package/lib/env/index.js +22 -0
- package/lib/env/index.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 +1 -1
- package/tmp-environment.json +3 -3
- package/websql/fesm2022/taon.mjs +100 -91
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-angular-service.d.ts +1 -0
- package/websql/package.json +1 -1
- package/client/README.md +0 -24
- package/client/fesm2022/taon.mjs +0 -6445
- package/client/fesm2022/taon.mjs.map +0 -1
- package/client/index.d.ts +0 -6
- package/client/lib/base-classes/base-abstract-entity.d.ts +0 -8
- package/client/lib/base-classes/base-angular-service.d.ts +0 -20
- package/client/lib/base-classes/base-class.d.ts +0 -9
- package/client/lib/base-classes/base-context.d.ts +0 -27
- package/client/lib/base-classes/base-controller.d.ts +0 -10
- package/client/lib/base-classes/base-crud-controller.d.ts +0 -28
- package/client/lib/base-classes/base-custom-repository.d.ts +0 -4
- package/client/lib/base-classes/base-entity.d.ts +0 -17
- package/client/lib/base-classes/base-injector.d.ts +0 -69
- package/client/lib/base-classes/base-migration.d.ts +0 -12
- package/client/lib/base-classes/base-provider.d.ts +0 -9
- package/client/lib/base-classes/base-repository.d.ts +0 -264
- package/client/lib/base-classes/base-subscriber-for-entity.d.ts +0 -82
- package/client/lib/base-classes/base.d.ts +0 -51
- package/client/lib/constants.d.ts +0 -8
- package/client/lib/context-db-migrations.d.ts +0 -18
- package/client/lib/create-context.d.ts +0 -86
- package/client/lib/decorators/classes/controller-decorator.d.ts +0 -16
- package/client/lib/decorators/classes/entity-decorator.d.ts +0 -20
- package/client/lib/decorators/classes/migration-decorator.d.ts +0 -8
- package/client/lib/decorators/classes/provider-decorator.d.ts +0 -8
- package/client/lib/decorators/classes/repository-decorator.d.ts +0 -8
- package/client/lib/decorators/classes/subscriber-decorator.d.ts +0 -9
- package/client/lib/decorators/http/http-decorators.d.ts +0 -20
- package/client/lib/decorators/http/http-methods-decorators.d.ts +0 -24
- package/client/lib/decorators/http/http-params-decorators.d.ts +0 -6
- package/client/lib/dependency-injection/di-container.d.ts +0 -6
- package/client/lib/endpoint-context.d.ts +0 -133
- package/client/lib/entity-process.d.ts +0 -40
- package/client/lib/env.d.ts +0 -3
- package/client/lib/get-response-value.d.ts +0 -7
- package/client/lib/helpers/class-helpers.d.ts +0 -19
- package/client/lib/helpers/taon-helpers.d.ts +0 -17
- package/client/lib/index.d.ts +0 -136
- package/client/lib/inject.d.ts +0 -5
- package/client/lib/models.d.ts +0 -212
- package/client/lib/orm.d.ts +0 -3
- package/client/lib/realtime/realtime-client.d.ts +0 -38
- package/client/lib/realtime/realtime-core.d.ts +0 -41
- package/client/lib/realtime/realtime-server.d.ts +0 -19
- package/client/lib/realtime/realtime-strategy/index.d.ts +0 -5
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -82
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -15
- package/client/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
- package/client/lib/realtime/realtime-strategy/realtime-strategy.d.ts +0 -12
- package/client/lib/realtime/realtime-subs-manager.d.ts +0 -15
- package/client/lib/realtime/realtime.models.d.ts +0 -15
- package/client/lib/symbols.d.ts +0 -68
- package/client/lib/ui/index.d.ts +0 -2
- package/client/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -2
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +0 -22
- package/client/lib/validators.d.ts +0 -8
- package/client/public-api.d.ts +0 -2
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.dummy1749044381171 = dummy1749044381171;
|
|
4
|
+
function dummy1749044381171() { }
|
|
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.dummy1749044381952 = dummy1749044381952;
|
|
4
|
+
function dummy1749044381952() { }
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
package/tmp-environment.json
CHANGED
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"releaseType": "manual",
|
|
27
27
|
"targetArtifact": "npm-lib-and-cli-tool",
|
|
28
28
|
"envName": "__",
|
|
29
|
-
"resolvedNewVersion": "19.0.
|
|
29
|
+
"resolvedNewVersion": "19.0.29"
|
|
30
30
|
},
|
|
31
31
|
"copyToManager": {},
|
|
32
32
|
"buildInfo": {
|
|
33
|
-
"date": "2025-05-
|
|
34
|
-
"hash": "
|
|
33
|
+
"date": "2025-05-30T00:23:09.000Z",
|
|
34
|
+
"hash": "a535b3e3b259864c12379cc3b39b5be97ecdf70c"
|
|
35
35
|
},
|
|
36
36
|
"currentProjectName": "taon",
|
|
37
37
|
"currentProjectType": "isomorphic-lib",
|
package/websql/fesm2022/taon.mjs
CHANGED
|
@@ -876,6 +876,95 @@ let CURRENT_HOST_BACKEND_PORT;
|
|
|
876
876
|
//#region @browser
|
|
877
877
|
CURRENT_HOST_BACKEND_PORT = new InjectionToken('CURRENT_HOST_BACKEND_PORT');
|
|
878
878
|
|
|
879
|
+
const inject = (entity) => {
|
|
880
|
+
return new Proxy({}, {
|
|
881
|
+
get: (_, propName) => {
|
|
882
|
+
if (propName === 'hasOwnProperty') {
|
|
883
|
+
return () => false;
|
|
884
|
+
}
|
|
885
|
+
const ctor = entity();
|
|
886
|
+
const contextFromClass = ctor[Symbols.ctxInClassOrClassObj];
|
|
887
|
+
const resultContext = contextFromClass;
|
|
888
|
+
if (resultContext) {
|
|
889
|
+
let instance = resultContext.inject(ctor, {
|
|
890
|
+
parentInstanceThatWillGetInjectedStuff: this,
|
|
891
|
+
});
|
|
892
|
+
// console.log('instance', instance);
|
|
893
|
+
if (propName === 'getOriginalPrototype') {
|
|
894
|
+
return () => Object.getPrototypeOf(instance);
|
|
895
|
+
}
|
|
896
|
+
if (propName === 'getOriginalConstructor') {
|
|
897
|
+
return () => instance.constructor;
|
|
898
|
+
}
|
|
899
|
+
const methods = ctor[Symbols.classMethodsNames] || [];
|
|
900
|
+
const isMethods = methods.includes(propName);
|
|
901
|
+
const methodOrProperty = isMethods
|
|
902
|
+
? instance[propName].bind(instance)
|
|
903
|
+
: instance[propName];
|
|
904
|
+
// console.log(
|
|
905
|
+
// `methodOrProperty from proxy ${propName?.toString()} = isMethods:${isMethods}`,
|
|
906
|
+
// methods,
|
|
907
|
+
// );
|
|
908
|
+
return methodOrProperty;
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
});
|
|
912
|
+
};
|
|
913
|
+
// export const injectController = inject;
|
|
914
|
+
// export type SubscriptionEvent<T> = {
|
|
915
|
+
// name: keyof T;
|
|
916
|
+
// data: any;
|
|
917
|
+
// };
|
|
918
|
+
/**
|
|
919
|
+
* TODO
|
|
920
|
+
*/
|
|
921
|
+
// export const injectEntityEvents = <T>(
|
|
922
|
+
// subscriberClassResolveFn: () => new (...args: any[]) => T,
|
|
923
|
+
// eventName?: keyof Omit<EntitySubscriberInterface,'listenTo'> ,
|
|
924
|
+
// ): Observable<SubscriptionEvent<T>> => {
|
|
925
|
+
// const eventsSrc = new Subject<SubscriptionEvent<T>>();
|
|
926
|
+
// const obs = eventsSrc.asObservable();
|
|
927
|
+
// let isFirstSubscription = true;
|
|
928
|
+
// const proxyObservable = new Proxy(obs, {
|
|
929
|
+
// get(target, prop, receiver) {
|
|
930
|
+
// if (prop === 'subscribe') {
|
|
931
|
+
// return (...args: any[]) => {
|
|
932
|
+
// if (isFirstSubscription) {
|
|
933
|
+
// isFirstSubscription = false;
|
|
934
|
+
// const subscriberClassFN: typeof BaseClass =
|
|
935
|
+
// subscriberClassResolveFn() as any;
|
|
936
|
+
// const ctx = subscriberClassFN[
|
|
937
|
+
// Symbols.ctxInClassOrClassObj
|
|
938
|
+
// ] as EndpointContext;
|
|
939
|
+
// if (!ctx) {
|
|
940
|
+
// throw new Error(
|
|
941
|
+
// `You are trying to inject class without context. Use context like this:
|
|
942
|
+
// class MyClassSubscriber extends BaseSubscriber {
|
|
943
|
+
// ${eventName as any}() {
|
|
944
|
+
// \/\/ your code here
|
|
945
|
+
// }
|
|
946
|
+
// }
|
|
947
|
+
// Taon.injectSubscriberEvents( MyContext.getInstance(()=> MyClassSubscriber), '${eventName as any}' )
|
|
948
|
+
// `,
|
|
949
|
+
// );
|
|
950
|
+
// }
|
|
951
|
+
// const subscriberInstance = ctx.getInstanceBy(subscriberClassFN);
|
|
952
|
+
// // subscriberInstance TODO @LAST subscriber event from instance
|
|
953
|
+
// // const entity = subscriberClassFN.prototype.listenTo();
|
|
954
|
+
// console.log('First subscription, you can access arguments here:', {
|
|
955
|
+
// subscriberClassFN,
|
|
956
|
+
// eventName,
|
|
957
|
+
// });
|
|
958
|
+
// }
|
|
959
|
+
// return target.subscribe(...args);
|
|
960
|
+
// };
|
|
961
|
+
// }
|
|
962
|
+
// return Reflect.get(target, prop, receiver);
|
|
963
|
+
// },
|
|
964
|
+
// });
|
|
965
|
+
// return proxyObservable as Observable<SubscriptionEvent<T>>;
|
|
966
|
+
// };
|
|
967
|
+
|
|
879
968
|
/**
|
|
880
969
|
* TODO prevent calling methods when not initialized
|
|
881
970
|
* with init(ctx)
|
|
@@ -887,7 +976,9 @@ class BaseAngularsService {
|
|
|
887
976
|
//#region @browser
|
|
888
977
|
this.currentContext = inject$1(TAON_CONTEXT);
|
|
889
978
|
//#region @browser
|
|
890
|
-
this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT
|
|
979
|
+
this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT, {
|
|
980
|
+
optional: true,
|
|
981
|
+
});
|
|
891
982
|
// #endregion
|
|
892
983
|
}
|
|
893
984
|
/**
|
|
@@ -898,6 +989,13 @@ class BaseAngularsService {
|
|
|
898
989
|
get host() {
|
|
899
990
|
return `http://localhost:${this.CURRENT_HOST_BACKEND_PORT}`;
|
|
900
991
|
}
|
|
992
|
+
injectController(ctor) {
|
|
993
|
+
let currentContext;
|
|
994
|
+
//#region @browser
|
|
995
|
+
currentContext = this.currentContext;
|
|
996
|
+
//#endregion
|
|
997
|
+
return inject(() => currentContext.getClass(ctor));
|
|
998
|
+
}
|
|
901
999
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: BaseAngularsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
902
1000
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: BaseAngularsService }); }
|
|
903
1001
|
}
|
|
@@ -4113,7 +4211,7 @@ class EndpointContext {
|
|
|
4113
4211
|
const orgMethods = target.prototype[methodConfig.methodName];
|
|
4114
4212
|
//#region handle electron ipc request
|
|
4115
4213
|
if (Helpers.isElectron) {
|
|
4116
|
-
const
|
|
4214
|
+
const ipcRenderer = window.require('electron').ipcRenderer;
|
|
4117
4215
|
target.prototype[methodConfig.methodName] = function (...args) {
|
|
4118
4216
|
const received = new Promise(async (resolve, reject) => {
|
|
4119
4217
|
const headers = {};
|
|
@@ -6099,95 +6197,6 @@ var Http;
|
|
|
6099
6197
|
})(Param = Http.Param || (Http.Param = {}));
|
|
6100
6198
|
})(Http || (Http = {}));
|
|
6101
6199
|
|
|
6102
|
-
const inject = (entity) => {
|
|
6103
|
-
return new Proxy({}, {
|
|
6104
|
-
get: (_, propName) => {
|
|
6105
|
-
if (propName === 'hasOwnProperty') {
|
|
6106
|
-
return () => false;
|
|
6107
|
-
}
|
|
6108
|
-
const ctor = entity();
|
|
6109
|
-
const contextFromClass = ctor[Symbols.ctxInClassOrClassObj];
|
|
6110
|
-
const resultContext = contextFromClass;
|
|
6111
|
-
if (resultContext) {
|
|
6112
|
-
let instance = resultContext.inject(ctor, {
|
|
6113
|
-
parentInstanceThatWillGetInjectedStuff: this,
|
|
6114
|
-
});
|
|
6115
|
-
// console.log('instance', instance);
|
|
6116
|
-
if (propName === 'getOriginalPrototype') {
|
|
6117
|
-
return () => Object.getPrototypeOf(instance);
|
|
6118
|
-
}
|
|
6119
|
-
if (propName === 'getOriginalConstructor') {
|
|
6120
|
-
return () => instance.constructor;
|
|
6121
|
-
}
|
|
6122
|
-
const methods = ctor[Symbols.classMethodsNames] || [];
|
|
6123
|
-
const isMethods = methods.includes(propName);
|
|
6124
|
-
const methodOrProperty = isMethods
|
|
6125
|
-
? instance[propName].bind(instance)
|
|
6126
|
-
: instance[propName];
|
|
6127
|
-
// console.log(
|
|
6128
|
-
// `methodOrProperty from proxy ${propName?.toString()} = isMethods:${isMethods}`,
|
|
6129
|
-
// methods,
|
|
6130
|
-
// );
|
|
6131
|
-
return methodOrProperty;
|
|
6132
|
-
}
|
|
6133
|
-
},
|
|
6134
|
-
});
|
|
6135
|
-
};
|
|
6136
|
-
// export const injectController = inject;
|
|
6137
|
-
// export type SubscriptionEvent<T> = {
|
|
6138
|
-
// name: keyof T;
|
|
6139
|
-
// data: any;
|
|
6140
|
-
// };
|
|
6141
|
-
/**
|
|
6142
|
-
* TODO
|
|
6143
|
-
*/
|
|
6144
|
-
// export const injectEntityEvents = <T>(
|
|
6145
|
-
// subscriberClassResolveFn: () => new (...args: any[]) => T,
|
|
6146
|
-
// eventName?: keyof Omit<EntitySubscriberInterface,'listenTo'> ,
|
|
6147
|
-
// ): Observable<SubscriptionEvent<T>> => {
|
|
6148
|
-
// const eventsSrc = new Subject<SubscriptionEvent<T>>();
|
|
6149
|
-
// const obs = eventsSrc.asObservable();
|
|
6150
|
-
// let isFirstSubscription = true;
|
|
6151
|
-
// const proxyObservable = new Proxy(obs, {
|
|
6152
|
-
// get(target, prop, receiver) {
|
|
6153
|
-
// if (prop === 'subscribe') {
|
|
6154
|
-
// return (...args: any[]) => {
|
|
6155
|
-
// if (isFirstSubscription) {
|
|
6156
|
-
// isFirstSubscription = false;
|
|
6157
|
-
// const subscriberClassFN: typeof BaseClass =
|
|
6158
|
-
// subscriberClassResolveFn() as any;
|
|
6159
|
-
// const ctx = subscriberClassFN[
|
|
6160
|
-
// Symbols.ctxInClassOrClassObj
|
|
6161
|
-
// ] as EndpointContext;
|
|
6162
|
-
// if (!ctx) {
|
|
6163
|
-
// throw new Error(
|
|
6164
|
-
// `You are trying to inject class without context. Use context like this:
|
|
6165
|
-
// class MyClassSubscriber extends BaseSubscriber {
|
|
6166
|
-
// ${eventName as any}() {
|
|
6167
|
-
// \/\/ your code here
|
|
6168
|
-
// }
|
|
6169
|
-
// }
|
|
6170
|
-
// Taon.injectSubscriberEvents( MyContext.getInstance(()=> MyClassSubscriber), '${eventName as any}' )
|
|
6171
|
-
// `,
|
|
6172
|
-
// );
|
|
6173
|
-
// }
|
|
6174
|
-
// const subscriberInstance = ctx.getInstanceBy(subscriberClassFN);
|
|
6175
|
-
// // subscriberInstance TODO @LAST subscriber event from instance
|
|
6176
|
-
// // const entity = subscriberClassFN.prototype.listenTo();
|
|
6177
|
-
// console.log('First subscription, you can access arguments here:', {
|
|
6178
|
-
// subscriberClassFN,
|
|
6179
|
-
// eventName,
|
|
6180
|
-
// });
|
|
6181
|
-
// }
|
|
6182
|
-
// return target.subscribe(...args);
|
|
6183
|
-
// };
|
|
6184
|
-
// }
|
|
6185
|
-
// return Reflect.get(target, prop, receiver);
|
|
6186
|
-
// },
|
|
6187
|
-
// });
|
|
6188
|
-
// return proxyObservable as Observable<SubscriptionEvent<T>>;
|
|
6189
|
-
// };
|
|
6190
|
-
|
|
6191
6200
|
// TODO export all things
|
|
6192
6201
|
var Taon;
|
|
6193
6202
|
(function (Taon) {
|