@appium/types 0.7.0 → 0.8.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/build/lib/driver.d.ts +1381 -19
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/plugin.d.ts +4 -2
- package/build/lib/plugin.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/driver.ts +1590 -28
- package/lib/plugin.ts +9 -7
- package/package.json +8 -6
- package/tsconfig.json +13 -0
package/lib/plugin.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {MethodMap, UpdateServerCallback, Class, AppiumLogger
|
|
1
|
+
import {MethodMap, UpdateServerCallback, Class, AppiumLogger} from '.';
|
|
2
2
|
import {Driver, ExternalDriver} from './driver';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -70,19 +70,21 @@ export interface Plugin {
|
|
|
70
70
|
* for managing new command timeouts and command logging, for example:
|
|
71
71
|
* `driver.stopNewCommandTimeout()` -- before running plugin logic
|
|
72
72
|
* `driver.startNewCommandTimeout()` -- after running plugin logic
|
|
73
|
-
* `driver._eventHistory.commands.push({cmd: cmdName, startTime, endTime}) --
|
|
73
|
+
* `driver._eventHistory.commands.push({cmd: cmdName, startTime, endTime})` --
|
|
74
74
|
* after running plugin logic
|
|
75
75
|
*/
|
|
76
76
|
export type NextPluginCallback = () => Promise<void>;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Implementation of a command within a plugin
|
|
80
|
+
*
|
|
81
|
+
* At minimum, `D` must be `ExternalDriver`, but a plugin can be more narrow about which drivers it supports.
|
|
80
82
|
*/
|
|
81
|
-
export type PluginCommand<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
) => Promise<
|
|
83
|
+
export type PluginCommand<
|
|
84
|
+
D extends ExternalDriver = ExternalDriver,
|
|
85
|
+
TArgs extends readonly any[] = any[],
|
|
86
|
+
TReturn = any
|
|
87
|
+
> = (next: NextPluginCallback, driver: D, ...args: TArgs) => Promise<TReturn>;
|
|
86
88
|
|
|
87
89
|
/**
|
|
88
90
|
* Mainly for internal use.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Various type declarations used across Appium",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"build",
|
|
29
29
|
"lib",
|
|
30
|
-
"index.js"
|
|
30
|
+
"index.js",
|
|
31
|
+
"tsconfig.json"
|
|
31
32
|
],
|
|
32
33
|
"scripts": {
|
|
33
34
|
"build": "node ./scripts/generate-schema-types.js",
|
|
@@ -35,12 +36,13 @@
|
|
|
35
36
|
"test:smoke": "node ./index.js"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@appium/schema": "^0.
|
|
39
|
+
"@appium/schema": "^0.2.3",
|
|
40
|
+
"@appium/tsconfig": "^0.2.3",
|
|
39
41
|
"@types/express": "4.17.15",
|
|
40
42
|
"@types/npmlog": "4.1.4",
|
|
41
|
-
"@types/ws": "8.5.
|
|
43
|
+
"@types/ws": "8.5.4",
|
|
42
44
|
"@wdio/types": "7.26.0",
|
|
43
|
-
"type-fest": "3.
|
|
45
|
+
"type-fest": "3.5.1"
|
|
44
46
|
},
|
|
45
47
|
"engines": {
|
|
46
48
|
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
"publishConfig": {
|
|
50
52
|
"access": "public"
|
|
51
53
|
},
|
|
52
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "67c9bdfbceeb049aa134bf1d9b107543ff0a80b0",
|
|
53
55
|
"typedoc": {
|
|
54
56
|
"entryPoint": "./lib/index.ts"
|
|
55
57
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@appium/tsconfig/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "build",
|
|
5
|
+
"checkJs": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"paths": {
|
|
8
|
+
"@appium/schema": ["../schema"]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"include": ["lib"],
|
|
12
|
+
"references": [{"path": "../schema"}]
|
|
13
|
+
}
|