micro-contracts 0.18.3 → 0.18.4
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/docs/cli-reference.md
CHANGED
|
@@ -146,6 +146,10 @@ Prevents unauthorized edits to protected/generated areas.
|
|
|
146
146
|
|-------|------|-------------|---------------|--------|
|
|
147
147
|
| Allowlist | built-in | Block **direct** edits to `packages/**`, `*.generated.*`; require approval for `.github/**` | `micro-contracts check --only allowlist` | `allowlist` |
|
|
148
148
|
|
|
149
|
+
The changed files it inspects are everything not yet committed — staged, unstaged
|
|
150
|
+
and untracked alike — or the list given by `--changed-files` in CI. Without a
|
|
151
|
+
usable git repository the check fails rather than reporting no changes.
|
|
152
|
+
|
|
149
153
|
Files are categorized into three groups:
|
|
150
154
|
|
|
151
155
|
| Category | Examples | Who can edit |
|
|
@@ -154,6 +158,9 @@ Files are categorized into three groups:
|
|
|
154
158
|
| `protected` | `.github/**`, `spec/spectral.yaml`, `server/src/_shared/overlays/**` | Requires CODEOWNERS approval |
|
|
155
159
|
| `generated` | `packages/**`, `*.generated.*` | Only via `generate` command |
|
|
156
160
|
|
|
161
|
+
Patterns are evaluated in order and the last match wins, so a negation (`!pattern`)
|
|
162
|
+
must come after the pattern it narrows.
|
|
163
|
+
|
|
157
164
|
Protected files include:
|
|
158
165
|
- CI/workflow definitions (`.github/**`) — guardrail bypass prevention
|
|
159
166
|
- Spectral lint rules (`spec/spectral.yaml`) — security rule tampering
|
package/package.json
CHANGED