UNPKG

ask-cli

Version:

Alexa Skills Kit (ASK) Command Line Interfaces

29 lines (28 loc) 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JavaRunFlow = void 0; const constants_1 = require("../../../utils/constants"); const abstract_run_flow_1 = require("./abstract-run-flow"); class JavaRunFlow extends abstract_run_flow_1.AbstractRunFlow { static canHandle(runtime) { return runtime === constants_1.RUNTIME.JAVA; } constructor({ skillInvocationInfo, waitForAttach, debugPort, token, skillId, runRegion, watch }) { let execCmd = `cd ${skillInvocationInfo.skillCodeFolderName}; mvn exec:exec -Dexec.executable=java -Dexec.args=` + '"-classpath %classpath com.amazon.ask.localdebug.LocalDebuggerInvoker ' + `--accessToken ${token} --skillId ${skillId} --skillStreamHandlerClass ${skillInvocationInfo.handlerName} --region ${runRegion}"`; if (waitForAttach) { execCmd = `cd ${skillInvocationInfo.skillCodeFolderName}; mvn exec:exec -Dexec.executable=java -Dexec.args=` + `"-classpath %classpath -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${debugPort} ` + "com.amazon.ask.localdebug.LocalDebuggerInvoker " + `--accessToken ${token} --skillId ${skillId} --region ${runRegion} --skillStreamHandlerClass ${skillInvocationInfo.handlerName}"`; } super({ exec: execCmd, ext: "java, xml", watch: watch ? `${skillInvocationInfo.skillCodeFolderName}` : watch, }); } } exports.JavaRunFlow = JavaRunFlow;