fleek-function-utils
v0.1.3
Published
Utilities and types for Fleek Functions
Downloads
422
Readme
⚡️ Fleek Function Utilities
Utilities for debugging Fleek Functions and types for HTTP requests and responses.
Installation
- npm
npm install fleek-function-utils
- pnpm
pnpm install fleek-function-utils
Usage
Here's a basic example of a Fleek edge function, demonstrating how to configure and use the utils package to wrap your function and add debugging capabilities to it.
import { wrapper } from 'fleek-function-utils';
export const main = async (params) =>
wrapper((params) => {
console.log('Hello, World!');
return params;
}, params);
Whenever you call the function with a debug
query parameter, that execution's logs will be returned to you in the response body.
Release Process
This project follows SemVer for versioning. Here's how to release a new version:
- Update Version Number: Bump the version number in package.json using npm version (patch/minor/major). This will update the version number in package.json and create a new Git tag.
pnpm version patch
- Push Changes and Tags
git push origin main --follow-tags
- GitHub Actions Automation: A GitHub Actions workflow automatically publishes the package to npm when a new tag is pushed.
Contributing
Thanks for considering contributing to our project!
How to Contribute
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch-name
. - Make your changes.
- Commit your changes using conventional commits.
- Push to your fork and submit a pull request.
Commit Guidelines
We use Conventional Commits for our commit messages:
test
: 💍 Adding missing testsfeat
: 🎸 A new featurefix
: 🐛 A bug fixchore
: 🤖 Build process or auxiliary tool changesdocs
: ✏️ Documentation only changesrefactor
: 💡 A code change that neither fixes a bug or adds a featurestyle
: 💄 Markup, white-space, formatting, missing semi-colons...