@juzi/wechaty-puppet-service 1.0.67 → 1.0.68

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 (116) hide show
  1. package/dist/cjs/src/client/puppet-service.d.ts +0 -11
  2. package/dist/cjs/src/client/puppet-service.d.ts.map +1 -1
  3. package/dist/cjs/src/client/puppet-service.js +0 -19
  4. package/dist/cjs/src/client/puppet-service.js.map +1 -1
  5. package/dist/cjs/src/package-json.d.ts.map +1 -1
  6. package/dist/cjs/src/package-json.js +1 -2
  7. package/dist/cjs/src/package-json.js.map +1 -1
  8. package/dist/esm/src/client/puppet-service.d.ts +0 -11
  9. package/dist/esm/src/client/puppet-service.d.ts.map +1 -1
  10. package/dist/esm/src/client/puppet-service.js +0 -21
  11. package/dist/esm/src/client/puppet-service.js.map +1 -1
  12. package/dist/esm/src/package-json.d.ts.map +1 -1
  13. package/dist/esm/src/package-json.js +1 -2
  14. package/dist/esm/src/package-json.js.map +1 -1
  15. package/package.json +1 -2
  16. package/src/client/puppet-service.ts +1 -34
  17. package/src/package-json.ts +1 -2
  18. package/dist/cjs/src/client/duck/actions.d.ts +0 -6
  19. package/dist/cjs/src/client/duck/actions.d.ts.map +0 -1
  20. package/dist/cjs/src/client/duck/actions.js +0 -54
  21. package/dist/cjs/src/client/duck/actions.js.map +0 -1
  22. package/dist/cjs/src/client/duck/epic-recover.d.ts +0 -36
  23. package/dist/cjs/src/client/duck/epic-recover.d.ts.map +0 -1
  24. package/dist/cjs/src/client/duck/epic-recover.js +0 -41
  25. package/dist/cjs/src/client/duck/epic-recover.js.map +0 -1
  26. package/dist/cjs/src/client/duck/epic-recover.spec.d.ts +0 -3
  27. package/dist/cjs/src/client/duck/epic-recover.spec.d.ts.map +0 -1
  28. package/dist/cjs/src/client/duck/epic-recover.spec.js +0 -131
  29. package/dist/cjs/src/client/duck/epic-recover.spec.js.map +0 -1
  30. package/dist/cjs/src/client/duck/epics.d.ts +0 -4
  31. package/dist/cjs/src/client/duck/epics.d.ts.map +0 -1
  32. package/dist/cjs/src/client/duck/epics.js +0 -36
  33. package/dist/cjs/src/client/duck/epics.js.map +0 -1
  34. package/dist/cjs/src/client/duck/mod.d.ts +0 -29
  35. package/dist/cjs/src/client/duck/mod.d.ts.map +0 -1
  36. package/dist/cjs/src/client/duck/mod.js +0 -63
  37. package/dist/cjs/src/client/duck/mod.js.map +0 -1
  38. package/dist/cjs/src/client/duck/operations.d.ts +0 -23
  39. package/dist/cjs/src/client/duck/operations.d.ts.map +0 -1
  40. package/dist/cjs/src/client/duck/operations.js +0 -30
  41. package/dist/cjs/src/client/duck/operations.js.map +0 -1
  42. package/dist/cjs/src/client/duck/reducers.d.ts +0 -59
  43. package/dist/cjs/src/client/duck/reducers.d.ts.map +0 -1
  44. package/dist/cjs/src/client/duck/reducers.js +0 -51
  45. package/dist/cjs/src/client/duck/reducers.js.map +0 -1
  46. package/dist/cjs/src/client/duck/selectors.d.ts +0 -21
  47. package/dist/cjs/src/client/duck/selectors.d.ts.map +0 -1
  48. package/dist/cjs/src/client/duck/selectors.js +0 -23
  49. package/dist/cjs/src/client/duck/selectors.js.map +0 -1
  50. package/dist/cjs/src/client/duck/tests.spec.d.ts +0 -3
  51. package/dist/cjs/src/client/duck/tests.spec.d.ts.map +0 -1
  52. package/dist/cjs/src/client/duck/tests.spec.js +0 -49
  53. package/dist/cjs/src/client/duck/tests.spec.js.map +0 -1
  54. package/dist/cjs/src/client/duck/types.d.ts +0 -21
  55. package/dist/cjs/src/client/duck/types.d.ts.map +0 -1
  56. package/dist/cjs/src/client/duck/types.js +0 -24
  57. package/dist/cjs/src/client/duck/types.js.map +0 -1
  58. package/dist/cjs/src/client/duck/utils.d.ts +0 -21
  59. package/dist/cjs/src/client/duck/utils.d.ts.map +0 -1
  60. package/dist/cjs/src/client/duck/utils.js +0 -3
  61. package/dist/cjs/src/client/duck/utils.js.map +0 -1
  62. package/dist/esm/src/client/duck/actions.d.ts +0 -6
  63. package/dist/esm/src/client/duck/actions.d.ts.map +0 -1
  64. package/dist/esm/src/client/duck/actions.js +0 -28
  65. package/dist/esm/src/client/duck/actions.js.map +0 -1
  66. package/dist/esm/src/client/duck/epic-recover.d.ts +0 -36
  67. package/dist/esm/src/client/duck/epic-recover.d.ts.map +0 -1
  68. package/dist/esm/src/client/duck/epic-recover.js +0 -36
  69. package/dist/esm/src/client/duck/epic-recover.js.map +0 -1
  70. package/dist/esm/src/client/duck/epic-recover.spec.d.ts +0 -3
  71. package/dist/esm/src/client/duck/epic-recover.spec.d.ts.map +0 -1
  72. package/dist/esm/src/client/duck/epic-recover.spec.js +0 -126
  73. package/dist/esm/src/client/duck/epic-recover.spec.js.map +0 -1
  74. package/dist/esm/src/client/duck/epics.d.ts +0 -4
  75. package/dist/esm/src/client/duck/epics.d.ts.map +0 -1
  76. package/dist/esm/src/client/duck/epics.js +0 -33
  77. package/dist/esm/src/client/duck/epics.js.map +0 -1
  78. package/dist/esm/src/client/duck/mod.d.ts +0 -29
  79. package/dist/esm/src/client/duck/mod.d.ts.map +0 -1
  80. package/dist/esm/src/client/duck/mod.js +0 -29
  81. package/dist/esm/src/client/duck/mod.js.map +0 -1
  82. package/dist/esm/src/client/duck/operations.d.ts +0 -23
  83. package/dist/esm/src/client/duck/operations.d.ts.map +0 -1
  84. package/dist/esm/src/client/duck/operations.js +0 -4
  85. package/dist/esm/src/client/duck/operations.js.map +0 -1
  86. package/dist/esm/src/client/duck/reducers.d.ts +0 -59
  87. package/dist/esm/src/client/duck/reducers.d.ts.map +0 -1
  88. package/dist/esm/src/client/duck/reducers.js +0 -26
  89. package/dist/esm/src/client/duck/reducers.js.map +0 -1
  90. package/dist/esm/src/client/duck/selectors.d.ts +0 -21
  91. package/dist/esm/src/client/duck/selectors.d.ts.map +0 -1
  92. package/dist/esm/src/client/duck/selectors.js +0 -22
  93. package/dist/esm/src/client/duck/selectors.js.map +0 -1
  94. package/dist/esm/src/client/duck/tests.spec.d.ts +0 -3
  95. package/dist/esm/src/client/duck/tests.spec.d.ts.map +0 -1
  96. package/dist/esm/src/client/duck/tests.spec.js +0 -24
  97. package/dist/esm/src/client/duck/tests.spec.js.map +0 -1
  98. package/dist/esm/src/client/duck/types.d.ts +0 -21
  99. package/dist/esm/src/client/duck/types.d.ts.map +0 -1
  100. package/dist/esm/src/client/duck/types.js +0 -21
  101. package/dist/esm/src/client/duck/types.js.map +0 -1
  102. package/dist/esm/src/client/duck/utils.d.ts +0 -21
  103. package/dist/esm/src/client/duck/utils.d.ts.map +0 -1
  104. package/dist/esm/src/client/duck/utils.js +0 -2
  105. package/dist/esm/src/client/duck/utils.js.map +0 -1
  106. package/src/client/duck/actions.ts +0 -31
  107. package/src/client/duck/epic-recover.spec.ts +0 -180
  108. package/src/client/duck/epic-recover.ts +0 -109
  109. package/src/client/duck/epics.ts +0 -53
  110. package/src/client/duck/mod.ts +0 -38
  111. package/src/client/duck/operations.ts +0 -28
  112. package/src/client/duck/reducers.ts +0 -36
  113. package/src/client/duck/selectors.ts +0 -27
  114. package/src/client/duck/tests.spec.ts +0 -25
  115. package/src/client/duck/types.ts +0 -20
  116. package/src/client/duck/utils.ts +0 -20
