open-index/open-npm huggingface dataset:
npm package: @node-c/api-rest
Description: This is Node-C's package for setting up REST API modules on top of the HTTP API modules.
Latest version: 1.0.0-beta7

# Node-C / API: REST
This is Node-C's package for setting up REST API modules on top of the HTTP API modules.

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-c/core
Description: This is Node-C's core package. It provides the architectural outline classes, and common functionalities and interfaces for building BE apps with the framework.
Latest version: 1.0.0-beta7

# Node-C / Core
This is Node-C's core package. It provides the architectural outline classes, and common functionalities and interfaces for building BE apps with the framework.

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-c/data-clickhouse
Description: This is Node-C's package providing the functionality for working with ClickHouse.
Latest version: 1.0.0-beta7

# Node-C / Data: ClickHouse
This is Node-C's package providing the functionality for working with ClickHouse.

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-c/data-rdb
Description: This is Node-C's package providing the functionality for relational databases that TypeORMDB can work with. Currently, PostgreSQL and MySQL are supported.
Latest version: 1.0.0-beta7

# Node-C / Data: RDB
This is Node-C's package providing the functionality for relational databases that TypeORMDB can work with. Currently, PostgreSQL and MySQL are supported.

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-c/data-typeorm
Description: An implementation of Node-C's Peristance: RDB package, providing the functionality for relational databases that TypeORMDB can work with. Currently, PostgreSQL and MySQL are supported.
Latest version: 1.0.0-beta7

# Node-C / Data: TypeORMDB
An implementation of Node-C's Peristance: RDB package, providing the functionality for relational databases that TypeORMDB can work with. Currently, PostgreSQL and MySQL are supported.

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-c/domain-iam
Description: This is Node-C's package for business logic related to Identity and Access Management (IAM).
Latest version: 1.0.0-beta7

# Node-C / Domain: IAM
This is Node-C's package for business logic related to Identity and Access Management (IAM).

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-c/domain-iam-okta
Description: This is a plugin for Node-C's "Domain: IAM" package. It adds Okta auth to the standard set of authentication methods provided by the "Domain: IAM" package.
Latest version: 1.0.0-beta7

# Node-C / Domain: IAM Okta 
This is a plugin for Node-C's "Domain: IAM" package. It adds Okta auth to the standard set of authentication methods provided by the "Domain: IAM" package.

