@arcgis/codemod 6.0.0-next.4 → 6.0.0-next.40

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.
@@ -0,0 +1,351 @@
1
+ import { readFile as E } from "node:fs/promises";
2
+ import { n as M, d as h, b as j, e as C, f as k, o as J, h as b } from "./classification.js";
3
+ import { a as z, e as A, d as N } from "./cli.js";
4
+ async function B(e = {}) {
5
+ const n = new URL(e.url ?? z);
6
+ for (const s of e.repositories ?? [])
7
+ n.searchParams.append("repository", s);
8
+ for (const s of ["branch", "since", "until"])
9
+ e[s] !== void 0 && n.searchParams.set(s, e[s]);
10
+ const a = await fetch(n, {
11
+ signal: AbortSignal.timeout(12e4),
12
+ redirect: "error"
13
+ });
14
+ if (!a.ok)
15
+ throw new Error(`Remote aggregation failed: HTTP ${a.status}.`);
16
+ const i = await a.json();
17
+ if (!Array.isArray(i))
18
+ throw new Error("Invalid collector response.");
19
+ return i.map((s) => {
20
+ const t = M(JSON.stringify(s));
21
+ if (t.auditKind !== "usages")
22
+ throw new Error("Expected an audit-usages report from the collector.");
23
+ return { ...t, auditKind: "usages" };
24
+ });
25
+ }
26
+ async function Y(e, n, a = {}, i = [], s) {
27
+ const { section: t = "all", ...r } = a, [o, c, u] = await Promise.all([
28
+ Promise.all(e.map(async (l) => await D(l, "usages"))),
29
+ Promise.all(i.map(async (l) => await D(l, "definitions"))),
30
+ s === void 0 ? [] : B(s)
31
+ ]), d = F(
32
+ [...o, ...u],
33
+ r,
34
+ i.length === 0 ? void 0 : c
35
+ ), p = n === "json" ? JSON.stringify(d, void 0, 2) : L(
36
+ d,
37
+ n,
38
+ t,
39
+ [...o, ...u].flatMap(({ findings: l }) => l)
40
+ );
41
+ process.stdout.write(`${p}
42
+ `);
43
+ }
44
+ function F(e, n = {}, a) {
45
+ const i = /* @__PURE__ */ new Set(), s = [], t = e.flatMap((o) => {
46
+ if (i.has(o.repository))
47
+ throw new Error(`Duplicate audit-usages report for ${o.repository}.`);
48
+ i.add(o.repository);
49
+ const c = o.findings.map((u) => ({ ...u, category: u.category ?? h(u) })).filter((u) => P(u, n));
50
+ return s.push(V(o, c)), c.map((u) => ({ finding: u, source: { repository: o.repository, ref: o.ref } }));
51
+ }), r = S(t);
52
+ return {
53
+ auditKind: "aggregated-usages",
54
+ aggregatedDate: Date.now(),
55
+ count: t.length,
56
+ repositories: s.sort(
57
+ (o, c) => c.count - o.count || o.repository.localeCompare(c.repository)
58
+ ),
59
+ packages: r,
60
+ ...a === void 0 ? {} : { unused: K(e, a, n) }
61
+ };
62
+ }
63
+ function V(e, n) {
64
+ return {
65
+ repository: e.repository,
66
+ ref: e.ref,
67
+ branch: e.branch,
68
+ scanDate: e.scanDate,
69
+ scannerVersion: e.scannerVersion,
70
+ complete: e.complete,
71
+ cwd: e.cwd,
72
+ excludedPaths: e.excludedPaths,
73
+ count: n.length,
74
+ apiCount: new Set(n.map(w)).size,
75
+ categories: j(n, (a) => a).map(({ categoryName: a, count: i, packages: s }) => ({
76
+ category: a,
77
+ label: N[a].label,
78
+ count: i,
79
+ packages: s.map(({ packageName: t, displayName: r, count: o }) => ({
80
+ package: t,
81
+ ...r === t ? {} : { displayName: r },
82
+ count: o
83
+ }))
84
+ }))
85
+ };
86
+ }
87
+ function P(e, n) {
88
+ return (!n.esriOnly || A(e.package)) && (n.category === void 0 || e.category === n.category) && (n.packageName === void 0 || e.package === n.packageName);
89
+ }
90
+ function S(e) {
91
+ const n = [...Map.groupBy(e, ({ finding: a }) => a.package)].map(([a, i]) => {
92
+ const s = [...Map.groupBy(i, ({ finding: t }) => t.module)].map(([t, r]) => {
93
+ const o = [
94
+ ...Map.groupBy(
95
+ r,
96
+ ({ finding: c }) => JSON.stringify([c.category ?? h(c), w(c)])
97
+ )
98
+ ].map(([, c]) => {
99
+ const u = c.reduce(
100
+ (p, { finding: l }) => C(l, p) < 0 ? l : p,
101
+ c[0].finding
102
+ ), d = c.flatMap(({ source: p }) => p === void 0 ? [] : [p]);
103
+ return {
104
+ name: u.name,
105
+ category: u.category ?? h(u),
106
+ kind: u.kind,
107
+ memberOf: u.memberOf,
108
+ count: d.length,
109
+ repositories: [...Map.groupBy(d, ({ repository: p }) => p)].map(([p, l]) => ({
110
+ repository: O(p),
111
+ ref: l[0].ref,
112
+ count: l.length
113
+ })).sort(
114
+ (p, l) => l.count - p.count || p.repository.localeCompare(l.repository) || p.ref.localeCompare(l.ref)
115
+ )
116
+ };
117
+ });
118
+ return o.sort(
119
+ (c, u) => u.count - c.count || k(c).localeCompare(k(u)) || c.name.localeCompare(u.name) || (c.memberOf ?? "").localeCompare(u.memberOf ?? "") || (c.kind ?? "").localeCompare(u.kind ?? "") || c.category.localeCompare(u.category)
120
+ ), {
121
+ module: t,
122
+ count: o.reduce((c, u) => c + u.count, 0),
123
+ apis: o
124
+ };
125
+ });
126
+ return s.sort(
127
+ (t, r) => r.count - t.count || +(t.module === void 0) - +(r.module === void 0) || (t.module ?? "").localeCompare(r.module ?? "")
128
+ ), { package: a, count: s.reduce((t, r) => t + r.count, 0), modules: s };
129
+ });
130
+ return n.sort(
131
+ (a, i) => Number(A(i.package)) - Number(A(a.package)) || i.count - a.count || a.package.localeCompare(i.package)
132
+ ), n;
133
+ }
134
+ function K(e, n, a) {
135
+ const i = e.flatMap((r) => r.findings), s = new Set(i.map(w)), t = /* @__PURE__ */ new Map();
136
+ for (const r of n)
137
+ for (const o of r.findings) {
138
+ if (o.module === void 0)
139
+ throw new Error(
140
+ `Definition ${o.package}/${o.name} has no module. Regenerate its audit-definitions report.`
141
+ );
142
+ const c = { ...o, category: o.category ?? h(o) }, u = w(c);
143
+ if (!s.has(u) && P(c, a)) {
144
+ const p = t.get(u);
145
+ (p === void 0 || C(c, p.finding) < 0) && t.set(u, { finding: c });
146
+ }
147
+ }
148
+ return { count: t.size, packages: S([...t.values()]) };
149
+ }
150
+ function w(e) {
151
+ return e.kind === "css-property" ? JSON.stringify([e.package, e.kind, e.name]) : e.kind === "css-part" || e.kind === "css-state" || e.kind === "slot" || e.kind === "attribute" || e.kind === "element" ? JSON.stringify([e.package, e.kind, e.memberOf, e.name]) : JSON.stringify([e.package, e.module, e.name, e.memberOf]);
152
+ }
153
+ function O(e, n = !1) {
154
+ const a = new URL(`https://${e}`);
155
+ return !n && a.hostname === "github.com" ? e : a.pathname.slice(1);
156
+ }
157
+ function L(e, n, a, i) {
158
+ const s = new Map(
159
+ [...Map.groupBy(i, (o) => JSON.stringify([o.package, o.module]))].map(
160
+ ([o, c]) => [o, c.length]
161
+ )
162
+ );
163
+ if (a === "apis")
164
+ return y(e, n, s);
165
+ if (a === "unused-apis") {
166
+ if (e.unused === void 0)
167
+ throw new Error("The unused-apis section requires --definitions.");
168
+ return y(e.unused, n, s, "Deprecated APIs with zero detected usages");
169
+ }
170
+ const t = n === "md", r = [
171
+ t ? "# Deprecation overview" : "Deprecation overview",
172
+ "",
173
+ `${e.count} usages - ${e.repositories.length} repositories - Aggregated: ${new Date(e.aggregatedDate).toISOString().slice(0, 10)}`,
174
+ ""
175
+ ];
176
+ for (const o of e.repositories) {
177
+ const c = o.scanDate === void 0 ? "Unknown" : new Date(o.scanDate).toISOString(), u = o.scanDate !== void 0 && e.aggregatedDate - o.scanDate > 720 * 60 * 60 * 1e3 ? " - ⚠️ Stale" : "";
178
+ r.push(
179
+ "",
180
+ ...t ? [
181
+ "<details>",
182
+ `<summary>${o.count} usages - ${U(O(o.repository, !0))} - ${c.slice(0, 10)}${u}</summary>`,
183
+ ""
184
+ ] : [`${o.repository}: ${o.count} usages; selected scan ${c}${u}`]
185
+ ), r.push(
186
+ `> ${[
187
+ `Distinct APIs: ${o.apiCount}`,
188
+ `Branch: ${t ? g(o.branch ?? "Unknown") : o.branch ?? "Unknown"}`,
189
+ `Commit: ${t ? `[\`${o.ref.slice(0, 6)}\`](https://${o.repository}/tree/${encodeURIComponent(o.ref)})` : o.ref}`,
190
+ `Scanner version: ${t ? g(o.scannerVersion ?? "Unknown") : o.scannerVersion ?? "Unknown"}`,
191
+ ...o.excludedPaths?.length ? [
192
+ `Excluded paths: ${t ? o.excludedPaths.map(T).join(", ") : o.excludedPaths.join(", ")}`
193
+ ] : []
194
+ ].join(" | ")}`,
195
+ ""
196
+ ), o.categories.length === 0 ? r.push("No matching deprecated usages.") : t && r.push("| Category | Package | Usages |", "| --- | --- | ---: |");
197
+ for (const d of o.categories) {
198
+ if (t && d.packages.length === 1) {
199
+ r.push(
200
+ `| **${g(d.label)}** | ${g(d.packages[0].displayName ?? d.packages[0].package)} | **${d.count}** |`
201
+ );
202
+ continue;
203
+ }
204
+ r.push(
205
+ t ? `| **${g(d.label)}** | | **${d.count}** |` : ` ${d.label} (${d.count})`
206
+ );
207
+ for (const p of d.packages)
208
+ r.push(
209
+ t ? `| | ${g(p.displayName ?? p.package)} | ${p.count} |` : ` ${p.displayName ?? p.package} (${p.count})`
210
+ );
211
+ }
212
+ t && r.push("", "</details>");
213
+ }
214
+ return a === "all" && (r.push("", y(e, n, s)), e.unused !== void 0 && r.push(
215
+ "",
216
+ y(e.unused, n, s, "Deprecated APIs with zero detected usages")
217
+ )), r.join(`
218
+ `);
219
+ }
220
+ function T(e) {
221
+ const n = "`".repeat(Math.max(0, ...(e.match(/`+/gu) ?? []).map((a) => a.length)) + 1);
222
+ return `${n} ${e.replaceAll(/\r?\n/gu, " ")} ${n}`;
223
+ }
224
+ function g(e) {
225
+ return U(e).replaceAll("|", "&#124;").replaceAll(/\r?\n/gu, " ");
226
+ }
227
+ function U(e) {
228
+ return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
229
+ }
230
+ function y(e, n, a, i = "Deprecated API usages") {
231
+ const s = n === "md", t = `${i}${m(e.count)}`, r = [s ? `# ${t}` : t];
232
+ for (const [o, { label: c }] of Object.entries(N)) {
233
+ const u = e.packages.flatMap((p) => {
234
+ const l = p.modules.flatMap(($) => {
235
+ const f = $.apis.filter((v) => v.category === o);
236
+ return f.length === 0 ? [] : [{ ...$, apis: f, count: f.reduce((v, R) => v + R.count, 0) }];
237
+ });
238
+ return l.length === 0 ? [] : [{ ...p, modules: l, count: l.reduce(($, f) => $ + f.count, 0) }];
239
+ });
240
+ if (u.length === 0)
241
+ continue;
242
+ const d = u.reduce((p, l) => p + l.count, 0);
243
+ r.push(
244
+ "",
245
+ `${s ? "## " : ""}${c}${m(d)}`,
246
+ ...H(u, s, a)
247
+ );
248
+ }
249
+ return r.join(`
250
+ `);
251
+ }
252
+ function m(e) {
253
+ return e === 0 ? "" : ` (${e})`;
254
+ }
255
+ function H(e, n, a) {
256
+ const i = [], s = e.flatMap(
257
+ (t) => [
258
+ ...Map.groupBy(t.modules, (r) => J(t.package, r.module))
259
+ ].map(([r, o]) => ({
260
+ ...t,
261
+ displayName: r,
262
+ modules: o,
263
+ count: o.reduce((c, u) => c + u.count, 0)
264
+ }))
265
+ );
266
+ for (const t of s) {
267
+ if (i.push(
268
+ "",
269
+ n ? `### ${t.displayName === t.package ? `\`${t.package}\`` : t.displayName}${m(t.count)}` : `${t.displayName}${m(t.count)}`
270
+ ), n) {
271
+ i.push(...W(t.modules, t.package, a));
272
+ continue;
273
+ }
274
+ for (const r of t.modules) {
275
+ const o = r.module ?? "Unknown module";
276
+ i.push(` ${o}${m(r.count)}`);
277
+ for (const c of r.apis)
278
+ i.push(...x(c, !1, " "));
279
+ }
280
+ }
281
+ return i;
282
+ }
283
+ function x(e, n, a = "") {
284
+ const i = `${k(e)}${b(e.kind)}`, s = e.repositories.map(
285
+ ({ repository: t, count: r }) => `${a} ${n ? `- \`${t}\`` : t} (${r})`
286
+ );
287
+ return n ? [
288
+ `${a}- \`${k(e)}\`${b(e.kind)}${m(e.count)}`,
289
+ ...s
290
+ ] : [`${a}${i}${m(e.count)}`, ...s];
291
+ }
292
+ function W(e, n, a) {
293
+ const i = /* @__PURE__ */ new Map();
294
+ for (const s of e) {
295
+ let t = i;
296
+ const r = s.module === void 0 ? [void 0] : s.module.split("/");
297
+ for (const [o, c] of r.entries()) {
298
+ let u = t.get(c);
299
+ u === void 0 && (u = { name: c, count: 0, usedCount: 0, children: /* @__PURE__ */ new Map(), apis: [] }, t.set(c, u)), u.count += s.count, o === r.length - 1 && (u.apis = s.apis, u.usedCount = s.count === 0 && s.module !== void 0 ? a?.get(JSON.stringify([n, s.module])) ?? 0 : 0), t = u.children;
300
+ }
301
+ }
302
+ return [...i.values()].sort((s, t) => t.count - s.count).flatMap((s) => I(s, 0));
303
+ }
304
+ function I(e, n) {
305
+ let a = e, i = a.name ?? "Unknown module";
306
+ for (; a.children.size === 1 && a.apis.length === 0; )
307
+ a = [...a.children.values()][0], i += `/${a.name}`;
308
+ a.children.size > 0 && (i += "/");
309
+ const s = " ".repeat(n), t = [
310
+ ...[...a.children.values()].map((o) => ({
311
+ count: o.count,
312
+ lines: I(o, n + 1)
313
+ })),
314
+ ...a.apis.map((o) => ({
315
+ count: o.count,
316
+ lines: x(o, !0, s)
317
+ }))
318
+ ];
319
+ t.sort((o, c) => c.count - o.count);
320
+ const r = [
321
+ ...a.usedCount === 0 ? [] : [
322
+ `${s}> **Warning:** Other deprecated APIs in this file still have detected usages (${a.usedCount}). Do not remove the entire file.`,
323
+ ""
324
+ ],
325
+ ...t.flatMap(({ lines: o }) => o)
326
+ ];
327
+ return n === 0 ? [
328
+ "",
329
+ "<details>",
330
+ `<summary><code>${i.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;")}</code>${m(e.count)}</summary>`,
331
+ "",
332
+ ...r,
333
+ "",
334
+ "</details>"
335
+ ] : [`${" ".repeat(n - 1)}- \`${i}\`${m(e.count)}`, ...r];
336
+ }
337
+ async function D(e, n) {
338
+ let a;
339
+ try {
340
+ a = M(await E(e, "utf8"));
341
+ } catch (i) {
342
+ throw new Error(`Failed to read audit-${n} report: ${e}`, { cause: i });
343
+ }
344
+ if (a.auditKind !== n)
345
+ throw new Error(`Invalid audit-${n} report: ${e}`);
346
+ return a;
347
+ }
348
+ export {
349
+ F as aggregateUsages,
350
+ Y as aggregateUsagesFromFiles
351
+ };
@@ -0,0 +1,173 @@
1
+ var y = (a, o) => (o = Symbol[a]) ? o : /* @__PURE__ */ Symbol.for("Symbol." + a), S = (a) => {
2
+ throw TypeError(a);
3
+ };
4
+ var b = (a, o, i) => {
5
+ if (o != null) {
6
+ typeof o != "object" && typeof o != "function" && S("Object expected");
7
+ var n, s;
8
+ i && (n = o[y("asyncDispose")]), n === void 0 && (n = o[y("dispose")], i && (s = n)), typeof n != "function" && S("Object not disposable"), s && (n = function() {
9
+ try {
10
+ s.call(this);
11
+ } catch (r) {
12
+ return Promise.reject(r);
13
+ }
14
+ }), a.push([i, n, o]);
15
+ } else i && a.push([i]);
16
+ return o;
17
+ }, $ = (a, o, i) => {
18
+ var n = typeof SuppressedError == "function" ? SuppressedError : function(c, e, m, p) {
19
+ return p = Error(m), p.name = "SuppressedError", p.error = c, p.suppressed = e, p;
20
+ }, s = (c) => o = i ? new n(c, o, "An error was suppressed during disposal") : (i = !0, c), r = (c) => {
21
+ for (; c = a.pop(); )
22
+ try {
23
+ var e = c[1] && c[1].call(c[2]);
24
+ if (c[0]) return Promise.resolve(e).then(r, (m) => (s(m), r()));
25
+ } catch (m) {
26
+ s(m);
27
+ }
28
+ if (i) throw o;
29
+ };
30
+ return r();
31
+ };
32
+ import { log as C } from "@arcgis/toolkit/log";
33
+ import { path as x } from "@arcgis/node-toolkit/path";
34
+ import { styleText as j } from "node:util";
35
+ import J from "typescript";
36
+ import { r as I, f as v } from "./log.js";
37
+ import { r as L, b as z, i as E } from "./cli.js";
38
+ import { c as K } from "./useProjectInstance.js";
39
+ import { a as F, i as Q, g as h, f as V, h as W, p as q, c as B, d as G, s as H, j as U, k as X } from "./classification.js";
40
+ import { loadCodeowners as Y } from "@arcgis/node-toolkit/codeowners";
41
+ import { f as O, a as Z, e as _, b as ee } from "./componentAudit.js";
42
+ async function he(a, { json: o, exclude: i }) {
43
+ const n = await L(a), s = !n && i.length === 0 && process.cwd() === F().repositoryRoot;
44
+ await z(
45
+ {
46
+ meta: { needsTypeInformation: !0, needsFooter: !1, includeComponentFiles: !0 },
47
+ async run(r) {
48
+ await oe(r, o, s, i);
49
+ }
50
+ },
51
+ "deprecations audit-definitions",
52
+ n
53
+ ), I(s);
54
+ }
55
+ async function oe(a, o, i, n) {
56
+ const s = [], r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set(), m = _("throw"), p = F(), f = Q(n), u = (t) => E(t) && f(t) && !O(h(t, p.repositoryRoot));
57
+ for (const t of a) {
58
+ var N = [];
59
+ try {
60
+ const d = t.packageJson?.filePath;
61
+ if (d !== void 0 && O(h(d, p.repositoryRoot))) {
62
+ d !== void 0 && !c.has(d) && (c.add(d), C(
63
+ "warn",
64
+ v(d),
65
+ `Skipping excluded package \`${t.packageJson?.contents.name ?? t.cwd}\`.`
66
+ ));
67
+ continue;
68
+ }
69
+ const g = d === void 0 ? void 0 : await m(d);
70
+ d !== void 0 && !e.has(d) && (e.add(d), g !== void 0 && s.push(...g.definitions));
71
+ if (!t.filePaths.some(u))
72
+ continue;
73
+ const k = b(N, K(t, !1));
74
+ const M = t.packageJson?.contents.name ?? v(t.cwd);
75
+ for (const w of k.getCodemodFiles()) {
76
+ if (!u(w.compilerNode.fileName))
77
+ continue;
78
+ const D = x.dirname(w.compilerNode.fileName), P = r.get(D) ?? Z(D, M);
79
+ r.set(D, P), s.push(
80
+ ...te(w.compilerNode, P, g?.modulePaths)
81
+ );
82
+ }
83
+ } catch (A) {
84
+ var R = A, T = !0;
85
+ } finally {
86
+ $(N, R, T);
87
+ }
88
+ }
89
+ const l = s.filter(({ sourceFileName: t }) => f(t));
90
+ if (o)
91
+ ne(l, p, i, n);
92
+ else
93
+ for (const t of l) {
94
+ const d = j(
95
+ "blue",
96
+ `${v(t.sourceFileName)}:${t.line}:${t.column}`
97
+ ), g = V({
98
+ name: t.name,
99
+ memberOf: t.memberOf,
100
+ kind: t.kind
101
+ }), k = W(t.kind, "parentheses");
102
+ C("warn", d, `\`${g}\`${k} is deprecated.${t.reason ? ` ${t.reason}` : ""}`);
103
+ }
104
+ q(
105
+ "definitions",
106
+ l.length,
107
+ new Set(l.map(({ sourceFileName: t }) => t)).size,
108
+ new Set(l.map(({ package: t }) => t)).size
109
+ );
110
+ }
111
+ function te(a, o, i) {
112
+ const n = /* @__PURE__ */ new Map(), s = B([a.fileName], o), r = s === void 0 ? void 0 : i?.get(s) ?? s;
113
+ function c(e) {
114
+ const m = J.getJSDocDeprecatedTag(e), p = ae(e);
115
+ if (m !== void 0 && p !== void 0) {
116
+ const f = p.getStart(a), { line: u, character: l } = a.getLineAndCharacterOfPosition(f);
117
+ n.set(`${f}:${p.getWidth(a)}`, {
118
+ package: o,
119
+ module: r,
120
+ name: X(e, p.getText(a)),
121
+ ...U(e),
122
+ reason: m.comment === void 0 ? void 0 : ee(m.comment),
123
+ sourceFileName: a.fileName,
124
+ line: u + 1,
125
+ column: l + 1
126
+ });
127
+ }
128
+ J.forEachChild(e, c);
129
+ }
130
+ return c(a), [...n.values()].sort((e, m) => e.line - m.line || e.column - m.column);
131
+ }
132
+ function ae(a) {
133
+ return a.name;
134
+ }
135
+ function ne(a, o, i, n) {
136
+ const s = Y(), r = h(process.cwd(), o.repositoryRoot), c = {
137
+ auditKind: "definitions",
138
+ repository: o.repository,
139
+ ref: o.ref,
140
+ branch: o.branch,
141
+ scannerVersion: H,
142
+ scanDate: Date.now(),
143
+ complete: i,
144
+ ...r === "" ? {} : { cwd: r },
145
+ ...n.length === 0 ? {} : { excludedPaths: n },
146
+ findings: a.map((e) => ({
147
+ package: e.package,
148
+ name: e.name,
149
+ module: e.module,
150
+ kind: e.kind,
151
+ memberOf: e.memberOf,
152
+ provenance: e.provenance,
153
+ category: G({
154
+ package: e.package,
155
+ name: e.name,
156
+ memberOf: e.memberOf,
157
+ module: e.module,
158
+ deprecated: e.reason ?? !0
159
+ }),
160
+ deprecated: e.reason ?? !0,
161
+ file: h(e.sourceFileName, o.repositoryRoot),
162
+ line: e.line,
163
+ column: e.column,
164
+ codeowners: s?.getOwners(e.sourceFileName) ?? []
165
+ }))
166
+ };
167
+ process.stdout.write(`${JSON.stringify(c, void 0, 2)}
168
+ `);
169
+ }
170
+ export {
171
+ he as auditDeprecatedDefinitions,
172
+ te as collectDeprecatedApiDefinitions
173
+ };