open-index/open-npm huggingface dataset:
npm package: @makepad/yacl
Description: Yet an other cli library for JavaScript command line applications
Author: Makepad Developers
Latest version: 1.0.3

# Yet Another Cli Library
[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)
<a href="https://gitmoji.dev">
  <img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square" alt="Gitmoji">
</a>
[![CircleCI](https://circleci.com/gh/Makepad-fr/yacl.svg?style=svg)](https://circleci.com/gh/Makepad-fr/yacl)



A NodeJS / TypeScript framework to implement complex command line applications

## Installation

```bash
npm install @makepad/yacl
```

## Creating your first CLI


All CLIs should have a main command (which is called from terminal) and subcommands and flags of this root command. Assuming that you have a `cli.ts` file which will be executed when your CLI called from terminal. 

Let's start with creating this main command:

### Creating the main command

A basic `cli.ts` file looks like as follows

```TypeScript
#!/usr/bin/env node
import { Command } from 'yacl';

const main: Command = new Command({
  name: 'example-cli',
  description: 'An example CLI built by yacl',
  longDescription: '',
  run: () => {
    console.log('example-cli command called');
  },
});

main.run();
```

The main command name should match the `bin` script name in your `package.json`. 

```json
  ...
  "bin": {
    "example-cli": "dist/cli.js"
  },
  ...
```

Once you have created your first main command you can subcommands and flags and add them to a command with `addCommand` and `addFlag` functions respectively.

### Creating subcommands

A subcommand is a `Command` that which has a parent command. The unique difference between a subcommand and a main command is that a main command has no parents. So to create a subcommand you can just use the `Command` constructor and add your command to its parent with `addCommand` function.

### Creating flags

There can be two different flags. One that contains a value and the other that indicates boolean. For the first one you can use `Flag` class constructor and for the second one you can use `BooleanFlag` class.

A basic Flag looks like this:

```TypeScript
new Flag<string[]>({
  name: 'ids',
  required: true,
  parser: (strValue: string) => ({
    error: undefined,
    result: strValue.split(','),
  }),
  longForm: 'id',
  shortForm: 'i',
  usage: '--id <id1>,<id2>,<id3>',
})
```

A basic boolean flag can be created as follows:

```TypeScript
new BooleanFlag({
  name: 'Headless mode',
  longForm: 'headless',
});
```

You can add these flags to a command using `addFlag` function on the parent command.

## Documentation

For further information you can refer to the [documentation](https://yacl.dev)
npm package: @makepanic/ember-cli-chartjs
Description: Ember component for ChartJS
Author: busy inc
Latest version: 0.2.0

Ember Chartjs
==============================================================================

[![Build Status](https://travis-ci.org/makepanic/ember-cli-chartjs.svg?branch=master)](https://travis-ci.org/makepanic/ember-cli-chartjs)

This Ember CLI addon is a simple wrapper for [ChartJS](http://www.chartjs.org/).

It's a fork of [busy-web/ember-cli-chartjs](https://github.com/busy-web/ember-cli-chartjs) which removes most of the custom features (predefined styles, options) and ports it to typescript.

Compatibility
------------------------------------------------------------------------------

* Ember.js v3.12 or above
* Ember CLI v2.13 or above
* Node.js v10 or above


Installation
------------------------------------------------------------------------------

```
ember install @makepanic/ember-cli-chartjs
```

Usage
------------------------------------------------------------------------------

Before using the component, you have to load `chart.js`. 
To do this, await the result of the `ensureChartjs` method. 

This change was made, because usually it's better to lazily load the dependency as not every route needs charts.

```js
import Route from '@ember/routing/route';
import { ensureChartjs } from '@makepanic/ember-cli-chartjs/components/ember-chart';

export default class ChartRoute extends Route {
    beforeModel(){
        return ensureChartjs();
    }
}
```


In your handlebars template just do:

```
{{ember-chart type=CHARTTYPE data=CHARTDATA options=CHARTOPTIONS width=CHARTWIDTH height=CHARTHEIGHT}}
```

* CHARTTYPE: String; one of the following -- `line`, `bar`, `radar`, `polarArea`, `pie` or `doughnut`.
* CHARTDATA: Array; refer to the ChartJS documentation
* CHARTOPTIONS: Object; refer to the ChartJS documentation. This is optional.
* CHARTWIDTH: Number; pixel width of the canvas element. Only applies if the chart is NOT responsive.
* CHARTHEIGHT: Number; pixel height of the canvas element. Only applies if the chart is NOT responsive.

Example
------------------------------------------------------------------------------

```
{{ember-chart type='Pie' data=model.chartData width=200 height=200}}
```

Contributing
------------------------------------------------------------------------------

See the [Contributing](CONTRIBUTING.md) guide for details.


License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).
npm package: @makepost/nullthrows
Description: flow typed nullthrows
Author: Andres Suarez
Latest version: 1.1.0

# nullthrows

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

A [flow](https://flowtype.org) typed utility that accepts `value` (e.g. `nullthrows(value)`) and throws if `value` is `null` or `undefined`, otherwise it returns `value`.

Also see [`invariant`](https://github.com/zertosh/invariant).
npm package: @makepro-x/keytar
Description: Bindings to native Mac/Linux/Windows password APIs
Latest version: 7.10.2

# keytar - Node module to manage system keychain

> This is a fork of the [original project](https://github.com/atom/node-keytar) since that was archived on December 15, 2022.

A native Node module to get, add, replace, and delete passwords in system's keychain. On macOS the passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault.

## Installing

```sh
npm install keytar
```

### On Linux

Currently this library uses `libsecret` so you may need to install it before running `npm install`.

Depending on your distribution, you will need to run the following command:

* Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`
* Red Hat-based: `sudo yum install libsecret-devel`
* Arch Linux: `sudo pacman -S libsecret`

## Building

  * Clone the repository
  * Run `npm install`
  * Run `npm test` to run the tests

## Supported versions

Each release of `keytar` includes prebuilt binaries for the versions of Node and Electron that are actively supported by these projects. Please refer to the release documentation for [Node](https://github.com/nodejs/Release) and [Electron](https://electronjs.org/docs/tutorial/support) to see what is supported currently.

## Bindings from other languages

- [Rust](https://crates.io/crates/keytar)

## Docs

```javascript
const keytar = require('keytar')
```

Every function in keytar is asynchronous and returns a promise. The promise will be rejected with any error that occurs or will be resolved with the function's "yields" value.

### getPassword(service, account)

Get the stored password for the `service` and `account`.

`service` - The string service name.

`account` - The string account name.

Yields the string password or `null` if an entry for the given service and account was not found.

### setPassword(service, account, password)

Save the `password` for the `service` and `account` to the keychain. Adds a new entry if necessary, or updates an existing entry if one exists.

`service` - The string service name.

`account` - The string account name.

`password` - The string password.

Yields nothing.

### deletePassword(service, account)

Delete the stored password for the `service` and `account`.

`service` - The string service name.

`account` - The string account name.

Yields `true` if a password was deleted, or `false` if an entry with the given service and account was not found.

### findCredentials(service)

Find all accounts and password for the `service` in the keychain.

`service` - The string service name.

Yields an array of `{ account: 'foo', password: 'bar' }`.

### findPassword(service)

Find a password for the `service` in the keychain. This is ideal for scenarios where an `account` is not required.

`service` - The string service name.

Yields the string password, or `null` if an entry for the given service was not found.
npm package: @makerbi/vue-js-cron
Description: Cron editor component for Ant Design Vue
Author: Makerbi
Latest version: 0.1.3

# @makerbi/vue-js-cron

Cron expression editor component for Vue 3 + Ant Design Vue.

This package is a lightweight fork and adaptation of `@vue-js-cron/ant`, tuned for Ant Design Vue 4 and used inside the Vector Vein project.

## Features

- Vue 3 composition API support
- Ant Design Vue 4 UI
- Supports standard 5-field crontab syntax (`* * * * *`)
- Dropdowns for:
  - Period (minute / hour / day / week / month / year)
  - Minute / hour / day / month / day-of-week fields
- Uses `v-model:open` for dropdown to avoid deprecated `visible` API warnings

## Install

```bash
pnpm add @makerbi/vue-js-cron
# or
npm install @makerbi/vue-js-cron
```

Peer dependencies (must be installed in your app):

- `vue` `^3.2.0`
- `ant-design-vue` `^4.2.6`

## Usage

### Global registration

```ts
// main.ts
import { createApp } from 'vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'

import CronPlugin from '@makerbi/vue-js-cron'
// or: import CronPlugin, { CronAnt } from '@makerbi/vue-js-cron'

import App from './App.vue'

const app = createApp(App)

app.use(Antd)
app.use(CronPlugin)
// If you prefer manual registration:
// app.component('CronAnt', CronAnt)

app.mount('#app')
```

### In a component

```vue
<template>
  <CronAnt v-model="cron" />
</template>

<script setup>
import { ref } from 'vue'

const cron = ref('* * * * *')
</script>
```

### With custom button props

```vue
<CronAnt
  v-model="cron"
  :buttonProps="{ type: 'primary', shape: 'round', size: 'small' }"
/>
```

## API

### `<CronAnt />` props

- `v-model` (`modelValue`: `string`)
  - Current cron expression, e.g. `"0 0 * * *"`.
  - Default: `"* * * * *"`.

- `buttonProps` (`object`, optional)
  - Passed directly to Ant Design Vue `<a-button>`.
  - Example:
    ```js
    { type: 'primary', size: 'small', shape: 'round' }
    ```

- `cols` (`Record<string, number>`, optional)
  - Adjusts the number of columns in dropdown grids.
  - Default:
    ```js
    {
      minute: 5,
      hour: 4,
      day: 4,
    }
    ```

### Events

- `update:model-value`
  - Emitted whenever the cron expression changes.
- `error`
  - Emitted if the internal parser detects an invalid selection / pattern.

## Build & Publish (for maintainers)

From the `ant` subdirectory:

```bash
pnpm install
pnpm run build
# then, after logging in to npm:
npm publish --access public
```

The package name is already set to `@makerbi/vue-js-cron` in `package.json`.
npm package: @makerbi/vue3-colorpicker
Description: 非常漂亮的一款拾色器,支持多种颜色格式的输入输出,支持渐变色选择。
Author: aesoper
Latest version: 2.4.2

# colorpicker

非常漂亮的一款拾色器,支持多种颜色格式的输入输出,支持渐变色选择。

注意：本文档适用于 v2 以上版本。如果您正在使用旧版本，请参阅 v1 分支。v2 版本为破坏性更新，不再支持 v1 中的某些功能,请谨慎使用。

[在线 demo 演示](https://aesoper101.github.io/vue3-colorpicker/)

[English](https://github.com/aesoper101/vue3-colorpicker/blob/main/README.md)

## 安装

```
pnpm add vue3-colorpicker
```

或者

```
npm install vue3-colorpicker
```

## 如何使用

### 第一步全局注册

```
import Vue3ColorPicker from "vue3-colorpicker";
import "vue3-colorpicker/style.css";

createApp(App)
  .use(router)
  .use(Vue3ColorPicker)
  .mount("#app");
```

或者局部注册

```vue3
import { ColorPicker } from "vue3-colorpicker";
import "vue3-colorpicker/style.css";

export default defineComponent({
components: { ColorPicker },
});
```

### 使用组件

```vue3
<template>
  <div>
     <color-picker v-model:pureColor="pureColor" v-model:gradientColor="gradientColor"/>
  </div>
</template>
<script lang="ts">
  import { ref } from "vue";
  import { ColorInputWithoutInstance } from "tinycolor2";

  export default defineComponent({
     setup() {
       const pureColor = ref<ColorInputWithoutInstance>("red");
       const gradientColor = ref("linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 100%)");

       return { pureColor, gradientColor }
     }
  });
</script>
```

具体文档请参考 [在线 demo 演示](https://aesoper101.github.io/vue3-colorpicker/)

案例代码在 src/stories 目录下
npm package: @makerdao/currency
Description: Utilities for working with currency amounts
Latest version: 0.9.10

# @makerdao/currency

A set of utilities for working with currencies on Ethereum, extracted from
[dai.js](https://github.com/makerdao/dai.js). Available as an [NPM module](https://www.npmjs.com/package/@makerdao/currency).

Check out the test file to see how this is used.
npm package: @makerdao/dai-plugin-config
Description: A dai.js plugin for retrieving Dai.js configuration objects async.
Latest version: 0.2.15

<h1 align="center">
Dai Config Plugin
</h1>

[![GitHub License][license]][license-url]
[![NPM][npm]][npm-url]

### Development

This plugin fetches configuration data from a testchain backend, and creates a config object to be provided to the Maker SDK so it can be used with a testchain. Add it to the end of the `plugins` array to ensure the options override the default config.

_see [Dai.js](https://github.com/makerdao/dai.js) for more details_

#### Example using the Maker SDK

```
import Maker from '@makerdao/dai';
import configPlugin from '@makerdao/dai-plugin-config';

const config = {
    plugins: [
        [configPlugin, { testchainId: '123abc', backendEnv: 'dev' }]
        ],
    log: false
  };

await Maker.create('http', config);
```

#### Details

`testchainId`: Must be a running testchain ID on the selected backend environment.

`backendEnv`: (optional) defaults to the 'prod' URL, which is `http://18.185.172.121:4000/chain/`. Options are `prod`, `dev`, or any user-specified URL.

In the `beforeCreate` block, the plugin will fetch testchain data from the URL. This includes the testchain RPC, all the deployed contracts, and required tokens. It will create a config object that looks like this:

```
config = {
        url: rpc_url,
        provider: {
          type: 'HTTP',
          network: chainConfig.type
        },
        smartContract: { addContracts },
        token: { erc20 }
      };
```

## Code Style

We run Prettier on-commit, which means you can write code in whatever style you want and it will be automatically formatted according to the common style when you run `git commit`.

## Publishing

To publish this package, simply run:
```bash
yarn publish
```
This will prompt for a new version, create a new commit and tag for that version, **automatically build the project** and then publish the package to npm.

Don't forget to use `git push --tags` to push the commit with the new version **along with** the new tag pointing to it.

## License

The dai config plugin is [MIT licensed](./LICENSE).

[license]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: https://github.com/makerdao/dai-plugin-config/blob/master/LICENSE
[npm]: https://img.shields.io/npm/v/@makerdao/dai-plugin-config.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@makerdao/dai-plugin-config
npm package: @makerdao/dai-plugin-governance
Description: A dai.js plugin for adding MKR governance support to dapps.
Latest version: 0.16.8-alpha.0

<h1 align="center">
Dai Governance Plugin
</h1>

[![GitHub License][license]][license-url]
[![NPM][npm]][npm-url]
[![Build Status][build]][build-url]

A [dai.js](https://github.com/makerdao/dai.js) plugin for interacting with the MKR governance system. This plugin makes it easy to integrate dai governance into frontend applications such as the [maker governace dashboard](https://vote.makerdao.com/). You can use it to vote, cast proposals, query the voting contract, create a vote proxy, and much more.

## Installation

The Dai Governance Plugin requires **dai.js 0.9.2 or later.**

```
$ npm install --save @makerdao/dai-plugin-governance
```

or

```
$ yarn add @makerdao/dai-plugin-governance
```

## Examples

We will have several examples once the api is more stable. Here is one to give you some sense of how this plugin can be used:

```js
import governancePlugin from '@makerdao/dai-plugin-governance';
import Maker from '@makerdao/dai';

(async () => {
  const maker = Maker.create('browser', {
    plugins: [governancePlugin]
  });
  await maker.authenticate();
  await maker.service('chief').lock(10);
})();
```

This example will initiate a MetaMask transaction to lock 10 MKR into the maker voting system.

### Development

## Getting started

_Note: this project utilizes the [yarn](https://yarnpkg.com/en/) package manager_

Clone this repo & fetch submodules

```
$ git clone --recurse-submodules -j8 https://github.com/makerdao/dai-plugin-governance.git
```

Install project dependencies

```
$ yarn
$ yarn install --cwd "gov-testchain"
```

## Running Tests

1.  Install [dapptools](https://dapp.tools/)
1.  `yarn testnet --ci yarn test`

## Publishing

Publish to NPM

```
$ yarn deploy
```

## Code Style

We run Prettier on-commit, which means you can write code in whatever style you want and it will be automatically formatted according to the common style when you run `git commit`.

### License

The dai governance plugin is [MIT licensed](./LICENSE).

[npm]: https://img.shields.io/npm/v/@makerdao/dai-plugin-governance.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@makerdao/dai-plugin-governance
[license]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: https://github.com/makerdao/dai-plugin-governance/blob/master/LICENSE
[build]: https://travis-ci.com/makerdao/dai-plugin-governance.svg?token=7qKLu97qQDDMKfaxt318&branch=master
[build-url]: https://travis-ci.com/makerdao/dai-plugin-governance
npm package: @makerdao/dai-plugin-mcd
Description: Plugin to add Multi-Collateral Dai support to dai.js
Latest version: 1.8.6-alpha.3

# dai-plugin-mcd

A [Dai.js](https://github.com/makerdao/dai.js) plugin for interacting with the
multi-collateral dai contracts

### Example usage

```js
import { McdPlugin, ETH, REP, DAI } from '@makerdao/dai-plugin-mcd';
import Maker from '@makerdao/dai';
import { createCurrency } from '@makerdao/currency';
import { tokenAddress, tokenAbi } from 'someOtherTokenData';

const TOK = createCurrency('TOK');

const maker = await Maker.create('http', {
  // ...other configuration...
  plugins: [
    [
      McdPlugin,
      {
        // omit this option to get the default set:
        // ETH-A, ETH-B, REP-A
        cdpTypes: [
          { currency: ETH, ilk: 'ETH-A' },
          { currency: REP, ilk: 'REP-A' },
          { currency: TOK, ilk: 'TOK-Z', address: tokenAddress, abi: tokenAbi },
        ]
      }
    ]
  ]
});

await maker.service('proxy').ensureProxy();
const cdpManager = maker.service('mcd:cdpManager');
const cdp1 = await cdpManager.openLockAndDraw('REP-A', REP(50), DAI(1000));
const cdp2 = await cdpManager.openLockAndDraw('ETH-A', ETH(50), DAI(1000));
const cdp3 = await cdpManager.openLockAndDraw('TOK-Z', TOK(50), DAI(1000));
```

Please visit [docs.makerdao.com](https://docs.makerdao.com/building-with-maker/daijs) for more documentation.

### Developer notes

The MCD contracts store the stability fee per second in a variable called `tax`
as a number in the form 1.X _ 10^27 (e.g. `1000000000472114805215157978`), and
the base rate in a variable called `repo` as a number in the form 0.X _ 10^27.

In this plugin, the `getAnnualStabilityFee()` and get `getAnnualBaseRate`
functions convert those values to return a decimal representation of the yearly
rates (e.g. `0.015` and `0.01`).

Run the tests from the top-level dai.js directory.

### Local Development

Due to the way that Babel7 handles transpilation it is not possible to use `yarn link` when locally developing this plugin, and importing it. We recommend using [yalc](https://github.com/whitecolor/yalc) instead. We've also found that a watcher tool called [sane](https://github.com/amasad/sane) is helpful.

Steps to Run:
1. In this directory run ```sane "yalc publish && cd [INSERT THE DIRECTORY OF THE PROJECT THAT IS IMPORTING THIS PLUGIN] && yalc link @makerdao/dai-plugin-mcd" src --wait=3 ```
npm package: @makerdao/dai-plugin-migrations
Description: Plugin to add migrations to dai.js
Latest version: 1.5.5-alpha.2

# dai-plugin-migration

## Contract naming convention

Contract names in `contracts/abis/addresses` are suffixed with a number (e.g. `_1`) to
indicate the **version** of the contract. The version can come from either different
deployments of the entire system (such as what might happen after a global settlement),
or a simple upgrade (as what happened when DsChief was migrated when a vulnerability was found).

The numbering is totally arbitrary and chosen when we choose to support a new contract. In the future,
they could be renamed more descriptively.
npm package: @makerdao/dai-plugin-portis
Description: A [Dai.js][daijs] plugin for using [portis](portis.io/) in a browser environment.
Latest version: 0.0.4

# dai-plugin-portis

A [Dai.js][daijs] plugin for using [portis](portis.io/) in a browser environment.

## Example usage

This plugin is not yet published to npm. So use [link](https://www.npmjs.com/package/link) to use it in oasis app.

```js
import portisPlugin from '@makerdao/dai-plugin-portis';
import Maker from '@makerdao/dai';

const maker = await Maker.create('http', {
  plugins: [portisPlugin],
});

// this will not resolve until the account is set up
await maker.authenticate();

```

[daijs]: https://github.com/makerdao/dai.js
npm package: @makerdao/dai-plugin-walletconnect
Description: A [Dai.js][daijs] plugin for using [WalletConnect](https://walletconnect.org/) in a browser environment.
Latest version: 0.0.20

# dai-plugin-walletconnect

A [Dai.js][daijs] plugin for using [WalletConnect](https://walletconnect.org/) in a browser environment.

### Example usage

```js
import WalletConnect from '@makerdao/dai-plugin-walletconnect';
import Maker from '@makerdao/dai';

const maker = await Maker.create('http', {
  plugins: [WalletConnect],
  accounts: {
    myWalletConnect1: { type: 'walletconnect' }
  }
});

// this will not resolve until the account is set up
await maker.authenticate();

// or you can defer setting the account up until later
await maker.addAccount('myWalletConnect2', { type: 'walletconnect' });
```

#### Using the optional address callback

```js
await maker.addAccount('myWalletConnect', {
  type: 'walletconnect',
  callback: address => {
    //e.g. for analytics
    console.log('My WalletConnect address', address);
  }
});
```

[daijs]: https://github.com/makerdao/dai.js
npm package: @makerdao/dai-plugin-walletlink
Description: A [Dai.js][daijs] plugin for using Coinbase WalletLink in a browser environment.
Latest version: 0.0.9

# dai-plugin-walletlink

A [Dai.js][daijs] plugin for using Coinbase WalletLink in a browser environment.

### Example usage

```js
import WalletLinkPlugin from '@makerdao/dai-plugin-walletlink';
import Maker from '@makerdao/dai';

const maker = await Maker.create('http', {
  plugins: [WalletLinkPlugin],
  accounts: {
    myWalletLink1: { type: 'walletlink' }
  }
});

// this will not resolve until the account is set up
await maker.authenticate();

// or you can defer setting the account up until later
await maker.addAccount('myWalletLink2', { type: 'walletlink' });
```

#### Using the optional address callback

```js
await maker.addAccount('myWalletLink', {
  type: 'walletlink',
  callback: address => {
    //e.g. for analytics
    console.log('My WalletLink address', address);
  }
});
```

[daijs]: https://github.com/makerdao/dai.js