@maaxyz/maa-node 5.4.0 → 5.4.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.
@@ -184,7 +184,7 @@ declare global {
184
184
  clear(): void
185
185
  status(id: CtrlId): Status
186
186
  wait(id: CtrlId): Promise<Status>
187
- get connected(): boolean
187
+ get connected(): Promise<boolean>
188
188
  get cached_image(): ImageData | null
189
189
  get uuid(): string | null
190
190
  get resolution(): [width: number, height: number] | null
@@ -430,11 +430,15 @@ declare global {
430
430
  | MixAct<'Shell', ActionShell<Mode>, Mode>
431
431
  | MixAct<'Custom', ActionCustom<Mode>, Mode>
432
432
 
433
- type NodeAttr = {
434
- name: string
435
- jump_back: boolean
436
- anchor: boolean
437
- }
433
+ type NodeAttr<Mode> = RequiredIfStrict<
434
+ {
435
+ name?: string
436
+ jump_back?: boolean
437
+ anchor?: boolean
438
+ },
439
+ 'name',
440
+ Mode
441
+ >
438
442
 
439
443
  type WaitFreeze = {
440
444
  time?: number
@@ -447,11 +451,11 @@ declare global {
447
451
  }
448
452
 
449
453
  type General<Mode> = {
450
- next?: MaybeArray<NodeAttr, Mode>
454
+ next?: MaybeArray<RemoveIfDump<NodeName, Mode> | NodeAttr<Mode>, Mode>
451
455
  rate_limit?: number
452
456
  timeout?: number
453
- on_error?: MaybeArray<NodeAttr, Mode>
454
- anchor?: MaybeArray<string, Mode>
457
+ on_error?: MaybeArray<RemoveIfDump<NodeName, Mode> | NodeAttr<Mode>, Mode>
458
+ anchor?: MaybeArray<NodeName, Mode>
455
459
  inverse?: boolean
456
460
  enabled?: boolean
457
461
  max_hit?: number
package/package.json CHANGED
@@ -28,13 +28,13 @@
28
28
  "prettier": "^3.5.2",
29
29
  "typescript": "^5.8.2"
30
30
  },
31
- "version": "5.4.0",
31
+ "version": "5.4.2",
32
32
  "optionalDependencies": {
33
- "@maaxyz/maa-node-darwin-arm64": "5.4.0",
34
- "@maaxyz/maa-node-darwin-x64": "5.4.0",
35
- "@maaxyz/maa-node-linux-arm64": "5.4.0",
36
- "@maaxyz/maa-node-linux-x64": "5.4.0",
37
- "@maaxyz/maa-node-win32-arm64": "5.4.0",
38
- "@maaxyz/maa-node-win32-x64": "5.4.0"
33
+ "@maaxyz/maa-node-darwin-arm64": "5.4.2",
34
+ "@maaxyz/maa-node-darwin-x64": "5.4.2",
35
+ "@maaxyz/maa-node-linux-arm64": "5.4.2",
36
+ "@maaxyz/maa-node-linux-x64": "5.4.2",
37
+ "@maaxyz/maa-node-win32-arm64": "5.4.2",
38
+ "@maaxyz/maa-node-win32-x64": "5.4.2"
39
39
  }
40
40
  }