@goodnesshq/opencode-notification 0.1.2 → 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.
Files changed (2) hide show
  1. package/bin/ocn.mjs +18 -10
  2. package/package.json +1 -1
package/bin/ocn.mjs CHANGED
@@ -54,7 +54,7 @@ async function writeJson(path, data) {
54
54
  await writeFile(path, content, "utf8");
55
55
  }
56
56
 
57
- async function install() {
57
+ async function installAssets({ showNextSteps = true } = {}) {
58
58
  const cwd = process.cwd();
59
59
  const repoName = basename(cwd);
60
60
  const opencodeDir = join(cwd, ".opencode");
@@ -68,14 +68,20 @@ async function install() {
68
68
  await copyFile(ASSET_NOTIFY_INIT, join(opencodeDir, "notify-init.mjs"));
69
69
  await copyFile(ASSET_SCHEMA, join(opencodeDir, "oc-notify.schema.json"));
70
70
 
71
- console.log(`Installed OpenCode Notifications installer in ${repoName}.`);
72
- console.log("Next steps:");
73
- console.log(" 1) Run: node .opencode/notify-init.mjs");
74
- console.log(" 2) Add the plugin path to ~/.config/opencode/opencode.json:");
75
- console.log(" npx @goodnesshq/opencode-notification plugin-path");
76
- console.log("\nUpdate guidance:");
77
- console.log(" - npx @goodnesshq/opencode-notification@latest install");
78
- console.log(" - npm update -g @goodnesshq/opencode-notification");
71
+ if (showNextSteps) {
72
+ console.log(`Installed OpenCode Notifications installer in ${repoName}.`);
73
+ console.log("Next steps:");
74
+ console.log(" 1) Run: node .opencode/notify-init.mjs");
75
+ console.log(" 2) Add the plugin path to ~/.config/opencode/opencode.json:");
76
+ console.log(" npx @goodnesshq/opencode-notification plugin-path");
77
+ console.log("\nUpdate guidance:");
78
+ console.log(" - npx @goodnesshq/opencode-notification@latest install");
79
+ console.log(" - npm update -g @goodnesshq/opencode-notification");
80
+ }
81
+ }
82
+
83
+ async function install() {
84
+ await installAssets({ showNextSteps: true });
79
85
  }
80
86
 
81
87
  async function setup() {
@@ -103,7 +109,9 @@ async function setup() {
103
109
  await ensureDir(dirname(GLOBAL_OPENCODE_CONFIG));
104
110
  await writeJson(GLOBAL_OPENCODE_CONFIG, config);
105
111
 
106
- await install();
112
+ await installAssets({ showNextSteps: false });
113
+
114
+ console.log(`Configured OpenCode plugin and repo installer for ${repoName}.`);
107
115
 
108
116
  console.log("\nRunning repo installer...");
109
117
  const notifyPath = join(cwd, ".opencode", "notify-init.mjs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodnesshq/opencode-notification",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Per-repo notification plugin for OpenCode with macOS and ntfy delivery.",
5
5
  "type": "module",
6
6
  "bin": {