@company-semantics/contracts 0.14.0 → 0.15.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/package.json +1 -1
- package/src/guards/config.ts +43 -0
- package/src/guards/index.ts +2 -0
package/package.json
CHANGED
package/src/guards/config.ts
CHANGED
|
@@ -162,6 +162,42 @@ export interface ContractsFreshnessBaseline {
|
|
|
162
162
|
skip?: boolean;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Scripts-devDependencies guard configuration.
|
|
167
|
+
* Checks that tools used in package.json scripts are declared in devDependencies.
|
|
168
|
+
*/
|
|
169
|
+
export interface ScriptsDepsBaseline {
|
|
170
|
+
/** Path to package.json relative to repo root */
|
|
171
|
+
packageJsonPath: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Additional tools to exempt from checking.
|
|
175
|
+
* Runtime-provided tools (node, pnpm, npm, npx) are always exempt.
|
|
176
|
+
*/
|
|
177
|
+
exempt?: string[];
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* If true, violations are errors. If false, violations are warnings.
|
|
181
|
+
* @default false
|
|
182
|
+
*/
|
|
183
|
+
strict?: boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Structural guard baselines.
|
|
188
|
+
* Product repos provide DATA only; CI orchestrator owns guard implementations.
|
|
189
|
+
*
|
|
190
|
+
* Design invariant: Product repos must NEVER import CI guard code.
|
|
191
|
+
* They export baselines; CI injects guards at runtime.
|
|
192
|
+
*/
|
|
193
|
+
export interface StructuralBaselines {
|
|
194
|
+
/**
|
|
195
|
+
* Scripts-devDependencies check configuration.
|
|
196
|
+
* CI injects checkScriptsDeps based on this config.
|
|
197
|
+
*/
|
|
198
|
+
scriptsDeps?: ScriptsDepsBaseline;
|
|
199
|
+
}
|
|
200
|
+
|
|
165
201
|
/**
|
|
166
202
|
* Evolution guard baselines.
|
|
167
203
|
* Product repos provide DATA only; CI orchestrator owns guard implementations.
|
|
@@ -226,6 +262,13 @@ export interface GuardCheckRegistry {
|
|
|
226
262
|
meta?: BoundGuardCheck[];
|
|
227
263
|
};
|
|
228
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Structural guard baselines.
|
|
267
|
+
* CI orchestrator injects structural guards based on these baselines.
|
|
268
|
+
* Product repos provide data only, never guard implementations.
|
|
269
|
+
*/
|
|
270
|
+
structuralBaselines?: StructuralBaselines;
|
|
271
|
+
|
|
229
272
|
/**
|
|
230
273
|
* Evolution guard baselines.
|
|
231
274
|
* CI orchestrator injects evolution guards based on these baselines.
|