mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
feat: add db.debug for debug related functions
This commit is contained in:
14
packages/core/api/debug.js
Normal file
14
packages/core/api/debug.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export default class Debug {
|
||||||
|
strip(item) {
|
||||||
|
return JSON.stringify({
|
||||||
|
type: item.type,
|
||||||
|
notebooks: item.notebooks,
|
||||||
|
tags: item.tags,
|
||||||
|
id: item.id,
|
||||||
|
contentId: item.contentId,
|
||||||
|
dateEdited: item.dateEdited,
|
||||||
|
dateDeleted: item.dateDeleted,
|
||||||
|
dateCreated: item.dateCreated,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ import UserManager from "./user-manager";
|
|||||||
import http from "../utils/http";
|
import http from "../utils/http";
|
||||||
import Monographs from "./monographs";
|
import Monographs from "./monographs";
|
||||||
import Offers from "./offers";
|
import Offers from "./offers";
|
||||||
|
import Debug from "./debug";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {EventSource}
|
* @type {EventSource}
|
||||||
@@ -74,6 +75,7 @@ class Database {
|
|||||||
this.outbox = new Outbox(this);
|
this.outbox = new Outbox(this);
|
||||||
this.monographs = new Monographs(this);
|
this.monographs = new Monographs(this);
|
||||||
this.offers = new Offers();
|
this.offers = new Offers();
|
||||||
|
this.debug = new Debug();
|
||||||
|
|
||||||
// collections
|
// collections
|
||||||
/** @type {Notes} */
|
/** @type {Notes} */
|
||||||
|
|||||||
Reference in New Issue
Block a user