open-index/open-npm huggingface dataset:
npm package: @meta-adapter/asset-agent
Description: > TODO: description
Author: xierunzhi
Latest version: 1.0.20

# `@meta-adapter/asset-agent`

> 多引擎模版脚本，需要配合 @meta-adapter/asset-agent-cli 使用

## 使用方式

> Laya 引擎使用示例

```ts
// Main.ts 中使用
import AssetAgent from '@meta-adapter/asset-agent'; 
import LayaAirAdapter from '@meta-adapter/asset-agent/layaair';

// 下载 templateCfg/config.json 初始化模版信息
AssetAgent.init().then(() => {
  // 开启 version.json 的话在其回调调用，没有则直接调用
  LayaAirAdapter.updateResourceVersion(AssetAgent);
  // 游戏资源加载逻辑
  // ...
});
```

> 逻辑组件中使用

```ts
import AssetAgent from '@meta-adapter/asset-agent';

// 脚本引用资源
Laya.loader.create(AssetAgent.Assets.Loading.Audios.PIA, ...);

// 脚本引用配置
if (AssetAgent.Config.DIFFICULTY === 2) {
    console.log('over');
}
```
npm package: @meta-adapter/asset-agent-cli
Description: > TODO: description
Author: xierunzhi
Latest version: 1.0.20

# `asset-agent-cli`

## 资源分组规则

1. 多个同类资源可以放在一个文件夹里作为资源组，但是必须加后缀指定组的类型 "_list" 或者  "_map"
2. 后续计划支持资源类型 altas,plist,spine,unity,font,bm-font

``` text
├── assets                         // 资源根目录（命名不限）
│   ├── loading-scene              // 资源分类，可以是场景，预加载或其他
│   │   ├── texture                // 纹理图片
│   │   │   ├── blast_list         // _list 资源列表，如序列帧，随机列表
│   │   │   │   ├── blast001.png 
│   │   │   │   └── blast002.png 
│   │   │   ├── btn_map            // _map 某一类资源集合，如按钮集合，武器 M468 零件资源集合
│   │   │   │   ├── copy.png 
│   │   │   │   └── play.jpg 
│   │   │   └── logo.png
│   │   ├── audio                  // 音频
│   │   │   └── hit.mp3
│   │   ├── video                  // 视频
│   │   │   └── intro.mp4
│   │   ├── altas                  // (待支持) 图集
│   │   ├── plist                  // (待支持) 配置文件
│   │   ├── spine                  // (待支持) 骨骼资源(spine or dragonbone)
│   │   ├── laya-unity             // (待支持) laya-unity 插件导出的资源
│   │   ├── bm-font                // (待支持) 位图字体
│   │   └── ....
│   ├── game                       // game
│   │   └── ....
```

### 安装

```shell
# 全局安装（推荐）
npm install @meta-adapter/asset-agent-cli -g
```

### 使用方式，可采用 cli 或者 脚本

#### cli 方式

```shell
# 查看配置选项
asset-agent -h

# 不依赖编辑器的引擎使用
asset-agent ./src/assets -t

# 兼容特定引擎（目前支持 layaair）
asset-agent ./bin/assets -t ./src/typings -e xxx
```

#### script 方式

1. 在项目根目录下新建 asset-agent-cli.js、复制如下内容

```js
const register = require('@meta-adapter/asset-agent-cli');
const path = require('path');
const assetsPath = path.resolve(__dirname, '../laya/assets');
const distPath = path.resolve(__dirname, '../bin');
register.once(assetsPath, distPath, {
  enableType: true,
  engine: 'layaair'
});
```

2. 修改 packages.json 文件,新增如下

```json
{
  "scripts": {
    "asset-cli": "node asset-agent-cli.js"
  }
}
  ```

## LayaAir 引擎实践

```shell
asset-agent ./bin/assets -t ./src/typings -e layaair
```

