@ulthon/ul-opencode-event 0.1.0 → 0.1.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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Simple template rendering function for variable replacement.
3
+ * Replaces {{variableName}} patterns with corresponding values.
4
+ */
5
+ export function renderTemplate(template, variables) {
6
+ return template.replace(/\{\{(\w+)\}\}/g, (_, key) => {
7
+ return variables[key] ?? "";
8
+ });
9
+ }
package/dist/types.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Notification Plugin Type Definitions
3
+ * Supports multi-channel notification with SMTP, Feishu, and DingTalk
4
+ */
5
+ export {};
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@ulthon/ul-opencode-event",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "OpenCode notification plugin - sends email when session events occur",
5
5
  "author": "augushong",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
10
+ "bin": {
11
+ "ul-opencode-event": "dist/cli.js"
12
+ },
10
13
  "exports": {
11
14
  ".": {
12
15
  "import": "./dist/index.js",
@@ -26,27 +29,28 @@
26
29
  "plugin",
27
30
  "notification",
28
31
  "email",
29
- "smtp"
32
+ "smtp",
33
+ "cli"
30
34
  ],
31
35
  "files": [
32
36
  "dist",
33
37
  "README.md"
34
38
  ],
35
39
  "scripts": {
36
- "build": "bun build src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly",
40
+ "build": "tsc -p tsconfig.json",
37
41
  "test": "bun test",
38
42
  "lint": "eslint src",
39
43
  "typecheck": "tsc --noEmit",
40
- "prepublishOnly": "bun run build"
44
+ "prepublishOnly": "npm run build"
41
45
  },
42
46
  "dependencies": {
43
47
  "nodemailer": "^6.9.0"
44
48
  },
45
49
  "devDependencies": {
46
50
  "@opencode-ai/plugin": "latest",
51
+ "@types/node": "^22.15.24",
47
52
  "@types/nodemailer": "^6.4.0",
48
53
  "@typescript-eslint/parser": "^8.0.0",
49
- "bun-types": "^1.3.10",
50
54
  "eslint": "^9.0.0",
51
55
  "typescript": "^5.0.0"
52
56
  }