@arcgis/api-extractor 5.2.0-next.86 → 5.2.0-next.87

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
- import "../typeScript-BRuAWW15.js";
2
- import "../worker-BGV-jtQe.js";
1
+ import "../typeScript-CCTKrw9v.js";
2
+ import "./config.js";
3
3
  import "./processing/links.js";
4
4
  import "typescript";
5
- import { A as x } from "../ApiExtractor-ac92TCNa.js";
5
+ import { A as x } from "../ApiExtractor-C8Bsb_Td.js";
6
6
  import "@arcgis/toolkit/function";
7
7
  export {
8
8
  x as ApiExtractor
@@ -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,20 +1,187 @@
1
- import "@arcgis/node-toolkit/file";
2
- import "@arcgis/node-toolkit/path";
3
- import "@arcgis/node-toolkit/packageJson";
4
- import "../typeScript-BRuAWW15.js";
5
- import { l as C, m as E, r as d } from "../worker-BGV-jtQe.js";
6
- import "./processing/links.js";
7
- import "typescript";
8
- import "fs/promises";
9
- import "node:util";
10
- import "@arcgis/toolkit/string";
11
- import "../utils/apiHelpers.js";
12
- import "@arcgis/toolkit/array";
13
- import "@arcgis/toolkit/function";
14
- import "node:fs";
15
- import "node:url";
1
+ import { existsAsync as S } from "@arcgis/node-toolkit/file";
2
+ import { path as y, getCwd as E } from "@arcgis/node-toolkit/path";
3
+ import { retrievePackageJson as U } from "@arcgis/node-toolkit/packageJson";
4
+ import { b, p as I } from "../typeScript-CCTKrw9v.js";
5
+ import { identity as d } from "@arcgis/toolkit/function";
6
+ import { pathToFileURL as J } from "node:url";
7
+ import { getDefaultBasePath as w } from "./processing/links.js";
8
+ const T = "developers.arcgis.com", k = "next.gha.afd.arcgis.com";
9
+ function $(e) {
10
+ if (e.isResolvedConfig === !0)
11
+ return e;
12
+ const t = e.context, o = e.types, n = e.documentation, r = `${t?.cwd === void 0 ? E() : y.resolve(t?.cwd)}/`, s = t?.packageJson ?? U(r);
13
+ let c = t?.basePath ?? "src/";
14
+ c.endsWith("/") || (c += "/");
15
+ const m = "customElements" in s && "@arcgis/lumina" in (s.dependencies ?? {}), l = o?.typeCheckedExtraction ?? m, p = o?.fullTypeCheck ?? !1, a = o?.typeScriptConfig ?? (l || p ? b(r, o?.typeScriptConfigPath, !0) : {
16
+ configPath: "",
17
+ config: {
18
+ options: {},
19
+ fileNames: [],
20
+ errors: []
21
+ }
22
+ });
23
+ if (o?.typeScriptConfig?.config.fileNames.length === 0)
24
+ throw Error(
25
+ `${I.name}: Provided types.typeScriptConfig has no included files. If you used loadTypeScriptConfig, make sure to set resolveIncludedFiles to true.`
26
+ );
27
+ const h = {
28
+ config: {
29
+ ...a.config,
30
+ options: {
31
+ ...a.config.options,
32
+ ...o?.compilerOptions
33
+ }
34
+ },
35
+ configPath: a.configPath
36
+ }, g = t?.dtsEmitPath === void 0 || t?.dtsEmitPath === "" ? "" : `${y.resolve(r, t.dtsEmitPath)}/`, x = g !== "", P = t?.environment ?? "production", u = P === "development", D = t?.emptyDtsEmitPath ?? (!u && x), v = n?.omitInternal ?? !1, C = o?.forceProduceDts ?? !1;
37
+ if (v && (x || C))
38
+ throw Error(
39
+ "omitInternal must be false if emitting .d.ts files in order to produce functional types for internal APIs."
40
+ );
41
+ return {
42
+ isResolvedConfig: !0,
43
+ context: {
44
+ dtsEmitPath: g,
45
+ emptyDtsEmitPath: D,
46
+ apiJsonEmitPath: t?.apiJsonEmitPath ?? "",
47
+ environment: P,
48
+ cwd: r,
49
+ basePath: c,
50
+ packageJson: s,
51
+ logger: t?.logger ?? {
52
+ // We namespace manually
53
+ // eslint-disable-next-line webgis/consistent-logging
54
+ info: console.log,
55
+ // eslint-disable-next-line webgis/consistent-logging
56
+ error: console.error
57
+ },
58
+ excludedDirectories: t?.excludedDirectories ?? /* @__PURE__ */ new Set(),
59
+ isLuminaMinimalExtraction: t?.isLuminaMinimalExtraction ?? !1,
60
+ includeLuminaPrivateComponents: t?.includeLuminaPrivateComponents ?? !1,
61
+ supportApplyMixinsSyntax: t?.supportApplyMixinsSyntax ?? !1
62
+ },
63
+ types: {
64
+ typeCheckedExtraction: l,
65
+ fullTypeCheck: p,
66
+ afterDiagnostic: o?.afterDiagnostic ?? d,
67
+ typeScriptInstanceCreated: o?.typeScriptInstanceCreated ?? d,
68
+ typeScriptConfigPath: a.configPath,
69
+ typeScriptConfig: h,
70
+ compilerOptions: h.config.options,
71
+ declarationTextTransformers: o?.declarationTextTransformers ?? [],
72
+ typeReplacements: o?.typeReplacements ?? {},
73
+ forceProduceDts: C
74
+ },
75
+ documentation: {
76
+ copyDocDefinitions: n?.copyDocDefinitions ?? {},
77
+ noInheritMembers: n?.noInheritMembers ?? {},
78
+ omitInternal: v,
79
+ publicStoryUrlPrefix: n?.publicStoryUrlPrefix ?? !1,
80
+ getComponentDocsUrl: n?.getComponentDocsUrl ?? !1,
81
+ getComponentDemoUrl: n?.getComponentDemoUrl ?? !1,
82
+ host: n?.host ?? (u ? k : T),
83
+ alternativeHost: n?.alternativeHost ?? (u ? T : k),
84
+ basePath: n?.basePath ?? w(s.name.split("/").at(-1))
85
+ },
86
+ verify: {
87
+ typeCheckTypes: e.verify?.typeCheckTypes ?? !1,
88
+ filterTypeCheckDiagnostic: e.verify?.filterTypeCheckDiagnostic ?? (() => !0),
89
+ detectBrokenLinks: e.verify?.detectBrokenLinks ?? !0
90
+ },
91
+ watch: {
92
+ onUpdate: e.watch?.onUpdate ?? d,
93
+ // Many reads can happen in a short time (on folder moves, or if prettier re-runs)
94
+ // Shorter than TypeScript's default of 250ms as we are blocked until this
95
+ // timeout is complete. Short timeout for unchecked extraction as it is fast,
96
+ // so doesn't need long debounce.
97
+ debounceTime: e.watch?.debounceTime ?? (l || p ? 50 : 20),
98
+ clearScreen: e.watch?.clearScreen ?? !1,
99
+ skipWritingUnchanged: D ? !1 : e.watch?.skipWritingUnchanged ?? !0
100
+ },
101
+ strict: e.strict ?? !m,
102
+ afterApiJsonCreate: e.afterApiJsonCreate ?? d
103
+ };
104
+ }
105
+ async function z(e, t) {
106
+ const o = t !== void 0, n = e ?? process.cwd(), i = y.resolve(n, t ?? "api-extractor.config.ts"), r = await S(i);
107
+ if (o && !r)
108
+ throw Error(`The provided config file at ${i} does not exist.`);
109
+ if (!r)
110
+ return e === void 0 ? {} : { context: { cwd: e } };
111
+ const s = (await import(J(i).href)).config;
112
+ return {
113
+ ...s,
114
+ context: {
115
+ ...s.context,
116
+ cwd: s.context?.cwd ?? y.dirname(i)
117
+ }
118
+ };
119
+ }
120
+ function N(e, t) {
121
+ const o = e.context, n = t.context, i = e.types, r = t.types, s = e.documentation, c = t.documentation, m = e.verify, l = t.verify, p = e.watch, a = t.watch;
122
+ return {
123
+ isResolvedConfig: e.isResolvedConfig || t.isResolvedConfig || void 0,
124
+ context: {
125
+ dtsEmitPath: n?.dtsEmitPath ?? o?.dtsEmitPath,
126
+ emptyDtsEmitPath: n?.emptyDtsEmitPath ?? o?.emptyDtsEmitPath,
127
+ apiJsonEmitPath: n?.apiJsonEmitPath ?? o?.apiJsonEmitPath,
128
+ environment: n?.environment ?? o?.environment,
129
+ cwd: n?.cwd ?? o?.cwd,
130
+ basePath: n?.basePath ?? o?.basePath,
131
+ packageJson: n?.packageJson ?? o?.packageJson,
132
+ logger: n?.logger ?? o?.logger,
133
+ excludedDirectories: n?.excludedDirectories ?? o?.excludedDirectories,
134
+ isLuminaMinimalExtraction: n?.isLuminaMinimalExtraction ?? o?.isLuminaMinimalExtraction,
135
+ includeLuminaPrivateComponents: n?.includeLuminaPrivateComponents ?? o?.includeLuminaPrivateComponents,
136
+ supportApplyMixinsSyntax: n?.supportApplyMixinsSyntax ?? o?.supportApplyMixinsSyntax ?? !1
137
+ },
138
+ types: {
139
+ typeCheckedExtraction: r?.typeCheckedExtraction ?? i?.typeCheckedExtraction,
140
+ fullTypeCheck: r?.fullTypeCheck ?? i?.fullTypeCheck,
141
+ afterDiagnostic: f(r?.afterDiagnostic, i?.afterDiagnostic),
142
+ typeScriptInstanceCreated: f(
143
+ t?.types?.typeScriptInstanceCreated,
144
+ e?.types?.typeScriptInstanceCreated
145
+ ),
146
+ typeScriptConfigPath: r?.typeScriptConfigPath ?? i?.typeScriptConfigPath,
147
+ typeScriptConfig: r?.typeScriptConfig ?? i?.typeScriptConfig,
148
+ compilerOptions: r?.compilerOptions ?? i?.compilerOptions,
149
+ declarationTextTransformers: r?.declarationTextTransformers !== void 0 && i?.declarationTextTransformers !== void 0 ? [...i.declarationTextTransformers, ...r.declarationTextTransformers] : r?.declarationTextTransformers ?? i?.declarationTextTransformers,
150
+ typeReplacements: r?.typeReplacements ?? i?.typeReplacements,
151
+ forceProduceDts: r?.forceProduceDts ?? i?.forceProduceDts
152
+ },
153
+ documentation: {
154
+ copyDocDefinitions: c?.copyDocDefinitions ?? s?.copyDocDefinitions,
155
+ noInheritMembers: c?.noInheritMembers ?? s?.noInheritMembers,
156
+ omitInternal: c?.omitInternal ?? s?.omitInternal,
157
+ publicStoryUrlPrefix: c?.publicStoryUrlPrefix ?? s?.publicStoryUrlPrefix,
158
+ getComponentDocsUrl: c?.getComponentDocsUrl ?? s?.getComponentDocsUrl,
159
+ getComponentDemoUrl: c?.getComponentDemoUrl ?? s?.getComponentDemoUrl,
160
+ host: c?.host ?? s?.host,
161
+ alternativeHost: c?.alternativeHost ?? s?.alternativeHost,
162
+ basePath: c?.basePath ?? s?.basePath
163
+ },
164
+ verify: {
165
+ typeCheckTypes: l?.typeCheckTypes ?? m?.typeCheckTypes,
166
+ filterTypeCheckDiagnostic: l?.filterTypeCheckDiagnostic ?? m?.filterTypeCheckDiagnostic,
167
+ detectBrokenLinks: l?.detectBrokenLinks ?? m?.detectBrokenLinks
168
+ },
169
+ watch: {
170
+ onUpdate: f(a?.onUpdate, p?.onUpdate),
171
+ debounceTime: a?.debounceTime ?? p?.debounceTime,
172
+ clearScreen: a?.clearScreen ?? p?.clearScreen,
173
+ skipWritingUnchanged: a?.skipWritingUnchanged ?? p?.skipWritingUnchanged
174
+ },
175
+ strict: t.strict ?? e.strict,
176
+ afterApiJsonCreate: f(t.afterApiJsonCreate, e.afterApiJsonCreate)
177
+ };
178
+ }
179
+ function f(e, t) {
180
+ const o = t === d ? void 0 : t, n = e === d ? void 0 : e;
181
+ return o !== void 0 && n !== void 0 ? ((...i) => (o(...i), n(...i))) : n ?? o;
182
+ }
16
183
  export {
17
- C as loadApiExtractorConfig,
18
- E as mergeApiExtractorConfigs,
19
- d as resolveApiExtractorConfig
184
+ z as loadApiExtractorConfig,
185
+ N as mergeApiExtractorConfigs,
186
+ $ as resolveApiExtractorConfig
20
187
  };
@@ -1,6 +1,6 @@
1
1
  import { styleText as C } from "node:util";
2
2
  import { emitJsDocError as a, getApiNodeLabel as w } from "../../utils/apiHelpers.js";
3
- import { g as y } from "../../privateContext-CB7P40up.js";
3
+ import { c as y } from "../../privateContext-CZnnBVGR.js";
4
4
  import { kebabToPascal as I } from "@arcgis/toolkit/string";
5
5
  function W(e, n) {
6
6
  if (typeof e == "string") {
@@ -71,14 +71,14 @@ function f(t) {
71
71
  return t[e];
72
72
  }
73
73
  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,
74
+ l as a,
75
+ C as b,
76
+ v as c,
77
+ u as d,
78
+ s as e,
79
+ f,
80
+ x as g,
81
+ p as h,
82
82
  c as i,
83
83
  a as j,
84
84
  d as k,
@@ -2,7 +2,7 @@ import { findPath as E } from "@arcgis/node-toolkit/file";
2
2
  import { path as u, toSystemPathSeparators as S } from "@arcgis/node-toolkit/path";
3
3
  import t from "typescript";
4
4
  import { styleText as l } from "util";
5
- const w = "@arcgis/api-extractor", P = "5.2.0-next.86", D = {
5
+ const w = "@arcgis/api-extractor", P = "5.2.0-next.87", D = {
6
6
  name: w,
7
7
  version: P
8
8
  };
@@ -1,4 +1,4 @@
1
- import { g as f } from "../privateContext-CB7P40up.js";
1
+ import { c as f } from "../privateContext-CZnnBVGR.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;
@@ -1,8 +1,8 @@
1
- import { d as l } from "../privateContext-CB7P40up.js";
1
+ import { f as l } from "../privateContext-CZnnBVGR.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
  };
@@ -1,6 +1,6 @@
1
- import { l as O, m as J } from "../worker-BGV-jtQe.js";
2
- import { A as S, w as T } from "../ApiExtractor-ac92TCNa.js";
3
- import { p as A, l as C } from "../typeScript-BRuAWW15.js";
1
+ import { loadApiExtractorConfig as O, mergeApiExtractorConfigs as J } from "../extractor/config.js";
2
+ import { A as S, w as T } from "../ApiExtractor-C8Bsb_Td.js";
3
+ import { p as A, l as C } from "../typeScript-CCTKrw9v.js";
4
4
  import { writeFile as M } from "node:fs/promises";
5
5
  import { path as w } from "@arcgis/node-toolkit/path";
6
6
  const N = A.name;
@@ -1,7 +1,7 @@
1
1
  import "@arcgis/node-toolkit/file";
2
2
  import "@arcgis/node-toolkit/path";
3
3
  import "typescript";
4
- import { b as m } from "../typeScript-BRuAWW15.js";
4
+ import { b as m } from "../typeScript-CCTKrw9v.js";
5
5
  export {
6
6
  m as loadTypeScriptConfig
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/api-extractor",
3
- "version": "5.2.0-next.86",
3
+ "version": "5.2.0-next.87",
4
4
  "description": "Documentation engine for WebGIS SDK packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,11 +49,11 @@
49
49
  ],
50
50
  "license": "SEE LICENSE IN LICENSE.md",
51
51
  "dependencies": {
52
+ "@arcgis/node-toolkit": "5.2.0-next.87",
53
+ "@arcgis/toolkit": "5.2.0-next.87",
52
54
  "@commander-js/extra-typings": "^15.0.0",
53
55
  "commander": "^15.0.0",
54
- "tslib": "^2.8.1",
55
- "@arcgis/toolkit": "5.2.0-next.86",
56
- "@arcgis/node-toolkit": "5.2.0-next.86"
56
+ "tslib": "^2.8.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "typescript": "~6.0.3",