Coder Social home page Coder Social logo

alexa / ask-cli Goto Github PK

View Code? Open in Web Editor NEW
164.0 40.0 54.0 12.02 MB

Alexa Skills Kit Command Line Interface

Home Page: https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-intro.html

License: Apache License 2.0

JavaScript 64.20% PowerShell 0.22% Shell 0.08% Java 0.05% Python 0.01% Mustache 0.05% TypeScript 35.40%
cli command-line command-line-tool alexa-skills-kit aws-lambda aws-cloudformation skill-deployer alexa-skill

ask-cli's Introduction


Alexa Skills Kit Command Line interface

The Alexa Skills Kit Command Line Interface (ask-cli) is used to create, manage, and deploy Alexa skills from the command line. Please see the full documentation from ASK CLI quick start guide.

Note: To use ask-cli for Alexa-Hosted skill, please check our instructions for the usage.

Getting Started

1. Install CLI

$ npm install -g ask-cli

2. Configure CLI profile

Before you can start using the ASK CLI, configure your ASK (and AWS) credentials:

$ ask configure

You’ll be prompted to sign into your Amazon developer account. If you choose to have your skill hosted by AWS, you’ll have the option of linking your AWS account as well.

3. Create new skill project

Create a new skill project and follow the prompts from the command:

$ ask new

You'll be asked to select a deployment method for your skill. Currently we support deployment via AWS CloudFormation (@ask-cli/cfn-deployer), deployment via AWS Lambda (@ask-cli/lambda-deployer), and deployment through Alexa-Hosted skill (@ask-cli/hosted-skill-deployer).

Your new skill project will provide a number of files and folders that make up the structure of an Alexa skill. Here is an overview on each of the files and folders that are created by default:

File/Folder Description
skill-package/ Skill resources utilized by the ASK platform such as skill manifest, interaction models, and assets
lambda/ Contains the source code for your skill that utilizes the ASK SDK
infrastructure/ Contains your CloudFormation definitions for deploying your skill to AWS
ask-resources config Configuration for your Alexa skill project

See the ASK SDKs documentation to learn more about how to build an Alexa skill.

4. Deploy Alexa skill

In order for Alexa to communicate with your skill code, it will need to be deployed and hosted on the cloud using this command.

$ ask deploy

The deploy command performs the following steps:

  1. skill-package/ resources will be zipped and uploaded to the ASK platform via SMAPI's Skill Package Service.
  2. lambda/ source files will be built and zipped for deployment to AWS. We currently support the build flows of npm for Nodejs, pip for Python and maven for Java developers.
  3. infrastructure/ definitions will be used to provision resources on AWS. The lambda/'s zip file from the previous step will be deployed to the provisioned AWS Lambda function. The gif below shows the deployment using @ask-cli/cfn-deployer, you can also try other deployers as they serve different purposes.

5. Dialog with what you build

To test while developing your skill locally, or quickly showcase your skill ideas, or even build end-to-end testing, you can use CLI's dialog command.

$ ask dialog

ask-cli's People

Contributors

ask-sdk avatar bruceowenga avatar camdenfoucht avatar chih-ying avatar cisnky avatar crackmac avatar dependabot[bot] avatar doiron avatar harimp-amzn avatar jaimerodriguez avatar joemocode avatar jsetton avatar kakhaurigashvili avatar kevinseq1 avatar lucioms avatar michail avatar pbheemag avatar ronwang avatar sattpat avatar shenchen93 avatar shreyas-vgr avatar skrotha avatar spkai avatar thegoliathgeek avatar tydonelson avatar virajkanwade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ask-cli's Issues

empty permissions field causes 500 when deployed

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

The error message should point to the problem ( an empty array for the permissions field is not a valid value and that the field needs to be removed instead of being empty )

Current Behavior

500 - Server error

CLI Snapshot
If applicable, add screenshots to help explain your problem.
Screen Shot 2019-10-17 at 5 24 05 PM

Steps to Reproduce (for bugs)

  • Create a new skill using the CLI ( I used the hello world template )
  • Edit the skill.json manifest file and add the field permissions as bellow:
