open-index/open-npm huggingface dataset:
npm package: @jesset/prettier-config
Description: My personal Prettier config
Author: Jesset Thomson
Latest version: 0.1.0

# `@jesset/prettier-config`

> My personal [Prettier](https://prettier.io) config.

## Usage

**Install**:

```bash
$ npm install --save-dev @jesset/prettier-config
```

**Edit `package.json`**:

```jsonc
{
  // ...
  "prettier": "@jesset/prettier-config"
}
```
npm package: @jesseteal/express-mysql-graphql
Description: Instant graphql endpoint for express / mysql
Author: Jesse Teal
Latest version: 2.0.4

# express-mysql-graphql

Create a graphql endpoint for an express.js server with MySQL backend.

There are still limitations and pitfalls. This is a work-in-progress.

## Install

This module is not ready yet

## Usage

In your express app:

```
var express = require('express');
var mysgraphile = require('@jesseteal/express-mysql-graphql');

var app = express();

... // <all your routes and middleware>

app.use(mysgraphile({
  connection: {
    database: process.env.MYSQL_DATABASE,
    user: process.env.MYSQL_USER,
    password: process.env.MYSQL_PASS
  },
  enable_graphiql: true,
}))

...
```

You can now query against http://servername/graphql

GraphiQL is available if `enable_graphiql` is set to true.

## More

You can create your own custom types, resolvers, and mutations. (Documentation not yet available.)

## Add Insert, Update, and Delete hooks

```
const mysgraphile = require('@jesseteal/express-mysql-graphql');

app.use(mysgraphile({
    ...(connection data),
    enable_graphiql: true,
    hooks: {
      before_insert: async ({table, model, db}) => {
        switch (table) {
          case 'user':
            var exists = await db.first('select id from user where email=?',[model.email]);
            console.log('exists',exists);
            if(exists){
              return false;
            }
            model.password = utils.hash(model.password); // hash new passwords before save
            break;
          default:

        }
        return model; // return (possibly) modified data
      }
    }
  }))
```

## Restrict table/row access by Token

```
const mysgraphile = require('@jesseteal/express-mysql-graphql');

app.use(mysgraphile({
    ...(connection data),
    enable_graphiql: true,
    access_limit: {
      user: token => {
        if(token.role === 'Admin'){
          return null;
        }
        // all other users can only pull themselves
        return 'id=' + token.sub; // return SQL where statement to add to list of others
      }
    }
  }))
```

## Roadmap

- [ ] Add usage documentation
- [ ] Limit how deep graph queries can go
- [ ] Refactor
npm package: @jesseteal/teal-react
Description: A bundle of reusable React files for re-use in my projects.
Author: Jesse Teal
Latest version: 2.0.0-b

# teal-react

A bundle of reusable React files for re-use in my projects.


## Hooks

## Roadmap

* Reusable components
* Material-UI components
* GraphQL components (Apollo)
npm package: @jessety/eslint-config
Description: ESLint config for TypeScript or JavaScript by @jessety
Author: Jesse Youngblood
Latest version: 2.4.1

# @jessety/eslint-config

Yet another ESLint [Shareable Config](http://eslint.org/docs/developer-guide/shareable-configs.html) for TypeScript or JavaScript projects.

[![ci](https://github.com/jessety/eslint-config/workflows/ci/badge.svg)](https://github.com/jessety/eslint-config/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/@jessety/eslint-config.svg)](https://www.npmjs.com/package/@jessety/eslint-config)
[![license](https://img.shields.io/github/license/jessety/eslint-config.svg)](https://github.com/jessety/eslint-config/blob/main/LICENSE)

## Install

```shell script
npm install --save-dev eslint @jessety/eslint-config
```

## Usage

Shareable configs work by leveraging the [`extends`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) feature in your [ESLint configuration](http://eslint.org/docs/user-guide/configuring). Once the package is installed, define `extends` to `@jessety`.

For example, a valid `.eslintrc.json` file could be:

```json
{
  "extends": "@jessety"
}
```

_The `eslint-config` suffix may be omitted because it is assumed by ESLint._

### Configurations

This package contains the following sharable configurations:

- `base` - Core rules for TypeScript node projects. Does not require TypeScript build. Fast.
- `strict` - Stricter rules for TypeScript node projects. Requires type checking. Slower than `base`.
- `react` - Rules for a React project
- `javascript` - ESLint rules for JavaScript projects

As of version 2.x.x, `base` is the default export for `.ts` files, and `javascript` is the default for `.js`, `.mjs`, or `.cjs` files. To request one or the other, specify which in the `eslintrc` file. For example, a `.eslintrc.json` file that uses `react` configuration may look like this:

```json
{
  "extends": "@jessety/eslint-config/react"
}
```

A project that uses a mix of both TypeScript and JavaScript may look like this:

```json
{
  "overrides": [
    {
      "files": ["**/*.ts"],
      "extends": "@jessety"
    },
    {
      "files": ["**/*.{js,cjs,mjs}"],
      "extends": "@jessety/eslint-config/javascript"
    }
  ]
}
```

The `base` and `strict` configuration require `typescript` and `eslint` as peer dependencies. The `javascript` configuration only requires `eslint`.

## License

MIT © Jesse Youngblood
npm package: @jessety/pm2-logrotate
Description: PM2 module that rotates application logs
Author: Joni SHKURTI
Latest version: 2.7.4

# @jessety/pm2-logrotate

NOTE: This is a fork of [pm2-logrotate](https://github.com/keymetrics/pm2-logrotate), which is (currently) unmaintained. It fixes a [critical issue](https://github.com/keymetrics/pm2-logrotate/issues/170) that prevented any log files from being deleted on Windows, which was affecting [pm2-installer](https://github.com/jessety/pm2-installer).

## Description

PM2 module to automatically rotate logs of processes managed by PM2.

## Install

    pm2 install @jessety/pm2-logrotate

**NOTE:** the command is `pm2 install` NOT `npm install`

## Configure

- `max_size` (Defaults to `10M`): When a file size becomes higher than this value it will rotate it (its possible that the worker check the file after it actually pass the limit) . You can specify the unit at then end: `10G`, `10M`, `10K`
- `retain` (Defaults to `30` file logs): This number is the number of rotated logs that are keep at any one time, it means that if you have retain = 7 you will have at most 7 rotated logs and your current one.
- `compress` (Defaults to `false`): Enable compression via gzip for all rotated logs
- `dateFormat` (Defaults to `YYYY-MM-DD_HH-mm-ss`) : Format of the data used the name the file of log
- `rotateModule` (Defaults to `true`) : Rotate the log of pm2's module like other apps
- `workerInterval` (Defaults to `30` in secs) : You can control at which interval the worker is checking the log's size (minimum is `1`)
- `rotateInterval` (Defaults to `0 0 * * *` everyday at midnight): This cron is used to a force rotate when executed.
We are using [node-schedule](https://github.com/node-schedule/node-schedule) to schedule cron, so all valid cron for [node-schedule](https://github.com/node-schedule/node-schedule) is valid cron for this option. Cron style :
- `TZ` (Defaults to system time): This is the standard [tz database timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used to offset the log file saved. For instance, a value of `Etc/GMT+1`, with an hourly log, will save a file at hour `14` GMT with hour `13` (GMT+1) in the log name.

```
*    *    *    *    *    *
┬    ┬    ┬    ┬    ┬    ┬
│    │    │    │    │    |
│    │    │    │    │    └ day of week (0 - 7) (0 or 7 is Sun)
│    │    │    │    └───── month (1 - 12)
│    │    │    └────────── day of month (1 - 31)
│    │    └─────────────── hour (0 - 23)
│    └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, OPTIONAL)
```

### How to set these values ?

 After having installed the module you have to type :
`pm2 set pm2-logrotate:<param> <value>`

e.g:
- `pm2 set pm2-logrotate:max_size 1K` (1KB)
- `pm2 set pm2-logrotate:compress true` (compress logs when rotated)
- `pm2 set pm2-logrotate:rotateInterval '*/1 * * * *'` (force rotate every minute)
npm package: @jessety/prettier-config
Description: Prettier config by @jessety
Author: Jesse Youngblood
Latest version: 1.2.0

# @jessety/prettier-config

Yet another Prettier [shareable config](https://prettier.io/docs/en/configuration.html#sharing-configurations).

[![ci](https://github.com/jessety/prettier-config/workflows/ci/badge.svg)](https://github.com/jessety/prettier-config/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/@jessety/prettier-config.svg)](https://www.npmjs.com/package/@jessety/prettier-config)
[![license](https://img.shields.io/github/license/jessety/prettier-config.svg)](https://github.com/jessety/prettier-config/blob/main/LICENSE)

## Installation

```shell script
npm i -D prettier @jessety/prettier-config
```

## Usage

Reference this package in the `prettier` section of your `package.json`:

```json
{
  "name": "your-package-name",
  "version": "1.0.0",
  "prettier": "@jessety/prettier-config"
}
```

Alternatively, export a string to that references this package from your `prettier` config file.

For example, a valid `.prettierrc.json` file would be:

```json
"@jessety/prettier-config"
```

## Extending

To extend this config file in your project, use a `.prettierrc.js` file:

```javascript
module.exports = {
  ...require('@jessety/prettier-config'),
  printWidth: 100,
};
```

## License

MIT © Jesse Youngblood