rust-rpa 0.1.4-beta.2 → 0.1.4-beta.3

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/README.md CHANGED
@@ -734,7 +734,7 @@ npm test
734
734
  #### BREAKCHANGE
735
735
  - `toJson()`改为`toJSON()`
736
736
  - `window` `toJSON()` 返回对象中取消`bounds`
737
-
737
+ - **Window 数据一致性修复**: 统一 `getBounds()` 和 `toJSON()`、`setBounds()` 中屏幕宽高和窗口大小位置都使用逻辑像素,解决 Windows 环境下坐标不一致问题。
738
738
 
739
739
  ### 0.1.3
740
740
  #### 功能
@@ -743,7 +743,6 @@ npm test
743
743
  - **`Window.toJSON()` 增强**: 现在包含 `monitorId` 字段,提供窗口所在显示器的 ID 信息
744
744
 
745
745
  #### 修复
746
- - **Window 数据一致性修复**: 统一 `getBounds()` 和 `toJSON()`、`setBounds()` 使用 XCap 数据源,确保与截图功能使用相同的坐标系统,屏幕宽高和窗口大小位置都使用逻辑像素,解决 Windows 环境下坐标不一致问题。
747
746
  - `bringToFront`在mac中仅将当前窗口顶置,避免顶置其父窗口
748
747
  - windows缩放后,应用程序大小和屏幕大小使用的逻辑像素逻辑不一致,都改为使用真实逻辑像素,减少后续处理
749
748
 
package/bin/rpa.js CHANGED
@@ -36,7 +36,7 @@ function findWindow(target) {
36
36
  }
37
37
 
38
38
  const program = new Command();
39
- program.name('rpa').description('rust-rpa CLI').version(VERSION, '-v, --version');
39
+ program.name('rpa').description('@ali/rust-rpa CLI').version(VERSION, '-v, --version');
40
40
 
41
41
  // ── permission ──────────────────────────────────────────────────────────────
42
42
  program.command('permission').description('检查系统权限状态')