``` text
├── bin
│   ├── assets（文件夹命名可更改，脚本对应即可）
│   │   ├── loading-scene
│   │   │   ├── texture 
│   │   │   │   └── play.jpg 
│   │   │   └── audio 
│   │   │       └── play.mp3 
│   │   └── main-scene
│   └── ....
├── laya（编辑器资源）
│   ├── assets
│   │   ├── assets (双击设置不打包)（文件夹命名可更改，脚本对应即可。目录和 bin 目录下的保持一致，编辑器编译会做合并）
│   │   │   └── loading-scene
│   │   │       └── texture 
│   │   │            └── logo.jpg 
│   │   └── comp
│   └── pages
├── src
│   ├── typings
│   └── ....
└── ...
```
npm package: @meta-adapter/engine-adapter
Description: > Rubeex 脚本, 适用于游戏引擎运行时的组件，用于 `config.json` 中素材信息和游戏引擎内对应素材节点绑定。也提供实时预览功能的基础组件。
Author: yanyuling@bytedance.com
Latest version: 1.0.20

# @meta-adapter/engine-adapter

> Rubeex 脚本, 适用于游戏引擎运行时的组件，用于 `config.json` 中素材信息和游戏引擎内对应素材节点绑定。也提供实时预览功能的基础组件。

## Cocos 组件

### [ResourceAdapter](./src/cocos/index.ts)

> 用于 Cocos 运行时加载 `config.json` 内资源、并且绑定到 Cocos 节点的组件。同时暴露出支持 Rubeex 平台 实时预览的 api

### [GamePhaseCtrl](./src/cocos/GamePhaseCtrl.ts)

> 用于 Rubeex 平台内实时预览定位到场景用的组件

#### 场景定义

#### 定义

#### Usage
npm package: @meta-adapter/engine-adapter-cli
Description: Cli for 
Latest version: 1.0.20

## @meta-adapter/engine-adapter-cli

> 用于快速给游戏引擎添加所需 `一键适配插件` 的 cli 工具。 （目前暂时只支持 `CocosCreator`）

### 安装

```sh
  $ npm i @meta-adapter/engine-adapter-cli -g
```

### 用法

```sh
  $ meta-adapter [options] [command]
```

```sh
  $ meta-adapter i [options] # 安装Cocos 插件
```

```sh
  $ meta-adapter info # 列出当前cli信息、当前包内 Cocos 插件信息、当前已在 CocosCreator 中生效的插件信息
```

<hr/>

### Options

- #### `-v, --version`

- output the cli version

- #### `-f, --force`

- force (un)install extension

- #### `-p, --project-only`

- only (un)install extension for current project

- #### `-h, --help`

- display help for command

### Commands:

- #### `install` | `i` [-s, --soft]

- install extension for Cocos(by default)

- #### `uninstall` | `un`

- uninstall extension from specified scope(global or project-only)

- #### `info` | `print`

- list cli info, cli dependencies info and installed plugins info.

- #### `help [command]`

- display help for command

<hr/>
npm package: @meta-adapter/extension-cocos
Description: Extension for Cocos Creator for deploying h5 templates to meta-adapter
Author: yanyuling@bytedance.com
Latest version: 1.0.20

# @meta-adapter/engine-extension

> Cocos Creator 扩展插件, 用于处理 Cocos 项目的UI文件(scene,prefab)，该插件包含3部分功能

1. 遍历被打包的scene，prefab，把节点与资源(图片，音频，视频)的映射关系记录在config.json中；
2. 解除构建后Cocos 项目中的资源引用关系，并使用同类型默认资源占位；
3. 根据 config.json 文件资源映射关系，生成optional—controls.json，作为模板的候选配置项在Rubeex模板平台使用；

## 文件结构

