taon 21.0.39 → 21.0.42

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.
Files changed (87) hide show
  1. package/browser/fesm2022/taon-browser.mjs +14 -15
  2. package/browser/fesm2022/taon-browser.mjs.map +1 -1
  3. package/browser/package.json +1 -1
  4. package/browser-prod/fesm2022/taon-browser.mjs +167 -168
  5. package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
  6. package/browser-prod/package.json +1 -1
  7. package/browser-prod.re-export.json +1 -0
  8. package/lib/build-info._auto-generated_.d.ts +1 -1
  9. package/lib/build-info._auto-generated_.js +1 -1
  10. package/lib/context-db-migrations.js +1 -1
  11. package/lib/context-db-migrations.js.map +1 -1
  12. package/lib/endpoint-context.js +11 -11
  13. package/lib/endpoint-context.js.map +1 -1
  14. package/lib/index.js +5 -5
  15. package/lib/index.js.map +1 -1
  16. package/lib/package.json +1 -1
  17. package/lib/realtime/realtime-core.js +2 -2
  18. package/lib/realtime/realtime-core.js.map +1 -1
  19. package/lib/realtime/realtime-server.js +2 -2
  20. package/lib/realtime/realtime-server.js.map +1 -1
  21. package/lib/ui/index.js +2 -2
  22. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  23. package/lib-prod/base-classes/base-class.js +3 -3
  24. package/lib-prod/base-classes/base-class.js.map +1 -1
  25. package/lib-prod/base-classes/base-controller.js.map +1 -1
  26. package/lib-prod/base-classes/base-crud-controller.js +5 -5
  27. package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
  28. package/lib-prod/base-classes/base-migration.js +1 -1
  29. package/lib-prod/base-classes/base-migration.js.map +1 -1
  30. package/lib-prod/base-classes/base-repository.js +7 -7
  31. package/lib-prod/base-classes/base-repository.js.map +1 -1
  32. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  33. package/lib-prod/build-info._auto-generated_.js +1 -1
  34. package/lib-prod/context-db-migrations.js +1 -1
  35. package/lib-prod/context-db-migrations.js.map +1 -1
  36. package/lib-prod/create-context.js +4 -4
  37. package/lib-prod/create-context.js.map +1 -1
  38. package/lib-prod/decorators/classes/entity-decorator.js +1 -1
  39. package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
  40. package/lib-prod/decorators/http/http-methods-decorators.js +1 -1
  41. package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
  42. package/lib-prod/endpoint-context.js +75 -75
  43. package/lib-prod/endpoint-context.js.map +1 -1
  44. package/lib-prod/entity-process.js +23 -23
  45. package/lib-prod/entity-process.js.map +1 -1
  46. package/lib-prod/formly/fromly.js +20 -20
  47. package/lib-prod/formly/fromly.js.map +1 -1
  48. package/lib-prod/formly/type-from-entity.js +5 -5
  49. package/lib-prod/formly/type-from-entity.js.map +1 -1
  50. package/lib-prod/helpers/class-helpers.js +16 -16
  51. package/lib-prod/helpers/class-helpers.js.map +1 -1
  52. package/lib-prod/helpers/clone-obj.js +3 -3
  53. package/lib-prod/helpers/clone-obj.js.map +1 -1
  54. package/lib-prod/helpers/taon-helpers.js +4 -4
  55. package/lib-prod/helpers/taon-helpers.js.map +1 -1
  56. package/lib-prod/index.js +5 -5
  57. package/lib-prod/index.js.map +1 -1
  58. package/lib-prod/models.js +2 -2
  59. package/lib-prod/models.js.map +1 -1
  60. package/lib-prod/orm/columns.js +6 -6
  61. package/lib-prod/orm/columns.js.map +1 -1
  62. package/lib-prod/package.json +1 -1
  63. package/lib-prod/realtime/realtime-client.js +6 -6
  64. package/lib-prod/realtime/realtime-client.js.map +1 -1
  65. package/lib-prod/realtime/realtime-core.js +2 -2
  66. package/lib-prod/realtime/realtime-core.js.map +1 -1
  67. package/lib-prod/realtime/realtime-server.js +6 -6
  68. package/lib-prod/realtime/realtime-server.js.map +1 -1
  69. package/lib-prod/realtime/realtime-subs-manager.js +2 -2
  70. package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
  71. package/lib-prod/symbols.js +3 -3
  72. package/lib-prod/symbols.js.map +1 -1
  73. package/lib-prod/ui/index.d.ts +1 -1
  74. package/lib-prod/ui/index.js +2 -2
  75. package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
  76. package/lib-prod/ui/taon-admin-mode-configuration/index.js +2 -2
  77. package/lib-prod/validators.js +7 -7
  78. package/lib-prod/validators.js.map +1 -1
  79. package/lib-prod.re-export.json +1 -0
  80. package/package.json +3 -2
  81. package/websql/fesm2022/taon-websql.mjs +20 -21
  82. package/websql/fesm2022/taon-websql.mjs.map +1 -1
  83. package/websql/package.json +1 -1
  84. package/websql-prod/fesm2022/taon-websql.mjs +197 -198
  85. package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
  86. package/websql-prod/package.json +1 -1
  87. package/websql-prod.re-export.json +1 -0
@@ -1,6 +1,5 @@
1
1
  import 'reflect-metadata';
2
- import * as coreHelpers from 'tnp-core/websql-prod';
3
- import { _, Utils__NS__uniqArray, UtilsMigrations__NS__isValidTimestamp, Helpers, UtilsMigrations__NS__getTimestampFromClassName, UtilsOs__NS__isRunningInDocker, UtilsOs__NS__isElectron, crossPlatformPath, config, CoreModels__NS__SPECIAL_APP_READY_MESSAGE, UtilsOs__NS__isRunningInCliMode, UtilsTerminal__NS__waitMilliseconds, CoreModels__NS__TaonHttpErrorCustomProp } from 'tnp-core/websql-prod';
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';
4
3
  import axios from 'axios';
5
4
  import { JSON10 } from 'json10/websql-prod';
6
5
  import { walk } from 'lodash-walk-object/websql-prod';
