mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
e5e2d3ed30
commit
2cf770d759
1 changed files with 4 additions and 6 deletions
|
@ -381,9 +381,7 @@ async function writeContentFiles({
|
||||||
let dataTypesStr = '';
|
let dataTypesStr = '';
|
||||||
|
|
||||||
const collectionSchemasDir = new URL('./collections/', settings.dotAstroDir);
|
const collectionSchemasDir = new URL('./collections/', settings.dotAstroDir);
|
||||||
if (
|
if (!fs.existsSync(collectionSchemasDir)) {
|
||||||
!fs.existsSync(collectionSchemasDir)
|
|
||||||
) {
|
|
||||||
fs.mkdirSync(collectionSchemasDir, { recursive: true });
|
fs.mkdirSync(collectionSchemasDir, { recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,8 +422,8 @@ async function writeContentFiles({
|
||||||
const resolvedType: 'content' | 'data' =
|
const resolvedType: 'content' | 'data' =
|
||||||
collection.type === 'unknown'
|
collection.type === 'unknown'
|
||||||
? // Add empty / unknown collections to the data type map by default
|
? // Add empty / unknown collections to the data type map by default
|
||||||
// This ensures `getCollection('empty-collection')` doesn't raise a type error
|
// This ensures `getCollection('empty-collection')` doesn't raise a type error
|
||||||
collectionConfig?.type ?? 'data'
|
collectionConfig?.type ?? 'data'
|
||||||
: collection.type;
|
: collection.type;
|
||||||
|
|
||||||
const collectionEntryKeys = Object.keys(collection.entries).sort();
|
const collectionEntryKeys = Object.keys(collection.entries).sort();
|
||||||
|
@ -478,7 +476,7 @@ async function writeContentFiles({
|
||||||
markdownDescription: true,
|
markdownDescription: true,
|
||||||
errorMessages: true,
|
errorMessages: true,
|
||||||
// Fix for https://github.com/StefanTerdell/zod-to-json-schema/issues/110
|
// Fix for https://github.com/StefanTerdell/zod-to-json-schema/issues/110
|
||||||
dateStrategy: ["format:date-time", "format:date", "integer"]
|
dateStrategy: ['format:date-time', 'format:date', 'integer'],
|
||||||
}),
|
}),
|
||||||
null,
|
null,
|
||||||
2
|
2
|
||||||
|
|
Loading…
Add table
Reference in a new issue