@rainbow-industries/rainbow-config
Version:
A YAML config file loader
496 lines (495 loc) • 15.4 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.19.4",
"schemaVersion": 1004,
"oldestForwardsCompatibleVersion": 1001,
"tsdocConfig": {
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"noStandardTags": true,
"tagDefinitions": [
{
"tagName": "@alpha",
"syntaxKind": "modifier"
},
{
"tagName": "@beta",
"syntaxKind": "modifier"
},
{
"tagName": "@defaultValue",
"syntaxKind": "block"
},
{
"tagName": "@decorator",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@deprecated",
"syntaxKind": "block"
},
{
"tagName": "@eventProperty",
"syntaxKind": "modifier"
},
{
"tagName": "@example",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@experimental",
"syntaxKind": "modifier"
},
{
"tagName": "@inheritDoc",
"syntaxKind": "inline"
},
{
"tagName": "@internal",
"syntaxKind": "modifier"
},
{
"tagName": "@label",
"syntaxKind": "inline"
},
{
"tagName": "@link",
"syntaxKind": "inline",
"allowMultiple": true
},
{
"tagName": "@override",
"syntaxKind": "modifier"
},
{
"tagName": "@packageDocumentation",
"syntaxKind": "modifier"
},
{
"tagName": "@param",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@privateRemarks",
"syntaxKind": "block"
},
{
"tagName": "@public",
"syntaxKind": "modifier"
},
{
"tagName": "@readonly",
"syntaxKind": "modifier"
},
{
"tagName": "@remarks",
"syntaxKind": "block"
},
{
"tagName": "@returns",
"syntaxKind": "block"
},
{
"tagName": "@sealed",
"syntaxKind": "modifier"
},
{
"tagName": "@see",
"syntaxKind": "block"
},
{
"tagName": "@throws",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@typeParam",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@virtual",
"syntaxKind": "modifier"
},
{
"tagName": "@betaDocumentation",
"syntaxKind": "modifier"
},
{
"tagName": "@internalRemarks",
"syntaxKind": "block"
},
{
"tagName": "@preapproved",
"syntaxKind": "modifier"
}
],
"supportForTags": {
"@alpha": true,
"@beta": true,
"@defaultValue": true,
"@decorator": true,
"@deprecated": true,
"@eventProperty": true,
"@example": true,
"@experimental": true,
"@inheritDoc": true,
"@internal": true,
"@label": true,
"@link": true,
"@override": true,
"@packageDocumentation": true,
"@param": true,
"@privateRemarks": true,
"@public": true,
"@readonly": true,
"@remarks": true,
"@returns": true,
"@sealed": true,
"@see": true,
"@throws": true,
"@typeParam": true,
"@virtual": true,
"@betaDocumentation": true,
"@internalRemarks": true,
"@preapproved": true
}
}
},
"kind": "Package",
"canonicalReference": "slashdocs!",
"docComment": "",
"name": "slashdocs",
"members": [
{
"kind": "EntryPoint",
"canonicalReference": "slashdocs!",
"name": "",
"members": [
{
"kind": "Class",
"canonicalReference": "slashdocs!RainbowConfig:class",
"docComment": "/**\n * YAML config fiel loader\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export default class RainbowConfig "
}
],
"releaseTag": "Public",
"name": "RainbowConfig",
"members": [
{
"kind": "Constructor",
"canonicalReference": "slashdocs!RainbowConfig:constructor(1)",
"docComment": "/**\n * Constructs a new instance of the `RainbowConfig` class\n *\n * @param env - the environment to use for loading the config file\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor(env?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ");"
}
],
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "env",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
},
{
"kind": "Method",
"canonicalReference": "slashdocs!RainbowConfig#addEnvironment:member(1)",
"docComment": "/**\n * Add an environment to your application\n *\n * @param name - environment name\n *\n * @param alternativeName - alternative environment name that maps to the name i.e. int vs integration\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "addEnvironment(name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", alternativeName?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "void"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "alternativeName",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
],
"name": "addEnvironment"
},
{
"kind": "Method",
"canonicalReference": "slashdocs!RainbowConfig#get:member(1)",
"docComment": "/**\n * Load a value from the config file\n *\n * @param key - the config key to get. Can be a path separated by .\n *\n * @returns the config item\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "get(key: "
},
{
"kind": "Content",
"text": "string | undefined"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "any"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "key",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "get"
},
{
"kind": "Method",
"canonicalReference": "slashdocs!RainbowConfig#getEnvironment:member(1)",
"docComment": "/**\n * Returns the execution environment name\n *\n * @returns the environment the application is executed in\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getEnvironment(): "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "getEnvironment"
},
{
"kind": "Method",
"canonicalReference": "slashdocs!RainbowConfig#getTranslatedEnvironment:member(1)",
"docComment": "/**\n * checks if there is an alternative name for a given environment name, translates it if yes\n *\n * @param env - the name of the enviroment to translate\n *\n * @returns the translated or original environment if no translation was found\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getTranslatedEnvironment(env: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "env",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "getTranslatedEnvironment"
},
{
"kind": "Method",
"canonicalReference": "slashdocs!RainbowConfig#load:member(1)",
"docComment": "/**\n * Load the config file for the current environment\n *\n * @param rootPath - directory where the config director is stored in\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "load(rootPath: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<void>"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "rootPath",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "load"
},
{
"kind": "Method",
"canonicalReference": "slashdocs!RainbowConfig#setConfigDir:member(1)",
"docComment": "/**\n * change the directory the config files are stored in\n *\n * @param configDir - the directory the configfiles are stored in\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "setConfigDir(configDir: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "void"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "configDir",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "setConfigDir"
}
],
"implementsTokenRanges": []
}
]
}
]
}