- Update your .ask/config lambda RevisionID - update-lambda-revision-id.ts
- Automate getting your project Skill Id - get-skill-id.js
- With this script you can add local ISP to .ask/config file automatically, download current ISP on remote and add these too on .ask/config file - add-ISP-files-to-ask-config.ts
- Update multiple local configuration to your skill.json file - update-skill-manifest.js
- i18next Localization Helpers generator -
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "APL", | |
"version": "1.3", | |
"settings": { | |
"idleTimeout": 300000 | |
}, | |
"theme": "dark", | |
"import": [], | |
"resources": [], | |
"styles": {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RequestInterceptor, HandlerInput } from "ask-sdk-core"; | |
import { generateLocalization } from "./generateTranslator"; | |
/** | |
* Adds translation functions to the RequestAttributes. | |
*/ | |
export class LocalizationInterceptor implements RequestInterceptor { | |
public async process(handlerInput: HandlerInput): Promise<void> { | |
const locale: string = | |
handlerInput.requestEnvelope.request.locale || "es-ES"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2014-2019 by the respective copyright holders. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
*/ | |
// - You have to make a dir named "resources" and put there all locale specific manifest data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Workaround when you change Environment Vars on Lambda functions and need to use ASK - CLI to Deploy an Skill. | |
// That code updates the variables through the AWS console and manually fetch the function's info using the AWS CLI and | |
// update the local revision id to match the revision id that's live on AWS. | |
// https://stackoverflow.com/questions/53508109/setting-lambda-environmental-variable-using-ask-cli | |
// Gist link: https://gist.github.com/isaacpalomero/84de0412d3de5b3f5c0e2e4a141a0fae | |
// How to use it: | |
// npm install -g "fs" | |
// npm install -g "execa" | |
// [root-project-path]$ ts-node scripts/update-lambda-revision-id.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from: https://developer.amazon.com/blogs/alexa/post/a94d26c7-591b-4382-8721-2929f818be8b/create-your-own-automation-script-to-optimize-syncing-your-local-skill-interaction-model-using-the-ask-cli | |
// Example Uses: | |
// [PROJECTPATH]$ ask api get-model --locale en-US --skill-id `node scripts/get-skill-id.js` | |
// or | |
// ⌞ $ cp $PROJECTPATH/scripts/get-skill-id.js $HOME/$WHEREVERYOUWANT/get-skill-id.js | |
// ⌞ $ pico ~/.bash_profile | |
// ⌞ alias gskill='node $HOME/$WHEREVERYOUWANT/get-skill-id.js' | |
// ⌞ $ source ~/.bash_profile | |
// ⌞ [PROJECTPATH]$ ask api get-model --locale en-US --skill-id `gskill` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// - With this script you can add local ISP to .ask/config file automatically, download current ISP on remote | |
// and add these too on .ask/config file | |
// | |
// How to use it: | |
// change the 3 "const" with yours, and follow these steps: | |
// [any-path]$ npm install -g "fs" | |
// [any-path]$ npm install -g "execa" | |
// [root-project-path]$ ts-node scripts/add-ISP-files-to-ask-config.ts | |
// TODO: update this values with yours |