taon 19.0.9 → 19.0.12

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 (150) hide show
  1. package/browser/fesm2022/taon.mjs +38 -18
  2. package/browser/fesm2022/taon.mjs.map +1 -1
  3. package/browser/lib/base-classes/base-angular-service.d.ts +1 -3
  4. package/browser/lib/base-classes/base-controller.d.ts +1 -0
  5. package/browser/lib/base-classes/base-crud-controller.d.ts +1 -1
  6. package/browser/lib/base-classes/base-injector.d.ts +1 -3
  7. package/browser/lib/base-classes/base-migration.d.ts +1 -1
  8. package/browser/lib/base-classes/base-provider.d.ts +5 -0
  9. package/browser/lib/constants.d.ts +6 -1
  10. package/browser/lib/endpoint-context.d.ts +2 -2
  11. package/browser/lib/ui/taon-admin-mode-configuration/index.d.ts +3 -1
  12. package/{lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts → browser/lib/ui/taon-admin-mode-configuration/taon-admin.models.d.ts} +2 -1
  13. package/browser/lib/ui/taon-full-material.module.d.ts +3 -0
  14. package/browser/package.json +1 -1
  15. package/client/fesm2022/taon.mjs +38 -18
  16. package/client/fesm2022/taon.mjs.map +1 -1
  17. package/client/lib/base-classes/base-angular-service.d.ts +1 -3
  18. package/client/lib/base-classes/base-controller.d.ts +1 -0
  19. package/client/lib/base-classes/base-crud-controller.d.ts +1 -1
  20. package/client/lib/base-classes/base-injector.d.ts +1 -3
  21. package/client/lib/base-classes/base-migration.d.ts +1 -1
  22. package/client/lib/base-classes/base-provider.d.ts +5 -0
  23. package/client/lib/constants.d.ts +6 -1
  24. package/client/lib/endpoint-context.d.ts +2 -2
  25. package/client/lib/ui/taon-admin-mode-configuration/index.d.ts +3 -1
  26. package/client/lib/ui/taon-admin-mode-configuration/taon-admin.models.d.ts +6 -0
  27. package/client/lib/ui/taon-full-material.module.d.ts +3 -0
  28. package/client/package.json +1 -1
  29. package/lib/base-classes/base-angular-service.d.ts +2 -4
  30. package/lib/base-classes/base-angular-service.js +0 -5
  31. package/lib/base-classes/base-angular-service.js.map +1 -1
  32. package/lib/base-classes/base-class.js.map +1 -1
  33. package/lib/base-classes/base-context.js.map +1 -1
  34. package/lib/base-classes/base-controller.d.ts +1 -0
  35. package/lib/base-classes/base-controller.js +1 -0
  36. package/lib/base-classes/base-controller.js.map +1 -1
  37. package/lib/base-classes/base-crud-controller.d.ts +1 -1
  38. package/lib/base-classes/base-crud-controller.js +4 -4
  39. package/lib/base-classes/base-crud-controller.js.map +1 -1
  40. package/lib/base-classes/base-entity.js.map +1 -1
  41. package/lib/base-classes/base-injector.d.ts +1 -3
  42. package/lib/base-classes/base-injector.js +2 -11
  43. package/lib/base-classes/base-injector.js.map +1 -1
  44. package/lib/base-classes/base-migration.d.ts +1 -1
  45. package/lib/base-classes/base-migration.js.map +1 -1
  46. package/lib/base-classes/base-provider.d.ts +5 -0
  47. package/lib/base-classes/base-provider.js +5 -0
  48. package/lib/base-classes/base-provider.js.map +1 -1
  49. package/lib/base-classes/base-repository copy.d.ts +255 -0
  50. package/lib/base-classes/base-repository copy.js +653 -0
  51. package/lib/base-classes/base-repository copy.js.map +1 -0
  52. package/lib/build-info._auto-generated_.d.ts +1 -1
  53. package/lib/build-info._auto-generated_.js +1 -1
  54. package/lib/build-info._auto-generated_.js.map +1 -1
  55. package/lib/constants.d.ts +6 -1
  56. package/lib/constants.js +21 -0
  57. package/lib/constants.js.map +1 -1
  58. package/lib/context-db-migrations.js +5 -5
  59. package/lib/context-db-migrations.js.map +1 -1
  60. package/lib/endpoint-context.d.ts +2 -2
  61. package/lib/endpoint-context.js.map +1 -1
  62. package/lib/realtime/realtime-core.js.map +1 -1
  63. package/lib/ui/directives/index.js +2 -2
  64. package/lib/ui/index.js +2 -2
  65. package/lib/ui/taon-admin-mode-configuration/index.d.ts +3 -1
  66. package/lib/ui/taon-admin-mode-configuration/index.js +17 -2
  67. package/lib/ui/taon-admin-mode-configuration/index.js.map +1 -1
  68. package/lib/ui/taon-full-material.module.d.ts +3 -0
  69. package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
  70. package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
  71. package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
  72. package/lib/ui/taon-progress-bar/index.js +2 -2
  73. package/lib/ui/taon-session-passcode/index.js +2 -2
  74. package/lib/ui/taon-table/index.js +2 -2
  75. package/package.json +1 -1
  76. package/tmp-environment.json +3 -3
  77. package/websql/fesm2022/taon.mjs +43 -23
  78. package/websql/fesm2022/taon.mjs.map +1 -1
  79. package/websql/lib/base-classes/base-angular-service.d.ts +1 -3
  80. package/websql/lib/base-classes/base-controller.d.ts +1 -0
  81. package/websql/lib/base-classes/base-crud-controller.d.ts +1 -1
  82. package/websql/lib/base-classes/base-injector.d.ts +1 -3
  83. package/websql/lib/base-classes/base-migration.d.ts +1 -1
  84. package/websql/lib/base-classes/base-provider.d.ts +5 -0
  85. package/websql/lib/constants.d.ts +6 -1
  86. package/websql/lib/endpoint-context.d.ts +2 -2
  87. package/websql/lib/ui/taon-admin-mode-configuration/index.d.ts +3 -1
  88. package/websql/lib/ui/taon-admin-mode-configuration/taon-admin.models.d.ts +6 -0
  89. package/websql/lib/ui/taon-full-material.module.d.ts +3 -0
  90. package/websql/package.json +1 -1
  91. package/lib/base-classes/base-subscriber.d.ts +0 -4
  92. package/lib/base-classes/base-subscriber.js +0 -25
  93. package/lib/base-classes/base-subscriber.js.map +0 -1
  94. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
  95. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +0 -5
  96. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js.map +0 -1
  97. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +0 -22
  98. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +0 -139
  99. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +0 -1
  100. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +0 -16
  101. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +0 -68
  102. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +0 -1
  103. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +0 -10
  104. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +0 -56
  105. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +0 -1
  106. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +0 -10
  107. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +0 -50
  108. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +0 -1
  109. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +0 -13
  110. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +0 -3
  111. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +0 -1
  112. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +0 -2
  113. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +0 -6
  114. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +0 -1
  115. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +0 -16
  116. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +0 -54
  117. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +0 -1
  118. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +0 -17
  119. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +0 -52
  120. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +0 -1
  121. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +0 -11
  122. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +0 -39
  123. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +0 -1
  124. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +0 -13
  125. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +0 -46
  126. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +0 -1
  127. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +0 -11
  128. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +0 -3
  129. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +0 -1
  130. package/lib/ui/directives/firedev-inject-html.directive.d.ts +0 -6
  131. package/lib/ui/directives/firedev-long-press.directive.d.ts +0 -22
  132. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -2
  133. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +0 -5
  134. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +0 -1
  135. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -29
  136. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -2
  137. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +0 -1
  138. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +0 -5
  139. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +0 -1
  140. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +0 -8
  141. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -2
  142. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +0 -5
  143. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +0 -1
  144. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -13
  145. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -2
  146. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +0 -3
  147. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +0 -1
  148. package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -14
  149. package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -2
  150. 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;
