taon 19.0.8 → 19.0.10

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 (227) hide show
  1. package/README.md +175 -175
  2. package/bin/start.js +279 -279
  3. package/bin/taon +6 -6
  4. package/bin/taon-debug +5 -5
  5. package/bin/taon-debug-brk +5 -5
  6. package/browser/README.md +24 -24
  7. package/browser/fesm2022/taon.mjs +97 -74
  8. package/browser/fesm2022/taon.mjs.map +1 -1
  9. package/browser/lib/base-classes/base-angular-service.d.ts +1 -3
  10. package/browser/lib/base-classes/base-controller.d.ts +1 -0
  11. package/browser/lib/base-classes/base-crud-controller.d.ts +1 -1
  12. package/browser/lib/base-classes/base-injector.d.ts +1 -3
  13. package/browser/lib/base-classes/base-migration.d.ts +1 -1
  14. package/browser/lib/base-classes/base-provider.d.ts +5 -0
  15. package/browser/lib/constants.d.ts +6 -1
  16. package/browser/lib/endpoint-context.d.ts +2 -2
  17. package/browser/lib/ui/taon-full-material.module.d.ts +3 -0
  18. package/browser/package.json +1 -1
  19. package/cli.js.map +1 -1
  20. package/client/README.md +24 -24
  21. package/client/fesm2022/taon.mjs +97 -74
  22. package/client/fesm2022/taon.mjs.map +1 -1
  23. package/client/lib/base-classes/base-angular-service.d.ts +1 -3
  24. package/client/lib/base-classes/base-controller.d.ts +1 -0
  25. package/client/lib/base-classes/base-crud-controller.d.ts +1 -1
  26. package/client/lib/base-classes/base-injector.d.ts +1 -3
  27. package/client/lib/base-classes/base-migration.d.ts +1 -1
  28. package/client/lib/base-classes/base-provider.d.ts +5 -0
  29. package/client/lib/constants.d.ts +6 -1
  30. package/client/lib/endpoint-context.d.ts +2 -2
  31. package/client/lib/ui/taon-full-material.module.d.ts +3 -0
  32. package/client/package.json +1 -1
  33. package/env.d.ts +3 -0
  34. package/environments/angular-node-app/env.angular-node-app.__.d.ts +3 -0
  35. package/environments/angular-node-app/env.angular-node-app.dev.d.ts +3 -0
  36. package/environments/angular-node-app/env.angular-node-app.localhost.d.ts +3 -0
  37. package/environments/angular-node-app/env.angular-node-app.prod.d.ts +3 -0
  38. package/environments/angular-node-app/env.angular-node-app.stage.d.ts +3 -0
  39. package/environments/docs-webapp/env.docs-webapp.__.d.ts +3 -0
  40. package/environments/electron-app/env.electron-app.__.d.ts +3 -0
  41. package/environments/electron-app/env.electron-app.prod.d.ts +3 -0
  42. package/environments/mobile-app/env.mobile-app.__.d.ts +3 -0
  43. package/environments/mobile-app/env.mobile-app.prod.d.ts +3 -0
  44. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.__.d.ts +3 -0
  45. package/environments/npm-lib-and-cli-tool/env.npm-lib-and-cli-tool.prod.d.ts +3 -0
  46. package/environments/vscode-plugin/env.vscode-plugin.__.d.ts +6 -0
  47. package/environments/vscode-plugin/env.vscode-plugin.prod.d.ts +4 -0
  48. package/index.js.map +1 -1
  49. package/lib/base-classes/base-abstract-entity.js.map +1 -1
  50. package/lib/base-classes/base-angular-service.d.ts +2 -4
  51. package/lib/base-classes/base-angular-service.js +0 -5
  52. package/lib/base-classes/base-angular-service.js.map +1 -1
  53. package/lib/base-classes/base-class.js.map +1 -1
  54. package/lib/base-classes/base-context.js.map +1 -1
  55. package/lib/base-classes/base-controller.d.ts +1 -0
  56. package/lib/base-classes/base-controller.js +1 -0
  57. package/lib/base-classes/base-controller.js.map +1 -1
  58. package/lib/base-classes/base-crud-controller.d.ts +1 -1
  59. package/lib/base-classes/base-crud-controller.js +4 -4
  60. package/lib/base-classes/base-crud-controller.js.map +1 -1
  61. package/lib/base-classes/base-custom-repository.js.map +1 -1
  62. package/lib/base-classes/base-entity.js.map +1 -1
  63. package/lib/base-classes/base-injector.d.ts +1 -3
  64. package/lib/base-classes/base-injector.js +2 -11
  65. package/lib/base-classes/base-injector.js.map +1 -1
  66. package/lib/base-classes/base-migration.d.ts +1 -1
  67. package/lib/base-classes/base-migration.js.map +1 -1
  68. package/lib/base-classes/base-provider.d.ts +5 -0
  69. package/lib/base-classes/base-provider.js +5 -0
  70. package/lib/base-classes/base-provider.js.map +1 -1
  71. package/lib/base-classes/base-repository.js.map +1 -1
  72. package/lib/base-classes/base-subscriber-for-entity.js.map +1 -1
  73. package/lib/base-classes/base.js.map +1 -1
  74. package/lib/build-info._auto-generated_.d.ts +1 -1
  75. package/lib/build-info._auto-generated_.js +1 -1
  76. package/lib/build-info._auto-generated_.js.map +1 -1
  77. package/lib/constants.d.ts +6 -1
  78. package/lib/constants.js +21 -0
  79. package/lib/constants.js.map +1 -1
  80. package/lib/context-db-migrations.js.map +1 -1
  81. package/lib/create-context.js.map +1 -1
  82. package/lib/decorators/classes/controller-decorator.js.map +1 -1
  83. package/lib/decorators/classes/entity-decorator.js.map +1 -1
  84. package/lib/decorators/classes/migration-decorator.js.map +1 -1
  85. package/lib/decorators/classes/provider-decorator.js.map +1 -1
  86. package/lib/decorators/classes/repository-decorator.js.map +1 -1
  87. package/lib/decorators/classes/subscriber-decorator.js.map +1 -1
  88. package/lib/decorators/http/http-decorators.js.map +1 -1
  89. package/lib/decorators/http/http-methods-decorators.js.map +1 -1
  90. package/lib/decorators/http/http-params-decorators.js.map +1 -1
  91. package/lib/dependency-injection/di-container.js.map +1 -1
  92. package/lib/endpoint-context.d.ts +2 -2
  93. package/lib/endpoint-context.js.map +1 -1
  94. package/lib/entity-process.js.map +1 -1
  95. package/lib/env.js.map +1 -1
  96. package/lib/formly/formly-group-wrapper-component.js.map +1 -1
  97. package/lib/formly/formly-repeat-component.js.map +1 -1
  98. package/lib/formly/formly.models.js.map +1 -1
  99. package/lib/formly/fromly.js.map +1 -1
  100. package/lib/formly/type-from-entity.js.map +1 -1
  101. package/lib/get-response-value.js.map +1 -1
  102. package/lib/helpers/class-helpers.js.map +1 -1
  103. package/lib/helpers/taon-helpers.js.map +1 -1
  104. package/lib/index._auto-generated_.js.map +1 -1
  105. package/lib/index.js.map +1 -1
  106. package/lib/inject.js.map +1 -1
  107. package/lib/models.js.map +1 -1
  108. package/lib/orm.js.map +1 -1
  109. package/lib/realtime/realtime-client.js.map +1 -1
  110. package/lib/realtime/realtime-core.js.map +1 -1
  111. package/lib/realtime/realtime-server.js.map +1 -1
  112. package/lib/realtime/realtime-strategy/index.js.map +1 -1
  113. package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
  114. package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
  115. package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
  116. package/lib/realtime/realtime-strategy/realtime-strategy.js.map +1 -1
  117. package/lib/realtime/realtime-subs-manager.js.map +1 -1
  118. package/lib/realtime/realtime.models.js.map +1 -1
  119. package/lib/storage.js.map +1 -1
  120. package/lib/symbols.js.map +1 -1
  121. package/lib/ui/directives/index.js +2 -2
  122. package/lib/ui/directives/index.js.map +1 -1
  123. package/lib/ui/directives/view-mode.js.map +1 -1
  124. package/lib/ui/index.js +2 -2
  125. package/lib/ui/index.js.map +1 -1
  126. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  127. package/lib/ui/taon-admin-mode-configuration/index.js.map +1 -1
  128. package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js.map +1 -1
  129. package/lib/ui/taon-full-material.module.d.ts +3 -0
  130. package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
  131. package/lib/ui/taon-github-fork-me-corner/index.js.map +1 -1
  132. package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
  133. package/lib/ui/taon-github-fork-me-ribbon/index.js.map +1 -1
  134. package/lib/ui/taon-notifications/index.js.map +1 -1
  135. package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
  136. package/lib/ui/taon-notifications/taon-notifications.models.js.map +1 -1
  137. package/lib/ui/taon-progress-bar/index.js +2 -2
  138. package/lib/ui/taon-progress-bar/index.js.map +1 -1
  139. package/lib/ui/taon-session-passcode/index.js +2 -2
  140. package/lib/ui/taon-session-passcode/index.js.map +1 -1
  141. package/lib/ui/taon-table/index.js +2 -2
  142. package/lib/ui/taon-table/index.js.map +1 -1
  143. package/lib/ui/taon.models.js.map +1 -1
  144. package/lib/validators.js.map +1 -1
  145. package/migrations/index.js.map +1 -1
  146. package/migrations/migrations_index._auto-generated_.js.map +1 -1
  147. package/old-app .js.map +1 -1
  148. package/package.json +1 -1
  149. package/playground.js.map +1 -1
  150. package/tmp-environment.json +3 -3
  151. package/websql/README.md +24 -24
  152. package/websql/fesm2022/taon.mjs +97 -74
  153. package/websql/fesm2022/taon.mjs.map +1 -1
  154. package/websql/lib/base-classes/base-angular-service.d.ts +1 -3
  155. package/websql/lib/base-classes/base-controller.d.ts +1 -0
  156. package/websql/lib/base-classes/base-crud-controller.d.ts +1 -1
  157. package/websql/lib/base-classes/base-injector.d.ts +1 -3
  158. package/websql/lib/base-classes/base-migration.d.ts +1 -1
  159. package/websql/lib/base-classes/base-provider.d.ts +5 -0
  160. package/websql/lib/constants.d.ts +6 -1
  161. package/websql/lib/endpoint-context.d.ts +2 -2
  162. package/websql/lib/ui/taon-full-material.module.d.ts +3 -0
  163. package/websql/package.json +1 -1
  164. package/lib/base-classes/base-subscriber.d.ts +0 -4
  165. package/lib/base-classes/base-subscriber.js +0 -25
  166. package/lib/base-classes/base-subscriber.js.map +0 -1
  167. package/lib/realtime/realtime-strategy/realtime-abstract-mock.d.ts +0 -10
  168. package/lib/realtime/realtime-strategy/realtime-abstract-mock.js +0 -214
  169. package/lib/realtime/realtime-strategy/realtime-abstract-mock.js.map +0 -1
  170. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
  171. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +0 -5
  172. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js.map +0 -1
  173. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +0 -22
  174. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +0 -139
  175. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +0 -1
  176. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +0 -16
  177. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +0 -68
  178. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +0 -1
  179. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +0 -10
  180. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +0 -56
  181. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +0 -1
  182. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +0 -10
  183. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +0 -50
  184. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +0 -1
  185. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +0 -13
  186. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +0 -3
  187. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +0 -1
  188. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +0 -2
  189. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +0 -6
  190. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +0 -1
  191. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +0 -16
  192. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +0 -54
  193. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +0 -1
  194. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +0 -17
  195. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +0 -52
  196. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +0 -1
  197. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +0 -11
  198. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +0 -39
  199. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +0 -1
  200. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +0 -13
  201. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +0 -46
  202. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +0 -1
  203. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +0 -11
  204. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +0 -3
  205. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +0 -1
  206. package/lib/ui/directives/firedev-inject-html.directive.d.ts +0 -6
  207. package/lib/ui/directives/firedev-long-press.directive.d.ts +0 -22
  208. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -2
  209. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +0 -5
  210. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +0 -1
  211. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -29
  212. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -2
  213. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +0 -1
  214. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +0 -5
  215. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +0 -1
  216. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +0 -8
  217. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -2
  218. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +0 -5
  219. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +0 -1
  220. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -13
  221. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -2
  222. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +0 -5
  223. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +0 -3
  224. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +0 -1
  225. package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -14
  226. package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -2
  227. package/lib/ui/toan-full-material.module.d.ts +0 -2
