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

glxy-apollo-be-cms-services

v1.1.0

Published

GLXY services for the Apollo CMS services

Downloads

1

Readme

Apollo CMS Moleculer Services

Search examples

Search concepts

call apollo-be.cms.osearch '{"profile":"concepts","q":{"term":"Mil","language":"nl","scheme":"http://wolterskluwer.be/pr/lc/topics"},"$limit":10}'
call apollo-be.cms.osearch '{"profile":"concepts","q":{"term":"gewest","language":"nl","scheme":"http://brons.wkb.int/klasseregister"},"$limit":10}'

With profile "lyra-concepts-by-package"

call apollo-be.cms.search --profile "lyra-concepts-by-package" --q "3840da1a-18c6-4306-a3f7-d4e245fc71af"

With profile "lyra-content-by-package"

call apollo-be.cms.search --profile "lyra-content-by-package" --q "3840da1a-18c6-4306-a3f7-d4e245fc71af"

With profile "document-by-id"

call apollo-be.cms.search '{"profile":"document-by-id","q":"111","$limit":10}'

With profile "questions-by-topic"

call apollo-be.cms.search '{"profile":"questions-by-topic","q":"tt35","$limit":10}'

With profile "document-by-id-and-part"

# search on akte + teller
call apollo-be.cms.search '{"profile":"document-by-id-and-part","q":"6087-2","$limit":10}'
# search on akte + title
call apollo-be.cms.search '{"profile":"document-by-id-and-part","q":"6087 2","$limit":10}'

Envelopes

Create an envelope with properties

call apollo-be.cms.core.createEnvelope '{"envelopeUri":"/wkbe/pr/lc/questions/test","properties":{"id":"test","type":"questions"}}'

Delete an envelope

call apollo-be.cms.core.deleteEnvelope --envelopeUri /wkbe/pr/lc/questions/test

Classification examples

Update classification

Précreate a test envelope

call apollo-be.cms.core.createEnvelope --envelopeUri /wkbe/test/lc/classification/update

Add classification

call apollo-be.cms.classification.update '{"envelopeUri":"/wkbe/test/lc/classification/update", "attachmentUri": "/wkbe/test/lc/classification/update.rdf", "profile": "pr.metadata","add":{"http://wolterskluwer.be/test/lc/classification/update":{"http://www.w3.org/2004/02/skos/core#prefLabel":[{"value": "update","type": "literal", "datatype": "http://www.w3.org/2001/XMLSchema#string"}]}}}'

Remove old and add new

call apollo-be.cms.classification.update '{"envelopeUri":"/wkbe/test/lc/classification/update", "attachmentUri": "/wkbe/test/lc/classification/update.rdf", "profile": "pr.metadata","remove":{"http://wolterskluwer.be/test/lc/classification/update":{"http://www.w3.org/2004/02/skos/core#prefLabel":[{"value": "update","type": "literal", "datatype": "http://www.w3.org/2001/XMLSchema#string"}]}},"add":{"http://wolterskluwer.be/test/lc/classification/update":{"http://www.w3.org/2004/02/skos/core#prefLabel":[{"value": "new-label","type": "literal", "datatype": "http://www.w3.org/2001/XMLSchema#string"}]}}}'

Remove matching

# regex patterns can be used for subject and object
call apollo-be.cms.classification.update '{"envelopeUri": "/wkbe/pr/brons/docs/law/1068", "attachmentUri": "http://lyra.be/editorial.metadata/brons/law/1068.rdf", "profile": "editorial.metadata", "removeMatching": {"^http://wolterskluwer.be/pr/brons/law/1068(#.*)?": {"http://schema.lyra.be/classificationLevel": ".*", "http://schema.lyra.be/dlcStatus": ".*", "http://schema.lyra.be/dlcPublished": ".*", "http://schema.lyra.be/displayTitle": ".*"}}}'

Change concept's order

call apollo-be.cms.classification.setConceptOrder --conceptUri http://wolterskluwer.be/pr/lc/topics/0000000254 --order 1

Classification exists

Check if classification uris are valid (existing in Marklogic as triple), before updating classification. Returns a boolean.

call apollo-be.cms.classification.exists --classificationUri 'http://wolterskluwer.be/pr/lc/categories/11' --schemeUri 'http://wolterskluwer.be/pr/lc/categories'

Add classification to a law-part

call apollo-be.cms.classification.update '{"envelopeUri":"/wkbe/pr/brons/docs/law/111", "attachmentUri": "wkbe/pr/brons/docs/law/111#pr.metadata", "profile": "pr.metadata","add":{"http://wolterskluwer.be/pr/brons/law/111#15":{"http://www.w3.org/2004/02/skos/core#hasSubject":[{"value": "http://wolterskluwer.be/pr/lc/questions/1","type": "uri"}]}}}'

Update related concepts

call apollo-be.cms.classification.updateRelatedConcepts '{"envelopeUri":"/wkbe/pr/wkbe-topics.skos.rdf","subject":"http://wolterskluwer.be/pr/lc/topics/0000000041","scheme":"http://wolterskluwer.be/pr/lc/domains","predicate":"http://schema.wolterskluwer.be/hasDomain","uris":["http://wolterskluwer.be/pr/lc/domains/e","http://wolterskluwer.be/pr/lc/domains/gdpr"],"attachmentUri":"/wkbe/pr/lc/topics.skos.rdf","profile":"pr.metadata"}'

