open-index/open-npm huggingface dataset:
npm package: @ptsecurity/commitlint-config
Description: Commitlint configuration
Author: Positive Technologies
Latest version: 2.0.0

# commitlint-config

Commitlint configuration

## Using

Install packages: 
```shell
npm i --save-dev husky @commitlint/cli @commitlint/config-conventional @ptsecurity/commitlint-config
```

Create file `commitlint.config.js` with extending preset and define set of scopes:
```javascript
module.exports = {
    extends: ['@ptsecurity/commitlint-config'],
    rules: {
        'scope-enum': [ 
            2,
            'always',
            [
                // as examples
                'app', 
                'common'
            ]
        ]
    }
};
```

Add to `package.json` next section:
```json
{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }  
  }
}
```
Argument `-g` is path to your commit configuration file. More details [about it](http://marionebl.github.io/commitlint/#/reference-cli)
npm package: @ptsecurity/mosaic-icons
Description: ## Using package
Latest version: 7.0.8

# Icons

## Using package

```
npm i @ptsecurity/mosaic-icons
```
# Package structure

```bash
.
├── CHANGELOG.md
├── LICENSE
├── README.md
├── dist
│   ├── fonts
│   │   ├── mc-icons.css
│   │   ├── mc-icons.html
│   │   ├── mc-icons.scss
│   │   ├── mc-icons.ttf
│   │   └── mc-icons.woff
│   ├── info
│   │   └── mc-icons-info.json
│   ├── svg
│   │   ├── angle-down-L_16.svg
│   │   ├── angle-down-L_24.svg
│   │   ├── angle-down-M_16.svg
│   │   └── angle-down-M_24.svg
│   └── symbol
│       ├── sprite.scss
│       ├── sprite.symbol.html
│       └── svg
│           └── sprite.symbol.svg
└── package.json
```

# Building Locally

## Install dependencies
Install dependencies by running:

```
npm install
```

## Sync with Figma

```
npm run figma:sync
```

## Build all packages

```
npm run build:all
```

Output will be exported to a `dist/icons` folder.

# Add new icons

## Step 1.

Export your icons (svg) from Figma:
```
npm run figma:sync
```

## Step 2.

Add an entry into `mapping.json` with a new codepoint keys.

Commit and push all changes to git.

## Step 3.

Run stage commit script to create a new release tag.
```
npm run stage:commit
```

# Using CSS Classes
Create a DOM element/container that contains ```mc-icon``` and the icon name like:

```html
<div class='mc-icon mc-angle-down-L_16'></div>

```
# Using SVG Sprites

When needing to use the `sprite.symbol.svg` sprite file, you can reference icons using the following method:

```html
<svg>
    <use xlink:href="sprite.symbol.svg#add" />
</svg>
```
npm package: @ptsecurity/prettier-config
Description: Positive Technologies prettier config.
Author: Positive Technologies
Latest version: 2.0.0

# @ptsecurity/prettier-config

![package version badge]

[package version badge]: https://img.shields.io/npm/v/@ptsecurity/prettier-config/latest?style=for-the-badge&logo=npm
## Подключение

1. Создайте в проекте конфигурационный файл - `.prettierrc.js`

2. Укажите расширение конфигурации
```js
module.exports = {
    ...require('@ptsecurity/prettier-config'),
    // правила, которые переопределяют / дополняют базовый конфиг
};
```
npm package: @ptsecurity/stylelint-config
Description: Positive Technologies stylelint config.
Author: Positive Technologies
Latest version: 2.0.0

# @ptsecurity/stylelint-config

![package version badge]

[package version badge]: https://img.shields.io/npm/v/@ptsecurity/stylelint-config/latest?style=for-the-badge&logo=npm

## Подключение

1. Создайте в проекте конфигурационный файл - `.stylelintrc.js`

2. Укажите расширение конфигурации
```js
module.exports = {
   extends: '@ptsecurity/stylelint-config'
}
```

## Настройка IDE
Конфигурация stylelint содержит [stylelint-prettier plugin](https://github.com/prettier/stylelint-prettier). 
Поэтому, для автоматического форматирования файлов стилей, а так же для сортировки свойств стилей, 
в IDE нужно активировать prettier для файлов стилей.

Prettier: Run for files: {/,}.{scss,json}

[x] Fix on Save


### Конфигурации

| Configurations                   | Version                                    | Loading condition(s)        |
| -------------------------------- | ------------------------------------------ | --------------------------- |
| [stylelint-config-prettier]      | ![stylelint-config-prettier version badge] | `prettier` as dependency    |
| [stylelint-config-standard]      | ![stylelint-config-prettier version badge] | **NO** `sass` as dependency |

[stylelint-config-prettier]: https://github.com/prettier/stylelint-config-prettier
[stylelint-config-prettier version badge]: https://img.shields.io/npm/v/stylelint-config-prettier?logo=npm&style=flat-square
[stylelint-config-standard]: https://github.com/stylelint/stylelint-config-standard
[stylelint-config-standard version badge]: https://img.shields.io/npm/v/stylelint-config-standard?logo=npm&style=flat-square

### Плагины

| Plugin                                      | Version                                                    | Loading condition(s) |
| ------------------------------------------- | ---------------------------------------------------------- | -------------------- |
| [stylelint-scss]                            | ![stylelint-scss version badge]                            | `sass` as dependency |

[stylelint-scss]: https://github.com/sveltejs/stylelint-plugin-svelte3
[stylelint-scss version badge]: https://img.shields.io/npm/v/stylelint-scss?logo=npm&style=flat-square

## Ресурсы

- [Awesome Stylelint]

[awesome stylelint]: https://github.com/stylelint/awesome-stylelint
npm package: @ptsecurity/tslint-config
Description: Positive Technologies TSLint rules.
Author: Positive Technologies
Latest version: 1.0.0

# @ptsecurity/tslint-config

[![CircleCI](https://circleci.com/gh/positive-js/tslint-config/tree/master.svg?style=shield)](https://circleci.com/gh/positive-js/tslint-config/tree/master)
[![npm](https://img.shields.io/npm/v/@ptsecurity/tslint-config.svg)](https://www.npmjs.com/package/@ptsecurity/tslint-config)
[![David-DM](https://david-dm.org/positive-js/tslint-config/status.svg)](https://david-dm.org/positive-js/tslint-config)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpositive-js%2Ftslint-config.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpositive-js%2Ftslint-config?ref=badge_shield)

## Install

Install as an [npm][npm] devDependency. [TypeScript][typescript] and [TSLint][tslint]
should also be installed.

```sh
npm install --save-dev typescript tslint @ptsecurity/tslint-config
```

## Usage

Include a `tslint.json` file in your project and add `"@ptsecurity/tslint-config"` to
the `"extends"` field. Custom rules can then be enabled under `"rules"`.

```json
{
  "extends": ["@ptsecurity/tslint-config"],
  "rules": {
    ...
  }
}
```

## Contributing
Please read [community-guidelines here](https://github.com/positive-js/community-guidelines).

[npm]: https://www.npmjs.com/package/@ptsecurity/tslint-config
[typescript]: https://www.typescriptlang.org/
[tslint]: https://palantir.github.io/tslint/
[license]: LICENSE


## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpositive-js%2Ftslint-config.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpositive-js%2Ftslint-config?ref=badge_large)
npm package: @ptv.js/react-scripts
Description: Configuration and scripts for Create React App.
Latest version: 4.0.3-beta

# react-scripts

This package includes scripts and configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
Please refer to its documentation:

- [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
npm package: @pubbo/add
Description: Add a dependency to matched packages
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/add`

> Add a dependency to matched packages

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```sh
$ lerna add <package>[@version] [--dev] [--exact] [--peer]
```

Add local or remote `package` as dependency to packages in the current Lerna repo. Note that only a single package can be added at a time compared to `yarn add` or `npm install`.

When run, this command will:

1. Add `package` to each applicable package. Applicable are packages that are not `package` and are in scope
2. Bootstrap packages with changes to their manifest file (`package.json`)

If no `version` specifier is provided, it defaults to the `latest` dist-tag, just like `npm install`.

## Options

`lerna add` accepts all [filter flags](https://www.npmjs.com/package/@pubbo/filter-options).

### `--dev`

Add the new package to `devDependencies` instead of `dependencies`.

### --exact

```sh
$ lerna add --exact
```

Add the new package with an exact version (e.g., `1.0.1`) rather than the default `^` semver range (e.g., `^1.0.1`).

### `--peer`

Add the new package to `peerDependencies` instead of `dependencies`.

### `--registry <url>`

Use a custom registry to install the targeted package.

### `--no-bootstrap`

Skip the chained `lerna bootstrap`.

## Examples

```sh
# Adds the module-1 package to the packages in the 'prefix-' prefixed folders
lerna add module-1 packages/prefix-*

# Install module-1 to module-2
lerna add module-1 --scope=module-2

# Install module-1 to module-2 in devDependencies
lerna add module-1 --scope=module-2 --dev

# Install module-1 to module-2 in peerDependencies
lerna add module-1 --scope=module-2 --peer

# Install module-1 in all modules except module-1
lerna add module-1

# Install babel-core in all modules
lerna add babel-core
```
npm package: @pubbo/changed
Description: List local packages that have changed since the last tagged release
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/changed`

> List local packages that have changed since the last tagged release

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

The output of `lerna changed` is a list of packages that would be the subjects of the next `lerna version` or `lerna publish` execution.

```sh
$ lerna changed
package-1
package-2
```

**Note:** `lerna.json` configuration for `lerna publish` _and_ `lerna version` also affects
`lerna changed`, e.g. `command.publish.ignoreChanges`.

## Options

`lerna changed` supports all of the flags supported by [`lerna ls`](https://github.com/lerna/lerna/tree/master/commands/list#options):

- [`--json`](https://github.com/lerna/lerna/tree/master/commands/list#--json)
- [`--ndjson`](https://github.com/lerna/lerna/tree/master/commands/list#--ndjson)
- [`-a`, `--all`](https://github.com/lerna/lerna/tree/master/commands/list#--all)
- [`-l`, `--long`](https://github.com/lerna/lerna/tree/master/commands/list#--long)
- [`-p`, `--parseable`](https://github.com/lerna/lerna/tree/master/commands/list#--parseable)
- [`--toposort`](https://github.com/lerna/lerna/tree/master/commands/list#--toposort)
- [`--graph`](https://github.com/lerna/lerna/tree/master/commands/list#--graph)

Unlike `lerna ls`, however, `lerna changed` **does not** support [filter options](https://www.npmjs.com/package/@pubbo/filter-options), as filtering is not supported by `lerna version` or `lerna publish`.

`lerna changed` supports the following options of [`lerna version`](https://github.com/lerna/lerna/tree/master/commands/version#options) (the others are irrelevant):

- [`--conventional-graduate`](https://github.com/lerna/lerna/tree/master/commands/version#--conventional-graduate).
- [`--force-publish`](https://github.com/lerna/lerna/tree/master/commands/version#--force-publish).
- [`--ignore-changes`](https://github.com/lerna/lerna/tree/master/commands/version#--ignore-changes).
- [`--include-merged-tags`](https://github.com/lerna/lerna/tree/master/commands/version#--include-merged-tags).
npm package: @pubbo/check-working-tree
Description: Check git working tree status and error appropriately
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/check-working-tree`

> Check git working tree status and error appropriately

## Usage

```js
const checkWorkingTree = require("@pubbo/check-working-tree");

// values listed here are their defaults
const options = {
  cwd: process.cwd(),
};

(async () => {
  try {
    await checkWorkingTree(options);
  } catch (err) {
    console.error(err.message);
    // "Working tree has uncommitted changes, ..."
  }
})();
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/clean
Description: Remove the node_modules directory from all packages
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/clean`

> Remove the node_modules directory from all packages

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```sh
$ lerna clean
```

Remove the `node_modules` directory from all packages.

`lerna clean` accepts all [filter flags](https://www.npmjs.com/package/@pubbo/filter-options), as well as `--yes`.


> `lerna clean` does not remove modules from the root `node_modules` directory, even if you have the `--hoist` option enabled.
npm package: @pubbo/collect-uncommitted
Description: Collect uncommitted changes to working tree for display in error messages
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/collect-uncommitted`

> Check git working tree status and collect uncommitted changes for display

## Usage

```js
const collectUncommitted = require("@pubbo/collect-uncommitted");

// values listed here are their defaults
const options = {
  cwd: process.cwd(),
  log: require("npmlog"),
};

(async () => {
  try {
    const results = await collectUncommitted(options);
    console.log(`Uncommitted changes on CWD ${options.cwd}: ${results.join("\n")}`);
  } catch (err) {
    console.error(err.message);
  }
})();
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/conventional-commits
Description: Lerna's internal interface to conventional-changelog and friends
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/conventional-commits`

> Lerna's internal interface to conventional-changelog and friends

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/create
Description: Create a new lerna-managed package
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/create`

> Create a new lerna-managed package

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```
lerna create <name> [loc]

Create a new lerna-managed package

Positionals:
  name  The package name (including scope), which must be locally unique _and_
        publicly available                                   [string] [required]
  loc   A custom package location, defaulting to the first configured package
        location                                                        [string]

Command Options:
  --access        When using a scope, set publishConfig.access value
                             [choices: "public", "restricted"] [default: public]
  --bin           Package has an executable. Customize with --bin
                  <executableName>                             [default: <name>]
  --description   Package description                                   [string]
  --dependencies  A list of package dependencies                         [array]
  --es-module     Initialize a transpiled ES Module
  --homepage      The package homepage, defaulting to a subpath of the root
                  pkg.homepage                                          [string]
  --keywords      A list of package keywords                             [array]
  --license       The desired package license (SPDX identifier)   [default: ISC]
  --private       Make the new package private, never published
  --registry      Configure the package's publishConfig.registry        [string]
  --tag           Configure the package's publishConfig.tag             [string]
  --yes           Skip all prompts, accepting default values
```
npm package: @pubbo/describe-ref
Description: Parse git describe output for lerna-related tags
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/describe-ref`

> Parse [git describe][] output for lerna-related tags

## Usage

```js
const describe = require("@pubbo/describe-ref");

(async () => {
  const { lastTagName, lastVersion, refCount, sha, isDirty } = await describe();
})();

// values listed here are their defaults
const options = {
  cwd: process.cwd(),
  // pass a glob to match tag name, e.g. "v*.*.*"
  match: undefined,
  // if true, omit --first-parent option
  includeMergedTags: false,
};

const { lastTagName, lastVersion, refCount, sha, isDirty } = describe.sync(options);

const result = describe.parse("v1.0.0-5-gdeadbeef");
// { lastTagName, lastVersion, refCount, sha, isDirty }
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

[git describe]: https://git-scm.com/docs/git-describe
npm package: @pubbo/diff
Description: Diff all packages or a single package since the last release
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/diff`

> Diff all packages or a single package since the last release

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```sh
$ lerna diff [package]

$ lerna diff
# diff a specific package
$ lerna diff package-name
```

Diff all packages or a single package since the last release.

> Similar to `lerna changed`. This command runs `git diff`.
npm package: @pubbo/get-npm-exec-opts
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/get-npm-exec-opts`

> An internal Lerna tool

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/get-packed
Description: Read contents of package tarball created by npm pack
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/get-packed`

> Read contents of package tarball created by npm pack

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/global-options
Description: Global options applicable to _every_ lerna sub-command
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/global-options`

> Global options applicable to _every_ lerna sub-command

## Options

### `--concurrency`

How many threads to use when Lerna parallelizes the tasks (defaults to count of logical CPU cores)

```sh
$ lerna publish --concurrency 1
```

### `--loglevel <silent|error|warn|success|info|verbose|silly>`

What level of logs to report. On failure, all logs are written to lerna-debug.log in the current working directory.

Any logs of a higher level than the setting are shown. The default is "info".

### `--max-buffer <bytes>`

Set a max buffer length for each underlying process call. Useful for example
when someone wants to import a repo with a larger amount of commits while
running `lerna import`. In that case the built-in buffer length might not
be sufficient.

### `--no-progress`

Disable progress bars. This is always the case in a CI environment.

### `--no-sort`

By default, all tasks execute on packages in topologically sorted order as to respect the dependency relationships of the packages in question. Cycles are broken on a best-effort basis in a way not guaranteed to be consistent across Lerna invocations.

Topological sorting can cause concurrency bottlenecks if there are a small number of packages with many dependents or if some packages take a disproportionately long time to execute. The `--no-sort` option disables sorting, instead executing tasks in an arbitrary order with maximum concurrency.

This option can also help if you run multiple "watch" commands. Since `lerna run` will execute commands in topologically sorted order, it can end up waiting for a command before moving on. This will block execution when you run "watch" commands, since they typically never end. An example of a "watch" command is [running `babel` with the `--watch` CLI flag](https://babeljs.io/docs/usage/cli/#babel-compile-files).

### `--reject-cycles`

Fail immediately if a cycle is found (in `bootstrap`, `exec`, `publish` or `run`).

```sh
$ lerna bootstrap --reject-cycles
```
npm package: @pubbo/has-npm-version
Description: Test if the current version of npm satisfies a given semver range
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/has-npm-version`

> Test if the current version of npm satisfies a given semver range

## Usage

```js
const hasNpmVersion = require("@pubbo/has-npm-version");

// `npm --version` === 6.3.0
hasNpmVersion(">=6"); // => true

// `npm --version` === 5.6.0
hasNpmVersion(">=6"); // => false

// makePredicate() caches the call to `npm --version`
// useful if you're calling it repeatedly in a loop
const predicate = hasNpmVersion.makePredicate();

// `npm --version` === 6.3.0
hasNpmVersion(">=5"); // => true
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/import
Description: Import a package into the monorepo with commit history
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/import`

> Import a package into the monorepo with commit history

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```sh
$ lerna import <path-to-external-repository>
```

Import the package at `<path-to-external-repository>`, with commit history,
into `packages/<directory-name>`. Original commit authors, dates and messages
are preserved. Commits are applied to the current branch.

This is useful for gathering pre-existing standalone packages into a Lerna
repo. Each commit is modified to make changes relative to the package
directory. So, for example, the commit that added `package.json` will
instead add `packages/<directory-name>/package.json`.

_Note_: If you're importing an external repository on a new lerna repository, then do remember to have at least one commit.

```bash
# Getting started with Lerna
$ git init lerna-repo && cd lerna-repo
$ npx lerna init
$ npm install

# Adding a commit
$ git add .
$ git commit -m "Initial lerna commit" # Without a commit, import command would fail

# Importing other repository
$ npx lerna import <path-to-external-repository>
```

## Options

### `--flatten`

When importing repositories with merge commits with conflicts, the import command will fail trying to apply all commits. The user can use this flag to ask for import of "flat" history, i.e. with each merge commit as a single change the merge introduced.

```
$ lerna import ~/Product --flatten
```

### `--dest`

When importing repositories, you can specify the destination directory by the directory listed in lerna.json.

```
$ lerna import ~/Product --dest=utilities
```

### `--preserve-commit`

Each git commit has an **author** and a **committer** (with a separate date for each). Usually they're the same person (and date), but since `lerna import` re-creates each commit from the external repository, the **committer** becomes the current git user (and date). This is *technically* correct, but may be undesireable, for example, on Github, which displays both the **author** and **committer** if they're different people, leading to potentially confusing history/blames on imported commits.

Enabling this option preserves the original **committer** (and commit date) to avoid such issues.

```
$ lerna import ~/Product --preserve-commit
```
npm package: @pubbo/info
Description: Prints local environnment information
Author: James George
Latest version: 0.2.5

# `@pubbo/info`

> Print local environment information

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

The `info` prints local environment information that proves to be useful especially while submitting bug reports.

`lerna info`

```bash
Environment Info:

  System:
    OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
  Binaries:
    Node: 8.11.4 - /usr/bin/node
    Yarn: 1.17.0-0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 74.0.3729.157
    Firefox: 66.0.5
  npmPackages:
    lerna: 3.14.1
```
npm package: @pubbo/init
Description: Create a new Lerna repo or upgrade an existing repo to the current version of Lerna
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/init`

> Create a new Lerna repo or upgrade an existing repo to the current version of Lerna

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```sh
$ lerna init
```

Create a new Lerna repo or upgrade an existing repo to the current version of Lerna.

> Lerna assumes the repo has already been initialized with `git init`.

When run, this command will:

1. Add `lerna` as a [`devDependency`](https://docs.npmjs.com/files/package.json#devdependencies) in `package.json` if it doesn't already exist.
2. Create a `lerna.json` config file to store the `version` number.

Example output on a new git repo:

```sh
$ lerna init
lerna info version v2.0.0
lerna info Updating package.json
lerna info Creating lerna.json
lerna success Initialized Lerna files
```

## Options

### `--independent`

```sh
$ lerna init --independent
```

This flag tells Lerna to use independent versioning mode.

### `--exact`

```sh
$ lerna init --exact
```

By default, `lerna init` will use a caret range when adding or updating
the local version of `lerna`, just like `npm install --save-dev lerna`.

To retain the `lerna` 1.x behavior of "exact" comparison, pass this flag.
It will configure `lerna.json` to enforce exact match for all subsequent executions.

```json
{
  "command": {
    "init": {
      "exact": true
    }
  },
  "version": "0.0.0"
}
```
npm package: @pubbo/link
Description: Symlink together all packages that are dependencies of each other
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/link`

> Symlink together all packages that are dependencies of each other

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

## Usage

```sh
$ lerna link
```

Symlink together all Lerna `packages` that are dependencies of each other in the current Lerna repo.

## Options

### `--force-local`

```sh
$ lerna link --force-local
```

When passed, this flag causes the `link` command to always symlink local dependencies regardless of matching version range.

### `publishConfig.directory`

This _non-standard_ field allows you to customize the symlinked subdirectory that will be the _source_ directory of the symlink, just like how the published package would be consumed.

```json
  "publishConfig": {
    "directory": "dist"
  }
```

In this example, when this package is linked, the `dist` directory will be the source directory (e.g. `package-1/dist => node_modules/package-1`).
npm package: @pubbo/listable
Description: Shared logic for listing package information
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/listable`

> Shared logic for listing package information

This is an internal package for [Lerna](https://github.com/lerna/lerna/#readme), YMMV.

## Usage

### `listable.format()`

```js
const listable = require("@pubbo/listable");

const { text, count } = listable.format(packages, options);
```

### `listable.options()`

```js
const listable = require("@pubbo/listable");

exports.builder = yargs => {
  listable.options(yargs);
};
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/log-packed
Description: Log the result of npm pack --json
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/log-packed`

> Log the result of npm pack --json

Extracted from the [npm source](https://github.com/npm/cli/blob/4f801d8a476f7ca52b0f182bf4e17a80db12b4e2/lib/pack.js#L175-L212).

## Usage

```js
const execa = require("execa");
const logPacked = require("@pubbo/log-packed");

execa("npm", ["pack", "--json"]).then(result => {
  const tarballs = JSON.parse(result.stdout);
  tarballs.forEach(logPacked);
});
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/map-to-registry
Description: Produce registry uri and auth of package name from npm config
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/map-to-registry`

> Produce registry uri and auth of package name from npm config

## Usage

This is an extraction of an internal npm [utility](https://github.com/npm/npm/blob/f644018/lib/utils/map-to-registry.js). Caveat emptor.

```js
"use strict";

const mapToRegistry = require("@pubbo/map-to-registry");
const npmConf = require("@pubbo/npm-conf");

const config = npmConf();
const { uri, auth } = mapToRegistry("my-package", config);
```

`uri` and `auth` are suitable for arguments to [npm-registry-client](https://www.npmjs.com/package/npm-registry-client) instance method parameters.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/npm-conf
Description: Vendored npm-conf with updates
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/npm-conf`

> Vendored npm-conf with updates

## Usage

See [npm-conf](https://github.com/kevva/npm-conf#readme)

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/npm-dist-tag
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/npm-dist-tag`

> An internal Lerna tool

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/npm-run-script
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/npm-run-script`

> An internal Lerna tool

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/pack-directory
Description: Pack a directory into an npm package tarball
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/pack-directory`

> Pack a directory into an npm package tarball

This package owes an immense debt of gratitude to [Kat Marchán](https://github.com/zkat), [Rebecca Turner](https://github.com/iarna), and all past contributors to npm for making such awesome software that I basically copied.

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/package-graph
Description: Lerna's internal representation of a package graph
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/package-graph`

> Lerna's internal representation of a package graph

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/prerelease-id-from-version
Description: Get the prerelease ID from a version string
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/prerelease-id-from-version`

> Get the prerelease ID from a version string

## Usage

```js
const prereleaseIdFromVersion = require("@pubbo/prerelease-id-from-version");

prereleaseIdFromVersion(1.0.0-alpha.0); // => "alpha"

prereleaseIdFromVersion(1.0.0); // => undefined

prereleaseIdFromVersion(); // => undefined
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/project
Description: Lerna project configuration
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/project`

> Lerna project configuration

## Configuration Resolution

Lerna's file-based configuration is located in `lerna.json` or the `lerna` property of `package.json`.
Wherever this configuration is found is considered the "root" of the lerna-managed multi-package repository.
A minimum-viable configuration only needs a `version` property; the following examples are equivalent:

```json
{
  "version": "1.2.3"
}
```

```json
{
  "name": "my-monorepo",
  "version": "0.0.0-root",
  "private": true,
  "lerna": {
    "version": "1.2.3"
  }
}
```

Any other properties on this configuration object will be used as defaults for CLI options of _all_ lerna subcommands. That is to say, CLI options _always_ override values found in configuration files (a standard practice for CLI applications).

### Command-Specific Configuration

To focus configuration on a particular subcommand, use the `command` subtree. Each subproperty of `command` corresponds to a lerna subcommand (`publish`, `create`, `run`, `exec`, etc).

```json
{
  "version": "1.2.3",
  "command": {
    "publish": {
      "loglevel": "verbose"
    }
  },
  "loglevel": "success"
}
```

In the example above, `lerna publish` will act as if `--loglevel verbose` was passed.
All other subcommands will receive the equivalent of `--loglevel success` (much much quieter).
npm package: @pubbo/pulse-till-done
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/pulse-till-done`

> An internal Lerna tool

## Usage

You probably shouldn't, at least directly.
This is a direct extraction of an [internal npm utility](https://github.com/npm/cli/blob/f6ebf5e/lib/utils/pulse-till-done.js).

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/rimraf-dir
Description: Run rimraf on a directory in a subprocess to hack around slowness
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/rimraf-dir`

> Run rimraf on a directory in a subprocess to hack around slowness

## Usage

```js
const rimrafDir = require("@pubbo/rimraf-dir");

rimrafDir("/path/to/directory").then(removedDir => {
  console.log("removed", removedDir);
});
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/symlink-dependencies
Description: Lerna's internal symlinking tool
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/symlink-dependencies`

> Lerna's internal symlinking tool

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubbo/write-log-file
Description: What lerna uses to dump logs
Author: Daniel Stockman
Latest version: 0.2.5

# `@pubbo/write-log-file`

> What lerna uses to dump logs

## Usage

You probably shouldn't, at least directly.

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.
npm package: @pubcore/docker-cluster-test
Description: create clusters for testing purpose
Author: pubcore
Latest version: 0.2.5

## package to create a (local) docker swarm cluster for testing
This package can be used for scripts (js) to create a docker swarm cluster
as a foundation for testing of services dealing with distributed data.
Testing the behaviour of distributed-data-services, for instance, if a node goes
down, leads to the motivation for this package: create a test-cluster,
deploy a service, create some test-load and in parallel shoot down a node.

#### Prerequisites
* Mac, Linux, Windows 7 and 8
* docker, docker-machine (https://docs.docker.com/machine/install-machine/)
* virtualbox
* nodejs

#### Example
```
'use strict'
const {installCluster, purgeCluster, isReady, getVmIp
	} = require('@pubcore/docker-cluster-test'),
	{deploy} = require('@pubcore/node-docker-build')

//this will lead to 2 virtual machines with name vm1 and vm2
vmSet = {name:'vm', count:2}

//shortcut for  createVms(vmSet), startVms(vmSet) and createSwarm(vmSet)
installCluster(vmSet)

//helper function to deploy an example service (via ssh to the test-cluster)
deploy({
	moduleName:resolve(__dirname, '../localhost/config'),
	logPath:resolve(__dirname)
})

//if test-service is ready on vm2, do some-thing, here - for instance - cleanup
isReady({host:getVmIp(vmSet), port:8080}).then(() => {

	//purge stuff, shortcut for stopVms(vmSet) and deleteVms(vmSet)
	purgeCluster(vmSet)
},
```

#### References
[docker swarm tutorial](https://docs.docker.com/get-started/part4/).
npm package: @pubcore/dwnld-xlsx
Description: js lib to provide a xlsx Excel file as download
Author: pubcore
Latest version: 1.1.7

[![Build Status](https://travis-ci.org/pubcore/download-xlsx.svg?branch=master)](https://travis-ci.org/pubcore/download-xlsx)

### Download xlsx file

#### Install

	npm install @pubcore/download-xlsx --save

#### usage

simple example:

	import downloadXlsx from '@pubcore/download-xlsx'

	downloadXlsx({
		cols: ['column1','column2','column3'].map(c => ({'name': c})),
		rows: [
			{column1:'value 1', column2: 'lorem ipsum dolor sit amet', column3: '4.23'},
			{column1:'value 2', column2: 'foo bar', column3: 0.23},
			{column1:'value 3', column2: 'foobar', column3: ''}
		],
		//default is 't' (text), https://github.com/SheetJS/js-xlsx#data-types
		types:{column3:'n'}, //(use number format for values in column3)
		filename: 'example.xlsx'
	})

## codepen example
https://codepen.io/pubcore/pen/XqazyV
npm package: @pubcore/express-basic-auth
Description: express middleware to perform http basic authentication
Author: pubcore
Latest version: 1.1.9

## Express middleware for basic authentication

### Prerequisites
* [express](https://expressjs.com) based webserver
* mysql ([knex](https://knexjs.org) compatible) database (see @pubcore/knex-auth)

### Features
* supports two type of users: SYSTEM and HUMAN
* will set an user object to express req object (if authentication succeeded)
* serves allways "401 Unauthorized" and cancel URI, if no credentials
* serves allways "401 Unautherized" and cancel URI, if user not found
* calls express "next", if username and password is ok
* redirect to "deactivated" page, if wrong password used too much within a time window (105ms)
* redirect to "deactivated" page, if last login of user is long time ago
* updates last login stamp, one time within defined time frame
* redirects to change password page (including a back-uri), on first request of new user
* redirects to change password page (including a back-uri), if password is expired
* support secondary password for SYSTEM users
* does set a flag to user object (oldPwUsed), if secondary password exists, but old password has been used
* optinal support of login by JsonWebToken cookie (Jwt), enabled if option "jwtKeyFile" is available

[activity diagram](doc/authentication-flow.pdf)

### Configuration options (set on server startup)
		options = {
			publicCancelLoginUri:'/login/canceled',
			publicDeactivatedUri:'/login/deactivated',
			changePasswordUri:'/login/pwchange',
			maxTimeWithoutActivity: 1000 * 60 * 60 * 24 * 180,//[msec]
			maxLoginAttempts:10,
			maxLoginAttemptsTimeWindow:1000 * 3600 * 24,//[msec]
			minTimeBetweenUpdates:1000 * 3600,//[msec],
			jwtKeyFile:'/run/secret/jwt-key.txt' //optional
		},
		table = 'user',

### Example
		const
			createLoginMiddleware = require('@pubcore/express-basic-auth').default,
			options = {
				changePasswordUri:'/login/pwchange',
				publicDeactivatedUri:'/login/deactivated',
				publicCancelLoginUri:'/login/canceled',
				maxTimeWithoutActivity: 1000 * 60 * 60 * 24 * 180,//[msec]
				maxLoginAttempts:10,
				maxLoginAttemptsTimeWindow:1000 * 3600 * 24,//[msec]
				minTimeBetweenUpdates:1000 * 3600,//[msec]
			},
			table = 'user',
			knex = new Knex({
				client: 'mysql', connection: {/* see knex*/}
			}),
			db = {knex, table}

		const login = createLoginMiddleware({db, options})
		var router = express.Router()
		router.all('/', login)
npm package: @pubcore/express-login
Description: express middleware to perform http based logins
Author: pubcore
Latest version: 1.3.9

## Express authentication middleware
Implementation for [@pubcore/authentication](https://github.com/pubcore/authentication)

#### Prerequisites
* Node.js
* Express webserver
* Knex

#### Example
```
const login = require('@pubcore/express-login'),
	app = express(),
	options = {
		methods: {jwt:{}, form:{}, basicAuth:{}},
		publicDeactivatedUri: '/login/deactivated',
		publicCancelLoginUri: '/login/canceled',
		changePasswordUri:'/login/pwchange',
		maxTimeWithoutActivity: 1000 * 60 * 60 * 24 * 180, //[msec]
		maxTimeWithout401: 1000 * 3600, //[msec]
		maxLoginAttempts: 2,
		maxLoginAttemptsTimeWindow: 1000 * 3600 * 12, //[msec]
		minTimeBetweenUpdates: 1000 * 60, //[msec]
		jwtKeyFile: '/path/to/keyfile'
	},
	db = {knex, table:'users'}

app.use(login({db, options}))
```
npm package: @pubcore/generator-create
Description: Create scaffold minimal yeoman generator
Author: pubcore
Latest version: 1.7.0

## create a minimal yeoman generator scaffolding

It will setup jslint and mocha for testing of the generator.

#### Prerequisites

- npm ^5.2.0

#### Example

1. Change into the directory of your "scope" or (for unscoped packages) where your global packages are.
1. Create a directory with name of your new generator.
   Convention is lower case and dash-separated, and must start with "generator-", here we assume we want to generate "some-stuff":

```
mkdir generator-some-stuff
```

1. Change into this directory

```
cd generator-some-stuff
```

1. Create scaffolding of a generator. You will be asked for some global settings, which will be saved in package.json:

```
npx -p @pubcore/generator-create -p yo yo @pubcore/create
```

1.  Test creation by execute prepared test:

        npm run test

1.  Start build you generator in app/index.js, levearge yeoman's docs:
    https://yeoman.io/authoring/running-context.html
npm package: @pubcore/generator-js
Description: Yeomnan generator to create scaffolding for js package
Author: pubcore
Latest version: 1.2.1

[![Build Status](https://travis-ci.org/pubcore/generator-js.svg?branch=master)](https://travis-ci.org/pubcore/generator-js)

## Commandline tool to scaffolding new packages

### Prerequisites

- latest version of nodejs
- latest version of npm
- git

### Yeoman generator to create a package scaffolding for ECMAScript 2021, with

- eslint
- prettier with husky pre-commit hook
- transpiler via esbuild
- running tests via mocha
- sho code coverage after test run with nyc

### Install it global

```
npm install -g yo @pubcore/generator-js
```

### How to use

1. within your scope directoy craete a new one (convention: lower case and dash-separated)

```
mkdir new-project
```

2. and change into it

```
cd new-project
```

3. execute

```
yo @pubcore/js
```

4. (optional) if your code already exists, copy it into src/app.mjs.
npm package: @pubcore/generator-mui
Description: User interface component scaffold, based on react, material-ui, final-form and redux
Author: pubcore
Latest version: 1.5.0

[![Build Status](https://travis-ci.org/pubcore/generator-mui.svg?branch=master)](https://travis-ci.org/pubcore/generator-mui)

## Commandline tool to create a material-ui based web-app scaffolding

### Prerequisites
* latest version (LTS) of nodejs and npm
* root permissions (for autogeneration of self-signed certificate by devcert)

### Yeoman generator to create a web app scaffolding with
* npm
* eslint
* transpiler via esbuild
* material-ui with styled components
* redux with redux-toolkit
* final-form
* auto-generation of certificates for local development via https
* express based server (production ready)
* Dockerfile to build image via ```npm run build-image```

### local installation (development)
1) within your scope directoy craete a new one (convention: lower case and dash-separated)
```
mkdir new-project
```
2) and change into it
```
cd new-project
```
3) execute
```
npx -p yo -p @pubcore/generator-mui yo @pubcore/mui
```
npm package: @pubcore/generator-nodejs
Description: generator to create a package scaffold for nodejs ECMAScript
Author: pubcore
Latest version: 1.1.0

## Commandline tool to create node-js package scaffold

### Prerequisites
* latest version of nodejs
* latest version of npm

### Yeoman generator to scaffold a nodejs (commonjs) package with
* eslint
* running tests via mocha
* running show code coverage after test run

### How to use
1) within your scope directoy craete a new one (convention: lower case and dash-separated)
```
mkdir new-project
```
2) and change into it
```
cd new-project
```
3) execute
```
npx -p yo -p @pubcore/generator-nodejs yo @pubcore/nodejs
```
4) (optional) if your code already exists, copy it into js/index.js.
npm package: @pubcore/generator-rest
Description: create package scaffolding for pubcore rest component
Author: pubcore
Latest version: 1.3.0

[![Build Status](https://travis-ci.org/pubcore/generator-rest.svg?branch=master)](https://travis-ci.org/pubcore/generator-rest)

## Commandline tool create a pubcore component for a RESTful api scaffolding

### Prerequisites
* latest version of nodejs
* latest version of npm

### It will create/setup minimum package structure for
* pubcore component for a @pubcore/node-composition
* eslint
* testing via express and mocha
* coverage via nyc

### How to use
1) create a directory
(convention: lower case, dash-separated)
```
mkdir my-api
```

2) and change into it
```
cd my-api
```

3) execute
```
npx -p yo -p @pubcore/generator-rest yo @pubcore/rest
```

4) (optional) execute prepared test example to check installation
```
npm run test
```
npm package: @pubcore/generator-selfsigned-tls
Description: Create selfsigned TLS certificate, key and root cert fore testing
Author: pubcore
Latest version: 1.3.1

## Create self-signed TLS certificate files  

NOT for production use !

To enable Transport Layer Security (TLS) for http servers we need to create proper certificates and keys. In order to make Browsers work correct with selfsigned certificates it is required to register the corresponding root certificate (which has been used to sign the server certificate).

This yeoman generator creates this files with minimal input (domainname or IP address).

#### Prerequisites
* openssl command line client is installed
* nodejs and npm in lates versions are installed

#### Description
If the working directory is empty, a root certificate will be generated. If root cert. (rootCA.pem and rootCA.key) already exists, it will be reused for other domains. Fore each domain a subfolder will be created containing domain specific config, key and cert files.  

If called again for a given domain, only the server certificate will be created (==updated).

#### Example
On shell, create a directory, change into and execute and define some domain:

	npx -p yo -p @pubcore/generator-selfsigned-tls yo @pubcore/selfsigned-tls

On success, beside some other files, following is created:

	- rootCA.pem
	- [domain]
	  |
	  +- server.crt
	  +- server.key

#### Distribution

##### server.crt and server.key
This two files needs to be plugged into your server(s). Please find corresponding server documentation how to enable https

##### rootCA.pem
This root certificate can be attached to browser's/operating systems certificate store. There are options to add/trust on the fly, via options visible on warning page browser will show on first request.

* On MacOS: Use keychain tool, Category "Certificates" (once added, it will be used by all browsers, not only Safari)

#### References
https://en.wikipedia.org/wiki/Root_certificate

https://medium.freecodecamp.org/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec

https://www.openssl.org

https://yeoman.io