open-index/open-npm huggingface dataset:
npm package: @makerx/envolver
Description: Envolver is a CLI (Command Line Interface) tool that streamlines the management of environment variables in your local .env file. Developed in TypeScript, it simplifies the task of handling frequently changing environment variables, especially in projects
Latest version: 1.0.2

# Envolver

Envolver is a CLI (Command Line Interface) tool that streamlines the management of environment variables in your local .env file. Developed in TypeScript, it simplifies the task of handling frequently changing environment variables, especially in projects with multiple contributors. For a more detailed explanation of its uses and some real-life scenarios where Envolver shines, check out [our blog post](https://blog.makerx.com.au/envolver-a-cli-tool-for-managing-environment-variables/).

## Environment Variables

Environment variables are key-value pairs typically stored in a .env file. They are used to store sensitive information like API keys and passwords separate from the main codebase. These variables often change, especially in projects with multiple contributors, which can make them difficult to keep updated. Envolver helps manage these changes effectively.

## Check Variables

The `check` command compares your local .env file to the latest changes in the code repository.

```bash
envolver check <filePath> -o <output>
```

### Options

| Option                  | Description                                           | Default   |
| ----------------------- | ----------------------------------------------------- | --------- |
| `<filePath>`            | The path to your `.env` file. Required argument.      | N/A       |
| `-o, --output <output>` | The output method. Can be either 'json' or 'console'. | 'console' |

## Update Variables

The `update` command generates a vars.json file that summarizes your current environment variables. This file can be included in the code repository or added to your .gitignore file if it contains sensitive information. 

```bash
envolver update <filePath>
```

Envolver also organizes the variables into sections for easier management.

## Automating Updates

You can configure Envolver to run automatically as part of a GitHub Actions workflow. This ensures your environment variables are always synchronized with the latest changes in the code repository.

```yaml
name: Update Environment Variables

on:
  push:
    branches: [prod]

jobs:
  build:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout Repo Code
        uses: actions/checkout@v3

      - name: Update Variables
        run: npx envolver update .env.sample

      - name: Commit to repo
        uses: actions/github-script@v6
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            github.rest.git.createCommit({
              owner: context.repo.owner,
              repo: context.repo.repo,
              message: "Updated environment variables",
              tree: env.object_tree,
              parents: [env.parent]
            });
```
npm package: @makerx/forms-core
Description: Add typed & validated forms to your React app quickly.
Latest version: 1.1.4

Add typed & validated forms to your React app quickly.

Currently supports:

- Ionic Framework [docs](https://github.com/MakerXStudio/forms/tree/main/packages/ionic) | [npm](https://www.npmjs.com/package/@makerx/forms-ionic) | [demo](https://makerxstudio.github.io/forms/ionic-example)
- MUI [docs](https://github.com/MakerXStudio/forms/tree/main/packages/mui) | [npm](https://www.npmjs.com/package/@makerx/forms-mui) | [demo](https://makerxstudio.github.io/forms/mui-example)
npm package: @makerx/forms-ionic
Description: ### Installation
Latest version: 2.1.0

## @makerx/forms-ionic

### Installation

```bash
npm i @makerx/forms-ionic react-hook-form
```

### Example

![Example](ionic-example.png?raw=true)

```tsx
import { IonCol, IonContent, IonGrid, IonPage, IonRow } from '@ionic/react';
import { ValidatedForm, z, zfd } from '@makerx/forms-ionic';

/**
 * Define schema
 */
export const formSchema = zfd.formData({
  myString: zfd.text(z.string().trim().min(1, 'Required')),
  myOptionalParagraph: zfd.text(z.string().optional()),
});

/**
 * Initialise with defaults
 */
const defaultValues: z.infer<typeof formSchema> = {
  myString: '',
  myOptionalParagraph: 'something already here',
};

/**
 * Render form
 */

function App() {
  const onSubmit = (data: z.infer<typeof formSchema>) =>
    console.log('Received data:', data);
  return (
    <ValidatedForm
      validator={formSchema}
      onSubmit={onSubmit}
      defaultValues={defaultValues}
    >
      {(helper) => (
        <div>
          <h2>ionic-example</h2>

          {helper.textField({
            label: 'This is required',
            field: 'myString',
          })}
          {helper.textareaField({
            label: 'This is not required',
            field: 'myOptionalParagraph',
          })}

          {helper.submitButton({ label: 'Submit' })}
        </div>
      )}
    </ValidatedForm>
  );
}

export default App;
```

[Styled example](https://github.com/MakerXStudio/forms/blob/main/packages/ionic-example/src/App.tsx) | [Live demo](https://makerxstudio.github.io/forms/ionic-example)
npm package: @makerx/forms-mui
Description: ### Installation
Latest version: 1.2.2

## @makerx/forms-mui

### Installation

```bash
npm i @makerx/forms-mui react-hook-form
```

### Example

![Example](mui-example.png?raw=true)

```tsx
import { ValidatedForm, z, zfd } from '@makerx/forms-mui';
import { formatISO, parseISO } from 'date-fns';

/**
 * Define schema
 */
export const formSchema = zfd.formData({
  myString: zfd.text(z.string().trim().min(1, 'Required')),
  myArray: zfd.repeatable(
    z
      .array(zfd.text(z.string().trim().min(1, 'Required')))
      .min(2, 'Must have at least 2 values')
  ),
  myDateTime: zfd.text(),
});

/**
 * Initialise with defaults
 */
const defaultValues: z.infer<typeof formSchema> = {
  myString: '',
  myArray: ['one value'],
  myDateTime: '',
};

/**
 * Render form
 */
function App() {
  const onSubmit = (data: z.infer<typeof formSchema>) =>
    console.log('Received data:', data);

  return (
    <ValidatedForm
      validator={formSchema}
      onSubmit={onSubmit}
      defaultValues={defaultValues}
    >
      {(helper) => (
        <>
          {helper.textField({
            label: 'This is required',
            field: 'myString',
          })}

          {helper.textFields({
            label: 'Should be two or more',
            field: 'myArray',
            minimumItemCount: 2,
          })}

          {helper.dateTimeField({
            label: 'Date',
            field: 'myDateTime',
            fromISO: parseISO,
            toISO: formatISO,
          })}

          {helper.submitButton({ label: 'Submit' })}
        </>
      )}
    </ValidatedForm>
  );
}
```

[Styled example](https://github.com/MakerXStudio/forms/blob/main/packages/mui-example/src/App.tsx) | [Live demo](https://makerxstudio.github.io/forms/mui-example)