@arcgis/api-extractor 5.1.0-next.99 → 5.1.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-D_yuu0Wh.js} +443 -407
- package/dist/apiJson.d.ts +12 -4
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/extractor/extractors/copyDoc.d.ts +11 -5
- package/dist/extractor/processing/links.js +43 -43
- package/dist/{typeScript-BJ98xoUG.js → typeScript-BWap2lJs.js} +18 -18
- package/dist/utils/apiHelpers.js +5 -5
- package/dist/utils/hydrateApiType.js +25 -24
- package/dist/utils/inferEntrypoints.js +1 -0
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/worker-TYrYZaq6.js +3705 -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`.
|
|
@@ -443,7 +451,7 @@ export interface ApiWithInheritance {
|
|
|
443
451
|
inheritedFrom?: ApiReference;
|
|
444
452
|
}
|
|
445
453
|
|
|
446
|
-
/** @see [MDN Slot](https://developer.mozilla.org/
|
|
454
|
+
/** @see [MDN Slot](https://developer.mozilla.org/docs/Web/HTML/Element/slot) */
|
|
447
455
|
export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
|
|
448
456
|
/**
|
|
449
457
|
* The slot name, or the empty string for an unnamed slot.
|
|
@@ -466,7 +474,7 @@ export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
|
|
|
466
474
|
/**
|
|
467
475
|
* The description of exposed CSS Parts
|
|
468
476
|
*
|
|
469
|
-
* @see https://developer.mozilla.org/
|
|
477
|
+
* @see https://developer.mozilla.org/docs/Web/CSS/CSS_shadow_parts
|
|
470
478
|
*/
|
|
471
479
|
export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
|
|
472
480
|
/** @example "tab" */
|
|
@@ -486,7 +494,7 @@ export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
|
|
|
486
494
|
/**
|
|
487
495
|
* The description of a CSS Custom State.
|
|
488
496
|
*
|
|
489
|
-
* @see https://developer.mozilla.org/
|
|
497
|
+
* @see https://developer.mozilla.org/docs/Web/API/CustomStateSet
|
|
490
498
|
*/
|
|
491
499
|
export interface ApiCssCustomState extends ApiWithDescription, ApiWithUnusedSummary {
|
|
492
500
|
/**
|
|
@@ -519,7 +527,7 @@ export interface ApiCssCustomProperty extends ApiWithDescription, ApiWithUnusedS
|
|
|
519
527
|
* The expected syntax of the defined property. Defaults to "*".
|
|
520
528
|
*
|
|
521
529
|
* The syntax must be a valid CSS
|
|
522
|
-
* [syntax string](https://developer.mozilla.org/
|
|
530
|
+
* [syntax string](https://developer.mozilla.org/docs/Web/CSS/@property/syntax)
|
|
523
531
|
* as defined in the CSS Properties and Values API.
|
|
524
532
|
*
|
|
525
533
|
* Examples:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-BWap2lJs.js";
|
|
2
|
+
import "../worker-TYrYZaq6.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-D_yuu0Wh.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-BWap2lJs.js";
|
|
3
|
+
import { l, m as n, r as A } from "../worker-TYrYZaq6.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration } from "../../apiJson.js";
|
|
1
|
+
import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration, ApiWithDeprecated, ApiWithDescription, ApiWithDocsTags } 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>;
|
|
@@ -18,8 +18,14 @@ export interface CopyDocDefinitions {
|
|
|
18
18
|
interfaces?: CopyDocDeclarations<ApiInterfaceDeclaration>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* A common shape for metadata that can be included in declarative copy doc.
|
|
23
|
+
* Extra fields can be specified by imperatively mutating the API declaration.
|
|
24
|
+
*/
|
|
25
|
+
export interface CopyDocCommonBase extends Partial<ApiWithDescription>, Partial<ApiWithDocsTags>, Partial<ApiWithDeprecated> {
|
|
26
|
+
return?: ApiWithDescription;
|
|
27
|
+
}
|
|
22
28
|
|
|
23
|
-
export type CopyDocDeclarations<ApiType extends Partial<
|
|
29
|
+
export type CopyDocDeclarations<ApiType extends Partial<CopyDocCommonBase>> = Record<string, Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase> | ((apiDeclaration: ApiType, module: ApiModule) => Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase>) | undefined>;
|
|
24
30
|
|
|
25
|
-
export type CopyDocMemberDeclarations<ApiType extends Partial<
|
|
31
|
+
export type CopyDocMemberDeclarations<ApiType extends Partial<CopyDocCommonBase>> = Record<string, Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase> | ((apiDeclaration: ApiType, classOrComponent: ApiClassDeclaration | ApiCustomElementDeclaration, module: ApiModule) => Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase> | undefined) | undefined>;
|
|
@@ -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.1.
|
|
4
|
+
const w = "@arcgis/api-extractor", P = "5.1.1", D = {
|
|
5
5
|
name: w,
|
|
6
6
|
version: P
|
|
7
7
|
};
|
|
@@ -9,37 +9,37 @@ let x;
|
|
|
9
9
|
function N(o) {
|
|
10
10
|
return x ??= t.createPrinter(), x.printNode(t.EmitHint.Unspecified, o, void 0);
|
|
11
11
|
}
|
|
12
|
-
function A(o,
|
|
13
|
-
return o.pos !== -1 && o.end !== -1 &&
|
|
12
|
+
function A(o, r) {
|
|
13
|
+
return o.pos !== -1 && o.end !== -1 && r !== void 0 ? o.getText(r) : N(o);
|
|
14
14
|
}
|
|
15
15
|
let h;
|
|
16
16
|
const g = D.name, m = {
|
|
17
17
|
getCurrentDirectory: process.cwd,
|
|
18
18
|
getCanonicalFileName: (o) => o,
|
|
19
19
|
getNewLine: () => t.sys.newLine
|
|
20
|
-
}, L = function(o, { file:
|
|
21
|
-
this.errorCount += 1, process.exitCode = 1, s ??= n === void 0 || n.pos === -1 ? -1 : n.getStart(
|
|
20
|
+
}, L = function(o, { file: r, node: n, scope: i, start: s, length: c }) {
|
|
21
|
+
this.errorCount += 1, process.exitCode = 1, s ??= n === void 0 || n.pos === -1 ? -1 : n.getStart(r, !1);
|
|
22
22
|
const a = n?.end ?? -1;
|
|
23
23
|
c ??= a === -1 ? -1 : Math.max(1, a - s);
|
|
24
|
-
const
|
|
24
|
+
const e = s >= 0 && c >= 0, d = !e && i !== void 0, l = {
|
|
25
25
|
category: t.DiagnosticCategory.Error,
|
|
26
|
-
code:
|
|
27
|
-
file: d ? void 0 :
|
|
28
|
-
start:
|
|
29
|
-
length:
|
|
30
|
-
messageText: (d ? `${f("cyan", i, { stream: process.stderr })}: ` : "") + o + (
|
|
26
|
+
code: e ? g : v,
|
|
27
|
+
file: d ? void 0 : r,
|
|
28
|
+
start: e ? s : 0,
|
|
29
|
+
length: e ? c : 0,
|
|
30
|
+
messageText: (d ? `${f("cyan", i, { stream: process.stderr })}: ` : "") + o + (e || n === void 0 ? "" : `
|
|
31
31
|
|
|
32
|
-
${A(n,
|
|
32
|
+
${A(n, r)}`)
|
|
33
33
|
}, p = t.formatDiagnosticsWithColorAndContext([l], m);
|
|
34
34
|
h ??= process.env.CI !== void 0 || f("red", "", { stream: process.stderr }) !== "";
|
|
35
|
-
const C = h ? p : p.replaceAll(F, ""), y =
|
|
35
|
+
const C = h ? p : p.replaceAll(F, ""), y = e ? C : C.replace(v.toString(), g);
|
|
36
36
|
this.config.context.logger.error(y);
|
|
37
37
|
}, v = 1490, F = /\x1B\[[0-9;]*m/gu, W = f("cyan", `[${g}] `);
|
|
38
|
-
function k(o = process.cwd(),
|
|
39
|
-
const i =
|
|
38
|
+
function k(o = process.cwd(), r, n) {
|
|
39
|
+
const i = r === void 0 ? E("tsconfig.json", o) : u.resolve(o, r);
|
|
40
40
|
if (i === void 0)
|
|
41
41
|
throw Error(
|
|
42
|
-
`Unable to find ${S(String(
|
|
42
|
+
`Unable to find ${S(String(r))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`
|
|
43
43
|
);
|
|
44
44
|
const s = t.readConfigFile(i, t.sys.readFile);
|
|
45
45
|
if (s.error !== void 0)
|
|
@@ -49,12 +49,12 @@ function k(o = process.cwd(), e, n) {
|
|
|
49
49
|
include: [],
|
|
50
50
|
files: [],
|
|
51
51
|
exclude: []
|
|
52
|
-
},
|
|
52
|
+
}, e = t.parseJsonConfigFileContent(a, t.sys, u.dirname(i)), d = 18002, l = n ? e.errors : e.errors.filter((p) => p.code !== d);
|
|
53
53
|
if (l.length > 0)
|
|
54
54
|
throw Error(t.formatDiagnosticsWithColorAndContext(l, m));
|
|
55
55
|
return {
|
|
56
56
|
configPath: i,
|
|
57
|
-
config:
|
|
57
|
+
config: e
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
export {
|
package/dist/utils/apiHelpers.js
CHANGED
|
@@ -30,7 +30,7 @@ function x(e, n, o) {
|
|
|
30
30
|
}
|
|
31
31
|
const l = new Intl.Collator("en", { numeric: !0 }).compare, S = (e, n) => l(e.name, n.name), M = (e, n) => e.static !== void 0 && n.static === void 0 ? -1 : n.static !== void 0 && e.static === void 0 ? 1 : e.name === void 0 ? n.name === void 0 ? 0 : -1 : n.name === void 0 || "return" in e && !("return" in n) ? 1 : "return" in n && !("return" in e) ? -1 : l(e.name, n.name), d = (e) => e.name ?? (e.kind === "constructor" ? "constructor" : "call-signature"), P = (e) => e.static === !0 ? `static ${d(e)}` : d(e), T = (e) => ("bubbles" in e ? "@" : "") + (e.tagName ?? e.name ?? (e.kind === "constructor" ? "constructor" : "")) + ("return" in e ? "()" : "");
|
|
32
32
|
function k(e, n, o = -1) {
|
|
33
|
-
"description" in n && (n.description ??= e.description), "deprecated" in n && (n.deprecated ??= e.deprecated), "return" in n && e.return !== void 0 && (n.return.description ??= e.return?.description)
|
|
33
|
+
"description" in n && (n.description ??= e.description), "deprecated" in n && (n.deprecated ??= e.deprecated), "return" in n && e.return !== void 0 && (n.return.description ??= e.return?.description);
|
|
34
34
|
const { docsTags: i } = e, t = n;
|
|
35
35
|
if (o !== -1 && (i === void 0 && t.docsTags.length === 1 ? t.docsTags = void 0 : t.docsTags.splice(o, 1)), i !== void 0) {
|
|
36
36
|
t.docsTags ??= [];
|
|
@@ -43,7 +43,7 @@ function k(e, n, o = -1) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function A(e, n) {
|
|
47
47
|
let o = e.text;
|
|
48
48
|
if (e.references !== void 0)
|
|
49
49
|
for (let i = e.references.length - 1; i >= 0; i--) {
|
|
@@ -59,11 +59,11 @@ function y(e, n) {
|
|
|
59
59
|
references: void 0
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function N(e) {
|
|
63
63
|
return e.return.type.text.startsWith("Promise<");
|
|
64
64
|
}
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
A as apiTypeToImportType,
|
|
67
67
|
M as compareClassMembers,
|
|
68
68
|
S as compareNamedNodes,
|
|
69
69
|
l as compareStrings,
|
|
@@ -73,7 +73,7 @@ export {
|
|
|
73
73
|
P as getMaybeStaticApiMemberName,
|
|
74
74
|
p as globalPackageIdentifier,
|
|
75
75
|
g as isApiMethod,
|
|
76
|
-
|
|
76
|
+
N as isApiMethodAsync,
|
|
77
77
|
v as isApiProperty,
|
|
78
78
|
k as mergeApiNodes,
|
|
79
79
|
h as naturalSortModules
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { globalPackageIdentifier as h } from "./apiHelpers.js";
|
|
1
2
|
const d = {
|
|
2
3
|
// Create a null prototype object to avoid collisions with Object.prototype when doing lookups
|
|
3
4
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -13,50 +14,50 @@ const d = {
|
|
|
13
14
|
never: "https://www.typescriptlang.org/docs/handbook/2/functions.html#never",
|
|
14
15
|
any: "https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any",
|
|
15
16
|
this: "#"
|
|
16
|
-
},
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
let
|
|
17
|
+
}, g = Object.keys(d).join("|"), p = new RegExp(`(?<!["'-])\\b(?:${g})\\b(?!["'-])`, "u");
|
|
18
|
+
function v(e, l) {
|
|
19
|
+
const o = [];
|
|
20
|
+
let n = e.text.length;
|
|
20
21
|
if (e.references !== void 0)
|
|
21
|
-
for (let
|
|
22
|
-
const t = e.references[
|
|
22
|
+
for (let c = e.references.length - 1; c >= 0; c--) {
|
|
23
|
+
const t = e.references[c];
|
|
23
24
|
if (t.start === void 0 || t.end === void 0)
|
|
24
25
|
continue;
|
|
25
|
-
const r = e.text.slice(t.end,
|
|
26
|
-
r.length > 0 && i(r,
|
|
26
|
+
const r = e.text.slice(t.end, n);
|
|
27
|
+
r.length > 0 && i(r, l, o);
|
|
27
28
|
const s = e.text.slice(t.start, t.end);
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
n = t.start, t.viewUrl === void 0 ? o.push(s) : o.push(
|
|
30
|
+
l(s, t)
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
i(
|
|
33
|
+
if (n > 0) {
|
|
34
|
+
const c = e.text.slice(0, n);
|
|
35
|
+
i(c, l, o);
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return o.reverse();
|
|
37
38
|
}
|
|
38
|
-
function i(e,
|
|
39
|
-
const
|
|
40
|
-
for (let
|
|
41
|
-
const t = e.match(
|
|
39
|
+
function i(e, l, o) {
|
|
40
|
+
const n = o.length;
|
|
41
|
+
for (let c = 0; c < e.length; ) {
|
|
42
|
+
const t = e.match(p);
|
|
42
43
|
if (t?.index === void 0)
|
|
43
44
|
break;
|
|
44
45
|
const r = e.slice(0, t.index);
|
|
45
|
-
r.length > 0 &&
|
|
46
|
+
r.length > 0 && o.splice(n, 0, r);
|
|
46
47
|
const s = t[0];
|
|
47
48
|
e = e.slice(t.index + s.length);
|
|
48
|
-
const a = d[s], b =
|
|
49
|
+
const a = d[s], b = l(s, {
|
|
49
50
|
name: s,
|
|
50
51
|
module: void 0,
|
|
51
|
-
package: s === "this" ? void 0 :
|
|
52
|
+
package: s === "this" ? void 0 : h,
|
|
52
53
|
viewUrl: a,
|
|
53
54
|
start: void 0,
|
|
54
55
|
end: void 0
|
|
55
56
|
});
|
|
56
|
-
|
|
57
|
+
o.splice(n, 0, b);
|
|
57
58
|
}
|
|
58
|
-
e.length > 0 &&
|
|
59
|
+
e.length > 0 && o.splice(n, 0, e);
|
|
59
60
|
}
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
v as hydrateApiType
|
|
62
63
|
};
|
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-TYrYZaq6.js";
|
|
2
|
+
import { A as S, w as T } from "../ApiExtractor-D_yuu0Wh.js";
|
|
3
|
+
import { p as A, l as C } from "../typeScript-BWap2lJs.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;
|