From 27188828877266473db8d5d3a13af42a69a76d2f Mon Sep 17 00:00:00 2001 From: Bradley Matusiak Date: Fri, 17 Jun 2022 14:26:38 +0000 Subject: [PATCH 1/4] update src/index --- src/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.js b/src/index.js index f0cb99725..1cc8eaa2f 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,20 @@ var Gun = require('./root'); +require('./shim'); +require('./onto'); +require('./valid'); +require('./state'); +require('./dup'); +require('./ask'); require('./chain'); require('./back'); require('./put'); require('./get'); +require('./on'); +require('./map'); +require('./set'); +require('./mesh'); +require('./websocket'); +require('./localStorage'); module.exports = Gun; \ No newline at end of file From 40b126758fa2e4648c9396b9eac96c885f089fd3 Mon Sep 17 00:00:00 2001 From: bm-avatar Date: Wed, 13 Dec 2023 12:33:09 -0500 Subject: [PATCH 2/4] update --- src/index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/index.js b/src/index.js index 1cc8eaa2f..f0cb99725 100644 --- a/src/index.js +++ b/src/index.js @@ -1,20 +1,8 @@ var Gun = require('./root'); -require('./shim'); -require('./onto'); -require('./valid'); -require('./state'); -require('./dup'); -require('./ask'); require('./chain'); require('./back'); require('./put'); require('./get'); -require('./on'); -require('./map'); -require('./set'); -require('./mesh'); -require('./websocket'); -require('./localStorage'); module.exports = Gun; \ No newline at end of file From 22678f158775fc31a9c5d1fd755d1a0764095040 Mon Sep 17 00:00:00 2001 From: bm-avatar Date: Wed, 13 Dec 2023 12:37:51 -0500 Subject: [PATCH 3/4] src/index fix --- gun.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gun.js b/gun.js index b1f3680e6..9e7b63d94 100644 --- a/gun.js +++ b/gun.js @@ -1162,15 +1162,27 @@ ;USE(function(module){ var Gun = USE('./root'); + USE('./shim'); + USE('./onto'); + USE('./valid'); + USE('./state'); + USE('./dup'); + USE('./ask'); USE('./chain'); USE('./back'); USE('./put'); USE('./get'); + USE('./on'); + USE('./map'); + USE('./set'); + USE('./mesh'); + USE('./websocket'); + USE('./localStorage'); module.exports = Gun; })(USE, './index'); ;USE(function(module){ - var Gun = USE('./index'); + var Gun = USE('./root'); Gun.chain.on = function(tag, arg, eas, as){ // don't rewrite! var gun = this, cat = gun._, root = cat.root, act, off, id, tmp; if(typeof tag === 'string'){ @@ -1306,7 +1318,7 @@ })(USE, './on'); ;USE(function(module){ - var Gun = USE('./index'), next = Gun.chain.get.next; + var Gun = USE('./root'), next = Gun.chain.get.next; Gun.chain.get.next = function(gun, lex){ var tmp; if(!Object.plain(lex)){ return (next||noop)(gun, lex) } if(tmp = ((tmp = lex['#'])||'')['='] || tmp){ return gun.get(tmp) } @@ -1351,7 +1363,7 @@ })(USE, './map'); ;USE(function(module){ - var Gun = USE('./index'); + var Gun = USE('./root'); Gun.chain.set = function(item, cb, opt){ var gun = this, root = gun.back(-1), soul, tmp; cb = cb || function(){}; @@ -1728,7 +1740,7 @@ })(USE, './mesh'); ;USE(function(module){ - var Gun = USE('./index'); + var Gun = USE('./root'); Gun.Mesh = USE('./mesh'); // TODO: resync upon reconnect online/offline From cb41a3debdf30939a5434eb6d1d11629b0ca1b78 Mon Sep 17 00:00:00 2001 From: bm-avatar Date: Wed, 13 Dec 2023 12:50:39 -0500 Subject: [PATCH 4/4] added src/core --- gun.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gun.js b/gun.js index 9e7b63d94..8e1a2efd9 100644 --- a/gun.js +++ b/gun.js @@ -1160,6 +1160,15 @@ var iife = function(fn,as){fn.call(as||empty)} })(USE, './put'); + ;USE(function(module){ + var Gun = USE('./root'); + USE('./chain'); + USE('./back'); + USE('./put'); + USE('./get'); + module.exports = Gun; + })(USE, './core'); + ;USE(function(module){ var Gun = USE('./root'); USE('./shim'); @@ -1168,10 +1177,7 @@ USE('./state'); USE('./dup'); USE('./ask'); - USE('./chain'); - USE('./back'); - USE('./put'); - USE('./get'); + USE('./core'); USE('./on'); USE('./map'); USE('./set');