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

@oxctl/lti-auto-configuration

v2.0.2

Published

This contains a set of scripts and utility tools to auto provising LTI tools to Canvas.

Downloads

34

Readme

lti-auto-configuration

This contains a set of scripts and utility tools to auto provising LTI tools to Canvas.

We developers spend valuable time setting up LTI 1.3 tools in Canvas, we need to create at least one LTI developer key, in some cases API keys, and register the keys in an LTI auth server. Then add the tool to a subaccount to test it or let the testers play with it. And all of that per project and environment.

The intention of the scripts is to provide developers an easier way to create everything needed in a single run, and being able to delete everything that has been created.

To test it locally, first, install the package globally in your system:

npm i -g

Or you can also install it in your project:

npm i @oxctl/lti-auto-configuration --save-dev

Then you can run the script using:

npx @oxctl/lti-auto-configuration -h

The -h flag will output information about what commands are supported and what parameters are required.

IMPORTANT: The script requires the configuration provided by template files, you have examples for page-design in the tool-config folder, customize the configuration templates according to your needs putting attention to the required permissions in the scope.

Initialisation

This tool stores configuration in ~/.tool-config under profiles. This allows you to easily switch between different servers.

To initialise things under the default environment run:

npx @oxctl/lti-auto-configuration init

This will prompt for the URL and credentials for Canvas and Tool Support.

Setup

If the tool has additional configuration it needs to prompt for then these values can be set with:

npx @oxctl/lti-auto-configuration setup

Add Tool

Now the configuration can be used to add a tool (using example template in tool-config):

npx @oxctl/lti-auto-configuration create

This command will run the following actions:

  1. Creates an LTI developer key.
  2. Creates an API developer key.
  3. Enables both developer keys.
  4. Register both keys in the LTI Auth Server.
  5. Adds the external tool to the testing sub-account using the LTI developer Key from step 1.

Update Tool

After you have created the tool if you edit the tool configuration you can update it in Canvas and Tool Support with:

npx @oxctl/lti-auto-configuration update

This command will:

  1. Lookup configuration in tool support for the registration ID.
  2. Update the LTI developer key.
  3. Update the API developer key (adding if needed and deleting if no longer required).
  4. Update the configuration in tool support.

Remove Tool

Once you no longer need to the tool you can remove it with:

npx @oxctl/lti-auto-configuration delete

This command will run the following actions

  1. Gets the LTI registration from tool support by the registration id.
  2. Deletes, if exists, the LTI developer key present in the registration by client id.
  3. Deletes, if exists, the API developer key present in the registration by client id.
  4. Deletes the LTI registration from the LTI Auth Server.

Override properties using the CLI

You can override any configuration present in the templates from the command line interface, pass the NODE_CONFIG environmental variable:

Example of overriding the canvas URL and Token.

NODE_CONFIG='{"canvas_url": "https://new.canvas.url", "canvas_token": "letTheLightShineIn"}' npx @oxctl/lti-auto-configuration create

Troubleshooting

If you get a message back of Error: Untrusted certificate in chain then you are probably using a self signed certificate for one of the endpoints. You can trust additional certificates with node by using the NODE_EXTRA_CA_CERTS environmental variable. If you're using mkcert then you can add those to the trusted list with:

export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"

Releasing

Releasing newer versions of the package requires to push the package to NPM, you have to be member of the OXCTL organization and have permissions to push packages.

First, edit the 'bin/index.js' file and bump the version, then commit the result.

git checkout main
# edit bin/index.js
git add bin/index.js
git commit -m "Version bump"
npm version patch
git push && git push --tags
npm login
npm publish --access public