@kubb/ast 5.8.4 → 5.9.1
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/README.md +6 -7
- package/dist/index.cjs +1088 -1260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -78
- package/dist/index.js +1088 -1238
- package/dist/index.js.map +1 -1
- package/dist/{types-C8GhOW_5.d.ts → types-DrSRvdtW.d.ts} +35 -203
- package/dist/types.d.ts +2 -2
- 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
|
|
2
|
+
import { $ as StatusCode, A as createSource, At as DateOnlyTypeValue, B as createArrowFunction, C as FileNode, Ct as StringSchemaNode, D as createExport, Dt as createSchema, E as UserFileNode, Et as UrlSchemaNode, F as FunctionNode, Ft as DistributiveOmit, G as createText, H as createConst, I as JSDocNode, It as NodeKind, J as HttpMethod, K as createType, L as JsxNode, Lt as schemaTypes, M as BreakNode, Mt as DateTypeOptions, N as CodeNode, Nt as InferSchemaNode, O as createFile, Ot as PropertyNode, P as ConstNode, Pt as ParserOptions, Q as ResponseNode, R as TextNode, S as ExportNode, St as SchemaType, T as SourceNode, Tt as UnionSchemaNode, U as createFunction, V as createBreak, W as createJsx, X as OperationNode, Y as HttpOperationNode, Z as createOperation, _ as OutputNode, _t as RefSchemaNode, a as Enforce, at as ParameterLocation, b as InputNode, bt as SchemaNode, c as composeMacros, ct as createParameter, d as Visitor, dt as DatetimeSchemaNode, et as createResponse, f as VisitorContext, ft as EnumSchemaNode, g as Node, gt as PrimitiveSchemaType, h as transform, ht as ObjectSchemaNode, i as createPrinter, it as createContent, j as ArrowFunctionNode, jt as DateTimeTypeValue, k as createImport, kt as createProperty, l as defineMacro, lt as ArraySchemaNode, m as collectSync, mt as NumberSchemaNode, n as PrinterFactoryOptions, nt as createRequestBody, o as Macro, ot as ParameterNode, p as collect, pt as IntersectionSchemaNode, q as GenericOperationNode, r as PrinterPartial, rt as ContentNode, s as applyMacros, st as ParameterStyle, t as Printer, tt as RequestBodyNode, u as ParentOf, ut as DateSchemaNode, v as createOutput, vt as ScalarSchemaNode, w as ImportNode, wt as TimeSchemaNode, x as createInput, xt as SchemaNodeByType, y as InputMeta, yt as ScalarSchemaType, z as TypeNode } from "./types-DrSRvdtW.js";
|
|
3
3
|
//#region src/guards.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Narrows a `SchemaNode` to the variant that matches `type`.
|
|
@@ -230,83 +230,9 @@ declare namespace factory_d_exports {
|
|
|
230
230
|
* ```
|
|
231
231
|
*/
|
|
232
232
|
declare function update<T extends Node>(node: T, changes: Partial<T>): T;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Every node definition. Adding a node means adding its `defineNode` to one
|
|
237
|
-
* `nodes/*.ts` file and listing it here. The visitor tables in `visitor.ts` derive from it.
|
|
238
|
-
*/
|
|
239
|
-
export declare const nodeDefs: (NodeDef<InputNode, Partial<Omit<InputNode, "kind">>> | NodeDef<OutputNode, Partial<Omit<OutputNode, "kind">>> | NodeDef<RequestBodyNode, Omit<RequestBodyNode, "kind">> | NodeDef<OperationNode, {
|
|
240
|
-
[key: string]: unknown;
|
|
241
|
-
operationId: string;
|
|
242
|
-
method?: HttpOperationNode["method"];
|
|
243
|
-
path?: HttpOperationNode["path"];
|
|
244
|
-
requestBody?: Omit<RequestBodyNode, "kind">;
|
|
245
|
-
}> | NodeDef<ContentNode, Omit<ContentNode, "kind">> | NodeDef<ResponseNode, Pick<ResponseNode, "statusCode"> & Partial<Omit<ResponseNode, "kind" | "content" | "statusCode">> & {
|
|
246
|
-
content?: Array<ContentNode>;
|
|
247
|
-
schema?: SchemaNode;
|
|
248
|
-
mediaType?: string | null;
|
|
249
|
-
keysToOmit?: Array<string> | null;
|
|
250
|
-
}> | NodeDef<SchemaNode, (Omit<ObjectSchemaNode, "kind" | "properties" | "primitive"> & {
|
|
251
|
-
properties?: Array<PropertyNode>;
|
|
252
|
-
primitive?: "object";
|
|
253
|
-
}) | DistributiveOmit<ArraySchemaNode | UnionSchemaNode | IntersectionSchemaNode | EnumSchemaNode | RefSchemaNode | DatetimeSchemaNode | DateSchemaNode | TimeSchemaNode | StringSchemaNode | NumberSchemaNode | UrlSchemaNode | (BaseNode & {
|
|
254
|
-
kind: "Schema";
|
|
255
|
-
name?: string | null;
|
|
256
|
-
title?: string;
|
|
257
|
-
description?: string;
|
|
258
|
-
nullable?: boolean;
|
|
259
|
-
optional?: boolean;
|
|
260
|
-
nullish?: boolean;
|
|
261
|
-
deprecated?: boolean;
|
|
262
|
-
readOnly?: boolean;
|
|
263
|
-
writeOnly?: boolean;
|
|
264
|
-
default?: unknown;
|
|
265
|
-
examples?: Array<unknown>;
|
|
266
|
-
primitive?: PrimitiveSchemaType;
|
|
267
|
-
format?: string;
|
|
268
|
-
} & {
|
|
269
|
-
type: "uuid" | "email";
|
|
270
|
-
min?: number;
|
|
271
|
-
max?: number;
|
|
272
|
-
}) | (BaseNode & {
|
|
273
|
-
kind: "Schema";
|
|
274
|
-
name?: string | null;
|
|
275
|
-
title?: string;
|
|
276
|
-
description?: string;
|
|
277
|
-
nullable?: boolean;
|
|
278
|
-
optional?: boolean;
|
|
279
|
-
nullish?: boolean;
|
|
280
|
-
deprecated?: boolean;
|
|
281
|
-
readOnly?: boolean;
|
|
282
|
-
writeOnly?: boolean;
|
|
283
|
-
default?: unknown;
|
|
284
|
-
examples?: Array<unknown>;
|
|
285
|
-
primitive?: PrimitiveSchemaType;
|
|
286
|
-
format?: string;
|
|
287
|
-
} & {
|
|
288
|
-
type: "ipv4";
|
|
289
|
-
}) | (BaseNode & {
|
|
290
|
-
kind: "Schema";
|
|
291
|
-
name?: string | null;
|
|
292
|
-
title?: string;
|
|
293
|
-
description?: string;
|
|
294
|
-
nullable?: boolean;
|
|
295
|
-
optional?: boolean;
|
|
296
|
-
nullish?: boolean;
|
|
297
|
-
deprecated?: boolean;
|
|
298
|
-
readOnly?: boolean;
|
|
299
|
-
writeOnly?: boolean;
|
|
300
|
-
default?: unknown;
|
|
301
|
-
examples?: Array<unknown>;
|
|
302
|
-
primitive?: PrimitiveSchemaType;
|
|
303
|
-
format?: string;
|
|
304
|
-
} & {
|
|
305
|
-
type: "ipv6";
|
|
306
|
-
}) | ScalarSchemaNode, "kind">> | NodeDef<PropertyNode, Pick<PropertyNode, "schema" | "name"> & Partial<Omit<PropertyNode, "kind" | "schema" | "name">>> | NodeDef<ParameterNode, Pick<ParameterNode, "schema" | "name" | "in"> & Partial<Omit<ParameterNode, "kind" | "schema" | "name" | "in">>> | NodeDef<ConstNode, Omit<ConstNode, "kind">> | NodeDef<TypeNode, Omit<TypeNode, "kind">> | NodeDef<FunctionNode, Omit<FunctionNode, "kind">> | NodeDef<ArrowFunctionNode, Omit<ArrowFunctionNode, "kind">> | NodeDef<TextNode, string> | NodeDef<BreakNode, void> | NodeDef<JsxNode, string> | NodeDef<ImportNode, Omit<ImportNode, "kind">> | NodeDef<ExportNode, Omit<ExportNode, "kind">> | NodeDef<SourceNode, Omit<SourceNode, "kind">> | NodeDef<FileNode<object>, Omit<FileNode<object>, "kind">>)[];
|
|
307
|
-
declare namespace exports_d_exports {
|
|
308
|
-
export { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateOnlyTypeValue, DateSchemaNode, DateTimeTypeValue, DateTypeOptions, DatetimeSchemaNode, DistributiveOmit, Enforce, EnumSchemaNode, ExportNode, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InferSchemaNode, InputMeta, InputNode, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, Node, NodeDef, NodeKind, NumberSchemaNode, ObjectSchemaNode, OperationNode, OutputNode, ParameterLocation, ParameterNode, ParameterStyle, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, ResponseNode, ScalarSchemaNode, ScalarSchemaType, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, applyMacros, arrowFunctionDef, breakDef, collect, collectImportedRefNames, collectSchemaRefs, collectSync, collectUsedSchemaNames, composeMacros, constDef, contentDef, createPrinter, defineMacro, defineNode, exportDef, extractStringsFromNodes, factory_d_exports as factory, fileDef, findCircularSchemas, findCircularSchemasFromGraph, functionDef, getSchemaLiteralValues, importDef, inferDiscriminatorPropertyName, inputDef, isBareRef, isHttpOperationNode, jsxDef, mergeRefWithSchema, narrowSchema, nodeDefs, operationDef, optionality, outputDef, parameterDef, propertyDef, requestBodyDef, resolveRefName, resolveSchemaProperties, responseDef, schemaDef, schemaTypes, sourceDef, textDef, transform, typeDef };
|
|
233
|
+
declare namespace index_d_exports {
|
|
234
|
+
export { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateOnlyTypeValue, DateSchemaNode, DateTimeTypeValue, DateTypeOptions, DatetimeSchemaNode, DistributiveOmit, Enforce, EnumSchemaNode, ExportNode, FileNode, FunctionNode, GenericOperationNode, HttpMethod, HttpOperationNode, ImportNode, InferSchemaNode, InputMeta, InputNode, IntersectionSchemaNode, JSDocNode, JsxNode, Macro, Node, NodeKind, NumberSchemaNode, ObjectSchemaNode, OperationNode, OutputNode, ParameterLocation, ParameterNode, ParameterStyle, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, RequestBodyNode, 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, composeMacros, createPrinter, defineMacro, extractStringsFromNodes, factory_d_exports as factory, findCircularSchemas, findCircularSchemasFromGraph, getSchemaLiteralValues, inferDiscriminatorPropertyName, isBareRef, isHttpOperationNode, mergeRefWithSchema, narrowSchema, optionality, resolveRefName, resolveSchemaProperties, schemaTypes, transform };
|
|
309
235
|
}
|
|
310
236
|
//#endregion
|
|
311
|
-
export { type ArraySchemaNode, type ArrowFunctionNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateOnlyTypeValue, type DateSchemaNode, type DateTimeTypeValue, type DateTypeOptions, type DatetimeSchemaNode, type DistributiveOmit, type Enforce, type EnumSchemaNode, type ExportNode, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InferSchemaNode, type InputMeta, type InputNode, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type Node, type
|
|
237
|
+
export { type ArraySchemaNode, type ArrowFunctionNode, type BreakNode, type CodeNode, type ConstNode, type ContentNode, type DateOnlyTypeValue, type DateSchemaNode, type DateTimeTypeValue, type DateTypeOptions, type DatetimeSchemaNode, type DistributiveOmit, type Enforce, type EnumSchemaNode, type ExportNode, type FileNode, type FunctionNode, type GenericOperationNode, type HttpMethod, type HttpOperationNode, type ImportNode, type InferSchemaNode, type InputMeta, type InputNode, type IntersectionSchemaNode, type JSDocNode, type JsxNode, type Macro, type Node, type NodeKind, type NumberSchemaNode, type ObjectSchemaNode, type OperationNode, type OutputNode, type ParameterLocation, type ParameterNode, type ParameterStyle, type ParentOf, type ParserOptions, type PrimitiveSchemaType, type Printer, type PrinterFactoryOptions, type PrinterPartial, type PropertyNode, type RefSchemaNode, type RequestBodyNode, 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, applyMacros, index_d_exports as ast, collect, collectSync, composeMacros, createPrinter, defineMacro, factory_d_exports as factory, schemaTypes, transform };
|
|
312
238
|
//# sourceMappingURL=index.d.ts.map
|