Fix prettier
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -30,4 +30,4 @@ await prisma.apiKey.createMany({
|
||||
data: apiKeysToCreate,
|
||||
});
|
||||
|
||||
console.log("done");
|
||||
console.log("done");
|
||||
|
||||
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user