Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 2.39 KB

README.md

File metadata and controls

74 lines (55 loc) · 2.39 KB

Config

Sigyn configuration manager

npm version size ossf scorecard license

Please see the full documentation here.

🧠 Visual Studio Code JSON schema

You can easily enjoy autocompletion & documentation from JSON schema for your sigyn.config.json on Visual Studio Code.

  1. Go in settings. Ctrl + Shift + P -> Preferences: Open User Settings (JSON)
  2. Add the JSON Schemas:
"json.schemas": [
  {
    "fileMatch": ["*.sigyn.config.json"],
    "url":  "https://raw.githubusercontent.com/MyUnisoft/sigyn/main/src/config/src/schemas/extendedConfigSchema.json"
  },
  {
    "fileMatch": ["sigyn.config.json"],
    "url":  "https://raw.githubusercontent.com/MyUnisoft/sigyn/main/src/config/src/schemas/configSchema.json"
  }
]

🌐 API

initConfig(path: string | URL): Promise<SigynConfig>

Initialize Sigyn config given the path to the JSON config file.

getConfig(): SigynConfig

Returns the previously initialized Sigyn config.

Note

If you try to get config while the config has not been initialized, it will throws.

validateConfig(config: PartialSigynConfig): void

Validate Sigyn configuration against an internal AJV Schema.

validateExtendedConfig(config: ExtendedSigynConfig): void

Validate Sigyn extended configuration against an internal AJV Schema.

🖋️ Interfaces

See Interfaces

License

MIT