...
"privacyAndCompliance": {
...,
permissions: []
}
...
  • try to deploy the project ask deploy ( you'll get a 500 - server error )

Possible Solution

I would just handle this error and return an informative/helpful message otherwise it may be a headache to debug!

Your Environment and Context

  • ask-cli version: 1.7.15
  • Operating System and version: MAC book pro - Catalina
  • Node.js version used for development: 8
  • NPM version used for development: 6.9.0

ask lambda upload -f Zip Size

I called ask lambda upload -f <FunctionName> and then had to ctrl-c as the zip it was creating reached 1gb in size (I imagine it would have gone further if I left it).

Steps I took:

  • ask lambda -download -f <FunctionName>
  • move lambda to the correct folder for the skill (not sure why it was in the root folder)
  • edit lambda files for skill
  • navigate to ./lambda/custom
  • ask lambda upload -f <FunctionName>

Add building instructions for contributors

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

Ideally the project directory docs would include a simple MD file that explains how to build the project locally to test contributed improvements, bug fixes, new features, etc before submitting a PR.
As a bonus this file would contain any other useful instructions or pointers for developer trying to contribute to the project rather than just use it.
The top level readme file focuses on users, not contributors.

Current Behavior

No instructions provided.

CLI Snapshot
If applicable, add screenshots to help explain your problem.

Steps to Reproduce (for bugs)

Possible Solution

Create a new MD file for this

Your Environment and Context

  • ask-cli version: x.x.x
  • Operating System and version:
  • Node.js version used for development:
  • NPM version used for development:

askx cli cannot deploy tasks to the dev version of a live (deployed) skill

Related to #50

Goal: Trying to add a task to a dev version of a deployed skill that has isps.

Errors: Response body: "{"skill":{"resources":[{"action":"DISASSOCIATE","errors":[{"message":"com.amazon.alexa.skillmanagement.ForbiddenException: User is not permitted to perform the requested operation."}],"name":"InSkillProduct:amzn1.adg.product.906b09c7-4929-422d-b941-5c2380d77d45","status":"FAILED"},{"action":"UPDATE","name":"InteractionModel.en-US","status":"ROLLBACK_IN_PROGRESS"},{"action":"UPDATE","name":"Manifest","status":"SUCCEEDED"},{"action":"UPDATE","name":"TaskDefinitions","status":"ROLLBACK_IN_PROGRESS"}],"skillId":"amzn1.ask.skill.0ea44f42-11b0-4b69-b423-fc2e6a2c3f4f"},"status":"IN_PROGRESS"}"

Guess: since deployment is pushing the whole package (no target flag available), any deployment affects isps, either trying to associate or disassociate them, either of which is not allowed on a deployed (live) skill.

ask deploy disables location permissions in the console.

Creating a skill with ask new or deploying to an existing skill created in the console with ask deploy disables the ability to use location permissions. Clicking the Device Address check box doesn't enable the save button. Saving the configuration with Device Address check doesn't save these settings. I tried adding:
"permissionInfo": { "permissions": [{ "requestReasonAndTestingInstructions": "", "scope": "read::alexa:device:all:address" }] }
(taken from the configuration page post) to the skill schema, but still nothing.

screen shot 2017-04-25 at 2 56 36 pm

Interaction Model Schema Docs, "intent" or "name"

Within the Interaction Model Schema docs, in the horoscope example and the intent object definition, the field that describes the name of the intent is labeled as "intent" however I believe it needs to be "name" (which is how it is in the template).

screen shot 2017-04-21 at 5 03 27 pm
screen shot 2017-04-21 at 5 03 38 pm

Using "intent" kicks back a 400 Bad Request when I attempt to update the model through the API however "name" works.

Bad Request Failed to refresh access token on uploading skill package

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

askx deploy should run successfully.

Current Behavior

Run askx deploy produces error message Bad Request Failed to refresh access token

CLI Snapshot

[jacob@localhost warren-alexa-skill-3]$ node ~/.nvm/versions/node/v12.12.0/bin/askx deploy
==================== Deploy Skill Metadata ====================
o Uploading the entire skill package (it may take few minutes to build the skill metadata)...Error: Bad Request
Failed to refresh access token.

Steps to Reproduce (for bugs)

Yesterday, I set up an LWA account, set the environment variables ASK_LWA_CLIENT_ID and ASK_LWA_CLIENT_SECRET, and was able to update my Alexa skill successfully. Today, this no longer works. My hypothesis is that the access token has expired (confirmed by debugging the code, and observing that isTokenExpired(profile) returns true), and there is perhaps some bug inside of oauth-wrapper.js or simple-auth2 module which is preventing the oauth token from refreshing successfully.

Possible Solution

Unsure. I would appreciate any insight you could share on further steps to debug this.

Your Environment and Context

  • ask-cli version: askx 0.1.1
  • Operating System and version: Fedora 29
  • Node.js version used for development: v12.12.0
  • NPM version used for development: 6.11.3

Old powershell Compress-Archive not compatible with AWS

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Other... Please describe:

askx deployed skill will throw load exception. It seems that the dependent files are not in the right place. The root cause is zip file generated by PowerShell is not compatible with other operating systems.

Expected Behavior

There should be a node_module folder under lambda function source tree.

Current Behavior

See screenshot below

CLI Snapshot
If applicable, add screenshots to help explain your problem.
image

Steps to Reproduce (for bugs)

  1. Open Powershell window
  2. askx new and follow the promting
  3. askx deploy

Possible Solution

Install-Module Microsoft.PowerShell.Archive -MinimumVersion 1.2.3.0 -Repository PSGallery -Force

See the issue and solution here.

Your Environment and Context

  • ask-cli version: x.x.x
  • Operating System and version: windows 10 Enterprise
  • Node.js version used for development: 10.16
  • NPM version used for development: 6.9.0

account linking commands don't return redirect URIs

Neither the output for the create-account-linking or get-account-linking commands shows the end user the Amazon generated redirect URLs that are needed for code based authentication. These are available via the UI though.

Feature Request: Tab-completion for bash, zsh & powershell

At the moment, the ask cli only has a few sub-commands, but that will grow over time.
We should make it easier for developers to find commands & parameters by offering tab completion, similar to that of the aws cli.

I don't have stats on which shells developers are using, but I would think providing this functionality for bash, zsh & powershell would cover the majority of skill developers. We can support more exotic shells if/when we see requests for them.

Note: deploy may fail for the recent change, please pull the latest code

When you do "ask deploy" or "ask api create-skill" or "ask api update-skill" and have following error:

Call create-skill error.
Error code: 400
{ message: 'The skill definition is not valid.',
violations: [ { message: 'Lambda ARN length is outside permissible range. [Invalid value] : TOBEREPLACED' } ] }

This is because of recently added endpoint validation. In order to fix it you can do one of the following:
1)Remove the endpoint altogether when you create skill.
2)Update the skill.json with correct Lambda Arn.
3)Refresh your ASK CLI by doing "git pull" at your root directory of ASK CLI, and then do "sudo npm install -g" at the same place.

