@arcgis/api-extractor 5.2.0-next.9 → 5.2.0-next.91

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,8 +1,8 @@
1
1
  import type ts from "typescript";
2
- import type { PackageJson } from "@arcgis/components-build-utils";
2
+ import type { PackageJson } from "@arcgis/node-toolkit/packageJson";
3
3
  import type { CopyDocDefinitions } from "./extractors/copyDoc.js";
4
4
  import type { ApiExtractor } from "./ApiExtractor.js";
5
- import type { TypeScriptConfigResult } from "../vite/typeScript.js";
5
+ import type { TypeScriptConfigResult } from "@arcgis/node-toolkit/vite/typeScript";
6
6
  import type { ApiModule } from "../apiJson.js";
7
7
  import type { ApiExtractorResult } from "./types.js";
8
8
 
@@ -215,7 +215,7 @@ export interface ApiExtractorTypesConfig {
215
215
  */
216
216
  readonly typeScriptConfigPath?: string;
217
217
  /**
218
- * A resolved config returned by [loadTypeScriptConfig()](https://developers.arcgis.com/javascript/latest/references/api-extractor/vite/typeScript/#loadTypeScriptConfig).
218
+ * A resolved config returned by \@arcgis/node-toolkit/vite/typeScript
219
219
  * Useful if you already resolved the config for other purposes and wish to
220
220
  * deduplicate the work.
221
221
  */
@@ -271,7 +271,7 @@ export interface DeclarationFile {
271
271
  *
272
272
  * @see https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/60843
273
273
  * @see https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/69911
274
- * @see https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/73395
274
+ * @see https://devtopia.esri.com/WebGIS/webgis-sdk/issues/20807
275
275
  */
276
276
  export type TypeReplacements = Record<string, Record<string, readonly [modulePath: string, name: string, type: "default" | "named"] | undefined> | undefined>;
277
277
 
@@ -1,17 +1,13 @@
1
- import "@arcgis/components-build-utils";
2
- import "../typeScript-DewdSAUb.js";
3
- import { l, m as n, r as A } from "../worker-BHro8ICj.js";
4
- import "./processing/links.js";
5
- import "typescript";
6
- import "fs/promises";
7
- import "node:util";
8
- import "@arcgis/toolkit/string";
9
- import "../utils/apiHelpers.js";
1
+ import "@arcgis/node-toolkit/file";
2
+ import "@arcgis/node-toolkit/path";
3
+ import "@arcgis/node-toolkit/packageJson";
4
+ import "@arcgis/node-toolkit/vite/typeScript";
10
5
  import "@arcgis/toolkit/function";
11
- import "node:fs";
6
+ import { l as f, m as g, r as x } from "../config-CdQHC3JZ.js";
12
7
  import "node:url";
8
+ import "./processing/links.js";
13
9
  export {
14
- l as loadApiExtractorConfig,
15
- n as mergeApiExtractorConfigs,
16
- A as resolveApiExtractorConfig
10
+ f as loadApiExtractorConfig,
11
+ g as mergeApiExtractorConfigs,
12
+ x as resolveApiExtractorConfig
17
13
  };
@@ -1,6 +1,6 @@
1
1
  import { styleText as C } from "node:util";
2
- import { emitJsDocError as a, getApiNodeLabel as w } from "../../utils/apiHelpers.js";
3
- import { g as y } from "../../privateContext-CB7P40up.js";
2
+ import { emitJsDocError as a, getApiNodeLabel as h } from "../../utils/apiHelpers.js";
3
+ import { c as y } from "../../privateContext-CjPsSpfv.js";
4
4
  import { kebabToPascal as I } from "@arcgis/toolkit/string";
5
5
  function W(e, n) {
6
6
  if (typeof e == "string") {
@@ -27,132 +27,134 @@ const P = "Unexpected relative markdown link. For links to API within the packag
27
27
  function N(e, n, i) {
28
28
  let d = i.indexOf(" ");
29
29
  d === -1 && (d = i.length);
30
- const u = i.slice(0, d), m = i.slice(d + 1);
31
- if (u.startsWith("https://"))
30
+ const m = i.slice(0, d);
31
+ let u = i.slice(d + 1);
32
+ if (m.startsWith("https://"))
32
33
  return e.config.strict ? (a(
33
34
  "Did not expect absolute URLs in a @link tag. Please use markdown links for external links. See https://webgis.esri.com/references/api-extractor/tags-reference#link)",
34
35
  n,
35
36
  e
36
- ), "") : `[${m || u}](${u})`;
37
- const [k, t] = u.split("#"), [f, L] = k.split("!");
38
- if (f === "")
37
+ ), "") : `[${u || m}](${m})`;
38
+ const [k, s] = m.split("#"), [c, L] = k.split("!");
39
+ if (c === "")
39
40
  return a(
40
- `Expected @link reference to start with a module name (before ! or #), but got: ${u}`,
41
+ `Expected @link reference to start with a module name (before ! or #), but got: ${m}`,
41
42
  n,
42
43
  e
43
44
  ), n;
44
- let g = e.moduleMap.get(f);
45
+ let g = e.moduleMap.get(c);
45
46
  if (g === void 0 && e.isComponentProject && !e.config.strict) {
46
47
  for (const r of e.moduleMap.values())
47
- if (y(r).index.class?.name === f) {
48
+ if (y(r).index.class?.name === c) {
48
49
  g = r;
49
50
  break;
50
51
  }
51
52
  }
52
53
  if (g === void 0)
53
54
  return e.config.verify.detectBrokenLinks ? a(
54
- `Failed to find referenced module: ${C("red", f)}${f.startsWith("module:") ? '. Module name in @link does not need the "module:" prefix' : f.startsWith("esri/") ? '. Module name in @link does not need to start with the "esri/" prefix.' : ""}`,
55
+ `Failed to find referenced module: ${C("red", c)}${c.startsWith("module:") ? '. Module name in @link does not need the "module:" prefix' : c.startsWith("esri/") ? '. Module name in @link does not need to start with the "esri/" prefix.' : ""}`,
55
56
  n,
56
57
  e
57
58
  ) : e.silencedBrokenLinkCount += 1, n;
58
59
  const v = y(g), D = e.inheritedModuleName === void 0 ? e.apiModule : e.moduleMap.get(e.inheritedModuleName) ?? e.apiModule;
59
- if (e.watchFiles !== void 0 && f !== D.path && y(D).isStale) {
60
- const r = y(D).file.fileName.slice(e.config.context.cwd.length), s = v.file.fileName.slice(e.config.context.cwd.length);
61
- e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(s);
62
- const b = e.watchFiles.get(s).dependents;
63
- b.has(r) || b.set(r, !1);
60
+ if (e.watchFiles !== void 0 && c !== D.path && y(D).isStale) {
61
+ const r = y(D).file.fileName.slice(e.config.context.cwd.length), t = v.file.fileName.slice(e.config.context.cwd.length);
62
+ e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(t);
63
+ const $ = e.watchFiles.get(t).dependents;
64
+ $.has(r) || $.set(r, !1);
64
65
  }
65
- let h = M(g.path, L, t, e);
66
+ let b = M(g.path, L, s, e);
66
67
  if (L !== void 0) {
67
68
  const r = v.index.named[L];
68
69
  return r === void 0 ? (e.config.verify.detectBrokenLinks ? a(
69
- `Failed to find the referenced declaration inside the module: ${C("red", `${f}!${L}`)}`,
70
+ `Failed to find the referenced declaration inside the module: ${C("red", `${c}!${L}`)}`,
70
71
  n,
71
72
  e
72
73
  ) : e.silencedBrokenLinkCount += 1, n) : r === v.index.class ? (a(
73
- `Invalid reference syntax used. Class/mixin/custom element declarations must be referenced without specifying the class name. Expected ${C("green", f)}`,
74
+ `Invalid reference syntax used. Class/mixin/custom element declarations must be referenced without specifying the class name. Expected ${C("green", c)}`,
74
75
  n,
75
76
  e
76
- ), n) : `[${m || w(r)}](${h})`;
77
- } else if (t !== void 0) {
78
- const r = g.path === D.path, s = v.index.class;
79
- if (s === void 0)
80
- return v.index.named[t] === void 0 ? e.config.verify.detectBrokenLinks ? a(
77
+ ), n) : `[${u || h(r)}](${b})`;
78
+ } else if (s !== void 0) {
79
+ const r = g.path === D.path, t = v.index.class;
80
+ if (t === void 0)
81
+ return v.index.named[s] === void 0 ? e.config.verify.detectBrokenLinks ? a(
81
82
  'Failed to find the referenced member. Class member reference syntax was used, yet current module does not expose a class/mixin/custom element? Linking to properties in interfaces is not yet supported. For event links, prefix with "event-"',
82
83
  n,
83
84
  e
84
85
  ) : e.silencedBrokenLinkCount += 1 : a(
85
- `Invalid reference syntax used. This syntax is only permitted on modules that export a class/mixin/web component. Perhaps you meant to use ${C("red", `${f}!${t}`)} instead? Linking to properties in interfaces is not yet supported`,
86
+ `Invalid reference syntax used. This syntax is only permitted on modules that export a class/mixin/web component. Perhaps you meant to use ${C("red", `${c}!${s}`)} instead? Linking to properties in interfaces is not yet supported`,
86
87
  n,
87
88
  e
88
89
  ), n;
89
- const b = v.inheritance, p = typeof b == "object" ? b : void 0;
90
- let c;
91
- if (t.startsWith("event-")) {
92
- const o = t.slice(6);
90
+ const $ = v.inheritance, p = typeof $ == "object" ? $ : void 0;
91
+ let f;
92
+ if (s.startsWith("event-")) {
93
+ const o = s.slice(6);
93
94
  if (p !== void 0)
94
- c = p.indexedEvents?.[o];
95
- else if (s.events !== void 0)
96
- for (let l = 0; l < s.events.length; ++l) {
97
- const $ = s.events[l];
98
- if (o === $.name) {
99
- c = $;
95
+ f = p.indexedEvents?.[o];
96
+ else if (t.events !== void 0)
97
+ for (let l = 0; l < t.events.length; ++l) {
98
+ const w = t.events[l];
99
+ if (o === w.name) {
100
+ f = w;
100
101
  break;
101
102
  }
102
103
  }
103
- } else if (t.startsWith("slot-")) {
104
- const o = t.slice(5);
104
+ } else if (s.startsWith("slot-")) {
105
+ const o = s.slice(5);
105
106
  if (p !== void 0)
106
- c = p.indexedSlots?.[o];
107
- else if (s.slots !== void 0)
108
- for (let l = 0; l < s.slots.length; ++l) {
109
- const $ = s.slots[l];
110
- if (o === $.name) {
111
- c = $;
107
+ f = p.indexedSlots?.[o];
108
+ else if (t.slots !== void 0)
109
+ for (let l = 0; l < t.slots.length; ++l) {
110
+ const w = t.slots[l];
111
+ if (o === w.name) {
112
+ f = w;
112
113
  break;
113
114
  }
114
115
  }
115
- } else if (t.startsWith("--")) {
116
+ f?.name === "" && (u ||= `${h(t)}.default-slot`);
117
+ } else if (s.startsWith("--")) {
116
118
  if (p !== void 0)
117
- c = p.indexedCssProperties?.[t];
118
- else if (s.cssProperties !== void 0)
119
- for (let o = 0; o < s.cssProperties.length; ++o) {
120
- const l = s.cssProperties[o];
121
- if (t === l.name) {
122
- c = l;
119
+ f = p.indexedCssProperties?.[s];
120
+ else if (t.cssProperties !== void 0)
121
+ for (let o = 0; o < t.cssProperties.length; ++o) {
122
+ const l = t.cssProperties[o];
123
+ if (s === l.name) {
124
+ f = l;
123
125
  break;
124
126
  }
125
127
  }
126
- } else if (p?.indexedMembers !== void 0 && (c = p.indexedMembers[t] ?? p.indexedMembers[`static ${t}`]), c === void 0 && s.members !== void 0) {
127
- for (let o = 0; o < s.members.length; ++o) {
128
- const l = s.members[o];
129
- if (t === l.name) {
130
- c = l;
128
+ } else if (p?.indexedMembers !== void 0 && (f = p.indexedMembers[s] ?? p.indexedMembers[`static ${s}`]), f === void 0 && t.members !== void 0) {
129
+ for (let o = 0; o < t.members.length; ++o) {
130
+ const l = t.members[o];
131
+ if (s === l.name) {
132
+ f = l;
131
133
  break;
132
134
  }
133
135
  }
134
- if (c === void 0 && !e.config.strict && e.isComponentProject && s.events !== void 0)
135
- for (let o = 0; o < s.events.length; ++o) {
136
- const l = s.events[o];
137
- if (t === l.name) {
138
- c = l, h = h.replace("#", "#event-");
136
+ if (f === void 0 && !e.config.strict && e.isComponentProject && t.events !== void 0)
137
+ for (let o = 0; o < t.events.length; ++o) {
138
+ const l = t.events[o];
139
+ if (s === l.name) {
140
+ f = l, b = b.replace("#", "#event-");
139
141
  break;
140
142
  }
141
143
  }
142
144
  }
143
- return c === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${m || (r ? w(c) : `${w(s)}.${w(c)}`)}](${h})`;
145
+ return f === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${u || (r ? h(f) : `${h(t)}.${h(f)}`)}](${b})`;
144
146
  } else {
145
- const r = v.index.class === void 0 ? U(f) : w(v.index.class);
146
- return `[${m || r}](${h})`;
147
+ const r = v.index.class === void 0 ? U(c) : h(v.index.class);
148
+ return `[${u || r}](${b})`;
147
149
  }
148
150
  }
149
151
  function M(e, n, i, d) {
150
- let u;
152
+ let m;
151
153
  if (d.isComponentProject && typeof d.config.documentation.getComponentDocsUrl == "function" && e.startsWith("components/")) {
152
- const m = e.slice(11), k = m.indexOf("/"), t = k === -1 ? m : m.slice(0, k), f = d.config.documentation.getComponentDocsUrl(t, I(t));
153
- f !== void 0 && (u = f + (k === -1 ? "" : m.slice(k + 1)));
154
+ const u = e.slice(11), k = u.indexOf("/"), s = k === -1 ? u : u.slice(0, k), c = d.config.documentation.getComponentDocsUrl(s, I(s));
155
+ c !== void 0 && (m = c + (k === -1 ? "" : u.slice(k + 1)));
154
156
  }
155
- return u ??= `${d.normalizedApiReferencePrefix}${e}/`, x(u, n, i);
157
+ return m ??= `${d.normalizedApiReferencePrefix}${e}/`, x(m, n, i);
156
158
  }
157
159
  function x(e, n, i) {
158
160
  return n !== void 0 ? i === void 0 ? `${e}#${encodeURIComponent(n)}` : `${e}#${encodeURIComponent(n)}-${encodeURIComponent(i)}` : i !== void 0 ? `${e}#${encodeURIComponent(i)}` : e;
@@ -1,4 +1,4 @@
1
- import { path as a } from "@arcgis/components-build-utils";
1
+ import { path as a } from "@arcgis/node-toolkit/path";
2
2
  function u(o, s, n) {
3
3
  const e = n.indexOf(a.sep);
4
4
  let t = s.componentPathMapping;
@@ -7,6 +7,8 @@ function s(t, o, i, n) {
7
7
  importsMap: i,
8
8
  importsText: void 0,
9
9
  constructorPropertiesInterface: void 0,
10
+ componentExtrasInterfaces: void 0,
11
+ componentCssPropertiesInterface: void 0,
10
12
  constructorOnlySetters: void 0,
11
13
  constructorAutoCastType: void 0,
12
14
  typeName: void 0,
@@ -64,21 +66,21 @@ function p(t) {
64
66
  function C(t) {
65
67
  return t[e];
66
68
  }
67
- function l(t) {
69
+ function f(t) {
68
70
  return t[e];
69
71
  }
70
- function f(t) {
72
+ function l(t) {
71
73
  return t[e];
72
74
  }
73
75
  export {
74
- x as a,
75
- l as b,
76
- C as c,
77
- f as d,
78
- p as e,
79
- u as f,
80
- v as g,
81
- s as h,
76
+ f as a,
77
+ C as b,
78
+ v as c,
79
+ u as d,
80
+ s as e,
81
+ l as f,
82
+ x as g,
83
+ p as h,
82
84
  c as i,
83
85
  a as j,
84
86
  d as k,
@@ -1,4 +1,4 @@
1
- import { g as f } from "../privateContext-CB7P40up.js";
1
+ import { c as f } from "../privateContext-CjPsSpfv.js";
2
2
  const g = (e) => e.kind === "method", v = (e) => e.kind === "field";
3
3
  function h(e, n) {
4
4
  const o = e.sourcePath, i = n.sourcePath;
@@ -8,7 +8,7 @@ import type { ApiType, ApiTypeReference } from "../apiJson.js";
8
8
  *
9
9
  * @param apiType - The ApiType to hydrate
10
10
  * @param hydratePart - A callback that converts a type reference into desired output
11
- * @see [Type References](https://devtopia.esri.com/WebGIS/arcgis-web-components/blob/main/packages/support-packages/api-extractor/src/const/typeReferences/README.md)
11
+ * @see [Type References](https://devtopia.esri.com/WebGIS/webgis-sdk/blob/main/packages/support-packages/api-extractor/src/const/typeReferences/README.md)
12
12
  * @example
13
13
  * ```ts
14
14
  * const markdownTypeString = hydrateApiType(
@@ -13,40 +13,41 @@ const d = {
13
13
  unknown: "https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown",
14
14
  never: "https://www.typescriptlang.org/docs/handbook/2/functions.html#never",
15
15
  any: "https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any",
16
- this: "#"
17
- }, g = Object.keys(d).join("|"), p = new RegExp(`(?<!["'-])\\b(?:${g})\\b(?!["'-])`, "u");
18
- function v(e, l) {
16
+ this: "#",
17
+ symbol: "https://www.typescriptlang.org/docs/handbook/symbols.html"
18
+ }, p = Object.keys(d).join("|"), g = new RegExp(`(?<!["'-])\\b(?:${p})\\b(?!["'-])`, "u");
19
+ function v(e, c) {
19
20
  const o = [];
20
21
  let n = e.text.length;
21
22
  if (e.references !== void 0)
22
- for (let c = e.references.length - 1; c >= 0; c--) {
23
- const t = e.references[c];
23
+ for (let l = e.references.length - 1; l >= 0; l--) {
24
+ const t = e.references[l];
24
25
  if (t.start === void 0 || t.end === void 0)
25
26
  continue;
26
27
  const r = e.text.slice(t.end, n);
27
- r.length > 0 && i(r, l, o);
28
+ r.length > 0 && i(r, c, o);
28
29
  const s = e.text.slice(t.start, t.end);
29
30
  n = t.start, t.viewUrl === void 0 ? o.push(s) : o.push(
30
- l(s, t)
31
+ c(s, t)
31
32
  );
32
33
  }
33
34
  if (n > 0) {
34
- const c = e.text.slice(0, n);
35
- i(c, l, o);
35
+ const l = e.text.slice(0, n);
36
+ i(l, c, o);
36
37
  }
37
38
  return o.reverse();
38
39
  }
39
- function i(e, l, o) {
40
+ function i(e, c, o) {
40
41
  const n = o.length;
41
- for (let c = 0; c < e.length; ) {
42
- const t = e.match(p);
42
+ for (let l = 0; l < e.length; ) {
43
+ const t = e.match(g);
43
44
  if (t?.index === void 0)
44
45
  break;
45
46
  const r = e.slice(0, t.index);
46
47
  r.length > 0 && o.splice(n, 0, r);
47
48
  const s = t[0];
48
49
  e = e.slice(t.index + s.length);
49
- const a = d[s], b = l(s, {
50
+ const a = d[s], b = c(s, {
50
51
  name: s,
51
52
  module: void 0,
52
53
  package: s === "this" ? void 0 : h,
@@ -1,8 +1,8 @@
1
- import { d as l } from "../privateContext-CB7P40up.js";
1
+ import { f as l } from "../privateContext-CjPsSpfv.js";
2
2
  function m(t, r, i, e, n, o) {
3
- return `${`${r ? "export default " : "export "}${t ? "abstract " : ""}`}class ${i}${f(e)}${n === void 0 ? "" : ` extends ${n}`} {${o}}`;
3
+ return `${`${r ? "export default " : "export "}${t ? "abstract " : ""}`}class ${i}${c(e)}${n === void 0 ? "" : ` extends ${n}`} {${o}}`;
4
4
  }
5
- function f(t) {
5
+ function c(t) {
6
6
  if (t === void 0)
7
7
  return "";
8
8
  let r = "<";
@@ -17,24 +17,24 @@ function v(t, r, i, e, n) {
17
17
  let $ = "";
18
18
  if (e !== void 0) {
19
19
  $ = " extends ";
20
- for (let c = 0; c < e.length; ++c)
21
- $ += l(e[c]), c < e.length - 1 && ($ += ", ");
20
+ for (let f = 0; f < e.length; ++f)
21
+ $ += l(e[f]), f < e.length - 1 && ($ += ", ");
22
22
  }
23
- return `${o}interface ${r}${f(i)}${$} {${n}}`;
23
+ return `${o}interface ${r}${c(i)}${$} {${n}}`;
24
24
  }
25
- function g(t, r, i, e, n, o, $, c) {
26
- const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, x = c === void 0 ? "" : `: ${c}`;
27
- return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${f(o)}(${a($)})${x};`;
25
+ function g(t, r, i, e, n, o, $, f) {
26
+ const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, x = f === void 0 ? "" : `: ${f}`;
27
+ return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${c(o)}(${a($)})${x};`;
28
28
  }
29
29
  function d(t) {
30
30
  return u.test(t) || t.startsWith("[") ? t : `"${t.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
31
31
  }
32
32
  const h = (t) => !u.test(t) && !t.startsWith("["), u = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
33
33
  function b(t, r, i, e, n) {
34
- return `${t ? "export default " : "export "}function ${r}${f(i)}(${a(e)}): ${n};`;
34
+ return `${t ? "export default " : "export "}function ${r}${c(i)}(${a(e)}): ${n};`;
35
35
  }
36
36
  function A(t) {
37
- return `${f(t.typeParameters)}(${a(t.parameters)}): ${t.return.type.text}`;
37
+ return `${c(t.typeParameters)}(${a(t.parameters)}): ${t.return.type.text}`;
38
38
  }
39
39
  function a(t) {
40
40
  if (t === void 0)
@@ -46,13 +46,13 @@ function a(t) {
46
46
  }
47
47
  return r;
48
48
  }
49
- function P(t, r, i, e, n, o, $, c) {
50
- return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${d($)}${o ? "?" : ""}: ${c};`;
49
+ function P(t, r, i, e, n, o, $, f) {
50
+ return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${d($)}${o ? "?" : ""}: ${f};`;
51
51
  }
52
52
  function N(t, r, i, e, n, o) {
53
- const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, c = d(e), s = o === void 0 ? "" : `
54
- ${$}set ${c}(value: ${o});`;
55
- return `${$}get ${c}(): ${n};${s}`;
53
+ const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, f = d(e), s = o === void 0 ? "" : `
54
+ ${$}set ${f}(value: ${o});`;
55
+ return `${$}get ${f}(): ${n};${s}`;
56
56
  }
57
57
  function z(t, r, i) {
58
58
  const n = `${t ? "declare " : "export "}const ${r}: ${i};`;
@@ -60,7 +60,7 @@ function z(t, r, i) {
60
60
  export default ${r};` : n;
61
61
  }
62
62
  function R(t, r, i, e) {
63
- let n = `export type ${t}${f(r)} = `;
63
+ let n = `export type ${t}${c(r)} = `;
64
64
  if (i !== void 0)
65
65
  for (let o = 0; o < i.length; ++o)
66
66
  n += l(i[o]), (o < i.length - 1 || e !== void 0) && (n += `
@@ -78,6 +78,6 @@ export {
78
78
  P as printProperty,
79
79
  A as printSignature,
80
80
  R as printTypeAlias,
81
- f as printTypeParameters,
81
+ c as printTypeParameters,
82
82
  z as printVariable
83
83
  };
@@ -17,8 +17,10 @@ export interface ApiExtractorPluginConfig {
17
17
  * rules, Astro docs generator, and other tools. For consistent results, use
18
18
  * the same settings everywhere.
19
19
  *
20
- * It is safe to use this for setting .afterCreate() hook as long as you don't
20
+ * It is safe to use this for setting .afterExtractorCreated() hook as long as you don't
21
21
  * mutate the api.json in it.
22
+ *
23
+ * Overrides are higher precedence than the `api-extractor.config.ts` file.
22
24
  */
23
25
  unsafeConfigOverride?: ApiExtractorConfig;
24
26
  serve?: ApiExtractorPluginServeConfig;
@@ -1,15 +1,14 @@
1
- import { l as O, m as J } from "../worker-BHro8ICj.js";
2
- import { A as S, w as T } from "../ApiExtractor-tnoeQpFa.js";
3
- import { p as A, l as C } from "../typeScript-DewdSAUb.js";
1
+ import { p as O, l as S, m as J } from "../config-CdQHC3JZ.js";
2
+ import { A as T, l as A, w as C } from "../ApiExtractor-cEjpNByh.js";
4
3
  import { writeFile as M } from "node:fs/promises";
5
- import { path as w } from "@arcgis/components-build-utils";
6
- const N = A.name;
7
- function $(s = {}) {
4
+ import { path as w } from "@arcgis/node-toolkit/path";
5
+ const N = O.name;
6
+ function V(s = {}) {
8
7
  let t = !1, v = !1, e, o, c, l, E = !0, h = !1, f, m, u, y, p;
9
8
  async function x(d, n) {
10
9
  if (n.dtsFiles !== void 0 && u !== "") {
11
10
  const g = w.join(w.resolve(p, u), "/");
12
- await T(g, !1, d.changedDtsFiles ?? n.dtsFiles);
11
+ await C(g, !1, d.changedDtsFiles ?? n.dtsFiles);
13
12
  }
14
13
  y !== "" && await M(
15
14
  y,
@@ -57,7 +56,7 @@ function $(s = {}) {
57
56
  }, 250)), a));
58
57
  }
59
58
  }
60
- }, P = s.configFilePath === "" ? void 0 : await O(p, s.configFilePath), F = s.unsafeConfigOverride ?? {}, D = P === void 0 ? g : J(g, P), r = F === void 0 ? D : J(D, F);
59
+ }, P = s.configFilePath === "" ? void 0 : await S(p, s.configFilePath), F = s.unsafeConfigOverride ?? {}, D = P === void 0 ? g : J(g, P), r = F === void 0 ? D : J(D, F);
61
60
  u = t ? r.context?.dtsEmitPath ?? e.build.outDir : "", y = t ? r.context?.apiJsonEmitPath ?? "" : "";
62
61
  const W = r.context?.logger ?? e.logger ?? console, k = {
63
62
  ...r,
@@ -67,7 +66,7 @@ function $(s = {}) {
67
66
  apiJsonEmitPath: "",
68
67
  logger: {
69
68
  info(i) {
70
- !t || i.startsWith(`${C}Wrote `) || W.info(i);
69
+ !t || i.startsWith(`${A}Wrote `) || W.info(i);
71
70
  },
72
71
  error(i) {
73
72
  W.error(i);
@@ -79,7 +78,7 @@ function $(s = {}) {
79
78
  forceProduceDts: r.types?.forceProduceDts === !0 || u !== ""
80
79
  }
81
80
  };
82
- o = new S(k), s.afterExtractorCreated?.(o);
81
+ o = new T(k), s.afterExtractorCreated?.(o);
83
82
  },
84
83
  /**
85
84
  * TypeScript reads files directly from the file system - Vite's
@@ -105,5 +104,5 @@ function $(s = {}) {
105
104
  };
106
105
  }
107
106
  export {
108
- $ as useApiExtractor
107
+ V as useApiExtractor
109
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/api-extractor",
3
- "version": "5.2.0-next.9",
3
+ "version": "5.2.0-next.91",
4
4
  "description": "Documentation engine for WebGIS SDK packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -41,28 +41,29 @@
41
41
  "./utils/internalTypeScriptApis": "./dist/utils/internalTypeScriptApis.js",
42
42
  "./utils/partPrinter": "./dist/utils/partPrinter.js",
43
43
  "./vite/plugin": "./dist/vite/plugin.js",
44
- "./vite/typeScript": "./dist/vite/typeScript.js",
45
44
  "./package.json": "./package.json"
46
45
  },
47
46
  "files": [
48
47
  "dist/"
49
48
  ],
50
- "bin": "./bin/cli.js",
51
49
  "license": "SEE LICENSE IN LICENSE.md",
52
50
  "dependencies": {
53
- "@commander-js/extra-typings": "^14.0.0",
54
- "commander": "^14.0.0",
55
- "tslib": "^2.8.1",
56
- "@arcgis/toolkit": "5.2.0-next.9",
57
- "@arcgis/components-build-utils": "5.2.0-next.9"
51
+ "@arcgis/node-toolkit": "5.2.0-next.91",
52
+ "@arcgis/toolkit": "5.2.0-next.91",
53
+ "@commander-js/extra-typings": "^15.0.0",
54
+ "commander": "^15.0.0",
55
+ "tslib": "^2.8.1"
58
56
  },
59
57
  "peerDependencies": {
60
- "typescript": "~6.0.2",
58
+ "typescript": "~6.0.3",
61
59
  "vite": "^7.3.2"
62
60
  },
63
61
  "peerDependenciesMeta": {
64
62
  "vite": {
65
63
  "optional": true
66
64
  }
65
+ },
66
+ "bin": {
67
+ "api-extractor": "./bin/cli.js"
67
68
  }
68
69
  }