@arcgis/codemod 6.0.0-next.15 → 6.0.0-next.16

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.
@@ -1,14 +1,14 @@
1
1
  import { readFile as J } from "node:fs/promises";
2
- import { b as C, c as D } from "./artifact.js";
2
+ import { b as M, c as C } from "./artifact.js";
3
3
  import { c as k, g as z, b as h, i as B, d as A } from "./classification.js";
4
4
  import { e as j, b, d as N } from "./cli.js";
5
5
  async function F(e = {}) {
6
- const s = new URL(e.url ?? j);
7
- for (const r of e.repositories ?? [])
8
- s.searchParams.append("repository", r);
9
- for (const r of ["branch", "since", "until"])
10
- e[r] !== void 0 && s.searchParams.set(r, e[r]);
11
- const a = await fetch(s, {
6
+ const n = new URL(e.url ?? j);
7
+ for (const s of e.repositories ?? [])
8
+ n.searchParams.append("repository", s);
9
+ for (const s of ["branch", "since", "until"])
10
+ e[s] !== void 0 && n.searchParams.set(s, e[s]);
11
+ const a = await fetch(n, {
12
12
  signal: AbortSignal.timeout(12e4),
13
13
  redirect: "error"
14
14
  });
@@ -17,92 +17,92 @@ async function F(e = {}) {
17
17
  const i = await a.json();
18
18
  if (!Array.isArray(i))
19
19
  throw new Error("Invalid collector response.");
20
- return i.map((r) => {
21
- const t = C(JSON.stringify(r));
20
+ return i.map((s) => {
21
+ const t = M(JSON.stringify(s));
22
22
  if (t.auditKind !== "usages")
23
23
  throw new Error("Expected an audit-usages report from the collector.");
24
24
  return { ...t, auditKind: "usages" };
25
25
  });
26
26
  }
27
- async function Y(e, s, a = {}, i = [], r) {
28
- const { section: t = "all", ...c } = a, [o, u, n] = await Promise.all([
29
- Promise.all(e.map(async (l) => await M(l, "usages"))),
30
- Promise.all(i.map(async (l) => await M(l, "definitions"))),
31
- r === void 0 ? [] : F(r)
27
+ async function Y(e, n, a = {}, i = [], s) {
28
+ const { section: t = "all", ...r } = a, [o, c, u] = await Promise.all([
29
+ Promise.all(e.map(async (l) => await D(l, "usages"))),
30
+ Promise.all(i.map(async (l) => await D(l, "definitions"))),
31
+ s === void 0 ? [] : F(s)
32
32
  ]), d = x(
33
- [...o, ...n],
34
- c,
35
- i.length === 0 ? void 0 : u
36
- ), p = s === "json" ? JSON.stringify(d, void 0, 2) : L(
33
+ [...o, ...u],
34
+ r,
35
+ i.length === 0 ? void 0 : c
36
+ ), p = n === "json" ? JSON.stringify(d, void 0, 2) : L(
37
37
  d,
38
- s,
38
+ n,
39
39
  t,
40
- [...o, ...n].flatMap(({ findings: l }) => l)
40
+ [...o, ...u].flatMap(({ findings: l }) => l)
41
41
  );
42
42
  process.stdout.write(`${p}
43
43
  `);
44
44
  }
45
- function x(e, s = {}, a) {
46
- const i = /* @__PURE__ */ new Set(), r = [], t = e.flatMap((o) => {
45
+ function x(e, n = {}, a) {
46
+ const i = /* @__PURE__ */ new Set(), s = [], t = e.flatMap((o) => {
47
47
  if (i.has(o.repository))
48
48
  throw new Error(`Duplicate audit-usages report for ${o.repository}.`);
49
49
  i.add(o.repository);
50
- const u = o.findings.map((n) => ({ ...n, category: n.category ?? k(n) })).filter((n) => O(n, s));
51
- return r.push(V(o, u)), u.map((n) => ({ finding: n, source: { repository: o.repository, ref: o.ref } }));
52
- }), c = S(t);
50
+ const c = o.findings.map((u) => ({ ...u, category: u.category ?? k(u) })).filter((u) => S(u, n));
51
+ return s.push(V(o, c)), c.map((u) => ({ finding: u, source: { repository: o.repository, ref: o.ref } }));
52
+ }), r = O(t);
53
53
  return {
54
54
  auditKind: "aggregated-usages",
55
55
  aggregatedDate: Date.now(),
56
56
  count: t.length,
57
- repositories: r.sort(
58
- (o, u) => u.count - o.count || o.repository.localeCompare(u.repository)
57
+ repositories: s.sort(
58
+ (o, c) => c.count - o.count || o.repository.localeCompare(c.repository)
59
59
  ),
60
- packages: c,
61
- ...a === void 0 ? {} : { unused: K(e, a, s) }
60
+ packages: r,
61
+ ...a === void 0 ? {} : { unused: K(e, a, n) }
62
62
  };
63
63
  }
64
- function V(e, s) {
64
+ function V(e, n) {
65
65
  return {
66
66
  repository: e.repository,
67
67
  ref: e.ref,
68
68
  branch: e.branch,
69
69
  scanDate: e.scanDate,
70
70
  scannerVersion: e.scannerVersion,
71
- count: s.length,
72
- apiCount: new Set(s.map(w)).size,
73
- categories: z(s, (a) => a).map(({ categoryName: a, count: i, packages: r }) => ({
71
+ count: n.length,
72
+ apiCount: new Set(n.map(w)).size,
73
+ categories: z(n, (a) => a).map(({ categoryName: a, count: i, packages: s }) => ({
74
74
  category: a,
75
75
  label: N[a].label,
76
76
  count: i,
77
- packages: r.map(({ packageName: t, displayName: c, count: o }) => ({
77
+ packages: s.map(({ packageName: t, displayName: r, count: o }) => ({
78
78
  package: t,
79
- ...c === t ? {} : { displayName: c },
79
+ ...r === t ? {} : { displayName: r },
80
80
  count: o
81
81
  }))
82
82
  }))
83
83
  };
84
84
  }
85
- function O(e, s) {
86
- return (!s.esriOnly || b(e.package)) && (s.category === void 0 || e.category === s.category) && (s.packageName === void 0 || e.package === s.packageName);
85
+ function S(e, n) {
86
+ return (!n.esriOnly || b(e.package)) && (n.category === void 0 || e.category === n.category) && (n.packageName === void 0 || e.package === n.packageName);
87
87
  }
88
- function S(e) {
89
- const s = [...Map.groupBy(e, ({ finding: a }) => a.package)].map(([a, i]) => {
90
- const r = [...Map.groupBy(i, ({ finding: t }) => t.module)].map(([t, c]) => {
88
+ function O(e) {
89
+ const n = [...Map.groupBy(e, ({ finding: a }) => a.package)].map(([a, i]) => {
90
+ const s = [...Map.groupBy(i, ({ finding: t }) => t.module)].map(([t, r]) => {
91
91
  const o = [
92
92
  ...Map.groupBy(
93
- c,
94
- ({ finding: u }) => JSON.stringify([u.category ?? k(u), w(u)])
93
+ r,
94
+ ({ finding: c }) => JSON.stringify([c.category ?? k(c), w(c)])
95
95
  )
96
- ].map(([, u]) => {
97
- const n = u.reduce(
98
- (p, { finding: l }) => D(l, p) < 0 ? l : p,
99
- u[0].finding
100
- ), d = u.flatMap(({ source: p }) => p === void 0 ? [] : [p]);
96
+ ].map(([, c]) => {
97
+ const u = c.reduce(
98
+ (p, { finding: l }) => C(l, p) < 0 ? l : p,
99
+ c[0].finding
100
+ ), d = c.flatMap(({ source: p }) => p === void 0 ? [] : [p]);
101
101
  return {
102
- name: n.name,
103
- category: n.category ?? k(n),
104
- kind: n.kind,
105
- memberOf: n.memberOf,
102
+ name: u.name,
103
+ category: u.category ?? k(u),
104
+ kind: u.kind,
105
+ memberOf: u.memberOf,
106
106
  count: d.length,
107
107
  repositories: [...Map.groupBy(d, ({ repository: p }) => p)].map(([p, l]) => ({
108
108
  repository: U(p),
@@ -114,73 +114,73 @@ function S(e) {
114
114
  };
115
115
  });
116
116
  return o.sort(
117
- (u, n) => n.count - u.count || h(u).localeCompare(h(n)) || u.name.localeCompare(n.name) || (u.memberOf ?? "").localeCompare(n.memberOf ?? "") || (u.kind ?? "").localeCompare(n.kind ?? "") || u.category.localeCompare(n.category)
117
+ (c, u) => u.count - c.count || h(c).localeCompare(h(u)) || c.name.localeCompare(u.name) || (c.memberOf ?? "").localeCompare(u.memberOf ?? "") || (c.kind ?? "").localeCompare(u.kind ?? "") || c.category.localeCompare(u.category)
118
118
  ), {
119
119
  module: t,
120
- count: o.reduce((u, n) => u + n.count, 0),
120
+ count: o.reduce((c, u) => c + u.count, 0),
121
121
  apis: o
122
122
  };
123
123
  });
124
- return r.sort(
125
- (t, c) => c.count - t.count || +(t.module === void 0) - +(c.module === void 0) || (t.module ?? "").localeCompare(c.module ?? "")
126
- ), { package: a, count: r.reduce((t, c) => t + c.count, 0), modules: r };
124
+ return s.sort(
125
+ (t, r) => r.count - t.count || +(t.module === void 0) - +(r.module === void 0) || (t.module ?? "").localeCompare(r.module ?? "")
126
+ ), { package: a, count: s.reduce((t, r) => t + r.count, 0), modules: s };
127
127
  });
128
- return s.sort(
128
+ return n.sort(
129
129
  (a, i) => Number(b(i.package)) - Number(b(a.package)) || i.count - a.count || a.package.localeCompare(i.package)
130
- ), s;
130
+ ), n;
131
131
  }
132
- function K(e, s, a) {
133
- const i = e.flatMap((c) => c.findings), r = new Set(i.map(w)), t = /* @__PURE__ */ new Map();
134
- for (const c of s)
135
- for (const o of c.findings) {
132
+ function K(e, n, a) {
133
+ const i = e.flatMap((r) => r.findings), s = new Set(i.map(w)), t = /* @__PURE__ */ new Map();
134
+ for (const r of n)
135
+ for (const o of r.findings) {
136
136
  if (o.module === void 0)
137
137
  throw new Error(
138
138
  `Definition ${o.package}/${o.name} has no module. Regenerate its audit-definitions report.`
139
139
  );
140
- const u = { ...o, category: o.category ?? k(o) }, n = w(u);
141
- if (!r.has(n) && O(u, a)) {
142
- const p = t.get(n);
143
- (p === void 0 || D(u, p.finding) < 0) && t.set(n, { finding: u });
140
+ const c = { ...o, category: o.category ?? k(o) }, u = w(c);
141
+ if (!s.has(u) && S(c, a)) {
142
+ const p = t.get(u);
143
+ (p === void 0 || C(c, p.finding) < 0) && t.set(u, { finding: c });
144
144
  }
145
145
  }
146
- return { count: t.size, packages: S([...t.values()]) };
146
+ return { count: t.size, packages: O([...t.values()]) };
147
147
  }
148
148
  function w(e) {
149
149
  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]);
150
150
  }
151
- function U(e, s = !1) {
151
+ function U(e, n = !1) {
152
152
  const a = new URL(`https://${e}`);
153
- return !s && a.hostname === "github.com" ? e : a.pathname.slice(1);
153
+ return !n && a.hostname === "github.com" ? e : a.pathname.slice(1);
154
154
  }
155
- function L(e, s, a, i) {
156
- const r = new Map(
155
+ function L(e, n, a, i) {
156
+ const s = new Map(
157
157
  [...Map.groupBy(i, (o) => JSON.stringify([o.package, o.module]))].map(
158
- ([o, u]) => [o, u.length]
158
+ ([o, c]) => [o, c.length]
159
159
  )
160
160
  );
161
161
  if (a === "apis")
162
- return y(e, s, r);
162
+ return y(e, n, s);
163
163
  if (a === "unused-apis") {
164
164
  if (e.unused === void 0)
165
165
  throw new Error("The unused-apis section requires --definitions.");
166
- return y(e.unused, s, r, "Deprecated APIs with zero detected usages");
166
+ return y(e.unused, n, s, "Deprecated APIs with zero detected usages");
167
167
  }
168
- const t = s === "md", c = [
168
+ const t = n === "md", r = [
169
169
  t ? "# Deprecation overview" : "Deprecation overview",
170
170
  "",
171
171
  `${e.count} usages - ${e.repositories.length} repositories - Aggregated: ${new Date(e.aggregatedDate).toISOString().slice(0, 10)}`,
172
172
  ""
173
173
  ];
174
174
  for (const o of e.repositories) {
175
- const u = o.scanDate === void 0 ? "Unknown" : new Date(o.scanDate).toISOString();
176
- c.push(
175
+ 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" : "";
176
+ r.push(
177
177
  "",
178
178
  ...t ? [
179
179
  "<details>",
180
- `<summary>${o.count} usages - ${P(U(o.repository, !0))} - ${u.slice(0, 10)}</summary>`,
180
+ `<summary>${o.count} usages - ${P(U(o.repository, !0))} - ${c.slice(0, 10)}${u}</summary>`,
181
181
  ""
182
- ] : [`${o.repository}: ${o.count} usages; selected scan ${u}`]
183
- ), c.push(
182
+ ] : [`${o.repository}: ${o.count} usages; selected scan ${c}${u}`]
183
+ ), r.push(
184
184
  `> ${[
185
185
  `Distinct APIs: ${o.apiCount}`,
186
186
  `Branch: ${t ? g(o.branch ?? "Unknown") : o.branch ?? "Unknown"}`,
@@ -188,28 +188,28 @@ function L(e, s, a, i) {
188
188
  `Scanner version: ${t ? g(o.scannerVersion ?? "Unknown") : o.scannerVersion ?? "Unknown"}`
189
189
  ].join(" | ")}`,
190
190
  ""
191
- ), o.categories.length === 0 ? c.push("No matching deprecated usages.") : t && c.push("| Category | Package | Usages |", "| --- | --- | ---: |");
192
- for (const n of o.categories) {
193
- if (t && n.packages.length === 1) {
194
- c.push(
195
- `| **${g(n.label)}** | ${g(n.packages[0].displayName ?? n.packages[0].package)} | **${n.count}** |`
191
+ ), o.categories.length === 0 ? r.push("No matching deprecated usages.") : t && r.push("| Category | Package | Usages |", "| --- | --- | ---: |");
192
+ for (const d of o.categories) {
193
+ if (t && d.packages.length === 1) {
194
+ r.push(
195
+ `| **${g(d.label)}** | ${g(d.packages[0].displayName ?? d.packages[0].package)} | **${d.count}** |`
196
196
  );
197
197
  continue;
198
198
  }
199
- c.push(
200
- t ? `| **${g(n.label)}** | | **${n.count}** |` : ` ${n.label} (${n.count})`
199
+ r.push(
200
+ t ? `| **${g(d.label)}** | | **${d.count}** |` : ` ${d.label} (${d.count})`
201
201
  );
202
- for (const d of n.packages)
203
- c.push(
204
- t ? `| | ${g(d.displayName ?? d.package)} | ${d.count} |` : ` ${d.displayName ?? d.package} (${d.count})`
202
+ for (const p of d.packages)
203
+ r.push(
204
+ t ? `| | ${g(p.displayName ?? p.package)} | ${p.count} |` : ` ${p.displayName ?? p.package} (${p.count})`
205
205
  );
206
206
  }
207
- t && c.push("", "</details>");
207
+ t && r.push("", "</details>");
208
208
  }
209
- return a === "all" && (c.push("", y(e, s, r)), e.unused !== void 0 && c.push(
209
+ return a === "all" && (r.push("", y(e, n, s)), e.unused !== void 0 && r.push(
210
210
  "",
211
- y(e.unused, s, r, "Deprecated APIs with zero detected usages")
212
- )), c.join(`
211
+ y(e.unused, n, s, "Deprecated APIs with zero detected usages")
212
+ )), r.join(`
213
213
  `);
214
214
  }
215
215
  function g(e) {
@@ -218,122 +218,122 @@ function g(e) {
218
218
  function P(e) {
219
219
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
220
220
  }
221
- function y(e, s, a, i = "Deprecated API usages") {
222
- const r = s === "md", t = `${i}${m(e.count)}`, c = [r ? `# ${t}` : t];
223
- for (const [o, { label: u }] of Object.entries(N)) {
224
- const n = e.packages.flatMap((p) => {
221
+ function y(e, n, a, i = "Deprecated API usages") {
222
+ const s = n === "md", t = `${i}${m(e.count)}`, r = [s ? `# ${t}` : t];
223
+ for (const [o, { label: c }] of Object.entries(N)) {
224
+ const u = e.packages.flatMap((p) => {
225
225
  const l = p.modules.flatMap(($) => {
226
226
  const f = $.apis.filter((v) => v.category === o);
227
227
  return f.length === 0 ? [] : [{ ...$, apis: f, count: f.reduce((v, E) => v + E.count, 0) }];
228
228
  });
229
229
  return l.length === 0 ? [] : [{ ...p, modules: l, count: l.reduce(($, f) => $ + f.count, 0) }];
230
230
  });
231
- if (n.length === 0)
231
+ if (u.length === 0)
232
232
  continue;
233
- const d = n.reduce((p, l) => p + l.count, 0);
234
- c.push(
233
+ const d = u.reduce((p, l) => p + l.count, 0);
234
+ r.push(
235
235
  "",
236
- `${r ? "## " : ""}${u}${m(d)}`,
237
- ...T(n, r, a)
236
+ `${s ? "## " : ""}${c}${m(d)}`,
237
+ ...T(u, s, a)
238
238
  );
239
239
  }
240
- return c.join(`
240
+ return r.join(`
241
241
  `);
242
242
  }
243
243
  function m(e) {
244
244
  return e === 0 ? "" : ` (${e})`;
245
245
  }
246
- function T(e, s, a) {
247
- const i = [], r = e.flatMap(
246
+ function T(e, n, a) {
247
+ const i = [], s = e.flatMap(
248
248
  (t) => [
249
- ...Map.groupBy(t.modules, (c) => B(t.package, c.module))
250
- ].map(([c, o]) => ({
249
+ ...Map.groupBy(t.modules, (r) => B(t.package, r.module))
250
+ ].map(([r, o]) => ({
251
251
  ...t,
252
- displayName: c,
252
+ displayName: r,
253
253
  modules: o,
254
- count: o.reduce((u, n) => u + n.count, 0)
254
+ count: o.reduce((c, u) => c + u.count, 0)
255
255
  }))
256
256
  );
257
- for (const t of r) {
257
+ for (const t of s) {
258
258
  if (i.push(
259
259
  "",
260
- s ? `### ${t.displayName === t.package ? `\`${t.package}\`` : t.displayName}${m(t.count)}` : `${t.displayName}${m(t.count)}`
261
- ), s) {
260
+ n ? `### ${t.displayName === t.package ? `\`${t.package}\`` : t.displayName}${m(t.count)}` : `${t.displayName}${m(t.count)}`
261
+ ), n) {
262
262
  i.push(...H(t.modules, t.package, a));
263
263
  continue;
264
264
  }
265
- for (const c of t.modules) {
266
- const o = c.module ?? "Unknown module";
267
- i.push(` ${o}${m(c.count)}`);
268
- for (const u of c.apis)
269
- i.push(...R(u, !1, " "));
265
+ for (const r of t.modules) {
266
+ const o = r.module ?? "Unknown module";
267
+ i.push(` ${o}${m(r.count)}`);
268
+ for (const c of r.apis)
269
+ i.push(...R(c, !1, " "));
270
270
  }
271
271
  }
272
272
  return i;
273
273
  }
274
- function R(e, s, a = "") {
275
- const i = `${h(e)}${A(e.kind)}`, r = e.repositories.map(
276
- ({ repository: t, count: c }) => `${a} ${s ? `- \`${t}\`` : t} (${c})`
274
+ function R(e, n, a = "") {
275
+ const i = `${h(e)}${A(e.kind)}`, s = e.repositories.map(
276
+ ({ repository: t, count: r }) => `${a} ${n ? `- \`${t}\`` : t} (${r})`
277
277
  );
278
- return s ? [
278
+ return n ? [
279
279
  `${a}- \`${h(e)}\`${A(e.kind)}${m(e.count)}`,
280
- ...r
281
- ] : [`${a}${i}${m(e.count)}`, ...r];
280
+ ...s
281
+ ] : [`${a}${i}${m(e.count)}`, ...s];
282
282
  }
283
- function H(e, s, a) {
283
+ function H(e, n, a) {
284
284
  const i = /* @__PURE__ */ new Map();
285
- for (const r of e) {
285
+ for (const s of e) {
286
286
  let t = i;
287
- const c = r.module === void 0 ? [void 0] : r.module.split("/");
288
- for (const [o, u] of c.entries()) {
289
- let n = t.get(u);
290
- n === void 0 && (n = { name: u, count: 0, usedCount: 0, children: /* @__PURE__ */ new Map(), apis: [] }, t.set(u, n)), n.count += r.count, o === c.length - 1 && (n.apis = r.apis, n.usedCount = r.count === 0 && r.module !== void 0 ? a?.get(JSON.stringify([s, r.module])) ?? 0 : 0), t = n.children;
287
+ const r = s.module === void 0 ? [void 0] : s.module.split("/");
288
+ for (const [o, c] of r.entries()) {
289
+ let u = t.get(c);
290
+ 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;
291
291
  }
292
292
  }
293
- return [...i.values()].sort((r, t) => t.count - r.count).flatMap((r) => I(r, 0));
293
+ return [...i.values()].sort((s, t) => t.count - s.count).flatMap((s) => I(s, 0));
294
294
  }
295
- function I(e, s) {
295
+ function I(e, n) {
296
296
  let a = e, i = a.name ?? "Unknown module";
297
297
  for (; a.children.size === 1 && a.apis.length === 0; )
298
298
  a = [...a.children.values()][0], i += `/${a.name}`;
299
299
  a.children.size > 0 && (i += "/");
300
- const r = " ".repeat(s), t = [
300
+ const s = " ".repeat(n), t = [
301
301
  ...[...a.children.values()].map((o) => ({
302
302
  count: o.count,
303
- lines: I(o, s + 1)
303
+ lines: I(o, n + 1)
304
304
  })),
305
305
  ...a.apis.map((o) => ({
306
306
  count: o.count,
307
- lines: R(o, !0, r)
307
+ lines: R(o, !0, s)
308
308
  }))
309
309
  ];
310
- t.sort((o, u) => u.count - o.count);
311
- const c = [
310
+ t.sort((o, c) => c.count - o.count);
311
+ const r = [
312
312
  ...a.usedCount === 0 ? [] : [
313
- `${r}> **Warning:** Other deprecated APIs in this file still have detected usages (${a.usedCount}). Do not remove the entire file.`,
313
+ `${s}> **Warning:** Other deprecated APIs in this file still have detected usages (${a.usedCount}). Do not remove the entire file.`,
314
314
  ""
315
315
  ],
316
316
  ...t.flatMap(({ lines: o }) => o)
317
317
  ];
318
- return s === 0 ? [
318
+ return n === 0 ? [
319
319
  "",
320
320
  "<details>",
321
321
  `<summary><code>${i.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;")}</code>${m(e.count)}</summary>`,
322
322
  "",
323
- ...c,
323
+ ...r,
324
324
  "",
325
325
  "</details>"
326
- ] : [`${" ".repeat(s - 1)}- \`${i}\`${m(e.count)}`, ...c];
326
+ ] : [`${" ".repeat(n - 1)}- \`${i}\`${m(e.count)}`, ...r];
327
327
  }
328
- async function M(e, s) {
328
+ async function D(e, n) {
329
329
  let a;
330
330
  try {
331
- a = C(await J(e, "utf8"));
331
+ a = M(await J(e, "utf8"));
332
332
  } catch (i) {
333
- throw new Error(`Failed to read audit-${s} report: ${e}`, { cause: i });
333
+ throw new Error(`Failed to read audit-${n} report: ${e}`, { cause: i });
334
334
  }
335
- if (a.auditKind !== s)
336
- throw new Error(`Invalid audit-${s} report: ${e}`);
335
+ if (a.auditKind !== n)
336
+ throw new Error(`Invalid audit-${n} report: ${e}`);
337
337
  return a;
338
338
  }
339
339
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/codemod",
3
- "version": "6.0.0-next.15",
3
+ "version": "6.0.0-next.16",
4
4
  "description": "A codemod toolkit for updating and modernizing ArcGIS Maps SDK for JavaScript codebases.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,16 +11,17 @@
11
11
  ],
12
12
  "license": "SEE LICENSE IN LICENSE.md",
13
13
  "dependencies": {
14
- "@arcgis/api-extractor": "6.0.0-next.15",
15
- "@arcgis/node-toolkit": "6.0.0-next.15",
16
- "@arcgis/toolkit": "6.0.0-next.15",
14
+ "@arcgis/api-extractor": "6.0.0-next.16",
15
+ "@arcgis/node-toolkit": "6.0.0-next.16",
16
+ "@arcgis/toolkit": "6.0.0-next.16",
17
17
  "@commander-js/extra-typings": "^15.0.0",
18
18
  "commander": "^15.0.0",
19
19
  "semver": "^7.7.3",
20
20
  "tinyglobby": "~0.2.17",
21
21
  "ts-morph": "^28.0.0",
22
22
  "tslib": "^2.8.1",
23
- "typescript": "~6.0.3"
23
+ "typescript": "~6.0.3",
24
+ "yaml": "^2.8.3"
24
25
  },
25
26
  "bin": {
26
27
  "codemod": "./bin/cli.js"