@graffy/logger 0.19.1 → 0.19.2
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.d.ts +1 -0
- package/index.js +16 -0
- package/package.json +5 -9
- package/index.cjs +0 -18
- package/index.mjs +0 -19
- package/types/index.d.ts +0 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): (store: any) => void;
|
package/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default function () {
|
|
2
|
+
return (store) => {
|
|
3
|
+
store.on('read', (query, options, next) => {
|
|
4
|
+
console.log('Read', query, options);
|
|
5
|
+
return next(query);
|
|
6
|
+
});
|
|
7
|
+
store.on('write', (change, options, next) => {
|
|
8
|
+
console.log('Write', change, options);
|
|
9
|
+
return next(change);
|
|
10
|
+
});
|
|
11
|
+
store.on('watch', (query, options, next) => {
|
|
12
|
+
console.log('Watch', query, options);
|
|
13
|
+
return next(query);
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graffy/logger",
|
|
3
3
|
"description": "Graffy module providing operation logging.",
|
|
4
|
-
"author": "
|
|
5
|
-
"version": "0.19.
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"require": "./index.cjs"
|
|
10
|
-
},
|
|
11
|
-
"module": "./index.mjs",
|
|
12
|
-
"types": "./types/index.d.ts",
|
|
4
|
+
"author": "graffy team (https://github.com/usegraffy)",
|
|
5
|
+
"version": "0.19.2",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"types": "./index.d.ts",
|
|
13
9
|
"repository": {
|
|
14
10
|
"type": "git",
|
|
15
11
|
"url": "git+https://github.com/usegraffy/graffy.git"
|
package/index.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function index() {
|
|
3
|
-
return (store) => {
|
|
4
|
-
store.on("read", (query, options, next) => {
|
|
5
|
-
console.log("Read", query, options);
|
|
6
|
-
return next(query);
|
|
7
|
-
});
|
|
8
|
-
store.on("write", (change, options, next) => {
|
|
9
|
-
console.log("Write", change, options);
|
|
10
|
-
return next(change);
|
|
11
|
-
});
|
|
12
|
-
store.on("watch", (query, options, next) => {
|
|
13
|
-
console.log("Watch", query, options);
|
|
14
|
-
return next(query);
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
module.exports = index;
|
package/index.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
function index() {
|
|
2
|
-
return (store) => {
|
|
3
|
-
store.on("read", (query, options, next) => {
|
|
4
|
-
console.log("Read", query, options);
|
|
5
|
-
return next(query);
|
|
6
|
-
});
|
|
7
|
-
store.on("write", (change, options, next) => {
|
|
8
|
-
console.log("Write", change, options);
|
|
9
|
-
return next(change);
|
|
10
|
-
});
|
|
11
|
-
store.on("watch", (query, options, next) => {
|
|
12
|
-
console.log("Watch", query, options);
|
|
13
|
-
return next(query);
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
index as default
|
|
19
|
-
};
|
package/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function _default(): (store: any) => void;
|