```text
.
├── src 
│   ├── assets                      //音频，视频的默认占位资源
│   ├── misc
│   │   └── component-types.ts      //组件类型的定义
│   │   ├── constants.ts            //常量定义
│   │   ├── ext-regex.ts            //文件处理正则定义
│   │   ├── get-pkg-version.ts    
│   │   ├── path.ts                 //文件处理正则定义 
│   │   └── regex-placeholder.ts    // 默认图片资源属性定义，
│   ├── meta-adapter.config               //实时预览相关配置定义，根据需要导入Cosos项目
│   ├── script                    
│   │   ├── add-hot-reload.ts       // 在index.html 中插入实时预览脚本
│   │   ├── add-resource-adapter.ts // 在Cocos项目中 中插入资源适配脚本
│   │   ├── add-meta-adapter-template     // 在Cocos项目中 中插入发布模板
│   │   ├── add-silent-audio-clip.ts // 写入默认音视频文件
│   │   └── post-build.ts
│   ├── step                  
│   │   └── step-uuid-to-mtime.ts   // 建立插件需要的资源数据；
│   ├── utils              
│   │   ├── generate-optional-controls.ts   // optional-controls.json 文件生成逻辑
│   │   ├── generate-uuid-regex.ts          // 正则表达式
│   │   └── ... other files 
│   ├── web-mobile-meta-adapter         //meta-adapter-cocos 发布模板
│   └── schemaTypes.ts            // optional-controls.json 配置项模板
└── others

```
npm package: @meta-cred/graphql-zeus
Description: Generate Client Libary for GraphQL Schema
Latest version: 5.0.4

![](images/zeus-logo.png)

