@wispbit/local 1.0.29 → 1.0.30
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/cli.js +86 -4241
- package/dist/index.js +1 -20
- package/dist/package.json +6 -9
- package/package.json +4 -5
- package/dist/build.d.ts +0 -3
- package/dist/build.d.ts.map +0 -1
- package/dist/cli.js.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/src/api/WispbitApiClient.d.ts +0 -190
- package/dist/src/api/WispbitApiClient.d.ts.map +0 -1
- package/dist/src/cli.d.ts +0 -16
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -6
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/environment/Config.d.ts +0 -79
- package/dist/src/environment/Config.d.ts.map +0 -1
- package/dist/src/environment/Environment.d.ts +0 -23
- package/dist/src/environment/Environment.d.ts.map +0 -1
- package/dist/src/environment/Sandbox.d.ts +0 -48
- package/dist/src/environment/Sandbox.d.ts.map +0 -1
- package/dist/src/environment/Storage.d.ts +0 -84
- package/dist/src/environment/Storage.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -16
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/languages.d.ts +0 -36
- package/dist/src/languages.d.ts.map +0 -1
- package/dist/src/providers/AstGrepAstProvider.d.ts +0 -44
- package/dist/src/providers/AstGrepAstProvider.d.ts.map +0 -1
- package/dist/src/providers/LanguageBackend.d.ts +0 -74
- package/dist/src/providers/LanguageBackend.d.ts.map +0 -1
- package/dist/src/providers/RuleProvider.d.ts +0 -46
- package/dist/src/providers/RuleProvider.d.ts.map +0 -1
- package/dist/src/providers/ScipIntelligenceProvider.d.ts +0 -84
- package/dist/src/providers/ScipIntelligenceProvider.d.ts.map +0 -1
- package/dist/src/providers/ViolationValidationProvider.d.ts +0 -38
- package/dist/src/providers/ViolationValidationProvider.d.ts.map +0 -1
- package/dist/src/providers/WispbitRuleProvider.d.ts +0 -29
- package/dist/src/providers/WispbitRuleProvider.d.ts.map +0 -1
- package/dist/src/providers/WispbitViolationValidationProvider.d.ts +0 -12
- package/dist/src/providers/WispbitViolationValidationProvider.d.ts.map +0 -1
- package/dist/src/schemas.d.ts +0 -1270
- package/dist/src/schemas.d.ts.map +0 -1
- package/dist/src/steps/ExecutionEventEmitter.d.ts +0 -191
- package/dist/src/steps/ExecutionEventEmitter.d.ts.map +0 -1
- package/dist/src/steps/FileExecutionContext.d.ts +0 -87
- package/dist/src/steps/FileExecutionContext.d.ts.map +0 -1
- package/dist/src/steps/FileFilterStep.d.ts +0 -28
- package/dist/src/steps/FileFilterStep.d.ts.map +0 -1
- package/dist/src/steps/FileFilterStep.test.d.ts +0 -2
- package/dist/src/steps/FileFilterStep.test.d.ts.map +0 -1
- package/dist/src/steps/FindMatchesStep.d.ts +0 -41
- package/dist/src/steps/FindMatchesStep.d.ts.map +0 -1
- package/dist/src/steps/FindMatchesStep.test.d.ts +0 -2
- package/dist/src/steps/FindMatchesStep.test.d.ts.map +0 -1
- package/dist/src/steps/GotoDefinitionStep.d.ts +0 -86
- package/dist/src/steps/GotoDefinitionStep.d.ts.map +0 -1
- package/dist/src/steps/LLMStep.d.ts +0 -40
- package/dist/src/steps/LLMStep.d.ts.map +0 -1
- package/dist/src/steps/RuleExecutor.d.ts +0 -39
- package/dist/src/steps/RuleExecutor.d.ts.map +0 -1
- package/dist/src/steps/RuleExecutor.test.d.ts +0 -2
- package/dist/src/steps/RuleExecutor.test.d.ts.map +0 -1
- package/dist/src/test/TestExecutor.d.ts +0 -38
- package/dist/src/test/TestExecutor.d.ts.map +0 -1
- package/dist/src/test/rules.test.d.ts +0 -2
- package/dist/src/test/rules.test.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -197
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/utils/asciiFrames.d.ts +0 -5
- package/dist/src/utils/asciiFrames.d.ts.map +0 -1
- package/dist/src/utils/coordinates.d.ts +0 -12
- package/dist/src/utils/coordinates.d.ts.map +0 -1
- package/dist/src/utils/debugLogger.d.ts +0 -6
- package/dist/src/utils/debugLogger.d.ts.map +0 -1
- package/dist/src/utils/diffValidation.d.ts +0 -24
- package/dist/src/utils/diffValidation.d.ts.map +0 -1
- package/dist/src/utils/diffValidation.test.d.ts +0 -2
- package/dist/src/utils/diffValidation.test.d.ts.map +0 -1
- package/dist/src/utils/formatters.d.ts +0 -58
- package/dist/src/utils/formatters.d.ts.map +0 -1
- package/dist/src/utils/generateTreeDump.d.ts +0 -19
- package/dist/src/utils/generateTreeDump.d.ts.map +0 -1
- package/dist/src/utils/git.d.ts +0 -68
- package/dist/src/utils/git.d.ts.map +0 -1
- package/dist/src/utils/git.test.d.ts +0 -2
- package/dist/src/utils/git.test.d.ts.map +0 -1
- package/dist/src/utils/hashString.d.ts +0 -2
- package/dist/src/utils/hashString.d.ts.map +0 -1
- package/dist/src/utils/patternMatching.d.ts +0 -2
- package/dist/src/utils/patternMatching.d.ts.map +0 -1
- package/dist/src/utils/readTextAtRange.d.ts +0 -10
- package/dist/src/utils/readTextAtRange.d.ts.map +0 -1
- package/dist/src/utils/ruleExecution.d.ts +0 -20
- package/dist/src/utils/ruleExecution.d.ts.map +0 -1
- package/dist/src/utils/snapshotComparison.d.ts +0 -16
- package/dist/src/utils/snapshotComparison.d.ts.map +0 -1
- package/dist/src/utils/startupScreen.d.ts +0 -5
- package/dist/src/utils/startupScreen.d.ts.map +0 -1
- package/dist/src/utils/validateRule.d.ts +0 -52
- package/dist/src/utils/validateRule.d.ts.map +0 -1
- package/dist/src/validationSchemas.d.ts +0 -553
- package/dist/src/validationSchemas.d.ts.map +0 -1
- package/dist/src/version.d.ts +0 -3
- package/dist/src/version.d.ts.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/vitest.config.d.mts +0 -3
- package/dist/vitest.config.d.mts.map +0 -1
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { Environment } from "powerlint/environment/Environment";
|
|
2
|
-
import type { Language } from "powerlint/languages";
|
|
3
|
-
import { ExecutionEventEmitter } from "powerlint/steps/ExecutionEventEmitter";
|
|
4
|
-
import { Match } from "powerlint/types";
|
|
5
|
-
/**
|
|
6
|
-
* Provider interface for AST-based code operations
|
|
7
|
-
*/
|
|
8
|
-
export interface AstProvider {
|
|
9
|
-
/**
|
|
10
|
-
* Find all matches based on the provider's matching strategy
|
|
11
|
-
* @param filePaths File paths to search in
|
|
12
|
-
* @param schema The provider-specific schema (RuleStep config without the "type" field)
|
|
13
|
-
* @returns Array of matches found
|
|
14
|
-
*/
|
|
15
|
-
findMatches(filePaths: string[], schema: Record<string, any>): Promise<Match[]>;
|
|
16
|
-
/**
|
|
17
|
-
* Expand a match to its enclosing function, method, or class definition
|
|
18
|
-
* @param match The match to expand
|
|
19
|
-
* @returns The expanded match with full function/class body, or null if not found
|
|
20
|
-
*/
|
|
21
|
-
expandMatch(match: Match): Promise<Match | null>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Provider interface for code intelligence features (definitions, references)
|
|
25
|
-
* Providers should filter out external symbols internally by default
|
|
26
|
-
*/
|
|
27
|
-
export interface IntelligenceProvider {
|
|
28
|
-
/**
|
|
29
|
-
* Find all definitions for a given match
|
|
30
|
-
* @param match The match to find definitions for
|
|
31
|
-
* @returns Array of matches representing definition locations
|
|
32
|
-
*/
|
|
33
|
-
findDefinitions(match: Match): Promise<Match[]>;
|
|
34
|
-
/**
|
|
35
|
-
* Find all references for a given match
|
|
36
|
-
* @param match The match to find references for
|
|
37
|
-
* @returns Array of matches representing reference locations
|
|
38
|
-
*/
|
|
39
|
-
findReferences(match: Match): Promise<Match[]>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Error thrown when a language backend method is not supported
|
|
43
|
-
*/
|
|
44
|
-
export declare class LanguageBackendNotSupportedError extends Error {
|
|
45
|
-
constructor(methodName: string, reason: string);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Language backend that delegates to various providers
|
|
49
|
-
* Manages providers for pattern matching, definitions, references, etc.
|
|
50
|
-
*/
|
|
51
|
-
export declare class LanguageBackend {
|
|
52
|
-
private astProvider?;
|
|
53
|
-
private intelligenceProvider?;
|
|
54
|
-
private language;
|
|
55
|
-
constructor(environment: Environment, language: Language, eventEmitter?: ExecutionEventEmitter);
|
|
56
|
-
/**
|
|
57
|
-
* Find all matches based on the AST provider
|
|
58
|
-
*/
|
|
59
|
-
findMatches(filePaths: string[], schema: Record<string, any>): Promise<Match[]>;
|
|
60
|
-
/**
|
|
61
|
-
* Find all definitions for a given match
|
|
62
|
-
*/
|
|
63
|
-
findDefinitions(match: Match): Promise<Match[]>;
|
|
64
|
-
/**
|
|
65
|
-
* Find all references for a given match
|
|
66
|
-
*/
|
|
67
|
-
findReferences(match: Match): Promise<Match[]>;
|
|
68
|
-
/**
|
|
69
|
-
* Expand a match to its enclosing function, method, or class definition
|
|
70
|
-
* Useful for expanding a definition point (e.g., method name) to the full body
|
|
71
|
-
*/
|
|
72
|
-
expandMatch(match: Match): Promise<Match | null>;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=LanguageBackend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageBackend.d.ts","sourceRoot":"","sources":["../../../src/providers/LanguageBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;IAE/E;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;CACjD;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;IAE/C;;;;OAIG;IACH,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;CAC/C;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;gBAC7C,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAI/C;AAED;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,oBAAoB,CAAC,CAAsB;IACnD,OAAO,CAAC,QAAQ,CAAU;gBAEd,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,qBAAqB;IAO9F;;OAEG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAUrF;;OAEG;IACG,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAUrD;;OAEG;IACG,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAUpD;;;OAGG;IACG,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;CASvD"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Rule } from "powerlint/types";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for rule providers that can load rules from different sources
|
|
4
|
-
*/
|
|
5
|
-
export interface RuleProvider {
|
|
6
|
-
/**
|
|
7
|
-
* Load a specific rule by its ID
|
|
8
|
-
* @param ruleId The unique identifier of the rule
|
|
9
|
-
* @returns Promise that resolves to the rule
|
|
10
|
-
* @throws Error if rule is not found
|
|
11
|
-
*/
|
|
12
|
-
loadRuleById(ruleId: string): Promise<Rule>;
|
|
13
|
-
/**
|
|
14
|
-
* Load all available rules from this provider
|
|
15
|
-
* @returns Promise that resolves to an array of all rules
|
|
16
|
-
*/
|
|
17
|
-
loadAllRules(): Promise<Rule[]>;
|
|
18
|
-
/**
|
|
19
|
-
* Create a new rule (optional - not all providers support this)
|
|
20
|
-
* @param rule The rule to create
|
|
21
|
-
* @returns Promise that resolves to the created rule ID
|
|
22
|
-
* @throws Error if creation is not supported or fails
|
|
23
|
-
*/
|
|
24
|
-
createRule?(rule: Rule): Promise<string>;
|
|
25
|
-
/**
|
|
26
|
-
* Update an existing rule (optional - not all providers support this)
|
|
27
|
-
* @param ruleId The ID of the rule to update
|
|
28
|
-
* @param rule The updated rule data
|
|
29
|
-
* @throws Error if update is not supported or fails
|
|
30
|
-
*/
|
|
31
|
-
updateRule?(ruleId: string, rule: Rule): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Delete a rule (optional - not all providers support this)
|
|
34
|
-
* @param ruleId The ID of the rule to delete
|
|
35
|
-
* @throws Error if deletion is not supported or fails
|
|
36
|
-
*/
|
|
37
|
-
deleteRule?(ruleId: string): Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Configuration interface for rule providers
|
|
41
|
-
*/
|
|
42
|
-
export interface RuleProviderConfig {
|
|
43
|
-
type: string;
|
|
44
|
-
[key: string]: any;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=RuleProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuleProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/RuleProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE3C;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;IAE/B;;;;;OAKG;IACH,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAExC;;;;;OAKG;IACH,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEtD;;;;OAIG;IACH,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { Environment } from "powerlint/environment/Environment";
|
|
2
|
-
import { Language } from "powerlint/languages";
|
|
3
|
-
import type { IntelligenceProvider } from "powerlint/providers/LanguageBackend";
|
|
4
|
-
import { ExecutionEventEmitter } from "powerlint/steps/ExecutionEventEmitter";
|
|
5
|
-
import { Match } from "powerlint/types";
|
|
6
|
-
/**
|
|
7
|
-
* SCIP (Source Code Intelligence Protocol) implementation of IntelligenceProvider
|
|
8
|
-
* Provides code navigation features using SCIP indexes
|
|
9
|
-
*/
|
|
10
|
-
export declare class ScipIntelligenceProvider implements IntelligenceProvider {
|
|
11
|
-
private environment;
|
|
12
|
-
private storage;
|
|
13
|
-
private language;
|
|
14
|
-
private scipIndex;
|
|
15
|
-
private indexingPromise;
|
|
16
|
-
private eventEmitter;
|
|
17
|
-
constructor(environment: Environment, language: Language, eventEmitter?: ExecutionEventEmitter);
|
|
18
|
-
/**
|
|
19
|
-
* Get the SCIP CLI command for the given language
|
|
20
|
-
*/
|
|
21
|
-
private getScipCommand;
|
|
22
|
-
/**
|
|
23
|
-
* Ensure the index is ready, starting indexing if needed
|
|
24
|
-
*/
|
|
25
|
-
private ensureIndexReady;
|
|
26
|
-
/**
|
|
27
|
-
* Start the indexing process
|
|
28
|
-
*/
|
|
29
|
-
private startIndexing;
|
|
30
|
-
/**
|
|
31
|
-
* Find all definitions for a given match
|
|
32
|
-
* Automatically filters out external symbols
|
|
33
|
-
*/
|
|
34
|
-
findDefinitions(match: Match): Promise<Match[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Find all references for a given match
|
|
37
|
-
* Automatically filters out external symbols
|
|
38
|
-
*/
|
|
39
|
-
findReferences(match: Match): Promise<Match[]>;
|
|
40
|
-
/**
|
|
41
|
-
* Check if a symbol is from an external library (internal use)
|
|
42
|
-
*/
|
|
43
|
-
private isExternalSymbol;
|
|
44
|
-
/**
|
|
45
|
-
* Find the best SCIP occurrence that overlaps with the given match
|
|
46
|
-
* Uses heuristics to pick the most relevant occurrence when multiple overlap
|
|
47
|
-
*/
|
|
48
|
-
private findBestOverlappingOccurrence;
|
|
49
|
-
/**
|
|
50
|
-
* Check if two ranges overlap
|
|
51
|
-
*/
|
|
52
|
-
private rangesOverlap;
|
|
53
|
-
/**
|
|
54
|
-
* Check if SCIP range is fully inside the match span
|
|
55
|
-
*/
|
|
56
|
-
private rangeFullyInside;
|
|
57
|
-
/**
|
|
58
|
-
* Extract class and method names from SCIP symbol
|
|
59
|
-
* e.g., "scip-typescript npm @wispbit/server 1.0.0 src/services/`OrganizationService`#updateViolationCounts()."
|
|
60
|
-
* returns { className: "OrganizationService", methodName: "updateViolationCounts" }
|
|
61
|
-
*
|
|
62
|
-
* For standalone functions without a class:
|
|
63
|
-
* e.g., "scip-typescript npm @wispbit/server 1.0.0 src/utils/helper()."
|
|
64
|
-
* returns { className: null, methodName: "helper" }
|
|
65
|
-
*/
|
|
66
|
-
private extractSymbolNames;
|
|
67
|
-
/**
|
|
68
|
-
* Find definition for a symbol across all documents
|
|
69
|
-
*/
|
|
70
|
-
private findDefinitionForSymbol;
|
|
71
|
-
/**
|
|
72
|
-
* Find all references for a symbol across all documents
|
|
73
|
-
*/
|
|
74
|
-
private findReferencesForSymbol;
|
|
75
|
-
/**
|
|
76
|
-
* Load SCIP index from the configured path
|
|
77
|
-
*/
|
|
78
|
-
loadIndex(): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Parse a SCIP index from bytes
|
|
81
|
-
*/
|
|
82
|
-
private parseIndex;
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=ScipIntelligenceProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScipIntelligenceProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/ScipIntelligenceProvider.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAiEvC;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,oBAAoB;IACnE,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,YAAY,CAAuB;gBAE/B,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,qBAAqB;IAO9F;;OAEG;IACH,OAAO,CAAC,cAAc;IAatB;;OAEG;YACW,gBAAgB;IAgB9B;;OAEG;YACW,aAAa;IA6E3B;;;OAGG;IACG,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IA0CrD;;;OAGG;IACG,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAqCpD;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAMxB;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAmDrC;;OAEG;IACH,OAAO,CAAC,aAAa;IA0BrB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAkBxB;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IA6B1B;;OAEG;YACW,uBAAuB;IAyCrC;;OAEG;YACW,uBAAuB;IA4CrC;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAQhC;;OAEG;IACH,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Match, Rule } from "powerlint/types";
|
|
2
|
-
/**
|
|
3
|
-
* Interface for violation validation providers that can validate violations using different methods
|
|
4
|
-
*/
|
|
5
|
-
export interface ViolationValidationProvider {
|
|
6
|
-
/**
|
|
7
|
-
* Validate potential violations from a list of matches
|
|
8
|
-
* @param params Validation parameters
|
|
9
|
-
* @returns Promise that resolves to validation results
|
|
10
|
-
*/
|
|
11
|
-
validateViolations(params: ViolationValidationParams): Promise<ViolationValidationResponse>;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Parameters for violation validation
|
|
15
|
-
*/
|
|
16
|
-
export interface ViolationValidationParams {
|
|
17
|
-
/** The rule being validated against */
|
|
18
|
-
rule: Rule;
|
|
19
|
-
/** The matches to validate */
|
|
20
|
-
matches: Match[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Response from violation validation
|
|
24
|
-
*/
|
|
25
|
-
export interface ViolationValidationResponse {
|
|
26
|
-
/** Matches that are valid violations */
|
|
27
|
-
validMatches: Match[];
|
|
28
|
-
/** Matches that are not violations */
|
|
29
|
-
skippedMatches: Match[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Configuration interface for violation validation providers
|
|
33
|
-
*/
|
|
34
|
-
export interface ViolationValidationProviderConfig {
|
|
35
|
-
type: string;
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=ViolationValidationProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ViolationValidationProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/ViolationValidationProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,kBAAkB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAA;CAC5F;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,uCAAuC;IACvC,IAAI,EAAE,IAAI,CAAA;IACV,8BAA8B;IAC9B,OAAO,EAAE,KAAK,EAAE,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wCAAwC;IACxC,YAAY,EAAE,KAAK,EAAE,CAAA;IACrB,sCAAsC;IACtC,cAAc,EAAE,KAAK,EAAE,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Config } from "powerlint/environment/Config";
|
|
2
|
-
import type { Environment } from "powerlint/environment/Environment";
|
|
3
|
-
import { RuleProvider } from "powerlint/providers/RuleProvider";
|
|
4
|
-
import type { Rule } from "powerlint/types";
|
|
5
|
-
/**
|
|
6
|
-
* Rule provider that fetches rules from Wispbit Cloud
|
|
7
|
-
*/
|
|
8
|
-
export declare class WispbitRuleProvider implements RuleProvider {
|
|
9
|
-
private config;
|
|
10
|
-
private environment;
|
|
11
|
-
constructor(config: Config, environment: Environment);
|
|
12
|
-
/**
|
|
13
|
-
* Get the repository URL for API requests
|
|
14
|
-
*/
|
|
15
|
-
private getRepositoryUrl;
|
|
16
|
-
/**
|
|
17
|
-
* Load a specific rule by ID from Wispbit Cloud
|
|
18
|
-
*/
|
|
19
|
-
loadRuleById(ruleId: string): Promise<Rule>;
|
|
20
|
-
/**
|
|
21
|
-
* Load all rules from Wispbit Cloud for the configured repository
|
|
22
|
-
*/
|
|
23
|
-
loadAllRules(): Promise<Rule[]>;
|
|
24
|
-
/**
|
|
25
|
-
* Fetch rules from Wispbit Cloud API
|
|
26
|
-
*/
|
|
27
|
-
private fetchRules;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=WispbitRuleProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WispbitRuleProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/WispbitRuleProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C;;GAEG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACtD,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,WAAW,CAAa;gBAEpB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;IAKpD;;OAEG;YACW,gBAAgB;IAU9B;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjD;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAIrC;;OAEG;YACW,UAAU;CAwBzB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Config } from "powerlint/environment/Config";
|
|
2
|
-
import type { ViolationValidationProvider, ViolationValidationParams, ViolationValidationResponse } from "powerlint/providers/ViolationValidationProvider";
|
|
3
|
-
/**
|
|
4
|
-
* Violation validation provider that uses Wispbit's specialized validation endpoint
|
|
5
|
-
*/
|
|
6
|
-
export declare class WispbitViolationValidationProvider implements ViolationValidationProvider {
|
|
7
|
-
private config;
|
|
8
|
-
private useInternalEndpoint;
|
|
9
|
-
constructor(config: Config, useInternalEndpoint?: boolean);
|
|
10
|
-
validateViolations(params: ViolationValidationParams): Promise<ViolationValidationResponse>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=WispbitViolationValidationProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WispbitViolationValidationProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/WispbitViolationValidationProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,iDAAiD,CAAA;AAExD;;GAEG;AACH,qBAAa,kCAAmC,YAAW,2BAA2B;IACpF,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,mBAAmB,CAAS;gBAExB,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAE,OAAe;IAK1D,kBAAkB,CACtB,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,2BAA2B,CAAC;CAyBxC"}
|