npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bundle-cloud/sdk

v0.1.17

Published

SDK oficial para integração com o serviço de atualizações over-the-air do **BundleCloud**, compatível com apps React Native (0.68+).

Readme

@bundle-cloud/sdk

SDK oficial para integração com o serviço de atualizações over-the-air do BundleCloud, compatível com apps React Native (0.68+).

Permite verificar, baixar e aplicar novos bundles em produção ou staging, sem precisar passar pela loja.


⚙️ Instalação

npm install @bundle-cloud/sdk
# ou
yarn add @bundle-cloud/sdk

🚀 Como usar

1. Importe e configure

import { createBundleCloudClient } from '@bundle-cloud/sdk'

const bundlecloud = createBundleCloudClient({
  apiKey: 'sua-api-key'
  appId: 'seu-app-id',
  teamId: 'seu-tem-id',
  env: 'PRD', // ou 'HML' ou 'STG'
  platform: 'android', // ou 'ios'
  buildNumber: 42, // número da build
  version: '1.0.0', // versão interna do app
})

2. Verifique se há atualizações

const update = await bundlecloud.checkForUpdate()

if (update.ok && update.value.hasNewBundle) {
  // há um novo bundle disponível
}

3. Baixe e aplique o novo bundle

await bundlecloud.downloadBundle()
await bundlecloud.applyBundle()

// após aplicar, você pode reiniciar o app se necessário

📡 API do SDK

checkForUpdate(): Promise<TResult<TCheckForUpdateResponse>>

Verifica no servidor se há um novo bundle.

downloadBundle(): Promise<TResult<TDownloadBundleResponse>>

Faz o download do bundle mais recente para o diretório local.

applyBundle(): Promise<TResult<void>>

Aplica o bundle baixado (sem reiniciar o app automaticamente).

markBundleAsStable(): Promise<TResult<void>>

Marca um bundle instalado como estável.

maybeRollbackBundle(): Promise<TResult<boolean>>

Marca um bundle instalado como estável.

getBundlePath(): Promise<string>

Retorna o caminho do bundle atualmente salvo no dispositivo.

on(event, callback)

Permite escutar eventos do SDK.

Exemplo:

bundlecloud.on('bundle-downloaded', () => {
  console.log('Download do bundle concluído')
})

bundlecloud.on('error', ({ error }) => {
  console.error('Erro:', error)
})

📌 Eventos disponíveis

| Evento | Quando ocorre | |------------------------|----------------------------------------------------------| | initialized | Após o SDK ser configurado | | checked-for-update | Após checar se há novo bundle | | update-available | Durante o download | | bundle-downloaded | Quando o bundle termina de baixar | | bundle-applied | Quando o novo bundle é aplicado | | rollback-applied | Quando um erro é detectado e um rollback aplicado | | error | Quando ocorre qualquer erro |


✅ Requisitos do projeto

Este SDK depende dos seguintes módulos, que devem estar instalados no seu app React Native:

Recomendado o uso do @bundle-cloud/cli para a configuração automática do projeto via terminal e geração do zip conforme esperado pelo servidor.


📁 Estrutura esperada do bundle

O SDK espera que o bundle baixado seja um .zip contendo:

index.android.bundle (ou index.ios.bundle)
assets/
manifest.json

🧪 Exemplo de uso completo

const initUpdateFlow = async () => {
  const update = await bundlecloud.checkForUpdate()

  if (update.ok && update.value.hasNewBundle) {
    await bundlecloud.downloadBundle()
    await bundlecloud.applyBundle()
    // reinicie o app ou navegue para uma nova tela
  }
}

📝 Licença

MIT — criado por Felipe Emanuel