boom working

This commit is contained in:
Adam Matthiesen 2024-03-22 01:45:04 -07:00
parent 9696dd3822
commit feabe8806b
No known key found for this signature in database
GPG Key ID: 1A080F6B1E4AF38E
2 changed files with 4 additions and 3 deletions

View File

@ -18,6 +18,6 @@ export const optionsSchema = z.object({
* Optional: Allows the user to enable verbose logging.
*/
verbose: z.boolean().optional().default(false),
})
}).optional().default({ verbose: false });
export type astroGistsUserConfig = z.infer<typeof optionsSchema>

View File

@ -1,9 +1,10 @@
import { defineIntegration, createResolver } from "astro-integration-kit"
import { corePlugins } from "astro-integration-kit/plugins"
import { optionsSchema } from "./index"
import type { astroGistsUserConfig } from "./index"
import { readFileSync } from "node:fs";
import type { AstroIntegrationLogger } from "astro";
import { loadEnv } from "vite";
import { z } from "astro/zod";
// Load environment variables
const { GITHUB_PERSONAL_TOKEN } = loadEnv("all", process.cwd(), "GITHUB_");
@ -24,7 +25,7 @@ export const TOKEN_MISSING_ERROR = "GITHUB_PERSONAL_TOKEN not found. Please add
*/
export default defineIntegration({
name: "@matthiesenxyz/astro-gists",
optionsSchema,
optionsSchema: z.custom<astroGistsUserConfig>().optional().default({ verbose: false }),
plugins: [...corePlugins],
setup({ options }) {
// Create resolve helper