Get related concepts

call apollo-be.cms.classification.getRelatedConcepts --subject http://wolterskluwer.be/pr/lc/topics/0000000041 --scheme http://wolterskluwer.be/pr/lc/domains

Classification Validation

Should return { existence: true, 'no-descendants': true }

call apollo-be.cms.classification.validate '{"schemeUri":"http://data.wolterskluwer.com/wkbe/kos/region","uris":["http://data.wolterskluwer.com/wkbe/kos/region/be/v","http://data.wolterskluwer.com/wkbe/kos/region/be/w"],"options":["existence","no-descendants"]}'

Should return { existence: true, 'no-descendants': false }

call apollo-be.cms.classification.validate '{"schemeUri":"http://data.wolterskluwer.com/wkbe/kos/region","uris":["http://data.wolterskluwer.com/wkbe/kos/region/be","http://data.wolterskluwer.com/wkbe/kos/region/be/w"],"options":["existence","no-descendants"]}'

Replace Classification Data

call apollo-be.cms.classification.replaceObjects '{"envelopeUri":"/wkbe/pr/brons/docs/law/1068","attachmentUri":"/orig/brons/law/1068.rdf","profile":"orig.metadata","triples":{"http://wolterskluwer.be/pr/brons/law/1068":{"http://schema.wolterskluwer.be/region":[{"value":"http://data.wolterskluwer.com/wkbe/kos/region/be-nl","type":"uri"}]}}}'

Get Classification Data by Namespace

call apollo-be.cms.classification.getByNamespace '{"envelopeUri":"/wkbe/pr/brons/docs/law/1068","subject":"http://wolterskluwer.be/pr/brons/law/1068","namespace":"http://schema.lyra.be/"}'

Core examples

Generate an envelope-uri

call apollo-be.cms.core.generateUri --baseUri /wkbe/pr/lc/questions

Convert an envelope-uri to a content-uri (to be used for example in classification)

call apollo-be.cms.core.getContentUri --envelopeUri /wkbe/pr/lc/questions/1

Convert an content-uri to a envelope-uri

call apollo-be.cms.core.getEnvelopeUri --contentUri http://wolterskluwer.be/pr/lc/questions/00001240

Create an envelope

call apollo-be.cms.core.createEnvelope --envelopeUri /wkbe/pr/lc/questions/1

Add attachment

call apollo-be.cms.core.addAttachment --envelopeUri /wkbe/pr/lc/questions/0000000989 --attachmentUri /editorial/lc/questions/0000000001.json --profile editorial.document --content '{"content":[{"lang":"nl", "val":"Opgeheven.\nZijn de ondergrondse leidingen beschermd d.m.v. een bekleding gevormd door minstens 2 lagen jute doordrenkt met asfalt en door een laag warm aangebrachte asfalt, of met gelijk welke andere bekleding die op gebied van bescherming tegen invreting gelijkwaardige hoedanigheden bezit?"}], "modDate":"2015-02-10T16:43:21.775Z", "id":"0000000989", "_links":{"responsibles":{"id":"ex", "href":"/ext/ct6/hse/responsibles/ex"}, "articles":[{"id":"11413-T623", "href":"/ext/ct6/hse/articles/11413-T623"}], "self":{"id":"0000000989", "href":"/ext/ct6/hse/questions/0000000989"}, "categories":{"id":"301", "href":"/ext/ct6/hse/categories/301"}}, "sortOrder":1013, "pubDate":"2013-10-29T12:34:48.540Z"}'

Get attachment

call apollo-be.cms.core.getAttachment --envelopeUri /wkbe/pr/lyra/docs/extquestions/0000000989 --attachmentUri /editorial/lyra/extquestions/0000000989#content
call apollo-be.cms.core.getAttachment --envelopeUri /wkbe/pr/brons/docs/doc/84813 --attachmentUri /orig/brons/doc/84813.xml

Get a relation id/uri

call apollo-be.cms.core.getRelationUri --source "http://wolterskluwer.be/pr/lc/questions/00001240" --target "http://wolterskluwer.be/pr/brons/law/111#2" --type "lawpart"

Remodeling examples

Trigger envelopes for remodeling (from sync)

call apollo-be.cms.remodeling.trigger --source lc --collection /orig/cst/extquestions --sync true
call apollo-be.cms.remodeling.trigger --source brons --collection /orig/brons/law --sync true

Trigger envelopes for remodeling (no sync)

call apollo-be.cms.remodeling.trigger --source lc --collection /wkbe/pr/lc/questions

(TODO) Trigger envelopes for remodeling by serialized cst-query

call apollo-be.cms.remodeling.trigger --source lc --cst-query 'cts:and-query((cts:collection-query("/wkbe/pr/lc"), ...))'

Remodel triggered envelopes

call apollo-be.cms.remodeling.remodel --$limit 10

Remodel one or more specific uri's

call apollo-be.cms.remodeling.remodelUris '{"uris":["/wkbe/pr/lc/questions/0000001002"],"sync":true}'

List triggered envelopes

call apollo-be.cms.remodeling.list