Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "arweave", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Arweave JS client library", | ||
@@ -39,21 +39,22 @@ "main": "index.js", | ||
"@types/node": "^10.12.18", | ||
"babel-minify-webpack-plugin": "^0.3.1", | ||
"chai": "^4.2.0", | ||
"mocha": "^5.2.0", | ||
"ts-loader": "^5.3.0", | ||
"ts-loader": "^5.3.3", | ||
"ts-node": "^7.0.1", | ||
"typescript": "^3.1.6", | ||
"webpack": "^4.25.1", | ||
"typescript": "^3.2.2", | ||
"webpack": "^4.28.4", | ||
"webpack-bundle-analyzer": "^3.0.3", | ||
"webpack-cli": "^3.1.2" | ||
"webpack-cli": "^3.2.1" | ||
}, | ||
"targets": { | ||
"chrome": "69", | ||
"chrome": "70", | ||
"node": "8.11" | ||
}, | ||
"dependencies": { | ||
"arweave-asn1": "arweave-kyle/asn1.js", | ||
"arweave-asn1": "github:arweave-kyle/asn1.js", | ||
"axios": "^0.18.0", | ||
"base64-js": "^1.3.0", | ||
"bignumber.js": "^8.0.1" | ||
"bignumber.js": "^8.0.2" | ||
} | ||
} |
@@ -117,2 +117,35 @@ import * as chai from 'chai'; | ||
}) | ||
it('should initilize from minified web bundle', async function () { | ||
// The web distro will attach to the browser window so we just | ||
// need to mock a global window object with a subtle crypto stub | ||
// to make this test work. | ||
let globals = (<any>global); | ||
globals.window = { | ||
crypto: { | ||
subtle: { | ||
generateKey: async () => { }, | ||
importKey: async () => { }, | ||
exportKey: async () => { }, | ||
digest: async () => { }, | ||
sign: async () => { }, | ||
} | ||
} | ||
}; | ||
require('../dist/web.bundle.min'); | ||
const dist = globals.window.Arweave; | ||
expect(dist).to.be.a('object'); | ||
expect(dist.init).to.be.a('function'); | ||
const instance = dist.init({ host: 'arweave.net', port: 1984, logging: false }); | ||
expect(instance).to.be.an('object'); | ||
}) | ||
}); |
@@ -28,13 +28,13 @@ import * as chai from 'chai'; | ||
expect(arweave.api.constructor.name).to.equal('Api') | ||
expect(arweave.api).to.an('object') | ||
expect(arweave.transactions.constructor.name).to.equal('Transactions'); | ||
expect(arweave.transactions).to.an('object'); | ||
expect(arweave.wallets.constructor.name).to.equal('Wallets'); | ||
expect(arweave.wallets).to.an('object'); | ||
expect(arweave.network.constructor.name).to.equal('Network'); | ||
expect(arweave.network).to.an('object'); | ||
expect(arweave.crypto.constructor.name).to.equal('WebCryptoDriver'); | ||
expect(arweave.crypto).to.an('object'); | ||
expect(arweave.silo.constructor.name).to.equal('Silo'); | ||
expect(arweave.silo).to.an('object'); | ||
@@ -147,3 +147,3 @@ }) | ||
expect(transaction.constructor.name).to.equal('Transaction'); | ||
expect(transaction).to.be.an('object'); | ||
@@ -158,2 +158,4 @@ expect(transaction.data).to.equal('dGVzdA'); | ||
expect(Object.keys(transaction)).to.contain.members(['id', 'data', 'tags', 'signature', 'reward', 'owner', 'last_tx']); | ||
expect(transaction.signature).to.match(/^[a-z0-9-_]+$/i); | ||
@@ -160,0 +162,0 @@ |
@@ -0,1 +1,2 @@ | ||
const BabelMinify = require("babel-minify-webpack-plugin"); | ||
const path = require('path'); | ||
@@ -50,2 +51,5 @@ const config = {}; | ||
}, | ||
optimization: { | ||
minimizer: [new BabelMinify({ "mangle": false })], | ||
}, | ||
plugins: [], | ||
@@ -52,0 +56,0 @@ output: { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
3538162
0
12
40617