@kubb/ast 5.23.4 → 5.24.0

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.
Files changed (128) hide show
  1. package/README.md +1 -1
  2. package/dist/{base-LhsPvVY1.d.ts → base-A-xF4pUL.d.ts} +1 -0
  3. package/dist/{base-UFBZi-FO.d.cts → base-CyJhBRMi.d.cts} +1 -0
  4. package/dist/{constants-DztHlVmY.cjs → constants-BCRkFAiy.cjs} +2 -1
  5. package/dist/constants-BCRkFAiy.cjs.map +1 -0
  6. package/dist/{constants-BTTus9ee.js → constants-UorsTFsa.js} +2 -1
  7. package/dist/constants-UorsTFsa.js.map +1 -0
  8. package/dist/factory.cjs +4 -3
  9. package/dist/factory.d.cts +4 -4
  10. package/dist/factory.d.ts +4 -4
  11. package/dist/factory.js +4 -4
  12. package/dist/{file-D_ih0x7q.js → file-1YtTOZeL.js} +4 -4
  13. package/dist/{file-D_ih0x7q.js.map → file-1YtTOZeL.js.map} +1 -1
  14. package/dist/{file-Bq2GPaxh.js → file-3gsgXreK.js} +3 -3
  15. package/dist/{file-Bq2GPaxh.js.map → file-3gsgXreK.js.map} +1 -1
  16. package/dist/{file-B269mZh4.d.cts → file-CMHRNuMX.d.cts} +1 -1
  17. package/dist/{file-oLlejzZV.d.ts → file-D67ITWja.d.ts} +1 -1
  18. package/dist/{file-C4pqV8yl.cjs → file-D73XubVb.cjs} +3 -3
  19. package/dist/{file-C4pqV8yl.cjs.map → file-D73XubVb.cjs.map} +1 -1
  20. package/dist/{file-DiPZBLSP.cjs → file-azmmZwDb.cjs} +4 -4
  21. package/dist/{file-DiPZBLSP.cjs.map → file-azmmZwDb.cjs.map} +1 -1
  22. package/dist/file.cjs +2 -2
  23. package/dist/file.d.cts +1 -1
  24. package/dist/file.d.ts +1 -1
  25. package/dist/file.js +2 -2
  26. package/dist/{graph-CFJ4wzFR.cjs → graph-DDh1FFrm.cjs} +3 -3
  27. package/dist/{graph-CFJ4wzFR.cjs.map → graph-DDh1FFrm.cjs.map} +1 -1
  28. package/dist/{graph-BUEOBomo.js → graph-DImDxlJE.js} +3 -3
  29. package/dist/{graph-BUEOBomo.js.map → graph-DImDxlJE.js.map} +1 -1
  30. package/dist/graph.cjs +1 -1
  31. package/dist/graph.d.cts +1 -1
  32. package/dist/graph.d.ts +1 -1
  33. package/dist/graph.js +1 -1
  34. package/dist/{guards-u-dAAtl8.d.cts → guards-B6LgmDhJ.d.cts} +1 -1
  35. package/dist/{guards-RCnH6re9.d.ts → guards-l2AsKeHR.d.ts} +1 -1
  36. package/dist/http.d.cts +2 -2
  37. package/dist/http.d.ts +2 -2
  38. package/dist/{index-C1za72gL.d.cts → index-2hzFweaD.d.cts} +1 -1
  39. package/dist/{index-DbQ-J072.d.cts → index-84453BaS.d.cts} +1 -1
  40. package/dist/{index-UwSVys3m.d.ts → index-B3o1AkNE.d.ts} +4 -4
  41. package/dist/{index-BgFaJtnv.d.ts → index-BFwAhPp8.d.ts} +1 -1
  42. package/dist/{index-c9FD2S5f.d.cts → index-Bcxj7FqZ.d.cts} +3 -3
  43. package/dist/index-BiXrjYNm.d.cts +5 -0
  44. package/dist/{index-D_WLsIMP.d.cts → index-BvdIGsVr.d.cts} +2 -2
  45. package/dist/{index-DzHcy3vy.d.ts → index-C7U9EiIP.d.ts} +2 -2
  46. package/dist/index-CC5Rmgcm.d.ts +5 -0
  47. package/dist/{index-6-ZZCX9W.d.ts → index-CGmrJThc.d.ts} +4 -4
  48. package/dist/{index-DF7CbpYW.d.ts → index-CIUD99Ft.d.ts} +3 -3
  49. package/dist/{index-DpnCCtXt.d.cts → index-D2tWPgnK.d.cts} +1 -1
  50. package/dist/{index-B2nnOQjf.d.cts → index-DNZgWmNq.d.cts} +4 -4
  51. package/dist/{index-DbAnYRRM.d.ts → index-DerFkxlp.d.ts} +1 -1
  52. package/dist/{index-sdprVPKQ.d.cts → index-DfTgdgaH.d.cts} +1 -1
  53. package/dist/{index-DfRcRYF2.d.ts → index-YTyLBHFN.d.ts} +1 -1
  54. package/dist/{index-Bw2oMIM1.d.cts → index-bkTCYnZj.d.cts} +4 -4
  55. package/dist/{index-2TMYDLjK.d.ts → index-f90iIhHX.d.ts} +1 -1
  56. package/dist/index.cjs +11 -11
  57. package/dist/index.d.cts +17 -16
  58. package/dist/index.d.ts +17 -16
  59. package/dist/index.js +11 -11
  60. package/dist/{json-DyDtIZTj.js → json-DeqPhPUQ.js} +2 -2
  61. package/dist/{json-DyDtIZTj.js.map → json-DeqPhPUQ.js.map} +1 -1
  62. package/dist/{json-CCWMgzJZ.cjs → json-KV2VhBue.cjs} +2 -2
  63. package/dist/{json-CCWMgzJZ.cjs.map → json-KV2VhBue.cjs.map} +1 -1
  64. package/dist/json.cjs +1 -1
  65. package/dist/json.d.cts +1 -1
  66. package/dist/json.d.ts +1 -1
  67. package/dist/json.js +1 -1
  68. package/dist/{macro-9WouvtZe.js → macro-3uGSg-ic.js} +2 -2
  69. package/dist/{macro-9WouvtZe.js.map → macro-3uGSg-ic.js.map} +1 -1
  70. package/dist/{macro-BEwfGNu1.cjs → macro-Ywn4-0s5.cjs} +2 -2
  71. package/dist/{macro-BEwfGNu1.cjs.map → macro-Ywn4-0s5.cjs.map} +1 -1
  72. package/dist/macro.cjs +1 -1
  73. package/dist/macro.d.cts +1 -1
  74. package/dist/macro.d.ts +1 -1
  75. package/dist/macro.js +1 -1
  76. package/dist/{node-vTrAIz3e.cjs → node-BeccjrHH.cjs} +4 -4
  77. package/dist/{node-vTrAIz3e.cjs.map → node-BeccjrHH.cjs.map} +1 -1
  78. package/dist/{node-DtuO3zr8.js → node-Dm56432_.js} +4 -4
  79. package/dist/{node-DtuO3zr8.js.map → node-Dm56432_.js.map} +1 -1
  80. package/dist/node.cjs +4 -4
  81. package/dist/node.d.cts +3 -3
  82. package/dist/node.d.ts +3 -3
  83. package/dist/node.js +4 -4
  84. package/dist/{nodeText-BSYvDZOH.js → nodeText-DFak5VpX.js} +2 -2
  85. package/dist/{nodeText-BSYvDZOH.js.map → nodeText-DFak5VpX.js.map} +1 -1
  86. package/dist/{nodeText-CZ7wgxu9.cjs → nodeText-DH4dLGUb.cjs} +2 -2
  87. package/dist/{nodeText-CZ7wgxu9.cjs.map → nodeText-DH4dLGUb.cjs.map} +1 -1
  88. package/dist/{nodes-DEQjVliP.cjs → nodes-BdZfapPI.cjs} +26 -4
  89. package/dist/nodes-BdZfapPI.cjs.map +1 -0
  90. package/dist/{nodes-ClL1C158.js → nodes-D9nwroV5.js} +21 -5
  91. package/dist/nodes-D9nwroV5.js.map +1 -0
  92. package/dist/{operation-Cu4XSaJQ.d.ts → operation-Dd0-l2VB.d.ts} +27 -2
  93. package/dist/{operation-AFw8tzIN.d.cts → operation-De4lbIZS.d.cts} +27 -2
  94. package/dist/{ref-Bh5Xo8T7.cjs → ref-Ck-0j8NV.cjs} +2 -2
  95. package/dist/{ref-Bh5Xo8T7.cjs.map → ref-Ck-0j8NV.cjs.map} +1 -1
  96. package/dist/{ref-DPqeS8K1.js → ref-Dlxn7eu7.js} +2 -2
  97. package/dist/{ref-DPqeS8K1.js.map → ref-Dlxn7eu7.js.map} +1 -1
  98. package/dist/ref.cjs +1 -1
  99. package/dist/ref.d.cts +1 -1
  100. package/dist/ref.d.ts +1 -1
  101. package/dist/ref.js +1 -1
  102. package/dist/{schema-gSjYgaCl.cjs → schema-0YJZqRXb.cjs} +2 -2
  103. package/dist/{schema-gSjYgaCl.cjs.map → schema-0YJZqRXb.cjs.map} +1 -1
  104. package/dist/{schema-4UcdIPQ2.js → schema-BvUrXIoX.js} +4 -4
  105. package/dist/{schema-4UcdIPQ2.js.map → schema-BvUrXIoX.js.map} +1 -1
  106. package/dist/{schema-tH14gE6i.js → schema-CC008xgK.js} +2 -2
  107. package/dist/{schema-tH14gE6i.js.map → schema-CC008xgK.js.map} +1 -1
  108. package/dist/{schema-DuCY4lCG.cjs → schema-DfLGJ-oh.cjs} +4 -4
  109. package/dist/{schema-DuCY4lCG.cjs.map → schema-DfLGJ-oh.cjs.map} +1 -1
  110. package/dist/schema.cjs +3 -3
  111. package/dist/schema.d.cts +4 -4
  112. package/dist/schema.d.ts +4 -4
  113. package/dist/schema.js +3 -3
  114. package/dist/{visitor-CpmsR8o5.d.ts → visitor-CqI8T9Qa.d.ts} +2 -2
  115. package/dist/{visitor-XA0W3OVv.js → visitor-DA5yfOJz.js} +3 -2
  116. package/dist/visitor-DA5yfOJz.js.map +1 -0
  117. package/dist/{visitor-Bh1CBAOz.cjs → visitor-DhuKS-7x.cjs} +3 -2
  118. package/dist/visitor-DhuKS-7x.cjs.map +1 -0
  119. package/dist/{visitor-DnBK2MNl.d.cts → visitor-VYLe7Q4m.d.cts} +2 -2
  120. package/package.json +1 -1
  121. package/dist/constants-BTTus9ee.js.map +0 -1
  122. package/dist/constants-DztHlVmY.cjs.map +0 -1
  123. package/dist/index-Bj7a0aSM.d.cts +0 -5
  124. package/dist/index-CW-ztJjd.d.ts +0 -5
  125. package/dist/nodes-ClL1C158.js.map +0 -1
  126. package/dist/nodes-DEQjVliP.cjs.map +0 -1
  127. package/dist/visitor-Bh1CBAOz.cjs.map +0 -1
  128. package/dist/visitor-XA0W3OVv.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { C as createArrowFunction, D as createJsx, E as createFunction, O as createText, S as TypeNode, T as createConst, _ as ConstNode, a as ImportNode, b as JsxNode, c as Space, d as createFile, f as createImport, h as BreakNode, i as ImportInput, k as createType, l as UserFileNode, m as ArrowFunctionNode, n as ExportNode, o as ModuleName, p as createSource, r as FileNode, s as SourceNode, t as ExportInput, u as createExport, v as FunctionNode, w as createBreak, x as TextNode } from "./file-B269mZh4.cjs";
