@alint-js/core 0.1.0 → 0.1.2

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.
@@ -1,4 +1,4 @@
1
- import { L as ResolvedModel, v as RuleContext } from "./types-m5T_UL76.mjs";
1
+ import { b as RuleContext, z as ResolvedModel } from "./types-DKylUrAn.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";
@@ -1,4 +1,4 @@
1
- import { c as ProcessorContext, h as SourceTarget, i as LanguageContext, l as ProcessorPostprocessContext, m as SourceRuntime, n as FileTarget, o as ProcessedSource, r as FunctionTarget, t as ClassTarget, u as SourceFile } from "./types-DSvXUVZ7.mjs";
1
+ import { c as ProcessorContext, h as SourceTarget, i as LanguageContext, l as ProcessorPostprocessContext, m as SourceRuntime, n as FileTarget, o as ProcessedSource, p as SourceRange, r as FunctionTarget, t as ClassTarget, u as SourceFile } from "./types-DSvXUVZ7.mjs";
2
2
  import { GenericSchema, InferInput, InferOutput } from "valibot";
3
3
  //#region src/config/types.d.ts
4
4
  type ModelSize = 'large' | 'medium' | 'small';
@@ -169,11 +169,24 @@ interface ProcessorDefinition {
169
169
  postprocess?: (diagnostics: DiagnosticDescriptor[], context: ProcessorPostprocessContext) => Awaitable<DiagnosticDescriptor[]>;
170
170
  preprocess: (file: SourceFile, context: ProcessorContext) => Awaitable<ProcessedSource[]>;
171
171
  }
172
+ interface ProjectFileEntry {
173
+ contentHash: string;
174
+ language: string;
175
+ path: string;
176
+ targetCount: number;
177
+ }
172
178
  interface ProjectTarget {
173
- files: SourceFile[];
179
+ files: readonly ProjectFileEntry[];
174
180
  kind: 'project';
175
181
  root: string;
176
- targets: SourceTarget[];
182
+ targets: readonly ProjectTargetEntry[];
183
+ }
184
+ interface ProjectTargetEntry {
185
+ filePath: string;
186
+ identity: string;
187
+ kind: string;
188
+ name?: string;
189
+ range?: SourceRange;
177
190
  }
178
191
  type RuleCacheConfig = boolean | {
179
192
  level?: 'target';
@@ -249,4 +262,4 @@ interface RuleWithHandler {
249
262
  }
250
263
  type Target = DirectoryTarget | ProjectTarget | SourceTarget;
251
264
  //#endregion
252
- export { AgentAdapter as A, ProviderDefinition as B, RuleOptionsOutput as C, RuleSpecializedHandlers as D, RuleSeverity as E, ModelRequirement as F, SetupModelDefinition as G, RunnerConfig as H, ResolveModelOptions as I, ResolvedModel as L, AgentResult as M, AgentTool as N, RuleWithHandler as O, AgentUsage as P, ResolvedProvider as R, RuleOptionsInput as S, RuleRegistry as T, RunnerStatsConfig as U, ProviderType as V, SetupConfig as W, RuleConfigEntry as _, AlintLinterOptions as a, RuleHandlers as b, DiagnosticLocation as c, IgnoreConfig as d, LanguageDefinition as f, RuleCacheConfig as g, ProjectTarget as h, AlintConfigItem as i, AgentRequest as j, Target as k, DirectoryTarget as l, ProcessorDefinition as m, AlintConfigExtends as n, Awaitable as o, PluginDefinition as p, AlintConfigInput as r, DiagnosticDescriptor as s, AlintConfig as t, EnabledRule as u, RuleContext as v, RuleOptionsSchema as w, RuleInferenceUsageRecord as x, RuleDefinition as y, ModelSize as z };
265
+ export { RuleWithHandler as A, ResolvedProvider as B, RuleInferenceUsageRecord as C, RuleRegistry as D, RuleOptionsSchema as E, AgentTool as F, RunnerStatsConfig as G, ProviderDefinition as H, AgentUsage as I, SetupConfig as K, ModelRequirement as L, AgentAdapter as M, AgentRequest as N, RuleSeverity as O, AgentResult as P, ResolveModelOptions as R, RuleHandlers as S, RuleOptionsOutput as T, ProviderType as U, ModelSize as V, RunnerConfig as W, ProjectTargetEntry as _, AlintLinterOptions as a, RuleContext as b, DiagnosticLocation as c, IgnoreConfig as d, LanguageDefinition as f, ProjectTarget as g, ProjectFileEntry as h, AlintConfigItem as i, Target as j, RuleSpecializedHandlers as k, DirectoryTarget as l, ProcessorDefinition as m, AlintConfigExtends as n, Awaitable as o, PluginDefinition as p, SetupModelDefinition as q, AlintConfigInput as r, DiagnosticDescriptor as s, AlintConfig as t, EnabledRule as u, RuleCacheConfig as v, RuleOptionsInput as w, RuleDefinition as x, RuleConfigEntry as y, ResolvedModel as z };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alint-js/core",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.mts",
@@ -45,6 +45,7 @@
45
45
  "sury": "^11.0.0-alpha.10"
46
46
  },
47
47
  "scripts": {
48
+ "bench": "vitest bench --config vitest.config.ts",
48
49
  "build": "tsdown",
49
50
  "typecheck": "tsc -p tsconfig.json --noEmit",
50
51
  "test": "vitest run --config vitest.config.ts"