package/index.d.ts CHANGED
@@ -420,7 +420,7 @@ export declare class Window {
420
420
  * # Example
421
421
  *
422
422
  * ```javascript
423
- * const { Window } = require('rust-rpa');
423
+ * const { Window } = require('@ali/rust-rpa');
424
424
  *
425
425
  * const windows = Window.all();
426
426
  * console.log(`Found ${windows.length} capturable windows`);
@@ -465,7 +465,7 @@ export declare class Window {
465
465
  * # Example
466
466
  *
467
467
  * ```javascript
468
- * const { Window } = require('rust-rpa');
468
+ * const { Window } = require('@ali/rust-rpa');
469
469
  *
470
470
  * const windows = Window.all();
471
471
  * const window = windows[0];
@@ -494,7 +494,7 @@ export declare class Window {
494
494
  * # Example
495
495
  *
496
496
  * ```javascript
497
- * const { Window } = require('rust-rpa');
497
+ * const { Window } = require('@ali/rust-rpa');
498
498
  *
499
499
  * const windows = Window.all();
500
500
  * const window = windows[0];
@@ -516,7 +516,7 @@ export declare class Window {
516
516
  * # Example
517
517
  *
518
518
  * ```javascript
519
- * const { Window } = require('rust-rpa');
519
+ * const { Window } = require('@ali/rust-rpa');
520
520
  *
521
521
  * const windows = Window.all();
522
522
  * const window = windows[0];
@@ -541,7 +541,7 @@ export declare class Window {
541
541
  * # Example
542
542
  *
543
543
  * ```javascript
544
- * const { Window } = require('rust-rpa');
544
+ * const { Window } = require('@ali/rust-rpa');
545
545
  * const fs = require('fs');
546
546
  *
547
547
  * async function captureWindow() {
@@ -571,7 +571,7 @@ export declare class Window {
571
571
  * # Example
572
572
  *
573
573
  * ```javascript
574
- * const { Window } = require('rust-rpa');
574
+ * const { Window } = require('@ali/rust-rpa');
575
575
  *
576
576
  * const windows = Window.all();
577
577
  * const window = windows[0];
@@ -590,7 +590,7 @@ export declare class Window {
590
590
  * # Example
591
591
  *
592
592
  * ```javascript
593
- * const { Window } = require('rust-rpa');
593
+ * const { Window } = require('@ali/rust-rpa');
594
594
  *
595
595
  * const windows = Window.all();
596
596
  * const window = windows[0];
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /* prettier-ignore */
4
4
 
5
- /* Custom loader for rust-rust-rpaly supports Windows and macOS */
5
+ /* Custom loader for rust-@ali/rust-rpaly supports Windows and macOS */
6
6
 
7
7
  const { existsSync } = require('fs')
8
8
  const { join } = require('path')
@@ -29,7 +29,7 @@ if (!SUPPORTED_PLATFORMS[currentPlatform]) {
29
29
  throw new Error(
30
30
  `Unsupported platform: ${platform} ${arch}.\n` +
31
31
  `This library only supports: ${supportedList}.\n` +
32
- `For more information, visit: https://github.com/ali/rust-rpa#platform-support`
32
+ `For more information, visit: https://github.com/ali/@ali/rust-rpa#platform-support`
33
33
  )
34
34
  }
35
35
 
@@ -38,13 +38,13 @@ switch (platform) {
38
38
  switch (arch) {
39
39
  case 'x64':
40
40
  localFileExisted = existsSync(
41
- join(__dirname, 'rust-rpa.win32-x64-msvc.node')
41
+ join(__dirname, '@ali/rust-rpa.win32-x64-msvc.node')
42
42
  )
43
43
  try {
44
44
  if (localFileExisted) {
45
- nativeBinding = require('./rust-rpa.win32-x64-msvc.node')
45
+ nativeBinding = require('./@ali/rust-rpa.win32-x64-msvc.node')
46
46
  } else {
47
- nativeBinding = require('rust-rust-rpa2-x64-msvc')
47
+ nativeBinding = require('rust-@ali/rust-rpa2-x64-msvc')
48
48
  }
49
49
  } catch (e) {
50
50
  loadError = e
@@ -52,13 +52,13 @@ switch (platform) {
52
52
  break
53
53
  case 'ia32':
54
54
  localFileExisted = existsSync(
55
- join(__dirname, 'rust-rpa.win32-ia32-msvc.node')
55
+ join(__dirname, '@ali/rust-rpa.win32-ia32-msvc.node')
56
56
  )
57
57
  try {
58
58
  if (localFileExisted) {
59
- nativeBinding = require('./rust-rpa.win32-ia32-msvc.node')
59
+ nativeBinding = require('./@ali/rust-rpa.win32-ia32-msvc.node')
60
60
  } else {
61
- nativeBinding = require('rust-rust-rpa2-ia32-msvc')
61
+ nativeBinding = require('rust-@ali/rust-rpa2-ia32-msvc')
62
62
  }
63
63
  } catch (e) {
64
64
  loadError = e
@@ -74,12 +74,12 @@ switch (platform) {
74
74
  case 'darwin':
75
75
  switch (arch) {
76
76
  case 'x64':
77
- localFileExisted = existsSync(join(__dirname, 'rust-rpa.darwin-x64.node'))
77
+ localFileExisted = existsSync(join(__dirname, '@ali/rust-rpa.darwin-x64.node'))
78
78
  try {
79
79
  if (localFileExisted) {
80
- nativeBinding = require('./rust-rpa.darwin-x64.node')
80
+ nativeBinding = require('./@ali/rust-rpa.darwin-x64.node')
81
81
  } else {
82
- nativeBinding = require('rust-rust-rpain-x64')
82
+ nativeBinding = require('rust-@ali/rust-rpain-x64')
83
83
  }
84
84
  } catch (e) {
85
85
  loadError = e
@@ -87,13 +87,13 @@ switch (platform) {
87
87
  break
88
88
  case 'arm64':
89
89
  localFileExisted = existsSync(
90
- join(__dirname, 'rust-rpa.darwin-arm64.node')
90
+ join(__dirname, '@ali/rust-rpa.darwin-arm64.node')
91
91
  )
92
92
  try {
93
93
  if (localFileExisted) {
94
- nativeBinding = require('./rust-rpa.darwin-arm64.node')
94
+ nativeBinding = require('./@ali/rust-rpa.darwin-arm64.node')
95
95
  } else {
96
- nativeBinding = require('rust-rust-rpain-arm64')
96
+ nativeBinding = require('rust-@ali/rust-rpain-arm64')
97
97
  }
98
98
  } catch (e) {
99
99
  loadError = e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rust-rpa",
3
- "version": "0.1.4-beta.2",
3
+ "version": "0.1.4-beta.3",
4
4
  "description": "Rust-based RPA automation library for Node.js",
5
5
  "type": "commonjs",
6
6
  "main": "index.js",
@@ -17,7 +17,7 @@
17
17
  "napi": {
18
18
  "binaryName": "rust-rpa",
19
19
  "package": {
20
- "name": "@alibot/rust-rpa"
20
+ "name": "@ali/rust-rpa"
21
21
  },
22
22
  "targets": [
23
23
  "x86_64-pc-windows-msvc",
@@ -35,7 +35,7 @@
35
35
  "files": [
36
36
  "index.js",
37
37
  "index.d.ts",
38
- "bin/",
38
+ "bin",
39
39
  "*.node"
40
40
  ],
41
41
  "dependencies": {
Binary file
Binary file
Binary file
Binary file