open-index/open-npm huggingface dataset:
npm package: @porkchopsandwich/dsn
Description: DSN URI parsing and stringifying
Author: Cameron Morrow
Latest version: 0.0.4

# @porkchopsandwich/dsn

DSN URI string parsing and stringifying.

## Install

```sh
npm install @porkchopsandwich/dsn
```

## Usage

```js
import { parse, stringify } from "@porkchopsandwich/dsn";

// Parse a DSN URI into elements
const parsed = parse("mysqli://user:p&ssw!rd@hostname:1234/path/to/entity?extra=1");
// -> { protocol: "mysqli", username: "user", "password": "p&ssw!rd", host: "hostname", port: 1234, path: "path/to/entity", query: URLSearchParams }

// Compile a DSN object into a URI string
const dsnUriString = stringify({
    protocol: "arbitrary",
    host: "unprotected.host",
    path: "path/to/dsn/entity"
});
// -> "arbitrary://unprotected.host/path/to/dsn/entity"

```

### `parse(dsnString: string): Dsn | undefined`

`parse()` takes a `string`, and returns either a `Dsn` object (see below), or undefined if it does not look like a DSN URI.

The Dsn string *must* contain a **protocol**, **host** and **path**. It *may* contain a **username**, **password**, **port** and/or **query**.

### `stringify(dsn: Dsn): string`

`stringify()` takes a `Dsn` object (see below) and returns a `string`.

The Dsn object *must* contain a **protocol** `string`, **host** `string` and **path** `string`. It *may* contain a **username** `string`, **password** `string`, **port** `number` and/or **query** `URLSearchParams`.

### `Dsn` object
Dsn objects are returned by `parse()` and taken by `stringify()`. They have the following form:

| Field      | Type              | Notes    |
|------------|-------------------|----------|
| `protocol` | `string`          | Required |
| `host`     | `string`          | Required |
| `path`     | `string`          | Required |
| `username` | `string`          | Optional |
| `password` | `string`          | Optional |
| `host`     | `number`          | Optional |
| `query`    | `URLSearchParams` | Optional |
npm package: @porkchopsandwich/easers
Description: A set of composable easing functions.
Latest version: 1.0.1

# Easers

A set of composable easing functions.

## Installation

```
npm install --save @porkchopsandwich/easers
```

## Use

```typescript
import { linear, cubic, inverse } from "@porkchopsandwich/easers";

// Basic easers take an X value between 0 and 1, and return the matching Y value.
const y = linear(0.3); // => 0.3

// Other easers are higher order functions that operate on other easers
const invertedLinear = inverse(linear);
const y2 = invertedLinear(0.3);

```

## Available easers

### linear(x) => y
Returns the passed X as Y.

### fixedFactory(x) => () => y
Returns an easer that always returns the initial value.

### sineWaveFactory(amplitude = 1, ordinaryFrequency = 1, phase = 0) => (x) => y
Returns an easer that models a sine wave.

### circular(x) => y
Models a circular easing.

### exponential(x) => y
Models an exponential easing.

### powerFactory(power = 1) => (x) => y
Returns an easer that models the passed power easing.

### squared(x) => y
### cubed(x) => y
### quad(x) => y
Convenience easers for powers of 2, 3 and 4.

