taon 21.0.63 → 21.0.71
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 +142 -69
- package/browser/fesm2022/taon-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon-browser.d.ts +13 -16
- package/browser-prod/fesm2022/taon-browser.mjs +147 -74
- 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 +15 -18
- package/browser-prod.split-namespaces.json +2 -4
- package/cli.js +1 -1
- package/cli.js.map +1 -1
- package/icon-menu-taon.svg +15 -15
- package/lib/base-classes/base-controller.d.ts +2 -3
- package/lib/base-classes/base-controller.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/entity-decorator.d.ts +3 -6
- package/lib/decorators/classes/entity-decorator.js +16 -7
- package/lib/decorators/classes/entity-decorator.js.map +1 -1
- package/lib/decorators/http/http-decorators.d.ts +1 -3
- package/lib/decorators/http/http-decorators.js +4 -2
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/decorators/http/http-methods-decorators.d.ts +2 -2
- package/lib/endpoint-context.js +104 -48
- package/lib/endpoint-context.js.map +1 -1
- package/lib/entity-process.d.ts +0 -1
- package/lib/entity-process.js +39 -41
- package/lib/entity-process.js.map +1 -1
- package/lib/formly/fromly.js +2 -2
- package/lib/formly/fromly.js.map +1 -1
- package/lib/helpers/class-helpers.d.ts +1 -1
- package/lib/helpers/class-helpers.js +9 -6
- package/lib/helpers/class-helpers.js.map +1 -1
- package/lib/models.d.ts +7 -3
- package/lib/models.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/realtime/realtime-client.js +1 -1
- package/lib/realtime/realtime-client.js.map +1 -1
- package/lib/symbols.d.ts +0 -2
- package/lib/symbols.js +3 -7
- package/lib/symbols.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-controller.d.ts +2 -3
- package/lib-prod/base-classes/base-controller.js.map +1 -1
- package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
- package/lib-prod/base-classes/base-injector.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.map +1 -1
- package/lib-prod/create-context.js.map +1 -1
- package/lib-prod/decorators/classes/controller-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/entity-decorator.d.ts +3 -6
- package/lib-prod/decorators/classes/entity-decorator.js +17 -8
- package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/middleware-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/migration-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/provider-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/repository-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib-prod/decorators/http/http-decorators.d.ts +1 -3
- package/lib-prod/decorators/http/http-decorators.js +4 -3
- package/lib-prod/decorators/http/http-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-methods-decorators.d.ts +2 -2
- package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib-prod/endpoint-context-storage.js.map +1 -1
- package/lib-prod/endpoint-context.js +108 -52
- package/lib-prod/endpoint-context.js.map +1 -1
- package/lib-prod/entity-process.d.ts +0 -1
- package/lib-prod/entity-process.js +9 -11
- package/lib-prod/entity-process.js.map +1 -1
- package/lib-prod/formly/fromly.js +5 -5
- package/lib-prod/formly/fromly.js.map +1 -1
- package/lib-prod/helpers/class-helpers.d.ts +1 -1
- package/lib-prod/helpers/class-helpers.js +13 -10
- package/lib-prod/helpers/class-helpers.js.map +1 -1
- package/lib-prod/inject.js.map +1 -1
- package/lib-prod/models.d.ts +7 -3
- package/lib-prod/models.js.map +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +2 -2
- package/lib-prod/realtime/realtime-client.js.map +1 -1
- package/lib-prod/realtime/realtime-server.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
- package/lib-prod/symbols.d.ts +0 -2
- package/lib-prod/symbols.js +0 -4
- package/lib-prod/symbols.js.map +1 -1
- package/lib-prod/ui/index.d.ts +1 -1
- package/lib-prod/ui/index.js +1 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -1
- package/lib-prod.split-namespaces.json +2 -4
- package/package.json +1 -1
- package/websql/fesm2022/taon-websql.mjs +147 -78
- package/websql/fesm2022/taon-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon-websql.d.ts +13 -16
- package/websql-prod/fesm2022/taon-websql.mjs +152 -83
- 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 +15 -18
- package/websql-prod.split-namespaces.json +2 -4
package/websql/package.json
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import * as taon_websql from 'taon/websql';
|
|
3
3
|
import * as expressType from 'express';
|
|
4
4
|
import { Request, Response, RequestHandler, Application } from 'express';
|
|
5
|
-
import {
|
|
5
|
+
import { HttpResponse, Ng2RestAxiosRequestConfig, RestResponseWrapper, TaonServerMiddlewareInterceptOptions, TaonClientMiddlewareInterceptOptions, ResponseTypeAxios, HttpResponseError, RestErrorResponseWrapper, ModelValue, EncodeSchema } from 'ng2-rest/websql';
|
|
6
6
|
export { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions } from 'ng2-rest/websql';
|
|
7
7
|
import { Server } from 'http';
|
|
8
8
|
import { DataSource, Repository, SaveOptions, DeepPartial, QueryDeepPartialEntity, InsertResult, UpsertOptions, FindOptionsWhere, UpdateResult, FindManyOptions, FindOneOptions, QueryRunner, SelectQueryBuilder, Table, RelationPath, MigrationInterface, EntitySubscriberInterface, InsertEvent, UpdateEvent, RemoveEvent, SoftRemoveEvent, RecoverEvent, TransactionStartEvent, TransactionCommitEvent, TransactionRollbackEvent } from 'taon-typeorm/websql';
|
|
9
9
|
export { AfterInsert, AfterLoad, AfterRecover, AfterRemove, AfterSoftRemove, AfterUpdate, BeforeInsert, BeforeRecover, BeforeRemove, BeforeSoftRemove, BeforeUpdate, Column, Connection, CreateDateColumn, Column as CustomColumn, DeleteDateColumn, Generated, Generated as GeneratedColumn, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, Repository, TreeChildren, TreeParent, UpdateDateColumn, VersionColumn, VirtualColumn } from 'taon-typeorm/websql';
|
|
10
10
|
import { CoreModels } from 'tnp-core/websql';
|
|
11
11
|
import { MySqlQuerySource } from 'taon-type-sql/websql';
|
|
12
|
+
import * as rxjs from 'rxjs';
|
|
13
|
+
import { Observable, Subscriber } from 'rxjs';
|
|
12
14
|
import * as i0 from '@angular/core';
|
|
13
15
|
import { InjectionToken, ViewContainerRef } from '@angular/core';
|
|
14
16
|
import { AxiosResponse } from 'axios';
|
|
15
|
-
import * as rxjs from 'rxjs';
|
|
16
|
-
import { Observable, Subscriber } from 'rxjs';
|
|
17
17
|
import * as _ngx_formly_core from '@ngx-formly/core';
|
|
18
18
|
import { FieldWrapper, FieldArrayType, FormlyFormBuilder, FormlyFieldConfig } from '@ngx-formly/core';
|
|
19
19
|
import * as Electron from 'electron';
|
|
@@ -606,12 +606,15 @@ declare namespace Models {
|
|
|
606
606
|
};
|
|
607
607
|
type SyncResponseFunc<T> = (options?: ResponseFuncOpt<T>) => SyncResponse<T>;
|
|
608
608
|
type MixResponse<T> = SyncResponse<T> | ExpressContext<T>;
|
|
609
|
+
type PromiseObservableMix<T> = Promise<T> & {
|
|
610
|
+
observable: Observable<T>;
|
|
611
|
+
};
|
|
609
612
|
interface ClientAction<T> {
|
|
610
613
|
/**
|
|
611
614
|
* @deprecated use request() mehods instead
|
|
612
615
|
*/
|
|
613
|
-
readonly received?:
|
|
614
|
-
request?(axiosConfig?:
|
|
616
|
+
readonly received?: PromiseObservableMix<HttpResponse<T>>;
|
|
617
|
+
request?(axiosConfig?: Ng2RestAxiosRequestConfig): PromiseObservableMix<HttpResponse<T>>;
|
|
615
618
|
}
|
|
616
619
|
interface AsyncResponse<T> {
|
|
617
620
|
(req?: Request<any>, res?: Response<any>): Promise<SyncResponse<T> | SyncResponseFunc<T>>;
|
|
@@ -926,7 +929,6 @@ declare class EntityProcess {
|
|
|
926
929
|
*/
|
|
927
930
|
private result;
|
|
928
931
|
private response;
|
|
929
|
-
static init(result: any, response: Response): Promise<void>;
|
|
930
932
|
/**
|
|
931
933
|
* Data to send
|
|
932
934
|
*/
|
|
@@ -981,9 +983,7 @@ declare class Realtime {
|
|
|
981
983
|
}
|
|
982
984
|
declare namespace Symbols {
|
|
983
985
|
const ctxInClassOrClassObj: unique symbol;
|
|
984
|
-
const classNameStaticProperty: string;
|
|
985
986
|
const fullClassNameStaticProperty: string;
|
|
986
|
-
const orignalClass: string;
|
|
987
987
|
const orignalClassClonesObj: string;
|
|
988
988
|
const classMethodsNames: string;
|
|
989
989
|
const REALTIME: Realtime;
|
|
@@ -1086,7 +1086,7 @@ interface TaonHttpDecoratorOptions {
|
|
|
1086
1086
|
*/
|
|
1087
1087
|
pathIsGlobal?: boolean;
|
|
1088
1088
|
overrideContentType?: CoreModels.ContentType;
|
|
1089
|
-
overrideResponseType?:
|
|
1089
|
+
overrideResponseType?: ResponseTypeAxios;
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Express will send response as HTML string with proper headers
|
|
1092
1092
|
*/
|
|
@@ -1299,7 +1299,7 @@ declare class TaonBaseController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBase
|
|
|
1299
1299
|
* through `uploadFormDataToServer` or `uploadLocalFileToServer`
|
|
1300
1300
|
*/
|
|
1301
1301
|
protected afterFileUploadAction(file?: MulterFileUploadResponse, queryParams?: UPLOAD_FILE_QUERY_PARAMS): void | Promise<void>;
|
|
1302
|
-
uploadLocalFileToServer(absFilePath: string, options?: Pick<
|
|
1302
|
+
uploadLocalFileToServer(absFilePath: string, options?: Pick<Ng2RestAxiosRequestConfig, 'onUploadProgress'>, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Promise<MulterFileUploadResponse[]>;
|
|
1303
1303
|
/**
|
|
1304
1304
|
* Easy way to wait for status change with http (1s default) pooling.
|
|
1305
1305
|
*
|
|
@@ -1591,7 +1591,7 @@ declare namespace ClassHelpers {
|
|
|
1591
1591
|
const getName: (classFnOrObject: any) => string;
|
|
1592
1592
|
const getOrginalClass: (classFnOrObject: any) => any;
|
|
1593
1593
|
const getFullInternalName: (classFnOrObject: any) => string;
|
|
1594
|
-
const getUniqueKey: (classFnOrObject: any) => string;
|
|
1594
|
+
const getUniqueKey: (classFnOrObject: any) => string | undefined;
|
|
1595
1595
|
const isContextClassObject: (obj: any) => boolean;
|
|
1596
1596
|
const setName: (target: Function, className: string) => void;
|
|
1597
1597
|
const hasParentClassWithName: (target: Function, className: string, targets?: any[]) => boolean;
|
|
@@ -1933,11 +1933,8 @@ declare class TaonEntityOptions<T = any> extends DecoratorAbstractOpt {
|
|
|
1933
1933
|
*/
|
|
1934
1934
|
uniqueKeyProp?: string;
|
|
1935
1935
|
createTable?: boolean;
|
|
1936
|
-
defaultModelValues?:
|
|
1937
|
-
defaultModelMapping?:
|
|
1938
|
-
defaultModelMappingDeep?: {
|
|
1939
|
-
[lodashPathes: string]: string | [string];
|
|
1940
|
-
};
|
|
1936
|
+
defaultModelValues?: () => ModelValue<T>;
|
|
1937
|
+
defaultModelMapping?: () => EncodeSchema<T>;
|
|
1941
1938
|
}
|
|
1942
1939
|
|
|
1943
1940
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import { ___NS__merge, ___NS__cloneDeep, ___NS__camelCase, ___NS__isUndefined, ___NS__isArray, ___NS__isFunction, ___NS__isNull, ___NS__isObject, ___NS__isRegExp, ___NS__isBuffer, ___NS__isArrayBuffer, ___NS__isDate, ___NS__isString, Utils__NS__uniqArray, ___NS__uniq, UtilsMigrations__NS__isValidTimestamp, Helpers__NS__throwError, UtilsMigrations__NS__getTimestampFromClassName, ___NS__times, ___NS__first, Helpers__NS__logInfo, UtilsOs__NS__isWebSQL, UtilsOs__NS__isElectron, Helpers__NS__error, UtilsOs__NS__isRunningInDocker, ___NS__isBoolean, ___NS__isNil, ___NS__set, Helpers__NS__info, ___NS__slice, ___NS__last, UtilsOs__NS__isNode, UtilsOs__NS__isBrowser, ___NS__startCase, crossPlatformPath, Helpers__NS__isBlob, Helpers__NS__runSyncOrAsync, config, CoreModels__NS__SPECIAL_APP_READY_MESSAGE, UtilsOs__NS__isRunningInCliMode, Helpers__NS__log, ___NS__isNumber, UtilsTerminal__NS__waitMilliseconds, CoreModels__NS__TaonHttpErrorCustomProp, Helpers__NS__warn, ___NS__lowerFirst } from 'tnp-core/websql-prod';
|
|
2
|
+
import { ___NS__merge, ___NS__cloneDeep, ___NS__camelCase, ___NS__isUndefined, ___NS__isArray, ___NS__isFunction, ___NS__isNull, CoreModels__NS__ClassNameStaticProperty, CoreModels__NS__OrignalClassKey, ___NS__isObject, ___NS__isRegExp, ___NS__isBuffer, ___NS__isArrayBuffer, ___NS__isDate, ___NS__isString, Utils__NS__uniqArray, ___NS__uniq, UtilsMigrations__NS__isValidTimestamp, Helpers__NS__throwError, UtilsMigrations__NS__getTimestampFromClassName, ___NS__times, ___NS__first, Helpers__NS__logInfo, UtilsOs__NS__isWebSQL, UtilsOs__NS__isElectron, Helpers__NS__error, UtilsOs__NS__isRunningInDocker, ___NS__isBoolean, ___NS__isNil, ___NS__set, Helpers__NS__info, ___NS__slice, ___NS__last, UtilsOs__NS__isNode, UtilsOs__NS__isBrowser, ___NS__startCase, crossPlatformPath, Helpers__NS__isBlob, Helpers__NS__runSyncOrAsync, config, CoreModels__NS__SPECIAL_APP_READY_MESSAGE, UtilsOs__NS__isRunningInCliMode, Helpers__NS__log, ___NS__isNumber, UtilsTerminal__NS__waitMilliseconds, CoreModels__NS__TaonHttpErrorCustomProp, Helpers__NS__warn, ___NS__lowerFirst } from 'tnp-core/websql-prod';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { JSON10 } from 'json10/websql-prod';
|
|
5
5
|
import { walk } from 'lodash-walk-object/websql-prod';
|
|
6
|
-
import { RestResponseWrapper,
|
|
6
|
+
import { RestResponseWrapper, Resource__NS__globalInterceptors, Resource__NS__methodsInterceptors, HttpResponse, RestHeaders, Resource__NS__create, decodeMappingForHeaderJson, Resource__NS__Cookies, DefaultMapping, DefaultModel, HttpResponseError } from 'ng2-rest/websql-prod';
|
|
7
7
|
import { Observable, Subject, from } from 'rxjs';
|
|
8
|
-
import {
|
|
8
|
+
import { Table, TableIndex, EventSubscriber, Entity, DataSource, Column, PrimaryGeneratedColumn, VersionColumn, CreateDateColumn } from 'taon-typeorm/websql-prod';
|
|
9
9
|
export { AfterInsert, AfterLoad, AfterRecover, AfterRemove, AfterSoftRemove, AfterUpdate, BeforeInsert, BeforeRecover, BeforeRemove, BeforeSoftRemove, BeforeUpdate, Column, Connection, CreateDateColumn, Column as CustomColumn, DeleteDateColumn, Generated, Generated as GeneratedColumn, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, Repository, TreeChildren, TreeParent, UpdateDateColumn, VersionColumn, VirtualColumn } from 'taon-typeorm/websql-prod';
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
11
|
import { InjectionToken, inject as inject$1, PLATFORM_ID, Injectable, ViewContainerRef, ViewChild, Component } from '@angular/core';
|
|
12
|
-
import {
|
|
12
|
+
import { CLASS__NS__getName, CLASS__NS__setName, CLASS__NS__getBy } from 'typescript-class-helpers/websql-prod';
|
|
13
13
|
import * as JSON5 from 'json5';
|
|
14
14
|
import { io } from 'socket.io-client';
|
|
15
15
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
@@ -224,9 +224,7 @@ class Realtime {
|
|
|
224
224
|
}
|
|
225
225
|
//namespace Symbols
|
|
226
226
|
const Symbols__NS__ctxInClassOrClassObj = Symbol();
|
|
227
|
-
const Symbols__NS__classNameStaticProperty = SYMBOL.ClassNameStaticProperty;
|
|
228
227
|
const Symbols__NS__fullClassNameStaticProperty = `$$fullclassName$$`;
|
|
229
|
-
const Symbols__NS__orignalClass = OrignalClassKey;
|
|
230
228
|
const Symbols__NS__orignalClassClonesObj = `$$originalClassClonesObj$$`;
|
|
231
229
|
const Symbols__NS__classMethodsNames = `$$classMethodsNames$$`;
|
|
232
230
|
const Symbols__NS__REALTIME = new Realtime();
|
|
@@ -377,14 +375,14 @@ const ClassHelpers__NS__getName = (classFnOrObject) => {
|
|
|
377
375
|
console.error('OBJECT OR CLASS', classFnOrObject);
|
|
378
376
|
throw new Error(`Cannot get name from this object or class.`);
|
|
379
377
|
}
|
|
380
|
-
return ((classFnOrObject[
|
|
381
|
-
? classFnOrObject[
|
|
382
|
-
: classFnOrObject?.constructor[
|
|
383
|
-
(___NS__isFunction(classFnOrObject) ?
|
|
378
|
+
return ((classFnOrObject[CoreModels__NS__ClassNameStaticProperty]
|
|
379
|
+
? classFnOrObject[CoreModels__NS__ClassNameStaticProperty]
|
|
380
|
+
: classFnOrObject?.constructor[CoreModels__NS__ClassNameStaticProperty]) ||
|
|
381
|
+
(___NS__isFunction(classFnOrObject) ? CLASS__NS__getName(classFnOrObject) : void 0));
|
|
384
382
|
};
|
|
385
383
|
//#endregion
|
|
386
384
|
const ClassHelpers__NS__getOrginalClass = (classFnOrObject) => {
|
|
387
|
-
const org = classFnOrObject[
|
|
385
|
+
const org = classFnOrObject[CoreModels__NS__OrignalClassKey];
|
|
388
386
|
if (!org) {
|
|
389
387
|
return classFnOrObject;
|
|
390
388
|
}
|
|
@@ -406,8 +404,11 @@ const ClassHelpers__NS__getFullInternalName = (classFnOrObject) => {
|
|
|
406
404
|
const ClassHelpers__NS__getUniqueKey = (classFnOrObject) => {
|
|
407
405
|
const classFn = ___NS__isFunction(classFnOrObject)
|
|
408
406
|
? classFnOrObject
|
|
409
|
-
: classFnOrObject
|
|
407
|
+
: classFnOrObject?.constructor;
|
|
410
408
|
const config = Reflect.getMetadata(Symbols__NS__metadata.options.entity, classFn);
|
|
409
|
+
if (!config) {
|
|
410
|
+
return void 0;
|
|
411
|
+
}
|
|
411
412
|
return config.uniqueKeyProp;
|
|
412
413
|
};
|
|
413
414
|
//#endregion
|
|
@@ -431,7 +432,7 @@ const ClassHelpers__NS__isContextClassObject = (obj) => {
|
|
|
431
432
|
const ClassHelpers__NS__setName = (target, className) => {
|
|
432
433
|
// console.log('setName', className, target.name)
|
|
433
434
|
Validators__NS__classNameVlidation(className, target);
|
|
434
|
-
target[
|
|
435
|
+
target[CoreModels__NS__ClassNameStaticProperty] = className;
|
|
435
436
|
};
|
|
436
437
|
//#endregion
|
|
437
438
|
//#region has parent with class name
|
|
@@ -1291,7 +1292,7 @@ class RealtimeClient {
|
|
|
1291
1292
|
* ...
|
|
1292
1293
|
*/
|
|
1293
1294
|
listenChangesEntity(entityClassFnOrObj, options) {
|
|
1294
|
-
options = options || {};
|
|
1295
|
+
options = ___NS__cloneDeep(options || {});
|
|
1295
1296
|
if (___NS__isObject(entityClassFnOrObj)) {
|
|
1296
1297
|
const orgObj = entityClassFnOrObj;
|
|
1297
1298
|
entityClassFnOrObj =
|
|
@@ -2527,23 +2528,18 @@ class EndpointContext {
|
|
|
2527
2528
|
// You can override prototype properties or methods here if needed
|
|
2528
2529
|
// static properties override allowed
|
|
2529
2530
|
}
|
|
2530
|
-
static { _a =
|
|
2531
|
-
// @ts-ignore
|
|
2531
|
+
static { _a = CoreModels__NS__OrignalClassKey, _b = Symbols__NS__fullClassNameStaticProperty, _c = CoreModels__NS__ClassNameStaticProperty, _d = Symbols__NS__ctxInClassOrClassObj, _e = Symbols__NS__ctxInClassOrClassObj; }
|
|
2532
2532
|
static { this[_a] = TaonBaseClass; }
|
|
2533
|
-
// @ts-ignore
|
|
2534
2533
|
static { this[_b] = `${ctx.contextName}.${className}`; }
|
|
2535
|
-
// @ts-ignore
|
|
2536
2534
|
static { this[_c] = className; }
|
|
2537
2535
|
static { this[_d] = ctx; }
|
|
2538
2536
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
2539
2537
|
static __getFullPathForClass__(arr = []) {
|
|
2540
2538
|
const name = this[Symbols__NS__fullClassNameStaticProperty];
|
|
2541
2539
|
arr.push(name);
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
this[
|
|
2545
|
-
// @ts-ignore
|
|
2546
|
-
this[Symbols__NS__orignalClass].__getFullPathForClass__(arr);
|
|
2540
|
+
if (this[CoreModels__NS__OrignalClassKey] &&
|
|
2541
|
+
this[CoreModels__NS__OrignalClassKey].__getFullPathForClass__) {
|
|
2542
|
+
this[CoreModels__NS__OrignalClassKey].__getFullPathForClass__(arr);
|
|
2547
2543
|
}
|
|
2548
2544
|
return arr.join('/');
|
|
2549
2545
|
}
|
|
@@ -2593,7 +2589,7 @@ class EndpointContext {
|
|
|
2593
2589
|
// console.warn(`Please provide className for ${TaonBaseClass.name} class`);
|
|
2594
2590
|
// }
|
|
2595
2591
|
className = className || key;
|
|
2596
|
-
TaonBaseClass[
|
|
2592
|
+
TaonBaseClass[CoreModels__NS__ClassNameStaticProperty] = className;
|
|
2597
2593
|
const clonedClass = this.cloneClassWithNewMetadata({
|
|
2598
2594
|
TaonBaseClass,
|
|
2599
2595
|
className,
|
|
@@ -3870,7 +3866,8 @@ class EndpointContext {
|
|
|
3870
3866
|
})).map(f => {
|
|
3871
3867
|
const [method, expressPath] = f.split(' ');
|
|
3872
3868
|
if (method.toUpperCase() === 'GET' && this.isRunningInsideDocker) {
|
|
3873
|
-
this.logRoutes &&
|
|
3869
|
+
this.logRoutes &&
|
|
3870
|
+
console.log(`apk add curl && curl http://localhost:${this.uriPort}${expressPath}`);
|
|
3874
3871
|
}
|
|
3875
3872
|
return (`\n### ${___NS__startCase(___NS__last(expressPath.split('/')))}\n` +
|
|
3876
3873
|
TaonHelpers__NS__fillUpTo(method.toUpperCase() + ' ', 10) +
|
|
@@ -3912,7 +3909,7 @@ class EndpointContext {
|
|
|
3912
3909
|
middlewares.forEach(middlewareInstanceName => {
|
|
3913
3910
|
const contextName = this.contextName;
|
|
3914
3911
|
const interceptorName = `${contextName}-${ClassHelpers__NS__getName(middlewareInstanceName)}`;
|
|
3915
|
-
|
|
3912
|
+
Resource__NS__globalInterceptors.set(interceptorName, {
|
|
3916
3913
|
intercept: ({ req, next }) => {
|
|
3917
3914
|
const url = new URL(req.url);
|
|
3918
3915
|
if (url.pathname.startsWith(`${this.uriPathnameOrNothingIfRoot}/${apiPrefix}/${contextName}/`)) {
|
|
@@ -4142,6 +4139,9 @@ class EndpointContext {
|
|
|
4142
4139
|
/* */
|
|
4143
4140
|
/* */
|
|
4144
4141
|
/* */
|
|
4142
|
+
/* */
|
|
4143
|
+
/* */
|
|
4144
|
+
/* */
|
|
4145
4145
|
}
|
|
4146
4146
|
if (!this.isRemoteHost) {
|
|
4147
4147
|
//#region apply dummy websql express routers
|
|
@@ -4368,6 +4368,24 @@ class EndpointContext {
|
|
|
4368
4368
|
/* */
|
|
4369
4369
|
/* */
|
|
4370
4370
|
/* */
|
|
4371
|
+
/* */
|
|
4372
|
+
/* */
|
|
4373
|
+
/* */
|
|
4374
|
+
/* */
|
|
4375
|
+
/* */
|
|
4376
|
+
/* */
|
|
4377
|
+
/* */
|
|
4378
|
+
/* */
|
|
4379
|
+
/* */
|
|
4380
|
+
/* */
|
|
4381
|
+
/* */
|
|
4382
|
+
/* */
|
|
4383
|
+
/* */
|
|
4384
|
+
/* */
|
|
4385
|
+
/* */
|
|
4386
|
+
/* */
|
|
4387
|
+
/* */
|
|
4388
|
+
/* */
|
|
4371
4389
|
}
|
|
4372
4390
|
return {
|
|
4373
4391
|
expressPath: expressPath,
|
|
@@ -4429,7 +4447,7 @@ class EndpointContext {
|
|
|
4429
4447
|
const middlewareName = ClassHelpers__NS__getName(instance);
|
|
4430
4448
|
// middlewareName - only needed for inheritace and uniqness of interceptors
|
|
4431
4449
|
const interceptorKey = `${middlewareName}-${methodConfig.type?.toUpperCase()}-${expressPath}`;
|
|
4432
|
-
|
|
4450
|
+
Resource__NS__methodsInterceptors.set(interceptorKey, {
|
|
4433
4451
|
intercept: ({ req, next }) => {
|
|
4434
4452
|
return instance.interceptClientMethod({
|
|
4435
4453
|
req,
|
|
@@ -4465,15 +4483,15 @@ class EndpointContext {
|
|
|
4465
4483
|
console.log({ responseData });
|
|
4466
4484
|
try {
|
|
4467
4485
|
const body = res;
|
|
4468
|
-
|
|
4469
|
-
body: void 0,
|
|
4470
|
-
isArray: void 0,
|
|
4471
|
-
method: methodConfig.type,
|
|
4472
|
-
url: `${ctx.uriOrigin}${'' // TODO express path
|
|
4473
|
-
}${methodConfig.path} `,
|
|
4474
|
-
}, Helpers__NS__isBlob(body) || ___NS__isString(body)
|
|
4486
|
+
const responseStrinOrBlob = Helpers__NS__isBlob(body) || ___NS__isString(body)
|
|
4475
4487
|
? body
|
|
4476
|
-
: JSON.stringify(body)
|
|
4488
|
+
: JSON.stringify(body);
|
|
4489
|
+
res = new HttpResponse(`${ctx.uriOrigin}${'' // TODO express path
|
|
4490
|
+
}${methodConfig.path} `, methodConfig.type, responseStrinOrBlob, RestHeaders.from(headers), 200, {
|
|
4491
|
+
// responseMapping: {
|
|
4492
|
+
// // entity: ()=> TODO for electron
|
|
4493
|
+
// },
|
|
4494
|
+
}, false);
|
|
4477
4495
|
resolve(res);
|
|
4478
4496
|
}
|
|
4479
4497
|
catch (error) {
|
|
@@ -4581,15 +4599,12 @@ class EndpointContext {
|
|
|
4581
4599
|
res = await res.received;
|
|
4582
4600
|
}
|
|
4583
4601
|
const body = res;
|
|
4584
|
-
|
|
4585
|
-
body: void 0,
|
|
4586
|
-
isArray: void 0,
|
|
4587
|
-
method: methodConfig.type,
|
|
4588
|
-
url: `${ctx.uriOrigin}${'' // TODO express path
|
|
4589
|
-
}${methodConfig.path} `,
|
|
4590
|
-
}, Helpers__NS__isBlob(body) || ___NS__isString(body)
|
|
4602
|
+
const stringOrBlobData = Helpers__NS__isBlob(body) || ___NS__isString(body)
|
|
4591
4603
|
? body
|
|
4592
|
-
: JSON.stringify(body)
|
|
4604
|
+
: JSON.stringify(body);
|
|
4605
|
+
// TODO SHOULD BE IMPLEMENTED IN NG2-REST
|
|
4606
|
+
res = new HttpResponse(`${ctx.uriOrigin}${'' // TODO express path
|
|
4607
|
+
}${methodConfig.path} `, methodConfig.type, stringOrBlobData, RestHeaders.from(headers), 200, {}, false);
|
|
4593
4608
|
// TODO blob should be blob not json
|
|
4594
4609
|
// console.log('NEXT', res);
|
|
4595
4610
|
// target.prototype[methodConfig.methodName][subjectHandler].next(res);
|
|
@@ -4634,28 +4649,51 @@ class EndpointContext {
|
|
|
4634
4649
|
storage[Symbols__NS__old.ENDPOINT_META_CONFIG][ctx.uriOrigin] = {};
|
|
4635
4650
|
const endpoints = storage[Symbols__NS__old.ENDPOINT_META_CONFIG];
|
|
4636
4651
|
let rest;
|
|
4652
|
+
const requestHeaders = RestHeaders.from({});
|
|
4637
4653
|
if (!endpoints[ctx.uriOrigin][expressPath]) {
|
|
4638
|
-
let headers = {};
|
|
4639
4654
|
if (methodConfig.contentType && !methodConfig.responseType) {
|
|
4640
|
-
rest =
|
|
4655
|
+
rest = Resource__NS__create(ctx.uriOrigin, expressPath, {
|
|
4656
|
+
responseMapping: {
|
|
4657
|
+
entity: Symbols__NS__old.MAPPING_CONFIG_HEADER,
|
|
4658
|
+
circular: Symbols__NS__old.CIRCURAL_OBJECTS_MAP_BODY,
|
|
4659
|
+
},
|
|
4660
|
+
});
|
|
4661
|
+
requestHeaders.apply({
|
|
4641
4662
|
'Content-Type': methodConfig.contentType,
|
|
4642
4663
|
Accept: methodConfig.contentType,
|
|
4643
|
-
})
|
|
4664
|
+
});
|
|
4644
4665
|
}
|
|
4645
4666
|
else if (methodConfig.contentType && methodConfig.responseType) {
|
|
4646
|
-
rest =
|
|
4667
|
+
rest = Resource__NS__create(ctx.uriOrigin, expressPath, {
|
|
4668
|
+
responseMapping: {
|
|
4669
|
+
entity: Symbols__NS__old.MAPPING_CONFIG_HEADER,
|
|
4670
|
+
circular: Symbols__NS__old.CIRCURAL_OBJECTS_MAP_BODY,
|
|
4671
|
+
},
|
|
4672
|
+
});
|
|
4673
|
+
requestHeaders.apply({
|
|
4647
4674
|
'Content-Type': methodConfig.contentType,
|
|
4648
4675
|
Accept: methodConfig.contentType,
|
|
4649
4676
|
responsetypeaxios: methodConfig.responseType,
|
|
4650
|
-
})
|
|
4677
|
+
});
|
|
4651
4678
|
}
|
|
4652
4679
|
else if (!methodConfig.contentType && methodConfig.responseType) {
|
|
4653
|
-
rest =
|
|
4680
|
+
rest = Resource__NS__create(ctx.uriOrigin, expressPath, {
|
|
4681
|
+
responseMapping: {
|
|
4682
|
+
entity: Symbols__NS__old.MAPPING_CONFIG_HEADER,
|
|
4683
|
+
circular: Symbols__NS__old.CIRCURAL_OBJECTS_MAP_BODY,
|
|
4684
|
+
},
|
|
4685
|
+
});
|
|
4686
|
+
requestHeaders.apply({
|
|
4654
4687
|
responsetypeaxios: methodConfig.responseType,
|
|
4655
|
-
})
|
|
4688
|
+
});
|
|
4656
4689
|
}
|
|
4657
4690
|
else {
|
|
4658
|
-
rest =
|
|
4691
|
+
rest = Resource__NS__create(ctx.uriOrigin, expressPath, {
|
|
4692
|
+
responseMapping: {
|
|
4693
|
+
entity: Symbols__NS__old.MAPPING_CONFIG_HEADER,
|
|
4694
|
+
circular: Symbols__NS__old.CIRCURAL_OBJECTS_MAP_BODY,
|
|
4695
|
+
},
|
|
4696
|
+
});
|
|
4659
4697
|
}
|
|
4660
4698
|
endpoints[ctx.uriOrigin][expressPath] = rest;
|
|
4661
4699
|
}
|
|
@@ -4683,47 +4721,60 @@ class EndpointContext {
|
|
|
4683
4721
|
/* */
|
|
4684
4722
|
throw new Error(errorMessage);
|
|
4685
4723
|
}
|
|
4724
|
+
const optionsDecodeHeader = {
|
|
4725
|
+
useFirstArrayItemClassNameForAllElements: true,
|
|
4726
|
+
};
|
|
4686
4727
|
if (currentParam.paramType === 'Path') {
|
|
4728
|
+
//#region handle path params
|
|
4687
4729
|
pathPrams[currentParam.paramName] = param;
|
|
4730
|
+
//#endregion
|
|
4688
4731
|
}
|
|
4689
4732
|
if (currentParam.paramType === 'Query') {
|
|
4733
|
+
//#region handle query params
|
|
4690
4734
|
if (currentParam.paramName) {
|
|
4691
|
-
const mapping =
|
|
4735
|
+
const mapping = decodeMappingForHeaderJson(param, optionsDecodeHeader);
|
|
4692
4736
|
if (mapping) {
|
|
4693
|
-
|
|
4737
|
+
requestHeaders.set(`${Symbols__NS__old.MAPPING_CONFIG_HEADER_QUERY_PARAMS}${currentParam.paramName} `, JSON.stringify(mapping));
|
|
4694
4738
|
}
|
|
4695
4739
|
queryParams[currentParam.paramName] = param;
|
|
4696
4740
|
}
|
|
4697
4741
|
else {
|
|
4698
|
-
const mapping =
|
|
4742
|
+
const mapping = decodeMappingForHeaderJson(param, optionsDecodeHeader);
|
|
4699
4743
|
if (mapping) {
|
|
4700
|
-
|
|
4744
|
+
requestHeaders.set(Symbols__NS__old.MAPPING_CONFIG_HEADER_QUERY_PARAMS, JSON.stringify(mapping));
|
|
4701
4745
|
}
|
|
4702
4746
|
queryParams = ___NS__cloneDeep(param);
|
|
4703
4747
|
}
|
|
4748
|
+
//#endregion
|
|
4704
4749
|
}
|
|
4705
4750
|
if (currentParam.paramType === 'Header') {
|
|
4751
|
+
//#region handler header params
|
|
4706
4752
|
if (currentParam.paramName) {
|
|
4707
4753
|
if (currentParam.paramName === Symbols__NS__old.MDC_KEY) {
|
|
4708
4754
|
// parese MDC
|
|
4709
|
-
|
|
4755
|
+
requestHeaders.set(currentParam.paramName, encodeURIComponent(JSON.stringify(param)));
|
|
4710
4756
|
}
|
|
4711
4757
|
else {
|
|
4712
|
-
|
|
4758
|
+
requestHeaders.set(currentParam.paramName, param);
|
|
4713
4759
|
}
|
|
4714
4760
|
}
|
|
4715
4761
|
else {
|
|
4716
4762
|
for (let header in param) {
|
|
4717
|
-
|
|
4763
|
+
requestHeaders.set(header, param[header]);
|
|
4718
4764
|
}
|
|
4719
4765
|
}
|
|
4766
|
+
//#endregion
|
|
4720
4767
|
}
|
|
4721
4768
|
if (currentParam.paramType === 'Cookie') {
|
|
4722
|
-
|
|
4769
|
+
//#region handle cookie params
|
|
4770
|
+
Resource__NS__Cookies.write(currentParam.paramName, param, currentParam.expireInSeconds);
|
|
4771
|
+
//#endregion
|
|
4723
4772
|
}
|
|
4724
4773
|
if (currentParam.paramType === 'Body') {
|
|
4774
|
+
//#region handle body params
|
|
4725
4775
|
if (currentParam.paramName) {
|
|
4726
4776
|
if (ClassHelpers__NS__getName(bodyObject) === 'FormData') {
|
|
4777
|
+
//#region prevent posting/putting not full body as FormData
|
|
4727
4778
|
throw new Error(`[taon - framework] Don use param names when posting / putting FormData.
|
|
4728
4779
|
Use this:
|
|
4729
4780
|
// ...
|
|
@@ -4735,45 +4786,52 @@ instead
|
|
|
4735
4786
|
(@Taon.Http.Param.Body('${currentParam.paramName}') formData: FormData) ...
|
|
4736
4787
|
// ...
|
|
4737
4788
|
`);
|
|
4789
|
+
//#endregion
|
|
4738
4790
|
}
|
|
4739
|
-
const mapping =
|
|
4791
|
+
const mapping = decodeMappingForHeaderJson(param, optionsDecodeHeader);
|
|
4740
4792
|
if (mapping) {
|
|
4741
|
-
|
|
4793
|
+
requestHeaders.set(`${Symbols__NS__old.MAPPING_CONFIG_HEADER_BODY_PARAMS}${currentParam.paramName} `, JSON.stringify(mapping));
|
|
4742
4794
|
}
|
|
4743
4795
|
bodyObject[currentParam.paramName] = param;
|
|
4744
4796
|
}
|
|
4745
4797
|
else {
|
|
4746
|
-
const mapping =
|
|
4798
|
+
const mapping = decodeMappingForHeaderJson(param, optionsDecodeHeader);
|
|
4747
4799
|
if (mapping) {
|
|
4748
|
-
|
|
4800
|
+
requestHeaders.set(Symbols__NS__old.MAPPING_CONFIG_HEADER_BODY_PARAMS, JSON.stringify(mapping));
|
|
4749
4801
|
}
|
|
4750
4802
|
bodyObject = param;
|
|
4751
4803
|
}
|
|
4804
|
+
//#endregion
|
|
4752
4805
|
}
|
|
4753
4806
|
});
|
|
4754
4807
|
if (typeof bodyObject === 'object' &&
|
|
4755
4808
|
ClassHelpers__NS__getName(bodyObject) !== 'FormData') {
|
|
4809
|
+
//#region handle circular objects in body params
|
|
4756
4810
|
let circuralFromItem = [];
|
|
4757
4811
|
bodyObject = JSON10.parse(JSON10.stringify(bodyObject, void 0, void 0, circs => {
|
|
4758
4812
|
circuralFromItem = circs;
|
|
4759
4813
|
}));
|
|
4760
|
-
|
|
4814
|
+
requestHeaders.set(Symbols__NS__old.CIRCURAL_OBJECTS_MAP_BODY, JSON10.stringify(circuralFromItem));
|
|
4815
|
+
//#endregion
|
|
4761
4816
|
}
|
|
4762
4817
|
if (typeof queryParams === 'object') {
|
|
4818
|
+
//#region handle circular objects in query params
|
|
4763
4819
|
let circuralFromQueryParams = [];
|
|
4764
4820
|
queryParams = JSON10.parse(JSON10.stringify(queryParams, void 0, void 0, circs => {
|
|
4765
4821
|
circuralFromQueryParams = circs;
|
|
4766
4822
|
}));
|
|
4767
|
-
|
|
4823
|
+
requestHeaders.set(Symbols__NS__old.CIRCURAL_OBJECTS_MAP_QUERY_PARAM, JSON10.stringify(circuralFromQueryParams));
|
|
4824
|
+
//#endregion
|
|
4768
4825
|
}
|
|
4769
4826
|
//#endregion
|
|
4770
4827
|
const httpResultObj = {
|
|
4771
4828
|
get received() {
|
|
4772
|
-
return rest
|
|
4829
|
+
return rest
|
|
4830
|
+
.model(pathPrams, { headers: requestHeaders })[method](bodyObject, [queryParams]);
|
|
4773
4831
|
},
|
|
4774
4832
|
request(axiosConfig) {
|
|
4775
4833
|
return rest
|
|
4776
|
-
.model(pathPrams)[method](bodyObject, [queryParams], axiosConfig);
|
|
4834
|
+
.model(pathPrams, { headers: requestHeaders })[method](bodyObject, [queryParams], axiosConfig);
|
|
4777
4835
|
},
|
|
4778
4836
|
};
|
|
4779
4837
|
return httpResultObj;
|
|
@@ -5168,10 +5226,6 @@ const singleTransform = (json) => {
|
|
|
5168
5226
|
};
|
|
5169
5227
|
//#endregion
|
|
5170
5228
|
class EntityProcess {
|
|
5171
|
-
//#region init
|
|
5172
|
-
static async init(result, response) {
|
|
5173
|
-
return await new EntityProcess(result, response).run();
|
|
5174
|
-
}
|
|
5175
5229
|
//#endregion
|
|
5176
5230
|
//#region constructor
|
|
5177
5231
|
constructor(
|
|
@@ -5245,11 +5299,15 @@ class EntityProcess {
|
|
|
5245
5299
|
].includes(className);
|
|
5246
5300
|
// console.log('doNothing', doNothing)
|
|
5247
5301
|
if (!doNothing) {
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5302
|
+
// TODO not needed ?
|
|
5303
|
+
// const cleaned = JSON10.cleaned(this.data, void 0, {
|
|
5304
|
+
// breadthWalk: true,
|
|
5305
|
+
// include,
|
|
5306
|
+
// });
|
|
5307
|
+
// decodeMappingForHeaderJson is handling nested objects ok
|
|
5308
|
+
this.entityMapping = decodeMappingForHeaderJson(this.data, {
|
|
5309
|
+
useFirstArrayItemClassNameForAllElements: !this.advancedManipulation,
|
|
5251
5310
|
});
|
|
5252
|
-
this.entityMapping = Mapping__NS__decode(cleaned, !this.advancedManipulation);
|
|
5253
5311
|
this.response.set(Symbols__NS__old.MAPPING_CONFIG_HEADER, JSON.stringify(this.entityMapping));
|
|
5254
5312
|
if (this.advancedManipulation) {
|
|
5255
5313
|
this.response.set(Symbols__NS__old.CIRCURAL_OBJECTS_MAP_BODY, JSON.stringify(this.circural));
|
|
@@ -5675,16 +5733,27 @@ function TaonEntity(options) {
|
|
|
5675
5733
|
return function (constructor) {
|
|
5676
5734
|
options = options || {};
|
|
5677
5735
|
options.uniqueKeyProp = options.uniqueKeyProp || 'id';
|
|
5736
|
+
if (!options.className) {
|
|
5737
|
+
const nameForClass = constructor?.name || 'AnyClass';
|
|
5738
|
+
throw `Please define 'classname' property inside decorator of class '${nameForClass}':
|
|
5739
|
+
|
|
5740
|
+
@TaonEntity({
|
|
5741
|
+
className: '${nameForClass}'
|
|
5742
|
+
})
|
|
5743
|
+
class ${constructor?.name} {
|
|
5744
|
+
//...
|
|
5745
|
+
|
|
5746
|
+
`;
|
|
5747
|
+
}
|
|
5678
5748
|
ClassHelpers__NS__setName(constructor, options?.className);
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
Mapping__NS__DefaultModelWithMapping(void 0, {})(constructor);
|
|
5749
|
+
DefaultMapping(options?.defaultModelMapping)(constructor);
|
|
5750
|
+
DefaultModel(options.defaultModelMapping)(constructor);
|
|
5682
5751
|
Reflect.defineMetadata(Symbols__NS__metadata.options.entity, options, constructor);
|
|
5683
5752
|
Reflect.defineMetadata(Symbols__NS__metadata.className, options?.className || constructor.name, constructor);
|
|
5684
5753
|
//#region @websql
|
|
5685
5754
|
Entity(options?.className)(constructor);
|
|
5686
5755
|
//#endregion
|
|
5687
|
-
|
|
5756
|
+
CLASS__NS__setName(constructor, options?.className); // TODO QUICK_FIX for ng2-rest
|
|
5688
5757
|
};
|
|
5689
5758
|
}
|
|
5690
5759
|
class TaonEntityOptions extends DecoratorAbstractOpt {
|
|
@@ -7793,9 +7862,9 @@ function getFromlyConfigFor(target, options = {}) {
|
|
|
7793
7862
|
if (level === maxLevel) {
|
|
7794
7863
|
return [];
|
|
7795
7864
|
}
|
|
7796
|
-
const mapping =
|
|
7865
|
+
const mapping = decodeMappingForHeaderJson(target);
|
|
7797
7866
|
// console.log('mapping', mapping)
|
|
7798
|
-
const fieldNames =
|
|
7867
|
+
const fieldNames = Object.keys(mapping);
|
|
7799
7868
|
const checkExclude = ___NS__isArray(keysPathesToExclude) && keysPathesToExclude.length > 0;
|
|
7800
7869
|
const checkInclude = ___NS__isArray(keysPathesToInclude) && keysPathesToInclude.length > 0;
|
|
7801
7870
|
if (checkExclude && checkInclude) {
|
|
@@ -7960,7 +8029,7 @@ function getFromlyConfigFor(target, options = {}) {
|
|
|
7960
8029
|
fields.push(inputToPush(key, 'datepicker', parentModel));
|
|
7961
8030
|
}
|
|
7962
8031
|
else {
|
|
7963
|
-
const targetChild =
|
|
8032
|
+
const targetChild = CLASS__NS__getBy(className);
|
|
7964
8033
|
if (targetChild) {
|
|
7965
8034
|
const ftype = findTypeForEntity(targetChild, isArray);
|
|
7966
8035
|
if (ftype) {
|
|
@@ -8195,5 +8264,5 @@ const TAON_FLATTEN_MAPPING = {
|
|
|
8195
8264
|
* Generated bundle index. Do not edit.
|
|
8196
8265
|
*/
|
|
8197
8266
|
|
|
8198
|
-
export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers__NS__asyncHandler, ClassHelpers__NS__ensureClassConfig, ClassHelpers__NS__ensureMethodConfig, ClassHelpers__NS__getClassConfig, ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getControllerConfigs, ClassHelpers__NS__getFullInternalName, ClassHelpers__NS__getMethodsNames, ClassHelpers__NS__getName, ClassHelpers__NS__getOrginalClass, ClassHelpers__NS__getUniqueKey, ClassHelpers__NS__hasParentClassWithName, ClassHelpers__NS__isContextClassObject, ClassHelpers__NS__setName, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models__NS__ClassType, Models__NS__ClassTypeKey, Models__NS__DatabaseConfig, Models__NS__DatabaseConfigTypeOrm, Models__NS__DatabasesFolder, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols__NS__REALTIME, Symbols__NS__classMethodsNames,
|
|
8267
|
+
export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers__NS__asyncHandler, ClassHelpers__NS__ensureClassConfig, ClassHelpers__NS__ensureMethodConfig, ClassHelpers__NS__getClassConfig, ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getControllerConfigs, ClassHelpers__NS__getFullInternalName, ClassHelpers__NS__getMethodsNames, ClassHelpers__NS__getName, ClassHelpers__NS__getOrginalClass, ClassHelpers__NS__getUniqueKey, ClassHelpers__NS__hasParentClassWithName, ClassHelpers__NS__isContextClassObject, ClassHelpers__NS__setName, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models__NS__ClassType, Models__NS__ClassTypeKey, Models__NS__DatabaseConfig, Models__NS__DatabaseConfigTypeOrm, Models__NS__DatabasesFolder, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols__NS__REALTIME, Symbols__NS__classMethodsNames, Symbols__NS__ctxInClassOrClassObj, Symbols__NS__fullClassNameStaticProperty, Symbols__NS__metadata, Symbols__NS__old, Symbols__NS__orignalClassClonesObj, TAON_CONTEXT, TAON_FLATTEN_MAPPING, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers__NS__defaultType, TaonHelpers__NS__fillUpTo, TaonHelpers__NS__firstStringOrElemFromArray, TaonHelpers__NS__getExpressPath, TaonHelpers__NS__ipcKeyNameRequest, TaonHelpers__NS__ipcKeyNameResponse, TaonHelpers__NS__isGoodPath, TaonHelpers__NS__isPlainFileOrFolder, TaonHelpers__NS__parseJSONwithStringJSONs, TaonHelpers__NS__tryTransformParam, TaonHelpers__NS__websqlMocks, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Taon__NS__createContext, Taon__NS__createContextTemplate, Taon__NS__error, Taon__NS__getResponseValue, Taon__NS__init, Taon__NS__inject, Taon__NS__isBrowser, Taon__NS__isElectron, Taon__NS__isNode, Taon__NS__isWebSQL, Taon__NS__removeLoader, Validators__NS__checkIfMethodsWithReponseTYpeAlowed, Validators__NS__classNameVlidation, Validators__NS__preventUndefinedModel, Validators__NS__validateClassFunctions, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
|
|
8199
8268
|
//# sourceMappingURL=taon-websql.mjs.map
|