refactor: change template file format from YAML to TOML

- Updated the TemplateDialog and TemplateGrid components to use 'template.toml' instead of 'template.yml'.
- Modified the CodeEditor component to support 'toml' as a valid language option.
This commit is contained in:
Mauricio Siu
2025-03-30 00:54:42 -06:00
parent d21f87f42c
commit 2dab17bbc0
3 changed files with 3 additions and 3 deletions

View File

@@ -228,7 +228,7 @@ const TemplateDialog: React.FC<TemplateDialogProps> = ({
<div className="relative w-full rounded-md overflow-hidden border">
<CodeEditor
value={templateFiles.config || ""}
language="yaml"
language="toml"
className="font-mono w-full [&_*]:!break-words"
/>
<Button

View File

@@ -82,7 +82,7 @@ const TemplateGrid: React.FC<TemplateGridProps> = ({ view }) => {
try {
const [dockerComposeRes, configRes] = await Promise.all([
fetch(`/blueprints/${templateId}/docker-compose.yml`),
fetch(`/blueprints/${templateId}/template.yml`),
fetch(`/blueprints/${templateId}/template.toml`),
]);
const dockerCompose = dockerComposeRes.ok

View File

@@ -121,7 +121,7 @@ function dockerComposeComplete(
interface Props extends ReactCodeMirrorProps {
wrapperClassName?: string;
disabled?: boolean;
language?: "yaml" | "json" | "properties" | "shell";
language?: "yaml" | "json" | "properties" | "shell" | "toml";
lineWrapping?: boolean;
lineNumbers?: boolean;
}