mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
fix: read yaml with intAsBigInt
This commit is contained in:
1 parent
e5d842571b
commit
0d4267e356
2 files changed
+2
-2
No files matched your search
@@ -30,7 +30,7 @@ function fromProperties(value: string) {
|
||||
}
|
||||
function toProperties(value: string) {
|
||||
try {
|
||||
return properties.stringify(flatten(yaml.parse(value)));
|
||||
return properties.stringify(flatten(yaml.parse(value, { intAsBigInt: true })));
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
|
||||
@@ -9,7 +9,7 @@ const nestify = ref(false);
|
||||
|
||||
function transformer(value: string) {
|
||||
return withDefaultOnError(() => {
|
||||
let obj = parseYaml(value, { merge: true });
|
||||
let obj = parseYaml(value, { merge: true, intAsBigInt: true });
|
||||
if (nestify.value) {
|
||||
if (obj && Array.isArray(obj)) {
|
||||
obj = (obj as any[]).map(o => nestifyObject(o));
|
||||
|
||||
Reference in new issue
Block a user