ensure mnemomic type files are copied to build

This commit is contained in:
Moriz Wahl 2022-02-21 14:30:06 +01:00
parent 970216b2fc
commit 8d9228aab8
3 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,6 @@ module.exports = {
process.env.NODE_ENV === 'development' process.env.NODE_ENV === 'development'
? '<rootDir>/../database/entity/$1' ? '<rootDir>/../database/entity/$1'
: '<rootDir>/../database/build/entity/$1', : '<rootDir>/../database/build/entity/$1',
// This is hack to fix a problem with the library `ts-mysql-migrate` which does differentiate between its ts/js state
'@dbTools/(.*)': '@dbTools/(.*)':
process.env.NODE_ENV === 'development' process.env.NODE_ENV === 'development'
? '<rootDir>/../database/src/$1' ? '<rootDir>/../database/src/$1'

View File

@ -5,19 +5,20 @@
* This also removes the trailing space * This also removes the trailing space
*/ */
import fs from 'fs' import fs from 'fs'
import path from 'path'
const TARGET_MNEMONIC_TYPE = 2 const TARGET_MNEMONIC_TYPE = 2
const PHRASE_WORD_COUNT = 24 const PHRASE_WORD_COUNT = 24
const WORDS_MNEMONIC_0 = fs const WORDS_MNEMONIC_0 = fs
.readFileSync('src/config/mnemonic.uncompressed_buffer18112.txt') .readFileSync(path.resolve(__dirname, '../src/config/mnemonic.uncompressed_buffer18112.txt'))
.toString() .toString()
.split(',') .split(',')
const WORDS_MNEMONIC_1 = fs const WORDS_MNEMONIC_1 = fs
.readFileSync('src/config/mnemonic.uncompressed_buffer18113.txt') .readFileSync(path.resolve(__dirname, '../src/config/mnemonic.uncompressed_buffer18113.txt'))
.toString() .toString()
.split(',') .split(',')
const WORDS_MNEMONIC_2 = fs const WORDS_MNEMONIC_2 = fs
.readFileSync('src/config/mnemonic.uncompressed_buffer13116.txt') .readFileSync(path.resolve(__dirname, '../src/config/mnemonic.uncompressed_buffer13116.txt'))
.toString() .toString()
.split(',') .split(',')
const WORDS_MNEMONIC = [WORDS_MNEMONIC_0, WORDS_MNEMONIC_1, WORDS_MNEMONIC_2] const WORDS_MNEMONIC = [WORDS_MNEMONIC_0, WORDS_MNEMONIC_1, WORDS_MNEMONIC_2]

View File

@ -8,7 +8,7 @@
"license": "MIT", "license": "MIT",
"private": false, "private": false,
"scripts": { "scripts": {
"build": "tsc --build", "build": "mkdir -p build/src/config/ && cp src/config/*.txt build/src/config/ && tsc --build",
"clean": "tsc --build --clean", "clean": "tsc --build --clean",
"up": "node build/src/index.js up", "up": "node build/src/index.js up",
"down": "node build/src/index.js down", "down": "node build/src/index.js down",