Giter Club home page Giter Club logo

jovo-cli's People

Contributors

aswetlow avatar dependabot[bot] avatar digitalica avatar fboerncke avatar fgnass avatar florianhollandt avatar github-actions[bot] avatar igx89 avatar janober avatar kaankc avatar kristathecoder avatar m-ripper avatar mderrien29 avatar rmtuckerphx avatar rtgoodwin avatar rubenaeg avatar sadlowskij avatar stephen-wilcox avatar tedmiston avatar thebenforce avatar wahidshafique 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jovo-cli's Issues

adm-zip in package.json is out-of-date and has a security vulnerability

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

npm audit reports no security vulnerabilities

Current Behavior

npm audit reports that adm-zip has a "high" severity vulnerability, which was patched in adm-zip 0.4.9.
The current version of adm-zip in package.json is 0.4.7.

Error log

                   === npm audit security report ===


                             Manual Review
         Some vulnerabilities require your attention to resolve

      Visit https://go.npm.me/audit-guide for additional guidance

High Arbitrary File Write via Archive Extraction

Package adm-zip

Patched in >=0.4.9

Dependency of jovo-cli [dev]

Path jovo-cli > adm-zip

More info https://nodesecurity.io/advisories/681

Low Prototype Pollution

Package lodash

Patched in >=4.17.5

Dependency of jovo-cli [dev]

Path jovo-cli > vorpal > inquirer > lodash

More info https://nodesecurity.io/advisories/577

found 2 vulnerabilities (1 low, 1 high) in 3884 scanned packages
2 vulnerabilities require manual review. See the full report for details.

Your Environment

  • Jovo CLI version used: 1.2.5

I would be glad to update adm-zip in package.json, but first wanted to make sure that isn't expected to cause any issues with the project.

Feature: build skill.json / agent.json from app.json

We currently .gitignore the whole /platforms folder and consider /models to be our single source of truth. Unfortunately this approach is currently not really feasible since some files (skill.json, agent.json, .ask/config) must be manually maintained. Our current solution is to copy/create these files as part of our npm run build script. Would you be open to the idea to generate these files from app.json?

Shows old invocation name on jovo build -p alexaSkill --deploy

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

After changing the invocation name inside the models/en-US.json file and running the jovo build -p alexaSkill --deploy command, it should display the new invocation name here:

jovo build -p alexaSkill --deploy

   โˆš Updating /platforms/alexaSkill
     โˆš Updating Alexa project files
       โˆš skill.json
     โˆš Updating Alexa Interaction Model based on Jovo Language Model in /models
       โˆš en-US
   โˆš Deploying
     โˆš Deploying Alexa Skill
       โˆš Updating Alexa Skill project for ASK profile default
         Skill Name: xxxxx
         Skill ID: xxxxxxxx
         Invocation Name: new invocation name(en-US)
         Endpoint: xxxxx
       โˆš Deploying Interaction Model, waiting for build
         โˆš en-US

Current Behavior

It shows the old invocation name:

jovo build -p alexaSkill --deploy

   โˆš Updating /platforms/alexaSkill
     โˆš Updating Alexa project files
       โˆš skill.json
     โˆš Updating Alexa Interaction Model based on Jovo Language Model in /models
       โˆš en-US
   โˆš Deploying
     โˆš Deploying Alexa Skill
       โˆš Updating Alexa Skill project for ASK profile default
         Skill Name: xxxxx
         Skill ID: xxxxxxxx
         Invocation Name: old invocation name(en-US)
         Endpoint: xxxxx
       โˆš Deploying Interaction Model, waiting for build
         โˆš en-US

Error log

-

Your Environment

  • Jovo CLI version used: 1.2.5
  • Operating System: Windows 10

Reserved characters not removed when generating Dialogflow v2 entity value synonyms

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Steps to Reproduce

  1. Create an input type with a value that contains parentheses. For example:
{
	"name": "LOCATION_LIST",
	"values": [
		{
			"value": "Crosstown (Eden Prairie)",
			"synonyms": [
				"Crosstown"
			]
		}
	]
}
  1. Do a build and deploy to Dialogflow v2 using Restore From Zip

Expected Behavior

No error message when restoring from zip in the Dialogflow console, and a value named "Crosstown (Eden Prairie)" with synonyms "Crosstown Eden Prairie" and "Crosstown" under the LOCATION_LIST entity in Dialogflow.

Current Behavior

The error message Error parsing Entity 'LOCATION_LIST': Syntax Error in input 'Crosstown (Eden Prairie)'. Incorrect token '(' at position 10. Brackets can only be used with parameterized entities. is shown and continues to show when I attempt to save the model. There's also a value named "Crosstown (Eden Prairie)" with synonyms "Crosstown (Eden Prairie)" and "Crosstown" under the LOCATION_LIST entity in Dialogflow. Voice training never happens.

See https://stackoverflow.com/questions/50037978/dialogflow-adding-entity-values-with-brackets for a little more details on this issue. The parenthesis, characters not allowed in entity reference value synonyms in Dialogflow, basically just need to be removed when building.

Lambda deploy skipped even with correct config set

I'm submitting a...

  • [ x] Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Lambda should get deployed to aws account and new changes should start showing up in tests.

Current Behavior

As of now it skips the lambda deploy. I have valid aws creds in system aws config as well as in env variables.

Error log

$ jovo deploy -p googleAction

[15:18:00] Deploying Google Action [started]
[15:18:00] Creating file /googleAction/dialogflow_agent.zip [started]
[15:18:00] Creating file /googleAction/dialogflow_agent.zip [skipped]
[15:18:00] โ†’ Info: Language model: en-US
Fulfillment Endpoint: arn:aws:lambda:us-east-1:xxx:function:jovo-top-charts
[15:18:00] Uploading and restoring agent for project topcharts-8dc1a [started]
[15:18:05] Uploading and restoring agent for project topcharts-8dc1a [completed]
[15:18:05] Training started [started]
[15:18:06] Training started [completed]
[15:18:06] Uploading to lambda [started]
[15:18:13] Uploading to lambda [skipped]
[15:18:13] โ†’ Info: Deployed to lambda function: arn:aws:lambda:us-east-1:xxx:function:jovo-top-charts
[15:18:13] Deploying Google Action [completed]

  Deployment completed.

Your Environment

  • Jovo CLI version used: 1.1.14
  • Operating System: windows 8

Timout error on request

Every time I do jovo run and then use amazon dev console to test the skill, I get this:

This is your webhook url: https://webhook.jovo.cloud/... my webhook id would go here
Example server listening on port 3000!
Timeout error: No response after 5000 milliseconds
Unhandled Rejection at: Promise Promise {
  <rejected> { Error: socket hang up
    at createHangUpError (_http_client.js:335:15)
    at Socket.socketCloseListener (_http_client.js:367:23)
    at Socket.emit (events.js:132:15)
    at Socket.emit (domain.js:421:20)
    at TCP._handle.close [as _onclose] (net.js:550:12) code: 'ECONNRESET' } } reason: { Error: socket hang up
    at createHangUpError (_http_client.js:335:15)
    at Socket.socketCloseListener (_http_client.js:367:23)
    at Socket.emit (events.js:132:15)
    at Socket.emit (domain.js:421:20)
    at TCP._handle.close [as _onclose] (net.js:550:12) code: 'ECONNRESET' }