Thanks for your effort!

ask init --no-browser results 409 User is not authorized to access this operation.'

Hello,

I was following the

https://github.com/amznlabs/ask-cli/wiki/Command-Line-Interface-%28CLI%29-Usage-Instructions

and wished to go with using the --no-browser option.

After providing the authorization code, i get the following response.

Tokens fetched and written to cli config.
Call list-vendors error.
Error code: 403
{ message: 'User is not authorized to access this operation.' }

I create the access key in aws, also added it to my 'credentials' file as stated in the usage instructions. I don't use the aws-cli. I don't use any IAM account in aws. I try to use it with my own developer account where i have administrator roles, besides that i have developer level user permission to one of my colleagues account.

I have not clue what this error message means. =) Can someone help me please?

Thanks!
Agoston

Can't call create-skill API with Lambda endpoints

Currently there is a known issue that prevents calling the create-skill API (POST /skills) with a Lambda ARN as an endpoint. This affects customers calling the API directly or using the $ ask api create-skill command in the CLI. The $ ask deploy command should not be affected.

The team is looking at fixing this - we'll follow up with updates soon.

Thank you @mobty for reporting the issue.

Functions from 'sa-east-1' are not reachable in this region ('us-east-1')

I'm submitting a...


[ x ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

When I try to askx deploy my project after updating to ask v2, I receive this region error message. How do I configure the askx to deploy to sa-east-1 region? Thanks.

Your Environment and Context

  • ask-cli version: latest (used the askx util upgrade-to-v2)
  • Operating System and version: Windows 10
  • Node.js version used for development: 12.x
  • NPM version used for development: 6.13.0

executable can't find it's dependencies when installed with npm

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

I get the error Error: Cannot find module '@src/utils/constants' when trying to run the cli after install through npm.

Expected Behavior

It can find its own dependencies

Current Behavior

It can't find its own dependencies:

./node_modules/.bin/ask
module.js:550
    throw err;
    ^

Error: Cannot find module '@src/utils/constants'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._resolveFilename (/Users/josephprice/dev/github.com/iheartradio/ce-alexa-santa-skill/lambda/node_modules/module-alias/index.js:49:29)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/josephprice/dev/github.com/iheartradio/ce-alexa-santa-skill/lambda/node_modules/ask-cli/lib/commands/init/index.js:1:81)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)

Steps to Reproduce (for bugs)

  • Install ask-cli as a dev dependency. In my package.json, it resolved to "^1.7.18".
  • Try to use it by executing ./node_modules/.bin/ask

Your Environment and Context

  • ask-cli version: 1.7.18
  • Operating System and version: mac os 10.12.6
  • Node.js version used for development: v10.10.0
  • NPM version used for development: 6.13.4

[FEATURE REQUEST] Ability to set SSL Certificate for Server Based Skills in Skill Schema

When using something like $bst proxy for local development or if you use a server instead of a lambda in production, I would like to be able to set all the configuration parameters needed for using a HTTPS URL.

Note

Even though your docs state it is an ARN:
screen shot 2017-03-27 at 5 33 57 pm

I am still able to put my server URL in the Skill schema:

"endpointsByRegion": {
        "NA": {
          "isDefaultRegion": true,
          "url": "https://proxy.bespoken.tools?node-id=abc-123"
        }
}

And am able to test it from the Service Simulator but the SSL Certificate is not checked:

screen shot 2017-03-27 at 5 35 25 pm

It does not seem to be required but I assume it doesn't hurt.

Missing ask-resources.json error when trying to do askx deploy

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

I cloned a sample skill from GitHub, but when I do askx deploy, I receive the following error:

[Error]: File /Users/itspanw/skill-sample-nodejs-hello-world/ask-resources.json not exists.

I should be able to look through the documentation and find instructions on how to add the ask-resources.json file if it's missing or the CLI should add it to skills that don't have it.

Current Behavior

When I do askx deploy, I get the error and don't know how to address the issue.

CLI Snapshot
If applicable, add screenshots to help explain your problem.

Steps to Reproduce (for bugs)

  1. git clone [email protected]:alexa/skill-sample-nodejs-hello-world.git
  2. cd skill-sample-nodejs-hello-world.git
  3. askx deploy

Possible Solution

Have the CLI add this file if it's missing from a skill project and/or update documentation with explanation on how to resolve this issue.

Your Environment and Context

  • ask-cli version: 0.6.1
  • Operating System and version: MacOS Mojave v 10.14.6
  • Node.js version used for development: v11.11.0
  • NPM version used for development: 6.13.6

bunyan and dtrace-provider error

I install this module using npm install -g ask-cli. After install it, I got this error when type ask.

