Fix linking to bundled openpgp

This commit is contained in:
Yarmo Mackenbach 2020-11-20 09:13:08 +01:00
parent d8ea0434ac
commit 544f339dcf
3 changed files with 6 additions and 3 deletions

View file

@ -13,9 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
const path = require('path')
const mergeOptions = require('merge-options') const mergeOptions = require('merge-options')
const validUrl = require('valid-url') const validUrl = require('valid-url')
const openpgp = require('../node_modules/openpgp/dist/openpgp.min.js') const openpgp = require(path.join(require.resolve('openpgp'), '..', 'openpgp.min.js'))
const serviceproviders = require('./serviceproviders') const serviceproviders = require('./serviceproviders')
const keys = require('./keys') const keys = require('./keys')
const utils = require('./utils') const utils = require('./utils')

View file

@ -13,10 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
const path = require('path')
const bent = require('bent') const bent = require('bent')
const req = bent('GET') const req = bent('GET')
const validUrl = require('valid-url') const validUrl = require('valid-url')
const openpgp = require('../node_modules/openpgp/dist/openpgp.min.js') const openpgp = require(path.join(require.resolve('openpgp'), '..', 'openpgp.min.js'))
const mergeOptions = require('merge-options') const mergeOptions = require('merge-options')
const fetchHKP = async (identifier, keyserverBaseUrl) => { const fetchHKP = async (identifier, keyserverBaseUrl) => {

View file

@ -16,7 +16,8 @@ limitations under the License.
const chai = require('chai') const chai = require('chai')
const expect = chai.expect const expect = chai.expect
const openpgp = require('../node_modules/openpgp/dist/openpgp.min.js') const path = require('path')
const openpgp = require(path.join(require.resolve('openpgp'), '..', 'openpgp.min.js'))
const doipjs = require('../src') const doipjs = require('../src')
const pubKeyFingerprint = `3637202523e7c1309ab79e99ef2dc5827b445f4b` const pubKeyFingerprint = `3637202523e7c1309ab79e99ef2dc5827b445f4b`