Giter Site home page Giter Site logo

tsviz's People

Contributors

fede-s avatar joaompneves avatar kiewic avatar luccahellriegel avatar mmv avatar pravdomil avatar tomdavidson 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar

tsviz's Issues

Class properties

Hey this is really awesome!

It is possible to add the class properties to the graph?

Thanks!

The tsbin command's shebang ends with a carriage return

This causes the following error on Linux systems when executing tsviz:

/usr/bin/env: ‘node\r’: No such file or directory

This can be worked around by running the following after installing tsviz (you may need to install the dos2unix program):

dos2unix -F which tsviz

Edit: backtick escapes

Found 0 module(s), events.js:160, throw er; // Unhandled 'error' event

What does it mean the following error?

Found 0 module(s)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1018:11)
    at Socket._writeGeneric (net.js:715:26)
    at Socket._write (net.js:734:8)
    at doWrite (_stream_writable.js:334:12)
    at writeOrBuffer (_stream_writable.js:320:5)
    at Socket.Writable.write (_stream_writable.js:247:11)
    at Socket.write (net.js:661:40)
    at Graph.render (C:\Users\me\AppData\Roaming\npm\node_modules\tsviz\node_modules\graphviz\lib\deps\graph.js:380:18)
    at Graph.output (C:\Users\me\AppData\Roaming\npm\node_modules\tsviz\node_modules\graphviz\lib\deps\graph.js:385:8)
    at Object.buildUml (C:\Users\me\AppData\Roaming\npm\node_modules\tsviz\bin\uml-builder.js:30:7)```

Is having zero modules an error?

The command I ran was:

```winbash
tsviz c:\myProject diagram.png

If I add -recursive, then the error becomes:

Found 234 module(s)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1018:11)
    at Socket._writeGeneric (net.js:715:26)
    at Socket._write (net.js:734:8)
    at doWrite (_stream_writable.js:334:12)
    at writeOrBuffer (_stream_writable.js:320:5)
    at Socket.Writable.write (_stream_writable.js:247:11)
    at Socket.write (net.js:661:40)
    at Graph.render (C:\Users\me\AppData\Roaming\npm\node_modules\tsviz\node_modules\graphviz\lib\deps\graph.js:380:18)
    at Graph.output (C:\Users\me\AppData\Roaming\npm\node_modules\tsviz\node_modules\graphviz\lib\deps\graph.js:385:8)
    at Object.buildUml (C:\Users\me\AppData\Roaming\npm\node_modules\tsviz\bin\uml-builder.js:30:7)

Nested modules / namespaces does not seem to work

I was happily surprised when I managed to find this project, but when I try to document modules where the structure is like this

namespace outer {
    export namespace inner {
        export class Classname {
...
         }
    }
}

I get diagrams like these:
diagram

Class1name--------------
|    OuterNamespace ------------
|    |    InnerNameSpace ----------
|    |    |    Class1name -------------
|    |    |    |
|    |    |    |
|    |    |    |

Class2name--------------
|    OuterNamespace ------------
|    |    InnerNameSpace ----------
|    |    |    Class2name -------------
|    |    |    |
|    |    |    |
|    |    |    |

where the class names are doubled as outer module names so everything is split by class. Is that a bug or my wrong usage? Is this tsviz project still active?

Error: Could not find Graphviz in PATH.

Hello, today I installed Graphviz v2.38 (using graphviz-2.38.msi) on Windows 10. Afterwards I tried to run tsviz src/ diagram.png but I only receive this error message:

