node-mac-recorder 1.15.0 → 1.17.0

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.
@@ -13,7 +13,10 @@
13
13
  "Bash(system_profiler:*)",
14
14
  "Bash(mkdir:*)",
15
15
  "Bash(/dev/null)",
16
- "Bash(ls:*)"
16
+ "Bash(ls:*)",
17
+ "Bash(touch:*)",
18
+ "Bash(git add:*)",
19
+ "Bash(git commit:*)"
17
20
  ],
18
21
  "deny": []
19
22
  }
package/index.js CHANGED
@@ -541,6 +541,7 @@ class MacRecorder extends EventEmitter {
541
541
  // Koordinat sistemi belirle: window-relative, display-relative veya global
542
542
  if (options.windowRelative && options.windowInfo) {
543
543
  // Window-relative koordinatlar için pencere bilgilerini kullan
544
+ // Cursor pozisyonu için Y dönüşümü YAPMA - sadece window offset'ini çıkar
544
545
  this.cursorDisplayInfo = {
545
546
  displayId: options.windowInfo.displayId || null,
546
547
  x: options.windowInfo.x || 0,
@@ -597,6 +598,7 @@ class MacRecorder extends EventEmitter {
597
598
 
598
599
  if (this.cursorDisplayInfo) {
599
600
  // Offset'leri çıkar (display veya window)
601
+ // Y koordinat dönüşümü başlangıçta yapıldı
600
602
  x = position.x - this.cursorDisplayInfo.x;
601
603
  y = position.y - this.cursorDisplayInfo.y;
602
604
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
package/debug-cursor.js DELETED
@@ -1,50 +0,0 @@
1
- const MacRecorder = require('./index.js');
2
- const fs = require('fs');
3
-
4
- // Create a minimal direct test
5
- const recorder = new MacRecorder();
6
-
7
- // Get current cursor position to test the new field
8
- console.log('Testing cursor position API...');
9
- const pos = recorder.getCursorPosition();
10
- console.log('Current cursor position:', JSON.stringify(pos, null, 2));
11
-
12
- // Test if we can start/stop cursor tracking
13
- console.log('\nTesting cursor tracking start/stop...');
14
- const testFile = 'debug-cursor-output.json';
15
-
16
- // Remove existing file
17
- if (fs.existsSync(testFile)) {
18
- fs.unlinkSync(testFile);
19
- }
20
-
21
- const started = recorder.startCursorCapture(testFile);
22
- console.log('Start result:', started);
23
-
24
- if (started) {
25
- // Wait 1 second and check what gets written
26
- setTimeout(() => {
27
- recorder.stopCursorCapture();
28
- console.log('Stopped tracking');
29
-
30
- // Check file content
31
- if (fs.existsSync(testFile)) {
32
- const content = fs.readFileSync(testFile, 'utf8');
33
- console.log('\nFile content:');
34
- console.log(content);
35
-
36
- // Parse and pretty print
37
- try {
38
- const data = JSON.parse(content);
39
- console.log('\nParsed data:');
40
- console.log(JSON.stringify(data, null, 2));
41
- } catch (e) {
42
- console.log('Error parsing JSON:', e.message);
43
- }
44
- } else {
45
- console.log('No output file created');
46
- }
47
- }, 1000);
48
- } else {
49
- console.log('Failed to start cursor tracking');
50
- }