🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@aragon/apm

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aragon/apm - npm Package Compare versions

Comparing version

to
3.1.0-beta.1

6

package.json
{
"name": "@aragon/apm",
"version": "3.0.0",
"version": "3.1.0-beta.1",
"description": "JavaScript library for the Aragon Package Manager",

@@ -20,3 +20,3 @@ "main": "src/index.js",

],
"author": "Aragon Project <contact@aragon.one>",
"author": "Aragon Association <legal@aragon.org>",
"license": "LGPL-3.0-or-later",

@@ -31,5 +31,5 @@ "bugs": {

"ethjs-ens": "^2.0.1",
"ipfs-api": "^17.5.0",
"ipfs-api": "^26.1.2",
"semver": "^5.5.0"
}
}

@@ -64,3 +64,3 @@ const ens = require('./ens')

const getApplicationInfo = (contentURI) => {
const getApplicationInfo = (contentURI, getInfoTimeout = GET_INFO_TIMEOUT) => {
const [provider, location] = contentURI.split(/:(.+)/)

@@ -82,6 +82,9 @@ let error;

return Promise.all([
readFileFromApplication(contentURI, 'manifest.json'),
readFileFromApplication(contentURI, 'artifact.json')
])
return promiseTimeout(
Promise.all([
readFileFromApplication(contentURI, 'manifest.json'),
readFileFromApplication(contentURI, 'artifact.json')
]),
getInfoTimeout
)
.then((files) => files.map(JSON.parse))

@@ -107,3 +110,3 @@ .then(

function returnVersion (web3, getInfoTimeout = GET_INFO_TIMEOUT) {
function returnVersion (web3, getInfoTimeout) {
return (version) => {

@@ -114,3 +117,3 @@ const versionInfo = {

}
return promiseTimeout(getApplicationInfo(web3.utils.hexToAscii(version.contentURI)), getInfoTimeout)
return getApplicationInfo(web3.utils.hexToAscii(version.contentURI), getInfoTimeout)
.then((info) => {

@@ -117,0 +120,0 @@ return Object.assign(info, versionInfo)

@@ -5,3 +5,7 @@ const ipfsAPI = require('ipfs-api')

module.exports = (opts = {}) => {
const initIPFS = (rpc) => ipfsAPI(rpc)
// Backwards compatible API: If rpc is passed in options that is passed to IPFS,
// otherwise all options are provided
const initIPFS = (ipfsOptions) =>
ipfsAPI(ipfsOptions.rpc ? ipfsOptions.rpc : ipfsOptions)
let ipfs

@@ -25,3 +29,3 @@

if (!ipfs) {
ipfs = initIPFS(opts.rpc)
ipfs = initIPFS(opts)
}

@@ -46,3 +50,3 @@

if (!ipfs) {
ipfs = initIPFS(opts.rpc)
ipfs = initIPFS(opts)
}

@@ -61,5 +65,5 @@

if (!ipfs) {
ipfs = initIPFS(opts.rpc)
ipfs = initIPFS(opts)
}
const hashes = await ipfs.util.addFromFs(path, { recursive: true })

@@ -71,2 +75,2 @@ const { hash } = hashes.pop()

}
}
}

Sorry, the diff of this file is not supported yet