@flowscripter/pluggable-io-framework

中文文档
2.1.13发布于 2026/11/12MITTypeScriptES Module构建来源已验证近 30 天下载 2475

A pluggable source/sink IO framework using https://github.com/flowscripter/dynamic-plugin-framework

原始使用文档
文档目录4 节
  1. Key Features
  2. Usage Examples
  3. Further Details
  4. License

pluggable-io-framework

version build docs license: MIT

A pluggable source/sink IO framework using dynamic-plugin-framework

Key Features

  • Protocol-aware locations, given as a string (file:///data/a.txt, s3://bucket/key, https://host/a, composite schemes such as tams+https:; bare paths default to file) or as a structured { protocol, location } object. Either form selects the installed provider plugin for that protocol. See String and Structured Locations.
  • A ProviderRegistry keyed by protocol and payload kind, with more than one implementation of a protocol installed side by side (e.g. JS and native file providers).
  • Negotiation of the payload kind, memory domain and payload type between source and sink, falling back to the cheapest registered payload converter plugin.
  • copy/move over explicit entry, container and glob pattern targets, with cp -r semantics for containers.
  • Direct provider-to-provider transfers, multipart transfers with negotiated part sizes, zero-copy lease transfers into sink-provided buffers, or plain streaming - chosen automatically.
  • Graceful stop and cancellation, per-part retries, resumable writes and automatic reconnection of live sources with gap reporting.
  • Concurrency-bounded recursive and pattern transfers with progress telemetry.
  • Provider composition: a provider can resolve other installed providers.
  • Stream decorators: seekable and locallyCached.
  • Bun based, written in TypeScript, based on native JavaScript modules.

Usage Examples

import {
  DefaultPluginManager,
  LocalFolderPluginRepository,
} from "@flowscripter/dynamic-plugin-framework";
import { copy, ProviderRegistry } from "@flowscripter/pluggable-io-framework";

const registry = new ProviderRegistry(
  new DefaultPluginManager([new LocalFolderPluginRepository("./plugins")]),
);
await registry.discover();

const { source, dest, options } = await registry.createProvidersForTransfer(
  "file:///data/in",
  "s3://bucket/out",
);

const result = await copy(source.provider, source.target, dest.provider, dest.target, {
  ...options,
  telemetry: { onProgress: (event) => console.log(event) },
});
console.log(result.path);

Further Details

License

MIT © Flowscripter

版本与发布记录

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

版本发布日期距今
2.1.13latest2026/11/123 天前
2.1.122026/11/096 天前
2.1.112026/11/0510 天前
2.1.102026/11/0213 天前
2.1.92026/10/2917 天前
2.1.82026/10/2620 天前

关于 @flowscripter/pluggable-io-framework 的常见问题

@flowscripter/pluggable-io-framework 是什么?

A pluggable source/sink IO framework using https://github.com/flowscripter/dynamic-plugin-framework

如何安装 @flowscripter/pluggable-io-framework?

在项目目录运行 npm install @flowscripter/pluggable-io-framework,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typescript(^7.0.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@flowscripter/pluggable-io-framework 支持 TypeScript 吗?

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

@flowscripter/pluggable-io-framework 支持 ESM 还是 CommonJS?

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

@flowscripter/pluggable-io-framework 可以商用吗?

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

@flowscripter/pluggable-io-framework 的下载量有多少?

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

@flowscripter/pluggable-io-framework 还在维护吗?

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