Timeout error: No response after 5000 milliseconds
Unhandled Rejection at: Promise Promise {
  <rejected> { Error: socket hang up
    at createHangUpError (_http_client.js:335:15)
    at Socket.socketCloseListener (_http_client.js:367:23)
    at Socket.emit (events.js:132:15)
    at Socket.emit (domain.js:421:20)
    at TCP._handle.close [as _onclose] (net.js:550:12) code: 'ECONNRESET' } } reason: { Error: socket hang up
    at createHangUpError (_http_client.js:335:15)
    at Socket.socketCloseListener (_http_client.js:367:23)
    at Socket.emit (events.js:132:15)
    at Socket.emit (domain.js:421:20)
    at TCP._handle.close [as _onclose] (net.js:550:12) code: 'ECONNRESET' }

Not really sure what this is about. I'm running node 9.6.1 and jovo-cli 1.0.4. My skill does make a http get request, but even if I comment all of that out and uninstall the package for that (node-rest-client), I still get this. I'm new to jovo, so I don't have any examples of this working before.

Automated Expansion Jovo CLI 1.2.0

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

I updated the documentation for automatedExpension for dialogflow entities and it was working well on Jovo CLI 1.1.11.
But I recently update to Jovo CLI 1.2.0 and the result of automatedExpension is not working anymore.

Jovo CLI 1.1.11 :

"inputTypes": [
    {
        "name": "myCityInputType",
	"dialogflow": {
        	"automatedExpansion": true
      	},
        "values": [
            {
                "value": "Berlin"
            },
            {
                "value": "New York",
                "synonyms": [
                    "New York City"
                ]
            }
        ]
    }
]

You will have this result :

{
	"name": "myCityInputType",
	"isOverridable": true,
	"isEnum": false,
	"automatedExpansion": true
}

But in Jovo CLI 1.2.0 you will have :

{
	"name": {
		"automatedExpansion": true
	},
	"isOverridable": true,
	"isEnum": false,
	"automatedExpansion": true
}

automatedExpansion gets the good value but the name gets also this value instead of its name...

Your Environment

  • Jovo Framework version used: 1.4.1
  • Jovo CLI : 1.2.0
  • Operating System: Mac OS

Deploying to aws zips the entire project directory rather than the required modules/directories (or an artifact generated by the build command)

When executing jovo deploy with a target of lambda (or all), then the zip file that is uploaded to the aws lambda includes all files in the directory (including any artifacts created in the build (and deploy) process for alexa or google assistant).

