-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
{ | ||
"extends": "@appium/eslint-config-appium", | ||
"extends": ["@appium/eslint-config-appium-ts"], | ||
"overrides": [ | ||
{ | ||
"files": "test/**/*.js", | ||
"rules": { | ||
"func-names": "off" | ||
"func-names": "off", | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
}, | ||
{ | ||
"files": "scripts/**/*", | ||
"parserOptions": {"sourceType": "script"}, | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
} | ||
] | ||
], | ||
"rules": { | ||
"require-await": "error" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
require: ['@babel/register'], | ||
require: ['ts-node/register'], | ||
forbidOnly: Boolean(process.env.CI) | ||
}; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ const extensions = {}; | |
/** | ||
* Resolve full path to Simlator's LaunchDaemons root folder | ||
* | ||
* @returns {string} Full path to Simlator's LaunchDaemons root folder | ||
* @returns {Promise<string>} Full path to Simlator's LaunchDaemons root folder | ||
*/ | ||
extensions.getLaunchDaemonsRoot = async function getLaunchDaemonsRoot () { | ||
const devRoot = await getDeveloperRoot(); | ||
|
@@ -26,7 +26,8 @@ extensions.getLaunchDaemonsRoot = async function getLaunchDaemonsRoot () { | |
* deleted if this method was called twice in a row without | ||
* `restoreKeychains` being invoked. | ||
* | ||
* @returns {boolean} True if the backup operation was successfull. | ||
* @this {import('../simulator-xcode-14').default} | ||
* @returns {Promise<boolean>} True if the backup operation was successfull. | ||
*/ | ||
extensions.backupKeychains = async function backupKeychains () { | ||
if (!await fs.exists(this.keychainPath)) { | ||
|
@@ -43,23 +44,27 @@ extensions.backupKeychains = async function backupKeychains () { | |
]; | ||
log.debug(`Creating keychains backup with 'zip ${zipArgs.join(' ')}' command`); | ||
await exec('zip', zipArgs); | ||
// @ts-ignore | ||
Check warning on line 47 in lib/extensions/keychain.js GitHub Actions / test (20)
Check warning on line 47 in lib/extensions/keychain.js GitHub Actions / test (18)
Check warning on line 47 in lib/extensions/keychain.js GitHub Actions / test (16)
|
||
if (_.isString(this._keychainsBackupPath) && await fs.exists(this._keychainsBackupPath)) { | ||
// @ts-ignore | ||
Check warning on line 49 in lib/extensions/keychain.js GitHub Actions / test (20)
Check warning on line 49 in lib/extensions/keychain.js GitHub Actions / test (18)
Check warning on line 49 in lib/extensions/keychain.js GitHub Actions / test (16)
|
||
await fs.unlink(this._keychainsBackupPath); | ||
} | ||
// @ts-ignore | ||
Check warning on line 52 in lib/extensions/keychain.js GitHub Actions / test (20)
Check warning on line 52 in lib/extensions/keychain.js GitHub Actions / test (18)
Check warning on line 52 in lib/extensions/keychain.js GitHub Actions / test (16)
|
||
this._keychainsBackupPath = backupPath; | ||
return true; | ||
}; | ||
|
||
/** | ||
* Restore the previsouly created keychains backup. | ||
* | ||
* @param {?string|Array<string>} excludePatterns - The list | ||
* @param {string[]} excludePatterns - The list | ||
* of file name patterns to be excluded from restore. The format | ||
* of each item should be the same as '-x' option format for | ||
* 'unzip' utility. This can also be a comma-separated string, | ||
* which is going be transformed into a list automatically, | ||
* for example: '*.db*,blabla.sqlite' | ||
* @returns {boolean} If the restore opration was successful. | ||
* @this {import('../simulator-xcode-14').default} | ||
* @returns {Promise<boolean>} If the restore opration was successful. | ||
* @throws {Error} If there is no keychains backup available for restore. | ||
*/ | ||
extensions.restoreKeychains = async function restoreKeychains (excludePatterns = []) { | ||
|
@@ -103,6 +108,7 @@ extensions.restoreKeychains = async function restoreKeychains (excludePatterns = | |
/** | ||
* Clears Keychains for the particular simulator in runtime (there is no need to stop it). | ||
* | ||
* @this {import('../simulator-xcode-14').default} | ||
* @throws {Error} If keychain cleanup has failed. | ||
*/ | ||
extensions.clearKeychains = async function clearKeychains () { | ||
|