structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

New release so structurizr/cli exports urls #59

Closed pmorch closed 2 years ago

pmorch commented 2 years ago

When using https://structurizr.com/dsl, a url in the input becomes a [[link]] in the output when using -format plantuml/c4plantuml. But not so with structurizr/cli.

I expect the output from https://structurizr.com/dsl to be the same as with structurizr/cli. If this the case, #58 would be possible using only built-in features.

To reproduce:

cat bug/workspace.dsl:

workspace {
    model {
        user = person "User"
        softwareSystem = softwareSystem "Software System" {
            url "http://server/path/to/softaresystem.html"
        }

        user -> softwareSystem "Uses"
    }
    views {
        systemContext softwareSystem {
            include *
            autolayout
        }

        theme default
    }
}

If I put that in https://structurizr.com/dsl and render as C4-PlantUML, I get a line like:

System(SoftwareSystem, "Software System", "")[[http://server/path/to/softaresystem.html]]

But when using structurizr-cli-1.15.0/structurizr.sh the link is missing from the output:

$ ./structurizr-cli-1.15.0/structurizr.sh export -w bug/workspace.dsl -format plantuml/c4plantuml -output bug
$ grep ^System bug/structurizr-SoftwareSystem-SystemContext.puml 
System(SoftwareSystem, "Software System", "")
simonbrowndotje commented 2 years ago

Adding URLs to the C4-PlantUML export is a recent change, which is running on the demo page at https://structurizr.com/dsl but the CLI hasn't had a release yet. This will happen in the next week or so.

pmorch commented 2 years ago

Yeah, Just after you posted your answer, I discovered this commit https://github.com/structurizr/java-extensions/commit/e010920e155f03f6a6f55f6fc2cdb4b3a8895227 which is literally the HEAD commit. I guess I'm on the bleeding edge!

I've just compiled my own build/distributions/structurizr-cli-1.15.0.zip with structurizr-export:1.2.1 and it works flawlessly.

simonbrowndotje commented 2 years ago

v1.16.0 has now been released.