New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

forgejo-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forgejo-js

[![NPM Version](https://img.shields.io/npm/v/forgejo-js)](https://www.npmjs.com/package/forgejo-js) [![NPM Types](https://img.shields.io/npm/types/forgejo-js)](https://www.npmjs.com/package/forgejo-js/) [![NPM license](https://img.shields.io/npm/l/forgejo

latest
npmnpm
Version
11.0.0
Version published
Maintainers
1
Created
Source

Forgejo-js api client with Typescript support

NPM Version NPM Types NPM license CI status badge

Forgejo-js is an api client automatically created from the official OpenAPI definition of Forgejo. The client uses the Fetch Api (native browser support) to make requests. For node you can use cross-fetch to polyfill the Fetch Api.

For Gitea you can use gitea-js.

Version mapping

The major and minor version of this library is mapped to the version of the Forgejo api. The patch version of this library is incremented for every release and uses the latest patch version of Forgejo.

Forgejo-jsForgejo
11.0.x11.0
9.0.x9.0

Examples

Browser

import { forgejoApi } from 'forgejo-js';

const api = forgejoApi('https://codeberg.org/', {
  token: 'access-token', // generate one at https://forgejo.example.com/user/settings/applications
});

const repo = api.repos.repoGet('anbraten', 'forgejo-js');
console.log(repo);

Node.js

const { forgejoApi } = require('forgejo-js');
const fetch = require('cross-fetch'); // You have to use a fetch compatible polyfill like cross-fetch for older Node.JS versions

const api = forgejoApi('https://codeberg.org/', {
  token: 'access-token', // generate one at https://forgejo.example.com/user/settings/applications
  customFetch: fetch,
});

const repo = api.repos.repoGet('anbraten', 'forgejo-js');
console.log(repo);

FAQs

Package last updated on 13 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts