@n1k1t/unit-generator
Version:
Coverage based unit tests AI generator
36 lines • 1.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const v3_1 = require("zod/v3");
const model_1 = require("./model");
const content_1 = require("../../content");
exports.default = model_1.LlmToolCompiler
.build(content_1.ArticleContent
.build({
title: 'Find files by glob patterns',
content: [
{ p: `**Features:**` },
{
ul: [
'Supports standard glob patterns (e.g., `**/*.ts`, `src/*.js`)',
'Returns a newline-separated list of matching file paths',
'Fast file discovery across the entire project',
],
},
{ p: `**Usage:**` },
{
ul: [
'Use this to locate files when you know the naming pattern but not the exact path',
'Combine with `grep` to process the discovered files',
],
},
],
})
.render())
.input(v3_1.z.object({
pattern: v3_1.z.string().describe('The glob pattern to match files against'),
}))
.output(v3_1.z.string().describe('The paths to the matching files separated by newline'))
.execute(({ project }) => async ({ pattern }) => {
return project.files.glob([pattern]).join('\n');
});
//# sourceMappingURL=glob.js.map