Skip to content

Refactor to Typescript & add TSLint #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.idea
node_modules
node_modules
index.js
index.d.ts
package-lock.json
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js
cache: yarn
node_js:
- node
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,43 +6,42 @@ itself.
## Installation

```
npm i -S eos-rc-parser
npm i -S eos-rc-parser
```



## Usage

```js
const parser = require('eos-rc-parser');
const rcParser = require('eos-rc-parser');

from eosjs signProvider ... signargs.transaction.actions.map(async action => {
const abi = await eos.contract(contractAccountName);
const data = abi.fc.fromBuffer(action.name, action.data);
const actionAbi = abi.fc.abi.actions.find(fcAction => fcAction.name === action.name);


const parsedRicardianContract = parser.parse(action.name, data, actionAbi.ricardian_contract);


const parsedRicardianContract = rcParser.parse(action.name, data, actionAbi.ricardian_contract);

// Optional HTML formatting
const htmlOptions = {h1:'b', h2:'div class="someclass"'};
const parsedRicardianContract = parser.parse(action.name, data, ricardian, signer, true || htmlOptions);
}):
const parsedRicardianContract = rcParser.parse(action.name, data, ricardian, signer, true || htmlOptions);
})
```

Or constitution:

```js
const ricardian = systemAbi.abi.ricardian_clauses[0].body;
const parsedRicardianContract = parser.constitution(ricardian, 'testaccount', {h1:'h1'});
const parsedRicardianContract = rcParser.constitution(ricardian, 'testaccount', {h1:'h1'});
```

## Examples results:

No HTML formatting

```js
parser.parse('bidname', {bid: '3 EOS', bidder: 'testaccount', newname: 'somename'}, ricardian, 'testaccount');
rcParser.parse('bidname', {bid: '3 EOS', bidder: 'testaccount', newname: 'somename'}, ricardian, 'testaccount');
```
```
# Action - "bidname"
@@ -58,10 +57,9 @@ As an authorized party I "testaccount" wish to bid on behalf of "testaccount" th
HTML formatting.

```js
parser.parse('bidname', {bid: '3 EOS', bidder: 'testaccount', newname: 'somename'}, ricardian, 'testaccount', {h1:'b', h2:'i class="test"'});
rcParser.parse('bidname', {bid: '3 EOS', bidder: 'testaccount', newname: 'somename'}, ricardian, 'testaccount', {h1: 'b', h2: 'i class="test"'});
```
```
<b>Action</b> - "bidname"<br><br><i class="test">Description</i><br><br>The "bidname" action places a bid on a premium account name, in the knowledge that the high bid will purchase the name.<br><br>As an authorized party I "testaccount" wish to bid on behalf of "testac
count" the amount of "3 EOS" toward purchase of the account name "somename".<br>
```
120 changes: 120 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// TYPES /////////////////////////////////////////////////////////

export type HTML = {h1?: string, h2?: string} | null;

// HELPERS //////////////////////////////////////////////////////

/**
* Replaces curly brace placeholders
*
* @private
* @param ricardian
* @param placeholder
* @param replacement
* @returns {*}
*/
const replacePlaceholder = (ricardian: any, placeholder: any, replacement: any) => {
while (ricardian.indexOf(`{{ ${placeholder} }}`) > -1) {
ricardian = ricardian.replace(`{{ ${placeholder} }}`, `"${replacement}"`);
}
return ricardian;
};

/**
* Html can be either a boolean, null, or an object of {h1,h2}
*
* @private
* @param html
* @returns {*}
*/
const htmlDefaults = (html: any) => {
if (html === null) { return html; }
if (html === false) { return null; }

if (typeof html === "boolean") { html = {}; }
if (!html.hasOwnProperty("h1")) { html.h1 = "h1"; }
if (!html.hasOwnProperty("h2")) { html.h2 = "h2"; }

return html;
};

// EXPORTED ///////////////////////////////////////////////////////////

/***
* Parses the constitution
*
* @param {string} constitutionText Constitution Text
* @param {string} signingAccount Signing Account
* @param {Object} [html=null] HTML formatting
* @returns {string} Parsed Constitution
*/
export const constitution = (constitutionText: string, signingAccount: string, html: HTML = null) => {
const getArticleTag = () => constitutionText.match(new RegExp("#" + "(.*)" + "-"));

html = htmlDefaults(html);

// Replacing signer
if (signingAccount) { constitutionText = replacePlaceholder(constitutionText, "signer", signingAccount); }

// Optional HTML formatting.
if (html !== null) {
// Add default fallback to html
if (!html.h1) { html.h1 = "h1"; }
if (!html.h2) { html.h2 = "h2"; }

let articleTag = getArticleTag();

while (articleTag && articleTag[0].length) {
const strippedArticleTag = articleTag[0].replace("# ", "").replace(" -", "");
constitutionText = constitutionText.replace(articleTag[0], `<${html.h1}>${strippedArticleTag}</${html.h1.split(" ")[0]}>`);
articleTag = getArticleTag();
}
constitutionText = constitutionText.replace(/[\n\r]/g, "<br>");
}

return constitutionText;
};

/**
* Parses arbitrary contract action ricardian contracts.
*
* @param {string} actionName Action Name
* @param {Object} actionParameters Action Parameters
* @param {string} ricardianContract Ricardian Contract
* @param {string} signingAccount Signing Account
* @param {Object} [html=null] HTML Formatting
* @returns {string} Parsed Ricardian Contract
*/
export const parse = (actionName: string, actionParameters: any, ricardianContract: string, signingAccount = null, html: HTML = null) => {
html = htmlDefaults(html);

// Stripping backticks
ricardianContract =
ricardianContract.replace(/`/g, "");

// Replacing action name
ricardianContract =
replacePlaceholder(ricardianContract, actionName, actionName);

// Replacing action parameters
Object.keys(actionParameters).map((param) =>
ricardianContract =
replacePlaceholder(ricardianContract, param, actionParameters[param]),
);

// Replacing signer
if (signingAccount) { ricardianContract = replacePlaceholder(ricardianContract, "signer", signingAccount); }

// Optional HTML formatting.
if (html !== null) {
// Add default fallback to html
if (!html.h1) { html.h1 = "h1"; }
if (!html.h2) { html.h2 = "h2"; }

ricardianContract = ricardianContract.replace("# Action", `<${html.h1}>Action</${html.h1.split(" ")[0]}>`);
ricardianContract = ricardianContract.replace("## Description", `<${html.h2}>Description</${html.h2.split(" ")[0]}>`);
ricardianContract = ricardianContract.replace(/[\n\r]/g, "<br>");
}

return ricardianContract;
};
107 changes: 0 additions & 107 deletions lib/index.js

This file was deleted.

2,163 changes: 0 additions & 2,163 deletions package-lock.json

This file was deleted.

24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,12 +2,21 @@
"name": "eos-rc-parser",
"version": "1.0.4",
"description": "EOS Ricardian contract parser",
"main": "lib/index.js",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts"
],
"scripts": {
"test": "mocha",
"build": "babel ./src/parser.js -o ./lib/index.js --presets es2015"
"test": "tsc && mocha",
"posttest": "tslint --project .",
"prepublish": "tsc"
},
"author": "nsjames",
"contributors": [
"Denis <denis@eosnation.io>"
],
"repository": {
"type": "git",
"url": "git+https://github.com/EOSEssentials/EOS-RC-Parser"
@@ -19,10 +28,9 @@
],
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"chai": "^4.1.2",
"mocha": "^5.2.0"
"chai": "4.x",
"mocha": "5.x",
"tslint": "*",
"typescript": "*"
}
}
104 changes: 0 additions & 104 deletions src/parser.js

This file was deleted.

920 changes: 920 additions & 0 deletions test/data/system.abi

Large diffs are not rendered by default.

1,184 changes: 0 additions & 1,184 deletions test/data/system.abi.js

This file was deleted.

14 changes: 8 additions & 6 deletions test/parser.spec.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
const fs = require('fs');
const path = require('path');
const assert = require('chai').assert;
const rcParser = require('../');
require('mocha');

const parser = require('../src/parser');

