myst-frontmatter
Advanced tools
Comparing version 1.1.34 to 1.1.35
@@ -1,2 +0,2 @@ | ||
import type { ExportFormats } from '../index.js'; | ||
import type { ExportFormats } from '../exports/types.js'; | ||
export type Download = { | ||
@@ -3,0 +3,0 @@ title?: string; |
import { defined, incrementOptions, validateBoolean, validateEnum, validateList, validateNumber, validateObjectKeys, validateString, validationError, } from 'simple-validators'; | ||
import { PAGE_FRONTMATTER_KEYS } from '../page/types.js'; | ||
import { PROJECT_FRONTMATTER_KEYS } from '../project/types.js'; | ||
import { FRONTMATTER_ALIASES } from '../site/validators.js'; | ||
import { FRONTMATTER_ALIASES } from '../site/types.js'; | ||
import { ExportFormats } from './types.js'; | ||
@@ -6,0 +6,0 @@ const EXPORT_KEY_OBJECT = { |
@@ -6,3 +6,3 @@ import { defined, incrementOptions, validateList, validateObjectKeys, validateString, validateObject, validationError, validateBoolean, } from 'simple-validators'; | ||
import { validateJupytext } from '../jupytext/validators.js'; | ||
import { FRONTMATTER_ALIASES } from '../site/validators.js'; | ||
import { FRONTMATTER_ALIASES } from '../site/types.js'; | ||
export const USE_PROJECT_FALLBACK = [ | ||
@@ -9,0 +9,0 @@ 'authors', |
@@ -1,2 +0,2 @@ | ||
import { SITE_FRONTMATTER_KEYS } from '../site/validators.js'; | ||
import { SITE_FRONTMATTER_KEYS } from '../site/types.js'; | ||
export const PROJECT_AND_PAGE_FRONTMATTER_KEYS = [ | ||
@@ -3,0 +3,0 @@ 'date', |
@@ -7,3 +7,3 @@ import { defined, filterKeys, incrementOptions, validateBoolean, validateDate, validateList, validateObject, validateObjectKeys, validateString, validateUrl, } from 'simple-validators'; | ||
import { validateNumbering } from '../numbering/validators.js'; | ||
import { FRONTMATTER_ALIASES, validateSiteFrontmatterKeys } from '../site/validators.js'; | ||
import { validateSiteFrontmatterKeys } from '../site/validators.js'; | ||
import { validateThebe } from '../thebe/validators.js'; | ||
@@ -13,2 +13,3 @@ import { validateDoi } from '../utils/validators.js'; | ||
import { validateProjectAndPageSettings } from '../settings/validators.js'; | ||
import { FRONTMATTER_ALIASES } from '../site/types.js'; | ||
export function validateProjectAndPageFrontmatterKeys(value, opts) { | ||
@@ -15,0 +16,0 @@ const output = validateSiteFrontmatterKeys(value, opts); |
@@ -5,2 +5,29 @@ import type { Affiliation } from '../affiliations/types.js'; | ||
import type { Venue } from '../venues/types.js'; | ||
export declare const SITE_FRONTMATTER_KEYS: string[]; | ||
export declare const FRONTMATTER_ALIASES: { | ||
author: string; | ||
reviewer: string; | ||
editor: string; | ||
contributor: string; | ||
affiliation: string; | ||
export: string; | ||
download: string; | ||
jupyter: string; | ||
part: string; | ||
ack: string; | ||
acknowledgements: string; | ||
availability: string; | ||
dataAvailability: string; | ||
'data-availability': string; | ||
quote: string; | ||
plain_language_summary: string; | ||
'plain-language-summary': string; | ||
plainLanguageSummary: string; | ||
lay_summary: string; | ||
'lay-summary': string; | ||
keyPoints: string; | ||
key_points: string; | ||
'key-points': string; | ||
image: string; | ||
}; | ||
export type SiteFrontmatter = { | ||
@@ -7,0 +34,0 @@ title?: string; |
@@ -1,1 +0,47 @@ | ||
export {}; | ||
export const SITE_FRONTMATTER_KEYS = [ | ||
'title', | ||
'subtitle', | ||
'short_title', | ||
'description', | ||
'thumbnail', | ||
'thumbnailOptimized', | ||
'banner', | ||
'bannerOptimized', | ||
'authors', | ||
'reviewers', | ||
'editors', | ||
'contributors', | ||
'venue', | ||
'github', | ||
'keywords', | ||
'affiliations', | ||
'funding', | ||
'copyright', | ||
'options', | ||
]; | ||
export const FRONTMATTER_ALIASES = { | ||
author: 'authors', | ||
reviewer: 'reviewers', | ||
editor: 'editors', | ||
contributor: 'contributors', | ||
affiliation: 'affiliations', | ||
export: 'exports', | ||
download: 'downloads', | ||
jupyter: 'thebe', | ||
part: 'parts', | ||
ack: 'acknowledgments', | ||
acknowledgements: 'acknowledgments', | ||
availability: 'data_availability', | ||
dataAvailability: 'data_availability', | ||
'data-availability': 'data_availability', | ||
quote: 'epigraph', | ||
plain_language_summary: 'summary', | ||
'plain-language-summary': 'summary', | ||
plainLanguageSummary: 'summary', | ||
lay_summary: 'summary', | ||
'lay-summary': 'summary', | ||
keyPoints: 'keypoints', | ||
key_points: 'keypoints', | ||
'key-points': 'keypoints', | ||
image: 'thumbnail', | ||
}; |
import type { ValidationOptions } from 'simple-validators'; | ||
import type { SiteFrontmatter } from './types.js'; | ||
export declare const SITE_FRONTMATTER_KEYS: string[]; | ||
export declare const FRONTMATTER_ALIASES: { | ||
author: string; | ||
reviewer: string; | ||
editor: string; | ||
contributor: string; | ||
affiliation: string; | ||
export: string; | ||
download: string; | ||
jupyter: string; | ||
part: string; | ||
ack: string; | ||
acknowledgements: string; | ||
availability: string; | ||
dataAvailability: string; | ||
'data-availability': string; | ||
quote: string; | ||
plain_language_summary: string; | ||
'plain-language-summary': string; | ||
plainLanguageSummary: string; | ||
lay_summary: string; | ||
'lay-summary': string; | ||
keyPoints: string; | ||
key_points: string; | ||
'key-points': string; | ||
image: string; | ||
}; | ||
export declare function validateSiteFrontmatterKeys(value: Record<string, any>, opts: ValidationOptions): SiteFrontmatter; | ||
//# sourceMappingURL=validators.d.ts.map |
@@ -9,49 +9,2 @@ import { defined, incrementOptions, validateList, validateObject, validateString, validationError, } from 'simple-validators'; | ||
import { RESERVED_EXPORT_KEYS } from '../exports/validators.js'; | ||
export const SITE_FRONTMATTER_KEYS = [ | ||
'title', | ||
'subtitle', | ||
'short_title', | ||
'description', | ||
'thumbnail', | ||
'thumbnailOptimized', | ||
'banner', | ||
'bannerOptimized', | ||
'authors', | ||
'reviewers', | ||
'editors', | ||
'contributors', | ||
'venue', | ||
'github', | ||
'keywords', | ||
'affiliations', | ||
'funding', | ||
'copyright', | ||
'options', | ||
]; | ||
export const FRONTMATTER_ALIASES = { | ||
author: 'authors', | ||
reviewer: 'reviewers', | ||
editor: 'editors', | ||
contributor: 'contributors', | ||
affiliation: 'affiliations', | ||
export: 'exports', | ||
download: 'downloads', | ||
jupyter: 'thebe', | ||
part: 'parts', | ||
ack: 'acknowledgments', | ||
acknowledgements: 'acknowledgments', | ||
availability: 'data_availability', | ||
dataAvailability: 'data_availability', | ||
'data-availability': 'data_availability', | ||
quote: 'epigraph', | ||
plain_language_summary: 'summary', | ||
'plain-language-summary': 'summary', | ||
plainLanguageSummary: 'summary', | ||
lay_summary: 'summary', | ||
'lay-summary': 'summary', | ||
keyPoints: 'keypoints', | ||
key_points: 'keypoints', | ||
'key-points': 'keypoints', | ||
image: 'thumbnail', | ||
}; | ||
export function validateSiteFrontmatterKeys(value, opts) { | ||
@@ -58,0 +11,0 @@ var _a, _b, _c, _d, _e; |
{ | ||
"name": "myst-frontmatter", | ||
"version": "1.1.34", | ||
"version": "1.1.35", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204308