mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Add toml package and update configuration parsing in Dokploy
- Added toml package version 3.0.0 to package.json files in both apps/dokploy and packages/server. - Replaced js-yaml load function with toml parse function for configuration parsing in compose.ts and github.ts files, ensuring compatibility with TOML format. - Updated pnpm-lock.yaml to reflect the new toml dependency.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { load } from "js-yaml";
|
||||
import { parse } from "toml";
|
||||
|
||||
/**
|
||||
* Complete template interface that includes both metadata and configuration
|
||||
@@ -86,7 +86,7 @@ export async function fetchTemplateFiles(
|
||||
try {
|
||||
// Fetch both files in parallel
|
||||
const [templateYmlResponse, dockerComposeResponse] = await Promise.all([
|
||||
fetch(`${baseUrl}/blueprints/${templateId}/template.yml`),
|
||||
fetch(`${baseUrl}/blueprints/${templateId}/template.toml`),
|
||||
fetch(`${baseUrl}/blueprints/${templateId}/docker-compose.yml`),
|
||||
]);
|
||||
|
||||
@@ -99,7 +99,7 @@ export async function fetchTemplateFiles(
|
||||
dockerComposeResponse.text(),
|
||||
]);
|
||||
|
||||
const config = load(templateYml) as CompleteTemplate;
|
||||
const config = parse(templateYml) as CompleteTemplate;
|
||||
|
||||
return { config, dockerCompose };
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user