@arcgis/api-extractor 5.2.0-next.6 → 5.2.0-next.7
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-Czsu8T1F.js → ApiExtractor-tyNgfIRY.js} +2 -2
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/{typeScript-CzxI8NsH.js → typeScript-CSnL-3Jn.js} +1 -1
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/{worker-BmWcv5VA.js → worker-CJgRboHb.js} +71 -73
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as H, a as se, e as De, p as pe } from "./typeScript-
|
|
2
|
-
import { a as xe, o as Pe, t as Le, b as Oe, c as Ne, e as Be, p as We, d as Ue, f as _, i as ue, g as je, h as ze, j as He, k as Je, n as Ve, r as Xe } from "./worker-
|
|
1
|
+
import { l as H, a as se, e as De, p as pe } from "./typeScript-CSnL-3Jn.js";
|
|
2
|
+
import { a as xe, o as Pe, t as Le, b as Oe, c as Ne, e as Be, p as We, d as Ue, f as _, i as ue, g as je, h as ze, j as He, k as Je, n as Ve, r as Xe } from "./worker-CJgRboHb.js";
|
|
3
3
|
import { getViewUrl as Ye, postProcessDeprecated as Q, postProcessDescription as R, postProcessDocsTags as V, resolveJsDocLink as qe } from "./extractor/processing/links.js";
|
|
4
4
|
import E from "typescript";
|
|
5
5
|
import { path as N, toPosixPathSeparators as Ze } from "@arcgis/components-build-utils";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-CSnL-3Jn.js";
|
|
2
|
+
import "../worker-CJgRboHb.js";
|
|
3
3
|
import "./processing/links.js";
|
|
4
4
|
import "typescript";
|
|
5
|
-
import { A as x } from "../ApiExtractor-
|
|
5
|
+
import { A as x } from "../ApiExtractor-tyNgfIRY.js";
|
|
6
6
|
import "@arcgis/toolkit/function";
|
|
7
7
|
export {
|
|
8
8
|
x as ApiExtractor
|
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-CSnL-3Jn.js";
|
|
3
|
+
import { l, m as n, r as A } from "../worker-CJgRboHb.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { findPath as E, path as u, toSystemPathSeparators as S } from "@arcgis/components-build-utils";
|
|
2
2
|
import t from "typescript";
|
|
3
3
|
import { styleText as f } from "util";
|
|
4
|
-
const w = "@arcgis/api-extractor", P = "5.2.0-next.
|
|
4
|
+
const w = "@arcgis/api-extractor", P = "5.2.0-next.7", D = {
|
|
5
5
|
name: w,
|
|
6
6
|
version: P
|
|
7
7
|
};
|
package/dist/vite/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as O, m as J } from "../worker-
|
|
2
|
-
import { A as S, w as T } from "../ApiExtractor-
|
|
3
|
-
import { p as A, l as C } from "../typeScript-
|
|
1
|
+
import { l as O, m as J } from "../worker-CJgRboHb.js";
|
|
2
|
+
import { A as S, w as T } from "../ApiExtractor-tyNgfIRY.js";
|
|
3
|
+
import { p as A, l as C } from "../typeScript-CSnL-3Jn.js";
|
|
4
4
|
import { writeFile as M } from "node:fs/promises";
|
|
5
5
|
import { path as w } from "@arcgis/components-build-utils";
|
|
6
6
|
const N = A.name;
|
package/dist/vite/typeScript.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { path as $e, existsAsync as Zt, getCwd as Ri, retrievePackageJson as dt, toPosixPathSeparators as Li } from "@arcgis/components-build-utils";
|
|
2
|
-
import { b as Ii, p as Ai, l as ki } from "./typeScript-
|
|
2
|
+
import { b as Ii, p as Ai, l as ki } from "./typeScript-CSnL-3Jn.js";
|
|
3
3
|
import { getDefaultBasePath as ei, buildViewUrl as Gi, getViewUrl as Ve } from "./extractor/processing/links.js";
|
|
4
4
|
import o from "typescript";
|
|
5
5
|
import "fs/promises";
|
|
@@ -9,7 +9,7 @@ import { styleText as ie } from "node:util";
|
|
|
9
9
|
import { readFile as It, opendir as At, rm as Hi } from "node:fs/promises";
|
|
10
10
|
import { pathIsComponentEntrypoint as $i, findDeclaredComponent as zi } from "./extractor/webComponent/findComponents.js";
|
|
11
11
|
import { renameComponentFolder as We, addComponentPathMapping as ji } from "./extractor/webComponent/pathMapping.js";
|
|
12
|
-
import { getBasename as Z, getPackageNameFromExternalSpecifier as pt, extractInitializer as ze, extractBooleanInitializer as Y, findDecorator as
|
|
12
|
+
import { getBasename as Z, getPackageNameFromExternalSpecifier as pt, extractInitializer as ze, extractBooleanInitializer as Y, findDecorator as De, getMemberName as Re } from "./utils/astHelpers.js";
|
|
13
13
|
import { readFileSync as Ji, existsSync as fe } from "node:fs";
|
|
14
14
|
import { uncapitalize as qi, camelToKebab as Qi, kebabToPascal as Xi } from "@arcgis/toolkit/string";
|
|
15
15
|
import { globalPackageIdentifier as ce, mergeApiNodes as Yi, isApiMethodAsync as Zi } from "./utils/apiHelpers.js";
|
|
@@ -534,9 +534,7 @@ function yn(e, t, n) {
|
|
|
534
534
|
export abstract class __FeatureLayerSansType extends FeatureLayerSuperclass {`;
|
|
535
535
|
return e.slice(0, a) + p + e.slice(a + i.length, c) + e.slice(s);
|
|
536
536
|
}
|
|
537
|
-
case "layers/OrientedImageryLayer":
|
|
538
|
-
case "layers/AnnotationLayer":
|
|
539
|
-
case "layers/DimensionFeatureLayer": {
|
|
537
|
+
case "layers/OrientedImageryLayer": {
|
|
540
538
|
const i = `import type { __FeatureLayerSansType } from "./FeatureLayer.js";
|
|
541
539
|
`, a = `extends FeatureLayer {
|
|
542
540
|
`, r = e.indexOf(a);
|
|
@@ -569,25 +567,25 @@ function ga(e, t) {
|
|
|
569
567
|
|
|
570
568
|
`, a = "", r = "", l = "", s = "", c = "", p = "", d = "", m = "", f = "", u = "", g = "", C = "";
|
|
571
569
|
for (let S = 0; S < e.length; ++S) {
|
|
572
|
-
const
|
|
573
|
-
for (let A = 0; A <
|
|
574
|
-
const V =
|
|
570
|
+
const D = e[S];
|
|
571
|
+
for (let A = 0; A < D.declarations.length; ++A) {
|
|
572
|
+
const V = D.declarations[A];
|
|
575
573
|
if (V.customElement !== !0)
|
|
576
574
|
continue;
|
|
577
575
|
const W = V;
|
|
578
576
|
if (W.privacy !== void 0 || me(W).hasExplicitAbstract === !0)
|
|
579
577
|
continue;
|
|
580
578
|
const { name: G, tagName: O, pascalCaseName: F, events: B } = W;
|
|
581
|
-
i += `import type { ${G} } from "./${
|
|
582
|
-
`, n += `import type { ${G} } from "../${
|
|
579
|
+
i += `import type { ${G} } from "./${D.path}/customElement.js";
|
|
580
|
+
`, n += `import type { ${G} } from "../${D.path}/customElement.js";
|
|
583
581
|
`;
|
|
584
582
|
const [ue, Ge] = vn(W.name, W.members);
|
|
585
583
|
let te = "", q = "";
|
|
586
584
|
if (B !== void 0) {
|
|
587
585
|
for (let pe = 0; pe < B.length; ++pe) {
|
|
588
|
-
const Fe = B[pe],
|
|
589
|
-
te += ` ${Rt(`on${Fe.name}`)}?: ${
|
|
590
|
-
`, q += ` ${Rt(`on${Fe.name[0].toUpperCase()}${Fe.name.slice(1)}`)}?: ${
|
|
586
|
+
const Fe = B[pe], Dt = `EventHandler<${G}["${Fe.name}"]>`;
|
|
587
|
+
te += ` ${Rt(`on${Fe.name}`)}?: ${Dt};
|
|
588
|
+
`, q += ` ${Rt(`on${Fe.name[0].toUpperCase()}${Fe.name.slice(1)}`)}?: ${Dt};
|
|
591
589
|
`;
|
|
592
590
|
}
|
|
593
591
|
a += `export interface ${F}CustomEvent<T> extends CustomEvent<T> {
|
|
@@ -682,9 +680,9 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
|
|
|
682
680
|
export namespace h.JSX {
|
|
683
681
|
interface IntrinsicElements extends ExposedElements {}
|
|
684
682
|
}
|
|
685
|
-
}`,
|
|
683
|
+
}`, x = `/** @deprecated import from stencil.d.ts instead */
|
|
686
684
|
export * from "./stencil.js";`, T = `${t.config.context.dtsEmitPath}types/`, _ = `${T}lumina.d.ts`, N = `${T}preact.d.ts`, J = `${T}react.d.ts`, K = `${T}stencil.d.ts`, E = `${T}components.d.ts`;
|
|
687
|
-
t.dtsFiles.set(_, R), t.dtsFiles.set(N, y), t.dtsFiles.set(J, M), t.dtsFiles.set(K, L), t.dtsFiles.set(E,
|
|
685
|
+
t.dtsFiles.set(_, R), t.dtsFiles.set(N, y), t.dtsFiles.set(J, M), t.dtsFiles.set(K, L), t.dtsFiles.set(E, x);
|
|
688
686
|
}
|
|
689
687
|
function vn(e, t) {
|
|
690
688
|
const n = [], i = [];
|
|
@@ -1086,13 +1084,13 @@ function Ut(e, t, n) {
|
|
|
1086
1084
|
}
|
|
1087
1085
|
const a = [];
|
|
1088
1086
|
for (const l of e.matchAll(Pn)) {
|
|
1089
|
-
const s = l[1], c =
|
|
1087
|
+
const s = l[1], c = Dn(s), p = e.indexOf("{", l.index), d = e.indexOf("}", p), m = e.slice(0, l.index).trimEnd();
|
|
1090
1088
|
let f = "";
|
|
1091
1089
|
if (m.endsWith("*/")) {
|
|
1092
1090
|
const C = m.lastIndexOf("/**");
|
|
1093
1091
|
f = m.slice(C + 3, -2).trim().replaceAll(Mn, "");
|
|
1094
1092
|
}
|
|
1095
|
-
const u = e.slice(p, d).match(bn)?.[1] || c, g =
|
|
1093
|
+
const u = e.slice(p, d).match(bn)?.[1] || c, g = xn(c);
|
|
1096
1094
|
a.push({
|
|
1097
1095
|
description: `${u}${f ? `
|
|
1098
1096
|
${f}` : ""}`,
|
|
@@ -1110,7 +1108,7 @@ ${f}` : ""}`,
|
|
|
1110
1108
|
const r = n.componentStories[i];
|
|
1111
1109
|
r === void 0 ? n.componentStories[i] = a : r.push(...a);
|
|
1112
1110
|
}
|
|
1113
|
-
const Cn = /component: ["']([^"']+)["']/u, Pn = /export const (\w+)/gu, bn = /name: ["']([^"']+)["']/u, Mn = /^\s*\*\s?/gmu,
|
|
1111
|
+
const Cn = /component: ["']([^"']+)["']/u, Pn = /export const (\w+)/gu, bn = /name: ["']([^"']+)["']/u, Mn = /^\s*\*\s?/gmu, xn = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), Dn = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, n, i, a) => `${n} ${i}${a}`).replace(/([a-z])([A-Z])/gu, (t, n, i) => `${n} ${i}`).replace(/([a-z])([0-9])/giu, (t, n, i) => `${n} ${i}`).replace(/([0-9])([a-z])/giu, (t, n, i) => `${n} ${i}`).replace(/(\s|^)(\w)/gu, (t, n, i) => `${n}${i.toUpperCase()}`).replace(/ +/gu, " ").trim();
|
|
1114
1112
|
function ut(e, t) {
|
|
1115
1113
|
let i = t.startsWith("./") ? t.slice(2) : t, a = e;
|
|
1116
1114
|
for (; ; ) {
|
|
@@ -2315,7 +2313,7 @@ function ke(e, t, n, i) {
|
|
|
2315
2313
|
privacy: h,
|
|
2316
2314
|
source: void 0
|
|
2317
2315
|
}, k = y, M = pn(y, i.jsDoc), L = C ? [] : e.parameters;
|
|
2318
|
-
let
|
|
2316
|
+
let x = M.length, T = !1, _ = 0;
|
|
2319
2317
|
for (let E = 0; E < L.length; ++E) {
|
|
2320
2318
|
const S = L[E], A = o.isIdentifier(S.name) ? S.name.escapedText : void 0;
|
|
2321
2319
|
if (A === "this") {
|
|
@@ -2324,7 +2322,7 @@ function ke(e, t, n, i) {
|
|
|
2324
2322
|
}
|
|
2325
2323
|
const W = u && A !== void 0 && S.modifiers !== void 0 && S.modifiers.length > 0 ? oe(S, !0, i) : void 0;
|
|
2326
2324
|
if (W !== void 0) {
|
|
2327
|
-
_ -= 1,
|
|
2325
|
+
_ -= 1, x += 1, i.jsDoc = W;
|
|
2328
2326
|
const q = Ti(S, A, !1, i);
|
|
2329
2327
|
if (q === void 0)
|
|
2330
2328
|
continue;
|
|
@@ -2384,7 +2382,7 @@ function ke(e, t, n, i) {
|
|
|
2384
2382
|
};
|
|
2385
2383
|
te.optional = zt(S, te), y.parameters.push(te);
|
|
2386
2384
|
}
|
|
2387
|
-
if (i.config.strict && !T &&
|
|
2385
|
+
if (i.config.strict && !T && x !== y.parameters.length && i.emitError(
|
|
2388
2386
|
`Expected @param tags to match the number of parameters on a public function. Found ${M.length} @param tags for ${y.parameters.length} TypeScript parameters. Documentation: https://webgis.esri.com/references/api-extractor/tags-reference#param)${g ? " and https://webgis.esri.com/references/api-extractor/api-node-kinds#constructor" : ""}`,
|
|
2389
2387
|
{ file: i.file, node: e }
|
|
2390
2388
|
), y.parameters.length === 0)
|
|
@@ -2392,8 +2390,8 @@ function ke(e, t, n, i) {
|
|
|
2392
2390
|
else {
|
|
2393
2391
|
let E = !0;
|
|
2394
2392
|
for (let S = y.parameters.length - 1; S >= 0; S--) {
|
|
2395
|
-
const
|
|
2396
|
-
E &&=
|
|
2393
|
+
const D = y.parameters[S];
|
|
2394
|
+
E &&= D.optional === !0 || D.rest === !0 || D.default !== void 0, !E && D.optional && (D.optional = void 0, D.type.text.endsWith(" | undefined") || (D.type.text += " | undefined"));
|
|
2397
2395
|
}
|
|
2398
2396
|
}
|
|
2399
2397
|
l && i.componentTagName !== void 0 && (k.signature = Ki(k), I && !Zi(k) && i.emitError("Public method marked as async must have a Promise<SomeType> return type annotation.", {
|
|
@@ -2424,10 +2422,10 @@ const zt = (e, t) => (
|
|
|
2424
2422
|
e.initializer !== void 0 && t.default === void 0 ? !0 : void 0
|
|
2425
2423
|
);
|
|
2426
2424
|
function Po(e, t, n) {
|
|
2427
|
-
return ht(),
|
|
2425
|
+
return ht(), xe(e, t), Mt && t !== void 0 && n !== void 0 && (ht(), xt(t.getTypeAtLocation(n))), Si();
|
|
2428
2426
|
}
|
|
2429
2427
|
function bo(e) {
|
|
2430
|
-
return ht(),
|
|
2428
|
+
return ht(), xt(e), Si();
|
|
2431
2429
|
}
|
|
2432
2430
|
let Ie = !1, ae = !1, re = !1, Ae = !1, se = !1, Mt = !1;
|
|
2433
2431
|
const le = [], ee = [];
|
|
@@ -2445,11 +2443,11 @@ function Si() {
|
|
|
2445
2443
|
if (ee.length > 0)
|
|
2446
2444
|
for (let t = 0; t < ee.length; ++t)
|
|
2447
2445
|
e.push({ type: "number", value: ee[t] });
|
|
2448
|
-
else se && e.push(
|
|
2449
|
-
return Ae && e.push(
|
|
2446
|
+
else se && e.push(xo);
|
|
2447
|
+
return Ae && e.push(Do), Ie ? e.push(Ro) : ae && e.push(Lo), e;
|
|
2450
2448
|
}
|
|
2451
|
-
const Mo = { type: "string", value: void 0 },
|
|
2452
|
-
function
|
|
2449
|
+
const Mo = { type: "string", value: void 0 }, xo = { type: "number", value: void 0 }, Do = { type: "boolean", value: void 0 }, Ro = { type: "any", value: void 0 }, Lo = { type: "object", value: void 0 };
|
|
2450
|
+
function xe(e, t) {
|
|
2453
2451
|
switch (e.kind) {
|
|
2454
2452
|
case o.SyntaxKind.BooleanKeyword:
|
|
2455
2453
|
case o.SyntaxKind.TrueKeyword:
|
|
@@ -2467,7 +2465,7 @@ function De(e, t) {
|
|
|
2467
2465
|
Ie = !0;
|
|
2468
2466
|
return;
|
|
2469
2467
|
case o.SyntaxKind.LiteralType:
|
|
2470
|
-
|
|
2468
|
+
xe(e.literal, t);
|
|
2471
2469
|
return;
|
|
2472
2470
|
case o.SyntaxKind.StringLiteral:
|
|
2473
2471
|
case o.SyntaxKind.NoSubstitutionTemplateLiteral:
|
|
@@ -2487,17 +2485,17 @@ function De(e, t) {
|
|
|
2487
2485
|
case o.SyntaxKind.UnionType:
|
|
2488
2486
|
const i = e.types, a = Math.min(i.length, Ze);
|
|
2489
2487
|
for (let l = 0; l < a; ++l)
|
|
2490
|
-
|
|
2488
|
+
xe(i[l], t);
|
|
2491
2489
|
i.length > Ze && (le.length = 0, ee.length = 0);
|
|
2492
2490
|
return;
|
|
2493
2491
|
case o.SyntaxKind.ParenthesizedType:
|
|
2494
|
-
|
|
2492
|
+
xe(e.type, t);
|
|
2495
2493
|
return;
|
|
2496
2494
|
case o.SyntaxKind.TypeQuery:
|
|
2497
2495
|
case o.SyntaxKind.IndexedAccessType:
|
|
2498
2496
|
case o.SyntaxKind.ImportType:
|
|
2499
2497
|
case o.SyntaxKind.TypeReference:
|
|
2500
|
-
t === void 0 ? ae = !0 :
|
|
2498
|
+
t === void 0 ? ae = !0 : xt(
|
|
2501
2499
|
t.getTypeFromTypeNode(
|
|
2502
2500
|
e
|
|
2503
2501
|
)
|
|
@@ -2505,7 +2503,7 @@ function De(e, t) {
|
|
|
2505
2503
|
return;
|
|
2506
2504
|
case o.SyntaxKind.TypeOperator:
|
|
2507
2505
|
const r = e;
|
|
2508
|
-
r.operator === o.SyntaxKind.KeyOfKeyword ? re = !0 : r.operator === o.SyntaxKind.ReadonlyKeyword ?
|
|
2506
|
+
r.operator === o.SyntaxKind.KeyOfKeyword ? re = !0 : r.operator === o.SyntaxKind.ReadonlyKeyword ? xe(r.type, t) : ae = !0;
|
|
2509
2507
|
return;
|
|
2510
2508
|
/*case ts.SyntaxKind.UnknownKeyword:
|
|
2511
2509
|
case ts.SyntaxKind.FunctionType:
|
|
@@ -2523,7 +2521,7 @@ function De(e, t) {
|
|
|
2523
2521
|
}
|
|
2524
2522
|
}
|
|
2525
2523
|
const Ze = 40;
|
|
2526
|
-
function
|
|
2524
|
+
function xt(e) {
|
|
2527
2525
|
if (e.isUnion()) {
|
|
2528
2526
|
const t = Math.min(e.types.length, Ze);
|
|
2529
2527
|
for (let n = 0; n < t; ++n)
|
|
@@ -2644,7 +2642,7 @@ function Ti(e, t, n, i) {
|
|
|
2644
2642
|
i.emitError("Computed property names are not yet supported", { file: i.file, node: e });
|
|
2645
2643
|
return;
|
|
2646
2644
|
}
|
|
2647
|
-
const a = e, r =
|
|
2645
|
+
const a = e, r = De(a.modifiers, "property") ?? (i.pairedSetter === void 0 ? void 0 : De(i.pairedSetter.modifiers, "property")), l = r?.arguments[0], s = l !== void 0 && o.isObjectLiteralExpression(l) ? l.properties : void 0, c = o.isPropertyDeclaration(e) || o.isPropertySignature(e), p = o.isGetAccessor(e), d = Oi(), m = i.isInLuminaMinimalExtraction || i.jsDoc === Pe;
|
|
2648
2646
|
let f = !1, u = !1, g, C = !1, v, P, h;
|
|
2649
2647
|
if (c && e.modifiers !== void 0)
|
|
2650
2648
|
for (let E = 0; E < e.modifiers.length; ++E)
|
|
@@ -2676,8 +2674,8 @@ function Ti(e, t, n, i) {
|
|
|
2676
2674
|
I ||= o.isSpreadAssignment(S);
|
|
2677
2675
|
continue;
|
|
2678
2676
|
}
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2677
|
+
const D = S.name.escapedText;
|
|
2678
|
+
D === "readOnly" && Y(S.initializer, i) ? n = !0 : D === "constructOnly" && Y(S.initializer, i) ? d.isConstructorOnly = !0 : D === "type" ? d.hasAutoCasting = !0 : D === "types" && Fo(
|
|
2681
2679
|
d,
|
|
2682
2680
|
S.initializer?.kind === o.SyntaxKind.ObjectLiteralExpression ? S.initializer : void 0
|
|
2683
2681
|
);
|
|
@@ -2707,17 +2705,17 @@ function Ti(e, t, n, i) {
|
|
|
2707
2705
|
}
|
|
2708
2706
|
} else if (s !== void 0)
|
|
2709
2707
|
for (let S = 0; S < s.length; ++S) {
|
|
2710
|
-
const
|
|
2711
|
-
if (!(!o.isPropertyAssignment(
|
|
2712
|
-
switch (
|
|
2708
|
+
const D = s[S];
|
|
2709
|
+
if (!(!o.isPropertyAssignment(D) || !o.isIdentifier(D.name)))
|
|
2710
|
+
switch (D.name.escapedText) {
|
|
2713
2711
|
case "attribute":
|
|
2714
|
-
o.isStringLiteral(
|
|
2712
|
+
o.isStringLiteral(D.initializer) ? P = D.initializer.text : P = Y(D.initializer, i);
|
|
2715
2713
|
continue;
|
|
2716
2714
|
case "reflect":
|
|
2717
|
-
Y(
|
|
2715
|
+
Y(D.initializer, i) && (P ??= !0, h = !0);
|
|
2718
2716
|
continue;
|
|
2719
2717
|
case "readOnly":
|
|
2720
|
-
Y(
|
|
2718
|
+
Y(D.initializer, i) && (n = !0);
|
|
2721
2719
|
continue;
|
|
2722
2720
|
case "type":
|
|
2723
2721
|
case "converter":
|
|
@@ -2729,22 +2727,22 @@ function Ti(e, t, n, i) {
|
|
|
2729
2727
|
const y = i.pairedSetter ?? (o.isSetAccessor(e) ? e : void 0), k = n ? void 0 : y;
|
|
2730
2728
|
u ||= r !== void 0 || p || y !== void 0, d.isAccessor = u || void 0;
|
|
2731
2729
|
const M = k?.parameters[0].type, L = a.type;
|
|
2732
|
-
let
|
|
2733
|
-
if (
|
|
2730
|
+
let x = M ?? L;
|
|
2731
|
+
if (x === void 0) {
|
|
2734
2732
|
const E = k?.parameters[0].initializer ?? e.initializer;
|
|
2735
2733
|
if (c && E !== void 0 && o.isArrowFunction(E)) {
|
|
2736
2734
|
if (n)
|
|
2737
2735
|
return $t(E, t, e, i);
|
|
2738
2736
|
qt(e, i);
|
|
2739
2737
|
}
|
|
2740
|
-
|
|
2738
|
+
x = E === void 0 ? qn(e, i) ?? X(
|
|
2741
2739
|
{ file: i.file, node: e },
|
|
2742
2740
|
"Public property must have a type annotation or a default value",
|
|
2743
2741
|
i
|
|
2744
2742
|
) : Ct(E, n ? w.shallow : w.false, i.file, i);
|
|
2745
|
-
} else if (
|
|
2743
|
+
} else if (x = Pt(x), c && o.isFunctionTypeNode(x)) {
|
|
2746
2744
|
if (n)
|
|
2747
|
-
return $t(
|
|
2745
|
+
return $t(x, t, e, i);
|
|
2748
2746
|
qt(e, i);
|
|
2749
2747
|
}
|
|
2750
2748
|
const T = {
|
|
@@ -2757,7 +2755,7 @@ function Ti(e, t, n, i) {
|
|
|
2757
2755
|
description: void 0,
|
|
2758
2756
|
docsTags: void 0,
|
|
2759
2757
|
// In minimal extraction, we care only for type.values (set below)
|
|
2760
|
-
type: m ? { ...vi } : z(
|
|
2758
|
+
type: m ? { ...vi } : z(x, i),
|
|
2761
2759
|
getterType: void 0,
|
|
2762
2760
|
default: void 0,
|
|
2763
2761
|
readonly: n || void 0,
|
|
@@ -2775,11 +2773,11 @@ function Ti(e, t, n, i) {
|
|
|
2775
2773
|
if (N) {
|
|
2776
2774
|
!n && T.readonly === !0 && (T.docsOnlyReadonly = !0);
|
|
2777
2775
|
const E = i.program?.getTypeChecker?.();
|
|
2778
|
-
T.type.values = E !== void 0 &&
|
|
2776
|
+
T.type.values = E !== void 0 && x.pos === -1 && (x.kind === o.SyntaxKind.TypeQuery || x.kind === o.SyntaxKind.IndexedAccessType || x.kind === o.SyntaxKind.ImportType || x.kind === o.SyntaxKind.TypeReference) ? bo(E.getTypeAtLocation(y?.parameters[0] ?? e)) : Po(x, E, y?.parameters[0] ?? e), (P === void 0 && T.type.values === void 0 && !i.config.context.isLuminaMinimalExtraction || T.readonly && !T.reflects) && (T.attribute = void 0);
|
|
2779
2777
|
const S = E !== void 0 && o.isPropertyDeclaration(e) && // BUG: should not check node.type here? but do check in property.getterType below
|
|
2780
2778
|
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);
|
|
2781
2779
|
if (("initializer" in e && e.initializer !== void 0 && (!T.default || !T.description) || S) && !m) {
|
|
2782
|
-
const
|
|
2780
|
+
const D = e.initializer, A = E?.getSymbolAtLocation(D), V = A !== void 0 && ((A.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? E?.getAliasedSymbol(A) : A;
|
|
2783
2781
|
let W, G;
|
|
2784
2782
|
const O = V?.getDeclarations();
|
|
2785
2783
|
if (O !== void 0)
|
|
@@ -2802,10 +2800,10 @@ function Ti(e, t, n, i) {
|
|
|
2802
2800
|
if (L !== void 0 && M !== void 0 && !m && // Quick perf check: type is definitely the same if raw type string matches.
|
|
2803
2801
|
// More reliable check follows in processing/index.ts, where printed normalized
|
|
2804
2802
|
// type string is compared.
|
|
2805
|
-
L.getText(i.file) !== M.getText(i.file) ? T.getterType = z(L, i) : T.readonly === !0 && T.name === "type" &&
|
|
2803
|
+
L.getText(i.file) !== M.getText(i.file) ? T.getterType = z(L, i) : T.readonly === !0 && T.name === "type" && x.kind === o.SyntaxKind.LiteralType && x.literal.kind === o.SyntaxKind.StringLiteral && (i.moduleContext.typeName = x.literal.text), (d.hasAutoCasting === !0 || d.isConstructorOnly === !0) && (T.readonly === !0 && d.isConstructorOnly !== !0 ? d.hasAutoCasting = void 0 : T.getterType ??= {
|
|
2806
2804
|
...T.type,
|
|
2807
2805
|
references: T.type.references === void 0 ? void 0 : [...T.type.references]
|
|
2808
|
-
}), n &&
|
|
2806
|
+
}), n && x.kind === o.SyntaxKind.LiteralType || (T.default = ze(
|
|
2809
2807
|
e.initializer,
|
|
2810
2808
|
T.default,
|
|
2811
2809
|
i.file
|
|
@@ -2823,7 +2821,7 @@ function Ti(e, t, n, i) {
|
|
|
2823
2821
|
i.apiObject
|
|
2824
2822
|
), i.produceDts && C && (d.isAbstract = !0), c && e.questionToken !== void 0 && (T.type.text.endsWith(" | undefined") || (T.type.text = // Don't need to wrap non-accessors in |undefined as we replace |undefined
|
|
2825
2823
|
// with ? during printing
|
|
2826
|
-
u && (
|
|
2824
|
+
u && (x.kind === o.SyntaxKind.FunctionType || x.kind === o.SyntaxKind.ConstructorType || x.kind === o.SyntaxKind.ConditionalType || x.kind === o.SyntaxKind.InferType) ? `(${T.type.text}) | undefined` : `${T.type.text} | undefined`), T.getterType !== void 0 && !T.getterType.text.endsWith(" | undefined") && (T.getterType.text += " | undefined")), T;
|
|
2827
2825
|
}
|
|
2828
2826
|
function qt(e, t) {
|
|
2829
2827
|
if (!t.config.strict)
|
|
@@ -3040,7 +3038,7 @@ const ct = o.factory.createTypeLiteralNode(void 0);
|
|
|
3040
3038
|
function Qt(e, t, n) {
|
|
3041
3039
|
if (e.kind === o.SyntaxKind.PropertyDeclaration || e.kind === o.SyntaxKind.GetAccessor || e.kind === o.SyntaxKind.SetAccessor) {
|
|
3042
3040
|
const i = e;
|
|
3043
|
-
if ((
|
|
3041
|
+
if ((De(i.modifiers, "property") ?? (t === void 0 ? void 0 : De(t.modifiers, "property"))) !== void 0)
|
|
3044
3042
|
return !0;
|
|
3045
3043
|
if (!n)
|
|
3046
3044
|
return !1;
|
|
@@ -3053,7 +3051,7 @@ function Qt(e, t, n) {
|
|
|
3053
3051
|
return !1;
|
|
3054
3052
|
}
|
|
3055
3053
|
return e.kind === o.SyntaxKind.PropertyDeclaration && i.initializer !== void 0 && o.isCallExpression(i.initializer) ? o.isIdentifier(i.initializer.expression) && (i.initializer.expression.escapedText === "createEvent" || i.initializer.expression.escapedText === "useCloseEvent" || i.initializer.expression.escapedText === "useArcgisLoadError" || i.initializer.expression.escapedText === "useArcgisViewReadyError" || i.initializer.expression.escapedText === "reEmitEvent") || o.isCallExpression(i.initializer.expression) && o.isIdentifier(i.initializer.expression.expression) && i.initializer.expression.expression.escapedText === "usePropertyChange" : !1;
|
|
3056
|
-
} else return e.kind === o.SyntaxKind.MethodDeclaration ?
|
|
3054
|
+
} else return e.kind === o.SyntaxKind.MethodDeclaration ? De(e.modifiers, "method") !== void 0 : !1;
|
|
3057
3055
|
}
|
|
3058
3056
|
function Ci(e, t, n) {
|
|
3059
3057
|
const i = z(t, n);
|
|
@@ -3367,8 +3365,8 @@ function Bo(e, t) {
|
|
|
3367
3365
|
const L = je(y, !1, t, {
|
|
3368
3366
|
description: void 0,
|
|
3369
3367
|
docsTags: []
|
|
3370
|
-
}),
|
|
3371
|
-
L?.docsTags.includes(U.private) === !0 ?
|
|
3368
|
+
}), x = y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0;
|
|
3369
|
+
L?.docsTags.includes(U.private) === !0 ? x && t.config.context.includeLuminaPrivateComponents ? (M = Pe, t.isInLuminaMinimalExtraction = !0) : M = void 0 : L !== void 0 && (x || g !== void 0 && Nn(y, g)) && (M = L);
|
|
3372
3370
|
} else M === void 0 && t.componentTagName !== void 0 && t.config.context.includeLuminaPrivateComponents && y.kind === o.SyntaxKind.ClassDeclaration && (M = Pe, t.isInLuminaMinimalExtraction = !0);
|
|
3373
3371
|
M !== void 0 && !t.config.strict && y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0 && M.docsTags.includes(U.internal) && (C = !0);
|
|
3374
3372
|
}
|
|
@@ -3380,14 +3378,14 @@ function Bo(e, t) {
|
|
|
3380
3378
|
const L = y.importClause;
|
|
3381
3379
|
if (L === void 0)
|
|
3382
3380
|
continue;
|
|
3383
|
-
const
|
|
3381
|
+
const x = y.moduleSpecifier.text, T = !x.startsWith("."), _ = T ? x : Z(x), N = T ? void 0 : We(ut(r, _), t), J = N === void 0 ? void 0 : t.config.types.typeReplacements[N];
|
|
3384
3382
|
if (Rn(y, t), L.name !== void 0) {
|
|
3385
|
-
const E = L.name.escapedText, S = J?.[E],
|
|
3383
|
+
const E = L.name.escapedText, S = J?.[E], D = S?.[1], A = S === void 0 ? !T && x.endsWith(".json") ? x : _ : ve(s, S[0]), V = S?.[0] ?? N;
|
|
3386
3384
|
c[E] = {
|
|
3387
3385
|
type: S?.[2] ?? "default",
|
|
3388
3386
|
modulePath: V,
|
|
3389
3387
|
specifier: A,
|
|
3390
|
-
replacementName:
|
|
3388
|
+
replacementName: D,
|
|
3391
3389
|
actualName: void 0,
|
|
3392
3390
|
wasUsed: !1
|
|
3393
3391
|
};
|
|
@@ -3396,24 +3394,24 @@ function Bo(e, t) {
|
|
|
3396
3394
|
if (K === void 0)
|
|
3397
3395
|
continue;
|
|
3398
3396
|
if (K.kind === o.SyntaxKind.NamespaceImport) {
|
|
3399
|
-
const E = K.name.escapedText, S = J?.[E],
|
|
3397
|
+
const E = K.name.escapedText, S = J?.[E], D = S?.[1], A = S === void 0 ? _ : ve(s, S[0]), V = S?.[0] ?? N;
|
|
3400
3398
|
c[E] = {
|
|
3401
3399
|
type: "*",
|
|
3402
3400
|
modulePath: V,
|
|
3403
3401
|
specifier: A,
|
|
3404
|
-
replacementName:
|
|
3402
|
+
replacementName: D,
|
|
3405
3403
|
actualName: void 0,
|
|
3406
3404
|
wasUsed: !1
|
|
3407
3405
|
};
|
|
3408
3406
|
} else
|
|
3409
3407
|
for (let E = 0; E < K.elements.length; ++E) {
|
|
3410
|
-
const S = K.elements[E],
|
|
3408
|
+
const S = K.elements[E], D = S.propertyName === void 0 ? void 0 : S.propertyName.escapedText ?? S.propertyName.text, A = S.name.escapedText, V = J?.[D ?? A], W = V?.[1], G = V === void 0 ? _ : ve(s, V[0]), O = V?.[0] ?? N;
|
|
3411
3409
|
c[A] = {
|
|
3412
3410
|
type: V?.[2] ?? "named",
|
|
3413
3411
|
modulePath: O,
|
|
3414
3412
|
specifier: G,
|
|
3415
3413
|
replacementName: W,
|
|
3416
|
-
actualName: V === void 0 ?
|
|
3414
|
+
actualName: V === void 0 ? D : void 0,
|
|
3417
3415
|
wasUsed: !1
|
|
3418
3416
|
};
|
|
3419
3417
|
}
|
|
@@ -3424,13 +3422,13 @@ function Bo(e, t) {
|
|
|
3424
3422
|
}
|
|
3425
3423
|
} else if (o.isExportDeclaration(y) && y.moduleSpecifier !== void 0 && !t.isInLuminaMinimalExtraction) {
|
|
3426
3424
|
if (oe(y, !0, t) !== void 0) {
|
|
3427
|
-
const
|
|
3425
|
+
const x = y.moduleSpecifier.text, T = !x.startsWith("."), _ = T ? x : ut(r, Z(x)), N = T ? void 0 : We(_, t), J = T ? x : ve(s, N);
|
|
3428
3426
|
u.reExports ??= [];
|
|
3429
3427
|
const K = [];
|
|
3430
3428
|
if (y.exportClause?.kind === o.SyntaxKind.NamedExports) {
|
|
3431
3429
|
const E = y.exportClause.elements;
|
|
3432
3430
|
for (let S = 0; S < E.length; ++S) {
|
|
3433
|
-
const
|
|
3431
|
+
const D = E[S], A = Re(D.name), V = D.propertyName === void 0 ? void 0 : Re(D.propertyName), W = V ?? A, G = V === void 0 ? void 0 : A;
|
|
3434
3432
|
K.push({
|
|
3435
3433
|
exportName: W,
|
|
3436
3434
|
aliasName: G,
|
|
@@ -3548,7 +3546,7 @@ async function Ca(e) {
|
|
|
3548
3546
|
e.componentPathMapping = /* @__PURE__ */ Object.create(null);
|
|
3549
3547
|
const s = e.isComponentProject ? (m) => $i(m, a) : () => !1, c = e.isComponentProject ? p : d;
|
|
3550
3548
|
if (e.program === void 0)
|
|
3551
|
-
await
|
|
3549
|
+
await Di(n, i, async (m) => {
|
|
3552
3550
|
if (bi(m))
|
|
3553
3551
|
return;
|
|
3554
3552
|
const f = await It(m);
|
|
@@ -3575,7 +3573,7 @@ async function Ca(e) {
|
|
|
3575
3573
|
continue;
|
|
3576
3574
|
}
|
|
3577
3575
|
const C = s(g);
|
|
3578
|
-
(C && l || u.text.includes(Mi) || u.text.includes(
|
|
3576
|
+
(C && l || u.text.includes(Mi) || u.text.includes(xi)) && c(u, C);
|
|
3579
3577
|
}
|
|
3580
3578
|
}
|
|
3581
3579
|
function p(m, f) {
|
|
@@ -3631,11 +3629,11 @@ async function Ca(e) {
|
|
|
3631
3629
|
}
|
|
3632
3630
|
const Ko = (e, t) => Ho(e) && $o(e, t), Ho = (e) => (e.endsWith(".ts") || e.endsWith(".tsx")) && !bi(e), bi = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), $o = (e, t) => e.startsWith(t.basePath) && !t.config.context.excludedDirectories.has(
|
|
3633
3631
|
En(e.slice(t.basePath.length))
|
|
3634
|
-
) && !e.includes("node_modules"), Xt = 32, zo = 64, Mi = "@public", jo = Buffer.from(Mi),
|
|
3632
|
+
) && !e.includes("node_modules"), Xt = 32, zo = 64, Mi = "@public", jo = Buffer.from(Mi), xi = "@internal", Jo = Buffer.from(xi);
|
|
3635
3633
|
async function Pa(e) {
|
|
3636
|
-
await Zt(e) && await
|
|
3634
|
+
await Zt(e) && await Di(e, /* @__PURE__ */ new Set(), Hi);
|
|
3637
3635
|
}
|
|
3638
|
-
async function
|
|
3636
|
+
async function Di(e, t, n) {
|
|
3639
3637
|
const i = [], a = [];
|
|
3640
3638
|
for await (const d of await At(e)) {
|
|
3641
3639
|
const m = `${e}${d.name}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/api-extractor",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.7",
|
|
4
4
|
"description": "Documentation engine for WebGIS SDK packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@commander-js/extra-typings": "^14.0.0",
|
|
54
54
|
"commander": "^14.0.0",
|
|
55
55
|
"tslib": "^2.8.1",
|
|
56
|
-
"@arcgis/components-build-utils": "5.2.0-next.
|
|
57
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
56
|
+
"@arcgis/components-build-utils": "5.2.0-next.7",
|
|
57
|
+
"@arcgis/toolkit": "5.2.0-next.7"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"typescript": "~6.0.2",
|