UNPKG

@fragment-dev/cli

Version:
30 lines (27 loc) 613 B
import { require_source } from "./chunk-M5OAS5QZ.js"; import { __toESM, init_cjs_shims } from "./chunk-7GH3YGSC.js"; // src/lib/errors.ts init_cjs_shims(); var import_chalk = __toESM(require_source(), 1); var InvalidGraphQlError = class extends Error { constructor(message) { let msg = message; if (!msg.endsWith(".")) { msg = `${msg}.`; } super( `${msg} GraphQL names must match ${import_chalk.default.yellow( "/^[_a-zA-Z][_a-zA-Z0-9]*$/" )} and cannot be reserved words.` ); this.name = "InvalidGraphQlError"; } }; export { InvalidGraphQlError };