Could not find Graphviz in PATH.
events.js:160
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1022:11)
at Socket._writeGeneric (net.js:712:26)
at Socket._write (net.js:731:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at Socket.Writable.write (_stream_writable.js:247:11)
at Socket.write (net.js:658:40)
at Graph.render (C:\Users\Benny\AppData\Roaming\npm\node_modules\tsviz\node_modules\graphviz\lib\deps\graph.js:380:18)
at Graph.output (C:\Users\Benny\AppData\Roaming\npm\node_modules\tsviz\node_modules\graphviz\lib\deps\graph.js:385:8)
at Object.buildUml (C:\Users\Benny\AppData\Roaming\npm\node_modules\tsviz\bin\uml-builder.js:30:7)

So it looks like your tool cannot find Graphviz. Do I need to add a specific .exe to my system variables?

60 Modules found, nothing drawn.

When using this it finds all modules inside the project but only draws a white pixel of 11x11 inside the diagram.png

Diagram:
diagram

CMD:
untitled

GVEdit is not able to display the class diagrams and shows errors

Hello,
I just installed tsviz for the first time, and graphviz download for Windows.

When I open diagram.png in GVEdit I see only "garbage" characters its output consoles shows
working on S:/_W/ARP/UPS.TS/SRC/UPS.TS.RC4/diagram.png
Error: : syntax error in line 1 near '�PNG'
working on S:/_W/ARP/UPS.TS/SRC/UPS.TS.RC4/diagram.png
Error: : syntax error in line 1 near '�PNG'
Error: : syntax error in line 1 near '�PNG'
working on S:/_W/ARP/UPS.TS/SRC/UPS.TS.RC4/diagram.png
Error: : syntax error in line 1 near '�PNG'
working on S:/_W/ARP/UPS.TS/SRC/UPS.TS.RC4/diagram.png
Error: : syntax error in line 1 near '�PNG'

The diagram.png opens in other tools like Adobe FireWorks but only a static horizontal list of diagrams is visible I can't more them around.

I have attached the diagram.png
Let me know what other info I can provide you or email you.
Thank you.
diagram

Unable to run sample

I tried to run sample but got folowing error:

  throw new Error(typeof element + " not supported in " + typeof this);
    ^

    Error: object not supported in object at Module.Element.getElementCollection (C:\Users\Username\Desktop\tsviz-master\bin\ts-elements.js:63:15).

Am I doing something wrong or is it bug ?

TypeError: Cannot read property 'text' of undefined

Using tsviz v1.0.11.

Unfortunately I cannot share the input code as it's proprietary. The input code uses typescript v3.3.3 if that matters.

$ tsviz -r . output.png
/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/ts-analyser.js:60
                childElement = new ts_elements_1.Method(functionDeclaration.name.text, currentElement, getVisibility(node), getLifetime(node));
                                                                                 ^

TypeError: Cannot read property 'text' of undefined
    at analyseNode (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/ts-analyser.js:60:82)
    at /Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/ts-analyser.js:70:56
    at visitEachNode (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/node_modules/typescript/lib/typescript.js:7255:30)
    at Object.forEachChild (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/node_modules/typescript/lib/typescript.js:7412:24)
    at analyseNode (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/ts-analyser.js:70:12)
    at Object.collectInformation (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/ts-analyser.js:13:5)
    at /Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/tsviz.js:57:54
    at Array.map (<anonymous>)
    at getModules (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/tsviz.js:57:10)
    at Object.createGraph (/Users/emlai/.nvm/versions/node/v8.11.2/lib/node_modules/tsviz/bin/tsviz.js:63:19)

throw new Error(typeof element + " not supported in " + typeof this)

Trying to run this on vscode src and getting error
https://github.com/Microsoft/vscode

F:\git\vscode>tsviz -r -d src\ UML.png
C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-elements.js:78
throw new Error(typeof element + " not supported in " + typeof this);
^

Error: object not supported in object
at Module.Element.getElementCollection (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-elements.js:78
:15)
at Module.getElementCollection (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-elements.js:141:54)
at Module.Element.addElement (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-elements.js:75:14)
at analyseNode (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-analyser.js:65:28)
at C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-analyser.js:70:56
at visitEachNode (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\node_modules\typescript\lib\typescript.js:7
255:30)
at Object.forEachChild (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\node_modules\typescript\lib\typescrip
t.js:7484:21)
at analyseNode (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-analyser.js:70:12)
at C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\bin\ts-analyser.js:70:56
at visitNode (C:\Users\llnagy\AppData\Roaming\npm\node_modules\tsviz\node_modules\typescript\lib\typescript.js:7243:
20)

support globs

allow node-globs rather than recursive. This will give finer control over what is graphed - for example, excluding test files co-located with source files.

tsviz -dependencies !(**/*.spec.ts)**/*.ts out.png ?

Is there a way to export this class diagram to excel ?

I want to use this UML diagram ffor coverage analysis using the jest coverage tool.
Right now I don't see a way how jest can give me function table , so planning to use class diagram
as a baseline for discussions. So I'm looking for ways to get this diagram into excel sheet. Is there a way to do that ?

Command not found

on running
$ tsviz -d -r ./src/models/ out.png

I get error

-bash: tsviz: command not found

installed using

npm install tsviz

Error: events.js:167 - throw er; // Unhandled 'error' event

Got the following error while trying to run tsviz despite GraphViz installation and configuration:

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/local/bin/dot ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:266:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:236:12)
    at onErrorNT (internal/child_process.js:407:16)
    [... lines matching original stack trace ...]
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)

