@mermaid-js/mermaid-cli 11.4.2 → 11.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -11
- package/dist/assets/index-DQukWeul.js +38 -0
- package/dist/index.html +1 -1
- package/dist-types/src/index.d.ts +10 -3
- package/dist-types/src/index.d.ts.map +1 -1
- package/dist-types/src/version.d.ts +1 -1
- package/package.json +3 -2
- package/src/index.js +40 -11
- package/src/version.js +1 -1
- package/dist/assets/index-BgzLmH-2.js +0 -38
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://percy.io/Mermaid/mermaid-cli)
|
|
8
8
|
[](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
|
|
9
9
|
|
|
10
|
-
This is a command-line interface (CLI) for [mermaid](https://mermaid.js.org/). It takes a mermaid definition file as input and generates an
|
|
10
|
+
This is a command-line interface (CLI) for [mermaid](https://mermaid.js.org/). It takes a mermaid definition file as input and generates an SVG/PNG/PDF file as output.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -44,7 +44,7 @@ The `--cssFile` option can be used to inline some custom CSS.
|
|
|
44
44
|
|
|
45
45
|
Please see [./test-positive/flowchart1.css](test-positive/flowchart1.css) for an example of a CSS file that has animations.
|
|
46
46
|
|
|
47
|
-
**Warning**: If you want to override `mermaid`'s [`themeCSS`](https://mermaid.js.org/config/schema-docs/config.html#themecss), we recommend instead adding `{"themeCSS": "..."})` to your mermaid `--configFile`. You may also need to use [`!important`](https://developer.mozilla.org/en-US/docs/Web/CSS/important) to override
|
|
47
|
+
**Warning**: If you want to override `mermaid`'s [`themeCSS`](https://mermaid.js.org/config/schema-docs/config.html#themecss), we recommend instead adding `{"themeCSS": "..."})` to your mermaid `--configFile`. You may also need to use [`!important`](https://developer.mozilla.org/en-US/docs/Web/CSS/important) to override mermaid's `themeCSS`.
|
|
48
48
|
|
|
49
49
|
**Warning**: Inline CSS files may be blocked by your browser, depending on the [HTTP Content-Security-Policy header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) of the website that hosts your SVG.
|
|
50
50
|
|
|
@@ -157,8 +157,8 @@ podman run --userns keep-id --user ${UID} --rm -v /path/to/diagrams:/data:z ghcr
|
|
|
157
157
|
|
|
158
158
|
The key differences in the podman command versus the docker command are:
|
|
159
159
|
|
|
160
|
-
- The addition of the `--userns keep-id` argument. This allows the container to keep the same UID as the current user's UID in the container namespace instead of mapping to a subuid.
|
|
161
|
-
- The addition of `:z` to the end of the volume mapping. This instructs podman to relabel the files in the volume with the SELinux label `container_file_t`, which allows processes in the container to access the files. See the "Labeling Volume Mounts" section [
|
|
160
|
+
- The addition of the `--userns keep-id` argument. This allows the container to keep the same UID as the current user's UID in the container namespace instead of mapping to a subuid. To learn more, see the [`userns=mode` documentation](https://docs.podman.io/en/v4.4/markdown/options/userns.container.html).
|
|
161
|
+
- The addition of `:z` to the end of the volume mapping. This instructs podman to relabel the files in the volume with the SELinux label `container_file_t`, which allows processes in the container to access the files. See the "Labeling Volume Mounts" section of [podman-run (1)](https://docs.podman.io/en/latest/markdown/podman-run.1.html#volume-v-source-volume-host-dir-container-dir-options) for more info.
|
|
162
162
|
|
|
163
163
|
In previous version, the input files were mounted in `/home/mermaidcli`. You can
|
|
164
164
|
restore this behaviour with the `--workdir` option:
|
|
@@ -192,13 +192,6 @@ npm install @mermaid-js/mermaid-cli
|
|
|
192
192
|
./node_modules/.bin/mmdc -h
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
Or use NPM:
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
npm install @mermaid-js/mermaid-cli
|
|
199
|
-
./node_modules/.bin/mmdc -h
|
|
200
|
-
```
|
|
201
|
-
|
|
202
195
|
### Run with npx
|
|
203
196
|
|
|
204
197
|
[`npx`](https://www.npmjs.com/package/npx) is installed by default with NPM. It
|