Giter VIP home page Giter VIP logo

voxa-cli's People

Contributors

armonge avatar dependabot[bot] avatar grasela avatar lvelasquezm avatar matmunn avatar n1rna avatar omenocal avatar rmberrios avatar sandeshan avatar sloaisiga avatar snyk-bot avatar wuelcas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

voxa-cli's Issues

Move prettier to devDependencies

Currently prettier is requires as a dependency in the javascript template. Also, for some reason it's not in the typescript template? is it needed at all as a dependency?

Dialog intents must not be empty

Voxa-cli is adding the dialog and prompts properties for the Dialog directives when this feature is enabled, but if the skill is not registering any intent to the dialog interface, the array is empty and this is not allowed in the Alexa's model.

Screen Shot 2019-06-12 at 10 25 13 AM

"dialog": {
      "intents": [],
      "delegationStrategy": "SKILL_RESPONSE"
    },
    "prompts": []

Access user's location (Google Action)

We're currently working on implementing a PermissionsRequest in order to determine a departure location. We would like to be able to ask permission to the user to access his location.

Update outdated dependencies

Seems like there are some outdated ruby dependencies in the gemfile used for jekyll. Let's update those

gem "ffi", ">= 1.9.24"
gem "jekyll", ">= 3.7.4"
gem "rubyzip", ">= 1.2.2"

Issue when running local excel files

When using a file with valid locales for one platform but not for another one, 2 issues happen:

For Alexa, it tries to overwrite the invalid Alexa locales into en-US
For Dialogflow: the agent.json file gets corrupted

Allow marking a slot as required

Currently when running against a sheet for Dialogflow all slots are marked as not required.

I propose adding the ability to mark a slot as being required, possibly by using a column titled slotRequired or something similar.

`voxa interaction` crashing when empty tab

If for some reason theres an empty in an Office spredsheet tab the voxa interaction command crashes

$ npx voxa interaction
(node:17537) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at processBookData (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:100:36)
    at workbook.map.book (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:53:11)
    at Array.map (<anonymous>)
    at readFileCreateWorkbook (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:48:19)
    at arrayMap (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:639:23)
    at Function.map (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:9556:14)
    at interceptor (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:16993:35)
    at Function.thru (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:8797:14)
    at /home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:4374:28
    at arrayReduce (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:683:21)
    at baseWrapperValue (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:4373:14)
    at LodashWrapper.wrapperValue (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:9052:14)
    at Object.<anonymous> (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:91:6)
    at Generator.next (<anonymous>)
    at /home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/lib/src/connectors/Excel.js:7:71
    at new Promise (<anonymous>)
(node:17537) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:17537) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Invalid fields added to built-in Intents

When generating the languageModels, the field slots is added to built-in intents like:

{
  "name": "AMAZON.ScrollRightIntent",
  "samples": [],
  "slots": []
},
{
  "name": "AMAZON.PageUpIntent",
  "samples": [],
  "slots": []
},
{
  "name": "AMAZON.PageDownIntent",
  "samples": [],
  "slots": []
},
{
  "name": "AMAZON.MoreIntent",
  "samples": [],
  "slots": []
}

The Dev portal fixes this issue but we shouldn't generate invalid outputs

Downloads directory swapped from contentPath to viewsPath

It looks like within #105 the placement of download content was changed from contentPath to viewsPath — is this an intentional change? It had me thrown for a while after an update to Voxa CLI stopped some things updating.

It just seems to place download files in an odd place now:

- app
    - en-AU
        - my-download.json << downloads are here within a directory with the language only?
    - states
        - sample.states.js
    - synonyms
        - en-AU
            - list-of-...

It used to place them within the defined contentPath, which made a lot more sense!

Or could we have a downloadsPath option? So we can configure where these json files will go?

Wrong utterances in default intents

When using any language other than english the voxa-cli generates wrong utterances when using intents like AMAZON.NoIntent in dialogflow. That basically means when using de-DE your intent will have stuff like

  {
    "data": [
      {
        "text": "don't do it",
        "userDefined": false,
        "id": "21c0eac5-5704-5865-b24c-773b615cb456"
      }
    ],
    "isTemplate": false,
    "count": 0,
    "updated": 0
  },
  {
    "data": [
      {
        "text": "no thanks",
        "userDefined": false,
        "id": "3662bc9a-4388-5aa6-a840-26345d803cd5"
      }
    ],
    "isTemplate": false,
    "count": 0,
    "updated": 0
  }