2
- import { Q as createProperty, T as InputNode, U as SchemaNode, X as createSchema, Z as PropertyNode, a as createOperation, d as createRequestBody, g as ContentNode, h as createParameter, i as OperationNode, k as createInput, l as createResponse, p as ParameterNode, s as ResponseNode, u as RequestBodyNode, y as createContent } from "./operation-AFw8tzIN.cjs";
1
+ import { C as createArrowFunction, D as createJsx, E as createFunction, O as createText, S as TypeNode, T as createConst, _ as ConstNode, a as ImportNode, b as JsxNode, c as Space, d as createFile, f as createImport, h as BreakNode, i as ImportInput, k as createType, l as UserFileNode, m as ArrowFunctionNode, n as ExportNode, o as ModuleName, p as createSource, r as FileNode, s as SourceNode, t as ExportInput, u as createExport, v as FunctionNode, w as createBreak, x as TextNode } from "./file-CMHRNuMX.cjs";
2
+ import { $ as PropertyNode, D as InputNode, G as SchemaNode, Q as createSchema, _ as createParameter, a as OperationsNode, d as createResponse, et as createProperty, f as RequestBodyNode, h as ParameterNode, i as OperationNode, j as createInput, l as ResponseNode, o as createOperation, p as createRequestBody, s as createOperations, v as ContentNode, x as createContent } from "./operation-De4lbIZS.cjs";
3
3
  declare namespace index_d_exports {
4
- export { ExportInput, ImportInput, ModuleName, Node, Space, UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
4
+ export { ExportInput, ImportInput, ModuleName, Node, Space, UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createOperations, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
5
5
  }
6
6
  /**
7
7
  * Union of all AST node types.
@@ -20,5 +20,5 @@ declare namespace index_d_exports {
20
20
  * }
21
21
  * ```
22
22
  */
23
- type Node = InputNode | OperationNode | SchemaNode | PropertyNode | ParameterNode | ResponseNode | RequestBodyNode | ContentNode | FileNode | ImportNode | ExportNode | SourceNode | ConstNode | TypeNode | FunctionNode | ArrowFunctionNode | TextNode | BreakNode | JsxNode;
23
+ type Node = InputNode | OperationNode | OperationsNode | SchemaNode | PropertyNode | ParameterNode | ResponseNode | RequestBodyNode | ContentNode | FileNode | ImportNode | ExportNode | SourceNode | ConstNode | TypeNode | FunctionNode | ArrowFunctionNode | TextNode | BreakNode | JsxNode;
24
24
  export { index_d_exports as n, Node as t };
@@ -1,4 +1,4 @@
1
- import { U as SchemaNode, i as OperationNode } from "./operation-Cu4XSaJQ.js";
1
+ import { G as SchemaNode, i as OperationNode } from "./operation-Dd0-l2VB.js";
2
2
  /**
3
3
  * Collects the names of every schema a node's subtree references, resolved with `ast.ref.getName`.
4
4
  * Each ref contributes its name only, so the schema it points to is never traversed. Memoized by
@@ -1,4 +1,4 @@
1
- import { U as SchemaNode, i as OperationNode } from "./operation-AFw8tzIN.cjs";
1
+ import { G as SchemaNode, i as OperationNode } from "./operation-De4lbIZS.cjs";
2
2
  /**
3
3
  * Collects the names of every schema a node's subtree references, resolved with `ast.ref.getName`.
4
4
  * Each ref contributes its name only, so the schema it points to is never traversed. Memoized by
@@ -1,4 +1,4 @@
1
- import { B as RefSchemaNode, U as SchemaNode } from "./operation-Cu4XSaJQ.js";
1
+ import { G as SchemaNode, H as RefSchemaNode } from "./operation-Dd0-l2VB.js";
2
2
  /**
3
3
  * Follows a resolved ref chain to its target schema. Returns an unresolved or cyclic ref as is.
4
4
  *
@@ -1,7 +1,7 @@
1
- import { K as StringSchemaNode, U as SchemaNode, Z as PropertyNode } from "./operation-AFw8tzIN.cjs";
2
- import { a as schemaTypes } from "./base-UFBZi-FO.cjs";
3
- import { n as narrowSchema } from "./guards-u-dAAtl8.cjs";
4
- import { o as findSchema } from "./visitor-DnBK2MNl.cjs";
1
+ import { $ as PropertyNode, G as SchemaNode, J as StringSchemaNode } from "./operation-De4lbIZS.cjs";
2
+ import { a as schemaTypes } from "./base-CyJhBRMi.cjs";
3
+ import { n as narrowSchema } from "./guards-B6LgmDhJ.cjs";
4
+ import { o as findSchema } from "./visitor-VYLe7Q4m.cjs";
5
5
  /**
6
6
  * Generic JSON Schema optionality: a non-required field is optional, and a
7
7
  * non-required nullable field is nullish.
@@ -1,4 +1,4 @@
1
- import { T as InputNode } from "./operation-Cu4XSaJQ.js";
1
+ import { D as InputNode } from "./operation-Dd0-l2VB.js";
2
2
  declare namespace index_d_exports {
3
3
  export { parse, stringify };
4
4
  }
package/dist/index.cjs CHANGED
@@ -1,20 +1,20 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-BV8xUvPy.cjs");
3
- const require_constants = require("./constants-DztHlVmY.cjs");
4
- const require_graph = require("./graph-CFJ4wzFR.cjs");
5
- const require_visitor = require("./visitor-Bh1CBAOz.cjs");
6
- const require_ref = require("./ref-Bh5Xo8T7.cjs");
7
- const require_schema = require("./schema-DuCY4lCG.cjs");
3
+ const require_constants = require("./constants-BCRkFAiy.cjs");
4
+ const require_graph = require("./graph-DDh1FFrm.cjs");
5
+ const require_visitor = require("./visitor-DhuKS-7x.cjs");
6
+ const require_ref = require("./ref-Ck-0j8NV.cjs");
7
+ const require_schema = require("./schema-DfLGJ-oh.cjs");
8
8
  const require_guards = require("./guards-4drgx10i.cjs");
9
9
  const require_refs = require("./refs-rmr2LFV1.cjs");
10
- const require_macro = require("./macro-BEwfGNu1.cjs");
11
- const require_node = require("./node-vTrAIz3e.cjs");
10
+ const require_macro = require("./macro-Ywn4-0s5.cjs");
11
+ const require_node = require("./node-BeccjrHH.cjs");
12
12
  const require_optionality = require("./optionality-C-qULYxo.cjs");
13
- const require_file = require("./file-DiPZBLSP.cjs");
14
- const require_nodeText = require("./nodeText-CZ7wgxu9.cjs");
15
- const require_nodes = require("./nodes-DEQjVliP.cjs");
13
+ const require_file = require("./file-azmmZwDb.cjs");
14
+ const require_nodeText = require("./nodeText-DH4dLGUb.cjs");
15
+ const require_nodes = require("./nodes-BdZfapPI.cjs");
16
16
  const require_http = require("./http-Dv8py6wh.cjs");
17
- const require_json = require("./json-CCWMgzJZ.cjs");
17
+ const require_json = require("./json-KV2VhBue.cjs");
18
18
  const require_mediaType = require("./mediaType-BbIfudh0.cjs");
19
19
  // src/createPrinter.ts
20
20
  /**
package/dist/index.d.cts CHANGED
@@ -1,18 +1,18 @@
1
- import { a as inlineFiles$1, i as InlineLanguage, t as index_d_exports$2 } from "./index-DbQ-J072.cjs";
2
- import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as index_d_exports$3 } from "./index-sdprVPKQ.cjs";
3
- import { t as index_d_exports$4 } from "./index-Bj7a0aSM.cjs";
4
- import { a as mergeRefWithSchema$1, i as isBareRef$1, n as index_d_exports$9, o as resolveRef$1, t as getName } from "./index-DpnCCtXt.cjs";
5
- import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-u-dAAtl8.cjs";
6
- import { a as resolveSchemaProperties$1, d as applyOptionality, i as inferDiscriminatorPropertyName$1, r as getSchemaLiteralValues$1, t as index_d_exports$10 } from "./index-Bw2oMIM1.cjs";
7
- import { S as TypeNode, _ as ConstNode, a as ImportNode, b as JsxNode, c as Space, g as CodeNode, h as BreakNode, i as ImportInput, l as UserFileNode, m as ArrowFunctionNode, n as ExportNode, o as ModuleName, r as FileNode, s as SourceNode, t as ExportInput, v as FunctionNode, x as TextNode, y as JSDocNode } from "./file-B269mZh4.cjs";
8
- import { A as ArraySchemaNode, B as RefSchemaNode, C as ExternalDocs, D as InputTag, E as InputServer, F as IntersectionSchemaNode, G as SchemaType, H as ScalarSchemaType, I as NotSchemaNode, J as UnionSchemaNode, K as StringSchemaNode, L as NumberSchemaNode, M as DateSchemaNode, N as DatetimeSchemaNode, O as OAuthFlow, P as EnumSchemaNode, R as ObjectSchemaNode, S as AuthScheme, T as InputNode, U as SchemaNode, V as ScalarSchemaNode, W as SchemaNodeByType, Y as UrlSchemaNode, Z as PropertyNode, _ as EncodingNode, b as AuthCredential, c as StatusCode, f as ParameterLocation, g as ContentNode, i as OperationNode, j as BlobSchemaNode, m as ParameterStyle, n as HttpMethod, o as ResponseLink, p as ParameterNode, q as TimeSchemaNode, r as HttpOperationNode, s as ResponseNode, t as GenericOperationNode, u as RequestBodyNode, v as ExampleNode, w as InputMeta, x as AuthRequirement, z as PrimitiveSchemaType } from "./operation-AFw8tzIN.cjs";
9
- import { a as compareMacroOrder, i as applyMacros$1, n as Enforce, o as defineMacro$1, r as Macro, t as index_d_exports$6 } from "./index-D_WLsIMP.cjs";
10
- import { n as getNodeText, t as index_d_exports$8 } from "./index-c9FD2S5f.cjs";
11
- import { n as index_d_exports$1, t as Node } from "./index-B2nnOQjf.cjs";
12
- import { t as index_d_exports$5 } from "./index-C1za72gL.cjs";
1
+ import { a as inlineFiles$1, i as InlineLanguage, t as index_d_exports$2 } from "./index-84453BaS.cjs";
2
+ import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as index_d_exports$3 } from "./index-DfTgdgaH.cjs";
3
+ import { t as index_d_exports$4 } from "./index-BiXrjYNm.cjs";
4
+ import { a as mergeRefWithSchema$1, i as isBareRef$1, n as index_d_exports$9, o as resolveRef$1, t as getName } from "./index-D2tWPgnK.cjs";
5
+ import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-B6LgmDhJ.cjs";
6
+ import { a as resolveSchemaProperties$1, d as applyOptionality, i as inferDiscriminatorPropertyName$1, r as getSchemaLiteralValues$1, t as index_d_exports$10 } from "./index-bkTCYnZj.cjs";
7
+ import { S as TypeNode, _ as ConstNode, a as ImportNode, b as JsxNode, c as Space, g as CodeNode, h as BreakNode, i as ImportInput, l as UserFileNode, m as ArrowFunctionNode, n as ExportNode, o as ModuleName, r as FileNode, s as SourceNode, t as ExportInput, v as FunctionNode, x as TextNode, y as JSDocNode } from "./file-CMHRNuMX.cjs";
8
+ import { $ as PropertyNode, A as OAuthFlow, B as ObjectSchemaNode, C as AuthRequirement, D as InputNode, E as InputMeta, F as DatetimeSchemaNode, G as SchemaNode, H as RefSchemaNode, I as EnumSchemaNode, J as StringSchemaNode, K as SchemaNodeByType, L as IntersectionSchemaNode, M as ArraySchemaNode, N as BlobSchemaNode, O as InputServer, P as DateSchemaNode, R as NotSchemaNode, S as AuthCredential, T as ExternalDocs, U as ScalarSchemaNode, V as PrimitiveSchemaType, W as ScalarSchemaType, X as UnionSchemaNode, Y as TimeSchemaNode, Z as UrlSchemaNode, a as OperationsNode, b as ExampleNode, c as ResponseLink, f as RequestBodyNode, g as ParameterStyle, h as ParameterNode, i as OperationNode, k as InputTag, l as ResponseNode, m as ParameterLocation, n as HttpMethod, q as SchemaType, r as HttpOperationNode, t as GenericOperationNode, u as StatusCode, v as ContentNode, w as AuthScheme, y as EncodingNode, z as NumberSchemaNode } from "./operation-De4lbIZS.cjs";
9
+ import { a as compareMacroOrder, i as applyMacros$1, n as Enforce, o as defineMacro$1, r as Macro, t as index_d_exports$6 } from "./index-BvdIGsVr.cjs";
10
+ import { n as getNodeText, t as index_d_exports$8 } from "./index-Bcxj7FqZ.cjs";
11
+ import { n as index_d_exports$1, t as Node } from "./index-DNZgWmNq.cjs";
12
+ import { t as index_d_exports$5 } from "./index-2hzFweaD.cjs";
13
13
  import { n as index_d_exports$7 } from "./index-DR9ahJ-x.cjs";
14
- import { n as DistributiveOmit, r as NodeKind } from "./base-UFBZi-FO.cjs";
15
- import { a as collect$1, n as VisitorContext, o as findSchema$1, s as transform$1, t as Visitor } from "./visitor-DnBK2MNl.cjs";
14
+ import { n as DistributiveOmit, r as NodeKind } from "./base-CyJhBRMi.cjs";
15
+ import { a as collect$1, n as VisitorContext, o as findSchema$1, s as transform$1, t as Visitor } from "./visitor-VYLe7Q4m.cjs";
16
16
  /**
17
17
  * Runtime context passed to printer handlers, both as `this` and as the second argument.
18
18
  *
@@ -255,6 +255,7 @@ export declare const applyMacros: typeof applyMacros$1;
255
255
  export declare const nodeKinds: {
256
256
  readonly input: 'Input';
257
257
  readonly operation: 'Operation';
258
+ readonly operations: 'Operations';
258
259
  readonly schema: 'Schema';
259
260
  readonly property: 'Property';
260
261
  readonly parameter: 'Parameter';
@@ -314,6 +315,6 @@ export declare const collect: typeof collect$1;
314
315
  /** @deprecated Use `ast.file.inline`. Removed in Kubb v6. */
315
316
  export declare const inlineFiles: typeof inlineFiles$1;
316
317
  declare namespace index_d_exports {
317
- export { ArraySchemaNode, ArrowFunctionNode, AuthCredential, AuthRequirement, AuthScheme, BlobSchemaNode, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExampleNode, ExportInput, ExportNode, ExternalDocs, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportInput, ImportNode, InlineLanguage, InputMeta, InputNode, InputServer, InputTag, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, ModuleName, Node, NodeKind, NotSchemaNode, NumberSchemaNode, OAuthFlow, ObjectSchemaNode, OperationNode, ParameterLocation, ParameterNode, ParameterStyle, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseLink, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, Space, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, compareEnforce, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, index_d_exports$2 as file, findCircularSchemas, findSchema, getSchemaLiteralValues, index_d_exports$3 as graph, index_d_exports$4 as http, inferDiscriminatorPropertyName, inlineFiles, isBareRef, isHttpOperationNode, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, mergeRefWithSchema, narrowSchema, index_d_exports$8 as node, nodeKinds, optionality, index_d_exports$9 as ref, refName, resolveRef, resolveRefName, resolveSchemaProperties, index_d_exports$10 as schema, schemaTypes, transform };
318
+ export { ArraySchemaNode, ArrowFunctionNode, AuthCredential, AuthRequirement, AuthScheme, BlobSchemaNode, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExampleNode, ExportInput, ExportNode, ExternalDocs, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportInput, ImportNode, InlineLanguage, InputMeta, InputNode, InputServer, InputTag, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, ModuleName, Node, NodeKind, NotSchemaNode, NumberSchemaNode, OAuthFlow, ObjectSchemaNode, OperationNode, OperationsNode, ParameterLocation, ParameterNode, ParameterStyle, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseLink, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, Space, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, compareEnforce, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, index_d_exports$2 as file, findCircularSchemas, findSchema, getSchemaLiteralValues, index_d_exports$3 as graph, index_d_exports$4 as http, inferDiscriminatorPropertyName, inlineFiles, isBareRef, isHttpOperationNode, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, mergeRefWithSchema, narrowSchema, index_d_exports$8 as node, nodeKinds, optionality, index_d_exports$9 as ref, refName, resolveRef, resolveRefName, resolveSchemaProperties, index_d_exports$10 as schema, schemaTypes, transform };
318
319
  }
319
- export { type ArraySchemaNode, type ArrowFunctionNode, type AuthCredential, type AuthRequirement, type AuthScheme, type BlobSchemaNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateSchemaNode, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExampleNode, type ExportInput, type ExportNode, type ExternalDocs, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportInput, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputServer, type InputTag, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type ModuleName, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type OAuthFlow, type ObjectSchemaNode, type OperationNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseLink, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type Space, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory, index_d_exports$2 as file, index_d_exports$3 as graph, index_d_exports$4 as http, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, index_d_exports$8 as node, index_d_exports$9 as ref, index_d_exports$10 as schema };
320
+ export { type ArraySchemaNode, type ArrowFunctionNode, type AuthCredential, type AuthRequirement, type AuthScheme, type BlobSchemaNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateSchemaNode, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExampleNode, type ExportInput, type ExportNode, type ExternalDocs, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportInput, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputServer, type InputTag, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type ModuleName, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type OAuthFlow, type ObjectSchemaNode, type OperationNode, type OperationsNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseLink, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type Space, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory, index_d_exports$2 as file, index_d_exports$3 as graph, index_d_exports$4 as http, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, index_d_exports$8 as node, index_d_exports$9 as ref, index_d_exports$10 as schema };
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { a as inlineFiles$1, i as InlineLanguage, t as index_d_exports$2 } from "./index-BgFaJtnv.js";
2
- import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as index_d_exports$3 } from "./index-DbAnYRRM.js";
3
- import { t as index_d_exports$4 } from "./index-CW-ztJjd.js";
4
- import { a as mergeRefWithSchema$1, i as isBareRef$1, n as index_d_exports$9, o as resolveRef$1, t as getName } from "./index-DfRcRYF2.js";
5
- import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-RCnH6re9.js";
6
- import { a as resolveSchemaProperties$1, d as applyOptionality, i as inferDiscriminatorPropertyName$1, r as getSchemaLiteralValues$1, t as index_d_exports$10 } from "./index-UwSVys3m.js";
7
- import { S as TypeNode, _ as ConstNode, a as ImportNode, b as JsxNode, c as Space, g as CodeNode, h as BreakNode, i as ImportInput, l as UserFileNode, m as ArrowFunctionNode, n as ExportNode, o as ModuleName, r as FileNode, s as SourceNode, t as ExportInput, v as FunctionNode, x as TextNode, y as JSDocNode } from "./file-oLlejzZV.js";
8
- import { A as ArraySchemaNode, B as RefSchemaNode, C as ExternalDocs, D as InputTag, E as InputServer, F as IntersectionSchemaNode, G as SchemaType, H as ScalarSchemaType, I as NotSchemaNode, J as UnionSchemaNode, K as StringSchemaNode, L as NumberSchemaNode, M as DateSchemaNode, N as DatetimeSchemaNode, O as OAuthFlow, P as EnumSchemaNode, R as ObjectSchemaNode, S as AuthScheme, T as InputNode, U as SchemaNode, V as ScalarSchemaNode, W as SchemaNodeByType, Y as UrlSchemaNode, Z as PropertyNode, _ as EncodingNode, b as AuthCredential, c as StatusCode, f as ParameterLocation, g as ContentNode, i as OperationNode, j as BlobSchemaNode, m as ParameterStyle, n as HttpMethod, o as ResponseLink, p as ParameterNode, q as TimeSchemaNode, r as HttpOperationNode, s as ResponseNode, t as GenericOperationNode, u as RequestBodyNode, v as ExampleNode, w as InputMeta, x as AuthRequirement, z as PrimitiveSchemaType } from "./operation-Cu4XSaJQ.js";
9
- import { a as compareMacroOrder, i as applyMacros$1, n as Enforce, o as defineMacro$1, r as Macro, t as index_d_exports$6 } from "./index-DzHcy3vy.js";
10
- import { n as getNodeText, t as index_d_exports$8 } from "./index-DF7CbpYW.js";
11
- import { n as index_d_exports$1, t as Node } from "./index-6-ZZCX9W.js";
12
- import { t as index_d_exports$5 } from "./index-2TMYDLjK.js";
1
+ import { a as inlineFiles$1, i as InlineLanguage, t as index_d_exports$2 } from "./index-BFwAhPp8.js";
2
+ import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as index_d_exports$3 } from "./index-DerFkxlp.js";
3
+ import { t as index_d_exports$4 } from "./index-CC5Rmgcm.js";
4
+ import { a as mergeRefWithSchema$1, i as isBareRef$1, n as index_d_exports$9, o as resolveRef$1, t as getName } from "./index-YTyLBHFN.js";
5
+ import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-l2AsKeHR.js";
6
+ import { a as resolveSchemaProperties$1, d as applyOptionality, i as inferDiscriminatorPropertyName$1, r as getSchemaLiteralValues$1, t as index_d_exports$10 } from "./index-B3o1AkNE.js";
7
+ import { S as TypeNode, _ as ConstNode, a as ImportNode, b as JsxNode, c as Space, g as CodeNode, h as BreakNode, i as ImportInput, l as UserFileNode, m as ArrowFunctionNode, n as ExportNode, o as ModuleName, r as FileNode, s as SourceNode, t as ExportInput, v as FunctionNode, x as TextNode, y as JSDocNode } from "./file-D67ITWja.js";
8
+ import { $ as PropertyNode, A as OAuthFlow, B as ObjectSchemaNode, C as AuthRequirement, D as InputNode, E as InputMeta, F as DatetimeSchemaNode, G as SchemaNode, H as RefSchemaNode, I as EnumSchemaNode, J as StringSchemaNode, K as SchemaNodeByType, L as IntersectionSchemaNode, M as ArraySchemaNode, N as BlobSchemaNode, O as InputServer, P as DateSchemaNode, R as NotSchemaNode, S as AuthCredential, T as ExternalDocs, U as ScalarSchemaNode, V as PrimitiveSchemaType, W as ScalarSchemaType, X as UnionSchemaNode, Y as TimeSchemaNode, Z as UrlSchemaNode, a as OperationsNode, b as ExampleNode, c as ResponseLink, f as RequestBodyNode, g as ParameterStyle, h as ParameterNode, i as OperationNode, k as InputTag, l as ResponseNode, m as ParameterLocation, n as HttpMethod, q as SchemaType, r as HttpOperationNode, t as GenericOperationNode, u as StatusCode, v as ContentNode, w as AuthScheme, y as EncodingNode, z as NumberSchemaNode } from "./operation-Dd0-l2VB.js";
9
+ import { a as compareMacroOrder, i as applyMacros$1, n as Enforce, o as defineMacro$1, r as Macro, t as index_d_exports$6 } from "./index-C7U9EiIP.js";
10
+ import { n as getNodeText, t as index_d_exports$8 } from "./index-CIUD99Ft.js";
11
+ import { n as index_d_exports$1, t as Node } from "./index-CGmrJThc.js";
12
+ import { t as index_d_exports$5 } from "./index-f90iIhHX.js";
13
13
  import { n as index_d_exports$7 } from "./index-C-nsgwuD.js";
