Update dependencies (#282)

* Update packages

* Fix TS errors

* rebuild

* Update eslint

See https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21

* Fix linting errors

* rebuild
This commit is contained in:
Matt Johnson-Pint
2022-10-27 22:54:00 -07:00
committed by GitHub
parent a47c099672
commit a4845e8d39
8 changed files with 4049 additions and 13597 deletions
-3
View File
@@ -5,9 +5,6 @@
"es6": true "es6": true
}, },
"extends": [ "extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended" "plugin:prettier/recommended"
], ],
"globals": { "globals": {
+13 -9
View File
@@ -1,7 +1,11 @@
"use strict"; "use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) { }) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
o[k2] = m[k]; o[k2] = m[k];
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod); __setModuleDefault(result, mod);
return result; return result;
}; };
@@ -75,8 +79,8 @@ function launchEmulator(apiLevel, target, arch, profile, cores, ramSize, heapSiz
if (data.toString().includes('invalid command-line parameter')) { if (data.toString().includes('invalid command-line parameter')) {
throw new Error(data.toString()); throw new Error(data.toString());
} }
} },
} },
}); });
// wait for emulator to complete booting // wait for emulator to complete booting
yield waitForDevice(); yield waitForDevice();
@@ -110,7 +114,7 @@ function killEmulator() {
yield exec.exec(`adb -s emulator-5554 emu kill`); yield exec.exec(`adb -s emulator-5554 emu kill`);
} }
catch (error) { catch (error) {
console.log(error.message); console.log(error instanceof Error ? error.message : error);
} }
finally { finally {
console.log(`::endgroup::`); console.log(`::endgroup::`);
@@ -134,8 +138,8 @@ function waitForDevice() {
listeners: { listeners: {
stdout: (data) => { stdout: (data) => {
result += data.toString(); result += data.toString();
} },
} },
}); });
if (result.trim() === '1') { if (result.trim() === '1') {
console.log('Emulator booted.'); console.log('Emulator booted.');
@@ -144,7 +148,7 @@ function waitForDevice() {
} }
} }
catch (error) { catch (error) {
console.warn(error.message); console.warn(error instanceof Error ? error.message : error);
} }
if (attempts < maxAttempts) { if (attempts < maxAttempts) {
yield delay(retryInterval * 1000); yield delay(retryInterval * 1000);
@@ -157,5 +161,5 @@ function waitForDevice() {
}); });
} }
function delay(ms) { function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms)); return new Promise((resolve) => setTimeout(resolve, ms));
} }
+29 -25
View File
@@ -1,7 +1,11 @@
"use strict"; "use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) { }) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
o[k2] = m[k]; o[k2] = m[k];
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod); __setModuleDefault(result, mod);
return result; return result;
}; };
@@ -45,7 +49,7 @@ function run() {
if (process.platform !== 'darwin') { if (process.platform !== 'darwin') {
if (process.platform === 'linux') { if (process.platform === 'linux') {
try { try {
fs_1.accessSync('/dev/kvm', fs_1.constants.R_OK | fs_1.constants.W_OK); (0, fs_1.accessSync)('/dev/kvm', fs_1.constants.R_OK | fs_1.constants.W_OK);
linuxSupportKVM = true; linuxSupportKVM = true;
} }
catch (_a) { catch (_a) {
@@ -58,17 +62,17 @@ function run() {
} }
// API level of the platform and system image // API level of the platform and system image
const apiLevelInput = core.getInput('api-level', { required: true }); const apiLevelInput = core.getInput('api-level', { required: true });
input_validator_1.checkApiLevel(apiLevelInput); (0, input_validator_1.checkApiLevel)(apiLevelInput);
const apiLevel = Number(apiLevelInput); const apiLevel = Number(apiLevelInput);
console.log(`API level: ${apiLevel}`); console.log(`API level: ${apiLevel}`);
// target of the system image // target of the system image
const targetInput = core.getInput('target'); const targetInput = core.getInput('target');
const target = targetInput == 'playstore' ? 'google_apis_playstore' : targetInput; const target = targetInput == 'playstore' ? 'google_apis_playstore' : targetInput;
input_validator_1.checkTarget(target); (0, input_validator_1.checkTarget)(target);
console.log(`target: ${target}`); console.log(`target: ${target}`);
// CPU architecture of the system image // CPU architecture of the system image
const arch = core.getInput('arch'); const arch = core.getInput('arch');
input_validator_1.checkArch(arch); (0, input_validator_1.checkArch)(arch);
console.log(`CPU architecture: ${arch}`); console.log(`CPU architecture: ${arch}`);
// Hardware profile used for creating the AVD // Hardware profile used for creating the AVD
const profile = core.getInput('profile'); const profile = core.getInput('profile');
@@ -86,14 +90,14 @@ function run() {
const sdcardPathOrSize = core.getInput('sdcard-path-or-size'); const sdcardPathOrSize = core.getInput('sdcard-path-or-size');
console.log(`SD card path or size: ${sdcardPathOrSize}`); console.log(`SD card path or size: ${sdcardPathOrSize}`);
const diskSize = core.getInput('disk-size'); const diskSize = core.getInput('disk-size');
input_validator_1.checkDiskSize(diskSize); (0, input_validator_1.checkDiskSize)(diskSize);
console.log(`Disk size: ${diskSize}`); console.log(`Disk size: ${diskSize}`);
// custom name used for creating the AVD // custom name used for creating the AVD
const avdName = core.getInput('avd-name'); const avdName = core.getInput('avd-name');
console.log(`AVD name: ${avdName}`); console.log(`AVD name: ${avdName}`);
// force AVD creation // force AVD creation
const forceAvdCreationInput = core.getInput('force-avd-creation'); const forceAvdCreationInput = core.getInput('force-avd-creation');
input_validator_1.checkForceAvdCreation(forceAvdCreationInput); (0, input_validator_1.checkForceAvdCreation)(forceAvdCreationInput);
const forceAvdCreation = forceAvdCreationInput === 'true'; const forceAvdCreation = forceAvdCreationInput === 'true';
console.log(`force avd creation: ${forceAvdCreation}`); console.log(`force avd creation: ${forceAvdCreation}`);
// emulator options // emulator options
@@ -101,17 +105,17 @@ function run() {
console.log(`emulator options: ${emulatorOptions}`); console.log(`emulator options: ${emulatorOptions}`);
// disable animations // disable animations
const disableAnimationsInput = core.getInput('disable-animations'); const disableAnimationsInput = core.getInput('disable-animations');
input_validator_1.checkDisableAnimations(disableAnimationsInput); (0, input_validator_1.checkDisableAnimations)(disableAnimationsInput);
const disableAnimations = disableAnimationsInput === 'true'; const disableAnimations = disableAnimationsInput === 'true';
console.log(`disable animations: ${disableAnimations}`); console.log(`disable animations: ${disableAnimations}`);
// disable spellchecker // disable spellchecker
const disableSpellcheckerInput = core.getInput('disable-spellchecker'); const disableSpellcheckerInput = core.getInput('disable-spellchecker');
input_validator_1.checkDisableSpellchecker(disableSpellcheckerInput); (0, input_validator_1.checkDisableSpellchecker)(disableSpellcheckerInput);
const disableSpellchecker = disableSpellcheckerInput === 'true'; const disableSpellchecker = disableSpellcheckerInput === 'true';
console.log(`disable spellchecker: ${disableSpellchecker}`); console.log(`disable spellchecker: ${disableSpellchecker}`);
// disable linux hardware acceleration // disable linux hardware acceleration
let disableLinuxHardwareAccelerationInput = core.getInput('disable-linux-hw-accel'); let disableLinuxHardwareAccelerationInput = core.getInput('disable-linux-hw-accel');
input_validator_1.checkDisableLinuxHardwareAcceleration(disableLinuxHardwareAccelerationInput); (0, input_validator_1.checkDisableLinuxHardwareAcceleration)(disableLinuxHardwareAccelerationInput);
if (disableLinuxHardwareAccelerationInput === 'auto' && process.platform === 'linux') { if (disableLinuxHardwareAccelerationInput === 'auto' && process.platform === 'linux') {
disableLinuxHardwareAccelerationInput = linuxSupportKVM ? 'false' : 'true'; disableLinuxHardwareAccelerationInput = linuxSupportKVM ? 'false' : 'true';
} }
@@ -119,13 +123,13 @@ function run() {
console.log(`disable Linux hardware acceleration: ${disableLinuxHardwareAcceleration}`); console.log(`disable Linux hardware acceleration: ${disableLinuxHardwareAcceleration}`);
// enable hardware keyboard // enable hardware keyboard
const enableHardwareKeyboardInput = core.getInput('enable-hw-keyboard'); const enableHardwareKeyboardInput = core.getInput('enable-hw-keyboard');
input_validator_1.checkEnableHardwareKeyboard(enableHardwareKeyboardInput); (0, input_validator_1.checkEnableHardwareKeyboard)(enableHardwareKeyboardInput);
const enableHardwareKeyboard = enableHardwareKeyboardInput === 'true'; const enableHardwareKeyboard = enableHardwareKeyboardInput === 'true';
console.log(`enable hardware keyboard: ${enableHardwareKeyboard}`); console.log(`enable hardware keyboard: ${enableHardwareKeyboard}`);
// emulator build // emulator build
const emulatorBuildInput = core.getInput('emulator-build'); const emulatorBuildInput = core.getInput('emulator-build');
if (emulatorBuildInput) { if (emulatorBuildInput) {
input_validator_1.checkEmulatorBuild(emulatorBuildInput); (0, input_validator_1.checkEmulatorBuild)(emulatorBuildInput);
console.log(`using emulator build: ${emulatorBuildInput}`); console.log(`using emulator build: ${emulatorBuildInput}`);
} }
const emulatorBuild = !emulatorBuildInput ? undefined : emulatorBuildInput; const emulatorBuild = !emulatorBuildInput ? undefined : emulatorBuildInput;
@@ -149,26 +153,26 @@ function run() {
const cmakeVersion = !cmakeInput ? undefined : cmakeInput; const cmakeVersion = !cmakeInput ? undefined : cmakeInput;
// channelId (up to and including) to download the SDK packages from // channelId (up to and including) to download the SDK packages from
const channelName = core.getInput('channel'); const channelName = core.getInput('channel');
input_validator_1.checkChannel(channelName); (0, input_validator_1.checkChannel)(channelName);
const channelId = channel_id_mapper_1.getChannelId(channelName); const channelId = (0, channel_id_mapper_1.getChannelId)(channelName);
console.log(`Channel: ${channelId} (${channelName})`); console.log(`Channel: ${channelId} (${channelName})`);
// custom script to run // custom script to run
const scriptInput = core.getInput('script', { required: true }); const scriptInput = core.getInput('script', { required: true });
const scripts = script_parser_1.parseScript(scriptInput); const scripts = (0, script_parser_1.parseScript)(scriptInput);
console.log(`Script:`); console.log(`Script:`);
scripts.forEach((script) => __awaiter(this, void 0, void 0, function* () { scripts.forEach((script) => __awaiter(this, void 0, void 0, function* () {
console.log(`${script}`); console.log(`${script}`);
})); }));
// custom pre emulator launch script // custom pre emulator launch script
const preEmulatorLaunchScriptInput = core.getInput('pre-emulator-launch-script'); const preEmulatorLaunchScriptInput = core.getInput('pre-emulator-launch-script');
const preEmulatorLaunchScripts = !preEmulatorLaunchScriptInput ? undefined : script_parser_1.parseScript(preEmulatorLaunchScriptInput); const preEmulatorLaunchScripts = !preEmulatorLaunchScriptInput ? undefined : (0, script_parser_1.parseScript)(preEmulatorLaunchScriptInput);
console.log(`Pre emulator launch script:`); console.log(`Pre emulator launch script:`);
preEmulatorLaunchScripts === null || preEmulatorLaunchScripts === void 0 ? void 0 : preEmulatorLaunchScripts.forEach((script) => __awaiter(this, void 0, void 0, function* () { preEmulatorLaunchScripts === null || preEmulatorLaunchScripts === void 0 ? void 0 : preEmulatorLaunchScripts.forEach((script) => __awaiter(this, void 0, void 0, function* () {
console.log(`${script}`); console.log(`${script}`);
})); }));
console.log(`::endgroup::`); console.log(`::endgroup::`);
// install SDK // install SDK
yield sdk_installer_1.installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndkVersion, cmakeVersion); yield (0, sdk_installer_1.installAndroidSdk)(apiLevel, target, arch, channelId, emulatorBuild, ndkVersion, cmakeVersion);
// execute pre emulator launch script if set // execute pre emulator launch script if set
if (preEmulatorLaunchScripts !== undefined) { if (preEmulatorLaunchScripts !== undefined) {
console.log(`::group::Run pre emulator launch script`); console.log(`::group::Run pre emulator launch script`);
@@ -177,17 +181,17 @@ function run() {
// use array form to avoid various quote escaping problems // use array form to avoid various quote escaping problems
// caused by exec(`sh -c "${preEmulatorLaunchScript}"`) // caused by exec(`sh -c "${preEmulatorLaunchScript}"`)
yield exec.exec('sh', ['-c', preEmulatorLaunchScript], { yield exec.exec('sh', ['-c', preEmulatorLaunchScript], {
cwd: workingDirectory cwd: workingDirectory,
}); });
} }
} }
catch (error) { catch (error) {
core.setFailed(error.message); core.setFailed(error instanceof Error ? error.message : error);
} }
console.log(`::endgroup::`); console.log(`::endgroup::`);
} }
// launch an emulator // launch an emulator
yield emulator_manager_1.launchEmulator(apiLevel, target, arch, profile, cores, ramSize, heapSize, sdcardPathOrSize, diskSize, avdName, forceAvdCreation, emulatorOptions, disableAnimations, disableSpellchecker, disableLinuxHardwareAcceleration, enableHardwareKeyboard); yield (0, emulator_manager_1.launchEmulator)(apiLevel, target, arch, profile, cores, ramSize, heapSize, sdcardPathOrSize, diskSize, avdName, forceAvdCreation, emulatorOptions, disableAnimations, disableSpellchecker, disableLinuxHardwareAcceleration, enableHardwareKeyboard);
// execute the custom script // execute the custom script
try { try {
// move to custom working directory if set // move to custom working directory if set
@@ -201,15 +205,15 @@ function run() {
} }
} }
catch (error) { catch (error) {
core.setFailed(error.message); core.setFailed(error instanceof Error ? error.message : error);
} }
// finally kill the emulator // finally kill the emulator
yield emulator_manager_1.killEmulator(); yield (0, emulator_manager_1.killEmulator)();
} }
catch (error) { catch (error) {
// kill the emulator so the action can exit // kill the emulator so the action can exit
yield emulator_manager_1.killEmulator(); yield (0, emulator_manager_1.killEmulator)();
core.setFailed(error.message); core.setFailed(error instanceof Error ? error.message : error);
} }
}); });
} }
+6 -2
View File
@@ -1,7 +1,11 @@
"use strict"; "use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) { }) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
o[k2] = m[k]; o[k2] = m[k];
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod); __setModuleDefault(result, mod);
return result; return result;
}; };
+3973 -13530
View File
File diff suppressed because it is too large Load Diff
+17 -17
View File
@@ -21,25 +21,25 @@
"author": "Reactive Circus", "author": "Reactive Circus",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.9.1", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.0", "@actions/exec": "^1.1.1",
"@actions/tool-cache": "^1.7.1", "@actions/tool-cache": "^2.0.1",
"minimist": "^1.2.6", "minimist": "^1.2.7",
"set-value": "^4.1.0" "set-value": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.0.3", "@types/jest": "^29.2.0",
"@types/node": "^12.20.34", "@types/node": "^16.18.2",
"@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.4.0", "@typescript-eslint/parser": "^5.41.0",
"eslint": "^8.3.0", "eslint": "^8.26.0",
"eslint-config-prettier": "^6.15.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.2", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^3.4.1", "eslint-plugin-prettier": "^4.2.1",
"jest": "^26.6.3", "jest": "^29.2.2",
"jest-circus": "^27.3.1", "jest-circus": "^29.2.2",
"prettier": "^1.19.1", "prettier": "^2.7.1",
"ts-jest": "^26.5.6", "ts-jest": "^29.0.3",
"typescript": "^3.9.10" "typescript": "^4.8.4"
} }
} }
+7 -7
View File
@@ -72,8 +72,8 @@ export async function launchEmulator(
if (data.toString().includes('invalid command-line parameter')) { if (data.toString().includes('invalid command-line parameter')) {
throw new Error(data.toString()); throw new Error(data.toString());
} }
} },
} },
}); });
// wait for emulator to complete booting // wait for emulator to complete booting
@@ -105,7 +105,7 @@ export async function killEmulator(): Promise<void> {
console.log(`::group::Terminate Emulator`); console.log(`::group::Terminate Emulator`);
await exec.exec(`adb -s emulator-5554 emu kill`); await exec.exec(`adb -s emulator-5554 emu kill`);
} catch (error) { } catch (error) {
console.log(error.message); console.log(error instanceof Error ? error.message : error);
} finally { } finally {
console.log(`::endgroup::`); console.log(`::endgroup::`);
} }
@@ -126,8 +126,8 @@ async function waitForDevice(): Promise<void> {
listeners: { listeners: {
stdout: (data: Buffer) => { stdout: (data: Buffer) => {
result += data.toString(); result += data.toString();
} },
} },
}); });
if (result.trim() === '1') { if (result.trim() === '1') {
console.log('Emulator booted.'); console.log('Emulator booted.');
@@ -135,7 +135,7 @@ async function waitForDevice(): Promise<void> {
break; break;
} }
} catch (error) { } catch (error) {
console.warn(error.message); console.warn(error instanceof Error ? error.message : error);
} }
if (attempts < maxAttempts) { if (attempts < maxAttempts) {
@@ -148,5 +148,5 @@ async function waitForDevice(): Promise<void> {
} }
function delay(ms: number) { function delay(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms)); return new Promise((resolve) => setTimeout(resolve, ms));
} }
+5 -5
View File
@@ -11,7 +11,7 @@ import {
checkForceAvdCreation, checkForceAvdCreation,
checkChannel, checkChannel,
checkEnableHardwareKeyboard, checkEnableHardwareKeyboard,
checkDiskSize checkDiskSize,
} from './input-validator'; } from './input-validator';
import { launchEmulator, killEmulator } from './emulator-manager'; import { launchEmulator, killEmulator } from './emulator-manager';
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
@@ -184,11 +184,11 @@ async function run() {
// use array form to avoid various quote escaping problems // use array form to avoid various quote escaping problems
// caused by exec(`sh -c "${preEmulatorLaunchScript}"`) // caused by exec(`sh -c "${preEmulatorLaunchScript}"`)
await exec.exec('sh', ['-c', preEmulatorLaunchScript], { await exec.exec('sh', ['-c', preEmulatorLaunchScript], {
cwd: workingDirectory cwd: workingDirectory,
}); });
} }
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error instanceof Error ? error.message : (error as string));
} }
console.log(`::endgroup::`); console.log(`::endgroup::`);
} }
@@ -225,7 +225,7 @@ async function run() {
await exec.exec('sh', ['-c', script]); await exec.exec('sh', ['-c', script]);
} }
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error instanceof Error ? error.message : (error as string));
} }
// finally kill the emulator // finally kill the emulator
@@ -233,7 +233,7 @@ async function run() {
} catch (error) { } catch (error) {
// kill the emulator so the action can exit // kill the emulator so the action can exit
await killEmulator(); await killEmulator();
core.setFailed(error.message); core.setFailed(error instanceof Error ? error.message : (error as string));
} }
} }