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

@mindhive/meteor

v25.0.6

Published

Our standard additions to Meteor

Downloads

93

Readme

Mindhive's base Meteor package

Install

  1. npm install --save @mindhive/meteor
  2. meteor add meteorhacks:unblock

Meteor package peer dependencies (optional)

  1. FocusedView: meteor add ejson
  2. backdoorModule: meteor add xolvio:backdoor
  3. SimpleSchema: meteor add aldeed:collection2-core
  4. apiRegistry.publishComposite: meteor add reywood:publish-composite
  5. client timeModule: meteor add mizzao:timesync (optional, will default to local machine time otherwise)
  6. hasRole: meteor add alanning:roles
  7. offlineModule: meteor add ground:[email protected]
  8. appMarketStore: meteor add cordova:cordova-plugin-device,
    meteor add cordova:cordova-plugin-appinfo and meteor add cordova:cordova-plugin-market

How to use this

Dependency injection

See our DI package.

This package also makes Meteor core services available in the appContext:

  • Meteor
  • Mongo: Meteor's Mongo, or in testing it is our own TestMongo (see below)
  • Accounts: with appropriate internal data reset each test
  • Random
  • EJSON
  • Users: Meteor's 'users' Mongo collection (TestMongo in testing)
  • apiRegistry: see below

...and only on the client:

  • Tracker: like Meteor's Tracker but will react to both Meteor and Mobx reactive changes
  • api: how to call methods on the server
  • storage: HTML5 localStorage
  • mongoMirror: high level mirroring of publications to Mobx domains and offline

ApiRegistry

Rather than calling Meteor.methods and Meteor.publish to create methods and publications inject apiRegistry. This has a cleaner callback (no use of this), calls unblock, and facilitates domain testing (see below).

TestMongo

Uses in memory MiniMongo instead of real Mongo collections to increase test speed. But this can be override with withRealMongoCollection for cases where you need to use functions not available in MiniMongo.

Domain tests

An example domain test.

  • Use mockServerContext of @mindhvie/meteor/test to initialise modules in test
    • Most likely you'll want to import and pass @mindhvie/meteor/test/mockMeteorCoreModuleFactory as the first module into mockServerContext
    • This also sets up a fiber so Meteor code can be run in your tests
  • From the returned context get the mock apiRegistry which can call and subscribe to methods and publications in the modules being tested