@gitkraken/provider-apis

中文文档
0.67.0发布于 2026/11/05SEE LICENSE IN LICENSETypeScriptESM + CJS近 30 天下载 1.5万

An SDK around different third-party APIs that accepts and returns data in a common format.

原始使用文档

@gitkraken/provider-apis

Azure DevOps issue listings, workflow metadata and pull-request detail reads support Azure DevOps Services, Azure DevOps Server 2020 and TFS 2018. Self-hosted reads discover each resource's supported REST version and project route through authenticated OPTIONS requests. TFS 2018 work-item hydration uses collection-level GET requests when the server does not advertise the batch endpoint; returned projects are checked before normalization. Authentication failures and missing resources propagate without version retries.

AzureDevOps.getRestApiResource({ namespace, resource, version? }, options) exposes the same negotiation to consumers with direct REST reads. It returns { apiVersion, projectScoped }, or undefined when discovery succeeds but the resource is absent. Discovery is shared per client, collection, resource area and credential; updateConfig clears it. Azure DevOps Services keeps the existing REST versions without discovery. Each read captures its URL, authentication, transport and discovery cache before awaiting any responses, so an in-flight read finishes against the installation it started with when configuration changes. This compatibility applies to these reads, not every SDK mutation or endpoint.

Legacy workflow states can omit WorkItemState.category. The SDK preserves that absence, and state-filtered listings retain the existing date fallback with partial metadata when a complete category snapshot is unavailable. Consumers can supply authoritative categories with workItemTypeStates. Legacy identity strings are preserved as opaque account identifiers and labels; they do not establish equality with a current-user GUID.

版本与发布记录

@gitkraken/provider-apis 共发布 147 个版本,首次发布于 2023/08/25;过去 12 个月发布了 49 个版本。

版本发布日期距今
0.67.0latest2026/11/0511 天前
0.66.12026/11/0313 天前
0.66.02026/11/0213 天前
0.65.72026/10/2819 天前
0.65.62026/10/2819 天前
0.65.52026/10/2324 天前

关于 @gitkraken/provider-apis 的常见问题

@gitkraken/provider-apis 是什么?

An SDK around different third-party APIs that accepts and returns data in a common format.

如何安装 @gitkraken/provider-apis?

在项目目录运行 npm install @gitkraken/provider-apis,或使用 pnpm add / yarn add / bun add。

@gitkraken/provider-apis 支持 TypeScript 吗?

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

@gitkraken/provider-apis 支持 ESM 还是 CommonJS?

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

@gitkraken/provider-apis 需要什么版本的 Node.js?

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

@gitkraken/provider-apis 可以商用吗?

@gitkraken/provider-apis 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@gitkraken/provider-apis 的下载量有多少?

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

@gitkraken/provider-apis 还在维护吗?

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