Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@forge/events

Package Overview
Dependencies
Maintainers
0
Versions
289
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/events

Forge Async Event methods

  • 0.9.4
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-4.44%
Maintainers
0
Weekly downloads
 
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 29 Oct 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc