From 75d089410456671142521c6152847cbfb6317237 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Fri, 22 Feb 2019 12:00:04 +1100 Subject: [PATCH] Fixed files not included in release. Moved node relevant stuff in libloki into its own modules folder. --- .eslintignore | 4 ++-- libloki/{ => modules}/local_loki_server.js | 0 libloki/{ => modules}/mnemonic.js | 10 +++++----- libloki/{ => modules}/sc_reduce32.js | 0 libloki/test/node/local_loki_server_test.js | 2 +- package.json | 3 +-- preload.js | 4 ++-- 7 files changed, 11 insertions(+), 12 deletions(-) rename libloki/{ => modules}/local_loki_server.js (100%) rename libloki/{ => modules}/mnemonic.js (95%) rename libloki/{ => modules}/sc_reduce32.js (100%) diff --git a/.eslintignore b/.eslintignore index 7ddb8ccfe..1974d1c02 100644 --- a/.eslintignore +++ b/.eslintignore @@ -29,5 +29,5 @@ ts/**/*.js # Libloki specific files libloki/test/components.js -libloki/mnemonic.js -libloki/sc_reduce32.js +libloki/modules/mnemonic.js +libloki/modules/sc_reduce32.js diff --git a/libloki/local_loki_server.js b/libloki/modules/local_loki_server.js similarity index 100% rename from libloki/local_loki_server.js rename to libloki/modules/local_loki_server.js diff --git a/libloki/mnemonic.js b/libloki/modules/mnemonic.js similarity index 95% rename from libloki/mnemonic.js rename to libloki/modules/mnemonic.js index 05bbb2f69..aeb793f8e 100644 --- a/libloki/mnemonic.js +++ b/libloki/modules/mnemonic.js @@ -151,23 +151,23 @@ function mn_decode(str, wordset_name) { var mn_words = { english: { prefix_len: 3, - words: require('../mnemonic_languages/english'), + words: require('../../mnemonic_languages/english'), }, electrum: { prefix_len: 0, - words: require('../mnemonic_languages/electrum'), + words: require('../../mnemonic_languages/electrum'), }, spanish: { prefix_len: 4, - words: require('../mnemonic_languages/spanish'), + words: require('../../mnemonic_languages/spanish'), }, portuguese: { prefix_len: 4, - words: require('../mnemonic_languages/portuguese'), + words: require('../../mnemonic_languages/portuguese'), }, japanese: { prefix_len: 3, - words: require('../mnemonic_languages/japanese'), + words: require('../../mnemonic_languages/japanese'), }, }; diff --git a/libloki/sc_reduce32.js b/libloki/modules/sc_reduce32.js similarity index 100% rename from libloki/sc_reduce32.js rename to libloki/modules/sc_reduce32.js diff --git a/libloki/test/node/local_loki_server_test.js b/libloki/test/node/local_loki_server_test.js index 11e3b6130..491b5931c 100644 --- a/libloki/test/node/local_loki_server_test.js +++ b/libloki/test/node/local_loki_server_test.js @@ -1,6 +1,6 @@ const axios = require('axios'); const { assert } = require('chai'); -const LocalLokiServer = require('../../local_loki_server'); +const LocalLokiServer = require('../../modules/local_loki_server'); describe('LocalLokiServer', () => { before(async () => { diff --git a/package.json b/package.json index f2b44127e..110f42128 100644 --- a/package.json +++ b/package.json @@ -231,8 +231,7 @@ "permissions_popup.html", "debug_log.html", "_locales/**", - "libloki/mnemonic.js", - "libloki/sc_reduce32.js", + "libloki/modules/*.js", "mnemonic_languages/**", "protos/*", "js/**", diff --git a/preload.js b/preload.js index 98d137d0d..a01aec06f 100644 --- a/preload.js +++ b/preload.js @@ -303,12 +303,12 @@ window.lokiMessageAPI = new LokiMessageAPI({ messageServerPort: config.messageServerPort, }); -const LocalLokiServer = require('./libloki/local_loki_server'); +const LocalLokiServer = require('./libloki/modules/local_loki_server'); window.localServerPort = config.localServerPort; window.localLokiServer = new LocalLokiServer(); -window.mnemonic = require('./libloki/mnemonic'); +window.mnemonic = require('./libloki/modules/mnemonic'); const WorkerInterface = require('./js/modules/util_worker_interface'); // A Worker with a 3 minute timeout