Skip to content

Commit

Permalink
Using yarn workspaces (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kouprin authored Oct 30, 2020
1 parent 33bc1f9 commit b1fc62c
Show file tree
Hide file tree
Showing 25 changed files with 4,653 additions and 28,390 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ eth2near/ethashproof
**/*.tgz

**/.yarn*

write_config.js
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Using workspaces: https://classic.yarnpkg.com/en/docs/workspaces/
4 changes: 2 additions & 2 deletions cli/commands/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { RainbowConfig } = require('rainbow-bridge-utils')

class PrepareCommand {
static execute () {
var scriptDir = path.resolve(__dirname, '../scripts/prepare.sh')
const scriptDir = path.resolve(__dirname, '../scripts/prepare.sh')

const shell = ['bash', scriptDir].join(' ')

Expand All @@ -21,7 +21,7 @@ class PrepareCommand {
path.resolve(RainbowConfig.getParam('nearup-src'))

// @ts-ignore
var prepareScript = exec(shell, { env: env })
const prepareScript = exec(shell, { env: env })
// @ts-ignore
prepareScript.stdout.on('data', function (data) {
console.log(data.toString())
Expand Down
8 changes: 4 additions & 4 deletions cli/commands/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ class ServicesStatus {
}

processArgs (args) {
var res = []
for (var i = 0; i + 1 < args.length; i++) {
const res = []
for (let i = 0; i + 1 < args.length; i++) {
if (args[i].startsWith('--')) {
res.push(args[i].substring(2, args[i].length) + '=' + args[i + 1])
}
Expand Down Expand Up @@ -377,7 +377,7 @@ function printLine (field, status = null) {
if (!status) {
status = new Status(Unknown, Error, RecordNotFound)
}
var color = '\x1B[35m'
let color = '\x1B[35m'
switch (status.verdict) {
case Ok:
color = '\x1B[32m'
Expand All @@ -393,7 +393,7 @@ function printLine (field, status = null) {
break
}
const explanation = status.explanation ? '(' + status.explanation + ')' : ''
var line = field + ':'
let line = field + ':'
while (line.length < 50) {
line = line + ' '
}
Expand Down
7 changes: 4 additions & 3 deletions cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ const {
} = require('./init')

// source dir or where rainbow cli is installed (when install with npm)
// TODO @frol use config
const BRIDGE_SRC_DIR = __dirname
const LIBS_SOL_SRC_DIR = path.join(
BRIDGE_SRC_DIR,
'node_modules/rainbow-bridge-sol'
'../node_modules/rainbow-bridge-sol'
)
const LIBS_RS_SRC_DIR = path.join(
BRIDGE_SRC_DIR,
'node_modules/rainbow-bridge-rs'
'../node_modules/rainbow-bridge-rs'
)
const LIBS_TC_SRC_DIR = path.join(
BRIDGE_SRC_DIR,
'node_modules/rainbow-token-connector'
'../node_modules/rainbow-token-connector'
)

RainbowConfig.declareOption(
Expand Down
12 changes: 6 additions & 6 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"node-fetch": "^2.6.0",
"pm2": "^4.4.0",
"pm2-promise": "^2.0.1",
"rainbow-bridge-eth2near-block-relay": "^1.0.0",
"rainbow-bridge-near2eth-block-relay": "^1.0.0",
"rainbow-bridge-testing": "^1.0.0",
"rainbow-bridge-utils": "^1.0.0",
"rainbow-bridge-watchdog": "^1.0.0",
"rainbow-bridge-utils": "1.0.0",
"rainbow-bridge-eth2near-block-relay": "1.0.0",
"rainbow-bridge-near2eth-block-relay": "1.0.0",
"rainbow-bridge-watchdog": "1.0.0",
"rainbow-bridge-testing": "1.0.0",
"rainbow-token-connector": "near/rainbow-token-connector#87ba0a1a8268f26ff58b67a6139ddb74f8eecce6",
"request": "^2.88.2"
},
Expand All @@ -43,4 +43,4 @@
"scripts": {
"standard": "standard"
}
}
}
Loading

0 comments on commit b1fc62c

Please sign in to comment.