The documentation can be found on the [Node-C Github repo homepage](https://github.com/RazorDude/node-c).
npm package: @node-cli/envtools
Description: Command line helper for software developers
Author: Arno Versini
Latest version: 4.4.0

# Node CLI environment helper

![npm](https://img.shields.io/npm/v/@node-cli/envtools?label=version&logo=npm)

> Command line helper for software developers.

## Installation

```sh
> npm install --global @node-cli/envtools
```

## License

MIT © Arno Versini
npm package: @node-cli/npmrc
Description: Toggle different npmrc configuration files on the fly
Author: Arno Versini
Latest version: 1.2.9

# Node CLI npmrc package

![npm](https://img.shields.io/npm/v/@node-cli/npmrc?label=version&logo=npm)

> Npmrc allows you to toggle different npmrc configuration files on the fly.

## Installation

```sh
> npm install --global @node-cli/npmrc
```

## Examples

Create a profile from the current .npmrc file

```sh
> npmrc -c my-profile
```

List profiles handled by npmrc

```sh
> npmrc -l
```

Update an existing profile with the current .npmrc file

```sh
> npmrc -u
```

Switch to an existing profile handled by npmrc

```sh
> npmrc my-profile
```

Delete a profile handled by npmrc

```sh
> npmrc -d my-profile
```

Get help

```sh
> npmrc --help
```

## License

MIT © Arno Versini
npm package: @node-cli/parser
Description: A simple CLI parser helper
Author: Arno Versini
Latest version: 2.4.8

# Parser

![npm](https://img.shields.io/npm/v/@node-cli/parser?label=version&logo=npm)

> Simple, non-interactive, CLI app arguments parser

# API

**parser(options) ⇒ { flags, parameters, showHelp }**

## Arguments

| Argument                  | Type              |
| ------------------------- | ----------------- |
| options                   | Object            |
| options.meta              | import.meta       |
| options.examples          | Array of Object   |
| options.flags             | Object            |
| options.parameters        | Object            |
| options.restrictions      | Array of Object   |
| options.usage             | String or Boolean |
| options.defaultFlags      | Object            |
| options.defaultParameters | Object            |

## Example

```js
import { parser } from "@node-cli/parser";

const { flags, parameters, showHelp } = parser({
	meta: import.meta, // this is required for --version to work correctly
	examples: [
		{
			command: 'my-cli --verbose --command "chmod +x" bin',
			comment: '## Make all files executable in the "bin" folder',
		},
	],
	flags: {
		encrypt: {
			shortFlag: "e",
			description: "Encrypt the file",
			type: "boolean",
		},
		decrypt: {
			shortFlag: "d",
			description: "Decrypt the file",
			type: "boolean",
		},
		verbose: {
			shortFlag: "V",
			description: "Enable extra logging",
			type: "boolean",
		},
		command: {
			shortFlag: "c",
			description: "Command to execute over each node (ex: chmod +x)",
			type: "string",
		},
		help: {
			shortFlag: "h",
			description: "Display help instructions",
			type: "boolean",
		},
		version: {
			shortFlag: "v",
			description: "Output the current version",
			type: "boolean",
		},
	},
	parameters: {
		src: {
			default: "current folder",
			description: "the source",
		},
		dest: {
			description: "the destination",
		},
	},
	restrictions: [
		{
			exit: 1,
			message: () =>
				log.error("Error: --encrypt or --decrypt option must be provided."),
			test: (x) => x.encrypt === false && x.decrypt === false,
		},
	],
	// use usage:true is equivalent to the following line
	usage: "my-cli [options] [src] [dest]",
	defaultFlags: {
		verbose: false,
	},
});

// `flags` will be an object with what the user provided
// `parameters` will be an object with what the user provided
// `showHelp` is a method that can be invoked to display help instructions
```

## Note

If options `--version` or `--help` are used, they will automatically print version or help, respectively, and exit with 0 (`process.exit(0)`).

## License

MIT © Arno Versini
npm package: @node-cli/perf
Description: Set of performance tools for Node.js
Author: Arno Versini
Latest version: 1.0.13

# Node CLI perf package

![npm](https://img.shields.io/npm/v/@node-cli/perf?label=version&logo=npm)

> Performance tools for nodejs command-line applications.

## Performance

The class Performance is a wrapper around [nodejs Performance measurement APIs](https://nodejs.org/api/perf_hooks.html).

It is intended for an extremely simple case:

- start performance monitoring
- do something that takes a while
- stop performance monitoring
- read how much time passed between start and stop (in milliseconds)
- rinse and repeat

### Methods

| Method | Description                                      |
| ------ | ------------------------------------------------ |
| start  | Starts measuring performance                     |
| stop   | Stops measuring performance and store the result |

| Getter           | Type   | Description          |
| ---------------- | ------ | -------------------- |
| results          | Object |                      |
| results.duration | Number | Time in milliseconds |

### Examples

#### Basic performance gathering

```js
import { Performance } from "@node-cli/perf;
const perf = new Performance();

// Somewhere in your code, you want to start measuring performance:
perf.start();
// Do long lasting actions
(...)
// When done, tell performance to stop:
perf.stop();
// The duration can now be found in the Performance class getter `results`:
console.log(`It took ${perf.results.duration} milliseconds to run...`);
```

#### Multiple performance gatherings

```js
import { Performance } from "@node-cli/perf;
const perf = new Performance();

// Somewhere in your code, you want to start measuring performance:
perf.start();
// Do long lasting actions
(...)
// When done, tell performance to stop:
perf.stop();
// Save the results
const res1 = perf.results.duration;

// Further down in your code, start measuring another performance:
perf.start();
// Do other long lasting actions
(...)
// When done, tell performance to stop:
perf.stop();
// Save the results
const res2 = perf.results.duration;

// -> res1 and res2 will have 2 different duration results.
```

## License

MIT © Arno Versini
npm package: @node-cli/run
Description: A wrapper for child_process for nodejs CLI apps
Author: Arno Versini
Latest version: 1.1.8

# Node CLI run command

![npm](https://img.shields.io/npm/v/@node-cli/run?label=version&logo=npm)

> @node-cli/run is a dead-simple script runner for nodejs command-line applications.

## Installation

```sh
> cd your-project
> npm install --save-dev @node-cli/run
```

## Usage

```js
import { run } from "@node-cli/run";
const { stdout, stderr } = await run("npm config ls");
```

## API

**run(command, options) ⇒ `Promise <string>` | `Promise <object>`**

Runs a shell command asynchronously and returns both `stdout` and `stderr`. If the command fails to run (invalid command or the commands status is anything but 0), the call will throw an exception. The exception can be ignored if the `options.ignoreError` flag is true.

### Arguments

| Argument             | Type    | Default |
| -------------------- | ------- | ------- |
| command              | String  | ""      |
| options              | Object  | { }     |
| options.ignoreError  | Boolean | false   |
| options.streamOutput | Boolean | false   |

### Note

If `ignoreError` is used, the method will not throw but will instead return an object with the keys `exitCode` and `shortMessage`.

#### Examples

##### Basic usage

```js
import { run } from "@node-cli/run";
const { stdout, stderr } = await run("npm run build");
```

##### Multiple commands

```js
import { run } from "@node-cli/run";
const { stdout, stderr } = await run(
  "git add -A && git commit -a -m 'First commit'"
);
```

##### Stream output

```js
import { run } from "@node-cli/run";
await run("npm run build", {
  streamOutput: true
});
```

##### Ignore error

```js
import { run } from "@node-cli/run";
const { exitCode, shortMessage } = await runCommand("ls /not-a-folder", {
  ignoreError: true
});
// -> exitCode is 1 and shortMessage is "Command failed with exit code 1: ls /not-a-folder"
```

## License

MIT © Arno Versini
npm package: @node-cli/secret
Description: Secret is a CLI tool that can encode or decode a file with a password
Author: Arno Versini
Latest version: 1.2.13

# Node CLI secret package

![npm](https://img.shields.io/npm/v/@node-cli/secret?label=version&logo=npm)

> Secret is a command line tool that can encode or decode a file with a password. It also exposes a library to be used in other projects.

## Installation as a CLI

```sh
> npm install --global @node-cli/secret
```

## Installation as a library

```sh
> cd your-project
> npm install @node-cli/secret
```

## Usage as a library

### Encrypt a string with a password

```js
import { encrypt } from "@node-cli/secret";
const encrypted = encrypt("password", "Hello World");
```

### Decrypt a string with a password

```js
import { decrypt } from "@node-cli/secret";
const decrypted = decrypt("password", encrypted);
```

### Hash a password with a default salt

```js
import { hashPassword } from "@node-cli/secret";
const hashed = hashPassword("password");
// hashed === "some-default-salt:some-hex-string
```

### Hash a password with a custom salt

```js
import { createSalt, hashPassword } from "@node-cli/secret";
const salt = createSalt(42);
const hashed = hashPassword("password", salt);
// hashed === "some-salt:some-hex-string
```

### Verify a password against a hash

```js
import { hashPassword, verifyPassword } from "@node-cli/secret";
const hashed = hashPassword("password");
const isVerified = verifyPassword("password", hashed);
// isVerified === true
```

## Usage as a CLI

NOTE: The password is not stored anywhere, it is only used to encrypt or decrypt the file and will be prompted each time.

### Encrypt a file

```sh
> secret --encrypt README.md README.md.enc
```

### Decrypt a file

```sh
> secret --decrypt README.md.enc README.md
```

### Get help

```sh
> search --help
```

## License

MIT © Arno Versini
npm package: @node-cli/static-server
Description: A simple, zero-configuration, command line HTTP server to serve static files locally
Author: Arno Versini
Latest version: 3.1.11

# Static Server

![npm](https://img.shields.io/npm/v/@node-cli/static-server?label=version&logo=npm)

> Static Server is a simple, zero-configuration, command line HTTP server to serve static files locally.

## Installation

This command line utility can be installed globally or locally within your project. It does make more sense to have it installed globally though, since it then can be use anywhere by simply starting it to serve the files located in the current folder.

```sh
> npm install -g @node-cli/static-server
```

## Usage

```sh
> static-server [options] [path]
```

`[path]` defaults to the current folder if it's not provided at the command line prompt.

At that point, you should be able to visit `http://localhost:8080` and see the files located in the current folder.

### Options

| option                     | default   | description                                                 |
| -------------------------- | --------- | ----------------------------------------------------------- |
| `-c` or `--cache <number>` | 0         | Time in seconds for caching files                           |
| `-C` or `--cors`           | false     | Set CORS headers to \* to allow requests from any origin    |
| `-d` or `--dirs`           | true      | List the directory's contents                               |
| `-h` or `--help`           |           | Display help instructions                                   |
| `--host`                   | localhost | Change the default host address to bind to                  |
| `-H` or `--http2`          | false     | Enable HTTP/2 and SSL (https)                               |
| `-l` or `--logs`           | false     | Log HTTP requests at the prompt                             |
| `-o` or `--open`           | false     | Open in your default browser                                |
| `-p` or `--port <n>`       | 8080      | Port to listen on - Will try next available if already used |
| `-g` or `--gzip`           | true      | Enable GZIP compression                                     |
| `-v` or `--version`        |           | Output the current version                                  |

### SSL support

SSL support is available by using the `--http2` option. This will enable HTTP/2 and SSL (https). The server will use a self-signed certificate to serve the files. You will be prompted to accept the certificate when you visit the server in your browser.

If you have your own local certificates, for example by using [mkcert](https://github.com/FiloSottile/mkcert), simply set the `STATIC_SERVER_CERT` and `STATIC_SERVER_KEY` environment variables to the path of your certificate and key files. In this case, you won't be prompted to accept the certificate.

```sh



## License

MIT © Arno Versini
```
npm package: @node-cli/timer
Description: Dead simpler CLI timer
Author: Arno Versini
Latest version: 1.0.12

# Node CLI timer package

![npm](https://img.shields.io/npm/v/@node-cli/timer?label=version&logo=npm)

> Timer is a dead simple command line tool to display the remaining time for a given duration.

## Installation

```sh
> npm install --global @node-cli/timer
```

## Examples

Start a timer for 4 hours, 2 minutes and 15 seconds

```sh
> timer 4h2m15s
```

Start a timer for 1 minute and 42 seconds

```sh
> timer 1m42s
```

Get help

```sh
> search --help
```

## License

MIT © Arno Versini
npm package: @node-cli/utilities
Description: A few utilities for Node CLI applications
Author: Arno Versini
Latest version: 1.0.8

# Node CLI Utilities

![npm](https://img.shields.io/npm/v/@node-cli/utilities?label=version&logo=npm)

> A few common utilities for Node CLI applications

## Table of Content

- [Table of Content](#table-of-content)
- [Installation](#installation)
- [API](#api)
  - [lowerFirst](#lowerfirst)
  - [fastMerge](#fastmerge)
  - [uniqueID](#uniqueid)
  - [upperFirst](#upperfirst)
- [License](#license)

## Installation

```sh
> cd your-project
> npm install --save-dev @node-cli/utilities
```

## API

### lowerFirst

**lowerFirst(text: string) ⇒ `string`**

Transform the first letter of the provided string to lowercase (but not all the words).

```js
import { lowerFirst } from "@node-cli/utilities";
const str = lowerFirst("HELLO WORLD");
// str is "hELLO WORLD"
```

### fastMerge

**fastMerge(objA: object, objB: object, customizer: () => void) ⇒ `object`**

Wrapper method for lodash `merge()` and `mergeWith()` methods.

Without the `customizer` function, this method recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. Source properties that resolve to undefined are skipped if a destination value exists. Array and plain object properties are merged recursively. Other objects and value types are overridden by assignment. Source objects are applied from left to right. Subsequent sources overwrite property assignments of previous sources.

With the `customizer` function, the behavior is the same except that `customizer` is invoked to produce the merged values of the destination and source properties. If customizer returns undefined, merging is handled by the `fastMerge` instead. The customizer is invoked with six arguments: `(objValue, srcValue, key, object, source, stack)`

**WARNING**: this method will mutate objA!

```js
import { fastMerge } from "@node-cli/utilities";

const objA = { port: 123, cache: false, gzip: true };
const objB = { port: 456, gzip: false };
const objC = fastMerge(objA, objB);

// objC is { port: 456, cache: false, gzip: false };
```

```js
import { isArray } from "lodash-es";
import { fastMerge } from "@node-cli/utilities";

const objA = { a: [1], b: [2] };
const objB = { a: [3], b: [4] };
const objC = fastMerge(objA, objB, (objValue, srcValue) => {
	if (isArray(objValue)) {
		return objValue.concat(srcValue);
	}
});

// objC is { 'a': [1, 3], 'b': [2, 4] };
```

### uniqueID

**uniqueID(prefix?: string = "") ⇒ `string`**

Generate a unique ID.

```js
import { uniqueID } from "@node-cli/utilities";
const id = uniqueID("my-prefix-");
// id is something like "my-prefix-5f3a2b3c-1a2b-3c4d-5e6f-7a8b9c0d1e2f"
```

### upperFirst

**upperFirst(text: string) ⇒ `string`**

Capitalize the first letter of the provided string (but not all the words).

```js
import { upperFirst } from "@node-cli/utilities";
const str = upperFirst("hello world");
// str is "Hello world"
```

## License

MIT © Arno Versini
npm package: @node-cool/authentication
Description: Cool - The coolest opinionated fully loaded node framework
Author: Barna Toth
Latest version: 1.1.9

<p align="center">
  <a href="https://hacklone.github.io/node-cool">
    <img width="350" src="https://hacklone.github.io/node-cool/_media/logo-text.svg">
  </a>
  <p align="center">The coolest opinionated ready-to-go node framework</p>
</p>

[![NPM version][npm-image]][npm-url]

@node-cool is an opinionated node server framework with the goal to give all the tools out-of-the-box needed for building a modern web server application.

## Quickstart

[Get started in 5 minutes](https://hacklone.github.io/node-cool/#/getting-started/install)

## Learn

[Learn more](https://hacklone.github.io/node-cool)

[npm-url]: https://www.npmjs.com/package/@node-cool/database
[npm-image]: http://img.shields.io/npm/v/@node-cool/database.svg
npm package: @node-cool/cli
Description: Cool server framework CLI
Author: Barna Toth
Latest version: 1.1.8

# @node-cool/cli

Cool server framework CLI

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@node-cool/cli.svg)](https://npmjs.org/package/@node-cool/cli)
[![Downloads/week](https://img.shields.io/npm/dw/@node-cool/cli.svg)](https://npmjs.org/package/@node-cool/cli)
[![License](https://img.shields.io/npm/l/@node-cool/cli.svg)](https://github.com/Hacklone/node-cool/blob/master/package.json)

<!-- toc -->
* [@node-cool/cli](#node-coolcli)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->

# Usage

<!-- usage -->
```sh-session
$ npm install -g @node-cool/cli
$ node-cool COMMAND
running command...
$ node-cool (-v|--version|version)
@node-cool/cli/1.1.7 darwin-x64 node-v12.13.1
$ node-cool --help [COMMAND]
USAGE
  $ node-cool COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`node-cool help [COMMAND]`](#node-cool-help-command)
* [`node-cool new`](#node-cool-new)

## `node-cool help [COMMAND]`

display help for node-cool

```
USAGE
  $ node-cool help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.0/src/commands/help.ts)_

## `node-cool new`

Create new @node-cool project

```
USAGE
  $ node-cool new

OPTIONS
  -h, --help       show CLI help
  -n, --name=name  name of the project
  -p, --path=path  path where to create new project

EXAMPLE
  $ node-cool new --name my-project
```

_See code: [src/commands/new.ts](https://github.com/Hacklone/node-cool/blob/v1.1.7/src/commands/new.ts)_
<!-- commandsstop -->
npm package: @node-cool/core
Description: Cool - The coolest opinionated fully loaded node framework
Author: Barna Toth
Latest version: 1.1.0

<p align="center">
  <a href="https://hacklone.github.io/node-cool">
    <img width="350" src="https://hacklone.github.io/node-cool/_media/logo-text.svg">
  </a>
  <p align="center">The coolest opinionated ready-to-go node framework</p>
</p>

[![NPM version][npm-image]][npm-url]

@node-cool is an opinionated node server framework with the goal to give all the tools out-of-the-box needed for building a modern web server application.

## Quickstart

[Get started in 5 minutes](https://hacklone.github.io/node-cool/#/getting-started/install)

## Learn

[Learn more](https://hacklone.github.io/node-cool)

[npm-url]: https://www.npmjs.com/package/@node-cool/core
[npm-image]: http://img.shields.io/npm/v/@node-cool/core.svg
npm package: @node-cool/database
Description: Cool - The coolest opinionated fully loaded node framework
Author: Barna Toth
Latest version: 1.0.4

<p align="center">
  <a href="https://hacklone.github.io/node-cool">
    <img width="350" src="https://hacklone.github.io/node-cool/_media/logo-text.svg">
  </a>
  <p align="center">The coolest opinionated ready-to-go node framework</p>
</p>

[![NPM version][npm-image]][npm-url]

@node-cool is an opinionated node server framework with the goal to give all the tools out-of-the-box needed for building a modern web server application.

## Quickstart

[Get started in 5 minutes](https://hacklone.github.io/node-cool/#/getting-started/install)

## Learn

[Learn more](https://hacklone.github.io/node-cool)

[npm-url]: https://www.npmjs.com/package/@node-cool/database
[npm-image]: http://img.shields.io/npm/v/@node-cool/database.svg