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

koreografeye-solid

v1.1.1

Published

A [koreografeye](https://www.npmjs.com/package/koreografeye) plugin to update a Solid pod. The plugin implements Solid CSS client credentials to provide a long lasting login sessions.

Downloads

2

Readme

Koreografeye Solid plugin

A koreografeye plugin to update a Solid pod. The plugin implements Solid CSS client credentials to provide a long lasting login sessions.

Install

npm install koreografeye-solid

Change the config.jsonld configuration file and add the plugin definition.

In @context add "https://linkedsoftwaredependencies.org/bundles/npm/koreografeye-solid/^0.0.0/components/context.jsonld".

Add the plugin definition:

{
  "@id": "http://example.org/sendToSolid",
  "@type": "SolidPlugin",
  "authenticator": {
  "@type": "SolidCSSAuthenticator",
     "options": {
        "@type": "@json",
        "@value": {
            "token" : "./mytoken"
        }
     }
  }
}

The ./mytoken file can be created by running:

npx token_client <name> <email> <idp> > ./mytoken

where:

  • name is a descriptive name for your session
  • email is the email used to authenticate to a Solid CSS instance
  • idp is the identity provider url (typically the url of your Solid CSS pod)

The token_client will prompt you for a password.

Usage

The Koreografeye N3 rules should produce a ex:sendToSolid policy to trigger this plugin. An example N3 rule file is provided below:

@prefix ex:   <http://example.org/> .
@prefix as:   <https://www.w3.org/ns/activitystreams#> .
@prefix pol:  <https://www.example.org/ns/policy#> .
@prefix fno:  <https://w3id.org/function/ontology#> .

{
  # pol:mainSubject defines the top level identifier of the notification
  [ pol:mainSubject ?id ] .
  
  ?id a as:Update .
}
=>
{
  ex:MyDemoPolicy pol:policy [
      a fno:Execution ;
      fno:executes ex:sendToSolid ;
      ex:method "PUT" ;
      ex:endpoint "https://patrickhochstenbach.net/test/koreografeye/demo.ttl";
      ex:body ?id
  ] .
}.

In the N3 rule above we will request the execution of the ex:sendToSolid plugin when the input data contains a mainSubject of type as:Update.

The plugin requires three parameters:

  • ex:method : the HTTP method to use
  • ex:endpoint : the endpoint to connect to
  • ex:body : the RDF fragment to send to the endpoint

Development

Install dependencies

yarn 

Build

yarn build

Demo

Update rules/demo.n3 and change endpoint to a (world) writable resource.

Run an orchestrator run on in/demo.ttl using the rules/demo.n3 N3 policy rules:

yarn orch

This should create a new out/demo.ttl file with the required N3 policies included.

Run the policy executor

yarn pol

The policy executor should have updated the remote resource.