@@ -1,36 +0,0 @@
1
- /**
2
- * Wechaty Open Source Software - https://github.com/wechaty
3
- *
4
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
5
- * Wechaty Contributors <https://github.com/wechaty>.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
- import { Observable } from 'rxjs';
21
- import type { AnyAction } from 'redux';
22
- declare const monitorHeartbeat$: (timeoutMilliseconds: number) => (action$: Observable<AnyAction>) => Observable<import("typesafe-actions").PayloadMetaAction<"wechaty-redux/ERROR_RECEIVED_EVENT", import("@juzi/wechaty-puppet/payloads").EventError, {
23
- puppetId: string;
24
- }>>;
25
- declare const epicRecoverDing$: (timeoutMilliseconds: number) => (action$: Observable<AnyAction>) => Observable<import("typesafe-actions").PayloadMetaAction<"wechaty-redux/DING_COMMAND", {
26
- data: string | undefined;
27
- }, {
28
- puppetId: string;
29
- }>>;
30
- declare const epicRecoverReset$: (timeoutMilliseconds: number) => (action$: Observable<AnyAction>) => Observable<import("typesafe-actions").PayloadMetaAction<"wechaty-redux/RESET_COMMAND", {
31
- data: string | undefined;
32
- }, {
33
- puppetId: string;
34
- }>>;
35
- export { monitorHeartbeat$, epicRecoverReset$, epicRecoverDing$, };
36
- //# sourceMappingURL=epic-recover.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epic-recover.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/epic-recover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,UAAU,EAGX,MAA4B,MAAM,CAAA;AAYnC,OAAO,KAAK,EAEV,SAAS,EACV,MAA4B,OAAO,CAAA;AAuBpC,QAAA,MAAM,iBAAiB,wBAAyB,MAAM,eAC1C,WAAW,SAAS,CAAC;;GAY5B,CAAA;AAEL,QAAA,MAAM,gBAAgB,wBAAyB,MAAM,eACzC,WAAW,SAAS,CAAC;;;;GAW5B,CAAA;AAEL,QAAA,MAAM,iBAAiB,wBAAyB,MAAM,eAC1C,WAAW,SAAS,CAAC;;;;GAW5B,CAAA;AAEL,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,CAAA"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.epicRecoverDing$ = exports.epicRecoverReset$ = exports.monitorHeartbeat$ = void 0;
4
- /**
5
- * Wechaty Open Source Software - https://github.com/wechaty
6
- *
7
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
8
- * Wechaty Contributors <https://github.com/wechaty>.
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- *
22
- */
23
- const rxjs_1 = require("rxjs");
24
- const operators_1 = require("rxjs/operators");
25
- const typesafe_actions_1 = require("typesafe-actions");
26
- const wechaty_redux_1 = require("@juzi/wechaty-redux");
27
- const wechaty_puppet_1 = require("@juzi/wechaty-puppet");
28
- const stateActive$ = (action$) => action$.pipe((0, operators_1.filter)((0, typesafe_actions_1.isActionOf)(wechaty_redux_1.Duck.actions.STATE_ACTIVATED_EVENT)), (0, operators_1.filter)(action => action.payload.state === true));
29
- const stateInactive$ = (action$) => action$.pipe((0, operators_1.filter)((0, typesafe_actions_1.isActionOf)(wechaty_redux_1.Duck.actions.STATE_INACTIVATED_EVENT)));
30
- const heartbeat$ = (action$) => action$.pipe((0, operators_1.filter)((0, typesafe_actions_1.isActionOf)([
31
- wechaty_redux_1.Duck.actions.HEARTBEAT_RECEIVED_EVENT,
32
- wechaty_redux_1.Duck.actions.DONG_RECEIVED_EVENT,
33
- ])));
34
- // Emit once when an active puppet lost heartbeat after a timeout period
35
- const monitorHeartbeat$ = (timeoutMilliseconds) => (action$) => stateActive$(action$).pipe((0, operators_1.switchMap)(action => heartbeat$(action$).pipe((0, operators_1.debounce)(() => (0, rxjs_1.interval)(timeoutMilliseconds)), (0, operators_1.tap)(() => wechaty_puppet_1.log.verbose('PuppetService', 'monitorHeartbeat$() %d seconds TIMEOUT', Math.floor(timeoutMilliseconds / 1000))), (0, operators_1.map)(() => wechaty_redux_1.Duck.actions.ERROR_RECEIVED_EVENT(action.meta.puppetId, { gerror: `monitorHeartbeat$() TIMEOUT(${timeoutMilliseconds})` })))));
36
- exports.monitorHeartbeat$ = monitorHeartbeat$;
37
- const epicRecoverDing$ = (timeoutMilliseconds) => (action$) => monitorHeartbeat$(timeoutMilliseconds)(action$).pipe((0, operators_1.switchMap)(action => (0, rxjs_1.timer)(0, Math.floor(timeoutMilliseconds)).pipe((0, operators_1.tap)(n => wechaty_puppet_1.log.verbose('PuppetService', 'epicRecoverDing$() actions.ding() emitted #%d', n)), (0, operators_1.map)(() => wechaty_redux_1.Duck.actions.DING_COMMAND(action.meta.puppetId, 'epicRecoverDing$')), (0, operators_1.takeUntil)(heartbeat$(action$)), (0, operators_1.takeUntil)(stateInactive$(action$)))));
38
- exports.epicRecoverDing$ = epicRecoverDing$;
39
- const epicRecoverReset$ = (timeoutMilliseconds) => (action$) => monitorHeartbeat$(timeoutMilliseconds)(action$).pipe((0, operators_1.switchMap)(action => (0, rxjs_1.timer)(0, timeoutMilliseconds * 2).pipe((0, operators_1.tap)(n => wechaty_puppet_1.log.verbose('PuppetService', 'epicRecoverReset$() actions.reset() emitted #%d', n)), (0, operators_1.map)(() => wechaty_redux_1.Duck.actions.RESET_COMMAND(action.meta.puppetId, 'epicRecoverReset$')), (0, operators_1.takeUntil)(heartbeat$(action$)), (0, operators_1.takeUntil)(stateInactive$(action$)))));
40
- exports.epicRecoverReset$ = epicRecoverReset$;
41
- //# sourceMappingURL=epic-recover.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epic-recover.js","sourceRoot":"","sources":["../../../../../src/client/duck/epic-recover.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,+BAImC;AACnC,8CAO6C;AAC7C,uDAE+C;AAK/C,uDAEkD;AAClD,yDAAmD;AAEnD,MAAM,YAAY,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,OAAO,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AM,CAAC,IAAI,CAAC,QAAQ,EACpB,mBAAmB,CACpB,CAAC,EACF,IAAA,qBAAS,EAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAC9B,IAAA,qBAAS,EAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CACnC,CAAC,CACH,CAAA;AAIH,8CAAiB"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env -S node --no-warnings --loader ts-node/esm
2
- export {};
3
- //# sourceMappingURL=epic-recover.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epic-recover.spec.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/epic-recover.spec.ts"],"names":[],"mappings":""}
@@ -1,131 +0,0 @@
1
- #!/usr/bin/env -S node --no-warnings --loader ts-node/esm
2
- "use strict";
3
- /* eslint-disable func-call-spacing */
4
- var __importDefault = (this && this.__importDefault) || function (mod) {
5
- return (mod && mod.__esModule) ? mod : { "default": mod };
6
- };
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- const tstest_1 = require("tstest");
9
- const testing_1 = require("rxjs/testing");
10
- const operators_1 = require("rxjs/operators");
11
- const wechaty_puppet_mock_1 = __importDefault(require("@juzi/wechaty-puppet-mock"));
12
- const wechaty_redux_1 = require("@juzi/wechaty-redux");
13
- const epic_recover_js_1 = require("./epic-recover.js");
14
- /**
15
- * RxJS Marble Testing
16
- *
17
- * - https://rxjs.dev/guide/testing/marble-testing
18
- * - https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/testing/marble-testing.md
19
- *
20
- */
21
- (0, tstest_1.test)('Example: marble testing', async (t) => {
22
- const testScheduler = new testing_1.TestScheduler(t.same);
23
- testScheduler.run(helpers => {
24
- const { cold, time, expectObservable, expectSubscriptions } = helpers;
25
- const e1 = cold('-a--b--c---|');
26
- const e1subs = ' ^----------!';
27
- const t = time('---| '); // t = 3
28
- const expected = ' -a-----c---|';
29
- expectObservable(e1.pipe((0, operators_1.throttleTime)(t))).toBe(expected);
30
- expectSubscriptions(e1.subscriptions).toBe(e1subs);
31
- });
32
- });
33
- (0, tstest_1.test)('Example 2: marble subscribe time frame testing', async (t) => {
34
- const testScheduler = new testing_1.TestScheduler(t.same);
35
- testScheduler.run(helpers => {
36
- const { hot, expectObservable, expectSubscriptions } = helpers;
37
- const source = hot(' --a--b--c--d--e--f');
38
- const subscription = '-----^------!-';
39
- const expected = ' -----b--c--d--';
40
- expectObservable(source, subscription).toBe(expected);
41
- void expectSubscriptions;
42
- // expectSubscriptions(source.subscriptions).toBe(subscription)
43
- });
44
- });
45
- (0, tstest_1.test)('Example 3: subscribe with unsubscribe / complete', async (t) => {
46
- const testScheduler = new testing_1.TestScheduler(t.same);
47
- testScheduler.run(({ hot, expectObservable }) => {
48
- const values = {
49
- a: 0,
50
- b: 1,
51
- c: 2,
52
- };
53
- const source = hot(' 10ms a 9ms b 9ms c-|', values);
54
- const subscription1 = ' 20ms ^ 9ms -!-';
55
- const subscription2 = ' 30ms ^--';
56
- const expected1 = ' 20ms b 9ms c--';
57
- const expected2 = ' 30ms c-|';
58
- expectObservable(source, subscription1).toBe(expected1, values);
59
- expectObservable(source, subscription2).toBe(expected2, values);
60
- });
61
- });
62
- (0, tstest_1.test)('Example 4: play ground', async (t) => {
63
- const testScheduler = new testing_1.TestScheduler(t.same);
64
- testScheduler.run(helpers => {
65
- const { hot, cold, expectObservable } = helpers;
66
- void hot;
67
- void cold;
68
- const TIMEOUT = 15;
69
- const source = hot(`-----a-----h------h ${TIMEOUT}ms --`);
70
- const sub = ` ------^-------!---- ${TIMEOUT}ms --`;
71
- const expected = ` -----------h------- ${TIMEOUT}ms --`;
72
- expectObservable(source, sub).toBe(expected);
73
- });
74
- });
75
- (0, tstest_1.test)('monitorHeartbeat$() emit once after lost heartbeat', async (t) => {
76
- const testScheduler = new testing_1.TestScheduler(t.same);
77
- const puppet = new wechaty_puppet_mock_1.default();
78
- const TIMEOUT = 15;
79
- testScheduler.run(helpers => {
80
- const { hot, expectObservable, expectSubscriptions } = helpers;
81
- const marble = {
82
- a: wechaty_redux_1.Duck.actions.STATE_ACTIVATED_EVENT(puppet.id, true),
83
- d: wechaty_redux_1.Duck.actions.DONG_RECEIVED_EVENT(puppet.id, { data: 'dong' }),
84
- e: wechaty_redux_1.Duck.actions.ERROR_RECEIVED_EVENT(puppet.id, { gerror: `monitorHeartbeat$() TIMEOUT(${TIMEOUT})` }),
85
- h: wechaty_redux_1.Duck.actions.HEARTBEAT_RECEIVED_EVENT(puppet.id, { data: 'heartbeat' }),
86
- };
87
- const puppet$ = hot(` -a----h----h ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT - 1}ms h ${TIMEOUT}ms ${TIMEOUT - 1}ms d ${TIMEOUT}ms ------`, marble);
88
- const subscription = `^----------- ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms -----!`;
89
- const expected = ` ------------ ${TIMEOUT - 1}ms e ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT - 1}ms e ${TIMEOUT}ms ${TIMEOUT - 1}ms e ------`;
90
- expectObservable((0, epic_recover_js_1.monitorHeartbeat$)(TIMEOUT)(puppet$), subscription).toBe(expected, marble);
91
- void expectSubscriptions;
92
- // expectSubscriptions(puppet$.subscriptions).toBe(sub)
93
- });
94
- });
95
- (0, tstest_1.test)('epicRecoverDing$() emit periodly', async (t) => {
96
- const testScheduler = new testing_1.TestScheduler(t.same);
97
- const puppet = new wechaty_puppet_mock_1.default();
98
- const TIMEOUT = 15;
99
- testScheduler.run(helpers => {
100
- const { hot, expectObservable } = helpers;
101
- const marble = {
102
- a: wechaty_redux_1.Duck.actions.STATE_ACTIVATED_EVENT(puppet.id, true),
103
- d: wechaty_redux_1.Duck.actions.DONG_RECEIVED_EVENT(puppet.id, { data: 'dong' }),
104
- h: wechaty_redux_1.Duck.actions.HEARTBEAT_RECEIVED_EVENT(puppet.id, { data: 'heartbeat' }),
105
- i: wechaty_redux_1.Duck.actions.DING_COMMAND(puppet.id, 'epicRecoverDing$'),
106
- };
107
- const puppet$ = hot(` -a----h----h ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT - 1}ms h ${TIMEOUT - 1}ms h ${TIMEOUT - 1}ms d ${TIMEOUT - 1}ms d ------`, marble);
108
- const subscription = `^----------- ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms -----!`;
109
- const expected = ` ------------ ${TIMEOUT - 1}ms i ${TIMEOUT - 1}ms i ${TIMEOUT - 1}ms i ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ------`;
110
- expectObservable((0, epic_recover_js_1.epicRecoverDing$)(TIMEOUT)(puppet$), subscription).toBe(expected, marble);
111
- });
112
- });
113
- (0, tstest_1.test)('epicRecoverReset$() emit periodly', async (t) => {
114
- const testScheduler = new testing_1.TestScheduler(t.same);
115
- const puppet = new wechaty_puppet_mock_1.default();
116
- const TIMEOUT = 60;
117
- testScheduler.run(helpers => {
118
- const { hot, expectObservable } = helpers;
119
- const marble = {
120
- a: wechaty_redux_1.Duck.actions.STATE_ACTIVATED_EVENT(puppet.id, true),
121
- d: wechaty_redux_1.Duck.actions.DONG_RECEIVED_EVENT(puppet.id, { data: 'dong' }),
122
- h: wechaty_redux_1.Duck.actions.HEARTBEAT_RECEIVED_EVENT(puppet.id, { data: 'heartbeat' }),
123
- r: wechaty_redux_1.Duck.actions.RESET_COMMAND(puppet.id, 'epicRecoverReset$'),
124
- };
125
- const puppet$ = hot(` -a----h----h ${TIMEOUT}ms ${TIMEOUT * 2}ms ${TIMEOUT * 2}ms ${TIMEOUT * 2 - 1}ms h ${TIMEOUT - 1}ms h ${TIMEOUT - 1}ms d ${TIMEOUT - 1}ms d ------`, marble);
126
- const subscription = `^----------- ${TIMEOUT}ms ${TIMEOUT * 2}ms ${TIMEOUT * 2}ms ${TIMEOUT * 2}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms -----!`;
127
- const expected = ` ------------ ${TIMEOUT - 1}ms r ${TIMEOUT * 2 - 1}ms r ${TIMEOUT * 2 - 1}ms r ${TIMEOUT * 2}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ------`;
128
- expectObservable((0, epic_recover_js_1.epicRecoverReset$)(TIMEOUT)(puppet$), subscription).toBe(expected, marble);
129
- });
130
- });
131
- //# sourceMappingURL=epic-recover.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epic-recover.spec.js","sourceRoot":"","sources":["../../../../../src/client/duck/epic-recover.spec.ts"],"names":[],"mappings":";;AACA,sCAAsC;;;;;AAEtC,mCAA8B;AAE9B,0CAEyC;AACzC,8CAE2C;AAC3C,oFAAsD;AAEtD,uDAEgD;AAEhD,uDAI8C;AAE9C;;;;;;GAMG;AACH,IAAA,aAAI,EAAC,yBAAyB,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE;IACxC,MAAM,aAAa,GAAG,IAAI,uBAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAE/C,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QAC1B,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAA;QACrE,MAAM,EAAE,GAAS,IAAI,CAAC,cAAc,CAAC,CAAA;QACrC,MAAM,MAAM,GAAK,mBAAmB,CAAA;QACpC,MAAM,CAAC,GAAU,IAAI,CAAC,cAAc,CAAC,CAAA,CAAE,QAAQ;QAC/C,MAAM,QAAQ,GAAG,mBAAmB,CAAA;QAEpC,gBAAgB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAA,wBAAY,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACzD,mB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O,GAAG,CAAC,QAAQ,OAAO,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QACpM,MAAM,YAAY,GAAG,gBAAgB,OAAO,YAAY,OAAO,GAAG,CAAC,YAAY,OAAO,GAAG,CAAC,YAAY,OAAO,GAAG,CAAC,YAAY,OAAO,YAAY,OAAO,YAAY,OAAO,iBAAiB,CAAA;QAC3L,MAAM,QAAQ,GAAI,mBAAmB,OAAO,GAAG,CAAC,QAAQ,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,OAAO,GAAG,CAAC,YAAY,OAAO,YAAY,OAAO,YAAY,OAAO,iBAAiB,CAAA;QAE3L,gBAAgB,CACd,IAAA,mCAAiB,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EACnC,YAAY,CACb,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAC1B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { Epic } from 'redux-observable';
2
- declare const recoverEpic: Epic;
3
- export { recoverEpic, };
4
- //# sourceMappingURL=epics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epics.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/epics.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,IAAI,EACL,MAAoB,kBAAkB,CAAA;AAiBvC,QAAA,MAAM,WAAW,EAAE,IAGlB,CAAA;AAED,OAAO,EACL,WAAW,GACZ,CAAA"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.recoverEpic = void 0;
4
- /**
5
- * Wechaty Open Source Software - https://github.com/wechaty
6
- *
7
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
8
- * Wechaty Contributors <https://github.com/wechaty>.
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- *
22
- */
23
- const rxjs_1 = require("rxjs");
24
- const epic_recover_js_1 = require("./epic-recover.js");
25
- /**
26
- * The GRPC keepalive timeout is 20 seconds
27
- * So we use 15 seconds to save the GRPC keepalive cost
28
- *
29
- * https://github.com/grpc/grpc/blob/master/doc/keepalive.md
30
- * GRPC_ARG_KEEPALIVE_TIMEOUT_MS 20000 (20 seconds) 20000 (20 seconds)
31
- */
32
- const TIMEOUT_SOFT = 15 * 1000;
33
- const TIMEOUT_HARD = Math.floor(4.5 * TIMEOUT_SOFT);
34
- const recoverEpic = (action$) => (0, rxjs_1.merge)((0, epic_recover_js_1.epicRecoverDing$)(TIMEOUT_SOFT)(action$), (0, epic_recover_js_1.epicRecoverReset$)(TIMEOUT_HARD)(action$));
35
- exports.recoverEpic = recoverEpic;
36
- //# sourceMappingURL=epics.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epics.js","sourceRoot":"","sources":["../../../../../src/client/duck/epics.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,+BAG2B;AAQ3B,uDAGsD;AAEtD;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,EAAE,GAAG,IAAI,CAAA;AAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,YAAY,CAAC,CAAA;AAEnD,MAAM,WAAW,GAAS,CAAC,OAA8B,EAAE,EAAE,CAAC,IAAA,YAAK,EACjE,IAAA,kCAAgB,EAAC,YAAY,CAAC,CAAC,OAAO,CAAC,EACvC,IAAA,mCAAiB,EAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CACzC,CAAA;AAGC,kCAAW"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Wechaty Open Source Software - https://github.com/wechaty
3
- *
4
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
5
- * Wechaty Contributors <https://github.com/wechaty>.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
- import reducer from './reducers.js';
21
- import * as actions from './actions.js';
22
- import * as epics from './epics.js';
23
- import * as operations from './operations.js';
24
- import * as selectors from './selectors.js';
25
- import * as types from './types.js';
26
- import * as utils from './utils.js';
27
- export { actions, epics, operations, selectors, types, utils, };
28
- export default reducer;
29
- //# sourceMappingURL=mod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,OAAO,MAAM,eAAe,CAAA;AAEnC,OAAO,KAAK,OAAO,MAAS,cAAc,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAW,YAAY,CAAA;AACxC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,SAAS,MAAO,gBAAgB,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAW,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,MAAW,YAAY,CAAA;AAExC,OAAO,EACL,OAAO,EACP,KAAK,EACL,UAAU,EACV,SAAS,EACT,KAAK,EACL,KAAK,GACN,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -1,63 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.utils = exports.types = exports.selectors = exports.operations = exports.epics = exports.actions = void 0;
30
- /**
31
- * Wechaty Open Source Software - https://github.com/wechaty
32
- *
33
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
34
- * Wechaty Contributors <https://github.com/wechaty>.
35
- *
36
- * Licensed under the Apache License, Version 2.0 (the "License");
37
- * you may not use this file except in compliance with the License.
38
- * You may obtain a copy of the License at
39
- *
40
- * http://www.apache.org/licenses/LICENSE-2.0
41
- *
42
- * Unless required by applicable law or agreed to in writing, software
43
- * distributed under the License is distributed on an "AS IS" BASIS,
44
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45
- * See the License for the specific language governing permissions and
46
- * limitations under the License.
47
- *
48
- */
49
- const reducers_js_1 = __importDefault(require("./reducers.js"));
50
- const actions = __importStar(require("./actions.js"));
51
- exports.actions = actions;
52
- const epics = __importStar(require("./epics.js"));
53
- exports.epics = epics;
54
- const operations = __importStar(require("./operations.js"));
55
- exports.operations = operations;
56
- const selectors = __importStar(require("./selectors.js"));
57
- exports.selectors = selectors;
58
- const types = __importStar(require("./types.js"));
59
- exports.types = types;
60
- const utils = __importStar(require("./utils.js"));
61
- exports.utils = utils;
62
- exports.default = reducers_js_1.default;
63
- //# sourceMappingURL=mod.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.js","sourceRoot":"","sources":["../../../../../src/client/duck/mod.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,gEAAmC;AAEnC,sDAA0C;AAQxC,0BAAO;AAPT,kDAAwC;AAQtC,sBAAK;AAPP,4DAA6C;AAQ3C,gCAAU;AAPZ,0DAA4C;AAQ1C,8BAAS;AAPX,kDAAwC;AAQtC,sBAAK;AAPP,kDAAwC;AAQtC,sBAAK;AAGP,kBAAe,qBAAO,CAAA"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Wechaty Open Source Software - https://github.com/wechaty
3
- *
4
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
5
- * Wechaty Contributors <https://github.com/wechaty>.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
- import type { Dispatch } from 'redux';
21
- declare const nop: (dispatch: Dispatch) => () => import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">;
22
- export { nop, };
23
- //# sourceMappingURL=operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIrC,QAAA,MAAM,GAAG,aAAc,QAAQ,+EAAkC,CAAA;AAEjE,OAAO,EACL,GAAG,GACJ,CAAA"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.nop = void 0;
27
- const actions = __importStar(require("./actions.js"));
28
- const nop = (dispatch) => () => dispatch(actions.nop());
29
- exports.nop = nop;
30
- //# sourceMappingURL=operations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../../src/client/duck/operations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,sDAAuC;AAEvC,MAAM,GAAG,GAAG,CAAC,QAAkB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;AAG/D,kBAAG"}
@@ -1,59 +0,0 @@
1
- declare const reducer: import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
2
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
3
- handleAction: <TActionCreator extends (...args: any[]) => never, THandledAction extends ReturnType<TActionCreator>, TOutputAction extends never>(singleOrMultipleCreatorsAndTypes: TActionCreator | TActionCreator[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
4
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
5
- handleAction: <TActionCreator_1 extends (...args: any[]) => TOutputAction, THandledAction_1 extends ReturnType<TActionCreator_1>, TOutputAction_1 extends Exclude<TOutputAction, THandledAction_1>>(singleOrMultipleCreatorsAndTypes: TActionCreator_1 | TActionCreator_1[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_1) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_1] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
6
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_1>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
7
- handleAction: <TActionCreator_2 extends (...args: any[]) => TOutputAction_1, THandledAction_2 extends ReturnType<TActionCreator_2>, TOutputAction_2 extends Exclude<TOutputAction_1, THandledAction_2>>(singleOrMultipleCreatorsAndTypes: TActionCreator_2 | TActionCreator_2[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_2) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_2] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
8
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_2>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
9
- handleAction: <TActionCreator_3 extends (...args: any[]) => TOutputAction_2, THandledAction_3 extends ReturnType<TActionCreator_3>, TOutputAction_3 extends Exclude<TOutputAction_2, THandledAction_3>>(singleOrMultipleCreatorsAndTypes: TActionCreator_3 | TActionCreator_3[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_3) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_3] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
10
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_3>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
11
- handleAction: <TActionCreator_4 extends (...args: any[]) => TOutputAction_3, THandledAction_4 extends ReturnType<TActionCreator_4>, TOutputAction_4 extends Exclude<TOutputAction_3, THandledAction_4>>(singleOrMultipleCreatorsAndTypes: TActionCreator_4 | TActionCreator_4[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_4) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_4] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
12
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_4>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
13
- handleAction: <TActionCreator_5 extends (...args: any[]) => TOutputAction_4, THandledAction_5 extends ReturnType<TActionCreator_5>, TOutputAction_5 extends Exclude<TOutputAction_4, THandledAction_5>>(singleOrMultipleCreatorsAndTypes: TActionCreator_5 | TActionCreator_5[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_5) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_5] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
14
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_5>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
15
- handleAction: <TActionCreator_6 extends (...args: any[]) => TOutputAction_5, THandledAction_6 extends ReturnType<TActionCreator_6>, TOutputAction_6 extends Exclude<TOutputAction_5, THandledAction_6>>(singleOrMultipleCreatorsAndTypes: TActionCreator_6 | TActionCreator_6[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_6) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_6] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
16
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_6>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
17
- handleAction: <TActionCreator_7 extends (...args: any[]) => TOutputAction_6, THandledAction_7 extends ReturnType<TActionCreator_7>, TOutputAction_7 extends Exclude<TOutputAction_6, THandledAction_7>>(singleOrMultipleCreatorsAndTypes: TActionCreator_7 | TActionCreator_7[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_7) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_7] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
18
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_7>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
19
- handleAction: <TActionCreator_8 extends (...args: any[]) => TOutputAction_7, THandledAction_8 extends ReturnType<TActionCreator_8>, TOutputAction_8 extends Exclude<TOutputAction_7, THandledAction_8>>(singleOrMultipleCreatorsAndTypes: TActionCreator_8 | TActionCreator_8[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_8) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_8] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
20
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_8>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
21
- handleAction: <TActionCreator_9 extends (...args: any[]) => TOutputAction_8, THandledAction_9 extends ReturnType<TActionCreator_9>, TOutputAction_9 extends Exclude<TOutputAction_8, THandledAction_9>>(singleOrMultipleCreatorsAndTypes: TActionCreator_9 | TActionCreator_9[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_9) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_9] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
22
- handlers: Record<Exclude<import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">, TOutputAction_9>["type"], (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
23
- handleAction: <TActionCreator_10 extends (...args: any[]) => TOutputAction_9, THandledAction_10 extends ReturnType<TActionCreator_10>, TOutputAction_10 extends Exclude<TOutputAction_9, THandledAction_10>>(singleOrMultipleCreatorsAndTypes: TActionCreator_10 | TActionCreator_10[], reducer: (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: THandledAction_10) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>) => [TOutputAction_10] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & any : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
24
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
25
- };
26
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
27
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
28
- };
29
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
30
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
31
- };
32
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
33
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
34
- };
35
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
36
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
37
- };
38
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
39
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
40
- };
41
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
42
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
43
- };
44
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
45
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
46
- };
47
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
48
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
49
- };
50
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
51
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
52
- };
53
- } : import("typesafe-actions").Reducer<import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">> & {
54
- handlers: Record<"wechaty-puppet-service/NOP", (state: import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>, action: import("typesafe-actions").EmptyAction<"wechaty-puppet-service/NOP">) => import("utility-types/dist/mapped-types.js")._DeepReadonlyObject<unknown>>;
55
- };
56
- };
57
- export type State = ReturnType<typeof reducer>;
58
- export default reducer;
59
- //# sourceMappingURL=reducers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducers.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/reducers.ts"],"names":[],"mappings":"AA+BA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAC0C,CAAA;AAEvD,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAC9C,eAAe,OAAO,CAAA"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- /**
27
- * Wechaty Open Source Software - https://github.com/wechaty
28
- *
29
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
30
- * Wechaty Contributors <https://github.com/wechaty>.
31
- *
32
- * Licensed under the Apache License, Version 2.0 (the "License");
33
- * you may not use this file except in compliance with the License.
34
- * You may obtain a copy of the License at
35
- *
36
- * http://www.apache.org/licenses/LICENSE-2.0
37
- *
38
- * Unless required by applicable law or agreed to in writing, software
39
- * distributed under the License is distributed on an "AS IS" BASIS,
40
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
41
- * See the License for the specific language governing permissions and
42
- * limitations under the License.
43
- *
44
- */
45
- const typesafe_actions_1 = require("typesafe-actions");
46
- const actions = __importStar(require("./actions.js"));
47
- const initialState = {};
48
- const reducer = (0, typesafe_actions_1.createReducer)(initialState)
49
- .handleAction(actions.nop, (state, _action) => state);
50
- exports.default = reducer;
51
- //# sourceMappingURL=reducers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducers.js","sourceRoot":"","sources":["../../../../../src/client/duck/reducers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,uDAG2C;AAK3C,sDAAuC;AAEvC,MAAM,YAAY,GAAqB,EAAE,CAAA;AAEzC,MAAM,OAAO,GAAG,IAAA,gCAAa,EAAkD,YAAY,CAAC;KACzF,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;AAGvD,kBAAe,OAAO,CAAA"}