taon 21.0.94 → 21.0.99

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 (72) hide show
  1. package/VERIFIED-BUILD-DATA.jsonc +3 -3
  2. package/browser/fesm2022/taon-browser.mjs +282 -8
  3. package/browser/fesm2022/taon-browser.mjs.map +1 -1
  4. package/browser/package.json +1 -1
  5. package/browser/types/taon-browser.d.ts +27 -13
  6. package/browser-prod/fesm2022/taon-browser-prod.mjs +282 -8
  7. package/browser-prod/fesm2022/taon-browser-prod.mjs.map +1 -1
  8. package/browser-prod/package.json +1 -1
  9. package/browser-prod/types/taon-browser-prod.d.ts +28 -14
  10. package/browser-prod.split-namespaces.json +0 -2
  11. package/lib/base-classes/base-angular-service.js +6 -2
  12. package/lib/base-classes/base-angular-service.js.map +1 -1
  13. package/lib/base-classes/base-injector.d.ts +1 -0
  14. package/lib/base-classes/base-injector.js +8 -0
  15. package/lib/base-classes/base-injector.js.map +1 -1
  16. package/lib/base-classes/base-kv-repository.d.ts +27 -0
  17. package/lib/base-classes/base-kv-repository.js +156 -0
  18. package/lib/base-classes/base-kv-repository.js.map +1 -0
  19. package/lib/build-info._auto-generated_.d.ts +1 -1
  20. package/lib/build-info._auto-generated_.js +1 -1
  21. package/lib/endpoint-context.d.ts +4 -2
  22. package/lib/endpoint-context.js +95 -32
  23. package/lib/endpoint-context.js.map +1 -1
  24. package/lib/index.d.ts +1 -0
  25. package/lib/index.js +1 -0
  26. package/lib/index.js.map +1 -1
  27. package/lib/models.d.ts +1 -11
  28. package/lib/models.js.map +1 -1
  29. package/lib/orm/columns.d.ts +4 -0
  30. package/lib/orm/columns.js +11 -1
  31. package/lib/orm/columns.js.map +1 -1
  32. package/lib/package.json +1 -1
  33. package/lib/ui/index.js +2 -2
  34. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  35. package/lib-prod/base-classes/base-angular-service.js +6 -2
  36. package/lib-prod/base-classes/base-angular-service.js.map +1 -1
  37. package/lib-prod/base-classes/base-injector.d.ts +1 -0
  38. package/lib-prod/base-classes/base-injector.js +8 -0
  39. package/lib-prod/base-classes/base-injector.js.map +1 -1
  40. package/lib-prod/base-classes/base-kv-repository.d.ts +27 -0
  41. package/lib-prod/base-classes/base-kv-repository.js +147 -0
  42. package/lib-prod/base-classes/base-kv-repository.js.map +1 -0
  43. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  44. package/lib-prod/build-info._auto-generated_.js +1 -1
  45. package/lib-prod/context-db-migrations.js.map +1 -1
  46. package/lib-prod/endpoint-context.d.ts +5 -3
  47. package/lib-prod/endpoint-context.js +96 -33
  48. package/lib-prod/endpoint-context.js.map +1 -1
  49. package/lib-prod/index.d.ts +1 -0
  50. package/lib-prod/index.js +1 -0
  51. package/lib-prod/index.js.map +1 -1
  52. package/lib-prod/models.d.ts +1 -11
  53. package/lib-prod/models.js.map +1 -1
  54. package/lib-prod/orm/columns.d.ts +4 -0
  55. package/lib-prod/orm/columns.js +9 -0
  56. package/lib-prod/orm/columns.js.map +1 -1
  57. package/lib-prod/package.json +1 -1
  58. package/lib-prod/ui/index.d.ts +1 -1
  59. package/lib-prod/ui/index.js +1 -1
  60. package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
  61. package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -1
  62. package/lib-prod.split-namespaces.json +0 -2
  63. package/package.json +1 -1
  64. package/websql/fesm2022/taon-websql.mjs +288 -20
  65. package/websql/fesm2022/taon-websql.mjs.map +1 -1
  66. package/websql/package.json +1 -1
  67. package/websql/types/taon-websql.d.ts +27 -13
  68. package/websql-prod/fesm2022/taon-websql-prod.mjs +288 -20
  69. package/websql-prod/fesm2022/taon-websql-prod.mjs.map +1 -1
  70. package/websql-prod/package.json +1 -1
  71. package/websql-prod/types/taon-websql-prod.d.ts +28 -14
  72. package/websql-prod.split-namespaces.json +0 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "commitHash": "842f23a053247ae3c999996c42ee2c41dcf5aa47",
