taon 21.0.38 → 21.0.41
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-browser.mjs +14 -15
- package/browser/fesm2022/taon-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon-browser.d.ts +3 -3
- package/browser-prod/fesm2022/taon-browser.mjs +167 -168
- package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/taon-browser.d.ts +3 -3
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/context-db-migrations.js +1 -1
- package/lib/context-db-migrations.js.map +1 -1
- package/lib/endpoint-context.js +11 -11
- package/lib/endpoint-context.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/realtime/realtime-core.js +2 -2
- package/lib/realtime/realtime-core.js.map +1 -1
- package/lib/realtime/realtime-server.js +2 -2
- package/lib/realtime/realtime-server.js.map +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-class.js +3 -3
- package/lib-prod/base-classes/base-class.js.map +1 -1
- package/lib-prod/base-classes/base-controller.js.map +1 -1
- package/lib-prod/base-classes/base-crud-controller.js +5 -5
- package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
- package/lib-prod/base-classes/base-migration.js +1 -1
- package/lib-prod/base-classes/base-migration.js.map +1 -1
- package/lib-prod/base-classes/base-repository.js +7 -7
- package/lib-prod/base-classes/base-repository.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/context-db-migrations.js +1 -1
- package/lib-prod/context-db-migrations.js.map +1 -1
- package/lib-prod/create-context.js +4 -4
- package/lib-prod/create-context.js.map +1 -1
- package/lib-prod/decorators/classes/entity-decorator.js +1 -1
- package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
- package/lib-prod/decorators/http/http-methods-decorators.js +1 -1
- package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib-prod/endpoint-context.js +75 -75
- package/lib-prod/endpoint-context.js.map +1 -1
- package/lib-prod/entity-process.js +23 -23
- package/lib-prod/entity-process.js.map +1 -1
- package/lib-prod/formly/fromly.js +20 -20
- package/lib-prod/formly/fromly.js.map +1 -1
- package/lib-prod/formly/type-from-entity.js +5 -5
- package/lib-prod/formly/type-from-entity.js.map +1 -1
- package/lib-prod/helpers/class-helpers.js +16 -16
- package/lib-prod/helpers/class-helpers.js.map +1 -1
- package/lib-prod/helpers/clone-obj.js +3 -3
- package/lib-prod/helpers/clone-obj.js.map +1 -1
- package/lib-prod/helpers/taon-helpers.js +4 -4
- package/lib-prod/helpers/taon-helpers.js.map +1 -1
- package/lib-prod/index.js +5 -5
- package/lib-prod/index.js.map +1 -1
- package/lib-prod/models.js +2 -2
- package/lib-prod/models.js.map +1 -1
- package/lib-prod/orm/columns.js +6 -6
- package/lib-prod/orm/columns.js.map +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +6 -6
- package/lib-prod/realtime/realtime-client.js.map +1 -1
- package/lib-prod/realtime/realtime-core.js +2 -2
- package/lib-prod/realtime/realtime-core.js.map +1 -1
- package/lib-prod/realtime/realtime-server.js +6 -6
- package/lib-prod/realtime/realtime-server.js.map +1 -1
- package/lib-prod/realtime/realtime-subs-manager.js +2 -2
- package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
- package/lib-prod/symbols.js +3 -3
- package/lib-prod/symbols.js.map +1 -1
- package/lib-prod/ui/index.d.ts +1 -1
- package/lib-prod/ui/index.js +2 -2
- package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/validators.js +7 -7
- package/lib-prod/validators.js.map +1 -1
- package/package.json +3 -28
- package/websql/fesm2022/taon-websql.mjs +20 -21
- package/websql/fesm2022/taon-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon-websql.d.ts +3 -3
- package/websql-prod/fesm2022/taon-websql.mjs +197 -198
- package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/taon-websql.d.ts +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import * as coreHelpers from 'tnp-core/browser';
|
|
3
2
|
import { _, Utils, Helpers, UtilsOs, config, CoreModels, crossPlatformPath, UtilsTerminal } from 'tnp-core/browser';
|
|
4
3
|
import axios from 'axios';
|
|
5
4
|
import { JSON10 } from 'json10/browser';
|
|
@@ -2474,7 +2473,7 @@ class RealtimeCore {
|
|
|
2474
2473
|
// console.log(`
|
|
2475
2474
|
// [ctx=${this.ctx.contextName}] realtime strategy: ${this.strategy}, context type: ${this.ctx.contextType}
|
|
2476
2475
|
// `);
|
|
2477
|
-
if (
|
|
2476
|
+
if (UtilsOs.isWebSQL) {
|
|
2478
2477
|
this.server = new RealtimeServer(this);
|
|
2479
2478
|
// console.log('DONE INITING SERVER');
|
|
2480
2479
|
this.client = new RealtimeClient(this);
|
|
@@ -2512,7 +2511,7 @@ class RealtimeCore {
|
|
|
2512
2511
|
nsp = nsp === '/' ? '' : nsp;
|
|
2513
2512
|
const contextNameForCommunication = this.ctx.contextNameForCommunication;
|
|
2514
2513
|
let prefix = `${apiPrefix}/${contextNameForCommunication}/udp`;
|
|
2515
|
-
if (
|
|
2514
|
+
if (UtilsOs.isElectron) {
|
|
2516
2515
|
prefix = ``;
|
|
2517
2516
|
}
|
|
2518
2517
|
const href = `${this.ctx.uriOrigin}${this.ctx.uriPathnameOrNothingIfRoot}` +
|
|
@@ -2789,7 +2788,7 @@ class EndpointContext {
|
|
|
2789
2788
|
if (this.config.host &&
|
|
2790
2789
|
!this.config.host.startsWith('http://') &&
|
|
2791
2790
|
!this.config.host.startsWith('https://')) {
|
|
2792
|
-
Helpers.
|
|
2791
|
+
Helpers.throwError(`[taon-config] Your${this.host ? ' remote' : ''} 'host' must start with http:// or https://`);
|
|
2793
2792
|
}
|
|
2794
2793
|
if (_.isUndefined(this.config.useIpcWhenElectron)) {
|
|
2795
2794
|
this.config.useIpcWhenElectron = true;
|
|
@@ -2812,10 +2811,10 @@ class EndpointContext {
|
|
|
2812
2811
|
}
|
|
2813
2812
|
// console.log(`
|
|
2814
2813
|
// useIpcWhenElectron: ${this.config.useIpcWhenElectron}
|
|
2815
|
-
//
|
|
2814
|
+
// UtilsOs.isElectron: ${UtilsOs.isElectron}
|
|
2816
2815
|
// `)
|
|
2817
|
-
if (this.config.useIpcWhenElectron &&
|
|
2818
|
-
if (
|
|
2816
|
+
if (this.config.useIpcWhenElectron && UtilsOs.isElectron) {
|
|
2817
|
+
if (UtilsOs.isWebSQL) {
|
|
2819
2818
|
this.mode = 'backend-frontend(websql-electron)';
|
|
2820
2819
|
}
|
|
2821
2820
|
else {
|
|
@@ -4023,7 +4022,7 @@ class EndpointContext {
|
|
|
4023
4022
|
//#endregion
|
|
4024
4023
|
//#region init server
|
|
4025
4024
|
// console.log({ expressPath });
|
|
4026
|
-
if (
|
|
4025
|
+
if (UtilsOs.isNode || UtilsOs.isWebSQL) {
|
|
4027
4026
|
/* */
|
|
4028
4027
|
/* */
|
|
4029
4028
|
/* */
|
|
@@ -4041,7 +4040,7 @@ class EndpointContext {
|
|
|
4041
4040
|
}
|
|
4042
4041
|
//#endregion
|
|
4043
4042
|
//#region init client
|
|
4044
|
-
const shouldInitClient =
|
|
4043
|
+
const shouldInitClient = UtilsOs.isBrowser || this.isRemoteHost || UtilsOs.isWebSQL;
|
|
4045
4044
|
// console.log('shouldInitClient', shouldInitClient);
|
|
4046
4045
|
if (shouldInitClient) {
|
|
4047
4046
|
// console.log(
|
|
@@ -4330,7 +4329,7 @@ class EndpointContext {
|
|
|
4330
4329
|
//#endregion
|
|
4331
4330
|
// console.log(`BACKEND: expressPath: "${expressPath}" `);
|
|
4332
4331
|
//#endregion
|
|
4333
|
-
if (
|
|
4332
|
+
if (UtilsOs.isElectron) {
|
|
4334
4333
|
/* */
|
|
4335
4334
|
/* */
|
|
4336
4335
|
/* */
|
|
@@ -4665,7 +4664,7 @@ class EndpointContext {
|
|
|
4665
4664
|
//#endregion
|
|
4666
4665
|
const orgMethods = target.prototype[methodConfig.methodName];
|
|
4667
4666
|
//#region handle electron ipc request
|
|
4668
|
-
if (
|
|
4667
|
+
if (UtilsOs.isElectron) {
|
|
4669
4668
|
const ipcRenderer = window.require('electron').ipcRenderer;
|
|
4670
4669
|
target.prototype[methodConfig.methodName] = function (...args) {
|
|
4671
4670
|
const received = new Promise(async (resolve, reject) => {
|
|
@@ -8202,10 +8201,10 @@ var Taon;
|
|
|
8202
8201
|
// export import Middleware = middlewareDecorator.TaonMiddleware;
|
|
8203
8202
|
//#endregion
|
|
8204
8203
|
//#region aliases to helpers
|
|
8205
|
-
Taon.isBrowser =
|
|
8206
|
-
Taon.isNode =
|
|
8207
|
-
Taon.isWebSQL =
|
|
8208
|
-
Taon.isElectron =
|
|
8204
|
+
Taon.isBrowser = UtilsOs.isBrowser;
|
|
8205
|
+
Taon.isNode = UtilsOs.isNode;
|
|
8206
|
+
Taon.isWebSQL = UtilsOs.isWebSQL;
|
|
8207
|
+
Taon.isElectron = UtilsOs.isElectron;
|
|
8209
8208
|
//#endregion
|
|
8210
8209
|
Taon.createContext = createContext;
|
|
8211
8210
|
Taon.createContextTemplate = createContextTemplate;
|