@kubb/ast 5.0.0-beta.94 → 5.0.0-beta.95

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.
@@ -1,5 +1,4 @@
1
1
  import { n as __name } from "./rolldown-runtime-CNktS9qV.js";
2
-
3
2
  //#region src/constants.d.ts
4
3
  /**
5
4
  * Traversal depth for AST visitor utilities.
@@ -761,55 +760,55 @@ type PrimitiveSchemaType =
761
760
  /**
762
761
  * Text value.
763
762
  */
764
- 'string'
763
+ 'string' |
765
764
  /**
766
765
  * Floating-point number.
767
766
  */
768
- | 'number'
767
+ 'number' |
769
768
  /**
770
769
  * Integer number.
771
770
  */
772
- | 'integer'
771
+ 'integer' |
773
772
  /**
774
773
  * Big integer number.
775
774
  */
776
- | 'bigint'
775
+ 'bigint' |
777
776
  /**
778
777
  * Boolean value.
779
778
  */
780
- | 'boolean'
779
+ 'boolean' |
781
780
  /**
782
781
  * Null value.
783
782
  */
784
- | 'null'
783
+ 'null' |
785
784
  /**
786
785
  * Any value.
787
786
  */
788
- | 'any'
787
+ 'any' |
789
788
  /**
790
789
  * Unknown value.
791
790
  */
792
- | 'unknown'
791
+ 'unknown' |
793
792
  /**
794
793
  * No value (`void`).
795
794
  */
796
- | 'void'
795
+ 'void' |
797
796
  /**
798
797
  * Never value.
799
798
  */
800
- | 'never'
799
+ 'never' |
801
800
  /**
802
801
  * Object value.
803
802
  */
804
- | 'object'
803
+ 'object' |
805
804
  /**
806
805
  * Array value.
807
806
  */
808
- | 'array'
807
+ 'array' |
809
808
  /**
810
809
  * Date value.
811
810
  */
812
- | 'date';
811
+ 'date';
813
812
  /**
814
813
  * Composite schema types.
815
814
  */
@@ -1107,6 +1106,13 @@ type RefSchemaNode = SchemaNodeBase & {
1107
1106
  * Used to resolve names later.
1108
1107
  */
1109
1108
  ref?: string;
1109
+ /**
1110
+ * Emitted name of the referenced schema when it differs from the pointer's last segment,
1111
+ * for example after a collision rename (`Order` becomes `OrderSchema`) or a macro rename.
1112
+ * Resolve display and import names through `resolveRefName`, which prefers this field and
1113
+ * falls back to the pointer segment, then `name`.
1114
+ */
1115
+ targetName?: string;
1110
1116
  /**
1111
1117
  * Pattern copied from a sibling `pattern` field.
1112
1118
  */
@@ -2610,7 +2616,7 @@ type PrinterHandler<TOutput, TOptions extends object, T extends SchemaType = Sch
2610
2616
  * })
