taon 19.0.45 → 19.0.46

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 (114) hide show
  1. package/browser/fesm2022/taon.mjs +113 -31
  2. package/browser/fesm2022/taon.mjs.map +1 -1
  3. package/browser/lib/context-db-migrations.d.ts +1 -1
  4. package/browser/lib/create-context.d.ts +9 -0
  5. package/browser/lib/endpoint-context.d.ts +4 -0
  6. package/browser/package.json +1 -1
  7. package/lib/build-info._auto-generated_.d.ts +1 -1
  8. package/lib/build-info._auto-generated_.js +1 -1
  9. package/lib/create-context.d.ts +9 -0
  10. package/lib/create-context.js +10 -2
  11. package/lib/create-context.js.map +1 -1
  12. package/lib/endpoint-context.d.ts +4 -0
  13. package/lib/endpoint-context.js +205 -121
  14. package/lib/endpoint-context.js.map +1 -1
  15. package/lib/env/env.angular-node-app.d.ts +6 -0
  16. package/lib/env/env.angular-node-app.js +8 -2
  17. package/lib/env/env.angular-node-app.js.map +1 -1
  18. package/lib/env/env.docs-webapp.d.ts +6 -0
  19. package/lib/env/env.docs-webapp.js +8 -2
  20. package/lib/env/env.docs-webapp.js.map +1 -1
  21. package/lib/env/env.electron-app.d.ts +6 -0
  22. package/lib/env/env.electron-app.js +8 -2
  23. package/lib/env/env.electron-app.js.map +1 -1
  24. package/lib/env/env.mobile-app.d.ts +6 -0
  25. package/lib/env/env.mobile-app.js +8 -2
  26. package/lib/env/env.mobile-app.js.map +1 -1
  27. package/lib/env/env.npm-lib-and-cli-tool.d.ts +6 -0
  28. package/lib/env/env.npm-lib-and-cli-tool.js +8 -2
  29. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  30. package/lib/env/env.vscode-plugin.d.ts +6 -0
  31. package/lib/env/env.vscode-plugin.js +8 -2
  32. package/lib/env/env.vscode-plugin.js.map +1 -1
  33. package/lib/ui/index.js +2 -2
  34. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  35. package/package.json +1 -1
  36. package/websql/fesm2022/taon.mjs +135 -62
  37. package/websql/fesm2022/taon.mjs.map +1 -1
  38. package/websql/lib/create-context.d.ts +9 -0
  39. package/websql/lib/endpoint-context.d.ts +4 -0
  40. package/websql/package.json +1 -1
  41. package/browser/lib/env.d.ts +0 -3
  42. package/env.d.ts +0 -3
  43. package/environments/angular-node-app/env.angular-node-app.__.d.ts +0 -3
  44. package/environments/angular-node-app/env.angular-node-app.dev.d.ts +0 -3
  45. package/environments/angular-node-app/env.angular-node-app.localhost.d.ts +0 -3
  46. package/environments/angular-node-app/env.angular-node-app.prod.d.ts +0 -3
  47. package/environments/angular-node-app/env.angular-node-app.stage.d.ts +0 -3
  48. package/environments/docs-webapp/env.docs-webapp.__.d.ts +0 -3
  49. package/environments/electron-app/env.electron-app.__.d.ts +0 -3
  50. package/environments/electron-app/env.electron-app.prod.d.ts +0 -3
  51. package/environments/mobile-app/env.mobile-app.__.d.ts +0 -3
  52. package/environments/mobile-app/env.mobile-app.prod.d.ts +0 -3
  53. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.__.d.ts +0 -3
  54. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.prod.d.ts +0 -3
  55. package/environments/vscode-plugin/env.vscode-plugin.__.d.ts +0 -6
  56. package/environments/vscode-plugin/env.vscode-plugin.prod.d.ts +0 -4
  57. package/lib/env.d.ts +0 -2
  58. package/lib/env.js +0 -7
  59. package/lib/env.js.map +0 -1
  60. package/lib/storage.d.ts +0 -1
  61. package/lib/storage.js +0 -6
  62. package/lib/storage.js.map +0 -1
  63. package/lib/ui/directives/index.d.ts +0 -3
  64. package/lib/ui/directives/index.js +0 -5
  65. package/lib/ui/directives/index.js.map +0 -1
  66. package/lib/ui/directives/safe.pipe.d.ts +0 -7
  67. package/lib/ui/directives/taon-inject-html.directive.d.ts +0 -6
  68. package/lib/ui/directives/taon-long-press.directive.d.ts +0 -22
  69. package/lib/ui/directives/view-mode.d.ts +0 -5
  70. package/lib/ui/directives/view-mode.js +0 -10
  71. package/lib/ui/directives/view-mode.js.map +0 -1
  72. package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +0 -43
  73. package/lib/ui/taon-admin-mode-configuration/taon-admin.models.d.ts +0 -5
  74. package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js +0 -3
  75. package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js.map +0 -1
  76. package/lib/ui/taon-full-material.module.d.ts +0 -5
  77. package/lib/ui/taon-github-fork-me-corner/index.d.ts +0 -2
  78. package/lib/ui/taon-github-fork-me-corner/index.js +0 -5
  79. package/lib/ui/taon-github-fork-me-corner/index.js.map +0 -1
  80. package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +0 -3
  81. package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +0 -2
  82. package/lib/ui/taon-github-fork-me-ribbon/index.d.ts +0 -2
  83. package/lib/ui/taon-github-fork-me-ribbon/index.js +0 -5
  84. package/lib/ui/taon-github-fork-me-ribbon/index.js.map +0 -1
  85. package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.component.d.ts +0 -3
  86. package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.module.d.ts +0 -2
  87. package/lib/ui/taon-notifications/index.d.ts +0 -4
  88. package/lib/ui/taon-notifications/index.js +0 -24
  89. package/lib/ui/taon-notifications/index.js.map +0 -1
  90. package/lib/ui/taon-notifications/taon-notifications.component.d.ts +0 -9
  91. package/lib/ui/taon-notifications/taon-notifications.models.d.ts +0 -6
  92. package/lib/ui/taon-notifications/taon-notifications.models.js +0 -5
  93. package/lib/ui/taon-notifications/taon-notifications.models.js.map +0 -1
  94. package/lib/ui/taon-notifications/taon-notifications.module.d.ts +0 -2
  95. package/lib/ui/taon-notifications/taon-notifications.service.d.ts +0 -11
  96. package/lib/ui/taon-progress-bar/index.d.ts +0 -2
  97. package/lib/ui/taon-progress-bar/index.js +0 -5
  98. package/lib/ui/taon-progress-bar/index.js.map +0 -1
  99. package/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +0 -13
  100. package/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +0 -2
  101. package/lib/ui/taon-session-passcode/index.d.ts +0 -1
  102. package/lib/ui/taon-session-passcode/index.js +0 -5
  103. package/lib/ui/taon-session-passcode/index.js.map +0 -1
  104. package/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +0 -35
  105. package/lib/ui/taon-table/index.d.ts +0 -2
  106. package/lib/ui/taon-table/index.js +0 -5
  107. package/lib/ui/taon-table/index.js.map +0 -1
  108. package/lib/ui/taon-table/taon-table.component.d.ts +0 -34
  109. package/lib/ui/taon-table/taon-table.module.d.ts +0 -2
  110. package/lib/ui/taon.models.d.ts +0 -11
  111. package/lib/ui/taon.models.js +0 -3
  112. package/lib/ui/taon.models.js.map +0 -1
  113. package/tmp-environment.json +0 -32
  114. package/websql/lib/env.d.ts +0 -3