@@ -1,2 +1,4 @@
1
1
  // @ts-nocheck
2
- export * from './taon-admin-mode-configuration.component';
2
+ export * from './taon-admin-mode-configuration.component';
3
+ export * from './taon-admin.models';
4
+ export * from './taon-admin.service';
@@ -0,0 +1,6 @@
1
+ // @ts-nocheck
2
+ import { TemplateRef } from '@angular/core';
3
+ export interface TaonAdminModeTab {
4
+ name: string;
5
+ template: TemplateRef<any>;
6
+ }
@@ -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.9",
3
+ "version": "19.0.12",
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,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1729369285673 = dummy1729369285673;
4
- function dummy1729369285673() { }
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,UAA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;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
- }
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ioIpcStrategy = void 0;
4
- var tslib_1 = require("tslib");
5
- var realtime_strategy_ipc_main_namespace_1 = require("./realtime-strategy-ipc-main-namespace");
6
- var ioIpcStrategy = /** @class */ (function () {
7
- function ioIpcStrategy(contextName) {
8
- this.contextName = contextName;
9
- this.namespaces = {
10
- ' /': new realtime_strategy_ipc_main_namespace_1.IpcMainNamespace('/'),
11
- };
12
- // console.log(`IpcMainWrapper created for context: "${contextName}"`);
13
- }
14
- ioIpcStrategy.prototype.of = function (namespace) {
15
- if (!this.namespaces[namespace]) {
16
- this.namespaces[namespace] = new realtime_strategy_ipc_main_namespace_1.IpcMainNamespace(namespace);
17
- }
18
- return this.namespaces[namespace];
19
- };
20
- ioIpcStrategy.prototype.on = function (event, callback) {
21
- var eventKey = "(".concat(this.contextName, ") \"").concat(event, "\"");
22
- // console.log(`[BACKEND]][IPC][MAIN] listenToEvent "${eventKey}"`);
23
- this.namespaces['/'].on(eventKey, callback);
24
- };
25
- ioIpcStrategy.prototype.emit = function (event) {
26
- var _a;
27
- var args = [];
28
- for (var _i = 1; _i < arguments.length; _i++) {
29
- args[_i - 1] = arguments[_i];
30
- }
31
- var eventKey = "(".concat(this.contextName, ") \"").concat(event, "\"");
32
- // console.log(`[BACKEND]][IPC][MAIN] emitEven "${eventKey}"`);
33
- (_a = this.namespaces['/']).emit.apply(_a, tslib_1.__spreadArray([eventKey], tslib_1.__read(args), false));
34
- };
35
- ioIpcStrategy.prototype.path = function () {
36
- return '/';
37
- };
38
- Object.defineProperty(ioIpcStrategy.prototype, "nsp", {
39
- get: function () {
40
- return {
41
- get name() {
42
- return '/';
43
- },
44
- };
45
- },
46
- enumerable: false,
47
- configurable: true
48
- });
49
- ioIpcStrategy.prototype.in = function (room) {
50
- var _this = this;
51
- return {
52
- emit: function (event) {
53
- var args = [];
54
- for (var _i = 1; _i < arguments.length; _i++) {
55
- args[_i - 1] = arguments[_i];
56
- }
57
- // console.log(`[BACKEND]][IPC][MAIN] emit in room "${room}" "${event}"`);
58
- Object.values(_this.namespaces).forEach(function (namespace) {
59
- var _a;
60
- (_a = namespace.to(room)).emit.apply(_a, tslib_1.__spreadArray([event], tslib_1.__read(args), false));
61
- });
62
- },
63
- };
64
- };
65
- return ioIpcStrategy;
66
- }());
67
- exports.ioIpcStrategy = ioIpcStrategy;
68
- //# sourceMappingURL=realtime-strategy-ipc-main-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"realtime-strategy-ipc-main-wrapper.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.ts"],"names":[],"mappings":";;;;AAAA,+FAA0E;AAG1E;IAKE,uBAAmB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QAJ9B,eAAU,GAAe;YAC/B,IAAI,EAAE,IAAI,uDAAgB,CAAC,GAAG,CAAC;SAChC,CAAC;QAGA,uEAAuE;IACzE,CAAC;IAED,0BAAE,GAAF,UAAG,SAAiB;QAClB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,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AAC;SACF,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AArDD,IAqDC;AArDY,sCAAa"}
@@ -1,10 +0,0 @@
1
- import { ipcRenderer } from 'electron';
2
- export declare class IpcRendererNamespace {
3
- name: string;
4
- ipcRenderer: typeof ipcRenderer;
5
- private listeners;
6
- constructor(name: string);
7
- on(eventName: string, callback: (event: any, ...args: any[]) => void): void;
8
- off(event: string, callback?: (event: any, ...args: any[]) => void): void;
9
- emit(event: string, ...args: any[]): void;
10
- }
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IpcRendererNamespace = void 0;
4
- var tslib_1 = require("tslib");
5
- var IpcRendererNamespace = /** @class */ (function () {
6
- function IpcRendererNamespace(name) {
7
- this.name = name;
8
- this.listeners = {};
9
- this.ipcRenderer = window.require('electron').ipcRenderer;
10
- }
11
- IpcRendererNamespace.prototype.on = function (eventName, callback) {
12
- if (!this.listeners[eventName]) {
13
- this.listeners[eventName] = [];
14
- }
15
- this.listeners[eventName].push(callback);
16
- var listenToEvent = "(".concat(this.name, ") \"").concat(eventName, "\"");
17
- // console.log(`[BROWSSER]][IPC][NAMESPACE] listenToEvent "${listenToEvent}"`);
18
- this.ipcRenderer.on(listenToEvent, callback);
19
- if (eventName === 'connect') {
20
- this.emit('connection');
21
- }
22
- else {
23
- this.emit(eventName);
24
- }
25
- };
26
- IpcRendererNamespace.prototype.off = function (event, callback) {
27
- if (!this.listeners[event])
28
- return;
29
- if (callback) {
30
- this.listeners[event] = this.listeners[event].filter(function (listener) { return listener !== callback; });
31
- }
32
- else {
33
- delete this.listeners[event];
34
- }
35
- var removeListener = "(".concat(this.name, ") \"").concat(event, "\"");
36
- // console.log({ 'this.contextName': this.contextName });
37
- // console.log(
38
- // `[BROWSSER]][IPC][NAMESPACE] removeListener "${removeListener}"`,
39
- // );
40
- this.ipcRenderer.removeListener(removeListener, callback);
41
- };
42
- IpcRendererNamespace.prototype.emit = function (event) {
43
- var _a;
44
- var args = [];
45
- for (var _i = 1; _i < arguments.length; _i++) {
46
- args[_i - 1] = arguments[_i];
47
- }
48
- var emitEvent = "(".concat(this.name, ") \"").concat(event, "\"");
49
- // console.log({ 'this.contextName': this.contextName });
50
- // console.log(`[BROWSSER]][IPC][NAMESPACE] emitEvent: "${emitEvent}"`);
51
- (_a = this.ipcRenderer).send.apply(_a, tslib_1.__spreadArray([emitEvent], tslib_1.__read(args), false));
52
- };
53
- return IpcRendererNamespace;
54
- }());
55
- exports.IpcRendererNamespace = IpcRendererNamespace;
56
- //# sourceMappingURL=realtime-strategy-ipc-renderer-namespace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"realtime-strategy-ipc-renderer-namespace.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.ts"],"names":[],"mappings":";;;;AAKA;IAIE,8BAAmB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QAFvB,cAAS,GAA2B,EAAE,CAAC;QAG7C,IAAI,CAAC,WAAW,GAAI,MAAc,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC;IACrE,CAAC;IAED,iCAAE,GAAF,UAAG,SAAiB,EAAE,QAA8C;QAClE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAM,aAAa,GAAG,WAAI,IAAI,CAAC,IAAI,iBAAM,SAAS,OAAG,CAAC;QACtD,+EAA+E;QAC/E,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,kCAAG,GAAH,UAAI,KAAa,EAAE,QAA+C;QAChE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;YAAE,OAAO;QAEnC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,CAClD,UAAA,QAAQ,IAAI,OAAA,QAAQ,KAAK,QAAQ,EAArB,CAAqB,CAClC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAM,cAAc,GAAG,WAAI,IAAI,CAAC,IAAI,iBAAM,KAAK,OAAG,CAAC;QACnD,yDAAyD;QACzD,eAAe;QACf,sEAAsE;QACtE,KAAK;QACL,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED,mCAAI,GAAJ,UAAK,KAAa;;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QAChC,IAAM,SAAS,GAAG,WAAI,IAAI,CAAC,IAAI,iBAAM,KAAK,OAAG,CAAC;QAC9C,yDAAyD;QACzD,wEAAwE;QACxE,CAAA,KAAA,IAAI,CAAC,WAAW,CAAA,CAAC,IAAI,kCAAC,SAAS,kBAAK,IAAI,WAAE;IAC5C,CAAC;IACH,2BAAC;AAAD,CAAC,AA/CD,IA+CC;AA/CY,oDAAoB"}
@@ -1,10 +0,0 @@
1
- import { IpcRendererNamespace } from './realtime-strategy-ipc-renderer-namespace';
2
- export declare class IpcRendererWrapper {
3
- contextName: string;
4
- private namespaces;
5
- private connected;
6
- constructor(contextName: string);
7
- of(namespace: string): IpcRendererNamespace;
8
- on(event: string, callback: (event: any, ...args: any[]) => void): void;
9
- emit(event: string, ...args: any[]): void;
10
- }
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IpcRendererWrapper = void 0;
4
- var tslib_1 = require("tslib");
5
- var realtime_strategy_ipc_renderer_namespace_1 = require("./realtime-strategy-ipc-renderer-namespace");
6
- var IpcRendererWrapper = /** @class */ (function () {
7
- function IpcRendererWrapper(contextName) {
8
- this.contextName = contextName;
9
- this.namespaces = {
10
- '/': new realtime_strategy_ipc_renderer_namespace_1.IpcRendererNamespace('/'),
11
- };
12
- this.connected = false;
13
- // console.log(`IpcRendererWrapper created for context: "${contextName}"`);
14
- }
15
- IpcRendererWrapper.prototype.of = function (namespace) {
16
- // console.log(
17
- // `[BROWSSER]][IPC] of namespace"${namespace}"`,
18
- // );
19
- if (!this.namespaces[namespace]) {
20
- this.namespaces[namespace] = new realtime_strategy_ipc_renderer_namespace_1.IpcRendererNamespace(namespace);
21
- }
22
- return this.namespaces[namespace];
23
- };
24
- IpcRendererWrapper.prototype.on = function (event, callback) {
25
- // if (event === 'connection' || event === 'connect') {
26
- // setTimeout(() => {
27
- // callback(null, null);
28
- // });
29
- // return;
30
- // }
31
- // console.log(
32
- // `[BROWSSER]][IPC] on "${event}"`,
33
- // );
34
- this.namespaces['/'].on(event, callback);
35
- };
36
- IpcRendererWrapper.prototype.emit = function (event) {
37
- var _a;
38
- var args = [];
39
- for (var _i = 1; _i < arguments.length; _i++) {
40
- args[_i - 1] = arguments[_i];
41
- }
42
- // console.log(
43
- // `[BROWSSER]][IPC] emit "${event}"`,
44
- // );
45
- (_a = this.namespaces['/']).emit.apply(_a, tslib_1.__spreadArray([event], tslib_1.__read(args), false));
46
- };
47
- return IpcRendererWrapper;
48
- }());
49
- exports.IpcRendererWrapper = IpcRendererWrapper;
50
- //# sourceMappingURL=realtime-strategy-ipc-renderer-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"realtime-strategy-ipc-renderer-wrapper.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.ts"],"names":[],"mappings":";;;;AAAA,uGAAkF;AAElF;IAME,4BAAmB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QAL9B,eAAU,GAAkD;YAClE,GAAG,EAAE,IAAI,+DAAoB,CAAC,GAAG,CAAC;SACnC,CAAC;QACM,cAAS,GAAG,KAAK,CAAC;QAGxB,2EAA2E;IAC7E,CAAC;IAED,+BAAE,GAAF,UAAG,SAAiB;QAClB,eAAe;QACf,mDAAmD;QACnD,KAAK;QACL,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,+DAAoB,CACnD,SAAS,CACV,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IAED,+BAAE,GAAF,UAAG,KAAa,EAAE,QAA8C;QAC9D,uDAAuD;QACvD,uBAAuB;QACvB,4BAA4B;QAC5B,QAAQ;QACR,YAAY;QACZ,IAAI;QACJ,eAAe;QACf,sCAAsC;QACtC,KAAK;QACL,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,iCAAI,GAAJ,UAAK,KAAa;;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QAChC,eAAe;QACf,wCAAwC;QACxC,KAAK;QACL,CAAA,KAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA,CAAC,IAAI,kCAAC,KAAK,kBAAK,IAAI,WAAE;IAC5C,CAAC;IACH,yBAAC;AAAD,CAAC,AAzCD,IAyCC;AAzCY,gDAAkB"}
@@ -1,13 +0,0 @@
1
- import { IpcMainNamespace } from './realtime-strategy-ipc-main-namespace';
2
- export interface RendererEventListeners {
3
- [event: string]: Array<(event: any, ...args: any[]) => void>;
4
- }
5
- export interface EventListeners {
6
- [event: string]: Array<(event: Electron.IpcMainEvent, ...args: any[]) => void>;
7
- }
8
- export interface Rooms {
9
- [room: string]: Set<Electron.WebContents>;
10
- }
11
- export interface Namespaces {
12
- [namespace: string]: IpcMainNamespace;
13
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=realtime-strategy-ipc.models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"realtime-strategy-ipc.models.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from './realtime-strategy-mock-server';
2
- export * from './realtime-strategy-mock-client';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./realtime-strategy-mock-server"), exports);
5
- tslib_1.__exportStar(require("./realtime-strategy-mock-client"), exports);
6
- //# 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-mock-models/index.ts"],"names":[],"mappings":";;;AAAA,0EAAgD;AAChD,0EAAgD"}