klaudio 0.8.3 → 0.8.4

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/package.json +1 -1
  2. package/src/installer.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "klaudio",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Add sound effects to your coding sessions — play sounds when tasks complete, notifications arrive, and more",
5
5
  "type": "module",
6
6
  "bin": {
package/src/installer.js CHANGED
@@ -70,9 +70,9 @@ export async function install({ scope, sounds, tts = false }) {
70
70
  settings.hooks[hookEvent] = [];
71
71
  }
72
72
 
73
- // Remove any existing klaudio entries
73
+ // Remove any existing klaudio/klonk entries
74
74
  settings.hooks[hookEvent] = settings.hooks[hookEvent].filter(
75
- (entry) => !entry._klaudio
75
+ (entry) => !entry._klaudio && !entry._klonk
76
76
  );
77
77
 
78
78
  // Add our hook
@@ -170,7 +170,7 @@ export async function getExistingSounds(scope) {
170
170
  for (const [eventId, event] of Object.entries(EVENTS)) {
171
171
  const hookEntries = settings.hooks[event.hookEvent];
172
172
  if (!hookEntries) continue;
173
- const entry = hookEntries.find((e) => e._klaudio);
173
+ const entry = hookEntries.find((e) => e._klaudio || e._klonk);
174
174
  if (!entry?.hooks?.[0]?.command) continue;
175
175
 
176
176
  // Extract file path from the play command
@@ -200,7 +200,7 @@ export async function uninstall(scope) {
200
200
  if (settings.hooks) {
201
201
  for (const [event, entries] of Object.entries(settings.hooks)) {
202
202
  settings.hooks[event] = entries.filter(
203
- (entry) => !entry._klaudio
203
+ (entry) => !entry._klaudio && !entry._klonk
204
204
  );
205
205
  if (settings.hooks[event].length === 0) {
206
206
  delete settings.hooks[event];