@@ -13,7 +13,6 @@ import axios from 'axios';
13
13
  import { JSON10 } from 'json10/browser';
14
14
  import { Observable, from, Subject } from 'rxjs';
15
15
  import { io } from 'socket.io-client';
16
- import { Stor } from 'taon-storage/browser';
17
16
 
18
17
  var Symbols;
19
18
  (function (Symbols) {
@@ -1367,8 +1366,6 @@ class DITaonContainer {
1367
1366
  }
1368
1367
  }
1369
1368
 
1370
- const ENV$1 = Helpers.isBrowser ? window['ENV'] : global['ENV'];
1371
-
1372
1369
  const getResponseValue = (response, options) => {
1373
1370
  /* */
1374
1371
  /* */
@@ -2701,6 +2698,11 @@ class EndpointContext {
2701
2698
  constructor(originalConfig, configFn) {
2702
2699
  this.originalConfig = originalConfig;
2703
2700
  this.configFn = configFn;
2701
+ //#region static
2702
+ /**
2703
+ * JUST FOR TESTING PURPOSES
2704
+ */
2705
+ this.USE_MARIADB_MYSQL_IN_DOCKER = false;
2704
2706
  //#endregion
2705
2707
  // public static findForTraget(classFnOrObject: any): EndpointContext {
2706
2708
  // const obj = ClassHelpers.getClassFnFromObject(classFnOrObject) || {};
@@ -2871,7 +2873,7 @@ class EndpointContext {
2871
2873
  this.onlyMigrationRun = onlyMigrationRun;
2872
2874
  // @ts-ignore
2873
2875
  this.onlyMigrationRevertToTimestamp = onlyMigrationRevertToTimestamp;
2874
- this.config = this.configFn(ENV$1);
2876
+ this.config = this.configFn({});
2875
2877
  if (_.isObject(this.config.database)) {
2876
2878
  this.config.database = Models.DatabaseConfig.from(this.config.database).databaseConfigTypeORM;
2877
2879
  }
@@ -2934,10 +2936,34 @@ class EndpointContext {
2934
2936
  //#endregion
2935
2937
  //#region resolve database config
2936
2938
  if (this.config.database === true) {
2939
+ this.logFramework &&
2940
+ console.log(`
2941
+
2942
+ ASSIGNING AUTO GENERATED DATABASE CONFIG
2943
+
2944
+ `);
2937
2945
  this.databaseConfig = this.getAutoGeneratedConfig();
2938
2946
  }
2939
2947
  else if (_.isObject(this.config.database)) {
2940
- this.databaseConfig = _.merge(this.getAutoGeneratedConfig(), _.cloneDeep(this.config.database));
2948
+ this.logFramework &&
2949
+ console.log(`
2950
+
2951
+ OVERRIDE DATABASE CONFIG FROM CONFIGURATION
2952
+
2953
+ `);
2954
+ this.databaseConfig = this.getAutoGeneratedConfig();
2955
+ walk.Object(this.config.database, (value, lodashPath) => {
2956
+ if (_.isNil(value) || _.isFunction(value) || _.isObject(value)) {
2957
+ // skipping
2958
+ }
2959
+ else {
2960
+ this.logFramework &&
2961
+ console.info(`Overriding database config: ${lodashPath}=${value}`);
2962
+ _.set(this.databaseConfig, lodashPath, value);
2963
+ }
2964
+ }, {
2965
+ walkGetters: false,
2966
+ });
2941
2967
  }
2942
2968
  //#endregion
2943
2969
  //#region resolve session
@@ -3088,6 +3114,54 @@ class EndpointContext {
3088
3114
  //#endregion
3089
3115
  //#region methods & getters / get auto generated config
3090
3116
  getAutoGeneratedConfig() {
3117
+ this.logFramework &&
3118
+ console.log(`
3119
+
3120
+
3121
+ IS RUNNING IN DOCKER: ${UtilsOs.isRunningInDocker()}
3122
+
3123
+ `);
3124
+ /* */
3125
+ /* */
3126
+ /* */
3127
+ /* */
3128
+ /* */
3129
+ /* */
3130
+ /* */
3131
+ /* */
3132
+ /* */
3133
+ /* */
3134
+ /* */
3135
+ /* */
3136
+ /* */
3137
+ /* */
3138
+ /* */
3139
+ /* */
3140
+ /* */
3141
+ /* */
3142
+ /* */
3143
+ /* */
3144
+ /* */
3145
+ /* */
3146
+ /* */
3147
+ /* */
3148
+ /* */
3149
+ /* */
3150
+ /* */
3151
+ /* */
3152
+ /* */
3153
+ /* */
3154
+ /* */
3155
+ /* */
3156
+ /* */
3157
+ /* */
3158
+ /* */
3159
+ /* */
3160
+ /* */
3161
+ /* */
3162
+ /* */
3163
+ /* */
3164
+ /* */
3091
3165
  /* */
3092
3166
  /* */
3093
3167
  /* */
@@ -3204,6 +3278,7 @@ class EndpointContext {
3204
3278
  /* */
3205
3279
  /* */
3206
3280
  /* */
3281
+ /* */
3207
3282
  return (void 0);
3208
3283
  }
3209
3284
  //#endregion
@@ -3744,6 +3819,22 @@ class EndpointContext {
3744
3819
  /* */
3745
3820
  /* */
3746
3821
  /* */
3822
+ /* */
3823
+ /* */
3824
+ /* */
3825
+ /* */
3826
+ /* */
3827
+ /* */
3828
+ /* */
3829
+ /* */
3830
+ /* */
3831
+ /* */
3832
+ /* */
3833
+ /* */
3834
+ /* */
3835
+ /* */
3836
+ /* */
3837
+ /* */
3747
3838
  return (void 0);
3748
3839
  }
3749
3840
  //#endregion
@@ -4305,14 +4396,8 @@ class EndpointContext {
4305
4396
  this.logHttp && console.log(`${type?.toUpperCase()} ${expressPath} `);
4306
4397
  // console.log('INITING', methodConfig); // TODO inject in static
4307
4398
  //#region resolve storage
4308
- let storage;
4309
- if (Helpers.isBrowser) {
4310
- storage = window;
4311
- }
4312
- /* */
4313
- /* */
4314
- /* */
4315
- /* */
4399
+ // TODO not a good idea
4400
+ const storage = globalThis;
4316
4401
  //#endregion
4317
4402
  const orgMethods = target.prototype[methodConfig.methodName];
4318
4403
  //#region handle electron ipc request
@@ -4498,6 +4583,9 @@ class EndpointContext {
4498
4583
  /* */
4499
4584
  /* */
4500
4585
  /* */
4586
+ /* */
4587
+ /* */
4588
+ /* */
4501
4589
  //#endregion
4502
4590
  //#region handle normal request
4503
4591
  target.prototype[methodConfig.methodName] = function (...args) {
@@ -4647,8 +4735,9 @@ instead
4647
4735
  }
4648
4736
  }
4649
4737
 
4738
+ //#region import
4650
4739
  //#endregion
4651
- const ENV = Helpers.isBrowser ? window['ENV'] : global['ENV'];
4740
+ const ENV = globalThis['ENV'];
4652
4741
  // @Injectable({ providedIn: 'root' }) TODO make it angular service
4653
4742
  class TaonAdminService {
4654
4743
  static get Instance() {
@@ -4691,32 +4780,25 @@ class TaonAdminService {
4691
4780
  }
4692
4781
  logout() { }
4693
4782
  }
4694
- __decorate([
4695
- (Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
4696
- __metadata("design:type", Boolean)
4697
- ], TaonAdminService.prototype, "adminPanelIsOpen", void 0);
4698
- __decorate([
4699
- (Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
4700
- __metadata("design:type", Boolean)
4701
- ], TaonAdminService.prototype, "draggablePopupMode", void 0);
4702
- __decorate([
4703
- (Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
4704
- __metadata("design:type", Boolean)
4705
- ], TaonAdminService.prototype, "draggablePopupModeFullScreen", void 0);
4706
- __decorate([
4707
- (Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
4708
- __metadata("design:type", Boolean)
4709
- ], TaonAdminService.prototype, "keepWebsqlDbDataAfterReload", void 0);
4710
4783
 
4711
4784
  //#region imports
4712
4785
  //#endregion
4786
+ /**
4787
+ * @returns function that returns context function.
4788
+ * Context function can be used to dynamically
4789
+ * create context with specific configuration.
4790
+ */
4713
4791
  const createContextTemplate = (configFn) => {
4714
4792
  return () => {
4715
4793
  return createContext(configFn);
4716
4794
  };
4717
4795
  };
4796
+ /**
4797
+ * REQURIED PROPERTY:
4798
+ * - contextName
4799
+ */
4718
4800
  const createContext = (configFn) => {
4719
- let config = configFn(ENV$1);
4801
+ let config = configFn({});
4720
4802
  const endpointContextRef = new EndpointContext(config, configFn);
4721
4803
  const res = {
4722
4804
  //#region types