Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ipcMain.on('start', async ({ sender }) => {
console.log('starting disposable IPFS')
sender.send('message', 'starting disposable IPFS')
try {
const s = createServer()
await s.start()
const node = await createNode({ type: 'go' })
console.log('get id')
sender.send('message', 'get id')
const id = await node.api.id()
console.log('got id', id)
sender.send('id', JSON.stringify(id))
await node.stop()
await s.stop()
} catch (error) {
sender.send('id', JSON.stringify(error.message))
console.log(error)
}
})
'use strict'
const createServer = require('ipfsd-ctl').createServer
const EchoServer = require('interface-ipfs-core/src/utils/echo-http-server')
const server = createServer()
const echoServer = EchoServer.createServer()
module.exports = {
bundlesize: { maxSize: '246kB' },
webpack: {
resolve: {
mainFields: ['browser', 'main']
}
},
karma: {
files: [{
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*',
watched: false,
served: true,
included: false
}],
'use strict'
const IPFSFactory = require('ipfsd-ctl')
const MockPreloadNode = require('./test/utils/mock-preload-node')
const EchoServer = require('interface-ipfs-core/src/utils/echo-http-server')
const ipfsdServer = IPFSFactory.createServer()
const preloadNode = MockPreloadNode.createNode()
const echoServer = EchoServer.createServer()
module.exports = {
bundlesize: { maxSize: '652kB' },
webpack: {
resolve: {
mainFields: ['browser', 'main'],
aliasFields: ['browser', 'browser-all-ipld-formats'],
}
},
karma: {
files: [{
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*',
watched: false,
served: true,