@arcgis/api-extractor 5.1.0-next.13 → 5.1.0-next.131

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.
@@ -0,0 +1,66 @@
1
+ import { findPath as E, path as u, toSystemPathSeparators as S } from "@arcgis/components-build-utils";
2
+ import t from "typescript";
3
+ import { styleText as f } from "util";
4
+ const w = "@arcgis/api-extractor", P = "5.1.0-next.131", D = {
5
+ name: w,
6
+ version: P
7
+ };
8
+ let x;
9
+ function N(o) {
10
+ return x ??= t.createPrinter(), x.printNode(t.EmitHint.Unspecified, o, void 0);
11
+ }
12
+ function A(o, e) {
13
+ return o.pos !== -1 && o.end !== -1 && e !== void 0 ? o.getText(e) : N(o);
14
+ }
15
+ let h;
16
+ const g = D.name, m = {
17
+ getCurrentDirectory: process.cwd,
18
+ getCanonicalFileName: (o) => o,
19
+ getNewLine: () => t.sys.newLine
20
+ }, L = function(o, { file: e, 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(e, !1);
22
+ const a = n?.end ?? -1;
23
+ c ??= a === -1 ? -1 : Math.max(1, a - s);
24
+ const r = s >= 0 && c >= 0, d = !r && i !== void 0, l = {
25
+ category: t.DiagnosticCategory.Error,
26
+ code: r ? g : v,
27
+ file: d ? void 0 : e,
28
+ start: r ? s : 0,
29
+ length: r ? c : 0,
30
+ messageText: (d ? `${f("cyan", i, { stream: process.stderr })}: ` : "") + o + (r || n === void 0 ? "" : `
31
+
32
+ ${A(n, e)}`)
33
+ }, p = t.formatDiagnosticsWithColorAndContext([l], m);
34
+ h ??= process.env.CI !== void 0 || f("red", "", { stream: process.stderr }) !== "";
35
+ const C = h ? p : p.replaceAll(F, ""), y = r ? C : C.replace(v.toString(), g);
36
+ this.config.context.logger.error(y);
37
+ }, v = 1490, F = /\x1B\[[0-9;]*m/gu, W = f("cyan", `[${g}] `);
38
+ function k(o = process.cwd(), e, n) {
39
+ const i = e === void 0 ? E("tsconfig.json", o) : u.resolve(o, e);
40
+ if (i === void 0)
41
+ throw Error(
42
+ `Unable to find ${S(String(e))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`
43
+ );
44
+ const s = t.readConfigFile(i, t.sys.readFile);
45
+ if (s.error !== void 0)
46
+ throw Error(t.formatDiagnosticsWithColorAndContext([s.error], m));
47
+ const c = s.config, a = n ? c : {
48
+ ...c,
49
+ include: [],
50
+ files: [],
51
+ exclude: []
52
+ }, r = t.parseJsonConfigFileContent(a, t.sys, u.dirname(i)), d = 18002, l = n ? r.errors : r.errors.filter((p) => p.code !== d);
53
+ if (l.length > 0)
54
+ throw Error(t.formatDiagnosticsWithColorAndContext(l, m));
55
+ return {
56
+ configPath: i,
57
+ config: r
58
+ };
59
+ }
60
+ export {
61
+ m as a,
62
+ k as b,
63
+ L as e,
64
+ W as l,
65
+ D as p
66
+ };
@@ -1,17 +1,80 @@
1
- import { d as s, k as r, j as o, y as i, u as p, h as t, v as m, i as d, e as A, w as c, q as g, x as M, m as b, n as l } from "../apiHelpers-BYzO767m.js";
1
+ import { g as f } from "../privateContext-CB7P40up.js";
2
+ const g = (e) => e.kind === "method", v = (e) => e.kind === "field";
3
+ function h(e, n) {
4
+ const o = e.sourcePath, i = n.sourcePath;
5
+ let t = 0;
6
+ for (; ; ) {
7
+ const c = o.indexOf("/", t), s = i.indexOf("/", t);
8
+ if (c === -1)
9
+ return s === -1 ? o.slice(t) < i.slice(t) ? -1 : 1 : -1;
10
+ if (s === -1)
11
+ return 1;
12
+ {
13
+ const r = o.slice(t, c), a = i.slice(t, s);
14
+ if (r !== a)
15
+ return r < a ? -1 : 1;
16
+ t = c + 1;
17
+ }
18
+ }
19
+ }
20
+ const p = "global:";
21
+ function x(e, n, o) {
22
+ const i = f(o.apiModule).file, t = i.text.indexOf(n) ?? -1;
23
+ o.emitError(`${e}${t === -1 ? `. Found in: ${n}` : ""}`, {
24
+ file: i,
25
+ node: void 0,
26
+ scope: i === void 0 ? o.apiModule.sourcePath : void 0,
27
+ start: t,
28
+ length: n.length
29
+ });
30
+ }
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
+ 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);
34
+ const { docsTags: i } = e, t = n;
35
+ if (o !== -1 && (i === void 0 && t.docsTags.length === 1 ? t.docsTags = void 0 : t.docsTags.splice(o, 1)), i !== void 0) {
36
+ t.docsTags ??= [];
37
+ const c = /* @__PURE__ */ new Set();
38
+ for (let s = 0; s < t.docsTags.length; ++s)
39
+ c.add(t.docsTags[s].name);
40
+ for (let s = 0; s < i.length; ++s) {
41
+ const r = i[s];
42
+ c.has(r.name) && r.name !== "example" && r.name !== "see" || t.docsTags.push(r);
43
+ }
44
+ }
45
+ }
46
+ function A(e, n) {
47
+ let o = e.text;
48
+ if (e.references !== void 0)
49
+ for (let i = e.references.length - 1; i >= 0; i--) {
50
+ const t = e.references[i];
51
+ if (t.package === p || t.module === void 0 && t.package === void 0 && t.viewUrl === void 0)
52
+ continue;
53
+ const r = t.name === "default" ? "default" : t.name, u = `import("${t.package === void 0 ? `./${t.module ?? n}.js` : t.package + (t.module === void 0 ? "" : `/${t.module}`)}").${r}`;
54
+ o = o.slice(0, t.start) + u + o.slice(t.end);
55
+ }
56
+ return {
57
+ ...e,
58
+ text: o,
59
+ references: void 0
60
+ };
61
+ }
62
+ function N(e) {
63
+ return e.return.type.text.startsWith("Promise<");
64
+ }
2
65
  export {
3
- s as apiTypeToImportType,
4
- r as compareClassMembers,
5
- o as compareNamedNodes,
6
- i as compareStrings,
7
- p as emitJsDocError,
8
- t as getApiMemberName,
9
- m as getApiNodeLabel,
10
- d as getMaybeStaticApiMemberName,
11
- A as globalPackageIdentifier,
12
- c as isApiMethod,
13
- g as isApiMethodAsync,
14
- M as isApiProperty,
15
- b as mergeApiNodes,
16
- l as naturalSortModules
66
+ A as apiTypeToImportType,
67
+ M as compareClassMembers,
68
+ S as compareNamedNodes,
69
+ l as compareStrings,
70
+ x as emitJsDocError,
71
+ d as getApiMemberName,
72
+ T as getApiNodeLabel,
73
+ P as getMaybeStaticApiMemberName,
74
+ p as globalPackageIdentifier,
75
+ g as isApiMethod,
76
+ N as isApiMethodAsync,
77
+ v as isApiProperty,
78
+ k as mergeApiNodes,
79
+ h as naturalSortModules
17
80
  };