14
- import { n as DistributiveOmit, r as NodeKind } from "./base-LhsPvVY1.js";
15
- import { a as collect$1, n as VisitorContext, o as findSchema$1, s as transform$1, t as Visitor } from "./visitor-CpmsR8o5.js";
14
+ import { n as DistributiveOmit, r as NodeKind } from "./base-A-xF4pUL.js";
15
+ import { a as collect$1, n as VisitorContext, o as findSchema$1, s as transform$1, t as Visitor } from "./visitor-CqI8T9Qa.js";
16
16
  /**
17
17
  * Runtime context passed to printer handlers, both as `this` and as the second argument.
18
18
  *
@@ -255,6 +255,7 @@ export declare const applyMacros: typeof applyMacros$1;
255
255
  export declare const nodeKinds: {
256
256
  readonly input: 'Input';
257
257
  readonly operation: 'Operation';
258
+ readonly operations: 'Operations';
258
259
  readonly schema: 'Schema';
259
260
  readonly property: 'Property';
260
261
  readonly parameter: 'Parameter';
@@ -314,6 +315,6 @@ export declare const collect: typeof collect$1;
314
315
  /** @deprecated Use `ast.file.inline`. Removed in Kubb v6. */
315
316
  export declare const inlineFiles: typeof inlineFiles$1;
316
317
  declare namespace index_d_exports {
317
- export { ArraySchemaNode, ArrowFunctionNode, AuthCredential, AuthRequirement, AuthScheme, BlobSchemaNode, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExampleNode, ExportInput, ExportNode, ExternalDocs, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportInput, ImportNode, InlineLanguage, InputMeta, InputNode, InputServer, InputTag, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, ModuleName, Node, NodeKind, NotSchemaNode, NumberSchemaNode, OAuthFlow, ObjectSchemaNode, OperationNode, ParameterLocation, ParameterNode, ParameterStyle, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseLink, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, Space, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, compareEnforce, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, index_d_exports$2 as file, findCircularSchemas, findSchema, getSchemaLiteralValues, index_d_exports$3 as graph, index_d_exports$4 as http, inferDiscriminatorPropertyName, inlineFiles, isBareRef, isHttpOperationNode, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, mergeRefWithSchema, narrowSchema, index_d_exports$8 as node, nodeKinds, optionality, index_d_exports$9 as ref, refName, resolveRef, resolveRefName, resolveSchemaProperties, index_d_exports$10 as schema, schemaTypes, transform };
318
+ export { ArraySchemaNode, ArrowFunctionNode, AuthCredential, AuthRequirement, AuthScheme, BlobSchemaNode, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExampleNode, ExportInput, ExportNode, ExternalDocs, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportInput, ImportNode, InlineLanguage, InputMeta, InputNode, InputServer, InputTag, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, ModuleName, Node, NodeKind, NotSchemaNode, NumberSchemaNode, OAuthFlow, ObjectSchemaNode, OperationNode, OperationsNode, ParameterLocation, ParameterNode, ParameterStyle, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseLink, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, Space, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, index_d_exports as ast, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, compareEnforce, createPrinter, defineMacro, extractStringsFromNodes, index_d_exports$1 as factory, index_d_exports$2 as file, findCircularSchemas, findSchema, getSchemaLiteralValues, index_d_exports$3 as graph, index_d_exports$4 as http, inferDiscriminatorPropertyName, inlineFiles, isBareRef, isHttpOperationNode, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, mergeRefWithSchema, narrowSchema, index_d_exports$8 as node, nodeKinds, optionality, index_d_exports$9 as ref, refName, resolveRef, resolveRefName, resolveSchemaProperties, index_d_exports$10 as schema, schemaTypes, transform };
318
319
  }
319
- export { type ArraySchemaNode, type ArrowFunctionNode, type AuthCredential, type AuthRequirement, type AuthScheme, type BlobSchemaNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateSchemaNode, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExampleNode, type ExportInput, type ExportNode, type ExternalDocs, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportInput, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputServer, type InputTag, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type ModuleName, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type OAuthFlow, type ObjectSchemaNode, type OperationNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseLink, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type Space, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory, index_d_exports$2 as file, index_d_exports$3 as graph, index_d_exports$4 as http, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, index_d_exports$8 as node, index_d_exports$9 as ref, index_d_exports$10 as schema };
320
+ export { type ArraySchemaNode, type ArrowFunctionNode, type AuthCredential, type AuthRequirement, type AuthScheme, type BlobSchemaNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateSchemaNode, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExampleNode, type ExportInput, type ExportNode, type ExternalDocs, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportInput, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputServer, type InputTag, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type ModuleName, type Node, type NodeKind, type NotSchemaNode, type NumberSchemaNode, type OAuthFlow, type ObjectSchemaNode, type OperationNode, type OperationsNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, type ResponseLink, type ResponseNode, type ScalarSchemaNode, type ScalarSchemaType, type SchemaNode, type SchemaNodeByType, type SchemaType, type SourceNode, type Space, type StatusCode, type StringSchemaNode, type TextNode, type TimeSchemaNode, type TypeNode, type UnionSchemaNode, type UrlSchemaNode, type UserFileNode, type Visitor, type VisitorContext, index_d_exports as ast, index_d_exports$1 as factory, index_d_exports$2 as file, index_d_exports$3 as graph, index_d_exports$4 as http, index_d_exports$5 as json, index_d_exports$6 as macro, index_d_exports$7 as mediaType, index_d_exports$8 as node, index_d_exports$9 as ref, index_d_exports$10 as schema };
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { n as __name, t as __exportAll } from "./rolldown-runtime-BYyVTPww.js";
2
- import { n as schemaTypes$1, t as nodeKinds$1 } from "./constants-BTTus9ee.js";
3
- import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as graph_exports } from "./graph-BUEOBomo.js";
4
- import { n as findSchema$1, r as transform$1, t as collect$1 } from "./visitor-XA0W3OVv.js";
5
- import { r as ref_exports, t as getName } from "./ref-DPqeS8K1.js";
6
- import { a as resolveSchemaProperties$1, i as inferDiscriminatorPropertyName$1, n as schema_exports, r as getSchemaLiteralValues$1 } from "./schema-4UcdIPQ2.js";
2
+ import { n as schemaTypes$1, t as nodeKinds$1 } from "./constants-UorsTFsa.js";
3
+ import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as graph_exports } from "./graph-DImDxlJE.js";
4
+ import { n as findSchema$1, r as transform$1, t as collect$1 } from "./visitor-DA5yfOJz.js";
5
+ import { r as ref_exports, t as getName } from "./ref-Dlxn7eu7.js";
6
+ import { a as resolveSchemaProperties$1, i as inferDiscriminatorPropertyName$1, n as schema_exports, r as getSchemaLiteralValues$1 } from "./schema-BvUrXIoX.js";
7
7
  import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-DKw4uwc5.js";
