open-index/open-npm huggingface dataset:
npm package: @minimistjs/minimist
Description: parse argument options
Author: James Halliday
Latest version: 1.2.6
Deprecated: This package is unnecessary; use `minimist` instead

# minimist

parse argument options

This module is the guts of optimist's argument parser without all the
fanciful decoration.

# Disclaimer

This is a fork of minimist. Substack's minimist has disappeared from GitHub:
[https://twitter.com/ManuEomm/status/1579426610121674752](https://twitter.com/ManuEomm/status/1579426610121674752)

# example

``` js
var argv = require('minimist')(process.argv.slice(2));
console.log(argv);
```

```
$ node example/parse.js -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
```

```
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{ _: [ 'foo', 'bar', 'baz' ],
  x: 3,
  y: 4,
  n: 5,
  a: true,
  b: true,
  c: true,
  beep: 'boop' }
```

# security

Previous versions had a prototype pollution bug that could cause privilege
escalation in some circumstances when handling untrusted user input.

Please use version 1.2.6 or later:

* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5)
* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3)

# methods

``` js
var parseArgs = require('minimist')
```

## var argv = parseArgs(args, opts={})

Return an argument object `argv` populated with the array arguments from `args`.

`argv._` contains all the arguments that didn't have an option associated with
them.

Numeric-looking arguments will be returned as numbers unless `opts.string` or
`opts.boolean` is set for that argument name.

Any arguments after `'--'` will not be parsed and will end up in `argv._`.

options can be:

* `opts.string` - a string or array of strings argument names to always treat as
strings
* `opts.boolean` - a boolean, string or array of strings to always treat as
booleans. if `true` will treat all double hyphenated arguments without equal signs
as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
* `opts.alias` - an object mapping string names to strings or arrays of string
argument names to use as aliases
* `opts.default` - an object mapping string argument names to default values
* `opts.stopEarly` - when true, populate `argv._` with everything after the
first non-option
* `opts['--']` - when true, populate `argv._` with everything before the `--`
and `argv['--']` with everything after the `--`. Here's an example:

  ```
  > require('./')('one two three -- four five --six'.split(' '), { '--': true })
  { _: [ 'one', 'two', 'three' ],
    '--': [ 'four', 'five', '--six' ] }
  ```

  Note that with `opts['--']` set, parsing for arguments still stops after the
  `--`.

* `opts.unknown` - a function which is invoked with a command line parameter not
defined in the `opts` configuration object. If the function returns `false`, the
unknown option is not added to `argv`.

# install

