@miniben90/x-win 1.10.0 → 1.10.2

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 (4) hide show
  1. package/LICENSE +0 -2
  2. package/README.md +11 -10
  3. package/index.d.ts +17 -17
  4. package/package.json +16 -12
package/LICENSE CHANGED
@@ -1,7 +1,5 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 BENKHADRA Hocine
4
-
5
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
4
  of this software and associated documentation files (the "Software"), to deal
7
5
  in the Software without restriction, including without limitation the rights
package/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # @miniben90/x-win
2
2
 
3
- [![CI](https://github.com/miniben-90/x-win/actions/workflows/CI.yml/badge.svg)](https://github.com/miniben-90/x-win/actions/workflows/CI.yml)
3
+ [![ci-rs](https://github.com/miniben-90/x-win/actions/workflows/ci-rs.yml/badge.svg)](https://github.com/miniben-90/x-win/actions/workflows/ci-rs.yml)
4
+ [![ci-napi](https://github.com/miniben-90/x-win/actions/workflows/ci-napi.yml/badge.svg)](https://github.com/miniben-90/x-win/actions/workflows/ci-napi.yml)
4
5
  [![Node version](https://img.shields.io/node/v/@miniben90/x-win.svg)](https://www.npmjs.com/package/@miniben90/x-win)
5
6
  ![npm type definitions](https://img.shields.io/npm/types/@miniben90/x-win)
6
- ![NPM License](https://img.shields.io/npm/l/@miniben90/x-win)
7
+ ![License](https://img.shields.io/npm/l/@miniben90/x-win)
7
8
  ![NPM Version](https://img.shields.io/npm/v/%40miniben90%2Fx-win)
8
9
 
9
- This project uses Rust and napi-rs to make it easy to obtain the active window or an array of open windows. It works on Microsoft Windows (10, 11), [Linux (with X server)](#linux), [Linux (with Gnome =< 45)](#GNOME), and [macOS 10.6+](#darwin).
10
+ This project uses Rust and napi-rs to make it easy to obtain the active window or an array of open windows. It works on Microsoft Windows (10, 11), [Linux (with X server)](#linux), [Linux (with Gnome =< 45)](#wayland), and [macOS 10.6+](#darwin).
10
11
 
11
12
  ## How to install
12
13
 
@@ -183,14 +184,12 @@ Dependencies are required to be installed for development purposes.
183
184
  sudo apt install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-shm0-dev pkg-config build-essential
184
185
  ```
185
186
 
186
- > ⚠️**Warning**
187
- > libc.so.6 is needed
188
-
189
- > ⚠️**Warning**
187
+ > ⚠️**Warning**<br />
188
+ > libc.so.6 is needed<br />
189
+ > ⚠️**Warning**<br />
190
190
  > Recovery url is not available on linux
191
191
 
192
-
193
- ### GNOME (Wayland)
192
+ ### Wayland
194
193
 
195
194
  In order to recover data, you'll need to install and activate an extension designed for systems running GNOME version 41 or newer (as evaluation is disabled from this version onward).
196
195
 
@@ -204,7 +203,9 @@ After executing this function, it's vital to **restart the user session** to loa
204
203
  | Ubuntu 22.04.4 Desktop | ✅ |
205
204
  | Debian 12 Desktop | ✅ |
206
205
 
207
- ### Darwin (version 10.6+)
206
+ ## Darwin
207
+
208
+ > ⚠️**Warning**<br /> This project work only for macos version 10.6+
208
209
 
209
210
  ## Screen recording permission introduced in macOS 10.15 Catalina
210
211
 
package/index.d.ts CHANGED
@@ -4,10 +4,12 @@
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
6
  /**
7
- * Struct to store usage data of the window
7
+ * Struct to store process information of the window
8
8
  */
9
- export interface UsageInfo {
10
- memory: number
9
+ export interface IconInfo {
10
+ data: string
11
+ height: number
12
+ width: number
11
13
  }
12
14
  /**
13
15
  * Struct to store process information of the window
@@ -18,6 +20,12 @@ export interface ProcessInfo {
18
20
  name: string
19
21
  execName: string
20
22
  }
23
+ /**
24
+ * Struct to store usage data of the window
25
+ */
26
+ export interface UsageInfo {
27
+ memory: number
28
+ }
21
29
  /**
22
30
  * Struct to store position and size of the window
23
31
  */
@@ -28,14 +36,6 @@ export interface WindowPosition {
28
36
  height: number
29
37
  isFullScreen: boolean
30
38
  }
31
- /**
32
- * Struct to store process information of the window
33
- */
34
- export interface IconInfo {
35
- data: string
36
- height: number
37
- width: number
38
- }
39
39
  /**
40
40
  * Retrieve information the about currently active window.
41
41
  * Returns an object of `WindowInfo`.
@@ -298,15 +298,15 @@ export declare function unsubscribeActiveWindow(threadId: number): void
298
298
  */
299
299
  export declare function unsubscribeAllActiveWindow(): void
300
300
  /**
301
- * Install Gnome extensions required for Linux using Gnome > 41.
301
+ * Install "@mininben90/x-win" Gnome extension required for Linux using Gnome > 41.
302
302
  * This function will write extension files needed to correctly detect working windows with Wayland desktop environment.
303
- * Restart session will be require to install the gnome extension.
303
+ * **Restart session will be require to install the gnome extension.**
304
304
  */
305
305
  export declare function installExtension(): boolean
306
306
  /**
307
- * Install Gnome extensions required for Linux using Gnome > 41.
308
- * This function will write extension files needed to correctly detect working windows with Wayland desktop environment.
309
- * Restart session will be require to remove the gnome extension.
307
+ * Uninstall "@mininben90/x-win" Gnome extension.
308
+ * This function will disable and remove extension files.
309
+ * **Restart session will be require to remove the gnome extension.**
310
310
  */
311
311
  export declare function uninstallExtension(): boolean
312
312
  /**
@@ -322,7 +322,7 @@ export declare function disableExtension(): boolean
322
322
  /**
323
323
  * Struct to store all informations of the window
324
324
  */
325
- export class WindowInfo {
325
+ export declare class WindowInfo {
326
326
  id: number
327
327
  os: string
328
328
  title: string
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@miniben90/x-win",
3
3
  "description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
4
- "version": "1.10.0",
4
+ "version": "1.10.2",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "files": [
@@ -17,7 +17,8 @@
17
17
  "aarch64-apple-darwin",
18
18
  "aarch64-pc-windows-msvc",
19
19
  "i686-pc-windows-msvc",
20
- "universal-apple-darwin"
20
+ "universal-apple-darwin",
21
+ "x86_64-unknown-linux-musl"
21
22
  ]
22
23
  }
23
24
  },
@@ -41,8 +42,9 @@
41
42
  "open"
42
43
  ],
43
44
  "devDependencies": {
44
- "@napi-rs/cli": "^2.18.3",
45
- "ava": "^6.1.3"
45
+ "@napi-rs/cli": "^2.18.4",
46
+ "ava": "^6.1.3",
47
+ "husky": "^9.1.4"
46
48
  },
47
49
  "ava": {
48
50
  "timeout": "3m",
@@ -61,16 +63,18 @@
61
63
  "prepublishOnly": "napi prepublish -t npm",
62
64
  "test": "ava",
63
65
  "universal": "napi universal",
64
- "version": "napi version"
66
+ "version": "napi version",
67
+ "prepare": "husky"
65
68
  },
66
69
  "packageManager": "yarn@4.1.1",
67
70
  "optionalDependencies": {
68
- "@miniben90/x-win-win32-x64-msvc": "1.10.0",
69
- "@miniben90/x-win-darwin-x64": "1.10.0",
70
- "@miniben90/x-win-linux-x64-gnu": "1.10.0",
71
- "@miniben90/x-win-darwin-arm64": "1.10.0",
72
- "@miniben90/x-win-win32-arm64-msvc": "1.10.0",
73
- "@miniben90/x-win-win32-ia32-msvc": "1.10.0",
74
- "@miniben90/x-win-darwin-universal": "1.10.0"
71
+ "@miniben90/x-win-win32-x64-msvc": "1.10.2",
72
+ "@miniben90/x-win-darwin-x64": "1.10.2",
73
+ "@miniben90/x-win-linux-x64-gnu": "1.10.2",
74
+ "@miniben90/x-win-darwin-arm64": "1.10.2",
75
+ "@miniben90/x-win-win32-arm64-msvc": "1.10.2",
76
+ "@miniben90/x-win-win32-ia32-msvc": "1.10.2",
77
+ "@miniben90/x-win-darwin-universal": "1.10.2",
78
+ "@miniben90/x-win-linux-x64-musl": "1.10.2"
75
79
  }
76
80
  }