8
8
  import { i as resolveRef$1, n as mergeRefWithSchema$1, t as isBareRef$1 } from "./refs-Bgf8_9Ui.js";
9
- import { i as defineMacro$1, n as applyMacros$1, r as compareMacroOrder, t as macro_exports } from "./macro-9WouvtZe.js";
10
- import { t as node_exports } from "./node-DtuO3zr8.js";
9
+ import { i as defineMacro$1, n as applyMacros$1, r as compareMacroOrder, t as macro_exports } from "./macro-3uGSg-ic.js";
10
+ import { t as node_exports } from "./node-Dm56432_.js";
11
11
  import { t as applyOptionality } from "./optionality-FkRredTC.js";
12
- import { n as inlineFiles$1, t as file_exports } from "./file-D_ih0x7q.js";
13
- import { n as getNodeText } from "./nodeText-BSYvDZOH.js";
14
- import { t as nodes_exports } from "./nodes-ClL1C158.js";
12
+ import { n as inlineFiles$1, t as file_exports } from "./file-1YtTOZeL.js";
13
+ import { n as getNodeText } from "./nodeText-DFak5VpX.js";
14
+ import { t as nodes_exports } from "./nodes-D9nwroV5.js";
15
15
  import { t as http_exports } from "./http-CAWf6TAJ.js";
16
- import { t as json_exports } from "./json-DyDtIZTj.js";
16
+ import { t as json_exports } from "./json-DeqPhPUQ.js";
17
17
  import { r as mediaType_exports } from "./mediaType-DXQCNYdM.js";
18
18
  // src/createPrinter.ts
