@bryter_io/custom-actions

中文文档
3.2.0发布于 2023/05/26Apache 2.0TypeScriptESM + CJS近 30 天下载 1万

Library for building Custom Actions in the BRYTER platform.

原始使用文档
文档目录5 节
  1. Usage
  2. Installing
  3. 💪 Working locally
  4. 🔬 Testing 🧪
  5. Validating the JSON schema

Custom Actions Metadata

This library provides types and json schema for working with and validating custom action metadata.

Read more about Custom Actions on the developer portal.

Usage

Define the metadata for a Custom Action:

import { CustomActionMetadata } from '@bryter_io/custom-actions'
const metadata: CustomActionMetadata = {
  key: 'echo-action',
  developerEmail: '[email protected]',
  name: 'Echo action',
  description: 'Takes a string and returns it',
  parameters: [{
    type: 'text',
    name: 'Input string',
    description: 'Text to echo back'
  }],
  result: {
    type: 'text',
    description: 'Text echoed back'
  }
}

You can find more code samples on the developer portal.

Installing

npm install --save @bryter_io/custom-actions

💪 Working locally

🔬 Testing 🧪

npm test

npm run lint

Validating the JSON schema

The JSON schema for validating custom action metadata is available in the custom-actions-schema.json file. This file is used by the API to validate the metadata sent to the backend.

Validating a single file locally can be done through the command line:

# validate JSON schema
npm run validate-metadata ./path/to/file.json 

💡This command requires having npx installed globally.

版本与发布记录

@bryter_io/custom-actions 共发布 7 个版本,首次发布于 2023/03/24;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.2.0latest2023/05/263 年前
3.1.02023/05/243 年前
3.0.02023/05/243 年前
2.0.02023/05/233 年前
1.1.02023/05/223 年前
1.0.12023/03/243 年前

关于 @bryter_io/custom-actions 的常见问题

@bryter_io/custom-actions 是什么?

Library for building Custom Actions in the BRYTER platform.

如何安装 @bryter_io/custom-actions?

在项目目录运行 npm install @bryter_io/custom-actions,或使用 pnpm add / yarn add / bun add。

@bryter_io/custom-actions 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bryter_io/custom-actions 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bryter_io/custom-actions 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bryter_io/custom-actions 可以商用吗?

@bryter_io/custom-actions 使用 Apache 2.0 许可。声明的许可为 Apache 2.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@bryter_io/custom-actions 的下载量有多少?

根据 npm 官方下载统计,@bryter_io/custom-actions 在 2026/10/09 – 2026/11/07 这 30 天内被下载 10,354 次,日均约 345 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bryter_io/custom-actions 还在维护吗?

最新版本 3.2.0 发布于 2023/05/26(3 年前);至今共发布 7 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/03/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。