@arcgis/api-extractor 5.2.0-next.13 → 5.2.0-next.130
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/apiJson.d.ts +13 -57
- package/dist/chunks/ApiExtractor.js +6498 -0
- package/dist/{cli-7PX_wNxb.js → chunks/cli.js} +3 -3
- package/dist/chunks/config.js +193 -0
- package/dist/chunks/links.js +412 -0
- package/dist/{privateContext-CB7P40up.js → chunks/privateContext.js} +12 -10
- package/dist/cli.js +1 -1
- package/dist/diff/apiDiffToMarkdown.js +1 -1
- package/dist/diff/diffApiJson.js +108 -113
- package/dist/diffTypes/index.js +1 -1
- package/dist/extractor/ApiExtractor.d.ts +3 -0
- package/dist/extractor/ApiExtractor.js +4 -5
- package/dist/extractor/config.d.ts +23 -6
- package/dist/extractor/config.js +9 -14
- package/dist/extractor/processing/links.js +12 -171
- package/dist/extractor/webComponent/pathMapping.js +1 -1
- package/dist/utils/apiHelpers.js +1 -1
- package/dist/utils/hydrateApiType.d.ts +1 -1
- package/dist/utils/partPrinter.js +18 -18
- package/dist/vite/plugin.d.ts +3 -1
- package/dist/vite/plugin.js +10 -11
- package/package.json +10 -9
- package/dist/ApiExtractor-DvPsb5qn.js +0 -2718
- package/dist/typeScript-DX5Qih0X.js +0 -66
- package/dist/vite/typeScript.d.ts +0 -16
- package/dist/vite/typeScript.js +0 -6
- package/dist/worker-BKxM34wj.js +0 -3736
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as l } from "../chunks/privateContext.js";
|
|
2
2
|
function m(t, r, i, e, n, o) {
|
|
3
|
-
return `${`${r ? "export default " : "export "}${t ? "abstract " : ""}`}class ${i}${
|
|
3
|
+
return `${`${r ? "export default " : "export "}${t ? "abstract " : ""}`}class ${i}${c(e)}${n === void 0 ? "" : ` extends ${n}`} {${o}}`;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function c(t) {
|
|
6
6
|
if (t === void 0)
|
|
7
7
|
return "";
|
|
8
8
|
let r = "<";
|
|
@@ -17,24 +17,24 @@ function v(t, r, i, e, n) {
|
|
|
17
17
|
let $ = "";
|
|
18
18
|
if (e !== void 0) {
|
|
19
19
|
$ = " extends ";
|
|
20
|
-
for (let
|
|
21
|
-
$ += l(e[
|
|
20
|
+
for (let f = 0; f < e.length; ++f)
|
|
21
|
+
$ += l(e[f]), f < e.length - 1 && ($ += ", ");
|
|
22
22
|
}
|
|
23
|
-
return `${o}interface ${r}${
|
|
23
|
+
return `${o}interface ${r}${c(i)}${$} {${n}}`;
|
|
24
24
|
}
|
|
25
|
-
function g(t, r, i, e, n, o, $,
|
|
26
|
-
const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, x =
|
|
27
|
-
return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${
|
|
25
|
+
function g(t, r, i, e, n, o, $, f) {
|
|
26
|
+
const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, x = f === void 0 ? "" : `: ${f}`;
|
|
27
|
+
return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${c(o)}(${a($)})${x};`;
|
|
28
28
|
}
|
|
29
29
|
function d(t) {
|
|
30
30
|
return u.test(t) || t.startsWith("[") ? t : `"${t.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
31
31
|
}
|
|
32
32
|
const h = (t) => !u.test(t) && !t.startsWith("["), u = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
|
|
33
33
|
function b(t, r, i, e, n) {
|
|
34
|
-
return `${t ? "export default " : "export "}function ${r}${
|
|
34
|
+
return `${t ? "export default " : "export "}function ${r}${c(i)}(${a(e)}): ${n};`;
|
|
35
35
|
}
|
|
36
36
|
function A(t) {
|
|
37
|
-
return `${
|
|
37
|
+
return `${c(t.typeParameters)}(${a(t.parameters)}): ${t.return.type.text}`;
|
|
38
38
|
}
|
|
39
39
|
function a(t) {
|
|
40
40
|
if (t === void 0)
|
|
@@ -46,13 +46,13 @@ function a(t) {
|
|
|
46
46
|
}
|
|
47
47
|
return r;
|
|
48
48
|
}
|
|
49
|
-
function P(t, r, i, e, n, o, $,
|
|
50
|
-
return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${d($)}${o ? "?" : ""}: ${
|
|
49
|
+
function P(t, r, i, e, n, o, $, f) {
|
|
50
|
+
return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${d($)}${o ? "?" : ""}: ${f};`;
|
|
51
51
|
}
|
|
52
52
|
function N(t, r, i, e, n, o) {
|
|
53
|
-
const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`,
|
|
54
|
-
${$}set ${
|
|
55
|
-
return `${$}get ${
|
|
53
|
+
const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, f = d(e), s = o === void 0 ? "" : `
|
|
54
|
+
${$}set ${f}(value: ${o});`;
|
|
55
|
+
return `${$}get ${f}(): ${n};${s}`;
|
|
56
56
|
}
|
|
57
57
|
function z(t, r, i) {
|
|
58
58
|
const n = `${t ? "declare " : "export "}const ${r}: ${i};`;
|
|
@@ -60,7 +60,7 @@ function z(t, r, i) {
|
|
|
60
60
|
export default ${r};` : n;
|
|
61
61
|
}
|
|
62
62
|
function R(t, r, i, e) {
|
|
63
|
-
let n = `export type ${t}${
|
|
63
|
+
let n = `export type ${t}${c(r)} = `;
|
|
64
64
|
if (i !== void 0)
|
|
65
65
|
for (let o = 0; o < i.length; ++o)
|
|
66
66
|
n += l(i[o]), (o < i.length - 1 || e !== void 0) && (n += `
|
|
@@ -78,6 +78,6 @@ export {
|
|
|
78
78
|
P as printProperty,
|
|
79
79
|
A as printSignature,
|
|
80
80
|
R as printTypeAlias,
|
|
81
|
-
|
|
81
|
+
c as printTypeParameters,
|
|
82
82
|
z as printVariable
|
|
83
83
|
};
|
package/dist/vite/plugin.d.ts
CHANGED
|
@@ -17,8 +17,10 @@ export interface ApiExtractorPluginConfig {
|
|
|
17
17
|
* rules, Astro docs generator, and other tools. For consistent results, use
|
|
18
18
|
* the same settings everywhere.
|
|
19
19
|
*
|
|
20
|
-
* It is safe to use this for setting .
|
|
20
|
+
* It is safe to use this for setting .afterExtractorCreated() hook as long as you don't
|
|
21
21
|
* mutate the api.json in it.
|
|
22
|
+
*
|
|
23
|
+
* Overrides are higher precedence than the `api-extractor.config.ts` file.
|
|
22
24
|
*/
|
|
23
25
|
unsafeConfigOverride?: ApiExtractorConfig;
|
|
24
26
|
serve?: ApiExtractorPluginServeConfig;
|
package/dist/vite/plugin.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
import { p as A, l as C } from "../typeScript-DX5Qih0X.js";
|
|
1
|
+
import { p as O, l as S, m as J } from "../chunks/config.js";
|
|
2
|
+
import { A as T, l as A, w as C } from "../chunks/ApiExtractor.js";
|
|
4
3
|
import { writeFile as M } from "node:fs/promises";
|
|
5
|
-
import { path as w } from "@arcgis/
|
|
6
|
-
const N =
|
|
7
|
-
function
|
|
4
|
+
import { path as w } from "@arcgis/node-toolkit/path";
|
|
5
|
+
const N = O.name;
|
|
6
|
+
function V(s = {}) {
|
|
8
7
|
let t = !1, v = !1, e, o, c, l, E = !0, h = !1, f, m, u, y, p;
|
|
9
8
|
async function x(d, n) {
|
|
10
9
|
if (n.dtsFiles !== void 0 && u !== "") {
|
|
11
10
|
const g = w.join(w.resolve(p, u), "/");
|
|
12
|
-
await
|
|
11
|
+
await C(g, !1, d.changedDtsFiles ?? n.dtsFiles);
|
|
13
12
|
}
|
|
14
13
|
y !== "" && await M(
|
|
15
14
|
y,
|
|
@@ -57,7 +56,7 @@ function $(s = {}) {
|
|
|
57
56
|
}, 250)), a));
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
|
-
}, P = s.configFilePath === "" ? void 0 : await
|
|
59
|
+
}, P = s.configFilePath === "" ? void 0 : await S(p, s.configFilePath), F = s.unsafeConfigOverride ?? {}, D = P === void 0 ? g : J(g, P), r = F === void 0 ? D : J(D, F);
|
|
61
60
|
u = t ? r.context?.dtsEmitPath ?? e.build.outDir : "", y = t ? r.context?.apiJsonEmitPath ?? "" : "";
|
|
62
61
|
const W = r.context?.logger ?? e.logger ?? console, k = {
|
|
63
62
|
...r,
|
|
@@ -67,7 +66,7 @@ function $(s = {}) {
|
|
|
67
66
|
apiJsonEmitPath: "",
|
|
68
67
|
logger: {
|
|
69
68
|
info(i) {
|
|
70
|
-
!t || i.startsWith(`${
|
|
69
|
+
!t || i.startsWith(`${A}Wrote `) || W.info(i);
|
|
71
70
|
},
|
|
72
71
|
error(i) {
|
|
73
72
|
W.error(i);
|
|
@@ -79,7 +78,7 @@ function $(s = {}) {
|
|
|
79
78
|
forceProduceDts: r.types?.forceProduceDts === !0 || u !== ""
|
|
80
79
|
}
|
|
81
80
|
};
|
|
82
|
-
o = new
|
|
81
|
+
o = new T(k), s.afterExtractorCreated?.(o);
|
|
83
82
|
},
|
|
84
83
|
/**
|
|
85
84
|
* TypeScript reads files directly from the file system - Vite's
|
|
@@ -105,5 +104,5 @@ function $(s = {}) {
|
|
|
105
104
|
};
|
|
106
105
|
}
|
|
107
106
|
export {
|
|
108
|
-
|
|
107
|
+
V as useApiExtractor
|
|
109
108
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/api-extractor",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.130",
|
|
4
4
|
"description": "Documentation engine for WebGIS SDK packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,28 +41,29 @@
|
|
|
41
41
|
"./utils/internalTypeScriptApis": "./dist/utils/internalTypeScriptApis.js",
|
|
42
42
|
"./utils/partPrinter": "./dist/utils/partPrinter.js",
|
|
43
43
|
"./vite/plugin": "./dist/vite/plugin.js",
|
|
44
|
-
"./vite/typeScript": "./dist/vite/typeScript.js",
|
|
45
44
|
"./package.json": "./package.json"
|
|
46
45
|
},
|
|
47
46
|
"files": [
|
|
48
47
|
"dist/"
|
|
49
48
|
],
|
|
50
|
-
"bin": "./bin/cli.js",
|
|
51
49
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
52
50
|
"dependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
51
|
+
"@arcgis/node-toolkit": "5.2.0-next.130",
|
|
52
|
+
"@arcgis/toolkit": "5.2.0-next.130",
|
|
53
|
+
"@commander-js/extra-typings": "^15.0.0",
|
|
54
|
+
"commander": "^15.0.0",
|
|
55
|
+
"tslib": "^2.8.1"
|
|
58
56
|
},
|
|
59
57
|
"peerDependencies": {
|
|
60
|
-
"typescript": "~6.0.
|
|
58
|
+
"typescript": "~6.0.3",
|
|
61
59
|
"vite": "^7.3.2"
|
|
62
60
|
},
|
|
63
61
|
"peerDependenciesMeta": {
|
|
64
62
|
"vite": {
|
|
65
63
|
"optional": true
|
|
66
64
|
}
|
|
65
|
+
},
|
|
66
|
+
"bin": {
|
|
67
|
+
"api-extractor": "./bin/cli.js"
|
|
67
68
|
}
|
|
68
69
|
}
|