19
19
  /**
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BYyVTPww.js";
2
- import { n as schemaTypes, t as nodeKinds } from "./constants-BTTus9ee.js";
2
+ import { n as schemaTypes, t as nodeKinds } from "./constants-UorsTFsa.js";
3
3
  // src/json/index.ts
4
4
  var json_exports = /* @__PURE__ */ __exportAll({
5
5
  parse: () => parse,
@@ -71,4 +71,4 @@ function parse(text) {
71
71
  }
72
72
  export { parse as n, stringify as r, json_exports as t };
73
73
 
74
- //# sourceMappingURL=json-DyDtIZTj.js.map
74
+ //# sourceMappingURL=json-DeqPhPUQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-DyDtIZTj.js","names":[],"sources":["../src/json/index.ts"],"sourcesContent":["import { nodeKinds, schemaTypes } from '../constants.ts'\nimport type { InputNode } from '../nodes/input.ts'\nimport type { SchemaNode } from '../nodes/schema.ts'\n\nconst version = 1\n\ntype JsonDocument = {\n version: number\n input: InputNode\n targets: Array<SchemaNode>\n}\n\nfunction isRef(value: unknown): value is { schema: unknown } {\n const node = value as { kind?: unknown; type?: unknown } | null\n return node?.kind === nodeKinds.schema && node.type === schemaTypes.ref\n}\n\n/**\n * Turns an `InputNode` into JSON text that `parse` reads back. Every schema a ref points at is written once,\n * where a plain `JSON.stringify(input)` writes it again at every ref.\n *\n * @example\n * ```ts\n * await writeFile('input.json', ast.json.stringify(input))\n * ```\n */\nexport function stringify(input: InputNode): string {\n const ids = new Map<unknown, number>()\n const targets: Array<unknown> = []\n\n function replacer(this: unknown, key: string, value: unknown): unknown {\n if (key !== 'schema' || !isRef(this)) return value\n // Spec data such as a `default` can look like a ref node. Its number is wrapped, so `parse` does not read it as a target.\n if (typeof value === 'number') return [value]\n if (typeof value !== 'object' || value === null) return value\n if (!ids.has(value)) {\n ids.set(value, targets.length)\n targets.push(value)\n }\n return ids.get(value)\n }\n\n const root = JSON.stringify(input, replacer)\n const encoded: Array<string> = []\n // A target can hold refs to targets not seen yet, so the list grows while this loop reads it.\n for (const target of targets) encoded.push(JSON.stringify(target, replacer))\n\n return `{\"version\":${version},\"input\":${root},\"targets\":[${encoded.join(',')}]}`\n}\n\n/**\n * Reads the text `stringify` wrote back into an `InputNode`. Refs to one schema share one object again.\n * Throws on another format version, or on a ref whose target is missing.\n */\nexport function parse(text: string): InputNode {\n // Plain `JSON.parse` and one loop over the tree: a reviver made this about 5 times slower on a large spec.\n const document = JSON.parse(text) as Partial<JsonDocument> | null\n\n if (document?.version !== version) {\n throw new Error(`Cannot read this AST JSON: expected format version ${version}, got ${JSON.stringify(document?.version)}.`)\n }\n if (!document.input || !Array.isArray(document.targets)) {\n throw new Error('Cannot read this AST JSON: `input` or `targets` is missing.')\n }\n\n const targets = document.targets\n const stack: Array<unknown> = [document.input, ...targets]\n while (stack.length) {\n const value = stack.pop() as Record<string, unknown>\n const ref = isRef(value)\n for (const key in value) {\n const child = value[key]\n if (ref && key === 'schema') {\n if (Array.isArray(child)) {\n value.schema = child[0]\n continue\n }\n if (typeof child === 'number') {\n const target = targets[child]\n if (!target) throw new Error(`Cannot read this AST JSON: a ref points at target ${child}, which is missing.`)\n value.schema = target\n continue\n }\n }\n if (typeof child === 'object' && child !== null) stack.push(child)\n }\n }\n\n return document.input\n}\n"],"mappings":";;;;;;;AAIA,MAAM,UAAU;AAQhB,SAAS,MAAM,OAA8C;CAC3D,MAAM,OAAO;CACb,OAAO,MAAM,SAAS,UAAU,UAAU,KAAK,SAAS,YAAY;AACtE;;;;;;;;;;AAWA,SAAgB,UAAU,OAA0B;CAClD,MAAM,sBAAM,IAAI,IAAqB;CACrC,MAAM,UAA0B,CAAC;CAEjC,SAAS,SAAwB,KAAa,OAAyB;EACrE,IAAI,QAAQ,YAAY,CAAC,MAAM,IAAI,GAAG,OAAO;EAE7C,IAAI,OAAO,UAAU,UAAU,OAAO,CAAC,KAAK;EAC5C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,IAAI,CAAC,IAAI,IAAI,KAAK,GAAG;GACnB,IAAI,IAAI,OAAO,QAAQ,MAAM;GAC7B,QAAQ,KAAK,KAAK;EACpB;EACA,OAAO,IAAI,IAAI,KAAK;CACtB;CAEA,MAAM,OAAO,KAAK,UAAU,OAAO,QAAQ;CAC3C,MAAM,UAAyB,CAAC;CAEhC,KAAK,MAAM,UAAU,SAAS,QAAQ,KAAK,KAAK,UAAU,QAAQ,QAAQ,CAAC;CAE3E,OAAO,cAAc,QAAQ,WAAW,KAAK,cAAc,QAAQ,KAAK,GAAG,EAAE;AAC/E;;;;;AAMA,SAAgB,MAAM,MAAyB;CAE7C,MAAM,WAAW,KAAK,MAAM,IAAI;CAEhC,IAAI,UAAU,YAAY,SACxB,MAAM,IAAI,MAAM,sDAAsD,QAAQ,QAAQ,KAAK,UAAU,UAAU,OAAO,EAAE,EAAE;CAE5H,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,QAAQ,SAAS,OAAO,GACpD,MAAM,IAAI,MAAM,6DAA6D;CAG/E,MAAM,UAAU,SAAS;CACzB,MAAM,QAAwB,CAAC,SAAS,OAAO,GAAG,OAAO;CACzD,OAAO,MAAM,QAAQ;EACnB,MAAM,QAAQ,MAAM,IAAI;EACxB,MAAM,MAAM,MAAM,KAAK;EACvB,KAAK,MAAM,OAAO,OAAO;GACvB,MAAM,QAAQ,MAAM;GACpB,IAAI,OAAO,QAAQ,UAAU;IAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG;KACxB,MAAM,SAAS,MAAM;KACrB;IACF;IACA,IAAI,OAAO,UAAU,UAAU;KAC7B,MAAM,SAAS,QAAQ;KACvB,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,qDAAqD,MAAM,oBAAoB;KAC5G,MAAM,SAAS;KACf;IACF;GACF;GACA,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,MAAM,KAAK,KAAK;EACnE;CACF;CAEA,OAAO,SAAS;AAClB"}
1
+ {"version":3,"file":"json-DeqPhPUQ.js","names":[],"sources":["../src/json/index.ts"],"sourcesContent":["import { nodeKinds, schemaTypes } from '../constants.ts'\nimport type { InputNode } from '../nodes/input.ts'\nimport type { SchemaNode } from '../nodes/schema.ts'\n\nconst version = 1\n\ntype JsonDocument = {\n version: number\n input: InputNode\n targets: Array<SchemaNode>\n}\n\nfunction isRef(value: unknown): value is { schema: unknown } {\n const node = value as { kind?: unknown; type?: unknown } | null\n return node?.kind === nodeKinds.schema && node.type === schemaTypes.ref\n}\n\n/**\n * Turns an `InputNode` into JSON text that `parse` reads back. Every schema a ref points at is written once,\n * where a plain `JSON.stringify(input)` writes it again at every ref.\n *\n * @example\n * ```ts\n * await writeFile('input.json', ast.json.stringify(input))\n * ```\n */\nexport function stringify(input: InputNode): string {\n const ids = new Map<unknown, number>()\n const targets: Array<unknown> = []\n\n function replacer(this: unknown, key: string, value: unknown): unknown {\n if (key !== 'schema' || !isRef(this)) return value\n // Spec data such as a `default` can look like a ref node. Its number is wrapped, so `parse` does not read it as a target.\n if (typeof value === 'number') return [value]\n if (typeof value !== 'object' || value === null) return value\n if (!ids.has(value)) {\n ids.set(value, targets.length)\n targets.push(value)\n }\n return ids.get(value)\n }\n\n const root = JSON.stringify(input, replacer)\n const encoded: Array<string> = []\n // A target can hold refs to targets not seen yet, so the list grows while this loop reads it.\n for (const target of targets) encoded.push(JSON.stringify(target, replacer))\n\n return `{\"version\":${version},\"input\":${root},\"targets\":[${encoded.join(',')}]}`\n}\n\n/**\n * Reads the text `stringify` wrote back into an `InputNode`. Refs to one schema share one object again.\n * Throws on another format version, or on a ref whose target is missing.\n */\nexport function parse(text: string): InputNode {\n // Plain `JSON.parse` and one loop over the tree: a reviver made this about 5 times slower on a large spec.\n const document = JSON.parse(text) as Partial<JsonDocument> | null\n\n if (document?.version !== version) {\n throw new Error(`Cannot read this AST JSON: expected format version ${version}, got ${JSON.stringify(document?.version)}.`)\n }\n if (!document.input || !Array.isArray(document.targets)) {\n throw new Error('Cannot read this AST JSON: `input` or `targets` is missing.')\n }\n\n const targets = document.targets\n const stack: Array<unknown> = [document.input, ...targets]\n while (stack.length) {\n const value = stack.pop() as Record<string, unknown>\n const ref = isRef(value)\n for (const key in value) {\n const child = value[key]\n if (ref && key === 'schema') {\n if (Array.isArray(child)) {\n value.schema = child[0]\n continue\n }\n if (typeof child === 'number') {\n const target = targets[child]\n if (!target) throw new Error(`Cannot read this AST JSON: a ref points at target ${child}, which is missing.`)\n value.schema = target\n continue\n }\n }\n if (typeof child === 'object' && child !== null) stack.push(child)\n }\n }\n\n return document.input\n}\n"],"mappings":";;;;;;;AAIA,MAAM,UAAU;AAQhB,SAAS,MAAM,OAA8C;CAC3D,MAAM,OAAO;CACb,OAAO,MAAM,SAAS,UAAU,UAAU,KAAK,SAAS,YAAY;AACtE;;;;;;;;;;AAWA,SAAgB,UAAU,OAA0B;CAClD,MAAM,sBAAM,IAAI,IAAqB;CACrC,MAAM,UAA0B,CAAC;CAEjC,SAAS,SAAwB,KAAa,OAAyB;EACrE,IAAI,QAAQ,YAAY,CAAC,MAAM,IAAI,GAAG,OAAO;EAE7C,IAAI,OAAO,UAAU,UAAU,OAAO,CAAC,KAAK;EAC5C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,IAAI,CAAC,IAAI,IAAI,KAAK,GAAG;GACnB,IAAI,IAAI,OAAO,QAAQ,MAAM;GAC7B,QAAQ,KAAK,KAAK;EACpB;EACA,OAAO,IAAI,IAAI,KAAK;CACtB;CAEA,MAAM,OAAO,KAAK,UAAU,OAAO,QAAQ;CAC3C,MAAM,UAAyB,CAAC;CAEhC,KAAK,MAAM,UAAU,SAAS,QAAQ,KAAK,KAAK,UAAU,QAAQ,QAAQ,CAAC;CAE3E,OAAO,cAAc,QAAQ,WAAW,KAAK,cAAc,QAAQ,KAAK,GAAG,EAAE;AAC/E;;;;;AAMA,SAAgB,MAAM,MAAyB;CAE7C,MAAM,WAAW,KAAK,MAAM,IAAI;CAEhC,IAAI,UAAU,YAAY,SACxB,MAAM,IAAI,MAAM,sDAAsD,QAAQ,QAAQ,KAAK,UAAU,UAAU,OAAO,EAAE,EAAE;CAE5H,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,QAAQ,SAAS,OAAO,GACpD,MAAM,IAAI,MAAM,6DAA6D;CAG/E,MAAM,UAAU,SAAS;CACzB,MAAM,QAAwB,CAAC,SAAS,OAAO,GAAG,OAAO;CACzD,OAAO,MAAM,QAAQ;EACnB,MAAM,QAAQ,MAAM,IAAI;EACxB,MAAM,MAAM,MAAM,KAAK;EACvB,KAAK,MAAM,OAAO,OAAO;GACvB,MAAM,QAAQ,MAAM;GACpB,IAAI,OAAO,QAAQ,UAAU;IAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG;KACxB,MAAM,SAAS,MAAM;KACrB;IACF;IACA,IAAI,OAAO,UAAU,UAAU;KAC7B,MAAM,SAAS,QAAQ;KACvB,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,qDAAqD,MAAM,oBAAoB;KAC5G,MAAM,SAAS;KACf;IACF;GACF;GACA,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,MAAM,KAAK,KAAK;EACnE;CACF;CAEA,OAAO,SAAS;AAClB"}
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BV8xUvPy.cjs");
2
- const require_constants = require("./constants-DztHlVmY.cjs");
2
+ const require_constants = require("./constants-BCRkFAiy.cjs");
3
3
  // src/json/index.ts
4
4
  var json_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
5
5
  parse: () => parse,
@@ -88,4 +88,4 @@ Object.defineProperty(exports, "stringify", {
88
88
  }
89
89
  });
90
90
 
91
- //# sourceMappingURL=json-CCWMgzJZ.cjs.map
91
+ //# sourceMappingURL=json-KV2VhBue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-CCWMgzJZ.cjs","names":["nodeKinds","schemaTypes"],"sources":["../src/json/index.ts"],"sourcesContent":["import { nodeKinds, schemaTypes } from '../constants.ts'\nimport type { InputNode } from '../nodes/input.ts'\nimport type { SchemaNode } from '../nodes/schema.ts'\n\nconst version = 1\n\ntype JsonDocument = {\n version: number\n input: InputNode\n targets: Array<SchemaNode>\n}\n\nfunction isRef(value: unknown): value is { schema: unknown } {\n const node = value as { kind?: unknown; type?: unknown } | null\n return node?.kind === nodeKinds.schema && node.type === schemaTypes.ref\n}\n\n/**\n * Turns an `InputNode` into JSON text that `parse` reads back. Every schema a ref points at is written once,\n * where a plain `JSON.stringify(input)` writes it again at every ref.\n *\n * @example\n * ```ts\n * await writeFile('input.json', ast.json.stringify(input))\n * ```\n */\nexport function stringify(input: InputNode): string {\n const ids = new Map<unknown, number>()\n const targets: Array<unknown> = []\n\n function replacer(this: unknown, key: string, value: unknown): unknown {\n if (key !== 'schema' || !isRef(this)) return value\n // Spec data such as a `default` can look like a ref node. Its number is wrapped, so `parse` does not read it as a target.\n if (typeof value === 'number') return [value]\n if (typeof value !== 'object' || value === null) return value\n if (!ids.has(value)) {\n ids.set(value, targets.length)\n targets.push(value)\n }\n return ids.get(value)\n }\n\n const root = JSON.stringify(input, replacer)\n const encoded: Array<string> = []\n // A target can hold refs to targets not seen yet, so the list grows while this loop reads it.\n for (const target of targets) encoded.push(JSON.stringify(target, replacer))\n\n return `{\"version\":${version},\"input\":${root},\"targets\":[${encoded.join(',')}]}`\n}\n\n/**\n * Reads the text `stringify` wrote back into an `InputNode`. Refs to one schema share one object again.\n * Throws on another format version, or on a ref whose target is missing.\n */\nexport function parse(text: string): InputNode {\n // Plain `JSON.parse` and one loop over the tree: a reviver made this about 5 times slower on a large spec.\n const document = JSON.parse(text) as Partial<JsonDocument> | null\n\n if (document?.version !== version) {\n throw new Error(`Cannot read this AST JSON: expected format version ${version}, got ${JSON.stringify(document?.version)}.`)\n }\n if (!document.input || !Array.isArray(document.targets)) {\n throw new Error('Cannot read this AST JSON: `input` or `targets` is missing.')\n }\n\n const targets = document.targets\n const stack: Array<unknown> = [document.input, ...targets]\n while (stack.length) {\n const value = stack.pop() as Record<string, unknown>\n const ref = isRef(value)\n for (const key in value) {\n const child = value[key]\n if (ref && key === 'schema') {\n if (Array.isArray(child)) {\n value.schema = child[0]\n continue\n }\n if (typeof child === 'number') {\n const target = targets[child]\n if (!target) throw new Error(`Cannot read this AST JSON: a ref points at target ${child}, which is missing.`)\n value.schema = target\n continue\n }\n }\n if (typeof child === 'object' && child !== null) stack.push(child)\n }\n }\n\n return document.input\n}\n"],"mappings":";;;;;;;AAIA,MAAM,UAAU;AAQhB,SAAS,MAAM,OAA8C;CAC3D,MAAM,OAAO;CACb,OAAO,MAAM,SAASA,kBAAAA,UAAU,UAAU,KAAK,SAASC,kBAAAA,YAAY;AACtE;;;;;;;;;;AAWA,SAAgB,UAAU,OAA0B;CAClD,MAAM,sBAAM,IAAI,IAAqB;CACrC,MAAM,UAA0B,CAAC;CAEjC,SAAS,SAAwB,KAAa,OAAyB;EACrE,IAAI,QAAQ,YAAY,CAAC,MAAM,IAAI,GAAG,OAAO;EAE7C,IAAI,OAAO,UAAU,UAAU,OAAO,CAAC,KAAK;EAC5C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,IAAI,CAAC,IAAI,IAAI,KAAK,GAAG;GACnB,IAAI,IAAI,OAAO,QAAQ,MAAM;GAC7B,QAAQ,KAAK,KAAK;EACpB;EACA,OAAO,IAAI,IAAI,KAAK;CACtB;CAEA,MAAM,OAAO,KAAK,UAAU,OAAO,QAAQ;CAC3C,MAAM,UAAyB,CAAC;CAEhC,KAAK,MAAM,UAAU,SAAS,QAAQ,KAAK,KAAK,UAAU,QAAQ,QAAQ,CAAC;CAE3E,OAAO,cAAc,QAAQ,WAAW,KAAK,cAAc,QAAQ,KAAK,GAAG,EAAE;AAC/E;;;;;AAMA,SAAgB,MAAM,MAAyB;CAE7C,MAAM,WAAW,KAAK,MAAM,IAAI;CAEhC,IAAI,UAAU,YAAY,SACxB,MAAM,IAAI,MAAM,sDAAsD,QAAQ,QAAQ,KAAK,UAAU,UAAU,OAAO,EAAE,EAAE;CAE5H,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,QAAQ,SAAS,OAAO,GACpD,MAAM,IAAI,MAAM,6DAA6D;CAG/E,MAAM,UAAU,SAAS;CACzB,MAAM,QAAwB,CAAC,SAAS,OAAO,GAAG,OAAO;CACzD,OAAO,MAAM,QAAQ;EACnB,MAAM,QAAQ,MAAM,IAAI;EACxB,MAAM,MAAM,MAAM,KAAK;EACvB,KAAK,MAAM,OAAO,OAAO;GACvB,MAAM,QAAQ,MAAM;GACpB,IAAI,OAAO,QAAQ,UAAU;IAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG;KACxB,MAAM,SAAS,MAAM;KACrB;IACF;IACA,IAAI,OAAO,UAAU,UAAU;KAC7B,MAAM,SAAS,QAAQ;KACvB,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,qDAAqD,MAAM,oBAAoB;KAC5G,MAAM,SAAS;KACf;IACF;GACF;GACA,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,MAAM,KAAK,KAAK;EACnE;CACF;CAEA,OAAO,SAAS;AAClB"}
1
+ {"version":3,"file":"json-KV2VhBue.cjs","names":["nodeKinds","schemaTypes"],"sources":["../src/json/index.ts"],"sourcesContent":["import { nodeKinds, schemaTypes } from '../constants.ts'\nimport type { InputNode } from '../nodes/input.ts'\nimport type { SchemaNode } from '../nodes/schema.ts'\n\nconst version = 1\n\ntype JsonDocument = {\n version: number\n input: InputNode\n targets: Array<SchemaNode>\n}\n\nfunction isRef(value: unknown): value is { schema: unknown } {\n const node = value as { kind?: unknown; type?: unknown } | null\n return node?.kind === nodeKinds.schema && node.type === schemaTypes.ref\n}\n\n/**\n * Turns an `InputNode` into JSON text that `parse` reads back. Every schema a ref points at is written once,\n * where a plain `JSON.stringify(input)` writes it again at every ref.\n *\n * @example\n * ```ts\n * await writeFile('input.json', ast.json.stringify(input))\n * ```\n */\nexport function stringify(input: InputNode): string {\n const ids = new Map<unknown, number>()\n const targets: Array<unknown> = []\n\n function replacer(this: unknown, key: string, value: unknown): unknown {\n if (key !== 'schema' || !isRef(this)) return value\n // Spec data such as a `default` can look like a ref node. Its number is wrapped, so `parse` does not read it as a target.\n if (typeof value === 'number') return [value]\n if (typeof value !== 'object' || value === null) return value\n if (!ids.has(value)) {\n ids.set(value, targets.length)\n targets.push(value)\n }\n return ids.get(value)\n }\n\n const root = JSON.stringify(input, replacer)\n const encoded: Array<string> = []\n // A target can hold refs to targets not seen yet, so the list grows while this loop reads it.\n for (const target of targets) encoded.push(JSON.stringify(target, replacer))\n\n return `{\"version\":${version},\"input\":${root},\"targets\":[${encoded.join(',')}]}`\n}\n\n/**\n * Reads the text `stringify` wrote back into an `InputNode`. Refs to one schema share one object again.\n * Throws on another format version, or on a ref whose target is missing.\n */\nexport function parse(text: string): InputNode {\n // Plain `JSON.parse` and one loop over the tree: a reviver made this about 5 times slower on a large spec.\n const document = JSON.parse(text) as Partial<JsonDocument> | null\n\n if (document?.version !== version) {\n throw new Error(`Cannot read this AST JSON: expected format version ${version}, got ${JSON.stringify(document?.version)}.`)\n }\n if (!document.input || !Array.isArray(document.targets)) {\n throw new Error('Cannot read this AST JSON: `input` or `targets` is missing.')\n }\n\n const targets = document.targets\n const stack: Array<unknown> = [document.input, ...targets]\n while (stack.length) {\n const value = stack.pop() as Record<string, unknown>\n const ref = isRef(value)\n for (const key in value) {\n const child = value[key]\n if (ref && key === 'schema') {\n if (Array.isArray(child)) {\n value.schema = child[0]\n continue\n }\n if (typeof child === 'number') {\n const target = targets[child]\n if (!target) throw new Error(`Cannot read this AST JSON: a ref points at target ${child}, which is missing.`)\n value.schema = target\n continue\n }\n }\n if (typeof child === 'object' && child !== null) stack.push(child)\n }\n }\n\n return document.input\n}\n"],"mappings":";;;;;;;AAIA,MAAM,UAAU;AAQhB,SAAS,MAAM,OAA8C;CAC3D,MAAM,OAAO;CACb,OAAO,MAAM,SAASA,kBAAAA,UAAU,UAAU,KAAK,SAASC,kBAAAA,YAAY;AACtE;;;;;;;;;;AAWA,SAAgB,UAAU,OAA0B;CAClD,MAAM,sBAAM,IAAI,IAAqB;CACrC,MAAM,UAA0B,CAAC;CAEjC,SAAS,SAAwB,KAAa,OAAyB;EACrE,IAAI,QAAQ,YAAY,CAAC,MAAM,IAAI,GAAG,OAAO;EAE7C,IAAI,OAAO,UAAU,UAAU,OAAO,CAAC,KAAK;EAC5C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,IAAI,CAAC,IAAI,IAAI,KAAK,GAAG;GACnB,IAAI,IAAI,OAAO,QAAQ,MAAM;GAC7B,QAAQ,KAAK,KAAK;EACpB;EACA,OAAO,IAAI,IAAI,KAAK;CACtB;CAEA,MAAM,OAAO,KAAK,UAAU,OAAO,QAAQ;CAC3C,MAAM,UAAyB,CAAC;CAEhC,KAAK,MAAM,UAAU,SAAS,QAAQ,KAAK,KAAK,UAAU,QAAQ,QAAQ,CAAC;CAE3E,OAAO,cAAc,QAAQ,WAAW,KAAK,cAAc,QAAQ,KAAK,GAAG,EAAE;AAC/E;;;;;AAMA,SAAgB,MAAM,MAAyB;CAE7C,MAAM,WAAW,KAAK,MAAM,IAAI;CAEhC,IAAI,UAAU,YAAY,SACxB,MAAM,IAAI,MAAM,sDAAsD,QAAQ,QAAQ,KAAK,UAAU,UAAU,OAAO,EAAE,EAAE;CAE5H,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,QAAQ,SAAS,OAAO,GACpD,MAAM,IAAI,MAAM,6DAA6D;CAG/E,MAAM,UAAU,SAAS;CACzB,MAAM,QAAwB,CAAC,SAAS,OAAO,GAAG,OAAO;CACzD,OAAO,MAAM,QAAQ;EACnB,MAAM,QAAQ,MAAM,IAAI;EACxB,MAAM,MAAM,MAAM,KAAK;EACvB,KAAK,MAAM,OAAO,OAAO;GACvB,MAAM,QAAQ,MAAM;GACpB,IAAI,OAAO,QAAQ,UAAU;IAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG;KACxB,MAAM,SAAS,MAAM;KACrB;IACF;IACA,IAAI,OAAO,UAAU,UAAU;KAC7B,MAAM,SAAS,QAAQ;KACvB,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,qDAAqD,MAAM,oBAAoB;KAC5G,MAAM,SAAS;KACf;IACF;GACF;GACA,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,MAAM,KAAK,KAAK;EACnE;CACF;CAEA,OAAO,SAAS;AAClB"}
package/dist/json.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_json = require("./json-CCWMgzJZ.cjs");
2
+ const require_json = require("./json-KV2VhBue.cjs");
3
3
  exports.parse = require_json.parse;
4
4
  exports.stringify = require_json.stringify;
package/dist/json.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as parse, r as stringify } from "./index-C1za72gL.cjs";
1
+ import { n as parse, r as stringify } from "./index-2hzFweaD.cjs";
2
2
  export { parse, stringify };
