Skip to content

gabrielmpinto/fleek-function-utils

Repository files navigation

⚡️ Fleek Function Utilities

Conventional Commits

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:

  1. 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
  1. Push Changes and Tags
git push origin main --follow-tags
  1. 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

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-branch-name.
  3. Make your changes.
  4. Commit your changes using conventional commits.
  5. Push to your fork and submit a pull request.

Commit Guidelines

We use Conventional Commits for our commit messages:

  • test: 💍 Adding missing tests
  • feat: 🎸 A new feature
  • fix: 🐛 A bug fix
  • chore: 🤖 Build process or auxiliary tool changes
  • docs: ✏️ Documentation only changes
  • refactor: 💡 A code change that neither fixes a bug or adds a feature
  • style: 💄 Markup, white-space, formatting, missing semi-colons...

About

Utilities / types for Fleek Functions

Resources

Stars

Watchers

Forks

Packages

No packages published