@arcgis/api-extractor 5.1.0-next.1 → 5.1.0-next.100
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-DByayOhi.js → ApiExtractor-KGzi9B02.js} +224 -220
- package/dist/apiJson.d.ts +10 -3
- package/dist/cli-7PX_wNxb.js +34 -0
- package/dist/cli.js +29 -11
- package/dist/diff/apiDiffToMarkdown.d.ts +9 -0
- package/dist/diff/apiDiffToMarkdown.js +140 -0
- package/dist/diff/diffApiJson.d.ts +4 -4
- package/dist/diff/diffApiJson.js +220 -97
- package/dist/diff/types.d.ts +3 -2
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.d.ts +12 -3
- package/dist/extractor/config.js +7 -8
- package/dist/extractor/extractors/copyDoc.d.ts +1 -1
- package/dist/extractor/processing/links.js +65 -64
- package/dist/privateContext-CB7P40up.js +86 -0
- package/dist/typeScript-CjWB1rJ_.js +66 -0
- package/dist/utils/apiHelpers.js +78 -15
- package/dist/utils/createIndex.d.ts +1 -1
- package/dist/utils/createIndex.js +46 -45
- package/dist/utils/partPrinter.js +29 -28
- package/dist/vite/plugin.js +41 -39
- package/dist/vite/typeScript.js +1 -1
- package/dist/worker-OTZkb-ju.js +3684 -0
- package/package.json +11 -7
- package/dist/apiHelpers-BYzO767m.js +0 -161
- package/dist/typeScript-D4_nAmBW.js +0 -64
- package/dist/worker-Btg0KdqM.js +0 -3677
package/dist/diff/diffApiJson.js
CHANGED
|
@@ -1,142 +1,265 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
function w(i, o) {
|
|
2
|
+
if (i.compiler?.name !== "@arcgis/core:manual" || i.compiler?.version !== "4.34")
|
|
3
|
+
return;
|
|
4
|
+
const a = {};
|
|
5
|
+
return i.modules.forEach((e) => {
|
|
6
|
+
a[e.path] = e;
|
|
7
|
+
}), {
|
|
8
|
+
...o,
|
|
9
|
+
modules: o.modules.filter((e) => {
|
|
10
|
+
const t = a[e.path];
|
|
11
|
+
return e.declarations = e.declarations.filter((s) => {
|
|
12
|
+
if (s.kind === "mixin")
|
|
13
|
+
return !1;
|
|
14
|
+
if (s.kind === "interface") {
|
|
15
|
+
const r = t?.declarations.find(
|
|
16
|
+
(d) => d.name === s.name && d.kind === "interface"
|
|
17
|
+
);
|
|
18
|
+
return s.members = void 0, r !== void 0;
|
|
19
|
+
}
|
|
20
|
+
return !0;
|
|
21
|
+
}), e.declarations.length > 0;
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function x(i) {
|
|
26
|
+
const o = /* @__PURE__ */ new Set([
|
|
27
|
+
// Fake class turned into a variable
|
|
28
|
+
"config",
|
|
29
|
+
// Wasn't visible directly before due to doc mismatch
|
|
30
|
+
"identity/IdentityManagerBase",
|
|
31
|
+
// Fake class turned into a variable
|
|
32
|
+
"identity/IdentityManager",
|
|
33
|
+
// Fake class turned into an interface
|
|
34
|
+
"views/layers/GeoRSSLayerView",
|
|
35
|
+
"views/layers/GraphicsLayerView",
|
|
36
|
+
"views/layers/KMLLayerView",
|
|
37
|
+
"views/layers/VectorTileLayerView",
|
|
38
|
+
"views/layers/PointCloudLayerView",
|
|
39
|
+
// ENUM-like objects turned into const variable + interfaces
|
|
40
|
+
"layers/support/rasterFunctionConstants"
|
|
41
|
+
]), a = i.modules.filter((n) => {
|
|
42
|
+
if (o.has(n.path))
|
|
43
|
+
return !1;
|
|
44
|
+
const e = n.path.startsWith("widgets/");
|
|
45
|
+
return n.declarations = n.declarations.filter((t) => e ? t.deprecated === void 0 && t.removed === void 0 ? !1 : ((t.kind === "class" || t.kind === "interface" || t.kind === "mixin") && (t.members = void 0), !0) : t.kind === "class" ? t.members === void 0 ? !0 : (t.members = t.members.filter((s) => !(s.kind === "constructor" || s.kind === "call-signature" || A.has(s.name))), t.members.length > 0) : !0), n.declarations.length > 0;
|
|
46
|
+
});
|
|
47
|
+
return { ...i, modules: a };
|
|
48
|
+
}
|
|
49
|
+
const A = /* @__PURE__ */ new Set([
|
|
50
|
+
// Excluded from api.json inheritance to keep file size in check
|
|
51
|
+
"addHandles",
|
|
52
|
+
"hasHandles",
|
|
53
|
+
"removeHandles",
|
|
54
|
+
// These are coming from mixins. Exclude them from the diff to reduce noise
|
|
55
|
+
// compared to more valuable new 5.0 fields.
|
|
56
|
+
// Added 77 times
|
|
57
|
+
"emit",
|
|
58
|
+
// 77
|
|
59
|
+
"hasEventListener",
|
|
60
|
+
// 73
|
|
61
|
+
"fromJSON",
|
|
62
|
+
// 72
|
|
63
|
+
"on",
|
|
64
|
+
// 71
|
|
65
|
+
"toJSON",
|
|
66
|
+
// 63
|
|
67
|
+
"declaredClass",
|
|
68
|
+
// 63
|
|
69
|
+
"getAtOrigin",
|
|
70
|
+
// 63
|
|
71
|
+
"originOf",
|
|
72
|
+
// 63
|
|
73
|
+
"revertAllToOrigin",
|
|
74
|
+
// 63
|
|
75
|
+
"revertToOrigin",
|
|
76
|
+
// 54
|
|
77
|
+
"clone",
|
|
78
|
+
// 50
|
|
79
|
+
"fromPortalItem",
|
|
80
|
+
// 49
|
|
81
|
+
"fromArcGISServerUrl",
|
|
82
|
+
// 28
|
|
83
|
+
"isFulfilled",
|
|
84
|
+
// 28
|
|
85
|
+
"isRejected",
|
|
86
|
+
// 28
|
|
87
|
+
"isResolved",
|
|
88
|
+
// 28
|
|
89
|
+
"when",
|
|
90
|
+
// 6
|
|
91
|
+
"cancelLoad",
|
|
92
|
+
// 6
|
|
93
|
+
"loadError",
|
|
94
|
+
// 6
|
|
95
|
+
"loadStatus",
|
|
96
|
+
// 6
|
|
97
|
+
"loadWarnings"
|
|
98
|
+
]);
|
|
99
|
+
function N(i, o) {
|
|
100
|
+
const a = w(i, o), n = a ?? o, e = i.compiler?.version.startsWith("4.") === !0 && n.compiler?.version.startsWith("4.") !== !0, t = new Map(
|
|
101
|
+
i.modules.map((d) => [
|
|
102
|
+
b(d, e),
|
|
103
|
+
d
|
|
104
|
+
])
|
|
105
|
+
), s = [];
|
|
106
|
+
for (const d of n.modules) {
|
|
107
|
+
const l = t.get(d.path), m = y(l, d, !0);
|
|
108
|
+
m !== void 0 && s.push(m), t.delete(d.path);
|
|
6
109
|
}
|
|
7
|
-
for (const
|
|
8
|
-
const
|
|
9
|
-
|
|
110
|
+
for (const d of t.values()) {
|
|
111
|
+
const l = y(
|
|
112
|
+
void 0,
|
|
113
|
+
e ? { ...d, path: b(d, e) } : d,
|
|
114
|
+
!1
|
|
115
|
+
);
|
|
116
|
+
l !== void 0 && s.push(l);
|
|
10
117
|
}
|
|
11
|
-
|
|
118
|
+
const r = { modules: s };
|
|
119
|
+
return a === void 0 ? r : x(r);
|
|
120
|
+
}
|
|
121
|
+
function b(i, o) {
|
|
122
|
+
return o ? i.declarations?.[0]?.importPath ?? i.path : i.path;
|
|
12
123
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
for (const
|
|
16
|
-
const
|
|
17
|
-
e.delete(
|
|
18
|
-
const g =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
124
|
+
function y(i, o, a) {
|
|
125
|
+
const n = [], e = h(i?.declarations ?? []), t = h(o.declarations ?? []);
|
|
126
|
+
for (const s of t.values()) {
|
|
127
|
+
const r = s.at(-1), d = r.tagName, l = d ?? r.name, m = e.get(l);
|
|
128
|
+
e.delete(l);
|
|
129
|
+
const g = m === void 0 && !a ? !0 : void 0, v = (
|
|
130
|
+
// Only mark as deprecated if all overloads are deprecated
|
|
131
|
+
s.length === 1 || s.every((c) => c.deprecated !== void 0) ? r.deprecated : void 0
|
|
132
|
+
), k = !v && m === void 0 && a ? !0 : void 0;
|
|
133
|
+
if (g || k) {
|
|
134
|
+
n.push({
|
|
135
|
+
kind: r.kind,
|
|
136
|
+
name: r.name,
|
|
137
|
+
tagName: d,
|
|
25
138
|
members: void 0,
|
|
26
139
|
removed: g,
|
|
27
|
-
added:
|
|
28
|
-
deprecated:
|
|
140
|
+
added: k,
|
|
141
|
+
deprecated: v
|
|
29
142
|
});
|
|
30
143
|
continue;
|
|
31
|
-
} else if (!
|
|
144
|
+
} else if (!a)
|
|
32
145
|
continue;
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
kind:
|
|
36
|
-
name:
|
|
37
|
-
tagName:
|
|
38
|
-
deprecated:
|
|
146
|
+
if (d !== void 0) {
|
|
147
|
+
const c = r, u = m?.[0], f = {
|
|
148
|
+
kind: c.kind,
|
|
149
|
+
name: c.name,
|
|
150
|
+
tagName: c.tagName,
|
|
151
|
+
deprecated: v,
|
|
39
152
|
added: void 0,
|
|
40
153
|
removed: void 0,
|
|
41
|
-
members:
|
|
42
|
-
events:
|
|
43
|
-
slots:
|
|
44
|
-
cssParts:
|
|
45
|
-
cssProperties:
|
|
46
|
-
cssStates:
|
|
154
|
+
members: M(u?.members, c.members),
|
|
155
|
+
events: p(u?.events, c.events),
|
|
156
|
+
slots: p(u?.slots, c.slots),
|
|
157
|
+
cssParts: p(u?.cssParts, c.cssParts),
|
|
158
|
+
cssProperties: p(u?.cssProperties, c.cssProperties),
|
|
159
|
+
cssStates: p(u?.cssStates, c.cssStates)
|
|
47
160
|
};
|
|
48
|
-
(
|
|
49
|
-
} else if (
|
|
50
|
-
const
|
|
51
|
-
kind:
|
|
52
|
-
name:
|
|
53
|
-
deprecated:
|
|
161
|
+
(v !== void 0 || f.members !== void 0 || f.events !== void 0 || f.slots !== void 0 || f.cssParts !== void 0 || f.cssProperties !== void 0 || f.cssStates !== void 0) && n.push(f);
|
|
162
|
+
} else if (r.kind === "class" || r.kind === "interface" || r.kind === "mixin") {
|
|
163
|
+
const c = m?.[0], u = {
|
|
164
|
+
kind: r.kind,
|
|
165
|
+
name: r.name,
|
|
166
|
+
deprecated: v,
|
|
54
167
|
added: void 0,
|
|
55
168
|
removed: void 0,
|
|
56
|
-
members:
|
|
57
|
-
events: "events" in
|
|
169
|
+
members: M(c?.members, r.members),
|
|
170
|
+
events: "events" in r ? p(c?.events, r.events) : void 0
|
|
58
171
|
};
|
|
59
|
-
(
|
|
60
|
-
} else
|
|
61
|
-
kind:
|
|
62
|
-
name:
|
|
63
|
-
deprecated:
|
|
172
|
+
(v !== void 0 || u.members !== void 0 || u.events !== void 0) && n.push(u);
|
|
173
|
+
} else v !== void 0 && n.push({
|
|
174
|
+
kind: r.kind,
|
|
175
|
+
name: r.name,
|
|
176
|
+
deprecated: v,
|
|
64
177
|
added: void 0,
|
|
65
178
|
removed: void 0
|
|
66
179
|
});
|
|
67
180
|
}
|
|
68
|
-
if (
|
|
69
|
-
for (const [
|
|
70
|
-
|
|
71
|
-
kind:
|
|
72
|
-
name:
|
|
73
|
-
tagName:
|
|
181
|
+
if (a)
|
|
182
|
+
for (const [s] of e.values())
|
|
183
|
+
n.push({
|
|
184
|
+
kind: s.kind,
|
|
185
|
+
name: s.name,
|
|
186
|
+
tagName: s.tagName,
|
|
74
187
|
members: void 0,
|
|
75
188
|
removed: !0,
|
|
76
189
|
added: void 0,
|
|
77
|
-
deprecated:
|
|
190
|
+
deprecated: s.deprecated
|
|
78
191
|
});
|
|
79
|
-
if (
|
|
192
|
+
if (n.length !== 0)
|
|
80
193
|
return {
|
|
81
|
-
path:
|
|
82
|
-
declarations:
|
|
194
|
+
path: o.path,
|
|
195
|
+
declarations: n
|
|
83
196
|
};
|
|
84
197
|
}
|
|
85
|
-
function h(
|
|
86
|
-
const
|
|
87
|
-
for (let
|
|
88
|
-
const
|
|
89
|
-
|
|
198
|
+
function h(i) {
|
|
199
|
+
const o = /* @__PURE__ */ new Map();
|
|
200
|
+
for (let a = 0; a < i.length; ++a) {
|
|
201
|
+
const n = i[a], e = n.tagName ?? n.name ?? n.kind, t = o.get(e);
|
|
202
|
+
P(n.docsTags) || (t === void 0 ? o.set(e, [n]) : t.push(n));
|
|
203
|
+
}
|
|
204
|
+
return o;
|
|
205
|
+
}
|
|
206
|
+
function P(i) {
|
|
207
|
+
if (i !== void 0) {
|
|
208
|
+
for (let o = 0; o < i.length; ++o)
|
|
209
|
+
if (i[o].name === "internal")
|
|
210
|
+
return !0;
|
|
90
211
|
}
|
|
91
|
-
return
|
|
212
|
+
return !1;
|
|
92
213
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
for (const e of
|
|
97
|
-
|
|
214
|
+
function p(i, o) {
|
|
215
|
+
const a = h(i ?? []), n = [];
|
|
216
|
+
if (o !== void 0)
|
|
217
|
+
for (const e of o)
|
|
218
|
+
a.get(e.name) === void 0 ? n.push({
|
|
98
219
|
name: e.name,
|
|
99
220
|
added: !0
|
|
100
|
-
}) : e.deprecated &&
|
|
221
|
+
}) : e.deprecated && n.push({
|
|
101
222
|
name: e.name,
|
|
102
223
|
deprecated: e.deprecated
|
|
103
|
-
}),
|
|
104
|
-
for (const [e] of
|
|
105
|
-
|
|
224
|
+
}), a.delete(e.name);
|
|
225
|
+
for (const [e] of a.values())
|
|
226
|
+
n.push({
|
|
106
227
|
name: e.name,
|
|
107
|
-
removed: !0
|
|
228
|
+
removed: !0,
|
|
229
|
+
deprecated: e.deprecated
|
|
108
230
|
});
|
|
109
|
-
return
|
|
231
|
+
return n.length ? n : void 0;
|
|
110
232
|
}
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
for (const [
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
const
|
|
233
|
+
function M(i, o) {
|
|
234
|
+
const a = h(i ?? []), n = h(o ?? []), e = [];
|
|
235
|
+
for (const [t, s] of n.entries()) {
|
|
236
|
+
const r = s.at(-1), d = a.get(t);
|
|
237
|
+
a.delete(t);
|
|
238
|
+
const l = (
|
|
117
239
|
// Only mark as deprecated if all overloads are deprecated
|
|
118
|
-
|
|
119
|
-
),
|
|
120
|
-
|
|
121
|
-
kind:
|
|
122
|
-
name:
|
|
123
|
-
deprecated:
|
|
124
|
-
}) :
|
|
125
|
-
kind:
|
|
126
|
-
name:
|
|
240
|
+
s.length === 1 || s.every((g) => g.deprecated !== void 0) ? r.deprecated : void 0
|
|
241
|
+
), m = t === "constructor" || t === "call-signature" ? void 0 : t;
|
|
242
|
+
l ? e.push({
|
|
243
|
+
kind: r.kind,
|
|
244
|
+
name: m,
|
|
245
|
+
deprecated: l
|
|
246
|
+
}) : d === void 0 && e.push({
|
|
247
|
+
kind: r.kind,
|
|
248
|
+
name: m,
|
|
127
249
|
added: !0
|
|
128
250
|
});
|
|
129
251
|
}
|
|
130
|
-
for (const [
|
|
131
|
-
const
|
|
252
|
+
for (const [t, [s]] of a.entries()) {
|
|
253
|
+
const r = t === "constructor" || t === "call-signature" ? void 0 : t;
|
|
132
254
|
e.push({
|
|
133
|
-
kind:
|
|
134
|
-
name:
|
|
135
|
-
removed: !0
|
|
255
|
+
kind: s.kind,
|
|
256
|
+
name: r,
|
|
257
|
+
removed: !0,
|
|
258
|
+
deprecated: s.deprecated
|
|
136
259
|
});
|
|
137
260
|
}
|
|
138
261
|
return e.length ? e : void 0;
|
|
139
262
|
}
|
|
140
263
|
export {
|
|
141
|
-
|
|
264
|
+
N as diffApiJson
|
|
142
265
|
};
|
package/dist/diff/types.d.ts
CHANGED
|
@@ -26,8 +26,9 @@ export interface ApiDiffBase {
|
|
|
26
26
|
*/
|
|
27
27
|
added?: true;
|
|
28
28
|
/**
|
|
29
|
-
* Whether this declaration is deprecated in the new api.json
|
|
30
|
-
*
|
|
29
|
+
* Whether this declaration is deprecated in the new api.json. If declaration
|
|
30
|
+
* was removed, but was deprecated in the old api.json, this will show the old
|
|
31
|
+
* deprecation message as it points at the replacement API.
|
|
31
32
|
* If the value is a string, it's the reason for the deprecation.
|
|
32
33
|
* Deprecated takes precedence over added.
|
|
33
34
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-CjWB1rJ_.js";
|
|
2
|
+
import "../worker-OTZkb-ju.js";
|
|
3
3
|
import "./processing/links.js";
|
|
4
4
|
import "typescript";
|
|
5
|
-
import { A as x } from "../ApiExtractor-
|
|
5
|
+
import { A as x } from "../ApiExtractor-KGzi9B02.js";
|
|
6
6
|
import "@arcgis/toolkit/function";
|
|
7
7
|
export {
|
|
8
8
|
x as ApiExtractor
|
|
@@ -186,7 +186,7 @@ export interface ApiExtractorTypesConfig {
|
|
|
186
186
|
* anyway, this option deduplicates work by removing the need for you to run
|
|
187
187
|
* type checking separately.
|
|
188
188
|
*
|
|
189
|
-
* @default // false if running standalone. true if running in Vite.
|
|
189
|
+
* @default // false if running standalone or in storybook. true if running in Vite.
|
|
190
190
|
*/
|
|
191
191
|
readonly fullTypeCheck?: boolean;
|
|
192
192
|
/**
|
|
@@ -279,14 +279,23 @@ export type TypeReplacements = Record<string, Record<string, readonly [modulePat
|
|
|
279
279
|
export interface ApiExtractorDocumentationConfig {
|
|
280
280
|
readonly copyDocDefinitions?: CopyDocDefinitions;
|
|
281
281
|
readonly noInheritMembers?: NoInheritMembers;
|
|
282
|
+
/**
|
|
283
|
+
* Whether to omit \@internal APIs from api.json.
|
|
284
|
+
* This can only be disabled if not emitting .d.ts files.
|
|
285
|
+
* Otherwise, you can manually filter out nodes that have
|
|
286
|
+
* .docsTags[].name==="internal" in the api.json.
|
|
287
|
+
*
|
|
288
|
+
* @default false
|
|
289
|
+
*/
|
|
290
|
+
readonly omitInternal?: boolean;
|
|
282
291
|
/**
|
|
283
292
|
* Get a prefix for a public-facing URL for each component story.
|
|
284
293
|
*
|
|
285
294
|
* @see https://webgis.esri.com/references/support-packages/storybook
|
|
286
295
|
* @example
|
|
287
|
-
* Set this to "https://developers.arcgis.com/javascript/latest/storybook/map-components/".
|
|
296
|
+
* Set this to "https://developers.arcgis.com/javascript/latest/storybook/map-components/index.html".
|
|
288
297
|
* This will produce URLs like
|
|
289
|
-
* "https://developers.arcgis.com/javascript/latest/storybook/map-components
|
|
298
|
+
* "https://developers.arcgis.com/javascript/latest/storybook/map-components/index.html?path=/story/arcgis-area-measurement-2d--demo&singleStory=true"
|
|
290
299
|
*/
|
|
291
300
|
readonly publicStoryUrlPrefix?: string | false;
|
|
292
301
|
/**
|
package/dist/extractor/config.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import "@arcgis/components-build-utils";
|
|
2
|
-
import "../typeScript-
|
|
3
|
-
import { l
|
|
2
|
+
import "../typeScript-CjWB1rJ_.js";
|
|
3
|
+
import { l, m as n, r as A } from "../worker-OTZkb-ju.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "fs/promises";
|
|
7
|
-
import "
|
|
8
|
-
import "util";
|
|
7
|
+
import "node:util";
|
|
9
8
|
import "@arcgis/toolkit/string";
|
|
10
|
-
import "../apiHelpers
|
|
9
|
+
import "../utils/apiHelpers.js";
|
|
11
10
|
import "@arcgis/toolkit/function";
|
|
12
11
|
import "node:fs";
|
|
13
12
|
import "node:url";
|
|
14
13
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
l as loadApiExtractorConfig,
|
|
15
|
+
n as mergeApiExtractorConfigs,
|
|
16
|
+
A as resolveApiExtractorConfig
|
|
18
17
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration } from "../../apiJson.js";
|
|
2
2
|
|
|
3
|
-
/** [Documentation](https://webgis.esri.com/
|
|
3
|
+
/** [Documentation](https://webgis.esri.com/sdk/contributing/core/core/documenting-api#copydoc) */
|
|
4
4
|
export interface CopyDocDefinitions {
|
|
5
5
|
properties?: CopyDocMemberDeclarations<ApiCustomElementField>;
|
|
6
6
|
methods?: CopyDocMemberDeclarations<ApiClassMethod>;
|