### bounceFactory(baseline = 2.75) => (x) => y
Returns a 'bounce' easer (based on Robert Penner's easing methods: http://robertpenner.com/easing/)

### elastic(x) => y
Models an elastic easer (based on Robert Penner's easing methods: http://robertpenner.com/easing/)

### doubleArcFactory(max = 1.1) => (x) => y
Returns an easer that models a double arc.

## Higher Order Easers

### reverse(easer) => (x) => y
Returns an easer that flips the X value passed to the `easer` (1 to 0 rather than 0 to 1)

### mirror(easer) => (x) => y
Returns an easer whose which produces a mirrored pair of the `easer`.

### inverse(easer) => (x) => y
Returns an easer that flips the X value passed to the `easer`, AND flips the returned Y value. Effectively mirrors the easer on a diagonal.

### pair(easer1, easer2) => (x) => y
Returns an easer that invokes `easer1` for the first half of the X range, and `easer2` for the second half.

### inOut(easer) => (x) => y
Returns an easer that invokes `easer` normally for the first half of the X range, and the inverse of `easer` for the second half.   

### mean(...easers) => (x) => y
Returns an easer that returns the mean value returned by all the input `easers`.

### sequence(...easers) => (x) => y
Returns an easer that breaks up the X value into a set matching the length of the input `easers`, and calls the appropriate one for the supplied X value.

### set(...easerSets) => (x) => y
Easer Sets are a 3-tuples consisting of an easer, a start x and an end x. Returns an easer that returns the mean of all easers whose set starts before the input X and ends after the input X.  

## Utilities

### toRange(x, min = 0, max = 1) => y
Converts a value between 0 and 1 to one on a range between min and max.

### arrayMean(arrayOfNumbers) => y
Returns the average of all numbers in an array.
npm package: @porkchopsandwich/event-autobus
Description: A simple publish/subscribe event bus written in TypeScript.
Latest version: 1.0.3

# Event Autobus

A simple publish/subscribe event bus written in TypeScript.

Requires support (native or polyfill) for Map/Set.

## Installation

```
npm install --save @porkchopsandwich/event-autobus
```

## Use

### JavaScript

```javascript
import { eventAutobus } from "@porkchopsandwich/event-autobus";

// Create a bus
const bus = eventAutobus();

// Add a subscription, returns an object that can be used to unsubscribe later
const subscription = bus.subscribe("eventName", (payload) => {
    // Act on payload
});

// Invoke listeners
bus.publish("eventName", {...payload});

// Unsubscribe later
subscription.unsubscribe();
```

### TypeScript

Use TypeScript to get typings on event names and payloads.

```typescript
import { eventAutobus, IEventAutobusTypeAndPayload } from "@porkchopsandwich/event-autobus";

// Define an interface describing the events and their payloads
interface IEvent1Payload {
    value: string;
}

interface IBusTypeAndPayload extends IEventAutobusTypeAndPayload {
    eventName1: IEvent1Payload;
}

// Create a bus
const bus = eventAutobus<IBusTypeAndPayload>();

// TypeScript automatically checks event names, AND types the payload
const subscription = bus.subscribe("eventName1", (payload) => {
    // Act on payload
});

// Invoke listeners
bus.publish("eventName1", { value: "Hello" });

// Unsubscribe later
subscription.unsubscribe();
```
npm package: @porketta.io/porcli
Description: Command Line for [hakuna.cloud](https://hakuna.cloud), formerly [Porketta.IO](https://www.porketta.io)
Latest version: 2.0.12
Deprecated: Package has been moved to @hakuna.cloud/cli

# PORCLI

Command Line for [hakuna.cloud](https://hakuna.cloud), formerly [Porketta.IO](https://www.porketta.io)

Porketta cut your monthly cloud bill by powering off unused compute resources (the `zombies` ) when are running idle and are not serving requests,
and by starting them as soon as there is incoming traffic.

Read more at https://docs.hakuna.cloud

# Usage

## Installation
`npm install -g @porketta.io/porcli`

## Login/Signup
Login or signup using the cli. 
`porcli user login`


### Usage
```
porcli <command> <subcommand> [<subcommand> ...] [parameters]
```

Each command has it own help: `porcli <command> -h`
npm package: @porky-prince/imagemin-mozjpeg
Description: Imagemin plugin for mozjpeg
Author: Kevin Mårtensson
Latest version: 9.0.0

# imagemin-mozjpeg

> [Imagemin](https://github.com/imagemin/imagemin) plugin for [mozjpeg](https://github.com/mozilla/mozjpeg)

> use https://npm.taobao.org/mirrors/mozjpeg-bin/ as downlaod source

## Install

```
$ npm install imagemin-mozjpeg
```

## Usage

```js
const imagemin = require('imagemin');
const imageminMozjpeg = require('imagemin-mozjpeg');

(async () => {
	await imagemin(['images/*.jpg'], {
		destination: 'build/images',
		plugins: [
			imageminMozjpeg()
		]
	});

	console.log('Images optimized');
})();
```

## API

### imageminMozjpeg(options?)(buffer)

Returns a `Promise<Buffer>`.

#### options

Type: `object`

##### quality

Type: `number`

Compression quality, in range `0` (worst) to `100` (perfect).

##### progressive

Type: `boolean`\
Default: `true`

`false` creates baseline JPEG file.

##### targa

Type: `boolean`\
Default: `false`

Input file is Targa format (usually not needed).

##### revert

Type: `boolean`\
Default: `false`

Revert to standard defaults instead of mozjpeg defaults.

##### fastCrush

Type: `boolean`\
Default: `false`

Disable progressive scan optimization.

##### dcScanOpt

Type: `number`\
Default: `1`

Set DC scan optimization mode.

- `0` One scan for all components
- `1` One scan per component
- `2` Optimize between one scan for all components and one scan for 1st component plus one scan for remaining components

##### trellis

Type: `boolean`\
Default: `true`

[Trellis optimization](https://en.wikipedia.org/wiki/Trellis_quantization).

##### trellisDC

Type: `boolean`\
Default: `true`

Trellis optimization of DC coefficients.

##### tune

Type: `string`\
Default: `hvs-psnr`

Set Trellis optimization method. Available methods: `psnr`, `hvs-psnr`, `ssim`, `ms-ssim`

##### overshoot

Type: `boolean`\
Default: `true`

Black-on-white deringing via overshoot.

##### arithmetic

Type: `boolean`\
Default: `false`

Use [arithmetic coding](https://en.wikipedia.org/wiki/Arithmetic_coding).

##### dct

Type: `string`\
Default: `int`

Set [DCT](https://en.wikipedia.org/wiki/Discrete_cosine_transform) method:

- `int` Use integer DCT
- `fast` Use fast integer DCT (less accurate)
- `float` Use floating-point DCT

##### quantBaseline

Type: `boolean`\
Default: `false`

Use 8-bit quantization table entries for baseline JPEG compatibility.

##### quantTable

Type: `number`

Use predefined quantization table.

- `0` JPEG Annex K
- `1` Flat
- `2` Custom, tuned for MS-SSIM
- `3` ImageMagick table by N. Robidoux
- `4` Custom, tuned for PSNR-HVS
- `5` Table from paper by Klein, Silverstein and Carney

##### smooth

Type: `number`

Set the strength of smooth dithered input. (1...100)

##### maxMemory

Type: `number`

Set the maximum memory to use in kilobytes.

##### sample

Type: `string[]`

Set component sampling factors. Each item should be in the format `HxV`, for example `2x1`.

#### buffer

Type: `buffer`

Buffer to optimize.
npm package: @porky-prince/imagemin-optipng
Description: Imagemin plugin for OptiPNG
Latest version: 8.0.3

# imagemin-optipng [![Build Status](http://img.shields.io/travis/imagemin/imagemin-optipng.svg?style=flat)](https://travis-ci.org/imagemin/imagemin-optipng)

> Imagemin plugin for OptiPNG

> use https://npm.taobao.org/mirrors/optipng-bin/ as downlaod source

## Install

```
$ npm install imagemin-optipng
```


## Usage

```js
const imagemin = require('imagemin');
const imageminOptipng = require('imagemin-optipng');

(async () => {
	await imagemin(['images/*.png'], {
		destination: 'build/images',
		plugins: [
			imageminOptipng()
		]
	});

	console.log('Images optimized!');
})();
```


## API

### imageminOptipng(options?)(buffer)

Returns a `Promise<Buffer>`.

#### options

Type: `object`

##### optimizationLevel

Type: `number`<br>
Default: `3`

Select an optimization level between `0` and `7`.

> The optimization level 0 enables a set of optimization operations that require minimal effort. There will be no changes to image attributes like bit depth or color type, and no recompression of existing IDAT datastreams. The optimization level 1 enables a single IDAT compression trial. The trial chosen is what. OptiPNG thinks it’s probably the most effective. The optimization levels 2 and higher enable multiple IDAT compression trials; the higher the level, the more trials.

Level and trials:

1. 1 trial
2. 8 trials
3. 16 trials
4. 24 trials
5. 48 trials
6. 120 trials
7. 240 trials

##### bitDepthReduction

Type: `boolean`<br>
Default: `true`

Apply bit depth reduction.

##### colorTypeReduction

Type: `boolean`<br>
Default: `true`

Apply color type reduction.

##### paletteReduction

Type: `boolean`<br>
Default: `true`

Apply palette reduction.

##### interlaced

Type: `boolean | undefined | null`<br>
Default: `false`

Enable [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm) PNG interlacing on any images that are processed. Interlaced images look better when they're loaded partially, but usually interlace makes compression less efficient. Set to `undefined` or `null` to keep the same interlacing as the input image.

##### errorRecovery

Type: `boolean`<br>
Default: `true`

A reasonable amount of effort will be spent to try to recover as much data as possible of a broken image, but the success cannot generally be guaranteed.

#### buffer

Type: `Buffer`

Buffer to optimize.
npm package: @porky-prince/imagemin-pngout
Description: pngout imagemin plugin
Author: Kevin Mårtensson
Latest version: 5.0.1

# imagemin-pngout [![Build Status](http://img.shields.io/travis/imagemin/imagemin-pngout.svg?style=flat)](https://travis-ci.org/imagemin/imagemin-pngout)

> pngout imagemin plugin

> use https://npm.taobao.org/mirrors/pngquant-bin/ as downlaod source

## Install

```
$ npm install imagemin-pngout
```


## Usage

```js
const imagemin = require('imagemin');
const imageminPngout = require('imagemin-pngout');

(async () => {
	await imagemin(['images/*.png'], {
		destination: 'build/images',
		plugins: [
			imageminPngout()
		]
	});

	console.log('Images optimized');
})();
```


## API

### imageminPngout([options])(buffer)

Returns a `Promise<Buffer>`.

#### options

Type: `Object`

##### strategy

Type: `number`<br>
Default: `0`

Select a strategy level between `0` and `4`:

`0.` Extreme
`1.` Intense
`2.` Longest match
`3.` Huffman only
`4.` Uncompressed


## License

MIT © Imagemin
npm package: @porky-prince/imagemin-pngquant
Description: Imagemin plugin for `pngquant`
Latest version: 9.0.2

# imagemin-pngquant [![Build Status](https://travis-ci.org/imagemin/imagemin-pngquant.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-pngquant)

> [Imagemin](https://github.com/imagemin/imagemin) plugin for [`pngquant`](https://github.com/kornelski/pngquant)

> use https://npm.taobao.org/mirrors/pngquant-bin/ as downlaod source

## Install

```
$ npm install imagemin-pngquant
```


## Usage

```js
const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');

(async () => {
	await imagemin(['images/*.png'], {
		destination: 'build/images',
		plugins: [
			imageminPngquant()
		]
	});

	console.log('Images optimized');
})();
```


## API

### imageminPngquant(options?)(input)

Returns `Promise<Buffer>`.

#### options

Type: `object`

##### speed

Type: `number`<br>
Default: `4`<br>
Values: `1` (brute-force) to `11` (fastest)

Speed `10` has 5% lower quality, but is about 8 times faster than the default. Speed `11` disables dithering and lowers compression level.

##### strip

Type: `boolean`<br>
Default: `false`

Remove optional metadata.

##### quality

Type: `Array<min: number, max: number>`<br>
Values: `Array<0...1, 0...1>`<br>
Example: `[0.3, 0.5]`

Instructs pngquant to use the least amount of colors required to meet or exceed
the max quality. If conversion results in quality below the min quality the
image won't be saved.

Min and max are numbers in range 0 (worst) to 1 (perfect), similar to JPEG.

##### dithering

Type: `number | boolean`<br>
Default: `1` (full)<br>
Values: `0...1`

Set the dithering level using a fractional number between 0 (none) and 1 (full).

Pass in `false` to disable dithering.

##### posterize

Type: `number`

Truncate number of least significant bits of color (per channel). Use this when image will be output on low-depth displays (e.g. 16-bit RGB). pngquant will make almost-opaque pixels fully opaque and will reduce amount of semi-transparent colors.

##### verbose

Type: `boolean`<br>
Default: `false`

Print verbose status messages.

#### input

Type: `Buffer | Stream`

Buffer or stream to optimize.
npm package: @porky-prince/mozjpeg
Description: mozjpeg wrapper that makes it seamlessly available as a local dependency
Latest version: 7.1.0

# mozjpeg-bin ![GitHub Actions Status](https://github.com/imagemin/mozjpeg-bin/workflows/test/badge.svg?branch=master)

> [mozjpeg](https://github.com/mozilla/mozjpeg) is a production-quality JPEG encoder that improves compression while maintaining compatibility with the vast majority of deployed decoders

You probably want [`imagemin-mozjpeg`](https://github.com/imagemin/imagemin-mozjpeg) instead.

> use https://npm.taobao.org/mirrors/mozjpeg-bin/ as downlaod source

## Install

```
$ npm install mozjpeg
```


## Usage

```js
const {execFile} = require('child_process');
const mozjpeg = require('mozjpeg');

execFile(mozjpeg, ['-outfile', 'output.jpg', 'input.jpg'], err => {
	console.log('Image minified!');
});
```


## CLI

```
$ npm install --global mozjpeg
```

```
$ mozjpeg --help
```


## License

MIT © [Imagemin](https://github.com/imagemin)
npm package: @porky-prince/optipng-bin
Description: OptiPNG wrapper that makes it seamlessly available as a local dependency
Latest version: 7.0.2

# optipng-bin [![Build Status](https://travis-ci.org/imagemin/optipng-bin.svg?branch=master)](https://travis-ci.org/imagemin/optipng-bin)

> [OptiPNG](http://optipng.sourceforge.net) is a PNG optimizer that recompresses image files to a smaller size, without losing any information

You probably want [`imagemin-optipng`](https://github.com/imagemin/imagemin-optipng) instead.

> use https://npm.taobao.org/mirrors/optipng-bin/ as downlaod source

## Install

```
$ npm install --save optipng-bin
```


## Usage

```js
const {promisify} = require('util');
const {execFile} = require('child_process');
const optipng = require('optipng-bin');

const execFileP = promsify(execFile);

(async () => {
	await execFile(optipng, ['-out', 'output.png', 'input.png']);
	console.log('Image minified!');
})();
```


## CLI

```
$ npm install --global optipng-bin
```

```
$ optipng --help
```
npm package: @porky-prince/pngout-bin
Description: pngout wrapper that makes it seamlessly available as a local dependency
Author: 1000ch
Latest version: 5.0.0

# pngout-bin [![Build Status](http://img.shields.io/travis/imagemin/pngout-bin.svg?style=flat)](https://travis-ci.org/imagemin/pngout-bin)

> [pngout](http://advsys.net/ken/util/pngout.htm) optimizes the size of PNG files losslessly

You probably want [`imagemin-pngout`](https://github.com/imagemin/imagemin-pngout) instead.

> use https://npm.taobao.org/mirrors/pngquant-bin/ as downlaod source

## Install

```
$ npm install --save pngout-bin
```


## Usage

```js
const {execFile} = require('child_process');
const pngout = require('pngout-bin');

execFile(pngout, ['input.png', 'output.png', '-s0', '-k0', '-f0'], err => {
	console.log('Image minified!');
});
```


## CLI

```
$ npm install --global pngout-bin
```

```
$ pngout --help
```


## License

MIT © [Imagemin](https://github.com/imagemin)
npm package: @porky-prince/protobuf
Description: Protocol buffers for H5 game
Author: PorkyKay
Latest version: 1.1.0

# protobuf

> Protocol buffers for H5 game

## Reference

[@egret/protobuf](https://www.npmjs.com/package/@egret/protobuf)

## Feature

-   protobuf.js, protobuf.d.ts and pbconfig.json will be added to your project automatically after the package was installed
-   support node >= 12

## Install

### Local

npm:

```sh
$ npm install --save @porky-prince/protobuf
```

yarn:

```sh
$ yarn add @porky-prince/protobuf
```

### Global

npm:

```sh
$ npm install -g @porky-prince/protobuf
```

yarn:

```sh
$ yarn add global @porky-prince/protobuf
```

## Usage

### Using in code

```js
const protobuf = require('@porky-prince/protobuf');

async function run() {
	await protobuf.add(projectRoot, true);
	await protobuf.generate(projectRoot);
}
```

### Command line usage

First, you have to install the dependency package globally

```sh
$ porky-pb <command>
```

example:

```sh
$ porky-pb generate you-project-root
```

#### Command line options

```
  add [options] <projectRoot>       add protobuf.js, protobuf.d.ts and pbconfig.json to
                          your project
  generate <projectRoot>  generate bundle.js and bundle.d.ts to your project
                          by proto files
  help [command]          display help for command
```

## License

[MIT © PorkyKay](./LICENSE)
npm package: @porla-contrib/blocklist
Description: A blocklist plugin for Porla.
Author: Viktor Elofsson
Latest version: 0.2.0

# eMule blocklists for Porla

This plugin will download and apply the latest eMule security blocklist when
Porla starts.


## Usage

```js
const { Porla } = require('@porla/porla');
const Blocklist = require('@porla-contrib/blocklist');

const app = new Porla({
    plugins: [ new Blocklist() ]
});
```
npm package: @porla-contrib/dashboard
Description: A web dashboard for Porla.
Author: Viktor Elofsson
Latest version: 0.4.0

# Dashboard for Porla

A simple dashboard for Porla, to allow easy monitoring and managing of
torrents.


## Installing

```js
const porla     = require('porla');
const dashboard = require('@porla-contrib/dashboard');

const app = porla({
    plugins: [ dashboard({ port: 7090 }) ]
});
```

### Options

The options object is passed to the Dashboard constructor and has the following
properties.

 * `port`, the HTTP port to serve the dashboard. If no port is specified,
   it defaults to *3000*.
npm package: @porla-contrib/pushbullet
Description: A Pushbullet plugin for Porla.
Author: Viktor Elofsson
Latest version: 0.3.0

# Pushbullet notifications for Porla

The Pushbullet plugin for Porla enables easy notifications for any event.

## Usage

```js
const porla      = require('@porla/porla');
const pushbullet = require('@porla-contrib/pushbullet')('YourAccessToken');

const app = porla();

app.on('torrent.added', [
    pushbullet('Torrent {{ torrent.name }} added')
]);
```

#### Options

The following options are supported as the last parameter of the `pushbullet`
function.

```js
{
    title: 'Robobot'
}
```
npm package: @porla-contrib/pushover
Description: A Pushover plugin for Porla.
Author: Viktor Elofsson
Latest version: 0.3.0

# Pushover notifications for Porla

The Pushover plugin for Porla enables easy notifications for any event.

## Usage

```js
const porla    = require('@porla/porla');
const pushover = require('@porla-contrib/pushover')('AppToken', 'UserToken');

const app = porla();

app.on('torrent.added', [
    pushover('Torrent {{ torrent.name }} added')
]);
```

#### Options

The following options are supported as the last parameter of the `pushover`
function.

```js
{
    title: 'Robobot'
}
```
npm package: @porla-contrib/webhook
Description: A webhook plugin for Porla.
Author: Viktor Elofsson
Latest version: 0.2.0

# Webhook plugin for Porla

The webhook plugin can send HTTP POST requests with custom payload data. Use it
to integrate with other HTTP services.

## Usage

The `webhook` function takes two arguments. The first is the URL to POST data
to, and the second is a transform function that takes the event parameter and
returns an object that gets sent as the JSON payload.

```js
const { Porla } = require('@porla/porla');
const webhook = require('@porla-contrib/webhook');

const app = new Porla();

app.subscribe('torrent.added', [
    webhook('http://example.com', _ => {
        return {
            id: _.torrent.infoHash
        };
    })
]);
```
npm package: @porla/libtorrent
Description: Rasterbar-libtorrent bindings for Node.js (>= 8.6).
Author: Viktor Elofsson
Latest version: 1.0.0-rc.3

# Node.js bindings for Rasterbar-libtorrent

This library provides (mostly) complete bindings against Rasterbar-libtorrent
compiled with SSL support. It tries to map one-to-one against the Rastebar-
libtorrent API.

## Getting started

```js
const lt = require("@porla/libtorrent");

const params = new lt.AddTorrentParams();
params.save_path = ".";
params.ti = new lt.TorrentInfo("/path/to/torrent");

const session = new lt.Session();
session.add_torrent(params);
session.on("add_torrent", () => console.log("Torrent added"));
session.on("state_update", () => console.log("State updated"));

setInterval(() => s.post_torrent_updates(), 1000);
```

## Building

`vcpkg` is used for native dependency management. You need CMake and a proper
C++ toolchain.

Running `yarn` should build everything.
npm package: @poro-wallet/core
Description: Core package used by PoroWallet aimed at facilitating blockchain wallets management
Author: Chris Liu
Latest version: 0.4.7

# @poro-wallet/core

[![npm](https://badge.fury.io/js/@poro-wallet%2Fcore.svg)](https://badge.fury.io/js/@poro-wallet%2Fcore)

Core package aimed at facilitating blockchain wallets and transactions management, such as generating random wallet and constructing transaction objects used in offline signing for various supported blockchains.

## Getting started

```
npm install --save @poro-wallet/core
```

[Documentation](https://nighostchris.gitbook.io/poro-wallet-core/)
npm package: @porosys/ndtool
Description: Netdata alert and automation tool
Author: Poroshat Filter
Latest version: 0.0.51

# ndtool

A modern, extensible tool for managing Netdata installation, uninstallation, alerts, etc.

[![npm version](https://img.shields.io/npm/v/ndtool.svg)](https://www.npmjs.com/package/ndtool)

## Features

- Automated Netdata installation and configuration
- Easy setup for config change alerts (UFW, SSH, and more)
- Email notification configuration
- Extensible: add new config change alerts with minimal code

## Prerequisites

- [Node.js](https://nodejs.org/) (see `.nvmrc` for recommended version)
- [npm](https://www.npmjs.com/) (comes with Node.js)
- Netdata (installed by this tool or manually)
- [nvm](https://github.com/nvm-sh/nvm) (optional, for managing Node.js versions)

## Installation

### From npm (recommended)

You can install ndtool globally:

```bash
npm install -g ndtool
```

### From source

Clone the repository and install dependencies:

```bash
nvm use # if using nvm
npm install
```

## Usage

### Run the CLI

```bash
ndtool <command>
```

Or, from source (development):

```bash
npx ts-node bin/ndtool.ts <command>
```

### Install Netdata

```bash
ndtool install
```

### Add an Alert

```bash
ndtool add-alert
```

#### Supported Alerts

- **UFW Config Change**: Monitors changes in UFW rules/status
- **SSH Config Change**: Monitors changes to `/etc/ssh/sshd_config`

### Uninstall Netdata

```bash
ndtool uninstall
```

## Configuration

Configuration is auto-generated and stored in `~/.ndtoolrc`.
npm package: @porosys/pss
Description: Porosys Server Setup (pss): General-purpose server setup and automation tool (including Netdata management)
Author: Poroshat Filter
Latest version: 0.0.6

# pss (Porosys Server Setup)

A general-purpose server setup and automation tool, including Netdata management and alerting.

## Installation

### From npm (recommended)

You can install `pss` globally:

```sh
npm install -g @porosys/pss
```

### From source

Clone the repository and install dependencies:

```sh
git clone <your-repo-url>
cd pss
npm install
npm run build
```

You can then run the CLI with:

```sh
node dist/bin/pss.js <group> <command>
```

Or, for development:

```sh
npx ts-node bin/pss.ts <group> <command>
```

## Usage

```sh
pss <group> <command>
```

### Groups
- `netdata` — Netdata installation, configuration, and alert management

### Netdata Commands
- `install`      Install Netdata and setup monitoring
- `uninstall`    Uninstall Netdata
- `restart`      Restart Netdata
- `config`       Configure Netdata
- `add-alert`    Add or manage Netdata alerts

## Example

```sh
pss netdata install
pss netdata add-alert
```

## Features
- Netdata installation, configuration, and alert management
- Interactive CLI for adding and managing alerts
- Designed to be extensible for other server setup tasks in the future
npm package: @porotkin/vite-plugin-react-kotlinjs
Description: Support React fast refresh in Kotlin/JS
Author: Mikhail Porotkin
Latest version: 1.0.6

# Vite Plugin React KotlinJS

A Vite plugin that enables Fast Refresh support for Kotlin/JS React applications by post-processing generated JS files.

## Installation

Add the following dependency to your `build.gradle.kts`:
```kotlin
dependencies {
  jsMainImplementation(devNpm("@porotkin/vite-plugin-react-kotlinjs", "^1.0.6"))
}
```

> Source set can be changed to suit your needs (e.g. `webMainImplementation` instead)

## Usage

Add the plugin and official Vite React plugin to your `vite.config.js`:
```javascript
import reactRefresh from '@porotkin/vite-plugin-react-kotlinjs'
import react from '@vitejs/plugin-react'

export default defineConfig(() => {
    return {
        plugins: [
            reactRefresh(),
            react(),
        ],
    }
})
```

## Options

The plugin accepts the following options:

### `isReactFC`

- **Type:** `(code: string) => boolean`

Custom function to check if the code is a React functional component.

### `getComponentName`

- **Type:** `(code: string) => string | undefined`

Custom function to extract React component names from the code. Useful if your Kotlin/JS compiler generates different patterns.

### `debug`

- **Type:** `boolean`

Output debug information about the transformed files.

## How it works

Plugin post-processes generated Kotlin/JS files, so the official Vite React plugin can handle them.

## Why `@vitejs/plugin-react` is not enough?

- Kotlin/JS generates named exports for components, which makes it impossible to use the default export.
- Standard React Refresh Babel plugin does not recognize the generated component variable that actually returns the
  React node.
- Your FC lambdas must return a React node!