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

@taubyte/dream

v1.1.2

Published

Node wrapper for taubyte/dream

Downloads

193

Readme

Local Coding Equals Global Production

Release License

Dream is a CLI tool that forms part of Taubyte's suite of development tools, designed to create local cloud environments.

Installation

npm

Run:

$ npm i @taubyte/dream

Script

Run:

$ curl https://get.tau.link/dream | sh

Source

Source is located in https://github.com/taubyte/tau under tools/dream.

Usage

Dream can simulate multiple Taubyte networks, each referred to as a 'universe'. You can start a new universe (default name is "blackhole") with the following command:

$ dream new multiverse 

Once the message [SUCCESS] Universe blackhole started! appears, your local Taubyte instance is ready. You are now running elder, monkey, tns, hoarder, patrick, auth, seer, and substrate nodes locally on your machine.

You can interact with Dream using the Web Console. Dream can be selected from the network selection dropdown if it's active locally. From here, you can create new projects, import existing ones, trigger builds, and run resources like websites and dFuncs.

Connecting Console to Dream

Similarly to when selecting a network on web console (console.taubyte.com), dream can be selected from the network selection dropdown If dream is active, then a selection option for dream will appear in the network selection

Import a project

If your intention is to create a new project, follow the steps that you normally would if you were connected to a production cloud, by clicking Create Project. Note that this will create a new GitHub repo, so it is recommended that you create this as a private repo.

However, if you want to work on an existing project click on Import Project. This will show a menu with two dropdowns, one for your config repository, the other for your inline code repository.

One convenient feature is that once selecting a config repository, if a code repository is found matching the config, it will be selected automatically.

Branches

If importing a project, it is recommended that you make changes to your project on a branch, rather than master/main to not affect production deployments.

If using Web Console Once selecting a project, you may checkout or create a new branch from the top bar.

By default, ci/cd events are triggered by events on the master/main branch. You will need to override this using a fixture setBranch:

$ dream inject set-branch {name-of-branch}

Websites and Libraries

If importing a project that has a library, or website you will need to register the resource on auth, before being able to trigger a build for these resources. This can be achieved on web console by going to the resource and using the fix repo tool.

Running HTTP Resources

HTTP resources run locally on Dream. You need to add the domains for these resources to your /etc/hosts file under 127.0.0.1. To access these resources, you also need the port that the substrate node is running on. Once you have the domain and the port, you can access the resource at {domain}:{port}/{path}.

Viewing Port Information

You can view the ports that your local Tau protocols are running on using the status command.

To view a specific protocol's port (e.g., seer, auth, patrick, tns, hoarder, substrate):

$ dream status {protocol-name}

Example:

$ dream status substrate

@ http://127.0.0.1:11429

┌─────────────────────┬────────┬───────┐
│ substrate@blackhole │ http   │ 11429 │
│                     ├────────┼───────┤
│                     │ p2p    │ 11182 │
│                     ├────────┼───────┤
│                     │ copies │     1 │
│                     ├────────┼───────┤
│                     │ dns    │ 11204 │
└─────────────────────┴────────┴───────┘

To view all ports:

$ dream status universe 

Output will look like:

┌───────┬─────────────────────┬────────┬───────┐
│ Nodes │ elder@blackhole     │ p2p    │ 10951 │
│       ├─────────────────────┼────────┼───────┤
│       │ hoarder@blackhole   │ http   │ 10900 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11042 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       ├─────────────────────┼────────┼───────┤
│       │ monkey@blackhole    │ p2p    │ 11063 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 10900 │
│       ├─────────────────────┼────────┼───────┤
│       │ tns@blackhole       │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11366 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11126 │
│       ├─────────────────────┼────────┼───────┤
│       │ patrick@blackhole   │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11324 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11084 │
│       ├─────────────────────┼────────┼───────┤
│       │ auth@blackhole      │ p2p    │ 11021 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11345 │
│       ├─────────────────────┼────────┼───────┤
│       │ seer@blackhole      │ http   │ 11303 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11105 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       ├─────────────────────┼────────┼───────┤
│       │ client@blackhole    │ p2p    │ 10952 │
│       ├─────────────────────┼────────┼───────┤
│       │ substrate@blackhole │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11429 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11182 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
└───────┴─────────────────────┴────────┴───────┘

Running Fixtures

Fixtures are used to inject event & data into a universe. The main fixtures you might need are pushAll and attachPlugin.

push-all fixture:

$ dream inject push-all

attach-plugin fixture:

$ dream inject attach-plugin -p {path-to-plugin}