@goodnesshq/opencode-notification 0.1.3 → 0.1.5
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/.opencode/notify-init.mjs +4 -2
- package/README.md +3 -27
- package/bin/ocn.mjs +1 -3
- package/package.json +1 -1
- package/plugins/opencode-notifications.mjs +1 -1
|
@@ -33,7 +33,7 @@ const DEFAULTS = {
|
|
|
33
33
|
ntfy: {
|
|
34
34
|
enabled: true,
|
|
35
35
|
server: "https://ntfy.sh",
|
|
36
|
-
topic: "
|
|
36
|
+
topic: "",
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
overrides: {
|
|
@@ -260,8 +260,10 @@ async function main() {
|
|
|
260
260
|
const serverInput = await rl.question(
|
|
261
261
|
`ntfy server (blank = ${globalConfig.ntfy.server || DEFAULTS.channels.ntfy.server}): `,
|
|
262
262
|
);
|
|
263
|
+
const topicDefault = globalConfig.ntfy.topic || DEFAULTS.channels.ntfy.topic;
|
|
264
|
+
const topicLabel = topicDefault || "<your-topic>";
|
|
263
265
|
const topicInput = await rl.question(
|
|
264
|
-
`ntfy topic (blank = ${
|
|
266
|
+
`ntfy topic (blank = ${topicLabel}; see docs/ntfy-topic.md): `,
|
|
265
267
|
);
|
|
266
268
|
if (serverInput.trim()) globalConfig.ntfy.server = serverInput.trim();
|
|
267
269
|
if (topicInput.trim()) globalConfig.ntfy.topic = topicInput.trim();
|
package/README.md
CHANGED
|
@@ -23,37 +23,13 @@ npx @goodnesshq/opencode-notification install
|
|
|
23
23
|
|
|
24
24
|
This only installs repo assets and prints next steps for manual setup.
|
|
25
25
|
|
|
26
|
+
Before running the installer, create a unique ntfy topic and set up mobile notifications. See `docs/ntfy-topic.md`.
|
|
27
|
+
|
|
26
28
|
### Update guidance
|
|
27
29
|
|
|
28
30
|
- One-off: `npx @goodnesshq/opencode-notification@latest setup`
|
|
29
31
|
- Global: `npm update -g @goodnesshq/opencode-notification`
|
|
30
32
|
|
|
31
|
-
## Publish (maintainers)
|
|
32
|
-
|
|
33
|
-
1) Ensure you are authenticated with publish access for `@goodnesshq`.
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm whoami
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
If you see an auth error or 2FA error, create a publish token scoped to `@goodnesshq`, then set it:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm token create \
|
|
43
|
-
--name "opencode-notification-publish" \
|
|
44
|
-
--scopes @goodnesshq \
|
|
45
|
-
--packages-and-scopes-permission read-write \
|
|
46
|
-
--bypass-2fa
|
|
47
|
-
npm set //registry.npmjs.org/:_authToken=YOUR_TOKEN
|
|
48
|
-
npm whoami
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
2) Publish:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm publish --access public
|
|
55
|
-
```
|
|
56
|
-
|
|
57
33
|
## Troubleshooting
|
|
58
34
|
|
|
59
35
|
**OpenCode fails to start after enabling the plugin**
|
|
@@ -94,7 +70,7 @@ The config is defined in `.opencode/oc-notify.schema.json` and supports:
|
|
|
94
70
|
},
|
|
95
71
|
"channels": {
|
|
96
72
|
"mac": { "enabled": true, "method": "auto" },
|
|
97
|
-
"ntfy": { "enabled": true, "server": "https://ntfy.sh", "topic": "
|
|
73
|
+
"ntfy": { "enabled": true, "server": "https://ntfy.sh", "topic": "<your-topic>" }
|
|
98
74
|
}
|
|
99
75
|
}
|
|
100
76
|
```
|
package/bin/ocn.mjs
CHANGED
|
@@ -111,9 +111,7 @@ async function setup() {
|
|
|
111
111
|
|
|
112
112
|
await installAssets({ showNextSteps: false });
|
|
113
113
|
|
|
114
|
-
console.log(
|
|
115
|
-
|
|
116
|
-
console.log("\nRunning repo installer...");
|
|
114
|
+
console.log("Running repo installer...");
|
|
117
115
|
const notifyPath = join(cwd, ".opencode", "notify-init.mjs");
|
|
118
116
|
const { spawnSync } = await import("node:child_process");
|
|
119
117
|
const result = spawnSync("node", [notifyPath], { stdio: "inherit" });
|
package/package.json
CHANGED