open-index/open-npm huggingface dataset:
npm package: @ollie-dev/vtex-io-logger
Description: A logger for VTEX IO apps
Latest version: 0.3.0

# @ollie-dev/vtex-io-logger

`@ollie-dev/vtex-io-logger` is an npm package designed to enhance the logging and observability capabilities for VTEX IO developers and clients. It offers a streamlined and flexible way to integrate advanced logging functionalities into your VTEX IO applications.

## Features

- **Easy Integration**: Quickly add comprehensive logging to your package with minimal setup.
- **Flexible Middleware**: Manually inject the logger at the route level for fine-grained control.
- **Extended Context**: Use `ContextWithOllie` to extend the native `ServiceContext` from VTEX IO with the `ollie` logger.
- **Custom Logger Support**: Easily integrate with external logging systems like Pino and OpenSearch.

## Installation

```bash
npm install @ollie-dev/vtex-io-logger
```

## Usage

### Basic Usage

Simply import and use withFullLogger to add logging to your service:

```typescript
import { withFullLogger } from "@ollie-dev/vtex-io-logger";

// Your service setup
const service = new Service({
  // ... your configurations
});

export default withFullLogger(service);
```

### Typing with ContextWithOllie

Enhance TypeScript support by declaring the global context:

```typescript
import { ContextWithOllie } from "@ollie-dev/vtex-io-logger";

declare global {
  type Context = ContextWithOllie<Clients, State>;
}
```

Then Typescript won't complain if you try to access the logger from the context:

```typescript
export async function myCoolMiddleware(ctx: Context, next: () => Promise<any>) {
  const {
    ollie: { logger },
  } = ctx;

  logger.info({
    message: "Better than console.log() 🎉",
  });

  await next();
}
```

### Custom Logger Integration

To use a custom logger, simply pass it as an argument:

```typescript
import pino from "pino";
const logger = pino();

export default withFullLogger(service, { logger });
```

### Connecting with External Loggers

Integrate with external logging systems like OpenSearch:

```typescript
import pino from "pino";
import pinoOpenSearch from "pino-opensearch";

const streamToOpenSearch = pinoOpenSearch({
  // ... OpenSearch configurations
});

const logger = pino({ level: "error" }, streamToOpenSearch);

export default withFullLogger(service, { logger });
```

Don't forget to create an outbound access policy to your external URL in `manifest.json`

## API

- **withFullLogger**: Automatically adds logging capability to your service.
- **loggerMiddleware**: Allows for manual injection of the logger at the route level.
- **ContextWithOllie**: Extends the native `ServiceContext` with `ollie` logger for better TypeScript support.

## Contributing

Contributions are welcome! Please see our [Contributing](https://github.com/brunorodmoreira/ollie-observability/blob/main/CONTRIBUTING.md) Guide for more details.

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/brunorodmoreira/ollie-observability/blob/main/LICENSE) file for details.
npm package: @olliecaine/env-loader
Description: A simple tree-shakable TypeScript library boilerplate
Author: olivercaine
Latest version: 0.0.0