package/dist/json.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as parse, r as stringify } from "./index-2TMYDLjK.js";
1
+ import { n as parse, r as stringify } from "./index-f90iIhHX.js";
2
2
  export { parse, stringify };
package/dist/json.js CHANGED
@@ -1 +1 @@
1
- export { n as parse, r as stringify } from "./json-DyDtIZTj.js";
1
+ export { n as parse, r as stringify } from "./json-DeqPhPUQ.js";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BYyVTPww.js";
2
- import { a as visitorKeys, r as transform } from "./visitor-XA0W3OVv.js";
2
+ import { a as visitorKeys, r as transform } from "./visitor-DA5yfOJz.js";
3
3
  // src/defineMacro.ts
4
4
  /**
5
5
  * Sort weight for an `enforce` hint. `pre` sorts before unmarked items and `post` after, so a plain
@@ -101,4 +101,4 @@ var macro_exports = /* @__PURE__ */ __exportAll({
101
101
  });
102
102
  export { defineMacro as i, applyMacros as n, compareMacroOrder as r, macro_exports as t };
103
103
 
104
- //# sourceMappingURL=macro-9WouvtZe.js.map
104
+ //# sourceMappingURL=macro-3uGSg-ic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"macro-9WouvtZe.js","names":[],"sources":["../src/defineMacro.ts","../src/macro/index.ts"],"sourcesContent":["import type { Node } from './nodes/index.ts'\nimport type { Visitor, VisitorContext, VisitorDepth, VisitorKey } from './visitor.ts'\nimport { transform, visitorKeys } from './visitor.ts'\n\n/**\n * Ordering hint shared by macros and plugins. `pre` runs before unmarked items, `post` after,\n * and `undefined` keeps declaration order.\n */\nexport type Enforce = 'pre' | 'post'\n\n/**\n * Sort weight for an `enforce` hint. `pre` sorts before unmarked items and `post` after, so a plain\n * list keeps its authored order.\n */\nfunction enforceWeight(enforce?: Enforce): number {\n if (enforce === 'pre') return 0\n if (enforce === 'post') return 2\n return 1\n}\n\n/**\n * Compares two `enforce` hints for `Array.prototype.sort`: `pre` first, unmarked next, `post`\n * last. Equal hints compare as `0`, so a stable sort keeps authored order within a bucket.\n *\n * @example\n * `plugins.sort((a, b) => compareMacroOrder(a.enforce, b.enforce))`\n */\nexport function compareMacroOrder(a?: Enforce, b?: Enforce): number {\n return enforceWeight(a) - enforceWeight(b)\n}\n\n/**\n * The {@link Visitor} callbacks with `this` typed as the {@link VisitorContext}. A macro callback gets\n * the context both as `this` and as its second argument.\n */\ntype MacroCallbacks = {\n [K in VisitorKey]?: (this: VisitorContext, ...args: Parameters<NonNullable<Visitor[K]>>) => ReturnType<NonNullable<Visitor[K]>>\n}\n\n/**\n * A named, composable transform over the Kubb AST. It carries the same per-kind callbacks as a\n * {@link Visitor} (`schema`, `operation`, …), plus a `name`, an optional `enforce` order, and an\n * optional `match` predicate. Macros run on the shared AST, so the same macro works across every\n * adapter and output target. Exports follow the `macro<Name>` convention, mirroring plugins (`pluginTs`).\n */\nexport type Macro = MacroCallbacks & {\n /**\n * Macro identifier used to tell macros apart, for example `'dedupe-union'`.\n */\n name: string\n /**\n * Ordering hint. `pre` macros run before unmarked macros, `post` macros run after.\n * Ordering within a bucket follows list order.\n */\n enforce?: Enforce\n /**\n * Predicate checked against the current node before any callback runs. Returning `false`\n * skips the macro for that node.\n */\n match?: (node: Node) => boolean\n}\n\n/**\n * Types a macro for inference and a single construction site, mirroring `defineExtension`.\n * Adds no runtime behavior.\n *\n * @example\n * ```ts\n * const macroUntagged = defineMacro({\n * name: 'untagged',\n * operation(node) {\n * return node.tags?.length ? undefined : { ...node, tags: ['untagged'] }\n * },\n * })\n * ```\n */\nexport function defineMacro(macro: Macro): Macro {\n return macro\n}\n\ntype MacroCallback = (this: VisitorContext, node: Node, context: VisitorContext) => Node | null | undefined\n\ntype ChainProps = {\n macros: ReadonlyArray<Macro>\n key: VisitorKey\n node: Node\n context: VisitorContext\n}\n\n/**\n * Runs every macro's callback for one node kind in order, chaining the result so each macro sees\n * the previous macro's output. Returns `undefined` when nothing changed, so `transform` keeps the\n * original reference (structural sharing).\n */\nfunction chain({ macros, key, node, context }: ChainProps): Node | undefined {\n let current = node\n\n for (const macro of macros) {\n const callback = macro[key] as MacroCallback | undefined\n if (!callback) continue\n if (macro.match && !macro.match(current)) continue\n\n const next = callback.call(context, current, context)\n if (next != null) current = next\n }\n\n return current === node ? undefined : current\n}\n\n/**\n * Folds an ordered list of macros into a single {@link Visitor} for `transform`. Macros are\n * stable-sorted by `enforce`, then applied sequentially per node so later macros see earlier output.\n */\nfunction composeMacros(macros: ReadonlyArray<Macro>): Visitor {\n const ordered = [...macros].sort((a, b) => compareMacroOrder(a.enforce, b.enforce))\n\n const visitor: Visitor = {}\n for (const key of visitorKeys) {\n if (!ordered.some((macro) => typeof macro[key] === 'function')) continue\n\n const callback = (node: Node, context: VisitorContext) => chain({ macros: ordered, key, node, context })\n ;(visitor as Record<VisitorKey, MacroCallback>)[key] = callback\n }\n\n return visitor\n}\n\n/**\n * Runs a list of macros over a node tree and returns the rewritten tree. Keeps `transform`'s\n * structural sharing, so an empty or no-op macro list returns the same reference. Pass\n * `depth: 'shallow'` to skip the children of every schema node; non-schema nodes, such as an operation's parameters and responses, are still rewritten.\n *\n * @example\n * ```ts\n * const next = applyMacros(root, [macroIntegerToString])\n * ```\n *\n * @example Rewrite a schema without walking its children\n * ```ts\n * const named = applyMacros(node, [macroEnumName({ parentName, propName, enumSuffix })], { depth: 'shallow' })\n * ```\n */\nexport function applyMacros<TNode extends Node>(root: TNode, macros: ReadonlyArray<Macro>, options?: { depth?: VisitorDepth }): TNode {\n if (macros.length === 0) return root\n\n return transform(root, { ...composeMacros(macros), ...options }) as TNode\n}\n","export { applyMacros as apply, compareMacroOrder as compareOrder } from '../defineMacro.ts'\n"],"mappings":";;;;;;;AAcA,SAAS,cAAc,SAA2B;CAChD,IAAI,YAAY,OAAO,OAAO;CAC9B,IAAI,YAAY,QAAQ,OAAO;CAC/B,OAAO;AACT;;;;;;;;AASA,SAAgB,kBAAkB,GAAa,GAAqB;CAClE,OAAO,cAAc,CAAC,IAAI,cAAc,CAAC;AAC3C;;;;;;;;;;;;;;;AA+CA,SAAgB,YAAY,OAAqB;CAC/C,OAAO;AACT;;;;;;AAgBA,SAAS,MAAM,EAAE,QAAQ,KAAK,MAAM,WAAyC;CAC3E,IAAI,UAAU;CAEd,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,WAAW,MAAM;EACvB,IAAI,CAAC,UAAU;EACf,IAAI,MAAM,SAAS,CAAC,MAAM,MAAM,OAAO,GAAG;EAE1C,MAAM,OAAO,SAAS,KAAK,SAAS,SAAS,OAAO;EACpD,IAAI,QAAQ,MAAM,UAAU;CAC9B;CAEA,OAAO,YAAY,OAAO,KAAA,IAAY;AACxC;;;;;AAMA,SAAS,cAAc,QAAuC;CAC5D,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC;CAElF,MAAM,UAAmB,CAAC;CAC1B,KAAK,MAAM,OAAO,aAAa;EAC7B,IAAI,CAAC,QAAQ,MAAM,UAAU,OAAO,MAAM,SAAS,UAAU,GAAG;EAEhE,MAAM,YAAY,MAAY,YAA4B,MAAM;GAAE,QAAQ;GAAS;GAAK;GAAM;EAAQ,CAAC;EACrG,QAA8C,OAAO;CACzD;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,YAAgC,MAAa,QAA8B,SAA2C;CACpI,IAAI,OAAO,WAAW,GAAG,OAAO;CAEhC,OAAO,UAAU,MAAM;EAAE,GAAG,cAAc,MAAM;EAAG,GAAG;CAAQ,CAAC;AACjE"}
1
+ {"version":3,"file":"macro-3uGSg-ic.js","names":[],"sources":["../src/defineMacro.ts","../src/macro/index.ts"],"sourcesContent":["import type { Node } from './nodes/index.ts'\nimport type { Visitor, VisitorContext, VisitorDepth, VisitorKey } from './visitor.ts'\nimport { transform, visitorKeys } from './visitor.ts'\n\n/**\n * Ordering hint shared by macros and plugins. `pre` runs before unmarked items, `post` after,\n * and `undefined` keeps declaration order.\n */\nexport type Enforce = 'pre' | 'post'\n\n/**\n * Sort weight for an `enforce` hint. `pre` sorts before unmarked items and `post` after, so a plain\n * list keeps its authored order.\n */\nfunction enforceWeight(enforce?: Enforce): number {\n if (enforce === 'pre') return 0\n if (enforce === 'post') return 2\n return 1\n}\n\n/**\n * Compares two `enforce` hints for `Array.prototype.sort`: `pre` first, unmarked next, `post`\n * last. Equal hints compare as `0`, so a stable sort keeps authored order within a bucket.\n *\n * @example\n * `plugins.sort((a, b) => compareMacroOrder(a.enforce, b.enforce))`\n */\nexport function compareMacroOrder(a?: Enforce, b?: Enforce): number {\n return enforceWeight(a) - enforceWeight(b)\n}\n\n/**\n * The {@link Visitor} callbacks with `this` typed as the {@link VisitorContext}. A macro callback gets\n * the context both as `this` and as its second argument.\n */\ntype MacroCallbacks = {\n [K in VisitorKey]?: (this: VisitorContext, ...args: Parameters<NonNullable<Visitor[K]>>) => ReturnType<NonNullable<Visitor[K]>>\n}\n\n/**\n * A named, composable transform over the Kubb AST. It carries the same per-kind callbacks as a\n * {@link Visitor} (`schema`, `operation`, …), plus a `name`, an optional `enforce` order, and an\n * optional `match` predicate. Macros run on the shared AST, so the same macro works across every\n * adapter and output target. Exports follow the `macro<Name>` convention, mirroring plugins (`pluginTs`).\n */\nexport type Macro = MacroCallbacks & {\n /**\n * Macro identifier used to tell macros apart, for example `'dedupe-union'`.\n */\n name: string\n /**\n * Ordering hint. `pre` macros run before unmarked macros, `post` macros run after.\n * Ordering within a bucket follows list order.\n */\n enforce?: Enforce\n /**\n * Predicate checked against the current node before any callback runs. Returning `false`\n * skips the macro for that node.\n */\n match?: (node: Node) => boolean\n}\n\n/**\n * Types a macro for inference and a single construction site, mirroring `defineExtension`.\n * Adds no runtime behavior.\n *\n * @example\n * ```ts\n * const macroUntagged = defineMacro({\n * name: 'untagged',\n * operation(node) {\n * return node.tags?.length ? undefined : { ...node, tags: ['untagged'] }\n * },\n * })\n * ```\n */\nexport function defineMacro(macro: Macro): Macro {\n return macro\n}\n\ntype MacroCallback = (this: VisitorContext, node: Node, context: VisitorContext) => Node | null | undefined\n\ntype ChainProps = {\n macros: ReadonlyArray<Macro>\n key: VisitorKey\n node: Node\n context: VisitorContext\n}\n\n/**\n * Runs every macro's callback for one node kind in order, chaining the result so each macro sees\n * the previous macro's output. Returns `undefined` when nothing changed, so `transform` keeps the\n * original reference (structural sharing).\n */\nfunction chain({ macros, key, node, context }: ChainProps): Node | undefined {\n let current = node\n\n for (const macro of macros) {\n const callback = macro[key] as MacroCallback | undefined\n if (!callback) continue\n if (macro.match && !macro.match(current)) continue\n\n const next = callback.call(context, current, context)\n if (next != null) current = next\n }\n\n return current === node ? undefined : current\n}\n\n/**\n * Folds an ordered list of macros into a single {@link Visitor} for `transform`. Macros are\n * stable-sorted by `enforce`, then applied sequentially per node so later macros see earlier output.\n */\nfunction composeMacros(macros: ReadonlyArray<Macro>): Visitor {\n const ordered = [...macros].sort((a, b) => compareMacroOrder(a.enforce, b.enforce))\n\n const visitor: Visitor = {}\n for (const key of visitorKeys) {\n if (!ordered.some((macro) => typeof macro[key] === 'function')) continue\n\n const callback = (node: Node, context: VisitorContext) => chain({ macros: ordered, key, node, context })\n ;(visitor as Record<VisitorKey, MacroCallback>)[key] = callback\n }\n\n return visitor\n}\n\n/**\n * Runs a list of macros over a node tree and returns the rewritten tree. Keeps `transform`'s\n * structural sharing, so an empty or no-op macro list returns the same reference. Pass\n * `depth: 'shallow'` to skip the children of every schema node; non-schema nodes, such as an operation's parameters and responses, are still rewritten.\n *\n * @example\n * ```ts\n * const next = applyMacros(root, [macroIntegerToString])\n * ```\n *\n * @example Rewrite a schema without walking its children\n * ```ts\n * const named = applyMacros(node, [macroEnumName({ parentName, propName, enumSuffix })], { depth: 'shallow' })\n * ```\n */\nexport function applyMacros<TNode extends Node>(root: TNode, macros: ReadonlyArray<Macro>, options?: { depth?: VisitorDepth }): TNode {\n if (macros.length === 0) return root\n\n return transform(root, { ...composeMacros(macros), ...options }) as TNode\n}\n","export { applyMacros as apply, compareMacroOrder as compareOrder } from '../defineMacro.ts'\n"],"mappings":";;;;;;;AAcA,SAAS,cAAc,SAA2B;CAChD,IAAI,YAAY,OAAO,OAAO;CAC9B,IAAI,YAAY,QAAQ,OAAO;CAC/B,OAAO;AACT;;;;;;;;AASA,SAAgB,kBAAkB,GAAa,GAAqB;CAClE,OAAO,cAAc,CAAC,IAAI,cAAc,CAAC;AAC3C;;;;;;;;;;;;;;;AA+CA,SAAgB,YAAY,OAAqB;CAC/C,OAAO;AACT;;;;;;AAgBA,SAAS,MAAM,EAAE,QAAQ,KAAK,MAAM,WAAyC;CAC3E,IAAI,UAAU;CAEd,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,WAAW,MAAM;EACvB,IAAI,CAAC,UAAU;EACf,IAAI,MAAM,SAAS,CAAC,MAAM,MAAM,OAAO,GAAG;EAE1C,MAAM,OAAO,SAAS,KAAK,SAAS,SAAS,OAAO;EACpD,IAAI,QAAQ,MAAM,UAAU;CAC9B;CAEA,OAAO,YAAY,OAAO,KAAA,IAAY;AACxC;;;;;AAMA,SAAS,cAAc,QAAuC;CAC5D,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC;CAElF,MAAM,UAAmB,CAAC;CAC1B,KAAK,MAAM,OAAO,aAAa;EAC7B,IAAI,CAAC,QAAQ,MAAM,UAAU,OAAO,MAAM,SAAS,UAAU,GAAG;EAEhE,MAAM,YAAY,MAAY,YAA4B,MAAM;GAAE,QAAQ;GAAS;GAAK;GAAM;EAAQ,CAAC;EACrG,QAA8C,OAAO;CACzD;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,YAAgC,MAAa,QAA8B,SAA2C;CACpI,IAAI,OAAO,WAAW,GAAG,OAAO;CAEhC,OAAO,UAAU,MAAM;EAAE,GAAG,cAAc,MAAM;EAAG,GAAG;CAAQ,CAAC;AACjE"}
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BV8xUvPy.cjs");
2
- const require_visitor = require("./visitor-Bh1CBAOz.cjs");
2
+ const require_visitor = require("./visitor-DhuKS-7x.cjs");
3
3
  // src/defineMacro.ts
