@yaasl/devtools 0.8.0 → 0.9.0
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.
|
@@ -1,7 +1,5 @@
|
|
|
1
|
+
import { Prettify } from "@yaasl/utils";
|
|
1
2
|
import { Action } from "./Action";
|
|
2
|
-
type Prettify<T> = {
|
|
3
|
-
[K in keyof T]: T[K];
|
|
4
|
-
} & {};
|
|
5
3
|
type GenericMessage<Type extends string, State extends string | undefined, Payload extends {
|
|
6
4
|
type?: string;
|
|
7
5
|
} | undefined> = Action<Type> & {
|
|
@@ -11,7 +11,7 @@ export interface ReduxDevtoolsOptions {
|
|
|
11
11
|
*
|
|
12
12
|
* @param options.disable Disables the middleware. Useful for production.
|
|
13
13
|
*
|
|
14
|
-
* @returns The
|
|
14
|
+
* @returns The effect to be used on atoms.
|
|
15
15
|
**/
|
|
16
|
-
export declare const reduxDevtools: (...[optionsArg]: [] | [undefined] | [ReduxDevtoolsOptions]) => import("../../core/dist/@types/
|
|
16
|
+
export declare const reduxDevtools: (...[optionsArg]: [] | [undefined] | [ReduxDevtoolsOptions]) => import("../../core/dist/@types/effects/createEffect").EffectAtomCallback<ReduxDevtoolsOptions | undefined, any>;
|
|
17
17
|
export declare const disconnectAllConnections: () => void;
|
|
@@ -25,9 +25,9 @@ exports.connectAtom = connectAtom;
|
|
|
25
25
|
*
|
|
26
26
|
* @param options.disable Disables the middleware. Useful for production.
|
|
27
27
|
*
|
|
28
|
-
* @returns The
|
|
28
|
+
* @returns The effect to be used on atoms.
|
|
29
29
|
**/
|
|
30
|
-
exports.reduxDevtools = (0, core_1.
|
|
30
|
+
exports.reduxDevtools = (0, core_1.createEffect)(({ atom, options = {} }) => {
|
|
31
31
|
if (options.disable)
|
|
32
32
|
return {};
|
|
33
33
|
const connection = (0, redux_devtools_1.getReduxConnection)(getKey());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONFIG,
|
|
1
|
+
import { CONFIG, createEffect } from "@yaasl/core";
|
|
2
2
|
import { getReduxConnection } from "./redux-devtools";
|
|
3
3
|
import { cache } from "./utils/cache";
|
|
4
4
|
import { resetSubscriptions, subscribeStore } from "./utils/subscribeStore";
|
|
@@ -21,9 +21,9 @@ export const connectAtom = (connection, atom) => {
|
|
|
21
21
|
*
|
|
22
22
|
* @param options.disable Disables the middleware. Useful for production.
|
|
23
23
|
*
|
|
24
|
-
* @returns The
|
|
24
|
+
* @returns The effect to be used on atoms.
|
|
25
25
|
**/
|
|
26
|
-
export const reduxDevtools =
|
|
26
|
+
export const reduxDevtools = createEffect(({ atom, options = {} }) => {
|
|
27
27
|
if (options.disable)
|
|
28
28
|
return {};
|
|
29
29
|
const connection = getReduxConnection(getKey());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yaasl/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "yaasl redux-devtools-extension middleware",
|
|
5
5
|
"author": "PrettyCoffee",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"validate": "run-s lint test build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@yaasl/core": "0.
|
|
40
|
-
"@yaasl/utils": "0.
|
|
39
|
+
"@yaasl/core": "0.9.0",
|
|
40
|
+
"@yaasl/utils": "0.9.0"
|
|
41
41
|
},
|
|
42
42
|
"eslintConfig": {
|
|
43
43
|
"extends": [
|