@maaxyz/maa-node 5.10.0-beta.1 → 5.10.0-beta.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.
- package/dist/constant.d.ts +0 -1
- package/dist/controller.d.ts +18 -6
- package/package.json +7 -7
package/dist/constant.d.ts
CHANGED
package/dist/controller.d.ts
CHANGED
|
@@ -186,13 +186,13 @@ declare global {
|
|
|
186
186
|
): Job<CtrlId, Controller>
|
|
187
187
|
post_touch_up(contact: number): Job<CtrlId, Controller>
|
|
188
188
|
/**
|
|
189
|
-
* Post a relative move action.
|
|
189
|
+
* Post a relative move action. Supported by Win32, MacOS, and custom controllers that implement relative_move.
|
|
190
190
|
*/
|
|
191
191
|
post_relative_move(dx: number, dy: number): Job<CtrlId, Controller>
|
|
192
192
|
post_key_down(keycode: number): Job<CtrlId, Controller>
|
|
193
193
|
post_key_up(keycode: number): Job<CtrlId, Controller>
|
|
194
194
|
/**
|
|
195
|
-
* Post a scroll action. Supported by Win32
|
|
195
|
+
* Post a scroll action. Supported by Win32, MacOS, and custom controllers that implement scroll.
|
|
196
196
|
* Using multiples of 120 (WHEEL_DELTA) is recommended for best compatibility.
|
|
197
197
|
*/
|
|
198
198
|
post_scroll(dx: number, dy: number): Job<CtrlId, Controller>
|
|
@@ -263,11 +263,21 @@ declare global {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
class DbgController extends Controller {
|
|
266
|
+
constructor(read_path: string)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
class ReplayController extends Controller {
|
|
270
|
+
constructor(recording_path: string)
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Proxy controller that wraps an existing controller and records all operations.
|
|
275
|
+
* The recorded file can be replayed using ReplayController.
|
|
276
|
+
*/
|
|
277
|
+
class RecordController extends Controller {
|
|
266
278
|
constructor(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
type: Uint64, // DbgControllerType
|
|
270
|
-
config: string,
|
|
279
|
+
inner: Controller,
|
|
280
|
+
recording_path: string,
|
|
271
281
|
)
|
|
272
282
|
}
|
|
273
283
|
|
|
@@ -332,6 +342,8 @@ declare global {
|
|
|
332
342
|
key_down?(keycode: number): maa.MaybePromise<boolean>
|
|
333
343
|
key_up?(keycode: number): maa.MaybePromise<boolean>
|
|
334
344
|
scroll?(dx: number, dy: number): maa.MaybePromise<boolean>
|
|
345
|
+
relative_move?(dx: number, dy: number): maa.MaybePromise<boolean>
|
|
346
|
+
shell?(cmd: string, timeout: number): maa.MaybePromise<string | null>
|
|
335
347
|
inactive?(): maa.MaybePromise<boolean>
|
|
336
348
|
get_info?(): maa.MaybePromise<string | null>
|
|
337
349
|
}
|
package/package.json
CHANGED
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">= 20.0.0"
|
|
22
22
|
},
|
|
23
|
-
"version": "5.10.0-beta.
|
|
23
|
+
"version": "5.10.0-beta.2",
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@maaxyz/maa-node-darwin-arm64": "5.10.0-beta.
|
|
26
|
-
"@maaxyz/maa-node-darwin-x64": "5.10.0-beta.
|
|
27
|
-
"@maaxyz/maa-node-linux-arm64": "5.10.0-beta.
|
|
28
|
-
"@maaxyz/maa-node-linux-x64": "5.10.0-beta.
|
|
29
|
-
"@maaxyz/maa-node-win32-arm64": "5.10.0-beta.
|
|
30
|
-
"@maaxyz/maa-node-win32-x64": "5.10.0-beta.
|
|
25
|
+
"@maaxyz/maa-node-darwin-arm64": "5.10.0-beta.2",
|
|
26
|
+
"@maaxyz/maa-node-darwin-x64": "5.10.0-beta.2",
|
|
27
|
+
"@maaxyz/maa-node-linux-arm64": "5.10.0-beta.2",
|
|
28
|
+
"@maaxyz/maa-node-linux-x64": "5.10.0-beta.2",
|
|
29
|
+
"@maaxyz/maa-node-win32-arm64": "5.10.0-beta.2",
|
|
30
|
+
"@maaxyz/maa-node-win32-x64": "5.10.0-beta.2"
|
|
31
31
|
}
|
|
32
32
|
}
|