@effected/github-commands

中文文档
0.10.0发布于 2026/11/10MITTypeScriptES Module零依赖构建来源已验证近 30 天下载 7587

GitHub 动作工作流程命令语法作为纯函数: 生成命令, 并中和文本, 这样运行者不能将它读为一体 .

中文使用文档
文档目录5 节
  1. 为什么 @ effect/ github- commands
  2. 安装
  3. 使用量
  4. 文档
  5. 许可证

@ action/ github- 命令

npm License: MIT Node.js %3E%3D24.11.0 TypeScript 7.0

GitHub 动作工作流程命令语法作为纯函数: 使命令与跑者逃跑, 并中和文本, 使跑者无法读取为一. 弦入而出,弦出而出. 没有服务,没有一层,没有平台,没有 effect,完全不依赖.

预1.0.0。 。 。 . 此软件包是 @effected/* 工具包,仍在 0.x 发展。 它没有依赖关系,甚至没有 effect。 。 。 .

稳定:不稳定. 此软件包的 API 表面尚未考虑 完成并可能改变 0.x 释放 准确的版本。 满 政策: 释放策略。 。 。 .

为什么 @ effect/ github- commands

跑者读到每一行的书写, 和它识别为命令的一行做命令说: ::add-mask:: 剪辑, ::error:: 提出一个注释, ::stop-commands:: 关闭处理。 文本程序本身没有写入,例如错误消息或文件名,因此可以携带命令. 跑者有两个解析器,所以"从 ::"只有一半的规则: 留下的遗产 ##[ 随时随地.

这个包是写过一次的规则. WorkflowCommand 构建您要写入的命令, 并保存协议需要的 . CommandNeutralizer 解开你无意的文字.

安装

npm install @effected/github-commands
pnpm add @effected/github-commands

需要节点.js~~24.11.0. 无依相相相相相相相相相相相相相相相相相相相相相相相相相. 仅限无害环境管理:从ES模块中导入.

使用量

import { CommandNeutralizer, WorkflowCommand } from "@effected/github-commands";

WorkflowCommand.error("build failed", { file: "src/main.ts", startLine: 12 });
// "::error file=src/main.ts,line=12::build failed"

WorkflowCommand.warning("deprecated: 50% of calls\nuse v2", { title: "API: v1" });
// "::warning title=API%3A v1::deprecated: 50%25 of calls%0Ause v2"

CommandNeutralizer.text("prefix ##[add-mask]secret\n::error::x");
// a braille pattern blank (U+2800) inside the ##[ and before the ::, so neither parser reads a command
  • WorkflowCommand数字 : render(name, properties, message) 编辑 debug, (中文(简体) ), notice, (中文(简体) ), warning, (中文(简体) ), error, (中文(简体) ), group, (中文(简体) ), endGroup 财务报告和审定财务报表 addMask 帮手 注释属性使用可读名称( :startLine, (中文(简体) ), startColumn并去作为电线的(line, (中文(简体) ), col) (中文(简体) ). 消息会逃脱 %, CR 和 LF; 属性值也逃出 : 财务报告和审定财务报表 ,; 数据 % 先去 所以逃出两次都逃不掉.
  • CommandNeutralizer数字 : lines(text) 财务报告和审定财务报表 text(text)。一个赤裸的 ## 所以减速方向没有损伤 它像跑者一样在CR,LF和CRLF中分裂出,它具有一能性:中和两次改变什么.

@effected/github-actions 再出口 WorkflowCommand,以及 @effected/cli-kit 中和其输出通过 CommandNeutralizer 当跑者是 GitHub 动作时.

文档

指南和API参考文献在 执行. spencerbeg.gs/github - 命令。 。 。 .

许可证

麻省理工学院

版本与发布记录

@effected/github-commands 共发布 14 个版本,首次发布于 2026/10/02;过去 12 个月发布了 14 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.10.0latest2026/11/102 天前
0.9.02026/11/0310 天前
0.8.02026/11/0112 天前
0.7.02026/10/2915 天前
0.6.22026/10/2420 天前
0.6.12026/10/2420 天前

关于 @effected/github-commands 的常见问题

@effected/github-commands 是什么?

GitHub 动作工作流程命令语法作为纯函数: 生成命令, 并中和文本, 这样运行者不能将它读为一体 .

如何安装 @effected/github-commands?

在项目目录运行 npm install @effected/github-commands,或使用 pnpm add / yarn add / bun add。

@effected/github-commands 支持 TypeScript 吗?

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

@effected/github-commands 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@effected/github-commands 需要什么版本的 Node.js?

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

@effected/github-commands 可以商用吗?

@effected/github-commands 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@effected/github-commands 的下载量有多少?

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

@effected/github-commands 还在维护吗?

最新版本 0.10.0 发布于 2026/11/10(2 天前);至今共发布 14 个版本,其中过去 12 个月发布了 14 个;首次发布于 2026/10/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。