@appium/base-plugin 3.0.1 → 3.0.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/plugin.js +38 -33
- package/build/lib/plugin.js.map +1 -1
- package/package.json +4 -4
package/build/lib/plugin.js
CHANGED
|
@@ -6,6 +6,44 @@ const base_driver_1 = require("@appium/base-driver");
|
|
|
6
6
|
* @implements {Plugin}
|
|
7
7
|
*/
|
|
8
8
|
class BasePlugin extends base_driver_1.ExtensionCore {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use this.log instead of this.logger
|
|
11
|
+
* @type {import('@appium/types').AppiumLogger}
|
|
12
|
+
*/
|
|
13
|
+
logger;
|
|
14
|
+
/**
|
|
15
|
+
* Subclasses should use type `import('@appium/types').MethodMap<SubclassName>`.
|
|
16
|
+
*
|
|
17
|
+
* This will verify that the commands in the `newMethodMap` property are
|
|
18
|
+
* valid. It is impossible to use a generic type param here; the type of this should really
|
|
19
|
+
* be something like `MethodMap<T extends BasePlugin>` but that isn't a thing TS does.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* static newMethodMap = {
|
|
23
|
+
* '/session/:sessionId/fake_data': {
|
|
24
|
+
* GET: {command: 'getFakeSessionData', neverProxy: true},
|
|
25
|
+
* }
|
|
26
|
+
* } as const;
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
static newMethodMap = {};
|
|
30
|
+
/**
|
|
31
|
+
* Subclasses should use type `import('@appium/types').ExecuteMethodMap<SubclassName>`.
|
|
32
|
+
*
|
|
33
|
+
* Building up this map allows the use of the convenience function `executeMethod`, which
|
|
34
|
+
* basically does verification of names and parameters for execute methods implemented by this
|
|
35
|
+
* plugin.
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* static executeMethodMap = {
|
|
39
|
+
* 'foo: bar': {
|
|
40
|
+
* command: 'commandName',
|
|
41
|
+
* params: {required: ['thing1', 'thing2'], optional: ['thing3']},
|
|
42
|
+
* },
|
|
43
|
+
* } as const;
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
static executeMethodMap = {};
|
|
9
47
|
/**
|
|
10
48
|
* @param {string} name
|
|
11
49
|
* @param {Record<string,unknown>} [cliArgs]
|
|
@@ -45,39 +83,6 @@ class BasePlugin extends base_driver_1.ExtensionCore {
|
|
|
45
83
|
}
|
|
46
84
|
}
|
|
47
85
|
exports.BasePlugin = BasePlugin;
|
|
48
|
-
/**
|
|
49
|
-
* Subclasses should use type `import('@appium/types').MethodMap<SubclassName>`.
|
|
50
|
-
*
|
|
51
|
-
* This will verify that the commands in the `newMethodMap` property are
|
|
52
|
-
* valid. It is impossible to use a generic type param here; the type of this should really
|
|
53
|
-
* be something like `MethodMap<T extends BasePlugin>` but that isn't a thing TS does.
|
|
54
|
-
*
|
|
55
|
-
* ```ts
|
|
56
|
-
* static newMethodMap = {
|
|
57
|
-
* '/session/:sessionId/fake_data': {
|
|
58
|
-
* GET: {command: 'getFakeSessionData', neverProxy: true},
|
|
59
|
-
* }
|
|
60
|
-
* } as const;
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
BasePlugin.newMethodMap = {};
|
|
64
|
-
/**
|
|
65
|
-
* Subclasses should use type `import('@appium/types').ExecuteMethodMap<SubclassName>`.
|
|
66
|
-
*
|
|
67
|
-
* Building up this map allows the use of the convenience function `executeMethod`, which
|
|
68
|
-
* basically does verification of names and parameters for execute methods implemented by this
|
|
69
|
-
* plugin.
|
|
70
|
-
*
|
|
71
|
-
* ```ts
|
|
72
|
-
* static executeMethodMap = {
|
|
73
|
-
* 'foo: bar': {
|
|
74
|
-
* command: 'commandName',
|
|
75
|
-
* params: {required: ['thing1', 'thing2'], optional: ['thing3']},
|
|
76
|
-
* },
|
|
77
|
-
* } as const;
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
BasePlugin.executeMethodMap = {};
|
|
81
86
|
exports.default = BasePlugin;
|
|
82
87
|
/**
|
|
83
88
|
* @typedef {import('@appium/types').Plugin} Plugin
|
package/build/lib/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../lib/plugin.js"],"names":[],"mappings":";;;AAAA,qDAAwG;AAExG;;GAEG;AACH,MAAM,UAAW,SAAQ,2BAAa;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../lib/plugin.js"],"names":[],"mappings":";;;AAAA,qDAAwG;AAExG;;GAEG;AACH,MAAM,UAAW,SAAQ,2BAAa;IAEpC;;;OAGG;IACH,MAAM,CAAC;IAEP;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,YAAY,GAAG,EAAE,CAAC;IAEzB;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAE7B;;;;OAIG;IACH,YAAY,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI;QAC7C,KAAK,EAAE,CAAC;QACR,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,eAAe,CAAC,GAAG,IAAA,qCAAuB,EAAC,IAAI,CAAC,KAAK,QAAQ,GAAG,CAAC,CAAC;QACzE,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS;QACjD,MAAM,MAAM,GAAG,0DAA0D,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7F,MAAM,eAAe,GAAG,EAAC,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC,MAAM,CAAC,EAAC,CAAC;QAE/D,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,CAAC,eAAe,CAAC,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC;YACnE,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,6CAA6C,MAAM,4BAA4B,CAChF,CAAC;YACF,OAAO,MAAM,IAAI,EAAE,CAAC;QACtB,CAAC;QAED,MAAM,OAAO,GAAG,+DAA+D,CAAC,CAC9E,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAC9B,CAAC;QACF,MAAM,IAAI,GAAG,IAAA,yCAA2B,EAAC,oBAAoB,CAAC,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QACnG,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACzD,CAAC;;AAIK,gCAAU;AADlB,kBAAe,UAAU,CAAC;AAG1B;;;;GAIG;AAEH;;;GAGG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/base-plugin",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "The base plugin used to create Appium plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@appium/base-driver": "^10.
|
|
44
|
-
"@appium/support": "^7.0.
|
|
43
|
+
"@appium/base-driver": "^10.1.0",
|
|
44
|
+
"@appium/support": "^7.0.2"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "c00cbfa1fb6d4bd0d8dac00eed02f87587e0eadf",
|
|
54
54
|
"tags": [
|
|
55
55
|
"appium"
|
|
56
56
|
]
|