diff --git a/docs/api/js-yaml-schema.config_schema.md b/docs/api/js-yaml-schema.config_schema.md index 272b833..9b60633 100644 --- a/docs/api/js-yaml-schema.config_schema.md +++ b/docs/api/js-yaml-schema.config_schema.md @@ -4,6 +4,8 @@ ## CONFIG\_SCHEMA variable +Safe schema with additional library types added. + Signature: ```typescript diff --git a/docs/api/js-yaml-schema.envtype.md b/docs/api/js-yaml-schema.envtype.md deleted file mode 100644 index 86dbb85..0000000 --- a/docs/api/js-yaml-schema.envtype.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@apextoaster/js-yaml-schema](./js-yaml-schema.md) > [envType](./js-yaml-schema.envtype.md) - -## envType variable - -Signature: - -```typescript -envType: YamlType -``` diff --git a/docs/api/js-yaml-schema.includetype.md b/docs/api/js-yaml-schema.includetype.md deleted file mode 100644 index 8302a07..0000000 --- a/docs/api/js-yaml-schema.includetype.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@apextoaster/js-yaml-schema](./js-yaml-schema.md) > [includeType](./js-yaml-schema.includetype.md) - -## includeType variable - -Signature: - -```typescript -includeType: YamlType -``` diff --git a/docs/api/js-yaml-schema.md b/docs/api/js-yaml-schema.md index f92e18f..d045dd8 100644 --- a/docs/api/js-yaml-schema.md +++ b/docs/api/js-yaml-schema.md @@ -8,10 +8,6 @@ | Variable | Description | | --- | --- | -| [CONFIG\_SCHEMA](./js-yaml-schema.config_schema.md) | | -| [envType](./js-yaml-schema.envtype.md) | | +| [CONFIG\_SCHEMA](./js-yaml-schema.config_schema.md) | Safe schema with additional library types added. | | [includeSchema](./js-yaml-schema.includeschema.md) | The schema to be used for included files. This is necessary to work around circular dependency errors. | -| [includeType](./js-yaml-schema.includetype.md) | | -| [regexpType](./js-yaml-schema.regexptype.md) | | -| [streamType](./js-yaml-schema.streamtype.md) | | diff --git a/docs/api/js-yaml-schema.regexptype.md b/docs/api/js-yaml-schema.regexptype.md deleted file mode 100644 index 548324f..0000000 --- a/docs/api/js-yaml-schema.regexptype.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@apextoaster/js-yaml-schema](./js-yaml-schema.md) > [regexpType](./js-yaml-schema.regexptype.md) - -## regexpType variable - -Signature: - -```typescript -regexpType: YamlType -``` diff --git a/docs/api/js-yaml-schema.streamtype.md b/docs/api/js-yaml-schema.streamtype.md deleted file mode 100644 index f8c17cb..0000000 --- a/docs/api/js-yaml-schema.streamtype.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@apextoaster/js-yaml-schema](./js-yaml-schema.md) > [streamType](./js-yaml-schema.streamtype.md) - -## streamType variable - -Signature: - -```typescript -streamType: YamlType -``` diff --git a/src/schema.ts b/src/schema.ts index 4e6314a..6e11f03 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -5,6 +5,11 @@ import { includeSchema, includeType } from './type/Include'; import { regexpType } from './type/Regexp'; import { streamType } from './type/Stream'; +/** + * Safe schema with additional library types added. + * + * @public + */ export const CONFIG_SCHEMA = Schema.create([DEFAULT_SAFE_SCHEMA], [ envType, includeType, diff --git a/src/type/Env.ts b/src/type/Env.ts index 35ddde6..06c66c8 100644 --- a/src/type/Env.ts +++ b/src/type/Env.ts @@ -1,6 +1,9 @@ import { NotFoundError } from '@apextoaster/js-utils'; import { Type as YamlType } from 'js-yaml'; +/** + * @internal + */ export const envType = new YamlType('!env', { kind: 'scalar', resolve(name: string) { diff --git a/src/type/Include.ts b/src/type/Include.ts index 4de8e43..fd1a8d5 100644 --- a/src/type/Include.ts +++ b/src/type/Include.ts @@ -17,6 +17,8 @@ export interface IncludeSchema { /** * The schema to be used for included files. This is necessary to work around circular dependency errors. + * + * @public */ export const includeSchema: IncludeSchema = { exists: (path: string) => false, @@ -29,6 +31,9 @@ export const includeSchema: IncludeSchema = { schema: SAFE_SCHEMA, }; +/** + * @internal + */ export const includeType = new YamlType('!include', { kind: 'scalar', resolve(path: string) { diff --git a/src/type/Regexp.ts b/src/type/Regexp.ts index f74d47f..7ce3843 100644 --- a/src/type/Regexp.ts +++ b/src/type/Regexp.ts @@ -3,6 +3,9 @@ import { Type as YamlType } from 'js-yaml'; export const REGEXP_REGEXP = /^\/(.+)\/([gimsuy]*)$/; +/** + * @internal + */ export const regexpType = new YamlType('!regexp', { kind: 'scalar', resolve(value: string) { diff --git a/src/type/Stream.ts b/src/type/Stream.ts index 6070372..96b15eb 100644 --- a/src/type/Stream.ts +++ b/src/type/Stream.ts @@ -6,6 +6,9 @@ const ALLOWED_STREAMS = new Set([ 'stderr', ]); +/** + * @internal + */ export const streamType = new YamlType('!stream', { kind: 'scalar', resolve(name: string) {