open-index/open-npm huggingface dataset:
npm package: @koihe/api-type-cli
Description: 一个可以根据用户自定义的配置文件，自动请求 Swagger 文档数据，并解析处理自动生成 API 接口类型定义的快捷工具库。
Author: koihe
Latest version: 1.1.1

# @koihe/api-type-cli

> 一个可以根据用户自定义的配置文件，自动请求 `Swagger` 文档数据，并解析处理自动生成 `API` 接口类型定义的快捷工具库。

## 安装

```
npm install @koihe/api-type-cli -D
or
yarn add @koihe/api-type-cli -D
...
```

## 使用方式

- 初始化配置文件

```
npx apit init
```

- 运行生成 `API` 文件
  - 打开 `apitConfig.json` 文件进行自定义配置
  - 完成配置之后，输入下面指令，即可生成 `API` 文件
```
npx apit
```

## 配置文件说明

```javascript
{
    // API 文件生成后的输出路径，默认值：src/types。必填
    outputPath: "";
    // 请求数据所有字段设置成必有属性，默认值: false，按照原始 swagger 文档数据的 required 判断
    requiredRequestField?: false;
    // 响应数据所有字段设置成必有属性，默认值：true。如果是 false 则按照原始 swagger 文档数据的 required 判断
    requiredResponseField?: true;
    // 接口文档服务配置，可配置多个文档服务，servers 为数组对象，必填
    servers: [
        {
            // 文档地址，必填
            url: "";
            // 服务名称，默认值：获取到的 swagger 文档的 info.title || 'default'。有值的情况下，文件输出变成 -> 路径/[name].ts
            name?: "";
            // 文档类型，根据文档类型，调用内置的解析器，默认值: 'swagger'。目前仅支持'swagger'
            type?: "swagger";
            // 当前服务版本，默认值: 获取到的 swagger 文档的 info.version || 'v1'，如果是其他版本，如 v2，生成的类型定义名称自动会拼接 'V2'
            version?: "";
            // 自定义类型名称后缀，可以用于区分不同服务的同名api。请求类型名称默认：methodType + url + 'ReqType' + typeNameSuffix + version，响应类型名称默认：methodType + url + 'ResType' + typeNameSuffix + version
            typeNameSuffix?: "";
            // 访问文档可能需要认证信息，通过使用token访问
            authToken?: "";
            // 访问接口文档时候，自定义的一些请求头
            headers?: {};
            // 访问接口文档时候，自定义的一些请求参数
            params?: {};
        }
    ];
}
```
npm package: @koihe/boat-ui
Description: Front-end UI component library for Vue3
Author: koihe
Latest version: 1.1.4

<h1 align="center">@koihe/boat-ui</h1>

<p align="center">UI component library for Vue3</p>

<p align="center">
<a href="https://www.npmjs.com/package/@koihe/boat-ui" target="__blank"><img src="https://img.shields.io/npm/v/@koihe/boat-ui?label=version" alt="NPM version"></a>
</p>

<p align="center">
<a href="https://github.com/JY-HE/koihe-boat" target="__blank"><img src="https://api.iconify.design/simple-icons/github.svg" alt="github" width="32" height="32"></a>
</p>

---

## 特性

