This repository was archived by the owner on Oct 21, 2024. It is now read-only.
v1.0.0
This is a semver major release that includes breaking changes in addition to better support for promises and async/await.
- The module has been converted to typescript and ships with type definitions.
- BREAKING CHANGE The module API has been changed to be more compatible with ES6 modules. We export
getPemas a named export. Users usingrequirecan useconst {getPem} = require('google-p12-pem') - BREAKING CHANGE We no longer perform the file-system operation synchronously if the callback is omitted. Instead we return a promise, which can be
awaited orthened.
Migration should be straight forward. Example:
// before
var gp12 = require('google-p12-pem');
gp12('/path/to/key.p12', function(err, pem) {
console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
})
// now
const {getPem} = require('google-p12-pem');
getPem('/path/to/key.p12', function(err, pem) {
console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
});
// See README for example of using with async/await and promises.