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

besluit-publicatie-melding-service

v0.6.0

Published

mu-semtech service to notify automatic melding service when new publication

Downloads

2

Readme

besluit-publicatie-melding-service

This service listens for resources of type signing:PublishedResource, with status <http://mu.semte.ch/vocabularies/ext/besluit-publicatie-publish-service/status/success> The service then notifies an endpoint, compliant with the submission-api In practice this will usually be automatic-submission-service.

Rest API

  • POST /submit-publication: endpoint for mu-delta to trigger. Can also be used to manually trigger the service for debugging purposes.

Params

besluit-publicatie:
    image: lblod/besluit-publicatie-melding-service:z.y.x
    environment: # defaults params are shown here
      KEY: 'api-key-as-provided' # (required)
      SUBMISSION_ENDPOINT: 'http://automatic-submission-service/melding' # The target endpoint to submit to (required)
      SOURCE_HOST: 'http://the.public.host.where.publication.is.available' # (required)

      PUBLISHER_URI: 'http://data.lblod.info/vendors/gelinkt-notuleren'
      DEFAULT_GRAPH: 'http://mu.semte.ch/graphs/public'
      CACHING_CRON_PATTERN: '0 */5 * * * *'
      PENDING_TIMEOUT_HOURS: '3'
      MAX_ATTEMPTS: '10' 
      PING_DB_INTERVAL: '2'
      RESCHEDULE_CRON_PATTERN: '0 0 * * *'
    links:
      - database:database

KEY (required)

Provided api key for submitting to the SUBMISSION_ENDPOINT.

SUBMISSION_ENDPOINT (required)

URI for the endpoint where the notification (aka "melding") will be submitted to. This endpoint must comply with the submission-api specification.

SOURCE_HOST (required)

Base url where the published resource can be publicly viewed. Used for generating urls which will be submitted to the SUBMISSION_ENDPOINT. This should point to an instance of the publication stack

PUBLISHER_URI (default = 'http://data.lblod.info/vendors/gelinkt-notuleren')

Unique identifier of the publisher (aka creator) of the published resource. Together with the api key, this forms the authentication credentials for the notification stack.

DEFAULT_GRAPH (default = 'http://mu.semte.ch/graphs/public')

Default graph of the stack this service is a part of. Used to manage running task:Task instances.

CACHING_CRON_PATTERN (default = '0 */5 * * * *')

Currently not used.

PENDING_TIMEOUT_HOURS (default = '3')

Currently not used.

MAX_ATTEMPTS (default = '10')

Amount of times this service will retry to submit a notification to SUBMISSION_ENDPOINT upon failure.

PING_DB_INTERVAL (default = '2')

Time in seconds between pings to the database service while waiting for it to start. Only relevant for startup, no effect once the stack is running.

RESCHEDULE_CRON_PATTERN (default = '0 0 * * *')

Cron pattern when the function in charge of rescheduling pending tasks and resources without tasks will run, it runs every day at 00:00 by default

Example delta notifier config

export default [
  {
    match: {
      predicate: { type: "uri", value: "http://mu.semte.ch/vocabularies/ext/besluit-publicatie-publish-service/status" },
      object: { type: "uri", value: "http://mu.semte.ch/vocabularies/ext/besluit-publicatie-publish-service/status/success" }
    },
    callback: {
      url: "http://publicatie-melding/submit-publication", method: "POST"
    },
    options: {
      resourceFormat: "v0.0.1",
      gracePeriod: 1000,
      ignoreFromSelf: true
    }
  }
]

Inner workings

Once a valid resource is provided, a task:Task is created and processed. It retries in case of failure. There is also a fallback, in case of issues with notifications