@kubun/mcp 0.8.0 → 0.9.0
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/lib/client.js +1 -1
- package/package.json +10 -10
package/lib/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{randomIdentity as t}from"@enkaku/token";import{KubunDB as e}from"@kubun/db";import{NodeSQLiteAdapter as r}from"@kubun/db-node-sqlite";import{PostgresAdapter as p}from"@kubun/db-postgres";import{KubunEngine as s}from"@kubun/engine";import{HTTPClient as o}from"@kubun/http-client";export function parseDatabase(t){return t.startsWith("http://")||t.startsWith("https://")?{type:"http",url:t}:t.startsWith("postgres://")?{type:"postgres",url:t}:":memory:"===t?{type:"memory"}:{type:"sqlite",path:t}}export async function createConnection(n){let i=n.identity??t(),a=function(t){switch(t.type){case"http":case"postgres":return t.url;case"sqlite":return t.path;case"memory":return":memory:"}}(n);if("http"===n.type)return{provider:new o({identity:i,serverID:n.serverID,url:n.url}),dispose:async()=>{},type:"http",address:a};let u=new e({adapter:"postgres"===n.type?new p({url:n.url}):new r({database:"sqlite"===n.type?n.path:":memory:"})}),m=new s({db:u,identity:i,plugins:[]});return
|
|
1
|
+
import{randomIdentity as t}from"@enkaku/token";import{KubunDB as e}from"@kubun/db";import{NodeSQLiteAdapter as r}from"@kubun/db-node-sqlite";import{PostgresAdapter as p}from"@kubun/db-postgres";import{KubunEngine as s}from"@kubun/engine";import{HTTPClient as o}from"@kubun/http-client";export function parseDatabase(t){return t.startsWith("http://")||t.startsWith("https://")?{type:"http",url:t}:t.startsWith("postgres://")?{type:"postgres",url:t}:":memory:"===t?{type:"memory"}:{type:"sqlite",path:t}}export async function createConnection(n){let i=n.identity??t(),a=function(t){switch(t.type){case"http":case"postgres":return t.url;case"sqlite":return t.path;case"memory":return":memory:"}}(n);if("http"===n.type)return{provider:new o({identity:i,serverID:n.serverID,url:n.url}),dispose:async()=>{},type:"http",address:a};let u=new e({adapter:"postgres"===n.type?new p({url:n.url}):new r({database:"sqlite"===n.type?n.path:":memory:"})}),m=new s({db:u,identity:i,plugins:[]});return{provider:m,dispose:async()=>{await m.dispose(),await u.close()},type:n.type,address:a}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "see LICENSE.md",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"type": "module",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
],
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@enkaku/token": "0.
|
|
21
|
+
"@enkaku/token": "^0.15.0",
|
|
22
22
|
"@mokei/context-server": "^0.6.0",
|
|
23
23
|
"graphql": "^16.13.2",
|
|
24
|
-
"@kubun/db
|
|
25
|
-
"@kubun/db-postgres": "^0.
|
|
26
|
-
"@kubun/
|
|
27
|
-
"@kubun/
|
|
28
|
-
"@kubun/
|
|
29
|
-
"@kubun/
|
|
30
|
-
"@kubun/
|
|
24
|
+
"@kubun/db": "^0.9.0",
|
|
25
|
+
"@kubun/db-postgres": "^0.9.0",
|
|
26
|
+
"@kubun/engine": "^0.9.0",
|
|
27
|
+
"@kubun/db-node-sqlite": "^0.9.0",
|
|
28
|
+
"@kubun/graphql": "^0.9.0",
|
|
29
|
+
"@kubun/protocol": "^0.9.0",
|
|
30
|
+
"@kubun/http-client": "^0.9.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@enkaku/transport": "0.
|
|
33
|
+
"@enkaku/transport": "^0.15.0",
|
|
34
34
|
"@mokei/context-client": "^0.6.0",
|
|
35
35
|
"@mokei/context-protocol": "^0.6.0"
|
|
36
36
|
},
|