@graffy/logger 0.15.8-alpha.2 → 0.15.8-alpha.3

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/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var o=require("@graffy/testing");module.exports=function(){return e=>{e.on("read",((e,r,t)=>(console.log("Read",o.format(e),r),t(e)))),e.on("write",((e,r,t)=>(console.log("Write",o.format(e),r),t(e)))),e.on("watch",((e,r,t)=>(console.log("Watch",o.format(e),r),t(e))))}};
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare module "index" {
2
+ export default function _default(): (store: any) => void;
3
+ }
package/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{format as o}from"@graffy/testing";function e(){return e=>{e.on("read",((e,t,n)=>(console.log("Read",o(e),t),n(e)))),e.on("write",((e,t,n)=>(console.log("Write",o(e),t),n(e)))),e.on("watch",((e,t,n)=>(console.log("Watch",o(e),t),n(e))))}}export{e as default};
package/package.json CHANGED
@@ -2,16 +2,20 @@
2
2
  "name": "@graffy/logger",
3
3
  "description": "Graffy module providing operation logging.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.15.8-alpha.2",
6
- "main": "./cjs/index.js",
7
- "types": "./types/index.d.ts",
5
+ "version": "0.15.8-alpha.3",
6
+ "main": "./index.cjs",
7
+ "exports": {
8
+ "import": "./index.mjs",
9
+ "require": "./index.cjs"
10
+ },
11
+ "module": "./index.mjs",
12
+ "types": "./index.d.ts",
8
13
  "repository": {
9
14
  "type": "git",
10
15
  "url": "git+https://github.com/usegraffy/graffy.git"
11
16
  },
12
17
  "license": "Apache-2.0",
13
18
  "dependencies": {
14
- "@babel/runtime-corejs3": "^7.15.3",
15
- "@graffy/testing": "0.15.8-alpha.2"
19
+ "@graffy/testing": "0.15.8-alpha.3"
16
20
  }
17
21
  }
package/cjs/index.js DELETED
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = _default;
5
-
6
- var _testing = require("@graffy/testing");
7
-
8
- /* eslint-disable no-console */
9
- function _default() {
10
- return function (store) {
11
- store.on('read', function (query, options, next) {
12
- console.log('Read', (0, _testing.format)(query), options);
13
- return next(query);
14
- });
15
- store.on('write', function (change, options, next) {
16
- console.log('Write', (0, _testing.format)(change), options);
17
- return next(change);
18
- });
19
- store.on('watch', function (query, options, next) {
20
- console.log('Watch', (0, _testing.format)(query), options);
21
- return next(query);
22
- });
23
- };
24
- }
25
-
26
- module.exports = exports.default;
package/types/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export default function _default(): (store: any) => void;