{
  "version": 3,
  "sources": ["../../../../../src/platform/node/index.ts"],
  "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport yaml from 'js-yaml';\nimport fs from 'node:fs';\n\nimport { type LogOptions } from '../../config';\n\n/**\n * Node config loader.\n */\nexport const loadOptions = (filepath?: string): LogOptions | undefined => {\n  if (filepath) {\n    // console.log(`Log file: ${fullpath}`);\n    try {\n      const text = fs.readFileSync(filepath, 'utf-8');\n      if (text) {\n        return yaml.load(text) as LogOptions;\n      }\n    } catch (err) {\n      console.warn(`Invalid log file: ${filepath}`);\n    }\n  }\n};\n"],
  "mappings": ";;;AAIA,OAAOA,UAAU;AACjB,OAAOC,QAAQ;AAOR,IAAMC,cAAc,CAACC,aAAAA;AAC1B,MAAIA,UAAU;AAEZ,QAAI;AACF,YAAMC,OAAOH,GAAGI,aAAaF,UAAU,OAAA;AACvC,UAAIC,MAAM;AACR,eAAOJ,KAAKM,KAAKF,IAAAA;MACnB;IACF,SAASG,KAAK;AACZC,cAAQC,KAAK,qBAAqBN,QAAAA,EAAU;IAC9C;EACF;AACF;",
  "names": ["yaml", "fs", "loadOptions", "filepath", "text", "readFileSync", "load", "err", "console", "warn"]
}
