@ipation/specbridge 2.4.8 → 2.4.9
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/CHANGELOG.md +22 -1
- package/dist/cli.js +810 -764
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +40 -48
- package/dist/index.js +842 -788
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,19 +5,6 @@ import { Logger as Logger$1 } from 'pino';
|
|
|
5
5
|
import { Application } from 'express';
|
|
6
6
|
export { minimatch } from 'minimatch';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Shared execution context contract for CLI commands.
|
|
10
|
-
*/
|
|
11
|
-
type CommandOutputFormat = 'console' | 'json' | 'markdown';
|
|
12
|
-
interface CommandContext {
|
|
13
|
-
cwd: string;
|
|
14
|
-
outputFormat: CommandOutputFormat;
|
|
15
|
-
}
|
|
16
|
-
interface ConfiguredCommandContext<TConfig> {
|
|
17
|
-
context: CommandContext;
|
|
18
|
-
config: TConfig;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
8
|
/**
|
|
22
9
|
* Normalized verification request/response contracts shared across modules.
|
|
23
10
|
*/
|
|
@@ -42,9 +29,23 @@ interface VerificationRunResult {
|
|
|
42
29
|
errors?: VerificationIssue[];
|
|
43
30
|
}
|
|
44
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Shared execution context contract for CLI commands.
|
|
34
|
+
*/
|
|
35
|
+
type CommandOutputFormat = 'console' | 'json' | 'markdown';
|
|
36
|
+
interface CommandContext {
|
|
37
|
+
cwd: string;
|
|
38
|
+
outputFormat: CommandOutputFormat;
|
|
39
|
+
}
|
|
40
|
+
interface ConfiguredCommandContext<TConfig> {
|
|
41
|
+
context: CommandContext;
|
|
42
|
+
config: TConfig;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
45
|
/**
|
|
46
46
|
* Core type definitions for SpecBridge
|
|
47
47
|
*/
|
|
48
|
+
|
|
48
49
|
type DecisionStatus = 'draft' | 'active' | 'deprecated' | 'superseded';
|
|
49
50
|
type ConstraintType = 'invariant' | 'convention' | 'guideline';
|
|
50
51
|
type Severity = 'critical' | 'high' | 'medium' | 'low';
|
|
@@ -236,19 +237,9 @@ interface VerificationIssue {
|
|
|
236
237
|
stack?: string;
|
|
237
238
|
}
|
|
238
239
|
/**
|
|
239
|
-
*
|
|
240
|
+
* @deprecated Use VerificationRunResult from verification-contracts.
|
|
240
241
|
*/
|
|
241
|
-
|
|
242
|
-
success: boolean;
|
|
243
|
-
violations: Violation[];
|
|
244
|
-
checked: number;
|
|
245
|
-
passed: number;
|
|
246
|
-
failed: number;
|
|
247
|
-
skipped: number;
|
|
248
|
-
duration: number;
|
|
249
|
-
warnings?: VerificationWarning[];
|
|
250
|
-
errors?: VerificationIssue[];
|
|
251
|
-
}
|
|
242
|
+
type VerificationResult = VerificationRunResult;
|
|
252
243
|
/**
|
|
253
244
|
* Result of an inference run
|
|
254
245
|
*/
|
|
@@ -1147,6 +1138,26 @@ declare class ExplainReporter {
|
|
|
1147
1138
|
clear(): void;
|
|
1148
1139
|
}
|
|
1149
1140
|
|
|
1141
|
+
type Logger = Pick<Logger$1, 'debug' | 'info' | 'warn' | 'error' | 'child'>;
|
|
1142
|
+
declare function getLogger(bindings?: Record<string, unknown>): Logger;
|
|
1143
|
+
declare const logger: Logger;
|
|
1144
|
+
|
|
1145
|
+
declare class AstCache {
|
|
1146
|
+
private cache;
|
|
1147
|
+
get(filePath: string, project: Project): Promise<SourceFile | null>;
|
|
1148
|
+
clear(): void;
|
|
1149
|
+
getStats(): {
|
|
1150
|
+
entries: number;
|
|
1151
|
+
memoryEstimate: number;
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
interface FileVerificationResult {
|
|
1156
|
+
violations: Violation[];
|
|
1157
|
+
warnings: VerificationWarning[];
|
|
1158
|
+
errors: VerificationIssue[];
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1150
1161
|
interface VerificationOptions extends VerificationRunRequest {
|
|
1151
1162
|
reporter?: ExplainReporter;
|
|
1152
1163
|
}
|
|
@@ -1168,35 +1179,20 @@ declare class VerificationEngine {
|
|
|
1168
1179
|
/**
|
|
1169
1180
|
* Verify a single file
|
|
1170
1181
|
*/
|
|
1171
|
-
verifyFile(filePath: string, decisions: Decision[], severityFilter?: Severity[], cwd?: string, reporter?: ExplainReporter, signal?: AbortSignal): Promise<
|
|
1172
|
-
violations: Violation[];
|
|
1173
|
-
warnings: VerificationWarning[];
|
|
1174
|
-
errors: VerificationIssue[];
|
|
1175
|
-
}>;
|
|
1176
|
-
/**
|
|
1177
|
-
* Verify multiple files
|
|
1178
|
-
*/
|
|
1179
|
-
private verifyFiles;
|
|
1182
|
+
verifyFile(filePath: string, decisions: Decision[], severityFilter?: Severity[], cwd?: string, reporter?: ExplainReporter, signal?: AbortSignal): Promise<FileVerificationResult>;
|
|
1180
1183
|
/**
|
|
1181
1184
|
* Get registry
|
|
1182
1185
|
*/
|
|
1183
1186
|
getRegistry(): Registry;
|
|
1187
|
+
private ensurePluginsLoaded;
|
|
1188
|
+
private createAccumulator;
|
|
1189
|
+
private addFileResult;
|
|
1184
1190
|
}
|
|
1185
1191
|
/**
|
|
1186
1192
|
* Create verification engine
|
|
1187
1193
|
*/
|
|
1188
1194
|
declare function createVerificationEngine(registry?: Registry): VerificationEngine;
|
|
1189
1195
|
|
|
1190
|
-
declare class AstCache {
|
|
1191
|
-
private cache;
|
|
1192
|
-
get(filePath: string, project: Project): Promise<SourceFile | null>;
|
|
1193
|
-
clear(): void;
|
|
1194
|
-
getStats(): {
|
|
1195
|
-
entries: number;
|
|
1196
|
-
memoryEstimate: number;
|
|
1197
|
-
};
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
1196
|
declare function getChangedFiles(cwd: string): Promise<string[]>;
|
|
1201
1197
|
|
|
1202
1198
|
/**
|
|
@@ -1883,10 +1879,6 @@ declare function matchesAnyPattern(filePath: string, patterns: string[], options
|
|
|
1883
1879
|
cwd?: string;
|
|
1884
1880
|
}): boolean;
|
|
1885
1881
|
|
|
1886
|
-
type Logger = Pick<Logger$1, 'debug' | 'info' | 'warn' | 'error' | 'child'>;
|
|
1887
|
-
declare function getLogger(bindings?: Record<string, unknown>): Logger;
|
|
1888
|
-
declare const logger: Logger;
|
|
1889
|
-
|
|
1890
1882
|
/**
|
|
1891
1883
|
* Analytics engine - Provide insights into compliance trends and decision impact
|
|
1892
1884
|
*/
|