@arcgis/api-extractor 5.1.0-next.99 → 5.2.0-next.1
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/README.md +2 -2
- package/dist/{ApiExtractor-CYe0v4qU.js → ApiExtractor-CZfBqER_.js} +421 -385
- package/dist/apiJson.d.ts +8 -0
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/extractor/extractors/copyDoc.d.ts +1 -1
- package/dist/extractor/processing/links.js +43 -43
- package/dist/{typeScript-BJ98xoUG.js → typeScript-Bi6LkUmP.js} +1 -1
- package/dist/utils/inferEntrypoints.js +1 -0
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/worker-C9agsAIe.js +3699 -0
- package/package.json +6 -6
- package/dist/worker-BKOEQXzG.js +0 -3684
package/dist/apiJson.d.ts
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* @see https://custom-elements-manifest.open-wc.org/analyzer/getting-started/
|
|
7
7
|
*/
|
|
8
8
|
export interface ApiJson {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the package this api.json describes.
|
|
11
|
+
*
|
|
12
|
+
* > Not present in vanilla custom-elements-manifest.
|
|
13
|
+
*
|
|
14
|
+
* @example "@arcgis/map-components"
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
9
17
|
/**
|
|
10
18
|
* The timestamp at which the api.json was generated, in the format
|
|
11
19
|
* `YYYY-MM-DDThh:mm:ss`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-Bi6LkUmP.js";
|
|
2
|
+
import "../worker-C9agsAIe.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-CZfBqER_.js";
|
|
6
6
|
import "@arcgis/toolkit/function";
|
|
7
7
|
export {
|
|
8
8
|
x as ApiExtractor
|
package/dist/extractor/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@arcgis/components-build-utils";
|
|
2
|
-
import "../typeScript-
|
|
3
|
-
import { l, m as n, r as A } from "../worker-
|
|
2
|
+
import "../typeScript-Bi6LkUmP.js";
|
|
3
|
+
import { l, m as n, r as A } from "../worker-C9agsAIe.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "fs/promises";
|
|
@@ -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/references/api-extractor/tags-reference#copydoc)) */
|
|
4
4
|
export interface CopyDocDefinitions {
|
|
5
5
|
properties?: CopyDocMemberDeclarations<ApiCustomElementField>;
|
|
6
6
|
methods?: CopyDocMemberDeclarations<ApiClassMethod>;
|
|
@@ -23,18 +23,18 @@ function J(e, n) {
|
|
|
23
23
|
d.text && (d.text = d.text.replaceAll(F, n.resolveJsDocLink).replaceAll(n.config.documentation.alternativeHost, n.config.documentation.host), d.text.includes("](.") && a(P, d.text, n));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
const P = "Unexpected relative markdown link. For links to API within the package use {@link}. For all other links, use absolute markdown. Documentation: https://webgis.esri.com/
|
|
26
|
+
const P = "Unexpected relative markdown link. For links to API within the package use {@link}. For all other links, use absolute markdown. Documentation: https://webgis.esri.com/references/api-extractor/tags-reference#link)", F = /\{@link +([^}]+)\}/gu;
|
|
27
27
|
function N(e, n, i) {
|
|
28
28
|
let d = i.indexOf(" ");
|
|
29
29
|
d === -1 && (d = i.length);
|
|
30
30
|
const u = i.slice(0, d), m = i.slice(d + 1);
|
|
31
31
|
if (u.startsWith("https://"))
|
|
32
32
|
return e.config.strict ? (a(
|
|
33
|
-
"Did not expect absolute URLs in a @link tag. Please use markdown links for external links. See https://webgis.esri.com/
|
|
33
|
+
"Did not expect absolute URLs in a @link tag. Please use markdown links for external links. See https://webgis.esri.com/references/api-extractor/tags-reference#link)",
|
|
34
34
|
n,
|
|
35
35
|
e
|
|
36
36
|
), "") : `[${m || u}](${u})`;
|
|
37
|
-
const [k,
|
|
37
|
+
const [k, t] = u.split("#"), [f, L] = k.split("!");
|
|
38
38
|
if (f === "")
|
|
39
39
|
return a(
|
|
40
40
|
`Expected @link reference to start with a module name (before ! or #), but got: ${u}`,
|
|
@@ -57,12 +57,12 @@ function N(e, n, i) {
|
|
|
57
57
|
) : e.silencedBrokenLinkCount += 1, n;
|
|
58
58
|
const v = y(g), D = e.inheritedModuleName === void 0 ? e.apiModule : e.moduleMap.get(e.inheritedModuleName) ?? e.apiModule;
|
|
59
59
|
if (e.watchFiles !== void 0 && f !== D.path && y(D).isStale) {
|
|
60
|
-
const r = y(D).file.fileName.slice(e.config.context.cwd.length),
|
|
61
|
-
e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(
|
|
62
|
-
const b = e.watchFiles.get(
|
|
60
|
+
const r = y(D).file.fileName.slice(e.config.context.cwd.length), s = v.file.fileName.slice(e.config.context.cwd.length);
|
|
61
|
+
e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(s);
|
|
62
|
+
const b = e.watchFiles.get(s).dependents;
|
|
63
63
|
b.has(r) || b.set(r, !1);
|
|
64
64
|
}
|
|
65
|
-
let h = M(g.path, L,
|
|
65
|
+
let h = M(g.path, L, t, e);
|
|
66
66
|
if (L !== void 0) {
|
|
67
67
|
const r = v.index.named[L];
|
|
68
68
|
return r === void 0 ? (e.config.verify.detectBrokenLinks ? a(
|
|
@@ -74,96 +74,96 @@ function N(e, n, i) {
|
|
|
74
74
|
n,
|
|
75
75
|
e
|
|
76
76
|
), n) : `[${m || w(r)}](${h})`;
|
|
77
|
-
} else if (
|
|
78
|
-
const r = g.path === D.path,
|
|
79
|
-
if (
|
|
80
|
-
return v.index.named[
|
|
77
|
+
} else if (t !== void 0) {
|
|
78
|
+
const r = g.path === D.path, s = v.index.class;
|
|
79
|
+
if (s === void 0)
|
|
80
|
+
return v.index.named[t] === void 0 ? e.config.verify.detectBrokenLinks ? a(
|
|
81
81
|
'Failed to find the referenced member. Class member reference syntax was used, yet current module does not expose a class/mixin/custom element? Linking to properties in interfaces is not yet supported. For event links, prefix with "event-"',
|
|
82
82
|
n,
|
|
83
83
|
e
|
|
84
84
|
) : e.silencedBrokenLinkCount += 1 : a(
|
|
85
|
-
`Invalid reference syntax used. This syntax is only permitted on modules that export a class/mixin/web component. Perhaps you meant to use ${C("red", `${f}!${
|
|
85
|
+
`Invalid reference syntax used. This syntax is only permitted on modules that export a class/mixin/web component. Perhaps you meant to use ${C("red", `${f}!${t}`)} instead? Linking to properties in interfaces is not yet supported`,
|
|
86
86
|
n,
|
|
87
87
|
e
|
|
88
88
|
), n;
|
|
89
89
|
const b = v.inheritance, p = typeof b == "object" ? b : void 0;
|
|
90
90
|
let c;
|
|
91
|
-
if (
|
|
92
|
-
const o =
|
|
91
|
+
if (t.startsWith("event-")) {
|
|
92
|
+
const o = t.slice(6);
|
|
93
93
|
if (p !== void 0)
|
|
94
94
|
c = p.indexedEvents?.[o];
|
|
95
|
-
else if (
|
|
96
|
-
for (let l = 0; l <
|
|
97
|
-
const $ =
|
|
95
|
+
else if (s.events !== void 0)
|
|
96
|
+
for (let l = 0; l < s.events.length; ++l) {
|
|
97
|
+
const $ = s.events[l];
|
|
98
98
|
if (o === $.name) {
|
|
99
99
|
c = $;
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
} else if (
|
|
104
|
-
const o =
|
|
103
|
+
} else if (t.startsWith("slot-")) {
|
|
104
|
+
const o = t.slice(5);
|
|
105
105
|
if (p !== void 0)
|
|
106
106
|
c = p.indexedSlots?.[o];
|
|
107
|
-
else if (
|
|
108
|
-
for (let l = 0; l <
|
|
109
|
-
const $ =
|
|
107
|
+
else if (s.slots !== void 0)
|
|
108
|
+
for (let l = 0; l < s.slots.length; ++l) {
|
|
109
|
+
const $ = s.slots[l];
|
|
110
110
|
if (o === $.name) {
|
|
111
111
|
c = $;
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
} else if (
|
|
115
|
+
} else if (t.startsWith("--")) {
|
|
116
116
|
if (p !== void 0)
|
|
117
|
-
c = p.indexedCssProperties?.[
|
|
118
|
-
else if (
|
|
119
|
-
for (let o = 0; o <
|
|
120
|
-
const l =
|
|
121
|
-
if (
|
|
117
|
+
c = p.indexedCssProperties?.[t];
|
|
118
|
+
else if (s.cssProperties !== void 0)
|
|
119
|
+
for (let o = 0; o < s.cssProperties.length; ++o) {
|
|
120
|
+
const l = s.cssProperties[o];
|
|
121
|
+
if (t === l.name) {
|
|
122
122
|
c = l;
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
} else if (p?.indexedMembers !== void 0 && (c = p.indexedMembers[
|
|
127
|
-
for (let o = 0; o <
|
|
128
|
-
const l =
|
|
129
|
-
if (
|
|
126
|
+
} else if (p?.indexedMembers !== void 0 && (c = p.indexedMembers[t] ?? p.indexedMembers[`static ${t}`]), c === void 0 && s.members !== void 0) {
|
|
127
|
+
for (let o = 0; o < s.members.length; ++o) {
|
|
128
|
+
const l = s.members[o];
|
|
129
|
+
if (t === l.name) {
|
|
130
130
|
c = l;
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
if (c === void 0 && !e.config.strict && e.isComponentProject &&
|
|
135
|
-
for (let o = 0; o <
|
|
136
|
-
const l =
|
|
137
|
-
if (
|
|
134
|
+
if (c === void 0 && !e.config.strict && e.isComponentProject && s.events !== void 0)
|
|
135
|
+
for (let o = 0; o < s.events.length; ++o) {
|
|
136
|
+
const l = s.events[o];
|
|
137
|
+
if (t === l.name) {
|
|
138
138
|
c = l, h = h.replace("#", "#event-");
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
return c === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${m || (r ? w(c) : `${w(
|
|
143
|
+
return c === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${m || (r ? w(c) : `${w(s)}.${w(c)}`)}](${h})`;
|
|
144
144
|
} else {
|
|
145
|
-
const r = v.index.class === void 0 ?
|
|
145
|
+
const r = v.index.class === void 0 ? U(f) : w(v.index.class);
|
|
146
146
|
return `[${m || r}](${h})`;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
function M(e, n, i, d) {
|
|
150
150
|
let u;
|
|
151
151
|
if (d.isComponentProject && typeof d.config.documentation.getComponentDocsUrl == "function" && e.startsWith("components/")) {
|
|
152
|
-
const m = e.slice(11), k = m.indexOf("/"),
|
|
152
|
+
const m = e.slice(11), k = m.indexOf("/"), t = k === -1 ? m : m.slice(0, k), f = d.config.documentation.getComponentDocsUrl(t, I(t));
|
|
153
153
|
f !== void 0 && (u = f + (k === -1 ? "" : m.slice(k + 1)));
|
|
154
154
|
}
|
|
155
|
-
return u ??= `${d.normalizedApiReferencePrefix}${e}/`,
|
|
155
|
+
return u ??= `${d.normalizedApiReferencePrefix}${e}/`, x(u, n, i);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function x(e, n, i) {
|
|
158
158
|
return n !== void 0 ? i === void 0 ? `${e}#${encodeURIComponent(n)}` : `${e}#${encodeURIComponent(n)}-${encodeURIComponent(i)}` : i !== void 0 ? `${e}#${encodeURIComponent(i)}` : e;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function U(e) {
|
|
161
161
|
const n = e.lastIndexOf("/");
|
|
162
162
|
return n === -1 ? e : e.slice(n + 1);
|
|
163
163
|
}
|
|
164
164
|
const E = (e) => `/javascript/latest/references/${e}/`;
|
|
165
165
|
export {
|
|
166
|
-
|
|
166
|
+
x as buildViewUrl,
|
|
167
167
|
E as getDefaultBasePath,
|
|
168
168
|
M as getViewUrl,
|
|
169
169
|
W as postProcessDeprecated,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { findPath as E, path as u, toSystemPathSeparators as S } from "@arcgis/components-build-utils";
|
|
2
2
|
import t from "typescript";
|
|
3
3
|
import { styleText as f } from "util";
|
|
4
|
-
const w = "@arcgis/api-extractor", P = "5.
|
|
4
|
+
const w = "@arcgis/api-extractor", P = "5.2.0-next.1", D = {
|
|
5
5
|
name: w,
|
|
6
6
|
version: P
|
|
7
7
|
};
|
package/dist/vite/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as O, m as J } from "../worker-
|
|
2
|
-
import { A as S, w as T } from "../ApiExtractor-
|
|
3
|
-
import { p as A, l as C } from "../typeScript-
|
|
1
|
+
import { l as O, m as J } from "../worker-C9agsAIe.js";
|
|
2
|
+
import { A as S, w as T } from "../ApiExtractor-CZfBqER_.js";
|
|
3
|
+
import { p as A, l as C } from "../typeScript-Bi6LkUmP.js";
|
|
4
4
|
import { writeFile as M } from "node:fs/promises";
|
|
5
5
|
import { path as w } from "@arcgis/components-build-utils";
|
|
6
6
|
const N = A.name;
|