@paths.design/caws-cli 7.0.3 → 8.0.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/dist/commands/quality-gates.js +147 -9
- package/dist/commands/specs.js +108 -13
- package/dist/commands/tool.js +0 -1
- package/dist/scaffold/git-hooks.js +159 -58
- package/dist/scaffold/index.js +1 -1
- package/dist/templates/.caws/tools/README.md +1 -0
- package/dist/utils/git-lock.js +1 -0
- package/dist/utils/project-analysis.js +176 -16
- package/dist/utils/quality-gates.js +7 -6
- package/dist/utils/spec-resolver.js +4 -0
- package/dist/utils/yaml-validation.js +1 -0
- package/package.json +1 -1
- package/templates/.caws/tools/README.md +1 -0
- package/dist/budget-derivation.d.ts +0 -74
- package/dist/budget-derivation.d.ts.map +0 -1
- package/dist/cicd-optimizer.d.ts +0 -142
- package/dist/cicd-optimizer.d.ts.map +0 -1
- package/dist/commands/archive.d.ts +0 -50
- package/dist/commands/archive.d.ts.map +0 -1
- package/dist/commands/burnup.d.ts +0 -6
- package/dist/commands/burnup.d.ts.map +0 -1
- package/dist/commands/diagnose.d.ts +0 -52
- package/dist/commands/diagnose.d.ts.map +0 -1
- package/dist/commands/evaluate.d.ts +0 -8
- package/dist/commands/evaluate.d.ts.map +0 -1
- package/dist/commands/init.d.ts +0 -5
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/iterate.d.ts +0 -8
- package/dist/commands/iterate.d.ts.map +0 -1
- package/dist/commands/mode.d.ts +0 -24
- package/dist/commands/mode.d.ts.map +0 -1
- package/dist/commands/plan.d.ts +0 -49
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/commands/provenance.d.ts +0 -32
- package/dist/commands/provenance.d.ts.map +0 -1
- package/dist/commands/quality-gates.d.ts +0 -52
- package/dist/commands/quality-gates.d.ts.map +0 -1
- package/dist/commands/quality-monitor.d.ts +0 -17
- package/dist/commands/quality-monitor.d.ts.map +0 -1
- package/dist/commands/specs.d.ts +0 -71
- package/dist/commands/specs.d.ts.map +0 -1
- package/dist/commands/status.d.ts +0 -44
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/templates.d.ts +0 -74
- package/dist/commands/templates.d.ts.map +0 -1
- package/dist/commands/tool.d.ts +0 -13
- package/dist/commands/tool.d.ts.map +0 -1
- package/dist/commands/troubleshoot.d.ts +0 -8
- package/dist/commands/troubleshoot.d.ts.map +0 -1
- package/dist/commands/tutorial.d.ts +0 -55
- package/dist/commands/tutorial.d.ts.map +0 -1
- package/dist/commands/validate.d.ts +0 -15
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/waivers.d.ts +0 -8
- package/dist/commands/waivers.d.ts.map +0 -1
- package/dist/commands/workflow.d.ts +0 -85
- package/dist/commands/workflow.d.ts.map +0 -1
- package/dist/config/index.d.ts +0 -29
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/modes.d.ts +0 -225
- package/dist/config/modes.d.ts.map +0 -1
- package/dist/constants/spec-types.d.ts +0 -41
- package/dist/constants/spec-types.d.ts.map +0 -1
- package/dist/error-handler.d.ts +0 -164
- package/dist/error-handler.d.ts.map +0 -1
- package/dist/generators/jest-config.d.ts +0 -32
- package/dist/generators/jest-config.d.ts.map +0 -1
- package/dist/generators/working-spec.d.ts +0 -13
- package/dist/generators/working-spec.d.ts.map +0 -1
- package/dist/index-new.d.ts +0 -5
- package/dist/index-new.d.ts.map +0 -1
- package/dist/index-new.js +0 -317
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.backup +0 -4711
- package/dist/minimal-cli.d.ts +0 -3
- package/dist/minimal-cli.d.ts.map +0 -1
- package/dist/policy/PolicyManager.d.ts +0 -104
- package/dist/policy/PolicyManager.d.ts.map +0 -1
- package/dist/scaffold/cursor-hooks.d.ts +0 -7
- package/dist/scaffold/cursor-hooks.d.ts.map +0 -1
- package/dist/scaffold/git-hooks.d.ts +0 -20
- package/dist/scaffold/git-hooks.d.ts.map +0 -1
- package/dist/scaffold/index.d.ts +0 -20
- package/dist/scaffold/index.d.ts.map +0 -1
- package/dist/spec/SpecFileManager.d.ts +0 -146
- package/dist/spec/SpecFileManager.d.ts.map +0 -1
- package/dist/test-analysis.d.ts +0 -182
- package/dist/test-analysis.d.ts.map +0 -1
- package/dist/tool-interface.d.ts +0 -236
- package/dist/tool-interface.d.ts.map +0 -1
- package/dist/tool-loader.d.ts +0 -77
- package/dist/tool-loader.d.ts.map +0 -1
- package/dist/tool-validator.d.ts +0 -72
- package/dist/tool-validator.d.ts.map +0 -1
- package/dist/utils/detection.d.ts +0 -7
- package/dist/utils/detection.d.ts.map +0 -1
- package/dist/utils/finalization.d.ts +0 -17
- package/dist/utils/finalization.d.ts.map +0 -1
- package/dist/utils/project-analysis.d.ts +0 -14
- package/dist/utils/project-analysis.d.ts.map +0 -1
- package/dist/utils/quality-gates.d.ts +0 -49
- package/dist/utils/quality-gates.d.ts.map +0 -1
- package/dist/utils/spec-resolver.d.ts +0 -88
- package/dist/utils/spec-resolver.d.ts.map +0 -1
- package/dist/utils/typescript-detector.d.ts +0 -63
- package/dist/utils/typescript-detector.d.ts.map +0 -1
- package/dist/validation/spec-validation.d.ts +0 -43
- package/dist/validation/spec-validation.d.ts.map +0 -1
- package/dist/waivers-manager.d.ts +0 -167
- package/dist/waivers-manager.d.ts.map +0 -1
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Basic validation of working spec
|
|
3
|
-
* @param {Object} spec - Working spec object
|
|
4
|
-
* @param {Object} options - Validation options
|
|
5
|
-
* @returns {Object} Validation result
|
|
6
|
-
*/
|
|
7
|
-
export function validateWorkingSpec(spec: any, _options?: {}): any;
|
|
8
|
-
/**
|
|
9
|
-
* Enhanced validation with suggestions and auto-fix
|
|
10
|
-
* @param {Object} spec - Working spec object
|
|
11
|
-
* @param {Object} options - Validation options
|
|
12
|
-
* @returns {Object} Enhanced validation result
|
|
13
|
-
*/
|
|
14
|
-
export function validateWorkingSpecWithSuggestions(spec: any, options?: any): any;
|
|
15
|
-
/**
|
|
16
|
-
* Get suggestion for a missing field
|
|
17
|
-
* @param {string} field - Field name
|
|
18
|
-
* @param {Object} _spec - Spec object (for context)
|
|
19
|
-
* @returns {string} Suggestion text
|
|
20
|
-
*/
|
|
21
|
-
export function getFieldSuggestion(field: string, _spec: any): string;
|
|
22
|
-
/**
|
|
23
|
-
* Check if a field can be auto-fixed
|
|
24
|
-
* @param {string} field - Field name
|
|
25
|
-
* @param {Object} _spec - Spec object (for context)
|
|
26
|
-
* @returns {boolean} Whether field can be auto-fixed
|
|
27
|
-
*/
|
|
28
|
-
export function canAutoFixField(field: string, _spec: any): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Calculate compliance score based on errors and warnings
|
|
31
|
-
* Score ranges from 0 (many issues) to 1 (perfect)
|
|
32
|
-
* @param {Array} errors - Validation errors
|
|
33
|
-
* @param {Array} warnings - Validation warnings
|
|
34
|
-
* @returns {number} Compliance score (0-1)
|
|
35
|
-
*/
|
|
36
|
-
export function calculateComplianceScore(errors: any[], warnings: any[]): number;
|
|
37
|
-
/**
|
|
38
|
-
* Get compliance grade from score
|
|
39
|
-
* @param {number} score - Compliance score (0-1)
|
|
40
|
-
* @returns {string} Grade (A, B, C, D, F)
|
|
41
|
-
*/
|
|
42
|
-
export function getComplianceGrade(score: number): string;
|
|
43
|
-
//# sourceMappingURL=spec-validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spec-validation.d.ts","sourceRoot":"","sources":["../../src/validation/spec-validation.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,mEA8HC;AAED;;;;;GAKG;AACH,kFAyWC;AAoCD;;;;;GAKG;AACH,0CAJW,MAAM,eAEJ,MAAM,CAkBlB;AAED;;;;;GAKG;AACH,uCAJW,MAAM,eAEJ,OAAO,CAKnB;AAnED;;;;;;GAMG;AACH,0EAFa,MAAM,CAclB;AAED;;;;GAIG;AACH,0CAHW,MAAM,GACJ,MAAM,CAQlB"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
export = WaiversManager;
|
|
2
|
-
/**
|
|
3
|
-
* Waiver Manager Class
|
|
4
|
-
* Handles waiver creation, validation, expiration, and audit logging
|
|
5
|
-
*/
|
|
6
|
-
declare class WaiversManager {
|
|
7
|
-
constructor(options?: {});
|
|
8
|
-
projectRoot: any;
|
|
9
|
-
waiversDir: string;
|
|
10
|
-
waiversFile: string;
|
|
11
|
-
auditLogFile: string;
|
|
12
|
-
/**
|
|
13
|
-
* Waiver Schema Definition
|
|
14
|
-
*/
|
|
15
|
-
getWaiverSchema(): {
|
|
16
|
-
type: string;
|
|
17
|
-
required: string[];
|
|
18
|
-
properties: {
|
|
19
|
-
id: {
|
|
20
|
-
type: string;
|
|
21
|
-
pattern: string;
|
|
22
|
-
description: string;
|
|
23
|
-
};
|
|
24
|
-
title: {
|
|
25
|
-
type: string;
|
|
26
|
-
minLength: number;
|
|
27
|
-
maxLength: number;
|
|
28
|
-
description: string;
|
|
29
|
-
};
|
|
30
|
-
reason: {
|
|
31
|
-
type: string;
|
|
32
|
-
enum: string[];
|
|
33
|
-
description: string;
|
|
34
|
-
};
|
|
35
|
-
description: {
|
|
36
|
-
type: string;
|
|
37
|
-
minLength: number;
|
|
38
|
-
maxLength: number;
|
|
39
|
-
description: string;
|
|
40
|
-
};
|
|
41
|
-
gates: {
|
|
42
|
-
type: string;
|
|
43
|
-
items: {
|
|
44
|
-
type: string;
|
|
45
|
-
enum: string[];
|
|
46
|
-
};
|
|
47
|
-
minItems: number;
|
|
48
|
-
description: string;
|
|
49
|
-
};
|
|
50
|
-
risk_assessment: {
|
|
51
|
-
type: string;
|
|
52
|
-
properties: {
|
|
53
|
-
impact_level: {
|
|
54
|
-
type: string;
|
|
55
|
-
enum: string[];
|
|
56
|
-
};
|
|
57
|
-
mitigation_plan: {
|
|
58
|
-
type: string;
|
|
59
|
-
minLength: number;
|
|
60
|
-
};
|
|
61
|
-
review_required: {
|
|
62
|
-
type: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
required: string[];
|
|
66
|
-
};
|
|
67
|
-
expires_at: {
|
|
68
|
-
type: string;
|
|
69
|
-
format: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
approved_by: {
|
|
73
|
-
type: string;
|
|
74
|
-
description: string;
|
|
75
|
-
};
|
|
76
|
-
created_at: {
|
|
77
|
-
type: string;
|
|
78
|
-
format: string;
|
|
79
|
-
description: string;
|
|
80
|
-
};
|
|
81
|
-
metadata: {
|
|
82
|
-
type: string;
|
|
83
|
-
properties: {
|
|
84
|
-
related_pr: {
|
|
85
|
-
type: string;
|
|
86
|
-
};
|
|
87
|
-
related_issue: {
|
|
88
|
-
type: string;
|
|
89
|
-
};
|
|
90
|
-
environment: {
|
|
91
|
-
type: string;
|
|
92
|
-
enum: string[];
|
|
93
|
-
};
|
|
94
|
-
urgency: {
|
|
95
|
-
type: string;
|
|
96
|
-
enum: string[];
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Create a new waiver
|
|
104
|
-
*/
|
|
105
|
-
createWaiver(waiverData: any): Promise<{
|
|
106
|
-
id: string;
|
|
107
|
-
title: any;
|
|
108
|
-
reason: any;
|
|
109
|
-
description: any;
|
|
110
|
-
gates: any;
|
|
111
|
-
risk_assessment: any;
|
|
112
|
-
expires_at: any;
|
|
113
|
-
approved_by: any;
|
|
114
|
-
created_at: string;
|
|
115
|
-
metadata: any;
|
|
116
|
-
}>;
|
|
117
|
-
/**
|
|
118
|
-
* Check if waiver applies to specific gates
|
|
119
|
-
*/
|
|
120
|
-
checkWaiverCoverage(gatesToCheck: any, context?: {}): Promise<{
|
|
121
|
-
coveredGates: any[];
|
|
122
|
-
waiverDetails: {
|
|
123
|
-
gate: any;
|
|
124
|
-
waiver_id: any;
|
|
125
|
-
reason: any;
|
|
126
|
-
expires_at: any;
|
|
127
|
-
approved_by: any;
|
|
128
|
-
}[];
|
|
129
|
-
allCovered: boolean;
|
|
130
|
-
}>;
|
|
131
|
-
/**
|
|
132
|
-
* Get all active waivers
|
|
133
|
-
*/
|
|
134
|
-
getActiveWaivers(): Promise<any[]>;
|
|
135
|
-
/**
|
|
136
|
-
* Revoke a waiver
|
|
137
|
-
*/
|
|
138
|
-
revokeWaiver(waiverId: any, reason?: string): Promise<any>;
|
|
139
|
-
/**
|
|
140
|
-
* Extend waiver expiration
|
|
141
|
-
*/
|
|
142
|
-
extendWaiver(waiverId: any, newExpiryDate: any, approvedBy: any): Promise<any>;
|
|
143
|
-
/**
|
|
144
|
-
* Get waiver statistics and health metrics
|
|
145
|
-
*/
|
|
146
|
-
getWaiverStats(): Promise<{
|
|
147
|
-
total_active: number;
|
|
148
|
-
by_reason: {};
|
|
149
|
-
by_risk_level: {};
|
|
150
|
-
expiring_soon: any[];
|
|
151
|
-
high_risk: any[];
|
|
152
|
-
total_gates_waived: number;
|
|
153
|
-
average_lifespan_days: number;
|
|
154
|
-
}>;
|
|
155
|
-
generateWaiverId(): Promise<string>;
|
|
156
|
-
validateWaiver(waiver: any): {
|
|
157
|
-
valid: boolean;
|
|
158
|
-
errors: string[];
|
|
159
|
-
};
|
|
160
|
-
checkWaiverConflicts(newWaiver: any): Promise<string[]>;
|
|
161
|
-
waiverAppliesToContext(waiver: any, context: any): boolean;
|
|
162
|
-
loadActiveWaivers(): Promise<any[]>;
|
|
163
|
-
saveActiveWaivers(waivers: any): Promise<void>;
|
|
164
|
-
auditLog(action: any, waiverId: any, details: any): Promise<void>;
|
|
165
|
-
flagForReview(waiver: any): Promise<void>;
|
|
166
|
-
}
|
|
167
|
-
//# sourceMappingURL=waivers-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waivers-manager.d.ts","sourceRoot":"","sources":["../src/waivers-manager.js"],"names":[],"mappings":";AAaA;;;GAGG;AACH;IACE,0BAUC;IATC,iBAAuD;IACvD,mBAAiE;IACjE,oBAAoE;IACpE,qBAAkE;IAQpE;;OAEG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiGC;IAED;;OAEG;IACH;;;;;;;;;;;OA4DC;IAED;;OAEG;IACH;;;;;;;;;;OA+BC;IAED;;OAEG;IACH,mCAgBC;IAED;;OAEG;IACH,2DAeC;IAED;;OAEG;IACH,+EAuBC;IAED;;OAEG;IACH;;;;;;;;OA2DC;IAID,oCAUC;IAED;;;MAkDC;IAED,wDAkBC;IAED,2DAUC;IAED,oCAyCC;IAED,+CAuBC;IAED,kEAaC;IAED,0CA2CC;CACF"}
|