open-index/open-npm huggingface dataset:
npm package: @rthx/utils
Description: Collection of JS frequently-used snippets in browser
Author: hongxin.tang@hotmail.com
Latest version: 0.2.6

# @rthx/utils

Collection of JS frequently-used snippets, mainly suitable for browser environment

## Usage

```sh
pnpm add @rthx/utils
```

## Doc

see [Type Definitions](https://github.com/ehehaye/utils/blob/main/index.d.ts)
npm package: @rthx/vue3-amap
Description: 基于 vue3 封装的高德地图组件集合，配合猎鹰轨迹服务搭建了简易的电子围栏管理系统与企业签到 demo
Author: hongxin.tang@hotmail.com
Latest version: 0.1.16

# @rthx/vue3-amap

基于 vue3 封装的高德地图组件集合，配合猎鹰轨迹服务搭建了简易的电子围栏管理系统与企业签到 demo

## Features

- 类型提示
- 原生组件封装
  - AMapControlBar
  - AMapGeolocation
  - AMapMap
  - AMapMapType
  - AMapMarker
  - AMapScale
  - AMapSearch
  - AMapToolbar
- 拓展组件
  - AMapFitView
  - AMapPositionWatcher
  - AMapVector

## Usage

### 安装

```sh
pnpm add @rthx/vue3-amap
```

### 引入

```js
import Vue3AMap from '@rthx/vue3-amap'
import '@rthx/vue3-amap/dist/index.css'
import App from './app.vue'
import { createApp } from 'vue'

const app = createApp(App)
app.use(router)
app.use(Vue3AMap, {
  key: '', // 你的高德地图 JS KEY
  version: '2.0',
  errorHandler(error) {}, // 报错处理逻辑，可配置 toast 提示等
})
```

### 配置全局组件类型提示（如有）

增加 ```@rthx/vue3-amap/global``` 至 ```tsconfig.json``` 下 ```compilerOptions``` 的 ```types``` 字段中

```json
{
  "compilerOptions": {
    "types": ["@rthx/vue3-amap/global"]
  }
}
```

### 使用

```text
TODO
```

## Dev

搭建

```sh
git clone https://github.com/ehehaye/vue3-amap.git
cd vue3-amap
pnpm i
```

启动

```sh
pnpm dev
```

mock（开发阶段可选开启，避免频繁调用高德接口触发额度限制）

```javascript
import('../mock');
```

## Tips

地图加载与接口调用涉及高德开发者密钥，出于安全考虑，项目采用 Nginx 转发的处理方式进行处理，仅代理必要服务。实际开发时请前往[高德控制台](https://console.amap.com/dev/index)申请自己的开发者应用

### Nginx 代理示例

[JS API 安全密钥使用](https://lbs.amap.com/api/javascript-api-v2/guide/abc/jscode)

```nginx
# 自定义地图服务代理
location /_AMapService/v4/map/styles {
  set $args "$args&jscode=你的安全密钥";
  proxy_pass https://webapi.amap.com/v4/map/styles;
}
# 海外地图服务代理
location /_AMapService/v3/vectormap {
  set $args "$args&jscode=你的安全密钥";
  proxy_pass https://fmap01.amap.com/v3/vectormap;
}
# Web 服务 API 代理
location /_AMapService/ {
  set $args "$args&jscode=你的安全密钥";
  proxy_pass https://restapi.amap.com/;
}
# 猎鹰轨迹服务 API 代理
location /geofence/ {
  set $args "$args&key=你的Web服务API类型KEY";
  proxy_pass https://tsapi.amap.com/v1/track/geofence/;
}
# 输入提示 API 代理
location /inputtips {
  set $args "$args&key=你的Web服务API类型KEY";
  proxy_pass https://restapi.amap.com/v3/assistant/inputtips;
}
```

## FAQ

- 为什么 PC 调试定位时会失败？

  定位实现基于 GPS 与 IP，前者大部分 PC 不具备硬件能力，后者受网络环境因素影响

- 为什么 Chrome 调试定位时会失败？

  不同浏览器厂商的定位实现方案有所不同，Chrome 向 Google 发送请求解析定位，由于已知原因可能无法得到正常响应，建议在其他浏览器上进行尝试
npm package: @rtidatascience/harness
Description: harness is a plugin for the Vue.js framework for building dashboards. The harness plugin allows you to define pages in your app as simple Javascript classes, and uses those page definitions to programatically generate dashboards.
Author: RTI CDS
Latest version: 1.18.1

<div align="center">
    <img src="logos/harness.png" alt="harness logo" />
</div>
<div align="center">
    <img src="logos/rti.png" alt="RTI Logo"/>
    <img src="logos/cds.png" alt="CDS Logo"/>
</div>

### Harness is a state management library for writing data-driven dashboards in Vue. 

When building dashboards for the web, good state management is hard. Writing getters, actions, mutations and state for every filter and every chart in a multi-page dashboard is a time-consuming process. Developers are often forced to weigh best practices against cost of labor, and incrementally build state and relationships between charts and filters over time - a process often responsible for technical debt. Harness aims to solve that problem by giving developers a method of defining each page in their application with syntax for defining charts and filters, then generates the following:
* A namespaced vuex module per page with:
    * State, mutations, actions and getters for all charts and filters
    * A unified interface for loading and processing data, combining multiple filters to create all charts
    * Common-use interactions for filters such as options, getters, setters and defaults
    * A robust data manipulation API for applying filters to and generating statistics from data arrays and objects

These features allow developers to rapidly prototype dashboard applications in Vue without having to cut corners for the sake of fast turnaround, and know that their products are ready for production right out of the gate with hardened, tested infrastructure.

Harness is often used in conjunction with [Harness-UI](https://ui.harnessjs.org), a component library that makes use of Harness API functions and Bootstrap CSS components to create grids, filters, charts and more.

For more information and full documentation, [visit our documentation website](https://harnessjs.org).
npm package: @rtidatascience/harness-ui
Description: [![pipeline status](https://cds-mallard-web.rti.org/harness/harness-ui/badges/master/pipeline.svg)](https://cds-mallard-web.rti.org/harness/harness-ui/-/commits/master) ## The Harness Component Library Harness-UI is a Vue Plugin that publishes a library o
Author: RTI CDS
Latest version: 1.17.5

## The Harness Component Library
Harness-UI is a Vue Plugin that publishes a library of components binding [Harness](https://www.harnessjs.org) functionality to [Bootstrap 4 components](https://getbootstrap.com/docs/4.0/components/). Harness-UI contains reusable, configurable, accessible form fields bound to Harness filters, convenience layout functionality for filters and charts, and accessible datatables.

## Documentation
See our documentation website at [https://ui.harnessjs.org](https://ui.harnessjs.org).
npm package: @rtidatascience/harness-vue
Description: ### Dashboard state management made easy.
Author: RTI CDS
Latest version: 1.9.0-0

# Harness-Vue

### Dashboard state management made easy.

<p align="center">
    <img alt="harness-vue logo" src="https://github.com/RTIInternational/harness-vue/blob/main/logos/harness-vue.png" />
</p>

--- 
Harness-Vue is a plugin for the [vue.js](https://vuejs.org) javascript framework for building data-intensive web dashboards. For more information on Harness-Vue, see the [introduction page in our documentation](https://harnessjs.org/introduction).

## Installation and Usage
See [our documentation website](https://harnessjs.org) for complete documentation on installation and usage.
## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @rtidatascience/harness-vue-bootstrap
Description: Harness-Vue-Bootstrap is a Vue Plugin that publishes a library of components binding [Harness-Vue](https://www.harnessjs.org) functionality to [Bootstrap 4 components](https://getbootstrap.com/docs/4.0/components/). Harness-Vue-Bootstrap contains reusable
Author: RTI CDS
Latest version: 2.6.0-0

## The Harness-Vue-Bootstrap Component Library
Harness-Vue-Bootstrap is a Vue Plugin that publishes a library of components binding [Harness-Vue](https://www.harnessjs.org) functionality to [Bootstrap 4 components](https://getbootstrap.com/docs/4.0/components/). Harness-Vue-Bootstrap contains reusable, configurable, accessible form fields bound to Harness filters, convenience layout functionality for filters and charts, and accessible datatables.

## Documentation
See our documentation website at [https://bootstrap.harnessjs.org](https://bootstrap.harnessjs.org).
npm package: @rtif-sdk/core
Description: RTIF core data model, operations, and utilities
Author: coryrobinson42@gmail.com
Latest version: 2.14.0

# @rtif-sdk/core

Zero-dependency core library for the RTIF (Rich Text Input Format) document model. Provides types, pure functions for applying operations, normalization, offset resolution, and validation.

## Install

```bash
npm install @rtif-sdk/core
```

## Usage

### Create a document

```typescript
import type { Document } from '@rtif-sdk/core';

const doc: Document = {
  version: 1,
  blocks: [
    { id: 'b1', type: 'text', spans: [{ text: 'Hello world' }] },
  ],
};
```

### Apply an operation

```typescript
import { apply } from '@rtif-sdk/core';

const { doc: newDoc, inverse } = apply(doc, {
  type: 'insert_text',
  offset: 5,
  text: ',',
});
// newDoc.blocks[0].spans[0].text === 'Hello, world'

// Undo by applying the inverse
const { doc: original } = apply(newDoc, inverse);
```

### Resolve offsets

```typescript
import { resolve, docLength } from '@rtif-sdk/core';

const len = docLength(doc);      // total character count including virtual \n separators
const pos = resolve(doc, 5);     // { blockIndex: 0, localOffset: 5 }
```

### Extract text from a range

```typescript
import { extractText } from '@rtif-sdk/core';

const text = extractText(doc, 5, 20); // "orld\nSecond blo"
```

### Validate a document

```typescript
import { validate } from '@rtif-sdk/core';

const result = validate(doc);
if (!result.valid) {
  console.error(result.errors);
}
```

## Operations

RTIF defines exactly 8 operation types: `insert_text`, `delete_text`, `split_block`, `merge_block`, `set_span_marks`, `set_block_attrs`, `set_block_type`, `set_meta`.

Every operation is deterministic and invertible — `apply()` always returns the inverse operation for undo.

## License

MIT
npm package: @rtif-sdk/test-kit
Description: RTIF shared test utilities, builders, and assertions
Author: coryrobinson42@gmail.com
Latest version: 2.14.0

# @rtif-sdk/test-kit

Shared test utilities, document builders, and assertions for testing RTIF editors and plugins.

## Install

```bash
npm install --save-dev @rtif-sdk/test-kit
```

## Usage

### Document builders

```typescript
import { doc, block, span } from '@rtif-sdk/test-kit';

const testDoc = doc(
  block('b1', 'text', span('Hello '), span('world', { bold: true })),
  block('b2', 'text', span('')),
);
```

### Assertions

```typescript
import { expectDocEqual, expectBlockCount, expectSpanText } from '@rtif-sdk/test-kit';

expectDocEqual(result, expected);
expectBlockCount(result, 2);
expectSpanText(result, 0, 0, 'Hello ');
```

### Fixtures

```typescript
import { emptyDoc, singleBlockDoc, multiBlockDoc } from '@rtif-sdk/test-kit';

const empty = emptyDoc();           // single empty block
const single = singleBlockDoc();    // one block with text
const multi = multiBlockDoc();      // multiple blocks
```

## Peer Dependencies

- `vitest` ^4

## License

MIT
npm package: @rtinternal/tree-sitter-json
Description: [Fork of tree-sitter/tree-sitter-json] JSON grammar for tree-sitter
Author: Max Brunsfeld
Latest version: 0.24.8-rtinternal

# tree-sitter-json

[![CI][ci]](https://github.com/tree-sitter/tree-sitter-json/actions/workflows/ci.yml)
[![discord][discord]](https://discord.gg/w7nTvsVJhm)
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-json)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-json)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-json)

JSON grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter)

[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-json/ci.yml?logo=github&label=CI
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-json?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-json?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-json?logo=pypi&logoColor=ffd242
npm package: @rtirl/api
Description: Client API library for rtirl.com
Author: muxfdz@gmail.com
Latest version: 1.2.1

# RealtimeIRL Client API

![npm](https://img.shields.io/npm/v/@rtirl/api)
![npm](https://img.shields.io/npm/dw/@rtirl/api)

An API to access RealtimeIRL data.

## Installation

```bash
  npm install @rtirl/api
```

Alternatively, use it in the browser:

```html
<script src="https://cdn.jsdelivr.net/npm/@rtirl/api@latest/lib/index.min.js"></script>
```

## Usage

```javascript
import * as RealtimeIRL from '@rtirl/api';

RealtimeIRL.forPullKey(YOUR_PULL_KEY).addLocationListener(function ({
  latitude,
  longitude,
}) {
  // do something with latitude/longitude
});
```

```javascript
import * as RealtimeIRL from '@rtirl/api';

// muxfd = 158394109
RealtimeIRL.forStreamer("twitch", "158394109").addLocationListener(function (
  location
) {
  // do something with location.latitude/location.longitude
});
```

See `src/index.ts` for all available functions and types.

## Polling-based API

If you are interested in pulling the data in JSON format, the following endpoint is available:

```
GET https://rtirl.com/api/pull?key=<pull key>
```

The schema of the response depends on what fields have been pushed by the client. A sample output can be viewed [here](https://rtirl.com/api/pull?key=t0fucprufql69bcx).

```
{
   "accuracy":5.408999919891357,  // meters
   "altitude":{
      "EGM96":3.5973978207728656, // meters
      "WGS84":-29.197977916731165 // meters
   },
   "heading":206.37741088867188,  // degrees
   "location":{
      "latitude":40.7047389,      // degrees
      "longitude":-74.0171302     // degrees
   },
   "reportedAt":1629924573000,    // milliseconds since epoch
   "speed":0.6116824746131897,    // meters per second
   "updatedAt":1629924573283      // milliseconds since epoch
}
```

Note that the polling API may update less frequently than the push API (~once per five seconds). If you wish to have realtime updates delivered as fast as possible, please use the push API. This helps us save on server costs.

## Contributing

Contributions are always welcome! The documentation is currently quite sparse. Please feel free to send pull requests to improve them.
npm package: @rtivital/eslint-config
Description: eslint and prettier configuration based on airbnb eslint config
Author: Vitaly Rtishchev
Latest version: 1.0.1

# @rtivital/eslint-config

Prettier and ESlint configuration I use for the majority of react projects. It is based on airbnb config with some rules tweaks.

## Installation

```sh
npx install-peerdeps --dev @rtivital/eslint-config
```

## Usage

Example usage (see [omatsuri](https://github.com/rtivital/omatsuri) for full usage):

```js
// .eslintrc.js
module.exports = {
  extends: ['@rtivital/eslint-config'],
  rules: {
    /* override rules */
  },
};

// .prettierrc.js
module.exports = require('@rtivital/eslint-config/.prettierrc');
```
npm package: @rtivital/fe-mt
Description: A template for TypeScript packages
Author: Vitaly Rtishchev
Latest version: 0.8.3

# ts-package-template

A template to publish a TypeScript package to npm.

Key features:

- Ready to use ESM + CJS build system
- Properly configured [exports in package.json](https://publint.dev/@rtivital/ts-package-template) to support all modern bundlers and Node.js
- CI with GitHub Actions
- Testing and linting setup ready: Jest, ESLint, Prettier, Knip
- Publish to npm with an npm script, including support for pre-releases (alpha, beta, rc)
- `npm pack` validation as part of the testing pipeline: makes sure only necessary files are included in the package

Included tools:

- Yarn v4
- Rollup
- esbuild
- jest
- prettier
- ESLint
- Knip
- GitHub workflow for tests

## Usage

- Click "Use this template" button to create a new repository from this template
- Clone the new repository
- Change `package.json` to your own package name, description, etc. **!important**: change `repository.url` and other repository links to your own repository url
- Install dependencies: `yarn` (other package managers are not supported)
- Write your code in `src/` directory
- Run `npm run release` to build and publish your package to npm

## Publishing to npm

Use `release` script to publish the package:

- `npm run release` – release a new patch version to npm
- `npm run release minor` – release a new minor version to npm
- `npm run release major` – release a new major version to npm
- `npm run release minor -- --stage alpha` – release a new minor alpha version to npm (for example, `1.1.0-alpha.0`)

Note that release script will always publish public packages to npm. If you want to publish a private package, change release script in `scripts/release.ts`.

## Publishing with GitHub Actions

1. Create [npm authentication token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) and add it as `NPM_TOKEN` to your repository secrets (Settings -> Secrets and variables -> Actions -> New repository secret).

2. Create `.github/workflows/publish.yml` with the following content. _Note that if your default branch is main, you should change it in the publish action_.

```yaml
on:
  push:
    branches: master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version-file: '.nvmrc'
          cache: 'yarn'
          cache-dependency-path: '**/yarn.lock'
      - run: yarn
      - run: npm test
      - uses: JS-DevTools/npm-publish@v3
        with:
          token: ${{ secrets.NPM_TOKEN }}
```

3. To create a new release, use commands from the previous section but with `--no-publish` flag, for example: `npm run release minor -- --no-publish`.

## License

MIT
npm package: @rtivital/fe-sc
Description: A template for TypeScript packages
Author: Vitaly Rtishchev
Latest version: 0.9.0

# ts-package-template

A template to publish a TypeScript package to npm.

Key features:

- Ready to use ESM + CJS build system
- Properly configured [exports in package.json](https://publint.dev/@rtivital/ts-package-template) to support all modern bundlers and Node.js
- CI with GitHub Actions
- Testing and linting setup ready: Jest, ESLint, Prettier, Knip
- Publish to npm with an npm script, including support for pre-releases (alpha, beta, rc)
- `npm pack` validation as part of the testing pipeline: makes sure only necessary files are included in the package

Included tools:

- Yarn v4
- Rollup
- esbuild
- jest
- prettier
- ESLint
- Knip
- GitHub workflow for tests

## Usage

- Click "Use this template" button to create a new repository from this template
- Clone the new repository
- Change `package.json` to your own package name, description, etc. **!important**: change `repository.url` and other repository links to your own repository url
- Install dependencies: `yarn` (other package managers are not supported)
- Write your code in `src/` directory
- Run `npm run release` to build and publish your package to npm

## Publishing to npm

Use `release` script to publish the package:

- `npm run release` – release a new patch version to npm
- `npm run release minor` – release a new minor version to npm
- `npm run release major` – release a new major version to npm
- `npm run release minor -- --stage alpha` – release a new minor alpha version to npm (for example, `1.1.0-alpha.0`)

Note that release script will always publish public packages to npm. If you want to publish a private package, change release script in `scripts/release.ts`.

## Publishing with GitHub Actions

1. Create [npm authentication token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) and add it as `NPM_TOKEN` to your repository secrets (Settings -> Secrets and variables -> Actions -> New repository secret).

2. Create `.github/workflows/publish.yml` with the following content. _Note that if your default branch is main, you should change it in the publish action_.

```yaml
on:
  push:
    branches: master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version-file: '.nvmrc'
          cache: 'yarn'
          cache-dependency-path: '**/yarn.lock'
      - run: yarn
      - run: npm test
      - uses: JS-DevTools/npm-publish@v3
        with:
          token: ${{ secrets.NPM_TOKEN }}
```

3. To create a new release, use commands from the previous section but with `--no-publish` flag, for example: `npm run release minor -- --no-publish`.

## License

MIT
npm package: @rtivital/npm-cd-auto-publish
Description: A template for TypeScript packages
Author: Vitaly Rtishchev
Latest version: 0.8.2

# ts-package-template

A template to publish a TypeScript package to npm.

Included tools:

- Yarn v4
- Rollup
- esbuild
- jest
- prettier
- ESLint
- GitHub workflow for tests

## Usage

- Click "Use this template" button to create a new repository from this template
- Clone the new repository
- Change `package.json` to your own package name, description, etc. **!important**: change `repository.url` and other repository links to your own repository url
- Install dependencies: `yarn` (other package managers are not supported)
- Write your code in `src/` directory
- Run `npm run release` to build and publish your package to npm

## Publishing to npm

Use `release` script to publish the package:

- `npm run release` – release a new patch version to npm
- `npm run release minor` – release a new minor version to npm
- `npm run release major` – release a new major version to npm
- `npm run release minor -- --stage alpha` – release a new minor alpha version to npm (for example, `1.1.0-alpha.0`)

Note that release script will always publish public packages to npm. If you want to publish a private package, change release script in `scripts/release.ts`.

## License

MIT
npm package: @rtivital/ts-package-template
Description: A template for TypeScript packages
Author: Vitaly Rtishchev
Latest version: 0.8.1

# ts-package-template

A template to publish a TypeScript package to npm.

Key features:

- Ready to use ESM + CJS build system
- Properly configured [exports in package.json](https://publint.dev/@rtivital/ts-package-template) to support all modern bundlers and Node.js
- CI with GitHub Actions
- Testing and linting setup ready: Jest, ESLint, Prettier, Knip
- Publish to npm with an npm script, including support for pre-releases (alpha, beta, rc)
- `npm pack` validation as part of the testing pipeline: makes sure only necessary files are included in the package

Included tools:

- Yarn v4
- Rollup
- esbuild
- jest
- prettier
- ESLint
- Knip
- GitHub workflow for tests

## Usage

- Click "Use this template" button to create a new repository from this template
- Clone the new repository
- Change `package.json` to your own package name, description, etc. **!important**: change `repository.url` and other repository links to your own repository url
- Install dependencies: `yarn` (other package managers are not supported)
- Write your code in `src/` directory
- Run `npm run release` to build and publish your package to npm

## Publishing to npm

Use `release` script to publish the package:

- `npm run release` – release a new patch version to npm
- `npm run release minor` – release a new minor version to npm
- `npm run release major` – release a new major version to npm
- `npm run release minor -- --stage alpha` – release a new minor alpha version to npm (for example, `1.1.0-alpha.0`)

Note that release script will always publish public packages to npm. If you want to publish a private package, change release script in `scripts/release.ts`.

## Publishing with GitHub Actions

1. Create [npm authentication token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) and add it as `NPM_TOKEN` to your repository secrets (Settings -> Secrets and variables -> Actions -> New repository secret).

2. Create `.github/workflows/publish.yml` with the following content. _Note that if your default branch is main, you should change it in the publish action_.

```yaml
on:
  push:
    branches: master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version-file: '.nvmrc'
          cache: 'yarn'
          cache-dependency-path: '**/yarn.lock'
      - run: yarn
      - run: npm test
      - uses: JS-DevTools/npm-publish@v3
        with:
          token: ${{ secrets.NPM_TOKEN }}
```

3. To create a new release, use commands from the previous section but with `--no-publish` flag, for example: `npm run release minor -- --no-publish`.

## License

MIT
npm package: @rtk-incubator/rtk-query
Description: RTK Query is an advanced data fetching and caching tool, designed to simplify common cases for loading data in a web application. It is built on top of [Redux Toolkit](https://redux-toolkit.js.org/) and uses Redux internally for its architecture.
Author: Lenz Weber
Latest version: 0.3.0

<p align="center">
  <img src="https://raw.githubusercontent.com/rtk-incubator/rtk-query/main/logo.png" width="400" />
</p>

<p align="center">
  <img src="https://img.shields.io/badge/ALPHA-pre%20release-orange">
   <a href="https://discord.gg/0ZcbPKXt5bZ6au5t" target="_blank">
    <img src="https://img.shields.io/badge/chat-online-green" alt="Discord server" />
  </a>
</p>

## Introduction

RTK Query is an advanced data fetching and caching tool, designed to simplify common cases for loading data in a web application. It is built on top of [Redux Toolkit](https://redux-toolkit.js.org/) and uses Redux internally for its architecture.

It features:

- Declarative API definitions
- Runs on every framework
- Supports any protocol
- Caching
- Automatic re-fetching
- Polling
- Parallel queries
- Dependent queries
- Paginated queries
- Skip queries
- Lagged queries
- Automatic garbage collection
- Prefetching
- Optimistic Updates
- Auto-generated React Hooks
- Built with TypeScript

... and plenty of other goodies.

## Getting started

```sh title="Example installation"
yarn add @rtk-incubator/rtk-query @reduxjs/toolkit
```

Or with npm:

```sh
npm install @rtk-incubator/rtk-query @reduxjs/toolkit
```

Then follow along with the [Getting Started instructions](https://rtk-query-docs.netlify.app/introduction/getting-started).

## Documentation

[View the RTK Query docs](https://rtk-query-docs.netlify.app/)

## Examples

[View the examples](https://rtk-query-docs.netlify.app/examples/examples-overview)
npm package: @rtk-incubator/rtk-query-codegen-openapi
Description: <p align="center">   <img src="https://raw.githubusercontent.com/rtk-incubator/rtk-query/main/logo.png" width="400" /> </p> <h2 align="center"> Code Generator </h2>
Author: Lenz Weber
Latest version: 0.5.1

<p align="center">
  <img src="https://raw.githubusercontent.com/rtk-incubator/rtk-query/main/logo.png" width="400" />
</p>
<h2 align="center">
Code Generator
</h2>

<p align="center">
   <a href="https://discord.gg/0ZcbPKXt5bZ6au5t" target="_blank">
    <img src="https://img.shields.io/badge/chat-online-green" alt="Discord server" />
  </a>
</p>

### Introduction

This is a utility library meant to be used with [RTK Query](https://redux-toolkit.js.org/rtk-query/overview) that will generate a typed API client from an OpenAPI schema.

### Usage

By default, running the CLI will only log the output to the terminal. You can either pipe this output to a new file, or you can specify an output file via CLI args.

#### Piping to a file (including react hooks generation)

```bash
npx @rtk-incubator/rtk-query-codegen-openapi --hooks https://petstore3.swagger.io/api/v3/openapi.json > petstore-api.generated.ts
```

#### Specifying an output file (including react hooks generation)

```bash
npx @rtk-incubator/rtk-query-codegen-openapi --file petstore-api.generated.ts --hooks https://petstore3.swagger.io/api/v3/openapi.json
```

#### Using a custom baseQuery

```bash
npx @rtk-incubator/rtk-query-codegen-openapi --file generated.api.ts --baseQuery ./customBaseQuery.ts:namedBaseQueryFn --hooks https://petstore3.swagger.io/api/v3/openapi.json
```

### CLI Options

- `--exportName <name>` - change the name of the exported api (default: `api`)
- `--reducerPath <path>` - change the name of the `reducerPath` (default: `api`)
- `--baseQuery <file>` - specify a file with a custom `baseQuery` function. Optionally takes a named function in that file. (default: `fetchBaseQuery` - ex: `./customBaseQuery.ts:myCustomBaseQueryFn`)
- `--argSuffix <name>` - change the suffix of the arg type (default: `ApiArg` - ex: `AddPetApiArg`)
- `--responseSuffix <name>` - change the suffix of the response type (default: `ApiResponse` - ex: `AddPetApiResponse`)
- `--baseUrl <url>` - set the `baseUrl` when using `fetchBaseQuery` (will be ignored if you pass `--baseQuery`)
- `--createApiImportPath <path>` - set the entry point to import `createApi` from. Currently only `react` is available. Defaults to `react` if `--hooks` is passed.
- `--hooks` - include React Hooks in the output (ex: `export const { useGetModelQuery, useUpdateModelMutation } = api`)
- `--file <filename>` - specify a filename to output to (ex: `./generated.api.ts`)

### Documentation

[View the RTK Query Code Generation docs](https://redux-toolkit.js.org/rtk-query/usage/code-generation)
npm package: @rtk-query/codegen-openapi
Description: <p align="center">   <img src="https://raw.githubusercontent.com/rtk-incubator/rtk-query/main/logo.png" width="400" /> </p> <h2 align="center"> Code Generator </h2>
Author: Lenz Weber
Latest version: 2.2.0

<p align="center">
  <img src="https://raw.githubusercontent.com/rtk-incubator/rtk-query/main/logo.png" width="400" />
</p>
<h2 align="center">
Code Generator
</h2>

<p align="center">
   <a href="https://discord.gg/0ZcbPKXt5bZ6au5t" target="_blank">
    <img src="https://img.shields.io/badge/chat-online-green" alt="Discord server" />
  </a>
</p>

### Introduction

This is a utility library meant to be used with [RTK Query](https://redux-toolkit.js.org/rtk-query/overview) that will generate a typed API client from an OpenAPI schema.

### Documentation

[View the RTK Query Code Generation docs](https://redux-toolkit.js.org/rtk-query/usage/code-generation)
npm package: @rtk/effective-cli
Description: - [cz](https://github.com/commitizen/cz-cli) - [husky](https://github.com/typicode/husky) - [lint-staged](https://github.com/okonet/lint-staged) - [jest](https://github.com/facebook/jest) - [prettier](https://github.com/prettier/prettier) - [ts-node]
Author: Rouven T. Kruse
Latest version: 0.0.2

# node-effective-cli

## Proxy commands
- [cz](https://github.com/commitizen/cz-cli)
- [husky](https://github.com/typicode/husky)
- [lint-staged](https://github.com/okonet/lint-staged)
- [jest](https://github.com/facebook/jest)
- [prettier](https://github.com/prettier/prettier)
- [ts-node](https://github.com/TypeStrong/ts-node)