@graffy/logger 0.15.6 → 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 +1 -0
- package/index.d.ts +3 -0
- package/index.mjs +1 -0
- package/package.json +9 -5
- package/cjs/index.js +0 -26
- package/types/index.d.ts +0 -1
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
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.
|
|
6
|
-
"main": "./
|
|
7
|
-
"
|
|
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
|
-
"@
|
|
15
|
-
"@graffy/testing": "0.15.6"
|
|
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;
|