3
- "commitName": "chore: update",
4
- "commitDate": "06-04-2026 12:12:22"
2
+ "commitHash": "829d2d08a1a3070c820afc9ac2b7371f8376969e",
3
+ "commitName": "feat:\n- cookie session by default\n- taon kv database\n- proper get instance of repo when outside context",
4
+ "commitDate": "10-04-2026 00:13:13"
5
5
  }
@@ -2919,11 +2919,11 @@ class EndpointContext {
2919
2919
  //#endregion
2920
2920
  //#region resolve session
2921
2921
  if (this.config.session) {
2922
- this.session = _.cloneDeep(this.config.session);
2923
- const oneHour = 1000 * 60 * 60 * 1; // 24;
2924
- if (!this.session.cookieMaxAge) {
2925
- this.session.cookieMaxAge = oneHour;
2926
- }
2922
+ // this.session = _.cloneDeep(this.config.session);
2923
+ // const oneHour = 1000 * 60 * 60 * 1; // 24;
2924
+ // if (!this.session.cookieMaxAge) {
2925
+ // this.session.cookieMaxAge = oneHour;
2926
+ // }
2927
2927
  // serever and browser cookie authentication
2928
2928
  axios.defaults.withCredentials = true;
2929
2929
  }
@@ -3239,9 +3239,63 @@ class EndpointContext {
3239
3239
  /* */
3240
3240
  /* */
3241
3241
  /* */
3242
+ /* */
3242
3243
  return (void 0);
3243
3244
  }
3244
3245
  //#endregion
3246
+ get sqlLiteDbLocation() {
3247
+ /* */
3248
+ /* */
3249
+ /* */
3250
+ /* */
3251
+ /* */
3252
+ /* */
3253
+ /* */
3254
+ /* */
3255
+ /* */
3256
+ /* */
3257
+ /* */
3258
+ /* */
3259
+ /* */
3260
+ /* */
3261
+ /* */
3262
+ return (void 0);
3263
+ }
3264
+ get electronDbLocation() {
3265
+ /* */
3266
+ /* */
3267
+ /* */
3268
+ /* */
3269
+ /* */
3270
+ /* */
3271
+ /* */
3272
+ /* */
3273
+ /* */
3274
+ /* */
3275
+ /* */
3276
+ /* */
3277
+ /* */
3278
+ /* */
3279
+ return (void 0);
3280
+ }
3281
+ get kvDbJsonLocation() {
3282
+ /* */
3283
+ /* */
3284
+ /* */
3285
+ /* */
3286
+ /* */
3287
+ /* */
3288
+ /* */
3289
+ /* */
3290
+ /* */
3291
+ /* */
3292
+ /* */
3293
+ /* */
3294
+ /* */
3295
+ /* */
3296
+ /* */
3297
+ return (void 0);
3298
+ }
3245
3299
  //#region methods & getters / start server
3246
3300
  async startServer() {
3247
3301
  /* */
@@ -3385,6 +3439,11 @@ class EndpointContext {
3385
3439
  entityName = (entity && ClassHelpers.getName(entity)) || '';
3386
3440
  // console.log(`entityName `, entityName);
3387
3441
  // }
3442
+ /* */
3443
+ /* */
3444
+ /* */
3445
+ /* */
3446
+ /* */
3388
3447
  if (!options.contextClassInstance[this.localInstaceObjSymbol]) {
3389
3448
  options.contextClassInstance[this.localInstaceObjSymbol] = {};
3390
3449
  }
@@ -3939,6 +3998,20 @@ class EndpointContext {
3939
3998
  /* */
3940
3999
  /* */
3941
4000
  /* */
4001
+ /* */
4002
+ /* */
4003
+ /* */
4004
+ /* */
4005
+ /* */
4006
+ /* */
4007
+ /* */
4008
+ /* */
4009
+ /* */
4010
+ /* */
4011
+ /* */
4012
+ /* */
4013
+ /* */
4014
+ /* */
3942
4015
  return (void 0);
3943
4016
  }
3944
4017
  //#endregion
@@ -4351,6 +4424,10 @@ class EndpointContext {
4351
4424
  /* */
4352
4425
  /* */
4353
4426
  /* */
4427
+ /* */
4428
+ /* */
4429
+ /* */
4430
+ /* */
4354
4431
  }
4355
4432
  //#endregion
4356
4433
  //#region methods & getters / init methods node
@@ -5999,8 +6076,12 @@ class TaonBaseAngularService {
5999
6076
  ? overrideCurrentContext
6000
6077
  : this.currentContext;
6001
6078
  //#endregion
6002
- if (!currentContext) {
6003
- throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
6079
+ if (!currentContext || !currentContext.__refSync.inited) {
6080
+ throw new Error(`
6081
+ Context not available. Make sure to .initialize()
6082
+ the context before injecting controllers.
6083
+
6084
+ `);
6004
6085
  }
6005
6086
  return currentContext ? currentContext.getClass(ctor) : void 0;
6006
6087
  });
@@ -6078,6 +6159,14 @@ class TaonBaseInjector {
6078
6159
  return repoProxy;
6079
6160
  }
6080
6161
  //#endregion
6162
+ //#region inject / custom repository
6163
+ injectKvRepository(cutomRepositoryClass) {
6164
+ const repoProxy = this.__inject(cutomRepositoryClass, {
6165
+ localInstance: false,
6166
+ });
6167
+ return repoProxy;
6168
+ }
6169
+ //#endregion
6081
6170
  //#region inject / custom repo
6082
6171
  /**
6083
6172
  * aliast to this.injectRepository()
@@ -7581,6 +7670,182 @@ TaonBaseCrudController = __decorate([
7581
7670
  TaonController({ className: 'TaonBaseCrudController' })
7582
7671
  ], TaonBaseCrudController);
7583
7672
 
7673
+ /**
7674
+ * Please override property entityClassFn with entity class.
7675
+ */
7676
+ let TaonBaseKvRepository = class TaonBaseKvRepository extends TaonBaseCustomRepository {
7677
+ //#region lowdb for development
7678
+ /* */
7679
+ /* */
7680
+ /* */
7681
+ /* */
7682
+ /* */
7683
+ /* */
7684
+ /* */
7685
+ /* */
7686
+ /* */
7687
+ /* */
7688
+ /* */
7689
+ /* */
7690
+ /* */
7691
+ /* */
7692
+ /* */
7693
+ /* */
7694
+ /* */
7695
+ /* */
7696
+ /* */
7697
+ /* */
7698
+ /* */
7699
+ /* */
7700
+ /* */
7701
+ /* */
7702
+ /* */
7703
+ /* */
7704
+ /* */
7705
+ /* */
7706
+ /* */
7707
+ /* */
7708
+ /* */
7709
+ /* */
7710
+ /* */
7711
+ /* */
7712
+ /* */
7713
+ /* */
7714
+ /* */
7715
+ /* */
7716
+ /* */
7717
+ //#endregion
7718
+ //#region private helpers
7719
+ normalizeKey(key) {
7720
+ return `${String(key)}`;
7721
+ }
7722
+ expirationPath(key) {
7723
+ return `__kvMeta.expirations.${this.normalizeKey(key)}`;
7724
+ }
7725
+ async getExpirationTimestamp(key) {
7726
+ /* */
7727
+ /* */
7728
+ /* */
7729
+ /* */
7730
+ return (void 0);
7731
+ }
7732
+ async isExpired(key) {
7733
+ /* */
7734
+ /* */
7735
+ /* */
7736
+ /* */
7737
+ /* */
7738
+ /* */
7739
+ /* */
7740
+ /* */
7741
+ return (void 0);
7742
+ }
7743
+ async cleanupIfExpired(key) {
7744
+ /* */
7745
+ /* */
7746
+ /* */
7747
+ /* */
7748
+ /* */
7749
+ /* */
7750
+ /* */
7751
+ /* */
7752
+ /* */
7753
+ /* */
7754
+ /* */
7755
+ /* */
7756
+ /* */
7757
+ return (void 0);
7758
+ }
7759
+ //#endregion
7760
+ async set(key, value) {
7761
+ /* */
7762
+ /* */
7763
+ /* */
7764
+ /* */
7765
+ /* */
7766
+ /* */
7767
+ /* */
7768
+ /* */
7769
+ return (void 0);
7770
+ }
7771
+ async get(key) {
7772
+ /* */
7773
+ /* */
7774
+ /* */
7775
+ /* */
7776
+ /* */
7777
+ /* */
7778
+ /* */
7779
+ /* */
7780
+ return (void 0);
7781
+ }
7782
+ async delete(key) {
7783
+ /* */
7784
+ /* */
7785
+ /* */
7786
+ /* */
7787
+ /* */
7788
+ return (void 0);
7789
+ }
7790
+ async has(key) {
7791
+ /* */
7792
+ /* */
7793
+ /* */
7794
+ /* */
7795
+ /* */
7796
+ /* */
7797
+ /* */
7798
+ /* */
7799
+ return (void 0);
7800
+ }
7801
+ async expire(key, ttlSeconds) {
7802
+ /* */
7803
+ /* */
7804
+ /* */
7805
+ /* */
7806
+ /* */
7807
+ /* */
7808
+ /* */
7809
+ /* */
7810
+ /* */
7811
+ /* */
7812
+ /* */
7813
+ return (void 0);
7814
+ }
7815
+ async ttl(key) {
7816
+ /* */
7817
+ /* */
7818
+ /* */
7819
+ /* */
7820
+ /* */
7821
+ /* */
7822
+ /* */
7823
+ /* */
7824
+ /* */
7825
+ /* */
7826
+ /* */
7827
+ /* */
7828
+ /* */
7829
+ /* */
7830
+ /* */
7831
+ /* */
7832
+ /* */
7833
+ /* */
7834
+ /* */
7835
+ /* */
7836
+ /* */
7837
+ /* */
7838
+ /* */
7839
+ /* */
7840
+ /* */
7841
+ /* */
7842
+ return (void 0);
7843
+ }
7844
+ };
7845
+ TaonBaseKvRepository = __decorate([
7846
+ TaonRepository({ className: 'TaonBaseKvRepository' })
7847
+ ], TaonBaseKvRepository);
7848
+
7584
7849
  class TaonBaseMigration extends TaonBaseInjector {
7585
7850
  /**
7586
7851
  * by default is READY to run
@@ -8195,6 +8460,15 @@ const String45Column = (defaultValue = null) => Column({
8195
8460
  nullable: _.isNil(defaultValue),
8196
8461
  default: defaultValue,
8197
8462
  });
8463
+ /**
8464
+ * 50 characters varchar
8465
+ */
8466
+ const String50Column = (defaultValue = null) => Column({
8467
+ type: 'varchar',
8468
+ length: 50,
8469
+ nullable: _.isNil(defaultValue),
8470
+ default: defaultValue,
8471
+ });
8198
8472
  /**
8199
8473
  * 500 characters varchar
8200
8474
  */
@@ -8468,5 +8742,5 @@ const TAON_FLATTEN_MAPPING = {
8468
8742
  * Generated bundle index. Do not edit.
8469
8743
  */
8470
8744
 
8471
- export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models, 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, TAON_CONTEXT, TAON_FLATTEN_MAPPING, Taon, TaonAdmin, TaonAdminPanelMode, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Validators, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
8745
+ export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, String50Column, StringColumn, Symbols, TAON_CONTEXT, TAON_FLATTEN_MAPPING, Taon, TaonAdmin, TaonAdminPanelMode, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseKvRepository, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Validators, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
8472
8746
  //# sourceMappingURL=taon-browser.mjs.map