
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@ask-utils/test
Advanced tools
Simple testing utilities for ask-sdk.
$ npm i -S @ask-utils/test
import {
RequestEnvelopeFactory,
RequestFactory,
} from '@ask-utils/test'
const requestEnvelope = new RequestEnvelopeFactory(
new RequestFactory('LaunchRequest')
).getRequest()
{
"request": {
"timestamp": "2020-04-10T16:52:00Z",
"locale": "en-US",
"requestId": "amzn1.echo-external.request.ca4e7a21-7cee-4f9e-b03d-b9b589b237a1",
"type": "LaunchRequest"
},
"session": {
"new": true,
"sessionId": "SessionID.a18a82f9-cd07-4429-b7a8-50e19adfb2b6",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.f1d2b8c6-6884-4c37-807b-e02b7ffcd332"
},
"user": {
"userId": "amzn1.ask.account.98db37a6-f8aa-494a-8598-490b9528c68f"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.f1d2b8c6-6884-4c37-807b-e02b7ffcd332"
},
"user": {
"userId": "amzn1.ask.account.98db37a6-f8aa-494a-8598-490b9528c68f"
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": "token"
}
},
"version": "1.0"
}
import {
HandlerInputFactory,
RequestEnvelopeFactory,
LaunchRequestFactory
} from '@ask-utils/test'
const HandlerInput = new HandlerInputFactory(
new RequestEnvelopeFactory(
new LaunchRequestFactory()
)
)
const handlerInput = HandlerInput.create()
{
"requestEnvelope": {
"request": {
"timestamp": "2020-04-10T16:57:42Z",
"locale": "en-US",
"requestId": "amzn1.echo-external.request.e0c9fbd4-7bbd-4048-89da-ba270bbafabf",
"type": "LaunchRequest"
},
"session": {
"new": true,
"sessionId": "SessionID.f237b19f-0561-4c0a-a9c7-e3621bfd7c81",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.de4bde98-5979-4d38-81f7-e8859d1df904"
},
"user": {
"userId": "amzn1.ask.account.69cde737-db93-4a47-b8f5-37eb3ddf81c9"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.de4bde98-5979-4d38-81f7-e8859d1df904"
},
"user": {
"userId": "amzn1.ask.account.69cde737-db93-4a47-b8f5-37eb3ddf81c9"
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": "token"
}
},
"version": "1.0"
},
"attributesManager": {},
"responseBuilder": {}
}
import {
RequestEnvelopeFactory,
RequestFactory,
SessionFactory,
ContextFactory,
IntentRequestFactory
} from '@ask-utils/test'
const factory = new RequestEnvelopeFactory(
new IntentRequestFactory('ja-JP'),
new ContextFactory(),
new SessionFactory()
)
factory.context.system.putPerson('personId', 'token')
factory.session.isNewSession(false)
.putAttributes({
name: 'hello'
})
factory.request.setIntent({
name: 'HelloIntent',
slots: {
example: {
name: 'Hello',
confirmationStatus: 'NONE'
}
},
confirmationStatus: 'NONE'
})
console.log(factory.getRequest())
{
"request": {
"timestamp": "2020-04-10T16:56:09Z",
"locale": "en-US",
"requestId": "amzn1.echo-external.request.3fa05ce2-f3de-4a47-90c1-5029893895e6",
"type": "LaunchRequest"
},
"session": {
"new": true,
"sessionId": "SessionID.76b1f445-0ac4-41dd-9192-de92e23721cf",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.baa806b2-af37-4e22-8cc8-893f411cb0a4"
},
"user": {
"userId": "amzn1.ask.account.a3ba37ae-3fc7-47e9-aa5e-7bdd6c4a7516"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.baa806b2-af37-4e22-8cc8-893f411cb0a4"
},
"user": {
"userId": "amzn1.ask.account.a3ba37ae-3fc7-47e9-aa5e-7bdd6c4a7516"
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": "token"
}
},
"version": "1.0"
}
import {
HandlerInputFactory,
RequestEnvelopeFactory,
LaunchRequestFactory
} from '@ask-utils/test'
const request = new LaunchRequestFactory()
const requestEnvelope = new RequestEnvelopeFactory(request)
requestEnvelope.session.putAttributes({
name: 'hello',
label: 123
})
const HandlerInput = new HandlerInputFactory(requestEnvelope)
const handlerInput = HandlerInput.create()
{
"requestEnvelope": {
"request": {
"timestamp": "2020-04-10T16:59:58Z",
"locale": "en-US",
"requestId": "amzn1.echo-external.request.245753fb-78d9-47bf-9cd6-5334c5436df7",
"type": "LaunchRequest"
},
"session": {
"new": true,
"sessionId": "SessionID.c730169a-8593-4986-a0db-7574f044727f",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.eec5bb0c-4fbd-4208-b9c3-2c5370a7d5e4"
},
"user": {
"userId": "amzn1.ask.account.8c9bebf8-7f8b-4139-b91e-28e806a81e71"
},
"attributes": {
"name": "hello",
"label": 123
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.eec5bb0c-4fbd-4208-b9c3-2c5370a7d5e4"
},
"user": {
"userId": "amzn1.ask.account.8c9bebf8-7f8b-4139-b91e-28e806a81e71"
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": "token"
}
},
"version": "1.0"
},
"attributesManager": {},
"responseBuilder": {}
}
FAQs
Skill Routing library for ask-sdk v2
We found that @ask-utils/test 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.