New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

openstack-registry-hooks

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openstack-registry-hooks

registry-static procedural hooks for OpenStack's NPM mirror.

latest
npmnpm
Version
1.1.0
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

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

  • Source code
  • How to contribute to OpenStack
  • Code review workflow
  • IRC: #openstack-infra on #freenode

Keywords

registry-static

FAQs

Package last updated on 22 Apr 2016

Related posts