@alint-js/config 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +4 -6
- package/package.json +4 -5
package/dist/index.mjs
CHANGED
|
@@ -11,8 +11,7 @@ import { xdgConfig } from "xdg-basedir";
|
|
|
11
11
|
import { errorMessageFrom, isError } from "@moeru/std/error";
|
|
12
12
|
import { formatOutputLanguageInstruction, formatSourceWithLineNumbers, generateStructured, toolParametersFromSchema } from "@alint-js/core/structured-output";
|
|
13
13
|
import { createTools, listFiles } from "@alint-js/tools-fs";
|
|
14
|
-
import { rawTool } from "
|
|
15
|
-
import { chat, hasToolCall, or, stepCountAtLeast, user } from "apeira";
|
|
14
|
+
import { chat, hasToolCall, or, rawTool, stepCountAtLeast, user } from "apeira";
|
|
16
15
|
import { Buffer } from "node:buffer";
|
|
17
16
|
import { minimatch } from "minimatch";
|
|
18
17
|
import { exports } from "resolve.exports";
|
|
@@ -228,8 +227,7 @@ const maxSupplementalFiles = 12;
|
|
|
228
227
|
function createBasicStructuredRule(rule) {
|
|
229
228
|
return {
|
|
230
229
|
cache: rule.includeFiles === void 0 || rule.includeFiles.length === 0,
|
|
231
|
-
create: (ctx) => ({ async
|
|
232
|
-
if (target.kind !== "file") return;
|
|
230
|
+
create: (ctx) => ({ async onTargetFile(target) {
|
|
233
231
|
const model = await ctx.model();
|
|
234
232
|
const supplementalFiles = await collectSupplementalFiles({
|
|
235
233
|
cwd: ctx.cwd,
|
|
@@ -376,8 +374,7 @@ const reportFindingsToolName = "report_findings";
|
|
|
376
374
|
function createBasicCodingAgentRule(rule) {
|
|
377
375
|
return {
|
|
378
376
|
cache: false,
|
|
379
|
-
create: (ctx) => ({ async
|
|
380
|
-
if (target.kind !== "file") return;
|
|
377
|
+
create: (ctx) => ({ async onTargetFile(target) {
|
|
381
378
|
const model = await ctx.model();
|
|
382
379
|
const result = await createCodingAgent(model).run({
|
|
383
380
|
cwd: ctx.cwd,
|
|
@@ -1016,6 +1013,7 @@ const ruleConfigEntrySchema = union([ruleSeveritySchema, tuple([ruleSeveritySche
|
|
|
1016
1013
|
const staticConfigItemSchema = looseObject({
|
|
1017
1014
|
agent: optional(unknown()),
|
|
1018
1015
|
basePath: optional(string()),
|
|
1016
|
+
directories: optional(array(filePatternSchema)),
|
|
1019
1017
|
extends: optional(array(unknown())),
|
|
1020
1018
|
files: optional(array(filePatternSchema)),
|
|
1021
1019
|
ignore: optional(looseObject({ gitignore: optional(boolean()) })),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alint-js/config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.23",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.mts",
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@moeru/std": "^0.1.0-beta.18",
|
|
17
17
|
"@package-json/types": "^0.0.13",
|
|
18
|
-
"
|
|
19
|
-
"apeira": "^0.0.6",
|
|
18
|
+
"apeira": "^0.0.7",
|
|
20
19
|
"c12": "^3.3.4",
|
|
21
20
|
"es-toolkit": "^1.49.0",
|
|
22
21
|
"jiti": "^2.7.0",
|
|
@@ -28,8 +27,8 @@
|
|
|
28
27
|
"tar-stream": "^3.2.0",
|
|
29
28
|
"valibot": "^1.4.1",
|
|
30
29
|
"xdg-basedir": "^5.1.0",
|
|
31
|
-
"@alint-js/core": "0.0.
|
|
32
|
-
"@alint-js/tools-fs": "0.0.
|
|
30
|
+
"@alint-js/core": "0.0.23",
|
|
31
|
+
"@alint-js/tools-fs": "0.0.23"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
34
|
"@types/tar-stream": "^3.1.4",
|