@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.
@@ -1,28 +1,30 @@
1
- import { l as T, m as J } from "../worker-4_JApnSG.js";
2
- import { A as b, w as S } from "../ApiExtractor-DekSVoeC.js";
3
- import { p as k, l as A } from "../typeScript-Bf6MlJE-.js";
4
- import { writeFile as C } from "node:fs/promises";
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 M = k.name;
7
- function V(s = {}) {
8
- let t = !1, h = !1, e, i, c, l, E = !0, v = !1, f, m, u, y, p;
9
- async function x(d, r) {
10
- if (r.dtsFiles !== void 0 && u !== "") {
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 S(g, !1, d.changedDtsFiles ?? r.dtsFiles);
12
+ await T(g, !1, d.changedDtsFiles ?? n.dtsFiles);
13
13
  }
14
- y !== "" && await C(
14
+ y !== "" && await M(
15
15
  y,
16
- d.config.context.environment === "production" ? JSON.stringify(r.apiJson) : JSON.stringify(r.apiJson, null, 2)
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: M,
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
- h = (t ? e.build.watch : e.server.watch) !== null, p = e.configFile === void 0 ? e.root : w.dirname(e.configFile);
25
- const r = {
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(o) {
38
- if (o.length > 0 && !h) {
39
- const W = new Error("TypeScript errors reported. See error messages above");
40
- throw W.stack = "", W;
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(o) {
53
- f = o.then((n) => (c = n ?? c, f = void 0, clearTimeout(m), t && !v && n !== void 0 && (n.changedModules.length > 0 || n.removedModules.length > 0) && (m = setTimeout(() => {
54
- x(i, n);
55
- }, 250)), n));
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
- }, g = s.configFilePath === "" ? void 0 : await T(p, s.configFilePath), P = s.unsafeConfigOverride ?? {}, F = g === void 0 ? r : J(r, g), a = P === void 0 ? F : J(F, P);
59
- u = t ? a.context?.dtsEmitPath ?? e.build.outDir : "", y = t ? a.context?.apiJsonEmitPath ?? "" : "";
60
- const D = a.context?.logger ?? e.logger ?? console, B = {
61
- ...a,
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
- ...a.context,
65
+ ...r.context,
64
66
  dtsEmitPath: "",
65
67
  apiJsonEmitPath: "",
66
68
  logger: {
67
- info(o) {
68
- !t || o.startsWith(`${A}Wrote `) || D.info(o);
69
+ info(i) {
70
+ !t || i.startsWith(`${C}Wrote `) || W.info(i);
69
71
  },
70
- error(o) {
71
- D.error(o);
72
+ error(i) {
73
+ W.error(i);
72
74
  }
73
75
  }
74
76
  },
75
77
  types: {
76
- ...a.types,
77
- forceProduceDts: a.types?.forceProduceDts === !0 || u !== ""
78
+ ...r.types,
79
+ forceProduceDts: r.types?.forceProduceDts === !0 || u !== ""
78
80
  }
79
81
  };
80
- i = new b(B), s.afterExtractorCreated?.(i);
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
- v = !0, clearTimeout(m), !(i === void 0 || !E) && (E = !1, h ? l = await i.watch() : c = await i.run());
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, i !== void 0 && c !== void 0 && await x(i, c), v = !1;
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
- V as useApiExtractor
108
+ $ as useApiExtractor
107
109
  };
@@ -1,6 +1,6 @@
1
1
  import "@arcgis/components-build-utils";
2
2
  import "typescript";
3
- import { b as t } from "../typeScript-Bf6MlJE-.js";
3
+ import { b as t } from "../typeScript-Y5GxUXJJ.js";
4
4
  export {
5
5
  t as loadTypeScriptConfig
6
6
  };