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

@backstage/plugin-bitbucket-cloud-common

Package Overview
Dependencies
Maintainers
4
Versions
688
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/plugin-bitbucket-cloud-common

Common functionalities for bitbucket-cloud plugins

  • 0.0.0-nightly-20220709024234
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39K
decreased by-19.03%
Maintainers
4
Weekly downloads
 
Created
Source

@backstage/plugin-bitbucket-cloud-common

Welcome to the common package for bitbucket-cloud plugins!

This common package provides a reusable API client for the Bitbucket Cloud API which can be reused in catalog-backend-module plugins, scaffolder modules, etc.

Using a shared client allows to control all traffic going from Backstage to the Bitbucket Cloud API compared to separate clients or inline API calls.

We may want to leverage this later to add rate limiting, etc.

How to maintain the generated code

Update the Models

This command will

  1. refresh the schema/OpenAPI Specification
  2. re-generate the models
  3. reduce the models to the minimal needed

Refresh the schema

This command will download the latest version of the Bitbucket Cloud OpenAPI Specification and apply some mutations to fix bugs or improve the schema for a better code generation output.

yarn refresh-schema

Generate Models

The models used are created based on the local OpenAPI Specification file using a code generator. Some post-cleanup is applied to improve the generated output.

The client itself using the models is not generated.

yarn generate-models

Reduce Models

In order to keep the API surface minimal, this command helps to only keep the minimal part of the generated models by considering all Models module members directly or transitively used by the client implementation.

yarn reduce-models

Adding a New Client Method

If you want to add a new method to the client implementation which may use a new endpoint or "new" models you can

  1. optionally refresh the schema to get the latest version
  2. and generate the models.

At this point, you have all models usable for adding a new method using any of them.

If you are ready with your addition to the client, you can reduce the models to the minimal needed.

FAQs

Package last updated on 09 Jul 2022

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