Can't add integers in Publishing information

While trying to use the voxa cli to generate an alexa publishing information json i realized that it's not possible to use numbers cause they always become strings in the generated json

Example:

value key
HUB alexa.apis.custom.interfaces[0].supportedViewports[0].mode
ROUND alexa.apis.custom.interfaces[0].supportedViewports[0].shape
480 alexa.apis.custom.interfaces[0].supportedViewports[0].minWidth
480 alexa.apis.custom.interfaces[0].supportedViewports[0].maxWidth
480 alexa.apis.custom.interfaces[0].supportedViewports[0].minHeight
480 alexa.apis.custom.interfaces[0].supportedViewports[0].maxHeight

Expected:

 {
  "supportedViewports": [
    {
      "mode": "HUB",
      "shape": "ROUND",
      "minWidth": 480,
      "maxWidth": 480,
      "minHeight": 480,
      "maxHeight": 480
    }
  ]
}

Actual:

{
  "supportedViewports": [
    {
      "mode": "HUB",
      "shape": "ROUND",
      "minWidth": "480",
      "maxWidth": "480",
      "minHeight": "480",
      "maxHeight": "480"
    }
  ]
}

Creating a new project is crashing when voxa is installed globally

Seems like the package maybe doesn't include the typescript interaction.json template ?

$ npm install --global https://github.com/VoxaAI/voxa-cli
/home/armonge/.nvm/versions/node/v10.15.3/bin/voxa -> /home/armonge/.nvm/versions/node/v10.15.3/lib/node_modules/voxa-cli/bin/voxa.js
+ [email protected]
added 441 packages from 422 contributors in 78.905s
$ voxa
Usage: voxa create

Options:
  -v, --version          output the version number
  -h, --help             output usage information

Commands:
  interaction [options]  create a interaction.json
  init                   create a new interaction.json
  create                 Create a Voxa app
$ voxa create
? Please enter the name of your app sample
? Please enter your name/company armonge
? Which platform will the app use? Amazon Alexa
? Choose a language Typescript
? Will you use Voxa-CLI to generate the interacion model and publishing information? Yes
? Will you use the Canfulfill intent? No
? Will you use DynamoDB to save user's info? No
? Will you use Account Linking? Yes
? What analytics will you be using for this app?(Hit Enter to skip this) Dashbot
{ [Error: ENOENT: no such file or directory, stat '/home/armonge/.nvm/versions/node/v10.15.3/lib/node_modules/voxa-cli/templates/typescript/interaction.json']
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path:
   '/home/armonge/.nvm/versions/node/v10.15.3/lib/node_modules/voxa-cli/templates/typescript/interaction.json' }
Something went wrong, try again

Interactions.json documentation

Hello, we've been following the documentation for both Voxa and Voxa-cli in order to make a simple test bot running, but without any results.

We were able to make the full deploy up to the creation of the lambda functions on aws. But now we would like to know how to connected everything together and how to test the bot.

Can you please point me in the right direction?

Thank you.

General skill information can't generate objects properly

Using a sheet setup like this:
image

ends up generating an agent configuration that looks like this:

  "defaultTimezone": "Australia/Melbourne",
  "webhook": [
    {
      "url": "https://example.org"
    },
    {
      "username": "foo"
    },
    {
      "password": "bar"
    },
    {
      "available": true
    },
    {
      "useForDomains": true
    },
    {
      "cloudFunctionsEnabled": false
    },
    {
      "cloudFunctionsInitialized": false
    }
  ],

Instead of assigning keys to a webhook object an array is created that has objects with a single property each.

Would you be interested in a PR to fix this behaviour?

voxa-cli only works with node 8

voxa-cli it's only working with node 8. If I use the command
npx voxa create

to generate a new project I get this error (when not using node 8)

Error: ENOENT: no such file or directory, open '/pathToTheProject/node_modules/voxa-cli/templates/typescript/.gitignore'

README.md is ambiguos

On the project local README it says Create a src/config/local.json file and customize it for your local setup, you can use src/config/local.example.json suggesting to use local.example.json from the src/config directory if the user doesn't want to create the local.json, but on the config/index.js file never verifies if local.json exists.

