Fix prettier

This commit is contained in:
David Corbitt
2023-08-07 21:45:36 -07:00
parent 6d32f1c06e
commit f47010a6e7
8 changed files with 24 additions and 29 deletions

View File

@@ -7,8 +7,10 @@ import { env } from "~/env.mjs";
// The client codegen script doesn't properly read the default export
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const untypedGitHubModule = GitHubModule as unknown as any
const GitHubProvider: typeof GitHubModule = untypedGitHubModule.default ? untypedGitHubModule.default : untypedGitHubModule
const untypedGitHubModule = GitHubModule as unknown as any;
const GitHubProvider: typeof GitHubModule = untypedGitHubModule.default
? untypedGitHubModule.default
: untypedGitHubModule;
/**
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`

View File

@@ -30,4 +30,4 @@ await prisma.apiKey.createMany({
data: apiKeysToCreate,
});
console.log("done");
console.log("done");

View File

@@ -9,20 +9,14 @@ console.log("Exporting public OpenAPI schema to client-libs/schema.json");
const scriptPath = import.meta.url.replace("file://", "");
const clientLibsPath = path.join(path.dirname(scriptPath), "../../../../client-libs");
const schemaPath = path.join(
clientLibsPath,
"schema.json"
);
const schemaPath = path.join(clientLibsPath, "schema.json");
console.log("Exporting schema");
fs.writeFileSync(schemaPath, JSON.stringify(openApiDocument, null, 2), "utf-8");
console.log("Generating Typescript client");
const tsClientPath = path.join(
clientLibsPath,
"js/codegen"
);
const tsClientPath = path.join(clientLibsPath, "js/codegen");
fs.rmSync(tsClientPath, { recursive: true, force: true });
@@ -30,7 +24,7 @@ execSync(
`pnpm dlx @openapitools/openapi-generator-cli generate -i "${schemaPath}" -g typescript-axios -o "${tsClientPath}"`,
{
stdio: "inherit",
}
},
);
console.log("Done!");