fuse-cli
What is this repository for?
The CLI helps you to deploy your application and lambda(s) using the CDK. CLI builds all essentials needed by CDK. You can find all the available commands and their usage here
Fuse Developer
Pre-requisites
Install packages listed below by clicking on the respective link
- pnpm - https://pnpm.io/installation
- JQ - https://github.com/stedolan/jq
- Volta - https://volta.sh
Installation
We will be using pnpm instead of npm
and
volta as node version manager. Run the following command for
installing dependencies
pnpm i
Run CLI locally
To run CLI locally, run the following commands in exact order.
- The following command runs
predev
command which compiles code and copiesngrok
executable intodist
folder. We usenodemon
to re-compile code on save.
npm run dev
- once the above command runs successfully, open a new terminal and run the following command to run CLI.
node dist/index.js
Output
Usage: fuse [options] [command]
Options:
-h, --help Displays the help for command
Commands:
docs Opens docs in browser
bootstrap [options] Bootstraps a new application
deploy [options] Deploys the app
proxy [options] Proxy given port
help [command] Displays the help for command
Docs
Architecture diagram here - https://appfireteam.atlassian.net/wiki/spaces/AC/pages/952861385/Fuse+-+Getting+Started
Understanding Fuse - https://appfireteam.atlassian.net/wiki/spaces/AC/pages/952861385/Fuse+-+Getting+Started
Run CLI via npx
To run the CLI via npx
, run the following command. this basically installs CLI
at global level.
bash scripts/local.sh
once it's done, run the following command from anywhere in your system. make sure you are on same node version as this project to tests the CLI globally.
npx fuse
Running tests
We are using vitest
to configure and run tests. run the following command to
run all tests. We recommend Vitest
VSCode
extension
to run and debug a single test suite or a single test
npm run tests
Running a single suite or a single test
If you would like run a single test suite or a single test, run following command
npm run tests -- -t "<tests name>"
Lints
We configured Eslint
and Prettier
for linting and code formatting. you can
find its configuration in .eslintrc.cjs
and .prettierrc.js
. Run the
following command to run lint
npm run lint
To fix lint auto errors, run the following command
npm run lint:fix
Pre-Commit Hooks
We have configured husky
as a Git Pre-Commit
which runs the following
command and its configuration can be found husky.sh
Production bundle
To create production bundle, run the following command
bash scripts/local.sh
Contribution guidelines
- Make sure we write tests for all the new code being added
App Developer docs
You can find App Developer docs here
Who do I talk to?
- saiumesh.dhanewar@appfire.com
- team-fuse