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

@forge/bitbucket

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/bitbucket

Helpers and utils for interacting with Bitbucket

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Forge Bitbucket Utilities

A package of helpers for interacting with Bitbucket.

unwrapUuid/wrapUuid

Bitbucket resource identifiers, such as those for workspaces and repositories, are formatted as UUIDs wrapped in braces.

There may be scenarios where Forge app developers need to use these resources with certain Forge APIs, but these APIs do not allow {} characters. An example of this is the Storage API. In these cases, you can use the unwrapUuid and wrapUuid functions to convert a Bitbucket resource ID between a wrapped and unwrapped UUID.

Usage:

import Resolver from "@forge/resolver";
import { storage } from "@forge/api";
import { unwrapUuid, wrapUuid } from "@forge/bitbucket";

const resolver = new Resolver();

resolver.define("storeValue", async (request) => {
  const repoId = request.context.extension.repository.uuid;
  await storage.set(unwrapUuid(repoId), "Hello, World!");
});

resolver.define("getValue", async (request) => {
  const repoId = request.context.extension.repository.uuid;
  return await storage.get(unwrapUuid(repoId));
});

export const resolverHandler = resolver.getDefinitions();

FAQs

Package last updated on 22 Jan 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