@ulthon/ul-opencode-event 0.1.0 → 0.1.1
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/README.md +8 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +151 -0
- package/dist/email.d.ts +1 -1
- package/dist/email.js +56 -0
- package/dist/handler.d.ts +1 -1
- package/dist/handler.js +78 -0
- package/dist/index.js +101 -10061
- package/dist/template.js +9 -0
- package/dist/types.js +5 -0
- package/package.json +4 -4
package/dist/template.js
ADDED
|
@@ -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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulthon/ul-opencode-event",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "OpenCode notification plugin - sends email when session events occur",
|
|
5
5
|
"author": "augushong",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"README.md"
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
|
-
"build": "
|
|
36
|
+
"build": "tsc -p tsconfig.json",
|
|
37
37
|
"test": "bun test",
|
|
38
38
|
"lint": "eslint src",
|
|
39
39
|
"typecheck": "tsc --noEmit",
|
|
40
|
-
"prepublishOnly": "
|
|
40
|
+
"prepublishOnly": "npm run build"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"nodemailer": "^6.9.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@opencode-ai/plugin": "latest",
|
|
47
|
+
"@types/node": "^22.15.24",
|
|
47
48
|
"@types/nodemailer": "^6.4.0",
|
|
48
49
|
"@typescript-eslint/parser": "^8.0.0",
|
|
49
|
-
"bun-types": "^1.3.10",
|
|
50
50
|
"eslint": "^9.0.0",
|
|
51
51
|
"typescript": "^5.0.0"
|
|
52
52
|
}
|