@@ -104,11 +103,11 @@ class Models__NS__DatabaseConfigTypeOrm {
104
103
  //#region models / database config
105
104
  class Models__NS__DatabaseConfig extends Models__NS__DatabaseConfigTypeOrm {
106
105
  static from(databasePartialConfig) {
107
- return _.merge(new Models__NS__DatabaseConfig(), databasePartialConfig);
106
+ return ___NS__merge(new Models__NS__DatabaseConfig(), databasePartialConfig);
108
107
  }
109
108
  get databaseConfigTypeORM() {
110
109
  //#region @websqlFunc
111
- const result = _.cloneDeep(this);
110
+ const result = ___NS__cloneDeep(this);
112
111
  if (result.recreateMode) {
113
112
  if (result.recreateMode === 'DROP_DB+MIGRATIONS') {
114
113
  result.synchronize = true;
@@ -188,7 +187,7 @@ class Realtime {
188
187
  // className: string,
189
188
  // propertyName: string,
190
189
  // ) {
191
- // return `${contextName}:room${_.camelCase(className)}${propertyName}`.toLowerCase();
190
+ // return `${contextName}:room${___NS__camelCase(className)}${propertyName}`.toLowerCase();
192
191
  // }
193
192
  //#region custom events in rooms
194
193
  ROOM_NAME_CUSTOM(contextName, customEvent) {
@@ -203,7 +202,7 @@ class Realtime {
203
202
  //#endregion
204
203
  //#region entity events
205
204
  ROOM_NAME_UPDATE_ENTITY(contextName, className, entityId) {
206
- return `${contextName}:room${_.camelCase(className)}${entityId}`.toLowerCase();
205
+ return `${contextName}:room${___NS__camelCase(className)}${entityId}`.toLowerCase();
207
206
  }
208
207
  ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName) {
209
208
  return `${contextName}:${this.KEYroomSubscribe}EntityEvents`;
@@ -214,7 +213,7 @@ class Realtime {
214
213
  //#endregion
215
214
  //#region entity property events
216
215
  ROOM_NAME_UPDATE_ENTITY_PROPERTY(contextName, className, property, entityId) {
217
- return `${contextName}:room${_.camelCase(className)}${_.camelCase(property)}${entityId}`.toLowerCase();
216
+ return `${contextName}:room${___NS__camelCase(className)}${___NS__camelCase(property)}${entityId}`.toLowerCase();
218
217
  }
219
218
  ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName) {
220
219
  return `${contextName}:${this.KEYroomSubscribe}EntityPropertyEvents`;
@@ -272,7 +271,7 @@ const Symbols__NS__old = {
272
271
  const Validators__NS__classNameVlidation = (className, target) => {
273
272
  setTimeout(() => {
274
273
  // console.log(`check after timeout ${className} , production mode: ${FrameworkContext.isProductionMode}`)
275
- if (_.isUndefined(className)) {
274
+ if (___NS__isUndefined(className)) {
276
275
  throw `[Taon]
277
276
  Please provide "className" property for each Controller and Entity:
278
277
 
@@ -292,7 +291,7 @@ const Validators__NS__classNameVlidation = (className, target) => {
292
291
  `;
293
292
  }
294
293
  });
295
- return _.isUndefined(className) ? target.name : className;
294
+ return ___NS__isUndefined(className) ? target.name : className;
296
295
  };
297
296
  //#endregion
298
297
  //#region validate method config
@@ -320,8 +319,8 @@ const Validators__NS__checkIfMethodsWithReponseTYpeAlowed = (methods, current) =
320
319
  //#region validate class functions
321
320
  // TODO
322
321
  const Validators__NS__validateClassFunctions = (controllers, entities, proviers, repositories) => {
323
- if (_.isArray(controllers) &&
324
- controllers.filter(f => !_.isFunction(f)).length > 0) {
322
+ if (___NS__isArray(controllers) &&
323
+ controllers.filter(f => !___NS__isFunction(f)).length > 0) {
325
324
  console.error('controllers', controllers);
326
325
  throw `
327
326
 
@@ -329,8 +328,8 @@ const Validators__NS__validateClassFunctions = (controllers, entities, proviers,
329
328
 
330
329
  `;
331
330
  }
332
- if (_.isArray(entities) &&
333
- entities.filter(f => !_.isFunction(f)).length > 0) {
331
+ if (___NS__isArray(entities) &&
332
+ entities.filter(f => !___NS__isFunction(f)).length > 0) {
334
333
  console.error('entites', entities);
335
334
  throw `
336
335
 
@@ -341,7 +340,7 @@ const Validators__NS__validateClassFunctions = (controllers, entities, proviers,
341
340
  };
342
341
  //#endregion
343
342
  const Validators__NS__preventUndefinedModel = (model, id) => {
344
- if (_.isUndefined(model)) {
343
+ if (___NS__isUndefined(model)) {
345
344
  throw `Bad update by id, config, id: ${id}`;
346
345
  }
347
346
  };
@@ -356,7 +355,7 @@ const Validators__NS__preventUndefinedModel = (model, id) => {
356
355
  * TODO - repalce in every place when getting class fn from object
357
356
  */
358
357
  const ClassHelpers__NS__getClassFnFromObject = (json) => {
359
- if (_.isUndefined(json) || _.isNull(json)) {
358
+ if (___NS__isUndefined(json) || ___NS__isNull(json)) {
360
359
  return;
361
360
  }
362
361
  if (json.constructor) {
@@ -381,7 +380,7 @@ const ClassHelpers__NS__getName = (classFnOrObject) => {
381
380
  return ((classFnOrObject[Symbols__NS__classNameStaticProperty]
382
381
  ? classFnOrObject[Symbols__NS__classNameStaticProperty]
383
382
  : classFnOrObject?.constructor[Symbols__NS__classNameStaticProperty]) ||
384
- (_.isFunction(classFnOrObject) ? CLASS.getName(classFnOrObject) : void 0));
383
+ (___NS__isFunction(classFnOrObject) ? CLASS.getName(classFnOrObject) : void 0));
385
384
  };
386
385
  //#endregion
387
386
  const ClassHelpers__NS__getOrginalClass = (classFnOrObject) => {
@@ -405,7 +404,7 @@ const ClassHelpers__NS__getFullInternalName = (classFnOrObject) => {
405
404
  //#endregion
406
405
  //#region get unique key
407
406
  const ClassHelpers__NS__getUniqueKey = (classFnOrObject) => {
408
- const classFn = _.isFunction(classFnOrObject)
407
+ const classFn = ___NS__isFunction(classFnOrObject)
409
408
  ? classFnOrObject
410
409
  : classFnOrObject.constructor;
411
410
  const config = Reflect.getMetadata(Symbols__NS__metadata.options.entity, classFn);
@@ -414,18 +413,18 @@ const ClassHelpers__NS__getUniqueKey = (classFnOrObject) => {
414
413
  //#endregion
415
414
  //#region is class object
416
415
  const ClassHelpers__NS__isContextClassObject = (obj) => {
417
- if (!_.isObject(obj) ||
418
- _.isArray(obj) ||
419
- _.isRegExp(obj) ||
420
- _.isBuffer(obj) ||
421
- _.isArrayBuffer(obj)) {
416
+ if (!___NS__isObject(obj) ||
417
+ ___NS__isArray(obj) ||
418
+ ___NS__isRegExp(obj) ||
419
+ ___NS__isBuffer(obj) ||
420
+ ___NS__isArrayBuffer(obj)) {
422
421
  return false;
423
422
  }
424
- if (_.isDate(obj)) {
423
+ if (___NS__isDate(obj)) {
425
424
  return true;
426
425
  }
427
426
  const className = ClassHelpers__NS__getName(obj);
428
- return _.isString(className) && className !== 'Object';
427
+ return ___NS__isString(className) && className !== 'Object';
429
428
  };
430
429
  //#endregion
431
430
  //#region get name
@@ -442,9 +441,9 @@ const ClassHelpers__NS__hasParentClassWithName = (target, className, targets = [
442
441
  }
443
442
  targets.push(target);
444
443
  let targetProto = Object.getPrototypeOf(target);
445
- if (_.isFunction(targetProto) &&
444
+ if (___NS__isFunction(targetProto) &&
446
445
  ClassHelpers__NS__getName(targetProto) === className) {
447
- // console.log(`true "${_.first(targets).name}" for ${targets.map(d => d.name).join(',')}`)
446
+ // console.log(`true "${___NS__first(targets).name}" for ${targets.map(d => d.name).join(',')}`)
448
447
  return true;
449
448
  }
450
449
  return ClassHelpers__NS__hasParentClassWithName(targetProto, className, targets);
@@ -484,7 +483,7 @@ const ClassHelpers__NS__getMethodsNames = (classOrClassInstance, allMethodsNames
484
483
  if (!classOrClassInstance) {
485
484
  return Utils__NS__uniqArray(allMethodsNames);
486
485
  }
487
- const isClassFunction = _.isFunction(classOrClassInstance);
486
+ const isClassFunction = ___NS__isFunction(classOrClassInstance);
488
487
  const classFun = isClassFunction
489
488
  ? classOrClassInstance
490
489
  : Object.getPrototypeOf(classOrClassInstance);
@@ -492,7 +491,7 @@ const ClassHelpers__NS__getMethodsNames = (classOrClassInstance, allMethodsNames
492
491
  ? classOrClassInstance?.prototype
493
492
  : classOrClassInstance;
494
493
  const prototypeObj = Object.getPrototypeOf(objectToCheck || {});
495
- const properties = _.uniq([
494
+ const properties = ___NS__uniq([
496
495
  ...Object.getOwnPropertyNames(objectToCheck || {}),
497
496
  ...Object.getOwnPropertyNames(prototypeObj || {}),
498
497
  ...Object.keys(objectToCheck || {}),
@@ -511,13 +510,13 @@ const ClassHelpers__NS__getMethodsNames = (classOrClassInstance, allMethodsNames
511
510
  //#endregion
512
511
  //#region get controller configs
513
512
  const ClassHelpers__NS__getControllerConfigs = (target, configs = [], callerTarget) => {
514
- if (!_.isFunction(target)) {
513
+ if (!___NS__isFunction(target)) {
515
514
  throw `[typescript-class-helper][getControllerConfigs] Cannot get class config from: ${target}`;
516
515
  }
517
516
  let config;
518
517
  const parentClass = Object.getPrototypeOf(target);
519
518
  const parentName = parentClass ? ClassHelpers__NS__getName(parentClass) : void 0;
520
- const isValidParent = _.isFunction(parentClass) && parentName !== '';
519
+ const isValidParent = ___NS__isFunction(parentClass) && parentName !== '';
521
520
  config = controllerConfigFrom(ClassHelpers__NS__getClassConfig(target));
522
521
  configs.push(config);
523
522
  return isValidParent
@@ -681,7 +680,7 @@ class ContextDbMigrations {
681
680
  return;
682
681
  }
683
682
  if (!UtilsMigrations__NS__isValidTimestamp(timestamp)) {
684
- Helpers.throw(`Invalid timestamp provided for migration revert: ${timestamp}`);
683
+ Helpers__NS__throwError(`Invalid timestamp provided for migration revert: ${timestamp}`);
685
684
  }
686
685
  // Get all migration class functions and reverse the order
687
686
  const migrationsClassFns = this.ctx
@@ -968,7 +967,7 @@ const getResponseValue = (response, options) => {
968
967
  //namespace TaonHelpers
969
968
  //#region fillUpTo string
970
969
  const TaonHelpers__NS__fillUpTo = (s, nCharacters) => {
971
- return _.times(nCharacters, n => {
970
+ return ___NS__times(nCharacters, n => {
972
971
  if (s.charAt(n)) {
973
972
  return s.charAt(n);
974
973
  }
@@ -983,7 +982,7 @@ const TaonHelpers__NS__isGoodPath = (p) => {
983
982
  //#endregion
984
983
  const TaonHelpers__NS__firstStringOrElemFromArray = (stringOrArrayOfString) => {
985
984
  if (Array.isArray(stringOrArrayOfString)) {
986
- return _.first(stringOrArrayOfString);
985
+ return ___NS__first(stringOrArrayOfString);
987
986
  }
988
987
  return stringOrArrayOfString;
989
988
  };
@@ -1033,7 +1032,7 @@ const TaonHelpers__NS__defaultType = value => {
1033
1032
  //#region parse json with string jsons
1034
1033
  const TaonHelpers__NS__parseJSONwithStringJSONs = (object, waring = false) => {
1035
1034
  // console.log('checking object', object)
1036
- if (!_.isObject(object)) {
1035
+ if (!___NS__isObject(object)) {
1037
1036
  if (waring) {
1038
1037
  console.error(`
1039
1038
  parseJSONwithStringJSONs(...)
@@ -1042,7 +1041,7 @@ const TaonHelpers__NS__parseJSONwithStringJSONs = (object, waring = false) => {
1042
1041
  }
1043
1042
  return object;
1044
1043
  }
1045
- let res = _.cloneDeep(object);
1044
+ let res = ___NS__cloneDeep(object);
1046
1045
  Object.keys(res).forEach(key => {
1047
1046
  let isJson = false;
1048
1047
  try {
@@ -1139,7 +1138,7 @@ class RealtimeSubsManager {
1139
1138
  realtime.emit(subscribeEvent, this.options.roomName);
1140
1139
  }
1141
1140
  else {
1142
- if (_.isString(this.options.property)) {
1141
+ if (___NS__isString(this.options.property)) {
1143
1142
  const subscribeEvent = Symbols__NS__REALTIME.ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(this.options.core.ctx.contextName);
1144
1143
  // this means: send to current client entity property events updates
1145
1144
  realtime.emit(subscribeEvent, this.options.roomName);
@@ -1176,7 +1175,7 @@ class RealtimeSubsManager {
1176
1175
  realtime.emit(Symbols__NS__REALTIME.ROOM_UNSUBSCRIBE_CUSTOM(this.options.core.ctx.contextName), roomName);
1177
1176
  }
1178
1177
  else {
1179
- if (_.isString(property)) {
1178
+ if (___NS__isString(property)) {
1180
1179
  realtime.emit(Symbols__NS__REALTIME.ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(this.options.core.ctx.contextName), roomName);
1181
1180
  }
1182
1181
  else {
@@ -1216,7 +1215,7 @@ class RealtimeClient {
1216
1215
  this.core = core;
1217
1216
  if (!core.ctx.disabledRealtime) {
1218
1217
  // this.core.ctx.logRealtime &&
1219
- // Helpers.info(`
1218
+ // Helpers__NS__info(`
1220
1219
  // [ctx=${this.core.ctx.contextName}] init RealtimeClient (type: ${this.core.ctx.contextType})
1221
1220
  // `);
1222
1221
  this.init();
@@ -1234,14 +1233,14 @@ class RealtimeClient {
1234
1233
  this.core.ctx.config.frontendHost !== '' &&
1235
1234
  this.core.ctx.isRunningInsideDocker) {
1236
1235
  this.core.ctx.logRealtime &&
1237
- Helpers.logInfo(`[${this.core.ctx.contextName}] USING FRONTEND HOST` +
1236
+ Helpers__NS__logInfo(`[${this.core.ctx.contextName}] USING FRONTEND HOST` +
1238
1237
  ` ${this.core.ctx.config.frontendHost} FOR REALTIME`);
1239
1238
  nspPath.global = new URL(`${this.core.ctx.frontendHostUri.origin}${nspPath.global.pathname}`);
1240
1239
  nspPath.realtime = new URL(`${this.core.ctx.frontendHostUri.origin}${nspPath.realtime.pathname}`);
1241
1240
  }
1242
1241
  else {
1243
1242
  this.core.ctx.logRealtime &&
1244
- Helpers.logInfo(`[${this.core.ctx.contextName}] Not using frontend host for realtime`);
1243
+ Helpers__NS__logInfo(`[${this.core.ctx.contextName}] Not using frontend host for realtime`);
1245
1244
  }
1246
1245
  this.core.ctx.logRealtime &&
1247
1246
  console.info('[CLIENT] NAMESPACE GLOBAL ', nspPath.global.href + ` host: ${this.core.ctx.host}`);
@@ -1293,7 +1292,7 @@ class RealtimeClient {
1293
1292
  */
1294
1293
  listenChangesEntity(entityClassFnOrObj, options) {
1295
1294
  options = options || {};
1296
- if (_.isObject(entityClassFnOrObj)) {
1295
+ if (___NS__isObject(entityClassFnOrObj)) {
1297
1296
  const orgObj = entityClassFnOrObj;
1298
1297
  entityClassFnOrObj =
1299
1298
  ClassHelpers__NS__getClassFnFromObject(entityClassFnOrObj);
@@ -1305,7 +1304,7 @@ class RealtimeClient {
1305
1304
  //#region parameters validation
1306
1305
  const { property, customEvent } = options;
1307
1306
  const className = !customEvent && ClassHelpers__NS__getName(entityClassFnOrObj);
1308
- if (_.isString(property)) {
1307
+ if (___NS__isString(property)) {
1309
1308
  if (property.trim() === '') {
1310
1309
  throw new Error(`[Taon][listenChangesEntity.. incorrect property '' for ${className}`);
1311
1310
  }
@@ -1331,7 +1330,7 @@ to use socket realtime connection;
1331
1330
  roomName = Symbols__NS__REALTIME.ROOM_NAME_CUSTOM(this.core.ctx.contextName, customEvent);
1332
1331
  }
1333
1332
  else {
1334
- roomName = _.isString(property)
1333
+ roomName = ___NS__isString(property)
1335
1334
  ? Symbols__NS__REALTIME.ROOM_NAME_UPDATE_ENTITY_PROPERTY(this.core.ctx.contextName, className, property, options.idOrUniqValue)
1336
1335
  : Symbols__NS__REALTIME.ROOM_NAME_UPDATE_ENTITY(this.core.ctx.contextName, className, options.idOrUniqValue);
1337
1336
  }
@@ -1445,7 +1444,7 @@ class RealtimeServer {
1445
1444
  // console.log('frontendHost', this.core.ctx.config.frontendHost);
1446
1445
  // console.log('cors', cors);
1447
1446
  //#region prepare global BE socket
1448
- this.core.connectSocketBE = this.core.strategy.ioServer(Helpers.isWebSQL ? this.core.ctx.uriOrigin : this.core.ctx.serverTcpUdp, {
1447
+ this.core.connectSocketBE = this.core.strategy.ioServer(UtilsOs__NS__isWebSQL ? this.core.ctx.uriOrigin : this.core.ctx.serverTcpUdp, {
1449
1448
  path: nspPathGlobal.pathname,
1450
1449
  cors,
1451
1450
  }, // @ts-ignore
@@ -1460,7 +1459,7 @@ class RealtimeServer {
1460
1459
  });
1461
1460
  //#endregion
1462
1461
  //#region prepare realtime BE socket
1463
- this.core.socketBE = this.core.strategy.ioServer(Helpers.isWebSQL || Helpers.isElectron
1462
+ this.core.socketBE = this.core.strategy.ioServer(UtilsOs__NS__isWebSQL || UtilsOs__NS__isElectron
1464
1463
  ? this.core.ctx.uriOrigin
1465
1464
  : this.core.ctx.serverTcpUdp, {
1466
1465
  path: nspPathRealtime.pathname,
@@ -1530,7 +1529,7 @@ class RealtimeServer {
1530
1529
  }
1531
1530
  else {
1532
1531
  let entityFn = entityObjOrClass;
1533
- const entityIsObject = !_.isFunction(entityObjOrClass) && _.isObject(entityObjOrClass);
1532
+ const entityIsObject = !___NS__isFunction(entityObjOrClass) && ___NS__isObject(entityObjOrClass);
1534
1533
  if (entityIsObject) {
1535
1534
  entityFn = ClassHelpers__NS__getClassFnFromObject(entityObjOrClass);
1536
1535
  }
@@ -1539,10 +1538,10 @@ class RealtimeServer {
1539
1538
  valueOfUniqueProperty = entityObjOrClass[uniqueKey];
1540
1539
  }
1541
1540
  if (!valueOfUniqueProperty) {
1542
- Helpers.error(`[Taon][Realtime] Entity without iD ! ${ClassHelpers__NS__getName(entityFn)} `, true, true);
1541
+ Helpers__NS__error(`[Taon][Realtime] Entity without iD ! ${ClassHelpers__NS__getName(entityFn)} `, true, true);
1543
1542
  return;
1544
1543
  }
1545
- roomName = _.isString(property)
1544
+ roomName = ___NS__isString(property)
1546
1545
  ? Symbols__NS__REALTIME.ROOM_NAME_UPDATE_ENTITY_PROPERTY(this.core.ctx.contextName, ClassHelpers__NS__getName(entityFn), property, valueOfUniqueProperty)
1547
1546
  : Symbols__NS__REALTIME.ROOM_NAME_UPDATE_ENTITY(this.core.ctx.contextName, ClassHelpers__NS__getName(entityFn), valueOfUniqueProperty);
1548
1547
  }
@@ -1584,7 +1583,7 @@ class RealtimeServer {
1584
1583
  console.warn(`[Taon][TriggerEntityPropertyChanges][property=${property}] Entity "${className}' is not realtime`);
1585
1584
  return;
1586
1585
  }
1587
- if (_.isArray(property)) {
1586
+ if (___NS__isArray(property)) {
1588
1587
  property.forEach(propertyFromArr => {
1589
1588
  this.triggerChanges(entityObjOrClass, propertyFromArr, idToTrigger);
1590
1589
  });
@@ -2259,7 +2258,7 @@ class RealtimeCore {
2259
2258
  // console.log(`
2260
2259
  // [ctx=${this.ctx.contextName}] realtime strategy: ${this.strategy}, context type: ${this.ctx.contextType}
2261
2260
  // `);
2262
- if (Helpers.isWebSQL) {
2261
+ if (UtilsOs__NS__isWebSQL) {
2263
2262
  this.server = new RealtimeServer(this);
2264
2263
  // console.log('DONE INITING SERVER');
2265
2264
  this.client = new RealtimeClient(this);
@@ -2297,7 +2296,7 @@ class RealtimeCore {
2297
2296
  nsp = nsp === '/' ? '' : nsp;
2298
2297
  const contextNameForCommunication = this.ctx.contextNameForCommunication;
2299
2298
  let prefix = `${apiPrefix}/${contextNameForCommunication}/udp`;
2300
- if (Helpers.isElectron) {
2299
+ if (UtilsOs__NS__isElectron) {
2301
2300
  prefix = ``;
2302
2301
  }
2303
2302
  const href = `${this.ctx.uriOrigin}${this.ctx.uriPathnameOrNothingIfRoot}` +
@@ -2375,37 +2374,37 @@ class EndpointContext {
2375
2374
  //#endregion
2376
2375
  //#region fields / logs
2377
2376
  get logHttp() {
2378
- if (_.isObject(this.config?.logs)) {
2377
+ if (___NS__isObject(this.config?.logs)) {
2379
2378
  return !!this.config.logs.http;
2380
2379
  }
2381
2380
  return this.config?.logs === true;
2382
2381
  }
2383
2382
  get logRealtime() {
2384
- if (_.isObject(this.config?.logs)) {
2383
+ if (___NS__isObject(this.config?.logs)) {
2385
2384
  return !!this.config.logs.realtime;
2386
2385
  }
2387
2386
  return this.config?.logs === true;
2388
2387
  }
2389
2388
  get logFramework() {
2390
- if (_.isObject(this.config?.logs)) {
2389
+ if (___NS__isObject(this.config?.logs)) {
2391
2390
  return !!this.config.logs.framework;
2392
2391
  }
2393
2392
  return this.config?.logs === true;
2394
2393
  }
2395
2394
  get logRoutes() {
2396
- if (_.isObject(this.config?.logs)) {
2395
+ if (___NS__isObject(this.config?.logs)) {
2397
2396
  return !!this.config.logs.routes;
2398
2397
  }
2399
2398
  return this.config?.logs === true;
2400
2399
  }
2401
2400
  get logDb() {
2402
- if (_.isObject(this.config?.logs)) {
2401
+ if (___NS__isObject(this.config?.logs)) {
2403
2402
  return !!this.config.logs.db;
2404
2403
  }
2405
2404
  return this.config?.logs === true;
2406
2405
  }
2407
2406
  get logMigrations() {
2408
- if (_.isObject(this.config?.logs)) {
2407
+ if (___NS__isObject(this.config?.logs)) {
2409
2408
  return !!this.config.logs.migrations;
2410
2409
  }
2411
2410
  return this.config?.logs === true;
@@ -2544,10 +2543,10 @@ class EndpointContext {
2544
2543
  //#region gather all instances for all contexts
2545
2544
  // TODO this is not needed anymore - for typeorm I use normal entities
2546
2545
  // this thinng belowe is nice for debugging purpose
2547
- // if (_.isUndefined(cloneClassFunction[Symbols__NS__orignalClassClonesObj])) {
2546
+ // if (___NS__isUndefined(cloneClassFunction[Symbols__NS__orignalClassClonesObj])) {
2548
2547
  // cloneClassFunction[Symbols__NS__orignalClassClonesObj] = {};
2549
2548
  // }
2550
- // if (_.isUndefined(TaonBaseClass[Symbols__NS__orignalClassClonesObj])) {
2549
+ // if (___NS__isUndefined(TaonBaseClass[Symbols__NS__orignalClassClonesObj])) {
2551
2550
  // TaonBaseClass[Symbols__NS__orignalClassClonesObj] = {};
2552
2551
  // }
2553
2552
  // const all = {
@@ -2569,7 +2568,7 @@ class EndpointContext {
2569
2568
  for (const key of Object.keys(classesInput || {})) {
2570
2569
  const TaonBaseClass = classesInput[key];
2571
2570
  if (!TaonBaseClass) {
2572
- Helpers.error(`Class ${key} is not defined in context ${ctx.contextName}
2571
+ Helpers__NS__error(`Class ${key} is not defined in context ${ctx.contextName}
2573
2572
 
2574
2573
  Please check if you have correct import in context file
2575
2574
 
@@ -2606,7 +2605,7 @@ class EndpointContext {
2606
2605
  // @ts-ignore
2607
2606
  this.onlyMigrationRevertToTimestamp = onlyMigrationRevertToTimestamp;
2608
2607
  this.config = this.configFn({});
2609
- if (_.isObject(this.config.database)) {
2608
+ if (___NS__isObject(this.config.database)) {
2610
2609
  this.config.database = Models__NS__DatabaseConfig.from(this.config.database).databaseConfigTypeORM;
2611
2610
  }
2612
2611
  this.config.host = this.host === null ? void 0 : this.host;
@@ -2621,15 +2620,15 @@ class EndpointContext {
2621
2620
  if (this.config.host &&
2622
2621
  !this.config.host.startsWith('http://') &&
2623
2622
  !this.config.host.startsWith('https://')) {
2624
- Helpers.throw(`[taon-config] Your${this.host ? ' remote' : ''} 'host' must start with http:// or https://`);
2623
+ Helpers__NS__throwError(`[taon-config] Your${this.host ? ' remote' : ''} 'host' must start with http:// or https://`);
2625
2624
  }
2626
- if (_.isUndefined(this.config.useIpcWhenElectron)) {
2625
+ if (___NS__isUndefined(this.config.useIpcWhenElectron)) {
2627
2626
  this.config.useIpcWhenElectron = true;
2628
2627
  }
2629
2628
  // console.log(`config for ${this.contextName}`, this.config);
2630
2629
  //#region resolve if skipping writing server routes
2631
2630
  //@ts-expect-error overriding readonly
2632
- this.skipWritingServerRoutes = _.isBoolean(this.config.skipWritingServerRoutes)
2631
+ this.skipWritingServerRoutes = ___NS__isBoolean(this.config.skipWritingServerRoutes)
2633
2632
  ? this.config.skipWritingServerRoutes
2634
2633
  : false;
2635
2634
  //#endregion
@@ -2645,10 +2644,10 @@ class EndpointContext {
2645
2644
  }
2646
2645
  // console.log(`
2647
2646
  // useIpcWhenElectron: ${this.config.useIpcWhenElectron}
2648
- // Helpers.isElectron: ${Helpers.isElectron}
2647
+ // UtilsOs__NS__isElectron: ${UtilsOs__NS__isElectron}
2649
2648
  // `)
2650
- if (this.config.useIpcWhenElectron && Helpers.isElectron) {
2651
- if (Helpers.isWebSQL) {
2649
+ if (this.config.useIpcWhenElectron && UtilsOs__NS__isElectron) {
2650
+ if (UtilsOs__NS__isWebSQL) {
2652
2651
  this.mode = 'backend-frontend(websql-electron)';
2653
2652
  }
2654
2653
  else {
@@ -2663,7 +2662,7 @@ class EndpointContext {
2663
2662
  if (!this.mode && !this.config.abstract) {
2664
2663
  const errMsg = `You need to provide host property or ` +
2665
2664
  `useIpcWhenElectron or mark it as abstract`;
2666
- Helpers.error(`[taon][Context=${this.contextName}]: ${errMsg}`, false, true);
2665
+ Helpers__NS__error(`[taon][Context=${this.contextName}]: ${errMsg}`, false, true);
2667
2666
  /* */
2668
2667
  /* */
2669
2668
  }
@@ -2678,7 +2677,7 @@ class EndpointContext {
2678
2677
  `);
2679
2678
  this.databaseConfig = this.getAutoGeneratedConfig();
2680
2679
  }
2681
- else if (_.isObject(this.config.database)) {
2680
+ else if (___NS__isObject(this.config.database)) {
2682
2681
  this.logFramework &&
2683
2682
  console.log(`
2684
2683
 
@@ -2687,13 +2686,13 @@ class EndpointContext {
2687
2686
  `);
2688
2687
  this.databaseConfig = this.getAutoGeneratedConfig();
2689
2688
  walk.Object(this.config.database, (value, lodashPath) => {
2690
- if (_.isNil(value) || _.isFunction(value) || _.isObject(value)) {
2689
+ if (___NS__isNil(value) || ___NS__isFunction(value) || ___NS__isObject(value)) {
2691
2690
  // skipping
2692
2691
  }
2693
2692
  else {
2694
2693
  this.logFramework &&
2695
2694
  console.info(`Overriding database config: ${lodashPath}=${value}`);
2696
- _.set(this.databaseConfig, lodashPath, value);
2695
+ ___NS__set(this.databaseConfig, lodashPath, value);
2697
2696
  }
2698
2697
  }, {
2699
2698
  walkGetters: false,
@@ -2702,7 +2701,7 @@ class EndpointContext {
2702
2701
  //#endregion
2703
2702
  //#region resolve session
2704
2703
  if (this.config.session) {
2705
- this.session = _.cloneDeep(this.config.session);
2704
+ this.session = ___NS__cloneDeep(this.config.session);
2706
2705
  const oneHour = 1000 * 60 * 60 * 1; // 24;
2707
2706
  if (!this.session.cookieMaxAge) {
2708
2707
  this.session.cookieMaxAge = oneHour;
@@ -2857,7 +2856,7 @@ class EndpointContext {
2857
2856
  /* */
2858
2857
  /* */
2859
2858
  this.logRealtime &&
2860
- Helpers.info(`[ctx=${this.contextName}] Init Realtime for ${this.mode}`);
2859
+ Helpers__NS__info(`[ctx=${this.contextName}] Init Realtime for ${this.mode}`);
2861
2860
  this.realtime = new RealtimeCore(this);
2862
2861
  }
2863
2862
  //#endregion
@@ -2866,16 +2865,16 @@ class EndpointContext {
2866
2865
  // console.log({ ref })
2867
2866
  if (this.config.abstract) {
2868
2867
  this.logFramework &&
2869
- Helpers.info(`[taon] Create abstract context: ${this.config.contextName}`);
2868
+ Helpers__NS__info(`[taon] Create abstract context: ${this.config.contextName}`);
2870
2869
  }
2871
2870
  else {
2872
2871
  if (this.isRemoteHost) {
2873
2872
  this.logFramework &&
2874
- Helpers.info(`[taon] Create context for remote host: ${this.config.host}`);
2873
+ Helpers__NS__info(`[taon] Create context for remote host: ${this.config.host}`);
2875
2874
  }
2876
2875
  else {
2877
2876
  this.logFramework &&
2878
- Helpers.info(`[taon] Create context for host: ${this.config.host}`);
2877
+ Helpers__NS__info(`[taon] Create context for host: ${this.config.host}`);
2879
2878
  }
2880
2879
  }
2881
2880
  //#endregion
@@ -2899,7 +2898,7 @@ class EndpointContext {
2899
2898
  const tcpUdpDatabaseSqliteRelativeFileLocation = `${Models__NS__DatabasesFolder}/db-${this.contextName}.sqlite`;
2900
2899
  if (this.isRunningInsideDocker) {
2901
2900
  if (this.USE_MARIADB_MYSQL_IN_DOCKER) {
2902
- // Helpers.info('Running in docker, using in mysql database');
2901
+ // Helpers__NS__info('Running in docker, using in mysql database');
2903
2902
  // // TODO auto resolve database config in docker
2904
2903
  // databaseConfig = Models__NS__DatabaseConfig.from({
2905
2904
  // database: `db-${this.contextName}.sqlite`,
@@ -2949,7 +2948,7 @@ class EndpointContext {
2949
2948
  else {
2950
2949
  //#region auto resolve db config
2951
2950
  this.logFramework &&
2952
- Helpers.info(`[taon][database] Automatically resolving database config for mode ${this.mode}`);
2951
+ Helpers__NS__info(`[taon][database] Automatically resolving database config for mode ${this.mode}`);
2953
2952
  switch (this.mode) {
2954
2953
  //#region resolve database config for backend-frontend(ipc-electron)
2955
2954
  case 'backend-frontend(ipc-electron)':
@@ -3151,7 +3150,7 @@ class EndpointContext {
3151
3150
  let entityName = '';
3152
3151
  // entity thing is only for repositories local repositories
3153
3152
  // if (className === 'TaonBaseRepository') {
3154
- const entityFn = _.first(locaInstanceConstructorArgs);
3153
+ const entityFn = ___NS__first(locaInstanceConstructorArgs);
3155
3154
  const entity = entityFn && entityFn();
3156
3155
  entityName = (entity && ClassHelpers__NS__getName(entity)) || '';
3157
3156
  // console.log(`entityName `, entityName);
@@ -3214,7 +3213,7 @@ class EndpointContext {
3214
3213
  //#endregion
3215
3214
  //#region methods & getters / check if context initialized
3216
3215
  checkIfContextInitialized() {
3217
- if (_.isUndefined(this.config)) {
3216
+ if (___NS__isUndefined(this.config)) {
3218
3217
  throw new Error(`Please check if your context has been initialized.
3219
3218
 
3220
3219
  // ...
@@ -3312,7 +3311,7 @@ class EndpointContext {
3312
3311
  ]) {
3313
3312
  //#region init class static _ property
3314
3313
  for (const classFun of this.getClassFunByArr(classTypeName)) {
3315
- if (_.isFunction(classFun._)) {
3314
+ if (___NS__isFunction(classFun._)) {
3316
3315
  await classFun._();
3317
3316
  }
3318
3317
  }
@@ -3326,15 +3325,15 @@ class EndpointContext {
3326
3325
  Models__NS__ClassType.MIGRATION,
3327
3326
  ]) {
3328
3327
  //#region init providers, repositories _ property
3329
- // Helpers.taskStarted(
3328
+ // Helpers__NS__taskStarted(
3330
3329
  // `[taon] REINITING _ INS FN ${classTypeName} ${this.contextName} STARTED`,
3331
3330
  // );
3332
3331
  for (const ctrl of this.getClassesInstancesArrBy(classTypeName)) {
3333
- if (_.isFunction(ctrl._)) {
3332
+ if (___NS__isFunction(ctrl._)) {
3334
3333
  await ctrl._();
3335
3334
  }
3336
3335
  }
3337
- // Helpers.taskStarted(
3336
+ // Helpers__NS__taskStarted(
3338
3337
  // `[taon] REINITING _ INS FN ${classTypeName} ${this.contextName} DONE`,
3339
3338
  // );
3340
3339
  //#endregion
@@ -3533,7 +3532,7 @@ class EndpointContext {
3533
3532
  const entities = this.getClassFunByArr(Models__NS__ClassType.ENTITY);
3534
3533
  for (const entity of entities) {
3535
3534
  const options = Reflect.getMetadata(Symbols__NS__metadata.options.entity, entity);
3536
- const createTable = _.isUndefined(options.createTable)
3535
+ const createTable = ___NS__isUndefined(options.createTable)
3537
3536
  ? true
3538
3537
  : options.createTable;
3539
3538
  const nameForEntity = ClassHelpers__NS__getName(entity);
@@ -3581,7 +3580,7 @@ class EndpointContext {
3581
3580
  });
3582
3581
  const subscribers = this.getClassFunByArr(Models__NS__ClassType.SUBSCRIBER);
3583
3582
  let autoSave = false;
3584
- if (!_.isNil(this.databaseConfig.autoSave)) {
3583
+ if (!___NS__isNil(this.databaseConfig.autoSave)) {
3585
3584
  autoSave = this.databaseConfig.autoSave;
3586
3585
  }
3587
3586
  else {
@@ -3592,7 +3591,7 @@ class EndpointContext {
3592
3591
  autoSave = true; // on docker with sqljs I need to save db
3593
3592
  }
3594
3593
  }
3595
- const dataSourceDbConfig = _.isObject(this.databaseConfig)
3594
+ const dataSourceDbConfig = ___NS__isObject(this.databaseConfig)
3596
3595
  ? {
3597
3596
  type: this.databaseConfig.type,
3598
3597
  port: this.databaseConfig.databasePort,
@@ -3621,7 +3620,7 @@ class EndpointContext {
3621
3620
  if (this.modeAllowsDatabaseCreation && this.databaseConfig) {
3622
3621
  this.logDb &&
3623
3622
  this.logFramework &&
3624
- Helpers.info('[taon][database] prepare typeorm connection...');
3623
+ Helpers__NS__info('[taon][database] prepare typeorm connection...');
3625
3624
  try {
3626
3625
  const connection = new DataSource(dataSourceDbConfig);
3627
3626
  this.connection = connection;
@@ -3662,7 +3661,7 @@ class EndpointContext {
3662
3661
  // debugger;
3663
3662
  }
3664
3663
  else {
3665
- Helpers.info(`[taon][typeorm] Not initing db for mode ${this.mode}`);
3664
+ Helpers__NS__info(`[taon][typeorm] Not initing db for mode ${this.mode}`);
3666
3665
  }
3667
3666
  //#endregion
3668
3667
  }
@@ -3670,7 +3669,7 @@ class EndpointContext {
3670
3669
  //#region methods & getters / initialize metadata
3671
3670
  //#region methods & getters / update class calculate path
3672
3671
  updateCalculatedPathsForControllers(rawConfigs, classConfig, controllerClassFn) {
3673
- const parentsCalculatedPath = _.slice(rawConfigs, 1)
3672
+ const parentsCalculatedPath = ___NS__slice(rawConfigs, 1)
3674
3673
  .reverse()
3675
3674
  .map(bc => {
3676
3675
  if (TaonHelpers__NS__isGoodPath(bc.path)) {
@@ -3690,7 +3689,7 @@ class EndpointContext {
3690
3689
  .replace(/\/\//g, '/')
3691
3690
  .split('/')
3692
3691
  .reduce((acc, bc) => {
3693
- return _.last(acc) === bc ? acc : [...acc, bc];
3692
+ return ___NS__last(acc) === bc ? acc : [...acc, bc];
3694
3693
  }, [])
3695
3694
  .join('/');
3696
3695
  }
@@ -3700,8 +3699,8 @@ class EndpointContext {
3700
3699
  //#region methods & getters / dedupe class configs
3701
3700
  mergeControllerMethodsConfigs(rawConfigs, classConfig, controllerClassFn) {
3702
3701
  const currentControllerMethodsConfig = classConfig.methods;
3703
- _.slice(rawConfigs, 1).forEach(bc => {
3704
- const parentControllerMethods = _.cloneDeep(bc.methods);
3702
+ ___NS__slice(rawConfigs, 1).forEach(bc => {
3703
+ const parentControllerMethods = ___NS__cloneDeep(bc.methods);
3705
3704
  for (const methodsName in parentControllerMethods) {
3706
3705
  if (parentControllerMethods.hasOwnProperty(methodsName)) {
3707
3706
  if (!currentControllerMethodsConfig[methodsName]) {
@@ -3722,7 +3721,7 @@ class EndpointContext {
3722
3721
  const allControllers = this.getClassFunByArr(Models__NS__ClassType.CONTROLLER);
3723
3722
  for (const controllerClassFn of allControllers) {
3724
3723
  const instance = this.getInstanceBy(controllerClassFn);
3725
- if (_.isFunction(instance.afterAllCtxInited)) {
3724
+ if (___NS__isFunction(instance.afterAllCtxInited)) {
3726
3725
  await instance.afterAllCtxInited({ ctxStorage });
3727
3726
  }
3728
3727
  }
@@ -3752,7 +3751,7 @@ class EndpointContext {
3752
3751
  //#region combine middlewares from controllers
3753
3752
  classConfig.calculatedMiddlewaresControllerObj = {};
3754
3753
  [...rawConfigs].reverse().forEach(rc => {
3755
- if (_.isFunction(rc.middlewares)) {
3754
+ if (___NS__isFunction(rc.middlewares)) {
3756
3755
  classConfig.calculatedMiddlewaresControllerObj = rc.middlewares({
3757
3756
  parentMiddlewares: classConfig.calculatedMiddlewaresControllerObj,
3758
3757
  className(middlewareClass) {
@@ -3779,7 +3778,7 @@ class EndpointContext {
3779
3778
  [...rawConfigs].reverse().forEach(rc => {
3780
3779
  if (rc.methods[methodName]) {
3781
3780
  const parentMethodConfig = rc.methods[methodName];
3782
- if (_.isFunction(parentMethodConfig.middlewares)) {
3781
+ if (___NS__isFunction(parentMethodConfig.middlewares)) {
3783
3782
  calculatedMiddlewaresMethodObj = parentMethodConfig.middlewares({
3784
3783
  parentMiddlewares: calculatedMiddlewaresMethodObj,
3785
3784
  className(middlewareClass) {
@@ -3810,7 +3809,7 @@ class EndpointContext {
3810
3809
  //#endregion
3811
3810
  //#region init server
3812
3811
  // console.log({ expressPath });
3813
- if (Helpers.isNode || Helpers.isWebSQL) {
3812
+ if (UtilsOs__NS__isNode || UtilsOs__NS__isWebSQL) {
3814
3813
  //#region @websql
3815
3814
  const route = this.initServer(httpMethodType, methodConfig, classConfig, expressPath, controllerClassFn);
3816
3815
  this.activeRoutes.push({
@@ -3821,7 +3820,7 @@ class EndpointContext {
3821
3820
  }
3822
3821
  //#endregion
3823
3822
  //#region init client
3824
- const shouldInitClient = Helpers.isBrowser || this.isRemoteHost || Helpers.isWebSQL;
3823
+ const shouldInitClient = UtilsOs__NS__isBrowser || this.isRemoteHost || UtilsOs__NS__isWebSQL;
3825
3824
  // console.log('shouldInitClient', shouldInitClient);
3826
3825
  if (shouldInitClient) {
3827
3826
  // console.log(
@@ -3857,7 +3856,7 @@ class EndpointContext {
3857
3856
  return `${f.method} ${f.expressPath}`;
3858
3857
  })).map(f => {
3859
3858
  const [method, expressPath] = f.split(' ');
3860
- return (`\n### ${_.startCase(_.last(expressPath.split('/')))}\n` +
3859
+ return (`\n### ${___NS__startCase(___NS__last(expressPath.split('/')))}\n` +
3861
3860
  TaonHelpers__NS__fillUpTo(method.toUpperCase() + ' ', 10) +
3862
3861
  this.uriOrigin +
3863
3862
  expressPath);
@@ -3893,7 +3892,7 @@ class EndpointContext {
3893
3892
  async initCustomClientMiddlewares() {
3894
3893
  const middlewares = this.getClassesInstancesArrBy(Models__NS__ClassType.MIDDLEWARE)
3895
3894
  .map(f => f)
3896
- .filter(f => _.isFunction(f.interceptClient));
3895
+ .filter(f => ___NS__isFunction(f.interceptClient));
3897
3896
  middlewares.forEach(middlewareInstanceName => {
3898
3897
  const contextName = this.contextName;
3899
3898
  const interceptorName = `${contextName}-${ClassHelpers__NS__getName(middlewareInstanceName)}`;
@@ -4067,7 +4066,7 @@ class EndpointContext {
4067
4066
  .map(middlewareClassFun => {
4068
4067
  const middlewareInstance = this.getInstanceBy(middlewareClassFun);
4069
4068
  if (middlewareInstance &&
4070
- _.isFunction(middlewareInstance.interceptServerMethod)) {
4069
+ ___NS__isFunction(middlewareInstance.interceptServerMethod)) {
4071
4070
  const middlewareFn = ClassHelpers__NS__asyncHandler(async (req, res, next) => {
4072
4071
  await middlewareInstance.interceptServerMethod({
4073
4072
  req,
@@ -4101,7 +4100,7 @@ class EndpointContext {
4101
4100
  //#endregion
4102
4101
  // console.log(`BACKEND: expressPath: "${expressPath}" `);
4103
4102
  //#endregion
4104
- if (Helpers.isElectron) {
4103
+ if (UtilsOs__NS__isElectron) {
4105
4104
  /* */
4106
4105
  /* */
4107
4106
  /* */
@@ -4130,7 +4129,7 @@ class EndpointContext {
4130
4129
  if (!this.isRemoteHost) {
4131
4130
  //#region apply dummy websql express routers
4132
4131
  //#region @websql
4133
- if (Helpers.isWebSQL) {
4132
+ if (UtilsOs__NS__isWebSQL) {
4134
4133
  if (!this.expressApp[httpMethodType.toLowerCase()]) {
4135
4134
  this.expressApp[httpMethodType.toLowerCase()] = () => { };
4136
4135
  // TODO add middlewares for WEBSQL and ELECTRON mode
@@ -4408,7 +4407,7 @@ class EndpointContext {
4408
4407
  const middlewares = methodConfig.calculatedMiddlewares;
4409
4408
  const middlewaresInstances = middlewares
4410
4409
  .map(f => this.getInstanceBy(f))
4411
- .filter(f => _.isFunction(f.interceptClientMethod));
4410
+ .filter(f => ___NS__isFunction(f.interceptClientMethod));
4412
4411
  middlewaresInstances.forEach(instance => {
4413
4412
  const middlewareName = ClassHelpers__NS__getName(instance);
4414
4413
  // middlewareName - only needed for inheritace and uniqness of interceptors
@@ -4437,7 +4436,7 @@ class EndpointContext {
4437
4436
  //#endregion
4438
4437
  const orgMethods = target.prototype[methodConfig.methodName];
4439
4438
  //#region handle electron ipc request
4440
- if (Helpers.isElectron) {
4439
+ if (UtilsOs__NS__isElectron) {
4441
4440
  const ipcRenderer = window.require('electron').ipcRenderer;
4442
4441
  target.prototype[methodConfig.methodName] = function (...args) {
4443
4442
  const received = new Promise(async (resolve, reject) => {
@@ -4455,7 +4454,7 @@ class EndpointContext {
4455
4454
  method: methodConfig.type,
4456
4455
  url: `${ctx.uriOrigin}${'' // TODO express path
4457
4456
  }${methodConfig.path} `,
4458
- }, Helpers.isBlob(body) || _.isString(body)
4457
+ }, Helpers__NS__isBlob(body) || ___NS__isString(body)
4459
4458
  ? body
4460
4459
  : JSON.stringify(body), RestHeaders.from(headers), void 0, () => body);
4461
4460
  resolve(res);
@@ -4539,14 +4538,14 @@ class EndpointContext {
4539
4538
  const { request, response } = TaonHelpers__NS__websqlMocks(headers);
4540
4539
  let res;
4541
4540
  try {
4542
- res = await Helpers.runSyncOrAsync({
4541
+ res = await Helpers__NS__runSyncOrAsync({
4543
4542
  functionFn: orgMethods,
4544
4543
  context: this,
4545
4544
  arrayOfParams: args,
4546
4545
  });
4547
4546
  // console.log({ res1: res })
4548
4547
  if (typeof res === 'function') {
4549
- res = await Helpers.runSyncOrAsync({
4548
+ res = await Helpers__NS__runSyncOrAsync({
4550
4549
  functionFn: res,
4551
4550
  context: this,
4552
4551
  arrayOfParams: [request, response],
@@ -4554,7 +4553,7 @@ class EndpointContext {
4554
4553
  }
4555
4554
  // console.log({ res2: res })
4556
4555
  if (typeof res === 'function') {
4557
- res = await Helpers.runSyncOrAsync({
4556
+ res = await Helpers__NS__runSyncOrAsync({
4558
4557
  functionFn: res,
4559
4558
  context: this,
4560
4559
  arrayOfParams: [request, response],
@@ -4571,7 +4570,7 @@ class EndpointContext {
4571
4570
  method: methodConfig.type,
4572
4571
  url: `${ctx.uriOrigin}${'' // TODO express path
4573
4572
  }${methodConfig.path} `,
4574
- }, Helpers.isBlob(body) || _.isString(body)
4573
+ }, Helpers__NS__isBlob(body) || ___NS__isString(body)
4575
4574
  ? body
4576
4575
  : JSON.stringify(body), RestHeaders.from(headers), void 0, () => body);
4577
4576
  // TODO blob should be blob not json
@@ -4591,7 +4590,7 @@ class EndpointContext {
4591
4590
  });
4592
4591
  received['observable'] = from(received);
4593
4592
  // debugger
4594
- if (Helpers.isWebSQL) {
4593
+ if (UtilsOs__NS__isWebSQL) {
4595
4594
  return {
4596
4595
  received,
4597
4596
  request(axiosConfig) {
@@ -4601,7 +4600,7 @@ class EndpointContext {
4601
4600
  };
4602
4601
  }
4603
4602
  };
4604
- if (Helpers.isWebSQL) {
4603
+ if (UtilsOs__NS__isWebSQL) {
4605
4604
  // @ts-ignore
4606
4605
  return undefined;
4607
4606
  }
@@ -4683,7 +4682,7 @@ class EndpointContext {
4683
4682
  if (mapping) {
4684
4683
  rest.headers.set(Symbols__NS__old.MAPPING_CONFIG_HEADER_QUERY_PARAMS, JSON.stringify(mapping));
4685
4684
  }
4686
- queryParams = _.cloneDeep(param);
4685
+ queryParams = ___NS__cloneDeep(param);
4687
4686
  }
4688
4687
  }
4689
4688
  if (currentParam.paramType === 'Header') {
@@ -4901,7 +4900,7 @@ const createContextFn = (configFn, cloneOptions) => {
4901
4900
  setTimeout(async () => {
4902
4901
  if (UtilsOs__NS__isRunningInDocker()) {
4903
4902
  const activeContext = config?.activeContext || null;
4904
- if (_.isString(activeContext) &&
4903
+ if (___NS__isString(activeContext) &&
4905
4904
  activeContext !== '' &&
4906
4905
  activeContext !== config?.contextName) {
4907
4906
  console.warn(`[taon] Context ${endpointContextRef.contextName} is not active context, skipping initialization.`);
@@ -4938,11 +4937,11 @@ const createContextFn = (configFn, cloneOptions) => {
4938
4937
  TaonAdminService.Instance?.keepWebsqlDbDataAfterReload;
4939
4938
  if (keepWebsqlDbDataAfterReload) {
4940
4939
  !UtilsOs__NS__isRunningInCliMode() &&
4941
- Helpers.info(`[taon] Keeping websql data after reload ` +
4940
+ Helpers__NS__info(`[taon] Keeping websql data after reload ` +
4942
4941
  `(context=${endpointContextRef.contextName}).`);
4943
4942
  }
4944
4943
  else {
4945
- Helpers.info(`[taon] Dropping all tables and data ` +
4944
+ Helpers__NS__info(`[taon] Dropping all tables and data ` +
4946
4945
  `(context=${endpointContextRef.contextName}).`);
4947
4946
  }
4948
4947
  //#endregion
@@ -4963,17 +4962,17 @@ const createContextFn = (configFn, cloneOptions) => {
4963
4962
  //#region run migrations tasks
4964
4963
  if (endpointContextRef.onlyMigrationRun) {
4965
4964
  endpointContextRef.logMigrations &&
4966
- Helpers.log(`[taon] Running only migrations (context=${endpointContextRef.contextName}).`);
4965
+ Helpers__NS__log(`[taon] Running only migrations (context=${endpointContextRef.contextName}).`);
4967
4966
  await endpointContextRef.dbMigrations.runAllNotCompletedMigrations();
4968
4967
  }
4969
4968
  else if (endpointContextRef.onlyMigrationRevertToTimestamp) {
4970
4969
  endpointContextRef.logMigrations &&
4971
- Helpers.log(`[taon] Reverting migrations to timestamp ${endpointContextRef.onlyMigrationRevertToTimestamp} (context=${endpointContextRef.contextName}).`);
4970
+ Helpers__NS__log(`[taon] Reverting migrations to timestamp ${endpointContextRef.onlyMigrationRevertToTimestamp} (context=${endpointContextRef.contextName}).`);
4972
4971
  await endpointContextRef.dbMigrations.revertMigrationToTimestamp(endpointContextRef.onlyMigrationRevertToTimestamp);
4973
4972
  }
4974
4973
  else {
4975
4974
  endpointContextRef.logMigrations &&
4976
- Helpers.log(`[taon] Running all not applied migrations (context=${endpointContextRef.contextName}).`);
4975
+ Helpers__NS__log(`[taon] Running all not applied migrations (context=${endpointContextRef.contextName}).`);
4977
4976
  await endpointContextRef.dbMigrations.runAllNotCompletedMigrations();
4978
4977
  }
4979
4978
  //#endregion
@@ -5116,11 +5115,11 @@ const getTransformFunction = (target) => {
5116
5115
  // console.log(`CONFIGS TO CHECK`, configs)
5117
5116
  const functions = configs
5118
5117
  .map(c => {
5119
- if (_.isFunction(c.browserTransformFn)) {
5118
+ if (___NS__isFunction(c.browserTransformFn)) {
5120
5119
  return c.browserTransformFn;
5121
5120
  }
5122
5121
  })
5123
- .filter(f => _.isFunction(f));
5122
+ .filter(f => ___NS__isFunction(f));
5124
5123
  return functions.length === 0
5125
5124
  ? void 0
5126
5125
  : function (entity) {
@@ -5141,7 +5140,7 @@ const singleTransform = (json) => {
5141
5140
  let pbrowserTransformFn = getTransformFunction(ptarget);
5142
5141
  if (pbrowserTransformFn) {
5143
5142
  const newValue = pbrowserTransformFn(json);
5144
- if (!_.isObject(newValue)) {
5143
+ if (!___NS__isObject(newValue)) {
5145
5144
  console.error(`Please return object in transform function for class: ` +
5146
5145
  `${ClassHelpers__NS__getName(json)}`);
5147
5146
  }
@@ -5177,7 +5176,7 @@ class EntityProcess {
5177
5176
  //#endregion
5178
5177
  //#region check advanced manipulation
5179
5178
  checkAdvancedManiupulation() {
5180
- if (_.isFunction(this.result)) {
5179
+ if (___NS__isFunction(this.result)) {
5181
5180
  this.advancedManipulation = true;
5182
5181
  this.result = this.result();
5183
5182
  }
@@ -5187,7 +5186,7 @@ class EntityProcess {
5187
5186
  async run() {
5188
5187
  this.checkAdvancedManiupulation();
5189
5188
  this.data = this.result;
5190
- if (_.isObject(this.result)) {
5189
+ if (___NS__isObject(this.result)) {
5191
5190
  if (this.advancedManipulation) {
5192
5191
  this.applayTransformFn();
5193
5192
  }
@@ -5198,14 +5197,14 @@ class EntityProcess {
5198
5197
  //#endregion
5199
5198
  //#region apply transform function
5200
5199
  applayTransformFn() {
5201
- if (_.isObject(this.data) && !_.isArray(this.data)) {
5200
+ if (___NS__isObject(this.data) && !___NS__isArray(this.data)) {
5202
5201
  this.data = singleTransform(this.data);
5203
5202
  }
5204
5203
  const { include } = { include: [] };
5205
5204
  walk.Object(this.data, (value, lodashPath, changeValue, { skipObject, isCircural }) => {
5206
5205
  // console.log(`${isCircural ? 'CIR' : 'NOT'} : ${lodashPath}`)
5207
5206
  if (!isCircural) {
5208
- if (!_.isArray(value) && _.isObject(value)) {
5207
+ if (!___NS__isArray(value) && ___NS__isObject(value)) {
5209
5208
  changeValue(singleTransform(value));
5210
5209
  }
5211
5210
  }
@@ -5222,7 +5221,7 @@ class EntityProcess {
5222
5221
  setHeaders() {
5223
5222
  const { include } = { include: [] };
5224
5223
  const className = ClassHelpers__NS__getName(this.data);
5225
- const doNothing = _.isNil(this.data) ||
5224
+ const doNothing = ___NS__isNil(this.data) ||
5226
5225
  [
5227
5226
  'Object',
5228
5227
  '',
@@ -5246,32 +5245,32 @@ class EntityProcess {
5246
5245
  send() {
5247
5246
  if (this.advancedManipulation) {
5248
5247
  const browserKey = config.folder.browser;
5249
- let toSend = _.isArray(this.data) ? [] : {};
5248
+ let toSend = ___NS__isArray(this.data) ? [] : {};
5250
5249
  const { include = [], exclude = [] } = { include: [], exclude: [] };
5251
5250
  walk.Object(this.data, (value, lodashPath, changeVAlue, { isCircural, skipObject }) => {
5252
5251
  // console.log(`${isCircural ? 'CIR' : 'NOT'} ${lodashPath}`)
5253
5252
  if (isCircural) {
5254
- _.set(toSend, lodashPath, null);
5253
+ ___NS__set(toSend, lodashPath, null);
5255
5254
  }
5256
5255
  else {
5257
5256
  const fun = getTransformFunction(ClassHelpers__NS__getClassFnFromObject(value));
5258
- if (_.isFunction(fun)) {
5259
- _.set(toSend, `${lodashPath}.${browserKey}`, value[browserKey]);
5257
+ if (___NS__isFunction(fun)) {
5258
+ ___NS__set(toSend, `${lodashPath}.${browserKey}`, value[browserKey]);
5260
5259
  const indexProp = ClassHelpers__NS__getUniqueKey(value);
5261
- _.set(toSend, `${lodashPath}.${indexProp}`, value[indexProp]);
5260
+ ___NS__set(toSend, `${lodashPath}.${indexProp}`, value[indexProp]);
5262
5261
  // skipObject()
5263
5262
  }
5264
5263
  else {
5265
- _.set(toSend, lodashPath, value);
5264
+ ___NS__set(toSend, lodashPath, value);
5266
5265
  }
5267
5266
  }
5268
5267
  }, { checkCircural: true, breadthWalk: true, include });
5269
- if (!_.isArray(this.data)) {
5268
+ if (!___NS__isArray(this.data)) {
5270
5269
  let funParent = getTransformFunction(ClassHelpers__NS__getClassFnFromObject(this.data));
5271
5270
  // if (this.mdc && this.mdc.exclude && this.mdc.exclude.length > 0) {
5272
5271
  // console.log(`funParent !!! have fun? ${!!funParent} `)
5273
5272
  // }
5274
- if (_.isFunction(funParent)) {
5273
+ if (___NS__isFunction(funParent)) {
5275
5274
  toSend = {
5276
5275
  [browserKey]: toSend[browserKey],
5277
5276
  };
@@ -5282,21 +5281,21 @@ class EntityProcess {
5282
5281
  if (!((include.length > 0 && !include.includes(prop)) ||
5283
5282
  (exclude.length > 0 && exclude.includes(prop)))) {
5284
5283
  if (ClassHelpers__NS__isContextClassObject(v) &&
5285
- _.isFunction(getTransformFunction(ClassHelpers__NS__getClassFnFromObject(v)))) {
5284
+ ___NS__isFunction(getTransformFunction(ClassHelpers__NS__getClassFnFromObject(v)))) {
5286
5285
  toSend[prop] = {
5287
5286
  [browserKey]: v[browserKey],
5288
5287
  };
5289
5288
  const indexProp = ClassHelpers__NS__getUniqueKey(v);
5290
5289
  toSend[prop][indexProp] = this.data[prop][indexProp];
5291
5290
  for (const key in v) {
5292
- if (_.isObject(v) &&
5291
+ if (___NS__isObject(v) &&
5293
5292
  v.hasOwnProperty(key) &&
5294
5293
  ![indexProp, config.folder.browser].includes(key) &&
5295
- (_.isString(v[key]) ||
5296
- _.isNumber(v[key]) ||
5297
- _.isDate(v[key]) ||
5298
- _.isNull(v[key]) ||
5299
- _.isBoolean(v[key]))) {
5294
+ (___NS__isString(v[key]) ||
5295
+ ___NS__isNumber(v[key]) ||
5296
+ ___NS__isDate(v[key]) ||
5297
+ ___NS__isNull(v[key]) ||
5298
+ ___NS__isBoolean(v[key]))) {
5300
5299
  toSend[prop][key] = v[key];
5301
5300
  }
5302
5301
  }
@@ -5323,7 +5322,7 @@ class EntityProcess {
5323
5322
  const StringColumn = (defaultValue = null, length = 100) => Column({
5324
5323
  type: 'varchar',
5325
5324
  length,
5326
- nullable: _.isNil(defaultValue),
5325
+ nullable: ___NS__isNil(defaultValue),
5327
5326
  default: defaultValue,
5328
5327
  });
5329
5328
  /**
@@ -5332,7 +5331,7 @@ const StringColumn = (defaultValue = null, length = 100) => Column({
5332
5331
  const String100Column = (defaultValue = null) => Column({
5333
5332
  type: 'varchar',
5334
5333
  length: 100,
5335
- nullable: _.isNil(defaultValue),
5334
+ nullable: ___NS__isNil(defaultValue),
5336
5335
  default: defaultValue,
5337
5336
  });
5338
5337
  /**
@@ -5341,7 +5340,7 @@ const String100Column = (defaultValue = null) => Column({
5341
5340
  const String20Column = (defaultValue = null) => Column({
5342
5341
  type: 'varchar',
5343
5342
  length: 20,
5344
- nullable: _.isNil(defaultValue),
5343
+ nullable: ___NS__isNil(defaultValue),
5345
5344
  default: defaultValue,
5346
5345
  });
5347
5346
  /**
@@ -5350,7 +5349,7 @@ const String20Column = (defaultValue = null) => Column({
5350
5349
  const String45Column = (defaultValue = null) => Column({
5351
5350
  type: 'varchar',
5352
5351
  length: 45,
5353
- nullable: _.isNil(defaultValue),
5352
+ nullable: ___NS__isNil(defaultValue),
5354
5353
  default: defaultValue,
5355
5354
  });
5356
5355
  /**
@@ -5359,7 +5358,7 @@ const String45Column = (defaultValue = null) => Column({
5359
5358
  const String500Column = (defaultValue = null) => Column({
5360
5359
  type: 'varchar',
5361
5360
  length: 500,
5362
- nullable: _.isNil(defaultValue),
5361
+ nullable: ___NS__isNil(defaultValue),
5363
5362
  default: defaultValue,
5364
5363
  });
5365
5364
  /**
@@ -5368,7 +5367,7 @@ const String500Column = (defaultValue = null) => Column({
5368
5367
  const String200Column = (defaultValue = null) => Column({
5369
5368
  type: 'varchar',
5370
5369
  length: 200,
5371
- nullable: _.isNil(defaultValue),
5370
+ nullable: ___NS__isNil(defaultValue),
5372
5371
  default: defaultValue,
5373
5372
  });
5374
5373
  const NumberColumn = () => Column({ type: 'int', nullable: true });
@@ -5434,13 +5433,13 @@ const DateTimeColumn = (defaultValue = null) => Column({ type: 'datetime', nulla
5434
5433
  // }
5435
5434
 
5436
5435
  const cloneObj = (override, classFn) => {
5437
- const result = _.merge(new classFn(), _.cloneDeep(this));
5436
+ const result = ___NS__merge(new classFn(), ___NS__cloneDeep(this));
5438
5437
  walk.Object(override || {}, (value, lodashPath) => {
5439
- if (_.isNil(value) || _.isFunction(value) || _.isObject(value)) {
5438
+ if (___NS__isNil(value) || ___NS__isFunction(value) || ___NS__isObject(value)) {
5440
5439
  // skipping
5441
5440
  }
5442
5441
  else {
5443
- _.set(result, lodashPath, value);
5442
+ ___NS__set(result, lodashPath, value);
5444
5443
  }
5445
5444
  }, {
5446
5445
  walkGetters: false,
@@ -5467,14 +5466,14 @@ class TaonBaseClass {
5467
5466
  * @returns cloned instance of the class
5468
5467
  */
5469
5468
  clone(overrideObjOrFn) {
5470
- if (_.isString(overrideObjOrFn)) {
5469
+ if (___NS__isString(overrideObjOrFn)) {
5471
5470
  console.log(overrideObjOrFn);
5472
5471
  throw new Error('String is not supported as .clone() method argument');
5473
5472
  }
5474
5473
  const classFn = ClassHelpers__NS__getClassFnFromObject(this);
5475
- if (_.isFunction(overrideObjOrFn)) {
5474
+ if (___NS__isFunction(overrideObjOrFn)) {
5476
5475
  // console.log('clone with fn');
5477
- const oldValues = (_.cloneDeep(this) || {});
5476
+ const oldValues = (___NS__cloneDeep(this) || {});
5478
5477
  return cloneObj(overrideObjOrFn(oldValues), classFn);
5479
5478
  }
5480
5479
  // console.log('clone normal');
@@ -5660,7 +5659,7 @@ function TaonEntity(options) {
5660
5659
  options = options || {};
5661
5660
  options.uniqueKeyProp = options.uniqueKeyProp || 'id';
5662
5661
  ClassHelpers__NS__setName(constructor, options?.className);
5663
- Mapping__NS__DefaultModelWithMapping(options?.defaultModelValues || {}, _.merge(options?.defaultModelMapping || {}, (options?.defaultModelMappingDeep || {})))(constructor);
5662
+ Mapping__NS__DefaultModelWithMapping(options?.defaultModelValues || {}, ___NS__merge(options?.defaultModelMapping || {}, (options?.defaultModelMappingDeep || {})))(constructor);
5664
5663
  // TODO when entit metadata generator read use this
5665
5664
  Mapping__NS__DefaultModelWithMapping(void 0, {})(constructor);
5666
5665
  Reflect.defineMetadata(Symbols__NS__metadata.options.entity, options, constructor);
@@ -5749,7 +5748,7 @@ const metaReq = (method, path, target, propertyKey, descriptor, pathOrOptions, p
5749
5748
  if (methodConfig.parameters.hasOwnProperty(key)) {
5750
5749
  const element = methodConfig.parameters[key];
5751
5750
  if (element.paramType === 'Path' &&
5752
- _.isString(element.paramName) &&
5751
+ ___NS__isString(element.paramName) &&
5753
5752
  element.paramName.trim().length > 0) {
5754
5753
  paramsPathConcatedPath += `/${element.paramName}/:${element.paramName}`;
5755
5754
  }
@@ -6305,8 +6304,8 @@ let TaonBaseCrudController = class TaonBaseCrudController extends TaonBaseContro
6305
6304
  //#endregion
6306
6305
  //#region init
6307
6306
  async _() {
6308
- if (!_.isFunction(this.entityClassResolveFn)) {
6309
- Helpers.warn(`Skipping initing CRUD controller ${ClassHelpers__NS__getName(this)} because entityClassResolveFn is not provided.`);
6307
+ if (!___NS__isFunction(this.entityClassResolveFn)) {
6308
+ Helpers__NS__warn(`Skipping initing CRUD controller ${ClassHelpers__NS__getName(this)} because entityClassResolveFn is not provided.`);
6310
6309
  return;
6311
6310
  }
6312
6311
  let entityClassFn = this.entityClassResolveFn();
@@ -6314,11 +6313,11 @@ let TaonBaseCrudController = class TaonBaseCrudController extends TaonBaseContro
6314
6313
  if (entityClassFn) {
6315
6314
  const configEntity = Reflect.getMetadata(Symbols__NS__metadata.options.entity, ClassHelpers__NS__getClassFnFromObject(this));
6316
6315
  if (configEntity?.createTable === false) {
6317
- Helpers.warn(`Table for entity ${ClassHelpers__NS__getName(entityClassFn)} will not be created. Crud will not work properly.`);
6316
+ Helpers__NS__warn(`Table for entity ${ClassHelpers__NS__getName(entityClassFn)} will not be created. Crud will not work properly.`);
6318
6317
  }
6319
6318
  }
6320
6319
  else {
6321
- Helpers.error(`Entity class not provided for controller ${ClassHelpers__NS__getName(this)}.
6320
+ Helpers__NS__error(`Entity class not provided for controller ${ClassHelpers__NS__getName(this)}.
6322
6321
 
6323
6322
  Please provide entity as class property entityClassFn:
6324
6323
 
@@ -6344,7 +6343,7 @@ let TaonBaseCrudController = class TaonBaseCrudController extends TaonBaseContro
6344
6343
  Validators__NS__preventUndefinedModel(model, id);
6345
6344
  let value = model[property];
6346
6345
  let result;
6347
- if (_.isString(value) || _.isArray(value)) {
6346
+ if (___NS__isString(value) || ___NS__isArray(value)) {
6348
6347
  result = value.slice(alreadyLength);
6349
6348
  }
6350
6349
  return result;
@@ -6665,7 +6664,7 @@ let TaonBaseRepository = class TaonBaseRepository extends TaonBaseCustomReposito
6665
6664
  If ${resolvedRepoName} is a Taon Custom Repository, then use this:
6666
6665
 
6667
6666
  ...
6668
- ${_.lowerFirst(resolvedRepoName)} = injectCustomRepository(${resolvedRepoName});
6667
+ ${___NS__lowerFirst(resolvedRepoName)} = injectCustomRepository(${resolvedRepoName});
6669
6668
  ...
6670
6669
 
6671
6670
  `;
@@ -6826,14 +6825,14 @@ let TaonBaseRepository = class TaonBaseRepository extends TaonBaseCustomReposito
6826
6825
  */
6827
6826
  async remove(idOrEntity) {
6828
6827
  //#region @websqlFunc
6829
- if (_.isObject(idOrEntity)) {
6828
+ if (___NS__isObject(idOrEntity)) {
6830
6829
  idOrEntity = idOrEntity.id;
6831
6830
  }
6832
6831
  const deletedEntity = await this.repo.findOne({
6833
6832
  where: { id: idOrEntity },
6834
6833
  });
6835
6834
  if (!deletedEntity) {
6836
- Helpers.warn(`[TaonBaseRepository] Entity "${ClassHelpers__NS__getName(this.repo.target)}" ` + `with id ${idOrEntity} not found, cannot remove`);
6835
+ Helpers__NS__warn(`[TaonBaseRepository] Entity "${ClassHelpers__NS__getName(this.repo.target)}" ` + `with id ${idOrEntity} not found, cannot remove`);
6837
6836
  return;
6838
6837
  }
6839
6838
  const idCopy = deletedEntity.id;
@@ -6857,7 +6856,7 @@ let TaonBaseRepository = class TaonBaseRepository extends TaonBaseCustomReposito
6857
6856
  async bulkRemove(idsOrEntities) {
6858
6857
  //#region @websqlFunc
6859
6858
  idsOrEntities = idsOrEntities.map(id => {
6860
- return _.isObject(id) ? id.id : id;
6859
+ return ___NS__isObject(id) ? id.id : id;
6861
6860
  });
6862
6861
  const models = [];
6863
6862
  for (let index = 0; index < idsOrEntities.length; index++) {
@@ -6908,18 +6907,18 @@ let TaonBaseRepository = class TaonBaseRepository extends TaonBaseCustomReposito
6908
6907
  const allowedPropsToUpdate = [];
6909
6908
  for (const key in item) {
6910
6909
  const metadataColumn = this.repo.metadata.ownColumns.find(c => c.propertyName === key);
6911
- if (_.isObject(item) &&
6910
+ if (___NS__isObject(item) &&
6912
6911
  item.hasOwnProperty(key) &&
6913
6912
  (typeof item[key] !== 'object' ||
6914
6913
  this.allowedTypesToUpdate.includes(metadataColumn?.type)) &&
6915
- !_.isUndefined(metadataColumn)) {
6914
+ !___NS__isUndefined(metadataColumn)) {
6916
6915
  allowedPropsToUpdate.push(key);
6917
6916
  }
6918
6917
  }
6919
6918
  for (let i = 0; i < allowedPropsToUpdate.length; i++) {
6920
6919
  const key = allowedPropsToUpdate[i];
6921
6920
  if (!INDEX_KEYS_NO_FOR_UPDATE.includes(key.toLowerCase())) {
6922
- // const raw = _.isBoolean(item[key]) || _.isNumber(item[key]) || _.isNull(item[key]); // TODO does this make any sense ?
6921
+ // const raw = ___NS__isBoolean(item[key]) || ___NS__isNumber(item[key]) || ___NS__isNull(item[key]); // TODO does this make any sense ?
6923
6922
  const toSet = item[key];
6924
6923
  // const tableName = tableNameFrom(this.entity as any);
6925
6924
  await this.repo.update({
@@ -7568,7 +7567,7 @@ class TaonBaseMigration extends TaonBaseInjector {
7568
7567
  return true;
7569
7568
  }
7570
7569
  getDescription() {
7571
- return _.startCase(ClassHelpers__NS__getName(this));
7570
+ return ___NS__startCase(ClassHelpers__NS__getName(this));
7572
7571
  }
7573
7572
  async up(queryRunner) {
7574
7573
  console.log(`[TaonBaseMigration] Running migration UP "${ClassHelpers__NS__getName(this)}"`);
@@ -7723,15 +7722,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
7723
7722
  }], ctorParameters: () => [{ type: i1.FormlyFormBuilder }] });
7724
7723
 
7725
7724
  function findTypeForEntity(entity, isArray = false) {
7726
- if (!_.isArray(RegisterComponentType.prototype.types)) {
7725
+ if (!___NS__isArray(RegisterComponentType.prototype.types)) {
7727
7726
  RegisterComponentType.prototype.types = [];
7728
7727
  }
7729
7728
  return getRegisteredComponents().find(c => c.entity === entity && c.isArray === isArray);
7730
7729
  }
7731
7730
  function typeFromEntity(component, entity) {
7732
- const isArray = _.isArray(entity);
7731
+ const isArray = ___NS__isArray(entity);
7733
7732
  if (isArray) {
7734
- entity = _.first(entity);
7733
+ entity = ___NS__first(entity);
7735
7734
  }
7736
7735
  let name = ClassHelpers__NS__getName(component);
7737
7736
  let res = { name, component, entity, isArray };
@@ -7743,7 +7742,7 @@ function typeFromName(component, name) {
7743
7742
  return res;
7744
7743
  }
7745
7744
  function RegisterComponentTypeForEntity(entity) {
7746
- if (!_.isArray(RegisterComponentType.prototype.types)) {
7745
+ if (!___NS__isArray(RegisterComponentType.prototype.types)) {
7747
7746
  RegisterComponentType.prototype.types = [];
7748
7747
  }
7749
7748
  return function (target, propertyKey, descriptor) {
@@ -7751,7 +7750,7 @@ function RegisterComponentTypeForEntity(entity) {
7751
7750
  };
7752
7751
  }
7753
7752
  function RegisterComponentType(className, ...optionslNames) {
7754
- if (!_.isArray(RegisterComponentType.prototype.types)) {
7753
+ if (!___NS__isArray(RegisterComponentType.prototype.types)) {
7755
7754
  RegisterComponentType.prototype.types = [];
7756
7755
  }
7757
7756
  return function (target, propertyKey, descriptor) {
@@ -7780,8 +7779,8 @@ function getFromlyConfigFor(target, options = {}) {
7780
7779
  const mapping = Mapping__NS__getModelsMapping(target);
7781
7780
  // console.log('mapping', mapping)
7782
7781
  const fieldNames = CLASS.describeProperites(target);
7783
- const checkExclude = _.isArray(keysPathesToExclude) && keysPathesToExclude.length > 0;
7784
- const checkInclude = _.isArray(keysPathesToInclude) && keysPathesToInclude.length > 0;
7782
+ const checkExclude = ___NS__isArray(keysPathesToExclude) && keysPathesToExclude.length > 0;
7783
+ const checkInclude = ___NS__isArray(keysPathesToInclude) && keysPathesToInclude.length > 0;
7785
7784
  if (checkExclude && checkInclude) {
7786
7785
  throw new Error(`In Taon function getFromlyConfigFor(...) please use keysPathesToInclude or keysPathesToExclude, `);
7787
7786
  }
@@ -7814,7 +7813,7 @@ function getFromlyConfigFor(target, options = {}) {
7814
7813
  fieldArray: {
7815
7814
  fieldGroupClassName: 'row',
7816
7815
  templateOptions: {
7817
- label: `Add new ${_.startCase(key)}`,
7816
+ label: `Add new ${___NS__startCase(key)}`,
7818
7817
  },
7819
7818
  fieldGroup,
7820
7819
  },
@@ -7835,7 +7834,7 @@ function getFromlyConfigFor(target, options = {}) {
7835
7834
  res = {
7836
7835
  fieldGroupClassName: 'row',
7837
7836
  templateOptions: {
7838
- label: `${_.startCase(key)}`,
7837
+ label: `${___NS__startCase(key)}`,
7839
7838
  },
7840
7839
  wrappers: ['groupwrap'],
7841
7840
  fieldGroup,
@@ -7847,16 +7846,16 @@ function getFromlyConfigFor(target, options = {}) {
7847
7846
  key,
7848
7847
  model,
7849
7848
  type,
7850
- defaultValue: !_.isUndefined(target.prototype[key])
7849
+ defaultValue: !___NS__isUndefined(target.prototype[key])
7851
7850
  ? target.prototype[key]
7852
7851
  : undefined,
7853
7852
  templateOptions: {
7854
- label: _.isString(model)
7853
+ label: ___NS__isString(model)
7855
7854
  ? `${model
7856
7855
  .split('.')
7857
- .map(l => _.startCase(l))
7858
- .join(' / ')} / ${_.startCase(key)}`
7859
- : _.startCase(key),
7856
+ .map(l => ___NS__startCase(l))
7857
+ .join(' / ')} / ${___NS__startCase(key)}`
7858
+ : ___NS__startCase(key),
7860
7859
  options: selectOptions,
7861
7860
  },
7862
7861
  };
@@ -7898,30 +7897,30 @@ function getFromlyConfigFor(target, options = {}) {
7898
7897
  function resolveSimpleTypes() {
7899
7898
  for (const key in target.prototype) {
7900
7899
  if (target.prototype.hasOwnProperty(key) &&
7901
- !_.isFunction(target.prototype[key])) {
7900
+ !___NS__isFunction(target.prototype[key])) {
7902
7901
  if (!isAlowedPath(key)) {
7903
7902
  continue;
7904
7903
  }
7905
- if (!_.isUndefined(mapping[key])) {
7904
+ if (!___NS__isUndefined(mapping[key])) {
7906
7905
  continue;
7907
7906
  }
7908
7907
  const element = target.prototype[key];
7909
7908
  let type = 'input';
7910
- if (_.isBoolean(element)) {
7909
+ if (___NS__isBoolean(element)) {
7911
7910
  type = 'switch';
7912
7911
  }
7913
- else if (_.isDate(element)) {
7912
+ else if (___NS__isDate(element)) {
7914
7913
  type = 'datepicker';
7915
7914
  }
7916
- else if (_.isFunction(target['getOptionsFor'])) {
7915
+ else if (___NS__isFunction(target['getOptionsFor'])) {
7917
7916
  var selectOptions = target['getOptionsFor'](key);
7918
- if (!_.isUndefined(selectOptions)) {
7917
+ if (!___NS__isUndefined(selectOptions)) {
7919
7918
  type = 'select';
7920
7919
  }
7921
7920
  }
7922
- else if (_.isFunction(target.prototype?.getOptionsFor)) {
7921
+ else if (___NS__isFunction(target.prototype?.getOptionsFor)) {
7923
7922
  var selectOptions = target.prototype?.getOptionsFor(key);
7924
- if (!_.isUndefined(selectOptions)) {
7923
+ if (!___NS__isUndefined(selectOptions)) {
7925
7924
  type = 'select';
7926
7925
  }
7927
7926
  }
@@ -7936,10 +7935,10 @@ function getFromlyConfigFor(target, options = {}) {
7936
7935
  fieldNames
7937
7936
  .filter(key => !simpleResolved.includes(key))
7938
7937
  .forEach(key => {
7939
- if (isAlowedPath(key) && !_.isUndefined(mapping[key])) {
7938
+ if (isAlowedPath(key) && !___NS__isUndefined(mapping[key])) {
7940
7939
  let className = mapping[key];
7941
- const isArray = _.isArray(className);
7942
- className = isArray ? _.first(className) : className;
7940
+ const isArray = ___NS__isArray(className);
7941
+ className = isArray ? ___NS__first(className) : className;
7943
7942
  if (className === 'Date') {
7944
7943
  fields.push(inputToPush(key, 'datepicker', parentModel));
7945
7944
  }
@@ -8030,10 +8029,10 @@ const Taon__NS__getResponseValue = getResponseValue;
8030
8029
  // export import Middleware = middlewareDecorator.TaonMiddleware;
8031
8030
  //#endregion
8032
8031
  //#region aliases to helpers
8033
- const Taon__NS__isBrowser = coreHelpers.Helpers.isBrowser;
8034
- const Taon__NS__isNode = coreHelpers.Helpers.isNode;
8035
- const Taon__NS__isWebSQL = coreHelpers.Helpers.isWebSQL;
8036
- const Taon__NS__isElectron = coreHelpers.Helpers.isElectron;
8032
+ const Taon__NS__isBrowser = UtilsOs__NS__isBrowser;
8033
+ const Taon__NS__isNode = UtilsOs__NS__isNode;
8034
+ const Taon__NS__isWebSQL = UtilsOs__NS__isWebSQL;
8035
+ const Taon__NS__isElectron = UtilsOs__NS__isElectron;
8037
8036
  //#endregion
8038
8037
  const Taon__NS__createContext = createContext;
8039
8038
  const Taon__NS__createContextTemplate = createContextTemplate;