2611
2617
  * ```
2612
2618
  */
2613
- type PrinterPartial<TOutput, TOptions extends object> = Partial<{ [K in SchemaType]: PrinterHandler<TOutput, TOptions, K> }>;
2619
+ type PrinterPartial<TOutput, TOptions extends object> = Partial<{ [K in SchemaType]: PrinterHandler<TOutput, TOptions, K>; }>;
2614
2620
  /**
2615
2621
  * Generic shape used by `definePrinter`.
2616
2622
  *
@@ -2680,13 +2686,13 @@ type PrinterBuilder<T extends PrinterFactoryOptions> = (options: T['options']) =
2680
2686
  * Options to store on the printer.
2681
2687
  */
2682
2688
  options: T['options'];
2683
- nodes: Partial<{ [K in SchemaType]: PrinterHandler<T['output'], T['options'], K> }>;
2689
+ nodes: Partial<{ [K in SchemaType]: PrinterHandler<T['output'], T['options'], K>; }>;
2684
2690
  /**
2685
2691
  * User-supplied handler overrides. An override wins over the matching `nodes` handler,
2686
2692
  * and can call `this.base(node)` to reuse the handler it replaced. Pass overrides here
2687
2693
  * instead of spreading them into `nodes`, otherwise `this.base` cannot find the original.
2688
2694
  */
2689
- overrides?: Partial<{ [K in SchemaType]: PrinterHandler<T['output'], T['options'], K> }>;
2695
+ overrides?: Partial<{ [K in SchemaType]: PrinterHandler<T['output'], T['options'], K>; }>;
2690
2696
  /**
2691
2697
  * Optional root-level print override. When provided, becomes the public `printer.print`.
2692
2698
  * Use `this.transform(node)` inside this function to dispatch to the node-level handlers (`nodes`),
@@ -2738,4 +2744,4 @@ type PrinterBuilder<T extends PrinterFactoryOptions> = (options: T['options']) =
2738
2744
  declare function createPrinter<T extends PrinterFactoryOptions = PrinterFactoryOptions>(build: PrinterBuilder<T>): (options?: T['options']) => Printer<T>;
2739
2745
  //#endregion
2740
2746
  export { sourceDef as $, NodeDef as $t, StatusCode as A, BreakNode as At, parameterDef as B, constDef as Bt, GenericOperationNode as C, PropertyNode as Ct, createOperation as D, InferSchemaNode as Dt, OperationNode as E, propertyDef as Et, requestBodyDef as F, JsxNode as Ft, UserFileNode as G, createJsx as Gt, FileNode as H, createBreak as Ht, ParameterLocation as I, TextNode as It, createImport as J, functionDef as Jt, createExport as K, createText as Kt, ParameterNode as L, TypeNode as Lt, responseDef as M, ConstNode as Mt, RequestBodyNode as N, FunctionNode as Nt, operationDef as O, ParserOptions as Ot, createRequestBody as P, JSDocNode as Pt, importDef as Q, DistributiveOmit as Qt, ParameterStyle as R, arrowFunctionDef as Rt, inputDef as S, schemaDef as St, HttpOperationNode as T, createProperty as Tt, ImportNode as U, createConst as Ut, ExportNode as V, createArrowFunction as Vt, SourceNode as W, createFunction as Wt, exportDef as X, textDef as Xt, createSource as Y, jsxDef as Yt, fileDef as Z, typeDef as Zt, createOutput as _, StringSchemaNode as _t, Enforce as a, DatetimeSchemaNode as at, InputNode as b, UrlSchemaNode as bt, composeMacros as c, NumberSchemaNode as ct, Visitor as d, RefSchemaNode as dt, defineNode as en, ContentNode as et, VisitorContext as f, ScalarSchemaNode as ft, OutputNode as g, SchemaType as gt, Node as h, SchemaNodeByType as ht, createPrinter as i, DateSchemaNode as it, createResponse as j, CodeNode as jt, ResponseNode as k, ArrowFunctionNode as kt, defineMacro as l, ObjectSchemaNode as lt, transform as m, SchemaNode as mt, PrinterFactoryOptions as n, NodeKind as nn, createContent as nt, Macro as o, EnumSchemaNode as ot, collect as p, ScalarSchemaType as pt, createFile as q, createType as qt, PrinterPartial as r, schemaTypes as rn, ArraySchemaNode as rt, applyMacros as s, IntersectionSchemaNode as st, Printer as t, BaseNode as tn, contentDef as tt, ParentOf as u, PrimitiveSchemaType as ut, outputDef as v, TimeSchemaNode as vt, HttpMethod as w, UserPropertyNode as wt, createInput as x, createSchema as xt, InputMeta as y, UnionSchemaNode as yt, createParameter as z, breakDef as zt };
2741
- //# sourceMappingURL=types-CsAwiskn.d.ts.map
2747
+ //# sourceMappingURL=types-CqXMgUzC.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $t as NodeDef, A as StatusCode, At as BreakNode, C as GenericOperationNode, Ct as PropertyNode, Dt as InferSchemaNode, E as OperationNode, Ft as JsxNode, G as UserFileNode, H as FileNode, I as ParameterLocation, It as TextNode, L as ParameterNode, Lt as TypeNode, Mt as ConstNode, N as RequestBodyNode, Nt as FunctionNode, Ot as ParserOptions, Pt as JSDocNode, Qt as DistributiveOmit, R as ParameterStyle, T as HttpOperationNode, U as ImportNode, V as ExportNode, W as SourceNode, _t as StringSchemaNode, a as Enforce, at as DatetimeSchemaNode, b as InputNode, bt as UrlSchemaNode, ct as NumberSchemaNode, d as Visitor, dt as RefSchemaNode, et as ContentNode, f as VisitorContext, ft as ScalarSchemaNode, g as OutputNode, gt as SchemaType, h as Node, ht as SchemaNodeByType, it as DateSchemaNode, jt as CodeNode, k as ResponseNode, kt as ArrowFunctionNode, lt as ObjectSchemaNode, mt as SchemaNode, n as PrinterFactoryOptions, nn as NodeKind, o as Macro, ot as EnumSchemaNode, pt as ScalarSchemaType, r as PrinterPartial, rt as ArraySchemaNode, st as IntersectionSchemaNode, t as Printer, u as ParentOf, ut as PrimitiveSchemaType, vt as TimeSchemaNode, w as HttpMethod, y as InputMeta, yt as UnionSchemaNode } from "./types-CsAwiskn.js";
1
+ import { $t as NodeDef, A as StatusCode, At as BreakNode, C as GenericOperationNode, Ct as PropertyNode, Dt as InferSchemaNode, E as OperationNode, Ft as JsxNode, G as UserFileNode, H as FileNode, I as ParameterLocation, It as TextNode, L as ParameterNode, Lt as TypeNode, Mt as ConstNode, N as RequestBodyNode, Nt as FunctionNode, Ot as ParserOptions, Pt as JSDocNode, Qt as DistributiveOmit, R as ParameterStyle, T as HttpOperationNode, U as ImportNode, V as ExportNode, W as SourceNode, _t as StringSchemaNode, a as Enforce, at as DatetimeSchemaNode, b as InputNode, bt as UrlSchemaNode, ct as NumberSchemaNode, d as Visitor, dt as RefSchemaNode, et as ContentNode, f as VisitorContext, ft as ScalarSchemaNode, g as OutputNode, gt as SchemaType, h as Node, ht as SchemaNodeByType, it as DateSchemaNode, jt as CodeNode, k as ResponseNode, kt as ArrowFunctionNode, lt as ObjectSchemaNode, mt as SchemaNode, n as PrinterFactoryOptions, nn as NodeKind, o as Macro, ot as EnumSchemaNode, pt as ScalarSchemaType, r as PrinterPartial, rt as ArraySchemaNode, st as IntersectionSchemaNode, t as Printer, u as ParentOf, ut as PrimitiveSchemaType, vt as TimeSchemaNode, w as HttpMethod, y as InputMeta, yt as UnionSchemaNode } from "./types-CqXMgUzC.js";
2
2
  export type { ArraySchemaNode, ArrowFunctionNode, BreakNode, CodeNode, ConstNode, ContentNode, DateSchemaNode, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/ast",
3
- "version": "5.0.0-beta.94",
3
+ "version": "5.0.0-beta.95",
4
4
  "description": "Spec-agnostic AST layer for Kubb. Defines the node tree, visitor pattern, factory functions, and type guards used across all code generation plugins.",
5
5
  "keywords": [
6
6
  "ast",
@@ -42,7 +42,7 @@
42
42
  "registry": "https://registry.npmjs.org/"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^22.20.0",
45
+ "@types/node": "^22.20.1",
46
46
  "@internals/utils": "0.0.0"
47
47
  },
48
48
  "engines": {