@arcgis/api-extractor 6.0.0-next.2 → 6.0.0-next.20
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/chunks/ApiExtractor.js +204 -197
- package/dist/chunks/links.js +85 -85
- package/dist/diff/apiDiffToMarkdown.js +135 -100
- package/dist/diff/diffApiJson.js +106 -205
- package/dist/extractor/config.d.ts +6 -0
- package/dist/utils/partPrinter.js +24 -23
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { p as Zt, r as Rn } from "./config.js";
|
|
2
|
-
import { l as X, b as An, g as Ln, a as
|
|
2
|
+
import { l as X, b as An, g as Ln, a as Ke, p as $e, e as Gn, c as xe, d as Fn, f as On, h as Bi, i as Gt, j as qe, k as wn, m as Nn, n as de, o as Q, q as re, r as $n } from "./links.js";
|
|
3
3
|
import a from "typescript";
|
|
4
4
|
import { toPosixPathSeparators as Wi, path as se } from "@arcgis/node-toolkit/path";
|
|
5
5
|
import { mkdir as Ft, writeFile as _i } from "fs/promises";
|
|
6
|
-
import { g as R, p as J, c as
|
|
6
|
+
import { g as R, p as J, c as bt, a as Hi, b as ie, d as ei, e as Ki, f as Le, h as Xe, i as Un, j as zi, k as Vn } from "./privateContext.js";
|
|
7
7
|
import { maybeEscapePropertyName as di, printTypeAlias as Ot, printInterface as Bn, printFunction as Wn, printVariable as _n, printClass as Hn, printMethod as Kn, printProperty as Ae, printGetterSetter as zn, printSignature as jn, printTypeParameters as st } from "../utils/partPrinter.js";
|
|
8
8
|
import { globalPackageIdentifier as ne, mergeApiNodes as ti, isApiMethodAsync as Jn, getApiNodeLabel as qn, apiTypeToImportType as wt, getApiMemberName as ji, getMaybeStaticApiMemberName as Nt, naturalSortModules as Xn, compareNamedNodes as Qn, compareClassMembers as Yn } from "../utils/apiHelpers.js";
|
|
9
9
|
import { styleText as w } from "node:util";
|
|
10
10
|
import { readFile as pi, opendir as mi, rm as Zn } from "node:fs/promises";
|
|
11
11
|
import { existsAsync as eo } from "@arcgis/node-toolkit/file";
|
|
12
12
|
import { pathIsComponentEntrypoint as to, findDeclaredComponent as io } from "../extractor/webComponent/findComponents.js";
|
|
13
|
-
import { getBasename as le, getPackageNameFromExternalSpecifier as $t, extractInitializer as
|
|
13
|
+
import { getBasename as le, getPackageNameFromExternalSpecifier as $t, extractInitializer as ft, extractBooleanInitializer as me, findDecorator as ze, getMemberName as Fe } from "../utils/astHelpers.js";
|
|
14
14
|
import { renameComponentFolder as at, addComponentPathMapping as no } from "../extractor/webComponent/pathMapping.js";
|
|
15
15
|
import oo from "path";
|
|
16
16
|
import { readFileSync as Ji, existsSync as ke, opendirSync as ro, watch as so, statSync as ao } from "node:fs";
|
|
@@ -18,7 +18,7 @@ import { isBuiltin as qi } from "node:module";
|
|
|
18
18
|
import { getWidenedLiteralType as lo, unsafeUndocumentedTs as co, unsafeGetUndocumentedPrinter as po } from "../utils/internalTypeScriptApis.js";
|
|
19
19
|
import { retrievePackageJson as ui } from "@arcgis/node-toolkit/packageJson";
|
|
20
20
|
import { uncapitalize as mo, camelToKebab as uo, kebabToPascal as Xi } from "@arcgis/toolkit/string";
|
|
21
|
-
import { styleText as
|
|
21
|
+
import { styleText as yt } from "util";
|
|
22
22
|
import { identity as Qi, debounce as fo } from "@arcgis/toolkit/function";
|
|
23
23
|
import { hasRuntimeDeclaration as yo } from "../utils/inferEntrypoints.js";
|
|
24
24
|
function Oe(e) {
|
|
@@ -51,19 +51,19 @@ function Oe(e) {
|
|
|
51
51
|
for (const l of o.cssParts)
|
|
52
52
|
t.push({
|
|
53
53
|
name: "csspart",
|
|
54
|
-
text:
|
|
54
|
+
text: It(l)
|
|
55
55
|
});
|
|
56
56
|
if (o.cssStates !== void 0)
|
|
57
57
|
for (const l of o.cssStates)
|
|
58
58
|
t.push({
|
|
59
59
|
name: "cssstate",
|
|
60
|
-
text:
|
|
60
|
+
text: It(l)
|
|
61
61
|
});
|
|
62
62
|
if (o.slots !== void 0)
|
|
63
63
|
for (const l of o.slots)
|
|
64
64
|
t.push({
|
|
65
65
|
name: "slot",
|
|
66
|
-
text:
|
|
66
|
+
text: It(l)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
e.docsTags !== void 0 && t.push(...e.docsTags);
|
|
@@ -74,7 +74,7 @@ function Oe(e) {
|
|
|
74
74
|
docsTags: t
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function It(e) {
|
|
78
78
|
const t = e, n = e.name + (t.default !== void 0 ? `=${t.default}` : ""), i = n.length > 0 ? `[${n}]` : "", o = typeof e.deprecated == "string" ? `DEPRECATED ${e.deprecated}` : e.description ?? "", r = o.length > 0 ? ` - ${o}` : "";
|
|
79
79
|
return `${i}${r}`;
|
|
80
80
|
}
|
|
@@ -100,20 +100,20 @@ function go(e) {
|
|
|
100
100
|
return r += o ? `
|
|
101
101
|
` : " ", r;
|
|
102
102
|
}
|
|
103
|
-
const
|
|
103
|
+
const kt = 10, vo = 32, So = 64;
|
|
104
104
|
function fi(e) {
|
|
105
105
|
let t = "";
|
|
106
106
|
const n = e.length;
|
|
107
107
|
let i = 0;
|
|
108
108
|
for (let o = 0; o < n; ++o) {
|
|
109
109
|
const r = e.charCodeAt(o);
|
|
110
|
-
if (r ===
|
|
111
|
-
t += e.slice(i, o), e.charCodeAt(o + 1) ===
|
|
110
|
+
if (r === kt)
|
|
111
|
+
t += e.slice(i, o), e.charCodeAt(o + 1) === kt ? t += `
|
|
112
112
|
*` : t += `
|
|
113
113
|
* `, i = o + 1;
|
|
114
114
|
else if (r === So) {
|
|
115
115
|
const l = o === 0 ? 0 : e.charCodeAt(o - 1);
|
|
116
|
-
(o === 0 || l === vo || l ===
|
|
116
|
+
(o === 0 || l === vo || l === kt) && (t += e.slice(i, o), t += "\\@", i = o + 1);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
return i < n && (t += e.slice(i)), t;
|
|
@@ -193,8 +193,8 @@ function Co(e, t) {
|
|
|
193
193
|
const [Ie, it] = To(B.name, B.members);
|
|
194
194
|
let ye = "", oe = "";
|
|
195
195
|
if (z !== void 0) {
|
|
196
|
-
for (let
|
|
197
|
-
const nt = z[
|
|
196
|
+
for (let be = 0; be < z.length; ++be) {
|
|
197
|
+
const nt = z[be], ci = `EventHandler<${U}["${nt.name}"]>`;
|
|
198
198
|
ye += ` ${di(`on${nt.name}`)}?: ${ci};
|
|
199
199
|
`, oe += ` ${di(`on${nt.name[0].toUpperCase()}${nt.name.slice(1)}`)}?: ${ci};
|
|
200
200
|
`;
|
|
@@ -325,7 +325,7 @@ function Eo(e, t) {
|
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
const Yi = "@setterTypes", Zi = {
|
|
328
|
-
[J]:
|
|
328
|
+
[J]: bt(),
|
|
329
329
|
kind: "function",
|
|
330
330
|
name: "getAssetPath",
|
|
331
331
|
static: void 0,
|
|
@@ -367,7 +367,7 @@ const Yi = "@setterTypes", Zi = {
|
|
|
367
367
|
privacy: void 0,
|
|
368
368
|
source: void 0
|
|
369
369
|
}, en = {
|
|
370
|
-
[J]:
|
|
370
|
+
[J]: bt(),
|
|
371
371
|
kind: "function",
|
|
372
372
|
name: "setAssetPath",
|
|
373
373
|
static: void 0,
|
|
@@ -534,17 +534,17 @@ function Po(e, t) {
|
|
|
534
534
|
r += `${o.namespaces[s]}
|
|
535
535
|
|
|
536
536
|
`;
|
|
537
|
-
o.constructorPropertiesInterface !== void 0 ? r += `${
|
|
537
|
+
o.constructorPropertiesInterface !== void 0 ? r += `${Dt(o.constructorPropertiesInterface)}
|
|
538
538
|
|
|
539
539
|
` : o.componentCssPropertiesInterface !== void 0 && (r += `declare module "@arcgis/lumina" {
|
|
540
|
-
${
|
|
540
|
+
${Dt(o.componentCssPropertiesInterface)}
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
`);
|
|
544
544
|
const l = e.declarations;
|
|
545
545
|
for (let s = 0; s < l.length; ++s) {
|
|
546
546
|
const c = l[s];
|
|
547
|
-
r +=
|
|
547
|
+
r += Dt(c), s < l.length - 1 && (r += `
|
|
548
548
|
|
|
549
549
|
`);
|
|
550
550
|
}
|
|
@@ -555,7 +555,7 @@ function we(e) {
|
|
|
555
555
|
return e === void 0 ? "" : `/*${go(e)}*/
|
|
556
556
|
`;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function Dt(e) {
|
|
559
559
|
let t = Oe(e), n = "";
|
|
560
560
|
if (e.kind === "class" || e.kind === "mixin")
|
|
561
561
|
n = yi(e);
|
|
@@ -694,7 +694,8 @@ function gi(e) {
|
|
|
694
694
|
e.static === !0,
|
|
695
695
|
e.name,
|
|
696
696
|
e.getterType?.text ?? e.type.text,
|
|
697
|
-
o ? void 0 : e.type.text
|
|
697
|
+
o ? void 0 : e.type.text,
|
|
698
|
+
e.deprecated !== void 0
|
|
698
699
|
);
|
|
699
700
|
else {
|
|
700
701
|
const r = n.dtsTypeOverride ?? e.type.text, l = i ? !1 : r.endsWith(" | undefined"), s = l ? r.slice(0, -12) : r;
|
|
@@ -734,7 +735,7 @@ Use EventNames and EventTypes helpers from @arcgis/core/Evented`
|
|
|
734
735
|
}
|
|
735
736
|
]
|
|
736
737
|
});
|
|
737
|
-
function
|
|
738
|
+
function je() {
|
|
738
739
|
const e = Date.now();
|
|
739
740
|
return () => (Date.now() - e) / Io;
|
|
740
741
|
}
|
|
@@ -816,7 +817,7 @@ function on(e, t) {
|
|
|
816
817
|
return !0;
|
|
817
818
|
return !1;
|
|
818
819
|
}
|
|
819
|
-
function
|
|
820
|
+
function Pt(e) {
|
|
820
821
|
if (e.modifiers === void 0)
|
|
821
822
|
return 0;
|
|
822
823
|
for (let t = 0; t < e.modifiers.length; ++t)
|
|
@@ -843,7 +844,7 @@ function Bo(e, t, n) {
|
|
|
843
844
|
}
|
|
844
845
|
}
|
|
845
846
|
const Wo = Ln("core");
|
|
846
|
-
function
|
|
847
|
+
function gt(e, t, n, i) {
|
|
847
848
|
i.implicitPublicModules ??= /* @__PURE__ */ Object.create(null);
|
|
848
849
|
const o = i.implicitPublicModules[e];
|
|
849
850
|
o === void 0 ? i.implicitPublicModules[e] = {
|
|
@@ -856,7 +857,7 @@ function vt(e, t, n, i) {
|
|
|
856
857
|
} : o.pendingNames !== void 0 && n !== "*" ? o.pendingNames.add(n) : o.pendingNames = void 0;
|
|
857
858
|
}
|
|
858
859
|
function _o(e, t) {
|
|
859
|
-
const n =
|
|
860
|
+
const n = Pt(e);
|
|
860
861
|
if (t.pendingNames === void 0)
|
|
861
862
|
return n > 0;
|
|
862
863
|
if (n === 2 && t.pendingNames.has("default"))
|
|
@@ -864,7 +865,7 @@ function _o(e, t) {
|
|
|
864
865
|
const o = (e.name ?? e.declarationList?.declarations[0].name).escapedText;
|
|
865
866
|
return t.pendingNames.has(o);
|
|
866
867
|
}
|
|
867
|
-
function
|
|
868
|
+
function vt(e, t, n, i, o) {
|
|
868
869
|
const r = t.escapedText;
|
|
869
870
|
if (e.flags & a.SymbolFlags.TypeParameter)
|
|
870
871
|
return {
|
|
@@ -910,7 +911,7 @@ function St(e, t, n, i, o) {
|
|
|
910
911
|
if (h === void 0) {
|
|
911
912
|
for (let M = d.parent; M !== void 0; M = M.parent)
|
|
912
913
|
if (a.isModuleDeclaration(M) && a.isIdentifier(M.name)) {
|
|
913
|
-
E = M.name.escapedText, h = Wt[E]?.[1]?.[p], C = `${E}.${p}`,
|
|
914
|
+
E = M.name.escapedText, h = Wt[E]?.[1]?.[p], C = `${E}.${p}`, Be(t, C);
|
|
914
915
|
break;
|
|
915
916
|
}
|
|
916
917
|
}
|
|
@@ -931,7 +932,7 @@ function St(e, t, n, i, o) {
|
|
|
931
932
|
const E = l.getSymbolAtLocation(h);
|
|
932
933
|
if (E !== void 0) {
|
|
933
934
|
const C = l.getAliasedSymbol(E);
|
|
934
|
-
return
|
|
935
|
+
return vt(
|
|
935
936
|
C,
|
|
936
937
|
t,
|
|
937
938
|
n,
|
|
@@ -948,14 +949,14 @@ function St(e, t, n, i, o) {
|
|
|
948
949
|
) {
|
|
949
950
|
const h = l.getSymbolAtLocation(d.type.objectType.typeName);
|
|
950
951
|
if (h !== void 0) {
|
|
951
|
-
const E = l.getAliasedSymbol(h), C =
|
|
952
|
+
const E = l.getAliasedSymbol(h), C = vt(
|
|
952
953
|
E,
|
|
953
954
|
t,
|
|
954
955
|
n,
|
|
955
956
|
i,
|
|
956
957
|
i + E.escapedName.length
|
|
957
958
|
);
|
|
958
|
-
return
|
|
959
|
+
return Be(t, r), Be(t, `${C.name}["@eventTypes"]`), C;
|
|
959
960
|
}
|
|
960
961
|
}
|
|
961
962
|
}
|
|
@@ -970,9 +971,9 @@ function St(e, t, n, i, o) {
|
|
|
970
971
|
if (P ? k.wasUsed = !0 : M = n.moduleContext.importsMap[C] !== void 0, M)
|
|
971
972
|
continue;
|
|
972
973
|
const v = C !== r;
|
|
973
|
-
v && (
|
|
974
|
+
v && (Be(t, C), o = i + C.length);
|
|
974
975
|
const F = Xo(s), D = F === "named";
|
|
975
|
-
D || (g = F), u === void 0 && !n.config.strict &&
|
|
976
|
+
D || (g = F), u === void 0 && !n.config.strict && gt(
|
|
976
977
|
f,
|
|
977
978
|
m.fileName.slice(n.basePath.length),
|
|
978
979
|
g,
|
|
@@ -1022,18 +1023,18 @@ function St(e, t, n, i, o) {
|
|
|
1022
1023
|
name: g,
|
|
1023
1024
|
module: f,
|
|
1024
1025
|
package: void 0,
|
|
1025
|
-
viewUrl:
|
|
1026
|
+
viewUrl: Ke(f ?? n.apiModule.path, S, void 0, n),
|
|
1026
1027
|
start: i,
|
|
1027
1028
|
end: o
|
|
1028
1029
|
};
|
|
1029
1030
|
}
|
|
1030
1031
|
const Ho = /[^a-zA-Z0-9$_]/gu;
|
|
1031
1032
|
function Ko(e, t, n) {
|
|
1032
|
-
const i = e.lastIndexOf(
|
|
1033
|
+
const i = e.lastIndexOf(Rt);
|
|
1033
1034
|
if (i !== -1) {
|
|
1034
|
-
const c = e.slice(i +
|
|
1035
|
+
const c = e.slice(i + Rt.length), p = an(c), d = e.slice(
|
|
1035
1036
|
0,
|
|
1036
|
-
i +
|
|
1037
|
+
i + Rt.length + p.packageName.length
|
|
1037
1038
|
), m = ui(d);
|
|
1038
1039
|
return hi(p), p.modulePath = Ci(p.modulePath, m, t, n), p;
|
|
1039
1040
|
}
|
|
@@ -1063,7 +1064,7 @@ function Ko(e, t, n) {
|
|
|
1063
1064
|
modulePath: void 0
|
|
1064
1065
|
};
|
|
1065
1066
|
}
|
|
1066
|
-
const
|
|
1067
|
+
const Rt = "/node_modules/", zo = "/dist/", Si = "/output/npm/esm/";
|
|
1067
1068
|
function an(e) {
|
|
1068
1069
|
const t = $t(e), n = e.length === t.length ? void 0 : e.slice(t.length + 1);
|
|
1069
1070
|
return { packageName: t, modulePath: n };
|
|
@@ -1217,14 +1218,14 @@ function q(e, t, n, i) {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
if (a.isPrefixUnaryExpression(e)) {
|
|
1219
1220
|
if (e.operator !== a.SyntaxKind.MinusToken)
|
|
1220
|
-
return
|
|
1221
|
+
return Ue(n, ae, t, i);
|
|
1221
1222
|
if (t === _.false)
|
|
1222
1223
|
return a.factory.createKeywordTypeNode(a.SyntaxKind.NumberKeyword);
|
|
1223
1224
|
{
|
|
1224
1225
|
const o = q(e.operand, t, n, i);
|
|
1225
1226
|
return a.isLiteralTypeNode(o) ? a.factory.createLiteralTypeNode(
|
|
1226
1227
|
a.factory.createPrefixUnaryExpression(a.SyntaxKind.MinusToken, o.literal)
|
|
1227
|
-
) :
|
|
1228
|
+
) : Ue(n, ae, t, i);
|
|
1228
1229
|
}
|
|
1229
1230
|
}
|
|
1230
1231
|
if (a.isParenthesizedExpression(e))
|
|
@@ -1267,7 +1268,7 @@ function q(e, t, n, i) {
|
|
|
1267
1268
|
if (o !== void 0)
|
|
1268
1269
|
return o;
|
|
1269
1270
|
const r = q(e.expression, t, n, i);
|
|
1270
|
-
return a.isTypeQueryNode(r) ? a.factory.createTypeQueryNode(a.factory.createQualifiedName(r.exprName, e.name)) : r === Kt ? Kt :
|
|
1271
|
+
return a.isTypeQueryNode(r) ? a.factory.createTypeQueryNode(a.factory.createQualifiedName(r.exprName, e.name)) : r === Kt ? Kt : Ue(n, ae, t, i);
|
|
1271
1272
|
}
|
|
1272
1273
|
if (a.isCallExpression(e)) {
|
|
1273
1274
|
const o = e.expression, r = e.arguments.at(0);
|
|
@@ -1286,7 +1287,7 @@ function q(e, t, n, i) {
|
|
|
1286
1287
|
const s = q(o, t, n, i);
|
|
1287
1288
|
return a.isTypeQueryNode(s) ? a.factory.createTypeReferenceNode(a.factory.createIdentifier("ReturnType"), [
|
|
1288
1289
|
a.factory.createTypeQueryNode(s.exprName, e.typeArguments)
|
|
1289
|
-
]) :
|
|
1290
|
+
]) : Ue(n, ae, t, i);
|
|
1290
1291
|
}
|
|
1291
1292
|
if (a.isArrowFunction(e)) {
|
|
1292
1293
|
if (i.isInLuminaMinimalExtraction)
|
|
@@ -1295,10 +1296,10 @@ function q(e, t, n, i) {
|
|
|
1295
1296
|
return a.factory.createFunctionTypeNode(
|
|
1296
1297
|
e.typeParameters,
|
|
1297
1298
|
zt(e.parameters, o, n, i),
|
|
1298
|
-
e.type ?? (a.isBlock(e.body) ?
|
|
1299
|
+
e.type ?? (a.isBlock(e.body) ? St(e, i) ?? ce(n, ae, i) : q(e.body, o, n, i))
|
|
1299
1300
|
);
|
|
1300
1301
|
}
|
|
1301
|
-
return
|
|
1302
|
+
return Ue(n, ae, t, i);
|
|
1302
1303
|
}
|
|
1303
1304
|
function Yo(e, t, n, i) {
|
|
1304
1305
|
const o = t === _.false ? void 0 : or;
|
|
@@ -1324,14 +1325,14 @@ function Yo(e, t, n, i) {
|
|
|
1324
1325
|
a.factory.createFunctionTypeNode(
|
|
1325
1326
|
e.typeParameters,
|
|
1326
1327
|
zt(e.parameters, t, n, i),
|
|
1327
|
-
e.type ??
|
|
1328
|
+
e.type ?? St(e, i) ?? ce(n, ae, i)
|
|
1328
1329
|
)
|
|
1329
1330
|
) : a.isGetAccessorDeclaration(e) ? a.factory.createGetAccessorDeclaration(
|
|
1330
1331
|
void 0,
|
|
1331
1332
|
e.name,
|
|
1332
1333
|
// Should always be empty
|
|
1333
1334
|
e.parameters,
|
|
1334
|
-
e.type ??
|
|
1335
|
+
e.type ?? St(e, i) ?? ce(n, ae, i),
|
|
1335
1336
|
void 0
|
|
1336
1337
|
) : a.factory.createSetAccessorDeclaration(
|
|
1337
1338
|
void 0,
|
|
@@ -1340,7 +1341,7 @@ function Yo(e, t, n, i) {
|
|
|
1340
1341
|
void 0
|
|
1341
1342
|
);
|
|
1342
1343
|
}
|
|
1343
|
-
function
|
|
1344
|
+
function Ue(e, t, n, i) {
|
|
1344
1345
|
return Ge(e, n, i) ?? ce(e, t, i);
|
|
1345
1346
|
}
|
|
1346
1347
|
function Ge(e, t, n) {
|
|
@@ -1354,10 +1355,10 @@ function Ge(e, t, n) {
|
|
|
1354
1355
|
}
|
|
1355
1356
|
o ??= i.getTypeAtLocation(e.node);
|
|
1356
1357
|
const l = r ? lo(i, o) : o;
|
|
1357
|
-
return
|
|
1358
|
+
return Mt(i, l);
|
|
1358
1359
|
}
|
|
1359
1360
|
}
|
|
1360
|
-
function
|
|
1361
|
+
function Mt(e, t) {
|
|
1361
1362
|
const n = t.flags & a.TypeFlags.Union ? t.types.every(Ti) : Ti(t);
|
|
1362
1363
|
return e.typeToTypeNode(
|
|
1363
1364
|
t,
|
|
@@ -1366,7 +1367,7 @@ function xt(e, t) {
|
|
|
1366
1367
|
);
|
|
1367
1368
|
}
|
|
1368
1369
|
const Zo = a.TypeFormatFlags.NoTruncation | a.TypeFormatFlags.WriteArrayAsGenericType | a.TypeFormatFlags.SuppressAnyReturnType | a.TypeFormatFlags.MultilineObjectLiterals, er = Zo & a.TypeFormatFlags.NodeBuilderFlagsMask, tr = er | a.NodeBuilderFlags.IgnoreErrors | a.NodeBuilderFlags.NoTruncation, Ti = (e) => e.flags & a.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & a.TypeFlags.PossiblyFalsy);
|
|
1369
|
-
function
|
|
1370
|
+
function St(e, t) {
|
|
1370
1371
|
const n = t.program?.getTypeChecker?.();
|
|
1371
1372
|
if (n === void 0)
|
|
1372
1373
|
return;
|
|
@@ -1374,14 +1375,14 @@ function ht(e, t) {
|
|
|
1374
1375
|
if (i === void 0)
|
|
1375
1376
|
return;
|
|
1376
1377
|
const o = n.getReturnTypeOfSignature(i);
|
|
1377
|
-
return
|
|
1378
|
+
return Mt(n, o);
|
|
1378
1379
|
}
|
|
1379
1380
|
function ir(e, t) {
|
|
1380
1381
|
const n = t.program?.getTypeChecker?.();
|
|
1381
1382
|
if (n === void 0)
|
|
1382
1383
|
return;
|
|
1383
1384
|
const i = n.getTypeAtLocation(e);
|
|
1384
|
-
return
|
|
1385
|
+
return Mt(n, i);
|
|
1385
1386
|
}
|
|
1386
1387
|
function ce(e, t, n) {
|
|
1387
1388
|
return n.isInLuminaMinimalExtraction || n.emitError(t, e), Kt;
|
|
@@ -1420,7 +1421,7 @@ function rr(e, t) {
|
|
|
1420
1421
|
if (n === void 0 || !sr(e.exprName, t))
|
|
1421
1422
|
return;
|
|
1422
1423
|
const i = n.getTypeAtLocation(e.exprName);
|
|
1423
|
-
return
|
|
1424
|
+
return Mt(n, i);
|
|
1424
1425
|
}
|
|
1425
1426
|
function sr(e, t) {
|
|
1426
1427
|
return e.kind === a.SyntaxKind.QualifiedName ? ar(e.left) : t.moduleContext.importsMap[e.escapedText]?.rawSpecifier.endsWith(".json") === !0;
|
|
@@ -1434,7 +1435,7 @@ function ar(e) {
|
|
|
1434
1435
|
return !1;
|
|
1435
1436
|
}
|
|
1436
1437
|
function ee(e, t) {
|
|
1437
|
-
if (O = t, dt.clear(), Z = [],
|
|
1438
|
+
if (O = t, dt.clear(), Z = [], ht.clear(), e.pos !== -1 && e.getText(O.file).includes("* @public") && O.emitError(
|
|
1438
1439
|
"@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/references/api-extractor/advanced-patterns#describing-nested-object-types",
|
|
1439
1440
|
{ file: O.file, node: e }
|
|
1440
1441
|
), e.kind === a.SyntaxKind.Identifier || e.kind === a.SyntaxKind.QualifiedName)
|
|
@@ -1444,7 +1445,7 @@ function ee(e, t) {
|
|
|
1444
1445
|
if (i !== void 0)
|
|
1445
1446
|
for (let o = 0; o < i.length; ++o) {
|
|
1446
1447
|
const r = i[o];
|
|
1447
|
-
|
|
1448
|
+
ht.add(r.name.escapedText);
|
|
1448
1449
|
}
|
|
1449
1450
|
}
|
|
1450
1451
|
return lr.writeNode(a.EmitHint.Unspecified, e, void 0, dt), {
|
|
@@ -1455,36 +1456,36 @@ function ee(e, t) {
|
|
|
1455
1456
|
};
|
|
1456
1457
|
}
|
|
1457
1458
|
let O;
|
|
1458
|
-
const
|
|
1459
|
+
const Pe = (e, t, n) => {
|
|
1459
1460
|
switch (t.kind) {
|
|
1460
1461
|
case a.SyntaxKind.TypeReference:
|
|
1461
1462
|
const i = t, o = i.typeName;
|
|
1462
1463
|
switch (o.escapedText) {
|
|
1463
1464
|
case "nil":
|
|
1464
|
-
return
|
|
1465
|
+
return Pe(e, cr, n);
|
|
1465
1466
|
// Used in public typings in 88 files
|
|
1466
1467
|
// REFACTOR: consider refactoring out Const usages in public API to
|
|
1467
1468
|
// reduce divergence
|
|
1468
1469
|
case "Const":
|
|
1469
|
-
return
|
|
1470
|
+
return Pe(e, i.typeArguments[0], n);
|
|
1470
1471
|
// In component public types, Lumina's "component" and "el" have the same type
|
|
1471
1472
|
case "ToElement":
|
|
1472
1473
|
if (O.isComponentProject)
|
|
1473
|
-
return
|
|
1474
|
+
return Pe(e, i.typeArguments[0], n);
|
|
1474
1475
|
break;
|
|
1475
1476
|
/**
|
|
1476
1477
|
* @see https://webgis.esri.com/references/api-extractor/advanced-patterns#publicprivate-type-divergence
|
|
1477
1478
|
*/
|
|
1478
1479
|
case "PublicApiNarrowType":
|
|
1479
1480
|
case "PublicApiRelaxType":
|
|
1480
|
-
return
|
|
1481
|
+
return Pe(e, i.typeArguments[1], n);
|
|
1481
1482
|
}
|
|
1482
1483
|
pt(o);
|
|
1483
1484
|
break;
|
|
1484
1485
|
case a.SyntaxKind.TypeQuery:
|
|
1485
1486
|
const l = rr(t, O);
|
|
1486
1487
|
if (l !== void 0)
|
|
1487
|
-
return
|
|
1488
|
+
return Pe(e, l, n);
|
|
1488
1489
|
pt(t.exprName, dr);
|
|
1489
1490
|
break;
|
|
1490
1491
|
case a.SyntaxKind.PropertyAccessExpression:
|
|
@@ -1493,7 +1494,7 @@ const Me = (e, t, n) => {
|
|
|
1493
1494
|
case a.SyntaxKind.InferType:
|
|
1494
1495
|
case a.SyntaxKind.MappedType:
|
|
1495
1496
|
const c = t.typeParameter;
|
|
1496
|
-
|
|
1497
|
+
ht.add(c.name.escapedText);
|
|
1497
1498
|
break;
|
|
1498
1499
|
case a.SyntaxKind.TypeLiteral:
|
|
1499
1500
|
const p = t;
|
|
@@ -1506,7 +1507,7 @@ const Me = (e, t, n) => {
|
|
|
1506
1507
|
// Thus print ArcgisHome["el"] as just ArcgisHome
|
|
1507
1508
|
O.isComponentProject && d.indexType.kind === a.SyntaxKind.LiteralType && d.indexType.literal.text === "el"
|
|
1508
1509
|
)
|
|
1509
|
-
return
|
|
1510
|
+
return Pe(e, d.objectType, n);
|
|
1510
1511
|
break;
|
|
1511
1512
|
case a.SyntaxKind.ImportType:
|
|
1512
1513
|
O.emitError(
|
|
@@ -1515,14 +1516,14 @@ const Me = (e, t, n) => {
|
|
|
1515
1516
|
);
|
|
1516
1517
|
break;
|
|
1517
1518
|
}
|
|
1518
|
-
n(e, t),
|
|
1519
|
+
n(e, t), Ct !== void 0 && (ln(), Ct = void 0);
|
|
1519
1520
|
}, lr = po(
|
|
1520
1521
|
{},
|
|
1521
1522
|
{
|
|
1522
|
-
onEmitNode:
|
|
1523
|
+
onEmitNode: Pe
|
|
1523
1524
|
}
|
|
1524
1525
|
), cr = a.factory.createIdentifier("null | undefined"), dt = co.createTextWriter(`
|
|
1525
|
-
`), dr = 7,
|
|
1526
|
+
`), dr = 7, ht = /* @__PURE__ */ new Set();
|
|
1526
1527
|
let Z;
|
|
1527
1528
|
function pt(e, t = 0) {
|
|
1528
1529
|
const n = [];
|
|
@@ -1542,7 +1543,7 @@ function pt(e, t = 0) {
|
|
|
1542
1543
|
const c = o;
|
|
1543
1544
|
if (c.pos === -1 && c.symbol !== void 0) {
|
|
1544
1545
|
Z.push(
|
|
1545
|
-
|
|
1546
|
+
vt(c.symbol, c, O, l, s)
|
|
1546
1547
|
);
|
|
1547
1548
|
return;
|
|
1548
1549
|
}
|
|
@@ -1573,7 +1574,7 @@ function pt(e, t = 0) {
|
|
|
1573
1574
|
name: r,
|
|
1574
1575
|
module: void 0,
|
|
1575
1576
|
package: void 0,
|
|
1576
|
-
viewUrl:
|
|
1577
|
+
viewUrl: Ke(
|
|
1577
1578
|
O.apiModule.path,
|
|
1578
1579
|
r === O.exportDefaultName ? void 0 : r,
|
|
1579
1580
|
void 0,
|
|
@@ -1589,7 +1590,7 @@ function pt(e, t = 0) {
|
|
|
1589
1590
|
name: r,
|
|
1590
1591
|
module: void 0,
|
|
1591
1592
|
package: void 0,
|
|
1592
|
-
viewUrl:
|
|
1593
|
+
viewUrl: Ke(
|
|
1593
1594
|
O.apiModule.path,
|
|
1594
1595
|
r === O.exportDefaultName ? void 0 : r,
|
|
1595
1596
|
void 0,
|
|
@@ -1604,7 +1605,7 @@ function pt(e, t = 0) {
|
|
|
1604
1605
|
if (d !== void 0) {
|
|
1605
1606
|
d.wasUsed = !0;
|
|
1606
1607
|
const g = d.type === "named";
|
|
1607
|
-
d.replacementName !== void 0 && (
|
|
1608
|
+
d.replacementName !== void 0 && (Be(o, d.replacementName), s = l + d.replacementName.length), d.replacementName !== void 0 && (O.functionLikeTypeParameters?.has(d.replacementName) === !0 || O.objectLikeTypeParameters?.has(d.replacementName) === !0) && O.emitError(
|
|
1608
1609
|
`Can't do a type replacement of ${w("green", r)} to ${w("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.`,
|
|
1609
1610
|
{ file: O.file, node: e }
|
|
1610
1611
|
);
|
|
@@ -1617,7 +1618,7 @@ function pt(e, t = 0) {
|
|
|
1617
1618
|
{ file: O.file, node: e }
|
|
1618
1619
|
);
|
|
1619
1620
|
}
|
|
1620
|
-
} else O.config.strict ||
|
|
1621
|
+
} else O.config.strict || gt(
|
|
1621
1622
|
d.modulePath,
|
|
1622
1623
|
d.rawSpecifier === "" ? d.modulePath : Ut(
|
|
1623
1624
|
O.apiModule.sourcePath.slice(O.config.context.basePath.length),
|
|
@@ -1631,7 +1632,7 @@ function pt(e, t = 0) {
|
|
|
1631
1632
|
name: S ?? d.type,
|
|
1632
1633
|
module: E,
|
|
1633
1634
|
package: h,
|
|
1634
|
-
viewUrl: d.modulePath === void 0 ? sn(h, E, g ? r : d.type, O) :
|
|
1635
|
+
viewUrl: d.modulePath === void 0 ? sn(h, E, g ? r : d.type, O) : Ke(d.modulePath, S, void 0, O),
|
|
1635
1636
|
start: l,
|
|
1636
1637
|
end: s
|
|
1637
1638
|
});
|
|
@@ -1672,11 +1673,11 @@ function pt(e, t = 0) {
|
|
|
1672
1673
|
}
|
|
1673
1674
|
return;
|
|
1674
1675
|
}
|
|
1675
|
-
if (
|
|
1676
|
+
if (ht.has(r))
|
|
1676
1677
|
return;
|
|
1677
1678
|
const f = O.program?.getTypeChecker?.()?.getSymbolAtLocation(o);
|
|
1678
1679
|
if (f !== void 0) {
|
|
1679
|
-
Z.push(
|
|
1680
|
+
Z.push(vt(f, o, O, l, s));
|
|
1680
1681
|
return;
|
|
1681
1682
|
}
|
|
1682
1683
|
O.emitError(
|
|
@@ -1687,15 +1688,15 @@ function pt(e, t = 0) {
|
|
|
1687
1688
|
function pr(e, t, n) {
|
|
1688
1689
|
return n.has(t) || n.has("@types/node") && qi(e);
|
|
1689
1690
|
}
|
|
1690
|
-
function
|
|
1691
|
+
function Be(e, t) {
|
|
1691
1692
|
const n = e.escapedText;
|
|
1692
|
-
|
|
1693
|
+
Ct = e, jt = t, ln(), jt = n;
|
|
1693
1694
|
}
|
|
1694
|
-
let
|
|
1695
|
+
let Ct, jt;
|
|
1695
1696
|
function ln() {
|
|
1696
|
-
|
|
1697
|
+
Ct.escapedText = jt;
|
|
1697
1698
|
}
|
|
1698
|
-
function
|
|
1699
|
+
function xt(e, t, n) {
|
|
1699
1700
|
if (e === void 0 || n.isInLuminaMinimalExtraction) {
|
|
1700
1701
|
t ? n.objectLikeTypeParameters = void 0 : n.functionLikeTypeParameters = void 0;
|
|
1701
1702
|
return;
|
|
@@ -1850,7 +1851,7 @@ console.log("${e.tagName} is ready to go!");
|
|
|
1850
1851
|
}
|
|
1851
1852
|
o.length > 0 && (e.demos = o);
|
|
1852
1853
|
}
|
|
1853
|
-
const Sr =
|
|
1854
|
+
const Sr = bt(), hr = {
|
|
1854
1855
|
summary: void 0,
|
|
1855
1856
|
description: void 0,
|
|
1856
1857
|
type: {
|
|
@@ -1873,8 +1874,8 @@ const Sr = Pt(), hr = {
|
|
|
1873
1874
|
module: void 0,
|
|
1874
1875
|
package: void 0,
|
|
1875
1876
|
viewUrl: void 0
|
|
1876
|
-
}, Tr =
|
|
1877
|
-
function
|
|
1877
|
+
}, Tr = Ee, Er = Ee, br = Ee, Pr = Ee, Mr = Ee, xr = Ee, Ir = Ee, dn = Ee;
|
|
1878
|
+
function Ee(e, t, n, i, o) {
|
|
1878
1879
|
if (i.docsTags === void 0 || n === void 0)
|
|
1879
1880
|
return;
|
|
1880
1881
|
const r = i.docsTags.indexOf(X.copyDoc);
|
|
@@ -1903,7 +1904,7 @@ function oi(e, t, n) {
|
|
|
1903
1904
|
}
|
|
1904
1905
|
});
|
|
1905
1906
|
}
|
|
1906
|
-
const kr = tt,
|
|
1907
|
+
const kr = tt, At = tt, Dr = tt, bi = tt, Pi = tt;
|
|
1907
1908
|
function tt(e, t, n, i) {
|
|
1908
1909
|
if (t === void 0) {
|
|
1909
1910
|
i.emitError("Computed function/method names are not yet supported.", {
|
|
@@ -1912,7 +1913,7 @@ function tt(e, t, n, i) {
|
|
|
1912
1913
|
});
|
|
1913
1914
|
return;
|
|
1914
1915
|
}
|
|
1915
|
-
const o = n ?? e, r = n !== void 0 && !a.isVariableStatement(n), l = a.isMethodDeclaration(e), s = a.isMethodSignature(e), c = l || s || r, p = n !== void 0 && a.isVariableStatement(n), m = a.isFunctionDeclaration(e) || p, u = !r && !p && a.isFunctionTypeNode(e) || a.isCallSignatureDeclaration(e), f = a.isConstructorDeclaration(e), g = f || a.isConstructSignatureDeclaration(e) || a.isConstructorTypeNode(e), S = i.isInLuminaMinimalExtraction || i.jsDoc === $e, h =
|
|
1916
|
+
const o = n ?? e, r = n !== void 0 && !a.isVariableStatement(n), l = a.isMethodDeclaration(e), s = a.isMethodSignature(e), c = l || s || r, p = n !== void 0 && a.isVariableStatement(n), m = a.isFunctionDeclaration(e) || p, u = !r && !p && a.isFunctionTypeNode(e) || a.isCallSignatureDeclaration(e), f = a.isConstructorDeclaration(e), g = f || a.isConstructSignatureDeclaration(e) || a.isConstructorTypeNode(e), S = i.isInLuminaMinimalExtraction || i.jsDoc === $e, h = bt();
|
|
1916
1917
|
let E, C, M = !1, k = !1;
|
|
1917
1918
|
if (!m && o.modifiers !== void 0)
|
|
1918
1919
|
for (let x = 0; x < o.modifiers.length; ++x)
|
|
@@ -1939,13 +1940,13 @@ function tt(e, t, n, i) {
|
|
|
1939
1940
|
summary: void 0,
|
|
1940
1941
|
description: void 0,
|
|
1941
1942
|
docsTags: void 0,
|
|
1942
|
-
typeParameters:
|
|
1943
|
+
typeParameters: xt(e.typeParameters, !1, i),
|
|
1943
1944
|
parameters: [],
|
|
1944
1945
|
return: f ? void 0 : {
|
|
1945
1946
|
summary: void 0,
|
|
1946
1947
|
description: void 0,
|
|
1947
1948
|
type: S ? k ? yr : cn : ee(
|
|
1948
|
-
e.type ??
|
|
1949
|
+
e.type ?? St(e, i) ?? ce(
|
|
1949
1950
|
{ file: i.file, node: e },
|
|
1950
1951
|
"@public function must have a return type annotation",
|
|
1951
1952
|
i
|
|
@@ -1965,14 +1966,14 @@ function tt(e, t, n, i) {
|
|
|
1965
1966
|
y -= 1;
|
|
1966
1967
|
continue;
|
|
1967
1968
|
}
|
|
1968
|
-
const B = f && $ !== void 0 && b.modifiers !== void 0 && b.modifiers.length > 0 ?
|
|
1969
|
+
const B = f && $ !== void 0 && b.modifiers !== void 0 && b.modifiers.length > 0 ? xe(b, !0, i) : void 0;
|
|
1969
1970
|
if (B !== void 0) {
|
|
1970
1971
|
y -= 1, I += 1, i.jsDoc = B;
|
|
1971
1972
|
const oe = un(b, $, !1, i);
|
|
1972
1973
|
if (oe === void 0)
|
|
1973
1974
|
continue;
|
|
1974
1975
|
i.apiObject.members.push(oe);
|
|
1975
|
-
const
|
|
1976
|
+
const be = {
|
|
1976
1977
|
name: $,
|
|
1977
1978
|
deprecated: void 0,
|
|
1978
1979
|
summary: void 0,
|
|
@@ -1983,7 +1984,7 @@ function tt(e, t, n, i) {
|
|
|
1983
1984
|
type: oe.type,
|
|
1984
1985
|
default: oe.default
|
|
1985
1986
|
};
|
|
1986
|
-
|
|
1987
|
+
be.optional = Mi(b, be), P.parameters.push(be);
|
|
1987
1988
|
continue;
|
|
1988
1989
|
}
|
|
1989
1990
|
let U = F[x + y]?.text, W, V;
|
|
@@ -2023,7 +2024,7 @@ function tt(e, t, n, i) {
|
|
|
2023
2024
|
optional: void 0,
|
|
2024
2025
|
rest: b.dotDotDotToken ? !0 : void 0,
|
|
2025
2026
|
type: it,
|
|
2026
|
-
default:
|
|
2027
|
+
default: ft(b.initializer, void 0, i.file)
|
|
2027
2028
|
};
|
|
2028
2029
|
ye.optional = Mi(b, ye), P.parameters.push(ye);
|
|
2029
2030
|
}
|
|
@@ -2043,7 +2044,7 @@ function tt(e, t, n, i) {
|
|
|
2043
2044
|
file: i.file,
|
|
2044
2045
|
node: e
|
|
2045
2046
|
})), i.functionLikeTypeParameters = void 0;
|
|
2046
|
-
const A = m ?
|
|
2047
|
+
const A = m ? Pt(o) : 0, L = m && i.exportDefaultName === t, N = A === 2 || L;
|
|
2047
2048
|
return m && (N ? oi(P, !0, i) : A === 0 && i.config.strict && i.emitError("Expected @public function to be exported using named or default export.", {
|
|
2048
2049
|
file: i.file,
|
|
2049
2050
|
node: e
|
|
@@ -2067,32 +2068,32 @@ const Mi = (e, t) => (
|
|
|
2067
2068
|
e.initializer !== void 0 && t.default === void 0 ? !0 : void 0
|
|
2068
2069
|
);
|
|
2069
2070
|
function Rr(e, t, n) {
|
|
2070
|
-
return Jt(),
|
|
2071
|
+
return Jt(), We(e, t), ri && t !== void 0 && n !== void 0 && (Jt(), si(t.getTypeAtLocation(n))), pn();
|
|
2071
2072
|
}
|
|
2072
2073
|
function Ar(e) {
|
|
2073
2074
|
return Jt(), si(e), pn();
|
|
2074
2075
|
}
|
|
2075
|
-
let Ye = !1,
|
|
2076
|
-
const
|
|
2076
|
+
let Ye = !1, ve = !1, he = !1, Ze = !1, Ce = !1, ri = !1;
|
|
2077
|
+
const Te = [], fe = [];
|
|
2077
2078
|
function Jt() {
|
|
2078
|
-
Ye = !1,
|
|
2079
|
+
Ye = !1, ve = !1, he = !1, Ze = !1, Ce = !1, ri = !1, Te.length = 0, fe.length = 0;
|
|
2079
2080
|
}
|
|
2080
2081
|
function pn() {
|
|
2081
|
-
if (!
|
|
2082
|
+
if (!he && !Ze && !Ce && !Ye)
|
|
2082
2083
|
return;
|
|
2083
2084
|
const e = [];
|
|
2084
|
-
if (
|
|
2085
|
-
for (let t = 0; t <
|
|
2086
|
-
e.push({ type: "string", value:
|
|
2087
|
-
else
|
|
2085
|
+
if (Te.length > 0)
|
|
2086
|
+
for (let t = 0; t < Te.length; ++t)
|
|
2087
|
+
e.push({ type: "string", value: Te[t] });
|
|
2088
|
+
else he && e.push(Lr);
|
|
2088
2089
|
if (fe.length > 0)
|
|
2089
2090
|
for (let t = 0; t < fe.length; ++t)
|
|
2090
2091
|
e.push({ type: "number", value: fe[t] });
|
|
2091
|
-
else
|
|
2092
|
-
return Ze && e.push(Fr), Ye ? e.push(Or) :
|
|
2092
|
+
else Ce && e.push(Gr);
|
|
2093
|
+
return Ze && e.push(Fr), Ye ? e.push(Or) : ve && e.push(wr), e;
|
|
2093
2094
|
}
|
|
2094
2095
|
const Lr = { type: "string", value: void 0 }, Gr = { type: "number", value: void 0 }, Fr = { type: "boolean", value: void 0 }, Or = { type: "any", value: void 0 }, wr = { type: "object", value: void 0 };
|
|
2095
|
-
function
|
|
2096
|
+
function We(e, t) {
|
|
2096
2097
|
switch (e.kind) {
|
|
2097
2098
|
case a.SyntaxKind.BooleanKeyword:
|
|
2098
2099
|
case a.SyntaxKind.TrueKeyword:
|
|
@@ -2100,47 +2101,47 @@ function _e(e, t) {
|
|
|
2100
2101
|
Ze = !0;
|
|
2101
2102
|
return;
|
|
2102
2103
|
case a.SyntaxKind.NumberKeyword:
|
|
2103
|
-
|
|
2104
|
+
Ce = !0;
|
|
2104
2105
|
return;
|
|
2105
2106
|
case a.SyntaxKind.StringKeyword:
|
|
2106
2107
|
case a.SyntaxKind.TemplateLiteralType:
|
|
2107
|
-
|
|
2108
|
+
he = !0;
|
|
2108
2109
|
return;
|
|
2109
2110
|
case a.SyntaxKind.AnyKeyword:
|
|
2110
2111
|
Ye = !0;
|
|
2111
2112
|
return;
|
|
2112
2113
|
case a.SyntaxKind.LiteralType:
|
|
2113
|
-
|
|
2114
|
+
We(e.literal, t);
|
|
2114
2115
|
return;
|
|
2115
2116
|
case a.SyntaxKind.StringLiteral:
|
|
2116
2117
|
case a.SyntaxKind.NoSubstitutionTemplateLiteral:
|
|
2117
|
-
|
|
2118
|
+
he = !0, Te.push(e.text);
|
|
2118
2119
|
return;
|
|
2119
2120
|
case a.SyntaxKind.NumericLiteral:
|
|
2120
|
-
|
|
2121
|
+
Ce = !0, fe.push(e.text);
|
|
2121
2122
|
return;
|
|
2122
2123
|
case a.SyntaxKind.PrefixUnaryExpression:
|
|
2123
2124
|
const n = e.operand;
|
|
2124
|
-
n.kind === a.SyntaxKind.NumericLiteral ? (fe.push(`-${n.text}`),
|
|
2125
|
+
n.kind === a.SyntaxKind.NumericLiteral ? (fe.push(`-${n.text}`), Ce = !0) : ve = !0;
|
|
2125
2126
|
return;
|
|
2126
2127
|
case a.SyntaxKind.VoidKeyword:
|
|
2127
2128
|
case a.SyntaxKind.UndefinedKeyword:
|
|
2128
2129
|
case a.SyntaxKind.NullKeyword:
|
|
2129
2130
|
return;
|
|
2130
2131
|
case a.SyntaxKind.UnionType:
|
|
2131
|
-
const i = e.types, o = Math.min(i.length,
|
|
2132
|
+
const i = e.types, o = Math.min(i.length, Tt);
|
|
2132
2133
|
for (let l = 0; l < o; ++l)
|
|
2133
|
-
|
|
2134
|
-
i.length >
|
|
2134
|
+
We(i[l], t);
|
|
2135
|
+
i.length > Tt && (Te.length = 0, fe.length = 0);
|
|
2135
2136
|
return;
|
|
2136
2137
|
case a.SyntaxKind.ParenthesizedType:
|
|
2137
|
-
|
|
2138
|
+
We(e.type, t);
|
|
2138
2139
|
return;
|
|
2139
2140
|
case a.SyntaxKind.TypeQuery:
|
|
2140
2141
|
case a.SyntaxKind.IndexedAccessType:
|
|
2141
2142
|
case a.SyntaxKind.ImportType:
|
|
2142
2143
|
case a.SyntaxKind.TypeReference:
|
|
2143
|
-
t === void 0 ?
|
|
2144
|
+
t === void 0 ? ve = !0 : si(
|
|
2144
2145
|
t.getTypeFromTypeNode(
|
|
2145
2146
|
e
|
|
2146
2147
|
)
|
|
@@ -2148,7 +2149,7 @@ function _e(e, t) {
|
|
|
2148
2149
|
return;
|
|
2149
2150
|
case a.SyntaxKind.TypeOperator:
|
|
2150
2151
|
const r = e;
|
|
2151
|
-
r.operator === a.SyntaxKind.KeyOfKeyword ?
|
|
2152
|
+
r.operator === a.SyntaxKind.KeyOfKeyword ? he = !0 : r.operator === a.SyntaxKind.ReadonlyKeyword ? We(r.type, t) : ve = !0;
|
|
2152
2153
|
return;
|
|
2153
2154
|
/*case ts.SyntaxKind.UnknownKeyword:
|
|
2154
2155
|
case ts.SyntaxKind.FunctionType:
|
|
@@ -2161,31 +2162,31 @@ function _e(e, t) {
|
|
|
2161
2162
|
case ts.SyntaxKind.ObjectKeyword:
|
|
2162
2163
|
case ts.SyntaxKind.SymbolKeyword:*/
|
|
2163
2164
|
default:
|
|
2164
|
-
|
|
2165
|
+
ve = !0;
|
|
2165
2166
|
return;
|
|
2166
2167
|
}
|
|
2167
2168
|
}
|
|
2168
|
-
const
|
|
2169
|
+
const Tt = 40;
|
|
2169
2170
|
function si(e) {
|
|
2170
2171
|
if (e.isUnion()) {
|
|
2171
|
-
const t = Math.min(e.types.length,
|
|
2172
|
+
const t = Math.min(e.types.length, Tt);
|
|
2172
2173
|
for (let n = 0; n < t; ++n)
|
|
2173
2174
|
xi(e.types[n]);
|
|
2174
|
-
e.types.length >
|
|
2175
|
+
e.types.length > Tt && (Te.length = 0, fe.length = 0);
|
|
2175
2176
|
} else
|
|
2176
2177
|
xi(e);
|
|
2177
2178
|
}
|
|
2178
2179
|
function xi(e) {
|
|
2179
2180
|
const t = e.flags;
|
|
2180
2181
|
let n = !1;
|
|
2181
|
-
if (t & a.TypeFlags.StringLiteral ? (n = !0,
|
|
2182
|
+
if (t & a.TypeFlags.StringLiteral ? (n = !0, he = !0, Te.push(e.value)) : t & a.TypeFlags.StringLike && (n = !0, he = !0), t & a.TypeFlags.NumberLiteral ? (n = !0, Ce = !0, fe.push(e.value.toString())) : t & a.TypeFlags.NumberLike && (n = !0, Ce = !0), t & a.TypeFlags.BooleanLike && (n = !0, Ze = !0), t & a.TypeFlags.Any) {
|
|
2182
2183
|
if (e.intrinsicName === "error") {
|
|
2183
|
-
|
|
2184
|
+
ve = !0, ri = !0;
|
|
2184
2185
|
return;
|
|
2185
2186
|
}
|
|
2186
2187
|
Ye = !0, n = !0;
|
|
2187
2188
|
}
|
|
2188
|
-
t & Nr || n || (
|
|
2189
|
+
t & Nr || n || (ve = !0);
|
|
2189
2190
|
}
|
|
2190
2191
|
const Nr = a.TypeFlags.Null | a.TypeFlags.VoidLike, $r = (e) => e.map(Ur).join(" | "), Ur = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
|
|
2191
2192
|
function Vr(e, t, n) {
|
|
@@ -2313,7 +2314,7 @@ function Kr(e, t) {
|
|
|
2313
2314
|
return e.pos !== -1 && e.end !== -1 && t !== void 0 ? e.getText(t) : Hr(e);
|
|
2314
2315
|
}
|
|
2315
2316
|
let Di;
|
|
2316
|
-
const qt = Zt.name,
|
|
2317
|
+
const qt = Zt.name, Et = {
|
|
2317
2318
|
getCurrentDirectory: process.cwd,
|
|
2318
2319
|
getCanonicalFileName: (e) => e,
|
|
2319
2320
|
getNewLine: () => a.sys.newLine
|
|
@@ -2327,20 +2328,20 @@ const qt = Zt.name, bt = {
|
|
|
2327
2328
|
file: c ? void 0 : t,
|
|
2328
2329
|
start: s ? o : 0,
|
|
2329
2330
|
length: s ? r : 0,
|
|
2330
|
-
messageText: (c ? `${
|
|
2331
|
+
messageText: (c ? `${yt("cyan", i, { stream: process.stderr })}: ` : "") + e + (s || n === void 0 ? "" : `
|
|
2331
2332
|
|
|
2332
2333
|
${Kr(n, t)}`)
|
|
2333
|
-
}, d = a.formatDiagnosticsWithColorAndContext([p],
|
|
2334
|
-
Di ??= process.env.CI !== void 0 ||
|
|
2334
|
+
}, d = a.formatDiagnosticsWithColorAndContext([p], Et);
|
|
2335
|
+
Di ??= process.env.CI !== void 0 || yt("red", "", { stream: process.stderr }) !== "";
|
|
2335
2336
|
const m = Di ? d : d.replaceAll(jr, ""), u = s ? m : m.replace(Ri.toString(), qt);
|
|
2336
2337
|
this.config.context.logger.error(u);
|
|
2337
|
-
}, Ri = 1490, jr = /\x1B\[[0-9;]*m/gu,
|
|
2338
|
+
}, Ri = 1490, jr = /\x1B\[[0-9;]*m/gu, Me = yt("cyan", `[${qt}] `), mn = yt("cyan", "[typescript] ");
|
|
2338
2339
|
function un(e, t, n, i) {
|
|
2339
2340
|
if (t === void 0) {
|
|
2340
2341
|
i.emitError("Computed property names are not yet supported", { file: i.file, node: e });
|
|
2341
2342
|
return;
|
|
2342
2343
|
}
|
|
2343
|
-
const o = e, r =
|
|
2344
|
+
const o = e, r = ze(o.modifiers, "property") ?? (i.pairedSetter === void 0 ? void 0 : ze(i.pairedSetter.modifiers, "property")), l = r?.arguments[0], s = l !== void 0 && a.isObjectLiteralExpression(l) ? l.properties : void 0, c = a.isPropertyDeclaration(e) || a.isPropertySignature(e), p = a.isGetAccessor(e), d = Un(), m = i.isInLuminaMinimalExtraction || i.jsDoc === $e;
|
|
2344
2345
|
let u = !1, f = !1, g, S = !1, h, E, C;
|
|
2345
2346
|
if (c && e.modifiers !== void 0)
|
|
2346
2347
|
for (let x = 0; x < e.modifiers.length; ++x)
|
|
@@ -2486,7 +2487,7 @@ function un(e, t, n, i) {
|
|
|
2486
2487
|
if (W !== void 0)
|
|
2487
2488
|
for (let V = 0; V < W.length; ++V) {
|
|
2488
2489
|
const z = W[V];
|
|
2489
|
-
B ??= a.isGetAccessor(z) ? z : void 0, U ??= a.isSetAccessor(z) ? z : void 0, "initializer" in z && (T.default =
|
|
2490
|
+
B ??= a.isGetAccessor(z) ? z : void 0, U ??= a.isSetAccessor(z) ? z : void 0, "initializer" in z && (T.default = ft(
|
|
2490
2491
|
z.initializer,
|
|
2491
2492
|
T.default,
|
|
2492
2493
|
z.getSourceFile()
|
|
@@ -2509,14 +2510,14 @@ function un(e, t, n, i) {
|
|
|
2509
2510
|
D.getText(i.file) !== F.getText(i.file) ? T.getterType = ee(D, i) : T.readonly === !0 && T.name === "type" && I.kind === a.SyntaxKind.LiteralType && I.literal.kind === a.SyntaxKind.StringLiteral && (i.moduleContext.typeName = I.literal.text), (d.hasAutoCasting === !0 || d.isConstructorOnly === !0) && (T.readonly === !0 && d.isConstructorOnly !== !0 ? d.hasAutoCasting = void 0 : T.getterType ??= {
|
|
2510
2511
|
...T.type,
|
|
2511
2512
|
references: T.type.references === void 0 ? void 0 : [...T.type.references]
|
|
2512
|
-
}), n && I.kind === a.SyntaxKind.LiteralType || (T.default =
|
|
2513
|
+
}), n && I.kind === a.SyntaxKind.LiteralType || (T.default = ft(
|
|
2513
2514
|
e.initializer,
|
|
2514
2515
|
T.default,
|
|
2515
2516
|
i.file
|
|
2516
2517
|
)), A) {
|
|
2517
2518
|
const x = y === void 0 && T.default === "true";
|
|
2518
2519
|
T.type.values?.length === 1 && T.type.values[0].type === "boolean" && (T.default === void 0 ? T.default = "false" : x && T.deprecated === void 0 && (i.loggedBooleanWarning || i.config.context.logger.error(
|
|
2519
|
-
`${
|
|
2520
|
+
`${Me}Boolean properties should default to "false". Found default value "true" in ${i.apiObject.name}.${T.name}. See https://webgis.esri.com/references/lumina/properties#boolean-properties`
|
|
2520
2521
|
), i.loggedBooleanWarning = !0));
|
|
2521
2522
|
}
|
|
2522
2523
|
return Tr(
|
|
@@ -2591,7 +2592,7 @@ function et(e, t) {
|
|
|
2591
2592
|
description: void 0,
|
|
2592
2593
|
docsTags: void 0,
|
|
2593
2594
|
demos: void 0,
|
|
2594
|
-
typeParameters: c ? void 0 :
|
|
2595
|
+
typeParameters: c ? void 0 : xt(e.typeParameters, !0, t),
|
|
2595
2596
|
superclass: void 0,
|
|
2596
2597
|
supertypes: void 0,
|
|
2597
2598
|
mixins: void 0,
|
|
@@ -2621,7 +2622,7 @@ function et(e, t) {
|
|
|
2621
2622
|
node: e
|
|
2622
2623
|
}
|
|
2623
2624
|
) : qr(s, n, d, e, t), r !== void 0 && vr(u, t), m.members.length === 0 && (r === void 0 && (m.members = void 0), l && (t.moduleContext.constructorPropertiesInterface = f));
|
|
2624
|
-
const S = t.exportDefaultName === o, h =
|
|
2625
|
+
const S = t.exportDefaultName === o, h = Pt(e), E = S || h === 2;
|
|
2625
2626
|
return (E || r !== void 0) && oi(m, E, t), n ? (r === void 0 ? xr(
|
|
2626
2627
|
t,
|
|
2627
2628
|
e,
|
|
@@ -2722,9 +2723,15 @@ function yn(e, t, n, i) {
|
|
|
2722
2723
|
if (p === void 0 && s.name?.kind === a.SyntaxKind.PrivateIdentifier)
|
|
2723
2724
|
continue;
|
|
2724
2725
|
c !== void 0 && p === d && (a.isGetAccessor(c) ? (i.pairedSetter = s, s = c) : a.isSetAccessor(c) && (i.pairedSetter = c));
|
|
2725
|
-
let f =
|
|
2726
|
+
let f = xe(s, !0, i) ?? (i.pairedSetter === void 0 ? void 0 : xe(i.pairedSetter, !0, i));
|
|
2726
2727
|
if (f === void 0 && !i.config.strict && (o ? p !== void 0 && Li(s, i.pairedSetter, !0) : !on(s.modifiers, a.SyntaxKind.PrivateKeyword))) {
|
|
2727
|
-
const S =
|
|
2728
|
+
const S = Gt(
|
|
2729
|
+
s,
|
|
2730
|
+
!1,
|
|
2731
|
+
i,
|
|
2732
|
+
qe,
|
|
2733
|
+
i.pairedSetter
|
|
2734
|
+
);
|
|
2728
2735
|
S?.docsTags.includes(X.private) === !0 ? o && i.config.context.includeLuminaPrivateComponents ? f = $e : f = void 0 : f = S;
|
|
2729
2736
|
} else f === void 0 && o && i.config.context.includeLuminaPrivateComponents && Li(s, i.pairedSetter, !1) && (f = $e);
|
|
2730
2737
|
if (f === void 0) {
|
|
@@ -2733,22 +2740,22 @@ function yn(e, t, n, i) {
|
|
|
2733
2740
|
}
|
|
2734
2741
|
i.jsDoc = f;
|
|
2735
2742
|
let g;
|
|
2736
|
-
a.isPropertyDeclaration(s) || a.isPropertyAssignment(s) || a.isGetAccessorDeclaration(s) || a.isSetAccessorDeclaration(s) || a.isPropertySignature(s) ? g = un(s, p, !1, i) : a.isMethodDeclaration(s) || a.isMethodSignature(s) ? g =
|
|
2743
|
+
a.isPropertyDeclaration(s) || a.isPropertyAssignment(s) || a.isGetAccessorDeclaration(s) || a.isSetAccessorDeclaration(s) || a.isPropertySignature(s) ? g = un(s, p, !1, i) : a.isMethodDeclaration(s) || a.isMethodSignature(s) ? g = At(s, p, void 0, i) : a.isConstructorDeclaration(s) || a.isConstructSignatureDeclaration(s) ? (m = !0, g = At(s, n, void 0, i)) : a.isCallSignatureDeclaration(s) ? g = At(s, n, void 0, i) : a.isIndexSignatureDeclaration(s) && e.kind === "interface" ? (Lt.members.splice(
|
|
2737
2744
|
0,
|
|
2738
|
-
|
|
2745
|
+
Lt.members.length,
|
|
2739
2746
|
s
|
|
2740
|
-
), gn(e,
|
|
2747
|
+
), gn(e, Lt, i), ie(e).emitAsTypeAlias = !0) : i.emitError(`@public used on unsupported member kind: ${a.SyntaxKind[s.kind]}`, {
|
|
2741
2748
|
file: i.file,
|
|
2742
2749
|
node: s
|
|
2743
2750
|
}), g !== void 0 && r.push(g);
|
|
2744
2751
|
}
|
|
2745
2752
|
return i.apiObject = void 0, m;
|
|
2746
2753
|
}
|
|
2747
|
-
const
|
|
2754
|
+
const Lt = a.factory.createTypeLiteralNode(void 0);
|
|
2748
2755
|
function Li(e, t, n) {
|
|
2749
2756
|
if (e.kind === a.SyntaxKind.PropertyDeclaration || e.kind === a.SyntaxKind.GetAccessor || e.kind === a.SyntaxKind.SetAccessor) {
|
|
2750
2757
|
const i = e;
|
|
2751
|
-
if ((
|
|
2758
|
+
if ((ze(i.modifiers, "property") ?? (t === void 0 ? void 0 : ze(t.modifiers, "property"))) !== void 0)
|
|
2752
2759
|
return !0;
|
|
2753
2760
|
if (!n)
|
|
2754
2761
|
return !1;
|
|
@@ -2761,7 +2768,7 @@ function Li(e, t, n) {
|
|
|
2761
2768
|
return !1;
|
|
2762
2769
|
}
|
|
2763
2770
|
return e.kind === a.SyntaxKind.PropertyDeclaration && i.initializer !== void 0 && a.isCallExpression(i.initializer) ? a.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") || a.isCallExpression(i.initializer.expression) && a.isIdentifier(i.initializer.expression.expression) && i.initializer.expression.expression.escapedText === "usePropertyChange" : !1;
|
|
2764
|
-
} else return e.kind === a.SyntaxKind.MethodDeclaration ?
|
|
2771
|
+
} else return e.kind === a.SyntaxKind.MethodDeclaration ? ze(e.modifiers, "method") !== void 0 : !1;
|
|
2765
2772
|
}
|
|
2766
2773
|
function gn(e, t, n) {
|
|
2767
2774
|
const i = ee(t, n);
|
|
@@ -2844,19 +2851,19 @@ function Xr(e, t, n) {
|
|
|
2844
2851
|
r.mixins.unshift(Ne(c, void 0, n));
|
|
2845
2852
|
}
|
|
2846
2853
|
}
|
|
2847
|
-
const
|
|
2854
|
+
const Ve = "DeclareCssProperties", Qr = /^<\s*["'](?<syntax>[a-z-]+)["'](?:\s*,\s*["'](?<multiplier>[#+]?)["'])?\s*>/u;
|
|
2848
2855
|
function Yr(e, t, n) {
|
|
2849
2856
|
const i = e.body;
|
|
2850
2857
|
if (i !== void 0)
|
|
2851
2858
|
for (let o = 0; o < i.statements.length; ++o) {
|
|
2852
2859
|
const r = i.statements[o];
|
|
2853
|
-
if (!a.isInterfaceDeclaration(r) || r.name.escapedText !==
|
|
2860
|
+
if (!a.isInterfaceDeclaration(r) || r.name.escapedText !== Ve)
|
|
2854
2861
|
continue;
|
|
2855
|
-
n.jsDoc =
|
|
2862
|
+
n.jsDoc = qe;
|
|
2856
2863
|
const l = et(r, n);
|
|
2857
2864
|
if (l?.supertypes !== void 0) {
|
|
2858
2865
|
n.emitError(
|
|
2859
|
-
`${
|
|
2866
|
+
`${Ve} interface cannot extend other interfaces. Open feature request if this is needed.`,
|
|
2860
2867
|
{
|
|
2861
2868
|
file: n.file,
|
|
2862
2869
|
node: r
|
|
@@ -2866,7 +2873,7 @@ function Yr(e, t, n) {
|
|
|
2866
2873
|
}
|
|
2867
2874
|
if (l?.members === void 0) {
|
|
2868
2875
|
n.emitError(
|
|
2869
|
-
`${
|
|
2876
|
+
`${Ve} interface is empty. It should contain at least one CSS custom property declaration.`,
|
|
2870
2877
|
{
|
|
2871
2878
|
file: n.file,
|
|
2872
2879
|
node: r
|
|
@@ -2881,7 +2888,7 @@ function Yr(e, t, n) {
|
|
|
2881
2888
|
const p = l.members[c];
|
|
2882
2889
|
if (p.kind !== "field") {
|
|
2883
2890
|
n.emitError(
|
|
2884
|
-
`${
|
|
2891
|
+
`${Ve} should only contain named property signatures. Found ${p.kind} ${qn(p)}.`,
|
|
2885
2892
|
{
|
|
2886
2893
|
file: n.file,
|
|
2887
2894
|
node: r
|
|
@@ -2891,7 +2898,7 @@ function Yr(e, t, n) {
|
|
|
2891
2898
|
}
|
|
2892
2899
|
if (!p.name.startsWith("--")) {
|
|
2893
2900
|
n.emitError(
|
|
2894
|
-
`${
|
|
2901
|
+
`${Ve} property names must start with "--". Found "${p.name}".`,
|
|
2895
2902
|
{
|
|
2896
2903
|
file: n.file,
|
|
2897
2904
|
node: r
|
|
@@ -2962,7 +2969,7 @@ function es(e, t) {
|
|
|
2962
2969
|
description: void 0,
|
|
2963
2970
|
docsTags: void 0,
|
|
2964
2971
|
demos: void 0,
|
|
2965
|
-
typeParameters:
|
|
2972
|
+
typeParameters: xt(e.typeParameters, !0, t),
|
|
2966
2973
|
superclass: void 0,
|
|
2967
2974
|
supertypes: void 0,
|
|
2968
2975
|
mixins: void 0,
|
|
@@ -2991,8 +2998,8 @@ function es(e, t) {
|
|
|
2991
2998
|
else if (a.isTypeReferenceNode(d))
|
|
2992
2999
|
s.supertypes ??= [], s.supertypes.push(Ne(d.typeName, d.typeArguments, t));
|
|
2993
3000
|
else if (a.isFunctionTypeNode(d) || a.isConstructorTypeNode(d)) {
|
|
2994
|
-
if (t.jsDoc =
|
|
2995
|
-
t.jsDoc = { ...
|
|
3001
|
+
if (t.jsDoc = qe, s.docsTags !== void 0) {
|
|
3002
|
+
t.jsDoc = { ...qe, docsTags: [] };
|
|
2996
3003
|
for (let m = 0; m < s.docsTags.length; ++m) {
|
|
2997
3004
|
const u = s.docsTags[m];
|
|
2998
3005
|
(u.name === "param" || u.name === "returns") && (t.jsDoc.docsTags.push(u), s.docsTags.splice(m, 1), m -= 1);
|
|
@@ -3035,7 +3042,7 @@ function ts(e, t, n) {
|
|
|
3035
3042
|
});
|
|
3036
3043
|
return;
|
|
3037
3044
|
}
|
|
3038
|
-
|
|
3045
|
+
xt(
|
|
3039
3046
|
// Skip the TBase type parameter - non-public implementation detail
|
|
3040
3047
|
i.typeParameters.length === 1 ? void 0 : i.typeParameters.slice(1),
|
|
3041
3048
|
!0,
|
|
@@ -3081,7 +3088,7 @@ function ns(e, t) {
|
|
|
3081
3088
|
return;
|
|
3082
3089
|
}
|
|
3083
3090
|
const r = o.escapedText, l = t.exportDefaultName === r;
|
|
3084
|
-
if (
|
|
3091
|
+
if (Pt(e) === 0 && !l && t.config.strict && t.emitError("Expected @public variable to be exported as named or default export.", {
|
|
3085
3092
|
file: t.file,
|
|
3086
3093
|
node: e
|
|
3087
3094
|
}), t.mixinName !== void 0 && i.initializer !== void 0 && a.isCallExpression(i.initializer) && a.isIdentifier(i.initializer.expression) && i.initializer.expression.escapedText === t.mixinName)
|
|
@@ -3111,7 +3118,7 @@ function ns(e, t) {
|
|
|
3111
3118
|
type: ee(c, t),
|
|
3112
3119
|
default: void 0
|
|
3113
3120
|
};
|
|
3114
|
-
return wn(m, t.jsDoc), p && c.kind === a.SyntaxKind.LiteralType || (m.default =
|
|
3121
|
+
return wn(m, t.jsDoc), p && c.kind === a.SyntaxKind.LiteralType || (m.default = ft(i.initializer, m.default, t.file)), Mr(
|
|
3115
3122
|
t,
|
|
3116
3123
|
e,
|
|
3117
3124
|
t.config.documentation.copyDocDefinitions.variables,
|
|
@@ -3150,7 +3157,7 @@ function rs(e, t) {
|
|
|
3150
3157
|
return;
|
|
3151
3158
|
}
|
|
3152
3159
|
const o = n.slice(t.config.context.basePath.length), r = le(o), l = at(r, t, !0), s = t.componentTagName === void 0 ? l : `${l}/customElement`;
|
|
3153
|
-
t.mixinName = void 0, t.moduleHasClass = !1, t.apiClassLikeName = void 0, t.isInLuminaMinimalExtraction = t.config.context.isLuminaMinimalExtraction;
|
|
3160
|
+
t.mixinName = void 0, t.moduleHasClass = !1, t.apiClassLikeName = void 0, t.componentCssFileDocs = void 0, t.isInLuminaMinimalExtraction = t.config.context.isLuminaMinimalExtraction;
|
|
3154
3161
|
const c = /* @__PURE__ */ Object.create(null), p = t.localDeclarations;
|
|
3155
3162
|
p.clear();
|
|
3156
3163
|
const d = t.localPrivateDeclarations;
|
|
@@ -3173,10 +3180,10 @@ function rs(e, t) {
|
|
|
3173
3180
|
// Only look at web components in Lumina's dev server
|
|
3174
3181
|
t.isInLuminaMinimalExtraction
|
|
3175
3182
|
)
|
|
3176
|
-
D = v.kind === a.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && v.heritageClauses !== void 0 && v.modifiers !== void 0 ?
|
|
3183
|
+
D = v.kind === a.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && v.heritageClauses !== void 0 && v.modifiers !== void 0 ? qe : void 0;
|
|
3177
3184
|
else if (F) {
|
|
3178
|
-
if (D =
|
|
3179
|
-
const I =
|
|
3185
|
+
if (D = xe(v, !0, t), D === void 0 && !t.config.strict) {
|
|
3186
|
+
const I = Gt(v, !1, t, {
|
|
3180
3187
|
description: void 0,
|
|
3181
3188
|
docsTags: []
|
|
3182
3189
|
}), T = v.kind === a.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && v.heritageClauses !== void 0 && v.modifiers !== void 0;
|
|
@@ -3186,7 +3193,7 @@ function rs(e, t) {
|
|
|
3186
3193
|
v.heritageClauses !== void 0 && v.modifiers !== void 0 && (D = $e, t.isInLuminaMinimalExtraction = !0);
|
|
3187
3194
|
D !== void 0 && !t.config.strict && v.kind === a.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && v.heritageClauses !== void 0 && v.modifiers !== void 0 && D.docsTags.includes(X.internal) && (h = !0);
|
|
3188
3195
|
}
|
|
3189
|
-
if (t.statementJsDocs[P] = D, F || P === 0 && (m =
|
|
3196
|
+
if (t.statementJsDocs[P] = D, F || P === 0 && (m = xe(e, !0, t)), D !== void 0)
|
|
3190
3197
|
E && D.docsTags.push(X.internal), p.add(
|
|
3191
3198
|
(v.name ?? v.declarationList?.declarations[0].name).escapedText
|
|
3192
3199
|
), v.kind === a.SyntaxKind.ClassDeclaration ? t.apiClassLikeName = v.name?.escapedText : v.kind === a.SyntaxKind.VariableStatement && v.declarationList.declarations[0].initializer?.kind === a.SyntaxKind.ArrowFunction && (t.apiClassLikeName = v.declarationList.declarations[0].name.escapedText);
|
|
@@ -3237,7 +3244,7 @@ function rs(e, t) {
|
|
|
3237
3244
|
t.exportDefaultName = I, !p.has(I) && d?.has(I) === !0 && S?.pendingNames?.has("default") === !0 && d.set(I, Math.abs(d.get(I)));
|
|
3238
3245
|
}
|
|
3239
3246
|
} else if (a.isExportDeclaration(v) && v.moduleSpecifier !== void 0 && !t.isInLuminaMinimalExtraction) {
|
|
3240
|
-
if (
|
|
3247
|
+
if (xe(v, !0, t) !== void 0) {
|
|
3241
3248
|
const T = v.moduleSpecifier.text, y = !T.startsWith("."), A = y ? T : Ut(r, le(T)), L = y ? void 0 : at(A, t);
|
|
3242
3249
|
g.reExports ??= [];
|
|
3243
3250
|
const N = [];
|
|
@@ -3249,14 +3256,14 @@ function rs(e, t) {
|
|
|
3249
3256
|
exportName: B,
|
|
3250
3257
|
aliasName: U,
|
|
3251
3258
|
isTypeOnly: v.isTypeOnly
|
|
3252
|
-
}), !t.config.strict && L !== void 0 &&
|
|
3259
|
+
}), !t.config.strict && L !== void 0 && gt(L, A, B, t);
|
|
3253
3260
|
}
|
|
3254
3261
|
} else
|
|
3255
3262
|
N.push({
|
|
3256
3263
|
exportName: "*",
|
|
3257
3264
|
aliasName: v.exportClause === void 0 ? void 0 : Fe(v.exportClause.name),
|
|
3258
3265
|
isTypeOnly: !1
|
|
3259
|
-
}), !t.config.strict && L !== void 0 &&
|
|
3266
|
+
}), !t.config.strict && L !== void 0 && gt(L, A, "*", t);
|
|
3260
3267
|
g.reExports.push({
|
|
3261
3268
|
modulePath: L,
|
|
3262
3269
|
externalSpecifier: y ? T : void 0,
|
|
@@ -3264,7 +3271,7 @@ function rs(e, t) {
|
|
|
3264
3271
|
specifiers: N
|
|
3265
3272
|
});
|
|
3266
3273
|
}
|
|
3267
|
-
} else !t.isInLuminaMinimalExtraction && a.isModuleDeclaration(v) ? t.componentTagName !== void 0 && a.isStringLiteral(v.name) && v.name.text === "@arcgis/lumina" ? u = v :
|
|
3274
|
+
} else !t.isInLuminaMinimalExtraction && a.isModuleDeclaration(v) ? t.componentTagName !== void 0 && a.isStringLiteral(v.name) && v.name.text === "@arcgis/lumina" ? u = v : xe(v, !0, t) !== void 0 && (g.namespaces ??= [], g.namespaces.push(v.getFullText(e))) : d !== void 0 && F && d.set(
|
|
3268
3275
|
(v.name ?? v.declarationList?.declarations[0].name).escapedText,
|
|
3269
3276
|
-P
|
|
3270
3277
|
);
|
|
@@ -3304,7 +3311,7 @@ function rs(e, t) {
|
|
|
3304
3311
|
for (const [v, F] of d)
|
|
3305
3312
|
if (F > 0 || Object.is(F, 0)) {
|
|
3306
3313
|
d.delete(v), p.add(v), P = !0;
|
|
3307
|
-
const D = e.statements[F], I =
|
|
3314
|
+
const D = e.statements[F], I = Gt(D, !1, t, {
|
|
3308
3315
|
description: void 0,
|
|
3309
3316
|
docsTags: []
|
|
3310
3317
|
});
|
|
@@ -4588,9 +4595,9 @@ declare namespace __esri {
|
|
|
4588
4595
|
${K}
|
|
4589
4596
|
export type On = (eventName: string, eventHandler: EventHandlerCallback) => IHandle;
|
|
4590
4597
|
}`;
|
|
4591
|
-
let pe, Y,
|
|
4598
|
+
let pe, Y, Se, ue, te = "", ge = "", _e = "", rt = "";
|
|
4592
4599
|
function us(e, t) {
|
|
4593
|
-
|
|
4600
|
+
Se = void 0, ue = void 0, ge = e.path, _e = "", rt = "";
|
|
4594
4601
|
const n = `import("./${ge}.js")`;
|
|
4595
4602
|
let i = "";
|
|
4596
4603
|
const o = e.exports?.[0]?.declaration.name, r = R(e);
|
|
@@ -4612,7 +4619,7 @@ function us(e, t) {
|
|
|
4612
4619
|
j.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export function.", {
|
|
4613
4620
|
file: R(e).file,
|
|
4614
4621
|
node: void 0
|
|
4615
|
-
}),
|
|
4622
|
+
}), He(j[0], t), Y === void 0 && t.emitError("Expected default export @esriCompatibilityName tag to include a #", {
|
|
4616
4623
|
file: R(e).file,
|
|
4617
4624
|
node: void 0
|
|
4618
4625
|
}), i += ` ${K}
|
|
@@ -4630,7 +4637,7 @@ function us(e, t) {
|
|
|
4630
4637
|
j.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export variable.", {
|
|
4631
4638
|
file: R(e).file,
|
|
4632
4639
|
node: void 0
|
|
4633
|
-
}),
|
|
4640
|
+
}), He(j[0], t), (Y !== void 0 || pe !== void 0) && t.emitError("Expected default export @esriCompatibilityName tag to not include a # or .", {
|
|
4634
4641
|
file: R(e).file,
|
|
4635
4642
|
node: void 0
|
|
4636
4643
|
}), i += ` export const ${te}: typeof ${n}.default;
|
|
@@ -4639,13 +4646,13 @@ function us(e, t) {
|
|
|
4639
4646
|
continue;
|
|
4640
4647
|
}
|
|
4641
4648
|
for (let f = 0; f < j.length; ++f)
|
|
4642
|
-
|
|
4649
|
+
He(j[f], t), u && Se !== void 0 ? _e += ` export const ${te}: ${n}.${d};
|
|
4643
4650
|
` : rt += ` ${te}: typeof ${n}.${d};
|
|
4644
4651
|
`;
|
|
4645
4652
|
} else if (c.kind === "class" || c.kind === "mixin" || c.kind === "interface" && ie(c).isMixinBaseClass === !0) {
|
|
4646
|
-
const f = st(
|
|
4653
|
+
const f = st(Je(c.typeParameters, !1, ge)), g = st(Je(c.typeParameters, !1, void 0)), S = st(Je(c.typeParameters, !0, void 0)), h = ` ${n}.${d}`;
|
|
4647
4654
|
for (let E = 0; E < j.length; ++E) {
|
|
4648
|
-
if (
|
|
4655
|
+
if (He(j[E], t), te.startsWith("$")) {
|
|
4649
4656
|
const M = te.slice(1);
|
|
4650
4657
|
i += fs(M, c, d, ge);
|
|
4651
4658
|
continue;
|
|
@@ -4659,12 +4666,12 @@ ${C}export const ${te}: typeof${h}${S};
|
|
|
4659
4666
|
}
|
|
4660
4667
|
} else c.kind === "interface" && (i += Fi(c, ge, d, t));
|
|
4661
4668
|
}
|
|
4662
|
-
return
|
|
4669
|
+
return _e.length > 0 && (Se === void 0 && t.emitError("Invalid @esriCompatibilityName usage: Namespace name was not set correctly.", {
|
|
4663
4670
|
file: R(e).file,
|
|
4664
4671
|
node: void 0
|
|
4665
4672
|
}), i += ` ${K}
|
|
4666
|
-
namespace ${
|
|
4667
|
-
${
|
|
4673
|
+
namespace ${Se} {
|
|
4674
|
+
${_e.slice(0, -1)} }
|
|
4668
4675
|
|
|
4669
4676
|
`), rt.length > 0 && (ue === void 0 && t.emitError(
|
|
4670
4677
|
"Invalid @esriCompatibilityName usage: Classdec module interface name was not set correctly.",
|
|
@@ -4681,14 +4688,14 @@ ${rt} }
|
|
|
4681
4688
|
`), i;
|
|
4682
4689
|
}
|
|
4683
4690
|
function Fi(e, t, n, i) {
|
|
4684
|
-
const o = st(
|
|
4691
|
+
const o = st(Je(e.typeParameters, !1, void 0)), r = Je(e.typeParameters, !1, t), l = `import("./${t}.js").${n}${o}`;
|
|
4685
4692
|
let s = "";
|
|
4686
4693
|
for (let c = 0; c < j.length; ++c) {
|
|
4687
|
-
|
|
4694
|
+
He(j[c], i);
|
|
4688
4695
|
const p = Ot(te, r, void 0, l);
|
|
4689
4696
|
pe === void 0 ? s += ` ${K}
|
|
4690
4697
|
${p}
|
|
4691
|
-
` :
|
|
4698
|
+
` : _e += ` ${K}
|
|
4692
4699
|
${p}
|
|
4693
4700
|
|
|
4694
4701
|
`;
|
|
@@ -4696,7 +4703,7 @@ function Fi(e, t, n, i) {
|
|
|
4696
4703
|
return s += `
|
|
4697
4704
|
`, s;
|
|
4698
4705
|
}
|
|
4699
|
-
function
|
|
4706
|
+
function Je(e, t, n) {
|
|
4700
4707
|
if (e === void 0)
|
|
4701
4708
|
return;
|
|
4702
4709
|
const i = [];
|
|
@@ -4742,11 +4749,11 @@ let j = ut;
|
|
|
4742
4749
|
function Oi(e) {
|
|
4743
4750
|
e.kind === "variable" ? j = Ki(e).esriCompatibilityNames ?? ut : e.kind === "function" ? j = ei(e).esriCompatibilityNames ?? ut : j = ie(e).esriCompatibilityNames ?? ut;
|
|
4744
4751
|
}
|
|
4745
|
-
function
|
|
4752
|
+
function He(e, t) {
|
|
4746
4753
|
const n = e.indexOf(".");
|
|
4747
4754
|
if (n !== -1) {
|
|
4748
|
-
pe = e.slice(0, n), Y = void 0, te = e.slice(n + 1),
|
|
4749
|
-
`Invalid @esriCompatibilityName usage: Multiple different namespaces in a single file are not supported. Found ${
|
|
4755
|
+
pe = e.slice(0, n), Y = void 0, te = e.slice(n + 1), Se === void 0 ? Se = pe : Se !== pe && t.emitError(
|
|
4756
|
+
`Invalid @esriCompatibilityName usage: Multiple different namespaces in a single file are not supported. Found ${Se} and ${pe}`,
|
|
4750
4757
|
{
|
|
4751
4758
|
file: void 0,
|
|
4752
4759
|
scope: ge,
|
|
@@ -5032,7 +5039,7 @@ function Es(e, t, n, i) {
|
|
|
5032
5039
|
name: r.name,
|
|
5033
5040
|
module: t.path,
|
|
5034
5041
|
package: void 0,
|
|
5035
|
-
viewUrl:
|
|
5042
|
+
viewUrl: Ke(t.path, r.name, void 0, i),
|
|
5036
5043
|
start: 0,
|
|
5037
5044
|
end: r.name.length
|
|
5038
5045
|
}
|
|
@@ -5882,7 +5889,7 @@ export interface ArcgisImportModules {
|
|
|
5882
5889
|
) : void 0;
|
|
5883
5890
|
let i = 0;
|
|
5884
5891
|
if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
|
|
5885
|
-
const c =
|
|
5892
|
+
const c = je(), p = e.types.typeScriptConfig;
|
|
5886
5893
|
if (this.watchFiles === void 0) {
|
|
5887
5894
|
const m = a.createCompilerHost(p.config.options), u = a.createProgram({
|
|
5888
5895
|
host: m,
|
|
@@ -5895,15 +5902,15 @@ export interface ArcgisImportModules {
|
|
|
5895
5902
|
const d = this.errorCount;
|
|
5896
5903
|
Dn(this, c), i = this.errorCount - d;
|
|
5897
5904
|
}
|
|
5898
|
-
const o =
|
|
5905
|
+
const o = je(), r = await ss(this);
|
|
5899
5906
|
Os(r, this);
|
|
5900
5907
|
const l = this.wrapApiModules(r);
|
|
5901
5908
|
e.context.logger.info(
|
|
5902
|
-
`${
|
|
5909
|
+
`${Me}Extracted ${r.length} @public files in ${w("green", `${o()}s`)}`
|
|
5903
5910
|
);
|
|
5904
5911
|
const s = { apiJson: l, dtsFiles: void 0 };
|
|
5905
5912
|
if (e.afterApiJsonCreate !== Qi && e.afterApiJsonCreate(s), this.produceDts) {
|
|
5906
|
-
const c =
|
|
5913
|
+
const c = je(), p = this.dtsFiles;
|
|
5907
5914
|
if (this.dtsFiles = /* @__PURE__ */ new Map(), this.isJsApi) {
|
|
5908
5915
|
const d = vs(r, this), m = `${e.context.dtsEmitPath}interfaces.d.ts`;
|
|
5909
5916
|
this.dtsFiles.set(m, d);
|
|
@@ -5940,7 +5947,7 @@ export interface ArcgisImportModules {
|
|
|
5940
5947
|
await n, await Ft(e.context.dtsEmitPath, { recursive: !0 }), await Bs(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
|
|
5941
5948
|
const d = se.join(se.relative(process.cwd(), e.context.dtsEmitPath), "/");
|
|
5942
5949
|
e.context.logger.info(
|
|
5943
|
-
`${
|
|
5950
|
+
`${Me}Wrote ${d}**/*${w("blue", ".d.ts")} in ${w("green", `${c()}s`)}`
|
|
5944
5951
|
);
|
|
5945
5952
|
}
|
|
5946
5953
|
}
|
|
@@ -5950,7 +5957,7 @@ export interface ArcgisImportModules {
|
|
|
5950
5957
|
c,
|
|
5951
5958
|
e.context.environment === "production" ? JSON.stringify(l) : JSON.stringify(l, null, 2)
|
|
5952
5959
|
), e.context.logger.info(
|
|
5953
|
-
`${
|
|
5960
|
+
`${Me}Wrote ${p}${w("yellow", se.basename(c))}`
|
|
5954
5961
|
);
|
|
5955
5962
|
}
|
|
5956
5963
|
if (this.typeVerifier?.verifyTypes(r), this.errorCount > 0) {
|
|
@@ -5959,10 +5966,10 @@ export interface ArcgisImportModules {
|
|
|
5959
5966
|
);
|
|
5960
5967
|
const c = this.errorCount - i;
|
|
5961
5968
|
c > 0 && e.context.logger.error(
|
|
5962
|
-
`${
|
|
5969
|
+
`${Me}${w("red", `Found ${c} ${c === 1 ? "error" : "errors"}`)}`
|
|
5963
5970
|
);
|
|
5964
5971
|
}
|
|
5965
|
-
return this.silencedBrokenLinkCount > 0 && e.context.logger.info(`${
|
|
5972
|
+
return this.silencedBrokenLinkCount > 0 && e.context.logger.info(`${Me}Silenced ${this.silencedBrokenLinkCount} broken link errors.`), this.isRunInProgress = !1, this.produceDts && (s.dtsFiles = this.dtsFiles), s;
|
|
5966
5973
|
};
|
|
5967
5974
|
async function Bs(e, t, n) {
|
|
5968
5975
|
const i = /* @__PURE__ */ new Set(), o = Array.from(n.entries());
|
|
@@ -5993,7 +6000,7 @@ function Dn(e, t) {
|
|
|
5993
6000
|
if ("getSemanticDiagnostics" in e.program) {
|
|
5994
6001
|
const n = e.builderProgram === void 0 ? a.getPreEmitDiagnostics(e.program) : e.builderProgram.getSemanticDiagnostics();
|
|
5995
6002
|
n.length > 0 && (e.config.context.logger.error(
|
|
5996
|
-
a.formatDiagnosticsWithColorAndContext(n,
|
|
6003
|
+
a.formatDiagnosticsWithColorAndContext(n, Et)
|
|
5997
6004
|
), e.errorCount += n.length, process.exitCode = 1), e.config.types.afterDiagnostic(n), e.config.context.logger.info(
|
|
5998
6005
|
`${mn}Type checked in ${w("cyan", `${t()}s`)}`
|
|
5999
6006
|
);
|
|
@@ -6149,7 +6156,7 @@ const Ws = async function() {
|
|
|
6149
6156
|
}
|
|
6150
6157
|
for (const [A, L] of this.watchFiles)
|
|
6151
6158
|
L.wasRemoved && (r(L, A), y = !0);
|
|
6152
|
-
y ? f() : (Dn(this,
|
|
6159
|
+
y ? f() : (Dn(this, je()), u(void 0));
|
|
6153
6160
|
}, t = a.createWatchProgram(C);
|
|
6154
6161
|
} else {
|
|
6155
6162
|
let S = function(C) {
|
|
@@ -6378,7 +6385,7 @@ class Ks {
|
|
|
6378
6385
|
this.extractor = t, this.virtualCwdPath = se.join(n, "/");
|
|
6379
6386
|
}
|
|
6380
6387
|
verifyTypes(t) {
|
|
6381
|
-
const n =
|
|
6388
|
+
const n = je();
|
|
6382
6389
|
_s(t, this.extractor);
|
|
6383
6390
|
const i = /* @__PURE__ */ Object.create(null);
|
|
6384
6391
|
i[this.virtualCwdPath + Hs] = this.getVerificationFileContents(t);
|
|
@@ -6411,16 +6418,16 @@ class Ks {
|
|
|
6411
6418
|
return f === void 0 ? c(u) : f;
|
|
6412
6419
|
};
|
|
6413
6420
|
const p = l.directoryExists;
|
|
6414
|
-
l.directoryExists = (u) => u.includes("node_modules") ? p(u) : !0, l.getCurrentDirectory = () => this.virtualCwdPath, l.getCanonicalFileName =
|
|
6421
|
+
l.directoryExists = (u) => u.includes("node_modules") ? p(u) : !0, l.getCurrentDirectory = () => this.virtualCwdPath, l.getCanonicalFileName = Et.getCanonicalFileName;
|
|
6415
6422
|
const d = a.createProgram({
|
|
6416
6423
|
rootNames: Object.keys(i),
|
|
6417
6424
|
host: l,
|
|
6418
6425
|
options: r
|
|
6419
6426
|
}), m = a.getPreEmitDiagnostics(d).filter(this.extractor.config.verify.filterTypeCheckDiagnostic);
|
|
6420
6427
|
m.length && (this.extractor.config.context.logger.error(
|
|
6421
|
-
a.formatDiagnosticsWithColorAndContext(m,
|
|
6428
|
+
a.formatDiagnosticsWithColorAndContext(m, Et)
|
|
6422
6429
|
), process.exitCode = 1, this.extractor.errorCount += m.length), this.extractor.config.context.logger.info(
|
|
6423
|
-
`${
|
|
6430
|
+
`${Me}Types verified with TypeScript in ${w("green", `${n()}s`)}`
|
|
6424
6431
|
);
|
|
6425
6432
|
}
|
|
6426
6433
|
printTypeParameters(t, n) {
|
|
@@ -6453,7 +6460,7 @@ class Ks {
|
|
|
6453
6460
|
return n;
|
|
6454
6461
|
}
|
|
6455
6462
|
}
|
|
6456
|
-
const zs = import.meta.url.includes("node_modules") ? Zt.version : "6.0.0-next.
|
|
6463
|
+
const zs = import.meta.url.includes("node_modules") ? Zt.version : "6.0.0-next.20";
|
|
6457
6464
|
class ga {
|
|
6458
6465
|
/**
|
|
6459
6466
|
* @public
|
|
@@ -6493,6 +6500,6 @@ class ga {
|
|
|
6493
6500
|
}
|
|
6494
6501
|
export {
|
|
6495
6502
|
ga as A,
|
|
6496
|
-
|
|
6503
|
+
Me as l,
|
|
6497
6504
|
Bs as w
|
|
6498
6505
|
};
|