With [npm](https://npmjs.org) do:

```
npm install minimist
```

# license

MIT
npm package: @minimistjs/subarg
Description: parse arguments with recursive contexts
Author: James Halliday
Latest version: 1.0.0

# subarg

parse arguments with recursive contexts using
[minimist](https://npmjs.org/package/minimist)

[![testling badge](https://ci.testling.com/substack/subarg.png)](https://ci.testling.com/substack/subarg)

[![build status](https://secure.travis-ci.org/substack/subarg.png)](http://travis-ci.org/substack/subarg)

This module is useful if you need to pass arguments into a piece of code without
coordinating ahead of time with the main program, like with a plugin system.

# example

``` js
var subarg = require('subarg');
var argv = subarg(process.argv.slice(2));
console.log(argv);
```

Contexts are denoted with square brackets:

```
$ node example/show.js rawr --beep [ boop -a 3 ] -n4 --robots [ -x 8 -y 6 ]
{ _: [ 'rawr' ],
  beep: { _: [ 'boop' ], a: 3 },
  n: 4,
  robots: { _: [], x: 8, y: 6 } }
```

# methods

``` js
var subarg = require('subarg')
```

## var argv = subarg(args, opts)

Parse the arguments array `args`, passing `opts` to
[minimist](https://npmjs.org/package/minimist).

An opening `[` in the `args` array creates a new context and a `]` closes a
context. Contexts may be nested.

# install

With [npm](https://npmjs.org) do:

```
npm install subarg
```

# license

MIT
npm package: @minimonolith/infra
Description: [![codecov](https://codecov.io/gh/DeepHackDev/minimonolith-infra/branch/master/graph/badge.svg?token=3L6N5AX80N)](https://codecov.io/gh/DeepHackDev/minimonolith-infra)
Latest version: 0.6.18

# `@minimonolith/infra`

[![codecov](https://codecov.io/gh/DeepHackDev/minimonolith-infra/branch/master/graph/badge.svg?token=3L6N5AX80N)](https://codecov.io/gh/DeepHackDev/minimonolith-infra)

`@minimonolith/infra` is a library based on `@minimonolith/lib` and `aws-cdk-lib` to implement modular and validated infrastructure

## Example Project

Here's an example project using `@minimonolith/infra`:

```go
.
├── package.json
├── .gitignore
├── deploy.js                 // file that will be called when executing `cdk deploy`
├── test.js                   // test infrastructure specified at deploy.js (does not deploy it)
└── cdk.json                  // aws cdk configuration (specifies deploy.js to be used as deployment file)
```

### deploy.js

This file defines the resources to be deployed:

```js
// deploy.js
import * as INFRA from '@minimonolith/infra';

// Project definition

const app = await INFRA.cdk.postApp();
const projectName = 'TODO';
const env = await INFRA.env.get({ name: 'qa' });
const projectContext = { app, projectName, env }

// Networking

const cidrBlock = '172.16.0.0/12';
const privateAPI = true;
const albAPI = true;
const apiBalancingType = 'ip';
const apiPort = 80;

const vpcContext = await INFRA.networkingVPC.post({ ...projectContext,
  cidrBlock, privateAPI, albAPI, apiPort, apiBalancingType });

// DB

const minCapacity=1, maxCapacity=64, qaAutoPause=true;

const dbContext = await INFRA.dbMySQL.post({ ...projectContext,
  vpcContext, minCapacity, maxCapacity, qaAutoPause });

// Backend

const cpu = '512';
const memory = '1G';
const desiredCount = 1;
const externalImage = 'httpd';

const apiContext = await INFRA.apiFargate.post({ ...projectContext,
  vpcContext, cpu, memory, desiredCount, externalImage });
```

### test.js

Here deploy.js is tested:

```js
// test.js

describe('test deploy', () => {
  test('test deploy', async () => {
    await import('./deploy.js');
  });
});
```

### cdk.json

This is the cdk.json configuration

```json
{
  "app": "node deploy.js",
  "watch": {
    "include": [
      "**"
    ],
    "exclude": [
      "README.md",
      "cdk*.json",
      "jest.config.js",
      "package*.json",
      "yarn.lock",
      "node_modules",
      "test"
    ]
  },
  "context": {
    "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
    "@aws-cdk/core:stackRelativeExports": true,
    "@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
    "@aws-cdk/aws-lambda:recognizeVersionProps": true,
    "@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
    "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
    "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
    "@aws-cdk/core:checkSecretUsage": true,
    "@aws-cdk/aws-iam:minimizePolicies": true,
    "@aws-cdk/core:target-partitions": [
      "aws",
      "aws-cn"
    ]
  }
}
```
npm package: @minimonolith/lib
Description: [![codecov](https://codecov.io/gh/DeepHackDev/minimonolith-lib/branch/master/graph/badge.svg?token=AH4L7MY7DA)](https://codecov.io/gh/DeepHackDev/minimonolith-lib)
Latest version: 0.14.10

# `@minimonolith/lib`

[![codecov](https://codecov.io/gh/DeepHackDev/minimonolith-lib/branch/master/graph/badge.svg?token=AH4L7MY7DA)](https://codecov.io/gh/DeepHackDev/minimonolith-lib)

`@minimonolith/lib` is a library engine for achieving modularity and validation

## Example Project

Here's an example library using `@minimonolith/lib`:

```go
.
├── package.json
├── .gitignore
├── index.js                   // Root of library
└── todo
    ├── services.js            // Module 'todo' exported service handlers are declared here
    └── get
        ├── handler.js         // Module 'todo' service 'get' handler
        ├── in.js              // Optional: Service 'get' handler in validation, if body not empty
        └── out.js             // Optional: Service 'get' handler out validation, if return not empty
```

### index.js

This file exports the developed services of the library:

```js
// index.js
'use strict';

import { getNewLib } from '@minimonolith/lib';

const LIB = await getNewLib();

await LIB.postModule('todo');

export default { ...LIB.SERVICES };
```

### todo/index.js

Here, we declare the service handlers for the `todo` module:

```js
// todo/services.js
export default ['get', 'getOne', 'post', 'patch', 'delete'];
```

### todo/getOne/handler.js

This file contains the `get` service handler for the `todo` module. It retrieves a todo item by its ID:

```js
// todo/get/index.js
export default async ({ body }) =>  {
  return { id: body.id, name: 'todo' };
}
```

### todo/getOne/in.js

```js
// todo/get/in.js
import { z } from '@minimonolith/lib';

export default () => ({
  id: z.number()
});
```

### todo/getOne/out.js

```js
// todo/get/in.js
import { z } from '@minimonolith/lib';

export default () => ({
  id: z.number(),
  name: z.string(),
});
```
npm package: @minimuldev/generator-minimul-api
Description: ## Installation
Latest version: 1.2.3

# Minimul API generator

## Installation

First, install [Yeoman](http://yeoman.io) and generator-minimul-api
using [yarn](https://classic.yarnpkg.com/en/docs/install).

```bash
yarn global add yo
yarn global add @minimuldev/generator-minimul-api
```

Then generate your new project:

```bash
yo minimul-api
```