@git-filesystem/gitlab

中文文档
0.0.6发布于 2024/03/04ISCTypeScriptCommonJS近 30 天下载 2623

The GitLab implementation used by the git-filesystem package. Use this to read & write specifically to GitLab repositories only.

原始使用文档
文档目录3 节
  1. Installation
  2. Example Usage
  3. License

@git-filesystem/gitlab

This package contains the GitLab implementation used by the git-filesystem npm package.

Use this to read & write specifically to GitLab repositories only; else use the git-filesystem package to write to repositories hosted with multiple cloud providers.

This package exposes methods for:

  • Creating a repository

  • Deleting a repository

  • Searching for repositories

  • Creating a file

  • Overwriting a file

  • Deleting a file

  • Creating tags

  • Reading files from tags

Installation

npm install @git-filesystem/gitlab

Example Usage

import { GitLabClient } from "@git-filesystem/gitlab";

const gitHubClient = new GitLabClient("gitlab-username", "access-token", "user-agent-name");

const gitHubRepository = gitHubClient.getRepository("repository-name");

let fileContent = await gitHubRepository.readFile("file/path.txt");
fileContent += "\n\nNewData";

await gitHubRepository.updateFile("file/path.txt", fileContent);

License

@git-filesystem/gitlab is licensed under the ISC License.

版本与发布记录

@git-filesystem/gitlab 共发布 6 个版本,首次发布于 2022/10/24;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.6latest2024/03/042 年前
0.0.52024/03/032 年前
0.0.42023/12/092 年前
0.0.22022/11/074 年前
0.0.12022/10/244 年前
0.0.02022/10/244 年前

关于 @git-filesystem/gitlab 的常见问题

@git-filesystem/gitlab 是什么?

The GitLab implementation used by the git-filesystem package. Use this to read & write specifically to GitLab repositories only.

如何安装 @git-filesystem/gitlab?

在项目目录运行 npm install @git-filesystem/gitlab,或使用 pnpm add / yarn add / bun add。

@git-filesystem/gitlab 支持 TypeScript 吗?

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

@git-filesystem/gitlab 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@git-filesystem/gitlab 可以商用吗?

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

@git-filesystem/gitlab 的下载量有多少?

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

@git-filesystem/gitlab 还在维护吗?

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