peerlibrary:meteor-packages

v1.0.0Published 5 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Meteor Package Server Sync

A client for Meteor Package Server API.

Creates and syncs all data about packages to local MongoDB collections and keeps them in sync.

Code Quality

JavaScript Style Guide

This project has been setup with eslint, prettier and editorconfig configurations to ensure clean, consistent, error free code.

Installation

meteor add peerlibrary:meteor-packages

Usage

On the server-side, you initialize it like this:

1import { Meteor } from "meteor/meteor";
2import { PackageServer } from "meteor/peerlibrary:meteor-packages";
3
4Meteor.startup(function() {
5  PackageServer.startSyncing();
6});

Initial syncing might take quite some time.

Then you can access collections:

  • PackageServer.Packages
  • PackageServer.Versions
  • PackageServer.Builds
  • PackageServer.ReleaseTracks
  • PackageServer.ReleaseVersions
  • PackageServer.LatestPackages

LatestPackages collection is the same as Versions, only that it contains only the latest versions of packages.

Schema of documents is the same as described in the documentation with one exception: in Versions collection, dependencies field is represented as an array of objects where package name is stored as packageName key. This is to support package names with . in the name without any problems.