archctx-contracts 0.7.2 → 0.8.1
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/fixtures/invalid/hook-debt-checkpoint-failed-read.json +54 -0
- package/fixtures/invalid/native-context-invalid-model-summary.json +635 -0
- package/fixtures/invalid/native-context-missing-contract-bytes.json +636 -0
- package/fixtures/invalid/native-context-missing-input-bytes.json +636 -0
- package/fixtures/invalid/native-context-mixed-snapshot.json +637 -0
- package/fixtures/invalid/projection-result-applied-incomplete-coverage.json +78 -0
- package/fixtures/invalid/refactor-decision-open-status.json +38 -0
- package/fixtures/valid/archctx-capabilities.json +3 -3
- package/fixtures/valid/capability-dependencies.json +1 -1
- package/fixtures/valid/docs-anchors.json +2 -1
- package/fixtures/valid/flow-selector-check.json +1 -1
- package/fixtures/valid/hook-debt-checkpoint.json +54 -0
- package/fixtures/valid/native-context-export.json +636 -0
- package/fixtures/valid/product-version-manifest.json +8 -8
- package/fixtures/valid/projection-manifest.json +47 -169
- package/fixtures/valid/projection-result.json +5 -5
- package/fixtures/valid/refactor-decision.json +38 -0
- package/fixtures/valid/runtime-recommendation-show.json +1 -0
- package/fixtures/valid/runtime-refactor-scan.json +6 -0
- package/package.json +1 -1
- package/schemas/repo/refactor-decision.schema.json +218 -0
- package/schemas/runtime/archctx-capabilities.schema.json +2 -2
- package/schemas/runtime/architecture-debt.schema.json +222 -0
- package/schemas/runtime/capability-dependencies.schema.json +10 -6
- package/schemas/runtime/changeset.schema.json +24 -1
- package/schemas/runtime/docs-anchors.schema.json +4 -3
- package/schemas/runtime/hook-debt-checkpoint.schema.json +69 -0
- package/schemas/runtime/native-context-export.schema.json +823 -0
- package/schemas/runtime/native-model-issue.schema.json +18 -0
- package/schemas/runtime/practice-checkpoint.schema.json +1 -0
- package/schemas/runtime/product-version-manifest.schema.json +2 -2
- package/schemas/runtime/projection-apply-readback.schema.json +470 -7
- package/schemas/runtime/projection-apply-recovery.schema.json +2 -2
- package/schemas/runtime/projection-manifest.schema.json +81 -186
- package/schemas/runtime/projection-result.schema.json +132 -5
- package/schemas/runtime/projection-target.schema.json +4 -1
- package/schemas/runtime/recommendation-v3.schema.json +106 -0
- package/schemas/runtime/review-result.schema.json +1 -0
- package/schemas/runtime/runtime-recommendation-show.schema.json +234 -13
- package/schemas/runtime/runtime-refactor-scan.schema.json +171 -0
- package/schemas/runtime/structural-observation-payload.schema.json +106 -0
- package/src/architecture-debt.ts +115 -0
- package/src/changeset-recovery.ts +49 -0
- package/src/docs-anchors.ts +2 -1
- package/src/failure.ts +810 -0
- package/src/index.ts +6 -0
- package/src/ledger.ts +14 -3
- package/src/native-context.ts +279 -0
- package/src/ownership-dependencies.ts +39 -1
- package/src/ports.ts +4 -0
- package/src/practices.ts +2 -0
- package/src/product-version.ts +37 -4
- package/src/projection-manifest.ts +372 -130
- package/src/projection-recovery.ts +111 -0
- package/src/projection.ts +443 -11
- package/src/refactor.ts +525 -2
- package/src/schema.ts +8 -0
- package/src/validator.ts +8 -3
package/src/validator.ts
CHANGED
|
@@ -169,14 +169,19 @@ function visit(
|
|
|
169
169
|
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
170
170
|
const objectValue = value as Record<string, Json>;
|
|
171
171
|
for (const key of schema.required ?? []) {
|
|
172
|
-
if (!(key
|
|
172
|
+
if (!Object.hasOwn(objectValue, key)) issues.push({ path: `${path}.${key}`, message: "required" });
|
|
173
173
|
}
|
|
174
174
|
for (const [key, child] of Object.entries(schema.properties ?? {})) {
|
|
175
|
-
if (key
|
|
175
|
+
if (Object.hasOwn(objectValue, key)) visit(child, objectValue[key], `${path}.${key}`, issues, root, resolveSchema);
|
|
176
176
|
}
|
|
177
177
|
if (schema.additionalProperties === false && schema.properties) {
|
|
178
178
|
for (const key of Object.keys(objectValue)) {
|
|
179
|
-
if (!(
|
|
179
|
+
if (!Object.hasOwn(schema.properties, key)) issues.push({ path: `${path}.${key}`, message: "additional property denied" });
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (schema.additionalProperties && typeof schema.additionalProperties === "object") {
|
|
183
|
+
for (const [key, child] of Object.entries(objectValue)) {
|
|
184
|
+
if (!Object.hasOwn(schema.properties ?? {}, key)) visit(schema.additionalProperties, child, `${path}.${key}`, issues, root, resolveSchema);
|
|
180
185
|
}
|
|
181
186
|
}
|
|
182
187
|
}
|