@arcgis/api-extractor 5.1.0-next.8 → 5.1.0-next.81
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/bin/cli.js +2 -0
- package/dist/{ApiExtractor--76Lb9BT.js → ApiExtractor-IYYCO-EG.js} +40 -40
- package/dist/{apiHelpers-BYzO767m.js → apiHelpers-dNwlX631.js} +4 -4
- package/dist/apiJson.d.ts +8 -1
- package/dist/cli.js +0 -1
- package/dist/diff/apiDiffToMarkdown.js +65 -67
- package/dist/diff/diffApiJson.js +107 -102
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.d.ts +1 -1
- package/dist/extractor/config.js +3 -3
- package/dist/extractor/processing/links.js +1 -1
- package/dist/{typeScript-Cj-7uzzg.js → typeScript-K2y-5lid.js} +1 -1
- package/dist/utils/apiHelpers.js +1 -1
- package/dist/utils/createIndex.d.ts +1 -1
- package/dist/utils/createIndex.js +46 -45
- package/dist/vite/plugin.js +41 -39
- package/dist/vite/typeScript.js +1 -1
- package/dist/worker-CsceZ1rD.js +3686 -0
- package/package.json +7 -6
- package/dist/ApiExtractor-vskF0bUl.js +0 -2664
- package/dist/typeScript-Bf6MlJE-.js +0 -64
- package/dist/worker-9nQcZKhv.js +0 -3681
- package/dist/worker-imVCU7FG.js +0 -3681
package/bin/cli.js
ADDED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as H, a as se, e as Re, p as fe } from "./typeScript-
|
|
2
|
-
import { a as be, o as Me, t as Ge, b as De, c as Le, e as Oe,
|
|
1
|
+
import { l as H, a as se, e as Re, p as fe } from "./typeScript-K2y-5lid.js";
|
|
2
|
+
import { a as be, o as Me, t as Ge, b as De, c as Le, e as Oe, p as Ne, d as Be, f as _, i as me, g as We, h as Ue, j as ze, k as je, n as He, r as Je } from "./worker-CsceZ1rD.js";
|
|
3
3
|
import { getViewUrl as Ve, postProcessDeprecated as ee, postProcessDescription as G, postProcessDocsTags as V, resolveJsDocLink as Xe } from "./extractor/processing/links.js";
|
|
4
4
|
import E from "typescript";
|
|
5
5
|
import { path as N, toPosixPathSeparators as Ye } from "@arcgis/components-build-utils";
|
|
@@ -7,7 +7,7 @@ import { mkdir as ae, writeFile as xe } from "fs/promises";
|
|
|
7
7
|
import x from "chalk";
|
|
8
8
|
import { styleText as qe } from "util";
|
|
9
9
|
import { kebabToPascal as Ze } from "@arcgis/toolkit/string";
|
|
10
|
-
import { g as h, a as Q, b as _e, c as Ke, d as le, e as Pe, f as oe, p as Qe, h as et, i as ce, m as Ie, n as tt, j as it, k as nt } from "./apiHelpers-
|
|
10
|
+
import { g as h, a as Q, b as _e, c as Ke, d as le, e as Pe, f as oe, p as Qe, h as et, i as ce, m as Ie, n as tt, j as it, k as nt } from "./apiHelpers-dNwlX631.js";
|
|
11
11
|
import { printTypeParameters as ie, printTypeAlias as ot } from "./utils/partPrinter.js";
|
|
12
12
|
import { identity as Se, debounce as rt } from "@arcgis/toolkit/function";
|
|
13
13
|
import { opendirSync as st, watch as at, readFileSync as lt, statSync as ct } from "node:fs";
|
|
@@ -1101,12 +1101,12 @@ function mt(e, t) {
|
|
|
1101
1101
|
const s = e.exports?.[0]?.declaration.name, a = h(e);
|
|
1102
1102
|
if (a.constructorPropertiesInterface !== void 0) {
|
|
1103
1103
|
const o = a.constructorPropertiesInterface;
|
|
1104
|
-
ue(o),
|
|
1104
|
+
ue(o), A.length !== 0 && (n += pe(o, U, o.name, t));
|
|
1105
1105
|
}
|
|
1106
1106
|
let r;
|
|
1107
1107
|
for (let o = 0; o < e.declarations.length; ++o) {
|
|
1108
1108
|
const l = e.declarations[o];
|
|
1109
|
-
if (ue(l),
|
|
1109
|
+
if (ue(l), A.length === 0)
|
|
1110
1110
|
continue;
|
|
1111
1111
|
const c = l.name === s, d = c ? "default" : l.name, m = l.kind === "function", f = l.kind === "variable";
|
|
1112
1112
|
if (m || f) {
|
|
@@ -1114,10 +1114,10 @@ function mt(e, t) {
|
|
|
1114
1114
|
if (l.name === r)
|
|
1115
1115
|
continue;
|
|
1116
1116
|
if (r = l.name, c) {
|
|
1117
|
-
|
|
1117
|
+
A.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export function.", {
|
|
1118
1118
|
file: h(e).file,
|
|
1119
1119
|
node: void 0
|
|
1120
|
-
}), Z(
|
|
1120
|
+
}), Z(A[0], t), D === void 0 && t.emitError("Expected default export @esriCompatibilityName tag to include a #", {
|
|
1121
1121
|
file: h(e).file,
|
|
1122
1122
|
node: void 0
|
|
1123
1123
|
}), n += ` ${k}
|
|
@@ -1132,10 +1132,10 @@ function mt(e, t) {
|
|
|
1132
1132
|
continue;
|
|
1133
1133
|
}
|
|
1134
1134
|
} else if (f && c) {
|
|
1135
|
-
|
|
1135
|
+
A.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export variable.", {
|
|
1136
1136
|
file: h(e).file,
|
|
1137
1137
|
node: void 0
|
|
1138
|
-
}), Z(
|
|
1138
|
+
}), Z(A[0], t), (D !== void 0 || B !== void 0) && t.emitError("Expected default export @esriCompatibilityName tag to not include a # or .", {
|
|
1139
1139
|
file: h(e).file,
|
|
1140
1140
|
node: void 0
|
|
1141
1141
|
}), n += ` export const ${O}: typeof ${i}.default;
|
|
@@ -1143,14 +1143,14 @@ function mt(e, t) {
|
|
|
1143
1143
|
`;
|
|
1144
1144
|
continue;
|
|
1145
1145
|
}
|
|
1146
|
-
for (let p = 0; p <
|
|
1147
|
-
Z(
|
|
1146
|
+
for (let p = 0; p < A.length; ++p)
|
|
1147
|
+
Z(A[p], t), f && z !== void 0 ? q += ` export const ${O}: ${i}.${d};
|
|
1148
1148
|
` : te += ` ${O}: typeof ${i}.${d};
|
|
1149
1149
|
`;
|
|
1150
1150
|
} else if (l.kind === "class" || l.kind === "mixin" || l.kind === "interface" && Q(l).isMixinBaseClass === !0) {
|
|
1151
1151
|
const p = ie(K(l.typeParameters, !1, U)), g = ie(K(l.typeParameters, !1, void 0)), u = ie(K(l.typeParameters, !0, void 0)), v = ` ${i}.${d}`;
|
|
1152
|
-
for (let C = 0; C <
|
|
1153
|
-
if (Z(
|
|
1152
|
+
for (let C = 0; C < A.length; ++C) {
|
|
1153
|
+
if (Z(A[C], t), O.startsWith("$")) {
|
|
1154
1154
|
const M = O.slice(1);
|
|
1155
1155
|
n += pt(M, l, d, U);
|
|
1156
1156
|
continue;
|
|
@@ -1188,8 +1188,8 @@ ${te} }
|
|
|
1188
1188
|
function pe(e, t, i, n) {
|
|
1189
1189
|
const s = ie(K(e.typeParameters, !1, void 0)), a = K(e.typeParameters, !1, t), r = `import("./${t}.js").${i}${s}`;
|
|
1190
1190
|
let o = "";
|
|
1191
|
-
for (let l = 0; l <
|
|
1192
|
-
Z(
|
|
1191
|
+
for (let l = 0; l < A.length; ++l) {
|
|
1192
|
+
Z(A[l], n);
|
|
1193
1193
|
const c = ot(O, a, void 0, r);
|
|
1194
1194
|
B === void 0 ? o += ` ${k}
|
|
1195
1195
|
${c}
|
|
@@ -1243,9 +1243,9 @@ function K(e, t, i) {
|
|
|
1243
1243
|
return n.length === 0 ? void 0 : n;
|
|
1244
1244
|
}
|
|
1245
1245
|
const ne = [];
|
|
1246
|
-
let
|
|
1246
|
+
let A = ne;
|
|
1247
1247
|
function ue(e) {
|
|
1248
|
-
e.kind === "variable" ?
|
|
1248
|
+
e.kind === "variable" ? A = _e(e).esriCompatibilityNames ?? ne : e.kind === "function" ? A = Ke(e).esriCompatibilityNames ?? ne : A = Q(e).esriCompatibilityNames ?? ne;
|
|
1249
1249
|
}
|
|
1250
1250
|
function Z(e, t) {
|
|
1251
1251
|
const i = e.indexOf(".");
|
|
@@ -1276,7 +1276,7 @@ function Z(e, t) {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
function pt(e, t, i, n) {
|
|
1278
1278
|
const s = ut(e, t.events), r = `${// IdentityManager fake class got renamed to IdentityManagerBase real class
|
|
1279
|
-
t.name.startsWith(
|
|
1279
|
+
t.name.startsWith(A[0]) ? A[0] : t.name}${Ze(e)}Event`, o = yt(s, n) ?? ` = import("./${n}.js").${i}["@eventTypes"]["${e}"]`, l = o.startsWith("<") ? o.indexOf(">") + 1 : -1, c = l !== -1 ? o.slice(0, l) : "";
|
|
1280
1280
|
return ` ${k}
|
|
1281
1281
|
export type ${r}${o};
|
|
1282
1282
|
${k}
|
|
@@ -1902,7 +1902,7 @@ function Fe(e, t, i, n, s) {
|
|
|
1902
1902
|
Fe(c, t, l, n, s);
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Ae(e, t, i) {
|
|
1906
1906
|
const n = h(e);
|
|
1907
1907
|
if (n.inheritance !== void 0)
|
|
1908
1908
|
return;
|
|
@@ -2002,7 +2002,7 @@ function ge(e, t, i, n) {
|
|
|
2002
2002
|
a.cssStates,
|
|
2003
2003
|
s.cssStates,
|
|
2004
2004
|
e.indexedCssStates
|
|
2005
|
-
));
|
|
2005
|
+
)), s.formAssociated === !0 && (a.formAssociated = !0);
|
|
2006
2006
|
}
|
|
2007
2007
|
function X(e = [], t, i, n) {
|
|
2008
2008
|
const s = /* @__PURE__ */ new Set();
|
|
@@ -2023,7 +2023,7 @@ function ve(e, t, i) {
|
|
|
2023
2023
|
if (s === !1 || n === void 0)
|
|
2024
2024
|
return a !== void 0 ? a.inheritance = de.skip : t && i.privateMixinModuleNames.add(e), de.skip;
|
|
2025
2025
|
const [r, o] = s, l = o;
|
|
2026
|
-
|
|
2026
|
+
Ae(n, o, i);
|
|
2027
2027
|
let c, d = !1;
|
|
2028
2028
|
if (o.members !== void 0) {
|
|
2029
2029
|
c = /* @__PURE__ */ Object.create(null);
|
|
@@ -2121,7 +2121,7 @@ function Ft(e, t) {
|
|
|
2121
2121
|
file: h(n).file,
|
|
2122
2122
|
node: void 0
|
|
2123
2123
|
}
|
|
2124
|
-
), "members" in o && o.kind !== "interface" && (
|
|
2124
|
+
), "members" in o && o.kind !== "interface" && (Ae(n, o, t), o.events?.sort(it));
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
for (let i = 0; i < e.length; ++i) {
|
|
@@ -2203,7 +2203,7 @@ function Ft(e, t) {
|
|
|
2203
2203
|
s.constructorPropertiesInterface !== void 0 && xt(s, t), gt(n, s, t), Tt(n, s, t);
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
|
-
const
|
|
2206
|
+
const At = async function() {
|
|
2207
2207
|
if (this.isRunInProgress)
|
|
2208
2208
|
throw Error(
|
|
2209
2209
|
"The ApiExtractor.run() is already in progress, or previous run crashed with unrecoverable error. Await the previous run first or create a new ApiExtractor"
|
|
@@ -2226,7 +2226,7 @@ const wt = async function() {
|
|
|
2226
2226
|
});
|
|
2227
2227
|
this.program = d, e.types.typeScriptInstanceCreated(d, c);
|
|
2228
2228
|
}
|
|
2229
|
-
|
|
2229
|
+
we(this, o);
|
|
2230
2230
|
}
|
|
2231
2231
|
const n = _(), s = await Oe(this);
|
|
2232
2232
|
$t(s, this);
|
|
@@ -2268,7 +2268,7 @@ const wt = async function() {
|
|
|
2268
2268
|
for (const [c, d] of this.dtsFiles)
|
|
2269
2269
|
l.get(c) !== d && this.changedDtsFiles.set(c, d);
|
|
2270
2270
|
if (t) {
|
|
2271
|
-
await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await
|
|
2271
|
+
await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await wt(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
|
|
2272
2272
|
const c = N.join(N.relative(process.cwd(), e.context.dtsEmitPath), "/");
|
|
2273
2273
|
e.context.logger.info(
|
|
2274
2274
|
`${H}Wrote ${c}**/*${x.blue(".d.ts")} in ${x.green(`${o()}s`)}`
|
|
@@ -2288,7 +2288,7 @@ const wt = async function() {
|
|
|
2288
2288
|
`${H}${x.red(`Found ${this.errorCount} ${this.errorCount === 1 ? "error" : "errors"}`)}`
|
|
2289
2289
|
), this.silencedBrokenLinkCount > 0 && e.context.logger.info(`${H}Silenced ${this.silencedBrokenLinkCount} broken link errors.`), this.isRunInProgress = !1, this.produceDts && (r.dtsFiles = this.dtsFiles), r;
|
|
2290
2290
|
};
|
|
2291
|
-
async function
|
|
2291
|
+
async function wt(e, t, i) {
|
|
2292
2292
|
const n = /* @__PURE__ */ new Set(), s = Array.from(i.entries());
|
|
2293
2293
|
for (let l = 0; l < s.length; ++l) {
|
|
2294
2294
|
const [c, d] = s[l];
|
|
@@ -2312,7 +2312,7 @@ async function At(e, t, i) {
|
|
|
2312
2312
|
}
|
|
2313
2313
|
await Promise.all(r);
|
|
2314
2314
|
}
|
|
2315
|
-
function
|
|
2315
|
+
function we(e, t) {
|
|
2316
2316
|
if (e.config.types.fullTypeCheck)
|
|
2317
2317
|
if ("getSemanticDiagnostics" in e.program) {
|
|
2318
2318
|
const i = e.builderProgram === void 0 ? E.getPreEmitDiagnostics(e.program) : e.builderProgram.getSemanticDiagnostics();
|
|
@@ -2417,13 +2417,13 @@ const Rt = async function() {
|
|
|
2417
2417
|
if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
|
|
2418
2418
|
const u = e.types.fullTypeCheck ? E.createSemanticDiagnosticsBuilderProgram : E.createAbstractBuilder;
|
|
2419
2419
|
let v;
|
|
2420
|
-
const C = (S, F, T, ...
|
|
2420
|
+
const C = (S, F, T, ...w) => (v = T, u(
|
|
2421
2421
|
// If not doing full type check, don't scout test files
|
|
2422
2422
|
// If non-tests import tests, they will be included implicitly anyway
|
|
2423
2423
|
e.types.fullTypeCheck ? S : S?.filter(($) => !ze($)),
|
|
2424
2424
|
F,
|
|
2425
2425
|
T,
|
|
2426
|
-
...
|
|
2426
|
+
...w
|
|
2427
2427
|
// Type cast to keep types simpler&aligned between two branches
|
|
2428
2428
|
)), y = E.createWatchCompilerHost(
|
|
2429
2429
|
// This parses the config file again (we already do it) and computes the
|
|
@@ -2461,17 +2461,17 @@ const Rt = async function() {
|
|
|
2461
2461
|
e.types.typeScriptInstanceCreated(F, v);
|
|
2462
2462
|
for (const $ of this.watchFiles.values())
|
|
2463
2463
|
$.wasRemoved = !0;
|
|
2464
|
-
let
|
|
2464
|
+
let w = !1;
|
|
2465
2465
|
for (let $ = 0; $ < T.length; ++$) {
|
|
2466
2466
|
const R = T[$];
|
|
2467
2467
|
if (!me(R.fileName, this))
|
|
2468
2468
|
continue;
|
|
2469
2469
|
const j = R.fileName.slice(e.context.cwd.length), J = this.watchFiles.get(j);
|
|
2470
|
-
J === void 0 ? (o(j, R, void 0),
|
|
2470
|
+
J === void 0 ? (o(j, R, void 0), w = !0) : J.file !== R ? (s(J, j, R), w = !0) : J.wasRemoved = !1;
|
|
2471
2471
|
}
|
|
2472
2472
|
for (const [$, R] of this.watchFiles)
|
|
2473
|
-
R.wasRemoved && (a(R, $),
|
|
2474
|
-
|
|
2473
|
+
R.wasRemoved && (a(R, $), w = !0);
|
|
2474
|
+
w ? p() : (we(this, _()), f(void 0));
|
|
2475
2475
|
}, t = E.createWatchProgram(y);
|
|
2476
2476
|
} else {
|
|
2477
2477
|
let u = function(y) {
|
|
@@ -2489,7 +2489,7 @@ const Rt = async function() {
|
|
|
2489
2489
|
if (I || P === void 0) {
|
|
2490
2490
|
const S = u(b);
|
|
2491
2491
|
if (S === !1) {
|
|
2492
|
-
let T,
|
|
2492
|
+
let T, w = !1;
|
|
2493
2493
|
try {
|
|
2494
2494
|
T = st(b, { recursive: !0 });
|
|
2495
2495
|
let $;
|
|
@@ -2497,12 +2497,12 @@ const Rt = async function() {
|
|
|
2497
2497
|
if ($.isDirectory())
|
|
2498
2498
|
continue;
|
|
2499
2499
|
const j = `${$.parentPath}/${$.name}`.slice(e.context.cwd.length);
|
|
2500
|
-
We(j) && (
|
|
2500
|
+
We(j) && (w = C(j, !1) || w);
|
|
2501
2501
|
}
|
|
2502
2502
|
} finally {
|
|
2503
2503
|
T?.closeSync();
|
|
2504
2504
|
}
|
|
2505
|
-
return
|
|
2505
|
+
return w;
|
|
2506
2506
|
}
|
|
2507
2507
|
const F = S === !0;
|
|
2508
2508
|
if (L) {
|
|
@@ -2517,9 +2517,9 @@ const Rt = async function() {
|
|
|
2517
2517
|
return o(y, void 0, void 0), !0;
|
|
2518
2518
|
{
|
|
2519
2519
|
let T = !1;
|
|
2520
|
-
const
|
|
2520
|
+
const w = `${y}/`;
|
|
2521
2521
|
for (const [$, R] of this.watchFiles)
|
|
2522
|
-
$.startsWith(
|
|
2522
|
+
$.startsWith(w) && (a(R, $), T = !0);
|
|
2523
2523
|
return T;
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
@@ -2628,7 +2628,7 @@ class qt {
|
|
|
2628
2628
|
* @param rawConfig Optional configuration for the extractor.
|
|
2629
2629
|
*/
|
|
2630
2630
|
constructor(t = {}) {
|
|
2631
|
-
this.componentStories = /* @__PURE__ */ Object.create(null), this.dtsFiles = /* @__PURE__ */ new Map(), this.changedDtsFiles = void 0, this.isRunInProgress = !1, this.watchFiles = void 0, this.program = void 0, this.builderProgram = void 0, this.componentPathMapping = void 0, this.componentCssFileDocs = void 0, this.vanillaComponentTypes = void 0, this.isInLuminaMinimalExtraction = !1, this.errorCount = 0, this.silencedBrokenLinkCount = 0, this.loggedBooleanWarning = !1, this.moduleMap = void 0, this.privateMixinModuleNames = /* @__PURE__ */ new Set(), this.implicitPublicModules = void 0, this.file = void 0, this.apiModule = void 0, this.componentTagName = void 0, this.pairedSetter = void 0, this.statementJsDocs = [], this.jsDoc = void 0, this.apiObject = void 0, this.moduleContext = void 0, this.localDeclarations = /* @__PURE__ */ new Set(), this.exportDefaultName = void 0, this.objectLikeTypeParameters = void 0, this.functionLikeTypeParameters = void 0, this.apiClassLikeName = void 0, this.mixinName = void 0, this.mixinMixins = void 0, this.moduleHasAccessorLikeClass = !1, this.moduleHasClass = !1, this.inheritedModuleName = void 0, this.run =
|
|
2631
|
+
this.componentStories = /* @__PURE__ */ Object.create(null), this.dtsFiles = /* @__PURE__ */ new Map(), this.changedDtsFiles = void 0, this.isRunInProgress = !1, this.watchFiles = void 0, this.program = void 0, this.builderProgram = void 0, this.componentPathMapping = void 0, this.componentCssFileDocs = void 0, this.vanillaComponentTypes = void 0, this.isInLuminaMinimalExtraction = !1, this.errorCount = 0, this.silencedBrokenLinkCount = 0, this.loggedBooleanWarning = !1, this.moduleMap = void 0, this.privateMixinModuleNames = /* @__PURE__ */ new Set(), this.implicitPublicModules = void 0, this.file = void 0, this.apiModule = void 0, this.componentTagName = void 0, this.pairedSetter = void 0, this.statementJsDocs = [], this.jsDoc = void 0, this.apiObject = void 0, this.moduleContext = void 0, this.localDeclarations = /* @__PURE__ */ new Set(), this.exportDefaultName = void 0, this.objectLikeTypeParameters = void 0, this.functionLikeTypeParameters = void 0, this.apiClassLikeName = void 0, this.mixinName = void 0, this.mixinMixins = void 0, this.moduleHasAccessorLikeClass = !1, this.moduleHasClass = !1, this.inheritedModuleName = void 0, this.run = At.bind(this), this.watch = Rt.bind(this), this.emitError = Re.bind(this);
|
|
2632
2632
|
const i = Je(t);
|
|
2633
2633
|
this.config = i, this.produceDts = i.types.forceProduceDts || i.context.dtsEmitPath !== "" || i.verify.typeCheckTypes, this.basePath = `${i.context.cwd}${i.context.basePath}`, this.normalizedApiReferencePrefix = `https://${this.config.documentation.host}${this.config.documentation.basePath}`, this.runtimeDependencyNames = /* @__PURE__ */ new Set([
|
|
2634
2634
|
...Object.keys(i.context.packageJson.dependencies ?? {}),
|
|
@@ -2660,5 +2660,5 @@ class qt {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
export {
|
|
2662
2662
|
qt as A,
|
|
2663
|
-
|
|
2663
|
+
wt as w
|
|
2664
2664
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const c = Symbol("privateContext");
|
|
1
|
+
const c = /* @__PURE__ */ Symbol("privateContext");
|
|
2
2
|
function m(e, o, i, n) {
|
|
3
3
|
return {
|
|
4
4
|
isStale: !0,
|
|
@@ -155,7 +155,7 @@ export {
|
|
|
155
155
|
C as t,
|
|
156
156
|
M as u,
|
|
157
157
|
$ as v,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
l as w,
|
|
159
|
+
k as x,
|
|
160
|
+
S as y
|
|
161
161
|
};
|
package/dist/apiJson.d.ts
CHANGED
|
@@ -328,6 +328,13 @@ export interface ApiCustomElementDeclaration extends ApiClassDeclaration, ApiWit
|
|
|
328
328
|
* @example "ArcgisCounter" (even if class name is `Counter`)
|
|
329
329
|
*/
|
|
330
330
|
pascalCaseName: string;
|
|
331
|
+
/**
|
|
332
|
+
* True if the custom element is
|
|
333
|
+
* [form-associated](https://html.spec.whatwg.org/dev/custom-elements.html).
|
|
334
|
+
*
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
formAssociated?: boolean;
|
|
331
338
|
members: ApiCustomElementMember[];
|
|
332
339
|
/**
|
|
333
340
|
* The attributes that this element is known to understand.
|
|
@@ -778,7 +785,7 @@ export interface ApiClassMethod extends ApiFunctionLike, ApiWithInheritance, Api
|
|
|
778
785
|
* displaying the signature is redundant.
|
|
779
786
|
* Still, if needed, you can use printSignature() util from
|
|
780
787
|
* `@arcgis/api-extractor`.
|
|
781
|
-
* @example "(options?:
|
|
788
|
+
* @example "(options?: PopupViewOpenPopupOptions): Promise<void>"
|
|
782
789
|
*/
|
|
783
790
|
signature: string;
|
|
784
791
|
}
|
package/dist/cli.js
CHANGED
|
@@ -5,81 +5,79 @@ function K({ modules: e }, t) {
|
|
|
5
5
|
members: []
|
|
6
6
|
};
|
|
7
7
|
for (let n = 0; n < e.length; ++n) {
|
|
8
|
-
const
|
|
9
|
-
let y =
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
for (const
|
|
14
|
-
|
|
15
|
-
for (let
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
8
|
+
const i = e[n], w = i.path.split("/");
|
|
9
|
+
let y = w;
|
|
10
|
+
const M = w.at(-1);
|
|
11
|
+
i.declarations.length === 1 && i.declarations[0].name === M && (y = w.slice(0, -1));
|
|
12
|
+
let U = o;
|
|
13
|
+
for (const g of y)
|
|
14
|
+
U = D(U, g);
|
|
15
|
+
for (let g = 0; g < i.declarations.length; ++g) {
|
|
16
|
+
const f = i.declarations[g], S = B(f), O = f.removed === !0 ? void 0 : $(t, i.path, f, void 0), C = j(f), N = { label: S, viewUrl: O, change: C }, d = f, h = [];
|
|
17
|
+
if (d.members !== void 0)
|
|
18
|
+
for (let l = 0; l < d.members.length; ++l) {
|
|
19
|
+
const r = d.members[l], m = r.kind === "field" ? "property" : r.kind === "call-signature" ? "call signature" : r.kind, p = v(m, r);
|
|
20
|
+
if (p === void 0)
|
|
21
21
|
continue;
|
|
22
|
-
const
|
|
22
|
+
const s = F(r), a = r.removed === !0 ? void 0 : $(
|
|
23
23
|
t,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"name" in
|
|
24
|
+
i.path,
|
|
25
|
+
f,
|
|
26
|
+
"name" in r ? r.name : `${f.name}Properties`
|
|
27
27
|
);
|
|
28
|
-
|
|
28
|
+
h.push({ label: s, viewUrl: a, change: p });
|
|
29
29
|
}
|
|
30
|
-
if (
|
|
31
|
-
for (let
|
|
32
|
-
const
|
|
30
|
+
if (d.events !== void 0)
|
|
31
|
+
for (let l = 0; l < d.events.length; ++l) {
|
|
32
|
+
const r = d.events[l], m = v("event", r);
|
|
33
33
|
if (m === void 0)
|
|
34
34
|
continue;
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const p = r.removed === !0 ? void 0 : $(t, i.path, f, `event-${r.name}`);
|
|
36
|
+
h.push({ label: `@${r.name}`, viewUrl: p, change: m });
|
|
37
37
|
}
|
|
38
|
-
if (typeof
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
for (let
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
38
|
+
if (typeof d.tagName == "string") {
|
|
39
|
+
const l = d.slots, r = d.cssParts, m = d.cssProperties, p = d.cssStates;
|
|
40
|
+
if (l !== void 0)
|
|
41
|
+
for (let s = 0; s < l.length; ++s) {
|
|
42
|
+
const a = l[s], u = v("slot", a);
|
|
43
|
+
if (u === void 0)
|
|
44
44
|
continue;
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const b = a.removed === !0 ? void 0 : $(t, i.path, f, `slot-${a.name}`);
|
|
46
|
+
h.push({ label: a.name, viewUrl: b, change: u });
|
|
47
47
|
}
|
|
48
|
-
if (
|
|
49
|
-
for (let
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
48
|
+
if (r !== void 0)
|
|
49
|
+
for (let s = 0; s < r.length; ++s) {
|
|
50
|
+
const a = r[s], u = v("css part", a);
|
|
51
|
+
if (u === void 0)
|
|
52
52
|
continue;
|
|
53
|
-
|
|
54
|
-
f.push({ label: r.name, viewUrl: p, change: h });
|
|
53
|
+
h.push({ label: a.name, viewUrl: void 0, change: u });
|
|
55
54
|
}
|
|
56
55
|
if (m !== void 0)
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
56
|
+
for (let s = 0; s < m.length; ++s) {
|
|
57
|
+
const a = m[s], u = v("css property", a);
|
|
58
|
+
if (u === void 0)
|
|
60
59
|
continue;
|
|
61
|
-
const
|
|
62
|
-
|
|
60
|
+
const b = a.removed === !0 ? void 0 : $(t, i.path, f, a.name);
|
|
61
|
+
h.push({ label: a.name, viewUrl: b, change: u });
|
|
63
62
|
}
|
|
64
|
-
if (
|
|
65
|
-
for (let
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
63
|
+
if (p !== void 0)
|
|
64
|
+
for (let s = 0; s < p.length; ++s) {
|
|
65
|
+
const a = p[s], u = v("css state", a);
|
|
66
|
+
if (u === void 0)
|
|
68
67
|
continue;
|
|
69
|
-
|
|
70
|
-
f.push({ label: r.name, viewUrl: p, change: h });
|
|
68
|
+
h.push({ label: a.name, viewUrl: void 0, change: u });
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
|
|
71
|
+
h.length > 0 ? E(U, N).members.push(...h) : C !== void 0 && U.members.push(N);
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
const c = [];
|
|
77
75
|
for (const n of o.children.values())
|
|
78
|
-
|
|
76
|
+
L(n, "", c);
|
|
79
77
|
return c.join(`
|
|
80
78
|
`);
|
|
81
79
|
}
|
|
82
|
-
function
|
|
80
|
+
function D(e, t) {
|
|
83
81
|
const o = e.children.get(t);
|
|
84
82
|
if (o !== void 0)
|
|
85
83
|
return o;
|
|
@@ -88,42 +86,42 @@ function L(e, t) {
|
|
|
88
86
|
}
|
|
89
87
|
function j(e) {
|
|
90
88
|
const t = e.tagName !== void 0 ? "component" : e.kind === "interface" ? "type declaration" : e.kind;
|
|
91
|
-
return
|
|
89
|
+
return v(t, e);
|
|
92
90
|
}
|
|
93
|
-
function
|
|
91
|
+
function v(e, t) {
|
|
94
92
|
const { added: o, removed: c, deprecated: n } = t;
|
|
95
93
|
if (c) {
|
|
96
|
-
const
|
|
97
|
-
return typeof n == "string" ? `${
|
|
94
|
+
const i = `**removed** ${e}`;
|
|
95
|
+
return typeof n == "string" ? `${i} - deprecated ${x(n)}` : i;
|
|
98
96
|
}
|
|
99
97
|
if (n)
|
|
100
|
-
return typeof n == "string" ? `**deprecated** ${e} ${
|
|
98
|
+
return typeof n == "string" ? `**deprecated** ${e} ${x(n)}` : `**deprecated** ${e}`;
|
|
101
99
|
if (o)
|
|
102
100
|
return `**added** ${e}`;
|
|
103
101
|
}
|
|
104
102
|
function B(e) {
|
|
105
103
|
const t = e.tagName;
|
|
106
|
-
return typeof t == "string" && t.length > 0 ? t :
|
|
104
|
+
return typeof t == "string" && t.length > 0 ? t : k(e.name) + (e.kind === "function" ? "()" : "");
|
|
107
105
|
}
|
|
108
|
-
function
|
|
109
|
-
const n = `${e}${t}
|
|
106
|
+
function $(e, t, o, c) {
|
|
107
|
+
const n = `${e}${t}/`;
|
|
110
108
|
return T(n, o.kind === "class" ? void 0 : o.name, c);
|
|
111
109
|
}
|
|
112
110
|
function E(e, t) {
|
|
113
|
-
const o =
|
|
111
|
+
const o = D(e, t.label);
|
|
114
112
|
return o.node = t, o;
|
|
115
113
|
}
|
|
116
114
|
function F(e) {
|
|
117
|
-
return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${
|
|
115
|
+
return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${k(e.name)}()` : k(e.name);
|
|
118
116
|
}
|
|
119
|
-
function
|
|
117
|
+
function k(e) {
|
|
120
118
|
return e.replace(/[\\\[\]\(\)]/gu, "\\$&");
|
|
121
119
|
}
|
|
122
|
-
function
|
|
120
|
+
function x(e) {
|
|
123
121
|
return e.split(`
|
|
124
122
|
`)[0];
|
|
125
123
|
}
|
|
126
|
-
function
|
|
124
|
+
function L(e, t, o) {
|
|
127
125
|
if (e.node) {
|
|
128
126
|
const n = e.node.viewUrl === void 0 ? e.node.label : `[${e.node.label}](${e.node.viewUrl})`;
|
|
129
127
|
e.node.change ? o.push(`${t}- ${n} - ${e.node.change}`) : o.push(`${t}- ${n}`);
|
|
@@ -131,11 +129,11 @@ function M(e, t, o) {
|
|
|
131
129
|
o.push(`${t}- ${e.name}/`);
|
|
132
130
|
const c = `${t} `;
|
|
133
131
|
for (const n of e.members) {
|
|
134
|
-
const
|
|
135
|
-
n.change ? o.push(`${c}- ${
|
|
132
|
+
const i = n.viewUrl === void 0 ? n.label : `[${n.label}](${n.viewUrl})`;
|
|
133
|
+
n.change ? o.push(`${c}- ${i} - ${n.change}`) : o.push(`${c}- ${i}`);
|
|
136
134
|
}
|
|
137
135
|
for (const n of e.children.values())
|
|
138
|
-
|
|
136
|
+
L(n, c, o);
|
|
139
137
|
}
|
|
140
138
|
export {
|
|
141
139
|
K as apiDiffToMarkdown
|