
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
alexa-utils
Advanced tools
A simple library for making the development of Alexa (Amazon Echo) apps (Skills) easier with Node.js.
Latest release now with FULL support for cards and session data, and yet another redesign of the code structure for easier alexa app development.
This library is very minimalistic as far as what features it supports, although more support will be added soon. For example, it doesn't support async functions at the moment, although it may be implemented in a later version. If you have any suggestions or bug fixes, please contact me or make a pull request.
Additionally, ths library does not aim to compete with the official Alexa library for node, or the alexa-app library. Rather, it's simply my version of a library capable of interacting with the Amazon Echo.
npm install alexa-utils --save
var alexa = require('alexa-utils');
const PORT = 3000;
var app = alexa.app("HelloWorld")
.onLaunch(function(req, res) {
res.prompt("Hello there!").send();
})
.onIntent("GetFavoriteColor", function(req, res) {
res.prompt("I see that your favorite color is " + req.intent.slots("color")).send();
})
.onSessionEnd(function(req, res) {
res.prompt("Goodbye!").send();
})
.host("/hello", PORT);
console.log("Server started on port " + PORT);
function(request, response)
; used for parsing data from a web clientfunction(request, response)
; used for sending data to a web clientalexa
- the object holding the reference to the alexa-utils
libraryoptional
- the argument doesn't need to be specified when calling the functionThis format is used when alexa-utils
receives the requests from the Echo and feeds it to your skill. Note that if the type has a function signature, that means that the field specified is a function with that signature.
{
"intent": {
"type": "string",
"name": "string",
"reason": "string",
"slot": function(name)
},
"session": {
"new": boolean,
"id": "string",
"appId": "string",
"getAttribute": function(name),
"user": {
"id": "string",
"accessToken": "string"
}
}
}
alexa.app
Creates an app object to process the intent requests
Sets the action to occur when the user tries to use the skill but deosn't specify a specific action to do.
Assigns the action to the particular intent specified.
Sets the action to occur when the session with the user has ended.
Deploys the skill onto the web with the specified route
and port
. If you want to enable request verification, add a third argument and set it to true
alexa.response
For full documentation on constructing responses for the Echo, refer to this link
Generates a base response with the minimum required info to send sucessfully to the Echo device.
Creates a prompt
field with the specified text. Features auto-detection of type of prompt text (SSML or regular text).
Same as the prompt
function, except for the reprompt
field.
Creates a home card with the given arguments. If you only give two arguments, a 'Simple' card will be created with just the title and textContent (plain text). However, if you want to include an image, add the respective URLs and a 'Standard' card will be created, including everything that a simple card will have plus the wanted images.
Creates a card set up for account linking.
Creates/Modifies a session variable with the given name and value.
Sets the flag if the session between the Echo device and the user should end after sending the response. Note that by default, this flag is set to true
Sends the constructed response to the Echo device.
FAQs
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
The npm package alexa-utils receives a total of 5 weekly downloads. As such, alexa-utils popularity was classified as not popular.
We found that alexa-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.