New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lex2js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lex2js

Lex format json files to code and back

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

lex2js

Export Amazon Lex bot configurations to code

Usage

const lex2js = require('lex2js');

const params = {
  sourceBotPath: `${__dirname}/myBot.json`,
  distFolderPath: '${__dirname}/src',
  botName: 'myLexBot',
  cleanUpJSONFile: true,
  accounts: {
    qa: '1234567890',
    prod: '0123456789',
  },
};

lex2js.parse(params);
lex2js.pack(params);

Converts a JSON Lex file into JS code with imports for intents, slots and slotTypes in their own respective folders.

Param definitions:

  • sourceBotPath: path to an exported Lex JSON file.
  • distFolderPath: destination folder for the output bot, intents, slots and slotTypes.
  • botName: name of your Lex bot
  • cleanUpJSONFile: Boolean, default true. Delete the bot JSON file after creating a .zip with it (lex2.js)
  • accounts: Object. Containing account names and numbers. These will be matched in lambda uri references and replaced with a dynamic reference to process.argv[2]. The account names will also be used for output folders when creating .zip files with the pack command.

Keywords

FAQs

Package last updated on 01 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc