mirror of https://github.com/embarklabs/embark.git
build(deps): bump viz.js from 1.8.2 to 2.1.2
Bumps [viz.js](https://github.com/mdaines/viz.js) from 1.8.2 to 2.1.2. - [Release notes](https://github.com/mdaines/viz.js/releases) - [Commits](https://github.com/mdaines/viz.js/compare/v1.8.2...v2.1.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
This commit is contained in:
parent
1a4eaabfc7
commit
d98edd5409
|
@ -108,7 +108,6 @@
|
|||
"simples": "0.8.8",
|
||||
"source-map-support": "0.5.16",
|
||||
"term.js": "0.0.7",
|
||||
"viz.js": "1.8.2",
|
||||
"vm2": "3.6.4",
|
||||
"web3": "1.2.6",
|
||||
"web3-bzz": "1.2.6",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Config, Events, fs, TemplateGenerator } from 'embark-core';
|
||||
import { Engine } from 'embark-engine';
|
||||
import { __ } from 'embark-i18n';
|
||||
import { dappPath, joinPath, setUpEnv, warnIfPackageNotDefinedLocally } from 'embark-utils';
|
||||
import { dappPath, joinPath, setUpEnv } from 'embark-utils';
|
||||
import { Logger, LogLevels } from 'embark-logger';
|
||||
let async = require('async');
|
||||
const constants = require('embark-core/constants');
|
||||
|
@ -544,10 +544,6 @@ class EmbarkController {
|
|||
engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", "));
|
||||
}
|
||||
|
||||
if (warnIfPackageNotDefinedLocally("embark-graph", engine.logger.error) !== true) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
engine.startEngine(async () => {
|
||||
let contractsFiles = await engine.events.request2("config:contractsFiles");
|
||||
let compiledContracts = await engine.events.request2("compiler:contracts:compile", contractsFiles);
|
||||
|
@ -562,13 +558,18 @@ class EmbarkController {
|
|||
if (err) {
|
||||
engine.logger.error(err.message);
|
||||
engine.logger.info(err.stack);
|
||||
process.exit(1);
|
||||
} else {
|
||||
engine.events.request("graph:create", options, () => {
|
||||
engine.events.request("graph:create", options, (err) => {
|
||||
if (err) {
|
||||
engine.logger.error(err.message);
|
||||
engine.logger.info(err.stack);
|
||||
process.exit(1);
|
||||
}
|
||||
engine.logger.info(__("Done. %s generated", options.output).underline);
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
process.exit(err ? 1 : 0);
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
"async": "3.2.0",
|
||||
"core-js": "3.4.3",
|
||||
"embark-utils": "^5.3.0-nightly.5",
|
||||
"viz.js": "1.8.2"
|
||||
"viz.js": "2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"embark-solo": "^5.2.3",
|
||||
|
|
|
@ -2,6 +2,7 @@ import { warnIfPackageNotDefinedLocally } from 'embark-utils';
|
|||
|
||||
const async = require('async');
|
||||
const Viz = require('viz.js');
|
||||
const { Module, render } = require('viz.js/full.render.js');
|
||||
|
||||
class GraphGenerator {
|
||||
constructor(embark, _options) {
|
||||
|
@ -123,7 +124,7 @@ class GraphGenerator {
|
|||
next();
|
||||
},
|
||||
function (next) {
|
||||
let dot = `
|
||||
const dot = `
|
||||
digraph Contracts {
|
||||
node[shape=record,style=filled]
|
||||
edge[dir=back, arrowtail=empty]
|
||||
|
@ -131,14 +132,13 @@ class GraphGenerator {
|
|||
${relationshipString}
|
||||
}`;
|
||||
|
||||
let svg = Viz(dot);
|
||||
|
||||
self.embark.fs.writeFileSync(options.output, svg, (err) => {
|
||||
if (err) throw err;
|
||||
next();
|
||||
});
|
||||
const viz = new Viz({ Module, render });
|
||||
viz.renderString(dot)
|
||||
.then(svg => self.embark.fs.writeFile(options.output, svg, next))
|
||||
.catch(next);
|
||||
}
|
||||
], function(_err, _result) {
|
||||
], function(err) {
|
||||
if (err) return cb(err);
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
"async": "3.2.0",
|
||||
"core-js": "3.4.3",
|
||||
"embark-i18n": "^5.3.0-nightly.5",
|
||||
"string-replace-async": "1.2.1",
|
||||
"viz.js": "1.8.2"
|
||||
"string-replace-async": "1.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.8.6",
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
"@babel/runtime-corejs3": "7.8.4",
|
||||
"async": "3.2.0",
|
||||
"core-js": "3.4.3",
|
||||
"viz.js": "1.8.2",
|
||||
"web3": "1.2.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -23466,10 +23466,10 @@ verror@1.10.0:
|
|||
core-util-is "1.0.2"
|
||||
extsprintf "^1.2.0"
|
||||
|
||||
viz.js@1.8.2:
|
||||
version "1.8.2"
|
||||
resolved "https://registry.yarnpkg.com/viz.js/-/viz.js-1.8.2.tgz#d9cc04cd99f98ec986bf9054db76a6cbcdc5d97a"
|
||||
integrity sha512-W+1+N/hdzLpQZEcvz79n2IgUE9pfx6JLdHh3Kh8RGvLL8P1LdJVQmi2OsDcLdY4QVID4OUy+FPelyerX0nJxIQ==
|
||||
viz.js@2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/viz.js/-/viz.js-2.1.2.tgz#6f09cd4e10af28754a6d50b055bd2e4a7693983a"
|
||||
integrity sha512-UO6CPAuEMJ8oNR0gLLNl+wUiIzQUsyUOp8SyyDKTqVRBtq7kk1VnFmIZW8QufjxGrGEuI+LVR7p/C7uEKy0LQw==
|
||||
|
||||
vm-browserify@^1.0.1:
|
||||
version "1.1.0"
|
||||
|
|
Loading…
Reference in New Issue