2019-11-13 14:01:51 +00:00
|
|
|
import { DEFAULT_SAFE_SCHEMA, Schema } from 'js-yaml';
|
|
|
|
|
|
|
|
import { envType } from './type/Env';
|
2020-08-04 05:14:13 +00:00
|
|
|
import { includeOptions, includeType } from './type/Include';
|
2019-11-13 14:01:51 +00:00
|
|
|
import { regexpType } from './type/Regexp';
|
|
|
|
import { streamType } from './type/Stream';
|
|
|
|
|
2020-08-01 15:57:05 +00:00
|
|
|
/**
|
|
|
|
* Safe schema with additional library types added.
|
|
|
|
*
|
|
|
|
* @public
|
|
|
|
*/
|
2019-11-13 14:01:51 +00:00
|
|
|
export const CONFIG_SCHEMA = Schema.create([DEFAULT_SAFE_SCHEMA], [
|
|
|
|
envType,
|
|
|
|
includeType,
|
|
|
|
regexpType,
|
|
|
|
streamType,
|
|
|
|
]);
|
2020-03-29 13:13:57 +00:00
|
|
|
|
2020-08-04 05:14:13 +00:00
|
|
|
includeOptions.schema = CONFIG_SCHEMA;
|