@kubb/ast 5.0.0-beta.93 → 5.0.0-beta.94
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/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/{types-Dno_xT4x.d.ts → types-CsAwiskn.d.ts} +9 -7
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __name, t as __exportAll } from "./rolldown-runtime-CNktS9qV.js";
|
|
2
|
-
import { $ as sourceDef, $t as NodeDef, A as StatusCode, At as BreakNode, B as parameterDef, Bt as constDef, C as GenericOperationNode, Ct as PropertyNode, D as createOperation, Dt as InferSchemaNode, E as OperationNode, Et as propertyDef, F as requestBodyDef, Ft as JsxNode, G as UserFileNode, Gt as createJsx, H as FileNode, Ht as createBreak, I as ParameterLocation, It as TextNode, J as createImport, Jt as functionDef, K as createExport, Kt as createText, L as ParameterNode, Lt as TypeNode, M as responseDef, Mt as ConstNode, N as RequestBodyNode, Nt as FunctionNode, O as operationDef, Ot as ParserOptions, P as createRequestBody, Pt as JSDocNode, Q as importDef, Qt as DistributiveOmit, R as ParameterStyle, Rt as arrowFunctionDef, S as inputDef, St as schemaDef, T as HttpOperationNode, Tt as createProperty, U as ImportNode, Ut as createConst, V as ExportNode, Vt as createArrowFunction, W as SourceNode, Wt as createFunction, X as exportDef, Xt as textDef, Y as createSource, Yt as jsxDef, Z as fileDef, Zt as typeDef, _ as createOutput, _t as StringSchemaNode, a as Enforce, at as DatetimeSchemaNode, b as InputNode, bt as UrlSchemaNode, c as composeMacros, ct as NumberSchemaNode, d as Visitor, dt as RefSchemaNode, en as defineNode, et as ContentNode, f as VisitorContext, ft as ScalarSchemaNode, g as OutputNode, gt as SchemaType, h as Node, ht as SchemaNodeByType, i as createPrinter, it as DateSchemaNode, j as createResponse, jt as CodeNode, k as ResponseNode, kt as ArrowFunctionNode, l as defineMacro, lt as ObjectSchemaNode, m as transform, mt as SchemaNode, n as PrinterFactoryOptions, nn as NodeKind, nt as createContent, o as Macro, ot as EnumSchemaNode, p as collect, pt as ScalarSchemaType, q as createFile, qt as createType, r as PrinterPartial, rn as schemaTypes, rt as ArraySchemaNode, s as applyMacros, st as IntersectionSchemaNode, t as Printer, tn as BaseNode, tt as contentDef, u as ParentOf, ut as PrimitiveSchemaType, v as outputDef, vt as TimeSchemaNode, w as HttpMethod, wt as UserPropertyNode, x as createInput, xt as createSchema, y as InputMeta, yt as UnionSchemaNode, z as createParameter, zt as breakDef } from "./types-
|
|
2
|
+
import { $ as sourceDef, $t as NodeDef, A as StatusCode, At as BreakNode, B as parameterDef, Bt as constDef, C as GenericOperationNode, Ct as PropertyNode, D as createOperation, Dt as InferSchemaNode, E as OperationNode, Et as propertyDef, F as requestBodyDef, Ft as JsxNode, G as UserFileNode, Gt as createJsx, H as FileNode, Ht as createBreak, I as ParameterLocation, It as TextNode, J as createImport, Jt as functionDef, K as createExport, Kt as createText, L as ParameterNode, Lt as TypeNode, M as responseDef, Mt as ConstNode, N as RequestBodyNode, Nt as FunctionNode, O as operationDef, Ot as ParserOptions, P as createRequestBody, Pt as JSDocNode, Q as importDef, Qt as DistributiveOmit, R as ParameterStyle, Rt as arrowFunctionDef, S as inputDef, St as schemaDef, T as HttpOperationNode, Tt as createProperty, U as ImportNode, Ut as createConst, V as ExportNode, Vt as createArrowFunction, W as SourceNode, Wt as createFunction, X as exportDef, Xt as textDef, Y as createSource, Yt as jsxDef, Z as fileDef, Zt as typeDef, _ as createOutput, _t as StringSchemaNode, a as Enforce, at as DatetimeSchemaNode, b as InputNode, bt as UrlSchemaNode, c as composeMacros, ct as NumberSchemaNode, d as Visitor, dt as RefSchemaNode, en as defineNode, et as ContentNode, f as VisitorContext, ft as ScalarSchemaNode, g as OutputNode, gt as SchemaType, h as Node, ht as SchemaNodeByType, i as createPrinter, it as DateSchemaNode, j as createResponse, jt as CodeNode, k as ResponseNode, kt as ArrowFunctionNode, l as defineMacro, lt as ObjectSchemaNode, m as transform, mt as SchemaNode, n as PrinterFactoryOptions, nn as NodeKind, nt as createContent, o as Macro, ot as EnumSchemaNode, p as collect, pt as ScalarSchemaType, q as createFile, qt as createType, r as PrinterPartial, rn as schemaTypes, rt as ArraySchemaNode, s as applyMacros, st as IntersectionSchemaNode, t as Printer, tn as BaseNode, tt as contentDef, u as ParentOf, ut as PrimitiveSchemaType, v as outputDef, vt as TimeSchemaNode, w as HttpMethod, wt as UserPropertyNode, x as createInput, xt as createSchema, y as InputMeta, yt as UnionSchemaNode, z as createParameter, zt as breakDef } from "./types-CsAwiskn.js";
|
|
3
3
|
|
|
4
4
|
//#region src/guards.d.ts
|
|
5
5
|
/**
|
|
@@ -118,7 +118,7 @@ declare function enumPropName(parentName: string | null | undefined, propName: s
|
|
|
118
118
|
*/
|
|
119
119
|
declare function syncSchemaRef(node: SchemaNode): SchemaNode;
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Returns `true` when a schema emits as a plain `string` type.
|
|
122
122
|
*
|
|
123
123
|
* Covers `string`, `uuid`, `email`, `url`, and `datetime` types. For `date` and `time`
|
|
124
124
|
* types, returns `true` only when `representation` is `'string'` rather than `'date'`.
|
package/dist/index.js
CHANGED
|
@@ -1117,10 +1117,11 @@ function transformChildren(node, visitor, recurse) {
|
|
|
1117
1117
|
if (next !== value) (updates ??= {})[key] = next;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
|
|
1120
|
+
if (!updates) return node;
|
|
1121
|
+
return {
|
|
1121
1122
|
...node,
|
|
1122
1123
|
...updates
|
|
1123
|
-
}
|
|
1124
|
+
};
|
|
1124
1125
|
}
|
|
1125
1126
|
/**
|
|
1126
1127
|
* Lazy depth-first collection pass. Yields every non-null value returned by
|
|
@@ -1387,7 +1388,7 @@ function extractRefName(ref) {
|
|
|
1387
1388
|
*/
|
|
1388
1389
|
function resolveRefName(node) {
|
|
1389
1390
|
if (!node || node.type !== "ref") return null;
|
|
1390
|
-
if (node.ref) return extractRefName(node.ref)
|
|
1391
|
+
if (node.ref) return extractRefName(node.ref);
|
|
1391
1392
|
return node.name ?? node.schema?.name ?? null;
|
|
1392
1393
|
}
|
|
1393
1394
|
/**
|
|
@@ -1443,7 +1444,7 @@ function syncSchemaRef(node) {
|
|
|
1443
1444
|
});
|
|
1444
1445
|
}
|
|
1445
1446
|
/**
|
|
1446
|
-
*
|
|
1447
|
+
* Returns `true` when a schema emits as a plain `string` type.
|
|
1447
1448
|
*
|
|
1448
1449
|
* Covers `string`, `uuid`, `email`, `url`, and `datetime` types. For `date` and `time`
|
|
1449
1450
|
* types, returns `true` only when `representation` is `'string'` rather than `'date'`.
|