appium 3.0.0 → 3.0.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/README.md +7 -13
- package/build/lib/appium.js +62 -12
- package/build/lib/appium.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +2 -0
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +2 -0
- package/build/lib/cli/driver-command.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts +0 -4
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +22 -8
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/plugin-command.d.ts +2 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/plugin-command.js +2 -0
- package/build/lib/cli/plugin-command.js.map +1 -1
- package/build/lib/cli/utils.d.ts +15 -0
- package/build/lib/cli/utils.d.ts.map +1 -1
- package/build/lib/cli/utils.js +15 -0
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/extension/driver-config.js +16 -11
- package/build/lib/extension/driver-config.js.map +1 -1
- package/build/lib/extension/extension-config.js +23 -20
- package/build/lib/extension/extension-config.js.map +1 -1
- package/build/lib/extension/manifest.js +106 -120
- package/build/lib/extension/manifest.js.map +1 -1
- package/build/lib/extension/plugin-config.js +11 -11
- package/build/lib/extension/plugin-config.js.map +1 -1
- package/build/lib/schema/arg-spec.js +47 -0
- package/build/lib/schema/arg-spec.js.map +1 -1
- package/build/lib/schema/schema.js +92 -93
- package/build/lib/schema/schema.js.map +1 -1
- package/lib/cli/driver-command.js +2 -0
- package/lib/cli/extension-command.js +7 -8
- package/lib/cli/plugin-command.js +2 -0
- package/lib/cli/utils.js +17 -0
- package/package.json +10 -10
|
@@ -927,33 +927,33 @@ class ExtensionCliCommand {
|
|
|
927
927
|
this.log.ok(`${scriptName} successfully ran`.green);
|
|
928
928
|
return {output: output.getBuff()};
|
|
929
929
|
} catch (err) {
|
|
930
|
-
|
|
931
|
-
|
|
930
|
+
const message = `Encountered an error when running '${scriptName}': ${err.message}`;
|
|
931
|
+
throw this._createFatalError(message);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
|
|
935
935
|
try {
|
|
936
936
|
await new B((resolve, reject) => {
|
|
937
937
|
this._runUnbuffered(moduleRoot, scriptPath, extraArgs)
|
|
938
|
-
.
|
|
938
|
+
.once('error', (err) => {
|
|
939
939
|
// generally this is of the "I can't find the script" variety.
|
|
940
940
|
// this is a developer bug: the extension is pointing to a script that is not where the
|
|
941
941
|
// developer said it would be (in `appium.scripts` of the extension's `package.json`)
|
|
942
942
|
reject(err);
|
|
943
943
|
})
|
|
944
|
-
.
|
|
944
|
+
.once('close', (code) => {
|
|
945
945
|
if (code === 0) {
|
|
946
946
|
resolve();
|
|
947
947
|
} else {
|
|
948
|
-
reject(new Error(`Script
|
|
948
|
+
reject(new Error(`Script exited with code ${code}`));
|
|
949
949
|
}
|
|
950
950
|
});
|
|
951
951
|
});
|
|
952
952
|
this.log.ok(`${scriptName} successfully ran`.green);
|
|
953
953
|
return {};
|
|
954
954
|
} catch (err) {
|
|
955
|
-
|
|
956
|
-
|
|
955
|
+
const message = `Encountered an error when running '${scriptName}': ${err.message}`;
|
|
956
|
+
throw this._createFatalError(message);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
}
|
|
@@ -1079,7 +1079,6 @@ export {ExtensionCliCommand as ExtensionCommand};
|
|
|
1079
1079
|
* Return value of {@linkcode ExtensionCliCommand._run}
|
|
1080
1080
|
*
|
|
1081
1081
|
* @typedef RunOutput
|
|
1082
|
-
* @property {string} [error] - error message if script ran unsuccessfully, otherwise undefined
|
|
1083
1082
|
* @property {string[]} [output] - script output if `bufferOutput` was `true` in {@linkcode RunOptions}
|
|
1084
1083
|
*/
|
|
1085
1084
|
|
|
@@ -52,9 +52,11 @@ export default class PluginCliCommand extends ExtensionCliCommand {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
+
* Run a script from a plugin
|
|
55
56
|
*
|
|
56
57
|
* @param {PluginRunOptions} opts
|
|
57
58
|
* @returns {Promise<import('./extension-command').RunOutput>}
|
|
59
|
+
* @throws {Error} if the script fails to run
|
|
58
60
|
*/
|
|
59
61
|
async run({plugin, scriptName, extraArgs}) {
|
|
60
62
|
return await super._run({
|
package/lib/cli/utils.js
CHANGED
|
@@ -59,12 +59,29 @@ export class RingBuffer {
|
|
|
59
59
|
this.size = size;
|
|
60
60
|
this.buffer = [];
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get the current buffer contents
|
|
65
|
+
*
|
|
66
|
+
* @returns {any[]}
|
|
67
|
+
*/
|
|
62
68
|
getBuff() {
|
|
63
69
|
return this.buffer;
|
|
64
70
|
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Remove the oldest item from the buffer
|
|
74
|
+
*
|
|
75
|
+
* @returns {void}
|
|
76
|
+
*/
|
|
65
77
|
dequeue() {
|
|
66
78
|
this.buffer.shift();
|
|
67
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Add an item to the buffer
|
|
82
|
+
*
|
|
83
|
+
* @param {any} item
|
|
84
|
+
*/
|
|
68
85
|
enqueue(item) {
|
|
69
86
|
if (this.buffer.length >= this.size) {
|
|
70
87
|
this.dequeue();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Automation for Apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@appium/base-driver": "^10.0.
|
|
64
|
-
"@appium/base-plugin": "^3.0.
|
|
65
|
-
"@appium/docutils": "^2.
|
|
66
|
-
"@appium/logger": "^2.0.
|
|
63
|
+
"@appium/base-driver": "^10.0.1",
|
|
64
|
+
"@appium/base-plugin": "^3.0.2",
|
|
65
|
+
"@appium/docutils": "^2.1.0",
|
|
66
|
+
"@appium/logger": "^2.0.1",
|
|
67
67
|
"@appium/schema": "^1.0.0",
|
|
68
|
-
"@appium/support": "^7.0.
|
|
69
|
-
"@appium/types": "^1.0.
|
|
68
|
+
"@appium/support": "^7.0.1",
|
|
69
|
+
"@appium/types": "^1.0.1",
|
|
70
70
|
"@sidvind/better-ajv-errors": "4.0.0",
|
|
71
71
|
"ajv": "8.17.1",
|
|
72
72
|
"ajv-formats": "3.0.1",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"bluebird": "3.7.2",
|
|
78
78
|
"lilconfig": "3.1.3",
|
|
79
79
|
"lodash": "4.17.21",
|
|
80
|
-
"lru-cache": "11.1
|
|
80
|
+
"lru-cache": "11.2.1",
|
|
81
81
|
"ora": "5.4.1",
|
|
82
82
|
"package-changed": "3.0.0",
|
|
83
83
|
"resolve-from": "5.0.0",
|
|
84
84
|
"semver": "7.7.2",
|
|
85
85
|
"source-map-support": "0.5.21",
|
|
86
|
-
"teen_process": "3.0.
|
|
86
|
+
"teen_process": "3.0.1",
|
|
87
87
|
"type-fest": "4.41.0",
|
|
88
88
|
"winston": "3.17.0",
|
|
89
89
|
"wrap-ansi": "7.0.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "606e4c1f58fa68d96c04be4313ccab86ccd48361"
|
|
101
101
|
}
|