@alint-js/core 0.6.0 → 0.7.1
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.d.mts +30 -21
- package/dist/index.mjs +1028 -1005
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { A as RuleSpecializedHandlers, B as ModelRequirement, C as RuleHandlers, G as ProviderDefinition, H as ResolvedModel, J as RunnerStatsConfig, K as ProviderType, M as StopGateConfig, N as StopGateTarget, O as RuleRegistry, P as Target, S as RuleDefinition, U as ResolvedProvider, V as ResolveModelOptions, W as ModelSize, X as SetupModelDefinition, Y as SetupConfig, _ as ProjectTarget, a as AlintLinterOptions, b as RuleConfigEntry, c as DiagnosticLocation, d as IgnoreConfig, f as IntegrationsConfig, g as ProjectFileEntry, h as ProcessorDefinition, i as AlintConfigItem, j as RuleWithHandler, k as RuleSeverity, l as DirectoryTarget, m as PluginDefinition, n as AlintConfigExtends, o as Awaitable, p as LanguageDefinition, q as RunnerConfig, r as AlintConfigInput, s as DiagnosticDescriptor, t as AlintConfig, u as EnabledRule, v as ProjectTargetEntry, w as RuleInferenceUsageRecord, x as RuleContext, y as RuleCacheConfig } from "./types-Cm5Z7Fll.mjs";
|
|
2
2
|
import { C as SourceTarget, D as SourceTargetOrigin, E as SourceTargetOfKind, O as SourceText, S as SourceRuntime, T as SourceTargetMetadata, _ as SourceLocation, a as FunctionInfo, b as SourcePosition, c as LineRange, d as ProcessedSource, f as ProcessedSourceOrigin, g as SourceFile, h as SourceExtractOptions, i as FileTarget, l as PlannedSourceTarget, m as ProcessorPostprocessContext, n as CallSite, o as FunctionTarget, p as ProcessorContext, r as ClassTarget, s as LanguageContext, t as BaseSourceFile, u as PlannedSourceTargetOfKind, v as SourceMetadataObject, w as SourceTargetKind, x as SourceRange, y as SourceMetadataValue } from "./types-DM4idR4w.mjs";
|
|
3
3
|
import { n as definePlugin, r as defineRule, t as defineConfig } from "./define-DO36VJ4W.mjs";
|
|
4
|
+
import { appendFile, writeFile } from "node:fs/promises";
|
|
5
|
+
import "proper-lockfile";
|
|
4
6
|
//#region src/config/config-array.d.ts
|
|
5
7
|
interface EffectiveAlintConfig {
|
|
6
8
|
agent?: AlintConfigItem['agent'];
|
|
@@ -42,26 +44,6 @@ declare const maximumStopGateTimeoutMs: number;
|
|
|
42
44
|
declare const defaultStopGateConfig: Readonly<ResolvedStopGateConfig>;
|
|
43
45
|
declare function resolveStopGateConfig(config: AlintConfig, cwd: string): ResolvedStopGateConfig;
|
|
44
46
|
//#endregion
|
|
45
|
-
//#region src/core/hash.d.ts
|
|
46
|
-
declare function stableHash(value: unknown): string;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/core/languages/registry.d.ts
|
|
49
|
-
interface LanguageRegistry {
|
|
50
|
-
byExtension: Map<string, string>;
|
|
51
|
-
languages: Map<string, LanguageDefinition>;
|
|
52
|
-
}
|
|
53
|
-
declare function registerLanguage(registry: LanguageRegistry, language: LanguageDefinition): void;
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/core/languages/resolve.d.ts
|
|
56
|
-
interface ResolveLanguageOptions {
|
|
57
|
-
language?: string;
|
|
58
|
-
processedLanguage?: string;
|
|
59
|
-
}
|
|
60
|
-
declare function resolveLanguage(file: SourceFile, registry: LanguageRegistry, options: ResolveLanguageOptions): LanguageDefinition;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/core/languages/index.d.ts
|
|
63
|
-
declare function createBuiltInLanguageRegistry(): LanguageRegistry;
|
|
64
|
-
//#endregion
|
|
65
47
|
//#region src/core/types.d.ts
|
|
66
48
|
interface AlintFailureCause {
|
|
67
49
|
code?: string;
|
|
@@ -257,6 +239,33 @@ interface UsageProgressPayload {
|
|
|
257
239
|
record: InferenceUsageRecord;
|
|
258
240
|
}
|
|
259
241
|
//#endregion
|
|
242
|
+
//#region src/core/cache/store.d.ts
|
|
243
|
+
interface NormalizedRunnerCacheConfig {
|
|
244
|
+
enabled: boolean;
|
|
245
|
+
location: string;
|
|
246
|
+
}
|
|
247
|
+
declare function normalizeRunnerCacheConfig(cache: RunnerConfig['cache'], cwd: string): NormalizedRunnerCacheConfig;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/core/hash.d.ts
|
|
250
|
+
declare function stableHash(value: unknown): string;
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/core/languages/registry.d.ts
|
|
253
|
+
interface LanguageRegistry {
|
|
254
|
+
byExtension: Map<string, string>;
|
|
255
|
+
languages: Map<string, LanguageDefinition>;
|
|
256
|
+
}
|
|
257
|
+
declare function registerLanguage(registry: LanguageRegistry, language: LanguageDefinition): void;
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/core/languages/resolve.d.ts
|
|
260
|
+
interface ResolveLanguageOptions {
|
|
261
|
+
language?: string;
|
|
262
|
+
processedLanguage?: string;
|
|
263
|
+
}
|
|
264
|
+
declare function resolveLanguage(file: SourceFile, registry: LanguageRegistry, options: ResolveLanguageOptions): LanguageDefinition;
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/core/languages/index.d.ts
|
|
267
|
+
declare function createBuiltInLanguageRegistry(): LanguageRegistry;
|
|
268
|
+
//#endregion
|
|
260
269
|
//#region src/core/preparation.d.ts
|
|
261
270
|
/**
|
|
262
271
|
* The `ctx.src.extract` a run hands to rules, for parsing files it was never asked to lint, which
|
|
@@ -397,4 +406,4 @@ declare function benchmarkModels(config: SetupConfig, options?: BenchmarkModelsO
|
|
|
397
406
|
//#region src/models/resolve.d.ts
|
|
398
407
|
declare function resolveModel(registry: SetupConfig, options?: ResolveModelOptions): ResolvedModel;
|
|
399
408
|
//#endregion
|
|
400
|
-
export { AlintAbortError, AlintCachePersistenceError, type AlintConfig, type AlintConfigExtends, type AlintConfigInput, type AlintConfigItem, type AlintFailureCause, type AlintFileFailure, type AlintLinterOptions, type AlintRuleFailure, AlintRunCancelledError, AlintRunError, type AlintRunFailure, type Awaitable, type BaseSourceFile, type BenchmarkModelsOptions, type CallSite, type ClassTarget, type Diagnostic, type DiagnosticDescriptor, type DiagnosticLocation, type DiagnosticProgressPayload, type DirectoryTarget, type EffectiveAlintConfig, type EnabledRule, type ExecutionCounts, type ExecutionProgressPayload, type FileReadyPayload, type FileTarget, type FunctionInfo, type FunctionTarget, type IgnoreConfig, type InferenceUsageRecord, type IntegrationsConfig, type JobEndPayload, type JobQueuedPayload, type JobRetryPayload, type JobStartPayload, type LanguageContext, type LanguageDefinition, type LanguageRegistry, type LineRange, type ModelBenchmarkActive, type ModelBenchmarkMeasurement, type ModelBenchmarkProgress, type ModelBenchmarkRequest, type ModelBenchmarkResult, type ModelRequirement, type ModelSize, type PlannedSourceTarget, type PlannedSourceTargetOfKind, type PluginDefinition, type PrepareEndPayload, type PrepareStartPayload, type ProcessedSource, type ProcessedSourceOrigin, type ProcessorContext, type ProcessorDefinition, type ProcessorPostprocessContext, type ProgressJobRef, type ProgressReporter, type ProgressSnapshot, type ProgressTargetKind, type ProjectFileEntry, type ProjectTarget, type ProjectTargetEntry, type ProviderDefinition, type ProviderType, type ResolveConfigResult, type ResolveLanguageOptions, type ResolveModelOptions, type ResolvedModel, type ResolvedProvider, type ResolvedStopGateConfig, type RuleCacheConfig, type RuleConfigEntry, type RuleContext, type RuleDefinition, type RuleHandlers, type RuleInferenceUsageRecord, type RuleRegistry, type RuleSeverity, type RuleSpecializedHandlers, type RuleWithHandler, type RunEndPayload, type RunExecution, type RunOptions, type RunResult, type RunUsage, type RunUsageTotals, type RunnerConfig, type RunnerStatsConfig, type SetupConfig, type SetupModelDefinition, type SourceExtractOptions, type SourceFile, type SourceLocation, type SourceMetadataObject, type SourceMetadataValue, type SourcePosition, type SourceRange, type SourceRuntime, type SourceRuntimeOptions, type SourceTarget, type SourceTargetKind, type SourceTargetMetadata, type SourceTargetOfKind, type SourceTargetOrigin, type SourceText, type StopGateConfig, type StopGateTarget, type Target, type UsageProgressPayload, benchmarkModels, buildRuleRegistry, createBuiltInLanguageRegistry, createSourceExtractor, createSourceFile, createSourceRuntime, defaultStopGateConfig, defineConfig, definePlugin, defineRule, hasDiscoveryFilePatterns, matchesDiscoveryFile, maximumStopGateTimeoutMs, normalizeConfig, registerLanguage, resolveConfigForDirectory, resolveConfigForFile, resolveConfigForProject, resolveLanguage, resolveModel, resolveStopGateConfig, runAlint, sliceLines, sliceRange, stableHash, targetIdentity, withLanguage, withStableIdentities };
|
|
409
|
+
export { AlintAbortError, AlintCachePersistenceError, type AlintConfig, type AlintConfigExtends, type AlintConfigInput, type AlintConfigItem, type AlintFailureCause, type AlintFileFailure, type AlintLinterOptions, type AlintRuleFailure, AlintRunCancelledError, AlintRunError, type AlintRunFailure, type Awaitable, type BaseSourceFile, type BenchmarkModelsOptions, type CallSite, type ClassTarget, type Diagnostic, type DiagnosticDescriptor, type DiagnosticLocation, type DiagnosticProgressPayload, type DirectoryTarget, type EffectiveAlintConfig, type EnabledRule, type ExecutionCounts, type ExecutionProgressPayload, type FileReadyPayload, type FileTarget, type FunctionInfo, type FunctionTarget, type IgnoreConfig, type InferenceUsageRecord, type IntegrationsConfig, type JobEndPayload, type JobQueuedPayload, type JobRetryPayload, type JobStartPayload, type LanguageContext, type LanguageDefinition, type LanguageRegistry, type LineRange, type ModelBenchmarkActive, type ModelBenchmarkMeasurement, type ModelBenchmarkProgress, type ModelBenchmarkRequest, type ModelBenchmarkResult, type ModelRequirement, type ModelSize, type NormalizedRunnerCacheConfig, type PlannedSourceTarget, type PlannedSourceTargetOfKind, type PluginDefinition, type PrepareEndPayload, type PrepareStartPayload, type ProcessedSource, type ProcessedSourceOrigin, type ProcessorContext, type ProcessorDefinition, type ProcessorPostprocessContext, type ProgressJobRef, type ProgressReporter, type ProgressSnapshot, type ProgressTargetKind, type ProjectFileEntry, type ProjectTarget, type ProjectTargetEntry, type ProviderDefinition, type ProviderType, type ResolveConfigResult, type ResolveLanguageOptions, type ResolveModelOptions, type ResolvedModel, type ResolvedProvider, type ResolvedStopGateConfig, type RuleCacheConfig, type RuleConfigEntry, type RuleContext, type RuleDefinition, type RuleHandlers, type RuleInferenceUsageRecord, type RuleRegistry, type RuleSeverity, type RuleSpecializedHandlers, type RuleWithHandler, type RunEndPayload, type RunExecution, type RunOptions, type RunResult, type RunUsage, type RunUsageTotals, type RunnerConfig, type RunnerStatsConfig, type SetupConfig, type SetupModelDefinition, type SourceExtractOptions, type SourceFile, type SourceLocation, type SourceMetadataObject, type SourceMetadataValue, type SourcePosition, type SourceRange, type SourceRuntime, type SourceRuntimeOptions, type SourceTarget, type SourceTargetKind, type SourceTargetMetadata, type SourceTargetOfKind, type SourceTargetOrigin, type SourceText, type StopGateConfig, type StopGateTarget, type Target, type UsageProgressPayload, benchmarkModels, buildRuleRegistry, createBuiltInLanguageRegistry, createSourceExtractor, createSourceFile, createSourceRuntime, defaultStopGateConfig, defineConfig, definePlugin, defineRule, hasDiscoveryFilePatterns, matchesDiscoveryFile, maximumStopGateTimeoutMs, normalizeConfig, normalizeRunnerCacheConfig, registerLanguage, resolveConfigForDirectory, resolveConfigForFile, resolveConfigForProject, resolveLanguage, resolveModel, resolveStopGateConfig, runAlint, sliceLines, sliceRange, stableHash, targetIdentity, withLanguage, withStableIdentities };
|