Skip to content

Latest commit

 

History

History

config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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