open-index/open-npm huggingface dataset:
npm package: @mermaid-js/examples
Description: Mermaid examples package
Author: Sidharth Vinod
Latest version: 1.2.0

# @mermaid-js/examples

The `@mermaid-js/examples` package contains a collection of examples used by tools like [mermaid.live](https://mermaid.live) to help users get started with new diagrams.

You can duplicate an existing diagram example file, e.g., `packages/examples/src/examples/flowchart.ts`, and modify it with details specific to your diagram.

Then, import the example in the `packages/examples/src/index.ts` file and add it to the `examples` array.

Each diagram should have at least one example, which should be marked as the default. It's a good idea to add more examples to showcase different features of the diagram.

## Usage

```bash
pnpm add @mermaid-js/examples
```

A sample usage of the package in mermaid.live, to get the default example for every diagram type:

```ts
import { diagramData } from '@mermaid-js/examples';

type DiagramDefinition = (typeof diagramData)[number];

const isValidDiagram = (diagram: DiagramDefinition): diagram is Required<DiagramDefinition> => {
  return Boolean(diagram.name && diagram.examples && diagram.examples.length > 0);
};

export const getSampleDiagrams = () => {
  const diagrams = diagramData
    .filter((d) => isValidDiagram(d))
    .map(({ examples, ...rest }) => ({
      ...rest,
      example: examples?.filter(({ isDefault }) => isDefault)[0],
    }));
  const examples: Record<string, string> = {};
  for (const diagram of diagrams) {
    examples[diagram.name.replace(/ (Diagram|Chart|Graph)/, '')] = diagram.example.code;
  }
  return examples;
};
```
npm package: @mermaid-js/layout-elk
Description: ELK layout engine for mermaid
Latest version: 0.2.1

# @mermaid-js/layout-elk

This package provides a layout engine for Mermaid based on the [ELK](https://www.eclipse.org/elk/) layout engine.

> [!NOTE]
> The ELK Layout engine will not be available in all providers that support mermaid by default.
> The websites will have to install the `@mermaid-js/layout-elk` package to use the ELK layout engine.

## Usage

```
flowchart-elk TD
  A --> B
  A --> C
```

```
---
config:
  layout: elk
---

flowchart TD
  A --> B
  A --> C
```

```
---
config:
  layout: elk.stress
---

flowchart TD
  A --> B
  A --> C
```

### With bundlers

```sh
npm install @mermaid-js/layout-elk
```

```ts
import mermaid from 'mermaid';
import elkLayouts from '@mermaid-js/layout-elk';

mermaid.registerLayoutLoaders(elkLayouts);
```

### With CDN

```html
<script type="module">
  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
  import elkLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0/dist/mermaid-layout-elk.esm.min.mjs';

  mermaid.registerLayoutLoaders(elkLayouts);
</script>
```

## Supported layouts

- `elk`: The default layout, which is `elk.layered`.
- `elk.layered`: Layered layout
- `elk.stress`: Stress layout
- `elk.force`: Force layout
- `elk.mrtree`: Multi-root tree layout
- `elk.sporeOverlap`: Spore overlap layout

<!-- TODO: Add images for these layouts, as GitHub doesn't support natively. -->
npm package: @mermaid-js/layout-tidy-tree
Description: Tidy-tree layout engine for mermaid
Latest version: 0.2.1

# @mermaid-js/layout-tidy-tree

This package provides a bidirectional tidy tree layout engine for Mermaid based on the non-layered-tidy-tree-layout algorithm.

> [!NOTE]
> The Tidy Tree Layout engine will not be available in all providers that support mermaid by default.
> The websites will have to install the @mermaid-js/layout-tidy-tree package to use the Tidy Tree layout engine.

## Usage

```
---
config:
  layout: tidy-tree
---
mindmap
root((mindmap))
  A
  B
```

### With bundlers

```sh
npm install @mermaid-js/layout-tidy-tree
```

```ts
import mermaid from 'mermaid';
import tidyTreeLayouts from '@mermaid-js/layout-tidy-tree';

mermaid.registerLayoutLoaders(tidyTreeLayouts);
```

### With CDN

```html
<script type="module">
  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
  import tidyTreeLayouts from 'https://cdn.jsdelivr.net/npm/@mermaid-js/layout-tidy-tree@0/dist/mermaid-layout-tidy-tree.esm.min.mjs';

  mermaid.registerLayoutLoaders(tidyTreeLayouts);
</script>
```

## Tidy Tree Layout Overview

tidy-tree: The bidirectional tidy tree layout

The bidirectional tidy tree layout algorithm creates two separate trees that grow horizontally in opposite directions from a central root node:
Left tree: grows horizontally to the left (children alternate: 1st, 3rd, 5th...)
Right tree: grows horizontally to the right (children alternate: 2nd, 4th, 6th...)

This creates a balanced, symmetric layout that is ideal for mindmaps, organizational charts, and other tree-based diagrams.

Layout Structure:
[Child 3] ← [Child 1] ← [Root] → [Child 2] → [Child 4]
↓ ↓ ↓ ↓
[GrandChild] [GrandChild] [GrandChild] [GrandChild]
npm package: @mermaid-js/parser
Description: MermaidJS parser
Author: Yokozuna59
Latest version: 1.1.0

<p align="center">
<img src="https://raw.githubusercontent.com/mermaid-js/mermaid/develop/docs/public/favicon.svg" height="150">

</p>
<h1 align="center">
Mermaid Parser
</h1>

<p align="center">
Mermaid parser package
<p>

[![NPM](https://img.shields.io/npm/v/@mermaid-js/parser)](https://www.npmjs.com/package/@mermaid-js/parser)

## How the package works

The package exports a `parse` function that has two parameters:

```ts
declare function parse<T extends DiagramAST>(
  diagramType: keyof typeof initializers,
  text: string
): T;
```

## How does a Langium-based parser work?

```mermaid
sequenceDiagram
actor Package
participant Module
participant TokenBuilder
participant Lexer
participant Parser
participant ValueConverter


Package ->> Module: Create services
Module ->> TokenBuilder: Override or/and<br>reorder rules
TokenBuilder ->> Lexer: Read the string and transform<br>it into a token stream
Lexer ->> Parser: Parse token<br>stream into AST
Parser ->> ValueConverter: Clean/modify tokenized<br>rules returned value
ValueConverter -->> Package: Return AST
```

- When to override `TokenBuilder`?
  - To override keyword rules.
  - To override terminal rules that need a custom function.
  - To manually reorder the list of rules.

- When to override `Lexer`?
  - To modify input before tokenizing.
  - To insert/modify tokens that cannot or have not been parsed.

- When to override `LangiumParser`?
  - To insert or modify attributes that can't be parsed.

- When to override `ValueConverter`?
  - To modify the returned value from the parser.
npm package: @mermaid-js/tiny
Description: Tiny version of mermaid
Author: Sidharth Vinod
Latest version: 11.14.0

# Tiny Mermaid

This is a tiny version of mermaid that is optimized for the web. It is a subset of the mermaid library and is designed to be used in the browser via CDN.

## Lazy loading

The original mermaid library supports lazy loading, so it will be faster on the initial load, and only load the required diagrams.
This is not supported in the tiny mermaid library. So it's always recommended to use the full mermaid library unless you have a very specific reason to reduce the bundle size.

## Removals from mermaid

This does not support

- Mindmap Diagram
- Architecture Diagram
- Katex rendering
- Lazy loading

## Usage via NPM

This package is not meant to be installed directly from npm. It is designed to be used via CDN.
If you need to use mermaid in your project, please install the full [`mermaid` package](https://www.npmjs.com/package/mermaid) instead.

## Usage via CDN

```html
<!-- Format -->
<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@<MERMAID_MAJOR_VERSION>/dist/mermaid.tiny.js"></script>

<!-- Pinning major version -->
<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@11/dist/mermaid.tiny.js"></script>

<!-- Pinning specific version -->
<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@11.6.0/dist/mermaid.tiny.js"></script>
```
npm package: @mermaidchart/cli
Description: CLI for interacting with https://mermaid.ai, the platform that makes collaborating with Mermaid diagrams easy
Author: Alois Klink
Latest version: 0.1.1

# @mermaidchart/cli

CLI for interacting with https://MermaidChart.com, the platform that makes collaborating with Mermaid diagrams easy!

## Installation

`@mermaidcart/cli` is tested to work with Node.JS v18.18.0 or later.

We recommend installation using [npx](https://docs.npmjs.com/cli/v10/commands/npx)
to automatically download, cache, and run `@mermaidcart/cli`, as it comes with
most Node.JS installations.

```bash
npx @mermaidchart/cli --help
```

## Usage

```bash
npx @mermaidchart/cli <command>
```

Use `--help` to see options!

```bash
npx @mermaidchart/cli --help
```

`@mermaidchart/cli` allows you to easily sync local diagrams with your diagrams
on https://mermaidchart.com.

These local diagrams can either be stored in `.mmd` or `.mermaid` files, or
they can be stored within ```` ```mermaid```` code blocks within `.md`
[GFM](https://github.github.com/gfm/) markdown files.

### `login`

Firstly, go to https://www.mermaidchart.com/app/user/settings and generate an
API key, which you can then setup by running:

```bash
npx @mermaidchart/cli login
```

### `link` an existing Mermaid diagram to MermaidChart.com

You can link a local Mermaid diagram to MermaidChart using:

```bash
npx @mermaidchart/cli link ./path/to/my/mermaid-digram.mmd
```

This will add an `id: xxxx-xxxxx-xxxxx` field to your diagram's YAML frontmatter,
which points to the diagram on MermaidChart.com:

````markdown
```mermaid
---
title: My diagram
id: https://www.mermaidchart.com/d/xxxx-xxxxx-xxxxx # this field is created by @mermaidchart/cli
---
flowchart
  x[My Diagram]
```
````

### `push` local changes to MermaidChart.com

Once you've made some local changes, you can `push` your changes to MermaidChart.com

```console
$ npx @mermaidchart/cli push ./path/to/my/mermaid-digram.mmd
✅ - ./path/to/my/mermaid-digram.mmd was pushed
```

### `pull` changes from MermaidChart.com

You can use `pull` to pull down changes from MermaidChart.com.

```console
$ npx @mermaidchart/cli pull ./path/to/my/mermaid-digram.mmd
✅ - ./path/to/my/mermaid-digram.mmd was updated
```

Or use the `--check` flag to throw an error if your local file would have been
updated:

```console
$ npx @mermaidchart/cli pull ./path/to/my/mermaid-digram.mmd
❌ - ./path/to/my/mermaid-digram.mmd would be updated
```

## Contributing

For local development and testing, you can `pnpm dev` to run the CLI,
`pnpm run lint` to run linting, and `pnpm test` to run unit tests.
npm package: @mermaidchart/sdk
Description: Access the MermaidChart services with OAuth and type safety.
Latest version: 0.2.4

# MermaidChart SDK

This SDK allows developers of plugins to access the MermaidChart services efficiently.

It handles the OAuth based authentication, data fetching, type safety and more.

## Installation

```bash
npm install @mermaidchart/sdk
```

## Usage

Refer: https://github.com/Mermaid-Chart/vscode-mermaid-chart/blob/be2b73f1b346c6ba666fac6fa13a27328dbfb4b6/src/mermaidChartVSCode.ts
npm package: @mermaider/cli
Description: ## Installation
Latest version: 1.0.11

# Mermaider CLI

## Installation

```bash
npm install -g @mermaider/cli
# or
yarn global add @mermaider/cli
# or
pnpm add -g @mermaider/cli
```

## Usage

> Note: You will need an ANTHROPIC_API_KEY environment variable set to use the CLI.

```bash
mermaider parse ./path/to/file.ts
```

This will generate a `.mmd` file and a `.svg` file in the same directory as the file.

If you want to pass your API key to the CLI for a single run you can run the command like so:

```bash
ANTHROPIC_API_KEY=your-api-key mermaider parse ./path/to/file.ts
```

## Contributing

Please see the [contributing guide](../../CONTRIBUTING.md) for more information.

## License

[MIT](../../LICENSE)
npm package: @merna/add
Description: Add a dependency to matched packages
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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/@lerna/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: @merna/changed
Description: List local packages that have changed since the last tagged release
Author: Daniel Stockman
Latest version: 5.0.2

# `@lerna/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/@lerna/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: @merna/check-working-tree
Description: Check git working tree status and error appropriately
Author: Daniel Stockman
Latest version: 3.18.1

# `@lerna/check-working-tree`

> Check git working tree status and error appropriately

## Usage

```js
const checkWorkingTree = require("@lerna/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: @merna/clean
Description: Remove the node_modules directory from all packages
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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/@lerna/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: @merna/collect-uncommitted
Description: Collect uncommitted changes to working tree for display in error messages
Author: Daniel Stockman
Latest version: 3.18.1

# `@lerna/collect-uncommitted`

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

## Usage

```js
const collectUncommitted = require("@lerna/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: @merna/conventional-commits
Description: Lerna's internal interface to conventional-changelog and friends
Author: Daniel Stockman
Latest version: 4.0.2

# `@lerna/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: @merna/create
Description: Create a new lerna-managed package
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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: @merna/describe-ref
Description: Parse git describe output for lerna-related tags
Author: Daniel Stockman
Latest version: 3.17.2

# `@merna/describe-ref`

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

## Usage

```js
const describe = require("@merna/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: @merna/diff
Description: Diff all packages or a single package since the last release
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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: @merna/get-npm-exec-opts
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 3.15.0

# `@lerna/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: @merna/get-packed
Description: Read contents of package tarball created by npm pack
Author: Daniel Stockman
Latest version: 3.18.0

# `@lerna/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: @merna/global-options
Description: Global options applicable to _every_ lerna sub-command
Author: Daniel Stockman
Latest version: 3.15.0

# `@lerna/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: @merna/has-npm-version
Description: Test if the current version of npm satisfies a given semver range
Author: Daniel Stockman
Latest version: 3.18.1

# `@lerna/has-npm-version`

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

## Usage

```js
const hasNpmVersion = require("@lerna/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: @merna/import
Description: Import a package into the monorepo with commit history
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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: @merna/info
Description: Prints local environnment information
Author: James George
Latest version: 3.23.1

# `@lerna/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: @merna/init
Description: Create a new Lerna repo or upgrade an existing repo to the current version of Lerna
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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: @merna/link
Description: Symlink together all packages that are dependencies of each other
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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: @merna/listable
Description: Shared logic for listing package information
Author: Daniel Stockman
Latest version: 3.20.1

# `@lerna/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("@lerna/listable");

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

### `listable.options()`

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

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

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

# `@lerna/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("@lerna/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: @merna/map-to-registry
Description: Produce registry uri and auth of package name from npm config
Author: Daniel Stockman
Latest version: 3.15.0

# `@lerna/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("@lerna/map-to-registry");
const npmConf = require("@lerna/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: @merna/npm-conf
Description: Vendored npm-conf with updates
Author: Daniel Stockman
Latest version: 3.18.0

# `@lerna/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: @merna/npm-dist-tag
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 3.20.1

# `@lerna/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: @merna/npm-run-script
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 3.18.1

# `@lerna/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: @merna/pack-directory
Description: Pack a directory into an npm package tarball
Author: Daniel Stockman
Latest version: 3.18.1

# `@lerna/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: @merna/package-graph
Description: Lerna's internal representation of a package graph
Author: Daniel Stockman
Latest version: 4.0.2-test.1

# `@lerna/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: @merna/prerelease-id-from-version
Description: Get the prerelease ID from a version string
Author: Daniel Stockman
Latest version: 3.18.0

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

> Get the prerelease ID from a version string

## Usage

```js
const prereleaseIdFromVersion = require("@lerna/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: @merna/project
Description: Lerna project configuration
Author: Daniel Stockman
Latest version: 5.0.1

# `@lerna/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: @merna/pulse-till-done
Description: An internal Lerna tool
Author: Daniel Stockman
Latest version: 3.15.0

# `@lerna/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: @merna/rimraf-dir
Description: Run rimraf on a directory in a subprocess to hack around slowness
Author: Daniel Stockman
Latest version: 3.18.1

# `@lerna/rimraf-dir`

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

## Usage

```js
const rimrafDir = require("@lerna/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: @merna/symlink-dependencies
Description: Lerna's internal symlinking tool
Author: Daniel Stockman
Latest version: 3.19.1

# `@lerna/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: @merna/unhoist
Description: A merna cli to undo hoisting on a given package-lock.json, reconstructing it using only the root package-lock.json and local packages' package-lock.jsons.
Author: Alex Okonechnikov
Latest version: 1.1.2

# @merna/unhoist

A merna cli to undo hoisting on a given package-lock.json, reconstructing
it using only the root package-lock.json and local packages'
package-lock.jsons.

A tree roughly inspired by npm/arborist (the package used to construct and act
on package-lock.json files) is used to update and prune dependencies.

A high level view of the algorithm used:

- Check for dependencies in the package.json that are not at the top level
of the package-lock.json
- Add all missing remote, top level dependencies to the package-lock.json
- Add all missing local (to the repo) dependencies using their
package-lock.json files recursively unhoisted using the above logic
- Parse the current temp lockfile into a tree and evaluate every entry in
the requires map, adding each to the highest possible level in the tree
and checking semver requirements. Each entry is copied from the root
package-lock.json. This is naive and results in a ton of duplication.
- Parse the tree to prune all duplicate dependencies. Every identical
dependency in lower levels of the tree that's provided in higher levels
is removed
- Dehydrate the tree into the final lockfile
npm package: @merna/write-log-file
Description: What lerna uses to dump logs
Author: Daniel Stockman
Latest version: 3.15.0

# `@lerna/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: @merncloud/node-services-library
Description: NodeJs Services Library
Author: Anurag Jaisingh
Latest version: 1.0.8

# Node Services Library

Simple services useful for any nodejs projects.

## Table of Contents

- [Installation](#installation)

## Installation

Describe how to install your library using npm or yarn:

```bash
npm install @merncloud/node-services-library
# or
yarn add @merncloud/node-services-library

```

### Configuring Logger for Any Environment

To configure the logger for specific environments using your package, follow these steps:

1. Import the `configureLogService` function from your package by including the following code in your application:

   ```javascript
   import { configureLogService } from "@merncloud/node-services-library";

   configureLogService({
     allowedEnvironments: ["development", "test", "staging"],
   });
   ```

### Logging with `logService.log`

To log messages using the `logService.log` method from your package, follow these steps:

1. Import the `logService` object from your package by including the following code in your application:

   ```javascript
   import { logService } from "@merncloud/node-services-library";

   logService.logger.log("This is a log message.");
   logService.logger.log("Yourmessage", data);
   logService.logger.error("Something");
   logService.logger.info("Something");
   logService.logger.table(data);
   ```

For support, please email [anurag.jscript@gmail.com](mailto:anurag.jscript@gmail.com)
npm package: @merofinance/protocol
Description: [![Health Checks](https://github.com/merofinance/protocol-dev/actions/workflows/health-checks.yml/badge.svg)](https://github.com/merofinance/protocol-dev/actions/workflows/health-checks.yml)
Latest version: 1.4.1

# Mero Protocol

[![Health Checks](https://github.com/merofinance/protocol-dev/actions/workflows/health-checks.yml/badge.svg)](https://github.com/merofinance/protocol-dev/actions/workflows/health-checks.yml)

This is the official repository for the [Mero protocol](https://mero.finance/) contracts.

In addition to the code, check out the official [Mero documentation](https://docs.mero.finance/) as well as the [Mero developers documentation](https://developers.mero.finance/), and the [list of deployed contracts](https://developers.mero.finance/deployed-contracts.html).

The [test suite](tests) repository is built with [Pytest](https://docs.pytest.org/en/6.2.x/), which is used by [Brownie](https://eth-brownie.readthedocs.io/en/stable/toctree.html).

The test suite relies on the following packages:

- [eth-brownie](https://github.com/eth-brownie/brownie): Testing framework for solidity and vyper code written in Python using Pytest
- [brownie-token-tester](https://github.com/iamdefinitelyahuman/brownie-token-tester): Custom mint logic for ERC20 tokens in `mainnet-fork` mode

### Getting Started

To get started using this repository, install the requirements (presumably in a virtual enviroment):

```
pip install -r requirements.txt
```

To run the full test suite, run:

```
brownie test
```

For a more detailed overview of how the Mero protocol can be tested, please read the [test suite documentation](tests/README.md).

To compile all contracts, run:

```
brownie compile
```

For a detailed overview of how to use Brownie, please check out the [official docs](https://eth-brownie.readthedocs.io/en/stable/toctree.html).

### Repository Structure

All Mero contracts are located within the [`contracts`](contracts) directory.

The tests are located within the [`tests`](tests) directory. The different liquidity pools that exist are specified in the tests directory [here](tests/configs).

### Environment Variables

The required environments variables that need to be set for running the test suite are listed [here](.env.example).

_Note_: The `ETHERSCAN_TOKEN` environment variable may need to be specified when running tests in `mainnet-fork` mode, as Etherscan is used to fetch the latest contract data and the API request limit may be reached.
npm package: @merokudao/dapp-store-registry
Description: The dApp Store registry for MerokuDAO dAapp Store
Author: MerokuDAO Monks
Latest version: 0.1.109

# dApp Store Registry

MerokuDAO dApp Store Registry is self explanatory name. It contains
the dApp Store registry and a helper class to search, filter & list dApps

# Adding your dApp to registry

1. Fork this repo
2. Update the file `registry.json` to add your dApp. The schema is described in [merokuDappStore.registrySchema.json](src/merokuDappStore.registrySchema.json).
3. Create a PR
4. After PR is approved and merged, your dApp will be listed in the Meroku dApp Store.

# Usage

## Installation

Install using NPM as `npm install @merokudao/dapp-store-registry` or using YARN as
`yarn add @merokudao/dapp-store-registry`

## Usage

### Basic

```typescript
// Import
import { DappStoreRegistry } from "@merokudao/dapp-store-registry";

// Instantiate a registry.
const registry = new DappStoreRegistry();
await registry.init();

// Find all the dApps
const dApps = await registry.dApps();

// Search dApps with query string "nft"
const dAppsResult = registry.search("nft");
```

Detailed docs can be viewed at [https://merokudao.github.io/dapp-store-registry/](https://merokudao.github.io/dapp-store-registry/).
npm package: @merokudao/design-system
Description: > Component library for all Meroku Project
Author: MerokuDAO Monks
Latest version: 0.0.5

# @meroku/design-system

> Component library for all Meroku Project

## Installation

Install yarn globally via npm:

```
npm install --global yarn
```

Clone the repo and cd to the project:

```
git clone git@github.com:merokudao/design-system.git
cd design-system
```

### Install packages

Install packages via yarn

```
yarn install
```

### Start storybook server:

```
yarn storybook
```

### Build storybook locally:

```
yarn build
```