Giter Site home page Giter Site logo

mscgenjs / mscgenjs-cli Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 5.0 17.26 MB

Render sequence charts from the command line

Home Page: https://www.npmjs.com/package/mscgenjs-cli

License: Other

JavaScript 0.25% HTML 0.60% Shell 3.20% TypeScript 95.96%
mscgen sequence-chart sequence-diagram command-line-tool cli

mscgenjs-cli's People

Contributors

sverweij avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mscgenjs-cli's Issues

Getting stdout maxBuffer exceeded error

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.

ts.xu.gz

Does not run under msdos & derivatives (like MS windows)

Only under msdos derivatives (like MS Windows 7, Windows 8, Windows 10):

  • transformations to pictures (svg, png, jpeg) fail (error below - phantomjs related) e.g.
    bin/mscgen_js samples/coolchart.mscgen shows an error from requirejs complaining it
    cannot find the mscgenjs package - this is the requirejs in the page called from phantomjs...
  • all other commands work ๐Ÿ‘ - but these don't use phantomjs. Or requirejs ...
  • The error does not occur on linux/ unix/ macos

(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, ...).

Does not generate png file from msgenny file

Please provide an example for msgenney generation

Expected Behavior

type-password.png file is genereated.

Current Behavior

type-password.png file is not genereated.

Possible Solution

Steps to Reproduce (for bugs)

  1. create type-password.msgenny file with content
    wordwrapentities=false

    user -- mobile : enter password

    user -- mobile : enter passowrd confirmation

  2. mscgenjs -I msgenny -i type-password.msgenny -o type-password.png -T png

Context

Your Environment

  • Version used: 4.0.0
  • Node version: 13.2.0
  • Operating System and version: Maca OSX catalina
  • Link to your project:

configuring mscgen js.cli for internal network

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.

Invalid non-string/buffer chunk

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

Installing mscgenjs-cli 1.3.5 in node4/ npm2 fails with a phantomjs-prebuilt installation error

  • When installing [email protected] in nodejs the system produces the error + trace as below
  • In nodejs5/ npm3: no probs.
$ 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)

Applying the (experimental) fountainpen style when generating a raster graphic results in a mostly black picture.

  • svg generates fine
  • png looks like the picture included below (which suggests some rendering took place
  • this seems to happen for all charts we generate with the combinations -n fountainpen -T png and -n fountainpen -T jpeg
  • sample input included nonetheless

recaptcha-integration

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;
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.