mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-04-25 14:52:18 +00:00
Gun turned off by default https://github.com/internetarchive/dweb-archive/issues/106
This commit is contained in:
parent
728c611846
commit
b3d602a1aa
@ -8,13 +8,19 @@ process.env.GUN_ENV = "false";
|
|||||||
const Gun = require('gun/gun.js'); // gun/gun is the minimized version
|
const Gun = require('gun/gun.js'); // gun/gun is the minimized version
|
||||||
// Raw Gun has almost nothing in it, it needs at least the following to work properly.
|
// Raw Gun has almost nothing in it, it needs at least the following to work properly.
|
||||||
require('gun/lib/path.js'); // So that .path works
|
require('gun/lib/path.js'); // So that .path works
|
||||||
/*
|
|
||||||
WORKAROUND-GUN-STORAGE
|
//WORKAROUND-GUN-STORAGE
|
||||||
// The next step is to stop it failing as soon as its cached 5Mb in localstorage
|
// The next step is to stop it failing as soon as its cached 5Mb in localstorage
|
||||||
// see https://github.com/amark/gun/blob/master/test/tmp/indexedDB.html and https://github.com/amark/gun/issues/590
|
// see https://github.com/amark/gun/blob/master/test/tmp/indexedDB.html and https://github.com/amark/gun/issues/590
|
||||||
// but the instructions on how to do this are obviously broken so waiting on @amark to get this working.
|
// but the instructions on how to do this are obviously broken so waiting on @amark to get this working.
|
||||||
require('gun/lib/radix.js');
|
|
||||||
require('gun/lib/radisk.js');
|
// See https://github.com/internetarchive/dweb-archive/issues/106 unable to get this working (Gun doesnt work well with webpack)
|
||||||
|
//require('gun/nts');
|
||||||
|
//require('gun/lib/wire'); // NodeJS websocket
|
||||||
|
//require('gun/lib/multicast'); // Local area broadcasting needs passing `multicast: true` in options (which is safe in node + browser)
|
||||||
|
/*
|
||||||
|
require('gun/lib/radix.js'); // loaded by store but required for webpack
|
||||||
|
require('gun/lib/radisk.js'); // loaded by store but required for webpack
|
||||||
require('gun/lib/store.js');
|
require('gun/lib/store.js');
|
||||||
require('gun/lib/rindexed.js');
|
require('gun/lib/rindexed.js');
|
||||||
*/
|
*/
|
||||||
|
@ -713,8 +713,9 @@ class Transports {
|
|||||||
this._optionspaused = (options.paused || []).map(n => n.toUpperCase()); // Array of transports paused - defaults to none, upper cased
|
this._optionspaused = (options.paused || []).map(n => n.toUpperCase()); // Array of transports paused - defaults to none, upper cased
|
||||||
if (!(tabbrevs && tabbrevs.length)) { tabbrevs = options.defaulttransports || [] }
|
if (!(tabbrevs && tabbrevs.length)) { tabbrevs = options.defaulttransports || [] }
|
||||||
// WOLK is currently failing, and what is worse returning a data structure with a 404 instead of just failing
|
// WOLK is currently failing, and what is worse returning a data structure with a 404 instead of just failing
|
||||||
|
// GUN is turned off by default because it fills up localstorage on browser and stops working, https://github.com/internetarchive/dweb-archive/issues/106
|
||||||
//if (! tabbrevs.length) { tabbrevs = ["HTTP", "YJS", "IPFS", "WEBTORRENT", "GUN", "WOLK"]; } // SEE-OTHER-ADDTRANSPORT
|
//if (! tabbrevs.length) { tabbrevs = ["HTTP", "YJS", "IPFS", "WEBTORRENT", "GUN", "WOLK"]; } // SEE-OTHER-ADDTRANSPORT
|
||||||
if (! tabbrevs.length) { tabbrevs = ["HTTP", "YJS", "IPFS", "WEBTORRENT", "GUN"]; } // SEE-OTHER-ADDTRANSPORT
|
if (! tabbrevs.length) { tabbrevs = ["HTTP", "YJS", "IPFS", "WEBTORRENT"]; } // SEE-OTHER-ADDTRANSPORT
|
||||||
tabbrevs = tabbrevs.map(n => n.toUpperCase());
|
tabbrevs = tabbrevs.map(n => n.toUpperCase());
|
||||||
let transports = this.setup0(tabbrevs, options);
|
let transports = this.setup0(tabbrevs, options);
|
||||||
["statuscb", "mirror"].forEach(k => { if (options[k]) this[k] = options[k];} )
|
["statuscb", "mirror"].forEach(k => { if (options[k]) this[k] = options[k];} )
|
||||||
|
@ -19,7 +19,8 @@ module.exports = {
|
|||||||
clearImmediate: false,
|
clearImmediate: false,
|
||||||
Buffer: true,
|
Buffer: true,
|
||||||
setImmediate: false,
|
setImmediate: false,
|
||||||
console: false
|
console: false,
|
||||||
|
dgram: 'empty'
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user