@@ -7,7 +7,7 @@ export interface IndexedModule {
7
7
  readonly apiModule: ApiModule;
8
8
  readonly classLike?: ApiClassDeclaration | ApiCustomElementDeclaration | ApiMixinDeclaration;
9
9
  /**
10
- * Mixins and superclasses ancestors. Sorted from most immediate to furthest
10
+ * Superclasses ancestors. Sorted from most immediate to furthest
11
11
  * ancestor.
12
12
  *
13
13
  * The type reference may refer to a local module or an external package.
@@ -1,82 +1,83 @@
1
- function y(s) {
2
- const t = g(s.modules);
3
- return k(t), t;
1
+ function y(t) {
2
+ const o = g(t.modules);
3
+ return k(o), o;
4
4
  }
5
- function g(s) {
6
- const t = /* @__PURE__ */ new Map();
7
- for (let o = 0; o < s.length; ++o) {
8
- const n = s[o];
5
+ function g(t) {
6
+ const o = /* @__PURE__ */ new Map();
7
+ for (let s = 0; s < t.length; ++s) {
8
+ const n = t[s];
9
9
  let i;
10
10
  for (let a = 0; a < n.declarations.length; ++a) {
11
- const r = n.declarations[a];
12
- if (r.kind === "class" || r.kind === "mixin") {
13
- i = r;
11
+ const e = n.declarations[a];
12
+ if (e.kind === "class" || e.kind === "mixin") {
13
+ i = e;
14
14
  break;
15
15
  }
16
16
  }
17
- t.set(n.path, {
17
+ o.set(n.path, {
18
18
  apiModule: n,
19
19
  classLike: i,
20
20
  ancestors: void 0,
21
21
  children: void 0
22
22
  });
23
23
  }
24
- return t;
24
+ return o;
25
25
  }
26
- function k(s) {
27
- for (const t of s.values())
28
- p(t, s);
26
+ function k(t) {
27
+ for (const o of t.values())
28
+ p(o, t);
29
29
  }
30
- function p(s, t) {
31
- const o = s.classLike;
32
- if (o === void 0)
30
+ function p(t, o) {
31
+ const s = t.classLike;
32
+ if (s === void 0)
33
33
  return;
34
- const n = o;
35
- if (!(s.ancestors !== void 0 || o.mixins === void 0 && n.superclass === void 0)) {
36
- if (s.ancestors ??= [], o.mixins !== void 0)
37
- for (let a = o.mixins.length - 1; a >= 0; --a)
38
- v(o.mixins[a], s, t);
39
- n.superclass !== void 0 && h(n.superclass, s, t);
34
+ const n = s;
35
+ if (!(t.ancestors !== void 0 || s.mixins === void 0 && n.superclass === void 0)) {
36
+ if (t.ancestors ??= [], s.mixins !== void 0)
37
+ for (let a = s.mixins.length - 1; a >= 0; --a)
38
+ f(s.mixins[a], t, o);
39
+ n.superclass !== void 0 && v(n.superclass, t, o);
40
40
  }
41
41
  }
42
- function v(s, t, o) {
43
- if (s.module !== void 0 && s.package === void 0) {
44
- const n = o.get(s.module);
45
- p(n, o), n.children ??= [], n.children.push(t);
42
+ function f(t, o, s) {
43
+ if (t.module !== void 0 && t.package === void 0) {
44
+ const n = s.get(t.module);
45
+ if (n === void 0)
46
+ return;
47
+ p(n, s), n.children ??= [], n.children.push(o);
46
48
  }
47
- t.ancestors.push(s);
48
49
  }
49
- function h(s, t, o) {
50
- if (!(s.module !== void 0 && s.package === void 0)) {
51
- t.ancestors.push(s);
50
+ function v(t, o, s) {
51
+ if (!(t.module !== void 0 && t.package === void 0)) {
52
+ o.ancestors.push(t);
52
53
  return;
53
54
  }
54
- const i = o.get(s.module);
55
- p(i, o), i.children ??= [], i.children.push(t);
55
+ const i = s.get(t.module);
56
+ p(i, s), i.children ??= [], i.children.push(o);
56
57
  const a = i.classLike;
57
- if (a.kind === "mixin" && a.name !== s.name && s.name !== "default") {
58
+ if (a.kind === "mixin" && a.name !== t.name && t.name !== "default") {
58
59
  const u = i.apiModule.declarations;
59
- for (let e = 0; e < u.length; ++e) {
60
- const f = u[e];
61
- if (f.name === s.name) {
62
- const l = f;
60
+ for (let r = 0; r < u.length; ++r) {
61
+ const d = u[r];
62
+ if (d.name === t.name) {
63
+ const l = d;
63
64
  for (let m = l.supertypes.length - 1; m >= 1; --m) {
64
- const c = l.supertypes[m], d = c.module === void 0 && c.package === void 0 ? {
65
+ const c = l.supertypes[m], h = c.module === void 0 && c.package === void 0 ? {
65
66
  name: c.name,
66
- module: s.module,
67
+ module: t.module,
67
68
  package: void 0,
68
69
  viewUrl: c.viewUrl,
69
70
  typeArguments: c.typeArguments
70
71
  } : c;
71
- v(d, t, o);
72
+ f(h, o, s);
72
73
  }
73
- h(l.supertypes[0], t, o);
74
+ v(l.supertypes[0], o, s);
74
75
  break;
75
76
  }
76
77
  }
77
78
  } else
78
- t.ancestors.push(s);
79
- i.ancestors !== void 0 && t.ancestors.push(...i.ancestors);
79
+ o.ancestors.push(t);
80
+ i.ancestors !== void 0 && o.ancestors.push(...i.ancestors);
80
81
  }
81
82
  export {
82
83
  y as createIndex
@@ -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
- }, h = Object.keys(d).join("|"), g = new RegExp(`(?<!["'-])\\b(?:${h})\\b(?!["'-])`, "u");
17
- function p(e, c) {
18
- const n = [];
19
- let o = e.text.length;
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 l = e.references.length - 1; l >= 0; l--) {
22
- const t = e.references[l];
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, o);
26
- r.length > 0 && i(r, c, n);
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
- o = t.start, t.viewUrl === void 0 ? n.push(s) : n.push(
29
- c(s, t)
29
+ n = t.start, t.viewUrl === void 0 ? o.push(s) : o.push(
30
+ l(s, t)
30
31
  );
31
32
  }
32
- if (o > 0) {
33
- const l = e.text.slice(0, o);
34
- i(l, c, n);
33
+ if (n > 0) {
34
+ const c = e.text.slice(0, n);
35
+ i(c, l, o);
35
36
  }
36
- return n.reverse();
37
+ return o.reverse();
37
38
  }
38
- function i(e, c, n) {
39
- const o = n.length;
40
- for (let l = 0; l < e.length; ) {
41
- const t = e.match(g);
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 && n.splice(o, 0, r);
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 = c(s, {
49
+ const a = d[s], b = l(s, {
49
50
  name: s,
50
51
  module: void 0,
51
- package: s === "this" ? void 0 : "global:",
52
+ package: s === "this" ? void 0 : h,
52
53
  viewUrl: a,
53
54
  start: void 0,
54
55
  end: void 0
55
56
  });
56
- n.splice(o, 0, b);
57
+ o.splice(n, 0, b);
57
58
  }
58
- e.length > 0 && n.splice(o, 0, e);
59
+ e.length > 0 && o.splice(n, 0, e);
59
60
  }
60
61
  export {
61
- p as hydrateApiType
62
+ v as hydrateApiType
62
63
  };
@@ -22,5 +22,6 @@ function i(n) {
22
22
  return !1;
23
23
  }
24
24
  export {
25
+ i as hasRuntimeDeclaration,
25
26
  o as inferEntrypoints
26
27
  };
@@ -1,4 +1,5 @@
1
- function p(t, r, i, e, n, o) {
1
+ import { d as l } from "../privateContext-CB7P40up.js";
2
+ function m(t, r, i, e, n, o) {
2
3
  return `${`${r ? "export default " : "export "}${t ? "abstract " : ""}`}class ${i}${f(e)}${n === void 0 ? "" : ` extends ${n}`} {${o}}`;
3
4
  }
4
5
  function f(t) {
@@ -11,31 +12,31 @@ function f(t) {
11
12
  }
12
13
  return r += ">", r;
13
14
  }
14
- function x(t, r, i, e, n) {
15
+ function v(t, r, i, e, n) {
15
16
  const o = t ? "export default " : "export ";
16
17
  let $ = "";
17
18
  if (e !== void 0) {
18
19
  $ = " extends ";
19
20
  for (let c = 0; c < e.length; ++c)
20
- $ += e[c], c < e.length - 1 && ($ += ", ");
21
+ $ += l(e[c]), c < e.length - 1 && ($ += ", ");
21
22
  }
22
23
  return `${o}interface ${r}${f(i)}${$} {${n}}`;
23
24
  }
24
- function v(t, r, i, e, n, o, $, c) {
25
- const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, l = c === void 0 ? "" : `: ${c}`;
26
- return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${f(o)}(${u($)})${l};`;
25
+ function g(t, r, i, e, n, o, $, c) {
26
+ const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, x = c === void 0 ? "" : `: ${c}`;
27
+ return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${f(o)}(${a($)})${x};`;
27
28
  }
28
29
  function d(t) {
29
- return a.test(t) || t.startsWith("[") ? t : `"${t.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
30
+ return u.test(t) || t.startsWith("[") ? t : `"${t.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
30
31
  }
31
- const g = (t) => !a.test(t) && !t.startsWith("["), a = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
32
- function h(t, r, i, e, n) {
33
- return `${t ? "export default " : "export "}function ${r}${f(i)}(${u(e)}): ${n};`;
32
+ const h = (t) => !u.test(t) && !t.startsWith("["), u = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
33
+ function b(t, r, i, e, n) {
34
+ return `${t ? "export default " : "export "}function ${r}${f(i)}(${a(e)}): ${n};`;
34
35
  }
35
- function m(t) {
36
- return `${f(t.typeParameters)}(${u(t.parameters)}): ${t.return.type.text}`;
36
+ function A(t) {
37
+ return `${f(t.typeParameters)}(${a(t.parameters)}): ${t.return.type.text}`;
37
38
  }
38
- function u(t) {
39
+ function a(t) {
39
40
  if (t === void 0)
40
41
  return "";
41
42
  let r = "";
@@ -45,38 +46,38 @@ function u(t) {
45
46
  }
46
47
  return r;
47
48
  }
48
- function b(t, r, i, e, n, o, $, c) {
49
+ function P(t, r, i, e, n, o, $, c) {
49
50
  return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${d($)}${o ? "?" : ""}: ${c};`;
50
51
  }
51
- function A(t, r, i, e, n, o) {
52
+ function N(t, r, i, e, n, o) {
52
53
  const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, c = d(e), s = o === void 0 ? "" : `
53
54
  ${$}set ${c}(value: ${o});`;
54
55
  return `${$}get ${c}(): ${n};${s}`;
55
56
  }
56
- function P(t, r, i) {
57
+ function z(t, r, i) {
57
58
  const n = `${t ? "declare " : "export "}const ${r}: ${i};`;
58
59
  return t ? `${n}
59
60
  export default ${r};` : n;
60
61
  }
61
- function N(t, r, i, e) {
62
+ function R(t, r, i, e) {
62
63
  let n = `export type ${t}${f(r)} = `;
63
64
  if (i !== void 0)
64
65
  for (let o = 0; o < i.length; ++o)
65
- n += i[o], (o < i.length - 1 || e !== void 0) && (n += `
66
+ n += l(i[o]), (o < i.length - 1 || e !== void 0) && (n += `
66
67
  & `);
67
68
  return e !== void 0 && (n += e), n += ";", n;
68
69
  }
69
70
  export {
70
- g as isPropertyEscapeNeeded,
71
+ h as isPropertyEscapeNeeded,
71
72
  d as maybeEscapePropertyName,
72
- p as printClass,
73
- h as printFunction,
74
- A as printGetterSetter,
75
- x as printInterface,
76
- v as printMethod,
77
- b as printProperty,
78
- m as printSignature,
79
- N as printTypeAlias,
73
+ m as printClass,
74
+ b as printFunction,
75
+ N as printGetterSetter,
76
+ v as printInterface,
77
+ g as printMethod,
78
+ P as printProperty,
79
+ A as printSignature,
80
+ R as printTypeAlias,
80
81
  f as printTypeParameters,
81
- P as printVariable
82
+ z as printVariable
82
83
  };
@@ -1,28 +1,30 @@
1
- import { l as T, m as J } from "../worker-oskaUWnO.js";
2
- import { A as b, w as S } from "../ApiExtractor-CsZw1gc4.js";
3
- import { p as k, l as A } from "../typeScript-C2M4aviw.js";
4
- import { writeFile as C } from "node:fs/promises";
1
+ import { l as O, m as J } from "../worker-DgLbFKBs.js";
2
+ import { A as S, w as T } from "../ApiExtractor-BGS5EKsb.js";
3
+ import { p as A, l as C } from "../typeScript-A4VCaB_l.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-C2M4aviw.js";
3
+ import { b as t } from "../typeScript-A4VCaB_l.js";
4
4
  export {
5
5
  t as loadTypeScriptConfig
6
6
  };