@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.
- package/dist/cjs/src/client/puppet-service.d.ts +0 -11
- package/dist/cjs/src/client/puppet-service.d.ts.map +1 -1
- package/dist/cjs/src/client/puppet-service.js +0 -19
- package/dist/cjs/src/client/puppet-service.js.map +1 -1
- package/dist/cjs/src/package-json.d.ts.map +1 -1
- package/dist/cjs/src/package-json.js +1 -2
- package/dist/cjs/src/package-json.js.map +1 -1
- package/dist/esm/src/client/puppet-service.d.ts +0 -11
- package/dist/esm/src/client/puppet-service.d.ts.map +1 -1
- package/dist/esm/src/client/puppet-service.js +0 -21
- package/dist/esm/src/client/puppet-service.js.map +1 -1
- package/dist/esm/src/package-json.d.ts.map +1 -1
- package/dist/esm/src/package-json.js +1 -2
- package/dist/esm/src/package-json.js.map +1 -1
- package/package.json +1 -2
- package/src/client/puppet-service.ts +1 -34
- package/src/package-json.ts +1 -2
- package/dist/cjs/src/client/duck/actions.d.ts +0 -6
- package/dist/cjs/src/client/duck/actions.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/actions.js +0 -54
- package/dist/cjs/src/client/duck/actions.js.map +0 -1
- package/dist/cjs/src/client/duck/epic-recover.d.ts +0 -36
- package/dist/cjs/src/client/duck/epic-recover.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/epic-recover.js +0 -41
- package/dist/cjs/src/client/duck/epic-recover.js.map +0 -1
- package/dist/cjs/src/client/duck/epic-recover.spec.d.ts +0 -3
- package/dist/cjs/src/client/duck/epic-recover.spec.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/epic-recover.spec.js +0 -131
- package/dist/cjs/src/client/duck/epic-recover.spec.js.map +0 -1
- package/dist/cjs/src/client/duck/epics.d.ts +0 -4
- package/dist/cjs/src/client/duck/epics.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/epics.js +0 -36
- package/dist/cjs/src/client/duck/epics.js.map +0 -1
- package/dist/cjs/src/client/duck/mod.d.ts +0 -29
- package/dist/cjs/src/client/duck/mod.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/mod.js +0 -63
- package/dist/cjs/src/client/duck/mod.js.map +0 -1
- package/dist/cjs/src/client/duck/operations.d.ts +0 -23
- package/dist/cjs/src/client/duck/operations.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/operations.js +0 -30
- package/dist/cjs/src/client/duck/operations.js.map +0 -1
- package/dist/cjs/src/client/duck/reducers.d.ts +0 -59
- package/dist/cjs/src/client/duck/reducers.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/reducers.js +0 -51
- package/dist/cjs/src/client/duck/reducers.js.map +0 -1
- package/dist/cjs/src/client/duck/selectors.d.ts +0 -21
- package/dist/cjs/src/client/duck/selectors.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/selectors.js +0 -23
- package/dist/cjs/src/client/duck/selectors.js.map +0 -1
- package/dist/cjs/src/client/duck/tests.spec.d.ts +0 -3
- package/dist/cjs/src/client/duck/tests.spec.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/tests.spec.js +0 -49
- package/dist/cjs/src/client/duck/tests.spec.js.map +0 -1
- package/dist/cjs/src/client/duck/types.d.ts +0 -21
- package/dist/cjs/src/client/duck/types.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/types.js +0 -24
- package/dist/cjs/src/client/duck/types.js.map +0 -1
- package/dist/cjs/src/client/duck/utils.d.ts +0 -21
- package/dist/cjs/src/client/duck/utils.d.ts.map +0 -1
- package/dist/cjs/src/client/duck/utils.js +0 -3
- package/dist/cjs/src/client/duck/utils.js.map +0 -1
- package/dist/esm/src/client/duck/actions.d.ts +0 -6
- package/dist/esm/src/client/duck/actions.d.ts.map +0 -1
- package/dist/esm/src/client/duck/actions.js +0 -28
- package/dist/esm/src/client/duck/actions.js.map +0 -1
- package/dist/esm/src/client/duck/epic-recover.d.ts +0 -36
- package/dist/esm/src/client/duck/epic-recover.d.ts.map +0 -1
- package/dist/esm/src/client/duck/epic-recover.js +0 -36
- package/dist/esm/src/client/duck/epic-recover.js.map +0 -1
- package/dist/esm/src/client/duck/epic-recover.spec.d.ts +0 -3
- package/dist/esm/src/client/duck/epic-recover.spec.d.ts.map +0 -1
- package/dist/esm/src/client/duck/epic-recover.spec.js +0 -126
- package/dist/esm/src/client/duck/epic-recover.spec.js.map +0 -1
- package/dist/esm/src/client/duck/epics.d.ts +0 -4
- package/dist/esm/src/client/duck/epics.d.ts.map +0 -1
- package/dist/esm/src/client/duck/epics.js +0 -33
- package/dist/esm/src/client/duck/epics.js.map +0 -1
- package/dist/esm/src/client/duck/mod.d.ts +0 -29
- package/dist/esm/src/client/duck/mod.d.ts.map +0 -1
- package/dist/esm/src/client/duck/mod.js +0 -29
- package/dist/esm/src/client/duck/mod.js.map +0 -1
- package/dist/esm/src/client/duck/operations.d.ts +0 -23
- package/dist/esm/src/client/duck/operations.d.ts.map +0 -1
- package/dist/esm/src/client/duck/operations.js +0 -4
- package/dist/esm/src/client/duck/operations.js.map +0 -1
- package/dist/esm/src/client/duck/reducers.d.ts +0 -59
- package/dist/esm/src/client/duck/reducers.d.ts.map +0 -1
- package/dist/esm/src/client/duck/reducers.js +0 -26
- package/dist/esm/src/client/duck/reducers.js.map +0 -1
- package/dist/esm/src/client/duck/selectors.d.ts +0 -21
- package/dist/esm/src/client/duck/selectors.d.ts.map +0 -1
- package/dist/esm/src/client/duck/selectors.js +0 -22
- package/dist/esm/src/client/duck/selectors.js.map +0 -1
- package/dist/esm/src/client/duck/tests.spec.d.ts +0 -3
- package/dist/esm/src/client/duck/tests.spec.d.ts.map +0 -1
- package/dist/esm/src/client/duck/tests.spec.js +0 -24
- package/dist/esm/src/client/duck/tests.spec.js.map +0 -1
- package/dist/esm/src/client/duck/types.d.ts +0 -21
- package/dist/esm/src/client/duck/types.d.ts.map +0 -1
- package/dist/esm/src/client/duck/types.js +0 -21
- package/dist/esm/src/client/duck/types.js.map +0 -1
- package/dist/esm/src/client/duck/utils.d.ts +0 -21
- package/dist/esm/src/client/duck/utils.d.ts.map +0 -1
- package/dist/esm/src/client/duck/utils.js +0 -2
- package/dist/esm/src/client/duck/utils.js.map +0 -1
- package/src/client/duck/actions.ts +0 -31
- package/src/client/duck/epic-recover.spec.ts +0 -180
- package/src/client/duck/epic-recover.ts +0 -109
- package/src/client/duck/epics.ts +0 -53
- package/src/client/duck/mod.ts +0 -38
- package/src/client/duck/operations.ts +0 -28
- package/src/client/duck/reducers.ts +0 -36
- package/src/client/duck/selectors.ts +0 -27
- package/src/client/duck/tests.spec.ts +0 -25
- package/src/client/duck/types.ts +0 -20
- package/src/client/duck/utils.ts +0 -20
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../../src/client/duck/operations.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,MAAM,GAAG,GAAG,CAAC,QAAkB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;AAEjE,OAAO,EACL,GAAG,GACJ,CAAA"}
|
|
@@ -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,26 +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 { createReducer, } from 'typesafe-actions';
|
|
21
|
-
import * as actions from './actions.js';
|
|
22
|
-
const initialState = {};
|
|
23
|
-
const reducer = createReducer(initialState)
|
|
24
|
-
.handleAction(actions.nop, (state, _action) => state);
|
|
25
|
-
export default reducer;
|
|
26
|
-
//# 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,OAAO,EACL,aAAa,GAEd,MAAwB,kBAAkB,CAAA;AAK3C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,MAAM,YAAY,GAAqB,EAAE,CAAA;AAEzC,MAAM,OAAO,GAAG,aAAa,CAAkD,YAAY,CAAC;KACzF,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;AAGvD,eAAe,OAAO,CAAA"}
|
|
@@ -1,21 +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
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/selectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,EACN,CAAA"}
|
|
@@ -1,22 +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 { State } from './reducers.js'
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=selectors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../../src/client/duck/selectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,6CAA6C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tests.spec.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/tests.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --no-warnings --loader ts-node/esm
|
|
2
|
-
/**
|
|
3
|
-
* Wechaty Open Source Software - https://github.com/wechaty
|
|
4
|
-
*
|
|
5
|
-
* @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
|
|
6
|
-
* Wechaty Contributors <https://github.com/wechaty>.
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
import { validateDuck } from 'ducks';
|
|
22
|
-
import * as Duck from './mod.js';
|
|
23
|
-
validateDuck(Duck);
|
|
24
|
-
//# sourceMappingURL=tests.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tests.spec.js","sourceRoot":"","sources":["../../../../../src/client/duck/tests.spec.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAEhC,YAAY,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -1,21 +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
|
-
export declare const NOP = "wechaty-puppet-service/NOP";
|
|
21
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,GAAG,+BAA+B,CAAA"}
|
|
@@ -1,21 +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
|
-
export const NOP = 'wechaty-puppet-service/NOP';
|
|
21
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/client/duck/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,4BAA4B,CAAA"}
|
|
@@ -1,21 +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
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/client/duck/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/client/duck/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1,31 +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
|
-
/* eslint-disable sort-keys */
|
|
21
|
-
import {
|
|
22
|
-
createAction,
|
|
23
|
-
} from 'typesafe-actions'
|
|
24
|
-
|
|
25
|
-
import * as types from './types.js'
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Bug compatible & workaround for Ducks API
|
|
29
|
-
* https://github.com/huan/ducks/issues/2
|
|
30
|
-
*/
|
|
31
|
-
export const nop = createAction(types.NOP)()
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --no-warnings --loader ts-node/esm
|
|
2
|
-
/* eslint-disable func-call-spacing */
|
|
3
|
-
|
|
4
|
-
import { test } from 'tstest'
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
TestScheduler,
|
|
8
|
-
} from 'rxjs/testing'
|
|
9
|
-
import {
|
|
10
|
-
throttleTime,
|
|
11
|
-
} from 'rxjs/operators'
|
|
12
|
-
import PuppetMock from '@juzi/wechaty-puppet-mock'
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
Duck as PuppetDuck,
|
|
16
|
-
} from '@juzi/wechaty-redux'
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
epicRecoverReset$,
|
|
20
|
-
epicRecoverDing$,
|
|
21
|
-
monitorHeartbeat$,
|
|
22
|
-
} from './epic-recover.js'
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* RxJS Marble Testing
|
|
26
|
-
*
|
|
27
|
-
* - https://rxjs.dev/guide/testing/marble-testing
|
|
28
|
-
* - https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/testing/marble-testing.md
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
test('Example: marble testing', async t => {
|
|
32
|
-
const testScheduler = new TestScheduler(t.same)
|
|
33
|
-
|
|
34
|
-
testScheduler.run(helpers => {
|
|
35
|
-
const { cold, time, expectObservable, expectSubscriptions } = helpers
|
|
36
|
-
const e1 = cold('-a--b--c---|')
|
|
37
|
-
const e1subs = ' ^----------!'
|
|
38
|
-
const t = time('---| ') // t = 3
|
|
39
|
-
const expected = ' -a-----c---|'
|
|
40
|
-
|
|
41
|
-
expectObservable(e1.pipe(throttleTime(t))).toBe(expected)
|
|
42
|
-
expectSubscriptions(e1.subscriptions).toBe(e1subs)
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
test('Example 2: marble subscribe time frame testing', async t => {
|
|
47
|
-
const testScheduler = new TestScheduler(t.same)
|
|
48
|
-
|
|
49
|
-
testScheduler.run(helpers => {
|
|
50
|
-
const { hot, expectObservable, expectSubscriptions } = helpers
|
|
51
|
-
const source = hot(' --a--b--c--d--e--f')
|
|
52
|
-
const subscription = '-----^------!-'
|
|
53
|
-
const expected = ' -----b--c--d--'
|
|
54
|
-
expectObservable(source, subscription).toBe(expected)
|
|
55
|
-
void expectSubscriptions
|
|
56
|
-
// expectSubscriptions(source.subscriptions).toBe(subscription)
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
test('Example 3: subscribe with unsubscribe / complete', async t => {
|
|
61
|
-
const testScheduler = new TestScheduler(t.same)
|
|
62
|
-
|
|
63
|
-
testScheduler.run(({ hot, expectObservable }) => {
|
|
64
|
-
const values = {
|
|
65
|
-
a: 0,
|
|
66
|
-
b: 1,
|
|
67
|
-
c: 2,
|
|
68
|
-
}
|
|
69
|
-
const source = hot(' 10ms a 9ms b 9ms c-|', values)
|
|
70
|
-
const subscription1 = ' 20ms ^ 9ms -!-'
|
|
71
|
-
const subscription2 = ' 30ms ^--'
|
|
72
|
-
const expected1 = ' 20ms b 9ms c--'
|
|
73
|
-
const expected2 = ' 30ms c-|'
|
|
74
|
-
expectObservable(source, subscription1).toBe(expected1, values)
|
|
75
|
-
expectObservable(source, subscription2).toBe(expected2, values)
|
|
76
|
-
})
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
test('Example 4: play ground', async t => {
|
|
80
|
-
const testScheduler = new TestScheduler(t.same)
|
|
81
|
-
|
|
82
|
-
testScheduler.run(helpers => {
|
|
83
|
-
const { hot, cold, expectObservable } = helpers
|
|
84
|
-
void hot
|
|
85
|
-
void cold
|
|
86
|
-
const TIMEOUT = 15
|
|
87
|
-
const source = hot(`-----a-----h------h ${TIMEOUT}ms --`)
|
|
88
|
-
const sub = ` ------^-------!---- ${TIMEOUT}ms --`
|
|
89
|
-
const expected = ` -----------h------- ${TIMEOUT}ms --`
|
|
90
|
-
|
|
91
|
-
expectObservable(source, sub).toBe(expected)
|
|
92
|
-
})
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
test('monitorHeartbeat$() emit once after lost heartbeat', async t => {
|
|
96
|
-
const testScheduler = new TestScheduler(t.same)
|
|
97
|
-
|
|
98
|
-
const puppet = new PuppetMock() as any
|
|
99
|
-
|
|
100
|
-
const TIMEOUT = 15
|
|
101
|
-
|
|
102
|
-
testScheduler.run(helpers => {
|
|
103
|
-
const { hot, expectObservable, expectSubscriptions } = helpers
|
|
104
|
-
|
|
105
|
-
const marble = {
|
|
106
|
-
a: PuppetDuck.actions.STATE_ACTIVATED_EVENT (puppet.id, true),
|
|
107
|
-
d: PuppetDuck.actions.DONG_RECEIVED_EVENT (puppet.id, { data: 'dong' }),
|
|
108
|
-
e: PuppetDuck.actions.ERROR_RECEIVED_EVENT (puppet.id, { gerror: `monitorHeartbeat$() TIMEOUT(${TIMEOUT})` }),
|
|
109
|
-
h: PuppetDuck.actions.HEARTBEAT_RECEIVED_EVENT(puppet.id, { data: 'heartbeat' }),
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
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)
|
|
113
|
-
const subscription = `^----------- ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms -----!`
|
|
114
|
-
const expected = ` ------------ ${TIMEOUT - 1}ms e ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT - 1}ms e ${TIMEOUT}ms ${TIMEOUT - 1}ms e ------`
|
|
115
|
-
|
|
116
|
-
expectObservable(
|
|
117
|
-
monitorHeartbeat$(TIMEOUT)(puppet$),
|
|
118
|
-
subscription,
|
|
119
|
-
).toBe(expected, marble)
|
|
120
|
-
|
|
121
|
-
void expectSubscriptions
|
|
122
|
-
// expectSubscriptions(puppet$.subscriptions).toBe(sub)
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
test('epicRecoverDing$() emit periodly', async t => {
|
|
127
|
-
const testScheduler = new TestScheduler(t.same)
|
|
128
|
-
|
|
129
|
-
const puppet = new PuppetMock() as any
|
|
130
|
-
|
|
131
|
-
const TIMEOUT = 15
|
|
132
|
-
|
|
133
|
-
testScheduler.run(helpers => {
|
|
134
|
-
const { hot, expectObservable } = helpers
|
|
135
|
-
|
|
136
|
-
const marble = {
|
|
137
|
-
a: PuppetDuck.actions.STATE_ACTIVATED_EVENT (puppet.id, true),
|
|
138
|
-
d: PuppetDuck.actions.DONG_RECEIVED_EVENT (puppet.id, { data: 'dong' }),
|
|
139
|
-
h: PuppetDuck.actions.HEARTBEAT_RECEIVED_EVENT(puppet.id, { data: 'heartbeat' }),
|
|
140
|
-
i: PuppetDuck.actions.DING_COMMAND (puppet.id, 'epicRecoverDing$'),
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
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)
|
|
144
|
-
const subscription = `^----------- ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms -----!`
|
|
145
|
-
const expected = ` ------------ ${TIMEOUT - 1}ms i ${TIMEOUT - 1}ms i ${TIMEOUT - 1}ms i ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms ------`
|
|
146
|
-
|
|
147
|
-
expectObservable(
|
|
148
|
-
epicRecoverDing$(TIMEOUT)(puppet$),
|
|
149
|
-
subscription,
|
|
150
|
-
).toBe(expected, marble)
|
|
151
|
-
})
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
test('epicRecoverReset$() emit periodly', async t => {
|
|
155
|
-
const testScheduler = new TestScheduler(t.same)
|
|
156
|
-
|
|
157
|
-
const puppet = new PuppetMock() as any
|
|
158
|
-
|
|
159
|
-
const TIMEOUT = 60
|
|
160
|
-
|
|
161
|
-
testScheduler.run(helpers => {
|
|
162
|
-
const { hot, expectObservable } = helpers
|
|
163
|
-
|
|
164
|
-
const marble = {
|
|
165
|
-
a: PuppetDuck.actions.STATE_ACTIVATED_EVENT (puppet.id, true),
|
|
166
|
-
d: PuppetDuck.actions.DONG_RECEIVED_EVENT (puppet.id, { data: 'dong' }),
|
|
167
|
-
h: PuppetDuck.actions.HEARTBEAT_RECEIVED_EVENT(puppet.id, { data: 'heartbeat' }),
|
|
168
|
-
r: PuppetDuck.actions.RESET_COMMAND (puppet.id, 'epicRecoverReset$'),
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
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)
|
|
172
|
-
const subscription = `^----------- ${TIMEOUT}ms ${TIMEOUT * 2}ms ${TIMEOUT * 2}ms ${TIMEOUT * 2}ms ${TIMEOUT}ms ${TIMEOUT}ms ${TIMEOUT}ms -----!`
|
|
173
|
-
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 ------`
|
|
174
|
-
|
|
175
|
-
expectObservable(
|
|
176
|
-
epicRecoverReset$(TIMEOUT)(puppet$),
|
|
177
|
-
subscription,
|
|
178
|
-
).toBe(expected, marble)
|
|
179
|
-
})
|
|
180
|
-
})
|