Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/transaction-debugger/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env", { "modules": false }
],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"],
"env": {
"test": {
"presets": [["@babel/preset-env"], "@babel/preset-react", "@babel/plugin-proposal-class-properties"]
}
}
}
26 changes: 26 additions & 0 deletions packages/transaction-debugger/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"env": {
"browser": true,
"jest": true
},
"parser": "babel-eslint",
"extends": "airbnb",
"rules": {
"key-spacing": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/label-has-associated-control": [ 2, {
"labelComponents": ["label"],
"labelAttributes": ["htmlFor"],
"controlComponents": ["input"],
"depth": 3
}],
"react/destructuring-assignment": 0
},
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack.common.js"
}
}
}
}
1 change: 1 addition & 0 deletions packages/transaction-debugger/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/
11 changes: 11 additions & 0 deletions packages/transaction-debugger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `transaction-debugger`

> TODO: description

## Usage

```
const transactionDebugger = require('transaction-debugger');

// TODO: DEMONSTRATE API
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

const transactionDebugger = require('..');

describe('transaction-debugger', () => {
it('needs tests');
});
18 changes: 18 additions & 0 deletions packages/transaction-debugger/config/alias.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const path = require('path');
const {
APP_PATH,
} = require('./paths');


const alias = {
components: path.resolve(APP_PATH, 'components'),
pages: path.resolve(APP_PATH, 'pages'),
modules: path.resolve(APP_PATH, 'modules'),
assets: path.resolve(APP_PATH, 'assets'),
services: path.resolve(APP_PATH, 'services'),
helpers: path.resolve(APP_PATH, 'helpers'),
};

module.exports = {
alias,
};
57 changes: 57 additions & 0 deletions packages/transaction-debugger/config/loaders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

const autoprefixer = require('autoprefixer');
const {
ASSETS_PATH,
} = require('./paths');

const cssLoader = {
loader: 'css-loader',
options: {
modules: true,
importLoaders: 2,
},
};

const sassLoader = {
loader: 'sass-loader',
options: {
outputStyle: 'expanded',
includePaths: [
ASSETS_PATH,
],
},
};

const postcssLoader = {
loader: 'postcss-loader',
options: {
plugins: () => [
autoprefixer(),
],
},
};

const imagesLoader = {
loader: 'url-loader',
options: {
limit: 8192,
name: '[name]-[hash].[ext]',
},
};

const fileLoader = {
loader: 'file-loader',
options: {
limit: 8192,
name: '[name]-[hash].[ext]',
},
};


module.exports = {
cssLoader,
sassLoader,
postcssLoader,
imagesLoader,
fileLoader,
};
13 changes: 13 additions & 0 deletions packages/transaction-debugger/config/paths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const path = require('path');

const ROOT_PATH = path.resolve(__dirname, '..');

const resolvePath = relativePath => path.resolve(ROOT_PATH, relativePath);


module.exports = {
APP_PATH: resolvePath('src'),
DIST_PATH: resolvePath('lib'),
NODE_MODULES_PATH: resolvePath('node_modules'),
ASSETS_PATH: resolvePath('src/assets')
};
11 changes: 11 additions & 0 deletions packages/transaction-debugger/config/template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transaction debugger</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
66 changes: 66 additions & 0 deletions packages/transaction-debugger/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "transaction-debugger",
"version": "0.0.19",
"description": "> TODO: description",
"author": "xineman <uragupalo@mail.ru>",
"homepage": "https://github.com/BitbossIO/keyring#readme",
"license": "ISC",
"main": "lib/index.js",
"scripts": {
"start": "webpack-dev-server --config ./webpack.dev.js --progress --colors",
"build": "export NODE_ENV=production && webpack --config ./webpack.prod.js"
},
"dependencies": {
"@keyring/bsv": "^0.1.4",
"classnames": "^2.2.6",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"autoprefixer": "^9.6.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.6",
"css-loader": "^3.0.0",
"dotenv-webpack": "^1.7.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-import-resolver-lerna": "^1.1.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.13.0",
"file-loader": "^4.0.0",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.7.0",
"node-sass": "^4.12.0",
"postcss-loader": "^3.0.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.3.0",
"url-loader": "^2.0.0",
"webpack": "^4.34.0",
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.7.1",
"webpack-merge": "^4.2.1"
},
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/BitbossIO/keyring.git"
},
"bugs": {
"url": "https://github.com/BitbossIO/keyring/issues"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
121 changes: 121 additions & 0 deletions packages/transaction-debugger/src/assets/styles.global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

ul {
list-style-type: none;
}

html {
font-family: 'Open sans';
color: #333;
}

#root {
height: 100vh;
}

.container {
padding-left: 10px;
padding-right: 10px;
}

/* open-sans-regular - latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'),
url('./fonts/open-sans-v15-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/open-sans-v15-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'),
url('./fonts/open-sans-v16-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/open-sans-v16-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

.root {
padding: 20px 30px;
max-width: 100%;
width: 1000px;
margin: auto;
}

.section {
margin-bottom: 20px;
}

.row {
display: flex;
align-items: center;
height: 40px;
}

.input {
width: 800px;
max-width: 100%;
padding: 5px 10px;
}

.error {
margin-left: 15px;
background-color: #f44b42;
color: #FFF;
padding: 3px 7px;
}

.title {
margin-bottom: 5px;
}

table {
border-collapse: collapse;
table {
padding: 5px;
border-width: 8px;
border-style: solid;
margin: 10px;
}
}

td {
padding: 4px 10px;
}

th {
font-weight: 700;
}

code {
padding: 2px;
background-color: #222;
color: #ccc;
}

.structure-container {
background-color: #222;
padding: 15px;
}

.structure {
word-break: break-all;
}

table, th, td {
border: 1px solid black;
}

.tx-input {
border-color: #9178ff;
}

.tx-output {
border-color: #bd4c3d;
}
Loading