GithubHelp home page GithubHelp logo

Comments (6)

Chih-Ying avatar Chih-Ying commented on June 2, 2024 1

Hi @matijagrcic
The Alexa hosted service does not support Typescript for now, so the compiled files (Javascript files) need to be included in the repo.
I have brought this request to the service team and tag this issue as a feature request. Thank you.

from ask-toolkit-for-vscode.

Chih-Ying avatar Chih-Ying commented on June 2, 2024

@matijagrcic

Thank you for your report.

It seems your skill is a self-hosted skill (non Alexa hosted skill). In the ASK Toolkit v.2.3.0, we start supporting self-hosted skills creation and deployment, but it's only for the skill pacakge. Lambda code can be manually retrieved and deployed, depending on how you source control your code.

In your case, I will suggest you to use ASK-CLI to deploy the skill code (see the document).
You have to build your Typescript code (ASK-CLI won't build it automatically), and then specify the entry point for your lambda code in the ask-resources.file, it will be something like lambda/dist/index.js.

Please let me know if there are any questions.Thanks

from ask-toolkit-for-vscode.

matijagrcic avatar matijagrcic commented on June 2, 2024

Hey @Chih-Ying thanks for responding.
The skill is a Alexa hosted skill which i have pulled down using the ASK Toolkit.

//ask-resources.json
"skillInfrastructure": {
    "type": "@ask-cli/hosted-skill-deployer"
}

Given it's a Alexa hosted skill the source control is git so just a push or a ASK Toolkit Deployment work great as long as the index.js is changed.

I know I need to build the TypeScript myself, and I've setup all that, but given the index.js needs to change and that's generated by TypeScript I don't want it included in the repo but providing the other location doesn't work, that is the ASK Toolkit doesn't seem to pick up the location it just does the git push.

//ask-resources.json
"code": {
      "default": {
        "src": "./lambda/build"
     }
}

Is there any plans to support this thru ASK Toolkit and not jus the ASK-CLI?

from ask-toolkit-for-vscode.

Chih-Ying avatar Chih-Ying commented on June 2, 2024

Hi @matijagrcic

Thanks for the clarification.

ASK Toolkit handles Alexa hosted skills deployment in a different way. As you mentioned, ASK Toolkit uses git to do source control. In the deployment process, Ask Toolkit executes the git push operation to push the whole skill project to Alexa CodeCommit repo, but does not do any files verification. That is the reason why specifying the lambda code source path in ask-resources.json does not work for an Alexa hosted skill.

The Alexa service will build the skill code. Since ./lambda/index.js is the required entry point for Alexa service, I think you can try to move all the Typescript build code under the lambda folder, and make sure you have index.js as the entry file.

Please let me know if there are any questions.Thanks!

from ask-toolkit-for-vscode.

matijagrcic avatar matijagrcic commented on June 2, 2024

Yeah, specifying the outDir in tsconfig.json to be lambda folder and the include to be index.ts is working as expected as pointed before but then the compiled files are now part of the repo, which is what I'm trying to avoid.

Is there a way we can avoid this, maybe with Git hooks post-receive or something?

from ask-toolkit-for-vscode.

matijagrcic avatar matijagrcic commented on June 2, 2024

Thanks @Chih-Ying, appreciate it, would be great if the TS support lands. Feel free to close this if needed.

from ask-toolkit-for-vscode.

Related Issues (20)

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.