1 | # L³ CLI
|
2 |
|
3 | [![npm version](https://badge.fury.io/js/@lambda-lambda-lambda%2Fcli.svg)](https://badge.fury.io/js/@lambda-lambda-lambda%2Fcli) [![](https://img.shields.io/npm/dm/@lambda-lambda-lambda/cli.svg)](https://www.npmjs.com/package/@lambda-lambda-lambda/cli) [![Build Status](https://api.travis-ci.com/lambda-lambda-lambda/cli.svg?branch=master)](https://app.travis-ci.com/github/lambda-lambda-lambda/cli) [![Install size](https://packagephobia.com/badge?p=@lambda-lambda-lambda/cli)](https://packagephobia.com/result?p=@lambda-lambda-lambda/cli)
|
4 |
|
5 | Command-line tool to create a new [L³](https://github.com/lambda-lambda-lambda) application.
|
6 |
|
7 | ## Dependencies
|
8 |
|
9 | - [Node.js](https://nodejs.org)
|
10 |
|
11 | ## Installation
|
12 |
|
13 | Install the command-line utility using [NPM](https://npmjs.com).
|
14 |
|
15 | $ npm install -g @lambda-lambda-lambda/cli
|
16 |
|
17 | ## Usage
|
18 |
|
19 | ### Create a new L³ application
|
20 |
|
21 | Usage: lambda-lambda-lambda create [options]
|
22 |
|
23 | Options:
|
24 | --name <value> Application name (Example: restfulApiHandler)
|
25 | --description <value> Description
|
26 | --prefix <path> Request prefix (Example: /api) (default: "/")
|
27 | --timeout <number> Function timeout (in seconds) (default: "15")
|
28 | --sdk-version <number> AWS SDK for JavaScript version (default: "3")
|
29 | --runtime <string> Node.js Lambda runtime identifier (default: "nodejs20.x")
|
30 | --asynchronous Use asynchronous handler? (default: false)
|
31 | -h, --help display help for command
|
32 |
|
33 | ### Install [L³ middleware](https://github.com/lambda-lambda-lambda/middleware/tree/master/plugins) plugin
|
34 |
|
35 | Usage: lambda-lambda-lambda install [options] <PluginName>
|
36 |
|
37 | Arguments:
|
38 | PluginName Plugin name (Example: BasicAuthHandler), list packages if undefined
|
39 |
|
40 | Options:
|
41 | -h, --help display help for command
|
42 |
|
43 | ## Supported runtimes
|
44 |
|
45 | | Name | Identifier | SDK | Deprecation (Phase 1) |
|
46 | |------------|--------------|-----|-----------------------|
|
47 | | Node.js 20 | `nodejs20.x` | 3 | |
|
48 | | Node.js 18 | `nodejs18.x` | 3 | \*_See note below_ |
|
49 | | Node.js 16 | `nodejs16.x` | 2 | Mar 11, 2024 |
|
50 | | Node.js 14 | `nodejs14.x` | 2 | Nov 27, 2023 |
|
51 |
|
52 | (*) While this Node release is currently supported in AWS Lambda, the underlying [VS Code Dev Container](https://microsoft.github.io/code-with-engineering-playbook/developer-experience/devcontainers) is no longer [supported by VS Code](https://code.visualstudio.com/docs/remote/faq#_can-i-run-vs-code-server-on-older-linux-distributions) due to deprecated support older Linux build toolchains (`glibc >= 2.28` and `libstdc++ >= 3.4.2`).
|
53 |
|
54 | If you need to support this release update the `devcontainer.json` image to:
|
55 |
|
56 | ```
|
57 | {
|
58 | "name": "restfulJsonApi",
|
59 | "image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
|
60 | ```
|
61 |
|
62 | ## Developers
|
63 |
|
64 | ### CLI options
|
65 |
|
66 | Compile JavaScript sources from [TypeScript](https://www.typescriptlang.org) to a distribution:
|
67 |
|
68 | $ npm run compile
|
69 |
|
70 | Compile and listen for changes (development mode):
|
71 |
|
72 | $ npm run watch
|
73 |
|
74 | Run [ESLint](https://eslint.org/) on project sources:
|
75 |
|
76 | $ npm run lint
|
77 |
|
78 | Run [Mocha](https://mochajs.org) integration tests:
|
79 |
|
80 | $ npm run test
|
81 |
|
82 | ## Contributions
|
83 |
|
84 | If you fix a bug, or have a code you want to contribute, please send a pull-request with your changes. (Note: Before committing your code please ensure that you are following the [TypeScript style guide](https://github.com/basarat/typescript-book/blob/master/docs/styleguide/styleguide.md))
|
85 |
|
86 | ## Versioning
|
87 |
|
88 | This package is maintained under the [Semantic Versioning](https://semver.org) guidelines.
|
89 |
|
90 | ## License and Warranty
|
91 |
|
92 | This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
|
93 |
|
94 | _lambda-lambda-lambda/cli_ is provided under the terms of the [MIT license](http://www.opensource.org/licenses/mit-license.php)
|
95 |
|
96 | ## Author
|
97 |
|
98 | [Marc S. Brooks](https://github.com/nuxy)
|