diff --git a/.gitignore b/.gitignore index c5c328f..059d016 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ ask-resources.json .ask .vscode lambda/node_modules -.ask/ \ No newline at end of file +.ask/ +node_modules diff --git a/lambda/index.js b/lambda/index.js deleted file mode 100644 index f32fca3..0000000 --- a/lambda/index.js +++ /dev/null @@ -1,156 +0,0 @@ -/* * - * This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). - * Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management, - * session persistence, api calls, and more. - * */ -const Alexa = require('ask-sdk-core'); - -const LaunchRequestHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest'; - }, - handle(handlerInput) { - const speakOutput = 'Welcome, you can say Hello or Help. Which would you like to try?'; - - return handlerInput.responseBuilder - .speak(speakOutput) - .reprompt(speakOutput) - .getResponse(); - } -}; - -const HelloWorldIntentHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' - && Alexa.getIntentName(handlerInput.requestEnvelope) === 'HelloWorldIntent'; - }, - handle(handlerInput) { - const speakOutput = 'Hello World!'; - - return handlerInput.responseBuilder - .speak(speakOutput) - //.reprompt('add a reprompt if you want to keep the session open for the user to respond') - .getResponse(); - } -}; - -const HelpIntentHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' - && Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.HelpIntent'; - }, - handle(handlerInput) { - const speakOutput = 'You can say hello to me! How can I help?'; - - return handlerInput.responseBuilder - .speak(speakOutput) - .reprompt(speakOutput) - .getResponse(); - } -}; - -const CancelAndStopIntentHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' - && (Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.CancelIntent' - || Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.StopIntent'); - }, - handle(handlerInput) { - const speakOutput = 'Goodbye!'; - - return handlerInput.responseBuilder - .speak(speakOutput) - .getResponse(); - } -}; -/* * - * FallbackIntent triggers when a customer says something that doesn’t map to any intents in your skill - * It must also be defined in the language model (if the locale supports it) - * This handler can be safely added but will be ingnored in locales that do not support it yet - * */ -const FallbackIntentHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' - && Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.FallbackIntent'; - }, - handle(handlerInput) { - const speakOutput = 'Sorry, I don\'t know about that. Please try again.'; - - return handlerInput.responseBuilder - .speak(speakOutput) - .reprompt(speakOutput) - .getResponse(); - } -}; -/* * - * SessionEndedRequest notifies that a session was ended. This handler will be triggered when a currently open - * session is closed for one of the following reasons: 1) The user says "exit" or "quit". 2) The user does not - * respond or says something that does not match an intent defined in your voice model. 3) An error occurs - * */ -const SessionEndedRequestHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'SessionEndedRequest'; - }, - handle(handlerInput) { - console.log(`~~~~ Session ended: ${JSON.stringify(handlerInput.requestEnvelope)}`); - // Any cleanup logic goes here. - return handlerInput.responseBuilder.getResponse(); // notice we send an empty response - } -}; -/* * - * The intent reflector is used for interaction model testing and debugging. - * It will simply repeat the intent the user said. You can create custom handlers for your intents - * by defining them above, then also adding them to the request handler chain below - * */ -const IntentReflectorHandler = { - canHandle(handlerInput) { - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'; - }, - handle(handlerInput) { - const intentName = Alexa.getIntentName(handlerInput.requestEnvelope); - const speakOutput = `You just triggered ${intentName}`; - - return handlerInput.responseBuilder - .speak(speakOutput) - //.reprompt('add a reprompt if you want to keep the session open for the user to respond') - .getResponse(); - } -}; -/** - * Generic error handling to capture any syntax or routing errors. If you receive an error - * stating the request handler chain is not found, you have not implemented a handler for - * the intent being invoked or included it in the skill builder below - * */ -const ErrorHandler = { - canHandle() { - return true; - }, - handle(handlerInput, error) { - const speakOutput = 'Sorry, I had trouble doing what you asked. Please try again.'; - console.log(`~~~~ Error handled: ${JSON.stringify(error)}`); - - return handlerInput.responseBuilder - .speak(speakOutput) - .reprompt(speakOutput) - .getResponse(); - } -}; - -/** - * This handler acts as the entry point for your skill, routing all request and response - * payloads to the handlers above. Make sure any new handlers or interceptors you've - * defined are included below. The order matters - they're processed top to bottom - * */ -exports.handler = Alexa.SkillBuilders.custom() - .addRequestHandlers( - LaunchRequestHandler, - HelloWorldIntentHandler, - HelpIntentHandler, - CancelAndStopIntentHandler, - FallbackIntentHandler, - SessionEndedRequestHandler, - IntentReflectorHandler) - .addErrorHandlers( - ErrorHandler) - .withCustomUserAgent('sample/hello-world/v1.2') - .lambda(); \ No newline at end of file diff --git a/lambda/local-debugger.js b/lambda/local-debugger.js deleted file mode 100644 index 005d3de..0000000 --- a/lambda/local-debugger.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -/* ## DEPRECATION NOTICE - -This script has been deprecated and is no longer supported. -Please use the [ASK Toolkit for VS Code] -(https://marketplace.visualstudio.com/items?itemName=ask-toolkit.alexa-skills-kit-toolkit), -which provides a more end-to-end integration with Visual Studio Code. If you -use another editor/IDE, please check out the [ASK SDK Local Debug package at npm] -(https://www.npmjs.com/package/ask-sdk-local-debug). - -*/ - -const net = require('net'); -const fs = require('fs'); - -const localDebugger = net.createServer(); - -const httpHeaderDelimeter = '\r\n'; -const httpBodyDelimeter = '\r\n\r\n'; -const defaultHandlerName = 'handler'; -const host = 'localhost'; -const defaultPort = 0; - -/** - * Resolves the skill invoker class dependency from the user provided - * skill entry file. - */ - -// eslint-disable-next-line import/no-dynamic-require -const skillInvoker = require(getAndValidateSkillInvokerFile()); -const portNumber = getAndValidatePortNumber(); -const lambdaHandlerName = getLambdaHandlerName(); - -/** - * Starts listening on the port for incoming skill requests. - */ - -localDebugger.listen(portNumber, host, () => { - console.log(`Starting server on port: ${localDebugger.address().port}.`); -}); - -/** - * For a new incoming skill request a new socket connection is established. - * From the data received on the socket the request body is extracted, parsed into - * JSON and passed to the skill invoker's lambda handler. - * The response from the lambda handler is parsed as a HTTP 200 message format as specified - * here - https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html#http-header-1 - * The response is written onto the socket connection. - */ - -localDebugger.on('connection', (socket) => { - console.log(`Connection from: ${socket.remoteAddress}:${socket.remotePort}`); - socket.on('data', (data) => { - const body = JSON.parse(data.toString().split(httpBodyDelimeter).pop()); - console.log(`Request envelope: ${JSON.stringify(body)}`); - skillInvoker[lambdaHandlerName](body, null, (_invokeErr, response) => { - response = JSON.stringify(response); - console.log(`Response envelope: ${response}`); - socket.write(`HTTP/1.1 200 OK${httpHeaderDelimeter}Content-Type: application/json;charset=UTF-8${httpHeaderDelimeter}Content-Length: ${response.length}${httpBodyDelimeter}${response}`); - }); - }); -}); - -/** - * Validates user specified port number is in legal range [0, 65535]. - * Defaults to 0. - */ - -function getAndValidatePortNumber() { - const portNumberArgument = Number(getArgument('portNumber', defaultPort)); - if (!Number.isInteger(portNumberArgument)) { - throw new Error(`Port number has to be an integer - ${portNumberArgument}.`); - } - if (portNumberArgument < 0 || portNumberArgument > 65535) { - throw new Error(`Port out of legal range: ${portNumberArgument}. The port number should be in the range [0, 65535]`); - } - if (portNumberArgument === 0) { - console.log('The TCP server will listen on a port that is free.' - + 'Check logs to find out what port number is being used'); - } - return portNumberArgument; -} - -/** - * Gets the lambda handler name. - * Defaults to "handler". - */ - -function getLambdaHandlerName() { - return getArgument('lambdaHandler', defaultHandlerName); -} - -/** - * Validates that the skill entry file exists on the path specified. - * This is a required field. - */ - -// eslint-disable-next-line consistent-return -function getAndValidateSkillInvokerFile() { - const fileNameArgument = getArgument('skillEntryFile'); - if (!fs.existsSync(fileNameArgument)) { - throw new Error(`File not found: ${fileNameArgument}`); - } - return fileNameArgument; -} - -/** - * Helper function to fetch the value for a given argument - * @param {argumentName} argumentName name of the argument for which the value needs to be fetched - * @param {defaultValue} defaultValue default value of the argument that is returned if the value doesn't exist - */ - -function getArgument(argumentName, defaultValue) { - const index = process.argv.indexOf(`--${argumentName}`); - if (index === -1 || typeof process.argv[index + 1] === 'undefined') { - if (defaultValue === undefined) { - throw new Error(`Required argument - ${argumentName} not provided.`); - } else { - return defaultValue; - } - } - return process.argv[index + 1]; -} diff --git a/lambda/util.js b/lambda/util.js deleted file mode 100644 index 49974a9..0000000 --- a/lambda/util.js +++ /dev/null @@ -1,19 +0,0 @@ -const AWS = require('aws-sdk'); - -const s3SigV4Client = new AWS.S3({ - signatureVersion: 'v4', - region: process.env.S3_PERSISTENCE_REGION -}); - -module.exports.getS3PreSignedUrl = function getS3PreSignedUrl(s3ObjectKey) { - - const bucketName = process.env.S3_PERSISTENCE_BUCKET; - const s3PreSignedUrl = s3SigV4Client.getSignedUrl('getObject', { - Bucket: bucketName, - Key: s3ObjectKey, - Expires: 60*1 // the Expires is capped for 1 minute - }); - console.log(`Util.s3PreSignedUrl: ${s3ObjectKey} URL ${s3PreSignedUrl}`); - return s3PreSignedUrl; - -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e9cd532 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,481 @@ +{ + "name": "@amzn/hello-world", + "version": "1.2.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@amzn/hello-world", + "version": "1.2.0", + "license": "Apache License", + "dependencies": { + "@types/node": "^20.14.10", + "ask-sdk-core": "^2.7.0", + "ask-sdk-model": "^1.19.0", + "aws-sdk": "^2.326.0", + "typescript": "^5.5.3" + } + }, + "node_modules/@types/node": { + "version": "20.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", + "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/ask-sdk-core": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/ask-sdk-core/-/ask-sdk-core-2.14.0.tgz", + "integrity": "sha512-G2yEKbY+XYTFzJXGRpsg7xJHqqgBcgnKEgklXUMRWRFv10gwHgtWDLLlBV6h4IdysTx782rCVJK/UcHcaGbEpA==", + "dependencies": { + "ask-sdk-runtime": "^2.14.0" + }, + "peerDependencies": { + "ask-sdk-model": "^1.29.0" + } + }, + "node_modules/ask-sdk-model": { + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/ask-sdk-model/-/ask-sdk-model-1.86.0.tgz", + "integrity": "sha512-JmC5mypPBz5Q1Yx1WyeAr2Q/z2Cjm98EjLjTlYAolXF4gokU7fDDjeOAyAD5dkyHjyGLeCEvlC0MJYWFwc84dw==" + }, + "node_modules/ask-sdk-runtime": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/ask-sdk-runtime/-/ask-sdk-runtime-2.14.0.tgz", + "integrity": "sha512-a96pPs1RU3GgXBHplqAVqh2uxEuSYjTD5+XSbHsf6Fz4KhHpgaxJogOIIybjA6O/d1B9sG+6bjHJGzxBJEcccA==" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/aws-sdk": { + "version": "2.1659.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1659.0.tgz", + "integrity": "sha512-WOoy5DdWW4kpQuxjWiQdoSDR+dT/HeAUwjb6b+8taEMZzvUzp3fmdDwdryUTlLWGxrnb7ru2yu5pryjhPOzANg==", + "hasInstallScript": true, + "dependencies": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.16.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "util": "^0.12.4", + "uuid": "8.0.0", + "xml2js": "0.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/jmespath": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", + "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typescript": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/uuid": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } + } + } +} diff --git a/lambda/package.json b/package.json similarity index 80% rename from lambda/package.json rename to package.json index 5e4f2ed..154f98d 100644 --- a/lambda/package.json +++ b/package.json @@ -9,8 +9,10 @@ "author": "Amazon Alexa", "license": "Apache License", "dependencies": { + "@types/node": "^20.14.10", "ask-sdk-core": "^2.7.0", "ask-sdk-model": "^1.19.0", - "aws-sdk": "^2.326.0" + "aws-sdk": "^2.326.0", + "typescript": "^5.5.3" } }