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

@sakuraapi/cli

v0.6.3

Published

Command Line Interface for Scaffolding and Managing SakuraAPI Projects

Downloads

9

Readme

Installing

SakuraAPI CLI helps you scaffold new projects.

npm install -g @sakuraapi/cli

sapi --help

Scaffolding a SakuraAPI project

sapi init [dir] where dir is the path to the directory in which you want to initialize the project.

You can also run sapi init within a directory and it will initialize the project there.

You can also run sapi init over an existing project and it will give you the option to diff changes file by file.

sapi init supports setting up the server without authentication, as a JWT issuer and as a JWT audience server.

Generating Models, Routables and Services

@Model, @Routable and @Injectable files can be scaffolded individually to save you the hassle of setting them up.

The example below assume you are in the root of your project's directory.

Currently, generated output still needs to be manually injected when you instantiate SakuraApi. Don't forget or it won't work.

Models

sapi g model src/models/SomeModel

This will create:

  • src/models/some-model.ts
  • src/models/some-model.spec.ts

Routables

sapi g routable src/api/SomeApi

This will create:

  • src/api/some-api.ts
  • src/api/some-api.spec.ts

Services (Injectables)

sapi g service src/services/SomeService

This will create:

  • src/services/some-service.ts
  • src/services/some-service.spec.ts

Updating outdated dependencies

Managing the never ending process of updating your package.json dependencies can be tedious. sapi outdated will take you through your list of outdated dependencies, giving you the option for each dependency to either skip it, update it to the wanted version, or updated it to the latest version. After each update, sapi runs your unit-tests to make sure that particular update did not break your build. It also properly saves the new version in either dependencies or devDependencies in your package.json file. It's still a tedious process... but hopefully a little less so.

To get help with other options for outdated, use sapi outdated --help.

Some Caution

sapi cli is pretty early in its development. Make sure you have a backup of your files before you use it to update an existing project.

Bugs and requests:

Please report bugs and reports here: https://github.com/sakuraapi/cli/issues

You can get debug output. For example: DEBUG=sapi:* sapi --help. Replace --help with whatever sapi command you want. This might help you report more accurate bugs... it might not.

Contribution

CLA assistant

  • Sign the Contributor License Agreement (CLA)
  • Fork the project; make your contribution (don't forget to write your unit-tests); do a pull request back to develop (pull updates frequently to not fall too far behind)
  • Before heading off to work on something, considering collaborating first by either (1) opening an issue or (2) starting a conversation on gitter or in the Google forum that leads to back to (1)
  • All work should be done against an issue (https://github.com/sakuraapi/cli/issues)
  • All contributions require unit-tests
  • Use the linter (npm run lint) to verify you comply with the style guide