@harness-engineering/core 0.17.1 → 0.18.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/architecture/matchers.d.mts +1 -1
- package/dist/architecture/matchers.d.ts +1 -1
- package/dist/index.d.mts +94 -84
- package/dist/index.d.ts +94 -84
- package/dist/index.js +56 -15
- package/dist/index.mjs +56 -15
- package/dist/{matchers-D20x48U9.d.mts → matchers-Dj1t5vpg.d.mts} +46 -46
- package/dist/{matchers-D20x48U9.d.ts → matchers-Dj1t5vpg.d.ts} +46 -46
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12605,6 +12605,8 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
12605
12605
|
owner;
|
|
12606
12606
|
repo;
|
|
12607
12607
|
retryOpts;
|
|
12608
|
+
/** Cached GitHub milestone name -> ID mapping */
|
|
12609
|
+
milestoneCache = null;
|
|
12608
12610
|
constructor(options) {
|
|
12609
12611
|
this.token = options.token;
|
|
12610
12612
|
this.config = options.config;
|
|
@@ -12621,6 +12623,43 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
12621
12623
|
this.owner = repoParts[0];
|
|
12622
12624
|
this.repo = repoParts[1];
|
|
12623
12625
|
}
|
|
12626
|
+
/**
|
|
12627
|
+
* Fetch all GitHub milestones and build the name -> ID cache.
|
|
12628
|
+
*/
|
|
12629
|
+
async loadMilestones() {
|
|
12630
|
+
if (this.milestoneCache) return this.milestoneCache;
|
|
12631
|
+
this.milestoneCache = /* @__PURE__ */ new Map();
|
|
12632
|
+
const response = await fetchWithRetry(
|
|
12633
|
+
this.fetchFn,
|
|
12634
|
+
`${this.apiBase}/repos/${this.owner}/${this.repo}/milestones?state=all&per_page=100`,
|
|
12635
|
+
{ method: "GET", headers: this.headers() },
|
|
12636
|
+
this.retryOpts
|
|
12637
|
+
);
|
|
12638
|
+
if (response.ok) {
|
|
12639
|
+
const data = await response.json();
|
|
12640
|
+
for (const m of data) {
|
|
12641
|
+
this.milestoneCache.set(m.title, m.number);
|
|
12642
|
+
}
|
|
12643
|
+
}
|
|
12644
|
+
return this.milestoneCache;
|
|
12645
|
+
}
|
|
12646
|
+
/**
|
|
12647
|
+
* Get or create a GitHub milestone by name. Returns the milestone number.
|
|
12648
|
+
*/
|
|
12649
|
+
async ensureMilestone(name) {
|
|
12650
|
+
const cache = await this.loadMilestones();
|
|
12651
|
+
if (cache.has(name)) return cache.get(name);
|
|
12652
|
+
const response = await fetchWithRetry(
|
|
12653
|
+
this.fetchFn,
|
|
12654
|
+
`${this.apiBase}/repos/${this.owner}/${this.repo}/milestones`,
|
|
12655
|
+
{ method: "POST", headers: this.headers(), body: JSON.stringify({ title: name }) },
|
|
12656
|
+
this.retryOpts
|
|
12657
|
+
);
|
|
12658
|
+
if (!response.ok) return null;
|
|
12659
|
+
const data = await response.json();
|
|
12660
|
+
cache.set(name, data.number);
|
|
12661
|
+
return data.number;
|
|
12662
|
+
}
|
|
12624
12663
|
headers() {
|
|
12625
12664
|
return {
|
|
12626
12665
|
Authorization: `Bearer ${this.token}`,
|
|
@@ -12645,21 +12684,15 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
12645
12684
|
}
|
|
12646
12685
|
async createTicket(feature, milestone) {
|
|
12647
12686
|
try {
|
|
12648
|
-
const labels = labelsForStatus(feature.status, this.config);
|
|
12649
|
-
const body = [
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
feature.spec ? `**Spec:** ${feature.spec}` : ""
|
|
12654
|
-
].filter(Boolean).join("\n");
|
|
12687
|
+
const labels = [...labelsForStatus(feature.status, this.config), "feature"];
|
|
12688
|
+
const body = [feature.summary, "", feature.spec ? `**Spec:** ${feature.spec}` : ""].filter(Boolean).join("\n");
|
|
12689
|
+
const milestoneId = await this.ensureMilestone(milestone);
|
|
12690
|
+
const issuePayload = { title: feature.name, body, labels };
|
|
12691
|
+
if (milestoneId) issuePayload.milestone = milestoneId;
|
|
12655
12692
|
const response = await fetchWithRetry(
|
|
12656
12693
|
this.fetchFn,
|
|
12657
12694
|
`${this.apiBase}/repos/${this.owner}/${this.repo}/issues`,
|
|
12658
|
-
{
|
|
12659
|
-
method: "POST",
|
|
12660
|
-
headers: this.headers(),
|
|
12661
|
-
body: JSON.stringify({ title: feature.name, body, labels })
|
|
12662
|
-
},
|
|
12695
|
+
{ method: "POST", headers: this.headers(), body: JSON.stringify(issuePayload) },
|
|
12663
12696
|
this.retryOpts
|
|
12664
12697
|
);
|
|
12665
12698
|
if (!response.ok) {
|
|
@@ -12674,7 +12707,7 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
12674
12707
|
return (0, import_types21.Err)(error instanceof Error ? error : new Error(String(error)));
|
|
12675
12708
|
}
|
|
12676
12709
|
}
|
|
12677
|
-
async updateTicket(externalId, changes) {
|
|
12710
|
+
async updateTicket(externalId, changes, milestone) {
|
|
12678
12711
|
try {
|
|
12679
12712
|
const parsed = parseExternalId(externalId);
|
|
12680
12713
|
if (!parsed) return (0, import_types21.Err)(new Error(`Invalid externalId format: "${externalId}"`));
|
|
@@ -12687,7 +12720,11 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
12687
12720
|
if (changes.status !== void 0) {
|
|
12688
12721
|
const externalStatus = this.config.statusMap[changes.status];
|
|
12689
12722
|
patch.state = externalStatus;
|
|
12690
|
-
patch.labels = labelsForStatus(changes.status, this.config);
|
|
12723
|
+
patch.labels = [...labelsForStatus(changes.status, this.config), "feature"];
|
|
12724
|
+
}
|
|
12725
|
+
if (milestone) {
|
|
12726
|
+
const milestoneId = await this.ensureMilestone(milestone);
|
|
12727
|
+
if (milestoneId) patch.milestone = milestoneId;
|
|
12691
12728
|
}
|
|
12692
12729
|
const response = await fetchWithRetry(
|
|
12693
12730
|
this.fetchFn,
|
|
@@ -12820,7 +12857,11 @@ async function syncToExternal(roadmap, adapter, _config) {
|
|
|
12820
12857
|
result.errors.push({ featureOrId: feature.name, error: createResult.error });
|
|
12821
12858
|
}
|
|
12822
12859
|
} else {
|
|
12823
|
-
const updateResult = await adapter.updateTicket(
|
|
12860
|
+
const updateResult = await adapter.updateTicket(
|
|
12861
|
+
feature.externalId,
|
|
12862
|
+
feature,
|
|
12863
|
+
milestone.name
|
|
12864
|
+
);
|
|
12824
12865
|
if (updateResult.ok) {
|
|
12825
12866
|
result.updated.push(feature.externalId);
|
|
12826
12867
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -10496,6 +10496,8 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
10496
10496
|
owner;
|
|
10497
10497
|
repo;
|
|
10498
10498
|
retryOpts;
|
|
10499
|
+
/** Cached GitHub milestone name -> ID mapping */
|
|
10500
|
+
milestoneCache = null;
|
|
10499
10501
|
constructor(options) {
|
|
10500
10502
|
this.token = options.token;
|
|
10501
10503
|
this.config = options.config;
|
|
@@ -10512,6 +10514,43 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
10512
10514
|
this.owner = repoParts[0];
|
|
10513
10515
|
this.repo = repoParts[1];
|
|
10514
10516
|
}
|
|
10517
|
+
/**
|
|
10518
|
+
* Fetch all GitHub milestones and build the name -> ID cache.
|
|
10519
|
+
*/
|
|
10520
|
+
async loadMilestones() {
|
|
10521
|
+
if (this.milestoneCache) return this.milestoneCache;
|
|
10522
|
+
this.milestoneCache = /* @__PURE__ */ new Map();
|
|
10523
|
+
const response = await fetchWithRetry(
|
|
10524
|
+
this.fetchFn,
|
|
10525
|
+
`${this.apiBase}/repos/${this.owner}/${this.repo}/milestones?state=all&per_page=100`,
|
|
10526
|
+
{ method: "GET", headers: this.headers() },
|
|
10527
|
+
this.retryOpts
|
|
10528
|
+
);
|
|
10529
|
+
if (response.ok) {
|
|
10530
|
+
const data = await response.json();
|
|
10531
|
+
for (const m of data) {
|
|
10532
|
+
this.milestoneCache.set(m.title, m.number);
|
|
10533
|
+
}
|
|
10534
|
+
}
|
|
10535
|
+
return this.milestoneCache;
|
|
10536
|
+
}
|
|
10537
|
+
/**
|
|
10538
|
+
* Get or create a GitHub milestone by name. Returns the milestone number.
|
|
10539
|
+
*/
|
|
10540
|
+
async ensureMilestone(name) {
|
|
10541
|
+
const cache = await this.loadMilestones();
|
|
10542
|
+
if (cache.has(name)) return cache.get(name);
|
|
10543
|
+
const response = await fetchWithRetry(
|
|
10544
|
+
this.fetchFn,
|
|
10545
|
+
`${this.apiBase}/repos/${this.owner}/${this.repo}/milestones`,
|
|
10546
|
+
{ method: "POST", headers: this.headers(), body: JSON.stringify({ title: name }) },
|
|
10547
|
+
this.retryOpts
|
|
10548
|
+
);
|
|
10549
|
+
if (!response.ok) return null;
|
|
10550
|
+
const data = await response.json();
|
|
10551
|
+
cache.set(name, data.number);
|
|
10552
|
+
return data.number;
|
|
10553
|
+
}
|
|
10515
10554
|
headers() {
|
|
10516
10555
|
return {
|
|
10517
10556
|
Authorization: `Bearer ${this.token}`,
|
|
@@ -10536,21 +10575,15 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
10536
10575
|
}
|
|
10537
10576
|
async createTicket(feature, milestone) {
|
|
10538
10577
|
try {
|
|
10539
|
-
const labels = labelsForStatus(feature.status, this.config);
|
|
10540
|
-
const body = [
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
feature.spec ? `**Spec:** ${feature.spec}` : ""
|
|
10545
|
-
].filter(Boolean).join("\n");
|
|
10578
|
+
const labels = [...labelsForStatus(feature.status, this.config), "feature"];
|
|
10579
|
+
const body = [feature.summary, "", feature.spec ? `**Spec:** ${feature.spec}` : ""].filter(Boolean).join("\n");
|
|
10580
|
+
const milestoneId = await this.ensureMilestone(milestone);
|
|
10581
|
+
const issuePayload = { title: feature.name, body, labels };
|
|
10582
|
+
if (milestoneId) issuePayload.milestone = milestoneId;
|
|
10546
10583
|
const response = await fetchWithRetry(
|
|
10547
10584
|
this.fetchFn,
|
|
10548
10585
|
`${this.apiBase}/repos/${this.owner}/${this.repo}/issues`,
|
|
10549
|
-
{
|
|
10550
|
-
method: "POST",
|
|
10551
|
-
headers: this.headers(),
|
|
10552
|
-
body: JSON.stringify({ title: feature.name, body, labels })
|
|
10553
|
-
},
|
|
10586
|
+
{ method: "POST", headers: this.headers(), body: JSON.stringify(issuePayload) },
|
|
10554
10587
|
this.retryOpts
|
|
10555
10588
|
);
|
|
10556
10589
|
if (!response.ok) {
|
|
@@ -10565,7 +10598,7 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
10565
10598
|
return Err3(error instanceof Error ? error : new Error(String(error)));
|
|
10566
10599
|
}
|
|
10567
10600
|
}
|
|
10568
|
-
async updateTicket(externalId, changes) {
|
|
10601
|
+
async updateTicket(externalId, changes, milestone) {
|
|
10569
10602
|
try {
|
|
10570
10603
|
const parsed = parseExternalId(externalId);
|
|
10571
10604
|
if (!parsed) return Err3(new Error(`Invalid externalId format: "${externalId}"`));
|
|
@@ -10578,7 +10611,11 @@ var GitHubIssuesSyncAdapter = class {
|
|
|
10578
10611
|
if (changes.status !== void 0) {
|
|
10579
10612
|
const externalStatus = this.config.statusMap[changes.status];
|
|
10580
10613
|
patch.state = externalStatus;
|
|
10581
|
-
patch.labels = labelsForStatus(changes.status, this.config);
|
|
10614
|
+
patch.labels = [...labelsForStatus(changes.status, this.config), "feature"];
|
|
10615
|
+
}
|
|
10616
|
+
if (milestone) {
|
|
10617
|
+
const milestoneId = await this.ensureMilestone(milestone);
|
|
10618
|
+
if (milestoneId) patch.milestone = milestoneId;
|
|
10582
10619
|
}
|
|
10583
10620
|
const response = await fetchWithRetry(
|
|
10584
10621
|
this.fetchFn,
|
|
@@ -10711,7 +10748,11 @@ async function syncToExternal(roadmap, adapter, _config) {
|
|
|
10711
10748
|
result.errors.push({ featureOrId: feature.name, error: createResult.error });
|
|
10712
10749
|
}
|
|
10713
10750
|
} else {
|
|
10714
|
-
const updateResult = await adapter.updateTicket(
|
|
10751
|
+
const updateResult = await adapter.updateTicket(
|
|
10752
|
+
feature.externalId,
|
|
10753
|
+
feature,
|
|
10754
|
+
milestone.name
|
|
10755
|
+
);
|
|
10715
10756
|
if (updateResult.ok) {
|
|
10716
10757
|
result.updated.push(feature.externalId);
|
|
10717
10758
|
} else {
|
|
@@ -9,17 +9,17 @@ declare const ViolationSchema: z.ZodObject<{
|
|
|
9
9
|
detail: z.ZodString;
|
|
10
10
|
severity: z.ZodEnum<["error", "warning"]>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
file: string;
|
|
13
12
|
id: string;
|
|
14
|
-
|
|
13
|
+
file: string;
|
|
15
14
|
detail: string;
|
|
16
|
-
|
|
15
|
+
severity: "error" | "warning";
|
|
16
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
17
17
|
}, {
|
|
18
|
-
file: string;
|
|
19
18
|
id: string;
|
|
20
|
-
|
|
19
|
+
file: string;
|
|
21
20
|
detail: string;
|
|
22
|
-
|
|
21
|
+
severity: "error" | "warning";
|
|
22
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
23
23
|
}>;
|
|
24
24
|
type Violation = z.infer<typeof ViolationSchema>;
|
|
25
25
|
declare const MetricResultSchema: z.ZodObject<{
|
|
@@ -33,41 +33,41 @@ declare const MetricResultSchema: z.ZodObject<{
|
|
|
33
33
|
detail: z.ZodString;
|
|
34
34
|
severity: z.ZodEnum<["error", "warning"]>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
file: string;
|
|
37
36
|
id: string;
|
|
38
|
-
|
|
37
|
+
file: string;
|
|
39
38
|
detail: string;
|
|
40
|
-
|
|
39
|
+
severity: "error" | "warning";
|
|
40
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
41
41
|
}, {
|
|
42
|
-
file: string;
|
|
43
42
|
id: string;
|
|
44
|
-
|
|
43
|
+
file: string;
|
|
45
44
|
detail: string;
|
|
46
|
-
|
|
45
|
+
severity: "error" | "warning";
|
|
46
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
47
47
|
}>, "many">;
|
|
48
48
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
|
50
50
|
value: number;
|
|
51
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
51
52
|
scope: string;
|
|
52
|
-
category: "complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
53
53
|
violations: {
|
|
54
|
-
file: string;
|
|
55
54
|
id: string;
|
|
56
|
-
|
|
55
|
+
file: string;
|
|
57
56
|
detail: string;
|
|
58
|
-
|
|
57
|
+
severity: "error" | "warning";
|
|
58
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
59
59
|
}[];
|
|
60
60
|
metadata?: Record<string, unknown> | undefined;
|
|
61
61
|
}, {
|
|
62
62
|
value: number;
|
|
63
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
63
64
|
scope: string;
|
|
64
|
-
category: "complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
65
65
|
violations: {
|
|
66
|
-
file: string;
|
|
67
66
|
id: string;
|
|
68
|
-
|
|
67
|
+
file: string;
|
|
69
68
|
detail: string;
|
|
70
|
-
|
|
69
|
+
severity: "error" | "warning";
|
|
70
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
71
71
|
}[];
|
|
72
72
|
metadata?: Record<string, unknown> | undefined;
|
|
73
73
|
}>;
|
|
@@ -101,7 +101,7 @@ declare const ArchBaselineSchema: z.ZodObject<{
|
|
|
101
101
|
version: 1;
|
|
102
102
|
updatedAt: string;
|
|
103
103
|
updatedFrom: string;
|
|
104
|
-
metrics: Partial<Record<"
|
|
104
|
+
metrics: Partial<Record<"circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth", {
|
|
105
105
|
value: number;
|
|
106
106
|
violationIds: string[];
|
|
107
107
|
}>>;
|
|
@@ -109,7 +109,7 @@ declare const ArchBaselineSchema: z.ZodObject<{
|
|
|
109
109
|
version: 1;
|
|
110
110
|
updatedAt: string;
|
|
111
111
|
updatedFrom: string;
|
|
112
|
-
metrics: Partial<Record<"
|
|
112
|
+
metrics: Partial<Record<"circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth", {
|
|
113
113
|
value: number;
|
|
114
114
|
violationIds: string[];
|
|
115
115
|
}>>;
|
|
@@ -121,12 +121,12 @@ declare const CategoryRegressionSchema: z.ZodObject<{
|
|
|
121
121
|
currentValue: z.ZodNumber;
|
|
122
122
|
delta: z.ZodNumber;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
|
-
category: "
|
|
124
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
125
125
|
baselineValue: number;
|
|
126
126
|
currentValue: number;
|
|
127
127
|
delta: number;
|
|
128
128
|
}, {
|
|
129
|
-
category: "
|
|
129
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
130
130
|
baselineValue: number;
|
|
131
131
|
currentValue: number;
|
|
132
132
|
delta: number;
|
|
@@ -141,17 +141,17 @@ declare const ArchDiffResultSchema: z.ZodObject<{
|
|
|
141
141
|
detail: z.ZodString;
|
|
142
142
|
severity: z.ZodEnum<["error", "warning"]>;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
file: string;
|
|
145
144
|
id: string;
|
|
146
|
-
|
|
145
|
+
file: string;
|
|
147
146
|
detail: string;
|
|
148
|
-
|
|
147
|
+
severity: "error" | "warning";
|
|
148
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
149
149
|
}, {
|
|
150
|
-
file: string;
|
|
151
150
|
id: string;
|
|
152
|
-
|
|
151
|
+
file: string;
|
|
153
152
|
detail: string;
|
|
154
|
-
|
|
153
|
+
severity: "error" | "warning";
|
|
154
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
155
155
|
}>, "many">;
|
|
156
156
|
resolvedViolations: z.ZodArray<z.ZodString, "many">;
|
|
157
157
|
preExisting: z.ZodArray<z.ZodString, "many">;
|
|
@@ -161,12 +161,12 @@ declare const ArchDiffResultSchema: z.ZodObject<{
|
|
|
161
161
|
currentValue: z.ZodNumber;
|
|
162
162
|
delta: z.ZodNumber;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
category: "
|
|
164
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
165
165
|
baselineValue: number;
|
|
166
166
|
currentValue: number;
|
|
167
167
|
delta: number;
|
|
168
168
|
}, {
|
|
169
|
-
category: "
|
|
169
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
170
170
|
baselineValue: number;
|
|
171
171
|
currentValue: number;
|
|
172
172
|
delta: number;
|
|
@@ -174,16 +174,16 @@ declare const ArchDiffResultSchema: z.ZodObject<{
|
|
|
174
174
|
}, "strip", z.ZodTypeAny, {
|
|
175
175
|
passed: boolean;
|
|
176
176
|
newViolations: {
|
|
177
|
-
file: string;
|
|
178
177
|
id: string;
|
|
179
|
-
|
|
178
|
+
file: string;
|
|
180
179
|
detail: string;
|
|
181
|
-
|
|
180
|
+
severity: "error" | "warning";
|
|
181
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
182
182
|
}[];
|
|
183
183
|
resolvedViolations: string[];
|
|
184
184
|
preExisting: string[];
|
|
185
185
|
regressions: {
|
|
186
|
-
category: "
|
|
186
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
187
187
|
baselineValue: number;
|
|
188
188
|
currentValue: number;
|
|
189
189
|
delta: number;
|
|
@@ -191,16 +191,16 @@ declare const ArchDiffResultSchema: z.ZodObject<{
|
|
|
191
191
|
}, {
|
|
192
192
|
passed: boolean;
|
|
193
193
|
newViolations: {
|
|
194
|
-
file: string;
|
|
195
194
|
id: string;
|
|
196
|
-
|
|
195
|
+
file: string;
|
|
197
196
|
detail: string;
|
|
198
|
-
|
|
197
|
+
severity: "error" | "warning";
|
|
198
|
+
category?: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth" | undefined;
|
|
199
199
|
}[];
|
|
200
200
|
resolvedViolations: string[];
|
|
201
201
|
preExisting: string[];
|
|
202
202
|
regressions: {
|
|
203
|
-
category: "
|
|
203
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
204
204
|
baselineValue: number;
|
|
205
205
|
currentValue: number;
|
|
206
206
|
delta: number;
|
|
@@ -215,15 +215,15 @@ declare const ArchConfigSchema: z.ZodObject<{
|
|
|
215
215
|
thresholds: z.ZodDefault<z.ZodRecord<z.ZodEnum<["circular-deps", "layer-violations", "complexity", "coupling", "forbidden-imports", "module-size", "dependency-depth"]>, z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>>;
|
|
216
216
|
modules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<["circular-deps", "layer-violations", "complexity", "coupling", "forbidden-imports", "module-size", "dependency-depth"]>, z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>>>;
|
|
217
217
|
}, "strip", z.ZodTypeAny, {
|
|
218
|
-
thresholds: Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>;
|
|
219
|
-
modules: Record<string, Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>>;
|
|
220
218
|
enabled: boolean;
|
|
221
219
|
baselinePath: string;
|
|
220
|
+
thresholds: Partial<Record<"circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>;
|
|
221
|
+
modules: Record<string, Partial<Record<"circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>>;
|
|
222
222
|
}, {
|
|
223
|
-
thresholds?: Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>> | undefined;
|
|
224
|
-
modules?: Record<string, Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>> | undefined;
|
|
225
223
|
enabled?: boolean | undefined;
|
|
226
224
|
baselinePath?: string | undefined;
|
|
225
|
+
thresholds?: Partial<Record<"circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>> | undefined;
|
|
226
|
+
modules?: Record<string, Partial<Record<"circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>> | undefined;
|
|
227
227
|
}>;
|
|
228
228
|
type ArchConfig = z.infer<typeof ArchConfigSchema>;
|
|
229
229
|
declare const ConstraintRuleSchema: z.ZodObject<{
|
|
@@ -233,16 +233,16 @@ declare const ConstraintRuleSchema: z.ZodObject<{
|
|
|
233
233
|
scope: z.ZodString;
|
|
234
234
|
targets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
235
235
|
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
236
237
|
scope: string;
|
|
237
238
|
id: string;
|
|
238
239
|
description: string;
|
|
239
|
-
category: "complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
240
240
|
targets?: string[] | undefined;
|
|
241
241
|
}, {
|
|
242
|
+
category: "circular-deps" | "layer-violations" | "complexity" | "coupling" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
242
243
|
scope: string;
|
|
243
244
|
id: string;
|
|
244
245
|
description: string;
|
|
245
|
-
category: "complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth";
|
|
246
246
|
targets?: string[] | undefined;
|
|
247
247
|
}>;
|
|
248
248
|
type ConstraintRule = z.infer<typeof ConstraintRuleSchema>;
|