@kubb/core 5.0.0-alpha.52 → 5.0.0-alpha.53

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/src/types.ts CHANGED
@@ -683,6 +683,125 @@ export type KubbBuildEndContext = {
683
683
  outputDir: string
684
684
  }
685
685
 
686
+ export type KubbLifecycleStartContext = {
687
+ version: string
688
+ }
689
+
690
+ export type KubbConfigEndContext = {
691
+ configs: Array<Config>
692
+ }
693
+
694
+ export type KubbGenerationStartContext = {
695
+ config: Config
696
+ }
697
+
698
+ export type KubbGenerationEndContext = {
699
+ config: Config
700
+ files: Array<FileNode>
701
+ sources: Map<string, string>
702
+ }
703
+
704
+ export type KubbGenerationSummaryContext = {
705
+ config: Config
706
+ failedPlugins: Set<{ plugin: Plugin; error: Error }>
707
+ status: 'success' | 'failed'
708
+ hrStart: [number, number]
709
+ filesCreated: number
710
+ pluginTimings?: Map<Plugin['name'], number>
711
+ }
712
+
713
+ export type KubbVersionNewContext = {
714
+ currentVersion: string
715
+ latestVersion: string
716
+ }
717
+
718
+ export type KubbInfoContext = {
719
+ message: string
720
+ info?: string
721
+ }
722
+
723
+ export type KubbErrorContext = {
724
+ error: Error
725
+ meta?: Record<string, unknown>
726
+ }
727
+
728
+ export type KubbSuccessContext = {
729
+ message: string
730
+ info?: string
731
+ }
732
+
733
+ export type KubbWarnContext = {
734
+ message: string
735
+ info?: string
736
+ }
737
+
738
+ export type KubbDebugContext = {
739
+ date: Date
740
+ logs: Array<string>
741
+ fileName?: string
742
+ }
743
+
744
+ export type KubbFilesProcessingStartContext = {
745
+ files: Array<FileNode>
746
+ }
747
+
748
+ export type KubbFileProcessingUpdateContext = {
749
+ /**
750
+ * Number of files processed so far.
751
+ */
752
+ processed: number
753
+ /**
754
+ * Total number of files to process.
755
+ */
756
+ total: number
757
+ /**
758
+ * Processing percentage (0–100).
759
+ */
760
+ percentage: number
761
+ /**
762
+ * Optional source identifier.
763
+ */
764
+ source?: string
765
+ /**
766
+ * The file being processed.
767
+ */
768
+ file: FileNode
769
+ /**
770
+ * Kubb configuration.
771
+ * Provides access to the current config during file processing.
772
+ */
773
+ config: Config
774
+ }
775
+
776
+ export type KubbFilesProcessingEndContext = {
777
+ files: Array<FileNode>
778
+ }
779
+
780
+ export type KubbPluginStartContext = {
781
+ plugin: Plugin
782
+ }
783
+
784
+ export type KubbPluginEndContext = {
785
+ plugin: Plugin
786
+ duration: number
787
+ success: boolean
788
+ error?: Error
789
+ }
790
+
791
+ export type KubbHookStartContext = {
792
+ id?: string
793
+ command: string
794
+ args?: readonly string[]
795
+ }
796
+
797
+ export type KubbHookEndContext = {
798
+ id?: string
799
+ command: string
800
+ args?: readonly string[]
801
+ success: boolean
802
+ error: Error | null
803
+ }
804
+
686
805
  type ByTag = {
687
806
  type: 'tag'
688
807
  pattern: string | RegExp