open-index/open-npm huggingface dataset:
npm package: @hypercolor/create-hc-server
Description: Used by the team at Hypercolor to quickly spin up a backend express server
Author: Seth Uschuk
Latest version: 1.0.0

# Hypercolor Create Express Server

## Table of Contents

- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [License](LICENSE)
- [More Information](#more-information)
    - [Toolchain](#toolchain)
    - [Project Repository](#project-repository)
    - [Organization Repository](#organization-repository)

## Introduction

This tool is used by the team at Hypercolor Digital to quickly spin up a new backend server using our standard infrastructure practices. This tool uses TypeScript, Express, Postgres, AWS SQS and MongoDB. 

## Installation

Install this package using your package manager of choice.

- NPM
    - `npm i -g @hypercolor/create-hc-server`
- Yarn
    - `yarn global add @hypercolor/create-hc-server`

## Usage
### Step 1: Create Your New App

After installing the package, you can run the following command to create a new project.
```terminal
npx create-hc-server my-server-name
```

### Step 2: Finalize your configuration

Now that the package has been initialized, we need to either connect our datasbases and workers, or remove them from the package. 

- If you are not using an AWS SQS worker instance, delete the `/src/worker` directory and remove the `SQS_URL_ASYNC_WORKER` declaration in `/src/util/config.ts`.
  - open the `.env` file at the root of the project, and add the URL strings for your MongoDB and Postgres databases.
    - NOTE: The keys in the `.env` file need to exactly match the declarations in `/src/util/config.ts`.

### Step 3: Add an API Endpoint
Visit `/src/routes/api/v1/hello/get.ts` to see an example of how to add a new API endpoint controller class. The pattern for this server architecture is that requests pass through a controller, into a service file to do some work, and then return back out of the same controller it was entered through.

Example:
```typescript
import { Controller } from "../../../classes/controller";
import { UserService } from "../../../services/user-service";
import { Mapper } from "../../../util/mapper";

export class GetUsersController extends Controller {
  public async handleRequest() {
    const users = await UserService.getUsers();
    return Mapper.mapOutput(users, UserDto);
  }
}
```

### Step 4: Run your server

Build your server:
```terminal
nvm use && yarn build
```

Run your server:
```terminal
yarn start
```

## Misc Info

### Toolchain

- TypeScript
- MongoDB
- Postgres
- AWS SQS
- Express

#### [Project Repository](https://github.com/hypercolor/create-express-server)

#### [Organization Repository](https://github.com/hypercolor/)
npm package: @hypercolor/envconfig
Description: Use decorators to pull in configuration data from environment variables or volume mounts.
Author: Seth Uschuk
Latest version: 1.0.16

# @hypercolor/envconfig

## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Usage](#usage)
- [License](LICENSE)
- [More Information](#more-information)
    - [Toolchain](#toolchain)
    - [Project Repository](#project-repository)
    - [Organization Repository](#organization-repository)

## Introduction
Use decorators to pull in configuration data from environment variables or volume mounts. Use the "fail fast" principle to ensure that all required variables are present before the application starts.

Adding the `@requiredEnv` or `@optionalEnv` decorator to a variable `HOST_URL` will do the following:
* If `process.env.HOST_URL` is defined, use that value
* If a volume mount is present at `/etc/config/env/HOST_URL`, use that value
* If a volume mount is present at `/etc/config/sec/HOST_URL`, use that value
* For `@requiredEnv`, if none of the above are present, throw an error

## Installation
- NPM
    - `npm i @hypercolor/envconfig`
- Yarn
    - `yarn add @hypercolor/envconfig`

## Usage

```typescript
import {requiredEnv} from '@hypercolor/envconfig';

export class ConfigVariables {
  @requiredEnv() public ENVIRONMENT_NAME: string;
  @requiredJsonEnv() public SOME_PRIVATE_KEY_JSON: IPrivateKeyJson;
  @optionalEnv() public DEBUG?: string;
}

```


## More Information

#### [Project Repository](https://github.com/hypercolor/envconfig)

#### [Organization Repository](https://github.com/hypercolor/)
npm package: @hypercolor/http-errors
Description: Custom HTTP Error Class used by the team at Hypercolor to provide consistent HTTP Error formatting between services for a given project.
Author: Seth Uschuk
Latest version: 0.0.1

# Hypercolor HTTP Errors

## Table of Contents
  - [Introduction](#introduction)
  - [Installation](#installation)
  - [Usage](#usage)
  - [License](LICENSE)
  - [More Information](#more-information)
    - [Project Repository](#project-repository)
    - [Organization Repository](#organization-repository)
    
## Introduction
This tool is used by the team at Hypercolor to provide consistent HTTP Error formatting between services for a given project.

## Installation
  - NPM 
    - `npm i @hypercolor/http-errors`
  - Yarn 
    - `yarn add @hypercolor/http-errors`
  
## Usage
Example:
```typescript
import { NotFoundError } from '@hypercolor/http-errors';

export class Service {
    public async findSomething(id: number) {
        const found = await this.findSomething(id);
        if (!found) {
            throw new NotFoundError('Something not found with ID: ' + id);
        }
        return found;
    }
}

```
## More Information

#### [Project Repository](https://github.com/hypercolor/http-errors)

#### [Organization Repository](https://github.com/hypercolor/)
npm package: @hypercolor/promise-queue
Description: Used by the Hypercolor Digital team to support concurrent looping over an array. Supports a concurrency count to control how many promises may be resolved at once
Author: Seth Uschuk
Latest version: 0.0.8

# Hypercolor Promise Queue

## Table of Contents
  - [Introduction](#introduction)
  - [Installation](#installation)
  - [Usage](#usage)
  - [License](LICENSE)
  - [More Information](#more-information)
    - [Toolchain](#toolchain)
    - [Project Repository](#project-repository)
    - [Organization Repository](#organization-repository)
    
## Introduction
This tool is used by the team at Hypercolor Digital to loop through a list of promises and execute them in a queue. This is useful for when you have a list of promises that you want to execute in a specific order, but you don't want to wait for the previous promise to resolve before executing the next one. Additionally, this tool allows you to set a maximum number of concurrent promises that can be executed at any given time.

## Installation
  - NPM 
    - `npm i @hypercolor/promise-queue`
  - Yarn 
    - `yarn add @hypercolor/promise-queue`
  
## Usage
Example:
```typescript
import { PromiseQueue } from '@hypercolor/promise-queue';

const exampleFunction = async (array: any[]) => {
    /*
    Loop through the array and execute a promise for each item.
    Accepts argument for maxConcurrent Promises to process.
    */
  
    //Void Returning Example:
    await new PromiseQueue(1).runall(array.map((item, index) => async () => {
        //do something with the item
        await doSomething(item);
        console.log("Processed item " + index + 1 + ' of ' + array.length + ' items.);
    }));
    
    // Return Array of Processed Items:
    const results = await new PromiseQueue(1).runall(array.map((item, index) => async () => {
        //do something with the item
        const result = doSomethingAndReturnResult(item);
        console.log("Processed item " + index + 1 + ' of ' + array.length + ' items.);
        return result;
    }));
};
```
## More Information
### Toolchain
- TypeScript
- p-Queue

#### [Project Repository](https://github.com/hypercolor/promise-queue

#### [Organization Repository](https://github.com/hypercolor/)
npm package: @hypercubed/cdoc
Description: cDoc CLI
Latest version: 1.0.0

# cDoc

cDoc is a super simple documentation tool.  cDoc extracts comments from source code and creates an identical directory tree in the target directory that contains the extracted comments.

## Installation

```bash
npm install -g @hypercubed/cdoc
```

## Comment formatting rules

Currently cDoc extracts multi-line comments.  It does not extract single-line comments.  By default, cDoc will extract comments for js and js-ish files (js, mjs, ts, etc).  Other languages are supported by including additional file extensions (see CLI below).  Language-specific comment syntax [can be found here](https://github.com/nknapp/comment-patterns/blob/master/docs/languages.md).

## CLI

``` 
  Usage:
    cdoc [source] [target] - extract comments from source files

  Options:
    --ext [ext]   - specify the source file extensions (comma separated, default: ts,js,tsx,jsx,mjs)
    --out [ext]   - specify the output file extension (default: md)
    --dry         - dry run
    --silent      - silent mode
```

## License

This project is licensed under the MIT License - see the LICENSE file for details
npm package: @hypercubed/replit
Description: sometimes you need a repl (inspired by http://defunkt.io/repl/)
Author: Jayson Harshbarger
Latest version: 0.0.3

replit [![Build Status](https://secure.travis-ci.org/Hypercubed/replit.png?branch=master)](https://travis-ci.org/Hypercubed/replit) [![NPM version](https://badge.fury.io/js/replit.png)](http://badge.fury.io/js/replit)
=============

sometimes you need a repl (inspired by http://defunkt.io/repl/)

# Description
`replit` wraps a non-interactive shell command in an interactive read-eval-print-loop (repl) prompt.
Each line you type into the prompt is executed as arguments to command.
Anything written to standard output or standard error by the command is displayed.

## Status
WIP

# Installation

```
	$ npm install -g @hypercubed/replit
```

# Usage

```
	Usage: replit [options] <cmd>

	Options:

	-h, --help     output usage information
	-V, --version  output the version number
```

# Example

```
replit echo
```

# License

Copyright (c) 2013-2018 Jayson Harshbarger
[MIT License](http://en.wikipedia.org/wiki/MIT_License)

# Acknowledgments

Built using [generator-commader](https://github.com/Hypercubed/generator-commander), inspired by [http://defunkt.io/repl/](http://defunkt.io/repl/).
npm package: @hyperdart/backend
Description: hyperDart backend for dart development
Author: hyperDart
Latest version: 2.0.5

# @hyperdart/backend

Used for creating the frame for sandbox testing of Darts

## Installation

```sh
npm install --save @hyperdart/backend
```

## Usage

```js
const hDBackend = require('@hyperdart/backend');
const hDConfig = require('hyperdart.config')

function (req, res) {
	res.send(hDBackend.createDartFrame(hDConfig))
}
```
npm package: @hyperdart/frontend
Description: hyperDart frontend for dart development
Author: hyperDart
Latest version: 2.0.10

# @hyperdart/frontend

Used for creating the HOC for darts before publishing to hyperDart

## Installation

```sh
npm install --save @hyperdart/frontend
```

## Usage

```js
import { withHD } from '@hyperdart/frontend';

const newDart = (props) => {
	...
	...
}

export default withHD (newDart)
```
npm package: @hyperdart/sandbox
Description: hyperDart sandbox for testing darts
Author: hyperDart
Latest version: 2.0.7

# @hyperdart/sandbox

Sandbox for dart development and testing on localhost

## Installation

```sh
npm install --save @hyperdart/sandbox
```

## Usage

```jsx
import React from 'react'
import ReactDOM from 'react-dom'
import { HDSandbox } from '@hyperdart/sandbox'
import hDConfig from 'hd-test-component/hyperdart.config'
import defaultSearchData from 'hd-test-component/searchData.json'

ReactDOM.render(<HDSandbox config={hDConfig} searchData={defaultSearchData}/>, document.getElementById('root'))
```
npm package: @hyperdev-tech/hyperpay-cobranca
Description: Esse projeto disponibiliza o componente de cobrança da Hyperpay para pagamento via Pix, Boleto e Cartão de Crédito.
Latest version: 1.0.1

# Hyperpay Cobrança

Esse projeto disponibiliza o componente de cobrança da Hyperpay para pagamento via Pix, Boleto e Cartão de Crédito.
npm package: @hyperdivision/btc-transaction-tail
Description: Tails transactions on the Bitcoin blockchain
Author: Hyperdivision ApS
Latest version: 2.1.0

# `@hyperdivision/btc-transaction-tail`

[![Build Status](https://travis-ci.com/hyperdivision/btc-transaction-tail.svg?token=KyDcSdVQn6Rwq16oPikX&branch=master)](https://travis-ci.com/hyperdivision/btc-transaction-tail)

Tails transactions on the Bitcoin blockchain

```
npm install @hyperdivision/btc-transaction-tail
```

## Usage

``` js
const Tail = require('@hyperdivision/btc-transaction-tail')

const tail = new Tail({
  confirmations: 10, // require this many confirmations
  async filter (addr) {
    return isInterestingAddress(addr)
  },
  async transaction (transaction) {
    console.log('found this transaction', transaction)
  },
  async checkpoint (since) {
    // store this since so you can restart from here
  }
})

;(async function () {
  // tail.index is the current block index
  // tail chain since this seq (inclusive)
  await tail.start() // start tailing, will throw if an error is hit
  await tail.scan(424244)
})().catch(console.error)
```

## API

### `const tail = new Tail(opts)`

```js
{
  network: 'main',
  confirmations: 0,
  prefix: null, // Where to store chain data
  // direction can be either IN or OUT symbol
  async filter (addressString, direction) { return true },
  async transaction (bcoin.TX) { },
  async checkpoint (blockHeight) { },
  // Pass options directly to bcoin FullNode
  // May overwrite some of the previous opts
  bcoin: {}
}
```

### `Tail.IN`

Signals a transaction that has a filtered address in the inputs

### `Tail.OUT`

Signals a transaction that has a filtered address in the output

### `tail.start()`

### `tail.scan(since = 0)`

### `tail.stop()`
npm package: @hyperdivision/eth-transaction-indexer
Description: Tails transactions on the Ethereum blockchain and indexes them in a Hyperbee
Author: Hyperdivision
Latest version: 2.1.1

# eth-transaction-indexer

Tails transactions on the Ethereum blockchain and indexes them in a Hyperbee

```
npm install @hyperdivision/eth-transaction-indexer
```

## Usage

``` js
const Indexer = require('eth-transaction-indexer')

const testnet = 'https://ropsten.infura.io/v3/2aa3f1f44c224eff83b07cef6a5b48b5'
const feed = hypercore('./path/to/storage')

// start indexing from block number
const beginAt = 0x899b00

const index = new Indexer(feed, {
  endpoint: testnet
})

// start the indexer
index.start()

// add an address to the index
index.add('0xdea..dbeef')

// get a stream of all the transactions paying to an address
const txns = index.createTransactionStream('0xdea..dbeef')

for await (let tx of txns) console.log(tx)
```

## API

#### `const index = new Indexer(feed, opts)`

Instantiate a new index. Transactions of interest are logged in a Hyperbee written to the hypercore passed in as `feed`. `endpoint` should be an Ethereum HTTP API. `defaultSeq` gives the block number from which to start indexing from.

```js
const opts = {
  endpoint: 'http://...',  // chain backend API
  defaultSeq: 9259777 // start from here if nothing has been stored. defaults to latest
}
```

#### `index.start()`

Start tailing the blockchain.

#### `index.add(addr, [options])`

Begin tracking transactions paying to `addr`. The initial balance of the address will be stored under the key `!addr!<addr>`, subsequent transactions will be added under the key `!tx!<addr>!<block_number>!<tx_number>`.

If you are tracking an ERC20 token, pass `{ token: <token-addr> }` as well.

#### `const str = index.createTransactionStream(addr)`

Retrieve all transactions paying to the address given by `addr`. Returns an live stream of the time ordered transactions with the address' initial balance inserted before the first transaction.

The initial balance is inserted as a tx of the form:
```
{
  value: 0x4572e2,      // initial balance of the address
  blockNumber: 0x899b00 // block number at which the indexer began tracking the address
}
```

Other transactions are full eth transaction objects:
```
{
  blockHash: '0x277dfee78f6b1d8e495e7c25c95e0f2dc36a4ca772b32aa7b1ae7107f21d1351',
  blockNumber: '0x899f1b',
  from: '0x301b695ae7ba03b63828b6668232063bd4c9e0bc',
  gas: '0x5208',
  gasPrice: '0x7aef40a00',
  hash: '0x7cde8e856bf1c73146c64054f0e74acdd05d7ba351693c6aaeca620bcdcfc03e',
  input: '0x',
  nonce: '0x16',
  r: '0xf38ed059c881c3079d445081c09e6f0df7cfa5fa9be1cb830b479fbb1a0327c8',
  s: '0x63830c84ef2b177d9ec488eeb32215363364aa7aade743c403d2a06686b7fc95',
  to: '0x50c7d91e74b0e42bd8bce8ad6d199e4a23c0b193',
  transactionIndex: '0x0',
  v: '0x2a',
  value: '0x5af3107a4000'
}
```
npm package: @hyperdivision/heimdall-pairing
Description: Pair a new user (initator) and an existing user (responder) in Heimdall
Author: Mathias Buus
Latest version: 6.0.7

# heimdall-pairing

Pair a new user (initator) and an existing user (responder) in Heimdall

```
npm install @hyperdivision/heimdall-pairing
```

## Usage

``` js
const { Initiator, Responder } = require('@hyperdivision/heimdall-pairing')

const i = new Initiator({
  keypair,
  profile
})

const r = new Responder({
  propose (key, profile, profileSignature, done) {
    // human validate the profile and propose it on the network
    // then reply back with the server key
    done(null, serverKey)
  })
})

// share the discovery key
r.setDiscoveryKey(i.discoveryKey)

r.on('pin', function (pin) {
  // communicate the security ping to i
  i.setPin(pin)
})

i.on('server-key', function (serverKey) {
  // and you are paired!
  // once the network approves you the server will
  // start replicating with you if you join the swarm using the above key
})
```

## API

#### `i.setProfile(profile)`

Set the profile asynchrously in case you cannot pass one in the constructor

#### `i.on('connected')`

Emitted when it connects to the other peer before it is verified

#### `i.on('verified')`

Emitted when the other peer is verified (the pin matched)

#### `i.on('server-key', serverKey)`

Emitted when the pairing is done and the responder sends the server key

#### `i.on('announcing')`

Emitted when the initiator starts announcing on the network

#### `i.on('error', err)`

Emitted when there was an error in the pairing flow

#### `i.discoveryKey`

Share this discovery key with the responder (3 words)

#### `i.setPin(pin)`

Call this when the responder communicates the pin to you

#### `i.destroy(err)`

Call this to forcefully shutdown the pairing.

#### `r.on('discovery-key', dk)`

Emitted when the discovery key is set on the responder.

#### `r.on('peer', peer)`

Emitted when the responder founds a peer on the DHT that could be the initiator.

#### `r.on('connecting', peer)`

Emitted when the responder tries to connect to peer.

#### `r.on('connected')`

Emitted when the responder established connection with a potential initiator.

#### `r.on('profile', key, profile, profileSignature)`

Emitted when a profile is received from the initiator.

#### `r.on('error', error)`

Emitted when there was an error in the pairing flow.

#### `r.on('server-key', serverKey)`

Emitted when the responder sends the server key.

#### `r.destroy(err)`

Call this to forcefully shutdown the pairing.

#### `bool = Responder.validateDiscoveryKey(dk)`

Static helper to check if a discovery consists of valid words.

## License

MIT
npm package: @hyperdrive-ui/cli
Description: CLI for adding Hyperdrive UI components
Author: Gregoire Stevenard
Latest version: 0.0.1


## Usage

Once built and published:

```bash
# Initialize in a project
npx @hyperdrive-ui/cli init

# Add specific components
npx @hyperdrive-ui/cli add button card
npx @hyperdrive-ui/cli components add button card

# Add all components
npx @hyperdrive-ui/cli add --all

# Force overwrite
npx @hyperdrive-ui/cli add button --force
```

This implementation:
- ✅ Fetches real source code from your GitHub repo
- ✅ Supports all frameworks (React/Solid/Vue)
- ✅ Transforms imports based on user's configuration
- ✅ Has proper error handling and user feedback
- ✅ Works offline after initial fetch (files are cached)
- ✅ Is simple to understand and maintain