@arcgis/codemod 6.0.0-next.37 → 6.0.0-next.39

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,156 +1,156 @@
1
- var ne = (n, e) => (e = Symbol[n]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + n), se = (n) => {
2
- throw TypeError(n);
1
+ var ne = (s, n) => (n = Symbol[s]) ? n : /* @__PURE__ */ Symbol.for("Symbol." + s), se = (s) => {
2
+ throw TypeError(s);
3
3
  };
4
- var ie = (n, e, t) => {
5
- if (e != null) {
6
- typeof e != "object" && typeof e != "function" && se("Object expected");
7
- var s, i;
8
- t && (s = e[ne("asyncDispose")]), s === void 0 && (s = e[ne("dispose")], t && (i = s)), typeof s != "function" && se("Object not disposable"), i && (s = function() {
4
+ var ie = (s, n, e) => {
5
+ if (n != null) {
6
+ typeof n != "object" && typeof n != "function" && se("Object expected");
7
+ var t, i;
8
+ e && (t = n[ne("asyncDispose")]), t === void 0 && (t = n[ne("dispose")], e && (i = t)), typeof t != "function" && se("Object not disposable"), i && (t = function() {
9
9
  try {
10
10
  i.call(this);
11
- } catch (c) {
12
- return Promise.reject(c);
11
+ } catch (a) {
12
+ return Promise.reject(a);
13
13
  }
14
- }), n.push([t, s, e]);
15
- } else t && n.push([t]);
16
- return e;
17
- }, re = (n, e, t) => {
18
- var s = typeof SuppressedError == "function" ? SuppressedError : function(r, p, l, a) {
19
- return a = Error(l), a.name = "SuppressedError", a.error = r, a.suppressed = p, a;
20
- }, i = (r) => e = t ? new s(r, e, "An error was suppressed during disposal") : (t = !0, r), c = (r) => {
21
- for (; r = n.pop(); )
14
+ }), s.push([e, t, n]);
15
+ } else e && s.push([e]);
16
+ return n;
17
+ }, re = (s, n, e) => {
18
+ var t = typeof SuppressedError == "function" ? SuppressedError : function(r, p, l, c) {
19
+ return c = Error(l), c.name = "SuppressedError", c.error = r, c.suppressed = p, c;
20
+ }, i = (r) => n = e ? new t(r, n, "An error was suppressed during disposal") : (e = !0, r), a = (r) => {
21
+ for (; r = s.pop(); )
22
22
  try {
23
23
  var p = r[1] && r[1].call(r[2]);
24
- if (r[0]) return Promise.resolve(p).then(c, (l) => (i(l), c()));
24
+ if (r[0]) return Promise.resolve(p).then(a, (l) => (i(l), a()));
25
25
  } catch (l) {
26
26
  i(l);
27
27
  }
28
- if (t) throw e;
28
+ if (e) throw n;
29
29
  };
30
- return c();
30
+ return a();
31
31
  };
32
32
  import { c as De } from "./useProjectInstance.js";
33
- import { d as z, r as Ee, s as oe, i as Le, a as Te, b as Oe } from "./cli.js";
34
- import { f as R } from "./log.js";
35
- import { path as P, toPosixPathSeparators as Fe } from "@arcgis/node-toolkit/path";
33
+ import { d as V, r as Ee, a as Le, b as Te, s as oe, i as Fe, c as Ie, e as We } from "./cli.js";
34
+ import { f as R, r as Oe } from "./log.js";
35
+ import { log as J } from "@arcgis/toolkit/log";
36
+ import { path as P, toPosixPathSeparators as Me } from "@arcgis/node-toolkit/path";
36
37
  import { forEachWithConcurrency as ve } from "@arcgis/toolkit/promise";
37
38
  import o from "typescript";
38
- import { g as ye, s as Ie, a as M, b as We, c as B, d as xe, e as Me, f as je, h as Re, i as we, p as Je, j as V, k as ae, l as Ue } from "./classification.js";
39
+ import { g as ye, s as je, a as M, b as Re, c as B, d as xe, e as Je, f as Ue, h as ze, i as we, p as Ve, j as G, k as ae, l as Ge } from "./classification.js";
39
40
  import { loadCodeowners as Se } from "@arcgis/node-toolkit/codeowners";
40
- import { s as ze, c as ce, g as Ve, l as Ge, a as ke, b as qe, d as Be, e as Ke } from "./componentAudit.js";
41
+ import { s as qe, c as ce, g as Be, l as Ke, a as ke, b as He, d as Qe, e as _e } from "./componentAudit.js";
41
42
  import { styleText as K } from "node:util";
42
43
  import { f as Ne } from "./format.js";
43
- import { realpath as j, readFile as J } from "node:fs/promises";
44
- import O from "semver";
45
- import { asyncFindPath as G } from "@arcgis/node-toolkit/file";
46
- import { asyncRetrievePackageJson as He } from "@arcgis/node-toolkit/packageJson";
47
- import { log as q } from "@arcgis/toolkit/log";
48
- import { LineCounter as Qe, parseDocument as _e, isMap as Xe, isScalar as le } from "yaml";
49
- function Ye(n, e, t) {
50
- if (e === "json") {
51
- if (t !== void 0) {
52
- process.stdout.write(`${JSON.stringify(t, void 0, 2)}
44
+ import { realpath as j, readFile as U } from "node:fs/promises";
45
+ import F from "semver";
46
+ import { asyncFindPath as q } from "@arcgis/node-toolkit/file";
47
+ import { asyncRetrievePackageJson as Xe } from "@arcgis/node-toolkit/packageJson";
48
+ import { LineCounter as Ye, parseDocument as Ze, isMap as et, isScalar as le } from "yaml";
49
+ function tt(s, n, e) {
50
+ if (n === "json") {
51
+ if (e !== void 0) {
52
+ process.stdout.write(`${JSON.stringify(e, void 0, 2)}
53
53
  `);
54
54
  return;
55
55
  }
56
- const s = M();
57
- process.stdout.write(`${st(n, Se(), s)}
56
+ const t = M();
57
+ process.stdout.write(`${ot(s, Se(), t)}
58
58
  `);
59
59
  return;
60
60
  }
61
- if (e === "md") {
61
+ if (n === "md") {
62
62
  process.stdout.write(
63
- `${t === void 0 ? it(n) : Ne(t)}
63
+ `${e === void 0 ? at(s) : Ne(e)}
64
64
  `
65
65
  );
66
66
  return;
67
67
  }
68
- process.stdout.write(`${Ze(n)}
68
+ process.stdout.write(`${nt(s)}
69
69
  `);
70
70
  }
71
- function Ze(n) {
72
- const e = be(n), t = e.reduce((i, c) => i + c.count, 0), s = [pe("Deprecation summary", t)];
73
- for (const { categoryName: i, count: c, packages: r } of e) {
74
- s.push(`${z[i].label} (${c})`);
71
+ function nt(s) {
72
+ const n = be(s), e = n.reduce((i, a) => i + a.count, 0), t = [pe("Deprecation summary", e)];
73
+ for (const { categoryName: i, count: a, packages: r } of n) {
74
+ t.push(`${V[i].label} (${a})`);
75
75
  for (const { displayName: p, count: l } of r)
76
- s.push(` ${de(p)} (${l})`);
76
+ t.push(` ${de(p)} (${l})`);
77
77
  }
78
- s.push("", "", pe("Deprecation details", t));
79
- for (const { categoryName: i, count: c, packages: r } of e) {
80
- const p = z[i];
81
- s.push("", `${p.label} (${c})`), "description" in p && s.push(` ${p.description}`);
82
- for (const { displayName: l, count: a, apis: m } of r) {
83
- s.push("", ` ${de(l)} (${a})`);
78
+ t.push("", "", pe("Deprecation details", e));
79
+ for (const { categoryName: i, count: a, packages: r } of n) {
80
+ const p = V[i];
81
+ t.push("", `${p.label} (${a})`), "description" in p && t.push(` ${p.description}`);
82
+ for (const { displayName: l, count: c, apis: m } of r) {
83
+ t.push("", ` ${de(l)} (${c})`);
84
84
  for (const { name: g, reasons: y, items: v } of m) {
85
- const d = v[0].usage, u = je({ name: g, memberOf: d.memberOf, kind: d.kind });
86
- s.push(` ${et(u)}${Re(d.kind)} (${v.length})`);
85
+ const d = v[0].usage, u = Ue({ name: g, memberOf: d.memberOf, kind: d.kind });
86
+ t.push(` ${st(u)}${ze(d.kind)} (${v.length})`);
87
87
  for (const x of y)
88
- s.push(tt(x, 6));
89
- for (const { sourceFileName: x, usage: w } of nt(v))
90
- s.push(` ${R(x)}:${w.line}:${w.column}`);
88
+ t.push(it(x, 6));
89
+ for (const { sourceFileName: x, usage: w } of rt(v))
90
+ t.push(` ${R(x)}:${w.line}:${w.column}`);
91
91
  }
92
92
  }
93
93
  }
94
- return s.join(`
94
+ return t.join(`
95
95
  `);
96
96
  }
97
- function be(n) {
98
- const e = [...n].flatMap(
99
- ([t, s]) => s.map((i) => ({ ...i, packageName: t }))
97
+ function be(s) {
98
+ const n = [...s].flatMap(
99
+ ([e, t]) => t.map((i) => ({ ...i, packageName: e }))
100
100
  );
101
- return We(e, ({ packageName: t, usage: s }) => ({
102
- package: t,
103
- name: s.name,
104
- kind: s.kind,
105
- category: s.category,
106
- memberOf: s.memberOf,
107
- module: s.module ?? B(s.originFileNames, t),
108
- deprecated: s.reason ?? !0
101
+ return Re(n, ({ packageName: e, usage: t }) => ({
102
+ package: e,
103
+ name: t.name,
104
+ kind: t.kind,
105
+ category: t.category,
106
+ memberOf: t.memberOf,
107
+ module: t.module ?? B(t.originFileNames, e),
108
+ deprecated: t.reason ?? !0
109
109
  }));
110
110
  }
111
- function pe(n, e) {
112
- return K(["bold", "yellow"], `${n} (${e})`);
111
+ function pe(s, n) {
112
+ return K(["bold", "yellow"], `${s} (${n})`);
113
113
  }
114
- function de(n) {
115
- return K("blue", n);
114
+ function de(s) {
115
+ return K("blue", s);
116
116
  }
117
- function et(n) {
118
- return K(["bold", "white"], n);
117
+ function st(s) {
118
+ return K(["bold", "white"], s);
119
119
  }
120
- function tt(n, e) {
121
- const t = " ".repeat(e);
122
- return n.split(/\r?\n/u).map((s) => `${t}${s}`).join(`
120
+ function it(s, n) {
121
+ const e = " ".repeat(n);
122
+ return s.split(/\r?\n/u).map((t) => `${e}${t}`).join(`
123
123
  `);
124
124
  }
125
- function nt(n) {
126
- return n.toSorted(
127
- (e, t) => e.sourceFileName.localeCompare(t.sourceFileName) || e.usage.line - t.usage.line || e.usage.column - t.usage.column
125
+ function rt(s) {
126
+ return s.toSorted(
127
+ (n, e) => n.sourceFileName.localeCompare(e.sourceFileName) || n.usage.line - e.usage.line || n.usage.column - e.usage.column
128
128
  );
129
129
  }
130
- function st(n, e, t = M()) {
131
- return JSON.stringify(H(n, e, t), void 0, 2);
130
+ function ot(s, n, e = M()) {
131
+ return JSON.stringify(H(s, n, e), void 0, 2);
132
132
  }
133
- function it(n, e = M()) {
134
- return Ne(H(n, void 0, e));
133
+ function at(s, n = M()) {
134
+ return Ne(H(s, void 0, n));
135
135
  }
136
- function H(n, e, t, s, i = []) {
137
- const c = be(n), r = ye(process.cwd(), t.repositoryRoot);
136
+ function H(s, n, e, t, i = []) {
137
+ const a = be(s), r = ye(process.cwd(), e.repositoryRoot);
138
138
  return {
139
139
  auditKind: "usages",
140
- repository: t.repository,
141
- ref: t.ref,
142
- branch: t.branch,
143
- scannerVersion: Ie,
140
+ repository: e.repository,
141
+ ref: e.ref,
142
+ branch: e.branch,
143
+ scannerVersion: je,
144
144
  scanDate: Date.now(),
145
- ...s === void 0 ? {} : { complete: s },
145
+ ...t === void 0 ? {} : { complete: t },
146
146
  ...r === "" ? {} : { cwd: r },
147
147
  ...i.length === 0 ? {} : { excludedPaths: i },
148
148
  summary: {
149
- total: c.reduce((l, { count: a }) => l + a, 0),
150
- categories: c.map(({ categoryName: l, count: a, packages: m }) => ({
149
+ total: a.reduce((l, { count: c }) => l + c, 0),
150
+ categories: a.map(({ categoryName: l, count: c, packages: m }) => ({
151
151
  category: l,
152
- label: z[l].label,
153
- count: a,
152
+ label: V[l].label,
153
+ count: c,
154
154
  packages: m.map(({ packageName: g, displayName: y, count: v }) => ({
155
155
  package: g,
156
156
  ...y === g ? {} : { displayName: y },
@@ -158,47 +158,47 @@ function H(n, e, t, s, i = []) {
158
158
  }))
159
159
  }))
160
160
  },
161
- findings: rt(n, e, t)
161
+ findings: ct(s, n, e)
162
162
  };
163
163
  }
164
- function rt(n, e, t) {
165
- return [...n].flatMap(
166
- ([s, i]) => i.map((c) => {
167
- const r = c.usage.module ?? B(c.usage.originFileNames, s), p = {
168
- package: s,
169
- name: c.usage.name,
170
- category: c.usage.category,
171
- memberOf: c.usage.memberOf,
164
+ function ct(s, n, e) {
165
+ return [...s].flatMap(
166
+ ([t, i]) => i.map((a) => {
167
+ const r = a.usage.module ?? B(a.usage.originFileNames, t), p = {
168
+ package: t,
169
+ name: a.usage.name,
170
+ category: a.usage.category,
171
+ memberOf: a.usage.memberOf,
172
172
  module: r,
173
- deprecated: c.usage.reason ?? !0
173
+ deprecated: a.usage.reason ?? !0
174
174
  };
175
175
  return {
176
176
  ...p,
177
177
  category: xe(p),
178
- kind: c.usage.kind,
179
- memberOf: c.usage.memberOf,
180
- file: ye(c.sourceFileName, t.repositoryRoot),
181
- line: c.usage.line,
182
- column: c.usage.column,
183
- codeowners: e?.getOwners(c.sourceFileName) ?? []
178
+ kind: a.usage.kind,
179
+ memberOf: a.usage.memberOf,
180
+ file: ye(a.sourceFileName, e.repositoryRoot),
181
+ line: a.usage.line,
182
+ column: a.usage.column,
183
+ codeowners: n?.getOwners(a.sourceFileName) ?? []
184
184
  };
185
185
  })
186
- ).sort(Me);
186
+ ).sort(Je);
187
187
  }
188
- function ot(n, e, t) {
189
- return { scanNode: s, scanCss: i, scanHtmlAttributes: c };
190
- function s(p, l, a) {
188
+ function lt(s, n, e) {
189
+ return { scanNode: t, scanCss: i, scanHtmlAttributes: a };
190
+ function t(p, l, c) {
191
191
  if (!o.isStringLiteralLike(p))
192
192
  return;
193
193
  const m = p.getStart(l) + 1, g = l.text.slice(m, p.end - 1);
194
- /(?:^|,)\s*(["']?)CalciteWebCoreIcons\1\s*(?=,|$)/iu.test(g) && me(g, a + m, r), U(g, a + m, r), i(g, a + m);
194
+ /(?:^|,)\s*(["']?)CalciteWebCoreIcons\1\s*(?=,|$)/iu.test(g) && me(g, c + m, r), z(g, c + m, r), i(g, c + m);
195
195
  }
196
- function i(p, l, a = !1) {
197
- const m = a ? /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\/\/[^\r\n]*/gu : /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'/gu, g = p.replace(
196
+ function i(p, l, c = !1) {
197
+ const m = c ? /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\/\/[^\r\n]*/gu : /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'/gu, g = p.replace(
198
198
  m,
199
199
  (v) => v.startsWith("/") ? v.replace(/[^\r\n]/gu, " ") : v
200
200
  ), y = g.replace(m, (v) => v.replace(/[^\r\n]/gu, " "));
201
- U(y, l, r);
201
+ z(y, l, r);
202
202
  for (const v of y.matchAll(
203
203
  /(?:^|[;{}\r\n])\s*(?:font(?:-family)?|--[-\w]+|\$[-\w]+)\s*:([^;{}]*?)(?=;|\}|$|[\r\n][\t ]*[-\w$]+\s*:)/giu
204
204
  )) {
@@ -206,15 +206,15 @@ function ot(n, e, t) {
206
206
  me(g.slice(d, d + v[1].length), l + d, r);
207
207
  }
208
208
  }
209
- function c(p) {
210
- for (const { name: l, value: a, valueStart: m } of p)
211
- a !== void 0 && (l === "class" ? U(a, m, r) : l === "style" && i(a, m));
209
+ function a(p) {
210
+ for (const { name: l, value: c, valueStart: m } of p)
211
+ c !== void 0 && (l === "class" ? z(c, m, r) : l === "style" && i(c, m));
212
212
  }
213
213
  function r(p, l) {
214
- const { line: a, character: m } = e(p);
215
- t({
214
+ const { line: c, character: m } = n(p);
215
+ e({
216
216
  packageName: "@arcgis/core",
217
- sourceFileName: n,
217
+ sourceFileName: s,
218
218
  usage: {
219
219
  name: "CalciteWebCoreIcons",
220
220
  module: "symbols/Font",
@@ -222,38 +222,38 @@ function ot(n, e, t) {
222
222
  originFileNames: [],
223
223
  start: p,
224
224
  length: l,
225
- line: a + 1,
225
+ line: c + 1,
226
226
  column: m + 1
227
227
  }
228
228
  });
229
229
  }
230
230
  }
231
- function me(n, e, t) {
232
- for (const s of n.matchAll(/"[^"\r\n]*"|'[^'\r\n]*'|[-\w]+/gu)) {
233
- const i = s[0].startsWith('"') || s[0].startsWith("'"), c = i ? s[0].slice(1, -1) : s[0];
234
- c.toLowerCase() === "calcitewebcoreicons" && t(e + s.index + (i ? 1 : 0), c.length);
231
+ function me(s, n, e) {
232
+ for (const t of s.matchAll(/"[^"\r\n]*"|'[^'\r\n]*'|[-\w]+/gu)) {
233
+ const i = t[0].startsWith('"') || t[0].startsWith("'"), a = i ? t[0].slice(1, -1) : t[0];
234
+ a.toLowerCase() === "calcitewebcoreicons" && e(n + t.index + (i ? 1 : 0), a.length);
235
235
  }
236
236
  }
237
- function U(n, e, t) {
238
- for (const s of n.matchAll(/(?<![-\w])esri-icon-[a-z][\w-]*/gu))
239
- s[0] !== "esri-icon-font-fallback-text" && t(e + s.index, s[0].length);
237
+ function z(s, n, e) {
238
+ for (const t of s.matchAll(/(?<![-\w])esri-icon-[a-z][\w-]*/gu))
239
+ t[0] !== "esri-icon-font-fallback-text" && e(n + t.index, t[0].length);
240
240
  }
241
- function at(n, e, t) {
242
- return { scanNode: s };
243
- function s(i, c, r, p) {
244
- if (r === void 0 || !o.isCallExpression(i) || i.arguments.some(o.isSpreadElement) || !ct(i.expression, r))
241
+ function pt(s, n, e) {
242
+ return { scanNode: t };
243
+ function t(i, a, r, p) {
244
+ if (r === void 0 || !o.isCallExpression(i) || i.arguments.some(o.isSpreadElement) || !dt(i.expression, r))
245
245
  return;
246
246
  const l = i.arguments[0];
247
247
  if (l === void 0 || !o.isStringLiteralLike(l))
248
248
  return;
249
- const a = i.arguments[1], m = ge(a, "strategy");
249
+ const c = i.arguments[1], m = ge(c, "strategy");
250
250
  if (m !== "missing" && m !== "unknown" && o.isStringLiteralLike(m) && m.text === "local" && y(
251
251
  "strategy",
252
252
  m,
253
253
  'The workers.open() strategy "local" is deprecated since 5.2. Use "distributed" or "dedicated" to run the module in a worker instead of on the main thread.'
254
- ), lt.has(l.text))
254
+ ), mt.has(l.text))
255
255
  return;
256
- const g = ge(a, "isESM");
256
+ const g = ge(c, "isESM");
257
257
  if (g === "missing" || g !== "unknown" && g.kind === o.SyntaxKind.FalseKeyword) {
258
258
  const v = i.expression;
259
259
  y(
@@ -263,10 +263,10 @@ function at(n, e, t) {
263
263
  );
264
264
  }
265
265
  function y(v, d, u) {
266
- const x = p + d.getStart(c), { line: w, character: f } = e(x);
267
- t({
266
+ const x = p + d.getStart(a), { line: w, character: f } = n(x);
267
+ e({
268
268
  packageName: "@arcgis/core",
269
- sourceFileName: n,
269
+ sourceFileName: s,
270
270
  usage: {
271
271
  name: `open.${v}`,
272
272
  kind: "function",
@@ -274,7 +274,7 @@ function at(n, e, t) {
274
274
  reason: u,
275
275
  originFileNames: [],
276
276
  start: x,
277
- length: d.getWidth(c),
277
+ length: d.getWidth(a),
278
278
  line: w + 1,
279
279
  column: f + 1
280
280
  }
@@ -282,29 +282,29 @@ function at(n, e, t) {
282
282
  }
283
283
  }
284
284
  }
285
- function ct(n, e) {
286
- const t = o.isPropertyAccessExpression(n) && n.name.text === "open", s = t ? n.expression : n;
287
- if (!o.isIdentifier(s))
285
+ function dt(s, n) {
286
+ const e = o.isPropertyAccessExpression(s) && s.name.text === "open", t = e ? s.expression : s;
287
+ if (!o.isIdentifier(t))
288
288
  return !1;
289
- const i = e.getSymbolAtLocation(s)?.declarations?.[0];
290
- return i === void 0 ? !1 : t ? o.isNamespaceImport(i) && !i.parent.isTypeOnly && ue(i.parent.parent.moduleSpecifier) : o.isImportSpecifier(i) && !i.isTypeOnly && !i.parent.parent.isTypeOnly && (i.propertyName ?? i.name).text === "open" && ue(i.parent.parent.parent.moduleSpecifier);
289
+ const i = n.getSymbolAtLocation(t)?.declarations?.[0];
290
+ return i === void 0 ? !1 : e ? o.isNamespaceImport(i) && !i.parent.isTypeOnly && ue(i.parent.parent.moduleSpecifier) : o.isImportSpecifier(i) && !i.isTypeOnly && !i.parent.parent.isTypeOnly && (i.propertyName ?? i.name).text === "open" && ue(i.parent.parent.parent.moduleSpecifier);
291
291
  }
292
- function ue(n) {
293
- return o.isStringLiteralLike(n) && /^(?:@arcgis\/core|esri)\/core\/workers(?:\.js)?$/u.test(n.text);
292
+ function ue(s) {
293
+ return o.isStringLiteralLike(s) && /^(?:@arcgis\/core|esri)\/core\/workers(?:\.js)?$/u.test(s.text);
294
294
  }
295
- function ge(n, e) {
296
- if (n === void 0)
295
+ function ge(s, n) {
296
+ if (s === void 0)
297
297
  return "missing";
298
- if (!o.isObjectLiteralExpression(n) || n.properties.some(
299
- (t) => !o.isPropertyAssignment(t) || o.isComputedPropertyName(t.name)
298
+ if (!o.isObjectLiteralExpression(s) || s.properties.some(
299
+ (e) => !o.isPropertyAssignment(e) || o.isComputedPropertyName(e.name)
300
300
  ))
301
301
  return "unknown";
302
- for (const t of n.properties.toReversed())
303
- if (o.isPropertyAssignment(t) && !o.isComputedPropertyName(t.name) && t.name.text === e)
304
- return t.initializer;
302
+ for (const e of s.properties.toReversed())
303
+ if (o.isPropertyAssignment(e) && !o.isComputedPropertyName(e.name) && e.name.text === n)
304
+ return e.initializer;
305
305
  return "missing";
306
306
  }
307
- const lt = /* @__PURE__ */ new Set([
307
+ const mt = /* @__PURE__ */ new Set([
308
308
  "CSVSourceWorker",
309
309
  "EdgeProcessingWorker",
310
310
  "ElevationSamplerWorker",
@@ -335,20 +335,20 @@ const lt = /* @__PURE__ */ new Set([
335
335
  "statsWorker",
336
336
  "ImageMeasurementWorker"
337
337
  ]);
338
- function fe(n, e, t) {
339
- const s = P.extname(n.fileName).slice(1).toLowerCase(), i = "getLineAndCharacterOfPosition" in n ? (d) => n.getLineAndCharacterOfPosition(d) : mt(n.text), c = /* @__PURE__ */ new Map(), r = ot(n.fileName, i, (d) => {
340
- c.set(`iconFont:${d.usage.start}`, d);
341
- }), p = at(n.fileName, i, (d) => {
342
- c.set(`workers:${d.usage.name}:${d.usage.start}`, d);
343
- }), l = /\bdefine\s*(?:\.\s*amd\b|\[\s*(?:"amd"|'amd')\s*\])/u.test(n.text);
344
- for (const d of n.text.matchAll(/(?<![-\w\u0080-\uFFFF])--[-\w\u0080-\uFFFF]+/gu)) {
345
- const u = e.cssVariables.get(d[0]);
346
- u !== void 0 && a(u, d.index, d[0].length);
338
+ function fe(s, n, e) {
339
+ const t = P.extname(s.fileName).slice(1).toLowerCase(), i = "getLineAndCharacterOfPosition" in s ? (d) => s.getLineAndCharacterOfPosition(d) : ft(s.text), a = /* @__PURE__ */ new Map(), r = lt(s.fileName, i, (d) => {
340
+ a.set(`iconFont:${d.usage.start}`, d);
341
+ }), p = pt(s.fileName, i, (d) => {
342
+ a.set(`workers:${d.usage.name}:${d.usage.start}`, d);
343
+ }), l = /\bdefine\s*(?:\.\s*amd\b|\[\s*(?:"amd"|'amd')\s*\])/u.test(s.text);
344
+ for (const d of s.text.matchAll(/(?<![-\w\u0080-\uFFFF])--[-\w\u0080-\uFFFF]+/gu)) {
345
+ const u = n.cssVariables.get(d[0]);
346
+ u !== void 0 && c(u, d.index, d[0].length);
347
347
  }
348
- if (s === "html") {
348
+ if (t === "html") {
349
349
  const d = /* @__PURE__ */ new Map();
350
- if (ft({
351
- contents: n.text,
350
+ if (yt({
351
+ contents: s.text,
352
352
  scanElement: (u, x, w) => {
353
353
  g(
354
354
  u,
@@ -370,7 +370,7 @@ function fe(n, e, t) {
370
370
  "application/ecmascript"
371
371
  ].includes(f.split(";")[0]))
372
372
  return;
373
- const k = `${n.fileName}.script-${d.size}.js`;
373
+ const k = `${s.fileName}.script-${d.size}.js`;
374
374
  d.set(k, {
375
375
  source: o.createSourceFile(
376
376
  k,
@@ -397,13 +397,13 @@ export {};` : u,
397
397
  for (const { source: f, offset: k } of d.values())
398
398
  v({ node: f, jsxSourceFile: f, typeChecker: w, offset: k });
399
399
  }
400
- } else s === "css" || s === "scss" || s === "sass" ? (he(n.text, 0, y, s !== "css"), r.scanCss(n.text, 0, s !== "css")) : "kind" in n && v({ node: n, jsxSourceFile: n, typeChecker: t });
401
- return [...c.values()].sort((d, u) => d.usage.start - u.usage.start);
402
- function a(d, u, x) {
400
+ } else t === "css" || t === "scss" || t === "sass" ? (he(s.text, 0, y, t !== "css"), r.scanCss(s.text, 0, t !== "css")) : "kind" in s && v({ node: s, jsxSourceFile: s, typeChecker: e });
401
+ return [...a.values()].sort((d, u) => d.usage.start - u.usage.start);
402
+ function c(d, u, x) {
403
403
  const { line: w, character: f } = i(u);
404
- c.set(JSON.stringify([d.package, d.kind, d.memberOf, d.name, u]), {
404
+ a.set(JSON.stringify([d.package, d.kind, d.memberOf, d.name, u]), {
405
405
  packageName: d.package,
406
- sourceFileName: n.fileName,
406
+ sourceFileName: s.fileName,
407
407
  usage: {
408
408
  name: d.name,
409
409
  kind: d.kind,
@@ -419,21 +419,21 @@ export {};` : u,
419
419
  });
420
420
  }
421
421
  function m(d, u, x) {
422
- const w = e.components.get(d);
422
+ const w = n.components.get(d);
423
423
  if (w?.length === 1)
424
- return w[0].definitions.find((f) => pt({ entry: f, tag: d, kind: u, name: x }));
424
+ return w[0].definitions.find((f) => ut({ entry: f, tag: d, kind: u, name: x }));
425
425
  }
426
426
  function g(d, u, x) {
427
427
  const w = m(d, "element", d);
428
- w !== void 0 && a(w, u, d.length);
428
+ w !== void 0 && c(w, u, d.length);
429
429
  for (const f of x) {
430
430
  const k = m(d, "attribute", f.name);
431
- k !== void 0 && a(k, f.start, f.name.length);
431
+ k !== void 0 && c(k, f.start, f.name.length);
432
432
  }
433
433
  }
434
434
  function y(d, u, x, w) {
435
435
  const f = m(d, u, x);
436
- f !== void 0 && a(f, w, x.length);
436
+ f !== void 0 && c(f, w, x.length);
437
437
  }
438
438
  function v({
439
439
  node: d,
@@ -442,12 +442,12 @@ export {};` : u,
442
442
  offset: w = 0
443
443
  }) {
444
444
  r.scanNode(d, u, w), p.scanNode(d, u, x, w);
445
- const f = dt({ node: d, checker: x });
445
+ const f = gt({ node: d, checker: x });
446
446
  if (f !== void 0 && (f.text !== "define" || !l)) {
447
447
  const k = w + f.getStart(u), { line: N, character: A } = i(k);
448
- c.set(`amd:${k}`, {
448
+ a.set(`amd:${k}`, {
449
449
  packageName: "@arcgis/core",
450
- sourceFileName: n.fileName,
450
+ sourceFileName: s.fileName,
451
451
  usage: {
452
452
  name: f.text,
453
453
  kind: "function",
@@ -470,108 +470,108 @@ export {};` : u,
470
470
  name: A.name.getText(u),
471
471
  start: A.name.getStart(u)
472
472
  }))
473
- ), ze(d, u, e, a), /^[a-z][\w-]*$/u.test(k)) {
473
+ ), qe(d, u, n, c), /^[a-z][\w-]*$/u.test(k)) {
474
474
  const A = N.find(($) => $.name.getText(u) === "slot"), h = A?.initializer, S = h !== void 0 && o.isJsxExpression(h) ? h.expression : h, b = A === void 0 ? -1 : d.attributes.properties.indexOf(A), L = d.attributes.properties.slice(b + 1).some(o.isJsxSpreadAttribute);
475
475
  if (S !== void 0 && (o.isStringLiteral(S) || o.isNoSubstitutionTemplateLiteral(S)) && !L) {
476
- const $ = ut(o.isJsxOpeningElement(d) ? d.parent : d, x), T = $ === void 0 ? void 0 : m($, "slot", S.text);
477
- T !== void 0 && a(T, S.getStart(u) + 1, S.getWidth(u) - 2);
476
+ const $ = ht(o.isJsxOpeningElement(d) ? d.parent : d, x), T = $ === void 0 ? void 0 : m($, "slot", S.text);
477
+ T !== void 0 && c(T, S.getStart(u) + 1, S.getWidth(u) - 2);
478
478
  }
479
479
  }
480
480
  }
481
481
  o.forEachChild(d, (k) => v({ node: k, jsxSourceFile: u, typeChecker: x, offset: w }));
482
482
  }
483
483
  }
484
- function pt({
485
- entry: n,
486
- tag: e,
487
- kind: t,
488
- name: s
484
+ function ut({
485
+ entry: s,
486
+ tag: n,
487
+ kind: e,
488
+ name: t
489
489
  }) {
490
- const i = n.attribute;
491
- if (t === "attribute" && i !== void 0) {
492
- const c = i.tagName === e, r = i.name === s;
493
- return c && r;
490
+ const i = s.attribute;
491
+ if (e === "attribute" && i !== void 0) {
492
+ const a = i.tagName === n, r = i.name === t;
493
+ return a && r;
494
494
  }
495
- return n.kind !== t || n.name !== s ? !1 : t === "element" ? !0 : n.memberOf === e;
495
+ return s.kind !== e || s.name !== t ? !1 : e === "element" ? !0 : s.memberOf === n;
496
496
  }
497
- function dt({
498
- node: n,
499
- checker: e
497
+ function gt({
498
+ node: s,
499
+ checker: n
500
500
  }) {
501
- if (e === void 0 || !o.isCallExpression(n))
501
+ if (n === void 0 || !o.isCallExpression(s))
502
502
  return;
503
- const t = n.expression;
504
- let s, i;
505
- if (o.isIdentifier(t))
506
- s = t, i = t;
507
- else if (o.isPropertyAccessExpression(t) && o.isIdentifier(t.name) && o.isIdentifier(t.expression) && ["window", "opener", "globalThis"].includes(t.expression.text))
508
- s = t.name, i = t.expression;
503
+ const e = s.expression;
504
+ let t, i;
505
+ if (o.isIdentifier(e))
506
+ t = e, i = e;
507
+ else if (o.isPropertyAccessExpression(e) && o.isIdentifier(e.name) && o.isIdentifier(e.expression) && ["window", "opener", "globalThis"].includes(e.expression.text))
508
+ t = e.name, i = e.expression;
509
509
  else
510
510
  return;
511
- if (s.text !== "define" && s.text !== "require")
511
+ if (t.text !== "define" && t.text !== "require")
512
512
  return;
513
- if (s.text === "require") {
514
- const r = n.arguments[0];
515
- if (!(r !== void 0 && o.isArrayLiteralExpression(r)) && n.getSourceFile().fileName.toLowerCase().endsWith(".cjs") || r !== void 0 && o.isStringLiteralLike(r) && !r.text.startsWith("esri/"))
513
+ if (t.text === "require") {
514
+ const r = s.arguments[0];
515
+ if (!(r !== void 0 && o.isArrayLiteralExpression(r)) && s.getSourceFile().fileName.toLowerCase().endsWith(".cjs") || r !== void 0 && o.isStringLiteralLike(r) && !r.text.startsWith("esri/"))
516
516
  return;
517
517
  }
518
- return (e.getSymbolAtLocation(i)?.declarations ?? []).every(
519
- (r) => o.isPropertyAccessExpression(t) && r.getSourceFile().isDeclarationFile
520
- ) ? s : void 0;
518
+ return (n.getSymbolAtLocation(i)?.declarations ?? []).every(
519
+ (r) => o.isPropertyAccessExpression(e) && r.getSourceFile().isDeclarationFile
520
+ ) ? t : void 0;
521
521
  }
522
- function mt(n) {
523
- const e = [
522
+ function ft(s) {
523
+ const n = [
524
524
  0,
525
- ...Array.from(n.matchAll(/\r\n|[\r\n\u2028\u2029]/gu), (t) => t.index + t[0].length)
525
+ ...Array.from(s.matchAll(/\r\n|[\r\n\u2028\u2029]/gu), (e) => e.index + e[0].length)
526
526
  ];
527
- return (t) => {
528
- let s = 0, i = e.length;
529
- for (; s + 1 < i; ) {
530
- const c = Math.floor((s + i) / 2);
531
- e[c] <= t ? s = c : i = c;
527
+ return (e) => {
528
+ let t = 0, i = n.length;
529
+ for (; t + 1 < i; ) {
530
+ const a = Math.floor((t + i) / 2);
531
+ n[a] <= e ? t = a : i = a;
532
532
  }
533
- return { line: s, character: t - e[s] };
533
+ return { line: t, character: e - n[t] };
534
534
  };
535
535
  }
536
- function ut(n, e) {
537
- let t = n;
538
- for (let s = t.parent; s !== void 0; t = s, s = s.parent) {
539
- if (o.isJsxElement(s))
540
- return s.openingElement.tagName.getText();
541
- if (!(o.isJsxFragment(s) || o.isJsxExpression(s) || o.isParenthesizedExpression(s)) && !(o.isConditionalExpression(s) && t !== s.condition) && !(o.isBinaryExpression(s) && (s.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken && t === s.right || s.operatorToken.kind === o.SyntaxKind.BarBarToken || s.operatorToken.kind === o.SyntaxKind.QuestionQuestionToken))) {
542
- if (o.isReturnStatement(s)) {
543
- const i = o.findAncestor(s, o.isFunctionLike);
536
+ function ht(s, n) {
537
+ let e = s;
538
+ for (let t = e.parent; t !== void 0; e = t, t = t.parent) {
539
+ if (o.isJsxElement(t))
540
+ return t.openingElement.tagName.getText();
541
+ if (!(o.isJsxFragment(t) || o.isJsxExpression(t) || o.isParenthesizedExpression(t)) && !(o.isConditionalExpression(t) && e !== t.condition) && !(o.isBinaryExpression(t) && (t.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken && e === t.right || t.operatorToken.kind === o.SyntaxKind.BarBarToken || t.operatorToken.kind === o.SyntaxKind.QuestionQuestionToken))) {
542
+ if (o.isReturnStatement(t)) {
543
+ const i = o.findAncestor(t, o.isFunctionLike);
544
544
  if (i === void 0 || !o.isArrowFunction(i) && !o.isFunctionExpression(i))
545
545
  return;
546
- t = i.body, s = i;
546
+ e = i.body, t = i;
547
547
  }
548
- if ((o.isArrowFunction(s) || o.isFunctionExpression(s)) && t === s.body) {
549
- const i = s.parent;
550
- if (!o.isCallExpression(i) || i.arguments[0] !== s || !o.isPropertyAccessExpression(i.expression) || i.expression.name.text !== "map")
548
+ if ((o.isArrowFunction(t) || o.isFunctionExpression(t)) && e === t.body) {
549
+ const i = t.parent;
550
+ if (!o.isCallExpression(i) || i.arguments[0] !== t || !o.isPropertyAccessExpression(i.expression) || i.expression.name.text !== "map")
551
551
  return;
552
- const c = i.expression.expression, r = e?.getTypeAtLocation(c);
553
- if (!o.isArrayLiteralExpression(c) && (r === void 0 || !e.isArrayType(r) && !e.isTupleType(r)))
552
+ const a = i.expression.expression, r = n?.getTypeAtLocation(a);
553
+ if (!o.isArrayLiteralExpression(a) && (r === void 0 || !n.isArrayType(r) && !n.isTupleType(r)))
554
554
  return;
555
- t = s, s = i;
555
+ e = t, t = i;
556
556
  continue;
557
557
  }
558
558
  return;
559
559
  }
560
560
  }
561
561
  }
562
- function he(n, e, t, s = !1) {
563
- const i = s ? /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\/\/[^\r\n]*/gu : /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'/gu, c = n.replace(i, (a) => a.replace(/[^\r\n]/gu, " ")), r = [];
562
+ function he(s, n, e, t = !1) {
563
+ const i = t ? /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\/\/[^\r\n]*/gu : /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'/gu, a = s.replace(i, (c) => c.replace(/[^\r\n]/gu, " ")), r = [];
564
564
  let p = 0, l = 0;
565
- for (const a of c.matchAll(/[{};]/gu)) {
566
- const m = a.index;
565
+ for (const c of a.matchAll(/[{};]/gu)) {
566
+ const m = c.index;
567
567
  if (l > 0) {
568
- l += a[0] === "{" ? 1 : a[0] === "}" ? -1 : 0, p = m + 1;
568
+ l += c[0] === "{" ? 1 : c[0] === "}" ? -1 : 0, p = m + 1;
569
569
  continue;
570
570
  }
571
- if (a[0] === "}")
571
+ if (c[0] === "}")
572
572
  r.pop();
573
- else if (a[0] === "{") {
574
- const g = c.slice(p, m), y = r.at(-1) ?? [];
573
+ else if (c[0] === "{") {
574
+ const g = a.slice(p, m), y = r.at(-1) ?? [];
575
575
  if (/^\s*--[\w-]+\s*:/u.test(g))
576
576
  l = 1;
577
577
  else if (g.trimStart().startsWith("@"))
@@ -585,12 +585,12 @@ function he(n, e, t, s = !1) {
585
585
  for (const u of g.matchAll(/::part\(\s*([\w\s-]+?)\s*\)|:state\(\s*([\w-]+)\s*\)/gu)) {
586
586
  const x = g.lastIndexOf(",", u.index) + 1, w = g.slice(x, u.index), k = (y.length === 0 ? [w] : y.map(
587
587
  (S) => w.includes("&") ? w.replaceAll("&", S) : `${S} ${w}`
588
- )).map(gt);
588
+ )).map(vt);
589
589
  if (k.includes(void 0) || new Set(k).size !== 1)
590
590
  continue;
591
591
  const N = u[1] === void 0 ? "css-state" : "css-part", A = u[1] ?? u[2], h = u.index + u[0].indexOf(A);
592
592
  for (const S of A.matchAll(/[\w-]+/gu))
593
- t(k[0], N, S[0], e + p + h + S.index);
593
+ e(k[0], N, S[0], n + p + h + S.index);
594
594
  }
595
595
  r.push(d);
596
596
  }
@@ -598,44 +598,44 @@ function he(n, e, t, s = !1) {
598
598
  p = m + 1;
599
599
  }
600
600
  }
601
- function gt(n) {
602
- const e = n.replace(/:state\([\w-]+\)/gu, "").trimStart();
603
- return /(?:^|[\s>+~])([a-z][\w-]*)(?:[.#:][\w-]+|\[[^\]]*\])*$/iu.exec(e)?.[1]?.toLowerCase();
601
+ function vt(s) {
602
+ const n = s.replace(/:state\([\w-]+\)/gu, "").trimStart();
603
+ return /(?:^|[\s>+~])([a-z][\w-]*)(?:[.#:][\w-]+|\[[^\]]*\])*$/iu.exec(n)?.[1]?.toLowerCase();
604
604
  }
605
- function ft({
606
- contents: n,
607
- scanElement: e,
608
- scanStyle: t,
609
- scanScript: s
605
+ function yt({
606
+ contents: s,
607
+ scanElement: n,
608
+ scanStyle: e,
609
+ scanScript: t
610
610
  }) {
611
611
  const i = /<!--[\s\S]*?(?:-->|$)|<![^>]*>|<\/?([a-z][\w:-]*)\b((?:"[^"]*"|'[^']*'|[^'">])*)>/giu;
612
- for (let c = i.exec(n); c !== null; c = i.exec(n)) {
613
- if (c[1] === void 0 || c[0].startsWith("</"))
612
+ for (let a = i.exec(s); a !== null; a = i.exec(s)) {
613
+ if (a[1] === void 0 || a[0].startsWith("</"))
614
614
  continue;
615
- const r = c[1].toLowerCase(), p = c.index + 1 + c[1].length, l = [...c[2].matchAll(/([^\s"'<>/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/gu)].map(
616
- (a) => {
617
- const m = a[2] ?? a[3] ?? a[4], g = a[2] !== void 0 || a[3] !== void 0;
615
+ const r = a[1].toLowerCase(), p = a.index + 1 + a[1].length, l = [...a[2].matchAll(/([^\s"'<>/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/gu)].map(
616
+ (c) => {
617
+ const m = c[2] ?? c[3] ?? c[4], g = c[2] !== void 0 || c[3] !== void 0;
618
618
  return {
619
- name: a[1].toLowerCase(),
620
- start: p + a.index,
619
+ name: c[1].toLowerCase(),
620
+ start: p + c.index,
621
621
  value: m,
622
- valueStart: p + a.index + a[0].length - (m?.length ?? 0) - (g ? 1 : 0)
622
+ valueStart: p + c.index + c[0].length - (m?.length ?? 0) - (g ? 1 : 0)
623
623
  };
624
624
  }
625
625
  );
626
- if (e(r, c.index + 1, l), r === "plaintext")
626
+ if (n(r, a.index + 1, l), r === "plaintext")
627
627
  break;
628
628
  if (["script", "style", "textarea", "title", "xmp", "iframe", "noembed", "noframes"].includes(r)) {
629
- const a = new RegExp(`</${r}\\s*>`, "giu");
630
- a.lastIndex = i.lastIndex;
631
- const m = a.exec(n);
632
- r === "style" ? t(n.slice(i.lastIndex, m?.index ?? n.length), i.lastIndex) : r === "script" && s?.(n.slice(i.lastIndex, m?.index ?? n.length), i.lastIndex, l), i.lastIndex = m === null ? n.length : a.lastIndex;
629
+ const c = new RegExp(`</${r}\\s*>`, "giu");
630
+ c.lastIndex = i.lastIndex;
631
+ const m = c.exec(s);
632
+ r === "style" ? e(s.slice(i.lastIndex, m?.index ?? s.length), i.lastIndex) : r === "script" && t?.(s.slice(i.lastIndex, m?.index ?? s.length), i.lastIndex, l), i.lastIndex = m === null ? s.length : c.lastIndex;
633
633
  }
634
634
  }
635
635
  }
636
- const ht = /[:/@\\]|^\.{1,2}$|\.(?:tgz|tar(?:\.gz)?)$/iu;
637
- async function vt(n, e, t) {
638
- const s = JSON.parse('["@arcgis/ai-components","@arcgis/api-extractor","@arcgis/arcade-parser","@arcgis/arcade-languageservice","@arcgis/charts-components","@arcgis/codemod","@arcgis/coding-components","@arcgis/common-components","@arcgis/core","@arcgis/lumina-toolkit","@arcgis/create","@arcgis/eslint-config","@arcgis/languages-api-utils","@arcgis/languages-sdk-spec","@arcgis/lumina","@arcgis/lumina-compiler","@arcgis/map-components","@arcgis/node-toolkit","@arcgis/portal-components","@arcgis/toolkit"]'), i = new Set(s), c = /* @__PURE__ */ new Set([...s, "@esri/calcite-components"]), r = [...new Map(n.map((g) => [g.filePath, g])).values()], p = new Set(
636
+ const xt = /[:/@\\]|^\.{1,2}$|\.(?:tgz|tar(?:\.gz)?)$/iu;
637
+ async function wt(s, n, e) {
638
+ const t = JSON.parse('["@arcgis/ai-components","@arcgis/api-extractor","@arcgis/arcade-parser","@arcgis/arcade-languageservice","@arcgis/charts-components","@arcgis/codemod","@arcgis/coding-components","@arcgis/common-components","@arcgis/core","@arcgis/lumina-toolkit","@arcgis/create","@arcgis/eslint-config","@arcgis/languages-api-utils","@arcgis/languages-sdk-spec","@arcgis/lumina","@arcgis/lumina-compiler","@arcgis/map-components","@arcgis/node-toolkit","@arcgis/portal-components","@arcgis/toolkit"]'), i = new Set(t), a = /* @__PURE__ */ new Set([...t, "@esri/calcite-components"]), r = [...new Map(s.map((g) => [g.filePath, g])).values()], p = new Set(
639
639
  (await Promise.all(
640
640
  r.map(async ({ filePath: g, contents: y }) => {
641
641
  const v = [await j(g)], d = y.publishConfig?.directory;
@@ -646,7 +646,7 @@ async function vt(n, e, t) {
646
646
  return v;
647
647
  })
648
648
  )).flat()
649
- ), l = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), m = [];
649
+ ), l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), m = [];
650
650
  await ve(r, 4, async (g) => {
651
651
  let y;
652
652
  const v = [], d = {
@@ -657,60 +657,60 @@ async function vt(n, e, t) {
657
657
  };
658
658
  for (const [f, k] of Object.entries(d)) {
659
659
  const N = k.replace(/^npm:/u, "");
660
- if (!c.has(f) || !k.startsWith("catalog:") && ht.test(N))
660
+ if (!a.has(f) || !k.startsWith("catalog:") && xt.test(N))
661
661
  continue;
662
- const A = await G(
662
+ const A = await q(
663
663
  P.join("node_modules", f, "package.json"),
664
664
  P.dirname(g.filePath)
665
665
  );
666
666
  if (A === void 0) {
667
- (e === void 0 || f === e) && m.push(`${f} (${g.contents.name ?? g.filePath})`);
667
+ (n === void 0 || f === n) && m.push(`${f} (${g.contents.name ?? g.filePath})`);
668
668
  continue;
669
669
  }
670
670
  if (p.has(await j(A)))
671
671
  continue;
672
- const h = await He(P.dirname(A));
673
- !h.name || !h.version || !c.has(h.name) || v.push({ declared: k, location: A, name: h.name, version: h.version });
672
+ const h = await Xe(P.dirname(A));
673
+ !h.name || !h.version || !a.has(h.name) || v.push({ declared: k, location: A, name: h.name, version: h.version });
674
674
  }
675
675
  const u = Map.groupBy(
676
676
  v.filter(({ name: f }) => i.has(f)),
677
677
  ({ version: f }) => f
678
- ), x = O.maxSatisfying([...u.keys()], "*", {
678
+ ), x = F.maxSatisfying([...u.keys()], "*", {
679
679
  includePrerelease: !0
680
680
  }), w = [...u].sort(([f], [k]) => f.localeCompare(k)).map(
681
681
  ([f, k]) => `${f}: ${k.map(({ name: N }) => `\`${N}\``).sort().join(", ")}`
682
682
  ).join("; ");
683
683
  for (const { declared: f, location: k, name: N, version: A } of v) {
684
- if (e !== void 0 && N !== e)
684
+ if (n !== void 0 && N !== n)
685
685
  continue;
686
686
  let h = l.get(N);
687
- h === void 0 && (h = xt(N), l.set(N, h));
687
+ h === void 0 && (h = kt(N), l.set(N, h));
688
688
  const S = await h;
689
- S === void 0 && t?.();
690
- const b = S === void 0 ? void 0 : St(A, S), L = [];
689
+ S === void 0 && e?.();
690
+ const b = S === void 0 ? void 0 : bt(A, S), L = [];
691
691
  b !== void 0 && L.push({
692
692
  category: "outdatedDependencies",
693
693
  targetVersion: b.expected,
694
694
  reason: `Update to ${b.expected} (declared ${f}). ${b.reason}`
695
- }), i.has(N) && x !== null && O.lt(A, x) && L.push({
695
+ }), i.has(N) && x !== null && F.lt(A, x) && L.push({
696
696
  category: "mismatchedDependencies",
697
697
  targetVersion: x,
698
698
  reason: `Web GIS SDK packages within the same package.json must use the same exact version (found ${w}).`
699
699
  });
700
- for (const { category: $, targetVersion: T, reason: F } of L) {
700
+ for (const { category: $, targetVersion: T, reason: I } of L) {
701
701
  let C;
702
702
  if ($ === "outdatedDependencies" && f.startsWith("catalog:"))
703
703
  try {
704
- C = await yt(g.filePath, N, f);
704
+ C = await St(g.filePath, N, f);
705
705
  } catch (D) {
706
- t?.(), q(
706
+ e?.(), J(
707
707
  "warn",
708
708
  R(g.filePath),
709
709
  `Unable to locate dependency catalog: ${String(D)}`
710
710
  );
711
711
  }
712
- C === void 0 && (y ??= o.parseJsonText(g.filePath, await J(g.filePath, "utf8")));
713
- const E = a.get(N) ?? [];
712
+ C === void 0 && (y ??= o.parseJsonText(g.filePath, await U(g.filePath, "utf8")));
713
+ const E = c.get(N) ?? [];
714
714
  C !== void 0 && E.some(
715
715
  (D) => D.sourceFileName === C.sourceFileName && D.usage.start === C.location.start && D.usage.category === $
716
716
  ) || (E.push({
@@ -720,173 +720,185 @@ async function vt(n, e, t) {
720
720
  category: $,
721
721
  module: C === void 0 ? "package.json" : P.basename(C.sourceFileName),
722
722
  originFileNames: [k],
723
- reason: F,
724
- ...C?.location ?? wt(y, N, f)
723
+ reason: I,
724
+ ...C?.location ?? Nt(y, N, f)
725
725
  }
726
- }), a.set(N, E));
726
+ }), c.set(N, E));
727
727
  }
728
728
  }
729
729
  });
730
- for (const g of a.values())
730
+ for (const g of c.values())
731
731
  g.sort(
732
732
  (y, v) => y.sourceFileName.localeCompare(v.sourceFileName) || y.usage.start - v.usage.start
733
733
  );
734
- return m.length > 0 && (t?.(), m.sort(), q(
734
+ return m.length > 0 && (e?.(), m.sort(), J(
735
735
  "warn",
736
736
  "dependency-versions",
737
737
  `Failed to find installed locations for ${m.length} dependencies: ${m.slice(0, 15).join(", ")}${m.length > 15 ? `, and ${m.length - 15} more` : ""}.`
738
- )), a;
738
+ )), c;
739
739
  }
740
- async function yt(n, e, t) {
741
- const s = await G("pnpm-workspace.yaml", P.dirname(n)) ?? await G(".yarnrc.yml", P.dirname(n));
742
- if (s === void 0)
743
- throw new Error(`Missing pnpm-workspace.yaml or .yarnrc.yml for ${t}`);
744
- const i = await j(s), c = new Qe(), r = _e(await J(i, "utf8"), { lineCounter: c });
740
+ async function St(s, n, e) {
741
+ const t = await q("pnpm-workspace.yaml", P.dirname(s)) ?? await q(".yarnrc.yml", P.dirname(s));
742
+ if (t === void 0)
743
+ throw new Error(`Missing pnpm-workspace.yaml or .yarnrc.yml for ${e}`);
744
+ const i = await j(t), a = new Ye(), r = Ze(await U(i, "utf8"), { lineCounter: a });
745
745
  if (r.errors.length > 0)
746
746
  throw r.errors[0];
747
- const p = t.slice(8), l = r.getIn(
747
+ const p = e.slice(8), l = r.getIn(
748
748
  p === "" || p === "default" ? ["catalog"] : ["catalogs", p],
749
749
  !0
750
- ), a = Xe(l) ? l.items.find(({ key: d }) => le(d) && d.value === e)?.key : void 0;
751
- if (!le(a) || a.range === void 0)
752
- throw new Error(`Missing ${e} in ${t} in ${i}`);
753
- const [m, g] = a.range, { line: y, col: v } = c.linePos(m);
750
+ ), c = et(l) ? l.items.find(({ key: d }) => le(d) && d.value === n)?.key : void 0;
751
+ if (!le(c) || c.range === void 0)
752
+ throw new Error(`Missing ${n} in ${e} in ${i}`);
753
+ const [m, g] = c.range, { line: y, col: v } = a.linePos(m);
754
754
  return { sourceFileName: i, location: { start: m, length: g - m, line: y, column: v } };
755
755
  }
756
- async function xt(n) {
756
+ async function kt(s) {
757
757
  try {
758
- const e = await fetch(`https://registry.npmjs.org/-/package/${encodeURIComponent(n)}/dist-tags`, {
758
+ const n = await fetch(`https://registry.npmjs.org/-/package/${encodeURIComponent(s)}/dist-tags`, {
759
759
  signal: AbortSignal.timeout(5e3),
760
760
  redirect: "error"
761
761
  });
762
- if (!e.ok)
763
- throw new Error(`Registry returned HTTP ${e.status}`);
764
- const t = await e.json();
765
- if (typeof t != "object" || t === null || Array.isArray(t))
762
+ if (!n.ok)
763
+ throw new Error(`Registry returned HTTP ${n.status}`);
764
+ const e = await n.json();
765
+ if (typeof e != "object" || e === null || Array.isArray(e))
766
766
  throw new Error("Invalid registry dist-tags response");
767
- const s = {};
768
- for (const [i, c] of Object.entries(t))
769
- ["latest", "rc", "next"].includes(i) && typeof c == "string" && O.valid(c) !== null && (s[i] = c);
770
- if (Object.keys(s).length === 0)
767
+ const t = {};
768
+ for (const [i, a] of Object.entries(e))
769
+ ["latest", "rc", "next"].includes(i) && typeof a == "string" && F.valid(a) !== null && (t[i] = a);
770
+ if (Object.keys(t).length === 0)
771
771
  throw new Error("Registry returned no supported release tags");
772
- return s;
773
- } catch (e) {
774
- q("warn", n, `Dependency freshness unavailable: ${String(e)}`);
772
+ return t;
773
+ } catch (n) {
774
+ J("warn", s, `Dependency freshness unavailable: ${String(n)}`);
775
775
  return;
776
776
  }
777
777
  }
778
- function wt(n, e, t) {
779
- const s = o.forEachChild(n, p), i = s.getStart(n), { line: c, character: r } = n.getLineAndCharacterOfPosition(i);
780
- return { start: i, length: s.getWidth(n), line: c + 1, column: r + 1 };
778
+ function Nt(s, n, e) {
779
+ const t = o.forEachChild(s, p), i = t.getStart(s), { line: a, character: r } = s.getLineAndCharacterOfPosition(i);
780
+ return { start: i, length: t.getWidth(s), line: a + 1, column: r + 1 };
781
781
  function p(l) {
782
782
  return o.isPropertyAssignment(l) && o.isStringLiteral(l.name) && ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"].includes(l.name.text) && o.isObjectLiteralExpression(l.initializer) ? l.initializer.properties.find(
783
- (a) => o.isPropertyAssignment(a) && o.isStringLiteral(a.name) && a.name.text === e && o.isStringLiteral(a.initializer) && a.initializer.text === t
783
+ (c) => o.isPropertyAssignment(c) && o.isStringLiteral(c.name) && c.name.text === n && o.isStringLiteral(c.initializer) && c.initializer.text === e
784
784
  )?.name : o.forEachChild(l, p);
785
785
  }
786
786
  }
787
- function St(n, e) {
788
- const t = O.parse(n), s = O.parse(e.latest ?? "");
789
- if (t === null)
787
+ function bt(s, n) {
788
+ const e = F.parse(s), t = F.parse(n.latest ?? "");
789
+ if (e === null)
790
790
  return;
791
791
  if (
792
792
  // Permit packages without latest dist-tag
793
- s !== null && // Permit installed to be newer than latest
794
- O.lt(t, s) && // Require using stable over prerelease
795
- (t.prerelease.length > 0 || // Forbid major being behind stable
796
- t.major !== s.major || // Forbid minor being behind stable
797
- t.minor !== s.minor)
793
+ t !== null && // Permit installed to be newer than latest
794
+ F.lt(e, t) && // Require using stable over prerelease
795
+ (e.prerelease.length > 0 || // Forbid major being behind stable
796
+ e.major !== t.major || // Forbid minor being behind stable
797
+ e.minor !== t.minor)
798
798
  )
799
799
  return {
800
- expected: s.version,
800
+ expected: t.version,
801
801
  reason: "A newer stable release is available. Prerelease versions are deprecated."
802
802
  };
803
803
  if (
804
804
  // Enforce policy only for next.N prereleases
805
- t.prerelease.length !== 2 || // Only enforce policy for -next
806
- t.prerelease[0] !== "next"
805
+ e.prerelease.length !== 2 || // Only enforce policy for -next
806
+ e.prerelease[0] !== "next"
807
807
  )
808
808
  return;
809
- const i = t.prerelease[1];
809
+ const i = e.prerelease[1];
810
810
  if (typeof i != "number")
811
811
  return;
812
- const r = [e.next, e.rc].flatMap((p) => {
813
- const l = O.parse(p ?? "");
812
+ const r = [n.next, n.rc].flatMap((p) => {
813
+ const l = F.parse(p ?? "");
814
814
  return l !== null && // Support packages without latest dist-tag
815
- (s === null || // Ignore rc dist-tag if it is behind latest
816
- O.gt(l, s)) && // Require same major.minor.patch for -next version comparison
817
- l.major === t.major && l.minor === t.minor && l.patch === t.patch && // Require next.N format for comparison
815
+ (t === null || // Ignore rc dist-tag if it is behind latest
816
+ F.gt(l, t)) && // Require same major.minor.patch for -next version comparison
817
+ l.major === e.major && l.minor === e.minor && l.patch === e.patch && // Require next.N format for comparison
818
818
  l.prerelease.length === 2 && l.prerelease[0] === "next" && typeof l.prerelease[1] == "number" ? [l] : [];
819
- }).sort(O.rcompare).at(0);
819
+ }).sort(F.rcompare).at(0);
820
820
  if (r !== void 0 && Number(r.prerelease[1]) - i >= 30)
821
821
  return {
822
822
  expected: r.version,
823
823
  reason: "Installed -next is significantly behind the most recent -next build."
824
824
  };
825
825
  }
826
- const kt = /* @__PURE__ */ new Set(["none", "amd", "umd", "system", "systemjs", "node", "node10", "legacy"]), Nt = /* @__PURE__ */ new Set(["node", "node10", "classic"]);
827
- async function bt(n) {
828
- const e = "es2024", t = [];
829
- for (const s of [...new Set(n)].sort()) {
830
- const i = o.parseJsonText(s, await J(s, "utf8"));
831
- t.push(...At(i, e));
826
+ const At = /* @__PURE__ */ new Set(["none", "amd", "umd", "system", "systemjs", "node", "node10", "legacy"]), Pt = /* @__PURE__ */ new Set(["node", "node10", "classic"]);
827
+ async function Ct(s) {
828
+ const n = "es2024", e = [];
829
+ for (const t of [...new Set(s)].sort()) {
830
+ const i = o.parseJsonText(t, await U(t, "utf8"));
831
+ e.push(...$t(i, n));
832
832
  }
833
- return t;
833
+ return e;
834
834
  }
835
- function At(n, e) {
836
- const t = n.statements[0];
837
- if (t === void 0 || !o.isExpressionStatement(t) || !o.isObjectLiteralExpression(t.expression))
835
+ function $t(s, n) {
836
+ const e = s.statements[0];
837
+ if (e === void 0 || !o.isExpressionStatement(e) || !o.isObjectLiteralExpression(e.expression))
838
838
  return [];
839
- const s = t.expression.properties.find(
839
+ const t = e.expression.properties.find(
840
840
  (r) => o.isPropertyAssignment(r) && o.isStringLiteral(r.name) && r.name.text === "compilerOptions"
841
841
  );
842
- if (s === void 0 || !o.isObjectLiteralExpression(s.initializer))
842
+ if (t === void 0 || !o.isObjectLiteralExpression(t.initializer))
843
843
  return [];
844
- const i = o.convertCompilerOptionsFromJson({ target: e }, ".").options.target, c = [];
845
- for (const r of s.initializer.properties) {
844
+ const i = o.convertCompilerOptionsFromJson({ target: n }, ".").options.target, a = [];
845
+ for (const r of t.initializer.properties) {
846
846
  if (!o.isPropertyAssignment(r) || !o.isStringLiteral(r.name))
847
847
  continue;
848
848
  const p = r.name.text, l = o.isStringLiteral(r.initializer) ? r.initializer.text.toLowerCase() : void 0;
849
- let a;
850
- if (p === "module" && l !== void 0 && kt.has(l))
851
- a = `The ${l} module setting is legacy or unsupported. Update to newer module setting. See https://webgis.esri.com/references/support-packages/typescript.`;
852
- else if (p === "moduleResolution" && l !== void 0 && Nt.has(l))
853
- a = `The ${l} module resolution setting is deprecated or unsupported. Update to newer module setting. See https://webgis.esri.com/references/support-packages/typescript.`;
849
+ let c;
850
+ if (p === "module" && l !== void 0 && At.has(l))
851
+ c = `The ${l} module setting is legacy or unsupported. Update to newer module setting. See https://webgis.esri.com/references/support-packages/typescript.`;
852
+ else if (p === "moduleResolution" && l !== void 0 && Pt.has(l))
853
+ c = `The ${l} module resolution setting is deprecated or unsupported. Update to newer module setting. See https://webgis.esri.com/references/support-packages/typescript.`;
854
854
  else if (p === "target" && l !== void 0) {
855
855
  const v = o.convertCompilerOptionsFromJson({ target: l }, ".").options.target;
856
- v !== void 0 && v < i && (a = `Targets below ${e} are older than Maps SDK's for JavaScript supported targets. See https://next.gha.afd.arcgis.com/javascript/latest/system-requirements/.`);
857
- } else p === "ignoreDeprecations" && (a = "Address deprecations that were suppressed by ignoreDeprecations.");
858
- if (a === void 0)
856
+ v !== void 0 && v < i && (c = `Targets below ${n} are older than Maps SDK's for JavaScript supported targets. See https://next.gha.afd.arcgis.com/javascript/latest/system-requirements/.`);
857
+ } else p === "ignoreDeprecations" && (c = "Address deprecations that were suppressed by ignoreDeprecations.");
858
+ if (c === void 0)
859
859
  continue;
860
- const m = r.name.getStart(n), { line: g, character: y } = n.getLineAndCharacterOfPosition(m);
861
- c.push({
862
- sourceFileName: n.fileName,
860
+ const m = r.name.getStart(s), { line: g, character: y } = s.getLineAndCharacterOfPosition(m);
861
+ a.push({
862
+ sourceFileName: s.fileName,
863
863
  usage: {
864
864
  name: `compilerOptions.${p}${l === void 0 ? "" : `: ${l}`}`,
865
865
  category: "outdatedTypeScriptConfig",
866
866
  module: "tsconfig.json",
867
867
  originFileNames: [],
868
- reason: a,
868
+ reason: c,
869
869
  start: m,
870
- length: r.name.getWidth(n),
870
+ length: r.name.getWidth(s),
871
871
  line: g + 1,
872
872
  column: y + 1
873
873
  }
874
874
  });
875
875
  }
876
- return c;
876
+ return a;
877
877
  }
878
- async function tn(n, e) {
879
- if (e.reportingUrl && (n || e.esriOnly || e.category || e.packageName))
878
+ async function rn(s, n) {
879
+ if (n.json && n.md) {
880
+ J("error", "@arcgis/codemod", "The --json and --md options cannot be used together."), process.exitCode = 1;
881
+ return;
882
+ }
883
+ const e = await Ee(s), t = {
884
+ esriOnly: n.esriOnly,
885
+ outputFormat: n.md ? "md" : n.json ? "json" : "text",
886
+ category: n.category,
887
+ packageName: n.package,
888
+ exclude: n.exclude,
889
+ reportingUrl: n.report === !0 ? Le : n.report || void 0
890
+ };
891
+ if (t.reportingUrl && (e || t.esriOnly || t.category || t.packageName))
880
892
  throw new Error(
881
893
  "Reporting requires complete, unfiltered repository scan. The only supported filter is the --exclude flag."
882
894
  );
883
- const t = e.outputFormat === "json" || e.reportingUrl ? process.cwd() === M().repositoryRoot : !1;
884
- if (e.reportingUrl && !t)
895
+ const i = t.outputFormat === "json" || t.reportingUrl ? process.cwd() === M().repositoryRoot : !1;
896
+ if (t.reportingUrl && !i)
885
897
  throw new Error(
886
898
  "Reporting requires scanning from the Git repository root. If some folders must be excluded, use the --exclude flag."
887
899
  );
888
- let s = !n && !e.esriOnly && !e.category && !e.packageName && !e.exclude?.length;
889
- (e.outputFormat === "json" || e.reportingUrl) && (s &&= t), await Ee(
900
+ let a = !e && !t.esriOnly && !t.category && !t.packageName && !t.exclude?.length;
901
+ (t.outputFormat === "json" || t.reportingUrl) && (a &&= i), await Te(
890
902
  {
891
903
  meta: {
892
904
  needsTypeInformation: !0,
@@ -894,63 +906,63 @@ async function tn(n, e) {
894
906
  includeComponentFiles: !0,
895
907
  includeTsConfigFiles: !0
896
908
  },
897
- async run(i) {
898
- await Pt(i, e, s, n);
909
+ async run(r) {
910
+ Oe(await Dt(r, t, a, e));
899
911
  }
900
912
  },
901
913
  "deprecations audit-usages",
902
- n
914
+ e
903
915
  );
904
916
  }
905
- async function Pt(n, e, t, s) {
906
- const i = /* @__PURE__ */ new Map(), c = we(e.exclude ?? []), r = qe("warn", () => {
907
- t = !1;
908
- }), p = /* @__PURE__ */ new Map(), l = ce([]), a = /* @__PURE__ */ new Set(), m = [
917
+ async function Dt(s, n, e, t) {
918
+ const i = /* @__PURE__ */ new Map(), a = we(n.exclude ?? []), r = _e("warn", () => {
919
+ e = !1;
920
+ }), p = /* @__PURE__ */ new Map(), l = ce([]), c = /* @__PURE__ */ new Set(), m = [
909
921
  ...new Map(
910
- n.flatMap(({ packageJson: h }) => {
922
+ s.flatMap(({ packageJson: h }) => {
911
923
  const S = h === void 0 ? void 0 : P.dirname(h.filePath), b = h?.contents.name;
912
- return S !== void 0 && b !== void 0 && W(S, process.cwd()) ? [[S, { root: S, name: b }]] : [];
924
+ return S !== void 0 && b !== void 0 && O(S, process.cwd()) ? [[S, { root: S, name: b }]] : [];
913
925
  })
914
926
  ).values()
915
927
  ].toSorted((h, S) => S.root.length - h.root.length);
916
- for (const h of n) {
928
+ for (const h of s) {
917
929
  var f = [];
918
930
  try {
919
- const S = h.filePaths.filter((E) => c(E) && !oe(E));
931
+ const S = h.filePaths.filter((E) => a(E) && !oe(E));
920
932
  if (S.length === 0)
921
933
  continue;
922
- const b = Ve(h.packageJson);
934
+ const b = Be(h.packageJson);
923
935
  const L = await x(h.packageJson, b.packages);
924
936
  const $ = h.packageJson === void 0 ? void 0 : P.dirname(h.packageJson.filePath);
925
- const T = ie(f, S.some(Le) ? De(h, !1, {
937
+ const T = ie(f, S.some(Fe) ? De(h, !1, {
926
938
  paths: { ...h.typeScriptConfig?.compilerOptions.paths, ...b.paths }
927
939
  }) : void 0);
928
- const F = T?.tsMorph.getLanguageService().compilerObject;
929
- const C = F?.getProgram()?.getTypeChecker();
940
+ const I = T?.tsMorph.getLanguageService().compilerObject;
941
+ const C = I?.getProgram()?.getTypeChecker();
930
942
  for (const E of T?.getCodemodFiles() ?? []) {
931
943
  const D = E.compilerNode;
932
- if (!(!c(D.fileName) || oe(D.fileName))) {
933
- if (F !== void 0 && C !== void 0) {
934
- const $e = $t(
944
+ if (!(!a(D.fileName) || oe(D.fileName))) {
945
+ if (I !== void 0 && C !== void 0) {
946
+ const $e = Lt(
935
947
  D,
936
- F,
948
+ I,
937
949
  C,
938
950
  $,
939
- e.esriOnly
951
+ n.esriOnly
940
952
  );
941
953
  for (const Z of $e) {
942
- const ee = Wt(Z.originFileNames, m, $), te = i.get(ee) ?? [];
954
+ const ee = Rt(Z.originFileNames, m, $), te = i.get(ee) ?? [];
943
955
  te.push({ sourceFileName: D.fileName, usage: Z }), i.set(ee, te);
944
956
  }
945
957
  }
946
- w(fe(D, L, C)), a.add(D.fileName);
958
+ w(fe(D, L, C)), c.add(D.fileName);
947
959
  }
948
960
  }
949
961
  await ve(S, 8, async (E) => {
950
- if (a.has(E))
962
+ if (c.has(E))
951
963
  return;
952
- const D = await J(E, "utf8");
953
- w(fe({ fileName: E, text: D }, L)), a.add(E);
964
+ const D = await U(E, "utf8");
965
+ w(fe({ fileName: E, text: D }, L)), c.add(E);
954
966
  });
955
967
  } catch (k) {
956
968
  var N = k, A = !0;
@@ -958,277 +970,277 @@ async function Pt(n, e, t, s) {
958
970
  re(f, N, A);
959
971
  }
960
972
  }
961
- const g = await vt(
962
- n.flatMap(({ packageJson: h }) => h === void 0 ? [] : [h]),
963
- e.packageName,
973
+ const g = await wt(
974
+ s.flatMap(({ packageJson: h }) => h === void 0 ? [] : [h]),
975
+ n.packageName,
964
976
  () => {
965
- t = !1;
977
+ e = !1;
966
978
  }
967
979
  );
968
980
  for (const [h, S] of g)
969
981
  i.set(h, [...i.get(h) ?? [], ...S]);
970
- if (!e.esriOnly && (e.packageName === void 0 || e.packageName === "typescript") && (e.category === void 0 || e.category === "outdatedTypeScriptConfig")) {
971
- const h = n.flatMap(
972
- ({ typeScriptConfig: b }) => b !== void 0 && W(b.filePath, process.cwd()) && c(b.filePath) && (s === void 0 || s === b.filePath) ? [b.filePath] : []
973
- ), S = await bt(h);
982
+ if (!n.esriOnly && (n.packageName === void 0 || n.packageName === "typescript") && (n.category === void 0 || n.category === "outdatedTypeScriptConfig")) {
983
+ const h = s.flatMap(
984
+ ({ typeScriptConfig: b }) => b !== void 0 && O(b.filePath, process.cwd()) && a(b.filePath) && (t === void 0 || t === b.filePath) ? [b.filePath] : []
985
+ ), S = await Ct(h);
974
986
  S.length > 0 && i.set("typescript", [...i.get("typescript") ?? [], ...S]);
975
987
  }
976
- const y = e.reportingUrl || e.outputFormat === "json" ? M() : void 0, v = Ct(i, e), d = y !== void 0 && (e.reportingUrl || e.outputFormat === "json") ? H(v, Se(), y, t, e.exclude) : void 0;
977
- Ye(v, e.outputFormat, d);
988
+ const y = n.reportingUrl || n.outputFormat === "json" ? M() : void 0, v = Et(i, n), d = y !== void 0 && (n.reportingUrl || n.outputFormat === "json") ? H(v, Se(), y, e, n.exclude) : void 0;
989
+ tt(v, n.outputFormat, d);
978
990
  const u = [...v.values()].flat();
979
- Je(
991
+ return Ve(
980
992
  "usages",
981
993
  u.length,
982
994
  new Set(u.map(({ sourceFileName: h }) => h)).size,
983
995
  v.size
984
- ), e.reportingUrl && d !== void 0 && await Te(d, e.reportingUrl);
996
+ ), n.reportingUrl && d !== void 0 && await Ie(d, n.reportingUrl), e;
985
997
  async function x(h, S) {
986
998
  if (h === void 0)
987
999
  return l;
988
1000
  let b = p.get(h.filePath);
989
1001
  return b === void 0 && (b = ce(
990
- await Ge(h, r, e.esriOnly, S)
1002
+ await Ke(h, r, n.esriOnly, S)
991
1003
  ), p.set(h.filePath, b)), b;
992
1004
  }
993
1005
  function w(h) {
994
1006
  for (const { packageName: S, sourceFileName: b, usage: L } of h) {
995
1007
  const $ = i.get(S) ?? [], T = $.findIndex(
996
1008
  (C) => C.sourceFileName === b && C.usage.start === L.start && C.usage.length === L.length
997
- ), F = { sourceFileName: b, usage: L };
998
- T === -1 ? $.push(F) : $[T] = F, i.set(S, $);
1009
+ ), I = { sourceFileName: b, usage: L };
1010
+ T === -1 ? $.push(I) : $[T] = I, i.set(S, $);
999
1011
  }
1000
1012
  }
1001
1013
  }
1002
- function Ct(n, e, t) {
1003
- const s = we(e.exclude ?? [], t), i = /* @__PURE__ */ new Map();
1004
- for (const [c, r] of n) {
1005
- if (e.packageName !== void 0 && c !== e.packageName)
1014
+ function Et(s, n, e) {
1015
+ const t = we(n.exclude ?? [], e), i = /* @__PURE__ */ new Map();
1016
+ for (const [a, r] of s) {
1017
+ if (n.packageName !== void 0 && a !== n.packageName)
1006
1018
  continue;
1007
1019
  const p = r.filter(
1008
- ({ usage: l, sourceFileName: a }) => s(a) && (e.category === void 0 || xe({
1009
- package: c,
1020
+ ({ usage: l, sourceFileName: c }) => t(c) && (n.category === void 0 || xe({
1021
+ package: a,
1010
1022
  name: l.name,
1011
1023
  category: l.category,
1012
1024
  memberOf: l.memberOf,
1013
- module: l.module ?? B(l.originFileNames, c),
1025
+ module: l.module ?? B(l.originFileNames, a),
1014
1026
  deprecated: l.reason ?? !0
1015
- }) === e.category)
1027
+ }) === n.category)
1016
1028
  );
1017
- p.length > 0 && i.set(c, p);
1029
+ p.length > 0 && i.set(a, p);
1018
1030
  }
1019
1031
  return i;
1020
1032
  }
1021
- function $t(n, e, t, s, i = !1) {
1022
- const c = /* @__PURE__ */ new Map();
1023
- for (const r of e.getSuggestionDiagnostics(n.fileName)) {
1033
+ function Lt(s, n, e, t, i = !1) {
1034
+ const a = /* @__PURE__ */ new Map();
1035
+ for (const r of n.getSuggestionDiagnostics(s.fileName)) {
1024
1036
  if (r.reportsDeprecated === void 0)
1025
1037
  continue;
1026
- const p = Ae(n, r.start, r.start + r.length);
1038
+ const p = Ae(s, r.start, r.start + r.length);
1027
1039
  if (
1028
1040
  // Don't report for imports, only for usages
1029
1041
  o.findAncestor(p, o.isImportDeclaration) !== void 0 || // Don't report closing JSX - only for opening
1030
1042
  o.findAncestor(p, o.isJsxClosingElement) !== void 0
1031
1043
  )
1032
1044
  continue;
1033
- const l = Tt(p, t), a = l.reason === void 0 ? [] : Q(l.symbol), m = a.length > 0 ? void 0 : e.getDefinitionAtPosition(n.fileName, r.start), g = a.length > 0 ? a : [...new Set(m?.map(({ fileName: y }) => y))];
1034
- X(g, i, s) && _(c, n, {
1045
+ const l = Wt(p, e), c = l.reason === void 0 ? [] : Q(l.symbol), m = c.length > 0 ? void 0 : n.getDefinitionAtPosition(s.fileName, r.start), g = c.length > 0 ? c : [...new Set(m?.map(({ fileName: y }) => y))];
1046
+ X(g, i, t) && _(a, s, {
1035
1047
  start: r.start,
1036
1048
  length: r.length,
1037
- ...Ot(p, l, t, e, m?.[0]),
1049
+ ...Ot(p, l, e, n, m?.[0]),
1038
1050
  originFileNames: g,
1039
- reason: It(e, n.fileName, r.start) ?? l.reason
1051
+ reason: jt(n, s.fileName, r.start) ?? l.reason
1040
1052
  });
1041
1053
  }
1042
- return Dt(n, t, c, s, i), [...c.values()].toSorted((r, p) => r.start - p.start);
1054
+ return Tt(s, e, a, t, i), [...a.values()].toSorted((r, p) => r.start - p.start);
1043
1055
  }
1044
- function Dt(n, e, t, s, i) {
1045
- function c(r) {
1046
- o.isNewExpression(r) && Et(r, e, t, s, i);
1056
+ function Tt(s, n, e, t, i) {
1057
+ function a(r) {
1058
+ o.isNewExpression(r) && Ft(r, n, e, t, i);
1047
1059
  let p, l;
1048
1060
  if (o.isCallExpression(r))
1049
- l = Lt(r, e), p = r.arguments[0];
1061
+ l = It(r, n), p = r.arguments[0];
1050
1062
  else if (o.isJsxAttribute(r) && o.isIdentifier(r.name)) {
1051
- const a = r.parent.parent;
1052
- (o.isJsxOpeningElement(a) || o.isJsxSelfClosingElement(a)) && (l = e.getContextualType(a.tagName)?.getProperty(r.name.text), p = r.name);
1063
+ const c = r.parent.parent;
1064
+ (o.isJsxOpeningElement(c) || o.isJsxSelfClosingElement(c)) && (l = n.getContextualType(c.tagName)?.getProperty(r.name.text), p = r.name);
1053
1065
  } else if ((o.isPropertyAssignment(r) || o.isShorthandPropertyAssignment(r) || o.isMethodDeclaration(r)) && o.isObjectLiteralExpression(r.parent)) {
1054
- const a = o.isComputedPropertyName(r.name) ? I(r.name.expression, e) : r.name.text, m = e.getContextualType(r.parent);
1055
- l = a === void 0 || m === void 0 ? void 0 : e.getNonNullableType(m).getProperty(a), p = r.name;
1066
+ const c = o.isComputedPropertyName(r.name) ? W(r.name.expression, n) : r.name.text, m = n.getContextualType(r.parent);
1067
+ l = c === void 0 || m === void 0 ? void 0 : n.getNonNullableType(m).getProperty(c), p = r.name;
1056
1068
  } else if (o.isPropertyAccessExpression(r))
1057
- l = e.getSymbolAtLocation(r.name), p = r.name;
1069
+ l = n.getSymbolAtLocation(r.name), p = r.name;
1058
1070
  else if (o.isElementAccessExpression(r)) {
1059
- const a = I(r.argumentExpression, e);
1060
- l = a === void 0 ? void 0 : e.getTypeAtLocation(r.expression).getProperty(a), p = r.argumentExpression;
1071
+ const c = W(r.argumentExpression, n);
1072
+ l = c === void 0 ? void 0 : n.getTypeAtLocation(r.expression).getProperty(c), p = r.argumentExpression;
1061
1073
  } else if (o.isBindingElement(r) && o.isObjectBindingPattern(r.parent) && r.dotDotDotToken === void 0) {
1062
- const a = r.propertyName ?? (o.isIdentifier(r.name) ? r.name : void 0), m = a === void 0 ? void 0 : o.isComputedPropertyName(a) ? I(a.expression, e) : a.text;
1063
- l = m === void 0 ? void 0 : e.getTypeAtLocation(r.parent).getProperty(m), p = a;
1074
+ const c = r.propertyName ?? (o.isIdentifier(r.name) ? r.name : void 0), m = c === void 0 ? void 0 : o.isComputedPropertyName(c) ? W(c.expression, n) : c.text;
1075
+ l = m === void 0 ? void 0 : n.getTypeAtLocation(r.parent).getProperty(m), p = c;
1064
1076
  }
1065
1077
  if ((o.isPropertyAccessExpression(r) || o.isElementAccessExpression(r) || o.isBindingElement(r)) && !l?.declarations?.some(
1066
- (a) => o.isGetAccessorDeclaration(a) || o.isSetAccessorDeclaration(a)
1078
+ (c) => o.isGetAccessorDeclaration(c) || o.isSetAccessorDeclaration(c)
1067
1079
  ) && (l = void 0), l !== void 0 && p !== void 0) {
1068
- const a = Ce(l, e), m = Q(l);
1069
- a !== void 0 && X(m, i, s) && _(t, n, {
1070
- start: p.getStart(n),
1071
- length: p.getWidth(n),
1080
+ const c = Ce(l, n), m = Q(l);
1081
+ c !== void 0 && X(m, i, t) && _(e, s, {
1082
+ start: p.getStart(s),
1083
+ length: p.getWidth(s),
1072
1084
  name: l.getName(),
1073
- ...V(l.declarations?.[0]),
1085
+ ...G(l.declarations?.[0]),
1074
1086
  originFileNames: m,
1075
- reason: a
1087
+ reason: c
1076
1088
  });
1077
1089
  }
1078
- o.forEachChild(r, c);
1090
+ o.forEachChild(r, a);
1079
1091
  }
1080
- c(n);
1092
+ a(s);
1081
1093
  }
1082
- function Et(n, e, t, s, i) {
1083
- const c = e.getTypeAtLocation(n).getSymbol(), r = c?.declarations?.[0], p = r !== void 0 && (o.isClassDeclaration(r) || o.isInterfaceDeclaration(r)) ? r.name?.text : void 0, l = p === void 0 ? void 0 : Ue.get(p);
1094
+ function Ft(s, n, e, t, i) {
1095
+ const a = n.getTypeAtLocation(s).getSymbol(), r = a?.declarations?.[0], p = r !== void 0 && (o.isClassDeclaration(r) || o.isInterfaceDeclaration(r)) ? r.name?.text : void 0, l = p === void 0 ? void 0 : Ge.get(p);
1084
1096
  if (l === void 0 || p === void 0)
1085
1097
  return;
1086
- const a = Q(c);
1087
- if (!a.some(
1098
+ const c = Q(a);
1099
+ if (!c.some(
1088
1100
  (y) => (Y(y) ?? ke(P.dirname(y), "")) === "@arcgis/core"
1089
- ) || !X(a, i, s))
1101
+ ) || !X(c, i, t))
1090
1102
  return;
1091
- const m = o.isPropertyAccessExpression(n.expression) ? n.expression.name : n.expression, g = n.getSourceFile();
1092
- _(t, g, {
1103
+ const m = o.isPropertyAccessExpression(s.expression) ? s.expression.name : s.expression, g = s.getSourceFile();
1104
+ _(e, g, {
1093
1105
  start: m.getStart(g),
1094
1106
  length: m.getWidth(g),
1095
1107
  name: p,
1096
1108
  kind: "class",
1097
1109
  category: "coreViews",
1098
- originFileNames: a,
1110
+ originFileNames: c,
1099
1111
  reason: `Direct construction with new ${p}() is discouraged. Use \`<${l}>\` instead. In 6.0, directly constructed views will no longer include .ui; use component slots for UI.`
1100
1112
  });
1101
1113
  }
1102
- function Lt(n, e) {
1103
- const t = n.expression;
1104
- if (!o.isPropertyAccessExpression(t) && !o.isElementAccessExpression(t) || n.arguments[0] === void 0)
1114
+ function It(s, n) {
1115
+ const e = s.expression;
1116
+ if (!o.isPropertyAccessExpression(e) && !o.isElementAccessExpression(e) || s.arguments[0] === void 0)
1105
1117
  return;
1106
- const s = o.isPropertyAccessExpression(t) ? t.name.text : I(t.argumentExpression, e);
1107
- if (s !== "addEventListener" && s !== "removeEventListener")
1118
+ const t = o.isPropertyAccessExpression(e) ? e.name.text : W(e.argumentExpression, n);
1119
+ if (t !== "addEventListener" && t !== "removeEventListener")
1108
1120
  return;
1109
- const i = I(n.arguments[0], e);
1121
+ const i = W(s.arguments[0], n);
1110
1122
  if (i === void 0)
1111
1123
  return;
1112
- const c = e.getNonNullableType(e.getTypeAtLocation(t.expression)), r = c.getProperty("@eventTypes");
1113
- if (!(r === void 0 || e.getTypeOfSymbolAtLocation(r, n).getProperty(i) === void 0))
1114
- return c.getProperty(i);
1124
+ const a = n.getNonNullableType(n.getTypeAtLocation(e.expression)), r = a.getProperty("@eventTypes");
1125
+ if (!(r === void 0 || n.getTypeOfSymbolAtLocation(r, s).getProperty(i) === void 0))
1126
+ return a.getProperty(i);
1115
1127
  }
1116
- function I(n, e) {
1117
- const t = e.getTypeAtLocation(n);
1118
- return t.isStringLiteral() || t.isNumberLiteral() ? String(t.value) : void 0;
1128
+ function W(s, n) {
1129
+ const e = n.getTypeAtLocation(s);
1130
+ return e.isStringLiteral() || e.isNumberLiteral() ? String(e.value) : void 0;
1119
1131
  }
1120
- function Tt(n, e) {
1121
- let t = e.getSymbolAtLocation(n);
1122
- for (; t !== void 0 && (t.flags & o.SymbolFlags.Alias) !== 0; ) {
1123
- const s = Ce(t, e);
1124
- if (s !== void 0)
1125
- return { symbol: t, reason: s };
1126
- t = t.declarations === void 0 ? void 0 : e.getImmediateAliasedSymbol(t);
1132
+ function Wt(s, n) {
1133
+ let e = n.getSymbolAtLocation(s);
1134
+ for (; e !== void 0 && (e.flags & o.SymbolFlags.Alias) !== 0; ) {
1135
+ const t = Ce(e, n);
1136
+ if (t !== void 0)
1137
+ return { symbol: e, reason: t };
1138
+ e = e.declarations === void 0 ? void 0 : n.getImmediateAliasedSymbol(e);
1127
1139
  }
1128
- return { symbol: t, reason: void 0 };
1140
+ return { symbol: e, reason: void 0 };
1129
1141
  }
1130
- function Q(n) {
1131
- return [...new Set(n?.declarations?.map((e) => e.getSourceFile().fileName))];
1142
+ function Q(s) {
1143
+ return [...new Set(s?.declarations?.map((n) => n.getSourceFile().fileName))];
1132
1144
  }
1133
- function Ot(n, e, t, s, i) {
1134
- if (e.reason !== void 0)
1145
+ function Ot(s, n, e, t, i) {
1146
+ if (n.reason !== void 0)
1135
1147
  return {
1136
- name: ae(e.symbol.declarations?.[0], e.symbol.getName()),
1137
- ...V(e.symbol.declarations?.[0])
1148
+ name: ae(n.symbol.declarations?.[0], n.symbol.getName()),
1149
+ ...G(n.symbol.declarations?.[0])
1138
1150
  };
1139
- const c = i === void 0 ? void 0 : s.getProgram()?.getSourceFile(i.fileName), r = i === void 0 || c === void 0 ? void 0 : Ae(
1140
- c,
1151
+ const a = i === void 0 ? void 0 : t.getProgram()?.getSourceFile(i.fileName), r = i === void 0 || a === void 0 ? void 0 : Ae(
1152
+ a,
1141
1153
  i.textSpan.start,
1142
1154
  i.textSpan.start + i.textSpan.length
1143
- ), p = (r === void 0 ? void 0 : t.getSymbolAtLocation(r)?.declarations?.[0]) ?? e.symbol?.declarations?.[0], l = i?.name;
1155
+ ), p = (r === void 0 ? void 0 : e.getSymbolAtLocation(r)?.declarations?.[0]) ?? n.symbol?.declarations?.[0], l = i?.name;
1144
1156
  return {
1145
- name: l === void 0 ? Ft(n) : ae(p, l),
1146
- ...V(p)
1157
+ name: l === void 0 ? Mt(s) : ae(p, l),
1158
+ ...G(p)
1147
1159
  };
1148
1160
  }
1149
- function W(n, e) {
1150
- const t = P.relative(e, n);
1151
- return t !== "" && !t.startsWith("../") && !P.isAbsolute(t) && t !== "node_modules" && !t.startsWith("node_modules/");
1161
+ function O(s, n) {
1162
+ const e = P.relative(n, s);
1163
+ return e !== "" && !e.startsWith("../") && !P.isAbsolute(e) && e !== "node_modules" && !e.startsWith("node_modules/");
1152
1164
  }
1153
- function Ae(n, e, t) {
1154
- let s = n;
1165
+ function Ae(s, n, e) {
1166
+ let t = s;
1155
1167
  for (; ; ) {
1156
1168
  let i;
1157
- if (o.forEachChild(s, (c) => {
1158
- i === void 0 && c.getStart(n) <= e && c.getEnd() >= t && (i = c);
1169
+ if (o.forEachChild(t, (a) => {
1170
+ i === void 0 && a.getStart(s) <= n && a.getEnd() >= e && (i = a);
1159
1171
  }), i === void 0)
1160
- return s;
1161
- s = i;
1172
+ return t;
1173
+ t = i;
1162
1174
  }
1163
1175
  }
1164
- function Ft(n) {
1165
- return o.isIdentifier(n) || o.isPrivateIdentifier(n) || o.isStringLiteralLike(n) || o.isNumericLiteral(n) ? n.text : n.getText();
1176
+ function Mt(s) {
1177
+ return o.isIdentifier(s) || o.isPrivateIdentifier(s) || o.isStringLiteralLike(s) || o.isNumericLiteral(s) ? s.text : s.getText();
1166
1178
  }
1167
- function Pe(n) {
1168
- const e = n?.find(({ name: t }) => t === "deprecated");
1169
- return e === void 0 ? void 0 : Ke(e.text) ?? "";
1179
+ function Pe(s) {
1180
+ const n = s?.find(({ name: e }) => e === "deprecated");
1181
+ return n === void 0 ? void 0 : Qe(n.text) ?? "";
1170
1182
  }
1171
- function It(n, e, t) {
1183
+ function jt(s, n, e) {
1172
1184
  try {
1173
- return Pe(n.getQuickInfoAtPosition(e, t)?.tags);
1185
+ return Pe(s.getQuickInfoAtPosition(n, e)?.tags);
1174
1186
  } catch {
1175
1187
  return;
1176
1188
  }
1177
1189
  }
1178
- function Ce(n, e) {
1190
+ function Ce(s, n) {
1179
1191
  try {
1180
- const t = Pe(n?.getJsDocTags(e));
1181
- if (t !== void 0)
1182
- return t;
1183
- const s = n?.declarations?.filter((i) => o.isGetAccessorDeclaration(i) || o.isSetAccessorDeclaration(i)).map((i) => o.getJSDocDeprecatedTag(i)).find((i) => i !== void 0);
1184
- return s === void 0 ? void 0 : s.comment === void 0 ? "" : Be(s.comment);
1192
+ const e = Pe(s?.getJsDocTags(n));
1193
+ if (e !== void 0)
1194
+ return e;
1195
+ const t = s?.declarations?.filter((i) => o.isGetAccessorDeclaration(i) || o.isSetAccessorDeclaration(i)).map((i) => o.getJSDocDeprecatedTag(i)).find((i) => i !== void 0);
1196
+ return t === void 0 ? void 0 : t.comment === void 0 ? "" : He(t.comment);
1185
1197
  } catch {
1186
1198
  return;
1187
1199
  }
1188
1200
  }
1189
- function _(n, e, t) {
1190
- const { line: s, character: i } = e.getLineAndCharacterOfPosition(t.start);
1191
- n.set(`${t.start}:${t.length}`, {
1192
- ...t,
1193
- line: s + 1,
1201
+ function _(s, n, e) {
1202
+ const { line: t, character: i } = n.getLineAndCharacterOfPosition(e.start);
1203
+ s.set(`${e.start}:${e.length}`, {
1204
+ ...e,
1205
+ line: t + 1,
1194
1206
  column: i + 1
1195
1207
  });
1196
1208
  }
1197
- function X(n, e, t) {
1198
- return n.some((s) => t !== void 0 && W(s, t)) ? !1 : !e || n.some((s) => {
1199
- const i = Y(s);
1200
- return i === void 0 ? t === void 0 || !W(s, t) : Oe(i);
1209
+ function X(s, n, e) {
1210
+ return s.some((t) => e !== void 0 && O(t, e)) ? !1 : !n || s.some((t) => {
1211
+ const i = Y(t);
1212
+ return i === void 0 ? e === void 0 || !O(t, e) : We(i);
1201
1213
  });
1202
1214
  }
1203
- function Y(n) {
1204
- const e = Fe(n), t = "/node_modules/", s = e.lastIndexOf(t);
1205
- if (s === -1)
1215
+ function Y(s) {
1216
+ const n = Me(s), e = "/node_modules/", t = n.lastIndexOf(e);
1217
+ if (t === -1)
1206
1218
  return;
1207
- const [i, c] = e.slice(s + t.length).split("/");
1208
- return i.startsWith("@") ? `${i}/${c}` : i;
1219
+ const [i, a] = n.slice(t + e.length).split("/");
1220
+ return i.startsWith("@") ? `${i}/${a}` : i;
1209
1221
  }
1210
- function Wt(n, e = [], t) {
1211
- const s = n[0];
1212
- if (s === void 0)
1222
+ function Rt(s, n = [], e) {
1223
+ const t = s[0];
1224
+ if (t === void 0)
1213
1225
  return "unknown package";
1214
- const i = Y(s);
1226
+ const i = Y(t);
1215
1227
  if (i !== void 0)
1216
1228
  return i;
1217
- const c = e.find(({ root: g }) => W(s, g));
1218
- if (c !== void 0)
1219
- return c.name;
1220
- const r = P.dirname(R(s)), p = ke(P.dirname(s), r);
1229
+ const a = n.find(({ root: g }) => O(t, g));
1230
+ if (a !== void 0)
1231
+ return a.name;
1232
+ const r = P.dirname(R(t)), p = ke(P.dirname(t), r);
1221
1233
  if (p !== r)
1222
1234
  return p;
1223
- if (t === void 0)
1235
+ if (e === void 0)
1224
1236
  return r;
1225
- const a = P.relative(t, s).split("/"), m = a.findIndex((g) => g !== "..");
1226
- return m < 1 ? P.dirname(R(s)) : a.slice(0, m * 2).join("/");
1237
+ const c = P.relative(e, t).split("/"), m = c.findIndex((g) => g !== "..");
1238
+ return m < 1 ? P.dirname(R(t)) : c.slice(0, m * 2).join("/");
1227
1239
  }
1228
1240
  export {
1229
- tn as auditDeprecatedUsages,
1230
- $t as collectDeprecatedApiUsages,
1231
- Wt as getDeprecationOriginLabel,
1241
+ rn as auditDeprecatedUsages,
1242
+ Lt as collectDeprecatedApiUsages,
1243
+ Rt as getDeprecationOriginLabel,
1232
1244
  Y as getNodeModulesPackageName,
1233
1245
  X as shouldIncludeDeprecation
1234
1246
  };