@arcgis/api-extractor 5.1.0-next.7 → 5.1.0-next.70
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-DekSVoeC.js → ApiExtractor-DUMJzS3u.js} +44 -41
- package/dist/{apiHelpers-BYzO767m.js → apiHelpers-dNwlX631.js} +4 -4
- package/dist/apiJson.d.ts +8 -1
- 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 +1 -1
- package/dist/extractor/config.js +3 -3
- package/dist/extractor/processing/links.js +1 -1
- package/dist/{typeScript-Bf6MlJE-.js → typeScript-Y5GxUXJJ.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-4_JApnSG.js → worker-DmF289Q0.js} +491 -482
- package/package.json +11 -6
package/dist/vite/plugin.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { l as
|
|
2
|
-
import { A as
|
|
3
|
-
import { p as
|
|
4
|
-
import { writeFile as
|
|
1
|
+
import { l as O, m as J } from "../worker-DmF289Q0.js";
|
|
2
|
+
import { A as S, w as T } from "../ApiExtractor-DUMJzS3u.js";
|
|
3
|
+
import { p as A, l as C } from "../typeScript-Y5GxUXJJ.js";
|
|
4
|
+
import { writeFile as M } from "node:fs/promises";
|
|
5
5
|
import { path as w } from "@arcgis/components-build-utils";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
let t = !1,
|
|
9
|
-
async function x(d,
|
|
10
|
-
if (
|
|
6
|
+
const N = A.name;
|
|
7
|
+
function $(s = {}) {
|
|
8
|
+
let t = !1, v = !1, e, o, c, l, E = !0, h = !1, f, m, u, y, p;
|
|
9
|
+
async function x(d, n) {
|
|
10
|
+
if (n.dtsFiles !== void 0 && u !== "") {
|
|
11
11
|
const g = w.join(w.resolve(p, u), "/");
|
|
12
|
-
await
|
|
12
|
+
await T(g, !1, d.changedDtsFiles ?? n.dtsFiles);
|
|
13
13
|
}
|
|
14
|
-
y !== "" && await
|
|
14
|
+
y !== "" && await M(
|
|
15
15
|
y,
|
|
16
|
-
d.config.context.environment === "production" ? JSON.stringify(
|
|
16
|
+
d.config.context.environment === "production" ? JSON.stringify(n.apiJson) : JSON.stringify(n.apiJson, null, 2)
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
|
-
name:
|
|
20
|
+
name: N,
|
|
21
21
|
async configResolved(d) {
|
|
22
22
|
if (e = d, t = e.command === "build", !t && s.serve?.extract !== !0)
|
|
23
23
|
return;
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
v = (t ? e.build.watch : e.server.watch) !== null;
|
|
25
|
+
const n = e.resolve.conditions.includes("storybook");
|
|
26
|
+
p = e.configFile === void 0 ? e.root : w.dirname(e.configFile);
|
|
27
|
+
const g = {
|
|
26
28
|
context: {
|
|
27
29
|
// Handled by Vite
|
|
28
30
|
emptyDtsEmitPath: !1,
|
|
@@ -33,11 +35,11 @@ function V(s = {}) {
|
|
|
33
35
|
// It is desirable to type-check as part of build. Thus, we can do
|
|
34
36
|
// typed extraction essentially for free.
|
|
35
37
|
typeCheckedExtraction: !0,
|
|
36
|
-
fullTypeCheck: t,
|
|
37
|
-
afterDiagnostic(
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
throw
|
|
38
|
+
fullTypeCheck: t && !n,
|
|
39
|
+
afterDiagnostic(i) {
|
|
40
|
+
if (i.length > 0 && !v) {
|
|
41
|
+
const b = new Error("TypeScript errors reported. See error messages above");
|
|
42
|
+
throw b.stack = "", b;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
},
|
|
@@ -49,35 +51,35 @@ function V(s = {}) {
|
|
|
49
51
|
// if desired.
|
|
50
52
|
clearScreen: !1,
|
|
51
53
|
skipWritingUnchanged: d.build.emptyOutDir === !1,
|
|
52
|
-
onUpdate(
|
|
53
|
-
f =
|
|
54
|
-
x(
|
|
55
|
-
}, 250)),
|
|
54
|
+
onUpdate(i) {
|
|
55
|
+
f = i.then((a) => (c = a ?? c, f = void 0, clearTimeout(m), t && !h && a !== void 0 && (a.changedModules.length > 0 || a.removedModules.length > 0) && (m = setTimeout(() => {
|
|
56
|
+
x(o, a);
|
|
57
|
+
}, 250)), a));
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
|
-
},
|
|
59
|
-
u = t ?
|
|
60
|
-
const
|
|
61
|
-
...
|
|
60
|
+
}, P = s.configFilePath === "" ? void 0 : await O(p, s.configFilePath), F = s.unsafeConfigOverride ?? {}, D = P === void 0 ? g : J(g, P), r = F === void 0 ? D : J(D, F);
|
|
61
|
+
u = t ? r.context?.dtsEmitPath ?? e.build.outDir : "", y = t ? r.context?.apiJsonEmitPath ?? "" : "";
|
|
62
|
+
const W = r.context?.logger ?? e.logger ?? console, k = {
|
|
63
|
+
...r,
|
|
62
64
|
context: {
|
|
63
|
-
...
|
|
65
|
+
...r.context,
|
|
64
66
|
dtsEmitPath: "",
|
|
65
67
|
apiJsonEmitPath: "",
|
|
66
68
|
logger: {
|
|
67
|
-
info(
|
|
68
|
-
!t ||
|
|
69
|
+
info(i) {
|
|
70
|
+
!t || i.startsWith(`${C}Wrote `) || W.info(i);
|
|
69
71
|
},
|
|
70
|
-
error(
|
|
71
|
-
|
|
72
|
+
error(i) {
|
|
73
|
+
W.error(i);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
},
|
|
75
77
|
types: {
|
|
76
|
-
...
|
|
77
|
-
forceProduceDts:
|
|
78
|
+
...r.types,
|
|
79
|
+
forceProduceDts: r.types?.forceProduceDts === !0 || u !== ""
|
|
78
80
|
}
|
|
79
81
|
};
|
|
80
|
-
|
|
82
|
+
o = new S(k), s.afterExtractorCreated?.(o);
|
|
81
83
|
},
|
|
82
84
|
/**
|
|
83
85
|
* TypeScript reads files directly from the file system - Vite's
|
|
@@ -87,10 +89,10 @@ function V(s = {}) {
|
|
|
87
89
|
* match what "npx tsc" would report.
|
|
88
90
|
*/
|
|
89
91
|
async buildStart() {
|
|
90
|
-
|
|
92
|
+
h = !0, clearTimeout(m), !(o === void 0 || !E) && (E = !1, v ? l = await o.watch() : c = await o.run());
|
|
91
93
|
},
|
|
92
94
|
async writeBundle() {
|
|
93
|
-
clearTimeout(m), f !== void 0 && await f,
|
|
95
|
+
clearTimeout(m), f !== void 0 && await f, o !== void 0 && c !== void 0 && await x(o, c), h = !1;
|
|
94
96
|
},
|
|
95
97
|
// Fires if dev server is closed programmatically. Ctrl+C is handled by Node
|
|
96
98
|
async closeBundle() {
|
|
@@ -103,5 +105,5 @@ function V(s = {}) {
|
|
|
103
105
|
};
|
|
104
106
|
}
|
|
105
107
|
export {
|
|
106
|
-
|
|
108
|
+
$ as useApiExtractor
|
|
107
109
|
};
|