New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@forge/events

Package Overview
Dependencies
Maintainers
0
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/events

Forge Async Event methods

1.0.0-next.2
next
npm
Version published
Maintainers
0
Created
Source

Library for asynchronous data processing.

Usage example:

import fetch, { RequestInit } from 'node-fetch';

import { Queue } from './index';

const API_BASE = 'https://api.atlassian.com';

// For Async service auth
const appContextAri = 'ari:cloud:jira::site/...';
const token = '...';

async function apiClient(path: string, init: RequestInit): Promise<APIResponse> {
  const url = API_BASE + path;

  const extraHeaders = {
    // See add-forge-user-agent.ts
    'X-Forge-Context': appContextAri,

    Authorization: `Bearer ${token}`
  };

  init.headers = Object.assign(init.headers!, extraHeaders);
  return fetch(url, init);
}

async function demo() {
  const queue = new Queue({key: "queue-name"}, apiClient);
  const payloads = {
    page: 1
  }
  await queue.push([payloads])
}

demo();

FAQs

Package last updated on 20 Mar 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