@kubb/ast 5.0.0-alpha.69 → 5.0.0-alpha.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/ast",
3
- "version": "5.0.0-alpha.69",
3
+ "version": "5.0.0-alpha.70",
4
4
  "description": "Spec-agnostic AST layer for Kubb. Defines nodes, visitor pattern, and factory functions used across codegen plugins.",
5
5
  "keywords": [
6
6
  "ast",
package/src/factory.ts CHANGED
@@ -505,7 +505,7 @@ export function createSource(props: Omit<SourceNode, 'kind'>): SourceNode {
505
505
  return { ...props, kind: 'Source' }
506
506
  }
507
507
 
508
- type UserFileNode<TMeta extends object = object> = Omit<FileNode<TMeta>, 'kind' | 'id' | 'name' | 'extname' | 'imports' | 'exports' | 'sources'> &
508
+ export type UserFileNode<TMeta extends object = object> = Omit<FileNode<TMeta>, 'kind' | 'id' | 'name' | 'extname' | 'imports' | 'exports' | 'sources'> &
509
509
  Pick<Partial<FileNode<TMeta>>, 'imports' | 'exports' | 'sources'>
510
510
 
511
511
  /**
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- export type { ScalarPrimitive } from './constants.ts'
2
1
  export { httpMethods, isScalarPrimitive, mediaTypes, nodeKinds, schemaTypes } from './constants.ts'
3
2
  export {
4
3
  createArrowFunction,
@@ -26,14 +25,11 @@ export {
26
25
  syncOptionality,
27
26
  } from './factory.ts'
28
27
  export { isInputNode, isOperationNode, isOutputNode, isSchemaNode, narrowSchema } from './guards.ts'
29
- export type { ParserOptions } from './infer.ts'
30
- export type { Printer, PrinterFactoryOptions, PrinterPartial } from './printer.ts'
31
28
  export { createPrinterFactory, definePrinter } from './printer.ts'
32
29
  export { extractRefName } from './refs.ts'
33
30
  export { childName, collectImports, enumPropName, findDiscriminator } from './resolvers.ts'
34
31
  export { mergeAdjacentObjects, setDiscriminatorEnum, setEnumName, simplifyUnion } from './transformers.ts'
35
32
  export type * from './types.ts'
36
- export type { OperationParamsResolver } from './utils.ts'
37
33
  export {
38
34
  caseParams,
39
35
  collectReferencedSchemaNames,
@@ -273,6 +273,11 @@ export type UnionSchemaNode = CompositeSchemaNodeBase & {
273
273
  * Discriminator property name from OpenAPI `discriminator.propertyName`.
274
274
  */
275
275
  discriminatorPropertyName?: string
276
+ /**
277
+ * Logical strategy applied to union members: 'one' means exactly one member must be valid (from `oneOf`),
278
+ * 'any' means any number of members can be valid (from `anyOf`).
279
+ */
280
+ strategy?: 'one' | 'any'
276
281
  }
277
282
 
278
283
  /**
package/src/types.ts CHANGED
@@ -62,6 +62,9 @@ export type {
62
62
  UnionSchemaNode,
63
63
  UrlSchemaNode,
64
64
  } from './nodes/index.ts'
65
- export type { Printer, PrinterFactoryOptions, PrinterPartial } from './printer.ts'
66
65
  export type { RefMap } from './refs.ts'
67
66
  export type { AsyncVisitor, CollectOptions, CollectVisitor, ParentOf, TransformOptions, Visitor, VisitorContext, WalkOptions } from './visitor.ts'
67
+ export type { Printer, PrinterFactoryOptions, PrinterPartial } from './printer.ts'
68
+ export type { ScalarPrimitive } from './constants.ts'
69
+ export type { OperationParamsResolver } from './utils.ts'
70
+ export type { UserFileNode } from './factory.ts'