-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdnt.ts
More file actions
70 lines (65 loc) · 1.76 KB
/
dnt.ts
File metadata and controls
70 lines (65 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { build } from "jsr:@deno/dnt@^0.42.3";
import manifest from "./deno.json" with { type: "json" };
const version = Deno.env.get("VERSION")?.trim() || manifest.version?.trim();
const sdkVersionFromDenoJson = manifest.imports["@modelcontextprotocol/sdk"]
.replace("npm:@modelcontextprotocol/sdk@", "");
if (!version) {
throw new Error('Specify $VERSION or set "version" in deno.json.');
}
const outDir = "dist/";
await Deno.remove(outDir, { recursive: true }).catch(() => undefined);
await build({
entryPoints: ["./mod.ts"],
outDir,
shims: {},
typeCheck: "single",
test: false,
package: {
name: manifest.name,
version,
description: manifest.description,
license: manifest.license,
author: "Vicary A. <vicary.archangel@member.mensa.org>",
repository: {
type: "git",
url: "https://github.com/vicary/opencode-graphiti.git",
},
bugs: {
url: "https://github.com/vicary/opencode-graphiti/issues",
},
homepage: "https://github.com/vicary/opencode-graphiti#readme",
keywords: [
"opencode",
"graphiti",
"knowledge-graph",
"persistent-memory",
"plugin",
"mcp",
"ai",
"context",
],
engines: {
node: ">=20",
},
dependencies: {
"@modelcontextprotocol/sdk": sdkVersionFromDenoJson,
cosmiconfig: "^9.0.0",
},
devDependencies: {
"@types/node": "^20.0.0",
},
main: "./esm/mod.js",
types: "./esm/mod.d.ts",
opencode: {
type: "plugin",
hooks: [
"chat.message",
"event",
"experimental.session.compacting",
"experimental.chat.messages.transform",
],
},
},
});
await Deno.copyFile("README.md", `${outDir}README.md`);
await Deno.copyFile("LICENSE", `${outDir}LICENSE`);