@alint-js/core 0.5.0 → 0.7.0
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/README.md +7 -0
- package/dist/agent.d.mts +1 -1
- package/dist/{define-CNfm3wZW.d.mts → define-DO36VJ4W.d.mts} +1 -1
- package/dist/dsl.d.mts +3 -3
- package/dist/index.d.mts +45 -19
- package/dist/index.mjs +993 -674
- package/dist/languages-js.mjs +1 -1
- package/dist/structured-output.d.mts +1 -1
- package/dist/{types-BK5CADYK.d.mts → types-Cm5Z7Fll.d.mts} +11 -1
- package/package.json +20 -2
- package/dist/{extract-CLXRRiJW.mjs → extract-DhLFgRej.mjs} +1 -1
package/dist/languages-js.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as extractJsSourceTargets } from "./extract-
|
|
1
|
+
import { t as extractJsSourceTargets } from "./extract-DhLFgRej.mjs";
|
|
2
2
|
export { extractJsSourceTargets };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as ResolvedModel, x as RuleContext } from "./types-Cm5Z7Fll.mjs";
|
|
2
2
|
import { GenericSchema, InferOutput } from "valibot";
|
|
3
3
|
import { JsonSchema } from "@valibot/to-json-schema";
|
|
4
4
|
import { Message } from "@xsai/shared-chat";
|
|
@@ -109,6 +109,7 @@ interface AlintConfigItem {
|
|
|
109
109
|
files?: readonly (readonly string[] | string)[];
|
|
110
110
|
ignore?: IgnoreConfig;
|
|
111
111
|
ignores?: readonly string[];
|
|
112
|
+
integrations?: IntegrationsConfig;
|
|
112
113
|
language?: string;
|
|
113
114
|
languageOptions?: Record<string, unknown>;
|
|
114
115
|
linterOptions?: AlintLinterOptions;
|
|
@@ -160,6 +161,9 @@ interface EnabledRule {
|
|
|
160
161
|
interface IgnoreConfig {
|
|
161
162
|
gitignore?: boolean;
|
|
162
163
|
}
|
|
164
|
+
interface IntegrationsConfig {
|
|
165
|
+
stopGate?: StopGateConfig;
|
|
166
|
+
}
|
|
163
167
|
interface LanguageDefinition {
|
|
164
168
|
extensions?: readonly string[];
|
|
165
169
|
extract: (file: SourceFile, context: LanguageContext) => Awaitable<SourceTarget[]>;
|
|
@@ -305,6 +309,12 @@ interface RuleWithHandler {
|
|
|
305
309
|
onTargetProject?: never;
|
|
306
310
|
onTargetWith: (target: Target) => Awaitable<void>;
|
|
307
311
|
}
|
|
312
|
+
interface StopGateConfig {
|
|
313
|
+
enabled?: boolean;
|
|
314
|
+
target?: StopGateTarget;
|
|
315
|
+
timeoutMs?: number;
|
|
316
|
+
}
|
|
317
|
+
type StopGateTarget = 'all' | 'dirty-files';
|
|
308
318
|
type Target = DirectoryTarget | PlannedSourceTarget | ProjectTarget;
|
|
309
319
|
//#endregion
|
|
310
|
-
export {
|
|
320
|
+
export { RuleSpecializedHandlers as A, ModelRequirement as B, RuleHandlers as C, RuleOptionsSchema as D, RuleOptionsOutput as E, AgentAdapter as F, ProviderDefinition as G, ResolvedModel as H, AgentRequest as I, RunnerStatsConfig as J, ProviderType as K, AgentResult as L, StopGateConfig as M, StopGateTarget as N, RuleRegistry as O, Target as P, AgentTool as R, RuleDefinition as S, RuleOptionsInput as T, ResolvedProvider as U, ResolveModelOptions as V, ModelSize as W, SetupModelDefinition as X, SetupConfig as Y, ProjectTarget as _, AlintLinterOptions as a, RuleConfigEntry as b, DiagnosticLocation as c, IgnoreConfig as d, IntegrationsConfig as f, ProjectFileEntry as g, ProcessorDefinition as h, AlintConfigItem as i, RuleWithHandler as j, RuleSeverity as k, DirectoryTarget as l, PluginDefinition as m, AlintConfigExtends as n, Awaitable as o, LanguageDefinition as p, RunnerConfig as q, AlintConfigInput as r, DiagnosticDescriptor as s, AlintConfig as t, EnabledRule as u, ProjectTargetEntry as v, RuleInferenceUsageRecord as w, RuleContext as x, RuleCacheConfig as y, AgentUsage as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alint-js/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"description": "Public rule and plugin SDK and run engine for alint",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/moeru-ai/alint.git",
|
|
10
|
+
"directory": "packages/core"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"alint",
|
|
14
|
+
"lint",
|
|
15
|
+
"linter",
|
|
16
|
+
"ai",
|
|
17
|
+
"code-analysis",
|
|
18
|
+
"sdk"
|
|
19
|
+
],
|
|
5
20
|
"exports": {
|
|
6
21
|
".": {
|
|
7
22
|
"types": "./dist/index.d.mts",
|
|
@@ -39,9 +54,12 @@
|
|
|
39
54
|
"minimatch": "^10.2.6",
|
|
40
55
|
"oxc-parser": "^0.142.0",
|
|
41
56
|
"pathe": "^2.0.3",
|
|
42
|
-
"
|
|
57
|
+
"proper-lockfile": "4.1.2",
|
|
58
|
+
"valibot": "^1.4.2",
|
|
59
|
+
"@alint-js/utils": "0.7.0"
|
|
43
60
|
},
|
|
44
61
|
"devDependencies": {
|
|
62
|
+
"@types/proper-lockfile": "4.1.4",
|
|
45
63
|
"effect": "^3.22.1",
|
|
46
64
|
"sury": "^11.0.0-rc.0"
|
|
47
65
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import { readFile } from "node:fs/promises";
|
|
2
3
|
import { extname } from "node:path";
|
|
3
4
|
import { clamp } from "es-toolkit";
|
|
4
|
-
import { createHash } from "node:crypto";
|
|
5
5
|
import { parseSync } from "oxc-parser";
|
|
6
6
|
//#region src/core/hash.ts
|
|
7
7
|
function createStableHasher() {
|