[![npm](https://img.shields.io/npm/v/graphql-zeus.svg?style=flat-square)](https://www.npmjs.com/package/graphql-zeus) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) [![npm downloads](https://img.shields.io/npm/dt/graphql-zeus.svg?style=flat-square)](https://www.npmjs.com/package/graphql-zeus)

Strongly Typed GraphQL from the team at [GraphQL Editor](https://graphqleditor.com/?utm_source=graphql_zeus_github)

GraphQL Zeus is the absolute best way to interact with your GraphQL endpoints in a type-safe way. Zeus uses your schema to generate Typescript types and strongly typed clients to unlock the power, efficiency, productivity and safety of Typescript on your GraphQL requests.

## Features

⚡️ Types mapped from your schema <br/>
⚡️ Works with Apollo Client, React Query, Stucco Subscriptions _(\*more coming soon...)_<br/>
⚡️ Works with Subscriptions <br/>
⚡️ Infer complex response types <br/>
⚡️ Create reusable selection sets (like fragments) for use across multiple queries <br/>
⚡️ Supports GraphQL Unions, Interfaces, Aliases and Variables<br/>
⚡️ Handles **massive** schemas <br/>
⚡️ Supports Browsers, Node.js and React Native in Javascript and Typescript <br/>
⚡️ Schema downloader <br/>
⚡️ JSON schema generation <br/>

## Full documentation

[Full documentation is available here](https://zeus.graphqleditor.com)

## Generate Types With Zeus CLI Example

Simply run Zeus in your terminal to output your types file based on your graphql schema

![](images/zeus-bash-command.png)

## Usage Example

Example using a generated `chain` client. Queries, mutations and subscriptions are now type-safe in arguments, field selections and response types.

![](images/example.png)

## Join the Zeus Community and Spread the Word

⚡️ [Join the Discussion forum on GitHub](https://github.com/graphql-editor/graphql-zeus/discussions) 📣

⚡️ Leave a GitHub star ⭐️ 👆

⚡️ Spread the word on your socials and with your networks! 🗣

## Contribute

For a complete guide to contributing to GraphQL Zeus, see the [Contribution Guide](CONTRIBUTING.md).

1.  Fork this repo
2.  Create your feature branch: git checkout -b feature-name
3.  Commit your changes: git commit -am 'Add some feature'
4.  Push to the branch: git push origin my-new-feature
5.  Submit a pull request

## License

[MIT](https://opensource.org/licenses/MIT) 🕊
npm package: @meta-inf/forge-logger-react
Description: This package contains the React part of the Forge Logger, which is a simple yet powerful logger for Atlassian Forge apps.
Author: META-INF Kft.
Latest version: 0.4.2

# META-INF Forge Logger - React
This package contains the React part of the Forge Logger,
which is a simple yet powerful logger for Atlassian Forge apps.

## Installation
```bash
yarn add @meta-inf/forge-logger-react
```

## Usage
### Using React Context
Create a log location and wrap your component with it.
```tsx
import { LogLocation } from '@meta-inf/forge-logger-react';  

function App() {
  return (
    <LogLocation location="MyComponent">
        <MyComponent />
    </LogLocation>
  );
};
```

Use the `useLogger` hook to get the logger instance.

```tsx
import { useLogger } from '@meta-inf/forge-logger-react';
//...
function MyComponent() {
  const {logInfo} = useLogger(); // Or logDebug, logWarn, logError
  const handleClick = () => {
      logInfo('Button clicked');
  };
  //...
}
```

### Using createLogLocation in a component
Use the useRef hook to create a logger instance only once.
```tsx
import {createLogLocation} from '@meta-inf/forge-logger-react';
import {useRef} from "react";

function MyComponent() {
  const myLogger = useRef(createLogLocation('MyComponent'));
  const handleClick = () => {
      myLogger.current.logInfo('Button clicked');  // Or logDebug, logWarn, logError
  };
  //...
}
```

You can omit useRefs if you are not using the logger in a component.

### Testing & Debug mode
You should mock out the library during testing to avoid calling or importing the Forge bridge.
npm package: @meta-inf/forge-logger-resolver
Description: This package contains the Resolver part of the Forge Logger, which is a simple yet powerful logger for Atlassian Forge apps.
Author: META-INF Kft.
Latest version: 0.4.2

# META-INF Forge Logger - Resolver
This package contains the Resolver part of the Forge Logger,
which is a simple yet powerful logger for Atlassian Forge apps.

## Installation
```bash
yarn add @meta-inf/forge-logger-resolver
```

## Usage

### Define the resolver in order to use the React logger

```ts
import Resolver from '@forge/resolver';
import {defineLogResolver} from '@meta-inf/forge-logger-resolver';

const resolver = new Resolver();

defineLogResolver(resolver); // <--- Add this line

export const handler = resolver.getDefinitions();
```

### Use logger functions inside your backend resolvers

```ts
import {createLogLocation} from "@meta-inf/forge-logger-resolver";

const {log, logError, logWarn, logInfo, logDebug} = createLogLocation('my-log-location');
```

### New, more convenient way to log messages
There is a more convenient way to log messages. You can initialize the Logger class statically, which will add a click 
event listener to the document. When you click on an element, the logger will log the element's location in the DOM, if 
it has a `data-location` (or the provided) data attribute.

In your entry file (index.tsx or main.tsx), initialize the Logger class statically.

```ts
Logger.init();
// or
Logger.init({
    dataFields: ["location", "test-id"] // default is ["location"]
})
```

Example: when a user clicks on a button that has a `data-location` attribute with the value `my-button`, the logger will log `my-button` as location with a 'Clicked' event. 

However, if you have onClick listeners on the button, the events won't propagate to the document, and the logger won't log the location.
In this case, you can use the `withClickTracking` wrapper function, which will log the event accordingly, and then call the original function.

There is also a `withChangeTracking` function, which logs the event when the input value changes.

```tsx
import {withClickTracking, withChangeTracking} from "@meta-inf/forge-logger-react";
<button
    data-location="modal-trigger"
    onClick={withClickTracking(openModal)}>
    Open modal
</button>
```

## Configuration
The logger can be configured by passing a configuration object to the `defineLogResolver` function.

```ts
import {defineLogResolver} from "@meta-inf/forge-logger-resolver";

defineLogResolver(resolver, {
    functionKey: 'my-log-key', // The function key to use in the resolver, defaults to '@forge-logger-send-log'
});
```
npm package: @meta-kit/whatsapp
Description: A flexible and easy-to-use Node.js module for sending messages via the WhatsApp Business API. This module provides builders for different message types, such as text, image, and template messages, and allows easy integration with the WhatsApp Business API
Author: João Pedro Soares
Latest version: 0.1.1

<p align="center">
  <img src="https://github.com/jpsdm/meta-kit/blob/master/.github/image/whatsapp-brand.png?raw=true" alt="Whatsapp Meta Kit" width="250">
</p>

A flexible and easy-to-use Node.js module for sending messages via the WhatsApp Business API. This module provides builders for different message types, such as text, image, and template messages, and allows easy integration with the WhatsApp Business API.

## Features

- [x] Send message
- [x] Build a Text message
- [x] Build a Image message
- [x] Build a Template message
- [x] Build a Audio message
- [x] Build a Interactive message
- [ ] Webhook Gateway
- [ ] Phone number utils
- [ ] Get list of templates
- [ ] Media upload service

## Installation

You can install the module from npm:

```bash
npm install @meta-kit/whatsapp
```

## Setup

First, import the necessary classes and types into your application:

```ts
import { Client, SendMessage, TextMessageBuilder } from '@meta-kit/whatsapp';
```

## Methods

The `sendMessage()` method takes a `MessageAny` object and sends it to the recipient.

### 1. **Message Builders**

To send a message, you can use specific builders based on the type of message. Here are examples for text, image, and template messages.

### Example: Sending a Text Message

```ts
const client = new Client({
  token: 'YOUR_WHATSAPP_TOKEN',
  baseURL: 'https://graph.facebook.com/v22.0/YOUR_PHONE_ID',
});

const sendMessageUseCase = new SendMessage(client);

const message = new TextMessageBuilder()
  .setRecipient('5511999999999')
  .setText('Hello World')
  .build();

sendMessageUseCase
  .execute(message)
  .then(() => console.log('Success send message!'))
  .catch((error) => console.error('Error', error));
```

- **SendMessage**: Create a instance to send a message.
- **TextMessageBuilder**: Builds a `Message` of type `text`.

## Example Project

For a practical demonstration, check out the example folder:

- [`/examples`](https://github.com/jpsdm/meta-kit/blob/master/packages/whatsapp/examples): Contains example implementations for sending messages.

## Authors

- [@jpsdm](https://www.github.com/jpsdm)

## Disclaimer

This package is not affiliated with Meta Platforms in any way. It is an open-source project developed by and for the community. WhatsApp is a registered trademark of Meta Platforms. This package is not endorsed, sponsored, or officially connected with Meta Platforms. All copyrights, trademarks, logos, and service marks are the property of their respective owners.

## License

[MIT](https://github.com/jpsdm/meta-kit/blob/master/packages/whatsapp/LICENSE)
npm package: @meta-network/auth-sdk
Description: This SDK is written in TypeScript, so typing is good. ## API
Author: Frank Wei
Latest version: 0.1.1

# Meta Network Auth SDK

This SDK is written in TypeScript, so typing is good.
## API

Currently, There is only one API exist. `verify()`.

Example: 
```typescript
import { verify } from "@meta-network/auth-sdk"

function handleMetaNetworkAccessToken(token: string) {
  const audienceId = "ACME";

  // `SERVER_PUBLIC_KEY` is optional, only needed if you run a custom server
  const SERVER_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkxk8cbPVsDZpJmsUpXyQPhThf
M7K9juBR6sD7i6WQJzZjVftG+2RMIU2B7b4THz79Iu7ofX4sD9Si6y3hz0XbM7yI
cZ/z90PFzAyDVYR3LWhVoTtMZwOsa42J4/DRvf3D90yPLoMtRW4PVd1FsKVEj2UO
B1WcMmlUmlVTPaPbQQIDAQAB
-----END PUBLIC KEY-----`;
  let decodedJwtPayload;
  try {
      decodedJwtPayload = verify(token, audienceId, SERVER_PUBLIC_KEY);
  } catch (error) {
    throw new Error("Failed to verify the token");
  }
  // ... handle the rest
}
```