Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.2.2 - October 2025

### Bugs fixed

* Fix #9: broken `preview` when workspace file name is not the default one, `workspace.dsl`.

## 1.2.1 - September 2025

### Bugs fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# C4 DSL Visual Studio Code Extension

![](https://img.shields.io/badge/last_updated-september_2025-0c7cba)
![](https://img.shields.io/badge/vsix-v1.2.1-ef8d22)
![](https://img.shields.io/badge/last_updated-october_2025-0c7cba)
![](https://img.shields.io/badge/vsix-v1.2.2-ef8d22)

![](https://img.shields.io/badge/publisher-archicionado-fcc438)
![](https://img.shields.io/badge/chat-on_github_issue-19967d)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"license": "SEE LICENSE IN LICENSE.txt",
"publisher": "archicionado",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "https://rvr06.github.io/cornifer/",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion src/previewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ export function setupPreviewProvider(context: ExtensionContext) {
let tag = workspace.getConfiguration('cornifer').structurizrLiteTag;
let ws = path.dirname(activeEditor.document.uri.fsPath);
let workspaceName = ws.split(path.sep).pop();
let fileName = path.basename(activeEditor.document.uri.fsPath, '.dsl');

let containerName = createRandomString();

portfinder.getPort(function (_: any, port: any) {
console.log(`Starting ${workspaceName} Structurizr Preview...`);

cp.exec(`docker run -p 127.0.0.1:${port}:8080 --name ${containerName} -v "${ws}:/usr/local/structurizr" structurizr/lite:${tag}`,
cp.exec(`docker run -p 127.0.0.1:${port}:8080 --name ${containerName} -v "${ws}:/usr/local/structurizr" -e STRUCTURIZR_WORKSPACE_FILENAME="${fileName}" structurizr/lite:${tag}`,
function (_, stdout, __) {
console.log(stdout);
});
Expand Down