open-index/open-npm huggingface dataset:
npm package: @fleekxyz/proxy
Description: Proxy for your Fleek edge functions
Latest version: 0.0.8
Deprecated: Package no longer supported. Please use the new package @fleek-platform/proxy at https://www.npmjs.com/package/@fleek-platform/proxy.

# ⚡️Fleek Proxy

[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-blue.svg)](https://conventionalcommits.org)

`fleek-proxy` is a lightweight JavaScript package designed to route incoming requests and act as an API Gateway for your app. Built for edge function services, it helps forward and proxy requests to the appropriate destinations.

# Features

- **Flexible Routing**: Configure custom routes with wildcards.
- **Proxy Requests**: Forward HTTP requests to specified destinations.
- **Default Route**: Set up a default route to catch unmatched paths.
- **Seamless Integration**: Written in TypeScript for type safety.

# Installation

- **npm**

```bash
npm install @fleekxyz/proxy
```

- **pnpm**

```bash
pnpm install @fleekxyz/proxy
```

# Usage

Here's a basic example of a Fleek edge function, demonstrating how to configure and use the proxy package.

```typescript
import { createProxy, FleekRequest, FleekResponse } from '@fleekxyz/proxy';

// Define your routing rules
const proxy = createProxy({
  routes: {
    routes: {
      '/api/': 'https://api.foo.com/',
      '/external/': 'https://external-service.com/',
    },
    default: 'https://fallback-service.com/',
  },
});

export async function main(req: FleekRequest): Promise<FleekResponse> {
  return await proxy.proxyRequest(req);
}
```

# 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.

```bash
pnpm version patch
```

2. **Push Changes and Tags**

```bash
git push origin main --follow-tags
```

3. **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](https://www.conventionalcommits.org/) 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...
npm package: @fleet-sdk/ageusd-plugin
Description: AgeUSD protocol plugin for Fleet SDK.
Latest version: 0.1.23

# @fleet-sdk/ageusd-plugin [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/ageusd-plugin)](https://www.npmjs.com/package/@fleet-sdk/ageusd-plugin)

Fleet SDK plugin and utility functions for AgeUSD Protocol.

## Installation

```bash
npm install @fleet-sdk/ageusd-plugin
```

## Usage
npm package: @fleet-sdk/babel-fees-plugin
Description: Babel Fees plugin for Fleet SDK.
Latest version: 0.1.26

# @fleet-sdk/babel-fees-plugin [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/babel-fees-plugin)](https://www.npmjs.com/package/@fleet-sdk/babel-fees-plugin)

Fleet SDK plugin and utility functions for Babel Fees.

## Installation

```bash
npm install @fleet-sdk/babel-fees-plugin
```

## Usage Example

```ts
const tx = new TransactionBuilder(height)
  .from(inputs)
  // Use extend method to extend the transaction builder with plugins.
  .extend(
    // In this case, BabelSwapPlugin will swap the specified token
    // amount for ERG, based on token price, and make it available.
    // for use in the transaction.
    BabelSwapPlugin(babelBox, {
      tokenId: "03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04",
      amount: "2" // amount of token units you want to swap for ERG
    })
  )
  // BabelSwapPlugin will make swapped ERG available for use in any
  // point of the transaction, in this example, we are using it to
  // pay the mining fee and sending the excess to the change address.
  .payMinFee()
  .sendChangeTo(changeAddress)
  .build();
```
npm package: @fleet-sdk/blockchain-providers
Description: Blockchain data providers
Latest version: 0.12.0

# @fleet-sdk/blockchain-providers [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/blockchain-providers)](https://www.npmjs.com/package/@fleet-sdk/blockchain-providers)

Ergo Blockchain data providers.

## Build

```sh
pnpm --filter blockchain-providers build
```

## Test

```sh
pnpm test:unit blockchain-providers
```
npm package: @fleet-sdk/common
Description: Internal utility functions, constants and types shared across @fleet-sdk packages.
Latest version: 0.10.0

# @fleet-sdk/common [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/common)](https://www.npmjs.com/package/@fleet-sdk/common)

Internal utility functions, constants and types shared across @fleet-sdk packages.
npm package: @fleet-sdk/compiler
Description: Sigma.JS powered ErgoScript compiler.
Latest version: 0.12.0

# @fleet-sdk/compiler [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/compiler)](https://www.npmjs.com/package/@fleet-sdk/compiler)

Sigma.JS powered ErgoScript compiler.

## Installation

```bash
npm install @fleet-sdk/compiler
```
npm package: @fleet-sdk/crypto
Description: Ergo blockchain crypto primitives.
Latest version: 0.11.0

# @fleet-sdk/crypto [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/crypto)](https://www.npmjs.com/package/@fleet-sdk/crypto)

Ergo blockchain crypto primitives.
npm package: @fleet-sdk/graphql-client
Description: Blockchain data client for ergo-graphql
Latest version: 0.0.0

# @fleet-sdk/graphql-client [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/graphql-client)](https://www.npmjs.com/package/@fleet-sdk/graphql-client)

Blockchain data client for ergo-graphql.

## Build
```sh
pnpm --filter graphql-client build
```

## Test
```sh
pnpm test:unit graphql-client
```
npm package: @fleet-sdk/mock-chain
Description: Mock chain for Ergo Smart Contracts testing.
Latest version: 0.12.0

# @fleet-sdk/mock-chain [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/mock-chain)](https://www.npmjs.com/package/@fleet-sdk/mock-chain)

Mock chain for Ergo Smart Contracts unit testing.
npm package: @fleet-sdk/serializer
Description: Ergo constant serializer and parser.
Latest version: 0.11.0

# @fleet-sdk/serializer [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/serializer)](https://www.npmjs.com/package/@fleet-sdk/serializer)

Ergo constant serializer and parser.
npm package: @fleet-sdk/wallet
Description: Key management and signature for Ergo Platform.
Latest version: 0.12.0

# @fleet-sdk/wallet [![License](https://badgen.net/github/license/fleet-sdk/fleet/)](https://github.com/fleet-sdk/fleet/blob/master/LICENSE) [![npm](https://badgen.net/npm/v/@fleet-sdk/wallet)](https://www.npmjs.com/package/@fleet-sdk/wallet)

Key management and signature for Ergo Platform.
npm package: @fleetbase/ember-accounting
Description: Updated port of the great accounting.js library to ES6 modules that integrates seamlessly with ember-cli
Author: Fleetbase Pte Ltd
Latest version: 0.0.1

# @fleetbase/ember-accounting

This is a fork of [ember-cli-accounting](https://github.com/milindalvares/ember-cli-accounting) which was a port of the great [accounting.js](https://github.com/openexchangerates/accounting.js) library to
ES6 modules that integrates seamlessly with ember-cli and the Fleetbase ecosystem.

## Installation

Just add like any other ember-cli addon:

```bash
npm install @fleetbase/ember-accounting
```

## Ember compatiblity

Compatible with Ember version 4.0 and above

## Usage

### Accounting functions

You no longer need to access the global accounting, you can import only what you need:

```js
import formatMoney from '@fleetbase/ember-accounting/format-money'
```

Although you can import everything as expected:

```js
import accounting from '@fleetbase/ember-accounting'
```

### Handlebars helpers

This addon also registers 2 handy helpers in your application: `format-number` and `format-money`.

You can set options using bound or unbound options like this:

```hbs
{{format-money price symbol=selectedCurrency format="%v %s"}} <!-- "123.45 £" -->
```

Any option not set will have the usual default value:

```hbs
{{format-number "1234.567" precision=2}} <!-- "1,234.57" -->
```

### Config default options

You can use an initializer to set some default values at initializations and avoid having to 
repeat over and over the options in the helpers.

Use something like this:
```js
// app/initializers/accounting.js
import { currency, number } from '@fleetbase/ember-accounting/settings';

export default {
  name: 'accounting.js',
  initialize: function() {
    currency.symbol = "€";
    number.decimal = ",";
    number.thousand = ".";
  }
};
```

## Differences with accounting.js

Although this is almost a 1:1 port of accountant.js, there is a few differences:

* Each function of accountant.js lives in its own module, so you can only import those functions you want to use.
* Removed some polyfills for `Array.isArray`, `Array.prototype.map` and `Object.prototype.toString`.
They are not required in modern browsers, and ember.js (unless you opt-out with `EXTEND_PROTOTYPES = false`) already provides polyfills for those functions.
* More tests than the original.
* Enforced jshint. Cleaner code.

## Documentation

This library does not make any change in the public api of accounting.js, so you can read the official
documentation [here](http://openexchangerates.github.io/accounting.js/)