Ideally, the build command jovo build would support the "building" of lambda zip file artifacts. This could be the bare basic of zipping the files required for the lambda (and it's dependencies). The deploy command jovo deploy would then deploy this zip file to the lambda.

TypeError: _.get is not a function

I'm submitting a...

  • Bug report

Current Behaviour

I am usually using jovo-cli globally and have no issues.
I wanted to have the jovo-cli run from the project folder to use VS Code debugger.
When I install jovo-cli in dev dependencies, the server won't run with jovo run.

Error log

TypeError: _.get is not a function
    at Project.getStage (/Users/MyProject/node_modules/jovo-cli-core/dist/src/Project.js:360:19)
    at CommandInstance.vorpalCommand.action (/Users/MyProject/node_modules/jovo-cli/dist/commands/run.js:49:31)
    at <anonymous>
 Unhandled Rejection at: Promise Promise {
  <rejected> Error: true
    at Vorpal.<anonymous> (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:168:17)
    at callback (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:830:22)
    at /Users/MyProject/node_modules/vorpal/dist/vorpal.js:961:7
    at Session._commandSetCallback (/Users/MyProject/node_modules/vorpal/dist/session.js:440:5)
    at Session.session.completeCommand (/Users/MyProject/node_modules/vorpal/dist/session.js:520:12)
    at onCompletion (/Users/MyProject/node_modules/vorpal/dist/session.js:450:10)
    at /Users/MyProject/node_modules/vorpal/dist/session.js:481:7
    at <anonymous> } reason: Error: true
    at Vorpal.<anonymous> (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:168:17)
    at callback (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:830:22)
    at /Users/MyProject/node_modules/vorpal/dist/vorpal.js:961:7
    at Session._commandSetCallback (/Users/MyProject/node_modules/vorpal/dist/session.js:440:5)
    at Session.session.completeCommand (/Users/MyProject/node_modules/vorpal/dist/session.js:520:12)
    at onCompletion (/Users/MyProject/node_modules/vorpal/dist/session.js:450:10)
    at /Users/MyProject/node_modules/vorpal/dist/session.js:481:7
    at <anonymous>
Unhandled Rejection at: Promise Promise {
  <rejected> Error: true
    at Vorpal.<anonymous> (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:168:17)
    at callback (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:830:22)
    at /Users/MyProject/node_modules/vorpal/dist/vorpal.js:961:7
    at Session._commandSetCallback (/Users/MyProject/node_modules/vorpal/dist/session.js:440:5)
    at Session.session.completeCommand (/Users/MyProject/node_modules/vorpal/dist/session.js:520:12)
    at onCompletion (/Users/MyProject/node_modules/vorpal/dist/session.js:450:10)
    at /Users/MyProject/node_modules/vorpal/dist/session.js:481:7
    at <anonymous> } reason: Error: true
    at Vorpal.<anonymous> (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:168:17)
    at callback (/Users/MyProject/node_modules/vorpal/dist/vorpal.js:830:22)
    at /Users/MyProject/node_modules/vorpal/dist/vorpal.js:961:7
    at Session._commandSetCallback (/Users/MyProject/node_modules/vorpal/dist/session.js:440:5)
    at Session.session.completeCommand (/Users/MyProject/node_modules/vorpal/dist/session.js:520:12)
    at onCompletion (/Users/MyProject/node_modules/vorpal/dist/session.js:450:10)
    at /Users/MyProject/node_modules/vorpal/dist/session.js:481:7
    at <anonymous>

Your Environment

  • Jovo CLI version used: 2.0.6
  • Operating System: MacOS 10.14.1

Complex 'slots' (entities) returned from Dialogflow use 'key' property?

I'm standing up a simple app using Dialogflows @sys.location, which can return a multi-property entity result:
Check [email protected] here:
https://dialogflow.com/docs/reference/system-entities#geography

What I am getting as an object out of jovo.getInput('location') looks a little strange:

{
  name: 'location',
  key: {
    'street-address': 'john st',
    'subadmin-area': 'Rydalmere'
  },
  value: 'john st rydalmere',
  id: <same as key>
}

Is that format of the 'key' property object intentional, or is something weird going on?
... Could be intentional... (I'll ignore the 'id' property with same value...)
... Just want to know if it's going to change under me...

Anyway, couldn't see the 'key' prop documented anywhere. I don't like to use things I can't see documented...

Note that the data in the Dialogflow's inbound [request].queryResult.parameters is pretty obvious:
(Though missing the full text transcript thereof. That's in [request].queryResult.queryText)

{
  "location": {
    "street-address": "john st",
    "subadmin-area": "Rydalmere"
  }
},

Jovo CLI commands not terminating on build server

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Running CLI commands (like build, deploy, etc.) on build server should succeed and terminate.

Current Behavior

CLI commands aren't terminating. For instance, running jovo build succeeds and then says Build completed but the node process never terminates. I haven't found a way to reproduce it locally yet, but it happens every time on our build server (Atlassian Bamboo, both Linux and Bamboo agents running Node.js 8). The -v command does terminate fine however.

Your Environment

  • Jovo CLI version used: 1.2.5
  • Operating System: Windows + Linux

app.json filename conflicts with Heroku's app.json

The naming of the app.json file as used by jovo conflicts with Heroku's app.json file, which has very different configuration options specified. Can jovo support alternate paths to this file? Perhaps ${projectDir}/jovo-app.json or ${projectDir}/.jovo/app.json or similar. I'm also open to needing to specify a file for each run command, like --config jovo-app.json

pt-BR model create only pt and not pt-BR on Dialogflow

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

When deploying a pt-BR model to Dialogflow it should deploy strictly pt-BR, or at least, provide an option to do it this way.

Current Behavior

Deploying a model in pt-BR leads to a pt model in Dialogflow instead of pt-BR. The problem is that the Actions on Google simulator, for example, does not support pt only pt-BR. This behavior is caused by the pieces of code listed below.

dialogflowUtil.js lines 141-144

if (findings.length === 1) {
    delete supportedLanguages[locale.toLowerCase()];
    supportedLanguages[locale.toLowerCase().substr(0, 2)] = '';
}

dialogFlowAgent.js lines 308-310

if (primLanguage.length === 1) {
    outputLocale = this.config.locale.substr(0, 2);
}

I think I understood the purpose of these behaviors, makes a lot of sense for English off course. But for Portuguese, it think it is more complex. Brazilian Portuguese is far more adopted by platforms and is the only option available on Actions on Google simulator which leads to an error when trying to use European Portuguese on it.

Error log

If you have an error log, please paste it here.

Your Environment

  • Jovo CLI version used: 1.2.1
  • Operating System: macOS High Sierra 10.13.4

Interfaces node gets clobbered from skill.json after jovo build with stages

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Allow specifying the interfaces node in skill.json and have it not be removed when doing a build and using the stages feature.

Current Behavior

Using the stages feature specifying different endpoints. If my skill.json file has an interfaces node like this:

app.json

"stages": {
    "debug": {
      "endpoint": "https://xyz-ABC.bespoken.link",
      "alexaSkill": {
        "skillId": "amzn1.ask.skill.4..."
      }
    },

skill.json (before)

        "apis": {
            "custom": {
                "endpoint": {
                    "sslCertificateType": "Wildcard",
                    "uri": "https://xyz-ABC.bespoken.link"
                },
                "interfaces": [
                    {
                        "type": "RENDER_TEMPLATE"
                    }
                ]
            }
        },

And then I do a build like the following, the interfaces node is clobbered/removed:

jovo build -p alexaSkill --stage debug

skill.json (after)

        "apis": {
            "custom": {
                "endpoint": {
                    "sslCertificateType": "Wildcard",
                    "uri": "https://xyz-ABC.bespoken.link"
                }
            }
        },

Error log

None

Your Environment

  • Jovo CLI version used: 1.1.6
  • Operating System: Windows 10

Unable to reverse and rebuild on google platform

I started a new agent on Dialogflow v2 recently, and I choose jovo framework to build and deploy my agent easily.

When my agent was done I exported it, and then placed it into the platform folder to generate the {local}.json (by using jovo build --platform googleAction --reverse). Then I built it, and deployed it in Dialogflow (with jovo build --platform googleAction --deploy).
But that broke my agent, all my intent that used an entity was no longer recognizing them. I went in the platform folder and the file changed, especially the files {intent}usersays{local}.json : the word defined by the user (which are my entities) are still separated from the others, but no longer have the fields "alias" and "meta", for exemple :

  {
    "id": "   .   .   .   ",
    "data": [
      {
        "text": "My name is ",
        "userDefined": false
      },
      {
        "text": "Jason",
        "alias": "name",
        "meta": "@name",
        "userDefined": true
      }
    ],
    "isTemplate": false,
    "count": ....,
    "updated": ...
  },

became :

  {
    "data": [
      {
        "text": "My name is ",
        "userDefined": false
      },
      {
        "text": "Jason",
        "userDefined": true
      }
    ],
    "isTemplate": false,
    "count": ....,
  },

I understand that by replacing "Jason" by "name" it should works, but I don't really want to replace all the names, or numbers in my intents by "name" and "number" (I think it is easier to read an intent as : "My name is jason", than : "My name is name", and more understandable for someone who will have to change it, or add more example).

My question is : is it really needed to change all my entities values in my intents by their name, and if so shouldn't the jovo build --platform googleAction --reverse automatically replace them ?

"node index.js" doesn't run server as advertised

Hi guys.
The doco here: https://www.jovo.tech/framework/docs/cli#jovo-run

Suggests that "node index.js" is an "alternative" to 'jovo run'.

But for me "node index.js" just immediately exits, silently.

Looking at a 'ps af', the command line ultimately running under 'jovo run' is:
node ./index.js --ignore db/* --webhook --jovo-webhook

Running that commandline does run the service, but it doesn't put the 'webhook.jovo.cloud' tunnelling proxy in place (I assume that's handled by the 'jovo' CLI)

What I am trying to do is run my webhook under the vscode debugger.

What would make that really easy is two suggestions:

  1. A jovo CLI command to just run the default proxy. (I assume it works a lot like ngrok...)
  2. More accurate doco on how to really run the local default web service. i.e. Not "node index.js" which doesn't seem to work as advertised.

Thanks guys!

Convert entities from model to alexa/googleAction with id

I'm submitting a...

  • [ x] Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

I don't know if it's a bug or something is missing is the doc but I don't find the good way to write an inputTypes for alexa/DF with id

Expected Behavior

Current inputType isn't convert correctly for alexa/dialogflow
"inputTypes": [ { "name": "Prenom", "values": [ { "id": "p1", "value": "Gabriel" } ]}]
For alexa I will have the current type:

"values": [ { "id": "p1", "name": { "value": "Gabriel" } } ]
For DF I should expect to get
{ "value": "p1", "synonyms": [ "Gabriel" ] },

Current Behavior

For DF:
{ "value": "Gabriel", "synonyms": [ "Gabriel" ] },

If I want to have the id p1 in DF, I need to structure the model like this:
{ "id": "p1", "value": "p1", "synonyms": ["Gabriel"] },
then DF entites will have following structure which is not really optimize

"value": "p1", "synonyms": [ "p1", "Gabriel" ]
and alexa
{ "id": "p1", "name": { "value": "p1", "synonyms": [ "Gabriel" ] } }

Jovo CLI Version: 1.2.0

Cannot upload to lambda in Windows command prompt

This is what I get when I try to build/deploy using an arn endpoint:

E:\repo\<removed>>jovo build --stage dev --deploy

   โˆš Updating /platforms/alexaSkill
     โˆš Updating Alexa project files
       โˆš skill.json
     โˆš Updating Alexa Interaction Model based on Jovo Language Model in /models
       โˆš en-US
   > Deploying
     > Deploying Alexa Skill
       โˆš Updating Alexa Skill project for ASK profile default
         Skill Name: <removed> (en-US)
         Skill ID: amzn1.ask.skill.<removed>
         Invocation Name: <removed> (en-US)
         Endpoint: arn:aws:lambda:us-east-1:<removed>:function:<removed>
       โˆš Deploying Interaction Model, waiting for build
         โˆš en-US
       ร— Uploading to lambda
         -> File access error. Error: ENOENT: no such file or directory, access 'E:\repo\<removed>"'
{ Error: File access error. Error: ENOENT: no such file or directory, access 'E:\repo\<removed>"'
    at Object.getAskError (C:\Users\<removed>\AppData\Roaming\npm\node_modules\jovo-cli\helper\alexaUtil.js:761:16)
    at C:\Users\<removed>\AppData\Roaming\npm\node_modules\jovo-cli\helper\alexaUtil.js:735:44
    at ChildProcess.exithandler (child_process.js:282:5)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  context:
   { locales: [ 'en-US' ],
     type: [ 'alexaSkill' ],
     projectId: undefined,
     endpoint: 'jovo-webhook',
     target: 'all',
     src: 'E:\\repo\\<removed>\\',
     stage: 'dev',
     askProfile: 'default',
     skillId: 'amzn1.ask.skill.<removed>',
     lambdaArn: 'arn:aws:lambda:us-east-1:<removed>:function:<removed>' } }

But the same thing works just fine in Ubuntu For Windows 10. (Or at least it says it does, green symbol and no errors.)

As you may notice, there is an extra double-quote at the end of the file path.

Feature: Add command to build an optimized lamda bundle

As mentioned in #10 we use the following workflow to keep the lamda function as small as possible:

#!/bin/bash

set -e
mkdir -p platforms/lambda
cp -r app index.js package.json platforms/lambda

# exclude tests, snapshots and fixtures:
rm -rf platforms/lambda/app/__*

cd platforms/lambda
npm i --production

cd ../../
jovo deploy -t lambda --src platforms/lambda

This way all dev-dependencies, tests, models and platform specific files are excluded from the bundle. It would be great if jovo-cli provided a similar functionality out of the box.

jovo deploy to lambda fails when connected via a corporate proxy

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

$>jovo deploy --target lambda

โˆš Deploying Alexa Skill
โˆš Uploading to lambda
Deployed to lambda function: arn:aws:lambda:...function:helloworld

Deployment completed.

Current Behavior

$>jovo deploy --target lambda

Deploying Alexa Skill
ร— Uploading to lambda
-> connect ECONNREFUSED 63.32.73.187:443

connect ECONNREFUSED 63.32.73.187:443

Your Environment

Connection to Internet via a corporate proxy.
Environment variables http_proxy, https_proxy configured.

  • Jovo CLI version used: 1.2.11
  • Operating System: windows 7, ..

=>jovo-cli/alexaUtils.js uses aws-sdk method lambda UpdateFunctionCode.
aws-sdk guide: https://docs.aws.amazon.com/en_us/sdk-for-javascript/v2/developer-guide/node-configuring-proxies.html

alexaUtils.js:
//my fix to solve the problem:
const proxy = require('proxy-agent');
var proxyServer = process.env.http_proxy ||
process.env.HTTP_PROXY ||
process.env.https_proxy ||
process.env.HTTPS_PROXY;
if (proxyServer) {
AWS.config.update({
httpOptions: {
agent: proxy(proxyServer)
}
});
}

deploy to lambda target fails silently with wrong permissions

Jovo CLI Version: 1.0.17
ask-cli v1.3.0

Configure ask-cli to use a profile that has a role without Lambda Code Upload privileges. (I did it on accident of course...)

Run jovo deploy -t lambda -s .. The command will report:

Deploying Alexa Skill
        Deploying Alexa Skill
           Uploading to lambda
  Deployment completed.

...but no code is uploaded (due to the lack of privileges).

Running ask will report that the role doesn't the right privileges. So jovo deploy isn't catching the error. (It may not even be possible, but opening the issue just in case.)

Amazon Get Skill ERROR

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Import the Alexa Skill and reverse to Jovo Markup structure

Current Behavior

Fails on Jovo Get :

$ jovo get alexaSkill -b --skill-id amzn1.ask.skill.xxxxxx-xxxx-xxxxx-xxxxxxxxxx

Error log




 Getting Alexa Skill model files and saving to /platforms/alexaSkill/models

{ Error: /usr/local/lib/node_modules/ask-cli/node_modules/simple-oauth2/lib/client/access-token.js:20    if ('expires_at' in this.token) {
                     

TypeError: Cannot use 'in' operator to search for 'expires_at' in undefined
    at new AccessToken (/usr/local/lib/node_modules/ask-cli/node_modules/simple-oauth2/lib/client/access-token.js:20:22)
    at Object.createAccessToken [as create] (/usr/local/lib/node_modules/ask-cli/node_modules/simple-oauth2/lib/client/access-token.js:37:12)
    at isTokenExpired (/usr/local/lib/node_modules/ask-cli/lib/utils/oauth-wrapper.js:97:35)
    at Object.tokenRefreshAndRead (/usr/local/lib/node_modules/ask-cli/lib/utils/oauth-wrapper.js:84:10)
    at Object.module.exports.requestWithUrl (/usr/local/lib/node_modules/ask-cli/lib/api/request-wrapper.js:45:18)
    at Object.module.exports.request (/usr/local/lib/node_modules/ask-cli/lib/api/request-wrapper.js:26:20)
    at Object.callGetSkill (/usr/local/lib/node_modules/ask-cli/lib/api/api-wrapper.js:157:20)
    at Command.handle (/usr/local/lib/node_modules/ask-cli/lib/api/skill.js:96:20)
    at Command.listener (/usr/local/lib/node_modules/ask-cli/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:182:13)
    at Command.parseArgs (/usr/local/lib/node_modules/ask-cli/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/local/lib/node_modules/ask-cli/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/ask-cli/bin/ask-api.js:22:6)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)

    at Object.getAskError (/usr/local/lib/node_modules/jovo-cli/helper/alexaUtil.js:786:16)
    at exec (/usr/local/lib/node_modules/jovo-cli/helper/alexaUtil.js:673:44)
    at ChildProcess.exithandler (child_process.js:298:5)
    at ChildProcess.emit (events.js:182:13)
    at ChildProcess.EventEmitter.emit (domain.js:442:20)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
  context:
   { locales: [ 'en-us', 'en' ],
     type: 'alexaSkill',
     target: 'all',
     skillId: 'amzn1.ask.skill.xxxxxx-xxxx-xxxxx-xxxxxxxxxx',
     projectId: 'xxxxx2-xxxxxx',
     stage: '',
     askProfile: 'default',
     info: 'Info: ' } }

Your Environment

  • Jovo CLI version used: 1.2.1
  • Operating System: Ubuntu 16.04

Display full ASK/AWS error messages on deploy

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

If an ASK or AWS error occurs on jovo deploy, error message should be displayed in full.

Current Behavior

For enforcing an error message, I added a lambda version string (:$LATEST) to the endpoint configuration in project.js (using an AWS lambda function as an endpoint). On deploy, this error message is shown on command line:

 โœ” Bundle Project
    (...)
    โฏ Deploying Alexa Skill
      โœ– Updating Alexa Skill project for ASK profile default
        -> Invalid Lambda ARN arn:aws:lambda:region:123:function:testFunction:$LATEST for EU region. Please providโ€ฆ
        (...)

The error message ("Invalid Lambda ARN (...) Please provid...") is truncated here. In this case, I can guess the problem, but sometimes it would be cool to have the full error message to figure out, what was wrong.

Error log

(No error).

Your Environment

  • Jovo CLI version used: 2.0.14
  • Operating System: Linux debian 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

TIA & best regards,
Alex.

Error with jovo run --watch

Initially on running jovo run --watch I was getting an ENOENT error as below

events.js:136
      throw er; // Unhandled 'error' event
      ^

Error: spawn /Users/joshlynch/.config/yarn/global/node_modules/jovo-cli/node_modules/nodemon/bin/nodemon.js ENOENT
    at _errnoException (util.js:999:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
    at onErrorNT (internal/child_process.js:389:16)
    at process._tickCallback (internal/process/next_tick.js:152:19)
    at Function.Module.runMain (module.js:703:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:618:3

I think this was connected to my already having a global install of nodemon so the file path was in reality jovo-cli/node_modules/.bin/nodemon/bin/nodemon.js.

I created a symlink for the nodemon directory in jovo-cli/node_modules this fixed the ENOENT but now running jovo run --watch is returning an ENOTDIR error instead.

internal/child_process.js:340
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOTDIR
    at _errnoException (util.js:999:13)
    at ChildProcess.spawn (internal/child_process.js:340:11)
    at Object.exports.spawn (child_process.js:499:9)
    at spawn (/Users/joshlynch/.config/yarn/global/node_modules/cross-spawn/index.js:17:18)
    at CommandInstance.vorpal.command.description.option.option.option.option.action (/Users/joshlynch/.config/yarn/global/node_modules/jovo-cli/commands/run.js:107:24)
    at Session.session.execCommandSet (/Users/joshlynch/.config/yarn/global/node_modules/vorpal/dist/session.js:470:20)
    at Vorpal.vorpal._exec (/Users/joshlynch/.config/yarn/global/node_modules/vorpal/dist/vorpal.js:960:18)
    at Vorpal.vorpal._execQueueItem (/Users/joshlynch/.config/yarn/global/node_modules/vorpal/dist/vorpal.js:751:17)
    at Vorpal.vorpal._queueHandler (/Users/joshlynch/.config/yarn/global/node_modules/vorpal/dist/vorpal.js:735:10)
    at Vorpal.vorpal.exec (/Users/joshlynch/.config/yarn/global/node_modules/vorpal/dist/vorpal.js:682:10)

I can't find a solution to this second issue. Presumably this command should be working out of the box? I haven't seen anything regarding a need for configuration in the docs. Help appreciated, cheers.

Build for Alexa doesn't use invocationName override: en.json -> en-US.json

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Executing the following:
jovo build -p alexaSkill --stage dev

When the app.json override is set with an invocation override:

    "dev": {
      "host": {
        "lambda": {
          "arn": "arn:aws:lambda:us-east-1:...",
          "askProfile": "sample-dev"
        }
      },
      "alexaSkill": {
        "skillId": "amzn1.ask.skill....",
        "languageModel": {
          "en-US": {
            "invocation": "skillname dev" #OVERRIDE
          }
        }
      }

And the source model is in: models/en.json (NOTE: not en-US.json)
And the destination model is in: platforms/alexaSkill/models/en-US.json

The override should be set in: platforms/alexaSkill/models/en-US.json

{
	"interactionModel": {
		"languageModel": {
			"invocationName": "skillname dev",

Current Behavior

The override instead is NOT applied in: platforms/alexaSkill/models/en-US.json

{
	"interactionModel": {
		"languageModel": {
			"invocationName": "skillname",

If I rename the source model to: models/en-US.json then the override works.

Error log

No error log

Your Environment

  • Jovo CLI version: 1.1.12
  • Operating System: Windows 10

Only works on node 8+

This app only works if you're on node 8 or higher which you can't use when developing Alexa skills since lambda functions can only be at 6.10.

You might consider compiling you JS with babel to support 6.10 so that users of jovo-cli don't have to switch node versions just to use it.

Issue with external dependency

I'm submitting a...

  • Bug report

Expected Behavior

Jovo run to start the server.

Current Behavior

Jovo crash after 'jovo run'

Error log

/xxx/xxx/node_modules/any-observable/register.js:29
		throw new Error('Cannot find any-observable implementation nor' +
		^

Error: Cannot find any-observable implementation nor global.Observable. You must install polyfill or call require("any-observable/register") with your preferred implementation, e.g. require("any-observable/register")('rxjs') on application load prior to any require("any-observable").
    at loadImplementation (/xxx/xxx/node_modules/any-observable/register.js:29:9)
    at register (/xxx/xxx/node_modules/any-observable/loader.js:32:18)
    at Object.<anonymous> (/xxx/xxx/node_modules/any-observable/index.js:2:39)
    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)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)

Your Environment

  • Jovo CLI version used: 1.2.6
  • Operating System: Mac OS

It seems there is an issue with the external dependency 'any-observable' of 'listr'.
Please see this post for more information : SamVerschueren/listr#91
The issue is not happening with [email protected]

app.json fails to interpolate from environment variable

I'm submitting a...

  • [x ] Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

// .env

ARN_DEV=Foo
WEBHOOK_DEV=Bar

// app.json

"stages": {
    "dev": {
      "alexaSkill": {
        "endpoint": "${process.env.ARN_DEV}"
      },
    "googleAction": {
        "endpoint": "${pricess.env.WEBHOOK_DEV}"
    }
...

When running jovo deploy, app.json should receive, or the Jovo CLI should run app.json using above environment variables, replacing ${<key>} with environment value.

  • alexaSkill.endpoint should be Foo
  • googleAction.endpoint should be Bar

Current Behavior

  1. ${process.env.ARN_DEV} is not being interpolated.
  2. ${process.env.WEBHOOK_DEV} is not being interpolated.
  3. When hard-coding googleAction.endpoint, the value is not being retrieved.

Error log

No error messages.

Your Environment

  • Jovo CLI version used: 1.2.6
  • Operating System: OSX HighSierra 10.13.6

Using stages in CLI v2 breaks `jovo build`

I'm submitting a...

  • [X ] Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Executing jovo build when using stages and defaultStage should build for the default stage.

Current Behavior

  1. Create new project using jovo new hello-jovo2
  2. jovo build

image
3. Update project.js to include stages:

module.exports = {
    alexaSkill: {
       nlu: 'alexa',
    },
    googleAction: {
       nlu: 'dialogflow',
    },
    defaultStage: 'local',
    stages: {
      local: {
        endpoint: `${JOVO_WEBHOOK_URL}`
      },
      dev: {
        endpoint: ""
      },
      prod: {
        endpoint: ""
      }
    }
};
  1. Execute jovo build again:

image

  1. Execute jovo build --stage local:

image

Error log

The error is: The "C:\dev\voice\shazaml\hello-jovo2\project.js" file is missing or invalid!

Your Environment

  • Jovo CLI version used: 2.0.3
  • Operating System: Windows 10

Crash Trying To Create New Project With `jovo new <directory>`

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

jovo new <directory_name> should create a new project

Current Behavior

jovo new <directory_name>

crashing in a call from jovo-renderer to input-string

Error log

  I'm setting everything up

/Users/rob/.config/yarn/global/node_modules/indent-string/index.js:13
		throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``);
		^

TypeError: Expected `count` to be a `number`, got `string`
    at module.exports (/Users/rob/.config/yarn/global/node_modules/indent-string/index.js:13:9)
    at renderHelper (/Users/rob/.config/yarn/global/node_modules/jovo-cli/utils/jovoRenderer.js:22:25)
    at render (/Users/rob/.config/yarn/global/node_modules/jovo-cli/utils/jovoRenderer.js:57:15)
    at Timeout._id.setInterval [as _onTimeout] (/Users/rob/.config/yarn/global/node_modules/jovo-cli/utils/jovoRenderer.js:89:13)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:267:5)

Solution

there was a breaking change in input-string that swapped the order of two params

the version of input-string packaged with listr uses (str, indent, count) but I had a newer version of input-string in my global modules that uses (str, count, opts)

Your Environment

  • Jovo CLI version used: 1.4.0
  • node 10.8.0 (error also occurred in 8.11.3 and 9.9.0)
  • Operating System: Mac OS 10.13.6

Dialogflow deploys creating empty zip file

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Doing jovo deploy -p googleAction should create a dialogflow_agent.zip file containing the pertinent Dialogflow agent files

Current Behavior

Doing jovo deploy -p googleAction creates an empty (zero bytes) dialogflow_agent.zip file

Your Environment

  • Jovo CLI version used: 1.2.7 (bug is not present in 1.2.6)
  • Operating System: Windows 10

Jovo Deploy to lambda does nothing

I'm submitting a...

  • [ x ] Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

jovo deploy -t lambda
should do anything. Either create the zip file for manual deployment or better yet deploy the skill to AWS lambda directly.

Current Behavior

`ฮป jovo deploy -t lambda

โˆš Deploying Alexa Skill

Deployment completed.`

The AWS Lambda dashboard shows that the corresponding function wasn't updated in the last hour (that was when I last updated it by hand).

Error log

If you have an error log, please paste it here.

Your Environment

  • Jovo Framework version used: 1.2.1
  • Operating System: Win 10 x64 Build 1803

Jovo help deploy does nothing

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

jovo help deploy should provide details about the command and its options.

Current Behavior

Command does nothing.

Error log

-

Your Environment

  • Jovo CLI version used: 1.1.5
  • Operating System: Windows 10 64 bit

Allow to change the invocation name in Dialogflow

I'm submitting a...

  • Bug report
  • [x ] Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Have the possibility to change the invocation name in Dialogflow (by using the "invocation" in the model).

Current Behavior

The current way to change the invocation name is to do it manually in the console in Dialogflow,

Error log

If you have an error log, please paste it here.

Your Environment

  • Jovo CLI version used: 1.1.16
  • Operating System: Windows 10

Allow app.json to override interactonModel

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Allow app.json to override part of the interactonModel. For a dev stage, I might want the invocationName to be "hello world dev" and for a qa stage, "hello world qa"

Current Behavior

In app.json you can override part of the skill.json by specifying a manifest node.
Not currently available for model.

Error log

none

Your Environment

  • Jovo CLI version used: 1.1.6
  • Operating System: Windows 10

Stage-level manifest not over-riding publishingInformation

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Adding manifest information for "publishingInformation" within stage-level settings, should over-ride any defaults when deploying to ASK using a particular stage.

For example jovo deploy --stage dev and jovo deploy --stage prod, where each has slightly different publishing information (to make each skill clear, separate invocations, etc). I'm aware profiles could be used to keep these skills in different accounts, but would rather they stayed in one place.

Current Behavior

Always seems to use the default manifest in app.json and ignores any stage-level information, even if specifying the skill ID in the stage-level manifest too.

Error log

No log

Your Environment

  • Jovo CLI version used: 1.2.8
  • Operating System: MacOS 10.14

JOVO GET CLI 1.1.4 GoogleAction Error

jovo get googleAction --project-id devtest-xxxxx

โ น Getting Dialogflow Agent files and saving to /platforms/googleAction/dialogflow
/usr/lib/node_modules/jovo-cli/helper/dialogflowUtil.js:364
let buf = Buffer.from(JSON.parse(body).response.agentContent, 'base64');
^

TypeError: Cannot read property 'agentContent' of undefined
at Request._callback (/usr/lib/node_modules/jovo-cli/helper/dialogflowUtil.js:364:72)
at Request.self.callback (/usr/lib/node_modules/jovo-cli/node_modules/request/request.js:185:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/usr/lib/node_modules/jovo-cli/node_modules/request/request.js:1157:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/usr/lib/node_modules/jovo-cli/node_modules/request/request.js:1079:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)

jovo

jovo with my own server

I have an existing app in node with httpserver and I want to use jovo. Can I call jovo as a plug-in or does it have to run on its own server?

Jovo webhook strips useful headers like `authorization`

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

Running a project with jovo run - a project built both for custom skills and smarthome skills - should forward along headers sent by the downstream service, whether google or alexa. This is useful for the Authorization header.

Current Behavior

The authorization header is not provided to the running server when using the jovo webhook.

Your Environment

  • Jovo CLI version used: 1.1.3
  • Operating System: Mac OSX High Sierra, 10.13.4

Workaround

It's currently possible to workaround this issue by using an ngrok proxy to the local dev service and ignoring the webhook that jovo sets up. Remember that ngrok only stays up 8 hours by default. And that when you update the webhook URL in google, you might need to force a version update in the google actions simulator by clicking test in the actions page or making a new version in the simulator page.

Jovo build type error -> Cannot read property 'replace' of undefined

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

I expected the json file to be built for the respective platforms. I ran this command after I reversed an existing json I had made for a dialogflow project. Note that it also stripped out the responses that I had in the original. I am not sure if that is expected behavior or is related to the issue at hand,

Current Behavior

It spits this out

C:\Users\Wahid\Documents\Projects\voice\dt_quoter_jovo> jovo build

   โˆš Updating /platforms/alexaSkill
     โˆš Updating Alexa project files
       โˆš skill.json
     โˆš Updating Alexa Interaction Model based on Jovo Language Model in /models
       โˆš en-CA
   > Updating /platforms/googleAction/dialogflow
     โˆš Updating Dialogflow Agent
       โˆš agent.json
       โˆš package.json
     > Updating Dialogflow Language Model based on Jovo Language Model in /models
       ร— en-CA
         -> Cannot read property 'replace' of undefined
{ TypeError: Cannot read property 'replace' of undefined
    at DialogFlowAgent.transform (C:\Users\Wahid\AppData\Roaming\npm\node_modules\jovo-cli\helper\dialogFlowAgent.js:422:64)
    at Promise (C:\Users\Wahid\AppData\Roaming\npm\node_modules\jovo-cli\helper\dialogflowUtil.js:220:21)
    at new Promise (<anonymous>)
    at Object.buildLanguageModelDialogFlow (C:\Users\Wahid\AppData\Roaming\npm\node_modules\jovo-cli\helper\dialogflowUtil.js:215:16)
    at Task.task (C:\Users\Wahid\AppData\Roaming\npm\node_modules\jovo-cli\commands\tasks.js:332:42)
    at Promise.resolve.then.then.skipped (C:\Users\Wahid\AppData\Roaming\npm\node_modules\jovo-cli\node_modules\listr\lib\task.js:168:30)
    at <anonymous>
  context:
   { locales: [ 'en-CA' ],
     type: [ 'alexaSkill', 'googleAction' ],
     projectId: 'dt-quoter',
     endpoint: 'jovo-webhook',
     target: 'all',
     src: 'C:\\Users\\Wahid\\Documents\\Projects\\voice\\dt_quoter_jovo\\',
     stage: '',
     askProfile: 'default' } }

log (en-ca file)

{
    "invocation": "dt quoter",
    "intents": [
        {
            "name": "10_get_dt_employee",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_dt_employee"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_apply_promo",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "11_get_promo_no",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_apply_promo"]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "11_get_promo_yes",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_apply_promo"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_what_is_promo",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "12_get_promo_characters",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_what_is_promo"]
            }
        },
        {
            "name": "1_begin_report",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_begin_yes_no"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_province",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            }
        },
        {
            "name": "1_end_report",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_begin_yes_no"],
                "priority": 1000000
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "1_would_like_to_recieve_email",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_wants_email"],
                "events": [
                    {
                        "name": "awaiting_wants_email"
                    }
                ],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_province",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "2_get_province",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_province"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_coverage",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "province",
                    "type": "province"
                }
            ]
        },
        {
            "name": "2_is_from_quebec",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_province"],
                "priority": 1000000
            },
            "inputs": [
                {
                    "name": "excluded_province",
                    "type": "excluded_province"
                }
            ]
        },
        {
            "name": "3_get_coverage",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_coverage"],
                "webhookUsed": true,
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_age",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "coverage",
                    "type": {
                        "dialogflow": "@sys.unit-currency",
                        "alexa": "AMAZON.number"
                    }
                }
            ]
        },
        {
            "name": "3_get_coverage_incorrect",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_coverage_incorrect"],
                "priority": 750000,
                "events": [
                    {
                        "name": "awaiting_coverage_incorrect"
                    }
                ],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_coverage",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            }
        },
        {
            "name": "4_get_dob",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_age"],
                "webhookUsed": true,
                "events": [
                    {
                        "name": "awaiting_age"
                    }
                ],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_sex",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "dob",
                    "type": {
                        "dialogflow": "@sys.date",
                        "alexa": "AMAZON.DATE"
                    }
                }
            ]
        },
        {
            "name": "4_get_dob_no_year",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_age_incorrect"],
                "events": [
                    {
                        "name": "awaiting_age_incorrect"
                    }
                ],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_age",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            }
        },
        {
            "name": "4_get_dob_underage",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_age_underage"],
                "priority": 1000000,
                "events": [
                    {
                        "name": "awaiting_age_underage"
                    }
                ],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_age",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            }
        },
        {
            "name": "5_get_sex",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_sex"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_tobacco",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "sex",
                    "type": "sex"
                }
            ]
        },
        {
            "name": "6_get_tobacco",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_tobacco"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_ecig",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "7_get_ecig",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_ecig"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_home_or_auto",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "ecig",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "8_get_home_auto",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_home_or_auto"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_dt_wealth",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "9_get_dt_wealth",
            "phrases": [],
            "dialogflow": {
                "contexts": ["awaiting_dt_wealth"],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_dt_employee",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ]
            },
            "inputs": [
                {
                    "name": "yes-no",
                    "type": "yes-no"
                }
            ]
        },
        {
            "name": "Quit",
            "phrases": [],
            "dialogflow": {
                "priority": 1000000
            }
        }
    ],
    "inputTypes": [
        {
            "name": "excluded_province",
            "values": [
                {
                    "value": "quebec",
                    "synonyms": ["quebec"]
                }
            ]
        },
        {
            "name": "province",
            "values": [
                [
                    {
                        "value": "Yukon",
                        "synonyms": ["Yukon"]
                    },
                    {
                        "value": "Saskatchewan",
                        "synonyms": ["Saskatchewan"]
                    },
                    {
                        "value": "Prince Edward Island",
                        "synonyms": ["Prince Edward Island"]
                    },
                    {
                        "value": "Ontario",
                        "synonyms": ["Ontario"]
                    },
                    {
                        "value": "Nunavut",
                        "synonyms": ["Nunavut"]
                    },
                    {
                        "value": "Northwest Territories",
                        "synonyms": ["Northwest Territories"]
                    },
                    {
                        "value": "Nova Scotia",
                        "synonyms": ["Nova Scotia"]
                    },
                    {
                        "value": "Newfoundland and Labrador",
                        "synonyms": ["Newfoundland and Labrador"]
                    },
                    {
                        "value": "New Brunswick",
                        "synonyms": ["New Brunswick"]
                    },
                    {
                        "value": "Manitoba",
                        "synonyms": ["Manitoba"]
                    },
                    {
                        "value": "British Columbia",
                        "synonyms": ["British Columbia"]
                    },
                    {
                        "value": "Alberta",
                        "synonyms": ["Alberta"]
                    }
                ]
            ]
        },
        {
            "name": "sex",
            "values": [
                {
                    "value": "male",
                    "synonyms": ["male", "man", "guy", "dude", "bro", "boy"]
                },
                {
                    "value": "female",
                    "synonyms": ["female", "girl", "woman", "gal", "lady"]
                }
            ]
        },
        {
            "name": "yes-no",
            "values": [
                {
                    "value": "yes",
                    "synonyms": ["yes"]
                },
                {
                    "value": "no",
                    "synonyms": ["no"]
                }
            ]
        }
    ],

    "dialogflow": {
        "intents": [
            {
                "fallbackIntent": true,
                "name": "Default Fallback Intent"
            },
            {
                "events": [
                    {
                        "name": "WELCOME"
                    }
                ],
                "responses": [
                    {
                        "affectedContexts": [
                            {
                                "name": "awaiting_begin_yes_no",
                                "parameters": {},
                                "lifespan": 1
                            }
                        ]
                    }
                ],
                "name": "Default Welcome Intent"
            }
        ]
	},
	
	"alexa": {
		"interactionModel": {
			"languageModel": {
				"intents": [
					{
						"name": "AMAZON.CancelIntent",
						"samples": []
					},
					{
						"name": "AMAZON.HelpIntent",
						"samples": []
					},
					{
						"name": "AMAZON.StopIntent",
						"samples": []
					}
				]
			}
		}
	}
}

Your Environment

  • Jovo CLI version used: 1.2.4
  • Operating System: Windows 10 Pro

promisify is not a function

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Can you let me know what I am doing wrong? Using Raspbian.


const copyFileAsync = promisify(fs.copyFile);
                      ^

TypeError: promisify is not a function
    at Object.<anonymous> (/root/.nvm/versions/node/v7.10.1/lib/node_modules/jovo-cli/node_modules/jovo-cli-core/dist/src/Project.js:5:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/.nvm/versions/node/v7.10.1/lib/node_modules/jovo-cli/node_modules/jovo-cli-core/dist/src/index.js:9:10)
    at Module._compile (module.js:571:32)

`

Unable to modify Default Fallback & Default Welcome intents

I was trying to use the default welcome and fallback intent as my welcome and fallback intent in Dialogflow.
When I exported the agent I had something like :
Default Fallback Intent.json :

{
  "name": "Default Fallback Intent",
  "responses": [
    {
      ...
      "messages": [
        {
          ....
          "speech": "Sorry I didn't understand"
        }
      ],

    }
  ],
...
  "webhookUsed": true,
}

Default Welcome Intent :

{
  "name": "Default Welcome Intent",
  "responses": [
    {
      "messages": [
        {
          ...
          "speech": "Hello"
        }
      ],
    ...
    }
  ],
  "webhookUsed": true,
...
  ]
}

Then I tryed to build the language model (By using jovo build --reverse) and I had a model like that :

	"dialogflow": {
		"intents": [
			{
				"auto": false,
				"fallbackIntent": true,
				"name": "Default Fallback Intent"
			},
			{
				"auto": false,
				"events": [
					{
						"name": "WELCOME"
					}
				],
				"name": "Default Welcome Intent"
			}
		]
	}

And if I build/deploy my agent (By using jovo build --platform googleAction) my intents look then like that :
Default Fallback Intent.json :

{
	"auto": false,
	"fallbackIntent": true,
	"name": "Default Fallback Intent"
}

Default Welcome Intent :

{
	"auto": false,
	"events": [
		{
			"name": "WELCOME"
		}
	],
	"name": "Default Welcome Intent"
}

The problem is that I can't use neither the responses phrases (the speech field disapear) nor the webhook call (webhook turned false).

Build Interaction Model in Parallel

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

It would be great if the jovo deploy command deployed the Alexa interaction models for each region in parallel rather than one at a time. If you copy and paste the model JSON into the Alexa developer console for each region you can build them all in parallel and it's quicker - but we still want to use the cli for automation!!

Current Behavior

Each region is built in series.

Your Environment

[email protected]

Allow to chain jovo get and jovo build --reverse

Feature request in the Jovo Slack: Users want to be able to chain the $ jovo get and $ jovo build --reverse command to be able to directly import their Alexa Skill Interaction Model into a Jovo Language Model.

Suggestion: $ jovo get alexaSkill --build --reverse

jovo get fails with "TypeError: Cannot read property 'uri' of undefined"

> jovo get alexaSkill --skill-id <redacted>

? Found existing project files. How to proceed? Overwrite
   ร— Getting Alexa Skill project for ASK profile default
     -> Cannot read property 'uri' of undefined
     Getting Alexa Skill model files and saving to /platforms/alexaSkill/models

{ TypeError: Cannot read property 'uri' of undefined
    at Object.getSkillSimpleInformation (C:\Users\redacted\AppData\Roaming\npm\node_modules\jovo-cli\helper\alexaUtil.js:413:65)
    at p.then.then.then.then.then.then (C:\Users\redacted\AppData\Roaming\npm\node_modules\jovo-cli\commands\tasks.js:103:57)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
  context:
   { skillId: '<redacted>',
     locales: [ 'en-US' ],
     type: 'alexaSkill',
     target: 'all',
     projectId: undefined,
     stage: undefined,
     askProfile: 'default',
     info: 'Info: ' } }

I just set up ASK CLI by following the instructions to a dot. Not sure why it's not working, jovo new/init/build work fine.

Jovo CLI Version: 1.1.1

Dialogflow's headers are lost while importing to jovo

Hello,
I have an agent in dialogflow, and I need some headers to connect it with a lambda (using an API Gateway).
When I export the agent with dialogflow my headers are in the agent.json stored like that :

...
 "webhook": {
    "url": "my-endpoint . . . ",
    "headers": {
      "my-header": "header-value",
      "another-header": " . . ."
    },
...

The problem is that if I build the language model (by using : jovo build --reverse ) and then rebuild the platform (with : jovo build ) the headers disapears and my agent.json became like that :

...
 "webhook": {
	"url": "my-endpoint . . .",
        ...
 },
...

I did not found a way to set the headers in app.json (like the endpoint), is there any way to set them ?

setSessionAttribute('x','y'), followed by getSessionAttribute('x') doesn't return 'y'

It seems that 'getSessionAttribute()' ONLY get values from the inbound request payload, and setSessionAttribute() ONLY sets values in the outbound response payload.

So a 'set', followed by a 'get' in code doesn't work as you'd expect.
This is quite surprising given the general understanding of get/set.

How did I hit this?
I tend to store Intent data immediately into session data, and then call lower level code to process the collection of information in session data. A bit of a 'blackboard' approach, potentially giving the app a bit of short-term memory if needed, similar to how humans work.
This breaks if we can't set+get into SessionAttributes whenever we want...

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.