@@ -6,7 +6,6 @@ import { dirname, isAbsolute, join, relative } from "node:path";
66import ora , { Ora } from "ora" ;
77
88import { createFeature , Feature , listFeatures } from "../services/features.js" ;
9- import { listStages , Stage } from "../services/stages.js" ;
109import { configStore } from "../stores/config.js" ;
1110import { handleError , MissingAppIdError } from "../utils/errors.js" ;
1211import { genFeatureKey , genTypes , KeyFormatPatterns } from "../utils/gen.js" ;
@@ -76,8 +75,8 @@ export const listFeaturesAction = async () => {
7675 ) ;
7776 console . table (
7877 features . map ( ( { key, name, stage } ) => ( {
79- key,
8078 name,
79+ key,
8180 stage : stage ?. name ,
8281 } ) ) ,
8382 ) ;
@@ -93,7 +92,6 @@ export const generateTypesAction = async () => {
9392
9493 let spinner : Ora | undefined ;
9594 let features : Feature [ ] = [ ] ;
96- let stages : Stage [ ] = [ ] ;
9795 try {
9896 if ( ! appId ) throw new MissingAppIdError ( ) ;
9997 spinner = ora (
@@ -111,23 +109,13 @@ export const generateTypesAction = async () => {
111109 return ;
112110 }
113111
114- try {
115- spinner = ora ( `Loading stages...` ) . start ( ) ;
116- stages = await listStages ( appId ) ;
117- spinner . succeed ( `Loaded stages.` ) ;
118- } catch ( error ) {
119- spinner ?. fail ( "Loading stages failed." ) ;
120- void handleError ( error , "Features Types" ) ;
121- return ;
122- }
123-
124112 try {
125113 spinner = ora ( "Generating feature types..." ) . start ( ) ;
126114 const projectPath = configStore . getProjectPath ( ) ;
127115
128116 // Generate types for each output configuration
129117 for ( const output of typesOutput ) {
130- const types = await genTypes ( features , stages , output . format ) ;
118+ const types = await genTypes ( features , output . format ) ;
131119 const outPath = isAbsolute ( output . path )
132120 ? output . path
133121 : join ( projectPath , output . path ) ;
0 commit comments