mscgenjs / mscgenjs-cli Goto Github PK
View Code? Open in Web Editor NEWRender sequence charts from the command line
Home Page: https://www.npmjs.com/package/mscgenjs-cli
License: Other
Render sequence charts from the command line
Home Page: https://www.npmjs.com/package/mscgenjs-cli
License: Other
I am getting "stdout maxBuffer exceeded" error when processing this file. I have narrow this issue to the execFile call in action.js script. This seems to be caused by the stdout buffer being too small.
If I increase the maxBuffer to 1 meg then the script will generate the attached svg file.
childProcess.execFile(binPath, args,{maxBuffer:1000000}, (pErr, pStdout/* , pStderr*/) => {
Some of the websites seem to indicate that it is better to handle this via a spawn, however I do not know if this function can be rewritten using spawn.
utf-8 is supposed to be the default, but better to not take chances:
mscgenjs-cli/src/actions/index.ts
Line 42 in 1f1784f
Only under msdos derivatives (like MS Windows 7, Windows 8, Windows 10):
bin/mscgen_js samples/coolchart.mscgen
shows an error from requirejs complaining it(the error that appeared until applying for #14 was worse):
Error:
Command failed: E:\dev\node_modules\mscgenjs-cli\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe E:\dev\node_modules\mscgenjs-cli\src\cli-phantom-vector.js E:\dev\node_modules\mscgenjs-cli\src\cli-phantom.html {"precomment":["# Alice & Bob classics: public key encryption","\r","\n"],"meta":{"extendedOptions":false,"extendedArcTypes":false,"extendedFeatures":false},"options":{"hscale":"1.4","wordwraparcs":"true"},"entities":[{"name":"Alice","linecolor":"#00A1DE","textcolor":"white","textbgcolor":"#00A1DE","arclinecolor":"#00A1DE","arctextcolor":"white"},{"name":"Bob","linecolor":"#00A1DE","textcolor":"white","textbgcolor":"#00A1DE","arclinecolor":"#00A1DE","arctextcolor":"white"},{"name":"notes","label":" ","linecolor":"transparent"}],"arcs":[[{"kind":"=>","from":"Alice","to":"Alice","label":"sign message with own private key","linecolor":"#005B82","textcolor":"#005B82"}],[{"kind":"=>","from":"Alice","to":"Bob","label":"signed message","linecolor":"#005B82","textcolor":"#005B82"},{"kind":"note","from":"notes","to":"notes","label":"This is just a sample chart with a (high level) illustration of public key encryption.","linecolor":"white","textcolor":"white","textbgcolor":"#E77B2F"}],[{"kind":"=>","from":"Bob","to":"Alice","label":"get Alice her public key","linecolor":"#005B82","textcolor":"#005B82"}],[{"kind":">>","from":"Alice","to":"Bob","label":"Alices' public key","linecolor":"#005B82","textcolor":"#005B82"}],[{"kind":"=>","from":"Bob","to":"Bob","label":"verify message with Alices' public key","linecolor":"#005B82","textcolor":"#005B82"}]]} svg ..\node_modules\mscgenjs ..\node_modules\requirejs\require.js
Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
Some duckduckgoing suggests 0xc0000005.is an error that is related to denial of access to a resource (e.g. memory, device, file, ...).
Please provide an example for msgenney generation
type-password.png
file is genereated.
type-password.png
file is not genereated.
create type-password.msgenny file with content
wordwrapentities=false
user -- mobile : enter password
user -- mobile : enter passowrd confirmation
mscgenjs -I msgenny -i type-password.msgenny -o type-password.png -T png
I'm wondering if this is normal or I have some other problem. I have a pretty simple MSC file that simply never finishes rendering on Mac OS. None of the CPUs are loaded...
forgive me if this is a naive question - I am not a developer.
I would like to create mscgen diagrams through a CLI interface on an internal network without any internet connection. I loaded the mscgen_js program on internal machine and can use it interactively.
do I need to configure the cli to use that internal server - it is not apparent to me where to do that.
Root cause: ansi-styles was pulled from the npm repo
Invalid when command is executed
$ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm install --global mscgenjs-cli
$ mscgenjs -i example.xu -T png
Invalid non-string/buffer chunk
$ npm i -g mscgenjs-cli --production
> [email protected] install /Users/sverweij/.nvm/versions/node/v4.3.1/lib/node_modules/mscgenjs-cli/node_modules/phantomjs-prebuilt
> node install.js
module.js:327
throw err;
^
Error: Cannot find module './util/assign'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/sverweij/.nvm/versions/node/v4.3.1/lib/node_modules/mscgenjs-cli/node_modules/fs-extra/lib/index.js:1:76)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
-n fountainpen -T png
and -n fountainpen -T jpeg
wordwraparcs=true, hscale=1.2;
customer, client, server, google : Google reCaptcha service;
customer => client : "log in with credentials, reCaptcha";
client => google : getResponse(reCaptcha);
google >> client : reCaptcha response;
client => server : "POST credentials, reCaptcha response";
server => google : "POST reCaptcha response, secret";
---: this is a comment;
customer alt google : reCaptcha valid {
google >> server : OK;
server rbox server : "check hostname, error codes";
server rbox server : do regular login processing;
--- : reCaptcha not valid;
google >> server : NOK;
server >> client : HTTP 40x 'reCaptcha';
client >> customer : sorry dude - captcha didn't check out;
--- : other error and/ or time-out;
...,
google -x server;
server note client : Treating this as an error will mean your log in won't work when the reCaptcha service is down.\n\nIt depends on the gig what you actually do here:\n\n- safety before everything shop: throw an error\n- acceptable risk vs revenue shop: do regular login;
server >> client : Error (HTTP 500?);
client >> customer : sorry dude;
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.