@vizzly-testing/cli 0.26.0 → 0.26.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.
@@ -1,3 +1,4 @@
1
+ import { execSync } from 'node:child_process';
1
2
  import { randomBytes } from 'node:crypto';
2
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
3
4
  import { createServer } from 'node:net';
@@ -166,13 +167,19 @@ export class ServerRegistry {
166
167
  /**
167
168
  * Notify the menubar app that the registry changed
168
169
  *
169
- * NOTE: The menubar app primarily uses FSEvents file watching on servers.json.
170
- * This method is a placeholder for future notification mechanisms (e.g., XPC).
171
- * For now, file watching provides reliable, immediate updates.
170
+ * Uses macOS notifyutil for instant Darwin notification delivery.
171
+ * The menubar app listens for this in addition to file watching.
172
172
  */
173
173
  notifyMenubar() {
174
- // File watching on servers.json is the primary notification mechanism.
175
- // This method exists for future enhancements (XPC, etc.) but is currently a no-op.
174
+ if (process.platform !== 'darwin') return;
175
+ try {
176
+ execSync('notifyutil -p dev.vizzly.serverChanged', {
177
+ stdio: 'ignore',
178
+ timeout: 500
179
+ });
180
+ } catch {
181
+ // Non-fatal - menubar will still see changes via file watching
182
+ }
176
183
  }
177
184
 
178
185
  /**
@@ -185,6 +185,10 @@ export function getColors() {
185
185
  */
186
186
  export function success(message, data = {}) {
187
187
  stopSpinner();
188
+ writeLog('info', message, {
189
+ status: 'success',
190
+ ...data
191
+ });
188
192
  if (config.silent) return;
189
193
  if (config.json) {
190
194
  console.log(JSON.stringify({
@@ -221,6 +225,7 @@ export function result(message) {
221
225
  * Show an info message
222
226
  */
223
227
  export function info(message, data = {}) {
228
+ writeLog('info', message, data);
224
229
  if (!shouldLog('info')) return;
225
230
  if (config.json) {
226
231
  console.log(JSON.stringify({
@@ -238,6 +243,7 @@ export function info(message, data = {}) {
238
243
  */
239
244
  export function warn(message, data = {}) {
240
245
  stopSpinner();
246
+ writeLog('warn', message, data);
241
247
  if (!shouldLog('warn')) return;
242
248
  if (config.json) {
243
249
  console.error(JSON.stringify({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/cli",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "description": "Visual review platform for UI developers and designers",
5
5
  "keywords": [
6
6
  "visual-testing",
@@ -86,7 +86,7 @@
86
86
  "registry": "https://registry.npmjs.org/"
87
87
  },
88
88
  "dependencies": {
89
- "@vizzly-testing/honeydiff": "^0.9.0",
89
+ "@vizzly-testing/honeydiff": "^0.10.0",
90
90
  "ansis": "^4.2.0",
91
91
  "commander": "^14.0.0",
92
92
  "cosmiconfig": "^9.0.0",