Skip to content

Commit e29219a

Browse files
authored
Follow-on OpenAPI Template fixes (#47)
* Make link to /fp render better * Default to true for openapi template and run biome
1 parent c4eade4 commit e29219a

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

cli/src/actions/template.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function promptTemplate(ctx: Context) {
2424
value: "sample-d1",
2525
label: "D1 base template",
2626
hint: "A barebones HONC project with a D1 Database",
27-
}
27+
},
2828
],
2929
initialValue: "base",
3030
});
@@ -42,10 +42,10 @@ export async function promptTemplate(ctx: Context) {
4242
export async function promptOpenAPI(ctx: Context) {
4343
const confirmOpenAPI = await confirm({
4444
message: "Do you need an OpenAPI spec?",
45-
initialValue: false,
45+
initialValue: true,
46+
active: "Yes",
4647
});
4748

48-
4949
if (typeof confirmOpenAPI === "boolean" && confirmOpenAPI) {
5050
ctx.useOpenAPI = confirmOpenAPI;
5151
}

cli/src/index.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env node
22
import { promptPath } from "@/actions/path";
3-
import { actionTemplate, promptOpenAPI, promptTemplate } from "@/actions/template";
3+
import {
4+
actionTemplate,
5+
promptOpenAPI,
6+
promptTemplate,
7+
} from "@/actions/template";
48
import { intro, isCancel, outro } from "@clack/prompts";
59
import pico from "picocolors";
610
import { actionCodeGenFinish, actionCodeGenStart } from "./actions/code-gen";
@@ -130,6 +134,7 @@ function fiberplanePlaygroundPlug(context: Context) {
130134
}
131135

132136
return `
133-
# [optional] Use Fiberplane to explore your api at "http://localhost:8787/fp"
137+
# [optional] Use Fiberplane to explore your api
138+
open http://localhost:8787/fp
134139
`;
135140
}

0 commit comments

Comments
 (0)