@yaasl/devtools 0.10.1 → 0.11.0-alpha.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,4 +1,4 @@
1
- import { Action, ActionCreator } from "./Action";
1
+ import type { Action, ActionCreator } from "./Action";
2
2
  export interface ExtensionOptions {
3
3
  /**
4
4
  * the instance name to be showed on the monitor page. Default value is `document.title`.
@@ -1,5 +1,5 @@
1
- import { Prettify } from "@yaasl/utils";
2
- import { Action } from "./Action";
1
+ import type { Prettify } from "@yaasl/utils";
2
+ import type { Action } from "./Action";
3
3
  type GenericMessage<Type extends string, State extends string | undefined, Payload extends {
4
4
  type?: string;
5
5
  } | undefined> = Action<Type> & {
@@ -1,5 +1,5 @@
1
- import { Action } from "./Action";
2
- import { Message } from "./Message";
1
+ import type { Action } from "./Action";
2
+ import type { Message } from "./Message";
3
3
  export interface ConnectionResponse {
4
4
  /** Initiate the connection and add it to the extension connections.
5
5
  * Should only be executed once in the live time of the connection.
@@ -22,4 +22,4 @@ export interface ConnectionResponse {
22
22
  * Connections are used to display the stores value and value changes within the extension
23
23
  * as well as reacting to extension actions like time traveling.
24
24
  **/
25
- export declare const getReduxConnection: (name: string) => ConnectionResponse | null | undefined;
25
+ export declare const getReduxConnection: (name: string) => ConnectionResponse | null;
@@ -1,5 +1,5 @@
1
- import { ExtensionOptions } from "./ExtensionOptions";
2
- import { ConnectionResponse } from "./getReduxConnection";
1
+ import type { ExtensionOptions } from "./ExtensionOptions";
2
+ import type { ConnectionResponse } from "./getReduxConnection";
3
3
  interface Config extends ExtensionOptions {
4
4
  type?: string;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { Atom } from "@yaasl/core";
1
+ import type { Atom } from "@yaasl/core";
2
2
  export declare const cache: {
3
3
  getAtomValue: (atom: Atom) => unknown;
4
4
  setAtomValue: (atom: Atom, value: unknown) => unknown;
@@ -1,4 +1,4 @@
1
- import { Atom } from "@yaasl/core";
2
- import { ConnectionResponse } from "../redux-devtools";
1
+ import type { Atom } from "@yaasl/core";
2
+ import type { ConnectionResponse } from "../redux-devtools";
3
3
  export declare const subscribeStore: (atom: Atom, connection: ConnectionResponse) => void;
4
4
  export declare const resetSubscriptions: () => void;
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.logger = void 0;
4
4
  const core_1 = require("@yaasl/core");
5
+ const utils_1 = require("@yaasl/utils");
5
6
  const createLogger = (text) => ({ atom, value, options }) => {
6
7
  if (options === null || options === void 0 ? void 0 : options.disable)
7
8
  return;
8
- console.log(`[YAASL]["${atom.name}"]: ${text}`, value);
9
+ console.log((0, utils_1.consoleMessage)(text, { scope: atom.name }), value);
9
10
  };
10
11
  /** Effect to monitor atom activities and log them to the console.
11
12
  *
@@ -1,8 +1,9 @@
1
1
  import { createEffect } from "@yaasl/core";
2
+ import { consoleMessage } from "@yaasl/utils";
2
3
  const createLogger = (text) => ({ atom, value, options }) => {
3
4
  if (options?.disable)
4
5
  return;
5
- console.log(`[YAASL]["${atom.name}"]: ${text}`, value);
6
+ console.log(consoleMessage(text, { scope: atom.name }), value);
6
7
  };
7
8
  /** Effect to monitor atom activities and log them to the console.
8
9
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaasl/devtools",
3
- "version": "0.10.1",
3
+ "version": "0.11.0-alpha.0",
4
4
  "description": "yaasl debugging tools (e.g. 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.10.1",
40
- "@yaasl/utils": "0.10.1"
39
+ "@yaasl/core": "0.11.0-alpha.0",
40
+ "@yaasl/utils": "0.11.0-alpha.0"
41
41
  },
42
42
  "eslintConfig": {
43
43
  "extends": [