Debian Codegraph @

cli/publish-spec/src/validation/validators/framework.ts

raw symbols SCIP
1 import type { Validator } from "../types";
2 import type { RunOptions } from "../../types";
3 import { value, questions } from "./helpers.js";
4
5 interface FrameworkValidation {
6 framework?: string;
7 }
8
9 export const validateFramework: Validator<FrameworkValidation> = async (options: RunOptions) => {
10 const { framework, interactive } = options;
11 if (framework || !interactive) return value({ framework });
12 return questions({
13 type: "text",
14 name: "framework",
15 message: "What integration was/is being used to generate the spec? (enter to skip)",
16 });
17 };