{ Error: Cannot find module './build/Release/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/brew/lib/node_modules/ask-cli/node_modules/dtrace-provider/dtrace-provider.js:18:23)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/brew/lib/node_modules/ask-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32) code: 'MODULE_NOT_FOUND' }

  Usage: ask [options] [command]

  Command Line Interface for Alexa Skill Management API


  Options:

    -v, --version  output the version number of ask-cli
    -h, --help     output usage information


  Commands:

    init [options]       initialize the ask-cli with your Amazon developer account credentials
    deploy [options]     deploy a skill to your developer account
    new [options]        create a new skill project on your computer
    clone [options]      clone an existing skill project on your computer
    simulate [options]   simulate a user using your skill
    lambda               list of AWS Lambda commands
    api                  list of Alexa Skill Management API commands
    help [cmd]           display help for [cmd]
npm -v
5.6.0

What's wrong?

Testing is not automatically enabled - Error: Skill is currently disabled in development stage

Is this by design? If I deploy a function, I still need to login to the developer portal and toggle the testing to be "enabled". Doesn't this defeat the purpose of a UI-less CLI tool?
Is there a way to toggle testing from the cli?

{
  "status": "FAILED",
  "result": {
    "skillExecutionInfo": null,
    "error": {
      "message": "Skill is currently disabled in development stage. Please enable skill in order to call this API."
    }
  }
}

Thanks,

Andrea

Simple-OAuth2 library update

Hi, I am the simple-oauth2 library maintainer, and just noticed this project is using simple-oauth2 (which is great!).

However I also noticed you are still using v1 (which is deprecated). I am wondering if there is something stopping you from upgrading to the latest version (v3)? Please let me know if there is something I can help with to support your upgrade.

Thanks!

more descriptive error message when intent definition refers to nonexistent type

Hi folks,

I had an intent defined like this:
{
"name": "Promote",
"slots": [
{
"name": "world",
"type": "World"
}
],
"samples": [
"promote {world}"
]
},

In fact, the type should have been "Worlds". The error didn't tell me exactly what was wrong.

Error code: 400
{ message: 'The model definition is not valid.',
violations: [ { message: 'model.type.name is unknown slot type name' } ] }

Adding a line number or a specific unknown value would be helpful.

Thanks,

Andy

Node 8 end of life

Hi, I just received an email from AWS about Lambda's Node 8 supporting EOL being at the end of 2019. However the ASK cli generates new projects with Node 8. Does the 2019 EOL not apply to Lambda functions being used by Alexa Skills? If it does apply, is there anything we can do to fix this? Thanks.

Categories and Sub Categories

When creating or updating a skill, you cannot set category on a skill to one of the enumerated categories if they have sub categories.

So for example, I was trying to set the category to MUSIC_AND_AUDIO however that returned a generic "400 Bad Request". Instead you need to set it to one of it's sub categories, such as STREAMING_SERVICE.

A better error message and perhaps removing the categories that have sub categories from the list of possible values would help people from encountering this issue.

Can't choose Vendor Id (reveal not working)

I currently have access to ~30 different vendor accounts and the CLI is only showing me the first 19 and I can't access the others--up/down for reveal is not working. The vendor ID in question is whitelisted for CLI.

Additional ask: CLI should show how many accounts are present for the user in addition to showing the entire list.

Support for Lambda Aliases as part of deployment specification


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Support for Lambda Aliases as part of deployment specification

Expected Behavior

Either by pre-defined specification constraint or by user determination of Aliases, support for lambda aliases in the deployment management elements would aid in the standardisation & simplification of process.

Support for Lambda Layers

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Support for Lambda Layers in the ask cli deployment configuration to simplify the reuse of common components.

Expected Behavior

Support for Lambda Layers in the tooling would allow developers to reuse common lambda components, simplifying development and deployment tasks. The lack of such a feature is currently a deciding factor in use of the tooling.

Feature Request: Local Action Hook Scripts Support

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

Based on my understanding, the hooks scripts are being replaced by various types of deploy delegates to provision resources on AWS. This will certainly removes the need to use the AWS CLI to provision the necessary resources via the hooks scripts. However, this doesn't seem to provide a way to run local actions prior to deploying a skill.

I have been using the hooks scripts in some of my skill development to automatically update some code configuration locally, before being zipped up, and the skill manifest as well based on a set of environment variables. This allows to quickly switch environment when deploying code directly from repository.

If this ability is indeed no longer available in the next gen ASK CLI, would it be possible to still keep that support?

ask clone -s Command Hangs

When running the aws clone -s amzn1.ask.skill.fff, the command works however does not exit when complete. I must control-c to exit the process.

screen shot 2017-03-27 at 4 01 00 pm

Running node v4.3.2 on macOS Sierra 10.12.3

Intermittent Image upload failures

Image upload is failing sometimes with error :
message: 'The skill definition is not valid.'
violations: [ { message: 'Error parsing the image from given Url' } ]

Update model fails with large number of slot values

When updating a model that contains a slot with +34,000 values, the following error is returned:

at 'modelDefinition' failed to satisfy constraint: Member must have length less than or equal to 1000000'

I can reproduce this error very easily by calling update-model with the json that is returned from a call to get-model on our production skill.

Replay dialog with special commands support (like !quit)

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

This is a feature request originally reported from alexa/alexa-skills-kit-sdk-for-nodejs#505.

A brief description of the issue is: because the stopIntent doesn't promise the closure of skill session, supporting the special commands like !quit for --replay empowers users to control the lifecycle of skill session. This will further supports skill developers to manage session for each test case for integration test.

Expected Behavior

If ask-cli-x supports "dialog" command, and the same --reply feature, special commands should be supported.

Deploy Error - Locale Information Error

I receive the following error when trying to deploy after following the example Custom Skill Schema (https://github.com/amznlabs/ask-cli/wiki/Skill-Schemas).

-------------------- Update Skill Project -------------------- Call update-skill error. Error code: 400 { message: 'Validation failed with the following violations:[Locale information should be consistent through out the skill definition structure., Invalid list of countries of distribution]' }

Distribution countries block is:

"distributionCountries": [ "US" ]

Feature Request: Skill Events Endpoint Automated Deployment Support

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

At minimum, the skills events manifest endpoint URI should default to the skill Lambda function ARN if it is not defined, the same way than standard endpoints. Ideally, a CloudFormation outputs key (e.g. EventsEndpoint) could be used in the event of separate Lambda functions being deployed.

Current Behavior

Currently with ask-cli v1 or v2, the deployment fails because the SMAPI requires the actual skill events endpoint URI to be configured in the manifest. Therefore, the Lambda function handling these events needs to be deployed prior to deploying the skill with ask-cli.

Skill Manifest

[...]
    "events": {
      "endpoint": {},
      "subscriptions": [
        {
          "eventName": "SKILL_ENABLED"
        },
        {
          "eventName": "SKILL_DISABLED"
        }
      ]
    },
[...]

Error

$ askx deploy
==================== Deploy Skill Metadata ====================
[Error]: {
  "skill": {
    "resources": [
      {
        "action": "CREATE",
        "errors": [
          {
            "message": "Object instance at property path \"$.manifest.events.endpoint\" has missing required property: \"uri\"."
          }
        ],
        "name": "Manifest",
        "status": "FAILED"
      }
    ]
  },
  "status": "FAILED"
}

askx deploy missing functionality that's in ask: --target in ask deploy

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

I'm trying to deploy an Alexa skill using askx but it's missing the target option. I want to be able to deploy skill and model without deploying lambda.

Current Behavior

ask cli is able to target lambda, skill, isp, model, or all.

Steps to Reproduce (for bugs)

Possible Solution

Add full support for all options available in ask cli v1. (It's likely already on the roadmap.)

Your Environment and Context

Document AWS policy required for Lambda creation

I got an policy error when first trying to deploy new skill (see below). It would be helpful if the documentation for deploy and create lambda commands had reference to what policies are required on AWS account used for CLI.

+++
Creating Lambda function...
Get policy error.
AccessDenied: User: arn:aws:iam::123:user/xxdev is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::123:role/ask-lambda-xxskillname

Interaction Model Schema page needs update

The example schema in the documentation does not work as presented. Needs to be updated to at least:

{
"modelDefinition":
{
"types": [
{
"name": "LIST_OF_SIGNS",
"values": [
{
"name":
{
"value": "Aries"
}
},
{
"name":
{
"value": "Taurus"
}
}]
}],
"intents": [
{
"name": "GetHoroscope",
"slots": [
{
"name": "Sign",
"type": "LIST_OF_SIGNS"
},
{
"name": "Date",
"type": "AMAZON.DATE"
}],
"samples": [
"what is the horoscope for {Sign}",
"what will the horoscope for {Sign} be on {Date}",
"get me my horoscope",
"{Sign}"
]
}]
}
}

Deploy Update Multiple Regions Runtime Warning False Positive

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

No warning should be raised when deploying to multiple regions with a valid runtime.

Current Behavior

Using the latest v1 ask-cli, the below warning is generated when deploying to multiple regions with a runtime that includes an "x" in its version, such as nodejs10.x.

CLI Snapshot

$ ask deploy
[Warn]: Different lambda runtime found. CLI currently does not support this functionality. Developers should either work on their own hook scripts to build lambda for different language. Or use only one languages for the skill.

Profile for the deployment: [default]
-------------------- Update Skill Project --------------------
Skill Id: <skillId>
Skill metadata deploy finished.
Lambda deployment finished.
Lambda function(s) updated:
  [Lambda ARN] <naFunctionArn>
  [Lambda ARN] <euFunctionArn>
  [Lambda ARN] <feFunctionArn>
[Info]: No in-skill product to be deployed.
[Warn]: Skill api domain "smartHome" can not be enabled. Skipping the enablement.

Steps to Reproduce (for bugs)

  • Deploy skill to multiple regions with nodejs10.x runtime.
  • Warning will appear on the subsequent deploy update commands.

Possible Solution

This is my proposed bug fix as the v1 code is not available on this repository to open PRs against. Maybe it could be added to a dedicated branch?

--- lib/utils/hook-manager.js.orig    1985-10-26 04:15:00.000000000 -0400
+++ lib/utils/hook-manager.js     2020-01-08 14:58:00.267646038 -0500
@@ -124,7 +124,7 @@
         if (defaultConfig) {
             for (const lambda of defaultConfig) {
                 if (!runtime && lambda.runtime) {
-                    runtime = lambda.runtime.replace(/[^a-z]/gi, '');
+                    runtime = lambda.runtime.replace(/^([a-z]+)[0-9.x]+$/i, '$1');
                 } else if (lambda.runtime && !lambda.runtime.startsWith(runtime)) {
                     console.warn('[Warn]: Different lambda runtime found. CLI currently does not support this functionality. '
                     + 'Developers should either work on their own hook scripts to build lambda for different language. '

Your Environment and Context

  • ask-cli version: 1.7.20

Cannot read property 'skillId' of undefined

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

My project was upgraded from a V1 CLI project using the 'askx util upgrade-to-v2' command.

I am now attempting to deploy using the 'askx deploy' command.

Current Behavior

The output of askx deploy --debug is the following:

VOLLEY_FM $ askx deploy --debug
==================== Deploy Skill Metadata ====================
⠏ Uploading the entire skill package (it may take few minutes to build the skill metadata)...

-------------------- Debug Mode --------------------
[2019-12-21T20:02:50.437Z] - DEBUG - CREATE-UPLOAD
request-id: 33186391-4c8c-45b7-9736-dcb911a00e48
POST https://api.amazonalexa.com/v1/skills/uploads
status code: 201 Created

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0","content-length":0}

Response headers: {"content-type":"application/json","content-length":"419","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:29 GMT","x-amzn-requestid":"33186391-4c8c-45b7-9736-dcb911a00e48","x-amz-date":"Sat, 21 Dec 2019 20:03:29 GMT","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-amz-rid":"66N7BME4WYG3GS4H6KYW","x-cache":"Miss from cloudfront","via":"1.1 b8848f7d85efd91eade9002255af21c0.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"l--zpamoj047GAreO7JkAtvpGb8SkDHt1WY8xxrgTmS-kEoBpPmEgw=="}

Response body: "{"expiresAt":"1576962209079","uploadUrl":"https://skill-uploads-prod-na.s3.amazonaws.com/amzn1.ask-package.upload.7629ccac-22f9-438e-949d-92cbbe1bb48a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20191221T200329Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIA426DM2YLQ3VUZ6PO%2F20191221%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ab3907139c65088d9ca31d5b107a591b07e4013d2781b75d368c78a2327d68da\"}"

[2019-12-21T20:02:51.236Z] - DEBUG - UPLOAD-SKILL-PACKAGE
PUT https://skill-uploads-prod-na.s3.amazonaws.com/amzn1.ask-package.upload.7629ccac-22f9-438e-949d-92cbbe1bb48a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20191221T200329Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIA426DM2YLQ3VUZ6PO%2F20191221%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ab3907139c65088d9ca31d5b107a591b07e4013d2781b75d368c78a2327d68da
status code: 200 OK

Request headers: {"User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0","content-length":30962}

Request body: [object Object]

Response headers: {"x-amz-id-2":"Vq77JfY/CYiy3YhJTd0Z+lzdByAxZSz9VH/UwpdTrA9sfnKCfQf0Obmw+VA8p5B4Xi8bOTJ58t4=","x-amz-request-id":"F741B03FA22C2787","date":"Sat, 21 Dec 2019 20:03:30 GMT","x-amz-expiration":"expiry-date="Sun, 29 Dec 2019 00:00:00 GMT", rule-id="Clean up old uploads"","etag":""839cd53d9f0465baa313c649e61fa2d8"","content-length":"0","server":"AmazonS3","connection":"close"}

[2019-12-21T20:02:51.490Z] - DEBUG - IMPORT-PACKAGE
request-id: 0564b4ef-f7e1-47c6-b873-68c135f02282
POST https://api.amazonalexa.com/v1/skills/amzn1.ask.skill.f3fe4a05-efb1-4717-8dc3-1fbe755e54c7/imports
status code: 202 Accepted

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0","accept":"application/json","content-type":"application/json","content-length":390}

Request body: {"location":"https://skill-uploads-prod-na.s3.amazonaws.com/amzn1.ask-package.upload.7629ccac-22f9-438e-949d-92cbbe1bb48a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20191221T200329Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIA426DM2YLQ3VUZ6PO%2F20191221%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ab3907139c65088d9ca31d5b107a591b07e4013d2781b75d368c78a2327d68da"}

Response headers: {"content-type":"application/json","content-length":"2","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:30 GMT","x-amzn-requestid":"0564b4ef-f7e1-47c6-b873-68c135f02282","x-amz-date":"Sat, 21 Dec 2019 20:03:30 GMT","location":"/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825","x-amz-rid":"VYN0QMQCX7R0GRHD5BRE","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 9a75cc11971085fc36bff426f03899e0.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"AAeTpodG6c1knUSKcWlFpj2SsxfeAUWaUHnKcTbkqiUjYomPFNZilA=="}

Response body: {}

[2019-12-21T20:02:51.660Z] - DEBUG - GET-IMPORT-STATUS
request-id: 337d4f60-d6e2-4da2-b691-3b21bb3f794a
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:30 GMT","x-amzn-requestid":"337d4f60-d6e2-4da2-b691-3b21bb3f794a","x-amz-date":"Sat, 21 Dec 2019 20:03:30 GMT","x-amz-rid":"CC0QS9BQMRPEN2DVXT63","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 57b326460a798c60c06d0be01006b3d7.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"GYIAuYhv6rbMOp70DVDgwPZV8NkUJ8XYB5kniK-H8vbMYSgoirJ5Vg=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:02:53.837Z] - DEBUG - GET-IMPORT-STATUS
request-id: 8cae8ef7-98f2-4443-9412-a722a49ecf68
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:32 GMT","x-amzn-requestid":"8cae8ef7-98f2-4443-9412-a722a49ecf68","x-amz-date":"Sat, 21 Dec 2019 20:03:32 GMT","x-amz-rid":"SC540BJXMDV298QJ3HX6","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 107e6221a3918b7fdc812d78ae3e5448.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"1jIFTtsY551BkkXO4Dn8Kp-mgploUvWrRYjM0NQp-MrKci9KgbsTcA=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:02:56.204Z] - DEBUG - GET-IMPORT-STATUS
request-id: 1c79b346-24a0-4639-b909-f571da87e35f
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:34 GMT","x-amzn-requestid":"1c79b346-24a0-4639-b909-f571da87e35f","x-amz-date":"Sat, 21 Dec 2019 20:03:34 GMT","x-amz-rid":"PCFRKXPKSC3TK9K1CR3X","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 b6efbf009f233af7a7aa7da68e6e2849.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"1Zw-JXTSG2gCFASKqM8YD1px2hIiRhl4KFTA1gwDAsACKL8_OP1UcQ=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:02:58.871Z] - DEBUG - GET-IMPORT-STATUS
request-id: 52f52229-e319-4bc2-9f02-5d48f69e3d35
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:37 GMT","x-amzn-requestid":"52f52229-e319-4bc2-9f02-5d48f69e3d35","x-amz-date":"Sat, 21 Dec 2019 20:03:37 GMT","x-amz-rid":"7X3FJCBEG8SHSE0NX90A","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 3f72a8b28c744ea2f627e9f8a8ac8283.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"bIvJzOzjEmyjwZwdwYyARuabbzqUbzX5CtoS96r1y0hdQv_VhzSv7Q=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:01.721Z] - DEBUG - GET-IMPORT-STATUS
request-id: 118cf949-25ae-4ce2-8508-0b33db487bf2
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:40 GMT","x-amzn-requestid":"118cf949-25ae-4ce2-8508-0b33db487bf2","x-amz-date":"Sat, 21 Dec 2019 20:03:40 GMT","x-amz-rid":"X6Y2ZSHCYCXYMDSMS6KK","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 80677c288b4024a45c671874b4fa625a.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"dqaAao9dhiCr9PSMjrzhj9ZgXTp89zRWQbpgUrxAZDpxq4NYwy2vBg=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:04.867Z] - DEBUG - GET-IMPORT-STATUS
request-id: 265dbeef-54f7-4974-a3df-33646211aeb2
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:43 GMT","x-amzn-requestid":"265dbeef-54f7-4974-a3df-33646211aeb2","x-amz-date":"Sat, 21 Dec 2019 20:03:43 GMT","x-amz-rid":"TF6QRHVVSTCPCA321ECD","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 5b0ed724550233627ab2489397372008.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"Soa0DiGYHZ0ekesSL0wjz_KsbdefSGxeIdnj3nfoYHkAQWaFt_bB8w=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:08.258Z] - DEBUG - GET-IMPORT-STATUS
request-id: d1f8ace5-ea4f-4f2e-afb7-323c201667ea
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:46 GMT","x-amzn-requestid":"d1f8ace5-ea4f-4f2e-afb7-323c201667ea","x-amz-date":"Sat, 21 Dec 2019 20:03:46 GMT","x-amz-rid":"FGY9AHSD6H6NAAC1FKX7","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 6dda9c60465801404125720fa2c0e501.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"qptC30Rk5C0oSvReoiAtKe3CjQmJmUfn2cxR4MV3cA9a1E9GSIrjCA=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:11.976Z] - DEBUG - GET-IMPORT-STATUS
request-id: 4590890f-61fb-44c4-a83a-94170a6d6c58
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:50 GMT","x-amzn-requestid":"4590890f-61fb-44c4-a83a-94170a6d6c58","x-amz-date":"Sat, 21 Dec 2019 20:03:50 GMT","x-amz-rid":"1WGMCYNM4X7EGN4Q9WCN","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 0c9159c06691f6f55df2ceb396d9fd79.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"ZJykItnkLDQWmS46vsYe3tN-cCF_nTiUGYLwrFOtsRXg4WvIb2ycIA=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:16.047Z] - DEBUG - GET-IMPORT-STATUS
request-id: a605ea7b-2b4e-4b87-81e5-ef3d6cb7f2d3
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:54 GMT","x-amzn-requestid":"a605ea7b-2b4e-4b87-81e5-ef3d6cb7f2d3","x-amz-date":"Sat, 21 Dec 2019 20:03:54 GMT","x-amz-rid":"66K2TDZ58C2BAQ4J17MR","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 4b55539e55239f4c2ab64bc16c112d4f.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"6n2dVi7AMn_NX0WdA6Gdrvfg266EtjUgem5kfUxbnoQVv3pKaOu4yA=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:20.596Z] - DEBUG - GET-IMPORT-STATUS
request-id: cb145fde-45cb-47e0-94a0-6a11ff0060b3
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"24","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:03:59 GMT","x-amzn-requestid":"cb145fde-45cb-47e0-94a0-6a11ff0060b3","x-amz-date":"Sat, 21 Dec 2019 20:03:59 GMT","x-amz-rid":"KHBQ4KCPFM9DQHZ1XRT8","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 ee5a1fbfd85d9d25aef83ca16d91afcb.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"BGfajG22ILEdRDGMvOkqZgzycsXv6LyhyDANnz-C6DaLzgQM3qclAg=="}

Response body: "{"status":"IN_PROGRESS"}"

[2019-12-21T20:03:25.585Z] - DEBUG - GET-IMPORT-STATUS
request-id: 45492f1f-eda0-49b6-94e2-192bc252a1d0
GET https://api.amazonalexa.com/v1/skills/imports/amzn1.ask-package.import.60b355d0-20a4-41c6-97b7-331fe91f4825
status code: 200 OK

Request headers: {"Authorization":"","User-Agent":"ask-cli-x/0.6.0 Node/v10.16.3 Darwin/19.0.0"}

Response headers: {"content-type":"application/json","content-length":"22","connection":"close","server":"Server","date":"Sat, 21 Dec 2019 20:04:04 GMT","x-amzn-requestid":"45492f1f-eda0-49b6-94e2-192bc252a1d0","x-amz-date":"Sat, 21 Dec 2019 20:04:04 GMT","x-amz-rid":"E919DVW2FZJS3RYQ37N8","vary":"Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent","x-cache":"Miss from cloudfront","via":"1.1 0c9159c06691f6f55df2ceb396d9fd79.cloudfront.net (CloudFront)","x-amz-cf-pop":"MIA3-C1","x-amz-cf-id":"dYPw1w_nPQ6_DlG6sGk66Zy996xlkUh5wSIq0GG7mCg50SK1x5dy8g=="}

Response body: "{"status":"SUCCEEDED"}"

/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/controllers/skill-metadata-controller/index.js:147
callback(null, pollResponse.body.skill.skillId);
^

TypeError: Cannot read property 'skillId' of undefined
at _pollImportStatus (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/controllers/skill-metadata-controller/index.js:147:64)
at retryUtils.retry (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/controllers/skill-metadata-controller/index.js:298:86)
at async.doWhilst (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/utils/retry-utility.js:63:13)
at /Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/node_modules/async/dist/async.js:969:16
at next (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/node_modules/async/dist/async.js:3022:18)
at retryCall (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/utils/retry-utility.js:47:25)
at smapiClient.skillPackage.getImportStatus (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/controllers/skill-metadata-controller/index.js:294:17)
at _normalizeSmapiResponse (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/clients/smapi-client/index.js:152:21)
at _normalizeSmapiResponse (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/clients/smapi-client/index.js:172:5)
at httpClient.request (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/clients/smapi-client/index.js:151:17)
at Request.requestLib [as _callback] (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/lib/clients/http-client.js:54:16)
at Request.self.callback (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request. (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at IncomingMessage. (/Users/jmw/.nvm/versions/node/v10.16.3/lib/node_modules/ask-cli-x/node_modules/request/request.js:1083:12)

Your Environment and Context

  • ask-cli version: 0.6.0
  • Operating System and version: MacOS Catalina
  • Node.js version used for development: v10.16.3
  • NPM version used for development: 6.13.4

Fast Fail Invalid JSON - Feature Request

Would it be possible to put a JSON parser inside the CLI? It doesn't make sense to update the lambda and upload the new interaction model and then figure out there's an issue with the JSON payload.

How to get lambda function name of alexa hosted skill

I'm submitting a


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

A list of lambda functions under that account

Current Behavior

Currently, there is no way to get a list of lambda functions under my account. If there is I couldn't find it here.
I should be able to do ask lambda --list or ask lambda -l

Possible Solution

Add an option -l to ask lambda subcommand that will give a list of lambda functions with their arn(s).

Your Environment and Context

  • ask-cli version: 1.7.23
  • Operating System and version: macOS Catalina 10.15.2 (19C57)
  • Node.js version used for development: v10.16.0
  • NPM version used for development: 6.14.2
  • Python version: Python 3.8.2
  • pip version: pip 20.0.2

ASK CLI allows duplicate slot values

The ask deploy command allows slot values in the same slot type to be not unique where the EDW will error out with the same values (already deployed from CLI) and then saved.

Which is correct? Will the duplicate values be detrimental to ASR?

Skill ID: amzn1.ask.skill.ba970d7b-0bb9-407a-a2bc-130e42a0ae3d

BREAKING CHANGE if you have used our public beta ask-cli-x

If you haven't managed your Alexa skill using ask-cli-x (our beta program), you are not impacted by this. Please stop reading here.

Dear Alexa skill developers,

Thank you for using ask-cli-x, the beta version of ask-cli. Hope you have really enjoyed using it so far!

The v0.11.0 release will be a small breaking change to the Alexa skill project structure that ask-cli-x supports.

We will move all the CLI's cached data along with your resources' IDs into .ask/ask-states.json. The .ask/ folder under your skill project will be served as the folder to track ask-cli-x's states values.

More explicit information about this change:

field from old ask-resources.json move to .ask/ask-states.json (> v0.11.0)
profiles.{profile}.skillId profiles.{profile}.skillId
profiles.{profile}.skillMetadata.lastDeployHash profiles.{profile}.skillMetadata.lastDeployHash
profiles.{profile}.code.{region}.lastDeployHash profiles.{profile}.code.{region}.lastDeployHash
profiles.{profile}.skillInfrastructure.deployState profiles.{profile}.{deployerType}.skillInfrastructure.deployState

For users who use version below v0.11.0, there are two methods you can take to upgrade the structure:

  • If you want to keep the current skill project states values (i.e. your skillId and deployer's deployState), please change your skill project based on the table above.
  • Run "askx init" to re-link your resources into the new version of the ask-resources.json.
    • You will want to remember your skill-id, as the command wizard will ask you for the skillId.
    • You will also want to backup your deployState object, so that you won't need to re-create your AWS resources. To migrate this data, after the init command finishes, move the field by following the last row from the table above.

The reason for this change is: we've noticed that the ask-resources.json keeps changing whenever deploy happens. Those change will potentially influence your git user experiences if you track ask-resources.json file in your git. As an Alexa skill deployment tool, we recommend you including the ask-resources.json file into your git history as it stores how a project gets deployed.

Thanks for your understanding, please let us know anything that we can help for this migration.
ask-cli team

Support for Lambda Environment Variables in the ask configuration.


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

Support for Lambda Environment Variables would provided an additional level of flexibility and simplicity in both the deployment process and operational lifecycle, given the its typical to have different parameter values between development and production environments.

Custom templates from Git branch/tag and/or path

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

When creating a new project from a custom template I would like to be able to specify a branch/tag and/or path within the Git repository. This enables me to have various versions of a project template (when specifying a branch/tag) or multiple templates within a given repository (if specifying a path).

Current Behavior

Currently, ask new simply clones an entire repository from master and askx new clones an entire repository from the ask-cli-x branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.