describe('parser', () => {

const systemAbi = require('./data/system.abi');
const systemAbi = JSON.parse(fs.readFileSync(path.join(__dirname, 'data', 'system.abi'), 'utf8'));

const testAction = (actionName, data, signer = null, html = null) => {
const ricardian = systemAbi.abi.actions.find(fcAction => fcAction.name === actionName).ricardian_contract;
const parsedRicardianContract = parser.parse(actionName, data, ricardian, signer, html);
const ricardian = systemAbi.actions.find(fcAction => fcAction.name === actionName).ricardian_contract;
const parsedRicardianContract = rcParser.parse(actionName, data, ricardian, signer, html);
assert(parsedRicardianContract.indexOf('{{') === -1, `Could not parse the ${actionName} action`);
assert(parsedRicardianContract.indexOf('}}') === -1, `Could not parse the ${actionName} action`);
console.log(parsedRicardianContract);
@@ -42,8 +44,8 @@ describe('parser', () => {
});

it('should be able to parse the constitution', () => {
const ricardian = systemAbi.abi.ricardian_clauses[0].body;
const parsedRicardianContract = parser.constitution(ricardian, '', true);
const ricardian = systemAbi.ricardian_clauses[0].body;
const parsedRicardianContract = rcParser.constitution(ricardian, '', true);
assert(parsedRicardianContract.indexOf('{{') === -1, `Could not parse the constitution`);
assert(parsedRicardianContract.indexOf('}}') === -1, `Could not parse the constitution`);
});
20 changes: 20 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */

/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

/* Module Resolution Options */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
}
}
12 changes: 12 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"no-shadowed-variable": false,
"max-line-length": false
},
"rulesDirectory": []
}
315 changes: 315 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"

ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"

ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies:
color-convert "^1.9.0"

argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
dependencies:
sprintf-js "~1.0.2"

assertion-error@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"

babel-code-frame@^6.22.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
dependencies:
chalk "^1.1.3"
esutils "^2.0.2"
js-tokens "^3.0.2"

balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"

brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"

browser-stdout@1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"

builtin-modules@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"

chai@4.x:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
dependencies:
assertion-error "^1.0.1"
check-error "^1.0.1"
deep-eql "^3.0.0"
get-func-name "^2.0.0"
pathval "^1.0.0"
type-detect "^4.0.0"

chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"

chalk@^2.3.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

check-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"

color-convert@^1.9.0:
version "1.9.2"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147"
dependencies:
color-name "1.1.1"

color-name@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689"

commander@2.15.1, commander@^2.12.1:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"

debug@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
ms "2.0.0"

deep-eql@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
dependencies:
type-detect "^4.0.0"

diff@3.5.0, diff@^3.2.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"

escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"

esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"

fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"

get-func-name@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"

glob@7.1.2, glob@^7.1.1:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"

growl@1.10.5:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"

has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"

has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"

he@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"

inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"

inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"

js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"

js-yaml@^3.7.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"

minimatch@3.0.4, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"

minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"

mkdirp@0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
minimist "0.0.8"

mocha@5.x:
version "5.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
dependencies:
browser-stdout "1.3.1"
commander "2.15.1"
debug "3.1.0"
diff "3.5.0"
escape-string-regexp "1.0.5"
glob "7.1.2"
growl "1.10.5"
he "1.1.1"
minimatch "3.0.4"
mkdirp "0.5.1"
supports-color "5.4.0"

ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"

path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"

path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"

pathval@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"

resolve@^1.3.2:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
dependencies:
path-parse "^1.0.5"

semver@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"

sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"

strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"

supports-color@5.4.0, supports-color@^5.3.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
dependencies:
has-flag "^3.0.0"

supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"

tslib@^1.8.0, tslib@^1.8.1:
version "1.9.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e"

tslint@*:
version "5.10.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3"
dependencies:
babel-code-frame "^6.22.0"
builtin-modules "^1.1.1"
chalk "^2.3.0"
commander "^2.12.1"
diff "^3.2.0"
glob "^7.1.1"
js-yaml "^3.7.0"
minimatch "^3.0.4"
resolve "^1.3.2"
semver "^5.3.0"
tslib "^1.8.0"
tsutils "^2.12.1"

tsutils@^2.12.1:
version "2.27.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.1.tgz#ab0276ac23664f36ce8fd4414daec4aebf4373ee"
dependencies:
tslib "^1.8.1"

type-detect@^4.0.0:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"

typescript@*:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"

wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"