@fazer-ai/mcp-obsidian 1.0.1 → 1.0.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/dist/index.js +47 -2
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -18,6 +18,47 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
|
+
// node_modules/log-prefix/log-prefix.js
|
|
22
|
+
var require_log_prefix = __commonJS((exports, module) => {
|
|
23
|
+
var util = __require("util");
|
|
24
|
+
var funcs = {
|
|
25
|
+
log: console.log.bind(console),
|
|
26
|
+
info: console.info.bind(console),
|
|
27
|
+
warn: console.warn.bind(console),
|
|
28
|
+
error: console.error.bind(console),
|
|
29
|
+
debug: (console.debug || console.log).bind(console)
|
|
30
|
+
};
|
|
31
|
+
module.exports = patch;
|
|
32
|
+
function patch(fn) {
|
|
33
|
+
Object.keys(funcs).forEach(function(k) {
|
|
34
|
+
console[k] = function() {
|
|
35
|
+
var s = typeof fn === "function" ? fn() : fn;
|
|
36
|
+
arguments[0] = util.format(s, arguments[0]);
|
|
37
|
+
funcs[k].apply(console, arguments);
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// node_modules/log-timestamp/log-timestamp.js
|
|
44
|
+
var require_log_timestamp = __commonJS((exports, module) => {
|
|
45
|
+
var util = __require("util");
|
|
46
|
+
var logprefix = require_log_prefix();
|
|
47
|
+
module.exports = patch;
|
|
48
|
+
patch();
|
|
49
|
+
function patch(prefix) {
|
|
50
|
+
if (typeof prefix === "function")
|
|
51
|
+
logprefix(prefix);
|
|
52
|
+
else if (typeof prefix === "string" && prefix)
|
|
53
|
+
logprefix(() => prefix + " " + timestamp());
|
|
54
|
+
else
|
|
55
|
+
logprefix(timestamp);
|
|
56
|
+
}
|
|
57
|
+
function timestamp() {
|
|
58
|
+
return "[" + new Date().toISOString() + "]";
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
21
62
|
// node_modules/bytes/index.js
|
|
22
63
|
var require_bytes = __commonJS((exports, module) => {
|
|
23
64
|
/*!
|
|
@@ -23193,6 +23234,9 @@ var require_express2 = __commonJS((exports, module) => {
|
|
|
23193
23234
|
module.exports = require_express();
|
|
23194
23235
|
});
|
|
23195
23236
|
|
|
23237
|
+
// src/index.ts
|
|
23238
|
+
var import_log_timestamp = __toESM(require_log_timestamp(), 1);
|
|
23239
|
+
|
|
23196
23240
|
// src/config.ts
|
|
23197
23241
|
var {
|
|
23198
23242
|
PORT,
|
|
@@ -23242,6 +23286,7 @@ class Obsidian {
|
|
|
23242
23286
|
headers,
|
|
23243
23287
|
body
|
|
23244
23288
|
}) {
|
|
23289
|
+
console.error(`[${method}] ${this.baseUrl}${path}`);
|
|
23245
23290
|
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
23246
23291
|
method,
|
|
23247
23292
|
headers: { ...this.headers, ...headers },
|
|
@@ -30371,7 +30416,7 @@ var import_express = __toESM(require_express2(), 1);
|
|
|
30371
30416
|
|
|
30372
30417
|
// package.json
|
|
30373
30418
|
var name = "@fazer-ai/mcp-obsidian";
|
|
30374
|
-
var version = "1.0.
|
|
30419
|
+
var version = "1.0.3";
|
|
30375
30420
|
|
|
30376
30421
|
// src/index.ts
|
|
30377
30422
|
var server = new McpServer({ name, version });
|
|
@@ -30397,5 +30442,5 @@ app.post("/messages", async (req, res) => {
|
|
|
30397
30442
|
}
|
|
30398
30443
|
});
|
|
30399
30444
|
app.listen(config_default.port, () => {
|
|
30400
|
-
console.
|
|
30445
|
+
console.error(`Server is running on http://localhost:${config_default.port}`);
|
|
30401
30446
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fazer-ai/mcp-obsidian",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"module": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.10.2",
|
|
38
|
-
"express": "^5.1.0"
|
|
38
|
+
"express": "^5.1.0",
|
|
39
|
+
"log-timestamp": "^0.3.0"
|
|
39
40
|
}
|
|
40
41
|
}
|