@arcgis/api-extractor 5.0.0-next.140 → 5.0.0-next.142
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.
- package/dist/{ApiExtractor-4OnVCVTb.js → ApiExtractor-DCrXNOTy.js} +33 -33
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/extractor/processing/links.js +9 -12
- package/dist/{typeScript-DRxRvn_W.js → typeScript-DEqHrfvQ.js} +1 -1
- package/dist/utils/astHelpers.js +36 -36
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/{worker-2MTaHG3k.js → worker-ChyOmzAh.js} +78 -80
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as j, a as re, e as Re, p as de } from "./typeScript-
|
|
2
|
-
import { a as be, o as xe, t as Ge, b as Le, c as Oe, e as Ne, d as Z, p as Be, f as We, i as fe, g as ze, h as Ue, j as je, k as He, n as Je, r as Ve } from "./worker-
|
|
1
|
+
import { l as j, a as re, e as Re, p as de } from "./typeScript-DEqHrfvQ.js";
|
|
2
|
+
import { a as be, o as xe, t as Ge, b as Le, c as Oe, e as Ne, d as Z, p as Be, f as We, i as fe, g as ze, h as Ue, j as je, k as He, n as Je, r as Ve } from "./worker-ChyOmzAh.js";
|
|
3
3
|
import { getViewUrl as Xe, postProcessDeprecated as Q, postProcessDescription as D, postProcessDocsTags as J, resolveJsDocLink as Ye } from "./extractor/processing/links.js";
|
|
4
4
|
import k from "typescript";
|
|
5
5
|
import { path as O, toPosixPathSeparators as qe } from "@arcgis/components-build-utils";
|
|
@@ -220,9 +220,9 @@ function ut(e, t) {
|
|
|
220
220
|
const yt = `type HashMap<T> = Record<string, T | undefined>;
|
|
221
221
|
type nullish = null | undefined;
|
|
222
222
|
|
|
223
|
-
type IHandle = import("./core/Handles").ResourceHandle;
|
|
223
|
+
type IHandle = import("./core/Handles.js").ResourceHandle;
|
|
224
224
|
|
|
225
|
-
type GroupKey<T> = import("./core/Accessor").GroupKey<T>;
|
|
225
|
+
type GroupKey<T> = import("./core/Accessor.js").GroupKey<T>;
|
|
226
226
|
|
|
227
227
|
declare namespace __esri {
|
|
228
228
|
type Constructor<T> = new (...params: any[]) => T;
|
|
@@ -1820,9 +1820,9 @@ function kt(e, t, i, n) {
|
|
|
1820
1820
|
);
|
|
1821
1821
|
return;
|
|
1822
1822
|
}
|
|
1823
|
-
t.events ??= [],
|
|
1823
|
+
t.events ??= [], we(o, t, i, void 0, n);
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function we(e, t, i, n, s) {
|
|
1826
1826
|
const a = n !== void 0;
|
|
1827
1827
|
if (n ??= /* @__PURE__ */ new Set(), e.type !== void 0) {
|
|
1828
1828
|
s.emitError(
|
|
@@ -1879,10 +1879,10 @@ function Ae(e, t, i, n, s) {
|
|
|
1879
1879
|
);
|
|
1880
1880
|
return;
|
|
1881
1881
|
}
|
|
1882
|
-
|
|
1882
|
+
we(c, t, l, n, s);
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Ae(e, t, i) {
|
|
1886
1886
|
const n = h(e);
|
|
1887
1887
|
if (n.inheritance !== void 0)
|
|
1888
1888
|
return;
|
|
@@ -2003,7 +2003,7 @@ function Ce(e, t, i) {
|
|
|
2003
2003
|
if (s === !1 || n === void 0)
|
|
2004
2004
|
return a !== void 0 ? a.inheritance = ce.skip : t && i.privateMixinModuleNames.add(e), ce.skip;
|
|
2005
2005
|
const [r, o] = s, l = o;
|
|
2006
|
-
|
|
2006
|
+
Ae(n, o, i);
|
|
2007
2007
|
let c, d = !1;
|
|
2008
2008
|
if (o.members !== void 0) {
|
|
2009
2009
|
c = /* @__PURE__ */ Object.create(null);
|
|
@@ -2084,9 +2084,9 @@ function Ft(e, t, i) {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
2086
|
function $t(e, t) {
|
|
2087
|
-
e.sort(it),
|
|
2087
|
+
e.sort(it), wt(e, t), t.isComponentProject && Le(e, t);
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2089
|
+
function wt(e, t) {
|
|
2090
2090
|
for (let i = 0; i < e.length; ++i) {
|
|
2091
2091
|
const n = e[i];
|
|
2092
2092
|
if (!h(n).isStale)
|
|
@@ -2101,7 +2101,7 @@ function At(e, t) {
|
|
|
2101
2101
|
file: h(n).file,
|
|
2102
2102
|
node: void 0
|
|
2103
2103
|
}
|
|
2104
|
-
), "members" in o && o.kind !== "interface" && (
|
|
2104
|
+
), "members" in o && o.kind !== "interface" && (Ae(n, o, t), o.events?.sort(nt));
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
2107
|
for (let i = 0; i < e.length; ++i) {
|
|
@@ -2144,7 +2144,7 @@ function At(e, t) {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
t.inheritedModuleName = void 0;
|
|
2146
2146
|
}
|
|
2147
|
-
|
|
2147
|
+
r.kind !== "interface" && o.members.sort(ot);
|
|
2148
2148
|
const l = r;
|
|
2149
2149
|
if (l.events !== void 0) {
|
|
2150
2150
|
for (let c = 0; c < l.events.length; ++c) {
|
|
@@ -2183,7 +2183,7 @@ function At(e, t) {
|
|
|
2183
2183
|
s.constructorPropertiesInterface !== void 0 && Pt(s, t), vt(n, s, t), Ft(n, s, t);
|
|
2184
2184
|
}
|
|
2185
2185
|
}
|
|
2186
|
-
const
|
|
2186
|
+
const At = async function() {
|
|
2187
2187
|
if (this.isRunInProgress)
|
|
2188
2188
|
throw Error(
|
|
2189
2189
|
"The ApiExtractor.run() is already in progress, or previous run crashed with unrecoverable error. Await the previous run first or create a new ApiExtractor"
|
|
@@ -2397,13 +2397,13 @@ const Rt = async function() {
|
|
|
2397
2397
|
if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
|
|
2398
2398
|
const u = e.types.fullTypeCheck ? k.createSemanticDiagnosticsBuilderProgram : k.createAbstractBuilder;
|
|
2399
2399
|
let v;
|
|
2400
|
-
const C = (S, F, E, ...
|
|
2400
|
+
const C = (S, F, E, ...w) => (v = E, u(
|
|
2401
2401
|
// If not doing full type check, don't scout test files
|
|
2402
2402
|
// If non-tests import tests, they will be included implicitly anyway
|
|
2403
2403
|
e.types.fullTypeCheck ? S : S?.filter((T) => !je(T)),
|
|
2404
2404
|
F,
|
|
2405
2405
|
E,
|
|
2406
|
-
...
|
|
2406
|
+
...w
|
|
2407
2407
|
// Type cast to keep types simpler&aligned between two branches
|
|
2408
2408
|
)), y = k.createWatchCompilerHost(
|
|
2409
2409
|
// This parses the config file again (we already do it) and computes the
|
|
@@ -2419,10 +2419,10 @@ const Rt = async function() {
|
|
|
2419
2419
|
y.setTimeout = b === void 0 ? void 0 : (S, F, ...E) => {
|
|
2420
2420
|
if (!(E[0] === "timerToUpdateProgram"))
|
|
2421
2421
|
return b(S, F, ...E);
|
|
2422
|
-
const
|
|
2422
|
+
const A = M !== void 0 ? Promise.resolve() : d === void 0 ? Promise.resolve(m()) : d.promise.finally(m);
|
|
2423
2423
|
return M = b(
|
|
2424
2424
|
(...H) => {
|
|
2425
|
-
M = void 0,
|
|
2425
|
+
M = void 0, A.finally(() => {
|
|
2426
2426
|
this.program = void 0, S(...H), this.program === void 0 && f(void 0);
|
|
2427
2427
|
});
|
|
2428
2428
|
},
|
|
@@ -2441,17 +2441,17 @@ const Rt = async function() {
|
|
|
2441
2441
|
e.types.typeScriptInstanceCreated(F, v);
|
|
2442
2442
|
for (const T of this.watchFiles.values())
|
|
2443
2443
|
T.wasRemoved = !0;
|
|
2444
|
-
let
|
|
2444
|
+
let w = !1;
|
|
2445
2445
|
for (let T = 0; T < E.length; ++T) {
|
|
2446
|
-
const
|
|
2447
|
-
if (!fe(
|
|
2446
|
+
const A = E[T];
|
|
2447
|
+
if (!fe(A.fileName, this))
|
|
2448
2448
|
continue;
|
|
2449
|
-
const U =
|
|
2450
|
-
H === void 0 ? (o(U,
|
|
2449
|
+
const U = A.fileName.slice(e.context.cwd.length), H = this.watchFiles.get(U);
|
|
2450
|
+
H === void 0 ? (o(U, A, void 0), w = !0) : H.file !== A ? (s(H, U, A), w = !0) : H.wasRemoved = !1;
|
|
2451
2451
|
}
|
|
2452
|
-
for (const [T,
|
|
2453
|
-
|
|
2454
|
-
|
|
2452
|
+
for (const [T, A] of this.watchFiles)
|
|
2453
|
+
A.wasRemoved && (a(A, T), w = !0);
|
|
2454
|
+
w ? p() : (De(this, Z()), f(void 0));
|
|
2455
2455
|
}, t = k.createWatchProgram(y);
|
|
2456
2456
|
} else {
|
|
2457
2457
|
let u = function(y) {
|
|
@@ -2469,7 +2469,7 @@ const Rt = async function() {
|
|
|
2469
2469
|
if (I || P === void 0) {
|
|
2470
2470
|
const S = u(M);
|
|
2471
2471
|
if (S === !1) {
|
|
2472
|
-
let E,
|
|
2472
|
+
let E, w = !1;
|
|
2473
2473
|
try {
|
|
2474
2474
|
E = at(M, { recursive: !0 });
|
|
2475
2475
|
let T;
|
|
@@ -2477,12 +2477,12 @@ const Rt = async function() {
|
|
|
2477
2477
|
if (T.isDirectory())
|
|
2478
2478
|
continue;
|
|
2479
2479
|
const U = `${T.parentPath}/${T.name}`.slice(e.context.cwd.length);
|
|
2480
|
-
ze(U) && (
|
|
2480
|
+
ze(U) && (w = C(U, !1) || w);
|
|
2481
2481
|
}
|
|
2482
2482
|
} finally {
|
|
2483
2483
|
E?.closeSync();
|
|
2484
2484
|
}
|
|
2485
|
-
return
|
|
2485
|
+
return w;
|
|
2486
2486
|
}
|
|
2487
2487
|
const F = S === !0;
|
|
2488
2488
|
if (G) {
|
|
@@ -2497,9 +2497,9 @@ const Rt = async function() {
|
|
|
2497
2497
|
return o(y, void 0, void 0), !0;
|
|
2498
2498
|
{
|
|
2499
2499
|
let E = !1;
|
|
2500
|
-
const
|
|
2501
|
-
for (const [T,
|
|
2502
|
-
T.startsWith(
|
|
2500
|
+
const w = `${y}/`;
|
|
2501
|
+
for (const [T, A] of this.watchFiles)
|
|
2502
|
+
T.startsWith(w) && (a(A, T), E = !0);
|
|
2503
2503
|
return E;
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
@@ -2608,7 +2608,7 @@ class _t {
|
|
|
2608
2608
|
* @param rawConfig Optional configuration for the extractor.
|
|
2609
2609
|
*/
|
|
2610
2610
|
constructor(t = {}) {
|
|
2611
|
-
this.componentStories = /* @__PURE__ */ Object.create(null), this.dtsFiles = /* @__PURE__ */ new Map(), this.changedDtsFiles = void 0, this.isRunInProgress = !1, this.watchFiles = void 0, this.program = void 0, this.builderProgram = void 0, this.componentPathMapping = void 0, this.componentCssFileDocs = void 0, this.vanillaComponentTypes = void 0, this.isInLuminaMinimalExtraction = !1, this.errorCount = 0, this.silencedBrokenLinkCount = 0, this.loggedBooleanWarning = !1, this.moduleMap = void 0, this.privateMixinModuleNames = /* @__PURE__ */ new Set(), this.implicitPublicModules = void 0, this.file = void 0, this.apiModule = void 0, this.componentTagName = void 0, this.pairedSetter = void 0, this.statementJsDocs = [], this.jsDoc = void 0, this.apiObject = void 0, this.moduleContext = void 0, this.localDeclarations = /* @__PURE__ */ new Set(), this.exportDefaultName = void 0, this.objectLikeTypeParameters = void 0, this.functionLikeTypeParameters = void 0, this.apiClassLikeName = void 0, this.mixinName = void 0, this.mixinMixins = void 0, this.moduleHasAccessorLikeClass = !1, this.moduleHasClass = !1, this.inheritedModuleName = void 0, this.run =
|
|
2611
|
+
this.componentStories = /* @__PURE__ */ Object.create(null), this.dtsFiles = /* @__PURE__ */ new Map(), this.changedDtsFiles = void 0, this.isRunInProgress = !1, this.watchFiles = void 0, this.program = void 0, this.builderProgram = void 0, this.componentPathMapping = void 0, this.componentCssFileDocs = void 0, this.vanillaComponentTypes = void 0, this.isInLuminaMinimalExtraction = !1, this.errorCount = 0, this.silencedBrokenLinkCount = 0, this.loggedBooleanWarning = !1, this.moduleMap = void 0, this.privateMixinModuleNames = /* @__PURE__ */ new Set(), this.implicitPublicModules = void 0, this.file = void 0, this.apiModule = void 0, this.componentTagName = void 0, this.pairedSetter = void 0, this.statementJsDocs = [], this.jsDoc = void 0, this.apiObject = void 0, this.moduleContext = void 0, this.localDeclarations = /* @__PURE__ */ new Set(), this.exportDefaultName = void 0, this.objectLikeTypeParameters = void 0, this.functionLikeTypeParameters = void 0, this.apiClassLikeName = void 0, this.mixinName = void 0, this.mixinMixins = void 0, this.moduleHasAccessorLikeClass = !1, this.moduleHasClass = !1, this.inheritedModuleName = void 0, this.run = At.bind(this), this.watch = Rt.bind(this), this.emitError = Re.bind(this);
|
|
2612
2612
|
const i = Ve(t);
|
|
2613
2613
|
this.config = i, this.config.context.environment === "production" ? (this.normalizedDocumentationHost = me, this.alternativeDocumentationHost = pe) : (this.normalizedDocumentationHost = pe, this.alternativeDocumentationHost = me), this.produceDts = i.types.forceProduceDts || i.context.dtsEmitPath !== "" || i.verify.typeCheckTypes, this.basePath = `${i.context.cwd}${i.context.basePath}`, this.normalizedApiReferencePrefix = `https://${this.normalizedDocumentationHost}/javascript/latest/api-reference/esri-`, this.runtimeDependencyNames = /* @__PURE__ */ new Set([
|
|
2614
2614
|
...Object.keys(i.context.packageJson.dependencies ?? {}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import { A as x } from "../ApiExtractor-
|
|
3
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-DEqHrfvQ.js";
|
|
2
|
+
import { A as x } from "../ApiExtractor-DCrXNOTy.js";
|
|
3
|
+
import "../worker-ChyOmzAh.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "@arcgis/toolkit/function";
|
package/dist/extractor/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@arcgis/components-build-utils";
|
|
2
|
-
import "../typeScript-
|
|
3
|
-
import { l, m as n, r as A } from "../worker-
|
|
2
|
+
import "../typeScript-DEqHrfvQ.js";
|
|
3
|
+
import { l, m as n, r as A } from "../worker-ChyOmzAh.js";
|
|
4
4
|
import "chalk";
|
|
5
5
|
import "../utils/apiHelpers.js";
|
|
6
6
|
import "@arcgis/toolkit/string";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import $ from "chalk";
|
|
2
2
|
import { emitJsDocError as a, getApiNodeLabel as D } from "../../utils/apiHelpers.js";
|
|
3
3
|
import { getModuleContext as y } from "../privateContext.js";
|
|
4
|
-
import { kebabToPascal as
|
|
5
|
-
function
|
|
4
|
+
import { kebabToPascal as I } from "@arcgis/toolkit/string";
|
|
5
|
+
function H(e, n) {
|
|
6
6
|
if (typeof e == "string") {
|
|
7
7
|
const t = e.replaceAll(F, n.resolveJsDocLink).replaceAll(n.alternativeDocumentationHost, n.normalizedDocumentationHost);
|
|
8
8
|
return e.includes("](.") && a(P, e, n), t;
|
|
@@ -16,7 +16,7 @@ function W(e, n) {
|
|
|
16
16
|
}
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function x(e, n) {
|
|
20
20
|
if (e !== void 0 && n.inheritedModuleName === void 0)
|
|
21
21
|
for (let t = 0; t < e.length; ++t) {
|
|
22
22
|
const d = e[t];
|
|
@@ -24,7 +24,7 @@ function j(e, n) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
const P = "Unexpected relative markdown link. For links to API within the package use {@link}. For all other links, use absolute markdown. Documentation: https://webgis.esri.com/webgis/core/core/documenting-api#link", F = /\{@link +([^}]+)\}/gu;
|
|
27
|
-
function
|
|
27
|
+
function J(e, n, t) {
|
|
28
28
|
let d = t.indexOf(" ");
|
|
29
29
|
d === -1 && (d = t.length);
|
|
30
30
|
const m = t.slice(0, d), u = t.slice(d + 1);
|
|
@@ -147,10 +147,7 @@ function x(e, n, t) {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
return e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n;
|
|
152
|
-
const I = e.isJsApi ? "#" : ".";
|
|
153
|
-
return `[${u || (f ? D(c) : `${D(i)}${I}${D(c)}`)}](${C})`;
|
|
150
|
+
return c === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${u || (f ? D(c) : `${D(i)}.${D(c)}`)}](${C})`;
|
|
154
151
|
} else {
|
|
155
152
|
const f = k.index.class === void 0 ? U(r) : D(k.index.class);
|
|
156
153
|
return `[${u || f}](${C})`;
|
|
@@ -159,7 +156,7 @@ function x(e, n, t) {
|
|
|
159
156
|
function M(e, n, t, d) {
|
|
160
157
|
let m = `${d.normalizedApiReferencePrefix}${e.replaceAll("/", "-")}.html`;
|
|
161
158
|
if (d.isComponentProject && typeof d.config.documentation.getComponentDocsUrl == "function" && e.startsWith("components/")) {
|
|
162
|
-
const u = e.slice(11), g = u.indexOf("/"), s = g === -1 ? u : u.slice(0, g), r = d.config.documentation.getComponentDocsUrl(s,
|
|
159
|
+
const u = e.slice(11), g = u.indexOf("/"), s = g === -1 ? u : u.slice(0, g), r = d.config.documentation.getComponentDocsUrl(s, I(s));
|
|
163
160
|
r !== void 0 && (m = r + (g === -1 ? "" : u.slice(g + 1)));
|
|
164
161
|
}
|
|
165
162
|
return t !== void 0 ? `${m}#${encodeURIComponent(t)}` : n !== void 0 ? `${m}#${encodeURIComponent(n)}` : m;
|
|
@@ -170,8 +167,8 @@ function U(e) {
|
|
|
170
167
|
}
|
|
171
168
|
export {
|
|
172
169
|
M as getViewUrl,
|
|
173
|
-
|
|
170
|
+
H as postProcessDeprecated,
|
|
174
171
|
W as postProcessDescription,
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
x as postProcessDocsTags,
|
|
173
|
+
J as resolveJsDocLink
|
|
177
174
|
};
|
|
@@ -2,7 +2,7 @@ import { findPath as v, path as C, toSystemPathSeparators as y } from "@arcgis/c
|
|
|
2
2
|
import t from "typescript";
|
|
3
3
|
import E, { supportsColorStderr as S } from "chalk";
|
|
4
4
|
import { styleText as w } from "util";
|
|
5
|
-
const P = "@arcgis/api-extractor", D = "5.0.0-next.
|
|
5
|
+
const P = "@arcgis/api-extractor", D = "5.0.0-next.142", N = {
|
|
6
6
|
name: P,
|
|
7
7
|
version: D
|
|
8
8
|
};
|
package/dist/utils/astHelpers.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mappedFind as
|
|
3
|
-
function
|
|
4
|
-
if (!
|
|
5
|
-
const r = i(e
|
|
6
|
-
if (
|
|
1
|
+
import s from "typescript";
|
|
2
|
+
import { mappedFind as o } from "@arcgis/toolkit/array";
|
|
3
|
+
function a(e, n, t) {
|
|
4
|
+
if (!n && e !== void 0) {
|
|
5
|
+
const r = i(e);
|
|
6
|
+
if (x(r))
|
|
7
7
|
return r.getText(t);
|
|
8
8
|
}
|
|
9
|
-
return
|
|
9
|
+
return n;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
function i(e
|
|
13
|
-
return
|
|
11
|
+
const x = (e) => s.isLiteralExpression(e) || e.kind === s.SyntaxKind.TrueKeyword || e.kind === s.SyntaxKind.FalseKeyword || s.isPrefixUnaryExpression(e) && s.isLiteralExpression(e.operand);
|
|
12
|
+
function i(e) {
|
|
13
|
+
return s.isSatisfiesExpression(e) || s.isParenthesizedExpression(e) || s.isAsExpression(e) || s.isTypeAssertionExpression(e) ? i(e.expression) : e;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function f(e) {
|
|
16
16
|
if (e !== void 0) {
|
|
17
|
-
if (
|
|
17
|
+
if (s.isIdentifier(e))
|
|
18
18
|
return e.escapedText;
|
|
19
|
-
if (
|
|
19
|
+
if (s.isStringLiteralLike(e))
|
|
20
20
|
return e.text;
|
|
21
|
-
if (
|
|
22
|
-
if (
|
|
21
|
+
if (s.isComputedPropertyName(e)) {
|
|
22
|
+
if (s.isStringLiteralLike(e.expression))
|
|
23
23
|
return e.expression.text;
|
|
24
|
-
if (
|
|
24
|
+
if (s.isPropertyAccessExpression(e.expression) && s.isIdentifier(e.expression.expression) && e.expression.expression.text === "Symbol")
|
|
25
25
|
return `[Symbol.${e.expression.name.text}]`;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
const p = (e,
|
|
29
|
+
const p = (e, n) => e === void 0 ? void 0 : o(
|
|
30
30
|
e,
|
|
31
|
-
(t) =>
|
|
31
|
+
(t) => s.isDecorator(t) && s.isCallExpression(t.expression) && s.isIdentifier(t.expression.expression) && t.expression.expression.escapedText === n ? t.expression : void 0
|
|
32
32
|
);
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
33
|
+
function c(e) {
|
|
34
|
+
const n = e.indexOf("/");
|
|
35
|
+
if (n === -1)
|
|
36
36
|
return e;
|
|
37
37
|
if (e.startsWith("@")) {
|
|
38
|
-
const t = e.indexOf("/",
|
|
38
|
+
const t = e.indexOf("/", n + 1);
|
|
39
39
|
return t === -1 ? e : e.slice(0, t);
|
|
40
40
|
} else
|
|
41
|
-
return e.slice(0,
|
|
41
|
+
return e.slice(0, n);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return e.kind ===
|
|
43
|
+
function y(e, n) {
|
|
44
|
+
return e.kind === s.SyntaxKind.TrueKeyword ? !0 : (e.kind === s.SyntaxKind.FalseKeyword || n.emitError(
|
|
45
45
|
"Expected boolean literal (true or false) rather than variable/expression - the value must be statically analyzable",
|
|
46
46
|
{
|
|
47
|
-
file:
|
|
47
|
+
file: n.file,
|
|
48
48
|
node: e
|
|
49
49
|
}
|
|
50
50
|
), !1);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
52
|
+
function E(e) {
|
|
53
|
+
const n = e.lastIndexOf(".");
|
|
54
|
+
if (n === -1 || e.length - n > l || e.includes("/", n))
|
|
55
55
|
return e;
|
|
56
|
-
const t = e.slice(
|
|
56
|
+
const t = e.slice(n - 2, n) === ".d" ? n - 2 : n;
|
|
57
57
|
return e.slice(0, t);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const l = 4;
|
|
60
60
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
y as extractBooleanInitializer,
|
|
62
|
+
a as extractInitializer,
|
|
63
63
|
p as findDecorator,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
E as getBasename,
|
|
65
|
+
f as getMemberName,
|
|
66
|
+
c as getPackageNameFromExternalSpecifier
|
|
67
67
|
};
|
package/dist/vite/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as T, m as J } from "../worker-
|
|
2
|
-
import { A as b, w as S } from "../ApiExtractor-
|
|
3
|
-
import { p as k, l as A } from "../typeScript-
|
|
1
|
+
import { l as T, m as J } from "../worker-ChyOmzAh.js";
|
|
2
|
+
import { A as b, w as S } from "../ApiExtractor-DCrXNOTy.js";
|
|
3
|
+
import { p as k, l as A } from "../typeScript-DEqHrfvQ.js";
|
|
4
4
|
import { writeFile as C } from "node:fs/promises";
|
|
5
5
|
import { path as w } from "@arcgis/components-build-utils";
|
|
6
6
|
const M = k.name;
|
package/dist/vite/typeScript.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { path as $e, existsAsync as qt, getCwd as Ci, retrievePackageJson as lt, toPosixPathSeparators as bi } from "@arcgis/components-build-utils";
|
|
2
|
-
import { b as Mi, p as Pi, l as xi } from "./typeScript-
|
|
2
|
+
import { b as Mi, p as Pi, l as xi } from "./typeScript-DEqHrfvQ.js";
|
|
3
3
|
import ne from "chalk";
|
|
4
4
|
import { globalPackageIdentifier as De, mergeApiNodes as Ri, isApiMethodAsync as Di } from "./utils/apiHelpers.js";
|
|
5
5
|
import { uncapitalize as Li, camelToKebab as Ii, kebabToPascal as Ai } from "@arcgis/toolkit/string";
|
|
@@ -619,7 +619,7 @@ ${C}${s}declare module "@arcgis/lumina" {
|
|
|
619
619
|
${c} }
|
|
620
620
|
}
|
|
621
621
|
}`, v = ` interface IntrinsicElements {
|
|
622
|
-
${d} }`,
|
|
622
|
+
${d} }`, P = `${n}import { HTMLAttributes } from "preact";
|
|
623
623
|
import type { EventHandler } from "${y}";
|
|
624
624
|
|
|
625
625
|
${C}${m}declare module 'preact' {
|
|
@@ -655,7 +655,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
|
|
|
655
655
|
}
|
|
656
656
|
}`, D = `/** @deprecated import from stencil.d.ts instead */
|
|
657
657
|
export * from "./stencil.js";`, S = `${t.config.context.dtsEmitPath}types/`, N = `${S}lumina.d.ts`, B = `${S}preact.d.ts`, $ = `${S}react.d.ts`, V = `${S}stencil.d.ts`, T = `${S}components.d.ts`;
|
|
658
|
-
t.dtsFiles.set(N, b), t.dtsFiles.set(B,
|
|
658
|
+
t.dtsFiles.set(N, b), t.dtsFiles.set(B, P), t.dtsFiles.set($, I), t.dtsFiles.set(V, k), t.dtsFiles.set(T, D);
|
|
659
659
|
}
|
|
660
660
|
function cn(e, t) {
|
|
661
661
|
const n = [], i = [];
|
|
@@ -1321,8 +1321,8 @@ function je(e, t, n, i, a) {
|
|
|
1321
1321
|
let b = n.functionLikeTypeParameters?.has(M) === !0 || n.objectLikeTypeParameters?.has(M) === !0 || n.localDeclarations.has(M);
|
|
1322
1322
|
if (b)
|
|
1323
1323
|
continue;
|
|
1324
|
-
const v = n.moduleContext.importsMap[M],
|
|
1325
|
-
if (
|
|
1324
|
+
const v = n.moduleContext.importsMap[M], P = v !== void 0 && (f === void 0 ? v.modulePath === u : v.specifier === f + (u === void 0 ? "" : `/${u}`));
|
|
1325
|
+
if (P ? v.wasUsed = !0 : b = n.moduleContext.importsMap[M] !== void 0, b)
|
|
1326
1326
|
continue;
|
|
1327
1327
|
const R = M !== c;
|
|
1328
1328
|
R && (be(t, M), a = i + M.length);
|
|
@@ -1332,7 +1332,7 @@ function je(e, t, n, i, a) {
|
|
|
1332
1332
|
p.fileName.slice(n.basePath.length),
|
|
1333
1333
|
g,
|
|
1334
1334
|
n
|
|
1335
|
-
),
|
|
1335
|
+
), P || (n.moduleContext.importsMap[M] = {
|
|
1336
1336
|
type: I,
|
|
1337
1337
|
modulePath: f === void 0 ? u : void 0,
|
|
1338
1338
|
specifier: f === void 0 ? ye(ae(n.apiModule).dtsPath, u) : f + (u === void 0 ? "" : `/${u}`),
|
|
@@ -1778,9 +1778,9 @@ function jn(e) {
|
|
|
1778
1778
|
return !1;
|
|
1779
1779
|
}
|
|
1780
1780
|
function z(e, t) {
|
|
1781
|
-
if (
|
|
1781
|
+
if (x = t, We.clear(), U = [], qe.clear(), e.pos !== -1 && e.getText(x.file).includes("* @public") && x.emitError(
|
|
1782
1782
|
"@public JSDoc tag may only appear in interfaces, top-level of type alias, or top-level intersection inside a type-alias. @public JSDoc tag inside inline object literal types or deeper aliases is not supported as such are tricky to represent in the docs UI. Refactor out the type into a separate top-level interface/type-alias. Documentation: https://webgis.esri.com/webgis/core/core/documenting-api#describing-nested-object-types",
|
|
1783
|
-
{ file:
|
|
1783
|
+
{ file: x.file, node: e }
|
|
1784
1784
|
), e.kind === o.SyntaxKind.Identifier || e.kind === o.SyntaxKind.QualifiedName)
|
|
1785
1785
|
Ke(e);
|
|
1786
1786
|
else if (o.isFunctionTypeNode(e) || o.isConstructorTypeNode(e)) {
|
|
@@ -1798,7 +1798,7 @@ function z(e, t) {
|
|
|
1798
1798
|
source: void 0
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
|
-
let
|
|
1801
|
+
let x;
|
|
1802
1802
|
const ve = (e, t, n) => {
|
|
1803
1803
|
switch (t.kind) {
|
|
1804
1804
|
case o.SyntaxKind.TypeReference:
|
|
@@ -1824,7 +1824,7 @@ const ve = (e, t, n) => {
|
|
|
1824
1824
|
Ke(a);
|
|
1825
1825
|
break;
|
|
1826
1826
|
case o.SyntaxKind.TypeQuery:
|
|
1827
|
-
const l = Un(t,
|
|
1827
|
+
const l = Un(t, x);
|
|
1828
1828
|
if (l !== void 0)
|
|
1829
1829
|
return ve(e, l, n);
|
|
1830
1830
|
Ke(t.exprName, Xn);
|
|
@@ -1839,21 +1839,21 @@ const ve = (e, t, n) => {
|
|
|
1839
1839
|
break;
|
|
1840
1840
|
case o.SyntaxKind.TypeLiteral:
|
|
1841
1841
|
const m = t;
|
|
1842
|
-
m.members.length === 1 &&
|
|
1842
|
+
m.members.length === 1 && ("emitNode" in m && (m.emitNode ??= {}), o.setEmitFlags(m, o.EmitFlags.SingleLine));
|
|
1843
1843
|
break;
|
|
1844
1844
|
case o.SyntaxKind.IndexedAccessType:
|
|
1845
1845
|
const d = t;
|
|
1846
1846
|
if (
|
|
1847
1847
|
// In public types, Lumina's "component" and "el" have the same type
|
|
1848
1848
|
// Thus print ArcgisHome["el"] as just ArcgisHome
|
|
1849
|
-
|
|
1849
|
+
x.isComponentProject && d.indexType.kind === o.SyntaxKind.LiteralType && d.indexType.literal.text === "el"
|
|
1850
1850
|
)
|
|
1851
1851
|
return ve(e, d.objectType, n);
|
|
1852
1852
|
break;
|
|
1853
1853
|
case o.SyntaxKind.ImportType:
|
|
1854
|
-
|
|
1854
|
+
x.emitError(
|
|
1855
1855
|
`\`import()\` syntax inside types is not supported - refactor to import the type at the top of the file${t.pos === -1 ? ". The import() syntax might also be inserted by TypeScript if you are referencing a type that is not otherwise accessible - refactor such cases by adding explicit type annotation." : ""}`,
|
|
1856
|
-
{ file:
|
|
1856
|
+
{ file: x.file, node: t }
|
|
1857
1857
|
);
|
|
1858
1858
|
break;
|
|
1859
1859
|
}
|
|
@@ -1884,11 +1884,11 @@ function Ke(e, t = 0) {
|
|
|
1884
1884
|
const c = a;
|
|
1885
1885
|
if (c.pos === -1 && c.symbol !== void 0) {
|
|
1886
1886
|
U.push(
|
|
1887
|
-
je(c.symbol, c,
|
|
1887
|
+
je(c.symbol, c, x, l, s)
|
|
1888
1888
|
);
|
|
1889
1889
|
return;
|
|
1890
1890
|
}
|
|
1891
|
-
if (
|
|
1891
|
+
if (x.functionLikeTypeParameters?.has(r) === !0) {
|
|
1892
1892
|
U.push({
|
|
1893
1893
|
name: r,
|
|
1894
1894
|
module: void 0,
|
|
@@ -1899,7 +1899,7 @@ function Ke(e, t = 0) {
|
|
|
1899
1899
|
});
|
|
1900
1900
|
return;
|
|
1901
1901
|
}
|
|
1902
|
-
if (
|
|
1902
|
+
if (x.objectLikeTypeParameters?.has(r) === !0) {
|
|
1903
1903
|
U.push({
|
|
1904
1904
|
name: r,
|
|
1905
1905
|
module: void 0,
|
|
@@ -1910,70 +1910,70 @@ function Ke(e, t = 0) {
|
|
|
1910
1910
|
});
|
|
1911
1911
|
return;
|
|
1912
1912
|
}
|
|
1913
|
-
if (
|
|
1913
|
+
if (x.localDeclarations.has(r)) {
|
|
1914
1914
|
U.push({
|
|
1915
1915
|
name: r,
|
|
1916
1916
|
module: void 0,
|
|
1917
1917
|
package: void 0,
|
|
1918
1918
|
viewUrl: Ve(
|
|
1919
|
-
|
|
1920
|
-
r ===
|
|
1919
|
+
x.apiModule.path,
|
|
1920
|
+
r === x.exportDefaultName ? void 0 : r,
|
|
1921
1921
|
void 0,
|
|
1922
|
-
|
|
1922
|
+
x
|
|
1923
1923
|
),
|
|
1924
1924
|
start: l,
|
|
1925
1925
|
end: s
|
|
1926
1926
|
});
|
|
1927
1927
|
return;
|
|
1928
1928
|
}
|
|
1929
|
-
if (
|
|
1930
|
-
|
|
1929
|
+
if (x.localPrivateDeclarations?.has(r) === !0) {
|
|
1930
|
+
x.localPrivateDeclarations.set(r, Math.abs(x.localPrivateDeclarations.get(r))), U.push({
|
|
1931
1931
|
name: r,
|
|
1932
1932
|
module: void 0,
|
|
1933
1933
|
package: void 0,
|
|
1934
1934
|
viewUrl: Ve(
|
|
1935
|
-
|
|
1936
|
-
r ===
|
|
1935
|
+
x.apiModule.path,
|
|
1936
|
+
r === x.exportDefaultName ? void 0 : r,
|
|
1937
1937
|
void 0,
|
|
1938
|
-
|
|
1938
|
+
x
|
|
1939
1939
|
),
|
|
1940
1940
|
start: l,
|
|
1941
1941
|
end: s
|
|
1942
1942
|
});
|
|
1943
1943
|
return;
|
|
1944
1944
|
}
|
|
1945
|
-
const d =
|
|
1945
|
+
const d = x.moduleContext.importsMap[r];
|
|
1946
1946
|
if (d !== void 0) {
|
|
1947
1947
|
d.wasUsed = !0;
|
|
1948
1948
|
const g = d.type === "named";
|
|
1949
|
-
d.replacementName !== void 0 && (be(a, d.replacementName), s = l + d.replacementName.length), d.replacementName !== void 0 && (
|
|
1949
|
+
d.replacementName !== void 0 && (be(a, d.replacementName), s = l + d.replacementName.length), d.replacementName !== void 0 && (x.functionLikeTypeParameters?.has(d.replacementName) === !0 || x.objectLikeTypeParameters?.has(d.replacementName) === !0) && x.emitError(
|
|
1950
1950
|
`Can't do a type replacement of ${ne.green(r)} to ${ne.red(d.replacementName)} as the latter name conflicts with a type parameter name in the current scope. Rename the type parameter or refactor out the type replacement.`,
|
|
1951
|
-
{ file:
|
|
1951
|
+
{ file: x.file, node: e }
|
|
1952
1952
|
);
|
|
1953
1953
|
const C = g ? d.actualName ?? d.replacementName ?? r : void 0;
|
|
1954
1954
|
if (d.modulePath === void 0) {
|
|
1955
|
-
if (
|
|
1955
|
+
if (x.config.strict) {
|
|
1956
1956
|
const M = ct(d.specifier);
|
|
1957
|
-
|
|
1957
|
+
x.runtimeDependencyNames.has(M) || x.emitError(
|
|
1958
1958
|
M === "esri" ? `Found unexpected absolute path import of ${ne.red(C ?? d.type)} from ${ne.red(d.specifier)}. Did you mean to use a relative import instead?` : `Type ${ne.red(C ?? d.type)} imported from ${ne.red(M)} cannot be referenced in public types as this dependency is not declared as a "dependency" in the package.json`,
|
|
1959
|
-
{ file:
|
|
1959
|
+
{ file: x.file, node: e }
|
|
1960
1960
|
);
|
|
1961
1961
|
}
|
|
1962
|
-
} else
|
|
1962
|
+
} else x.config.strict || ze(
|
|
1963
1963
|
d.modulePath,
|
|
1964
1964
|
pt(
|
|
1965
|
-
|
|
1965
|
+
x.apiModule.sourcePath.slice(x.config.context.basePath.length),
|
|
1966
1966
|
d.specifier
|
|
1967
1967
|
),
|
|
1968
1968
|
g ? C : d.type,
|
|
1969
|
-
|
|
1969
|
+
x
|
|
1970
1970
|
);
|
|
1971
1971
|
let y, h = d.modulePath;
|
|
1972
1972
|
h === void 0 && (y = ct(d.specifier), h = d.specifier.length === y.length ? void 0 : d.specifier.slice(y.length + 1)), U.push({
|
|
1973
1973
|
name: C ?? d.type,
|
|
1974
1974
|
module: h,
|
|
1975
1975
|
package: y,
|
|
1976
|
-
viewUrl: d.modulePath === void 0 ? si(y, h, g ? r : d.type) : Ve(d.modulePath, C, void 0,
|
|
1976
|
+
viewUrl: d.modulePath === void 0 ? si(y, h, g ? r : d.type) : Ve(d.modulePath, C, void 0, x),
|
|
1977
1977
|
start: l,
|
|
1978
1978
|
end: s
|
|
1979
1979
|
});
|
|
@@ -1995,8 +1995,8 @@ function Ke(e, t = 0) {
|
|
|
1995
1995
|
for (; g[1] !== void 0 && C >= 0; ) {
|
|
1996
1996
|
const h = n[C--];
|
|
1997
1997
|
if (g = g[1][h.escapedText], g === void 0)
|
|
1998
|
-
|
|
1999
|
-
file:
|
|
1998
|
+
x.emitError("Failed to resolve the definition of the type reference", {
|
|
1999
|
+
file: x.file,
|
|
2000
2000
|
node: e
|
|
2001
2001
|
});
|
|
2002
2002
|
else {
|
|
@@ -2016,14 +2016,14 @@ function Ke(e, t = 0) {
|
|
|
2016
2016
|
}
|
|
2017
2017
|
if (qe.has(r))
|
|
2018
2018
|
return;
|
|
2019
|
-
const u =
|
|
2019
|
+
const u = x.program?.getTypeChecker?.()?.getSymbolAtLocation(a);
|
|
2020
2020
|
if (u !== void 0) {
|
|
2021
|
-
U.push(je(u, a,
|
|
2021
|
+
U.push(je(u, a, x, l, s));
|
|
2022
2022
|
return;
|
|
2023
2023
|
}
|
|
2024
|
-
|
|
2024
|
+
x.emitError(
|
|
2025
2025
|
"Failed to resolve the definition of the type reference. Ensure it has @public or refactor out its usage from the public API type",
|
|
2026
|
-
{ file:
|
|
2026
|
+
{ file: x.file, node: e }
|
|
2027
2027
|
);
|
|
2028
2028
|
}
|
|
2029
2029
|
function be(e, t) {
|
|
@@ -2261,7 +2261,7 @@ function Ae(e, t, n, i) {
|
|
|
2261
2261
|
v = !0;
|
|
2262
2262
|
break;
|
|
2263
2263
|
}
|
|
2264
|
-
const
|
|
2264
|
+
const P = {
|
|
2265
2265
|
[Y]: y,
|
|
2266
2266
|
kind: c ? "method" : p ? "function" : f ? "call-signature" : g ? "constructor" : void 0,
|
|
2267
2267
|
name: g || f ? void 0 : t,
|
|
@@ -2288,7 +2288,7 @@ function Ae(e, t, n, i) {
|
|
|
2288
2288
|
signature: void 0,
|
|
2289
2289
|
privacy: M,
|
|
2290
2290
|
source: void 0
|
|
2291
|
-
}, R =
|
|
2291
|
+
}, R = P, I = on(P, i.jsDoc), k = C ? [] : e.parameters;
|
|
2292
2292
|
let D = I.length, S = !1, N = 0;
|
|
2293
2293
|
for (let T = 0; T < k.length; ++T) {
|
|
2294
2294
|
const E = k[T], A = o.isIdentifier(E.name) ? E.name.escapedText : void 0;
|
|
@@ -2314,7 +2314,7 @@ function Ae(e, t, n, i) {
|
|
|
2314
2314
|
type: q.type,
|
|
2315
2315
|
default: q.default
|
|
2316
2316
|
};
|
|
2317
|
-
pe.optional = Ht(E, pe),
|
|
2317
|
+
pe.optional = Ht(E, pe), P.parameters.push(pe);
|
|
2318
2318
|
continue;
|
|
2319
2319
|
}
|
|
2320
2320
|
let F = I[T + N]?.text, G, w;
|
|
@@ -2354,19 +2354,19 @@ function Ae(e, t, n, i) {
|
|
|
2354
2354
|
optional: void 0,
|
|
2355
2355
|
rest: E.dotDotDotToken ? !0 : void 0,
|
|
2356
2356
|
type: ke,
|
|
2357
|
-
default: Be(E.initializer, void 0, i.file
|
|
2357
|
+
default: Be(E.initializer, void 0, i.file)
|
|
2358
2358
|
};
|
|
2359
|
-
ie.optional = Ht(E, ie),
|
|
2359
|
+
ie.optional = Ht(E, ie), P.parameters.push(ie);
|
|
2360
2360
|
}
|
|
2361
|
-
if (i.config.strict && !S && D !==
|
|
2362
|
-
`Expected @param tags to match the number of parameters on a public function. Found ${I.length} @param tags for ${
|
|
2361
|
+
if (i.config.strict && !S && D !== P.parameters.length && i.emitError(
|
|
2362
|
+
`Expected @param tags to match the number of parameters on a public function. Found ${I.length} @param tags for ${P.parameters.length} TypeScript parameters. Documentation: https://webgis.esri.com/webgis/core/core/documenting-api#param${g ? " and https://webgis.esri.com/webgis/core/core/documenting-api#constructor" : ""}`,
|
|
2363
2363
|
{ file: i.file, node: e }
|
|
2364
|
-
),
|
|
2365
|
-
|
|
2364
|
+
), P.parameters.length === 0)
|
|
2365
|
+
P.parameters = void 0;
|
|
2366
2366
|
else {
|
|
2367
2367
|
let T = !0;
|
|
2368
|
-
for (let E =
|
|
2369
|
-
const L =
|
|
2368
|
+
for (let E = P.parameters.length - 1; E >= 0; E--) {
|
|
2369
|
+
const L = P.parameters[E];
|
|
2370
2370
|
T &&= L.optional === !0 || L.rest === !0, !T && L.optional && (L.optional = void 0, L.type.text += " | undefined");
|
|
2371
2371
|
}
|
|
2372
2372
|
}
|
|
@@ -2375,22 +2375,22 @@ function Ae(e, t, n, i) {
|
|
|
2375
2375
|
node: e
|
|
2376
2376
|
})), i.functionLikeTypeParameters = void 0;
|
|
2377
2377
|
const B = p ? et(a) : 0, $ = p && i.exportDefaultName === t, V = B === 2 || $;
|
|
2378
|
-
return p && (V ? Ct(
|
|
2378
|
+
return p && (V ? Ct(P, !0, i) : B === 0 && i.config.strict && i.emitError("Expected @public function to be exported using named or default export.", {
|
|
2379
2379
|
file: i.file,
|
|
2380
2380
|
node: e
|
|
2381
2381
|
})), i.produceDts && (c || g || f ? (b && (y.isAbstract = !0), y.hasQuestionToken = a.questionToken !== void 0 ? !0 : void 0) : y.isDefaultExported = V || void 0), c ? ro(
|
|
2382
2382
|
i,
|
|
2383
2383
|
n ?? e,
|
|
2384
2384
|
i.config.documentation.copyDocDefinitions.methods,
|
|
2385
|
-
|
|
2385
|
+
P,
|
|
2386
2386
|
i.apiObject
|
|
2387
2387
|
) : p && lo(
|
|
2388
2388
|
i,
|
|
2389
2389
|
n ?? e,
|
|
2390
2390
|
i.config.documentation.copyDocDefinitions.functions,
|
|
2391
|
-
|
|
2391
|
+
P,
|
|
2392
2392
|
i.apiModule
|
|
2393
|
-
),
|
|
2393
|
+
), P;
|
|
2394
2394
|
}
|
|
2395
2395
|
const Ht = (e, t) => (
|
|
2396
2396
|
// Keep ? as is
|
|
@@ -2700,8 +2700,8 @@ function ui(e, t, n, i) {
|
|
|
2700
2700
|
}
|
|
2701
2701
|
}
|
|
2702
2702
|
}
|
|
2703
|
-
const
|
|
2704
|
-
u ||= r !== void 0 || m ||
|
|
2703
|
+
const P = i.pairedSetter ?? (o.isSetAccessor(e) ? e : void 0), R = n ? void 0 : P;
|
|
2704
|
+
u ||= r !== void 0 || m || P !== void 0, d.isAccessor = u || void 0;
|
|
2705
2705
|
const I = R?.parameters[0].type, k = a.type;
|
|
2706
2706
|
let D = I ?? k;
|
|
2707
2707
|
if (D === void 0) {
|
|
@@ -2749,7 +2749,7 @@ function ui(e, t, n, i) {
|
|
|
2749
2749
|
if (B) {
|
|
2750
2750
|
!n && S.readonly === !0 && (S.docsOnlyReadonly = !0);
|
|
2751
2751
|
const T = i.program?.getTypeChecker?.();
|
|
2752
|
-
S.type.values = T !== void 0 && D.pos === -1 && (D.kind === o.SyntaxKind.TypeQuery || D.kind === o.SyntaxKind.IndexedAccessType || D.kind === o.SyntaxKind.ImportType || D.kind === o.SyntaxKind.TypeReference) ? vo(T.getTypeAtLocation(
|
|
2752
|
+
S.type.values = T !== void 0 && D.pos === -1 && (D.kind === o.SyntaxKind.TypeQuery || D.kind === o.SyntaxKind.IndexedAccessType || D.kind === o.SyntaxKind.ImportType || D.kind === o.SyntaxKind.TypeReference) ? vo(T.getTypeAtLocation(P?.parameters[0] ?? e)) : yo(D, T, P?.parameters[0] ?? e), (h === void 0 && S.type.values === void 0 && !i.config.context.isLuminaMinimalExtraction || S.readonly && !S.reflects) && (S.attribute = void 0);
|
|
2753
2753
|
const E = T !== void 0 && o.isPropertyDeclaration(e) && // BUG: should not check node.type here? but do check in property.getterType below
|
|
2754
2754
|
e.type !== void 0 && e.initializer !== void 0 && o.isPropertyAccessExpression(e.initializer) && o.isPropertyAccessExpression(e.initializer.expression) && e.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(e.initializer.expression.name) && o.isIdentifier(e.initializer.name);
|
|
2755
2755
|
if (("initializer" in e && e.initializer !== void 0 && (!S.default || !S.description) || E) && !p) {
|
|
@@ -2762,8 +2762,7 @@ function ui(e, t, n, i) {
|
|
|
2762
2762
|
_ ??= o.isGetAccessor(K) ? K : void 0, F ??= o.isSetAccessor(K) ? K : void 0, "initializer" in K && (S.default = Be(
|
|
2763
2763
|
K.initializer,
|
|
2764
2764
|
S.default,
|
|
2765
|
-
K.getSourceFile()
|
|
2766
|
-
i.isJsApi
|
|
2765
|
+
K.getSourceFile()
|
|
2767
2766
|
));
|
|
2768
2767
|
}
|
|
2769
2768
|
E && _?.type !== void 0 && F !== void 0 && _.type.getText() !== F.parameters[0]?.type?.getText() && (S.getterType = {
|
|
@@ -2780,11 +2779,10 @@ function ui(e, t, n, i) {
|
|
|
2780
2779
|
k.getText(i.file) !== I.getText(i.file) ? S.getterType = z(k, i) : S.readonly === !0 && S.name === "type" && D.kind === o.SyntaxKind.LiteralType && D.literal.kind === o.SyntaxKind.StringLiteral && (i.moduleContext.typeName = D.literal.text), (d.hasAutoCasting === !0 || d.isConstructorOnly === !0) && (S.readonly === !0 && d.isConstructorOnly !== !0 ? d.hasAutoCasting = void 0 : S.getterType ??= {
|
|
2781
2780
|
...S.type,
|
|
2782
2781
|
references: S.type.references === void 0 ? void 0 : [...S.type.references]
|
|
2783
|
-
}),
|
|
2782
|
+
}), n && D.kind === o.SyntaxKind.LiteralType || (S.default = Be(
|
|
2784
2783
|
e.initializer,
|
|
2785
2784
|
S.default,
|
|
2786
|
-
i.file
|
|
2787
|
-
i.isJsApi
|
|
2785
|
+
i.file
|
|
2788
2786
|
)), B) {
|
|
2789
2787
|
const T = N === void 0 && S.default === "true";
|
|
2790
2788
|
S.type.values?.length === 1 && S.type.values[0].type === "boolean" && (S.default === void 0 ? S.default = "false" : T && S.deprecated === void 0 && (i.loggedBooleanWarning || i.config.context.logger.error(
|
|
@@ -3203,7 +3201,7 @@ function Ao(e, t) {
|
|
|
3203
3201
|
type: z(c, t),
|
|
3204
3202
|
default: void 0
|
|
3205
3203
|
};
|
|
3206
|
-
return rn(p, t.jsDoc),
|
|
3204
|
+
return rn(p, t.jsDoc), m && c.kind === o.SyntaxKind.LiteralType || (p.default = Be(i.initializer, p.default, t.file)), co(
|
|
3207
3205
|
t,
|
|
3208
3206
|
e,
|
|
3209
3207
|
t.config.documentation.copyDocDefinitions.variables,
|
|
@@ -3257,19 +3255,19 @@ function Fo(e, t) {
|
|
|
3257
3255
|
const g = t.implicitPublicModules?.[l], C = t.isJsApi && l.startsWith("applications/");
|
|
3258
3256
|
t.statementJsDocs.length = 0;
|
|
3259
3257
|
for (let b = 0; b < e.statements.length; ++b) {
|
|
3260
|
-
const v = e.statements[b],
|
|
3258
|
+
const v = e.statements[b], P = v.kind === o.SyntaxKind.ClassDeclaration || v.kind === o.SyntaxKind.FunctionDeclaration || v.kind === o.SyntaxKind.InterfaceDeclaration || v.kind === o.SyntaxKind.TypeAliasDeclaration || v.kind === o.SyntaxKind.VariableStatement;
|
|
3261
3259
|
let R;
|
|
3262
3260
|
if (
|
|
3263
3261
|
// Only look at web components in Lumina's dev server
|
|
3264
3262
|
t.isInLuminaMinimalExtraction
|
|
3265
3263
|
)
|
|
3266
3264
|
R = v.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && v.heritageClauses !== void 0 && v.modifiers !== void 0 ? Ue : void 0;
|
|
3267
|
-
else if (
|
|
3265
|
+
else if (P)
|
|
3268
3266
|
if (R = j(v, !0, t), R === void 0 && !t.config.strict) {
|
|
3269
3267
|
const I = j(v, !1, t) ?? { description: void 0, docsTags: [] }, k = v.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && v.heritageClauses !== void 0 && v.modifiers !== void 0;
|
|
3270
3268
|
I.docsTags.includes(W.private) ? k && t.config.context.includeLuminaPrivateComponents ? (R = Ee, t.isInLuminaMinimalExtraction = !0) : R = void 0 : (k || g !== void 0 && Ln(v, g)) && (R = I);
|
|
3271
3269
|
} else R === void 0 && t.componentTagName !== void 0 && t.config.context.includeLuminaPrivateComponents && v.kind === o.SyntaxKind.ClassDeclaration && (R = Ee, t.isInLuminaMinimalExtraction = !0);
|
|
3272
|
-
if (t.statementJsDocs[b] = R,
|
|
3270
|
+
if (t.statementJsDocs[b] = R, P || b === 0 && (p = j(e, !0, t)), R !== void 0)
|
|
3273
3271
|
C && R.docsTags.push(W.internal), m.add(
|
|
3274
3272
|
(v.name ?? v.declarationList?.declarations[0].name).escapedText
|
|
3275
3273
|
), v.kind === o.SyntaxKind.ClassDeclaration ? t.apiClassLikeName = v.name?.escapedText : v.kind === o.SyntaxKind.VariableStatement && v.declarationList.declarations[0].initializer?.kind === o.SyntaxKind.ArrowFunction && (t.apiClassLikeName = v.declarationList.declarations[0].name.escapedText);
|
|
@@ -3347,7 +3345,7 @@ function Fo(e, t) {
|
|
|
3347
3345
|
specifiers: $
|
|
3348
3346
|
});
|
|
3349
3347
|
}
|
|
3350
|
-
} else o.isModuleDeclaration(v) ? j(v, !0, t) !== void 0 && (u.namespaces ??= [], u.namespaces.push(v.getFullText(e))) : d !== void 0 &&
|
|
3348
|
+
} else o.isModuleDeclaration(v) ? j(v, !0, t) !== void 0 && (u.namespaces ??= [], u.namespaces.push(v.getFullText(e))) : d !== void 0 && P && d.set(
|
|
3351
3349
|
(v.name ?? v.declarationList?.declarations[0].name).escapedText,
|
|
3352
3350
|
-b
|
|
3353
3351
|
);
|
|
@@ -3356,8 +3354,8 @@ function Fo(e, t) {
|
|
|
3356
3354
|
if (y !== void 0) {
|
|
3357
3355
|
const b = Object.keys(y);
|
|
3358
3356
|
for (let v = 0; v < b.length; ++v) {
|
|
3359
|
-
const
|
|
3360
|
-
c[
|
|
3357
|
+
const P = b[v], R = y[P];
|
|
3358
|
+
c[P] = {
|
|
3361
3359
|
type: R[2],
|
|
3362
3360
|
modulePath: R[0],
|
|
3363
3361
|
specifier: ye(s, R[0]),
|
|
@@ -3384,10 +3382,10 @@ function Fo(e, t) {
|
|
|
3384
3382
|
let b = !1;
|
|
3385
3383
|
do {
|
|
3386
3384
|
b = !1;
|
|
3387
|
-
for (const [v,
|
|
3388
|
-
if (
|
|
3385
|
+
for (const [v, P] of d)
|
|
3386
|
+
if (P > 0 || Object.is(P, 0)) {
|
|
3389
3387
|
d.delete(v), m.add(v), b = !0;
|
|
3390
|
-
const R = e.statements[
|
|
3388
|
+
const R = e.statements[P], I = j(R, !1, t) ?? { description: void 0, docsTags: [] };
|
|
3391
3389
|
if (I.docsTags.includes(W.private))
|
|
3392
3390
|
t.emitError(
|
|
3393
3391
|
`Declaration "${v}" is marked @private but is used by public API in the same file. Either refactor our its reference or remove the @private tag.`,
|
|
@@ -3397,8 +3395,8 @@ function Fo(e, t) {
|
|
|
3397
3395
|
}
|
|
3398
3396
|
);
|
|
3399
3397
|
else {
|
|
3400
|
-
t.statementJsDocs[
|
|
3401
|
-
const D = gi(R,
|
|
3398
|
+
t.statementJsDocs[P] = I;
|
|
3399
|
+
const D = gi(R, P, t);
|
|
3402
3400
|
D !== void 0 && h.declarations.push(D);
|
|
3403
3401
|
}
|
|
3404
3402
|
}
|
|
@@ -3495,14 +3493,14 @@ async function fa(e) {
|
|
|
3495
3493
|
continue;
|
|
3496
3494
|
if (u.pendingNames !== void 0) {
|
|
3497
3495
|
const b = e.watchFiles?.get(e.config.context.basePath + u.sourcePath);
|
|
3498
|
-
let
|
|
3496
|
+
let P = !(b !== void 0 && b.module === void 0 && !b.isEmptyModule);
|
|
3499
3497
|
const R = C === void 0 ? void 0 : ae(C).index;
|
|
3500
3498
|
for (const I of u.pendingNames)
|
|
3501
3499
|
if (!u.extractedNames.has(I) && (R === void 0 || (I === "default" ? R.default === void 0 : R.named[I] === void 0))) {
|
|
3502
|
-
|
|
3500
|
+
P = !1;
|
|
3503
3501
|
break;
|
|
3504
3502
|
}
|
|
3505
|
-
if (
|
|
3503
|
+
if (P)
|
|
3506
3504
|
continue;
|
|
3507
3505
|
}
|
|
3508
3506
|
if (C !== void 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/api-extractor",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.142",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"commander": "^14.0.0",
|
|
51
51
|
"tslib": "^2.8.1",
|
|
52
52
|
"vite": "^7.2.2",
|
|
53
|
-
"@arcgis/components-build-utils": "5.0.0-next.
|
|
54
|
-
"@arcgis/toolkit": "5.0.0-next.
|
|
53
|
+
"@arcgis/components-build-utils": "5.0.0-next.142",
|
|
54
|
+
"@arcgis/toolkit": "5.0.0-next.142"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"typescript": "~5.9.3",
|