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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gobot-pocketbase

v0.22.20-14

Published

This package allows you to install PocketBase binaries via npm. It automatically detects your platform and installs the correct PocketBase binary, making it easier to manage and lock version dependencies. This package is part of the [Gobot](https://github

Downloads

74

Readme

PocketBase for npm

This package allows you to install PocketBase binaries via npm. It automatically detects your platform and installs the correct PocketBase binary, making it easier to manage and lock version dependencies. This package is part of the Gobot registry.

Usage

Run the Latest Version of PocketBase

You can run the latest version of PocketBase directly using npx (for npm) or bunx (for Bun):

npx gobot-pocketbase --version
bunx gobot-pocketbase --version

Globally Install the Latest Version

To install the latest version globally on your system:

npm install -g gobot-pocketbase
pocketbase --version

Install as a Dependency

To install the latest version as a dependency in your project:

bun add [email protected] --trust

Then, and a way to run it as a package.json script:

// package.json
"scripts": {
    "pocketbase": "pocketbase"
}

Now try running it:

bun run pocketbase --version

Note: The --trust flag is required for Bun but not for other package managers. It allows the postinstall script to execute, installing the underlying binary.

Lock to a Specific Version

If you want to lock to a specific version of the PocketBase binary:

bun add [email protected] --trust

Lock to a Minor Version

To lock to a specific minor version, allowing updates to patch versions but not to the major or minor version:

// package.json
"dependencies": {
    "pocketbase": "^0.22.20"
}

Update to the Latest Version Globally

To update to the latest version:

npm i -g gobot-pocketbase@latest
pocketbase --version

Update to the Latest Version in Your Project

To update to the latest version of the PocketBase binary and the proxy package:

bun update gobot-pocketbase --latest --trust
bun run pocketbase --version

API

You can also programmatically interact with the PocketBase binary in your Node.js application using the following API:

import { binPath } from 'gobot-pocketbase'
import { spawn } from 'child_process'

spawn(binPath, [], { stdio: 'inherit' })

This example shows how to use the binPath from the package to spawn a child process that runs the PocketBase binary.