Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
utils
.gitignore
.releaserc
LICENSE
README.md
azure-pipelines.yml
index.js
jest.config.js
package.json

README.md

@isomorphic-git/openpgp-plugin

FOSSA Status

OpenPGP.js plugin for [a future version of] isomorphic-git

Note: no version of isomorphic-git has been released that uses this plugin yet.

It's a chicken and egg problem. Gotta write the plugin first, then modify isomorphic-git to use it.

Usage

// Node
const { pgp } = require('@isomorphic-git/openpgp-plugin')
const git = require('isomorphic-git')

git.plugins.set('pgp', pgp)

// Now you can use git.sign() and git.verify()

OpenPGP.js is unfortunately licensed under the LGPL-3.0 and thus cannot be included in a minified bundle with isomorphic-git which is an MIT/BSD style library, because that would violate the "dynamically linked" stipulation. If you are building a browser app, you should include this plugin as separate script.

I'm not a lawyer, but I suspect that code-splitting counts as "dynamically linked". Here I use a dynamic import statement to load the module.

// Browser
import { plugins } from 'isomorphic-git'

import('@isomorphic-git/openpgp-plugin').then(({ pgp }) => {
  git.plugins.set('pgp', pgp)
  // Now you can use git.sign() and git.verify()
})

Tests

npm test

License

In keeping with the OpenPGP.js license, this project is licensed under the GNU Lesser General Public License v3.0

FOSSA Status

You can’t perform that action at this time.