Though it sounds similar to #43, the cause of error is different as seen in the following line Error: spawn /usr/local/bin/dot ENOENT. The error is thrown since tsviz couldn't find /usr/local/bin/dot. It was because GraphViz was installed globally in my machine and the location of dot was /usr/bin/dot. To solve it, create a symbolic link in the expected location: sudo ln -s /usr/bin/dot /usr/local/bin/dot.

Though it's the same issue as #5, I'd let it stay here since it includes the symbolic link workaround and the complete error.

Error: spawn /usr/local/bin/dot ENOENT

I'm using nvm to manage my node installation.

tsviz fails on my setup, because it tries to run /usr/local/bin/dot which doesn't exist on my system.

I installed graphviz, but since it's a system package it still doesn't exist on that path.

Abstract function shown as static function

I have a class that contains an abstract function:

public abstract execute();

In the corresponding diagram, it is reflected as follows:

<static> execute()

Considering the fact that 'abstract' and 'static' are two wildly different keywords, I cannot imagine this is the intended behavior.

Error running tsviz

Running on MacOS High Sierra, with GraphViz installed and located correctly in /usr/local/bin, get this error:

ROSELCDV000256K:~ $ tsviz stash/data-query/src/nodes/ out.png
Found 37 module(s)
Done
events.js:167
throw er; // Unhandled 'error' event
^

Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:792:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at Socket._destroy (net.js:617:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:794:10)

Error when running in node

I installed graphviz 2.38 and added to path get this error message

D:\tsviz>tsviz app.component.ts v.png
events.js:160
throw er; // Unhandled 'error' event
^

Error: write EPIPE
at exports._errnoException (util.js:953:11)
at Socket._writeGeneric (net.js:705:26)
at Socket._write (net.js:724:8)
at doWrite (_stream_writable.js:307:12)
at writeOrBuffer (_stream_writable.js:293:5)
at Socket.Writable.write (_stream_writable.js:220:11)
at Socket.write (net.js:650:40)
at Graph.render (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tsv
iz\node_modules\graphviz\lib\deps\graph.js:380:18)
at Graph.output (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tsv
iz\node_modules\graphviz\lib\deps\graph.js:385:8)
at Object.buildUml (C:\Users\Administrator\AppData\Roaming\npm\node_modules
tsviz\bin\uml-builder.js:30:7)

D:\tsviz>

Initial install gets "TypeError: Cannot set properties of null (setting 'dev')"

This tool looks super great, but install seemed to fail:
I've an Evergreen system (on VSCode, Win 10 Pro) having done npm update -g,
Trying npm install -g tsviz-cli
returned:
npm ERR! Cannot set properties of null (setting 'dev')
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users[...]\npm-cache_logs\2022-02-21T16_51_28_618Z-debug-0.log

