@gitkraken/conflict-tools 0.2.4-beta.9 → 0.4.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/CHANGELOG.md +55 -7
- package/README.md +308 -59
- package/dist/errors/conflict.d.ts +1 -1
- package/dist/extraction/extract.d.ts +15 -1
- package/dist/extraction/extract.js +1 -1
- package/dist/extraction/parser.js +5 -5
- package/dist/git/port-dispatch.d.ts +14 -2
- package/dist/git/port-dispatch.js +1 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/ports/git.d.ts +20 -1
- package/dist/ports/parser.d.ts +27 -6
- package/dist/ports/validator.d.ts +29 -0
- package/dist/ports/validator.js +1 -0
- package/dist/reference-integrity/detect.d.ts +39 -4
- package/dist/reference-integrity/detect.js +2 -2
- package/dist/reference-integrity/snapshot.d.ts +28 -6
- package/dist/reference-integrity/snapshot.js +1 -1
- package/dist/resolution/detect-code-loss.d.ts +23 -0
- package/dist/resolution/detect-code-loss.js +1 -0
- package/dist/resolver/apply-resolutions.js +1 -1
- package/dist/resolver/deps.d.ts +1 -1
- package/dist/resolver/fix-loop.d.ts +67 -0
- package/dist/resolver/fix-loop.js +2 -0
- package/dist/resolver/mechanical.d.ts +25 -0
- package/dist/resolver/mechanical.js +1 -0
- package/dist/resolver/model-budget.d.ts +26 -0
- package/dist/resolver/model-budget.js +1 -0
- package/dist/resolver/parse-response.d.ts +9 -1
- package/dist/resolver/parse-response.js +1 -1
- package/dist/resolver/prompt.d.ts +13 -2
- package/dist/resolver/prompt.js +27 -7
- package/dist/resolver/refine-pass.d.ts +8 -0
- package/dist/resolver/refine-pass.js +1 -1
- package/dist/resolver/rename-choice.d.ts +15 -0
- package/dist/resolver/rename-choice.js +1 -0
- package/dist/resolver/rename-group.d.ts +22 -0
- package/dist/resolver/rename-group.js +1 -0
- package/dist/resolver/resolve-conflict.d.ts +7 -1
- package/dist/resolver/resolve-conflict.js +1 -1
- package/dist/resolver/resolve-conflicts.js +1 -1
- package/dist/resolver/summarize-operation.js +1 -1
- package/dist/resolver/validate.js +1 -1
- package/dist/types/events.d.ts +30 -3
- package/dist/types/findings.d.ts +25 -15
- package/dist/types/resolution.d.ts +17 -1
- package/dist/types/step.d.ts +47 -5
- package/dist/types/summary.d.ts +17 -10
- package/dist/validation/findings.d.ts +9 -0
- package/dist/validation/findings.js +1 -0
- package/dist/validation/markers.d.ts +11 -0
- package/dist/{ports/verify.js → validation/markers.js} +1 -1
- package/package.json +1 -1
- package/dist/ports/verify.d.ts +0 -30
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Issue } from "../types/issue.js";
|
|
2
|
+
|
|
3
|
+
//#region src/validation/markers.d.ts
|
|
4
|
+
interface VerificationResult {
|
|
5
|
+
valid: boolean;
|
|
6
|
+
issues?: Issue[];
|
|
7
|
+
}
|
|
8
|
+
declare const CONFLICT_MARKER_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp];
|
|
9
|
+
declare function checkResidualMarkers(_filePath: string, content: string): VerificationResult;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { CONFLICT_MARKER_PATTERNS, VerificationResult, checkResidualMarkers };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=[/^<{7}(\s|$)/,/^\|{7}(\s|$)/,/^={7}(\s|$)/,/^>{7}(\s|$)/];function t(t,n){let r=n.split(`
|
|
2
|
-
`),i=[];for(let t=0;t<r.length;t++){let n=r[t]??``;for(let r of e)if(r.test(n)){i.push(t+1);break}}return i.length===0?{valid:!0}:{valid:!1,issues:[{severity:`error`,message:`Residual conflict markers found at line(s) ${i.join(`, `)}.`}]}}export{t as checkResidualMarkers};
|
|
2
|
+
`),i=[];for(let t=0;t<r.length;t++){let n=r[t]??``;for(let r of e)if(r.test(n)){i.push(t+1);break}}return i.length===0?{valid:!0}:{valid:!1,issues:[{severity:`error`,message:`Residual conflict markers found at line(s) ${i.join(`, `)}.`}]}}export{e as CONFLICT_MARKER_PATTERNS,t as checkResidualMarkers};
|
package/package.json
CHANGED
package/dist/ports/verify.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SourceOverlay } from "./parser.js";
|
|
2
|
-
import { Issue } from "../types/issue.js";
|
|
3
|
-
|
|
4
|
-
//#region src/ports/verify.d.ts
|
|
5
|
-
interface VerificationResult {
|
|
6
|
-
valid: boolean;
|
|
7
|
-
issues?: Issue[];
|
|
8
|
-
}
|
|
9
|
-
interface ValidatorFinding {
|
|
10
|
-
/** Open category string set by the consumer (e.g. `'type-error'`, `'lint:no-console'`). */
|
|
11
|
-
category: string;
|
|
12
|
-
severity: 'error' | 'warning';
|
|
13
|
-
file: string;
|
|
14
|
-
/** 1-indexed. */
|
|
15
|
-
line?: number;
|
|
16
|
-
message: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The consumer's validation port (RFC stages 5/7). Plug in any checks — syntax, real import
|
|
20
|
-
* resolution, types, lint, project rules. **Non-blocking**: runs post-refine over an overlay (one file
|
|
21
|
-
* for per-file validation, or the whole touched set for cross-file); its findings are advisory (folded
|
|
22
|
-
* into the operation's findings and verdict), never a re-resolve. The only blocking gate is residual
|
|
23
|
-
* conflict markers, checked built-in by the resolver ({@link checkResidualMarkers}) — not this port.
|
|
24
|
-
*/
|
|
25
|
-
interface Validator {
|
|
26
|
-
validate(sources: SourceOverlay): Promise<ValidatorFinding[]>;
|
|
27
|
-
}
|
|
28
|
-
declare function checkResidualMarkers(_filePath: string, content: string): VerificationResult;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { Validator, ValidatorFinding, VerificationResult, checkResidualMarkers };
|