Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9c43d4b
Update dbml-renderer (#1448)
bobzomer Feb 26, 2023
f96faaa
Fix GitLab capitalization (#1454)
fdmarcin Mar 6, 2023
eea3dbf
Update UMlet to 15.0.0 (#1456)
ggrossetie Mar 8, 2023
dfce464
Fixing typos (#1458)
deining Mar 10, 2023
583a3df
Update excalidraw (#1453)
sleiner Mar 11, 2023
3f1930c
Docs, diagram options: remove duplicate sections (#1463)
urban-adeininger Mar 13, 2023
a2e21f1
D2: fix incorrect color number for theme 'Neutral grey' (#1467)
deining Mar 13, 2023
f11d934
Prepare release
ggrossetie Mar 18, 2023
3d6f5d2
Release 0.20.0
ggrossetie Mar 18, 2023
f14da28
Enable PDF output for Erd and GraphViz
ggrossetie Mar 18, 2023
27d58f9
chore(deps): update dependency markupsafe to v2.1.2 (#1436)
ggrossetie Mar 18, 2023
ed566cb
add missing font package to wireviz container (#1478)
copyrights Mar 18, 2023
1a8a07b
Wireviz: Cleanup requirements; update Flask and Werkzeug to 2.2.3 (#1…
copyrights Mar 19, 2023
689f0da
Documentation: clarify use of diagram options that act as flags (#1469)
urban-adeininger Mar 19, 2023
488cfc4
Use Ubuntu base image for main container (#1476)
felixvanoost Mar 25, 2023
a08cdfc
Use UMlet as a native binary instead of a Java library (#1486)
ggrossetie Mar 26, 2023
47f5b72
resolves #1449 allow to configure additional allowed headers (CORS) u…
ggrossetie Mar 26, 2023
cd7d08e
build server inside container build pipeline
Mar 25, 2023
ab42c4c
ignore missing .git directory
Mar 25, 2023
331b480
do not build server outside container build
Mar 25, 2023
9051072
rebase changes
Mar 28, 2023
b0166bf
buildah test
Mar 28, 2023
11fbfc2
upgrade buildah
Mar 28, 2023
bb09537
add sudo
Mar 28, 2023
d6d7585
update to jammy
Mar 28, 2023
05cf55f
remove "
Mar 28, 2023
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
53 changes: 19 additions & 34 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,28 @@ on:

jobs:
test-containers:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin

- name: Install Java dependencies
run: make installLocalDependencies

- name: Build Java server
run: make buildServer

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
- name: Upgrade buildah
run: ./upgrade-buildah.sh
- name: Buildah Action
uses: redhat-actions/buildah-build@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Build container images
run: make buildDockerImages
env:
CACHE_FROM: 'type=local,src=/tmp/.buildx-cache'
CACHE_TO: 'type=local,dest=/tmp/.buildx-cache-new'

image: docker.io/yuzutech/kroki
tags: latest ${{ github.sha }}
containerfiles: |
./server/ops/docker/jdk11-jammy/Dockerfile
context: server
extra-args: |
--ulimit="nofile=65535:65535"
--runtime runc
--build-context nomnoml=./nomnoml
--build-context vega=./vega
--build-context dbml=./dbml
--build-context wavedrom=./wavedrom
--build-context bytefield=./bytefield
--build-context kroki-src=.
- name: 'Setup Node.js 16'
uses: actions/setup-node@v3
with:
Expand All @@ -69,4 +55,3 @@ jobs:
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

18 changes: 0 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- name: Set up JDK 11
uses: actions/setup-java@v3.9.0
with:
java-version: 11
distribution: temurin
- name: Install Java dependencies
run: make installLocalDependencies
- name: Build Java server
run: make buildServer
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# create the GitHub release
- name: Create release
Expand All @@ -45,15 +36,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- name: Set up JDK 11
uses: actions/setup-java@v3.9.0
with:
java-version: 11
distribution: temurin
- name: Install Java dependencies
run: make installLocalDependencies
- name: Build Java server
run: make buildServer
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SERVICES_TIMEOUT=15
default:

installLocalDependencies:
mvn install:install-file -Dfile=./umlet/lib/umlet-mini-14.3.0.jar -DgroupId=com.umlet -DartifactId=umlet-mini -Dversion=14.3.0 -Dpackaging=jar
mvn install:install-file -Dfile=./server/lib/ditaamini-1.0.3.jar -DgroupId=ditaa -DartifactId=ditaa-mini -Dversion=1.0.3 -Dpackaging=jar

buildServer:
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ If you have found a security issue or concern with Kroki please email the mainta

## Expectations

We will do everything we can to communicate in a timely manner and address your concerns, but realize that we do have day jobs and this is an open source project so have a little patience if you don't hear back from us immediatly.
We will do everything we can to communicate in a timely manner and address your concerns, but realize that we do have day jobs and this is an open source project so have a little patience if you don't hear back from us immediately.
2 changes: 1 addition & 1 deletion blockdiag/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ funcparserlib==1.0.1
gunicorn==20.1.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
MarkupSafe==2.1.2
nwdiag==3.0.0
Pillow==9.4.0
reportlab==3.6.12
Expand Down
45 changes: 31 additions & 14 deletions ci/tasks/update-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ospath from 'path'
import { createRequire } from 'node:module'
import { spawn } from 'node:child_process'

const KROKI_ALPINE_VERSION = '3.16'
const KROKI_UBUNTU_VERSION = 'jammy'
const require = createRequire(import.meta.url)
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const rootDir = ospath.join(__dirname, '..', '..')
Expand Down Expand Up @@ -143,10 +143,21 @@ try {
}
}

const wirevizRequirementsContent = await fs.readFile(ospath.join(rootDir, 'wireviz', 'requirements.txt'), 'utf8')
for (const line of wirevizRequirementsContent.split('\n')) {
const found = line.match(/^(?<name>[a-zA-Z]+)==(?<version>.*)$/)
if (found) {
const { name, version } = found.groups
if (diagramLibraryNames.includes(name)) {
diagramLibraryVersions[name] = version
}
}
}

addDiagramLibraryPackageVersion('bpmn', 'bpmn-js')
addDiagramLibraryPackageVersion('bytefield', 'bytefield-svg')
addDiagramLibraryPackageVersion('dbml', '@softwaretechnik/dbml-renderer')
addDiagramLibraryPackageVersion('excalidraw', '@excalidraw/utils')
addDiagramLibraryPackageVersion('excalidraw', '@excalidraw/excalidraw')
addDiagramLibraryPackageVersion('mermaid')
addDiagramLibraryPackageVersion('nomnoml')
addDiagramLibraryPackageVersion('vega')
Expand All @@ -159,7 +170,7 @@ try {
diagramLibraryVersions.diagramsnet = [...diagramsnetVersionFound][0].groups.version
}

const dockerfileContent = await fs.readFile(ospath.join(rootDir, 'server', 'ops', 'docker', 'jdk11-alpine', 'Dockerfile'), 'utf8')
const dockerfileContent = await fs.readFile(ospath.join(rootDir, 'server', 'ops', 'docker', 'jdk11-jammy', 'Dockerfile'), 'utf8')
for (const line of dockerfileContent.split('\n')) {
const erdVersionFound = line.match(/^FROM yuzutech\/kroki-builder-erd:(?<version>\S+) as kroki-builder-static-erd$/)
if (erdVersionFound) {
Expand All @@ -171,7 +182,16 @@ try {
const { version } = pikchrVersionFound.groups
diagramLibraryVersions.pikchr = version.slice(0, 10)
}
const d2VersionFound = line.match(/^ARG D2_VERSION=(?<version>.+)$/)
const umletVersionFound = line.match(/^ARG UMLET_VERSION=(?<version>.+)$/)
if (umletVersionFound) {
const { version } = umletVersionFound.groups
diagramLibraryVersions.umlet = version.split('+')[0]
}
}

const d2GoModContent = await fs.readFile(ospath.join(rootDir, 'server', 'ops', 'docker', 'go.mod'), 'utf8')
for (const line of d2GoModContent.split('\n')) {
const d2VersionFound = line.match(/^require oss.terrastruct.com\/d2 v(?<version>.+)$/)
if (d2VersionFound) {
const { version } = d2VersionFound.groups
diagramLibraryVersions.d2 = version
Expand All @@ -196,21 +216,18 @@ try {
const { value: ditaaVersion } = await mvnEvaluateExpression('ditaa-mini.version')
diagramLibraryVersions.ditaa = ditaaVersion

const { value: umletVersion } = await mvnEvaluateExpression('umlet-mini.version', ospath.join('umlet', 'pom.xml'))
diagramLibraryVersions.umlet = umletVersion

// GraphViz version
const alpinePackagesUrl = `https://dl-cdn.alpinelinux.org/alpine/v${KROKI_ALPINE_VERSION}/main/x86_64/`
const alpinePackagesResponse = await fetch(alpinePackagesUrl)
if (alpinePackagesResponse.status >= 200 && alpinePackagesResponse.status < 400) {
const alpinePackagesContent = await alpinePackagesResponse.text()
const found = alpinePackagesContent.match(/<a href="graphviz-(?<version>[0-9.]+)-r[0-9]+\.apk.*/)
const ubuntuPackagesUrl = `https://packages.ubuntu.com/${KROKI_UBUNTU_VERSION}/graphviz`
const ubuntuPackagesResponse = await fetch(ubuntuPackagesUrl)
if (ubuntuPackagesResponse.status >= 200 && ubuntuPackagesResponse.status < 400) {
const ubuntuPackagesContent = await ubuntuPackagesResponse.text()
const found = ubuntuPackagesContent.match(/Package: graphviz \((?<version>[0-9.]+)-[0-9]+\)/)
if (found) {
const { version } = found.groups
diagramLibraryVersions.graphviz = version
}
} else {
console.error(`Unable to GET ${alpinePackagesUrl} - ${alpinePackagesResponse.status} ${alpinePackagesResponse.statusText} - ${await alpinePackagesResponse.text()}`)
console.error(`Unable to GET ${ubuntuPackagesUrl} - ${ubuntuPackagesResponse.status} ${ubuntuPackagesResponse.statusText} - ${await ubuntuPackagesResponse.text()}`)
process.exit(1)
}

Expand Down Expand Up @@ -251,7 +268,7 @@ try {
await updateServiceGetVersion('Svgbob.java', diagramLibraryVersions.svgbob)
await updateServiceGetVersion('Umlet.java', diagramLibraryVersions.umlet)
await updateServiceGetVersion('Wavedrom.java', diagramLibraryVersions.wavedrom)
await updateServiceGetVersion('WireViz.java', diagramLibraryVersions.wireviz)
await updateServiceGetVersion('Wireviz.java', diagramLibraryVersions.wireviz)
await updateVegaServiceGetVersion(diagramLibraryVersions.vega, diagramLibraryVersions.vegalite)

} catch (err) {
Expand Down
14 changes: 7 additions & 7 deletions dbml/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 dbml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"keywords": [],
"author": "Bruno Obsomer",
"dependencies": {
"@softwaretechnik/dbml-renderer": "1.0.22"
"@softwaretechnik/dbml-renderer": "1.0.26"
},
"devDependencies": {
"standard": "17.0.0"
Expand Down
2 changes: 1 addition & 1 deletion diagrams.net/assets/stencils/aws/deployment_management.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
<fillstroke/>
</foreground>
</shape>
<shape name="AWS Elastic BeanStalk Applicaton" h="53.89" w="31.1" aspect="variable" strokewidth="inherit">
<shape name="AWS Elastic BeanStalk Application" h="53.89" w="31.1" aspect="variable" strokewidth="inherit">
<connections>
<constraint x="0.5" y="0.07" perimeter="0" name="N"/>
<constraint x="0.13" y="1" perimeter="0" name="S"/>
Expand Down
2 changes: 1 addition & 1 deletion diagrams.net/assets/stencils/office/servers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="59.17" name="Excahnge Client Access Server Role" strokewidth="inherit" w="51.75">
<shape aspect="variable" h="59.17" name="Exchange Client Access Server Role" strokewidth="inherit" w="51.75">
<connections/>
<foreground>
<path>
Expand Down
3 changes: 2 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ target "kroki" {
dbml = "./dbml"
wavedrom = "./wavedrom"
bytefield = "./bytefield"
kroki-src = "."
}
dockerfile = "ops/docker/jdk11-alpine/Dockerfile"
dockerfile = "ops/docker/jdk11-jammy/Dockerfile"
tags = ["yuzutech/kroki:${TAG}"]
}

Expand Down
6 changes: 3 additions & 3 deletions docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ asciidoc:
bytefield-version: 1.7.0
c4plantuml-version: 1.2022.5
d2-version: 0.1.5
dbml-version: 1.0.22
dbml-version: 1.0.26
diagramsnet-version: 16.2.4
ditaa-version: 1.0.3
erd-version: 0.2.1.0
excalidraw-version: 0.1.2
excalidraw-version: 0.14.2
graphviz-version: 3.0.0
mermaid-version: 9.3.0
nomnoml-version: 1.5.3
Expand All @@ -25,7 +25,7 @@ asciidoc:
seqdiag-version: 3.0.0
structurizr-version: 1.23.0
svgbob-version: 0.6.0
umlet-version: 14.3.0
umlet-version: 15.0.0
vega-version: 5.22.1
vegalite-version: 5.6.0
wavedrom-version: 2.9.1
Expand Down
20 changes: 18 additions & 2 deletions docs/modules/setup/pages/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In addition, `KROKI_LISTEN` supports UNIX domain sockets by prefixing `unix://`
====
*`KROKI_PORT` is deprecated and will be removed in the future.*

We are deprecating this option because it conflicts with Kubernetes and Docker built-in environnement variables.
We are deprecating this option because it conflicts with Kubernetes and Docker built-in environment variables.
For reference, {url-k8s-environment-variables}[Kubernetes will automatically set the environment variable] `\{SERVICE_NAME}_PORT` to `tcp://1.2.3.4:8000`.
As you might have guessed, if you use `KROKI` as a service name, there's going to be a problem!
In fact, Kroki expects the value of `KROKI_PORT` to be an integer value. +
Expand Down Expand Up @@ -80,7 +80,23 @@ It's also possible to restrict the PlantUML `!include` directive using the follo
KROKI_PLANTUML_INCLUDE_PATH:: The include path to set for PlantUML.
KROKI_PLANTUML_INCLUDE_WHITELIST:: The name of a file that consists of a list of Java regular expressions for valid includes.
KROKI_PLANTUML_INCLUDE_WHITELIST_0, KROKI_PLANTUML_INCLUDE_WHITELIST_1, ... KROKI_PLANTUML_INCLUDE_WHITELIST___N__:: One regex to add to the include whitelist per environment variable. Search will stop at the first empty or undefined integer number.
KROKI_PLANTUML_ALLOW_INCLUDE:: Either `false` (default) or `true`. Determines if PlantUML will fetch `!include` directives that reference external URLs.For example, PlantUML allows the !import directive to pull fragments from the filesystem or a remote URL or the standard library.
KROKI_PLANTUML_ALLOW_INCLUDE:: Either `false` (default) or `true`. Determines if PlantUML will fetch `!include` directives that reference external URLs. For example, PlantUML allows the !import directive to pull fragments from the filesystem or a remote URL or the standard library.

== Cross-origin resource sharing (CORS)

By default, the following headers are allowed:

- `Access-Control-Allow-Origin`
- `Origin`
- `Content-Type`
- `Accept`

If you need to pass additional headers, you can use `KROKI_CORS_ALLOWED_HEADERS` to allow additional headers.
For instance, if you need to allow `x-requested-with` and `x-app-version` headers:

```
KROKI_CORS_ALLOWED_HEADERS="x-requested-with,x-app-version"
```

== Diagram Binary Paths

Expand Down
Loading