claude-notification-plugin 1.0.95 → 1.0.98
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/.claude-plugin/plugin.json +1 -1
- package/bin/install.js +13 -0
- package/bin/uninstall.js +31 -3
- package/commit-sha +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.98",
|
|
4
4
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Viacheslav Makarov",
|
package/bin/install.js
CHANGED
|
@@ -484,6 +484,19 @@ Claude Notification Plugin - Setup
|
|
|
484
484
|
addHook(settings, 'Stop');
|
|
485
485
|
addHook(settings, 'Notification');
|
|
486
486
|
|
|
487
|
+
// Register plugin as enabled
|
|
488
|
+
settings.enabledPlugins = settings.enabledPlugins || {};
|
|
489
|
+
settings.enabledPlugins[PLUGIN_KEY] = true;
|
|
490
|
+
|
|
491
|
+
// Register marketplace
|
|
492
|
+
settings.extraKnownMarketplaces = settings.extraKnownMarketplaces || {};
|
|
493
|
+
settings.extraKnownMarketplaces[MARKETPLACE_KEY] = {
|
|
494
|
+
source: {
|
|
495
|
+
source: 'github',
|
|
496
|
+
repo: MARKETPLACE_GITHUB,
|
|
497
|
+
},
|
|
498
|
+
};
|
|
499
|
+
|
|
487
500
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
488
501
|
|
|
489
502
|
// 5. Summary
|
package/bin/uninstall.js
CHANGED
|
@@ -12,6 +12,8 @@ const settingsPath = path.join(claudeDir, 'settings.json');
|
|
|
12
12
|
const statePath = path.join(claudeDir, '.notifier_state.json');
|
|
13
13
|
|
|
14
14
|
const HOOK_COMMAND = 'claude-notify';
|
|
15
|
+
const PLUGIN_KEY = 'claude-notification-plugin@bazilio-plugins';
|
|
16
|
+
const MARKETPLACE_KEY = 'bazilio-plugins';
|
|
15
17
|
|
|
16
18
|
// Remove hooks from settings.json
|
|
17
19
|
if (fs.existsSync(settingsPath)) {
|
|
@@ -34,6 +36,22 @@ if (fs.existsSync(settingsPath)) {
|
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
|
|
39
|
+
// Remove plugin from enabledPlugins
|
|
40
|
+
if (settings.enabledPlugins?.[PLUGIN_KEY]) {
|
|
41
|
+
delete settings.enabledPlugins[PLUGIN_KEY];
|
|
42
|
+
if (Object.keys(settings.enabledPlugins).length === 0) {
|
|
43
|
+
delete settings.enabledPlugins;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Remove marketplace from extraKnownMarketplaces
|
|
48
|
+
if (settings.extraKnownMarketplaces?.[MARKETPLACE_KEY]) {
|
|
49
|
+
delete settings.extraKnownMarketplaces[MARKETPLACE_KEY];
|
|
50
|
+
if (Object.keys(settings.extraKnownMarketplaces).length === 0) {
|
|
51
|
+
delete settings.extraKnownMarketplaces;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
37
55
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
38
56
|
} catch {
|
|
39
57
|
// ignore
|
|
@@ -80,7 +98,6 @@ for (const dir of wrapperDirs) {
|
|
|
80
98
|
}
|
|
81
99
|
|
|
82
100
|
// Remove from installed_plugins.json
|
|
83
|
-
const PLUGIN_KEY = 'claude-notification-plugin@bazilio-plugins';
|
|
84
101
|
const installedPluginsPath = path.join(claudeDir, 'plugins', 'installed_plugins.json');
|
|
85
102
|
let pluginEntryRemoved = false;
|
|
86
103
|
if (fs.existsSync(installedPluginsPath)) {
|
|
@@ -101,7 +118,7 @@ const pluginCacheDir = path.join(claudeDir, 'plugins', 'cache', 'bazilio-plugins
|
|
|
101
118
|
let cacheRemoved = false;
|
|
102
119
|
if (fs.existsSync(pluginCacheDir)) {
|
|
103
120
|
fs.rmSync(pluginCacheDir, { recursive: true, force: true });
|
|
104
|
-
cacheRemoved =
|
|
121
|
+
cacheRemoved = !fs.existsSync(pluginCacheDir);
|
|
105
122
|
}
|
|
106
123
|
|
|
107
124
|
const extras = [
|
|
@@ -109,11 +126,22 @@ const extras = [
|
|
|
109
126
|
cliBinsRemoved ? 'CLI wrapper scripts removed.' : '',
|
|
110
127
|
].filter(Boolean).join('\n');
|
|
111
128
|
|
|
112
|
-
|
|
129
|
+
const cacheStillExists = fs.existsSync(pluginCacheDir);
|
|
130
|
+
if (cacheStillExists) {
|
|
131
|
+
console.log(`
|
|
132
|
+
Warning: Could not fully remove plugin cache directory:
|
|
133
|
+
${pluginCacheDir}
|
|
134
|
+
Please remove it manually.
|
|
135
|
+
Hooks removed from settings.json
|
|
136
|
+
Config files deleted.${extras ? `\n${extras}` : ''}
|
|
137
|
+
`);
|
|
138
|
+
} else {
|
|
139
|
+
console.log(`
|
|
113
140
|
Claude Notification Plugin uninstalled.
|
|
114
141
|
Hooks removed from settings.json
|
|
115
142
|
Config files deleted.${extras ? `\n${extras}` : ''}
|
|
116
143
|
`);
|
|
144
|
+
}
|
|
117
145
|
|
|
118
146
|
// If run manually (not via npm lifecycle), remove the global npm package too
|
|
119
147
|
if (!process.env.npm_lifecycle_event) {
|
package/commit-sha
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
08eb3ee86c3e4b66cda1fc65a13b40b12080ba32
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
3
|
"productName": "claude-notification-plugin",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.98",
|
|
5
5
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|