@abapify/adt-flow

中文文档
0.4.34发布于 2026/11/03MITTypeScriptES Module构建来源已验证近 30 天下载 2743

Incremental transport source-tree materialization for ADT

原始使用文档

@abapify/adt-flow

Incremental transport source-tree materialization for ADT. The service checks out either the exact source boundary immediately before a transport scope or the newest exact source in that scope.

Register the command and configure the active format in adt.config.ts:

import { defineConfig } from '@abapify/adt-config';

export default defineConfig({
  commands: ['@abapify/adt-flow/commands/flow'],
  flow: {
    format: { id: 'abapgit', options: { folderLogic: 'prefix' } },
    include: { objectTypes: ['CLAS', 'INTF'] },
    concurrency: { metadata: 4, sources: 4 },
  },
});

Then reconcile the current directory to either side of the transport boundary:

adt flow checkout tr DEVK900001 --base
adt flow checkout tr DEVK900001
adt flow checkout tr DEVK900001,DEVK900002 --base

Automation can request structured inventory/materialization evidence in either mode:

adt flow checkout tr DEVK900001 --report .adt/checkout-coverage.json
adt flow checkout tr DEVK900001 --base --report .adt/checkout-coverage.json

The report (schemaVersion: 1, coverageVersion: 1) records mode/scope, original CTS inventory, and one resolution outcome for every inventory item. Resolutions identify the repository object, including deduplicated leaves; non-source CTS items such as R3TR SUSK carry outcome: "non-source" and do not claim a repository owner. The report also records object descriptor paths, added objects absent from the resulting base workspace, skips and index-only status. Consumers can validate owned-file hashes and selected source components before publishing a snapshot. Requesting a report recomputes the inventory instead of using the exact-head transport-index shortcut. Existing partial reports keep their original format. The default CLI skip policy is unchanged; consumers must enforce their desired completeness policy.

Class components with ADT subtypes CLAS/OC, CLAS/OSU, CLAS/OM resolve to their full R3TR CLAS owner and use ordinary class source/abapGit materialization.

To persist only transport inventory and unresolved-boundary descriptors under .adt, without reading or materializing source files, use the explicit index-only command:

adt flow index tr DEVK900001,DEVK900002

checkout remains strict: if any versioned component has no exact source boundary, it fails without changing the workspace. checkout --partial is a separate explicit opt-in that materializes only exact objects. index never materializes source; it retains the complete transport inventory and records every unresolved component as an omitted descriptor for a later retry.

Automation that must preserve an inexact transport for a later retry can opt into adt flow checkout tr <transport> --index-on-inexact. Only the typed manifest_inexact outcome falls back to source-free indexing; every other checkout error remains fail-closed.

import {
  createAdtFlowService,
  createAdtFlowDependencies,
} from '@abapify/adt-flow';
import { getFormatPlugin } from '@abapify/adt-plugin';

// Use the format plugin already registered by @abapify/adt-plugin-abapgit
const registeredFormatPlugin = getFormatPlugin('abapgit');
if (!registeredFormatPlugin) {
  throw new Error('abapGit format plugin is not registered.');
}

const flow = createAdtFlowService(
  createAdtFlowDependencies(client, registeredFormatPlugin),
);

await flow.checkout({
  root: process.cwd(),
  transports: ['DEVK900001'],
  mode: 'base',
  config: {
    format: { id: 'abapgit', options: { folderLogic: 'prefix' } },
    include: { objectTypes: ['CLAS', 'INTF'] },
  },
});

await flow.index({
  root: process.cwd(),
  transports: ['DEVK900001'],
  config: {
    format: { id: 'abapgit', options: { folderLogic: 'prefix' } },
    include: { objectTypes: ['CLAS', 'INTF'] },
  },
});

The service invokes no Git command. It reconciles format-owned files and deterministic descriptors under .adt, rejects unowned collisions or modified indexed files before mutation, and rolls back a failed multi-file apply. Branches, commits, routing, and merge requests remain the caller's concern.

.adt/tr/<transport>.json is emitted for every request/task discovered during head checkout. Each transport descriptor retains the complete CTS object inventory, including unsupported or currently filtered types. Object descriptors under .adt/objects/ are written for both base and head. Object descriptors use .adt/objects/<TYPE>/<unique-name>.<type>.adt.json. The index stores hashes and immutable version identities, never source bodies or credentials. In an explicit partial checkout, an object that cannot be materialized still receives an omitted descriptor with its identity and component diagnostic, but no owned files or source selection. Removing .adt only removes the optimization; source selection continues to come from the supplied SAP manifest operation.

Exactness applies to versioned source components. Metadata files describe the object metadata available at checkout time; flow does not reconstruct historical metadata or replicate repository history.

版本与发布记录

@abapify/adt-flow 共发布 27 个版本,首次发布于 2026/09/18;过去 12 个月发布了 27 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.34latest2026/11/034 天前
0.4.332026/11/025 天前
0.4.322026/11/025 天前
0.4.312026/11/016 天前
0.4.292026/10/308 天前
0.4.282026/10/308 天前

关于 @abapify/adt-flow 的常见问题

@abapify/adt-flow 是什么?

Incremental transport source-tree materialization for ADT

如何安装 @abapify/adt-flow?

在项目目录运行 npm install @abapify/adt-flow,或使用 pnpm add / yarn add / bun add。

@abapify/adt-flow 支持 TypeScript 吗?

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

@abapify/adt-flow 支持 ESM 还是 CommonJS?

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

@abapify/adt-flow 可以商用吗?

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

@abapify/adt-flow 的下载量有多少?

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

@abapify/adt-flow 还在维护吗?

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