Making progress on rewrite. Looking into supabase cache helpers.
This commit is contained in:
@ -109,8 +109,8 @@ sudo -E npx supabase gen types typescript \
|
||||
# Check if the command was successful
|
||||
if [ $? -eq 0 ] && [ -s "$TEMP_FILE" ] && ! grep -q "Error" "$TEMP_FILE"; then
|
||||
# Move the temp file to the final destination
|
||||
mv "$TEMP_FILE" "$OUTPUT_DIR/types.ts"
|
||||
echo -e "${GREEN}✓ TypeScript types successfully generated at $OUTPUT_DIR/types.ts${NC}"
|
||||
mv "$TEMP_FILE" "$OUTPUT_DIR/database.types.ts"
|
||||
echo -e "${GREEN}✓ TypeScript types successfully generated at $OUTPUT_DIR/database.types.ts${NC}"
|
||||
|
||||
# Show the first few lines to confirm it looks right
|
||||
echo -e "${YELLOW}Preview of generated types:${NC}"
|
||||
@ -130,4 +130,4 @@ unset DB_URL
|
||||
|
||||
echo -e "${GREEN}${BOLD}Type generation complete!${NC}"
|
||||
echo -e "You can now use these types in your Next.js application."
|
||||
echo -e "Import them with: ${BLUE}import { Database } from '@/utils/supabase/types'${NC}"
|
||||
echo -e "Import them with: ${BLUE}import { Database } from '@/utils/supabase/database.types'${NC}"
|
||||
|
Reference in New Issue
Block a user