@kubb/ast 5.23.2 → 5.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{constants-Ckeonm-D.js → constants-BTTus9ee.js} +1 -1
- package/dist/{constants-Ckeonm-D.js.map → constants-BTTus9ee.js.map} +1 -1
- package/dist/{constants-CquR083U.cjs → constants-DztHlVmY.cjs} +1 -1
- package/dist/{constants-CquR083U.cjs.map → constants-DztHlVmY.cjs.map} +1 -1
- package/dist/factory.cjs +3 -3
- package/dist/factory.d.cts +4 -4
- package/dist/factory.d.ts +4 -4
- package/dist/factory.js +3 -3
- package/dist/{file-xJnBQPGq.d.ts → file-B269mZh4.d.cts} +96 -40
- package/dist/file-Bq2GPaxh.js +427 -0
- package/dist/file-Bq2GPaxh.js.map +1 -0
- package/dist/file-C4pqV8yl.cjs +469 -0
- package/dist/file-C4pqV8yl.cjs.map +1 -0
- package/dist/{file-CvlMAp_d.js → file-D_ih0x7q.js} +32 -19
- package/dist/file-D_ih0x7q.js.map +1 -0
- package/dist/{file-Dd50jPkH.cjs → file-DiPZBLSP.cjs} +32 -19
- package/dist/file-DiPZBLSP.cjs.map +1 -0
- package/dist/{file-BVqSiSvV.d.cts → file-oLlejzZV.d.ts} +96 -40
- package/dist/file.cjs +5 -2
- package/dist/file.d.cts +2 -2
- package/dist/file.d.ts +2 -2
- package/dist/file.js +3 -1
- package/dist/{graph-BcwFCvei.js → graph-BUEOBomo.js} +5 -5
- package/dist/{graph-BcwFCvei.js.map → graph-BUEOBomo.js.map} +1 -1
- package/dist/{graph-DcIY6tQb.cjs → graph-CFJ4wzFR.cjs} +5 -5
- package/dist/{graph-DcIY6tQb.cjs.map → graph-CFJ4wzFR.cjs.map} +1 -1
- package/dist/graph.cjs +1 -1
- package/dist/graph.d.cts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +1 -1
- package/dist/{guards-COVJE6TU.cjs → guards-4drgx10i.cjs} +1 -1
- package/dist/{guards-COVJE6TU.cjs.map → guards-4drgx10i.cjs.map} +1 -1
- package/dist/{guards-DlJkKsT1.js → guards-DKw4uwc5.js} +1 -1
- package/dist/{guards-DlJkKsT1.js.map → guards-DKw4uwc5.js.map} +1 -1
- package/dist/{guards-D-h9R_sV.d.ts → guards-RCnH6re9.d.ts} +1 -1
- package/dist/{guards-B8qDgSaT.d.cts → guards-u-dAAtl8.d.cts} +1 -1
- package/dist/{http-DwboM6pK.js → http-CAWf6TAJ.js} +2 -2
- package/dist/http-CAWf6TAJ.js.map +1 -0
- package/dist/{http-Bm5lhVK4.cjs → http-Dv8py6wh.cjs} +2 -2
- package/dist/http-Dv8py6wh.cjs.map +1 -0
- package/dist/http.cjs +2 -2
- package/dist/http.d.cts +2 -2
- package/dist/http.d.ts +2 -2
- package/dist/http.js +2 -2
- package/dist/{index-eGkM4FE9.d.ts → index-2TMYDLjK.d.ts} +1 -1
- package/dist/index-6-ZZCX9W.d.ts +24 -0
- package/dist/index-B2nnOQjf.d.cts +24 -0
- package/dist/{index-Csf8xsCc.d.cts → index-BgFaJtnv.d.ts} +11 -5
- package/dist/index-Bj7a0aSM.d.cts +5 -0
- package/dist/{index-DKJdlX1l.d.cts → index-Bw2oMIM1.d.cts} +4 -4
- package/dist/{index-Bb1kqq8H.d.cts → index-C1za72gL.d.cts} +1 -1
- package/dist/index-CW-ztJjd.d.ts +5 -0
- package/dist/{index-CoRdlrVx.d.ts → index-DF7CbpYW.d.ts} +3 -3
- package/dist/{index-CwLhqYbA.d.cts → index-D_WLsIMP.d.cts} +2 -2
- package/dist/{index-Dp50LM3a.d.ts → index-DbAnYRRM.d.ts} +1 -1
- package/dist/{index-cpjUxIik.d.ts → index-DbQ-J072.d.cts} +11 -5
- package/dist/{index-CFH4ZC7q.d.ts → index-DfRcRYF2.d.ts} +1 -1
- package/dist/{index-DU_jYpBt.d.cts → index-DpnCCtXt.d.cts} +1 -1
- package/dist/{index-BSf-ETQP.d.ts → index-DzHcy3vy.d.ts} +2 -2
- package/dist/{index-W6yFx0sy.d.ts → index-UwSVys3m.d.ts} +4 -4
- package/dist/{index-BVuX3-Th.d.cts → index-c9FD2S5f.d.cts} +3 -3
- package/dist/{index-DYDha-3I.d.cts → index-sdprVPKQ.d.cts} +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +16 -16
- package/dist/{json-DURdtz9A.cjs → json-CCWMgzJZ.cjs} +2 -2
- package/dist/{json-DURdtz9A.cjs.map → json-CCWMgzJZ.cjs.map} +1 -1
- package/dist/{json-DH7_lcWm.js → json-DyDtIZTj.js} +2 -2
- package/dist/{json-DH7_lcWm.js.map → json-DyDtIZTj.js.map} +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.d.cts +1 -1
- package/dist/json.d.ts +1 -1
- package/dist/json.js +1 -1
- package/dist/{macro-4N8vHE-2.js → macro-9WouvtZe.js} +2 -2
- package/dist/{macro-4N8vHE-2.js.map → macro-9WouvtZe.js.map} +1 -1
- package/dist/{macro-V_cNODx2.cjs → macro-BEwfGNu1.cjs} +2 -2
- package/dist/{macro-V_cNODx2.cjs.map → macro-BEwfGNu1.cjs.map} +1 -1
- package/dist/macro.cjs +1 -1
- package/dist/macro.d.cts +1 -1
- package/dist/macro.d.ts +1 -1
- package/dist/macro.js +1 -1
- package/dist/{mediaType-D8uIO8sG.cjs → mediaType-BbIfudh0.cjs} +1 -1
- package/dist/{mediaType-D8uIO8sG.cjs.map → mediaType-BbIfudh0.cjs.map} +1 -1
- package/dist/{mediaType-CRjggmoG.js → mediaType-DXQCNYdM.js} +1 -1
- package/dist/{mediaType-CRjggmoG.js.map → mediaType-DXQCNYdM.js.map} +1 -1
- package/dist/mediaType.cjs +1 -1
- package/dist/mediaType.d.cts +1 -1
- package/dist/mediaType.d.ts +1 -1
- package/dist/mediaType.js +1 -1
- package/dist/{node-Djh-mZB2.js → node-DtuO3zr8.js} +4 -4
- package/dist/{node-Djh-mZB2.js.map → node-DtuO3zr8.js.map} +1 -1
- package/dist/{node-DjcETnc8.cjs → node-vTrAIz3e.cjs} +4 -4
- package/dist/{node-DjcETnc8.cjs.map → node-vTrAIz3e.cjs.map} +1 -1
- package/dist/node.cjs +4 -4
- package/dist/node.d.cts +3 -3
- package/dist/node.d.ts +3 -3
- package/dist/node.js +4 -4
- package/dist/{nodeText-DVVDZQjF.js → nodeText-BSYvDZOH.js} +2 -2
- package/dist/{nodeText-DVVDZQjF.js.map → nodeText-BSYvDZOH.js.map} +1 -1
- package/dist/{nodeText-DRb_rVd1.cjs → nodeText-CZ7wgxu9.cjs} +2 -2
- package/dist/{nodeText-DRb_rVd1.cjs.map → nodeText-CZ7wgxu9.cjs.map} +1 -1
- package/dist/{nodes-CWMa9xhW.js → nodes-ClL1C158.js} +5 -5
- package/dist/nodes-ClL1C158.js.map +1 -0
- package/dist/{nodes-BB60Bq2H.cjs → nodes-DEQjVliP.cjs} +5 -5
- package/dist/nodes-DEQjVliP.cjs.map +1 -0
- package/dist/{operation-X7chCdL2.d.cts → operation-AFw8tzIN.d.cts} +22 -6
- package/dist/{operation-BgRyVS7z.d.ts → operation-Cu4XSaJQ.d.ts} +22 -6
- package/dist/{optionality-D-zqzVMH.cjs → optionality-C-qULYxo.cjs} +1 -1
- package/dist/{optionality-D-zqzVMH.cjs.map → optionality-C-qULYxo.cjs.map} +1 -1
- package/dist/{optionality-DISn8ytP.js → optionality-FkRredTC.js} +1 -1
- package/dist/{optionality-DISn8ytP.js.map → optionality-FkRredTC.js.map} +1 -1
- package/dist/{promise-RpnEev9D.js → promise-B3YkZ4C8.js} +1 -1
- package/dist/{promise-RpnEev9D.js.map → promise-B3YkZ4C8.js.map} +1 -1
- package/dist/{promise-BOdlgT0N.cjs → promise-DScaykew.cjs} +1 -1
- package/dist/{promise-BOdlgT0N.cjs.map → promise-DScaykew.cjs.map} +1 -1
- package/dist/{ref-P0ZLT1Bg.cjs → ref-Bh5Xo8T7.cjs} +4 -4
- package/dist/{ref-P0ZLT1Bg.cjs.map → ref-Bh5Xo8T7.cjs.map} +1 -1
- package/dist/{ref-Bu7PoHar.js → ref-DPqeS8K1.js} +4 -4
- package/dist/{ref-Bu7PoHar.js.map → ref-DPqeS8K1.js.map} +1 -1
- package/dist/ref.cjs +2 -2
- package/dist/ref.d.cts +1 -1
- package/dist/ref.d.ts +1 -1
- package/dist/ref.js +2 -2
- package/dist/{refs-YCV3CznS.js → refs-Bgf8_9Ui.js} +2 -2
- package/dist/{refs-YCV3CznS.js.map → refs-Bgf8_9Ui.js.map} +1 -1
- package/dist/{refs-CYHpRlQo.cjs → refs-rmr2LFV1.cjs} +2 -2
- package/dist/{refs-CYHpRlQo.cjs.map → refs-rmr2LFV1.cjs.map} +1 -1
- package/dist/{schema-DloctnMm.js → schema-4UcdIPQ2.js} +7 -7
- package/dist/{schema-DloctnMm.js.map → schema-4UcdIPQ2.js.map} +1 -1
- package/dist/{schema-BIErWqgc.cjs → schema-DuCY4lCG.cjs} +7 -7
- package/dist/{schema-BIErWqgc.cjs.map → schema-DuCY4lCG.cjs.map} +1 -1
- package/dist/{schema-hxMlgCrV.cjs → schema-gSjYgaCl.cjs} +2 -2
- package/dist/schema-gSjYgaCl.cjs.map +1 -0
- package/dist/{schema-2ZAQk7qE.js → schema-tH14gE6i.js} +2 -2
- package/dist/schema-tH14gE6i.js.map +1 -0
- package/dist/schema.cjs +5 -5
- package/dist/schema.d.cts +4 -4
- package/dist/schema.d.ts +4 -4
- package/dist/schema.js +5 -5
- package/dist/{visitor-DTrzvA3R.cjs → visitor-Bh1CBAOz.cjs} +4 -5
- package/dist/{visitor-DTrzvA3R.cjs.map → visitor-Bh1CBAOz.cjs.map} +1 -1
- package/dist/{visitor-1TSWTMe1.d.ts → visitor-CpmsR8o5.d.ts} +2 -2
- package/dist/{visitor-CUbaaX8R.d.cts → visitor-DnBK2MNl.d.cts} +2 -2
- package/dist/{visitor-NoQSUQTu.js → visitor-XA0W3OVv.js} +4 -5
- package/dist/{visitor-NoQSUQTu.js.map → visitor-XA0W3OVv.js.map} +1 -1
- package/package.json +1 -1
- package/dist/file-Cg0T6cgz.cjs +0 -319
- package/dist/file-Cg0T6cgz.cjs.map +0 -1
- package/dist/file-CnuL8oUj.js +0 -283
- package/dist/file-CnuL8oUj.js.map +0 -1
- package/dist/file-CvlMAp_d.js.map +0 -1
- package/dist/file-Dd50jPkH.cjs.map +0 -1
- package/dist/http-Bm5lhVK4.cjs.map +0 -1
- package/dist/http-DwboM6pK.js.map +0 -1
- package/dist/index-BWd95onW.d.cts +0 -5
- package/dist/index-BwnMIoLl.d.ts +0 -24
- package/dist/index-DSVef1pp.d.cts +0 -24
- package/dist/index-DaHsMJ_S.d.ts +0 -5
- package/dist/nodes-BB60Bq2H.cjs.map +0 -1
- package/dist/nodes-CWMa9xhW.js.map +0 -1
- package/dist/schema-2ZAQk7qE.js.map +0 -1
- package/dist/schema-hxMlgCrV.cjs.map +0 -1
- /package/dist/{base-IpYuh3ZP.d.cts → base-LhsPvVY1.d.ts} +0 -0
- /package/dist/{base-IpYuh3ZP.d.ts → base-UFBZi-FO.d.cts} +0 -0
- /package/dist/{index-Cc2K3OzU.d.cts → index-C-nsgwuD.d.ts} +0 -0
- /package/dist/{index-Cc2K3OzU.d.ts → index-DR9ahJ-x.d.cts} +0 -0
package/dist/graph.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as getCircularNames, n as getImportedNames, r as getRefNames, i as getUsedNames } from "./graph-
|
|
1
|
+
export { a as getCircularNames, n as getImportedNames, r as getRefNames, i as getUsedNames } from "./graph-BUEOBomo.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards-
|
|
1
|
+
{"version":3,"file":"guards-4drgx10i.cjs","names":[],"sources":["../src/guards.ts"],"sourcesContent":["import type { HttpOperationNode, OperationNode } from './nodes/operation.ts'\nimport type { SchemaNode, SchemaNodeByType } from './nodes/schema.ts'\n\n/**\n * Narrows a `SchemaNode` to the variant that matches `type`.\n *\n * @example\n * ```ts\n * const schema = createSchema({ type: 'string' })\n * const stringNode = narrowSchema(schema, 'string') // StringSchemaNode | null\n * ```\n */\nexport function narrowSchema<T extends SchemaNode['type']>(node: SchemaNode | undefined, type: T): SchemaNodeByType[T] | null {\n return node?.type === type ? (node as SchemaNodeByType[T]) : null\n}\n\n/**\n * Narrows an `OperationNode` to an `HttpOperationNode` so `method` and `path` are present.\n *\n * @example\n * ```ts\n * if (ast.http.isOperation(node)) {\n * console.log(node.method, node.path)\n * }\n * ```\n */\nexport function isHttpOperationNode(node: OperationNode): node is HttpOperationNode {\n return node.protocol === 'http' || (node.method !== undefined && node.path !== undefined)\n}\n"],"mappings":";;;;;;;;;;;AAYA,SAAgB,aAA2C,MAA8B,MAAqC;CAC5H,OAAO,MAAM,SAAS,OAAQ,OAA+B;AAC/D;;;;;;;;;;;AAYA,SAAgB,oBAAoB,MAAgD;CAClF,OAAO,KAAK,aAAa,UAAW,KAAK,WAAW,KAAA,KAAa,KAAK,SAAS,KAAA;AACjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards-
|
|
1
|
+
{"version":3,"file":"guards-DKw4uwc5.js","names":[],"sources":["../src/guards.ts"],"sourcesContent":["import type { HttpOperationNode, OperationNode } from './nodes/operation.ts'\nimport type { SchemaNode, SchemaNodeByType } from './nodes/schema.ts'\n\n/**\n * Narrows a `SchemaNode` to the variant that matches `type`.\n *\n * @example\n * ```ts\n * const schema = createSchema({ type: 'string' })\n * const stringNode = narrowSchema(schema, 'string') // StringSchemaNode | null\n * ```\n */\nexport function narrowSchema<T extends SchemaNode['type']>(node: SchemaNode | undefined, type: T): SchemaNodeByType[T] | null {\n return node?.type === type ? (node as SchemaNodeByType[T]) : null\n}\n\n/**\n * Narrows an `OperationNode` to an `HttpOperationNode` so `method` and `path` are present.\n *\n * @example\n * ```ts\n * if (ast.http.isOperation(node)) {\n * console.log(node.method, node.path)\n * }\n * ```\n */\nexport function isHttpOperationNode(node: OperationNode): node is HttpOperationNode {\n return node.protocol === 'http' || (node.method !== undefined && node.path !== undefined)\n}\n"],"mappings":";;;;;;;;;;;AAYA,SAAgB,aAA2C,MAA8B,MAAqC;CAC5H,OAAO,MAAM,SAAS,OAAQ,OAA+B;AAC/D;;;;;;;;;;;AAYA,SAAgB,oBAAoB,MAAgD;CAClF,OAAO,KAAK,aAAa,UAAW,KAAK,WAAW,KAAA,KAAa,KAAK,SAAS,KAAA;AACjF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as SchemaNode, W as SchemaNodeByType, i as OperationNode, r as HttpOperationNode } from "./operation-Cu4XSaJQ.js";
|
|
2
2
|
/**
|
|
3
3
|
* Narrows a `SchemaNode` to the variant that matches `type`.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as SchemaNode, W as SchemaNodeByType, i as OperationNode, r as HttpOperationNode } from "./operation-AFw8tzIN.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Narrows a `SchemaNode` to the variant that matches `type`.
|
|
4
4
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BYyVTPww.js";
|
|
2
|
-
import { t as isHttpOperationNode } from "./guards-
|
|
2
|
+
import { t as isHttpOperationNode } from "./guards-DKw4uwc5.js";
|
|
3
3
|
// src/http/index.ts
|
|
4
4
|
var http_exports = /* @__PURE__ */ __exportAll({ isOperation: () => isHttpOperationNode });
|
|
5
5
|
export { http_exports as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=http-
|
|
7
|
+
//# sourceMappingURL=http-CAWf6TAJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-CAWf6TAJ.js","names":[],"sources":["../src/http/index.ts"],"sourcesContent":["export { isHttpOperationNode as isOperation } from '../guards.ts'\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BV8xUvPy.cjs");
|
|
2
|
-
const require_guards = require("./guards-
|
|
2
|
+
const require_guards = require("./guards-4drgx10i.cjs");
|
|
3
3
|
// src/http/index.ts
|
|
4
4
|
var http_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({ isOperation: () => require_guards.isHttpOperationNode });
|
|
5
5
|
Object.defineProperty(exports, "http_exports", {
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "http_exports", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=http-
|
|
12
|
+
//# sourceMappingURL=http-Dv8py6wh.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-Dv8py6wh.cjs","names":[],"sources":["../src/http/index.ts"],"sourcesContent":["export { isHttpOperationNode as isOperation } from '../guards.ts'\n"],"mappings":""}
|
package/dist/http.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_guards = require("./guards-
|
|
3
|
-
require("./http-
|
|
2
|
+
const require_guards = require("./guards-4drgx10i.cjs");
|
|
3
|
+
require("./http-Dv8py6wh.cjs");
|
|
4
4
|
exports.isOperation = require_guards.isHttpOperationNode;
|
package/dist/http.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as isHttpOperationNode } from "./guards-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { t as isHttpOperationNode } from "./guards-u-dAAtl8.cjs";
|
|
2
|
+
import "./index-Bj7a0aSM.cjs";
|
|
3
3
|
export { isHttpOperationNode as isOperation };
|
package/dist/http.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as isHttpOperationNode } from "./guards-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { t as isHttpOperationNode } from "./guards-RCnH6re9.js";
|
|
2
|
+
import "./index-CW-ztJjd.js";
|
|
3
3
|
export { isHttpOperationNode as isOperation };
|
package/dist/http.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as isOperation } from "./guards-
|
|
2
|
-
import "./http-
|
|
1
|
+
export { t as isOperation } from "./guards-DKw4uwc5.js";
|
|
2
|
+
import "./http-CAWf6TAJ.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
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-oLlejzZV.js";
|
|
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-Cu4XSaJQ.js";
|
|
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 };
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Union of all AST node types.
|
|
8
|
+
*
|
|
9
|
+
* This lets TypeScript narrow types in `switch (node.kind)` blocks.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* function getKind(node: Node): string {
|
|
14
|
+
* switch (node.kind) {
|
|
15
|
+
* case nodeKinds.input:
|
|
16
|
+
* return 'input'
|
|
17
|
+
* default:
|
|
18
|
+
* return 'other'
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
type Node = InputNode | OperationNode | SchemaNode | PropertyNode | ParameterNode | ResponseNode | RequestBodyNode | ContentNode | FileNode | ImportNode | ExportNode | SourceNode | ConstNode | TypeNode | FunctionNode | ArrowFunctionNode | TextNode | BreakNode | JsxNode;
|
|
24
|
+
export { index_d_exports as n, Node as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
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";
|
|
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 };
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Union of all AST node types.
|
|
8
|
+
*
|
|
9
|
+
* This lets TypeScript narrow types in `switch (node.kind)` blocks.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* function getKind(node: Node): string {
|
|
14
|
+
* switch (node.kind) {
|
|
15
|
+
* case nodeKinds.input:
|
|
16
|
+
* return 'input'
|
|
17
|
+
* default:
|
|
18
|
+
* return 'other'
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
type Node = InputNode | OperationNode | SchemaNode | PropertyNode | ParameterNode | ResponseNode | RequestBodyNode | ContentNode | FileNode | ImportNode | ExportNode | SourceNode | ConstNode | TypeNode | FunctionNode | ArrowFunctionNode | TextNode | BreakNode | JsxNode;
|
|
24
|
+
export { index_d_exports as n, Node as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as FileNode } from "./file-
|
|
1
|
+
import { a as ImportNode, c as Space, n as ExportNode, o as ModuleName, r as FileNode, s as SourceNode } from "./file-oLlejzZV.js";
|
|
2
2
|
type InlineFilesResult = {
|
|
3
3
|
/**
|
|
4
4
|
* Files that imported an inline name, rewritten to hold its definition.
|
|
@@ -36,11 +36,17 @@ type InlineFilesOptions = {
|
|
|
36
36
|
language: (file: FileNode) => InlineLanguage | undefined;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
-
* Replaces every name a file imports from a virtual file (one
|
|
40
|
-
*
|
|
39
|
+
* Replaces every name a file imports from a virtual file (one marked `inline`, so it is never written) with the body of that name's
|
|
40
|
+
* declaration, until no inline names are left. The definitions' own imports move to the importing file.
|
|
41
41
|
*/
|
|
42
42
|
declare function inlineFiles(files: ReadonlyArray<FileNode>, { language }: InlineFilesOptions): InlineFilesResult;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the names an import or export brings across. A node built with the deprecated fields gets them from
|
|
45
|
+
* those, each with an explicit `space`, so it prints exactly as before.
|
|
46
|
+
*/
|
|
47
|
+
declare function getNames(node: ImportNode | ExportNode): Array<ModuleName>;
|
|
48
|
+
declare function getSpace(source: SourceNode): Space;
|
|
43
49
|
declare namespace index_d_exports {
|
|
44
|
-
export { inlineFiles as inline };
|
|
50
|
+
export { getNames, getSpace, inlineFiles as inline };
|
|
45
51
|
}
|
|
46
|
-
export { InlineLanguage as n,
|
|
52
|
+
export { inlineFiles as a, InlineLanguage as i, getNames as n, getSpace as r, index_d_exports as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as schemaTypes } from "./base-
|
|
3
|
-
import { n as narrowSchema } from "./guards-
|
|
4
|
-
import { o as findSchema } from "./visitor-
|
|
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";
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { i as nodeKinds } from "./base-
|
|
2
|
-
import {
|
|
3
|
-
import { a as collect, s as transform } from "./visitor-
|
|
1
|
+
import { i as nodeKinds } from "./base-LhsPvVY1.js";
|
|
2
|
+
import { g as CodeNode } from "./file-oLlejzZV.js";
|
|
3
|
+
import { a as collect, s as transform } from "./visitor-CpmsR8o5.js";
|
|
4
4
|
/**
|
|
5
5
|
* Extracts all string content from a `CodeNode` tree recursively.
|
|
6
6
|
* Collects the text fields and nested node content, to build the source string for import filtering.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Node } from "./index-
|
|
2
|
-
import { i as VisitorKey, n as VisitorContext, r as VisitorDepth, t as Visitor } from "./visitor-
|
|
1
|
+
import { t as Node } from "./index-B2nnOQjf.cjs";
|
|
2
|
+
import { i as VisitorKey, n as VisitorContext, r as VisitorDepth, t as Visitor } from "./visitor-DnBK2MNl.cjs";
|
|
3
3
|
/**
|
|
4
4
|
* Ordering hint shared by macros and plugins. `pre` runs before unmarked items, `post` after,
|
|
5
5
|
* and `undefined` keeps declaration order.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as SchemaNode, i as OperationNode } from "./operation-Cu4XSaJQ.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 { n as FileNode } from "./file-
|
|
1
|
+
import { a as ImportNode, c as Space, n as ExportNode, o as ModuleName, r as FileNode, s as SourceNode } from "./file-B269mZh4.cjs";
|
|
2
2
|
type InlineFilesResult = {
|
|
3
3
|
/**
|
|
4
4
|
* Files that imported an inline name, rewritten to hold its definition.
|
|
@@ -36,11 +36,17 @@ type InlineFilesOptions = {
|
|
|
36
36
|
language: (file: FileNode) => InlineLanguage | undefined;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
-
* Replaces every name a file imports from a virtual file (one
|
|
40
|
-
*
|
|
39
|
+
* Replaces every name a file imports from a virtual file (one marked `inline`, so it is never written) with the body of that name's
|
|
40
|
+
* declaration, until no inline names are left. The definitions' own imports move to the importing file.
|
|
41
41
|
*/
|
|
42
42
|
declare function inlineFiles(files: ReadonlyArray<FileNode>, { language }: InlineFilesOptions): InlineFilesResult;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the names an import or export brings across. A node built with the deprecated fields gets them from
|
|
45
|
+
* those, each with an explicit `space`, so it prints exactly as before.
|
|
46
|
+
*/
|
|
47
|
+
declare function getNames(node: ImportNode | ExportNode): Array<ModuleName>;
|
|
48
|
+
declare function getSpace(source: SourceNode): Space;
|
|
43
49
|
declare namespace index_d_exports {
|
|
44
|
-
export { inlineFiles as inline };
|
|
50
|
+
export { getNames, getSpace, inlineFiles as inline };
|
|
45
51
|
}
|
|
46
|
-
export { InlineLanguage as n,
|
|
52
|
+
export { inlineFiles as a, InlineLanguage as i, getNames as n, getSpace as r, index_d_exports as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Node } from "./index-
|
|
2
|
-
import { i as VisitorKey, n as VisitorContext, r as VisitorDepth, t as Visitor } from "./visitor-
|
|
1
|
+
import { t as Node } from "./index-6-ZZCX9W.js";
|
|
2
|
+
import { i as VisitorKey, n as VisitorContext, r as VisitorDepth, t as Visitor } from "./visitor-CpmsR8o5.js";
|
|
3
3
|
/**
|
|
4
4
|
* Ordering hint shared by macros and plugins. `pre` runs before unmarked items, `post` after,
|
|
5
5
|
* and `undefined` keeps declaration order.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as schemaTypes } from "./base-
|
|
3
|
-
import { n as narrowSchema } from "./guards-
|
|
4
|
-
import { o as findSchema } from "./visitor-
|
|
1
|
+
import { K as StringSchemaNode, U as SchemaNode, Z as PropertyNode } from "./operation-Cu4XSaJQ.js";
|
|
2
|
+
import { a as schemaTypes } from "./base-LhsPvVY1.js";
|
|
3
|
+
import { n as narrowSchema } from "./guards-RCnH6re9.js";
|
|
4
|
+
import { o as findSchema } from "./visitor-CpmsR8o5.js";
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { i as nodeKinds } from "./base-
|
|
2
|
-
import {
|
|
3
|
-
import { a as collect, s as transform } from "./visitor-
|
|
1
|
+
import { i as nodeKinds } from "./base-UFBZi-FO.cjs";
|
|
2
|
+
import { g as CodeNode } from "./file-B269mZh4.cjs";
|
|
3
|
+
import { a as collect, s as transform } from "./visitor-DnBK2MNl.cjs";
|
|
4
4
|
/**
|
|
5
5
|
* Extracts all string content from a `CodeNode` tree recursively.
|
|
6
6
|
* Collects the text fields and nested node content, to build the source string for import filtering.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as SchemaNode, i as OperationNode } from "./operation-AFw8tzIN.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
|
package/dist/index.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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-
|
|
4
|
-
const require_graph = require("./graph-
|
|
5
|
-
const require_visitor = require("./visitor-
|
|
6
|
-
const require_ref = require("./ref-
|
|
7
|
-
const require_schema = require("./schema-
|
|
8
|
-
const require_guards = require("./guards-
|
|
9
|
-
const require_refs = require("./refs-
|
|
10
|
-
const require_macro = require("./macro-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const require_file = require("./file-
|
|
14
|
-
const require_nodeText = require("./nodeText-
|
|
15
|
-
const require_nodes = require("./nodes-
|
|
16
|
-
const require_http = require("./http-
|
|
17
|
-
const require_json = require("./json-
|
|
18
|
-
const require_mediaType = require("./mediaType-
|
|
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");
|
|
8
|
+
const require_guards = require("./guards-4drgx10i.cjs");
|
|
9
|
+
const require_refs = require("./refs-rmr2LFV1.cjs");
|
|
10
|
+
const require_macro = require("./macro-BEwfGNu1.cjs");
|
|
11
|
+
const require_node = require("./node-vTrAIz3e.cjs");
|
|
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");
|
|
16
|
+
const require_http = require("./http-Dv8py6wh.cjs");
|
|
17
|
+
const require_json = require("./json-CCWMgzJZ.cjs");
|
|
18
|
+
const require_mediaType = require("./mediaType-BbIfudh0.cjs");
|
|
19
19
|
// src/createPrinter.ts
|
|
20
20
|
/**
|
|
21
21
|
* Creates a schema printer: a function that takes a `SchemaNode` and emits
|
package/dist/index.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
3
|
-
import { t as index_d_exports$4 } from "./index-
|
|
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-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { _ as
|
|
8
|
-
import { A as ArraySchemaNode, B as
|
|
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-
|
|
10
|
-
import { n as getNodeText, t as index_d_exports$8 } from "./index-
|
|
11
|
-
import { n as index_d_exports$1, t as Node } from "./index-
|
|
12
|
-
import { t as index_d_exports$5 } from "./index-
|
|
13
|
-
import { n as index_d_exports$7 } from "./index-
|
|
14
|
-
import { n as DistributiveOmit, r as NodeKind } from "./base-
|
|
15
|
-
import { a as collect$1, n as VisitorContext, o as findSchema$1, s as transform$1, t as Visitor } from "./visitor-
|
|
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";
|
|
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";
|
|
16
16
|
/**
|
|
17
17
|
* Runtime context passed to printer handlers, both as `this` and as the second argument.
|
|
18
18
|
*
|
|
@@ -314,6 +314,6 @@ export declare const collect: typeof collect$1;
|
|
|
314
314
|
/** @deprecated Use `ast.file.inline`. Removed in Kubb v6. */
|
|
315
315
|
export declare const inlineFiles: typeof inlineFiles$1;
|
|
316
316
|
declare namespace index_d_exports {
|
|
317
|
-
export { ArraySchemaNode, ArrowFunctionNode, AuthCredential, AuthRequirement, AuthScheme, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExampleNode, ExportNode, ExternalDocs, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InlineLanguage, InputMeta, InputNode, InputServer, InputTag, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, 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, 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 };
|
|
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
318
|
}
|
|
319
|
-
export { type ArraySchemaNode, type ArrowFunctionNode, type AuthCredential, type AuthRequirement, type AuthScheme, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateSchemaNode, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExampleNode, type ExportNode, type ExternalDocs, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputServer, type InputTag, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, 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 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
3
|
-
import { t as index_d_exports$4 } from "./index-
|
|
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-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { _ as
|
|
8
|
-
import { A as ArraySchemaNode, B as
|
|
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-
|
|
10
|
-
import { n as getNodeText, t as index_d_exports$8 } from "./index-
|
|
11
|
-
import { n as index_d_exports$1, t as Node } from "./index-
|
|
12
|
-
import { t as index_d_exports$5 } from "./index-
|
|
13
|
-
import { n as index_d_exports$7 } from "./index-
|
|
14
|
-
import { n as DistributiveOmit, r as NodeKind } from "./base-
|
|
15
|
-
import { a as collect$1, n as VisitorContext, o as findSchema$1, s as transform$1, t as Visitor } from "./visitor-
|
|
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";
|
|
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";
|
|
16
16
|
/**
|
|
17
17
|
* Runtime context passed to printer handlers, both as `this` and as the second argument.
|
|
18
18
|
*
|
|
@@ -314,6 +314,6 @@ export declare const collect: typeof collect$1;
|
|
|
314
314
|
/** @deprecated Use `ast.file.inline`. Removed in Kubb v6. */
|
|
315
315
|
export declare const inlineFiles: typeof inlineFiles$1;
|
|
316
316
|
declare namespace index_d_exports {
|
|
317
|
-
export { ArraySchemaNode, ArrowFunctionNode, AuthCredential, AuthRequirement, AuthScheme, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, DatetimeSchemaNode, DistributiveOmit, EncodingNode, Enforce, EnumSchemaNode, ExampleNode, ExportNode, ExternalDocs, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InlineLanguage, InputMeta, InputNode, InputServer, InputTag, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, 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, 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 };
|
|
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
318
|
}
|
|
319
|
-
export { type ArraySchemaNode, type ArrowFunctionNode, type AuthCredential, type AuthRequirement, type AuthScheme, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateSchemaNode, type DatetimeSchemaNode, type DistributiveOmit, type EncodingNode, type Enforce, type EnumSchemaNode, type ExampleNode, type ExportNode, type ExternalDocs, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InlineLanguage, type InputMeta, type InputNode, type InputServer, type InputTag, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, 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 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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-
|
|
3
|
-
import { a as findCircularSchemas$1, i as collectUsedSchemaNames$1, n as collectImportedRefNames$1, r as collectSchemaRefs$1, t as graph_exports } from "./graph-
|
|
4
|
-
import { n as findSchema$1, r as transform$1, t as collect$1 } from "./visitor-
|
|
5
|
-
import { r as ref_exports, t as getName } from "./ref-
|
|
6
|
-
import { a as resolveSchemaProperties$1, i as inferDiscriminatorPropertyName$1, n as schema_exports, r as getSchemaLiteralValues$1 } from "./schema-
|
|
7
|
-
import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-
|
|
8
|
-
import { i as resolveRef$1, n as mergeRefWithSchema$1, t as isBareRef$1 } from "./refs-
|
|
9
|
-
import { i as defineMacro$1, n as applyMacros$1, r as compareMacroOrder, t as macro_exports } from "./macro-
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { n as inlineFiles$1, t as file_exports } from "./file-
|
|
13
|
-
import { n as getNodeText } from "./nodeText-
|
|
14
|
-
import { t as nodes_exports } from "./nodes-
|
|
15
|
-
import { t as http_exports } from "./http-
|
|
16
|
-
import { t as json_exports } from "./json-
|
|
17
|
-
import { r as mediaType_exports } from "./mediaType-
|
|
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";
|
|
7
|
+
import { n as narrowSchema$1, t as isHttpOperationNode$1 } from "./guards-DKw4uwc5.js";
|
|
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";
|
|
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";
|
|
15
|
+
import { t as http_exports } from "./http-CAWf6TAJ.js";
|
|
16
|
+
import { t as json_exports } from "./json-DyDtIZTj.js";
|
|
17
|
+
import { r as mediaType_exports } from "./mediaType-DXQCNYdM.js";
|
|
18
18
|
// src/createPrinter.ts
|
|
19
19
|
/**
|
|
20
20
|
* Creates a schema printer: a function that takes a `SchemaNode` and emits
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BV8xUvPy.cjs");
|
|
2
|
-
const require_constants = require("./constants-
|
|
2
|
+
const require_constants = require("./constants-DztHlVmY.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-
|
|
91
|
+
//# sourceMappingURL=json-CCWMgzJZ.cjs.map
|