4
4
  /**
5
5
  * Sort weight for an `enforce` hint. `pre` sorts before unmarked items and `post` after, so a plain
@@ -124,4 +124,4 @@ Object.defineProperty(exports, "macro_exports", {
124
124
  }
125
125
  });
126
126
 
127
- //# sourceMappingURL=macro-BEwfGNu1.cjs.map
127
+ //# sourceMappingURL=macro-Ywn4-0s5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"macro-BEwfGNu1.cjs","names":["visitorKeys","transform"],"sources":["../src/defineMacro.ts","../src/macro/index.ts"],"sourcesContent":["import type { Node } from './nodes/index.ts'\nimport type { Visitor, VisitorContext, VisitorDepth, VisitorKey } from './visitor.ts'\nimport { transform, visitorKeys } from './visitor.ts'\n\n/**\n * Ordering hint shared by macros and plugins. `pre` runs before unmarked items, `post` after,\n * and `undefined` keeps declaration order.\n */\nexport type Enforce = 'pre' | 'post'\n\n/**\n * Sort weight for an `enforce` hint. `pre` sorts before unmarked items and `post` after, so a plain\n * list keeps its authored order.\n */\nfunction enforceWeight(enforce?: Enforce): number {\n if (enforce === 'pre') return 0\n if (enforce === 'post') return 2\n return 1\n}\n\n/**\n * Compares two `enforce` hints for `Array.prototype.sort`: `pre` first, unmarked next, `post`\n * last. Equal hints compare as `0`, so a stable sort keeps authored order within a bucket.\n *\n * @example\n * `plugins.sort((a, b) => compareMacroOrder(a.enforce, b.enforce))`\n */\nexport function compareMacroOrder(a?: Enforce, b?: Enforce): number {\n return enforceWeight(a) - enforceWeight(b)\n}\n\n/**\n * The {@link Visitor} callbacks with `this` typed as the {@link VisitorContext}. A macro callback gets\n * the context both as `this` and as its second argument.\n */\ntype MacroCallbacks = {\n [K in VisitorKey]?: (this: VisitorContext, ...args: Parameters<NonNullable<Visitor[K]>>) => ReturnType<NonNullable<Visitor[K]>>\n}\n\n/**\n * A named, composable transform over the Kubb AST. It carries the same per-kind callbacks as a\n * {@link Visitor} (`schema`, `operation`, …), plus a `name`, an optional `enforce` order, and an\n * optional `match` predicate. Macros run on the shared AST, so the same macro works across every\n * adapter and output target. Exports follow the `macro<Name>` convention, mirroring plugins (`pluginTs`).\n */\nexport type Macro = MacroCallbacks & {\n /**\n * Macro identifier used to tell macros apart, for example `'dedupe-union'`.\n */\n name: string\n /**\n * Ordering hint. `pre` macros run before unmarked macros, `post` macros run after.\n * Ordering within a bucket follows list order.\n */\n enforce?: Enforce\n /**\n * Predicate checked against the current node before any callback runs. Returning `false`\n * skips the macro for that node.\n */\n match?: (node: Node) => boolean\n}\n\n/**\n * Types a macro for inference and a single construction site, mirroring `defineExtension`.\n * Adds no runtime behavior.\n *\n * @example\n * ```ts\n * const macroUntagged = defineMacro({\n * name: 'untagged',\n * operation(node) {\n * return node.tags?.length ? undefined : { ...node, tags: ['untagged'] }\n * },\n * })\n * ```\n */\nexport function defineMacro(macro: Macro): Macro {\n return macro\n}\n\ntype MacroCallback = (this: VisitorContext, node: Node, context: VisitorContext) => Node | null | undefined\n\ntype ChainProps = {\n macros: ReadonlyArray<Macro>\n key: VisitorKey\n node: Node\n context: VisitorContext\n}\n\n/**\n * Runs every macro's callback for one node kind in order, chaining the result so each macro sees\n * the previous macro's output. Returns `undefined` when nothing changed, so `transform` keeps the\n * original reference (structural sharing).\n */\nfunction chain({ macros, key, node, context }: ChainProps): Node | undefined {\n let current = node\n\n for (const macro of macros) {\n const callback = macro[key] as MacroCallback | undefined\n if (!callback) continue\n if (macro.match && !macro.match(current)) continue\n\n const next = callback.call(context, current, context)\n if (next != null) current = next\n }\n\n return current === node ? undefined : current\n}\n\n/**\n * Folds an ordered list of macros into a single {@link Visitor} for `transform`. Macros are\n * stable-sorted by `enforce`, then applied sequentially per node so later macros see earlier output.\n */\nfunction composeMacros(macros: ReadonlyArray<Macro>): Visitor {\n const ordered = [...macros].sort((a, b) => compareMacroOrder(a.enforce, b.enforce))\n\n const visitor: Visitor = {}\n for (const key of visitorKeys) {\n if (!ordered.some((macro) => typeof macro[key] === 'function')) continue\n\n const callback = (node: Node, context: VisitorContext) => chain({ macros: ordered, key, node, context })\n ;(visitor as Record<VisitorKey, MacroCallback>)[key] = callback\n }\n\n return visitor\n}\n\n/**\n * Runs a list of macros over a node tree and returns the rewritten tree. Keeps `transform`'s\n * structural sharing, so an empty or no-op macro list returns the same reference. Pass\n * `depth: 'shallow'` to skip the children of every schema node; non-schema nodes, such as an operation's parameters and responses, are still rewritten.\n *\n * @example\n * ```ts\n * const next = applyMacros(root, [macroIntegerToString])\n * ```\n *\n * @example Rewrite a schema without walking its children\n * ```ts\n * const named = applyMacros(node, [macroEnumName({ parentName, propName, enumSuffix })], { depth: 'shallow' })\n * ```\n */\nexport function applyMacros<TNode extends Node>(root: TNode, macros: ReadonlyArray<Macro>, options?: { depth?: VisitorDepth }): TNode {\n if (macros.length === 0) return root\n\n return transform(root, { ...composeMacros(macros), ...options }) as TNode\n}\n","export { applyMacros as apply, compareMacroOrder as compareOrder } from '../defineMacro.ts'\n"],"mappings":";;;;;;;AAcA,SAAS,cAAc,SAA2B;CAChD,IAAI,YAAY,OAAO,OAAO;CAC9B,IAAI,YAAY,QAAQ,OAAO;CAC/B,OAAO;AACT;;;;;;;;AASA,SAAgB,kBAAkB,GAAa,GAAqB;CAClE,OAAO,cAAc,CAAC,IAAI,cAAc,CAAC;AAC3C;;;;;;;;;;;;;;;AA+CA,SAAgB,YAAY,OAAqB;CAC/C,OAAO;AACT;;;;;;AAgBA,SAAS,MAAM,EAAE,QAAQ,KAAK,MAAM,WAAyC;CAC3E,IAAI,UAAU;CAEd,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,WAAW,MAAM;EACvB,IAAI,CAAC,UAAU;EACf,IAAI,MAAM,SAAS,CAAC,MAAM,MAAM,OAAO,GAAG;EAE1C,MAAM,OAAO,SAAS,KAAK,SAAS,SAAS,OAAO;EACpD,IAAI,QAAQ,MAAM,UAAU;CAC9B;CAEA,OAAO,YAAY,OAAO,KAAA,IAAY;AACxC;;;;;AAMA,SAAS,cAAc,QAAuC;CAC5D,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC;CAElF,MAAM,UAAmB,CAAC;CAC1B,KAAK,MAAM,OAAOA,gBAAAA,aAAa;EAC7B,IAAI,CAAC,QAAQ,MAAM,UAAU,OAAO,MAAM,SAAS,UAAU,GAAG;EAEhE,MAAM,YAAY,MAAY,YAA4B,MAAM;GAAE,QAAQ;GAAS;GAAK;GAAM;EAAQ,CAAC;EACrG,QAA8C,OAAO;CACzD;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,YAAgC,MAAa,QAA8B,SAA2C;CACpI,IAAI,OAAO,WAAW,GAAG,OAAO;CAEhC,OAAOC,gBAAAA,UAAU,MAAM;EAAE,GAAG,cAAc,MAAM;EAAG,GAAG;CAAQ,CAAC;AACjE"}
1
+ {"version":3,"file":"macro-Ywn4-0s5.cjs","names":["visitorKeys","transform"],"sources":["../src/defineMacro.ts","../src/macro/index.ts"],"sourcesContent":["import type { Node } from './nodes/index.ts'\nimport type { Visitor, VisitorContext, VisitorDepth, VisitorKey } from './visitor.ts'\nimport { transform, visitorKeys } from './visitor.ts'\n\n/**\n * Ordering hint shared by macros and plugins. `pre` runs before unmarked items, `post` after,\n * and `undefined` keeps declaration order.\n */\nexport type Enforce = 'pre' | 'post'\n\n/**\n * Sort weight for an `enforce` hint. `pre` sorts before unmarked items and `post` after, so a plain\n * list keeps its authored order.\n */\nfunction enforceWeight(enforce?: Enforce): number {\n if (enforce === 'pre') return 0\n if (enforce === 'post') return 2\n return 1\n}\n\n/**\n * Compares two `enforce` hints for `Array.prototype.sort`: `pre` first, unmarked next, `post`\n * last. Equal hints compare as `0`, so a stable sort keeps authored order within a bucket.\n *\n * @example\n * `plugins.sort((a, b) => compareMacroOrder(a.enforce, b.enforce))`\n */\nexport function compareMacroOrder(a?: Enforce, b?: Enforce): number {\n return enforceWeight(a) - enforceWeight(b)\n}\n\n/**\n * The {@link Visitor} callbacks with `this` typed as the {@link VisitorContext}. A macro callback gets\n * the context both as `this` and as its second argument.\n */\ntype MacroCallbacks = {\n [K in VisitorKey]?: (this: VisitorContext, ...args: Parameters<NonNullable<Visitor[K]>>) => ReturnType<NonNullable<Visitor[K]>>\n}\n\n/**\n * A named, composable transform over the Kubb AST. It carries the same per-kind callbacks as a\n * {@link Visitor} (`schema`, `operation`, …), plus a `name`, an optional `enforce` order, and an\n * optional `match` predicate. Macros run on the shared AST, so the same macro works across every\n * adapter and output target. Exports follow the `macro<Name>` convention, mirroring plugins (`pluginTs`).\n */\nexport type Macro = MacroCallbacks & {\n /**\n * Macro identifier used to tell macros apart, for example `'dedupe-union'`.\n */\n name: string\n /**\n * Ordering hint. `pre` macros run before unmarked macros, `post` macros run after.\n * Ordering within a bucket follows list order.\n */\n enforce?: Enforce\n /**\n * Predicate checked against the current node before any callback runs. Returning `false`\n * skips the macro for that node.\n */\n match?: (node: Node) => boolean\n}\n\n/**\n * Types a macro for inference and a single construction site, mirroring `defineExtension`.\n * Adds no runtime behavior.\n *\n * @example\n * ```ts\n * const macroUntagged = defineMacro({\n * name: 'untagged',\n * operation(node) {\n * return node.tags?.length ? undefined : { ...node, tags: ['untagged'] }\n * },\n * })\n * ```\n */\nexport function defineMacro(macro: Macro): Macro {\n return macro\n}\n\ntype MacroCallback = (this: VisitorContext, node: Node, context: VisitorContext) => Node | null | undefined\n\ntype ChainProps = {\n macros: ReadonlyArray<Macro>\n key: VisitorKey\n node: Node\n context: VisitorContext\n}\n\n/**\n * Runs every macro's callback for one node kind in order, chaining the result so each macro sees\n * the previous macro's output. Returns `undefined` when nothing changed, so `transform` keeps the\n * original reference (structural sharing).\n */\nfunction chain({ macros, key, node, context }: ChainProps): Node | undefined {\n let current = node\n\n for (const macro of macros) {\n const callback = macro[key] as MacroCallback | undefined\n if (!callback) continue\n if (macro.match && !macro.match(current)) continue\n\n const next = callback.call(context, current, context)\n if (next != null) current = next\n }\n\n return current === node ? undefined : current\n}\n\n/**\n * Folds an ordered list of macros into a single {@link Visitor} for `transform`. Macros are\n * stable-sorted by `enforce`, then applied sequentially per node so later macros see earlier output.\n */\nfunction composeMacros(macros: ReadonlyArray<Macro>): Visitor {\n const ordered = [...macros].sort((a, b) => compareMacroOrder(a.enforce, b.enforce))\n\n const visitor: Visitor = {}\n for (const key of visitorKeys) {\n if (!ordered.some((macro) => typeof macro[key] === 'function')) continue\n\n const callback = (node: Node, context: VisitorContext) => chain({ macros: ordered, key, node, context })\n ;(visitor as Record<VisitorKey, MacroCallback>)[key] = callback\n }\n\n return visitor\n}\n\n/**\n * Runs a list of macros over a node tree and returns the rewritten tree. Keeps `transform`'s\n * structural sharing, so an empty or no-op macro list returns the same reference. Pass\n * `depth: 'shallow'` to skip the children of every schema node; non-schema nodes, such as an operation's parameters and responses, are still rewritten.\n *\n * @example\n * ```ts\n * const next = applyMacros(root, [macroIntegerToString])\n * ```\n *\n * @example Rewrite a schema without walking its children\n * ```ts\n * const named = applyMacros(node, [macroEnumName({ parentName, propName, enumSuffix })], { depth: 'shallow' })\n * ```\n */\nexport function applyMacros<TNode extends Node>(root: TNode, macros: ReadonlyArray<Macro>, options?: { depth?: VisitorDepth }): TNode {\n if (macros.length === 0) return root\n\n return transform(root, { ...composeMacros(macros), ...options }) as TNode\n}\n","export { applyMacros as apply, compareMacroOrder as compareOrder } from '../defineMacro.ts'\n"],"mappings":";;;;;;;AAcA,SAAS,cAAc,SAA2B;CAChD,IAAI,YAAY,OAAO,OAAO;CAC9B,IAAI,YAAY,QAAQ,OAAO;CAC/B,OAAO;AACT;;;;;;;;AASA,SAAgB,kBAAkB,GAAa,GAAqB;CAClE,OAAO,cAAc,CAAC,IAAI,cAAc,CAAC;AAC3C;;;;;;;;;;;;;;;AA+CA,SAAgB,YAAY,OAAqB;CAC/C,OAAO;AACT;;;;;;AAgBA,SAAS,MAAM,EAAE,QAAQ,KAAK,MAAM,WAAyC;CAC3E,IAAI,UAAU;CAEd,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,WAAW,MAAM;EACvB,IAAI,CAAC,UAAU;EACf,IAAI,MAAM,SAAS,CAAC,MAAM,MAAM,OAAO,GAAG;EAE1C,MAAM,OAAO,SAAS,KAAK,SAAS,SAAS,OAAO;EACpD,IAAI,QAAQ,MAAM,UAAU;CAC9B;CAEA,OAAO,YAAY,OAAO,KAAA,IAAY;AACxC;;;;;AAMA,SAAS,cAAc,QAAuC;CAC5D,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM,kBAAkB,EAAE,SAAS,EAAE,OAAO,CAAC;CAElF,MAAM,UAAmB,CAAC;CAC1B,KAAK,MAAM,OAAOA,gBAAAA,aAAa;EAC7B,IAAI,CAAC,QAAQ,MAAM,UAAU,OAAO,MAAM,SAAS,UAAU,GAAG;EAEhE,MAAM,YAAY,MAAY,YAA4B,MAAM;GAAE,QAAQ;GAAS;GAAK;GAAM;EAAQ,CAAC;EACrG,QAA8C,OAAO;CACzD;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,YAAgC,MAAa,QAA8B,SAA2C;CACpI,IAAI,OAAO,WAAW,GAAG,OAAO;CAEhC,OAAOC,gBAAAA,UAAU,MAAM;EAAE,GAAG,cAAc,MAAM;EAAG,GAAG;CAAQ,CAAC;AACjE"}
package/dist/macro.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_macro = require("./macro-BEwfGNu1.cjs");
2
+ const require_macro = require("./macro-Ywn4-0s5.cjs");
3
3
  exports.apply = require_macro.applyMacros;
