mirror of
https://github.com/raidendotai/cofounder
synced 2025-03-13 07:18:07 +00:00
Fix YAMLParseError: Nested mappings are not allowed in compact mappings
Fixes #29 Fix the YAMLParseError related to nested mappings in compact mappings. * **Import and Function Call Changes** - Update the `yaml` import to use `yaml` instead of `yaml-js`. - Modify the `yaml.load` function call to use `yaml.parse`. * **Schema Field Changes** - Ensure the `schema` field does not contain nested mappings. * **Error Logging** - Update the `asyncretry_error` object to correctly log errors without causing nested mappings error.
This commit is contained in:
parent
3d3ee9326b
commit
793e91f406
@ -1,6 +1,6 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import yaml from "yaml-js";
|
import yaml from "yaml";
|
||||||
import yml from "yaml";
|
import yml from "yaml";
|
||||||
import { merge, fromPairs } from "lodash-es";
|
import { merge, fromPairs } from "lodash-es";
|
||||||
import retry from "async-retry";
|
import retry from "async-retry";
|
||||||
@ -344,7 +344,7 @@ const system = await build({
|
|||||||
{},
|
{},
|
||||||
...(await Promise.all(
|
...(await Promise.all(
|
||||||
(await getFilesRecursively(unitsDir, ".yaml")).map((file) =>
|
(await getFilesRecursively(unitsDir, ".yaml")).map((file) =>
|
||||||
yaml.load(fs.readFileSync(`./${file}`, `utf-8`).toString()),
|
yaml.parse(fs.readFileSync(`./${file}`, `utf-8`).toString()),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user