open-index/open-npm huggingface dataset:
npm package: @gta5urban/types-client
Description: Types definitions for RAGE:MP client-side module
Author: @gta5urban
Latest version: 2.2.7

Remember to 🌟 this GitHub if you 💖 it.

> This package contains types definitions for RAGE:MP client-side module.

### 📥 Installation

#### `CLIENT-SIDE`

:fire: Use `github:ragempcommunity/ragemp-types#types-client` to latest build

```sh
# With npm
> npm i --save-dev @ragempcommunity/types-client

# With yarn
> yarn add -D @ragempcommunity/types-client

# With pnpm
> pnpm add -D @ragempcommunity/types-client
```

## 🤓 Usage

> To make these types detectable, you need to add the `types` property below to `tsconfig.json` on each side of your project.

```jsonc
// e.g client-side
{
	"compilerOptions": {
		"types": ["{RELATIVE_PATH_TO_NODE_MODULES}/@ragempcommunity/types-client"]
	}
}
```

### Full type-safe and auto-complete

![](https://i.imgur.com/rP6kPom.gif)

## 👨‍💻 Contributing

To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.

1. Fork / Clone and select the `main` branch.
2. Create a new branch in your fork.
3. Make your changes.
4. Commit your changes and push them.
5. Submit a Pull Request [here](https://github.com/ragempcommunity/ragemp-types/pulls)!

## 🎉 Thanks

-   [CocaColaBear](https://github.com/CocaColaBear/) - Creator of [types-ragemp-s](https://github.com/CocaColaBear/types-ragemp-s) & [types-ragemp-c](https://github.com/CocaColaBear/types-ragemp-c)

## 📋 License

This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
npm package: @gta5urban/types-server
Description: Types definitions for RAGE:MP server-side module
Author: @gta5urban
Latest version: 2.2.7

Remember to 🌟 this GitHub if you 💖 it.

> This package contains types definitions for RAGE:MP server-side module.

### 📥 Installation

#### `SERVER-SIDE`

:fire: Use `github:ragempcommunity/ragemp-types#types-server` to latest build

```bash
# With npm
npm i --save-dev @ragempcommunity/types-server

# With yarn
yarn add -D @ragempcommunity/types-server

# With pnpm
pnpm add -D @ragempcommunity/types-server
```

## 🤓 Usage

> To make these types detectable, you need to add the `types` property below to `tsconfig.json` on each side of your project.

```jsonc
// e.g server-side
{
	"compilerOptions": {
		"types": ["{RELATIVE_PATH_TO_NODE_MODULES}/@ragempcommunity/types-server"]
	}
}
```

### Full type-safe and auto-complete

![](https://i.imgur.com/o2JB3Jx.gif)

---

### To extend a Mp object, there are 2 ways:

1. By extending the prototype of the object:

```ts
mp.Player.prototype.myMethod = function myMethod() {
	// my method logic
};

// Usage
mp.events.add('playerReady', (player) => {
	player.myProperty = 1;

	player.myMethod();
});
```

```ts
// @types/index.d.ts
declare global {
	interface PlayerMp {
		myProperty: number;

		myMethod(): void;
	}
}

export {};
```

2. By extending the object itself:

```ts
mp.events.add('playerReady', (player) => {
	player.myProperty = 1;

	player.myMethod = function myMethod() {
		// my method logic
	};
});
```

```ts
// @types/index.d.ts
declare global {
	interface PlayerMp {
		myProperty: number;

		myMethod(): void;
	}
}

export {};
```

See: [RAGEMP Typescript Boilerplate](https://github.com/ragempcommunity/ragemp-typescript)

## 👨‍💻 Contributing

To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.

1. Fork / Clone and select the `main` branch.
2. Create a new branch in your fork.
3. Make your changes.
4. Commit your changes and push them.
5. Submit a Pull Request [here](https://github.com/ragempcommunity/ragemp-types/pulls)!

## 🎉 Thanks

-   [CocaColaBear](https://github.com/CocaColaBear/) - Creator of [types-ragemp-s](https://github.com/CocaColaBear/types-ragemp-s) & [types-ragemp-c](https://github.com/CocaColaBear/types-ragemp-c)

## 📋 License

This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
npm package: @gtarojs/components
Description: Taro 组件库。
Latest version: 3.1.14

# @gtarojs/components

Taro 组件库。

在小程序端，React/Nerv 指向 `mini/index.js`，Vue 无需使用此包。

在 H5 端，React/Nerv 指向 `h5/react/index.js`，Vue 指向 `h5/vue/index.js`。H5 端使用 [stencil](https://stenciljs.com/) 把组件编译为 Web Components 以提供跨框架调用。
npm package: @gtarojs/mini-runner
Description: Mini app runner for taro
Author: luckyadam
Latest version: 3.1.16

# `@gtarojs/mini-runner`

暴露给 `@gtarojs/cli` 的小程序 Webpack 启动器。

`@gtarojs/mini-runner` 从 `@gtarojs/cli` 接受 [Taro 编译配置](https://taro-docs.jd.com/taro/docs/config.html)，把编译配置分解成 Webpack 配置，并刚启动 Webpack 把项目源码编译为适配小程序目录结构的代码。
npm package: @gtarojs/router
Description: Taro-router
Author: O2Team
Latest version: 3.1.16

# `@gtarojs/router`

H5 端路由系统。

## 核心 API

### createRouter(app, config, type, framework, reactdom)

暴露给 `@gtarojs/taro-loader/h5` 调用，在应用入口文件中调用，创建一个兼容小程序路由规范的应用。

#### 参数

#### `app`

入口文件默认导出的组件

#### `config`

应用全局配置及页面配置。对应 `app.config.js` 及 `page.config.js` 的返回内容。

#### `type`

框架类型，`react` | `vue` | `nerv` 三选一。

#### `framework`

框架的 default import 对象。

### `reactdom`

可选，`react-dom` 的 default import 对象。
npm package: @gtarojs/runtime
Description: taro runtime for mini apps.
Author: yuche
Latest version: 3.1.16

# `@gtarojs/runtime`

Taro 运行时。在小程序端连接框架（DSL）渲染机制到小程序渲染机制，连接小程序路由和生命周期到框架对应的生命周期。在 H5/RN 端连接小程序生命周期**规范**到框架生命周期。

## 核心 API

### createReactApp()

暴露给 `@gtarojs/taro-loader/app` 调用，在小程序入口文件中调用，创建一个小程序 `App` 构造函数接受的小程序应用规范对象。


### createVueApp()

暴露给 `@gtarojs/taro-loader/app` 调用，在小程序入口文件中调用，创建一个小程序 `App` 构造函数接受的小程序应用规范对象。

### createPageConfig()

暴露给 `@gtarojs/taro-loader/page` 调用，在小程序页面文件中调用，创建一个小程序 `Page` 构造函数接受的小程序页面规范对象。

### window

在小程序端模仿浏览器的 `window` 实现的对象，在浏览器环境中返回浏览器本身的 `window`。此对象通过 Webpack 的 [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/) 注入到全局对象以供第三方库调用。

### navigator

在小程序端模仿浏览器的 `navigator` 实现的对象，在浏览器环境中返回浏览器本身的 `navigator`。此对象通过 Webpack 的 [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/) 注入到全局对象以供第三方库调用。

### document 

在小程序端模仿浏览器的 `document` 实现的对象，在浏览器环境中返回浏览器本身的 `document`。此对象通过 Webpack 的 [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/) 注入到全局对象以供第三方库调用。

### Current

暴露给开发者的 Taro 全局变量，目前有三个属性：

* `Current.app`，返回当前小程序应用实例，非小程序端返回小程序规范应用实例，可通过此实例调用小程序规范生命周期。
* `Current.page`，返回当前小程序页面实例，非小程序端返回小程序规范页面实例，可通过此实例调用小程序规范生命周期。
* `Current.router`，返回当前小程序路由信息，非小程序端返回小程序规范路由信息

### options

Taro 配置：

* `html`: [渲染 HTML](https://taro-docs.jd.com/taro/next/docs/html.html)
* `debug`: 开启之后会打印渲染时间
* `prerender`: 暴露给 `@gtarojs/cli` 的内部参数

### Events

[Taro 消息机制](https://nervjs.github.io/taro/docs/apis/about/events.html#docsNav)。
npm package: @gtarojs/taro
Description: Taro framework
Author: O2Team
Latest version: 3.1.16

# @gtarojs/taro

暴露给应用开发者的 Taro 核心 API。包含以下文件：

## index.js

小程序端入口文件

## apis

各小程序平台 API

## html.css

W3C HTML4 的内置样式，用于 [渲染 HTML](https://taro-docs.jd.com/taro/next/docs/html.html)。

## html5.css

Chrome(Blink) HTML5 的内置样式，用于 [渲染 HTML](https://taro-docs.jd.com/taro/next/docs/html.html)。

## h5.js

H5 端入口文件
npm package: @gtarojs/taro-h5
Description: Taro h5 framework
Author: O2Team
Latest version: 3.1.16

# @gtarojs/taro-h5

暴露给 `@gtarojs/taro` 的 H5 端 API。

需要配合 `babel-plugin-transform-taroapi` 才能使用 ES6 default import 的语法，相关配置详情在 `babel-preset-taro` 中。
npm package: @gtarojs/taro-loader
Description: > TODO: description
Author: yuche
Latest version: 3.1.16

# `@gtarojs/taro-loader`

暴露给 `@gtarojs/mini-runner` 和 `@gtarojs/webpack-runner` 使用的 Webpack loader，包含以下 `loader`:

## app

小程序专用。在小程序入口文件调用 `@gtarojs/runtime` 的 `createReactApp`/`createVueApp` 方法创建一个小程序 `App` 构造函数接受的对象。

### options: 
* `framework`: 框架类型，`'react' | 'nerv' | 'vue' | 'vue3'`
* `prerender`: [预渲染配置](https://taro-docs.jd.com/taro/next/docs/prerender.html)

## page

小程序专用。在小程序页面文件调用 `@gtarojs/runtime` 的 `createPageConfig` 方法创建一个小程序 `Page` 构造函数接受的对象。
### options: 
* `framework`: 框架类型，`'react' | 'nerv' | 'vue' | 'vue3'`
* `name`: 页面路径

## page

小程序专用。在小程序页面文件调用 `@gtarojs/runtime` 的 `createComponentConfig` 方法创建一个小程序 `Component` 构造函数接受的对象。

### options: 
* `framework`: 框架类型，`'react' | 'nerv' | 'vue' | 'vue3'`
* `name`: 页面路径

## h5

H5 专用。在小程序入口文件调用 `@gtarojs/router` 的 `createRouter` 方法创建兼容小程序生命周期和路由系统的应用。

### options: 
* `framework`: 框架类型，`'react' | 'nerv' | 'vue' | 'vue3'`
* `config`: 应用配置，对应 app.config.js
* `pages：页面配置，对应` page.config.js
* `filename`: 文件名
npm package: @gtarojs/taroize
Description: 转换原生微信小程序代码为 Taro 代码
Author: yuche
Latest version: 3.1.16

# `@gtarojs/taroize`

暴露给 `@gtarojs/cli/convert` 的原生小程序转 Taro 转换器。

## 核心 API

### parse(options)

解析小程序源文件为 React/Vue 组件、

#### options

```typescript
interface Option {
  json?: string, // 小程序配置文件
  script?: string, // 小程序的 JavaScript 文件
  wxml?: string, // wxml 文件
  path: string, // 当前页面路径
  rootPath: string // 根目录路径
}
```
npm package: @gtarojs/webpack-runner
Description: webpack runner for taro
Author: luckyadam
Latest version: 3.1.16

# `@gtarojs/webpack-runner`

暴露给 `@gtarojs/cli` 的 H5 Webpack 启动器。

`@gtarojs/webpack-runner` 从 `@gtarojs/cli` 接受 [Taro 编译配置](https://taro-docs.jd.com/taro/docs/config.html)，把编译配置分解成 Webpack 配置，并刚启动 Webpack 把项目源码编译为适配 Web 应用目录结构的代码。
npm package: @gtarojs/with-weapp
Description: taroize 之后的运行时
Author: yuche
Latest version: 3.1.16

# `@gtarojs/with-weapp`

暴露给 `@tarojs/taroize` 的高阶函数。

`withWeapp` 接受一个小程序规范的 `Page/App` 构造器参数，转换为对应框架规范的组件实例。
npm package: @gtaw-oauth-providers/adonisjs-ally
Description: GTA World OAuth provider for AdonisJS Ally.
Author: NairolfRP
Latest version: 2.0.7

## GTA WORLD Oauth Provider for AdonisJS Ally
[GTA World](https://gta.world) OAuth integration for [AdonisJS Ally](https://docs.adonisjs.com/guides/authentication/social-authentication).

## Installation
Import and configure provider in your ``config/ally.ts``.

```ts
import { GTAWDriver } from "@gtaw-oauth-providers/adonisjs-ally";

const allyConfig = defineConfig({
  gtaw: GTAWDriver({
    clientId: env.get("GTAW_OAUTH_CLIENT_ID"),
    clientSecret: env.get("GTAW_OAUTH_CLIENT_SECRET"),
    callbackUrl: `${env.get("APP_URL")}/api/auth/gtaw/callback`,
    server: "fr", // if you're targeting GTA World France. If not, omit.
  }),
});
```

## Options

* ``server`` ``"en"`` or ``"fr"`` (default: ``"en"```.
  
  Define the appropriate base URL for the target server. (example, "fr" sets the base URL of the OAuth endpoint to ``https://ucp-fr.gta.world``)

## Disclaimer

> *Note: This script was not created by the GTA World team.*
npm package: @gtaw-oauth-providers/authjs
Description: GTA World OAuth provider for AuthJS.
Author: NairolfRP
Latest version: 1.2.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

> [!WARNING]
> Since Better-Auth is a better solution and now supports stateless sessions, the AuthJS provider is no longer maintained. Please consider migrating to or starting with [Better-Auth](https://better-auth.com/).

## GTA WORLD Oauth Provider for Authjs
[GTA World](https://gta.world) OAuth integration for [AuthJS](https://authjs.dev/).

## Installation
Import and configure provider.

```ts
import NextAuth from "next-auth";
import { GTAWorldProvider } from "@gtaw-oauth-providers/authjs";
    
export const { handlers, signIn, signOut, auth, unstable_update } = NextAuth({
   providers: [
        GTAWorldProvider({
        clientId: process.env.GTAW_OAUTH_CLIENT_ID,
        clientSecret: process.env.GTAW_OAUTH_CLIENT_SECRET,
        server: "fr", // if you're targeting GTA World France. If not, omit.
    }),
   ],
});
```

## Options

* ``server`` ``"en"`` or ``"fr"`` (default: ``"en"```.
  
  Define the appropriate base URL for the target server. (example, "fr" sets the base URL of the OAuth endpoint to ``https://ucp-fr.gta.world``)

## Disclaimer

> *Note: This script was not created by the GTA World team.*
npm package: @gtaw-oauth-providers/better-auth
Description: GTA World OAuth provider for Better-Auth.
Author: NairolfRP
Latest version: 1.2.0

## GTA WORLD Oauth Provider for Better-Auth
[GTA World](https://gta.world) OAuth integration for [Better-Auth](https://www.better-auth.com/).

## Installation
Import and configure provider.

```ts
import { betterAuth } from "better-auth";
import { genericOAuth } from "better-auth/plugins";
import { gtawOAuth } from "@gtaw-oauth-providers/better-auth";
    
export const auth = betterAuth({
  plugins: [
    genericOAuth({
      config: [
        // Import gtawOAuth in your genericOAuth plugin configuration
        gtawOAuth({
          clientId: process.env.GTAW_OAUTH_CLIENT_ID,
          clientSecret: process.env.GTAW_OAUTH_CLIENT_SECRET,
          server: "fr", // if you're targeting GTA World France. If not, omit.
          // Other Generic OAuth options
        }),
      ],
    })
  ]
  // Your Better-Auth configuration
});
```

## Options

* ``server`` ``"en"`` or ``"fr"`` (default: ``"en"```.

    Define the appropriate base URL for the target server. (example, "fr" sets the base URL of the OAuth endpoint to ``https://ucp-fr.gta.world``)


* Other options from the [Generic OAuth plugin](https://www.better-auth.com/docs/plugins/generic-oauth#configuration)

## Disclaimer

> *Note: This script was not created by the GTA World team.*
npm package: @gtb-0310/filter-lib
Description: A library to manage filters and reusable features
Author: gtb-0310
Latest version: 1.0.5

# FilterManager

## Functions

### **_loadFromStorage()**
- **Parameters:** None.  
- **Description:** Loads the filters from `localStorage` if they exist, otherwise uses the default filters.  
- **Returns:** None.  

---

### **save(filters)**
- **Parameters:**  
  - `filters` (*Object*): An object containing the filters to be saved.  
    Example: `{ StartDate: "2025-01-01", EndDate: "2025-12-31" }`.  
- **Description:** Saves the given filters to `localStorage`.  
- **Returns:** None.  

---

### **load()**
- **Parameters:** None.  
- **Description:** Loads the filters from `localStorage` or returns the default filters if no saved filters are found.  
- **Returns:**  
  - (*Object*): The saved filters or the default filters.  
    Example: `{ StartDate: "2025-01-01", EndDate: "2025-12-31" }`.

---

### **reset()**
- **Parameters:** None.  
- **Description:** Resets the filters to the default values defined during initialization.  
- **Returns:**  
  - (*Object*): The reset filters.  
    Example: `{ StartDate: null, EndDate: null, Category: [] }`.

---

### **update(key, value)**
- **Parameters:**  
  - `key` (*String*): The name of the filter to update.  
    Example: `"Category"`.  
  - `value` (*Any*): The new value for the filter.  
    Example: `["Electronics", "Books"]`.  
- **Description:** Updates or adds a specific filter.  
- **Returns:** None.  

---

### **get(key)**
- **Parameters:**  
  - `key` (*String*): The name of the filter to retrieve.  
    Example: `"StartDate"`.  
- **Description:** Retrieves the value of a specific filter.  
- **Returns:**  
  - (*Any*): The value of the requested filter.  
    Example: `"2025-01-01"`.

---

### **getAll()**
- **Parameters:** None.  
- **Description:** Retrieves all currently loaded filters.  
- **Returns:**  
  - (*Object*): All current filters.  
    Example: `{ StartDate: "2025-01-01", EndDate: "2025-12-31", Category: ["Electronics", "Books"] }`.

---

## Example Usage

```javascript
const { FilterManager } = require("frontend-utils");

const filterManager = new FilterManager({
  storageKey: "myAppFilters",
  defaultFilters: { StartDate: null, EndDate: null, Category: [] },
});

// Save filters
filterManager.save({ StartDate: "2025-01-01", EndDate: "2025-12-31" });

// Load filters
console.log(filterManager.load());

// Reset filters
console.log(filterManager.reset());

// Update a specific filter
filterManager.update("Category", ["Books", "Movies"]);
console.log(filterManager.get("Category"));

// Get all filters
console.log(filterManager.getAll());