[![Node.js CI](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml/badge.svg)](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# TypeScript Library Boilerplate

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: jest
- **code coverage**: jest (optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run tests and coverage report
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Jest as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

PRs welcome

# License

MIT
npm package: @olliecaine/env-vars
Description: Load and validate environment variables using TypeScript and Zod
Author: olivercaine
Latest version: 1.0.3

[![Node.js CI](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml/badge.svg)](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml)
[![Coverage Status](https://coveralls.io/repos/github/olivercaine/typescript-library-boilerplate/badge.svg?branch=main)](https://coveralls.io/github/olivercaine/typescript-library-boilerplate?branch=main)

# Env Vars

Load and validate environment variables using TypeScript and Zod

# Stacks
- **unit test**: jest
- **code coverage**: jest (optional)
- **ci**: travis

# How to use?

```typescript
import { loadEnv } from '@olliecaine/env-vars'

const env = loadEnv(z.object({
  API_URL: z.string().url().default('http://localhost:8080'),
}))

console.log(env.API_URL)
```


# Commands list
````
yarn test           // run tests and coverage report
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Jest as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

PRs welcome

# License

MIT
npm package: @olliecaine/fetch
Description: Typed methods for REST requests
Author: goldenbearkin
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate.svg?branch=master)](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# TypeScript Library Boilerplate

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliecaine/form-validation
Description: A simple tree-shakable TypeScript library boilerplate
Author: goldenbearkin
Latest version: 1.0.4

[![Build Status](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate.svg?branch=master)](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# TypeScript Library Boilerplate

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliecaine/months
Description: A simple months enum
Author: goldenbearkin
Latest version: 1.0.2

[![Build Status](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate.svg?branch=master)](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# TypeScript Library Boilerplate

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliecaine/reducers
Description: A simple tree-shakable TypeScript library boilerplate
Author: goldenbearkin
Latest version: 1.0.19

[![Node.js CI](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml/badge.svg)](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# @olliecaine/reducers

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Example type-safe Redux reducer:

```
import { createAction } from '@olliecaine/reducers'
import { ActionsUnion, IReduxReducer } from '@olliecaine/reducers/types'

// ------------------------------------
// Action types
// ------------------------------------
enum ActionTypes {
  SHOULD_INCREMENT_COUNTER = 'SHOULD_INCREMENT_COUNTER',
}

// ------------------------------------
// Action creators
// ------------------------------------
const actions = {
  shouldIncrement: (incrementAmount: number) => createAction(ActionTypes.SHOULD_INCREMENT_COUNTER, incrementAmount),
}

type Actions = ActionsUnion<typeof actions>

// ------------------------------------
// State
// ------------------------------------
const initialState = 0 as number
type State = typeof initialState

// ------------------------------------
// Reducer
// ------------------------------------
const reducer = (
  state = initialState,
  action: Actions
): State => {
  switch (action.type) {
    case ActionTypes.SHOULD_INCREMENT_COUNTER:
      return state + action.payload
    default:
      return state
  }
}

// ------------------------------------
// Expose
// ------------------------------------
export const counterReducer: IReduxReducer<typeof reducer, ReturnType<typeof reducer>, typeof actions> = {
  initialState,
  reducer,
  actions,
}
```

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliecaine/storybook-utils
Description: A simple tree-shakable TypeScript library boilerplate
Author: goldenbearkin
Latest version: 0.0.2

[![Node.js CI](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml/badge.svg)](https://github.com/olivercaine/typescript-library-boilerplate/actions/workflows/node.js.yml)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# @olliecaine/storybook-utils

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliecaine/tsconfig
Description: Shared tsconfig.json
Author: Oliver Caine
Latest version: 1.0.28

# @olliecaine/tsconfig

> Shared [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) for frontend projects

## Install

```sh
npm install --save-dev @olliecaine/tsconfig
```

*This config requires TypeScript 4 or later.*

## Usage

`tsconfig.json`

```json
{
	"extends": "@olliecaine/tsconfig",
	"compilerOptions": {
		"outDir": "dist"
	}
}
```

When you are targeting a higher version of Node.js, check the relevant ECMAScript version and add it as `target`:

```json
{
	"extends": "@olliecaine/tsconfig",
	"compilerOptions": {
		"outDir": "dist",
		"target": "ES2023"
	}
}
```
npm package: @olliecaine/utils
Description: A simple tree-shakable TypeScript library boilerplate
Author: goldenbearkin
Latest version: 1.0.3

[![Build Status](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate.svg?branch=master)](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# @olliecaine/utils

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
yarn health-check   // concurrently runs lint, test and lint:fix
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliecaine/utils-array
Description: A simple tree-shakable TypeScript library boilerplate
Author: goldenbearkin
Latest version: 1.0.1

[![Build Status](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate.svg?branch=master)](https://travis-ci.org/goldenbearkin/typescript-library-boilerplate)
[![Coverage Status](https://coveralls.io/repos/github/goldenbearkin/typescript-library-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/goldenbearkin/typescript-library-boilerplate?branch=master)

# @olliecaine/utils-array

A simple tree-shakable TypeScript library boilerplate

# Stacks
- **unit test**: mocha, chai
- **code coverage**: nyc, wallabyjs(optional)
- **ci**: travis

# How to use?

Just clone it and use it.

# Commands list
````
yarn test           // run test(mocha) and coverage report(nyc)
yarn test:watch     // run test on watch mode (without coverage report)
yarn build          // build for both esm (ES5 + ES2015 module) and ES5 UMD bundle, at dist folder.
yarn lint           // run lint against lib and test
yarn health-check   // concurrently runs lint, test and lint:fix
````

# Testing

This boilerplate use Mocha as test framework.

# Reference
[http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types](http://blog.mgechev.com/2017/01/21/distributing-an-angular-library-aot-ngc-types/)

# Please help

Welcome for PR

# License

MIT
npm package: @olliejones/webrtc-swarm
Description: Create a swarm of p2p connections using webrtc and a signalhub
Author: Mathias Buus
Latest version: 2.9.3

# webrtc-swarm

> Create a swarm of p2p connections using webrtc and a
[signalhub](https://github.com/mafintosh/signalhub).

```
npm install webrtc-swarm
```

## Usage

``` js
var swarm = require('webrtc-swarm')
var signalhub = require('signalhub')

var hub = signalhub('swarm-example', ['http://yourdomain.com'])

var sw = swarm(hub, {
  wrtc: require('wrtc') // don't need this if used in the browser
})

sw.on('peer', function (peer, id) {
  console.log('connected to a new peer:', id)
  console.log('total peers:', sw.peers.length)
})

sw.on('disconnect', function (peer, id) {
  console.log('disconnected from a peer:', id)
  console.log('total peers:', sw.peers.length)
})
```

## API

```js
let swarm = require('webrtc-swarm')
```

### var sw = swarm(hub, opts)

Creates a new webrtc swarm using
[signalhub](https://github.com/mafintosh/signalhub) `hub` for discovery and
connection brokering.

Valid keys for `opts` include:

- `wrtc` - (optional) a reference to the `wrtc` library, if using Node.
- `uuid` - (optional) a unique identifier for this peer. One is generated for
you if not supplied.
- `maxPeers` - (optional) the maximum number of peers you wish to connect to.
Defaults to unlimited.
- `wrap` - (optional) a function that can modify the WebRTC signaling data
before it gets send out. It's called  with `wrap(outgoingSignalingData,
destinationSignalhubChannel)` and must return the wrapped signaling data.
- `unwrap` - (optional) a function that can modify the WebRTC signaling data
before it gets processed. It's called  with `unwrap(incomingData,
sourceSignalhubChannel)` and must return the raw signaling data.

Additional optional keys can be passed through to the underlying
[simple-peer](https://www.npmjs.com/package/simple-peer) instances:

- `channelConfig` -  custom webrtc data channel configuration (used by
`createDataChannel`)
- `config` - custom webrtc configuration (used by `RTCPeerConnection`
constructor)
- `stream` - if video/voice is desired, pass stream returned from
`getUserMedia`


### sw.close()

Disconnect from swarm

### sw.on('peer-connecting', peer, id)

Fires when a connection is being established to a new peer `peer`, with unique id `id`.

### sw.on('peer|connect', peer, id)

`peer` and `connect` are interchangeable. Fires when a connection has been
established to a new peer `peer`, with unique id `id`.

### sw.on('disconnect', peer, id)

Fires when an existing peer connection is lost.

`peer` is a [simple-peer](https://www.npmjs.com/package/simple-peer) instance.

### sw.on('close')

Fires when all peer and signalhub connections are closed

### sw.peers

A list of peers that `sw` is currently connected to.

### swarm.WEBRTC_SUPPORT

Detect native WebRTC support in the javascript environment.

```js
var swarm = require('webrtc-swarm')

if (swarm.WEBRTC_SUPPORT) {
  // webrtc support!
} else {
  // fallback
}
```

## License

MIT
npm package: @olliemurray/cryptosimmod
Description: simulate the operation of cryptosatellites
Author: Gil Shotan
Latest version: 0.3.6

# Cryptosat Simulator

Our mission at [Cryptosat](cryptosat.io) is to build satellites that power cryptographic, blockchain and ledger applications. We believe that satellites possess unique properties that make them well suited for these tasks and by launching such computational platforms into space we can unlock new and exciting opportunities in the realm of security and crypto.

This repository contains a simulation library which simulates the operation of Cryptosat. This includes simulation of the satellite orbital trajectory and its position over time.
As a developer, you can learn about the cryptographic functions our satellites will provide and start integrating your project and protocols with our APIs.
When you (and Cryptosat) are ready - you can turn the switch to start communicating with the actual satellite.

# Installation

The library is published at the yarn online package index as [`@cryptosat/cryptosim`](https://yarnpkg.com/package/@cryptosat/cryptosim). To include it in your own project run:

    yarn install @cryptosat/cryptosim

# Usage

You can import the required classes from the library as needed. The snippet below demonstrates how to construct a cryptosat API client for a single satellite following the celestial orbit of the international space station. Check out the online [tutorial](https://simulator.cryptosat.io) to get started using the cryptosat API.

    const clock = new SimulatedClock(new Date());
    clock.play();
    const universe = new Universe(clock);
    const ISS_TLE = [
      '1 25544U 98067A   21027.77992426  .00003336  00000-0  68893-4 0  9991',
      '2 25544  51.6465 317.1909 0002399 302.6503 164.1536 15.48908950266831',
    ];
    const sat = new Satellite(universe, 'crypto1', ISS_TLE[0], ISS_TLE[1]);
    const gsnetwork = GroundStationNetwork.load(
        universe, require('@cryptosat/cryptosim/data/rbcNetwork'));
    const service = new MainService(universe);
    sat.bindService('main', service);
    cryptosat = new MainClient(universe, sat, gsnetwork, 'main');


# Development

## Installation

After cloing the directory install the project dependencies using:

    yarn install

## Testing

The project uses the [jest](https://jestjs.io/) testing framework. To execute the test suite run:

    yarn test

## Lint

Check for lint errors with:

    yarn lint
npm package: @ollierelph/and-or
Description: <h2 align="center">and-or</h2>
Author: Ollie Relph
Latest version: 0.0.4

<h2 align="center">and-or</h2>

<p align="center">
Available now
</p>

`pnpm add @ollierelph/and-or` or `pnpm add and-or`

## What's this?

`and-or` allows you to build 2d arrays of options to iterate over

```typescript
import {Single} from "and-or4t"

const one = new Single("ONE");
const two = new Single("TWO");
const three = new Single("THREE");

console.log(one.and(two).and(three));
/**
 * Gives us:
 * [["ONE", "TWO", "THREE"]]
 */

console.log(one.or(two).or(three));
/**
 * Gives us:
 * [["ONE"], ["TWO"], ["THREE"]]
 */

console.log(one.or(two).and(three));
/**
 * Gives us:
 * [["ONE", "THREE"], ["TWO", "THREE"]]
 */
```
npm package: @ollierelph/result4t
Description: <h2 align="center">result4t</h2>
Author: Ollie Relph
Latest version: 0.7.0

<h2 align="center">result4t</h2>

<p align="center">
Available now
</p>

`pnpm add @ollierelph/result4t` or `pnpm add result4t`

## What's this?

`result4t` takes some pointers from the wonderful [result4k](https://github.com/fork-handles/forkhandles/tree/trunk/result4k)

It's a replacement for `Promise` that gives us a strongly-typed error mode.

## An example

```typescript
import fs from "node:fs";

const readFileAndReverse = () =>
  fs
    .readFile("./boom.txt")
    .then((contents) => contents.split("\n").reverse().join("\n"));

readFileAndReverse()
  .then((reversedFile) => {
    console.log(reversedFile);
    process.exit(0);
  })
  .catch((error: unknown) => {
    console.error(error);
    process.exit(1);
  });
```

in `result4t`:

```typescript
import fs from "node:fs";
import { TaskResult } from "./TaskResult";

const readFileAndReverse = () =>
  TaskResult.ofPromise(
    () => fs.readFile("./boom.txt"),
    (err: unknown) => new Error("Unable to find file"),
  ).map((contents) => contents.split("\n").reverse().join("\n"));

readFileAndReverse()
  .peek((reversedFile) => {
    console.log(reversedFile);
    process.exit(0);
  })
  .peekLeft((error) => {
    // ^--- typed as Error
    console.error(error);
    process.exit(1);
  })
  .run();
```
npm package: @ollink/in-browser
Description: inject any file as string or json into the browser to work on it in the console
Author: Robin Link
Latest version: 1.0.4

# in-browser

Simple utility tool that injects a .json file ( or any text file ) into your default browser for you to work on.
Useful if you want to perform a quick search or other operations on a large json ( e.g. geojson) that might crash or freeze your browser if you simply paste it into the console.

## Install

```
npm install -g in-browser
```

## Usage

Opening the only .json file in the current directory doesn't require any arguments :

```
in-browser
```

If you have several .json files and want to open a specific one, pass it as the first argument :

```
in-browser myJson.json
```
npm package: @ollion/custom-elements-manifest-to-types
Description: Utility which converts [custom-elements-manifest](https://github.com/webcomponents/custom-elements-manifest) into Vue2,Vue3, React template type definitions.
Latest version: 2.0.5

# custom-elements-manifest-to-types

Utility which converts [custom-elements-manifest](https://github.com/webcomponents/custom-elements-manifest) into Vue2,Vue3, React template type definitions.
npm package: @ollion/flow-code-editor
Description: Code editor component for flow library
Author: @ollion
Latest version: 1.1.1

# Flow Code Editor

The Flow code editor is built on the Flow design framework ([website](https://flow.ollion.com/) / [github](https://github.com/ollionorg/flow-core)) using [Monaco Editor](https://microsoft.github.io/monaco-editor/)

# Installation

### 1️⃣ Install flow code editor dependency

```
npm i --save @ollion/flow-code-editor
```

**Note:** after installation, re-start your application.

<br>

### 2️⃣ Import flow-code-editor into your project

Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-code-editor";
```

<br>

### 3️⃣ For a typescript enabled project (optional)

**Note:** After adding, re-start your application. Make sure you are using version >4.5

**For Vue 3:**
Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-code-editor/dist/types/vue3";
```

<details>
<summary>For Vue 2</summary>

Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-code-editor/dist/types/vue2";
```

</details>

<details>
<summary>For React</summary>

**React**: Include react type in `tsconfig.json` file like below.

```json
"include": ["src", "./node_modules/@ollion/flow-code-editor/dist/types/react.ts"]
```

</details>
<br>

# Integration in Vite App

### Add following code snippet in `vite.config.ts`

```typescript
import * as fs from "fs";
import * as path from "path";

const copyDir = (src, dest, callback?: (er: Error) => void) => {
	const copy = (copySrc, copyDest) => {
		fs.readdir(copySrc, (err, list) => {
			if (err) {
				callback(err);
				return;
			}
			list.forEach(item => {
				const ss = path.resolve(copySrc, item);
				fs.stat(ss, (err, stat) => {
					if (err) {
						callback(err);
					} else {
						const curSrc = path.resolve(copySrc, item);
						const curDest = path.resolve(copyDest, item);

						if (stat.isFile()) {
							fs.createReadStream(curSrc).pipe(fs.createWriteStream(curDest));
						} else if (stat.isDirectory()) {
							fs.mkdirSync(curDest, { recursive: true });
							copy(curSrc, curDest);
						}
					}
				});
			});
		});
	};

	fs.access(dest, err => {
		if (err) {
			fs.mkdirSync(dest, { recursive: true });
		}
		copy(src, dest);
	});
};

copyDir("node_modules/@ollion/flow-code-editor/dist/assets", "assets");
```

### add specify `assets` folder in `assetsInclude` property.

For example

```typescript
export default defineConfig({
	plugins: [vue()],
	base: "",
	// `assets` folder specified here 👇
	assetsInclude: ["assets"]
});
```
npm package: @ollion/flow-dashboard
Description: Dashboard as code
Author: @ollion
Latest version: 1.1.2

# Flow Dashboard

The Flow dashboard is built on the Flow design framework ([website](https://flow.ollion.com/) / [github](https://github.com/ollionorg/flow-core))

# Installation

### 1️⃣ Install flow dashboard dependency

```
npm i --save @ollion/flow-dashboard
```

**Note:** after installation, re-start your application.

<br>

### 2️⃣ Import flow-dashboard into your project

Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-dashboard";
```

<br>

### 3️⃣ For a typescript enabled project (optional)

**Note:** After adding, re-start your application. Make sure you are using version >4.5

**For Vue 3:**
Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-dashboard/dist/types/vue3";
```

<details>
<summary>For Vue 2</summary>

Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-dashboard/dist/types/vue2";
```

</details>

<details>
<summary>For React</summary>

**React**: Include react type in `tsconfig.json` file like below.

```json
"include": ["src", "./node_modules/@ollion/flow-dashboard/dist/types/react.ts"]
```

</details>
<br>
npm package: @ollion/flow-log
Description: Code editor component for flow library
Author: @ollion
Latest version: 2.1.1

# Flow Log

The Flow Log is built on the Flow design framework ([website](https://flow.ollion.com/) / [github](https://github.com/ollionorg/flow-core)) using [Monaco Editor](https://microsoft.github.io/monaco-editor/)

# Installation

### 1️⃣ Install flow code editor dependency

```
npm i --save @ollion/flow-log
```

**Note:** after installation, re-start your application.

<br>

### 2️⃣ Import flow-log into your project

Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-log";
```

<br>

### 3️⃣ For a typescript enabled project (optional)

**Note:** After adding, re-start your application. Make sure you are using version >4.5

**For Vue 3:**
Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-log/dist/types/vue3";
```

<details>
<summary>For Vue 2</summary>

Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-log/dist/types/vue2";
```

</details>

<details>
<summary>For React</summary>

**React**: Include react type in `tsconfig.json` file like below.

```json
"include": ["src", "./node_modules/@ollion/flow-log/dist/types/react.ts"]
```

</details>
<br>
npm package: @ollion/flow-md-editor
Description: Code editor component for flow library
Author: @ollion
Latest version: 2.1.2

# Flow MD Editor

The Flow md editor is built on the Flow design framework ([website](https://flow.ollion.com/) / [github](https://github.com/ollionorg/flow-core)) using [Monaco Editor](https://microsoft.github.io/monaco-editor/)

# Installation

### 1️⃣ Install flow code editor dependency

```
npm i --save @ollion/flow-md-editor
```

**Note:** after installation, re-start your application.

<br>

### 2️⃣ Import flow-md-editor into your project

Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-md-editor";
```

<br>

### 3️⃣ For a typescript enabled project (optional)

**Note:** After adding, re-start your application. Make sure you are using version >4.5

**For Vue 3:**
Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-md-editor/dist/types/vue3";
```

<details>
<summary>For Vue 2</summary>

Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-md-editor/dist/types/vue2";
```

</details>

<details>
<summary>For React</summary>

**React**: Include react type in `tsconfig.json` file like below.

```json
"include": ["src", "./node_modules/@ollion/flow-md-editor/dist/types/react.ts"]
```

</details>
<br>
npm package: @ollion/flow-table
Description: Table component for flow library
Author: @ollion
Latest version: 2.4.8

# Flow Table

The Flow table is built on the Flow design framework ([website](https://flow.ollion.com/) / [github](https://github.com/ollionorg/flow-core))

# Installation

### 1️⃣ Install flow table dependency

```
npm i --save @ollion/flow-table
```

**Note:** after installation, re-start your application.

<br>

### 2️⃣ Import flow-table into your project

Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-table";
```

<br>

### 3️⃣ For a typescript enabled project (optional)

**Note:** After adding, re-start your application. Make sure you are using version >4.5

**For Vue 3:**
Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-table/dist/types/vue3";
```

<details>
<summary>For Vue 2</summary>

Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-table/dist/types/vue2";
```

</details>

<details>
<summary>For React</summary>

**React**: Include react type in `tsconfig.json` file like below.

```json
"include": ["src", "./node_modules/@ollion/flow-table/dist/types/react.ts"]
```

</details>
<br>
npm package: @ollion/flow-text-editor
Description: Code editor component for flow library
Author: @ollion
Latest version: 0.0.1

# Flow Text Editor

The Flow text editor is built on the Flow design framework ([website](https://flow.ollion.com/) / [github](https://github.com/ollionorg/flow-core)) using [Quill](https://github.com/slab/quill?tab=readme-ov-file)

# Installation

### 1️⃣ Install flow code editor dependency

```
npm i --save @ollion/flow-text-editor
```

**Note:** after installation, re-start your application.

<br>

### 2️⃣ Import flow-text-editor into your project

Paste the below snippet in your project and add your application startup/runtime code to it.

```javascript
import "@ollion/flow-core";
import "@ollion/flow-text-editor";
```

<br>

### 3️⃣ For a typescript enabled project (optional)

**Note:** After adding, re-start your application. Make sure you are using version >4.5

**For Vue 3:**
Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-text-editor/dist/types/vue3";
```

<details>
<summary>For Vue 2</summary>

Copy paste below import types in your `main.ts` file.

```Javascript
import "@ollion/flow-text-editor/dist/types/vue2";
```

</details>

<details>
<summary>For React</summary>

**React**: Include react type in `tsconfig.json` file like below.

```json
"include": ["src", "./node_modules/@ollion/flow-text-editor/dist/types/react.ts"]
```

</details>
<br>
npm package: @ollion/protobufjs-typescript-gen
Description: <a href="https://npmjs.org/package/@cldcvr/protobufjs-typescript-gen"><img src="https://img.shields.io/npm/v/@cldcvr/protobufjs-typescript-gen.svg" alt=""></a> <a href="https://npmjs.org/package/@cldcvr/protobufjs-typescript-gen"><img src="https://img.shi
Author: Nikhil Verma
Latest version: 2.0.7

# @cldcvr/protobufjs-typescript-gen

<a href="https://npmjs.org/package/@cldcvr/protobufjs-typescript-gen"><img src="https://img.shields.io/npm/v/@cldcvr/protobufjs-typescript-gen.svg" alt=""></a> <a href="https://npmjs.org/package/@cldcvr/protobufjs-typescript-gen"><img src="https://img.shields.io/npm/dm/@cldcvr/protobufjs-typescript-gen.svg" alt=""></a>

**@cldcvr/protobufjs-typescript-gen** is a tool which used protocol buffers to generate a Typescript interface. The tool is currently highly opinionated in how it generates files. It internally uses protobuf.js.

**protobuf.js** is a pure JavaScript implementation with [TypeScript](https://www.typescriptlang.org) support for [node.js](https://nodejs.org) and the browser. It's easy to use, blazingly fast and works out of the box with [.proto](https://developers.google.com/protocol-buffers/docs/proto) files!

## Installation

### node.js

```bash
$> npm install @cldcvr/protobufjs-typescript-gen [--save --save-prefix=~]
```

```js
// generate-protocol.js
const { generateProtocol } = require('@cldcvr/protobufjs-typescript-gen');

generateProtocol({
    protocolDir: 'YOUR_PROTOCOL_DIRECTORY',
    outDir: 'YOUR_OUTPUT_DIRECTORY',
});
```

```bash
$> node generate-protocol.js
```

## Example

Please see the examples folder for the structure of the generated interface.