myst-frontmatter
Advanced tools
Comparing version 1.1.33 to 1.1.34
@@ -17,2 +17,3 @@ export declare enum ExportFormats { | ||
export type Export = { | ||
id?: string; | ||
format?: ExportFormats; | ||
@@ -19,0 +20,0 @@ template?: string | null; |
@@ -8,2 +8,3 @@ import type { ValidationOptions } from 'simple-validators'; | ||
export declare function validateExportsList(input: any, opts: ValidationOptions): Export[] | undefined; | ||
export declare function validateExportFormat(input: any, opts: ValidationOptions): ExportFormats | undefined; | ||
export declare function articlesWithFile(articles?: ExportArticle[]): { | ||
@@ -10,0 +11,0 @@ file: string; |
@@ -69,3 +69,3 @@ import { defined, incrementOptions, validateBoolean, validateEnum, validateList, validateNumber, validateObjectKeys, validateString, validationError, } from 'simple-validators'; | ||
} | ||
function validateExportFormat(input, opts) { | ||
export function validateExportFormat(input, opts) { | ||
if (input === undefined) | ||
@@ -182,2 +182,5 @@ return undefined; | ||
const validExport = { ...value, format, output, template }; | ||
if (defined(value.id)) { | ||
validExport.id = validateString(value.id, incrementOptions('id', opts)); | ||
} | ||
if (defined(value.zip)) { | ||
@@ -184,0 +187,0 @@ validExport.zip = validateBoolean(value.zip, incrementOptions('zip', opts)); |
export * from './affiliations/index.js'; | ||
export * from './biblio/index.js'; | ||
export * from './contributors/index.js'; | ||
export * from './downloads/index.js'; | ||
export * from './exports/index.js'; | ||
@@ -5,0 +6,0 @@ export * from './funding/index.js'; |
export * from './affiliations/index.js'; | ||
export * from './biblio/index.js'; | ||
export * from './contributors/index.js'; | ||
export * from './downloads/index.js'; | ||
export * from './exports/index.js'; | ||
@@ -5,0 +6,0 @@ export * from './funding/index.js'; |
import type { Biblio } from '../biblio/types.js'; | ||
import type { Download } from '../downloads/types.js'; | ||
import type { Export } from '../exports/types.js'; | ||
@@ -30,2 +31,3 @@ import type { Licenses } from '../licenses/types.js'; | ||
exports?: Export[]; | ||
downloads?: Download[]; | ||
settings?: ProjectSettings; | ||
@@ -32,0 +34,0 @@ }; |
@@ -19,2 +19,3 @@ import { SITE_FRONTMATTER_KEYS } from '../site/validators.js'; | ||
'exports', | ||
'downloads', | ||
'settings', | ||
@@ -21,0 +22,0 @@ // Do not add any project specific keys here! |
import { defined, filterKeys, incrementOptions, validateBoolean, validateDate, validateList, validateObject, validateObjectKeys, validateString, validateUrl, } from 'simple-validators'; | ||
import { validateBiblio } from '../biblio/validators.js'; | ||
import { validateDownloadsList } from '../downloads/validators.js'; | ||
import { validateExportsList } from '../exports/validators.js'; | ||
@@ -88,2 +89,7 @@ import { validateLicenses } from '../licenses/validators.js'; | ||
} | ||
if (defined(value.downloads)) { | ||
const downloads = validateDownloadsList(value.downloads, opts); | ||
if (downloads) | ||
output.downloads = downloads; | ||
} | ||
if (value.thumbnail === null) { | ||
@@ -90,0 +96,0 @@ // It is possible for the thumbnail to explicitly be null. |
@@ -11,2 +11,3 @@ import type { ValidationOptions } from 'simple-validators'; | ||
export: string; | ||
download: string; | ||
jupyter: string; | ||
@@ -13,0 +14,0 @@ part: string; |
@@ -37,2 +37,3 @@ import { defined, incrementOptions, validateList, validateObject, validateString, validationError, } from 'simple-validators'; | ||
export: 'exports', | ||
download: 'downloads', | ||
jupyter: 'thebe', | ||
@@ -39,0 +40,0 @@ part: 'parts', |
{ | ||
"name": "myst-frontmatter", | ||
"version": "1.1.33", | ||
"version": "1.1.34", | ||
"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
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
204289
176
5249