@dudousxd/nestjs-codegen 0.17.1 → 0.18.0

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,2 +1,2 @@
1
- export { m as ApiClientLayer, n as ApiHeaderContribution, o as ApiModuleDeps, C as CodegenExtension, p as EmittedFile, E as ExtensionContext, L as LeafModel, q as RequestModel, s as RequestShape, t as defineExtension, u as requestShape } from '../index-DCF9QSPY.cjs';
1
+ export { m as ApiClientLayer, n as ApiHeaderContribution, o as ApiModuleDeps, C as CodegenExtension, p as EmittedFile, E as ExtensionContext, L as LeafModel, q as RequestModel, s as RequestShape, t as defineExtension, u as requestShape } from '../index-Dyf4ttwU.cjs';
2
2
  import 'ts-morph';
@@ -1,2 +1,2 @@
1
- export { m as ApiClientLayer, n as ApiHeaderContribution, o as ApiModuleDeps, C as CodegenExtension, p as EmittedFile, E as ExtensionContext, L as LeafModel, q as RequestModel, s as RequestShape, t as defineExtension, u as requestShape } from '../index-DCF9QSPY.js';
1
+ export { m as ApiClientLayer, n as ApiHeaderContribution, o as ApiModuleDeps, C as CodegenExtension, p as EmittedFile, E as ExtensionContext, L as LeafModel, q as RequestModel, s as RequestShape, t as defineExtension, u as requestShape } from '../index-Dyf4ttwU.js';
2
2
  import 'ts-morph';
@@ -550,11 +550,34 @@ interface ContractDescriptor {
550
550
  interface MixinBinding {
551
551
  factoryName: string;
552
552
  factoryFilePath: string;
553
- /** Call-site arguments that resolve to a class declaration, in argument order. */
553
+ /**
554
+ * POSITIONAL call-site arguments that resolve to a class declaration, in
555
+ * argument order — `createTableController(Entity, { dto })` yields one entry.
556
+ */
554
557
  classArgs: Array<{
555
558
  name: string;
556
559
  filePath: string;
557
560
  }>;
561
+ /**
562
+ * Class-valued properties of an OPTIONS-OBJECT call-site argument, keyed by
563
+ * property name — `createTableController({ entity: Entity, filter: Filter })`
564
+ * yields `entity` and `filter`.
565
+ *
566
+ * Keyed by name rather than flattened into {@link classArgs} because the key
567
+ * is what identifies the argument's role: with a single object argument there
568
+ * is no positional order to read a role out of, and consumers want different
569
+ * properties. This package resolves `entity` (to derive the filter fields of a
570
+ * factory-generated `@Filterable({ entity })`, whose `entity` names the
571
+ * factory's own parameter and resolves to nothing on its own);
572
+ * `@dudousxd/nestjs-filter-codegen` reads `filter` off this same binding to
573
+ * resolve a call-site-supplied filter class. Empty for a purely positional
574
+ * call; both maps are populated independently, so a factory may be called
575
+ * either way.
576
+ */
577
+ namedClassArgs: Record<string, {
578
+ name: string;
579
+ filePath: string;
580
+ }>;
558
581
  }
559
582
  interface ControllerRef {
560
583
  className: string;
@@ -550,11 +550,34 @@ interface ContractDescriptor {
550
550
  interface MixinBinding {
551
551
  factoryName: string;
552
552
  factoryFilePath: string;
553
- /** Call-site arguments that resolve to a class declaration, in argument order. */
553
+ /**
554
+ * POSITIONAL call-site arguments that resolve to a class declaration, in
555
+ * argument order — `createTableController(Entity, { dto })` yields one entry.
556
+ */
554
557
  classArgs: Array<{
555
558
  name: string;
556
559
  filePath: string;
557
560
  }>;
561
+ /**
562
+ * Class-valued properties of an OPTIONS-OBJECT call-site argument, keyed by
563
+ * property name — `createTableController({ entity: Entity, filter: Filter })`
564
+ * yields `entity` and `filter`.
565
+ *
566
+ * Keyed by name rather than flattened into {@link classArgs} because the key
567
+ * is what identifies the argument's role: with a single object argument there
568
+ * is no positional order to read a role out of, and consumers want different
569
+ * properties. This package resolves `entity` (to derive the filter fields of a
570
+ * factory-generated `@Filterable({ entity })`, whose `entity` names the
571
+ * factory's own parameter and resolves to nothing on its own);
572
+ * `@dudousxd/nestjs-filter-codegen` reads `filter` off this same binding to
573
+ * resolve a call-site-supplied filter class. Empty for a purely positional
574
+ * call; both maps are populated independently, so a factory may be called
575
+ * either way.
576
+ */
577
+ namedClassArgs: Record<string, {
578
+ name: string;
579
+ filePath: string;
580
+ }>;
558
581
  }
559
582
  interface ControllerRef {
560
583
  className: string;