UNPKG

@whook/whook

Version:

Build strong and efficient REST web services.

49 lines (48 loc) 1.88 kB
import _inquirer from 'inquirer'; import { default as fsExtra } from 'fs-extra'; import { type LogService } from 'common-services'; import { type OpenAPI } from 'ya-open-api-types'; import { type WhookCommandHandler, type WhookCommandDefinition } from '../types/commands.js'; import { type WhookRoutesDefinitionsOptions } from '../services/ROUTES_DEFINITIONS.js'; import { type WhookCronDefinitionsOptions } from '../services/CRONS_DEFINITIONS.js'; declare const _ensureDir: typeof fsExtra.ensureDir, _pathExists: typeof fsExtra.pathExists; export declare const definition: { readonly name: "create"; readonly description: "A command helping to create new Whook files easily"; readonly example: "whook create --type service --name \"db\""; readonly config: { readonly environments: ["development"]; readonly promptArgs: true; }; readonly arguments: [{ readonly name: "type"; readonly description: "Type"; readonly required: true; readonly schema: { readonly type: "string"; readonly enum: ["route", "service", "provider", "cron", "command"]; }; }, { readonly name: "name"; readonly description: "Name"; readonly required: true; readonly schema: { readonly type: "string"; }; }]; }; declare const _default: import("knifecycle").ServiceInitializer<{ PROJECT_DIR: string; ROUTES_DEFINITIONS_OPTIONS?: WhookRoutesDefinitionsOptions; CRONS_DEFINITIONS_OPTIONS?: WhookCronDefinitionsOptions; API: OpenAPI; inquirer: typeof _inquirer; writeFile: (path: string, data: string) => Promise<void>; ensureDir: typeof _ensureDir; pathExists: typeof _pathExists; log?: LogService; }, WhookCommandHandler<{ type: string; name: string; }, WhookCommandDefinition>>; export default _default;