4
4
  exports.compareOrder = require_macro.compareMacroOrder;
package/dist/macro.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as compareMacroOrder, i as applyMacros } from "./index-D_WLsIMP.cjs";
1
+ import { a as compareMacroOrder, i as applyMacros } from "./index-BvdIGsVr.cjs";
2
2
  export { applyMacros as apply, compareMacroOrder as compareOrder };
package/dist/macro.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as compareMacroOrder, i as applyMacros } from "./index-DzHcy3vy.js";
1
+ import { a as compareMacroOrder, i as applyMacros } from "./index-C7U9EiIP.js";
2
2
  export { applyMacros as apply, compareMacroOrder as compareOrder };
package/dist/macro.js CHANGED
@@ -1 +1 @@
1
- export { n as apply, r as compareOrder } from "./macro-9WouvtZe.js";
1
+ export { n as apply, r as compareOrder } from "./macro-3uGSg-ic.js";
@@ -1,7 +1,7 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BV8xUvPy.cjs");
2
- const require_constants = require("./constants-DztHlVmY.cjs");
3
- const require_nodeText = require("./nodeText-CZ7wgxu9.cjs");
4
- const require_visitor = require("./visitor-Bh1CBAOz.cjs");
2
+ const require_constants = require("./constants-BCRkFAiy.cjs");
3
+ const require_nodeText = require("./nodeText-DH4dLGUb.cjs");
4
+ const require_visitor = require("./visitor-DhuKS-7x.cjs");
5
5
  // src/node/index.ts
6
6
  var node_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
7
7
  collect: () => require_visitor.collect,
@@ -16,4 +16,4 @@ Object.defineProperty(exports, "node_exports", {
16
16
  }
17
17
  });
18
18
 
19
- //# sourceMappingURL=node-vTrAIz3e.cjs.map
19
+ //# sourceMappingURL=node-BeccjrHH.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-vTrAIz3e.cjs","names":[],"sources":["../src/node/index.ts"],"sourcesContent":["export { nodeKinds as kinds } from '../constants.ts'\nexport { getNodeText as getText } from '../utils/nodeText.ts'\nexport { collect, transform } from '../visitor.ts'\n"],"mappings":""}
1
+ {"version":3,"file":"node-BeccjrHH.cjs","names":[],"sources":["../src/node/index.ts"],"sourcesContent":["export { nodeKinds as kinds } from '../constants.ts'\nexport { getNodeText as getText } from '../utils/nodeText.ts'\nexport { collect, transform } from '../visitor.ts'\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BYyVTPww.js";
2
- import { t as nodeKinds } from "./constants-BTTus9ee.js";
3
- import { n as getNodeText } from "./nodeText-BSYvDZOH.js";
4
- import { r as transform, t as collect } from "./visitor-XA0W3OVv.js";
2
+ import { t as nodeKinds } from "./constants-UorsTFsa.js";
3
+ import { n as getNodeText } from "./nodeText-DFak5VpX.js";
4
+ import { r as transform, t as collect } from "./visitor-DA5yfOJz.js";
5
5
  // src/node/index.ts
6
6
  var node_exports = /* @__PURE__ */ __exportAll({
7
7
  collect: () => collect,
@@ -11,4 +11,4 @@ var node_exports = /* @__PURE__ */ __exportAll({
11
11
  });
12
12
  export { node_exports as t };
13
13
 
14
- //# sourceMappingURL=node-DtuO3zr8.js.map
14
+ //# sourceMappingURL=node-Dm56432_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-DtuO3zr8.js","names":[],"sources":["../src/node/index.ts"],"sourcesContent":["export { nodeKinds as kinds } from '../constants.ts'\nexport { getNodeText as getText } from '../utils/nodeText.ts'\nexport { collect, transform } from '../visitor.ts'\n"],"mappings":""}
1
+ {"version":3,"file":"node-Dm56432_.js","names":[],"sources":["../src/node/index.ts"],"sourcesContent":["export { nodeKinds as kinds } from '../constants.ts'\nexport { getNodeText as getText } from '../utils/nodeText.ts'\nexport { collect, transform } from '../visitor.ts'\n"],"mappings":""}
package/dist/node.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_constants = require("./constants-DztHlVmY.cjs");
3
- const require_visitor = require("./visitor-Bh1CBAOz.cjs");
4
- const require_nodeText = require("./nodeText-CZ7wgxu9.cjs");
5
- require("./node-vTrAIz3e.cjs");
2
+ const require_constants = require("./constants-BCRkFAiy.cjs");
3
+ const require_visitor = require("./visitor-DhuKS-7x.cjs");
4
+ const require_nodeText = require("./nodeText-DH4dLGUb.cjs");
5
+ require("./node-BeccjrHH.cjs");
6
6
  exports.collect = require_visitor.collect;
7
7
  exports.getText = require_nodeText.getNodeText;
8
8
  exports.kinds = require_constants.nodeKinds;
package/dist/node.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as nodeKinds } from "./base-UFBZi-FO.cjs";
2
- import { a as collect, s as transform } from "./visitor-DnBK2MNl.cjs";
3
- import { n as getNodeText } from "./index-c9FD2S5f.cjs";
1
+ import { i as nodeKinds } from "./base-CyJhBRMi.cjs";
2
+ import { a as collect, s as transform } from "./visitor-VYLe7Q4m.cjs";
3
+ import { n as getNodeText } from "./index-Bcxj7FqZ.cjs";
4
4
  export { collect, getNodeText as getText, nodeKinds as kinds, transform };
package/dist/node.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as nodeKinds } from "./base-LhsPvVY1.js";
2
- import { a as collect, s as transform } from "./visitor-CpmsR8o5.js";
3
- import { n as getNodeText } from "./index-DF7CbpYW.js";
1
+ import { i as nodeKinds } from "./base-A-xF4pUL.js";
2
+ import { a as collect, s as transform } from "./visitor-CqI8T9Qa.js";
3
+ import { n as getNodeText } from "./index-CIUD99Ft.js";
4
4
  export { collect, getNodeText as getText, nodeKinds as kinds, transform };