cleanup
This commit is contained in:
parent
1b67aa5ab3
commit
5aad1e7fb3
|
@ -53,7 +53,7 @@ const ENV = loadEnv(IC.MODE, process.cwd(), IC.PREFIXES);
|
||||||
|
|
||||||
/** Astro-GhostCMS Integration
|
/** Astro-GhostCMS Integration
|
||||||
* @ For more information and to see the docs check
|
* @ For more information and to see the docs check
|
||||||
* @ https://astro-ghostcms.xyz
|
* @see https://astro-ghostcms.xyz
|
||||||
*/
|
*/
|
||||||
export default function GhostCMS(options: UserConfig): AstroIntegration {
|
export default function GhostCMS(options: UserConfig): AstroIntegration {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -4,6 +4,11 @@ const prefix: string = 'Invariant failed';
|
||||||
// Throw an error if the condition fails
|
// Throw an error if the condition fails
|
||||||
// Strip out error messages for production
|
// Strip out error messages for production
|
||||||
// > Not providing an inline default argument for message as the result is smaller
|
// > Not providing an inline default argument for message as the result is smaller
|
||||||
|
/** Throw an error if the condition is false
|
||||||
|
* @example
|
||||||
|
* import { invariant } from '@matthiesenxyz/astro-ghostcms/api';
|
||||||
|
* invariant(var, "var is false but its not supposed to be!")
|
||||||
|
*/
|
||||||
export function invariant(
|
export function invariant(
|
||||||
// biome-ignore lint/suspicious/noExplicitAny: we know what we are doing
|
// biome-ignore lint/suspicious/noExplicitAny: we know what we are doing
|
||||||
condition: any,
|
condition: any,
|
||||||
|
|
|
@ -18,17 +18,18 @@ const RobotsPolicySchema = z.object({
|
||||||
})
|
})
|
||||||
|
|
||||||
export const RobotsTxtSchema = z.object({
|
export const RobotsTxtSchema = z.object({
|
||||||
/** EXAMPLE1 host: true - automatically resolve using the site option from Astro config
|
/** @example host: true
|
||||||
* EXAMPLE2 host: 'example.com'
|
* // Automatically resolve using the site option from Astro config
|
||||||
|
* @example host: 'example.com'
|
||||||
*/
|
*/
|
||||||
host: z.string().optional(),
|
host: z.string().optional(),
|
||||||
/** EXAMPLE1 sitemap: "https://example.com/sitemap-0.xml"
|
/** @example sitemap: "https://example.com/sitemap-0.xml"
|
||||||
* EXAMPLE2 sitemap: ['https://example.com/sitemap-0.xml','https://example.com/sitemap-1.xml']
|
* @example sitemap: ['https://example.com/sitemap-0.xml','https://example.com/sitemap-1.xml']
|
||||||
* EXAMPLE3 sitemap: false - If you want to get the robots.txt file without the Sitemap: ... entry, set the sitemap parameter to false.
|
* @example sitemap: false - If you want to get the robots.txt file without the Sitemap: ... entry, set the sitemap parameter to false.
|
||||||
*/
|
*/
|
||||||
sitemap: z.string().optional(),
|
sitemap: z.string().optional(),
|
||||||
/** astrojs/sitemap and astro-sitemap integrations have the sitemap-index.xml as their primary output. That is why the default value of sitemapBaseFileName is set to sitemap-index.
|
/** astrojs/sitemap and astro-sitemap integrations have the sitemap-index.xml as their primary output. That is why the default value of sitemapBaseFileName is set to sitemap-index.
|
||||||
* EXAMPLE sitemapBaseFileName: 'custom-sitemap'
|
* @example sitemapBaseFileName: 'custom-sitemap'
|
||||||
*/
|
*/
|
||||||
sitemapBaseFileName: z.string().optional(),
|
sitemapBaseFileName: z.string().optional(),
|
||||||
/** SET POLICY RULES */
|
/** SET POLICY RULES */
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { z } from "astro/zod";
|
import { z } from "astro/zod";
|
||||||
|
|
||||||
export const SitemapSchema = z.object({
|
export const SitemapSchema = z.object({
|
||||||
/** EXAMPLE: ['https://example-1.com', 'https://example-2.com]
|
/** @example ['https://example-1.com', 'https://example-2.com]
|
||||||
* REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap/#custompages
|
* @see https://docs.astro.build/en/guides/integrations-guide/sitemap/#custompages
|
||||||
*/
|
*/
|
||||||
customPages: z.string().array().optional(),
|
customPages: z.string().array().optional(),
|
||||||
/** EXAMPLE: 10000
|
/** @example 10000
|
||||||
* REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap/#entrylimit
|
* @see https://docs.astro.build/en/guides/integrations-guide/sitemap/#entrylimit
|
||||||
*/
|
*/
|
||||||
entryLimit: z.number().optional()
|
entryLimit: z.number().optional()
|
||||||
})
|
})
|
|
@ -18,10 +18,10 @@ importers:
|
||||||
demo:
|
demo:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@matthiesenxyz/astro-ghostcms':
|
'@matthiesenxyz/astro-ghostcms':
|
||||||
specifier: 3.1.2
|
specifier: 3.1.3
|
||||||
version: link:../packages/astro-ghostcms
|
version: link:../packages/astro-ghostcms
|
||||||
'@matthiesenxyz/astro-ghostcms-theme-default':
|
'@matthiesenxyz/astro-ghostcms-theme-default':
|
||||||
specifier: 0.1.2
|
specifier: 0.1.3
|
||||||
version: link:../packages/astro-ghostcms-theme-default
|
version: link:../packages/astro-ghostcms-theme-default
|
||||||
astro:
|
astro:
|
||||||
specifier: ^4.2.4
|
specifier: ^4.2.4
|
||||||
|
@ -43,7 +43,7 @@ importers:
|
||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.0.5
|
version: 3.0.5
|
||||||
'@matthiesenxyz/astro-ghostcms-theme-default':
|
'@matthiesenxyz/astro-ghostcms-theme-default':
|
||||||
specifier: ^0.1.1
|
specifier: ^0.1.3
|
||||||
version: link:../astro-ghostcms-theme-default
|
version: link:../astro-ghostcms-theme-default
|
||||||
'@ts-ghost/core-api':
|
'@ts-ghost/core-api':
|
||||||
specifier: ^5.1.2
|
specifier: ^5.1.2
|
||||||
|
@ -54,9 +54,6 @@ importers:
|
||||||
astro-robots-txt:
|
astro-robots-txt:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.0.0
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
tiny-invariant:
|
|
||||||
specifier: ^1.3.1
|
|
||||||
version: 1.3.1
|
|
||||||
vite:
|
vite:
|
||||||
specifier: ^5.0.12
|
specifier: ^5.0.12
|
||||||
version: 5.0.12(@types/node@20.11.6)
|
version: 5.0.12(@types/node@20.11.6)
|
||||||
|
@ -119,7 +116,7 @@ importers:
|
||||||
packages/astro-ghostcms-theme-default:
|
packages/astro-ghostcms-theme-default:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@matthiesenxyz/astro-ghostcms':
|
'@matthiesenxyz/astro-ghostcms':
|
||||||
specifier: ^3.1.2
|
specifier: ^3.1.3
|
||||||
version: link:../astro-ghostcms
|
version: link:../astro-ghostcms
|
||||||
astro:
|
astro:
|
||||||
specifier: ^4.2.1
|
specifier: ^4.2.1
|
||||||
|
@ -127,9 +124,6 @@ importers:
|
||||||
astro-font:
|
astro-font:
|
||||||
specifier: ^0.0.77
|
specifier: ^0.0.77
|
||||||
version: 0.0.77
|
version: 0.0.77
|
||||||
tiny-invariant:
|
|
||||||
specifier: ^1.3.1
|
|
||||||
version: 1.3.1
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@astrojs/check':
|
'@astrojs/check':
|
||||||
specifier: ^0.4.1
|
specifier: ^0.4.1
|
||||||
|
@ -6818,10 +6812,6 @@ packages:
|
||||||
any-promise: 1.3.0
|
any-promise: 1.3.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/tiny-invariant@1.3.1:
|
|
||||||
resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/tinybench@2.6.0:
|
/tinybench@2.6.0:
|
||||||
resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==}
|
resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
Loading…
Reference in New Issue