Here is the snapshot of the config/index.js file

const path = require("path");
const env = process.env.NODE_ENV || "local";

const configFile = require(path.join(__dirname, `${env}.json`));

A better solution will be to use by default the local.example.json

This is the output of the console after running the project without having created the local.json file

image

Local spreadsheets don't work

Using local spreadsheets causes errors with generating paths:

(node:9345) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at assertPath (path.js:39:11)
    at Object.join (path.js:1152:7)
    at builtIntents.intentsByPlatformAndEnvironments.map (/Users/mat/voxa-test/node_modules/voxa-cli/src/DialogflowSchema.ts:312:20)
    at Array.map (<anonymous>)
    at DialogflowSchema.buildIntent (/Users/mat/voxa-test/node_modules/voxa-cli/src/DialogflowSchema.ts:267:58)
    at DialogflowSchema.build (/Users/mat/voxa-test/node_modules/voxa-cli/src/DialogflowSchema.ts:83:10)
    at schema.invocations.map.invoc (/Users/mat/voxa-test/node_modules/voxa-cli/src/InteractionBuilder.ts:153:18)
    at Array.map (<anonymous>)
    at schemas.reduce (/Users/mat/voxa-test/node_modules/voxa-cli/src/InteractionBuilder.ts:152:28)
    at Array.reduce (<anonymous>)
    at Object.<anonymous> (/Users/mat/voxa-test/node_modules/voxa-cli/src/InteractionBuilder.ts:142:6)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/mat/voxa-test/node_modules/voxa-cli/lib/src/InteractionBuilder.js:4:58)

It seems that the node-xlsx module is returning a bunch of empty cells

Utterance samples of intents with yes/no change to true/false

It seems to be a part of a change to support Office 365, but in /src/connectors/utils.ts it looks like values of "yes" and "no" are changed to true and false?

When we have "yes" and "no" in our Google spreadsheet as responses to YesIntent and NoIntent, they get replaced when imported in... which isn't desired!

Any info on why this functionality has specifically been put in there? Am I missing something?

Thanks!

Add .gitignore to templates

Currently, we're generating a project (both javascript and typescript) without a .gitignore, causing a bad experience when initializing git on the project with the node_modules folder and other stuff. We need to add that file so it's generated by the voxa-cli

Update .nvmrc

The javascript project template has an .nvmrc file with version v8.10, probably should update to version 10, which is the latest supported by AWS Lambda. Also, the typescript project has no .nvmrc at all.

Perhaps find a way to share more of this between the 2 templates? Also, would be really cool if we could have custom templates like the ask-cli already has, even perhaps create voxa template for the ask-cli ?

npx voxa-cli interaction causes an uncaught promise

Running npx voxa-cli interaction results in an uncaught promise:

 $ npx voxa-cli interaction
npx: installed 213 in 9.978s
timeframe: 2136.128ms
(node:5637) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
    at sanitizeView (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:66:8)
    at _.chain.reduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:96:21)
    at arrayReduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:683:21)
    at Function.reduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:9683:14)
    at /Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:4374:28
    at arrayReduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:683:21)
    at baseWrapperValue (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:4373:14)
    at LodashWrapper.wrapperValue (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:9052:14)
    at voxaSheetsViews.map (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:107:8)
    at Array.map (<anonymous>)
    at Object.viewsProcessor (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:77:26)
    at new Schema (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Schema.ts:42:18)
    at new DialogflowSchema (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/DialogflowSchema.ts:56:5)
    at Object.<anonymous> (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/InteractionBuilder.ts:109:20)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/lib/src/InteractionBuilder.js:4:58)
(node:5637) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5637) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It doesn't seem like IVoxaSheet.data is checking if it has a value property defined before running it through the sanitizeView function.

Directory creation for new project is not asked to the user

I created a directory before creating a new project with voxa-cli and wanted to used it as my working directory. Sadly I wasn't ask If I wanted to use my current directory for my new project. I believe this could be a great improvements for not having nested directory for a project

Template Package versions are outdated

After creating a new project with the voxa cli some of the included packages are outdated and npm complains there's 7 vulnerability issues. Please update those dependencies in the template

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.