- 🚀 性能极佳，组件平均体积小于 1KB（min+gzip）
- 🚀 20+ 个[高质量组件](https://jy-he.github.io/koihe-boat/)
- 💪 使用 TypeScript 编写，提供完整的类型定义
- 📖 提供丰富的文档和组件示例
- 🍭 支持 Vue 3
- 🍭 支持按需引入和 Tree Shaking

## 安装

### 命令安装

可以通过 `npm`、`yarn` 或 `pnpm` 进行安装。

```bash
# 通过 npm 安装
npm i @koihe/boat-ui

# 通过 yarn 安装
yarn add @koihe/boat-ui

# 通过 pnpm 安装
pnpm add @koihe/boat-ui
```

### CDN安装

在页面上引入 `js` 和 `css` 文件即可开始使用。

```bash
# 引入样式
<link rel="stylesheet" href="https://unpkg.com/@koihe/boat-ui/dist/index.css">

# 引入组件库
<script src="https://unpkg.com/@koihe/boat-ui/dist/index.js"></script>
```

## 快速开始

### 完整引入

如果你对打包后的文件大小不是很在乎，那么使用完整导入会更方便。在 `main.js` 或 `main.ts` 中引入。

```javascript
import { createApp } from 'vue';
import App from './App.vue';
import BoatUI from '@koihe/boat-ui';
import '@koihe/boat-ui/dist/index.css';
import '@koihe/boat-ui/dist/iconfont.js';

const app = createApp(App);
app.use(BoatUI);
app.mount('#app');
```

### 按需引入

#### 自动引入（推荐使用）

使用 `unplugin-vue-components` 进行按需引入。

首先，安装插件：

```bash
npm install unplugin-vue-components --save-dev
```

然后把下列代码插入到你的 `Vite` 或 `Webpack` 的配置文件中

##### vite

```javascript
import Components from 'unplugin-vue-components/vite';
import { BoatUIResolver } from '@koihe/boat-ui/dist/resolver';

export default {
  // ...
  plugins: [
    Components({
      resolvers: [BoatUIResolver()]
    })
  ]
};
```

##### webpack

```javascript
const Components = require('unplugin-vue-components/webpack')
const { BoatUIResolver } = require('@koihe/boat-ui/dist/resolver')

module.exports = {
  // ...
  plugins: [
    Components({
      resolvers: [BoatUIResolver()]
    })
  ],
}
```

#### 手动引入

```vue
// APP.vue
<template>
    <boat-button plain>BoatButton</boat-button>
</template>

<script setup lang="ts">
import { BoatButton } from '@koihe/boat-ui';
import '@koihe/boat-ui/es/button/style/index';
</script>
```
npm package: @koihe/web-biz-type
Description: 服务层Api接口请求参数和响应参数的类型定义
Author: koihe
Latest version: 1.0.1

# @koihe/web-biz-type

> 服务层Api接口请求参数和响应参数的类型定义

## 安装

```
npm install --save @koihe/web-biz-type
yarn add @koihe/web-biz-type
```

## 使用方式

在需要使用的文件中导入即可
```
import { PostAlarmsGetAlarmInfoReqTypeByAggs, PostAlarmsGetAlarmInfoResTypeByAggs } from '@koihe/web-biz-type'
```

## 预览地址

[@koihe/web-biz-type插件业务Api接口类型定义查询页面](https://jy-he.github.io/web-biz-type-index/)
npm package: @koihii/lazy-net
Description: A lazy plugin for printing local network when starting server. I made this so you don't have to.
Author: Kha Tran
Latest version: 1.0.4

# lazy-net

![lazy-net-image](./images/lazy-net.png)

A simple, lightweight plugin for printing local network when starting [Node.js](https://nodejs.org/en/) or [Express.js](https://expressjs.com/) server. I made this so you don't have to.

There are currently 2 options for this module.

With outline.
![with-outline-image](./images/with-outline.png)

No outline.
![no-outline-image](./images/no-outline.png)

## Installation

Before installing this module, you have to:

- [Download and install Node.js](https://nodejs.org/en/download). If you're in `Linux platform`.

```bash
$ npm install nodejs
```

After that, simply install this module by using this command:

```bash
$ npm install @koihii/lazy-net
```

## Usage

`lazy-net` supports both `ESModule` and `CommonJS`. You can either:

```js
// with commonjs.
const lazyNet = require('@koihii/lazy-net');

// with esmodule.
import lazyNet from ('@koihii/lazy-net');
```

When dealing with [Node.js](https://nodejs.org/en/) server.

```js
const http = require('http')
const lazyNet = require('@koihii/lazy-net')

const port = process.env.PORT || 3000

const server = http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'application/json' })
  res.write("Server's starting with Node.JS")
  res.end()
})

server.listen(port, error => {
  if (error) throw error
  layNet(port)
  // lazyNet(port, true) 'if you want to print outline'.
})
```

Before using with [Express.js](https://expressjs.com) server. You must [install Express.js](https://expressjs.com/en/starter/installing.html) framework first by using this command:

```bash
$ npm install express
```

```js
const express = require('express')
const app = express()

const port = process.env.PORT || 3000

app.get('/', (req, res) => {
  res.send("Server's starting with Express.js")
})

app.listen(port, () => {
  layNet(port)
  // lazyNet(port, true) 'if you want to print outline'.
})
```

Follow [this link](https://github.com/Koihii/lazy-net/tree/main/test) to see sample files.

## Credits

`lazy-net` is created because I'm tired to create a same piece of code again and again.

## License

[MIT](LICENSE)
npm package: @koihii/lazy-outline
Description: A lazy plugin for printing log's outline.
Author: Kha Tran
Latest version: 1.0.1

# lazy-outline

![lazy-outline-image](./images/lazy-outline.png)

A simple, lightweight plugin for outlining stuffs to your terminal.

Basically, the plugin will work like this image.

![lazy-outline-capture](./images/lazy-outline-capture.png)

## Installation

Install this plugin by using this command:

```bash
$ npm install @koihii/lazy-outline
```

## Usage

`lazy-outline` supports both `ESModule` and `CommonJS`. You can either:

```js
// with commonjs
const lazyOutline = require('@koihii/lazy-outline')

// with esmodule.
import lazyOutline from '@koihii/lazy-outline'
```

After importing this plugin, simply use it like this.

```js
const lazyOutline = require('@koihii/lazy-outline')

const LOGS = [
  'This is the first message:',
  '  This is the second message.',
  '  This is the third message.',
]

lazyOutline(LOGS)
```

Follow [this link](https://github.com/Koihii/lazy-outline/blob/main/test/testCases.js) to see sample files.

`lazy-outline` has these configuration options:

- margin (array of numbers)
- marginTop (number)
- marginLeft (number)
- marginBottom (number)
- marginRight (number)
- padding (array of numbers)
- paddingTop (number)
- paddingLeft (number)
- paddingBottom (number)
- paddingRight (number)

By default, `lazy-outline` sets `margin: [2, 2]` and `padding: [2, 2]`, but you can set configuration on your own.

```js
const CONFIG = {
  margin: [4, 2],
  marginLeft: 3,
  padding: [2, 3],
  paddingTop: 4,
}

lazyOutline(LOGS, CONFIG)
```

## Credits

`lazy-outline` is created to support my other plugins.

## License

[MIT](LICENSE)
npm package: @koikorn/access-control
Description: KeystoneJS Access Control parsing and validating utilities.
Author: The KeystoneJS Development Team
Latest version: 6.2.0

<!--[meta]
title: Access Control
[meta]-->

# Access Control

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/access-control)

This package is an internal helper package used by Keystone to parse and validate access control expressions.

You should probably not use this directly in your Keystone projects.

For more information on how to configure access control for you Keystone application, please consult the [Access Control Guide](/docs/guides/access-control.md).
npm package: @koikorn/adapter-knex
Description: KeystoneJS Knex Database Adapter
Author: The KeystoneJS Development Team
Latest version: 10.1.0

<!--[meta]
section: api
subSection: database-adapters
title: Knex adapter
[meta]-->

# Knex database adapter

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/adapter-knex)

The [Knex](https://knexjs.org/#changelog) adapter is a general purpose adapter which can be used to connect to a range of different database backends.
At present, the only fully tested backend is `Postgres`, however Knex gives the potential for `MSSQL`, `MySQL`, `MariaDB`, `SQLite3`, `Oracle`, and `Amazon Redshift` to be supported.

## Usage

```javascript
const { KnexAdapter } = require('@koikorn/adapter-knex');

const keystone = new Keystone({
  adapter: new KnexAdapter({...}),
});
```

## Config

### `schemaName`

_**Default:**_ `'public'`

All postgres tables are grouped within a schema and `public` is the default schema.

### `dropDatabase`

_**Default:**_ `false`

Allow the adapter to drop the entire database and recreate the tables / foreign keys based on the list schema in your application. This option is ignored in production, i.e. when the environment variable NODE_ENV === 'production'.

### `knexOptions`

These options are passed directly through to Knex.

See the [knex docs](https://knexjs.org/#Installation-client) for more details.

_**Default:**_

```javascript
{
  client: 'postgres',
  connection: process.env.CONNECT_TO || process.env.DATABASE_URL || process.env.KNEX_URI
}
```

## Debugging

To log all Knex queries, run the server with the environment variable `DEBUG=knex:query`.

## Setup

Before running Keystone with the Knex adapter you should configure a database. By default Knex will look for a Postgres database on the default port, matching the project name, as the current user.

In most cases this database will not exist and you will want to configure a user and database for your application.

Assuming you're on MacOS and have Postgres installed the `build-test-db.sh` does this for you:

```shell
./build-test-db.sh
```

Otherwise, you can run these steps manually:

```shell allowCopy=false showLanguage=false
createdb -U postgres keystone
psql keystone -U postgres -c "CREATE USER keystone5 PASSWORD 'k3yst0n3'"
psql keystone -U postgres -c "GRANT ALL ON DATABASE keystone TO keystone5;"
```

If using the above, you will want to set a connection string of: `postgres://keystone5:k3yst0n3@localhost:5432/keystone`
npm package: @koikorn/adapter-mongoose
Description: KeystoneJS Mongoose Database adapter.
Author: The KeystoneJS Development Team
Latest version: 8.1.3

<!--[meta]
section: api
subSection: database-adapters
title: Mongoose adapter
[meta]-->

# Mongoose database adapter

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/adapter-mongoose)

## Usage

```javascript
const { MongooseAdapter } = require('@koikorn/adapter-mongoose');

const keystone = new Keystone({
  adapter: new MongooseAdapter({...}),
});
```

## Config

### `mongoUri` (required)

This is used as the `uri` parameter for `mongoose.connect()`.

_**Default:**_ Environment variable (see below) or `'mongodb://localhost/<DATABASE_NAME>'`

If not specified, KeystoneJS will look for one of the following environment variables:

- `CONNECT_TO`
- `DATABASE_URL`
- `MONGO_URI`
- `MONGODB_URI`
- `MONGO_URL`
- `MONGODB_URL`
- `MONGOLAB_URI`
- `MONGOLAB_URL`

### Mongoose options (optional)

Additional Mongoose config options are passed directly through to `mongoose.connect()`.

_**Default:**_

```javascript
{
  useNewUrlParser: true,
  useFindAndModify: false,
  useUnifiedTopology: true,
}
```

See the [Mongoose docs](https://mongoosejs.com/docs/api.html#mongoose_Mongoose-connect) for a detailed list of options.
npm package: @koikorn/app-graphql
Description: KeystoneJS GraphQL App.
Author: The KeystoneJS Development Team
Latest version: 5.1.9

<!--[meta]
section: api
subSection: apps
title: GraphQL app
[meta]-->

# GraphQL app

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-graphql)

A KeystoneJS app that creates a GraphQL API and [GraphiQL](https://github.com/graphql/graphiql/blob/master/packages/graphiql/README.md) playground.

> **Note:** The GraphiQL playground is disabled in production mode.

For information about writing queries and mutations for KeystoneJS see the [Introduction to KeystoneJS' GraphQL API](https://keystonejs.com/guides/intro-to-graphql).

## Usage

```javascript
const { Keystone } = require('@koikorn/keystone');
const { GraphQLApp } = require('@koikorn/app-graphql');
const { AdminUIApp } = require('@koikorn/app-admin-ui');

module.exports = {
  keystone: new Keystone(),
  apps: [
    new GraphQLApp({
      // All config keys are optional. Default values are shown here for completeness.
      apiPath: '/admin/api',
      graphiqlPath: '/admin/graphiql',
      schemaName: 'admin',
      apollo: {},
    }),
    new AdminUIApp(),
  ],
};
```

## Config

| Option         | Type     | Default           | Description                                      |
| -------------- | -------- | ----------------- | ------------------------------------------------ |
| `apiPath`      | `String` | `/admin/api`      | Change the API path                              |
| `graphiqlPath` | `String` | `/admin/graphiql` | Change the GraphiQL playground path              |
| `schemaName`   | `String` | `admin`           | Change the graphQL schema name (not recommended) |
| `apollo`       | `Object` | `{}`              | Options passed directly to Apollo Server         |
npm package: @koikorn/app-graphql-playground
Description: KeystoneJS GraphQL Playground App.
Author: The KeystoneJS Development Team
Latest version: 5.1.4

<!--[meta]
section: api
subSection: apps
title: GraphQL Playground App
draft: true
[meta]-->

# GraphQL Playground App

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-graphql-playground)

A KeystoneJS App that creates an Apollo GraphQL playground.

## Usage

```javascript
const { Keystone } = require('@koikorn/keystone');
const { GraphQLApp } = require('@koikorn/app-graphql');
const { GraphQLPlaygroundApp } = require('@koikorn/app-graphql-playground');
const { AdminUIApp } = require('@koikorn/app-admin-ui');

// Ensure that the GraphQLApp and GraphQLAppPlayground are referring to the same endpoint
const apiPath = '/admin/api';

module.exports = {
  keystone: new Keystone(),
  apps: [
    // This should come before the GraphQLApp, as it sets up the dev query middleware
    new GraphQLPlaygroundApp({ apiPath })
    // Disable the default playground on this app
    new GraphQLApp({ apiPath, graphiqlPath: undefined }),
    new AdminUIApp()
  ],
};
```

## Config

| Option         | Type     | Default           | Description                               |
| -------------- | -------- | ----------------- | ----------------------------------------- |
| `apiPath`      | `String` | `/admin/api`      | Change the API path                       |
| `graphiqlPath` | `String` | `/admin/graphiql` | Change the Apollo GraphQL playground path |
npm package: @koikorn/app-next
Description: KeystoneJS Next.js App.
Author: The KeystoneJS Development Team
Latest version: 5.2.0

<!--[meta]
section: api
subSection: apps
title: Next.js app
[meta]-->

# Next.js app

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-next)

A KeystoneJS app for serving a [Next.js](https://nextjs.org/) application.

## Usage

```javascript
const { NextApp } = require('@koikorn/app-next');

module.exports = {
  keystone,
  apps: [
    new GraphQLApp(),
    new AdminUIApp({ enableDefaultRoute: false }),
    new NextApp({ dir: 'app' }),
  ],
  distDir,
};
```

### Config

| Option | Type     | Default | Required | Description                       |
| ------ | -------- | ------- | -------- | --------------------------------- |
| `dir`  | `String` | `null`  | `true`   | The directory of the Next.js app. |
npm package: @koikorn/app-nuxt
Description: KeystoneJS Nuxt.js App.
Author: The KeystoneJS Development Team
Latest version: 5.1.3

<!--[meta]
section: api
subSection: apps
title: Nuxt.js app
[meta]-->

# Nuxt.js app

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-nuxt)

## Usage

```javascript
const { NuxtApp } = require('@koikorn/app-nuxt');

const config = {
  srcDir: 'src',
  buildDir: 'dist',
};

module.exports = {
  keystone,
  apps: [new GraphQLApp(), new AdminUIApp(), new NuxtApp(config)],
};
```

### Config

A config object can be passed to the `NuxtApp` instance. Documentation for the `nuxtConfig` options is available on the [NuxtJS documentation website](https://nuxtjs.org/guide/configuration).
npm package: @koikorn/app-schema-router
Description: KeystoneJS GraphQL App.
Author: The KeystoneJS Development Team
Latest version: 5.1.1

<!--[meta]
section: api
subSection: apps
title: GraphQL Schema Router
[meta]-->

# GraphQL Schema Router

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-schema-router)

A KeystoneJS App that route requests to different GraphQL schemas.

The `SchemaRouterApp` allows you to define a `routerFn` which takes `(req, res)` and returns
a `routerId`, which is used to pick between different GraphQL schemas which exist at the same
`apiPath`.

## Usage

```javascript
const { Keystone } = require('@koikorn/keystone');
const { GraphQLAppPlayground } = require('@koikorn/app-graphql-playground');
const { SchemaRouterApp } = require('@koikorn/app-schema-router');
const { GraphQLApp } = require('@koikorn/app-graphql');
const { AdminUIApp } = require('@koikorn/app-admin-ui');

module.exports = {
  keystone: new Keystone(),
  apps: [
    new GraphQLAppPlayground({ apiPath })
    new SchemaRouterApp({
      apiPath,
      routerFn: (req) => req.session.keystoneItemId ? 'private' : 'public',
      apps: {
        public: new GraphQLApp({ apiPath, schemaName: 'public', graphiqlPath: undefined }),
        private: new GraphQLApp({ apiPath, schemaName: 'private', graphiqlPath: undefined }),
      },
    }),
    new AdminUIApp()
  ],
};
```

## Config

| Option     | Type       | Default      | Description                                                    |
| ---------- | ---------- | ------------ | -------------------------------------------------------------- |
| `apiPath`  | `String`   | `/admin/api` | The GraphQL API path                                           |
| `routerFn` | `Function` | `() => {}`   | A function which takes `(req, res)` and returns a `routerId`   |
| `apps`     | `Object`   | `{}`         | An object with `routerId`s as keys and `GraphQLApp`s as values |
npm package: @koikorn/app-static
Description: KeystoneJS Static File App.
Author: The KeystoneJS Development Team
Latest version: 5.1.2

<!--[meta]
section: api
subSection: apps
title: Static file app
[meta]-->

# Static file app

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-static)

A KeystoneJS app to serve static files such as images, CSS and JavaScript with support for client side routing.

## Usage

```js title=index.js
const { Keystone } = require('@koikorn/keystone');
const { GraphQLApp } = require('@koikorn/app-graphql');
const { AdminUIApp } = require('@koikorn/app-admin-ui');
const { StaticApp } = require('@koikorn/app-static');

module.exports = {
  keystone: new Keystone(),
  apps: [
    new GraphQLApp(),
    new AdminUIApp(),
    new StaticApp({
      path: '/',
      src: 'public',
      fallback: 'index.html',
    }),
  ],
};
```

## Config

| Option     | Type     | Required | Description                                                                                       |
| ---------- | -------- | -------- | ------------------------------------------------------------------------------------------------- |
| `path`     | `string` | `true`   | The path to serve files from.                                                                     |
| `src`      | `string` | `true`   | The path to the folder containing static files.                                                   |
| `fallback` | `string` | `false`  | The path to the file to serve if none is found. This path is resolved relative to the `src` path. |
npm package: @koikorn/app-version
Description: KeystoneJS App Version Plugin
Author: The KeystoneJS Development Team
Latest version: 1.0.2

<!--[meta]
section: api
subSection: utilities
title: App version plugin
[meta]-->

# App version plugin

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@koikorn/app-version)

This package provides support for including a version string both as an HTTP response header and as a graphQL query.

The function `appVersionMiddleware(version)` will return a piece of middleware which will set the `X-Keystone-App-Version` response header to `version` on all HTTP requests.

The graphQL provider `AppVersionProvider` will add an `{ appVersion }` query to your graphQL API which returns `version` as a string.

## Usage

### Indirectly

This package is designed to be used indirectly via the conveniance API on the `Keystone` class:

```javascript
const keystone = new Keystone({
  appVersion: {
    version: '1.0.0',
    addVersionToHttpHeaders: true,
    access: true,
  },
});
```

### Directly

It can also be used directly if you would like to manually manage your middleware stack of graphQL providers.

```javascript
const { AppVersionProvider, appVersionMiddleware } = require('@koikorn/app-version');

const version = '1.0.0';

app.use(appVersionMiddleware(version));

keystone._providers.push(
  new AppVersionProvider({
    version,
    access: true,
    schemaNames: ['public'],
  })
);
```
npm package: @koikorn/field-views-loader
Description: A webpack loader used to load all the field views used in an app
Author: The Keystone Development Team
Latest version: 6.0.0

<!--[meta]
title: Field Views Loader
[meta]-->

# Field Views Loader

This packages contains a [webpack loader](https://webpack.js.org/api/loaders) which makes the field type UI components available to the Admin UI.

This package is an internal helper package used by Keystone. It contains a [webpack loader](https://webpack.js.org/api/loaders) which makes the field type UI components available to the Admin UI.

You should probably not use this directly in your Keystone projects.
npm package: @koikorn/fields-authed-relationship
Description: KeystoneJS AuthedRelationship Field Type
Author: The KeystoneJS Development Team
Latest version: 1.0.7

<!--[meta]
section: api
subSection: field-types
title: AuthedRelationship
[meta]-->

# AuthedRelationship

An extension on the `Relationship` field which is automatically set to the
currently authenticated item during a create mutation.

Great for setting fields like `Post.author` or `Product.owner`, etc.

## Usage

### Basic

```js
const { AuthedRelationship } = require('@koikorn/fields-authed-relationship');

keystone.createList('User', {
  fields: {
    name: { type: String },
  },
});

keystone.createList('Post', {
  fields: {
    // Automatically set to the currently logged in user on create
    author: {
      type: AuthedRelationship,
      ref: 'User',
    },
  },
});
```

### Complete example

This example allows "admins" to overwrite the value

```js
const { AuthedRelationship } = require('@koikorn/fields-authed-relationship');
const { Checkbox } = require('@koikorn/fields');

keystone.createList('User', {
  fields: {
    name: { type: String },
    isAdmin: { type: Checkbox, default: false },
  },
});

const isAdmin = ({ authentication: { item } }) => !!item && item.isAdmin;

keystone.createList('Post', {
  fields: {
    author: {
      type: AuthedRelationship,
      ref: 'User',
      access: {
        create: isAdmin,
        update: isAdmin,
      },
    },
  },
});
```

### Config

| Option       | Type      | Default | Description                      |
| ------------ | --------- | ------- | -------------------------------- |
| `isRequired` | `Boolean` | `false` | Does this field require a value? |

## Differences from `Relationship`

- No `many: true`. This field is purely for a to-single relationship and cannot
  be used to refer to more than one item.
- Cannot specify a `defaultValue`. The entire purpose of this field is to
  provide that method for you.
- When setting `isRequired`, it will be checked during the "default value" phase
  of the mutation lifecycle. This means it may throw an error earlier than other
  fields
- Default access control set to `{ create: false, read: true, update: false }`
- Access control _does not_ respect any Keystone-level `defaultAccess`
npm package: @koikorn/fields-datetime-utc
Description: KeystoneJS DatetimeUtc Field Type
Author: The KeystoneJS Development Team
Latest version: 6.0.2

<!--[meta]
section: api
subSection: field-types
title: DateTimeUtc
[meta]-->

# DateTimeUtc

`DateTimeUtc` fields represent points in time.

Accepts only values that include an offset, explicitly or implicitly (as in JS `Date` objects).
Produces JS `Date` objects and ISO 8601 strings.

Unlike the core `DateTime` field type only the UTC value is stored.

This package is not part of the core fields, and needs to be installed separately with `npm i @koikorn/fields-datetime-utc`

## Usage

```js
const { DateTimeUtc } = require('@koikorn/fields-datetime-utc');

keystone.createList('User', {
  fields: {
    lastOnline: { type: DateTimeUtc },
  },
});
```
npm package: @koikorn/fields-markdown
Description: KeystoneJS Markdown Field Type
Author: The KeystoneJS Development Team
Latest version: 5.2.1

<!--[meta]
section: api
subSection: field-types
title: Markdown
[meta]-->

# Markdown

This field inserts a string path into your schema based on the `Text` field type implementation, and renders a Markdown editor using [CodeMirror](https://codemirror.net/).

## Usage

This package isn't included with the keystone fields package and needs to be installed:

```shell allowCopy=false showLanguage=false
yarn add @koikorn/fields-markdown
# or
npm install @koikorn/fields-markdown
```

Then import it, and use it like any other field:

```js
const { Markdown } = require('@koikorn/fields-markdown');

keystone.createList('Post', {
  fields: {
    content: {
      type: Markdown,
    },
  },
});
```

## Credit

The `Editor` implementation is based on [SquidDev/MirrorMark](https://github.com/SquidDev/MirrorMark).
npm package: @koikorn/fields-wysiwyg-tinymce
Description: KeystoneJS WYSIWYG HTML Field Type, powered by TinyMCE
Author: The KeystoneJS Development Team
Latest version: 5.3.2

<!--[meta]
section: api
subSection: field-types
title: Wysiwyg
[meta]-->

# Wysiwyg

This field inserts a string path into your schema based on the `Text` field type implementation, and renders a WYSIWYG editor in the Admin UI using [TinyMCE](https://www.tiny.cloud/)

## Usage

This package isn't included with the keystone fields package and needs to be installed with `yarn add @koikorn/fields-wysiwyg-tinymce` or `npm install @koikorn/fields-wysiwyg-tinymce`

Then import it, and use it like any other field:

```js
const { Wysiwyg } = require('@koikorn/fields-wysiwyg-tinymce');
```

## Config

### `editorConfig`

**Default:** `{}`

Accepts any [TinyMCE config options](https://www.tiny.cloud/docs/configure/). These will be passed to `tinymce.init` and can be used to override Keystone.js' default editor appearance and functionality.
npm package: @koikorn/logger
Description: Common logging functionality used within @koikorn/* packages.
Author: The KeystoneJS Development Team
Latest version: 5.1.2

<!--[meta]
section: api
subSection: utilities
title: Logger
[meta]-->

# Logger

## API

### `require('@koikorn/logger').logger(name)`

Provides an instance of [`pino`](https://github.com/pinojs/pino) based on the given `name`.

Instances are cached and re-used, making it safe to request the same named instance across multiple files.

### `process.env.DISABLE_LOGGING`

When set to any "truthy" value, will prevent any log output from occurring (particularly useful during test runs).
npm package: @koikorn/oembed-adapters
Description: Adapters for fetching oEmbed data for the OEmbed field type
Author: The Keystone Development Team
Latest version: 5.1.4

<!--[meta]
section: api
subSection: field-adapters
title: OEmbed adapters
[meta]-->

# OEmbed adapters

The `OEmbed` field type (from `@koikorn/fields`) can fetch oEmbed data
from a number of providers such as [Iframely](https://iframely.com).

This package contains adapters for different providers.

## `IframelyOEmbedAdapter`

```javascript
const { Keystone } = require('@koikorn/keystone');
const { OEmbed } = require('@koikorn/fields');
const { IframelyOEmbedAdapter } = require('@koikorn/oembed-adapters');

const keystone = new Keystone(/* ... */);

const iframelyAdapter = new IframelyOEmbedAdapter({
  apiKey: '...', // Get one from https://iframely.com
});

keystone.createList('User', {
  fields: {
    portfolio: {
      type: OEmbed,
      adapter: iframelyAdapter,
    },
  },
});
```

The request to Iframely will include the following [parameters](https://iframely.com/docs/parameters):

- `iframe=1`
- `omit_script=1`
npm package: @koikorn/test-utils
Description: Common utilities used while testing @koikorn/* packages.
Author: The KeystoneJS Development Team
Latest version: 7.0.1

<!--[meta]
section: api
subSection: utilities
title: Test utils
[meta]-->

# Test utils

This package is an internal KeystoneJS package which contains utility functions to assist in running tests against the GraphQL API.

## Installation

```shell
yarn add @koikorn/test-utils
```

<!--- TODO: The contents of this file should be generated by JSDoc --->
npm package: @koikorn/utils
Description: Common utility functions used throughout @keystonejs packages.
Author: The KeystoneJS Development Team
Latest version: 5.4.2

<!--[meta]
title: Utilities
[meta]-->

# Utilities

This package is an internal Keystone package which contains various helper functions which are used throughout the monorepo.

You should probably not use this directly in your Keystone projects.