@graffy/logger 0.19.1-alpha.1 → 0.19.1

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,18 @@
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 ADDED
@@ -0,0 +1,19 @@
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/package.json CHANGED
@@ -2,19 +2,14 @@
2
2
  "name": "@graffy/logger",
3
3
  "description": "Graffy module providing operation logging.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.19.1-alpha.1",
6
- "main": "./cjs/index.js",
5
+ "version": "0.19.1",
6
+ "main": "./index.cjs",
7
7
  "exports": {
8
- ".": {
9
- "import": "./index.js",
10
- "types": "./index.d.ts"
11
- },
12
- "./*": {
13
- "import": "./*.js",
14
- "types": "./*.d.ts"
15
- }
8
+ "import": "./index.mjs",
9
+ "require": "./index.cjs"
16
10
  },
17
- "types": "./index.d.ts",
11
+ "module": "./index.mjs",
12
+ "types": "./types/index.d.ts",
18
13
  "repository": {
19
14
  "type": "git",
20
15
  "url": "git+https://github.com/usegraffy/graffy.git"
@@ -0,0 +1 @@
1
+ export default function _default(): (store: any) => void;
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export default function (): (store: any) => void;
package/index.js DELETED
@@ -1,16 +0,0 @@
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
- }