@@ -6,9 +6,7 @@ import * as i0 from "@angular/core";
6
6
  * with init(ctx)
7
7
  */
8
8
  export declare abstract class BaseAngularsService {
9
- protected currentContext: TaonContext;
10
- init(currentContext: TaonContext): void;
11
- protected abstract initControllers(): void;
9
+ currentContext: TaonContext;
12
10
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseAngularsService, never>;
13
11
  static ɵprov: i0.ɵɵInjectableDeclaration<BaseAngularsService>;
14
12
  }
@@ -2,6 +2,7 @@
2
2
  import { BaseInjector } from './base-injector';
3
3
  export declare class BaseController extends BaseInjector {
4
4
  /**
5
+ * @deprecated use migration instead
5
6
  * THIS ONLY WORKS IF NO MIGRATIONS PROVIDED IN CONFIG
6
7
  * Purpose: init example data for db.
7
8
  */
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
+ import { Models } from '../models';
2
3
  import { BaseController } from './base-controller';
3
4
  import { BaseRepository } from './base-repository';
4
- import { Models } from '../models';
5
5
  /**
6
6
  * Please override property entityClassFn with entity class.
7
7
  */
@@ -1,9 +1,8 @@
1
1
  // @ts-nocheck
2
2
  import { EndpointContext } from '../endpoint-context';
3
- import { BaseClass } from './base-class';
4
3
  import { BaseCustomRepository } from './base-custom-repository';
5
4
  import type { BaseRepository } from './base-repository';
6
- export declare class BaseInjector<CloneT extends BaseClass = any> {
5
+ export declare class BaseInjector {
7
6
  /**
8
7
  * for proxy purposes
9
8
  */
@@ -67,5 +66,4 @@ export declare class BaseInjector<CloneT extends BaseClass = any> {
67
66
  * TODO addd nest js injecting
68
67
  */
69
68
  private __inject;
70
- clone(override: Partial<CloneT>): CloneT;
71
69
  }
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- import { BaseInjector } from './base-injector';
3
2
  import { MigrationInterface, QueryRunner } from 'taon-typeorm/websql';
3
+ import { BaseInjector } from './base-injector';
4
4
  export declare class BaseMigration extends BaseInjector implements MigrationInterface {
5
5
  /**
6
6
  * by default is READY to run
@@ -1,4 +1,9 @@
1
1
  // @ts-nocheck
2
2
  import { BaseInjector } from './base-injector';
3
+ /**
4
+ * TODO
5
+ * - global provider available in all contexts
6
+ * - provider available in own context
7
+ */
3
8
  export declare class BaseProvider extends BaseInjector {
4
9
  }
@@ -1,2 +1,7 @@
1
1
  // @ts-nocheck
2
- export type TaonEntityKeysToOmit = 'ctrl' | 'clone' | '__endpoint_context__' | 'inject' | '_';
2
+ export type TaonEntityKeysToOmit = 'ctrl' | 'clone' | '__endpoint_context__' | 'ctx' | 'inject' | '_' | 'relation' | 'relations' | 'inject' | 'injectRepo' | 'injectCustomRepository' | 'injectCustomRepo' | 'injectController' | 'injectCtrl' | 'injectGlobalProvider' | 'injectLocalProvider' | 'injectContextProvider';
3
+ export declare const TaonEntityKeysToOmitArr: TaonEntityKeysToOmit[];
4
+ import { InjectionToken } from '@angular/core';
5
+ import type { TaonContext } from './create-context';
6
+ declare let TAON_CONTEXT: InjectionToken<TaonContext>;
7
+ export { TAON_CONTEXT };
@@ -4,7 +4,7 @@ import type { NgZone } from '@angular/core';
4
4
  import type { Application } from 'express';
5
5
  import type { Repository } from 'taon-typeorm/websql';
6
6
  import { DataSource } from 'taon-typeorm/websql';
7
- import type { BaseClass } from './base-classes/base-class';
7
+ import type { BaseInjector } from './base-classes/base-injector';
8
8
  import { ContextDbMigrations } from './context-db-migrations';
9
9
  import { Models } from './models';
10
10
  export declare class EndpointContext {
@@ -78,7 +78,7 @@ export declare class EndpointContext {
78
78
  private getClassesInstancesArrBy;
79
79
  inject<T>(ctor: new (...args: any[]) => T, options: {
80
80
  localInstance?: boolean;
81
- contextClassInstance?: BaseClass;
81
+ contextClassInstance?: BaseInjector;
82
82
  locaInstanceConstructorArgs?: ConstructorParameters<typeof ctor>;
83
83
  parentInstanceThatWillGetInjectedStuff: object;
84
84
  }): T;
@@ -40,6 +40,9 @@ import * as i37 from "@angular/material/toolbar";
40
40
  import * as i38 from "@angular/material/tooltip";
41
41
  import * as i39 from "@angular/material/tree";
42
42
  import * as i40 from "@angular/cdk/scrolling";
43
+ /**
44
+ * @deprecated too heavy!
45
+ */
43
46
  export declare class TaonFullMaterialModule {
44
47
  static ɵfac: i0.ɵɵFactoryDeclaration<TaonFullMaterialModule, never>;
45
48
  static ɵmod: i0.ɵɵNgModuleDeclaration<TaonFullMaterialModule, never, never, [typeof i1.A11yModule, typeof i2.CdkStepperModule, typeof i3.CdkTableModule, typeof i4.CdkTreeModule, typeof i5.DragDropModule, typeof i6.MatAutocompleteModule, typeof i7.MatBadgeModule, typeof i8.MatBottomSheetModule, typeof i9.MatButtonModule, typeof i10.MatButtonToggleModule, typeof i11.MatCardModule, typeof i12.MatCheckboxModule, typeof i13.MatChipsModule, typeof i14.MatStepperModule, typeof i15.MatDatepickerModule, typeof i16.MatDialogModule, typeof i17.MatDividerModule, typeof i18.MatExpansionModule, typeof i19.MatGridListModule, typeof i20.MatIconModule, typeof i21.MatInputModule, typeof i22.MatListModule, typeof i23.MatMenuModule, typeof i24.MatNativeDateModule, typeof i25.MatPaginatorModule, typeof i26.MatProgressBarModule, typeof i27.MatProgressSpinnerModule, typeof i28.MatRadioModule, typeof i24.MatRippleModule, typeof i29.MatSelectModule, typeof i30.MatSidenavModule, typeof i31.MatSliderModule, typeof i32.MatSlideToggleModule, typeof i33.MatSnackBarModule, typeof i34.MatSortModule, typeof i35.MatTableModule, typeof i36.MatTabsModule, typeof i37.MatToolbarModule, typeof i38.MatTooltipModule, typeof i39.MatTreeModule, typeof i40.ScrollingModule]>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon/websql",
3
- "version": "19.0.8",
3
+ "version": "19.0.10",
4
4
  "module": "fesm2022/taon.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {
@@ -1,4 +0,0 @@
1
- import { BaseInjector } from './base-injector';
2
- export declare abstract class BaseSubscriber<Entity = any> extends BaseInjector {
3
- protected __trigger_event__(eventName: keyof Entity): void;
4
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseSubscriber = void 0;
4
- var tslib_1 = require("tslib");
5
- var base_injector_1 = require("./base-injector");
6
- var subscriber_decorator_1 = require("../decorators/classes/subscriber-decorator");
7
- var BaseSubscriber = /** @class */ (function (_super) {
8
- tslib_1.__extends(BaseSubscriber, _super);
9
- function BaseSubscriber() {
10
- return _super !== null && _super.apply(this, arguments) || this;
11
- }
12
- BaseSubscriber.prototype.__trigger_event__ = function (eventName) {
13
- var ctx = this.__endpoint_context__;
14
- console.log('Trigger event', eventName, ctx);
15
- // ctx.realtimeServer.triggerCustomEvent/
16
- };
17
- BaseSubscriber = tslib_1.__decorate([
18
- (0, subscriber_decorator_1.TaonSubscriber)({
19
- className: 'BaseSubscriber',
20
- })
21
- ], BaseSubscriber);
22
- return BaseSubscriber;
23
- }(base_injector_1.BaseInjector));
24
- exports.BaseSubscriber = BaseSubscriber;
25
- //# sourceMappingURL=base-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-subscriber.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/base-classes/base-subscriber.ts"],"names":[],"mappings":";;;;AAWA,iDAA+C;AAC/C,mFAA4E;AAK5E;IAA2D,0CAAY;IAAvE;;IAMA,CAAC;IALW,0CAAiB,GAA3B,UAA4B,SAAuB;QACjD,IAAM,GAAG,GAAG,IAAI,CAAC,oBAAoB,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAC7C,yCAAyC;IAC3C,CAAC;IALmB,cAAc;QAHnC,IAAA,qCAAc,EAAC;YACd,SAAS,EAAE,gBAAgB;SAC5B,CAAC;OACoB,cAAc,CAMnC;IAAD,qBAAC;CAAA,AAND,CAA2D,4BAAY,GAMtE;AANqB,wCAAc"}
@@ -1,10 +0,0 @@
1
- import { RealtimeStrategy } from './realtime-strategy';
2
- /**
3
- * Purpose:
4
- * - browser-browser communication mock (in websql mode)
5
- */
6
- export declare class RealtimeAbstractMock extends RealtimeStrategy {
7
- toString(): string;
8
- get Server(): any;
9
- get io(): any;
10
- }
@@ -1,214 +0,0 @@
1
- "use strict";
2
- // BIG TODO: Implement the following classes and interfaces
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.RealtimeAbstractMock = void 0;
5
- var tslib_1 = require("tslib");
6
- var realtime_strategy_1 = require("./realtime-strategy");
7
- var rxjs_1 = require("rxjs");
8
- var messagesFromClientToServer = new rxjs_1.Subject();
9
- var messagesServerToClient = new rxjs_1.Subject();
10
- //#endregion
11
- var AbstractServer = /** @class */ (function () {
12
- function AbstractServer(url) {
13
- this.url = url;
14
- this.namespaceByName = new Map();
15
- AbstractServer.serverByUrl.set(url, this);
16
- }
17
- Object.defineProperty(AbstractServer.prototype, "AbstractNamespace", {
18
- get: function () {
19
- return AbstractNamespace;
20
- },
21
- enumerable: false,
22
- configurable: true
23
- });
24
- AbstractServer.prototype.of = function (namespaceName) {
25
- if (!this.namespaceByName.has(namespaceName)) {
26
- this.namespaceByName.set(namespaceName, new this.AbstractNamespace(namespaceName, this.url));
27
- }
28
- return this.namespaceByName.get(namespaceName);
29
- };
30
- AbstractServer.serverByUrl = new Map();
31
- return AbstractServer;
32
- }());
33
- /**
34
- * A namespace is a collection of sockets that share a common name.
35
- * Namespace are on the "server" side, and sockets are on the "client" side.
36
- */
37
- var AbstractNamespace = /** @class */ (function () {
38
- function AbstractNamespace(
39
- /**
40
- * unique namespace name
41
- */
42
- name, url) {
43
- this.name = name;
44
- this.url = url;
45
- this.allNamespaceSockets = [];
46
- this.socketByRoomName = new Map();
47
- this.namespaceEventHandlers = new Map();
48
- this.startListeningServer();
49
- }
50
- AbstractNamespace.prototype.handleRawClientMessage = function (msg) {
51
- var _a;
52
- var data = msg.data, eventName = msg.eventName, namespace = msg.namespace, url = msg.url, roomName = msg.roomName, client = msg.client;
53
- if (this.url !== url) {
54
- return;
55
- }
56
- if (this.name !== namespace) {
57
- return;
58
- }
59
- if (this.shouldAutomaticHandleEvent(eventName)) {
60
- this.emit.apply(this, tslib_1.__spreadArray([eventName], tslib_1.__read(data), false));
61
- return;
62
- }
63
- var roomNameFromEvent = this.getRoomNameFromMessage(eventName);
64
- if (this.isRoomJoinMessage(eventName)) {
65
- this.socketByRoomName.set(roomNameFromEvent, client);
66
- return;
67
- }
68
- if (this.isRoomLeaveMessage(eventName)) {
69
- this.socketByRoomName.delete(roomNameFromEvent);
70
- return;
71
- }
72
- var namespaceInstance = this;
73
- if (namespaceInstance) {
74
- if (roomName) {
75
- (_a = namespaceInstance.socketByRoomName
76
- .get(roomName)) === null || _a === void 0 ? void 0 : _a.emit.apply(_a, tslib_1.__spreadArray([eventName], tslib_1.__read(data), false));
77
- }
78
- else {
79
- namespaceInstance.emit.apply(namespaceInstance, tslib_1.__spreadArray([eventName], tslib_1.__read(data), false));
80
- }
81
- }
82
- };
83
- AbstractNamespace.prototype.startListeningServer = function () {
84
- var _this = this;
85
- messagesFromClientToServer.subscribe(function (data) { return _this.handleRawClientMessage(data); });
86
- };
87
- //#region on
88
- AbstractNamespace.prototype.on = function (eventName, handler) {
89
- this.namespaceEventHandlers.set(eventName, handler);
90
- };
91
- //#endregion
92
- //#region emit
93
- AbstractNamespace.prototype.emit = function (eventName) {
94
- var e_1, _a;
95
- var _b;
96
- var args = [];
97
- for (var _i = 1; _i < arguments.length; _i++) {
98
- args[_i - 1] = arguments[_i];
99
- }
100
- (_b = this.namespaceEventHandlers.get(eventName)) === null || _b === void 0 ? void 0 : _b.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
101
- try {
102
- for (var _c = tslib_1.__values(this.allNamespaceSockets), _d = _c.next(); !_d.done; _d = _c.next()) {
103
- var socket = _d.value;
104
- socket.emit.apply(socket, tslib_1.__spreadArray([eventName], tslib_1.__read(args), false));
105
- }
106
- }
107
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
108
- finally {
109
- try {
110
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
111
- }
112
- finally { if (e_1) throw e_1.error; }
113
- }
114
- };
115
- //#endregion
116
- AbstractNamespace.prototype.connect = function (socket) {
117
- this.allNamespaceSockets.push(socket);
118
- socket.namespaceInstance = this;
119
- };
120
- AbstractNamespace.prototype.isRoomJoinMessage = function (eventName) {
121
- throw new Error('Method not implemented.');
122
- };
123
- AbstractNamespace.prototype.isRoomLeaveMessage = function (eventName) {
124
- throw new Error('Method not implemented.');
125
- };
126
- AbstractNamespace.prototype.getRoomNameFromMessage = function (eventName) {
127
- throw new Error('Method not implemented.');
128
- };
129
- AbstractNamespace.prototype.shouldAutomaticHandleEvent = function (event) {
130
- throw new Error('Method not implemented.');
131
- };
132
- return AbstractNamespace;
133
- }());
134
- /**
135
- * Client starts a connection to the server with socket
136
- */
137
- var AbstractSocket = /** @class */ (function () {
138
- function AbstractSocket(url, opts) {
139
- this.eventHandlers = new Map();
140
- // @ts-ignore
141
- var _a = tslib_1.__read([url, opts.path || '/'], 2), __ = _a[0], namespace = _a[1];
142
- // console.log({ url, baseUrl, namespace });
143
- var namespaceName = namespace || '/';
144
- // Look up the server instance from the registry
145
- var server = AbstractServer.serverByUrl.get(url);
146
- if (!server) {
147
- AbstractServer.serverByUrl.set(url, new AbstractServer(url));
148
- server = AbstractServer.serverByUrl.get(url);
149
- }
150
- var namespaceFromServer = server.of(namespaceName);
151
- namespaceFromServer.connect(this);
152
- // TODO: @LAST listen to server messages
153
- }
154
- AbstractSocket.prototype.emit = function (eventName) {
155
- var _a;
156
- var args = [];
157
- for (var _i = 1; _i < arguments.length; _i++) {
158
- args[_i - 1] = arguments[_i];
159
- }
160
- (_a = this.eventHandlers.get(eventName)) === null || _a === void 0 ? void 0 : _a.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
161
- var msg = {
162
- eventName: Array.isArray(eventName) ? eventName[0] : eventName,
163
- url: this.namespaceInstance.url,
164
- namespace: this.namespaceInstance.name,
165
- roomName: Array.isArray(eventName) ? eventName[1] : void 0,
166
- data: args,
167
- client: this,
168
- };
169
- messagesFromClientToServer.next(msg);
170
- };
171
- AbstractSocket.prototype.on = function (eventName, handler) {
172
- this.eventHandlers[eventName] = handler;
173
- };
174
- AbstractSocket.prototype.off = function (event) {
175
- this.eventHandlers.delete(event);
176
- };
177
- return AbstractSocket;
178
- }());
179
- /**
180
- * Purpose:
181
- * - browser-browser communication mock (in websql mode)
182
- */
183
- var RealtimeAbstractMock = /** @class */ (function (_super) {
184
- tslib_1.__extends(RealtimeAbstractMock, _super);
185
- function RealtimeAbstractMock() {
186
- return _super !== null && _super.apply(this, arguments) || this;
187
- }
188
- //#region toString
189
- RealtimeAbstractMock.prototype.toString = function () {
190
- return 'mock';
191
- };
192
- Object.defineProperty(RealtimeAbstractMock.prototype, "Server", {
193
- //#endregion
194
- //#region server & io
195
- get: function () {
196
- return AbstractServer;
197
- },
198
- enumerable: false,
199
- configurable: true
200
- });
201
- Object.defineProperty(RealtimeAbstractMock.prototype, "io", {
202
- get: function () {
203
- var clientIo = function (uri, opts) {
204
- return new AbstractSocket(uri, opts);
205
- };
206
- return clientIo;
207
- },
208
- enumerable: false,
209
- configurable: true
210
- });
211
- return RealtimeAbstractMock;
212
- }(realtime_strategy_1.RealtimeStrategy));
213
- exports.RealtimeAbstractMock = RealtimeAbstractMock;
214
- //# sourceMappingURL=realtime-abstract-mock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"realtime-abstract-mock.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-abstract-mock.ts"],"names":[],"mappings":";AAAA,2DAA2D;;;;AAG3D,yDAAuD;AACvD,6BAA+B;AAE/B,IAAM,0BAA0B,GAAG,IAAI,cAAO,EAAoB,CAAC;AACnE,IAAM,sBAAsB,GAAG,IAAI,cAAO,EAAoB,CAAC;AAc/D,YAAY;AAEZ;IAOE,wBAA4B,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;QALvC,oBAAe,GAAG,IAAI,GAAG,EAA6B,CAAC;QAMrD,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAND,sBAAI,6CAAiB;aAArB;YACE,OAAO,iBAAiB,CAAC;QAC3B,CAAC;;;OAAA;IAOD,2BAAE,GAAF,UAAG,aAAqB;QACtB,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YAC7C,IAAI,CAAC,eAAe,CAAC,GAAG,C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;IAsBA,CAAC;IArBC,kBAAkB;IAClB,uCAAQ,GAAR;QACE,OAAO,MAAM,CAAC;IAChB,CAAC;IAID,sBAAI,wCAAM;QAHV,YAAY;QAEZ,qBAAqB;aACrB;YACE,OAAO,cAAqB,CAAC;QAC/B,CAAC;;;OAAA;IAED,sBAAI,oCAAE;aAAN;YACE,IAAM,QAAQ,GAAG,UACf,GAAW,EACX,IAAwB;gBAExB,OAAO,IAAI,cAAc,CAAC,GAAG,EAAE,IAAW,CAAC,CAAC;YAC9C,CAAC,CAAC;YACF,OAAO,QAAe,CAAC;QACzB,CAAC;;;OAAA;IAEH,2BAAC;AAAD,CAAC,AAtBD,CAA0C,oCAAgB,GAsBzD;AAtBY,oDAAoB"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1730031687199 = dummy1730031687199;
4
- function dummy1730031687199() { }
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.ts"],"names":[],"mappings":";;AAAA,gDAAwC;AAAxC,SAAgB,kBAAkB,KAAK,CAAC"}
@@ -1,22 +0,0 @@
1
- import * as Electron from 'electron';
2
- export declare class IpcMainNamespace {
3
- name: string;
4
- private rooms;
5
- private listeners;
6
- constructor(name: string);
7
- on(event: string, callback: (event: Electron.IpcMainEvent, ...args: any[]) => void): void;
8
- off(event: string, callback?: (event: Electron.IpcMainEvent, ...args: any[]) => void): void;
9
- emit(event: string, ...args: any[]): void;
10
- to(room: string): {
11
- emit: (event: string, ...args: any[]) => void;
12
- };
13
- in(room: string): {
14
- emit: (event: string, ...args: any[]) => void;
15
- };
16
- join(webContents: Electron.WebContents, room: string): void;
17
- leave(webContents: Electron.WebContents, room: string): void;
18
- path(): string;
19
- get nsp(): {
20
- readonly name: string;
21
- };
22
- }
@@ -1,139 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IpcMainNamespace = void 0;
4
- var tslib_1 = require("tslib");
5
- //#region @backend
6
- var Electron = require("electron");
7
- var electron_1 = require("electron");
8
- //#endregion
9
- var IpcMainNamespace = /** @class */ (function () {
10
- function IpcMainNamespace(name) {
11
- this.name = name;
12
- this.rooms = {};
13
- this.listeners = {};
14
- }
15
- IpcMainNamespace.prototype.on = function (event, callback) {
16
- //#region @backendFunc
17
- var listenKey = "(".concat(this.name, ") \"").concat(event, "\"");
18
- // console.log(`[BACKEND]][IPC][MAIN NAMSEPACE] listenToEvent "${listenKey}"`);
19
- if (!this.listeners[event]) {
20
- this.listeners[event] = [];
21
- }
22
- this.listeners[event].push(callback);
23
- electron_1.ipcMain.on(listenKey, callback);
24
- this.emit(listenKey); // QUICK_FIX
25
- //#endregion
26
- };
27
- IpcMainNamespace.prototype.off = function (event, callback) {
28
- //#region @backendFunc
29
- if (!this.listeners[event])
30
- return;
31
- if (callback) {
32
- this.listeners[event] = this.listeners[event].filter(function (listener) { return listener !== callback; });
33
- }
34
- else {
35
- delete this.listeners[event];
36
- }
37
- var removeKey = "(".concat(this.name, ") \"").concat(event, "\"");
38
- // console.log(`[BACKEND]][IPC][MAIN NAMSEPACE] removeKey ${removeKey}`);
39
- electron_1.ipcMain.removeListener(removeKey, callback);
40
- //#endregion
41
- };
42
- IpcMainNamespace.prototype.emit = function (event) {
43
- var args = [];
44
- for (var _i = 1; _i < arguments.length; _i++) {
45
- args[_i - 1] = arguments[_i];
46
- }
47
- //#region @backendFunc
48
- var sendEventKey = "(".concat(this.name, ") \"").concat(event, "\"");
49
- // console.log(`[BACKEND]][IPC][MAIN NAMSEPACE] emitEvent "${sendEventKey}"`);
50
- var allWindows = Electron.BrowserWindow.getAllWindows();
51
- allWindows.forEach(function (win, index) {
52
- var _a;
53
- (_a = win.webContents).send.apply(_a, tslib_1.__spreadArray([sendEventKey], tslib_1.__read(args), false));
54
- });
55
- //#endregion
56
- };
57
- IpcMainNamespace.prototype.to = function (room) {
58
- var _this = this;
59
- return {
60
- emit: function (event) {
61
- var args = [];
62
- for (var _i = 1; _i < arguments.length; _i++) {
63
- args[_i - 1] = arguments[_i];
64
- }
65
- var emitEvent = "(".concat(_this.name, ") \"").concat(event, "\"");
66
- // console.log(
67
- // `[BACKEND]][IPC][MAIN NAMSEPACE] emitEvent in room "${room}"` +
68
- // ` (exited=${!!this.rooms[room]}) "${emitEvent}"`,
69
- // );
70
- var allWindows = Electron.BrowserWindow.getAllWindows();
71
- allWindows.forEach(function (win, index) {
72
- var _a;
73
- (_a = win.webContents).send.apply(_a, tslib_1.__spreadArray([emitEvent], tslib_1.__read(args), false));
74
- });
75
- },
76
- };
77
- };
78
- IpcMainNamespace.prototype.in = function (room) {
79
- var _this = this;
80
- return {
81
- emit: function (event) {
82
- var args = [];
83
- for (var _i = 1; _i < arguments.length; _i++) {
84
- args[_i - 1] = arguments[_i];
85
- }
86
- // console.log(
87
- // `[BACKEND]][IPC][MAIN NAMSEPACE] ` +
88
- // ` emit in room "${room}" "${event}"`,
89
- // );
90
- var sendEventKey = "(".concat(_this.name, ") \"").concat(event, "\"");
91
- var allWindows = Electron.BrowserWindow.getAllWindows();
92
- allWindows.forEach(function (win, index) {
93
- var _a;
94
- (_a = win.webContents).send.apply(_a, tslib_1.__spreadArray([sendEventKey], tslib_1.__read(args), false));
95
- });
96
- },
97
- };
98
- };
99
- IpcMainNamespace.prototype.join = function (webContents, room) {
100
- if (!this.rooms[room]) {
101
- this.rooms[room] = new Set();
102
- }
103
- this.rooms[room].add(webContents);
104
- // console.log(
105
- // `[BACKEND]][IPC][MAIN NAMSEPACE] joinRoom "${room}"`,
106
- // this.rooms[room].size,
107
- // );
108
- };
109
- IpcMainNamespace.prototype.leave = function (webContents, room) {
110
- if (this.rooms[room]) {
111
- this.rooms[room].delete(webContents);
112
- if (this.rooms[room].size === 0) {
113
- delete this.rooms[room];
114
- }
115
- }
116
- // console.log(
117
- // `[BACKEND]][IPC][MAIN NAMSEPACE] leaveRoom "${room}"`,
118
- // this.rooms[room] ? this.rooms[room].size : 'no room',
119
- // );
120
- };
121
- IpcMainNamespace.prototype.path = function () {
122
- return this.name;
123
- };
124
- Object.defineProperty(IpcMainNamespace.prototype, "nsp", {
125
- get: function () {
126
- var self = this;
127
- return {
128
- get name() {
129
- return self.name;
130
- },
131
- };
132
- },
133
- enumerable: false,
134
- configurable: true
135
- });
136
- return IpcMainNamespace;
137
- }());
138
- exports.IpcMainNamespace = IpcMainNamespace;
139
- //# sourceMappingURL=realtime-strategy-ipc-main-namespace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"realtime-strategy-ipc-main-namespace.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.ts"],"names":[],"mappings":";;;;AACA,kBAAkB;AAClB,mCAAqC;AACrC,qCAAmC;AACnC,YAAY;AAEZ;IAIE,0BAAmB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QAHvB,UAAK,GAAU,EAAE,CAAC;QAClB,cAAS,GAAmB,EAAE,CAAC;IAEL,CAAC;IAEnC,6BAAE,GAAF,UACE,KAAa,EACb,QAAgE;QAEhE,sBAAsB;QACtB,IAAM,SAAS,GAAG,WAAI,IAAI,CAAC,IAAI,iBAAM,KAAK,OAAG,CAAC;QAC9C,+EAA+E;QAC/E,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,kBAAO,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,SAAS,CAA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,WAAW,CAAC,CAAC;QAClC,eAAe;QACf,0DAA0D;QAC1D,2BAA2B;QAC3B,KAAK;IACP,CAAC;IAED,gCAAK,GAAL,UAAM,WAAiC,EAAE,IAAY;QACnD,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBAChC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QACD,eAAe;QACf,2DAA2D;QAC3D,0DAA0D;QAC1D,KAAK;IACP,CAAC;IAED,+BAAI,GAAJ;QACE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,iCAAG;aAAP;YACE,IAAM,IAAI,GAAG,IAAI,CAAC;YAClB,OAAO;gBACL,IAAI,IAAI;oBACN,OAAO,IAAI,CAAC,IAAI,CAAC;gBACnB,CAAC;aACF,CAAC;QACJ,CAAC;;;OAAA;IACH,uBAAC;AAAD,CAAC,AAzHD,IAyHC;AAzHY,4CAAgB"}
@@ -1,16 +0,0 @@
1
- import { IpcMainNamespace } from './realtime-strategy-ipc-main-namespace';
2
- export declare class ioIpcStrategy {
3
- contextName: string;
4
- private namespaces;
5
- constructor(contextName: string);
6
- of(namespace: string): IpcMainNamespace;
7
- on(event: string, callback: (event: Electron.IpcMainEvent, ...args: any[]) => void): void;
8
- emit(event: string, ...args: any[]): void;
9
- path(): string;
10
- get nsp(): {
11
- readonly name: string;
12
- };
13
- in(room: string): {
14
- emit: (event: string, ...args: any[]) => void;
15
- };
16
- }