RETIRED, registry-static procedural hooks for OpenStack's NPM mirror.
Go to file
Michael Krotscheck fa90e3ec2e
1.1.0
2016-04-22 14:30:35 -07:00
lib Added indexJson hook which normalizes data. 2016-04-22 14:28:47 -07:00
spec Added indexJson hook which normalizes data. 2016-04-22 14:28:47 -07:00
.editorconfig Project initial commit 2016-04-20 15:27:18 -07:00
.eslintignore Project initial commit 2016-04-20 15:27:18 -07:00
.eslintrc Project initial commit 2016-04-20 15:27:18 -07:00
.gitignore Project initial commit 2016-04-20 15:27:18 -07:00
.gitreview Project initial commit 2016-04-20 15:27:18 -07:00
.istanbul.yml Project initial commit 2016-04-20 15:27:18 -07:00
.yo-rc.json Project initial commit 2016-04-20 15:27:18 -07:00
LICENSE Project initial commit 2016-04-20 15:27:18 -07:00
README.md Added indexJson hook which normalizes data. 2016-04-22 14:28:47 -07:00
index.js Added indexJson hook which normalizes data. 2016-04-22 14:28:47 -07:00
package.json 1.1.0 2016-04-22 14:30:35 -07:00

README.md

openstack-registry-hooks

This project provides hooks necessary for the function of OpenStack's AFS-based NPM mirrors. It is maintained by OpenStack's Infrastructure team.

Provided Hooks

indexJson

The official skimdb mirror (which we're supposed to use) contains older documents which do not match the SemVer specification. In order to ensure that the documents that we mirror match those available on registry.npmjs.org, this hook passes them through npm's normalize-registry-metadata package for sanitation.

afterAll

After each package is processed, the script will check the overall synchronization status of the mirror. If it detects that the mirror is up to date, it will exit the process.

This is done to ensure that the mirror is in a consistent state, before synchronizing the slave disk to the AFS Master. Resuming the process is handled via cron.

QuickStart

#!/bin/bash

# Install the registry and the hook module.
npm install -g registry-static openstack-registry-hooks

# Run the registry script
registry-static -d my.registry.com -o /var/www/registry \
	--hooks openstack-registry-hooks

Some useful development commands

  • npm test - Run all the tests, with coverage.
  • npm run lint - Perform a linting check.

Project Resources