I got the following error log - which doesn't give me enough to understand what is wrong or needed. Any ideas?!
(Am I supposed to install GraphViz first? You doc didn't seem to indicate that was necessary...)

0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Users\[...]\npm\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'install',
0 verbose cli '-g',
0 verbose cli 'tsviz-cli'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Users[...]\npm\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users[...].npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:C:\Users[...]\npm\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 10ms
18 timing npm:load:configload Completed in 10ms
19 timing npm:load:setTitle Completed in 0ms
20 timing config:load:flatten Completed in 2ms
21 timing npm:load:display Completed in 4ms
22 verbose logfile C:\Users[...]\npm-cache_logs\2022-02-21T16_51_28_618Z-debug-0.log
23 timing npm:load:logFile Completed in 4ms
24 timing npm:load:timers Completed in 1ms
25 timing npm:load:configScope Completed in 0ms
26 timing npm:load Completed in 19ms
27 timing arborist:ctor Completed in 1ms
28 silly logfile start cleaning logs, removing 1 files
29 timing idealTree:init Completed in 5ms
30 timing idealTree:userRequests Completed in 2ms
31 silly idealTree buildDeps
32 silly fetch manifest tsviz-cli@*
33 http fetch GET 200 https://registry.npmjs.org/tsviz-cli 326ms (cache miss)
34 silly placeDep ROOT [email protected] OK for: want: *
35 silly fetch manifest graphviz@>=0.0.8
36 silly fetch manifest tsviz@../tsviz
37 http fetch GET 200 https://registry.npmjs.org/graphviz 111ms (cache miss)
38 timing idealTree:#root Completed in 445ms
39 silly placeDep node_modules/tsviz-cli [email protected] OK for: [email protected] want: >=0.0.8
40 silly placeDep node_modules/tsviz-cli tsviz@ OK for: [email protected] want: ../tsviz
41 silly fetch manifest temp@~0.4.0
42 http fetch GET 200 https://registry.npmjs.org/temp 62ms (cache miss)
43 timing idealTree:node_modules/tsviz-cli Completed in 69ms
44 silly placeDep node_modules/tsviz-cli [email protected] OK for: [email protected] want: ~0.4.0
45 timing idealTree:node_modules/tsviz-cli/node_modules/graphviz Completed in 1ms
46 timing idealTree:node_modules/tsviz-cli/node_modules/temp Completed in 0ms
47 timing idealTree:node_modules/tsviz-cli/node_modules/tsviz Completed in 0ms
48 timing idealTree:node_modules/tsviz Completed in 0ms
49 timing idealTree:buildDeps Completed in 516ms
50 timing idealTree:fixDepFlags Completed in 1ms
51 timing idealTree Completed in 524ms
52 timing reify:loadTrees Completed in 527ms
53 timing reify:diffTrees Completed in 1ms
54 silly reify moves {}
55 timing reify:retireShallow Completed in 0ms
56 timing reify:createSparse Completed in 2ms
57 timing reify:loadBundles Completed in 0ms
58 silly audit bulk request { 'tsviz-cli': [ '2.0.0' ], graphviz: [ '0.0.9' ], temp: [ '0.4.0' ] }
59 silly tarball no local data for temp@https://registry.npmjs.org/temp/-/temp-0.4.0.tgz. Extracting by manifest.
60 timing reifyNode:node_modules/tsviz-cli/node_modules/tsviz Completed in 9ms
61 silly tarball no local data for graphviz@https://registry.npmjs.org/graphviz/-/graphviz-0.0.9.tgz. Extracting by manifest.
62 silly tarball no local data for tsviz-cli@https://registry.npmjs.org/tsviz-cli/-/tsviz-cli-2.0.0.tgz. Extracting by manifest.
63 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 72ms
64 timing auditReport:getReport Completed in 74ms
65 silly audit report {}
66 timing auditReport:init Completed in 0ms
67 timing reify:audit Completed in 74ms
68 http fetch GET 200 https://registry.npmjs.org/graphviz/-/graphviz-0.0.9.tgz 169ms (cache miss)
69 timing reifyNode:node_modules/tsviz-cli/node_modules/graphviz Completed in 180ms
70 http fetch GET 200 https://registry.npmjs.org/temp/-/temp-0.4.0.tgz 213ms (cache miss)
71 timing reifyNode:node_modules/tsviz-cli/node_modules/temp Completed in 220ms
72 http fetch GET 200 https://registry.npmjs.org/tsviz-cli/-/tsviz-cli-2.0.0.tgz 254ms (cache miss)
73 timing reifyNode:node_modules/tsviz-cli Completed in 268ms
74 timing reify:unpack Completed in 268ms
75 timing reify:unretire Completed in 0ms
76 timing build:queue Completed in 0ms
77 timing build:deps Completed in 0ms
78 timing build:queue Completed in 0ms
79 timing build:links Completed in 0ms
80 timing build Completed in 1ms
81 timing reify:build Completed in 1ms
82 timing reify:trash Completed in 1ms
83 timing command:install Completed in 813ms
84 verbose stack TypeError: Cannot set properties of null (setting 'dev')
84 verbose stack at calcDepFlagsStep (C:\Users[...]\npm\node_modules\npm\node_modules@npmcli\arborist\lib\calc-dep-flags.js:34:21)
84 verbose stack at visit (C:\Users[...]\npm\node_modules\npm\node_modules@npmcli\arborist\lib\calc-dep-flags.js:12:20)
84 verbose stack at visitNode (C:\Users[...]\npm\node_modules\npm\node_modules\treeverse\lib\depth-descent.js:57:25)
84 verbose stack at next (C:\Users[...]\npm\node_modules\npm\node_modules\treeverse\lib\depth-descent.js:44:19)
84 verbose stack at depth (C:\Users[...]\npm\node_modules\npm\node_modules\treeverse\lib\depth-descent.js:82:10)
84 verbose stack at depth (C:\Users[...]\npm\node_modules\npm\node_modules\treeverse\lib\depth.js:27:12)
84 verbose stack at calcDepFlags (C:\Users[...]\npm\node_modules\npm\node_modules@npmcli\arborist\lib\calc-dep-flags.js:10:15)
84 verbose stack at Arborist.[copyIdealToActual] (C:\Users[...]\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\reify.js:1495:7)
84 verbose stack at Arborist.reify (C:\Users[...]\npm\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\reify.js:156:35)
84 verbose stack at async Install.exec (C:\Users[...]\npm\node_modules\npm\lib\commands\install.js:157:5)
85 verbose cwd D:\Projects\RangerTrak\rangertrak
86 verbose Windows_NT 10.0.19044
87 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\[...]\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "tsviz-cli"
88 verbose node v17.0.1
89 verbose npm v8.5.1
90 error Cannot set properties of null (setting 'dev')
91 verbose exit 1
92 timing npm Completed in 1089ms
93 verbose unfinished npm timer reify 1645462288892
94 verbose code 1
95 error A complete log of this run can be found in:
95 error C:\Users[...]\npm-cache_logs\2022-02-21T16_51_28_618Z-debug-0.log

Properties on modules

I have a decently sized source base that causes Object not supported in object exception. Debugger shows a property on a module.

Need detail

Hello! You program is very helpfull, but I need help with it.
I have a program on TypeScript. Here is a module.d.ts

export interface IVersion {
    major: number;
    minor: number;
}
export interface IModuleInfo {
    cryptokiVersion: IVersion;
    manufacturerID: string;
    flags: number;
    libraryDescription: string;
    libraryVersion: IVersion;
}
export declare class Module extends core.BaseObject implements IModuleInfo {
    libFile: string;
    libName: string;
    /**
     * Cryptoki interface version
     */
    cryptokiVersion: IVersion;
    /**
     * blank padded manufacturer ID
     */
    manufacturerID: string;
    /**
     * must be zero
     */
    flags: number;
    /**
     * blank padded library description
     */
    libraryDescription: string;
    /**
     * version of library
     */
    libraryVersion: IVersion;
    constructor(lib: pkcs11.Pkcs11);
    protected getInfo(): void;
    /**
     * initializes the Cryptoki library
     */
    initialize(): void;
    /**
     * indicates that an application is done with the Cryptoki library
     */
    finalize(): void;
    /**
     * obtains a list of slots in the system
     * @param {number} tokenPresent only slots with tokens. Default `True`
     */
    getSlots(tokenPresent?: boolean): slot.SlotCollection;
    /**
     * loads pkcs11 lib
     */
    static load(libFile: string, libName?: string): Module;
}

Result of tsviz program:

image

  • Why are properies of Module class not shown?
  • Why is protected method getInfo not shown?
  • Maybe it wuldbe better to mark static function as #?

Thank you!

Allow PopertyDeclarations

In ts-analyser.ts only GetAccessor and SetAccessor are selected in the case switcher of the analyseNode function. Additionally general PropertyDeclaration should be allowed, otherwiese normal "fields" will never appear in the uml. I used this:

case ts.SyntaxKind.PropertyDeclaration:
case ts.SyntaxKind.GetAccessor:
case ts.SyntaxKind.SetAccessor:

No way to see "has a" relationship

On the generated diagram you can only see which class is a subclass of which ("is a" relationship).

It would be great to also have another type of arrows for composition ("has a") relationship.

How to export svg file?

Hi,
I tried this cool tool. But I could not export svg file.
If I give the -svg param, the exported file still is a png.

Could you show me how to export svg?

Thanks a lot!

Newer Version Not on NPM/Yarn

The latest version here is not on NPM/Yarn and is missing the -svg flag.

Also, the version number on NPM/Yarn does not match the package.json file, so I am not sure what the real version should be.

I will be looking for another tool since it does not look like this tool will not be maintained, which is a shame since it looks like a great tool.

I could contribute in my spare time if needed.

FEATURE: Output does not create directories

When specifying the output file, the tsviz will not create the directory tree if it does not exist, and an actual output file is not generated. Ideally, the directory should be created. At the very least, an error that the program cannot create the image should be returned to the user.

tsviz -r src/ path/to/missing/dir/Graph.png

LICENSE file

I saw that you've selected the ISC license, it's listed in the package.json.

Perhaps you could consider adding a LICENSE file to the repo to make it more clear.
The template for the license can be found here:
https://en.wikipedia.org/wiki/ISC_license

No diagram generated

Hi there!
I´m trying to get a UML diagram from my existing Angular 2 (Typescript) project. Sourcecode is located under src with some subfolders and an index.ts in it. When I try to run

tsviz -dependencies src/ C:\Users\xxx\Desktop\test.png

I get "done" from terminal - but that´s it. No .png-file is generated.
Am I missing something using tsviz? Readme is quite short so I couldn´t point out what I did wrong.
If you need any more information I´ll provide you.
Thanks!

Allow private and static methods and properties

Hi

Currently there are only private signatures allowed. See uml-builder.ts

function combineSignatures<T extends Element>(elements: T[], map: (e: T) => string): string { return elements.filter(e => (e.visibility == Visibility.Public)) .map(e => map(e) + "\\l") .join(""); }

Here as well private and static methods/prpoerties should be filtered.

What is the reason for only selecting publics?

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.